Skip to content

Commit

Permalink
feat(logic/basic): introduce pempty
Browse files Browse the repository at this point in the history
  • Loading branch information
semorrison committed Aug 29, 2018
1 parent 0c11112 commit f903d20
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions data/fintype.lean
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ instance : fintype empty := ⟨∅, empty.rec _⟩

@[simp] theorem fintype.card_empty : fintype.card empty = 0 := rfl

instance : fintype pempty := ⟨∅, pempty.rec _⟩

@[simp] theorem fintype.univ_pempty : @univ pempty _ = ∅ := rfl

@[simp] theorem fintype.card_pempty : fintype.card pempty = 0 := rfl

instance : fintype unit := ⟨⟨()::0, by simp⟩, λ ⟨⟩, by simp⟩

@[simp] theorem fintype.univ_unit : @univ unit _ = {()} := rfl
Expand Down
3 changes: 3 additions & 0 deletions logic/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ instance : decidable_eq empty := λa, a.elim
@[simp] theorem coe_coe {α β γ} [has_coe α β] [has_coe_t β γ]
(a : α) : (a : γ) = (a : β) := rfl

@[derive decidable_eq]
inductive {u} pempty : Type u

end miscellany

/-
Expand Down

0 comments on commit f903d20

Please sign in to comment.