<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">For functions with distinct rigid right-hand sides Agda can invert the function when solving constraints.</div><div dir="ltr">For instance, given</div><div dir="ltr"><div><br></div><div><div><font face="monospace, monospace">F : Bool → Set</font></div><div><font face="monospace, monospace">F false = Nat</font></div><div><font face="monospace, monospace">F true = Bool</font></div><div><br></div><div>Agda can solve α := false when faced with a constraint F α == Nat. This is not guaranteed</div></div><div>to terminate however, so there's a maximum number of times a meta variable can be solved</div><div>by inversion before we give up.</div><div><br></div><div>Here's a simple way to trigger the cutoff:</div><div><br></div><div><div><font face="monospace, monospace">f : Nat → Nat</font></div><div><font face="monospace, monospace">f zero = zero</font></div><div><font face="monospace, monospace">f (suc n) = suc (suc (f n))</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">test : let X = _ in f X ≡ suc (f X)</font></div><div><font face="monospace, monospace">test = refl</font></div></div><div><br></div><div>/ Ulf<br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 14, 2018 at 8:41 PM Martin Escardo <<a href="mailto:m.escardo@cs.bham.ac.uk">m.escardo@cs.bham.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">What does Agda mean when it says<br>
<br>
"<br>
Refusing to invert pattern matching of transport because the<br>
maximum depth (50) has been reached. Most likely this means you<br>
have an unsatisfiable constraint, but it could also mean that you<br>
need to increase the maximum depth using the flag<br>
--inversion-max-depth=N<br>
"<br>
<br>
What does it mean to "invert pattern matching of transport"?<br>
<br>
(I like this error message.)<br>
<br>
Thanks,<br>
Martin<br>
<br>
_______________________________________________<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>