Datasets:

ArXiv:
License:
lean-pfr / PFR /Mathlib /Data /Set /Card.lean
cfahlgren1's picture
cfahlgren1 HF Staff
mirror at 1899ce8ed95fc310cce53d4c7ecfa2beb20ebec4
bf6216d verified
Raw History Blame Contribute Delete
534 Bytes
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