@@ -657,20 +657,45 @@ theorem compl_sInf' : (sInf s)ᶜ = sSup (Compl.compl '' s) :=
657657theorem compl_sSup' : (sSup s)ᶜ = sInf (Compl.compl '' s) :=
658658 compl_sSup.trans sInf_image.symm
659659
660- open scoped symmDiff in
660+ section symmDiff
661+
662+ open scoped symmDiff
663+
661664/-- The symmetric difference of two `iSup`s is at most the `iSup` of the symmetric differences. -/
662665theorem iSup_symmDiff_iSup_le {g : ι → α} : (⨆ i, f i) ∆ (⨆ i, g i) ≤ ⨆ i, ((f i) ∆ (g i)) := by
663666 simp_rw [symmDiff_le_iff, ← iSup_sup_eq]
664667 exact ⟨iSup_mono fun i ↦ sup_comm (g i) _ ▸ le_symmDiff_sup_right ..,
665668 iSup_mono fun i ↦ sup_comm (f i) _ ▸ symmDiff_comm (f i) _ ▸ le_symmDiff_sup_right ..⟩
666669
667- open scoped symmDiff in
670+ theorem iSup_symmDiff_le [Nonempty ι] {a : α} : (⨆ i, f i) ∆ a ≤ ⨆ i, f i ∆ a := by
671+ simpa [iSup_const] using iSup_symmDiff_iSup_le (g := fun _ : ι ↦ a)
672+
673+ theorem symmDiff_iSup_le [Nonempty ι] {a : α} : a ∆ (⨆ i, f i) ≤ ⨆ i, a ∆ f i := by
674+ simpa [symmDiff_comm] using iSup_symmDiff_le (a := a)
675+
676+ theorem sSup_symmDiff_le (hs : s.Nonempty) {a : α} : sSup s ∆ a ≤ sSup ((· ∆ a) '' s) := by
677+ rw [sSup_image', sSup_eq_iSup']
678+ have : Nonempty s := Set.nonempty_coe_sort.mpr hs
679+ exact iSup_symmDiff_le
680+
681+ theorem symmDiff_sSup_le (hs : s.Nonempty) {a : α} : a ∆ sSup s ≤ sSup ((a ∆ ·) '' s) := by
682+ simpa [symmDiff_comm] using sSup_symmDiff_le (a := a) hs
683+
684+ theorem sSup_symmDiff_sSup_le {s t : Set α} (hs : s.Nonempty) (ht : t.Nonempty) :
685+ sSup s ∆ sSup t ≤ sSup (image2 (· ∆ ·) s t) := by
686+ rw [sSup_image2]
687+ calc
688+ _ ≤ ⨆ a ∈ s, a ∆ sSup t := by simpa [sSup_image] using sSup_symmDiff_le hs
689+ _ ≤ _ := iSup_mono fun a ↦ iSup_mono fun _ ↦ by simpa [sSup_image] using symmDiff_sSup_le ht
690+
668691/-- A `biSup` version of `iSup_symmDiff_iSup_le`. -/
669692theorem biSup_symmDiff_biSup_le {p : ι → Prop } {f g : (i : ι) → p i → α} :
670693 (⨆ i, ⨆ (h : p i), f i h) ∆ (⨆ i, ⨆ (h : p i), g i h) ≤
671694 ⨆ i, ⨆ (h : p i), ((f i h) ∆ (g i h)) :=
672695 le_trans iSup_symmDiff_iSup_le <| iSup_mono fun _ ↦ iSup_symmDiff_iSup_le
673696
697+ end symmDiff
698+
674699end CompleteBooleanAlgebra
675700
676701/--
0 commit comments