refactor(library/data/subtype): elaborator does not need help anymore (i.e., 'show'-expression) for this file

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-09-01 19:04:15 -07:00
parent 87926b774f
commit aace5c37cd

View file

@ -27,13 +27,14 @@ section
(H : ∀(x : A) (H1 : P x), Q (tag x H1)) : Q a := (H : ∀(x : A) (H1 : P x), Q (tag x H1)) : Q a :=
subtype_rec H a subtype_rec H a
theorem tag_irrelevant {a : A} (H1 H2 : P a) : tag a H1 = tag a H2 := refl (tag a H1) theorem tag_irrelevant {a : A} (H1 H2 : P a) : tag a H1 = tag a H2 :=
rfl
theorem tag_elt_of (a : subtype P) : Π(H : P (elt_of a)), tag (elt_of a) H = a := theorem tag_elt_of (a : subtype P) : (H : P (elt_of a)), tag (elt_of a) H = a :=
subtype_destruct a (take (x : A) (H1 : P x) (H2 : P x), refl _) subtype_destruct a (take (x : A) (H1 : P x) (H2 : P x), rfl)
theorem tag_eq {a1 a2 : A} {H1 : P a1} {H2 : P a2} (H3 : a1 = a2) : tag a1 H1 = tag a2 H2 := theorem tag_eq {a1 a2 : A} {H1 : P a1} {H2 : P a2} (H3 : a1 = a2) : tag a1 H1 = tag a2 H2 :=
(show ∀(H2 : P a2), tag a1 H1 = tag a2 H2, from subst H3 (take H2, tag_irrelevant H1 H2)) H2 subst H3 (take H2, tag_irrelevant H1 H2) H2
theorem subtype_eq {a1 a2 : {x, P x}} : ∀(H : elt_of a1 = elt_of a2), a1 = a2 := theorem subtype_eq {a1 a2 : {x, P x}} : ∀(H : elt_of a1 = elt_of a2), a1 = a2 :=
subtype_destruct a1 (take x1 H1, subtype_destruct a2 (take x2 H2 H, tag_eq H)) subtype_destruct a1 (take x1 H1, subtype_destruct a2 (take x2 H2 H, tag_eq H))