Download data/lean/OAI/Probability/LatticeSurface/Geometry/CapSmall.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.16 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Geometry/CapSmall.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/LatticeSurface/Geometry/CapSmall.lean
-
curl -L -o CapSmall.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Geometry/CapSmall.lean
8.16 kB
| import Mathlib | |
| import OAI.Probability.LatticeSurface.Convexity.BoundedBase | |
| import OAI.Probability.LatticeSurface.Convexity.BrunnMinkowski | |
| import OAI.Probability.LatticeSurface.Convexity.CubePrekopa | |
| import OAI.Probability.LatticeSurface.Convexity.QuantileTransport | |
| import OAI.Probability.LatticeSurface.Convexity.WeightedPrekopa | |
| import OAI.Probability.LatticeSurface.Dynamics.DisplacementInequality | |
| import OAI.Probability.LatticeSurface.Geometry.CapCentral | |
| import OAI.Probability.LatticeSurface.Geometry.CapCompact | |
| import OAI.Probability.LatticeSurface.Geometry.CapContract | |
| import OAI.Probability.LatticeSurface.Geometry.CapCoordinates | |
| import OAI.Probability.LatticeSurface.Geometry.CapReflection | |
| import OAI.Probability.LatticeSurface.Geometry.CapSplit | |
| import OAI.Probability.LatticeSurface.Geometry.CapUnpin | |
| import OAI.Probability.LatticeSurface.Geometry.CapWeld | |
| namespace OAI | |
| open Set MeasureTheory Filter | |
| open scoped Topology | |
| noncomputable section | |
| namespace FacetVolume | |
| end FacetVolume | |
| namespace ExtremalEdges | |
| open scoped ENNReal | |
| end ExtremalEdges | |
| noncomputable section | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} | |
| def gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V β V) : | |
| Set ((Free (pins βͺ (W : Set V)) β β) Γ (W β β)) := | |
| {p | β x y, G.Adj x y β |fromGradients pins W r p x-fromGradients pins W r p y| β€ 1} | |
| lemma gradientBody_preimage [Fintype V] (G : SimpleGraph V) (pins : Set V) | |
| (W : Finset V) (hwp : β w β W, w β pins) (r : V β V) : | |
| gradientBody G pins W r = (gradientCoords pins W hwp r).symm β»ΒΉ' | |
| conditionalBody G pins (fun _ => 0) := by | |
| ext p | |
| simp only [gradientBody, conditionalBody, Set.mem_preimage, Set.mem_ofPred_eq, gradient_restore] | |
| lemma compact_gradientBody [Fintype V] (G : SimpleGraph V) (hc : G.Connected) | |
| (pins : Set V) (hp : pins.Nonempty) (W : Finset V) | |
| (hwp : β w β W, w β pins) (r : V β V) : | |
| IsCompact (gradientBody G pins W r) := by | |
| rw [gradientBody_preimage G pins W hwp r, β MeasurableEquiv.image_eq_preimage_symm] | |
| exact (compact_zeroBody G hc pins hp).image (continuous_gradientCoords pins W hwp r) | |
| lemma convex_gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V β V) : | |
| Convex β (gradientBody G pins W r) := by | |
| intro p hp q hq s t hs ht hst x y hxy | |
| simp only [fromGradients_comb] | |
| calc | |
| |s * fromGradients pins W r p x+t * fromGradients pins W r q x- | |
| (s * fromGradients pins W r p y+t * fromGradients pins W r q y)| = | |
| |s * (fromGradients pins W r p x-fromGradients pins W r p y)+ | |
| t * (fromGradients pins W r q x-fromGradients pins W r q y)| := by congr 1; ring | |
| _ β€ |s * (fromGradients pins W r p x-fromGradients pins W r p y)|+ | |
| |t * (fromGradients pins W r q x-fromGradients pins W r q y)| := abs_add_le _ _ | |
| _ β€ s*1+t*1 := by | |
| rw [abs_mul, abs_mul, abs_of_nonneg hs, abs_of_nonneg ht] | |
| gcongr | |
| exacts [hp x y hxy,hq x y hxy] | |
| _ = 1 := by linarith | |
| lemma neg_gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V β V) | |
| {p : (Free (pins βͺ (W : Set V)) β β) Γ (W β β)} (hp : p β gradientBody G pins W r) : | |
| -p β gradientBody G pins W r := by | |
| intro x y hxy | |
| simpa only [fromGradients_neg, neg_sub_neg, abs_sub_comm] using hp x y hxy | |
| lemma central_gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V β V) : | |
| productSlice (gradientBody G pins W r) 0 = | |
| conditionalBody (G.map (collapse W r)) (pins βͺ (W : Set V)) (fun _ => 0) := by | |
| ext h | |
| simp only [productSlice, gradientBody, conditionalBody, Set.mem_ofPred_eq, | |
| fromGradients_zero, graph_constraint_map] | |
| def capsInterval (u : β) : Set β := Icc (-1) (u-1) βͺ Icc (1-u) 1 | |
| lemma measurable_capsInterval (u : β) : MeasurableSet (capsInterval u) := | |
| measurableSet_Icc.union measurableSet_Icc | |
| lemma mem_capsInterval {u t : β} (hl : 1-u β€ |t|) (hh : |t| β€ 1) : t β capsInterval u := by | |
| rcases le_total 0 t with ht | ht | |
| Β· right | |
| rw [abs_of_nonneg ht] at hl hh | |
| exact β¨hl,hhβ© | |
| Β· left | |
| rw [abs_of_nonpos ht] at hl hh | |
| constructor <;> linarith | |
| lemma volume_capsInterval (u : β) (hu : 0 β€ u) : | |
| volume (capsInterval u) β€ ENNReal.ofReal (2*u) := by | |
| calc | |
| volume (capsInterval u) β€ volume (Icc (-1:β) (u-1))+volume (Icc (1-u) 1) := measure_union_le _ _ | |
| _ = ENNReal.ofReal u+ENNReal.ofReal u := by simp [Real.volume_Icc] | |
| _ = ENNReal.ofReal (2*u) := by rw [β ENNReal.ofReal_add hu hu]; congr 1; ring | |
| theorem star_cap_volume [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] | |
| (hc : G.Connected) (pins : Set V) (hp : pins.Nonempty) | |
| (W : Finset V) (r : V β V) (D : β) | |
| (hwp : β w β W, w β pins) (hr : β w β W, r w β W) | |
| (hd : β w β W, G.degree w β€ D) (he : β w β W, G.Adj w (r w)) | |
| (u : β) (hu : 0 β€ u) : | |
| volume {h : Free pins β β | h β conditionalBody G pins (fun _ => 0) β§ | |
| β w β W, 1-u β€ |restore pins (fun _ => 0) h w-restore pins (fun _ => 0) h (r w)|} β€ | |
| (ENNReal.ofReal (2*u))^W.card * (2^D)^W.card * | |
| volume (conditionalBody G pins (fun _ => 0)) := by | |
| let S : Set (W β β) := Set.pi Set.univ (fun _ => capsInterval u) | |
| have hS : MeasurableSet S := MeasurableSet.pi (Set.to_countable _) (fun _ _ => measurable_capsInterval u) | |
| have hvolS : volume S β€ (ENNReal.ofReal (2*u))^W.card := by | |
| rw [show volume S = β _ : W, volume (capsInterval u) from volume_pi_pi _] | |
| calc | |
| (β _ : W, volume (capsInterval u)) β€ β _ : W, ENNReal.ofReal (2*u) := | |
| Finset.prod_le_prod (fun _ _ => volume_capsInterval u hu) | |
| _ = _ := by simp | |
| let K := gradientBody G pins W r | |
| have hk : IsCompact K := compact_gradientBody G hc pins hp W hwp r | |
| have hb := product_small_set_bound hk (convex_gradientBody G pins W r) | |
| (fun _ h => neg_gradientBody G pins W r h) S hS | |
| have hsub : {h : Free pins β β | h β conditionalBody G pins (fun _ => 0) β§ | |
| β w β W, 1-u β€ |restore pins (fun _ => 0) h w-restore pins (fun _ => 0) h (r w)|} β | |
| (gradientCoords pins W hwp r) β»ΒΉ' (K β© Prod.snd β»ΒΉ' S) := by | |
| intro h hh | |
| constructor | |
| Β· change (gradientCoords pins W hwp r) h β gradientBody G pins W r | |
| rw [gradientBody_preimage G pins W hwp r] | |
| simpa using hh.1 | |
| Β· intro w hw | |
| rw [gradientCoords_difference pins W hwp r hr h w] | |
| exact mem_capsInterval (hh.2 w w.2) (hh.1 w (r w) (he w w.2)) | |
| calc | |
| _ β€ volume ((gradientCoords pins W hwp r) β»ΒΉ' (K β© Prod.snd β»ΒΉ' S)) := measure_mono hsub | |
| _ = volume (K β© Prod.snd β»ΒΉ' S) := (preserving_gradientCoords pins W hwp r).measure_preimage | |
| (hk.measurableSet.inter (hS.preimage measurable_snd)).nullMeasurableSet | |
| _ β€ volume S * volume (productSlice K 0) := hb | |
| _ β€ (ENNReal.ofReal (2*u))^W.card * ((2^D)^W.card * | |
| volume (conditionalBody G pins (fun _ => 0))) := by | |
| apply mul_le_mul' hvolS | |
| rw [show productSlice K 0 = _ from central_gradientBody G pins W r] | |
| exact volume_collapsed_body_le G pins W r D hwp hr hd | |
| _ = _ := by ring | |
| end ExtremalEdges | |
| end | |
| end | |
| end OAI | |