Last active
January 28, 2020 00:33
-
-
Save Blaisorblade/7a984acd822846a486adf59e25129e8b to your computer and use it in GitHub Desktop.
How to prove equality of sigma types with decidable predicates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From mathcomp Require Import ssreflect ssrnat eqtype ssrbool seq tuple. | |
Import EqNotations. | |
Lemma sig_bool_eq {A : Type} {P : A -> bool} (x y: {z | P z}): sval x = sval y -> x = y. | |
Proof. | |
case: x y => [x Px] [y Py] /= Hxy; destruct Hxy. | |
apply eq_exist_uncurried. exists (Logic.eq_refl _). | |
apply bool_irrelevance. | |
Qed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment