<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 29, 2016 at 2:27 PM, Sergei Meshveliani <span dir="ltr"><<a href="mailto:mechvel@botik.ru" target="_blank">mechvel@botik.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
2. The given proof for two+0 is constructed only from the signature of<br>
+0. Hence +0 can be placed under `abstract' (for this example).<br>
<br>
Also I expect that the implementation part for +0 will not be used<br>
anywhere in type-checking any future client function, the type checker<br>
will be satisfied with the signature of +0.<br>
<br>
Can you imagine the necessity of using the implementation rules for 0+<br>
in type checking something?<br></blockquote><div><br></div><div>There are certainly cases where you need equality proofs to reduce. In this</div><div>case you might be writing a function on vectors and needing to product a</div><div>Vec A n from a Vec A (n + 0). That's easy to do given +0, but if it is abstract</div><div>your function won't evaluate (at compile time, at run-time there's no problem).</div><div><br></div><div>For equality proofs, an alternative is to use</div><div>Relation.Binary.PropositionalEquality.TrustMe.erase. This has the effect of<br></div><div>getting rid of the expensive implementation of a proof and replacing it with</div><div>a cheaper proof, that still reduces.</div><div><br></div><div>/ Ulf</div></div><br></div></div>