<div dir="ltr">Hi Conal,<div>I think the existing specialised reasoning combinators in <a href="https://github.com/agda/agda-stdlib/blob/eb338fd27861f8c9db1359fda6e0ad24df555ae0/src/Function/Related.agda#L309">Function.Related</a> for the old function hierarchy infrastructure do what you want. See <a href="https://github.com/agda/agda-stdlib/blob/eb338fd27861f8c9db1359fda6e0ad24df555ae0/src/Data/List/Relation/Unary/Any/Properties.agda#L678">Data.List.Relation.Unary.Any.Properties</a> for an example of how these can be used. Unfortunately this has not yet been ported across to the new function hierarchy...</div><div></div><div><br></div><div>I haven't thought deeply about how the standard reasoning combinators could be made to work with this level of generality. Let me know if you come up with something!</div><div>Cheers,</div><div>Matthew</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 7, 2020 at 1:42 PM Conal Elliott <<a href="mailto:conal@conal.net">conal@conal.net</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 dir="ltr"><p style="margin-bottom:1em">I’m trying to do “equational” reasoning on types where the equivalence is a flavor of isomorphism (<code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap">_↔_</code> from <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap"><span style="color:rgb(144,32,0)">Function.Bundles</span></code>, specializing <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap"><span style="color:rgb(144,32,0)">Inverse</span></code> from that module). The types of <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap">begin_</code> in <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap"><span style="color:rgb(144,32,0)">Relation.Binary.PropositionalEquality</span></code> and <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap">sym</code> in <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap"><span style="color:rgb(144,32,0)">IsEquivalence</span></code>, however, appear to disallow changing type during the chain of reasoning; i.e., for proving <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap"><span style="color:rgb(144,32,0)">A</span> <span style="color:rgb(6,40,126)">~</span> <span style="color:rgb(144,32,0)">B</span></code> they require that <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap"><span style="color:rgb(144,32,0)">A</span></code> and <code style="font-size:16.91px;background:transparent;border:none;overflow:visible;font-family:Menlo,"Lucida Console",Monaco,monospace;white-space:pre-wrap"><span style="color:rgb(144,32,0)">B</span></code> have the same type. For many equivalence relations, this restriction is fine, but isomorphisms often relate types having different levels, which is the problem I’m encountering. Is there a known workaround?</p><p style="margin-bottom:1em">Thanks, - Conal</p></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>