File size: 534 Bytes
bf6216d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | module
public import Mathlib.Data.Set.Card
public import PFR.Mathlib.Data.Set.Insert
public section
namespace Set
variable {α : Type*}
-- TODO: Rename `ncard_singleton_inter` to `ncard_singleton_inter_le_one`
lemma ncard_singleton_inter' (a : α) (s : Set α) [Decidable (a ∈ s)] :
({a} ∩ s).ncard = if a ∈ s then 1 else 0 := by
split_ifs <;> simp [*]
lemma ncard_inter_singleton (a : α) (s : Set α) [Decidable (a ∈ s)] :
(s ∩ {a}).ncard = if a ∈ s then 1 else 0 := by
split_ifs <;> simp [*]
end Set
|