<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:Calibri;
color:windowtext;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
color:teal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:595.0pt 842.0pt;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US">Hi Jesper,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US">Yes, Paolo Capritti already pointed this out to me (I was going to write an update). Basically I should not be able to use the rewriting rule on the right hand
side of a recursive definition but this certainly goes beyond the abilities of Agda’s rewrite mechanism (or only for structurally smaller indices).
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US">Thorsten<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Agda <agda-bounces@lists.chalmers.se> on behalf of Jesper Cockx <Jesper@sikanda.be><br>
<b>Date: </b>Monday, 5 March 2018 at 14:04<br>
<b>To: </b>Thorsten Altenkirch <psztxa@exmail.nottingham.ac.uk><br>
<b>Cc: </b>"andreas.abel@gu.se" <andreas.abel@gu.se>, Agda mailing list <agda@lists.chalmers.se>, Nicolai Kraus <nicolai.kraus@gmail.com><br>
<b>Subject: </b>Re: [Agda] rewriting before defining<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">The problem is that if we allow a rewrite rule to be added before its definition, then you could just prove it using refl (since it is now reflexive, by virtue of adding the rewrite rule). So this doesn't actually
give you any more guarantees than just postulating the rewrite rule outright. So I don't think it makes sense to allow this. If you can come up with a way to use a rewrite rule for other definitions but not for defining the rule itself, let us know (or even
better: implement it and send us a pull request ;) ).<o:p></o:p></p>
</div>
<p class="MsoNormal">-- Jesper<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Mar 1, 2018 at 11:02 AM, Thorsten Altenkirch <<a href="mailto:Thorsten.Altenkirch@nottingham.ac.uk" target="_blank">Thorsten.Altenkirch@nottingham.ac.uk</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">On 01/03/2018, 09:30, "Agda on behalf of Andreas Abel" <<a href="mailto:agda-bounces@lists.chalmers.se">agda-bounces@lists.chalmers.se</a> on behalf of
<a href="mailto:abela@chalmers.se">abela@chalmers.se</a>> wrote:<br>
<br>
<br>
>Well, the doctor could perform some surgery on Agda, take out the<br>
>cancerous error message and see what happens. ;-)<br>
<br>
I was hoping that a surgeon who is better versed with the Agda source would do this for me. :-) In particular I don’t really want to use a non-standard version of Agda.<br>
<br>
>I wash my hands in innocence. For me, the intended use of REWRITE was<br>
>to add a proven propositional equality to definitional equality; if you<br>
>go beyond it, you have to worry about the semantics yourself.<br>
<br>
You are right. Basically REWRITE is a limited form of equality reflection. I do prove this equality only I am proving it mutually with its use. This you can certainly do when you have full equality reflection. I shouldn’t need to introduce postulates here.<br>
<br>
This particular instance enables me to define semisimplicial types without using a 2-level theory (the 2-level approach was described in our CSL 2016 paper
<a href="http://www.cs.nott.ac.uk/~psztxa/publ/csl16.pdf" target="_blank">http://www.cs.nott.ac.uk/~psztxa/publ/csl16.pdf</a>). The rewrite version is both better from a pragmatic view (easier to use - I think) and from a semantic point (there are interpretations
or type theory that model semisimplical types but not a (strong) 2-level theory where Nat is fibrant - at least that is what Mike Shulman told me).<br>
<br>
In this setting we certainly do not want to have full equality reflection because it would destroy proof relevance and hence it is in this form incompatible with univalence. However, I claim that this instance of equality reflection is harmless (this is a conjecture).<br>
<br>
We know that REWRITE can destroy soundness - so no difference here.<br>
<span style="color:#888888"><br>
<span class="hoenzb">Thorsten</span></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
><br>
>Cheers,<br>
>Andreas<br>
><br>
>On 28.02.2018 19:07, Thorsten Altenkirch wrote:<br>
>> Hi,<br>
>><br>
>> I am mutually defining an equality and some other things. To be able to<br>
>> type check the other things I need the equality as a rewriting rule but<br>
>> agda doesn't let me.<br>
>><br>
>> That is I get the error<br>
>> Rewrite rule from function Skm-<span style="font-family:"MS Mincho"">∘</span> cannot be added before the function<br>
>> definition<br>
>> when checking the pragma REWRITE Skm-<span style="font-family:"MS Mincho"">∘</span><br>
>> when checking the attached file.<br>
>><br>
>> I know that I am cheating but I want to do it. Can I tell it that I am a<br>
>> doctor and I know what I am doing. Otherwise I shouldn't be allowed to<br>
>> use Rewrite anyway.<br>
>><br>
>> Yes, I can replace it by a postulate but that misses the point.<br>
>><br>
>> Cheers,<br>
>> Thorsten<br>
>><br>
>><br>
>> This message and any attachment are intended solely for the addressee<br>
>> and may contain confidential information. If you have received this<br>
>> message in error, please contact the sender and delete the email and<br>
>> attachment.<br>
>><br>
>> Any views or opinions expressed by the author of this email do not<br>
>> necessarily reflect the views of the University of Nottingham. Email<br>
>> communications with the University of Nottingham may be monitored<br>
>> where permitted by law.<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Agda mailing list<br>
>> <a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
>> <a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
>><br>
><br>
><br>
>--<br>
>Andreas Abel <>< Du bist der geliebte Mensch.<br>
><br>
>Department of Computer Science and Engineering<br>
>Chalmers and Gothenburg University, Sweden<br>
><br>
><a href="mailto:andreas.abel@gu.se">andreas.abel@gu.se</a><br>
><a href="http://www.cse.chalmers.se/~abela/" target="_blank">http://www.cse.chalmers.se/~abela/</a><br>
>_______________________________________________<br>
>Agda mailing list<br>
><a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
><a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
<br>
<br>
<br>
This message and any attachment are intended solely for the addressee<br>
and may contain confidential information. If you have received this<br>
message in error, please contact the sender and delete the email and<br>
attachment.<br>
<br>
Any views or opinions expressed by the author of this email do not<br>
necessarily reflect the views of the University of Nottingham. Email<br>
communications with the University of Nottingham may be monitored<br>
where permitted by law.<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Agda mailing list<br>
<a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
<a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<PRE>
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.
Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.
</PRE></body>
</html>