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

Commit aadfde6

Browse files
ChrisHughes24robertylewis
authored andcommitted
feat(data/fintype): fintype.card_subtype_lt (#1635)
* feat(data/fintype): fintype.card_subtype_lt * Update src/data/fintype.lean Co-Authored-By: Rob Lewis <Rob.y.lewis@gmail.com>
1 parent ca90081 commit aadfde6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/data/fintype.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,11 @@ theorem fintype.card_subtype_le [fintype α] (p : α → Prop) [decidable_pred p
443443
fintype.card {x // p x} ≤ fintype.card α :=
444444
by rw fintype.subtype_card; exact card_le_of_subset (subset_univ _)
445445

446+
theorem fintype.card_subtype_lt [fintype α] {p : α → Prop} [decidable_pred p]
447+
{x : α} (hx : ¬ p x) : fintype.card {x // p x} < fintype.card α :=
448+
by rw [fintype.subtype_card]; exact finset.card_lt_card
449+
⟨subset_univ _, classical.not_forall.2 ⟨x, by simp [*, set.mem_def]⟩⟩
450+
446451
instance psigma.fintype {α : Type*} {β : α → Type*} [fintype α] [∀ a, fintype (β a)] :
447452
fintype (Σ' a, β a) :=
448453
fintype.of_equiv _ (equiv.psigma_equiv_sigma _).symm

0 commit comments

Comments
 (0)