Documentation

Mathlib.Data.Finset.Disjoint

Disjoint finite sets #

Main declarations #

Tags #

finite sets, finset

disjoint #

theorem Finset.disjoint_left {α : Type u_1} {s t : Finset α} :
Disjoint s t ∀ ⦃a : α⦄, a sat
theorem Finset.disjoint_right {α : Type u_1} {s t : Finset α} :
Disjoint s t ∀ ⦃a : α⦄, a tas
theorem Finset.disjoint_iff_ne {α : Type u_1} {s t : Finset α} :
Disjoint s t as, bt, a b
@[simp]
theorem Finset.disjoint_val {α : Type u_1} {s t : Finset α} :
Disjoint s.val t.val Disjoint s t
theorem Disjoint.forall_ne_finset {α : Type u_1} {s t : Finset α} {a b : α} (h : Disjoint s t) (ha : a s) (hb : b t) :
a b
theorem Finset.not_disjoint_iff {α : Type u_1} {s t : Finset α} :
¬Disjoint s t as, a t
theorem Finset.disjoint_of_subset_left {α : Type u_1} {s t u : Finset α} (h : s u) (d : Disjoint u t) :
theorem Finset.disjoint_of_subset_right {α : Type u_1} {s t u : Finset α} (h : t u) (d : Disjoint s u) :
@[simp]
theorem Finset.disjoint_empty_left {α : Type u_1} (s : Finset α) :
@[simp]
theorem Finset.disjoint_empty_right {α : Type u_1} (s : Finset α) :
@[simp]
theorem Finset.disjoint_singleton_left {α : Type u_1} {s : Finset α} {a : α} :
Disjoint {a} s as
@[simp]
theorem Finset.disjoint_singleton_right {α : Type u_1} {s : Finset α} {a : α} :
Disjoint s {a} as
theorem Finset.disjoint_singleton {α : Type u_1} {a b : α} :
Disjoint {a} {b} a b
theorem Finset.disjoint_self_iff_empty {α : Type u_1} (s : Finset α) :
@[simp]
theorem Finset.disjoint_coe {α : Type u_1} {s t : Finset α} :
Disjoint s t Disjoint s t
@[simp]
theorem Finset.pairwiseDisjoint_coe {α : Type u_1} {ι : Type u_4} {s : Set ι} {f : ιFinset α} :
(s.PairwiseDisjoint fun (i : ι) => (f i)) s.PairwiseDisjoint f
instance Finset.decidableDisjoint {α : Type u_1} [DecidableEq α] (U V : Finset α) :
Equations

disjoint union #

def Finset.disjUnion {α : Type u_1} (s t : Finset α) (h : Disjoint s t) :

disjUnion s t h is the set such that a ∈ disjUnion s t h iff a ∈ s or a ∈ t. It is the same as s ∪ t, but it does not require decidable equality on the type. The hypothesis ensures that the sets are disjoint.

Equations
  • s.disjUnion t h = { val := s.val + t.val, nodup := }
Instances For
    @[simp]
    theorem Finset.mem_disjUnion {α : Type u_4} {s t : Finset α} {h : Disjoint s t} {a : α} :
    a s.disjUnion t h a s a t
    @[simp]
    theorem Finset.coe_disjUnion {α : Type u_1} {s t : Finset α} (h : Disjoint s t) :
    (s.disjUnion t h) = s t
    theorem Finset.disjUnion_comm {α : Type u_1} (s t : Finset α) (h : Disjoint s t) :
    s.disjUnion t h = t.disjUnion s
    @[simp]
    theorem Finset.empty_disjUnion {α : Type u_1} (t : Finset α) (h : Disjoint t := ) :
    .disjUnion t h = t
    @[simp]
    theorem Finset.disjUnion_empty {α : Type u_1} (s : Finset α) (h : Disjoint s := ) :
    s.disjUnion h = s
    theorem Finset.singleton_disjUnion {α : Type u_1} (a : α) (t : Finset α) (h : Disjoint {a} t) :
    {a}.disjUnion t h = Finset.cons a t
    theorem Finset.disjUnion_singleton {α : Type u_1} (s : Finset α) (a : α) (h : Disjoint s {a}) :
    s.disjUnion {a} h = Finset.cons a s

    insert #

    @[simp]
    theorem Finset.disjoint_insert_left {α : Type u_1} [DecidableEq α] {s t : Finset α} {a : α} :
    Disjoint (insert a s) t at Disjoint s t
    @[simp]
    theorem Finset.disjoint_insert_right {α : Type u_1} [DecidableEq α] {s t : Finset α} {a : α} :
    Disjoint s (insert a t) as Disjoint s t
    @[simp]
    theorem Multiset.disjoint_toFinset {α : Type u_1} [DecidableEq α] {m1 m2 : Multiset α} :
    Disjoint m1.toFinset m2.toFinset Disjoint m1 m2
    @[simp]
    theorem List.disjoint_toFinset_iff_disjoint {α : Type u_1} [DecidableEq α] {l l' : List α} :
    Disjoint l.toFinset l'.toFinset l.Disjoint l'