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

Commit 1d9ff68

Browse files
ChrisHughes24mergify[bot]
authored andcommitted
feat(function/embedding): ext and ext_iff (#962)
1 parent 0d7b419 commit 1d9ff68

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/logic/embedding.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ protected def equiv.to_embedding {α : Sort u} {β : Sort v} (f : α ≃ β) :
3030
namespace function
3131
namespace embedding
3232

33+
@[extensionality] lemma ext {α β} {f g : embedding α β} (h : ∀ x, f x = g x) : f = g :=
34+
by cases f; cases g; simpa using funext h
35+
36+
lemma ext_iff {α β} {f g : embedding α β} : (∀ x, f x = g x) ↔ f = g :=
37+
⟨ext, λ h _, by rw h⟩
38+
3339
@[simp] theorem to_fun_eq_coe {α β} (f : α ↪ β) : to_fun f = f := rfl
3440

3541
@[simp] theorem coe_fn_mk {α β} (f : α → β) (i) :

0 commit comments

Comments
 (0)