Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit f903d20

Browse files
committed
feat(logic/basic): introduce pempty
1 parent 0c11112 commit f903d20

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

data/fintype.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ instance : fintype empty := ⟨∅, empty.rec _⟩
169169

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

172+
instance : fintype pempty := ⟨∅, pempty.rec _⟩
173+
174+
@[simp] theorem fintype.univ_pempty : @univ pempty _ = ∅ := rfl
175+
176+
@[simp] theorem fintype.card_pempty : fintype.card pempty = 0 := rfl
177+
172178
instance : fintype unit := ⟨⟨()::0, by simp⟩, λ ⟨⟩, by simp⟩
173179

174180
@[simp] theorem fintype.univ_unit : @univ unit _ = {()} := rfl

logic/basic.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ instance : decidable_eq empty := λa, a.elim
3737
@[simp] theorem coe_coe {α β γ} [has_coe α β] [has_coe_t β γ]
3838
(a : α) : (a : γ) = (a : β) := rfl
3939

40+
@[derive decidable_eq]
41+
inductive {u} pempty : Type u
42+
4043
end miscellany
4144

4245
/-

0 commit comments

Comments
 (0)