@@ -30,7 +30,7 @@ attribute [inline] and.decidable or.decidable decidable.false xor.decidable iff.
30
30
decidable.true implies.decidable not.decidable ne.decidable
31
31
bool.decidable_eq decidable.to_bool
32
32
33
- attribute [simp] cast_eq
33
+ attribute [simp] cast_eq cast_heq
34
34
35
35
variables {α : Type *} {β : Type *}
36
36
@@ -655,10 +655,15 @@ lemma eq_rec_constant {α : Sort*} {a a' : α} {β : Sort*} (y : β) (h : a = a'
655
655
by { cases h, refl, }
656
656
657
657
@[simp]
658
- lemma eq_mp_rfl {α : Sort *} {a : α} : eq.mp (eq.refl α) a = a := rfl
658
+ lemma eq_mp_eq_cast {α β : Sort *} (h : α = β) : eq.mp h = cast h := rfl
659
659
660
660
@[simp]
661
- lemma eq_mpr_rfl {α : Sort *} {a : α} : eq.mpr (eq.refl α) a = a := rfl
661
+ lemma eq_mpr_eq_cast {α β : Sort *} (h : α = β) : eq.mpr h = cast h.symm := rfl
662
+
663
+ @[simp]
664
+ lemma cast_cast : ∀ {α β γ : Sort *} (ha : α = β) (hb : β = γ) (a : α),
665
+ cast hb (cast ha a) = cast (ha.trans hb) a
666
+ | _ _ _ rfl rfl a := rfl
662
667
663
668
@[simp] lemma congr_refl_left {α β : Sort *} (f : α → β) {a b : α} (h : a = b) :
664
669
congr (eq.refl f) h = congr_arg f h :=
@@ -680,17 +685,14 @@ rfl
680
685
congr_fun (congr_arg f p) b = congr_arg (λ a, f a b) p :=
681
686
rfl
682
687
683
- lemma heq_of_eq_mp :
684
- ∀ {α β : Sort *} {a : α} {a' : β} (e : α = β) (h₂ : (eq.mp e a) = a'), a == a'
688
+ lemma heq_of_cast_eq :
689
+ ∀ {α β : Sort *} {a : α} {a' : β} (e : α = β) (h₂ : cast e a = a'), a == a'
685
690
| α ._ a a' rfl h := eq.rec_on h (heq.refl _)
686
691
687
692
lemma rec_heq_of_heq {β} {C : α → Sort *} {x : C a} {y : β} (eq : a = b) (h : x == y) :
688
693
@eq.rec α a C x b eq == y :=
689
694
by subst eq; exact h
690
695
691
- @[simp] lemma {u } eq_mpr_heq {α β : Sort u} (h : β = α) (x : α) : eq.mpr h x == x :=
692
- by subst h; refl
693
-
694
696
protected lemma eq.congr {x₁ x₂ y₁ y₂ : α} (h₁ : x₁ = y₁) (h₂ : x₂ = y₂) :
695
697
(x₁ = x₂) ↔ (y₁ = y₂) :=
696
698
by { subst h₁, subst h₂ }
0 commit comments