math / data /lean /OAI /GroupTheory /SimpleAmenable /Configurations /PolygonTrackArea.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
4.9 kB
import Mathlib
import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonArea
import OAI.GroupTheory.SimpleAmenable.PolygonGeometry.PolygonGridComparison
namespace OAI
section
section
open scoped symmDiff
namespace SimpleAmenable
open scoped commutatorElement
open scoped commutatorElement
section PolygonTrackArea
open Classical Set MeasureTheory
namespace PolygonGrid
noncomputable def trackUnion {m : β„•} (S : Fin m β†’ Set (ℝ×ℝ)) : Set PlaneTracks :=
⋃i, {i.val} Γ—Λ’ S i
@[simp] theorem mem_trackUnion {m : β„•} (S : Fin m β†’ Set (ℝ×ℝ)) (i : Fin m) (x : ℝ×ℝ) :
(i.val,x)∈trackUnion S ↔ x∈S i := by
constructor
Β· intro h
obtain ⟨j,hj,hx⟩ := Set.mem_iUnion.mp h
have he : i=j := Fin.ext hj
simpa only [←he] using hx
Β· intro hx
exact Set.mem_iUnion.mpr ⟨i,rfl,hx⟩
theorem trackUnion_mono {m : β„•} {S T : Fin m β†’ Set (ℝ×ℝ)} (h : βˆ€i,S iβŠ†T i) :
trackUnion SβŠ†trackUnion T := by
intro p hp
obtain ⟨i,hi,hp⟩ := Set.mem_iUnion.mp hp
exact Set.mem_iUnion.mpr ⟨i,hi,h i hp⟩
theorem trackUnion_region {m : β„•} {S : Fin m β†’ Set (ℝ×ℝ)}
(h : βˆ€i,S iβŠ†PolygonArea.square) : trackUnion SβŠ†region m := by
intro p hp
obtain ⟨i,hi,hp⟩ := Set.mem_iUnion.mp hp
exact ⟨hi β–Έ i.isLt,h i hp⟩
@[simp] theorem volume_trackUnion {m : β„•} (S : Fin m β†’ Set (ℝ×ℝ))
(hS : βˆ€i,MeasurableSet (S i)) : ΞΌ (trackUnion S)=βˆ‘i,volume (S i) := by
have hdis : Pairwise (fun i j : Fin m => Disjoint ({i.val}Γ—Λ’ S i) ({j.val}Γ—Λ’ S j)) := by
intro i j hij
apply Set.disjoint_left.mpr
rintro p ⟨hi,-⟩ ⟨hj,-⟩
exact hij (Fin.ext (hi.symm.trans hj))
rw [trackUnion,measure_iUnion hdis (fun i => (measurableSet_singleton _).prod (hS i))]
simp only [ΞΌ,Measure.prod_prod,Measure.count_singleton,one_mul,tsum_fintype]
rfl
theorem bank_representative {a m : β„•} (U : Fin m β†’ polygonAlgebra a) :
βˆƒ S : Set PlaneTracks, SβŠ†region m ∧
(βˆ€i : Fin m,βˆ€x : GenericSquare a,(i.val,x.val)∈S ↔ x∈(U i).val) ∧
ΞΌ (closure S)=βˆ‘i,PolygonArea.area (U i) ∧
ΞΌ (interior S)=βˆ‘i,PolygonArea.area (U i) := by
choose R hR hm hn he using fun i => PolygonArea.representative (U i).property
have hmR : βˆ€i,MeasurableSet (R i) := hm
have harea (i : Fin m) : volume (R i)=PolygonArea.area (U i) :=
(PolygonArea.area_eq_rep (U i) (hR i) (he i)).symm
have hvol : ΞΌ (trackUnion R)=βˆ‘i,PolygonArea.area (U i) := by
rw [volume_trackUnion R hmR]
exact Finset.sum_congr rfl (fun i _ => harea i)
have hclosure : closure (trackUnion R)βŠ†trackUnion (fun i => closure (R i)) := by
apply (isClosed_iUnion_of_finite (fun i => isClosed_singleton.prod isClosed_closure)).closure_subset_iff.mpr
exact trackUnion_mono (fun _ => subset_closure)
have hinterior : trackUnion (fun i => interior (R i))βŠ†interior (trackUnion R) := by
apply interior_maximal (trackUnion_mono (fun _ => interior_subset))
exact isOpen_iUnion (fun i => (isOpen_discrete _).prod isOpen_interior)
have hvclosure : ΞΌ (trackUnion (fun i => closure (R i)))=βˆ‘i,PolygonArea.area (U i) := by
rw [volume_trackUnion _ (fun _ => isClosed_closure.measurableSet)]
apply Finset.sum_congr rfl
intro i _
rw [measure_congr (PolygonArea.closure_ae_eq (hn i)),harea]
have hvinterior : ΞΌ (trackUnion (fun i => interior (R i)))=βˆ‘i,PolygonArea.area (U i) := by
rw [volume_trackUnion _ (fun _ => isOpen_interior.measurableSet)]
apply Finset.sum_congr rfl
intro i _
rw [measure_congr (PolygonArea.interior_ae_eq (hn i)),harea]
refine ⟨trackUnion R,trackUnion_region hR,?_,?_,?_⟩
Β· intro i x
exact (mem_trackUnion R i x.val).trans (he i x).symm
Β· exact le_antisymm ((measure_mono hclosure).trans_eq hvclosure)
(hvol.symm.trans_le (measure_mono subset_closure))
Β· exact le_antisymm ((measure_mono interior_subset).trans_eq hvol)
(hvinterior.symm.trans_le (measure_mono hinterior))
theorem polygon_grid_comparison {a m : β„•} (U V : Fin m β†’ polygonAlgebra a)
(h : (βˆ‘i,PolygonArea.area (U i)) < βˆ‘i,PolygonArea.area (V i)) :
βˆƒ (S T : Set PlaneTracks) (Ξ΄ : ℝ), 0 < Ξ΄ ∧
(βˆ€i : Fin m,βˆ€x : GenericSquare a,(i.val,x.val)∈S ↔ x∈(U i).val) ∧
(βˆ€i : Fin m,βˆ€x : GenericSquare a,(i.val,x.val)∈T ↔ x∈(V i).val) ∧
βˆ€Ξ΅ : ℝ, 0 < Ξ΅ β†’ Ξ΅ < Ξ΄ β†’
βˆƒ (N : β„•) (I J : Finset (Index m N)), Nonempty (I β†ͺ J) ∧
SβŠ†β‹ƒi∈I,cell Ξ΅ i ∧ βˆ€j∈J,cell Ξ΅ jβŠ†T := by
obtain ⟨S,hS,heS,hcS,hiS⟩ := bank_representative U
obtain ⟨T,hT,heT,hcT,hiT⟩ := bank_representative V
have hh : ΞΌ (closure S)<ΞΌ (interior T) := by rwa [hcS,hiT]
obtain ⟨δ,hδ,hmatch⟩ := strict_grid_comparison hS hT hh
exact ⟨S,T,δ,hδ,heS,heT,hmatch⟩
end PolygonGrid
end PolygonTrackArea
end SimpleAmenable
end
end
end OAI