Skip to content
Closed
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d5d8e26
initialized piSemiring
pfaffelh Feb 7, 2025
30f2cdb
at the main step
Feb 7, 2025
3348c96
reached interesting spot
Feb 9, 2025
36c20da
on step
Feb 9, 2025
a61371a
not done
Feb 12, 2025
ebd5dbc
Merge branch 'master' into pfaffelh_SemiringPi
pfaffelh Feb 21, 2025
35250e2
Merge branch 'master' into pfaffelh_SemiringPi
Feb 23, 2025
ab0c0c4
further in the proof
Feb 23, 2025
0e08506
Merge branch 'pfaffelh_SemiringPi' of https://github.com/leanprover-c…
pfaffelh Feb 24, 2025
3512e35
further in the proof2
Feb 26, 2025
f4f8410
Merge branch 'pfaffelh_SemiringPi' of https://github.com/leanprover-c…
pfaffelh Feb 26, 2025
210f70b
zero case done
Feb 28, 2025
036ae96
fintype done
Mar 1, 2025
e8ab90e
some general results
Mar 6, 2025
3f8c100
golfed proof
Mar 7, 2025
0a7b036
Merge branch 'master' into pfaffelh_SemiringPi
Mar 7, 2025
aff0437
towards PR1
Mar 8, 2025
366154c
towards PR 2
Mar 8, 2025
7684058
towards PR 3
Mar 8, 2025
f377dbd
towards PR 4
Mar 8, 2025
16f9daa
repaired imports for Ring
Mar 8, 2025
ca8a974
Merge branch 'pfaffelh_SemiringPi' of https://github.com/leanprover-c…
pfaffelh Mar 8, 2025
a0fcf24
update Mathlib.lean
Mar 9, 2025
41fc74a
removed SetRing
Mar 16, 2025
300e587
restored imports
Mar 16, 2025
d26ee9e
Merge branch 'master' into pfaffelh_SemiringPi
Mar 16, 2025
fc52c42
Merge branch 'pfaffelh_SemiringPi' of https://github.com/leanprover-c…
pfaffelh Apr 30, 2025
8200573
merged master
pfaffelh May 1, 2025
1a72927
shortened proof
pfaffelh May 1, 2025
0569a73
shortened proof2
pfaffelh May 1, 2025
6cfc244
Merge remote-tracking branch 'origin/master' into pfaffelh_SemiringPi
pfaffelh May 1, 2025
35d86d9
shorter
pfaffelh May 1, 2025
2e1b212
shorter2
pfaffelh May 2, 2025
38af6dc
Merge branch 'master' into HEAD
May 3, 2025
e8cf33b
chore: correct typo (#24559)
alreadydone May 2, 2025
bdf56ff
feat: cofinal sets (#24290)
YaelDillies May 2, 2025
7cfdc52
chore: bump toolchain to v4.20.0-rc2 (#24561)
kim-em May 2, 2025
8075494
feat: pow_finEquivZPowers_symm_apply (#24548)
Ruben-VandeVelde May 3, 2025
c50eec5
feat (Small) : Shrink.rec_equivShrink (#24535)
robertmaxton42 May 3, 2025
4704946
feat(Asymptotics): define `IsBigOTVS` (#23756)
urkud May 3, 2025
b4cf4f7
chore(Analysis/InnerProductSpace): make `𝕜` an explicit argument of `…
JovanGerb May 3, 2025
6ad8465
feat(Topology/Inseparable): more mapping lemmas (#24526)
plp127 May 3, 2025
2c4fce7
feat(Algebra): finiteness of associated primes (#24242)
Thmoas-Guan May 3, 2025
064f076
feat(Homotopy): +3 lemmas (#24564)
urkud May 3, 2025
177dc5a
feat(CStarAlgebra): define completely positive maps (#24359)
dupuisf May 3, 2025
67f566c
feat(Bernstein): generalize to normed spaces (#24566)
urkud May 3, 2025
bd8659e
feat(CategoryTheory): localization of linear categories (#24309)
joelriou May 3, 2025
0897281
chore: deprecate former interaction of finite intervals and succ/pred…
YaelDillies May 3, 2025
9cd7b0d
Merge branch 'master' into pfaffelh_SemiringPi
May 30, 2025
c67d2c6
Update Mathlib/Tactic.lean
pfaffelh May 30, 2025
33c89e1
Update Mathlib/Tactic.lean
pfaffelh May 30, 2025
956dc2d
resolved sth
May 30, 2025
bdadc94
resolved sth2
May 30, 2025
38724a9
merge master
Jun 8, 2025
18ad6e2
deprecated replaced
Jun 8, 2025
f8b02ec
mk_all
Jun 8, 2025
7d17b5c
Finite2
Jun 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Mathlib/Data/Set/Pairwise/Lattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ theorem pairwiseDisjoint_sUnion {s : Set (Set ι)} (h : DirectedOn (· ⊆ ·) s
(⋃₀ s).PairwiseDisjoint f ↔ ∀ ⦃a⦄, a ∈ s → Set.PairwiseDisjoint a f :=
pairwise_sUnion h

theorem pairwiseDisjoint_union_of_disjoint
{s t : Set (Set ι)} {f : Set ι → α} (hf : Monotone f)
(hs : PairwiseDisjoint s f) (ht : PairwiseDisjoint t f)
(hst : Disjoint (f (Set.sUnion s)) (f (sUnion t))) : PairwiseDisjoint (s ∪ t) f := by
apply pairwiseDisjoint_union.mpr ⟨hs, ht, ?_⟩
exact fun a ha b hb hab ↦ Disjoint.mono (hf (subset_sUnion_of_subset s a (subset_refl a) ha))
(hf (subset_sUnion_of_subset t b (subset_refl b) hb)) hst

end PartialOrderBot

section CompleteLattice
Expand Down
84 changes: 84 additions & 0 deletions Mathlib/Data/Set/Prod.lean
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,23 @@ theorem pi_if {p : ι → Prop} [h : DecidablePred p] (s : Set ι) (t₁ t₂ :
theorem union_pi : (s₁ ∪ s₂).pi t = s₁.pi t ∩ s₂.pi t := by
simp [pi, or_imp, forall_and, setOf_and]

theorem pi_antitone (h : s₁ ⊆ s₂) : s₂.pi t ⊆ s₁.pi t := by
rw [← union_diff_cancel h, union_pi]
exact Set.inter_subset_left

open scoped Classical in
lemma union_pi_ite_of_disjoint {s t : Set ι} {x y : (i : ι) → Set (α i)} (hst : Disjoint s t) :
((s ∪ t).pi fun i ↦ if i ∈ s then x i else y i) = (s.pi x) ∩ (t.pi y) := by
have hx : ∀ i ∈ s, x i = if h : i ∈ s then x i else y i := by
intro i hi
simp only [dite_eq_ite, hi, ↓reduceIte]
have hy : ∀ i ∈ t, y i = if h : i ∈ s then x i else y i := by
intro i hi
have h : i ∉ s := Disjoint.not_mem_of_mem_left (id (Disjoint.symm hst)) hi
simp only [hi, hst, dite_eq_ite, h, ↓reduceIte]
rw [Set.pi_congr rfl hx, Set.pi_congr rfl hy]
exact union_pi

theorem union_pi_inter
(ht₁ : ∀ i ∉ s₁, t₁ i = univ) (ht₂ : ∀ i ∉ s₂, t₂ i = univ) :
(s₁ ∪ s₂).pi (fun i ↦ t₁ i ∩ t₂ i) = s₁.pi t₁ ∩ s₂.pi t₂ := by
Expand Down Expand Up @@ -890,6 +907,58 @@ theorem univ_pi_ite (s : Set ι) [DecidablePred (· ∈ s)] (t : ∀ i, Set (α
refine forall_congr' fun i => ?_
split_ifs with h <;> simp [h]

section Setdiff

/-- Write that set difference `(s ∪ t).pi x \ (s ∪ t).pi y` as a union. -/
lemma pi_setdiff_eq_union (s t : Set ι) (x y : (i : ι) → Set (α i)) :
(s ∪ t).pi x \ (s ∪ t).pi y = (t.pi x \ t.pi y) ∩ (s.pi x ∩ s.pi y) ∪
t.pi x ∩ (s.pi x \ s.pi y) := by
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want this lemma, it seems way too specific. You should put the proof directly in the place where you use it, and you can do a much shorter proof using Set.union_pi (I changed a bit the right-hand side to remove a few rewrites):

lemma pi_setdiff_eq_union (s t : Set ι) (x y : (i : ι) → Set (α i)) :
  (s ∪ t).pi x \ (s ∪ t).pi y = (s.pi y)ᶜ ∩ (s.pi x ∩ t.pi x) ∪ (t.pi y)ᶜ ∩ (s.pi x ∩ t.pi x) := by
  rw [diff_eq_compl_inter, union_pi, union_pi, compl_inter, union_inter_distrib_right]

ext z
refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩
· simp only [mem_diff, mem_inter_iff, Set.mem_preimage, Function.eval, Set.mem_pi, not_and,
not_forall, Classical.not_imp] at h
obtain ⟨h1, ⟨j, ⟨hj1, hj2⟩⟩⟩ := h
by_cases hz : ∃ a ∈ s, z a ∉ y a
· right
simp only [mem_inter_iff, Set.mem_pi, mem_diff, not_forall, Classical.not_imp]
refine ⟨fun i hi ↦ h1 i (Set.subset_union_right hi),
fun i hi ↦ h1 i (Set.subset_union_left hi), bex_def.mpr hz⟩
· simp only [not_exists, not_and, not_not] at hz
left
simp only [mem_inter_iff, mem_diff, Set.mem_pi, not_forall, Classical.not_imp,
Set.mem_preimage, Function.eval]
refine ⟨⟨fun i hi ↦ h1 i (Set.subset_union_right hi), ?_⟩,
fun i hi ↦ h1 i (Set.subset_union_left hi), hz⟩
· have hj : j ∈ t := by
simp only [Set.mem_union] at hj1
rcases hj1 with (g1 | g2)
· exact False.elim (hj2 (hz j g1))
· exact g2
exact ⟨j, hj, hj2⟩
· simp only [Set.mem_union, mem_inter_iff, mem_diff, Set.mem_pi, not_forall,
Classical.not_imp] at h
simp only [mem_diff, Set.mem_pi, Set.mem_union, not_forall, Classical.not_imp]
rcases h with ⟨⟨h11, h12⟩, h2, h3⟩ | ⟨h1, h2, h3⟩
· refine ⟨?_, ?_⟩
· rintro i (hi1 | hi2)
· exact h2 i hi1
· exact h11 i hi2
· obtain ⟨x, hx1, hx2⟩ := h12
exact ⟨x, Or.inr hx1, hx2⟩
· refine ⟨?_, ?_⟩
· rintro i (hi1 | hi2)
· exact h2 i hi1
· exact h1 i hi2
· obtain ⟨x, hx1, hx2⟩ := h3
exact ⟨x, Or.inl hx1, hx2⟩

lemma pi_setdiff_union_disjoint (s t : Set ι) (x : (i : ι) → Set (α i)) (y : (i : ι) → Set (α i)) :
Disjoint ((t.pi x \ t.pi y) ∩ (s.pi x ∩ s.pi y)) (t.pi x ∩ (s.pi x \ s.pi y)) :=
Disjoint.mono (inter_subset_right) (inter_subset_right) <|
Disjoint.mono Set.inter_subset_right (fun ⦃_⦄ a ↦ a) <| disjoint_sdiff_right

end Setdiff

end Pi

end Set
Expand Down Expand Up @@ -927,3 +996,18 @@ theorem sumPiEquivProdPi_symm_preimage_univ_pi (π : ι ⊕ ι' → Type*) (t :
· rintro ⟨h₁, h₂⟩ (i|i) <;> simp <;> apply_assumption

end Equiv

section image

open Set
variable {ι ι' : Type*} {α : ι → Type*}

lemma subset_pi_image_of_subset {s : Set ι} {B C : (i : ι) → Set (Set (α i))}
(hBC : ∀ i ∈ s, B i ⊆ C i) : s.pi '' s.pi B ⊆ s.pi '' s.pi C := by
simp only [Set.image_subset_iff]
intro b hb
simp only [Set.mem_preimage, Set.mem_image, Set.mem_pi] at hb ⊢
exact ⟨b, ⟨fun i a ↦ hBC i a (hb i a), rfl⟩⟩


end image
14 changes: 10 additions & 4 deletions Mathlib/MeasureTheory/MeasurableSpace/Pi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ lemma MeasurableSpace.pi_eq_generateFrom_projections {mα : ∀ i, MeasurableSpa
simp only [pi, ← generateFrom_iUnion_measurableSet, iUnion_setOf, measurableSet_comap]

/-- Boxes formed by π-systems form a π-system. -/
theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i)) :
IsPiSystem (pi univ '' pi univ C) := by
theorem IsPiSystem.pi_subset {C : ∀ i, Set (Set (α i))} (s : Set ι)
(hC : ∀ i ∈ s, IsPiSystem (C i)) : IsPiSystem (pi s '' pi s C) := by
rintro _ ⟨s₁, hs₁, rfl⟩ _ ⟨s₂, hs₂, rfl⟩ hst
rw [← pi_inter_distrib] at hst ⊢; rw [univ_pi_nonempty_iff] at hst
exact mem_image_of_mem _ fun i _ => hC i _ (hs₁ i (mem_univ i)) _ (hs₂ i (mem_univ i)) (hst i)
rw [← pi_inter_distrib] at hst ⊢; rw [pi_nonempty_iff] at hst
refine mem_image_of_mem _ fun i hi =>
hC i hi _ (hs₁ i hi) _ (hs₂ i hi) ?_
rcases hst i with ⟨x, a⟩
exact Set.nonempty_of_mem (a hi)

theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i)) :
IsPiSystem (pi univ '' pi univ C) := IsPiSystem.pi_subset univ (fun i _ ↦ hC i)

/-- Boxes form a π-system. -/
theorem isPiSystem_pi [∀ i, MeasurableSpace (α i)] :
Expand Down
7 changes: 7 additions & 0 deletions Mathlib/MeasureTheory/PiSystem.lean
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ variable {α β : Type*}
def IsPiSystem (C : Set (Set α)) : Prop :=
∀ᵉ (s ∈ C) (t ∈ C), (s ∩ t : Set α).Nonempty → s ∩ t ∈ C

theorem isPiSystem_iff_of_nmem_empty {C : Set (Set α)} (hC : ∅ ∈ C) :
(∀ᵉ (s ∈ C) (t ∈ C), s ∩ t ∈ C) ↔ IsPiSystem C := by
refine ⟨fun h s hs t ht _ ↦ h s hs t ht, fun h s hs t ht ↦ ?_⟩
by_cases h1 :(s ∩ t).Nonempty
· exact h s hs t ht h1
· exact (not_nonempty_iff_eq_empty.mp h1) ▸ hC

namespace MeasurableSpace

theorem isPiSystem_measurableSet {α : Type*} [MeasurableSpace α] :
Expand Down
Loading