Skip to content

Commit

Permalink
feat(data/equiv/basic): equiv.nonempty_iff_nonempty (#1020)
Browse files Browse the repository at this point in the history
  • Loading branch information
rwbarton authored and mergify[bot] committed May 13, 2019
1 parent 01b345c commit f8385b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data/equiv/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ protected theorem subsingleton (e : α ≃ β) : ∀ [subsingleton β], subsingl
protected def decidable_eq (e : α ≃ β) [H : decidable_eq β] : decidable_eq α
| a b := decidable_of_iff _ e.injective.eq_iff

lemma nonempty_iff_nonempty : α ≃ β → (nonempty α ↔ nonempty β)
| ⟨f, g, _, _⟩ := nonempty.congr f g

protected def cast {α β : Sort*} (h : α = β) : α ≃ β :=
⟨cast h, cast h.symm, λ x, by cases h; refl, λ x, by cases h; refl⟩

Expand Down

0 comments on commit f8385b1

Please sign in to comment.