Download data/lean/OAI/Probability/LatticeSurface/Coercivity/SparseGradients.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.62 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Coercivity/SparseGradients.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/LatticeSurface/Coercivity/SparseGradients.lean
-
curl -L -o SparseGradients.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Coercivity/SparseGradients.lean
9.62 kB
| import Mathlib | |
| import OAI.Probability.LatticeSurface.Coercivity.SparseAmbient | |
| import OAI.Probability.LatticeSurface.Coercivity.SparseColor | |
| import OAI.Probability.LatticeSurface.Coercivity.SparseModel | |
| import OAI.Probability.LatticeSurface.Coercivity.SparseParameters | |
| import OAI.Probability.LatticeSurface.Convexity.BoundedBase | |
| import OAI.Probability.LatticeSurface.Convexity.BrunnMinkowski | |
| import OAI.Probability.LatticeSurface.Convexity.CubePrekopa | |
| import OAI.Probability.LatticeSurface.Convexity.GradientWindows | |
| import OAI.Probability.LatticeSurface.Convexity.QuantileTransport | |
| import OAI.Probability.LatticeSurface.Convexity.WeightedPrekopa | |
| import OAI.Probability.LatticeSurface.Dynamics.DisplacementInequality | |
| import OAI.Probability.LatticeSurface.Geometry.BlockVolume | |
| 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.CapMatching | |
| import OAI.Probability.LatticeSurface.Geometry.CapOrient | |
| import OAI.Probability.LatticeSurface.Geometry.CapReflection | |
| import OAI.Probability.LatticeSurface.Geometry.CapSmall | |
| import OAI.Probability.LatticeSurface.Geometry.CapSplit | |
| import OAI.Probability.LatticeSurface.Geometry.CapUnpin | |
| import OAI.Probability.LatticeSurface.Geometry.CapWeld | |
| import OAI.Probability.LatticeSurface.Geometry.TriangularCover | |
| import OAI.Probability.LatticeSurface.Geometry.TriangularGeometry | |
| import OAI.Probability.LatticeSurface.Moments.ControlledGradients | |
| import OAI.Probability.LatticeSurface.Moments.OrderedGradients | |
| 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*} | |
| end ExtremalEdges | |
| noncomputable section | |
| namespace ExtremalEdges | |
| open Finset | |
| variable {V I : Type*} [Fintype V] [Fintype I] | |
| attribute [local instance] Classical.propDecidable | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V I : Type*} [Fintype V] [Fintype I] | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| end ExtremalEdges | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| variable {V : Type*} [Fintype V] | |
| end ExtremalEdges | |
| open MeasureTheory | |
| open scoped ENNReal | |
| noncomputable section | |
| namespace TriangularLipschitz | |
| end TriangularLipschitz | |
| namespace SparseBlocks | |
| attribute [local instance] Classical.propDecidable | |
| end SparseBlocks | |
| namespace SparseBlocks | |
| attribute [local instance] Classical.propDecidable | |
| end SparseBlocks | |
| namespace SparseBlocks | |
| attribute [local instance] Classical.propDecidable | |
| end SparseBlocks | |
| namespace ExtremalEdges | |
| attribute [local instance] Classical.propDecidable | |
| end ExtremalEdges | |
| namespace SparseBlocks | |
| attribute [local instance] Classical.propDecidable | |
| lemma volume_body_positive (V : Finset Vertex) : 0 < volume (body V) := by | |
| obtain β¨B,hVB,hcollar,hc,hpβ© := exists_ambient V | |
| rw [β volume_body_coordinates B V hVB hcollar] | |
| exact ExtremalEdges.volume_zeroBody_pos _ _ | |
| lemma volume_body_finite (V : Finset Vertex) : volume (body V) β β€ := by | |
| obtain β¨B,hVB,hcollar,hc,hpβ© := exists_ambient V | |
| rw [β volume_body_coordinates B V hVB hcollar] | |
| exact (ExtremalEdges.compact_zeroBody _ hc _ hp).measure_ne_top | |
| def law (V : Finset Vertex) : Measure (V β β) := | |
| (volume (body V))β»ΒΉ β’ volume.restrict (body V) | |
| instance law_probability (V : Finset Vertex) : IsProbabilityMeasure (law V) := by | |
| constructor | |
| simp only [law, Measure.smul_apply, Measure.restrict_apply MeasurableSet.univ, | |
| Set.univ_inter, smul_eq_mul] | |
| exact ENNReal.inv_mul_cancel (ne_of_gt (volume_body_positive V)) (volume_body_finite V) | |
| lemma law_real (V : Finset Vertex) (S : Set (V β β)) (hS : MeasurableSet S) : | |
| (law V).real S = (volume (body V β© S)).toReal / (volume (body V)).toReal := by | |
| simp only [Measure.real,law,Measure.smul_apply,Measure.restrict_apply hS, | |
| smul_eq_mul,ENNReal.toReal_mul,ENNReal.toReal_inv] | |
| rw [Set.inter_comm,div_eq_mul_inv,mul_comm] | |
| def window (b : Bool) (u t : β) : Prop := if b then 1-u β€ |t| else |t| β€ u | |
| def edgeEvent (V : Finset Vertex) (b : Bool) (u : β) (e : Vertex Γ Vertex) : Set (V β β) := | |
| {h | window b u (height V h e.1-height V h e.2)} | |
| def gradientEvent (V : Finset Vertex) (b : Bool) (u : β) | |
| (F : Finset (Vertex Γ Vertex)) : Set (V β β) := | |
| {h | β e β F, h β edgeEvent V b u e} | |
| lemma closed_edgeEvent (V : Finset Vertex) (b : Bool) (u : β) (e : Vertex Γ Vertex) : | |
| IsClosed (edgeEvent V b u e) := by | |
| cases b | |
| Β· exact isClosed_le ((continuous_height V e.1).sub (continuous_height V e.2)).abs continuous_const | |
| Β· exact isClosed_le continuous_const ((continuous_height V e.1).sub (continuous_height V e.2)).abs | |
| lemma closed_gradientEvent (V : Finset Vertex) (b : Bool) (u : β) (F : Finset (Vertex Γ Vertex)) : | |
| IsClosed (gradientEvent V b u F) := by | |
| simp only [gradientEvent,Set.ofPred_forall] | |
| exact isClosed_iInter fun e => isClosed_iInter fun _ => closed_edgeEvent V b u e | |
| theorem joint_gradients (V : Finset Vertex) (F : Finset (Vertex Γ Vertex)) | |
| (he : β e β F, Adj e.1 e.2) (hf : β e β F, e.1 β V β§ e.2 β V) | |
| (b : Bool) (u : β) (hu : 0 < u) (hu8 : u β€ 1/8) : | |
| (law V).real (gradientEvent V b u F) β€ | |
| ((ExtremalEdges.gradientConstant 6*u)^(1/ExtremalEdges.gradientConstant 6))^F.card := by | |
| classical | |
| obtain β¨B,hVB,hcollar,hc,hpβ© := exists_ambient V | |
| let ee : Fin F.card β F := (Finset.equivFin F).symm | |
| let e : Fin F.card β B Γ B := fun i => | |
| (β¨(ee i).val.1,hVB (hf _ (ee i).property).1β©,β¨(ee i).val.2,hVB (hf _ (ee i).property).2β©) | |
| have hei : Function.Injective e := by | |
| intro i j hij | |
| have hh : ee i = ee j := Subtype.ext (Prod.ext | |
| (congrArg (fun p : B Γ B => p.1.val) hij) (congrArg (fun p : B Γ B => p.2.val) hij)) | |
| exact (Finset.equivFin F).symm.injective hh | |
| have heG : β i, (finiteGraph B).Adj (e i).1 (e i).2 := fun i => he _ (ee i).property | |
| have hfree : β i, Β¬ ((e i).1 β fixed B V β§ (e i).2 β fixed B V) := by | |
| intro i hh | |
| exact hh.1 (hf _ (ee i).property).1 | |
| let S : Set (ExtremalEdges.Free (fixed B V) β β) := | |
| {h | β i, window b u (ExtremalEdges.height (fixed B V) h (e i).1- | |
| ExtremalEdges.height (fixed B V) h (e i).2)} | |
| have hS : IsClosed S := by | |
| simp only [S,Set.ofPred_forall] | |
| apply isClosed_iInter | |
| intro i | |
| have hh := ((ExtremalEdges.continuous_restore (fixed B V) (fun _ => 0) (e i).1).sub | |
| (ExtremalEdges.continuous_restore (fixed B V) (fun _ => 0) (e i).2)).abs | |
| cases b | |
| Β· exact isClosed_le hh continuous_const | |
| Β· exact isClosed_le continuous_const hh | |
| have hpre : (coordinates B V hVB) β»ΒΉ' S = gradientEvent V b u F := by | |
| ext h | |
| simp only [Set.mem_preimage, S, Set.mem_ofPred_eq, coordinates_height, gradientEvent, edgeEvent] | |
| constructor | |
| Β· intro hh z hz | |
| have hh' := hh ((Finset.equivFin F) β¨z,hzβ©) | |
| simpa only [e,ee,Equiv.symm_apply_apply] using hh' | |
| Β· intro hh i | |
| exact hh _ (ee i).property | |
| have hvol : volume (ExtremalEdges.body (finiteGraph B) (fixed B V) β© S) = | |
| volume (body V β© gradientEvent V b u F) := by | |
| rw [β body_coordinates B V hVB hcollar, β hpre, β Set.preimage_inter] | |
| exact ((preserving_coordinates B V hVB).measure_preimage | |
| ((ExtremalEdges.closed_conditionalBody (finiteGraph B) (fixed B V) (fun _ => 0)).inter hS).measurableSet.nullMeasurableSet).symm | |
| have hb : (volume (ExtremalEdges.body (finiteGraph B) (fixed B V) β© S)).toReal / | |
| (volume (ExtremalEdges.body (finiteGraph B) (fixed B V))).toReal β€ | |
| (ExtremalEdges.gradientConstant 6*u)^((F.card:β)/ExtremalEdges.gradientConstant 6) := by | |
| cases b | |
| Β· exact ExtremalEdges.near_zero_gradients_ordered 6 (finiteGraph B) hc (finiteGraph_degree B) | |
| (fixed B V) hp F.card e heG hei hfree u hu | |
| Β· exact ExtremalEdges.controlled_gradients_ordered 6 (finiteGraph B) hc (finiteGraph_degree B) | |
| (fixed B V) hp F.card e heG hei u hu hu8 | |
| rw [hvol,volume_body_coordinates B V hVB hcollar,β law_real V _ (closed_gradientEvent V b u F).measurableSet] at hb | |
| convert hb using 1 | |
| rw [β Real.rpow_mul_natCast (mul_pos (ExtremalEdges.gradientConstant_pos 6) hu).le] | |
| congr 1 | |
| ring | |
| end SparseBlocks | |
| end | |
| end | |
| end | |
| end | |
| end OAI | |