<div dir="ltr"><div><div><div>The type of <font face="courier new, monospace">puzzle is actually the contrapositive of the principle of equality of second projections, which is equivalent with K. So it&#39;s no wonder you didn&#39;t manage to prove it. At least the level-generic version of puzzle is inconsistent with univalence:<br>

<br><br>data Bool : Set where true false : Bool<br><br>true≠false : Â¬ Id Bool true false<br>true≠false ()<br><br>no-univalence : Â¬ Id _ (Bool , true) (Bool , false)<br>no-univalence = puzzle Set (λ X â†’ X) Bool true false true≠false<br>

<br><br></font></div><font face="courier new, monospace">However, puzzle should be provable in case you know that the type A has decidable equality. To start with, it may help to prove a generalized version of puzzle:<br>

<br><br>transport : âˆ€ {a p} {A : Set a} (P : A â†’ Set p) â†’<br>            {x y : A} â†’ Id A x y â†’ P x â†’ P y<br>transport P refl p = p<br><br>puzzle&#39; : âˆ€ {a b} (A : Set a) (B : A â†’ Set b) (x₁ xâ‚‚ : A) (y : B x₁) (z : B xâ‚‚) â†’<br>

          (p : Id A x₁ xâ‚‚) â†’ Â¬ Id (B xâ‚‚) (transport B p y) z â†’ Â¬ Id (Σ A B) (x₁ , y) (xâ‚‚ , z)<br>puzzle&#39; A B x₁ .x₁ y .y p neq refl = {!!}<br><br><br></font></div><font face="courier new, monospace">Now, neq has type [¬ Id (B x₁) (transport B p y) y], so the problem is now to prove that [transport B p y] equals y. If A has decidable equality, then it satisfies UIP by Hedberg&#39;s theorem, hence p must equal refl and [transport B p y] equals y. I hope this helps.<br>

<br></font></div><font face="courier new, monospace">Jesper<br></font><div><div><div><font face="courier new, monospace"><br></font></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 15, 2014 at 11:07 AM, Ulf Norell <span dir="ltr">&lt;<a href="mailto:ulf.norell@gmail.com" target="_blank">ulf.norell@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I&#39;ve been trying to define decidable equality on sigma types without K and I run into<br></div>

<div>problems in the case where the first components are equal but the second ones are<br></div><div>not. It boils down to solving the puzzle below, proving the contra-positive of injectivity<br>

</div><div>of _,_ in the second argument. Any without-K wizard that can give me a hand with this?<br></div><br><div><div><font face="courier new, monospace">data âŠ¥ : Set where</font></div><div><font face="courier new, monospace"><br>



</font></div><div><font face="courier new, monospace">¬_ : Set â†’ Set</font></div>
<div><font face="courier new, monospace">¬ A = A â†’ âŠ¥</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">data Î£ (A : Set) (B : A â†’ Set) : Set where</font></div><div>




<font face="courier new, monospace">  _,_ : (x : A) â†’ B x â†’ Î£ A B</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">data Id (A : Set) (x : A) : A â†’ Set where</font></div>




<div><font face="courier new, monospace">  refl : Id A x x</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">elim-Id : {A : Set} (P : âˆ€ x y â†’ Id A x y â†’ Set) â†’</font></div>




<div><font face="courier new, monospace">  Â  Â  Â  Â  (∀ x â†’ P x x refl) â†’</font></div><div><font face="courier new, monospace">  Â  Â  Â  Â  âˆ€ x y (p : Id A x y) â†’ P x y p</font></div><div><font face="courier new, monospace">elim-Id P r x .x refl = r x</font></div>




<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">puzzle : (A : Set) (B : A â†’ Set) (x : A) (y z : B x) â†’</font></div><div><font face="courier new, monospace">  Â  Â  Â  Â Â¬ Id (B x) y z â†’ Â¬ Id (Σ A B) (x , y) (x , z)</font></div>




<div><font face="courier new, monospace">puzzle A B x y z neq eq = ?</font></div></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/ Ulf</div></font></span></div>
<br>_______________________________________________<br>
Agda mailing list<br>
<a href="mailto:Agda@lists.chalmers.se">Agda@lists.chalmers.se</a><br>
<a href="https://lists.chalmers.se/mailman/listinfo/agda" target="_blank">https://lists.chalmers.se/mailman/listinfo/agda</a><br>
<br></blockquote></div><br></div>