feat(hott,library): auxiliary theorems for simplifier
This commit is contained in:
parent
85409a59d3
commit
00232e70d6
2 changed files with 12 additions and 2 deletions
|
@ -338,6 +338,11 @@ definition if_congr {c₁ c₂ : Type} [H₁ : decidable c₁] {A : Type} {t₁
|
|||
have H2 [visible] : decidable c₂, from (decidable.decidable_iff_equiv H₁ Hc),
|
||||
if_congr_aux Hc Ht He
|
||||
|
||||
theorem implies_of_if_pos {c t e : Type} [H : decidable c] (h : if c then t else e) : c → t :=
|
||||
assume Hc, eq.rec_on (if_pos Hc) h
|
||||
|
||||
theorem implies_of_if_neg {c t e : Type} [H : decidable c] (h : if c then t else e) : ¬c → e :=
|
||||
assume Hnc, eq.rec_on (if_neg Hnc) h
|
||||
|
||||
-- We use "dependent" if-then-else to be able to communicate the if-then-else condition
|
||||
-- to the branches
|
||||
|
|
|
@ -117,8 +117,7 @@ namespace ne
|
|||
end ne
|
||||
|
||||
section
|
||||
open eq.ops
|
||||
variables {A : Type} {a b c : A}
|
||||
variables {A : Type} {a : A}
|
||||
|
||||
theorem false.of_ne : a ≠ a → false :=
|
||||
assume H, H rfl
|
||||
|
@ -501,6 +500,12 @@ decidable.rec
|
|||
(λ Hnc : ¬c, eq.refl (@ite c (decidable.inr Hnc) A t t))
|
||||
H
|
||||
|
||||
theorem implies_of_if_pos {c t e : Prop} [H : decidable c] (h : if c then t else e) : c → t :=
|
||||
assume Hc, eq.rec_on (if_pos Hc) h
|
||||
|
||||
theorem implies_of_if_neg {c t e : Prop} [H : decidable c] (h : if c then t else e) : ¬c → e :=
|
||||
assume Hnc, eq.rec_on (if_neg Hnc) h
|
||||
|
||||
-- We use "dependent" if-then-else to be able to communicate the if-then-else condition
|
||||
-- to the branches
|
||||
definition dite (c : Prop) [H : decidable c] {A : Type} (t : c → A) (e : ¬ c → A) : A :=
|
||||
|
|
Loading…
Add table
Reference in a new issue