<div dir="ltr"><div>Hi Thorsten,</div><div><br></div><div>The constraints you get are <br></div><div><br></div><div> ?l + (?m + ?n) = l + (m + n) : ℕ<br> ?l + ?m + ?n = l + m + n : ℕ</div><div><br></div><div>You are right that ?l := l, ?m := m, ?n := n is the only solution, but this</div><div>requires some non-trivial reasoning. For instance, the first constraint</div><div> can be satisfied by</div><div><br></div><div> ?l := 0, ?m := l, ?n := (m + n)</div><div><br></div><div>so Agda would need to look at both constraints together to rule out this solution.</div><div><br></div><div>/ Ulf<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 8, 2020 at 7:26 PM Thorsten Altenkirch <<a href="mailto:Thorsten.Altenkirch@nottingham.ac.uk">Thorsten.Altenkirch@nottingham.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-GB">
<div class="gmail-m_1816171308023590562WordSection1">
<p class="MsoNormal"><span style="font-size:11pt">I define<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">record isMonoid {A : Set}(e : A)(_•_ : A → A → A) : Prp where<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> field<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> lneutr : {x : A} → e • x ≡ x<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> </span><span style="font-size:11pt" lang="DE">rneutr : {x : A} → x • e ≡ x<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt" lang="DE"> </span><span style="font-size:11pt" lang="PL">assoc : {x y z : A} → (x • y) • z ≡ x • (y • z)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt" lang="PL"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">and I have shown all 3 properties, in particular:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">assoc+ : {l m n : </span><span style="font-size:11pt;font-family:"Cambria Math",serif">ℕ</span><span style="font-size:11pt">} → (l + m) + n ≡ l + (m + n)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">but when I try<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">isMonoid : isMonoid zero _+_<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">+isMonoid = record {<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> lneutr = lneutr+ ;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> rneutr = rneutr+ ;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> assoc = assoc+ }<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">I get some unsolved constraints, even though my proof and the goal are alpha-equivalent! Ok I can fix this by eta expanding:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"> assoc = λ {x}{y}{z} → assoc+ {x}{y}{z}<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt">But this shouldn’t be necessary.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt"><u></u> <u></u></span></p>
</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></div>
_______________________________________________<br>
Agda mailing list<br>
<a href="mailto:Agda@lists.chalmers.se" target="_blank">Agda@lists.chalmers.se</a><br>
<a href="https://lists.chalmers.se/mailman/listinfo/agda" rel="noreferrer" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
</blockquote></div>