aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Equality.v
diff options
context:
space:
mode:
authorJason Gross <jagro@google.com>2016-07-29 10:46:55 -0700
committerJason Gross <jagro@google.com>2016-07-29 10:46:55 -0700
commit0b0728b5a447d6f7ff5fdf80c87d66ac714c3151 (patch)
tree8a298710e99326dd4898f2a5f346f7a7d6d5546c /src/Util/Equality.v
parente1be713c8b2e676eb61226de270a8231615577da (diff)
Set Asymmetric Patterns, add util lemmas about sig
Diffstat (limited to 'src/Util/Equality.v')
-rw-r--r--src/Util/Equality.v25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Util/Equality.v b/src/Util/Equality.v
new file mode 100644
index 000000000..1ff76a009
--- /dev/null
+++ b/src/Util/Equality.v
@@ -0,0 +1,25 @@
+(** * Lemmas about [eq] *)
+
+Definition concat_1p {A x y} (p : x = y :> A) : eq_trans eq_refl p = p.
+Proof. case p; reflexivity. Defined.
+Definition concat_p1 {A x y} (p : x = y :> A) : eq_trans p eq_refl = p.
+Proof. case p; reflexivity. Defined.
+Definition concat_pV {A x y} (p : x = y :> A) : eq_trans p (eq_sym p) = eq_refl.
+Proof. case p; reflexivity. Defined.
+Definition concat_Vp {A x y} (p : x = y :> A) : eq_trans (eq_sym p) p = eq_refl.
+Proof. case p; reflexivity. Defined.
+Definition transport_pp {A} {P : A -> Type} {x y z} (p : x = y) (q : y = z) (k : P x)
+: eq_rect _ P k _ (eq_trans p q) = eq_rect _ P (eq_rect _ P k _ p) _ q.
+Proof. case q; simpl; reflexivity. Defined.
+Lemma transport_const {A P x y} (p : x = y :> A) k
+: eq_rect _ (fun _ : A => P) k _ p = k.
+Proof. case p; reflexivity. Defined.
+Lemma ap_const {A B x y} (b : B) (p : x = y :> A)
+: f_equal (fun _ => b) p = eq_refl.
+Proof. case p; reflexivity. Defined.
+Lemma inv_pp {A x y z} (p : x = y :> A) (q : y = z :> A)
+: eq_sym (eq_trans p q) = eq_trans (eq_sym q) (eq_sym p).
+Proof. case q; case p; reflexivity. Defined.
+Lemma inv_V {A x y} (p : x = y :> A)
+: eq_sym (eq_sym p) = p.
+Proof. case p; reflexivity. Defined.