<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="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:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Phil,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Your rewrite is an no-op, because the goal does not have the corresponding left hand side:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Goal: reflᴳ <span style="font-family:"Cambria Math",serif">⊢</span> M
<span lang="ZH-CN" style="font-family:DengXian">↑</span> p <span lang="ZH-CN" style="font-family:DengXian">
≤</span>ᴹ M <span lang="ZH-CN" style="font-family:DengXian">↑</span> p <span style="font-family:"Cambria Math",serif">
⦂</span> id</p>
<p class="MsoNormal">Have: (id <span style="font-family:"Cambria Math",serif">⨟</span> p)
<span lang="ZH-CN" style="font-family:DengXian">≡</span> p</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You can apply reflexivity to rewrite all p to (id <span style="font-family:"Cambria Math",serif">
⨟</span> p) but this is not want you want. In Agda you cannot specify which p to rewrite so I suppose this is a limitation. There is nothing wrong with the current solution you have.
</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Jason Hu<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:wadler@inf.ed.ac.uk">Philip Wadler</a><br>
<b>Sent: </b>Sunday, January 9, 2022 10:56 AM<br>
<b>To: </b><a href="mailto:agda@lists.chalmers.se">Agda mailing list</a><br>
<b>Subject: </b>[Agda] More rewrite woes</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I've attached code where a rewrite should work but does not. There are many places in the full development where I encounter similar issues. Rewrite works fine in the original definition of left-id, but not in the subsequent attempt to
prove reflᴹ. Any advice on how to fix it?<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The file is cut down from the original---I apologise that it is still rather lengthy. The issue with rewrite appears at the end. I am using Agda version 2.6.1.1-fce01db.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you for your help! Go well, -- P<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">. \ Philip Wadler, Professor of Theoretical Computer Science,<br>
. /\ School of Informatics, University of Edinburgh<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">. / \ and Senior Research Fellow, IOHK<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">. <a href="http://homepages.inf.ed.ac.uk/wadler/" target="_blank">
http://homepages.inf.ed.ac.uk/wadler/</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>