Skip to content

Commit 08340f4

Browse files
committed
feat(Logic/Embedding/Basic): refl_trans/trans_refl/trans_assoc (leanprover-community#38592)
- `(.refl α).trans f = f` - `f.trans (.refl β) = f` - `(f.trans g).trans h = f.trans (g.trans h)`
1 parent 8d26c83 commit 08340f4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Mathlib/Logic/Embedding/Basic.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,18 @@ protected def trans {α β γ} (f : α ↪ β) (g : β ↪ γ) : α ↪ γ :=
135135
@[norm_cast]
136136
theorem coe_trans {α β γ} (f : α ↪ β) (g : β ↪ γ) : ⇑(f.trans g) = ⇑g ∘ ⇑f := rfl
137137

138+
@[simp]
139+
theorem refl_trans {α β : Type*} (f : α ↪ β) : .trans (.refl α) f = f :=
140+
rfl
141+
142+
@[simp]
143+
theorem trans_refl {α β : Type*} (f : α ↪ β) : .trans f (.refl β) = f :=
144+
rfl
145+
146+
theorem trans_assoc {α β γ δ : Type*} (f : α ↪ β) (g : β ↪ γ) (h : γ ↪ δ) :
147+
(f.trans g).trans h = f.trans (g.trans h) :=
148+
rfl
149+
138150
instance : Trans Embedding Embedding Embedding := ⟨Embedding.trans⟩
139151

140152
@[simp] lemma mk_id {α} : mk id injective_id = .refl α := rfl

0 commit comments

Comments
 (0)