Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 786c737

Browse files
kim-emmergify[bot]
andauthored
feat(logic/basic): trivial transport lemmas (#2254)
* feat(logic/basic): trivial transport lemmas * oops Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 451de27 commit 786c737

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/category_theory/limits/shapes/equalizers.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def parallel_pair (f g : X ⟶ Y) : walking_parallel_pair.{v} ⥤ C :=
115115
| _, _, right := g
116116
end,
117117
-- `tidy` can cope with this, but it's too slow:
118-
map_comp' := begin rintros (⟨⟩|⟨⟩) (⟨⟩|⟨⟩) (⟨⟩|⟨⟩) ⟨⟩⟨⟩; { unfold_aux, simp, refl, }, end, }.
118+
map_comp' := begin rintros (⟨⟩|⟨⟩) (⟨⟩|⟨⟩) (⟨⟩|⟨⟩) ⟨⟩⟨⟩; { unfold_aux, simp; refl }, end, }.
119119

120120
@[simp] lemma parallel_pair_obj_zero (f g : X ⟶ Y) : (parallel_pair f g).obj zero = X := rfl
121121
@[simp] lemma parallel_pair_obj_one (f g : X ⟶ Y) : (parallel_pair f g).obj one = Y := rfl

src/data/nat/basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ theorem shiftl'_tt_ne_zero (m) : ∀ {n} (h : n ≠ 0), shiftl' tt m n ≠ 0
915915
begin
916916
rw size,
917917
conv { to_lhs, rw [binary_rec], simp [h] },
918-
rw div2_bit, refl
918+
rw div2_bit,
919919
end
920920

921921
@[simp] theorem size_bit0 {n} (h : n ≠ 0) : size (bit0 n) = succ (size n) :=

src/logic/basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,18 @@ mt $ λ e, e ▸ h
395395
theorem eq_equivalence : equivalence (@eq α) :=
396396
⟨eq.refl, @eq.symm _, @eq.trans _⟩
397397

398+
/-- Transport through trivial families is the identity. -/
399+
@[simp]
400+
lemma eq_rec_constant {α : Sort*} {a a' : α} {β : Sort*} (y : β) (h : a = a') :
401+
(@eq.rec α a (λ a, β) y a' h) = y :=
402+
by { cases h, refl, }
403+
404+
@[simp]
405+
lemma eq_mp_rfl {α : Sort*} {a : α} : eq.mp (eq.refl α) a = a := rfl
406+
407+
@[simp]
408+
lemma eq_mpr_rfl {α : Sort*} {a : α} : eq.mpr (eq.refl α) a = a := rfl
409+
398410
lemma heq_of_eq_mp :
399411
∀ {α β : Sort*} {a : α} {a' : β} (e : α = β) (h₂ : (eq.mp e a) = a'), a == a'
400412
| α ._ a a' rfl h := eq.rec_on h (heq.refl _)

0 commit comments

Comments
 (0)