File: Mathlib/MeasureTheory/SetSemiring.lean

full_name: MeasureTheory.IsSetSemiring.inter_mem
code: /-- A semi-ring of sets `C` is a family of sets containing `∅`, stable by intersection and such that
for all `s, t ∈ C`, `s \ t` is equal to a disjoint union of finitely many sets in `C`. -/
structure IsSetSemiring (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  inter_mem : ∀ s ∈ C, ∀ t ∈ C, s ∩ t ∈ C
  diff_eq_sUnion' : ∀ s ∈ C, ∀ t ∈ C,
    ∃ I : Finset (Set α), ↑I ⊆ C ∧ PairwiseDisjoint (I : Set (Set α)) id ∧ s \ t = ⋃₀ I
goal: s ∈ C → ∀ t ∈ C, s ∩ t ∈ C

full_name: MeasureTheory.IsSetSemiring.empty_mem
code: /-- A semi-ring of sets `C` is a family of sets containing `∅`, stable by intersection and such that
for all `s, t ∈ C`, `s \ t` is equal to a disjoint union of finitely many sets in `C`. -/
structure IsSetSemiring (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  inter_mem : ∀ s ∈ C, ∀ t ∈ C, s ∩ t ∈ C
  diff_eq_sUnion' : ∀ s ∈ C, ∀ t ∈ C,
    ∃ I : Finset (Set α), ↑I ⊆ C ∧ PairwiseDisjoint (I : Set (Set α)) id ∧ s \ t = ⋃₀ I
goal: ∅ ∈ C

full_name: MeasureTheory.IsSetSemiring
code: /-- A semi-ring of sets `C` is a family of sets containing `∅`, stable by intersection and such that
for all `s, t ∈ C`, `s \ t` is equal to a disjoint union of finitely many sets in `C`. -/
structure IsSetSemiring (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  inter_mem : ∀ s ∈ C, ∀ t ∈ C, s ∩ t ∈ C
  diff_eq_sUnion' : ∀ s ∈ C, ∀ t ∈ C,
    ∃ I : Finset (Set α), ↑I ⊆ C ∧ PairwiseDisjoint (I : Set (Set α)) id ∧ s \ t = ⋃₀ I
goal: Prop

full_name: MeasureTheory.IsSetSemiring.diff_eq_sUnion'
code: /-- A semi-ring of sets `C` is a family of sets containing `∅`, stable by intersection and such that
for all `s, t ∈ C`, `s \ t` is equal to a disjoint union of finitely many sets in `C`. -/
structure IsSetSemiring (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  inter_mem : ∀ s ∈ C, ∀ t ∈ C, s ∩ t ∈ C
  diff_eq_sUnion' : ∀ s ∈ C, ∀ t ∈ C,
    ∃ I : Finset (Set α), ↑I ⊆ C ∧ PairwiseDisjoint (I : Set (Set α)) id ∧ s \ t = ⋃₀ I
goal: s ∈ C → ∀ t ∈ C, ∃ I, ↑I ⊆ C ∧ (↑I).PairwiseDisjoint id ∧ s \ t = ⋃₀ ↑I

full_name: MeasureTheory.IsSetSemiring.isPiSystem
code: lemma isPiSystem (hC : IsSetSemiring C) : IsPiSystem C 
goal: IsPiSystem C

full_name: MeasureTheory.IsSetSemiring.diffFinset
code: /-- In a semi-ring of sets `C`, for all sets `s, t ∈ C`, `s \ t` is equal to a disjoint union of
finitely many sets in `C`. The finite set of sets in the union is not unique, but this definition
gives an arbitrary `Finset (Set α)` that satisfies the equality.

We remove the empty set to ensure that `t ∉ hC.diffFinset hs ht` even if `t = ∅`. -/
noncomputable def diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    Finset (Set α) 
goal: Finset (Set α)

full_name: MeasureTheory.IsSetSemiring.empty_not_mem_diffFinset
code: lemma empty_not_mem_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    ∅ ∉ hC.diffFinset hs ht 
goal: ∅ ∉ hC.diffFinset hs ht

full_name: MeasureTheory.IsSetSemiring.diffFinset_subset
code: lemma diffFinset_subset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    ↑(hC.diffFinset hs ht) ⊆ C 
goal: ↑(hC.diffFinset hs ht) ⊆ C

full_name: MeasureTheory.IsSetSemiring.pairwiseDisjoint_diffFinset
code: lemma pairwiseDisjoint_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    PairwiseDisjoint (hC.diffFinset hs ht : Set (Set α)) id 
goal: (↑(hC.diffFinset hs ht)).PairwiseDisjoint id

full_name: MeasureTheory.IsSetSemiring.sUnion_diffFinset
code: lemma sUnion_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    ⋃₀ hC.diffFinset hs ht = s \ t 
goal: ⋃₀ ↑(hC.diffFinset hs ht) = s \ t

full_name: MeasureTheory.IsSetSemiring.not_mem_diffFinset
code: lemma not_mem_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    t ∉ hC.diffFinset hs ht 
goal: t ∉ hC.diffFinset hs ht

full_name: MeasureTheory.IsSetSemiring.sUnion_insert_diffFinset
code: lemma sUnion_insert_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) (hst : t ⊆ s) :
    ⋃₀ insert t (hC.diffFinset hs ht) = s 
goal: ⋃₀ insert t ↑(hC.diffFinset hs ht) = s

full_name: MeasureTheory.IsSetSemiring.disjoint_sUnion_diffFinset
code: lemma disjoint_sUnion_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    Disjoint t (⋃₀ hC.diffFinset hs ht) 
goal: Disjoint t (⋃₀ ↑(hC.diffFinset hs ht))

full_name: MeasureTheory.IsSetSemiring.pairwiseDisjoint_insert_diffFinset
code: lemma pairwiseDisjoint_insert_diffFinset (hC : IsSetSemiring C) (hs : s ∈ C) (ht : t ∈ C) :
    PairwiseDisjoint (insert t (hC.diffFinset hs ht) : Set (Set α)) id 
goal: (insert t ↑(hC.diffFinset hs ht)).PairwiseDisjoint id

full_name: MeasureTheory.IsSetSemiring.exists_disjoint_finset_diff_eq
code: /-- In a semiring of sets `C`, for all set `s ∈ C` and finite set of sets `I ⊆ C`, there is a
finite set of sets in `C` whose union is `s \ ⋃₀ I`.
See `IsSetSemiring.diffFinset₀` for a definition that gives such a set. -/
lemma exists_disjoint_finset_diff_eq (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    ∃ J : Finset (Set α), ↑J ⊆ C ∧ PairwiseDisjoint (J : Set (Set α)) id ∧
      s \ ⋃₀ I = ⋃₀ J 
goal: ∃ J, ↑J ⊆ C ∧ (↑J).PairwiseDisjoint id ∧ s \ ⋃₀ ↑I = ⋃₀ ↑J

full_name: MeasureTheory.IsSetSemiring.diffFinset₀
code: /-- In a semiring of sets `C`, for all set `s ∈ C` and finite set of sets `I ⊆ C`,
`diffFinset₀` is a finite set of sets in `C` such that `s \ ⋃₀ I = ⋃₀ (hC.diffFinset₀ hs I hI)`.
`diffFinset` is a special case of `diffFinset₀` where `I` is a singleton. -/
noncomputable def diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) : Finset (Set α) 
goal: Finset (Set α)

full_name: MeasureTheory.IsSetSemiring.empty_not_mem_diffFinset₀
code: lemma empty_not_mem_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    ∅ ∉ hC.diffFinset₀ hs hI 
goal: ∅ ∉ hC.diffFinset₀ hs hI

full_name: MeasureTheory.IsSetSemiring.diffFinset₀_subset
code: lemma diffFinset₀_subset (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    ↑(hC.diffFinset₀ hs hI) ⊆ C 
goal: ↑(hC.diffFinset₀ hs hI) ⊆ C

full_name: MeasureTheory.IsSetSemiring.pairwiseDisjoint_diffFinset₀
code: lemma pairwiseDisjoint_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    PairwiseDisjoint (hC.diffFinset₀ hs hI : Set (Set α)) id 
goal: (↑(hC.diffFinset₀ hs hI)).PairwiseDisjoint id

full_name: MeasureTheory.IsSetSemiring.diff_sUnion_eq_sUnion_diffFinset₀
code: lemma diff_sUnion_eq_sUnion_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    s \ ⋃₀ I = ⋃₀ hC.diffFinset₀ hs hI 
goal: s \ ⋃₀ ↑I = ⋃₀ ↑(hC.diffFinset₀ hs hI)

full_name: MeasureTheory.IsSetSemiring.sUnion_diffFinset₀_subset
code: lemma sUnion_diffFinset₀_subset (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    ⋃₀ (hC.diffFinset₀ hs hI : Set (Set α)) ⊆ s 
goal: ⋃₀ ↑(hC.diffFinset₀ hs hI) ⊆ s

full_name: MeasureTheory.IsSetSemiring.disjoint_sUnion_diffFinset₀
code: lemma disjoint_sUnion_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    Disjoint (⋃₀ (I : Set (Set α))) (⋃₀ hC.diffFinset₀ hs hI) 
goal: Disjoint (⋃₀ ↑I) (⋃₀ ↑(hC.diffFinset₀ hs hI))

full_name: MeasureTheory.IsSetSemiring.disjoint_diffFinset₀
code: lemma disjoint_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C) (hI : ↑I ⊆ C) :
    Disjoint I (hC.diffFinset₀ hs hI) 
goal: Disjoint I (hC.diffFinset₀ hs hI)

full_name: MeasureTheory.IsSetSemiring.pairwiseDisjoint_union_diffFinset₀
code: lemma pairwiseDisjoint_union_diffFinset₀ (hC : IsSetSemiring C) (hs : s ∈ C)
    (hI : ↑I ⊆ C) (h_dis : PairwiseDisjoint (I : Set (Set α)) id) :
    PairwiseDisjoint (I ∪ hC.diffFinset₀ hs hI : Set (Set α)) id 
goal: (↑I ∪ ↑(hC.diffFinset₀ hs hI)).PairwiseDisjoint id

full_name: MeasureTheory.IsSetSemiring.sUnion_union_sUnion_diffFinset₀_of_subset
code: lemma sUnion_union_sUnion_diffFinset₀_of_subset (hC : IsSetSemiring C) (hs : s ∈ C)
    (hI : ↑I ⊆ C) (hI_ss : ∀ t ∈ I, t ⊆ s) :
    ⋃₀ I ∪ ⋃₀ hC.diffFinset₀ hs hI = s 
goal: ⋃₀ ↑I ∪ ⋃₀ ↑(hC.diffFinset₀ hs hI) = s

full_name: MeasureTheory.IsSetSemiring.sUnion_union_diffFinset₀_of_subset
code: lemma sUnion_union_diffFinset₀_of_subset (hC : IsSetSemiring C) (hs : s ∈ C)
    (hI : ↑I ⊆ C) (hI_ss : ∀ t ∈ I, t ⊆ s) [DecidableEq (Set α)] :
    ⋃₀ ↑(I ∪ hC.diffFinset₀ hs hI) = s 
goal: ⋃₀ ↑(I ∪ hC.diffFinset₀ hs hI) = s

full_name: MeasureTheory.IsSetRing
code: /-- A ring of sets `C` is a family of sets containing `∅`, stable by union and set difference.
It is then also stable by intersection (see `IsSetRing.inter_mem`). -/
structure IsSetRing (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  union_mem ⦃s t⦄ : s ∈ C → t ∈ C → s ∪ t ∈ C
  diff_mem ⦃s t⦄ : s ∈ C → t ∈ C → s \ t ∈ C
goal: Prop

full_name: MeasureTheory.IsSetRing.union_mem
code: /-- A ring of sets `C` is a family of sets containing `∅`, stable by union and set difference.
It is then also stable by intersection (see `IsSetRing.inter_mem`). -/
structure IsSetRing (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  union_mem ⦃s t⦄ : s ∈ C → t ∈ C → s ∪ t ∈ C
  diff_mem ⦃s t⦄ : s ∈ C → t ∈ C → s \ t ∈ C
goal: s ∈ C → t ∈ C → s ∪ t ∈ C

full_name: MeasureTheory.IsSetRing.diff_mem
code: /-- A ring of sets `C` is a family of sets containing `∅`, stable by union and set difference.
It is then also stable by intersection (see `IsSetRing.inter_mem`). -/
structure IsSetRing (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  union_mem ⦃s t⦄ : s ∈ C → t ∈ C → s ∪ t ∈ C
  diff_mem ⦃s t⦄ : s ∈ C → t ∈ C → s \ t ∈ C
goal: s ∈ C → t ∈ C → s \ t ∈ C

full_name: MeasureTheory.IsSetRing.empty_mem
code: /-- A ring of sets `C` is a family of sets containing `∅`, stable by union and set difference.
It is then also stable by intersection (see `IsSetRing.inter_mem`). -/
structure IsSetRing (C : Set (Set α)) : Prop where
  empty_mem : ∅ ∈ C
  union_mem ⦃s t⦄ : s ∈ C → t ∈ C → s ∪ t ∈ C
  diff_mem ⦃s t⦄ : s ∈ C → t ∈ C → s \ t ∈ C
goal: ∅ ∈ C

full_name: MeasureTheory.IsSetRing.inter_mem
code: lemma inter_mem (hC : IsSetRing C) (hs : s ∈ C) (ht : t ∈ C) : s ∩ t ∈ C 
goal: s ∩ t ∈ C

full_name: MeasureTheory.IsSetRing.isSetSemiring
code: lemma isSetSemiring (hC : IsSetRing C) : IsSetSemiring C 
goal: MeasureTheory.IsSetSemiring C

full_name: MeasureTheory.IsSetRing.biUnion_mem
code: lemma biUnion_mem {ι : Type*} (hC : IsSetRing C) {s : ι → Set α}
    (S : Finset ι) (hs : ∀ n ∈ S, s n ∈ C) :
    ⋃ i ∈ S, s i ∈ C 
goal: ⋃ i ∈ S, s i ∈ C

full_name: MeasureTheory.IsSetRing.biInter_mem
code: lemma biInter_mem {ι : Type*} (hC : IsSetRing C) {s : ι → Set α}
    (S : Finset ι) (hS : S.Nonempty) (hs : ∀ n ∈ S, s n ∈ C) :
    ⋂ i ∈ S, s i ∈ C 
goal: ⋂ i ∈ S, s i ∈ C