Download data/lean/OAI/Probability/LatticeSurface/Dynamics/ShiftAssembly.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 21.4 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Dynamics/ShiftAssembly.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/LatticeSurface/Dynamics/ShiftAssembly.lean
-
curl -L -o ShiftAssembly.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LatticeSurface/Dynamics/ShiftAssembly.lean
21.4 kB
| import Mathlib | |
| import OAI.Probability.LatticeSurface.Coercivity.SparseClusters | |
| import OAI.Probability.LatticeSurface.Dynamics.ClusterShift | |
| import OAI.Probability.LatticeSurface.Dynamics.JacobianIdentity | |
| import OAI.Probability.LatticeSurface.Dynamics.LogDet | |
| import OAI.Probability.LatticeSurface.Dynamics.MatrixJacobi | |
| import OAI.Probability.LatticeSurface.Dynamics.ShiftAnalysis | |
| import OAI.Probability.LatticeSurface.Dynamics.ShiftAsymptotics | |
| import OAI.Probability.LatticeSurface.Dynamics.ShiftData | |
| namespace OAI | |
| universe u v | |
| open Set MeasureTheory | |
| namespace FeasibleShift.ShiftData | |
| open SparseClusters | |
| variable {V : Type u} [Fintype V] [DecidableEq V] | |
| variable {W : Type v} [Fintype W] [DecidableEq W] | |
| variable {n D Db B : β} {Ο : ENNReal} {sstar L M N : β} | |
| variable (S : ShiftData (V := V) W n D Db B Ο sstar L M N) | |
| noncomputable def active := shiftGraph S.graph S.ground | |
| noncomputable def H (s : β) (x : V) (h : FreeSites S.pins β β) : β := | |
| (FeasibleShift.component (contactGraph S.active (extendHeight S.pins S.boundary h) s) x).card | |
| noncomputable def good (s R : β) : Set (FreeSites S.pins β β) := {h | β x, (S.H s x h : β) β€ R} | |
| instance law_isProbabilityMeasure : IsProbabilityMeasure S.law := | |
| ProbabilityTheory.cond_isProbabilityMeasure_of_finite S.polytope_positive S.polytope_finite | |
| lemma active_le : S.active β€ S.graph := fun _ _ h => h.1 | |
| lemma active_degree (x : V) : (neighbors S.active x).card β€ D := by | |
| apply (Finset.card_le_card ?_).trans (S.degree x) | |
| intro y hy | |
| exact (mem_neighbors _ _ _).mpr (S.active_le ((mem_neighbors _ _ _).mp hy)) | |
| lemma H_pos (s : β) (x : V) (h : FreeSites S.pins β β) : 0 < S.H s x h := | |
| Finset.card_pos.mpr β¨x, self_mem_component _ xβ© | |
| lemma H_le_card (s : β) (x : V) (h : FreeSites S.pins β β) : S.H s x h β€ Fintype.card V := | |
| Finset.card_le_univ _ | |
| lemma H_measurable (s : β) (x : V) : Measurable (S.H s x) := by | |
| apply measurable_graph_statistic (fun h => contactGraph S.active (extendHeight S.pins S.boundary h) s) ?_ | |
| (fun G => (FeasibleShift.component G x).card) | |
| intro y z | |
| by_cases hG : S.active.Adj y z | |
| Β· have hm : Measurable (fun h : FreeSites S.pins β β => | |
| 1 - |extendHeight S.pins S.boundary h y - extendHeight S.pins S.boundary h z|) := | |
| (measurable_const.sub (((continuous_apply y).comp (extendHeight_lipschitz S.pins S.boundary).continuous).measurable.sub | |
| (((continuous_apply z).comp (extendHeight_lipschitz S.pins S.boundary).continuous).measurable)).abs) | |
| simpa only [contactGraph, hG, true_and] using measurableSet_le hm measurable_const | |
| Β· simp only [contactGraph, hG, false_and, Set.ofPred_false, MeasurableSet.empty] | |
| lemma good_measurable (s R : β) : MeasurableSet (S.good s R) := by | |
| unfold good | |
| simp_rw [Set.ofPred_forall] | |
| apply MeasurableSet.iInter | |
| intro x | |
| exact measurableSet_le ((measurable_of_countable (fun k : β => (k : β))).comp (S.H_measurable s x)) measurable_const | |
| lemma H_tail (s : β) (hs : s β€ sstar) (hΟ : Ο β€ 1) | |
| (hsparse : (Db : ENNReal)^2 * Ο β€ 1/2) (x : V) (m : β) (hm : 1 β€ m) : | |
| S.law {h | B*m+1 β€ S.H s x h} β€ (1/2 : ENNReal)^m := by | |
| classical | |
| have hh := sparse_cover_component_tail S.law S.boxGraph Db B S.box_degree S.boxMap S.box_fiber | |
| (fun h => contactGraph S.active (extendHeight S.pins S.boundary h) s) S.badBoxes | |
| (fun h x y hadj => S.box_adjacent x y hadj.1.1) | |
| (fun h x y hadj => S.contact_bad h x y β¨hadj.1, hadj.2.trans hsβ©) | |
| Ο hΟ S.sparse x m hm | |
| exact hh.trans (pow_le_pow_left' hsparse m) | |
| lemma H_integrable (s : β) (x : V) (k : β) : | |
| Integrable (fun h => (S.H s x h : β)^k) S.law := | |
| nat_pow_integrable_of_bound S.law (S.H s x) (S.H_measurable s x) | |
| (Fintype.card V) (S.H_le_card s x) k | |
| lemma H_moment (s : β) (hs : s β€ sstar) (hB : 0 < B) (hΟ : Ο β€ 1) | |
| (hsparse : (Db : ENNReal)^2 * Ο β€ 1/2) (x : V) (k : β) : | |
| (β« h, (S.H s x h : β)^k βS.law) β€ boxMoment B k := | |
| nat_real_moment_of_geometric_tail S.law (S.H s x) (S.H_measurable s x) (S.H_pos s x) | |
| B hB (S.H_tail s hs hΟ hsparse x) k | |
| lemma mem_local_of_not_ground {x : V} (hx : x β S.ground) : x β localSites S.graph S.ground := by | |
| classical | |
| exact Finset.mem_filter.mpr β¨Finset.mem_univ x, Or.inl hxβ© | |
| lemma H_outside_local (s : β) (x : V) (hx : x β localSites S.graph S.ground) | |
| (h : FreeSites S.pins β β) : S.H s x h = 1 := by | |
| classical | |
| have hxg : x β S.ground := by | |
| by_contra hh | |
| exact hx (S.mem_local_of_not_ground hh) | |
| have hno (y : V) : Β¬ (contactGraph S.active (extendHeight S.pins S.boundary h) s).Adj x y := by | |
| intro hh | |
| have hy : y β S.ground := fun hyy => hh.1.2 β¨hxg, hyyβ© | |
| exact hx (Finset.mem_filter.mpr β¨Finset.mem_univ x, Or.inr β¨y, hy, hh.1.1β©β©) | |
| have he : FeasibleShift.component (contactGraph S.active (extendHeight S.pins S.boundary h) s) x = {x} := by | |
| ext y | |
| rw [mem_component, Finset.mem_singleton] | |
| constructor | |
| Β· rintro β¨wβ© | |
| cases w with | |
| | nil => rfl | |
| | cons hadj w => exact (hno _ hadj).elim | |
| Β· rintro rfl | |
| exact SimpleGraph.Reachable.refl _ | |
| change (FeasibleShift.component _ x).card = 1 | |
| rw [he, Finset.card_singleton] | |
| lemma bad_good_bound (s R : β) (hs : s β€ sstar) (hB : 0 < B) (hΟ : Ο β€ 1) | |
| (hsparse : (Db : ENNReal)^2 * Ο β€ 1/2) (hR : 1 β€ R) (k : β) (hk : 0 < k) : | |
| S.law.real (S.good s R)αΆ β€ ((localSites S.graph S.ground).card : β) * boxMoment B k / R^k := by | |
| classical | |
| let U := {x // x β localSites S.graph S.ground} | |
| have he : (S.good s R)αΆ = {h | β x : U, R < (S.H s x h : β)} := by | |
| ext h | |
| simp only [good, Set.mem_compl_iff, Set.mem_ofPred_eq, not_forall, not_le] | |
| constructor | |
| Β· rintro β¨x, hxβ© | |
| have hxl : x β localSites S.graph S.ground := by | |
| by_contra hh | |
| rw [S.H_outside_local s x hh, Nat.cast_one] at hx | |
| exact (not_lt_of_ge hR) hx | |
| exact β¨β¨x, hxlβ©, hxβ© | |
| Β· rintro β¨x, hxβ© | |
| exact β¨x, hxβ© | |
| rw [he] | |
| have hh := maximum_nat_moment_bound S.law (fun x : U => S.H s x) | |
| (fun x => S.H_measurable s x) (Fintype.card V) (fun x => S.H_le_card s x) | |
| k hk _ R (by linarith) (fun x => S.H_moment s hs hB hΟ hsparse x k) | |
| simpa only [U, Fintype.card_coe] using hh | |
| lemma active_or_ground {x y : V} (hxy : S.graph.Adj x y) : | |
| S.active.Adj x y β¨ (x β S.ground β§ y β S.ground) := by | |
| by_cases hh : x β S.ground β§ y β S.ground | |
| Β· exact Or.inr hh | |
| Β· exact Or.inl β¨hxy, hhβ© | |
| lemma shift_lipschitz (sβ sβ : β) (hs : sβ < sβ) (hM : 0 β€ M) : | |
| LipschitzWith β¨(sβ-sβ)β»ΒΉ * (4*M*Fintype.card (V Γ V)), by positivityβ© (S.shift sβ sβ) := | |
| freeShift_lipschitz S.active S.ground S.pins S.boundary S.prescribed sβ sβ M hs hM S.prescribed_bound | |
| lemma extend_map (sβ sβ : β) (h : FreeSites S.pins β β) : | |
| extendHeight S.pins S.boundary (S.map sβ sβ h) = | |
| extendHeight S.pins S.boundary h + | |
| averagedShift S.active S.ground S.prescribed (extendHeight S.pins S.boundary h) sβ sβ := by | |
| simpa only [one_smul, map, shift, active] using extendHeight_shift S.active S.ground S.pins S.pins_ground | |
| S.boundary S.prescribed sβ sβ 1 h | |
| lemma map_feasible (sβ sβ sβ R : β) (hs : sβ < sβ) (hss : sβ β€ sβ) (hL : 0 β€ L) | |
| (hsmall : L / n * (2*R+1) β€ sβ) (h : FreeSites S.pins β β) | |
| (hP : h β S.polytope) (hg : h β S.good sβ R) : S.map sβ sβ h β S.polytope := by | |
| change (β x y, S.graph.Adj x y β |extendHeight S.pins S.boundary (S.map sβ sβ h) x - | |
| extendHeight S.pins S.boundary (S.map sβ sβ h) y| β€ 1) β§ _ | |
| rw [S.extend_map] | |
| constructor | |
| Β· intro x y hxy | |
| rcases S.active_or_ground hxy with ha | β¨hx, hyβ© | |
| Β· exact averagedShift_feasible S.active S.ground S.prescribed | |
| (extendHeight S.pins S.boundary h) sβ sβ sβ (L/n) R hs hss (by positivity) | |
| S.prescribed_ground (fun x y hh => S.prescribed_gradient x y hh.1) hg hsmall | |
| (fun x y hh => hP.1 x y hh.1) x y ha | |
| Β· simpa only [Pi.add_apply, averagedShift_ground S.active S.ground S.prescribed | |
| (extendHeight S.pins S.boundary h) sβ sβ hx, | |
| averagedShift_ground S.active S.ground S.prescribed | |
| (extendHeight S.pins S.boundary h) sβ sβ hy, add_zero] using hP.1 x y hxy | |
| Β· intro x hx | |
| simpa only [Pi.add_apply, averagedShift_ground S.active S.ground S.prescribed | |
| (extendHeight S.pins S.boundary h) sβ sβ (S.walls_ground hx), add_zero] using hP.2 x hx | |
| lemma map_injective (sβ sβ sβ R : β) (hs : sβ < sβ) (hss : sβ β€ sβ) | |
| (hL : 0 β€ L) (hR : 0 β€ R) (hbuf : sβ + 4*(L/n)*R β€ sβ) | |
| (hsmall : (sβ-sβ)β»ΒΉ * (4*D*(L/n)) * R^2 < 1) : | |
| Set.InjOn (S.map sβ sβ) (S.good sβ R) := by | |
| intro h hh k hk hc | |
| have hh' := averagedShift_injective_good S.active S.ground S.prescribed sβ sβ sβ (L/n) R D | |
| hs hss (by positivity) hR S.prescribed_ground | |
| (fun x y hxy => S.prescribed_gradient x y hxy.1) S.active_degree hbuf hsmall hh hk | |
| have he := congrArg (extendHeight S.pins S.boundary) hc | |
| rw [S.extend_map, S.extend_map] at he | |
| have hhk := hh' he | |
| ext x | |
| simpa only [extendHeight_free] using congrFun hhk (x : V) | |
| lemma approximation_on_good (sβ sβ sβ R : β) (hs : sβ < sβ) (hss : sβ β€ sβ) | |
| (hL : 0 β€ L) (hR : 0 β€ R) (h : FreeSites S.pins β β) (hg : h β S.good sβ R) : | |
| βS.map sβ sβ h - h - (fun x : FreeSites S.pins => S.prescribed x)β β€ (L/n)*R := by | |
| apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr | |
| intro x | |
| change |(h x + S.shift sβ sβ h x) - h x - S.prescribed x| β€ _ | |
| rw [add_sub_cancel_left] | |
| exact (averagedShift_approximation S.active S.ground S.prescribed | |
| (extendHeight S.pins S.boundary h) sβ sβ sβ (L/n) hs hss (by positivity) | |
| S.prescribed_ground (fun x y hh => S.prescribed_gradient x y hh.1) x).trans | |
| (mul_le_mul_of_nonneg_left (hg x) (by positivity)) | |
| open TangentialJacobian | |
| lemma derivative_on_good (sβ sβ sβ R : β) (hs : sβ < sβ) (hss : sβ < sβ) | |
| (hL : 0 β€ L) (hR : 0 β€ R) (h : FreeSites S.pins β β) (hg : h β S.good sβ R) : | |
| βfderiv β (S.shift sβ sβ) hβ β€ (sβ-sβ)β»ΒΉ * (4*D*(L/n)) * R^2 := by | |
| have hd : 0 < sβ-sβ := sub_pos.mpr hs | |
| by_cases hu : DifferentiableAt β (S.shift sβ sβ) h | |
| Β· exact freeShift_derivative_opNorm S.active S.ground S.pins S.boundary S.prescribed h | |
| sβ sβ sβ (L/n) R D hs hss (by positivity) hR S.prescribed_ground | |
| (fun x y hh => S.prescribed_gradient x y hh.1) S.active_degree hg _ hu.hasFDerivAt | |
| Β· rw [fderiv_zero_of_not_differentiableAt hu, norm_zero]; positivity | |
| lemma derivative_cost_bound (sβ sβ sβ : β) (hs : sβ < sβ) (hss : sβ < sβ) | |
| (hL : 0 β€ L) (h : FreeSites S.pins β β) : | |
| jacobianCost (fderiv β (S.shift sβ sβ) h) β€ | |
| ((sβ-sβ)β»ΒΉ * (4*D*(L/n)))^2 * β x β localSites S.graph S.ground, (S.H sβ x h : β)^3 := by | |
| classical | |
| have hd : 0 < sβ-sβ := sub_pos.mpr hs | |
| by_cases hu : DifferentiableAt β (S.shift sβ sβ) h | |
| Β· apply (freeShift_derivative_cost S.active S.ground S.pins S.boundary S.prescribed h | |
| sβ sβ sβ (L/n) D hs hss (by positivity) S.prescribed_ground | |
| (fun x y hh => S.prescribed_gradient x y hh.1) S.active_degree _ hu.hasFDerivAt).trans | |
| apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) | |
| calc | |
| _ β€ β x : FreeSites S.pins, if (x:V) β localSites S.graph S.ground then (S.H sβ x h : β)^3 else 0 := by | |
| apply Finset.sum_le_sum; intro x _ | |
| by_cases hx : (x:V) β S.ground | |
| Β· simp only [ite_eq_left hx]; split_ifs <;> positivity | |
| Β· simp only [ite_eq_right hx, ite_eq_left (S.mem_local_of_not_ground hx)] | |
| exact le_rfl | |
| _ β€ β x : V, if x β localSites S.graph S.ground then (S.H sβ x h : β)^3 else 0 := by | |
| rw [β Finset.sum_subtype (Finset.univ.filter fun x : V => x β S.pins) (by simp) | |
| (fun x => if x β localSites S.graph S.ground then (S.H sβ x h : β)^3 else 0)] | |
| exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) (by intros; split_ifs <;> positivity) | |
| _ = β x β localSites S.graph S.ground, (S.H sβ x h : β)^3 := by | |
| rw [β Finset.sum_filter] | |
| congr 1 | |
| ext x; simp | |
| Β· rw [fderiv_zero_of_not_differentiableAt hu] | |
| simp only [jacobianCost, asMatrix_apply, zero_apply, | |
| Finset.sum_const_zero, norm_zero, mul_zero] | |
| positivity | |
| lemma derivative_integrable (sβ sβ : β) (hs : sβ < sβ) (hM : 0 β€ M) | |
| (F : ((FreeSites S.pins β β) βL[β] (FreeSites S.pins β β)) β β) (hF : Continuous F) : | |
| Integrable (fun h => F (fderiv β (S.shift sβ sβ) h)) S.law := | |
| continuous_integrable_of_bounded S.law _ (measurable_fderiv β _) _ | |
| (fun _h => norm_fderiv_le_of_lipschitz β (S.shift_lipschitz sβ sβ hs hM)) F hF | |
| lemma divergence_square_identity (sβ sβ : β) (hs : sβ < sβ) (hsβ : 0 < sβ) (hM : 0 β€ M) : | |
| (β« h, (asMatrix (fderiv β (S.shift sβ sβ) h)).trace^2 βS.law) = | |
| β« h, (asMatrix (fderiv β (S.shift sβ sβ) h * fderiv β (S.shift sβ sβ) h)).trace βS.law := by | |
| have hid := (freeShift_divergence_identities S.graph S.active S.ground S.pins S.walls | |
| S.pins_ground S.walls_ground (fun _ _ hh => S.active_or_ground hh) | |
| S.boundary S.prescribed S.intervals sβ sβ M hs hsβ hM S.prescribed_bound | |
| S.polytope_measurable S.polytope_finite).2 | |
| change β« h, _ β((volume S.polytope)β»ΒΉ β’ volume.restrict S.polytope) = | |
| β« h, _ β((volume S.polytope)β»ΒΉ β’ volume.restrict S.polytope) | |
| rw [MeasureTheory.integral_smul_measure, MeasureTheory.integral_smul_measure] | |
| exact congrArg (fun r : β => (volume S.polytope)β»ΒΉ.toReal β’ r) hid | |
| lemma trace_square_le_cost_integral (sβ sβ : β) (hs : sβ < sβ) | |
| (hsβ : 0 < sβ) (hM : 0 β€ M) : | |
| (β« h, (asMatrix (fderiv β (S.shift sβ sβ) h)).trace^2 βS.law) β€ | |
| β« h, jacobianCost (fderiv β (S.shift sβ sβ) h) βS.law := by | |
| rw [S.divergence_square_identity sβ sβ hs hsβ hM] | |
| apply integral_mono (S.derivative_integrable sβ sβ hs hM _ | |
| (continuous_trace.comp (continuous_id.mul continuous_id))) | |
| (S.derivative_integrable sβ sβ hs hM _ continuous_jacobianCost) | |
| intro h | |
| let A := fderiv β (S.shift sβ sβ) h | |
| have hb := trace_sandwich_bound A 1 | |
| rw [mul_one] at hb | |
| calc | |
| _ β€ |(asMatrix (A*A)).trace| := le_abs_self _ | |
| _ β€ β(1 : (FreeSites S.pins β β) βL[β] (FreeSites S.pins β β))β * jacobianCost A := hb | |
| _ β€ 1 * jacobianCost A := mul_le_mul_of_nonneg_right ContinuousLinearMap.norm_id_le (jacobianCost_nonneg A) | |
| _ = _ := one_mul _ | |
| lemma cost_integral_bound (sβ sβ sβ : β) (hs : sβ < sβ) (hss : sβ < sβ) (hstar : sβ β€ sstar) | |
| (hL : 0 β€ L) (hM : 0 β€ M) (hB : 0 < B) (hΟ : Ο β€ 1) | |
| (hsparse : (Db : ENNReal)^2 * Ο β€ 1/2) : | |
| (β« h, jacobianCost (fderiv β (S.shift sβ sβ) h) βS.law) β€ | |
| ((sβ-sβ)β»ΒΉ * (4*D*(L/n)))^2 * ((localSites S.graph S.ground).card : β) * boxMoment B 3 := by | |
| have hi : Integrable (fun h => β x β localSites S.graph S.ground, (S.H sβ x h : β)^3) S.law := | |
| integrable_finsetSum _ (fun x _ => S.H_integrable sβ x 3) | |
| calc | |
| _ β€ β« h, ((sβ-sβ)β»ΒΉ * (4*D*(L/n)))^2 * β x β localSites S.graph S.ground, (S.H sβ x h : β)^3 βS.law := by | |
| exact integral_mono (S.derivative_integrable sβ sβ hs hM _ continuous_jacobianCost) | |
| (hi.const_mul _) (S.derivative_cost_bound sβ sβ sβ hs hss hL) | |
| _ = ((sβ-sβ)β»ΒΉ * (4*D*(L/n)))^2 * β x β localSites S.graph S.ground, β« h, (S.H sβ x h : β)^3 βS.law := by | |
| rw [MeasureTheory.integral_const_mul, integral_finsetSum _ (fun x _ => S.H_integrable sβ x 3)] | |
| _ β€ ((sβ-sβ)β»ΒΉ * (4*D*(L/n)))^2 * β x β localSites S.graph S.ground, boxMoment B 3 := by | |
| apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) | |
| exact Finset.sum_le_sum (fun x _ => S.H_moment sβ hstar hB hΟ hsparse x 3) | |
| _ = _ := by simp only [Finset.sum_const, nsmul_eq_mul]; ring | |
| lemma uniform_moment_bound (sβ sβ sβ : β) (hsβ : 0 < sβ) (hs : sβ < sβ) | |
| (hss : sβ < sβ) (hstar : sβ β€ sstar) (hn : 0 < n) | |
| (hL : 0 β€ L) (hM : 0 β€ M) (hB : 0 < B) (hΟ : Ο β€ 1) | |
| (hsparse : (Db : ENNReal)^2 * Ο β€ 1/2) : | |
| (β« h, (asMatrix (fderiv β (S.shift sβ sβ) h)).trace^2 + | |
| jacobianCost (fderiv β (S.shift sβ sβ) h) βS.law) β€ | |
| 2 * ((sβ-sβ)β»ΒΉ * (4*D*L))^2 * N * boxMoment B 3 := by | |
| rw [integral_add (S.derivative_integrable sβ sβ hs hM (fun A => (asMatrix A).trace^2) (continuous_trace.pow 2)) | |
| (S.derivative_integrable sβ sβ hs hM _ continuous_jacobianCost)] | |
| have hc := S.cost_integral_bound sβ sβ sβ hs hss hstar hL hM hB hΟ hsparse | |
| have ht := S.trace_square_le_cost_integral sβ sβ hs hsβ hM | |
| have hb : 0 β€ boxMoment B 3 := boxMoment_nonneg B 3 | |
| have hn' : (n : β) β 0 := by exact_mod_cast hn.ne' | |
| calc | |
| _ β€ 2 * (((sβ-sβ)β»ΒΉ * (4*D*(L/n)))^2 * ((localSites S.graph S.ground).card : β) * boxMoment B 3) := by linarith | |
| _ β€ 2 * (((sβ-sβ)β»ΒΉ * (4*D*(L/n)))^2 * (N*(n:β)^2) * boxMoment B 3) := by | |
| gcongr | |
| exact S.vertex_count | |
| _ = _ := by field_simp | |
| end FeasibleShift.ShiftData | |
| open Filter | |
| namespace FeasibleShift | |
| open Filter | |
| theorem feasible_shifts (D Db B : β) (Ο : ENNReal) (sβ sβ sβ sstar L M N p : β) | |
| (hB : 0 < B) (hΟ : Ο β€ 1) (hsparse : (Db : ENNReal)^2 * Ο β€ 1/2) | |
| (hsβ : 0 < sβ) (hs : sβ < sβ) (hss : sβ < sβ) (hstar : sβ < sstar) | |
| (hL : 0 β€ L) (hM : 0 β€ M) (hN : 0 β€ N) (hp : 0 < p) : | |
| β c : β, 0 < c β§ β nβ : β, | |
| Tendsto (fun n : β => (L / n) * (n : β)^(1/8 : β)) atTop (nhds 0) β§ | |
| β (n : β), nβ β€ n β β (V : Type u) [Fintype V] [DecidableEq V] | |
| (W : Type v) [Fintype W] [DecidableEq W] | |
| (S : ShiftData (V := V) W n D Db B Ο sstar L M N) | |
| (E : Set (FreeSites S.pins β β)), MeasurableSet E β p β€ S.law.real E β | |
| β E' : Set (FreeSites S.pins β β), MeasurableSet E' β§ E' β E β§ | |
| p/2 β€ S.law.real E' β§ Set.InjOn (S.map sβ sβ) E' β§ | |
| (S.map sβ sβ) '' E' β S.polytope β§ MeasurableSet ((S.map sβ sβ) '' E') β§ | |
| (β h β E', βS.map sβ sβ h - h - (fun x : FreeSites S.pins => S.prescribed x)β β€ | |
| (L / n) * (n : β)^(1/8 : β)) β§ c β€ S.law.real ((S.map sβ sβ) '' E') := by | |
| classical | |
| let C : β := 2 * ((sβ-sβ)β»ΒΉ * (4*D*L))^2 * N * SparseClusters.boxMoment B 3 | |
| have hC : 0 β€ C := by | |
| dsimp [C] | |
| exact mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) (sq_nonneg _)) hN) | |
| (SparseClusters.boxMoment_nonneg B 3) | |
| let K : β := 1+4*C/p | |
| have hK : 1 β€ K := by | |
| have hh : 0 β€ 4*C/p := by positivity | |
| dsimp [K]; linarith | |
| have hKpos : 0 < K := by linarith | |
| have hCK : C/K β€ p/4 := by | |
| apply (div_le_iffβ hKpos).mpr | |
| have he : p/4*(4*C/p) = C := by field_simp | |
| have hm := mul_le_mul_of_nonneg_left (show 4*C/p β€ K by dsimp [K]; linarith) | |
| (show 0 β€ p/4 by positivity) | |
| linarith | |
| obtain β¨nβ, hnββ© := (small_parameter_eventually D sβ sβ sβ L | |
| (N*SparseClusters.boxMoment B 32) p hsβ hs hss hp).exists_forall_of_atTop | |
| refine β¨Real.exp (-2*K)*p/2, by positivity, nβ, | |
| scaled_radius_tendsto L (1/8) (by norm_num), ?_β© | |
| intro n hn V iV dV W iW dW S E hE hEp | |
| obtain β¨hnpos, hfeas, hbuf, hnorm, htailβ© := hnβ n hn | |
| let R : β := (n:β)^(1/8:β) | |
| have hR : 1 β€ R := Real.one_le_rpow (by exact_mod_cast hnpos) (by norm_num) | |
| have hRpos : 0 < R := by linarith | |
| have hj := S.map_injective sβ sβ sβ R hs hss.le hL (by linarith) hbuf | |
| (hnorm.trans_lt (by norm_num)) | |
| have hm := S.uniform_moment_bound sβ sβ sβ hsβ hs hss hstar.le hnpos hL hM hB hΟ hsparse | |
| have hb : S.law.real (S.good sβ R)αΆ β€ p/4 := by | |
| calc | |
| _ β€ ((localSites S.graph S.ground).card : β) * SparseClusters.boxMoment B 32 / R^32 := | |
| S.bad_good_bound sβ R hstar.le hB hΟ hsparse hR 32 (by norm_num) | |
| _ β€ (N*(n:β)^2)*SparseClusters.boxMoment B 32 / R^32 := by | |
| apply div_le_div_of_nonneg_right _ (by positivity) | |
| exact mul_le_mul_of_nonneg_right S.vertex_count (SparseClusters.boxMoment_nonneg B 32) | |
| _ = (N*SparseClusters.boxMoment B 32)*(n:β)^2 / R^32 := by ring | |
| _ β€ p/4 := htail | |
| obtain β¨E', hEm, hsub, hmass, hinj, himage, himagem, himagepβ© := | |
| TangentialJacobian.event_volume_of_moments S.polytope (S.good sβ R) | |
| S.polytope_measurable (S.good_measurable sβ R) S.polytope_positive S.polytope_finite | |
| (S.shift sβ sβ) _ (S.shift_lipschitz sβ sβ hs hM) hj | |
| (fun h hh => S.map_feasible sβ sβ sβ R hs hss.le hL hfeas h hh.1 hh.2) | |
| (fun h hh => (S.derivative_on_good sβ sβ sβ R hs hss hL hRpos.le h hh).trans hnorm) | |
| C p K hp hK hm hCK hb E hE hEp | |
| refine β¨E', hEm, fun h hh => (hsub hh).1.1, hmass, hinj, himage, himagem, ?_, himagepβ© | |
| intro h hh | |
| exact S.approximation_on_good sβ sβ sβ R hs hss.le hL hRpos.le h (hsub hh).2 | |
| end FeasibleShift | |
| end OAI | |