Skip to content

Commit

Permalink
feat(data/fintype/basic): set.to_finset_empty (#3361)
Browse files Browse the repository at this point in the history
Add set.to_finset_empty, analogously to set.to_finset_univ.
  • Loading branch information
cfbolz committed Jul 11, 2020
1 parent 34d3fe1 commit d7ac180
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/data/fintype/basic.lean
Expand Up @@ -644,6 +644,10 @@ set_fintype _
(set.univ : set α).to_finset = finset.univ :=
by { ext, simp only [set.mem_univ, mem_univ, set.mem_to_finset] }

@[simp] lemma set.to_finset_empty [fintype α] :
(∅ : set α).to_finset = ∅ :=
by { ext, simp only [set.mem_empty_eq, set.mem_to_finset, not_mem_empty] }

theorem fintype.card_subtype_le [fintype α] (p : α → Prop) [decidable_pred p] :
fintype.card {x // p x} ≤ fintype.card α :=
by rw fintype.subtype_card; exact card_le_of_subset (subset_univ _)
Expand Down

0 comments on commit d7ac180

Please sign in to comment.