Skip to content

Commit

Permalink
generalize instance
Browse files Browse the repository at this point in the history
  • Loading branch information
robertylewis committed Feb 10, 2020
1 parent 97bb8ee commit 234877c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/logic/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ lemma nonempty.elim_to_inhabited {α : Sort*} [h : nonempty α] {p : Prop}
(f : inhabited α → p) : p :=
h.elim $ f ∘ inhabited.mk

instance {γ} [h : nonempty γ] : nonempty × γ) :=
h.elim $ λ g, ⟨⟨g, g⟩⟩
instance {α β} [h : nonempty α] [h2 : nonempty β] : nonempty (α × β) :=
h.elim $ λ g, h2.elim $ λ g2, ⟨⟨g, g2⟩⟩

end nonempty

0 comments on commit 234877c

Please sign in to comment.