Skip to content

Commit

Permalink
feat(data/equiv/basic): add ext_iff for perm (#4067)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispvm committed Sep 9, 2020
1 parent f5ee84c commit d5580f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/data/equiv/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ coe_fn_injective (funext H)
@[ext] lemma perm.ext {σ τ : equiv.perm α} (H : ∀ x, σ x = τ x) : σ = τ :=
equiv.ext H

lemma ext_iff {f g : equiv α β} : f = g ↔ ∀ x, f x = g x :=
⟨λ h x, h ▸ rfl, ext⟩

lemma perm.ext_iff {σ τ : equiv.perm α} : σ = τ ↔ ∀ x, σ x = τ x :=
ext_iff

/-- Any type is equivalent to itself. -/
@[refl] protected def refl (α : Sort*) : α ≃ α := ⟨id, id, λ x, rfl, λ x, rfl⟩

Expand Down

0 comments on commit d5580f4

Please sign in to comment.