Skip to content

Commit

Permalink
feat(function/embedding): ext and ext_iff
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisHughes24 committed Apr 23, 2019
1 parent 0d7b419 commit a9b2fd4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/logic/embedding.lean
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ protected def equiv.to_embedding {α : Sort u} {β : Sort v} (f : α ≃ β) :
namespace function
namespace embedding

@[extensionality] lemma ext {α β} {f g : embedding α β} (h : ∀ x, f x = g x) : f = g :=
by cases f; cases g; simpa using funext h

lemma ext_iff {α β} {f g : embedding α β} : (∀ x, f x = g x) ↔ f = g :=
⟨ext, λ h _, by rw h⟩

@[simp] theorem to_fun_eq_coe {α β} (f : α ↪ β) : to_fun f = f := rfl

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

0 comments on commit a9b2fd4

Please sign in to comment.