math / data /lean /OAI /Probability /JammingConcavity /RowFiniteDiagonalRowGeneralInterpolation.lean
Download data/lean/OAI/Probability/JammingConcavity/RowFiniteDiagonalRowGeneralInterpolation.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 40.3 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/JammingConcavity/RowFiniteDiagonalRowGeneralInterpolation.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/JammingConcavity/RowFiniteDiagonalRowGeneralInterpolation.lean
-
curl -L -o RowFiniteDiagonalRowGeneralInterpolation.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/JammingConcavity/RowFiniteDiagonalRowGeneralInterpolation.lean
40.3 kB
| import Mathlib | |
| import OAI.Probability.JammingConcavity.RowFiniteDiagonalRowDirectionPairingTendsto | |
| namespace OAI | |
| /-! Row Finite Diagonal Row General Interpolation. -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Set | |
| open scoped NNReal ENNReal | |
| open Set Filter | |
| open scoped Topology | |
| open MeasureTheory ProbabilityTheory Filter Set | |
| open scoped ENNReal NNReal Topology BigOperators | |
| open MeasureTheory Filter Set | |
| open scoped ENNReal NNReal BigOperators | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped ENNReal NNReal Topology | |
| open scoped NNReal ENNReal Topology | |
| open scoped NNReal Topology | |
| open Set | |
| open Set Filter MeasureTheory | |
| open scoped BigOperators | |
| open scoped Topology NNReal | |
| open scoped Topology BigOperators | |
| open scoped ENNReal NNReal | |
| open MeasureTheory Set | |
| open MeasureTheory ProbabilityTheory | |
| open scoped ENNReal NNReal BigOperators Classical | |
| open Classical | |
| open scoped ENNReal NNReal Topology BigOperators MatrixOrder | |
| open scoped NNReal BigOperators | |
| open MeasureTheory Metric Set | |
| open Metric | |
| open scoped RealInnerProductSpace | |
| open Filter | |
| open Finset Set | |
| open MeasureTheory ProbabilityTheory Filter | |
| open scoped ENNReal NNReal BigOperators Topology | |
| open MeasureTheory ProbabilityTheory Filter Metric | |
| open scoped ENNReal NNReal Topology BigOperators BoundedContinuousFunction | |
| open scoped BigOperators Classical | |
| open scoped ENNReal NNReal Topology BigOperators Matrix MatrixOrder | |
| open scoped BigOperators RealInnerProductSpace | |
| open scoped NNReal Topology BigOperators | |
| open scoped NNReal BigOperators RealInnerProductSpace | |
| open scoped ENNReal NNReal BigOperators MatrixOrder | |
| open scoped MatrixOrder | |
| open scoped NNReal | |
| open scoped BigOperators NNReal | |
| open scoped NNReal ENNReal BigOperators Topology | |
| open scoped Topology ENNReal NNReal | |
| open scoped Matrix.Norms.L2Operator MatrixOrder Topology NNReal ENNReal BigOperators | |
| open scoped Topology ENNReal NNReal BigOperators MatrixOrder Matrix.Norms.L2Operator | |
| open scoped Topology NNReal ENNReal BigOperators | |
| open scoped BigOperators NNReal Topology | |
| open scoped Topology NNReal ENNReal BigOperators MatrixOrder | |
| open scoped Topology NNReal ENNReal BigOperators MatrixOrder Matrix.Norms.L2Operator | |
| open scoped Topology NNReal ENNReal | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| structure RowExtensionData (u : β β β) (L Q : β) where | |
| value : RowProfile Q β β | |
| derivative : RowProfile Q β SphericalProfile | |
| bound : β q s, s β Set.Icc (0:β) 1 β (derivative q).val s β€ L^2 | |
| finite_value_limit : β (q : RowProfile Q) (P : β β RowFiniteProfile Q), | |
| Tendsto (fun n => sphericalProfileDistance (P n).profile.val q.1.val) atTop (π 0) β | |
| Tendsto (fun n => (P n).functional u) atTop (π (value q)) | |
| finite_derivative_limit : β (q : RowProfile Q) (P : β β RowFiniteProfile Q), | |
| Tendsto (fun n => sphericalProfileDistance (P n).profile.val q.1.val) atTop (π 0) β | |
| Tendsto (fun n => sphericalProfileDistance ((P n).derivative u) (derivative q).val) atTop (π 0) | |
| value_continuous : β (q : RowProfile Q) (qn : β β RowProfile Q), | |
| Tendsto (fun n => sphericalProfileDistance (qn n).1.val q.1.val) atTop (π 0) β | |
| Tendsto (fun n => value (qn n)) atTop (π (value q)) | |
| derivative_continuous : β (q : RowProfile Q) (qn : β β RowProfile Q), | |
| Tendsto (fun n => sphericalProfileDistance (qn n).1.val q.1.val) atTop (π 0) β | |
| Tendsto (fun n => sphericalProfileDistance (derivative (qn n)).val (derivative q).val) atTop (π 0) | |
| lemma rowExtension_exists {u : β β β} {L H : β} (hu : ContDiff β 2 u) | |
| (hL : 0 β€ L) (hH : 0 β€ H) (hb : β x, |deriv u x| β€ L β§ |deriv (deriv u) x| β€ H) | |
| (Q : β) : Nonempty (RowExtensionData u L Q) := by | |
| obtain β¨Phi,hPhi,hPhiContβ© := rowGeneralFunctional hu hL hH hb Q | |
| obtain β¨D,hD,hDlim,hDcontβ© := rowGeneralDerivative u L H hu hL hH hb Q | |
| exact β¨β¨Phi,D,hD,hPhi,hDlim,hPhiCont,hDcontβ©β© | |
| lemma RowExtensionData.finite_value {u : β β β} {L Q : β} (E : RowExtensionData u L Q) | |
| (P : RowFiniteProfile Q) : P.functional u = E.value P.asProfile := by | |
| apply tendsto_nhds_unique (tendsto_const_nhds (f := atTop (Ξ± := β))) | |
| apply E.finite_value_limit P.asProfile (fun _ => P) | |
| simpa only [RowFiniteProfile.asProfile,sphericalProfileDistance_self] using (tendsto_const_nhds (x := (0:β)) (f := atTop (Ξ± := β))) | |
| lemma RowExtensionData.finite_derivative {u : β β β} {L Q : β} (E : RowExtensionData u L Q) | |
| (P : RowFiniteProfile Q) : sphericalProfileDistance (P.derivative u) (E.derivative P.asProfile).val=0 := by | |
| apply tendsto_nhds_unique (tendsto_const_nhds (f := atTop (Ξ± := β))) | |
| apply E.finite_derivative_limit P.asProfile (fun _ => P) | |
| simpa only [RowFiniteProfile.asProfile,sphericalProfileDistance_self] using (tendsto_const_nhds (x := (0:β)) (f := atTop (Ξ± := β))) | |
| lemma RowExtensionData.pairing_continuous {u : β β β} {L Q : β} (E : RowExtensionData u L Q) | |
| (q r : RowProfile Q) : Continuous (fun t => rowDirectionPairing q.1 r.1 (E.derivative (rowProfileMix q r t))) := by | |
| rw [continuous_iff_seqContinuous] | |
| intro t ts ht | |
| apply rowDirectionPairing_tendsto q r _ (fun _ => q) (fun _ => r) _ (fun n => E.bound _) | |
| Β· simpa only [sphericalProfileDistance_self] using (tendsto_const_nhds (x := (0:β)) (f := atTop (Ξ± := β))) | |
| Β· simpa only [sphericalProfileDistance_self] using (tendsto_const_nhds (x := (0:β)) (f := atTop (Ξ± := β))) | |
| Β· exact E.derivative_continuous _ _ (rowProfileMix_parameter_tendsto q r ht) | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| def rowGaussianPairBlocks : List β β (β β ββ₯0) β (β β ββ₯0) β List (β Γ β Γ β) | |
| | [],_,_ => [] | |
| | m::ms,d,e => (m,(d 0:β),(e 0:β))::rowGaussianPairBlocks ms (fun j => d (j+1)) (fun j => e (j+1)) | |
| lemma rowGaussianPairBlocks_left (ms : List β) (d e : β β ββ₯0) : | |
| (rowGaussianPairBlocks ms d e).map (fun c => (c.1,c.2.1)) = rowGaussianBlocks ms d := by | |
| induction ms generalizing d e with | |
| | nil => rfl | |
| | cons m ms ih => simp [rowGaussianPairBlocks,rowGaussianBlocks,ih] | |
| lemma rowGaussianPairBlocks_right (ms : List β) (d e : β β ββ₯0) : | |
| (rowGaussianPairBlocks ms d e).map (fun c => (c.1,c.2.2)) = rowGaussianBlocks ms e := by | |
| induction ms generalizing d e with | |
| | nil => rfl | |
| | cons m ms ih => simp [rowGaussianPairBlocks,rowGaussianBlocks,ih] | |
| lemma rowGaussianPairBlocks_ranks (ms : List β) (d e : β β ββ₯0) : | |
| (rowGaussianPairBlocks ms d e).map Prod.fst = ms := by | |
| have h := congrArg (List.map Prod.fst) (rowGaussianPairBlocks_left ms d e) | |
| simpa only [List.map_map,Function.comp_def,rowGaussianBlocks_ranks] using h | |
| lemma rowGaussianBlocks_total (ms : List β) (d : β β ββ₯0) : | |
| ((rowGaussianBlocks ms d).map Prod.snd).sum = β j : Fin ms.length, (d j:β) := by | |
| induction ms generalizing d with | |
| | nil => simp [rowGaussianBlocks] | |
| | cons m ms ih => simp [rowGaussianBlocks,Fin.sum_univ_succ,ih] | |
| lemma rowGaussianPairBlocks_valid (ms : List β) (d e : β β ββ₯0) | |
| (hm : β m β ms, 0 < m β§ m < 1) : | |
| β c β rowGaussianPairBlocks ms d e, 0 β€ c.1 β§ c.1 β€ 1 β§ 0 β€ c.2.1 β§ 0 β€ c.2.2 := by | |
| intro c hc | |
| have hl : (c.1,c.2.1) β rowGaussianBlocks ms d := by | |
| rw [βrowGaussianPairBlocks_left ms d e] | |
| exact List.mem_map.mpr β¨c,hc,rflβ© | |
| have hr : (c.1,c.2.2) β rowGaussianBlocks ms e := by | |
| rw [βrowGaussianPairBlocks_right ms d e] | |
| exact List.mem_map.mpr β¨c,hc,rflβ© | |
| have h1 := rowGaussianBlocks_mem ms d _ hl | |
| have h2 := rowGaussianBlocks_mem ms e _ hr | |
| exact β¨(hm _ h1.1).1.le,(hm _ h1.1).2.le,h1.2,h2.2β© | |
| def rowNNMix (t : β) (a b : ββ₯0) : ββ₯0 := | |
| (1-rowUnitClip t).toNNReal*a+(rowUnitClip t).toNNReal*b | |
| lemma rowNNMix_coe (t : β) (a b : ββ₯0) : | |
| (rowNNMix t a b:β) = (1-rowUnitClip t)*(a:β)+rowUnitClip t*(b:β) := by | |
| simp [rowNNMix,Real.coe_toNNReal _ (sub_nonneg.mpr (rowUnitClip_mem t).2), | |
| Real.coe_toNNReal _ (rowUnitClip_mem t).1] | |
| lemma rowGaussianPairBlocks_interpolated (ms : List β) (d e : β β ββ₯0) {t : β} (ht : t β Set.Icc (0:β) 1) : | |
| rowInterpolatedBlocks (rowGaussianPairBlocks ms d e) t = rowGaussianBlocks ms (fun j => rowNNMix t (d j) (e j)) := by | |
| induction ms generalizing d e with | |
| | nil => rfl | |
| | cons m ms ih => | |
| simp only [rowGaussianPairBlocks,rowInterpolatedBlocks,List.map_cons,rowGaussianBlocks] | |
| congr 1 | |
| Β· simp [rowNNMix_coe,rowUnitClip_eq ht] | |
| Β· exact ih _ _ | |
| lemma rowGaussianBlocks_mix_cumulative (ms : List β) (d e : β β ββ₯0) (t s : β) : | |
| gaussianRankProfile (rowGaussianBlocks ms (fun j => rowNNMix t (d j) (e j))) s = | |
| (1-rowUnitClip t)*gaussianRankProfile (rowGaussianBlocks ms d) s+ | |
| rowUnitClip t*gaussianRankProfile (rowGaussianBlocks ms e) s := by | |
| induction ms generalizing d e with | |
| | nil => simp [gaussianRankProfile,rowGaussianBlocks] | |
| | cons m ms ih => | |
| simp only [gaussianRankProfile,rowGaussianBlocks,List.map_cons,List.sum_cons] | |
| split_ifs <;> try simp only [rowNNMix_coe] | |
| Β· have h := ih (fun j => d (j+1)) (fun j => e (j+1)) | |
| dsimp [gaussianRankProfile] at h | |
| rw [h]; ring | |
| Β· have h := ih (fun j => d (j+1)) (fun j => e (j+1)) | |
| simpa only [zero_add,gaussianRankProfile] using h | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| def RowFiniteProfile.mix {Q : β} (P R : RowFiniteProfile Q) (hr : P.ranks=R.ranks) (t : β) : RowFiniteProfile Q where | |
| ranks := P.ranks | |
| ordered := P.ordered | |
| valid := P.valid | |
| increment := fun j => rowNNMix t (P.increment j) (R.increment j) | |
| root := rowNNMix t P.root R.root | |
| residual := rowNNMix t P.residual R.residual | |
| diagonal := by | |
| have hp := P.diagonal | |
| have hq := R.diagonal | |
| simp only [rowReplicaDiagonal,NNReal.coe_add,NNReal.coe_sum] at hp hq β’ | |
| rw [Fin.sum_univ_eq_sum_range (fun j => (P.increment j:β))] at hp | |
| rw [Fin.sum_univ_eq_sum_range (fun j => (R.increment j:β))] at hq | |
| rw [βhr] at hq | |
| rw [Fin.sum_univ_eq_sum_range (fun j => (rowNNMix t (P.increment j) (R.increment j):β))] | |
| simp_rw [rowNNMix_coe] | |
| rw [Finset.sum_add_distrib,βFinset.mul_sum,βFinset.mul_sum] | |
| linear_combination (1-rowUnitClip t)*hp+rowUnitClip t*hq | |
| lemma RowFiniteProfile.mix_profile {Q : β} (P R : RowFiniteProfile Q) (hr : P.ranks=R.ranks) (t : β) : | |
| (P.mix R hr t).asProfile = rowProfileMix P.asProfile R.asProfile t := by | |
| apply Subtype.ext | |
| apply sphericalProfile_ext | |
| funext s | |
| change (rowCascadeProfile P.ranks (fun j => rowNNMix t (P.increment j) (R.increment j)) (rowNNMix t P.root R.root)).val s = | |
| (1-rowUnitClip t)*P.profile.val s+rowUnitClip t*R.profile.val s | |
| rw [rowCascadeProfile_sum _ P.ordered] | |
| change (rowNNMix t P.root R.root:β)+gaussianRankProfile (rowGaussianBlocks P.ranks (fun j => rowNNMix t (P.increment j) (R.increment j))) s = _ | |
| rw [rowNNMix_coe,rowGaussianBlocks_mix_cumulative] | |
| rw [RowFiniteProfile.profile,rowCascadeProfile_sum _ P.ordered,RowFiniteProfile.profile,rowCascadeProfile_sum _ R.ordered] | |
| rw [hr] | |
| dsimp [gaussianRankProfile] | |
| ring | |
| def RowFiniteProfile.pairBlocks {Q : β} (P R : RowFiniteProfile Q) : List (β Γ β Γ β) := | |
| (0,(P.root:β),(R.root:β))::(rowGaussianPairBlocks P.ranks P.increment R.increment ++ [(1,(P.residual:β),(R.residual:β))]) | |
| lemma RowFiniteProfile.pairBlocks_left {Q : β} (P R : RowFiniteProfile Q) : | |
| (P.pairBlocks R).map (fun c => (c.1,c.2.1)) = | |
| (0,(P.root:β))::(rowGaussianBlocks P.ranks P.increment ++ [(1,(P.residual:β))]) := by | |
| simp [pairBlocks,rowGaussianPairBlocks_left] | |
| lemma RowFiniteProfile.pairBlocks_right {Q : β} (P R : RowFiniteProfile Q) (hr : P.ranks=R.ranks) : | |
| (P.pairBlocks R).map (fun c => (c.1,c.2.2)) = | |
| (0,(R.root:β))::(rowGaussianBlocks R.ranks R.increment ++ [(1,(R.residual:β))]) := by | |
| simp [pairBlocks,rowGaussianPairBlocks_right,hr] | |
| lemma RowFiniteProfile.pairBlocks_valid {Q : β} (P R : RowFiniteProfile Q) : | |
| β c β P.pairBlocks R, 0 β€ c.1 β§ c.1 β€ 1 β§ 0 β€ c.2.1 β§ 0 β€ c.2.2 := by | |
| intro c hc | |
| simp only [pairBlocks,List.mem_cons,List.mem_append,List.not_mem_nil,or_false] at hc | |
| rcases hc with rfl | hc | rfl | |
| Β· exact β¨le_rfl,zero_le_one,P.root.coe_nonneg,R.root.coe_nonnegβ© | |
| Β· exact rowGaussianPairBlocks_valid _ _ _ P.valid c hc | |
| Β· exact β¨zero_le_one,le_rfl,P.residual.coe_nonneg,R.residual.coe_nonnegβ© | |
| lemma RowFiniteProfile.pairBlocks_sorted {Q : β} (P R : RowFiniteProfile Q) : | |
| (P.pairBlocks R).Pairwise (fun c d => c.1 β€ d.1) := by | |
| have h := rowRootResidual_sorted P.ranks P.increment P.root P.residual P.ordered P.valid | |
| rw [βP.pairBlocks_left R] at h | |
| simpa only [List.pairwise_map] using h | |
| lemma RowFiniteProfile.pairBlocks_total {Q : β} (P R : RowFiniteProfile Q) (hr : P.ranks=R.ranks) : | |
| rowVarianceTotal (P.pairBlocks R)=0 := by | |
| have he : rowVarianceTotal (P.pairBlocks R) = | |
| (((P.pairBlocks R).map (fun c => (c.1,c.2.2))).map Prod.snd).sum- | |
| (((P.pairBlocks R).map (fun c => (c.1,c.2.1))).map Prod.snd).sum := by | |
| simp only [rowVarianceTotal,List.map_map,Function.comp_def] | |
| generalize P.pairBlocks R = bs | |
| induction bs with | |
| | nil => simp | |
| | cons b bs ih => simp only [List.map_cons,List.sum_cons]; rw [ih]; ring | |
| rw [he,P.pairBlocks_left R,P.pairBlocks_right R hr] | |
| simp only [List.map_cons,List.map_append,List.sum_cons,List.sum_append,rowGaussianBlocks_total] | |
| have hp := P.diagonal | |
| have hq := R.diagonal | |
| simp only [rowReplicaDiagonal,NNReal.coe_add,NNReal.coe_sum] at hp hq | |
| linarith | |
| lemma RowFiniteProfile.pairBlocks_interpolated {Q : β} (P R : RowFiniteProfile Q) (hr : P.ranks=R.ranks) {t : β} (ht : t β Set.Icc (0:β) 1) : | |
| rowInterpolatedBlocks (P.pairBlocks R) t = | |
| (0,((P.mix R hr t).root:β))::(rowGaussianBlocks (P.mix R hr t).ranks (P.mix R hr t).increment ++ [(1,((P.mix R hr t).residual:β))]) := by | |
| simp only [pairBlocks,rowInterpolatedBlocks,List.map_cons,List.map_append] | |
| simp only [mix,rowNNMix_coe,rowUnitClip_eq ht] | |
| congr 2 | |
| exact rowGaussianPairBlocks_interpolated _ _ _ ht | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma rowDerivativeRankMoment_append_terminal (bs : List (β Γ β)) (a T : β) (u : β β β) | |
| {s : β} (hs : s<a) (x : β) : | |
| rowDerivativeRankMoment (bs++[(a,T)]) u s x = | |
| rowDerivativeRankMoment bs (gaussianRowOperator a T u) s x := by | |
| induction bs generalizing x with | |
| | nil => simp only [List.nil_append,rowDerivativeRankMoment_cons,ite_eq_left hs]; rfl | |
| | cons b bs ih => | |
| rw [List.cons_append,rowDerivativeRankMoment_cons,rowDerivativeRankMoment_cons] | |
| split_ifs | |
| Β· rw [βList.cons_append,gaussianRowComposition_append_eq] | |
| rfl | |
| Β· rw [gaussianRowComposition_append_eq] | |
| congr 1 | |
| exact funext ih | |
| lemma rowFullBlocks_profile {Q : β} (P : RowFiniteProfile Q) {s : β} (hs : s β Set.Ico (0:β) 1) : | |
| gaussianRankProfile ((0,(P.root:β))::(rowGaussianBlocks P.ranks P.increment ++ [(1,(P.residual:β))])) s = P.profile.val s := by | |
| simp only [gaussianRankProfile,List.map_cons,List.map_append,List.sum_cons,List.sum_append, | |
| ite_eq_left hs.1,ite_eq_right (not_le.mpr hs.2),List.map_nil,List.sum_nil,add_zero] | |
| exact (rowCascadeProfile_sum _ P.ordered _ _ s).symm | |
| lemma rowFullBlocks_derivative {u : β β β} {L H : β} (hu : RowBoundedTerminal u L H) | |
| {Q : β} (P : RowFiniteProfile Q) {s : β} (hs : s β Set.Ico (0:β) 1) : | |
| rowDerivativeRankMoment ((0,(P.root:β))::(rowGaussianBlocks P.ranks P.increment ++ [(1,(P.residual:β))])) u s 0 = P.derivative u s := by | |
| rw [rowDerivativeRankMoment_cons,ite_eq_right (not_lt.mpr hs.1)] | |
| simp_rw [rowDerivativeRankMoment_append_terminal _ _ _ _ hs.2,rowRankMoment_blocks _ P.ordered] | |
| simp only [rowTiltStep,zero_mul,Real.exp_zero,mul_one,integral_const,probReal_univ,smul_eq_mul,div_one,zero_add] | |
| have hv := rowBoundedOperator_terminal hu (show (0:β)β€1 by norm_num) le_rfl (P.residual:β) | |
| have hm := measurable_rowDerivativeDepthMoment hv (rowGaussianBlocks P.ranks P.increment) | |
| (rowGaussianBlocks_valid P.ranks (fun a ha => β¨(P.valid a ha).1.le,(P.valid a ha).2.leβ©) P.increment) (rpcStepLevel P.ranks s) | |
| exact (rowGaussian_integral P.root hm).symm | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology | |
| namespace MicroscopicJamming | |
| lemma rowFiniteSubFTC {u : β β β} {L H : β} (hu : ContDiff β 2 u) | |
| (hL : 0 β€ L) (hH : 0 β€ H) (hb : β x, |deriv u x| β€ L β§ |deriv (deriv u) x| β€ H) | |
| (bs : List (β Γ β Γ β)) | |
| (hbs : β c β bs, 0 β€ c.1 β§ c.1 β€ 1 β§ 0 β€ c.2.1 β§ 0 β€ c.2.2) | |
| (hord : bs.Pairwise (fun c d => c.1 β€ d.1)) (htotal : rowVarianceTotal bs=0) | |
| {a b : β} (ha : 0 β€ a) (hab : aβ€b) (hb1 : bβ€1) (x : β) : | |
| gaussianRowComposition (rowInterpolatedBlocks bs b) u x- | |
| gaussianRowComposition (rowInterpolatedBlocks bs a) u x = | |
| β« t in a..b, -(1/2:β)*(β« s in (0:β)..1, | |
| (gaussianRankProfile (bs.map (fun c => (c.1,c.2.2))) s- | |
| gaussianRankProfile (bs.map (fun c => (c.1,c.2.1))) s)* | |
| rowDerivativeRankMoment (rowInterpolatedBlocks bs t) u s x) := by | |
| have hbu := rowTerminal_of_C2 hu hL hH hb | |
| let F := fun t => gaussianRowComposition (rowInterpolatedBlocks bs t) u x | |
| let F' := fun t => -(1/2:β)*(β« s in (0:β)..1, | |
| (gaussianRankProfile (bs.map (fun c => (c.1,c.2.2))) s- | |
| gaussianRankProfile (bs.map (fun c => (c.1,c.2.1))) s)* | |
| rowDerivativeRankMoment (rowInterpolatedBlocks bs t) u s x) | |
| have hd : β t β Set.Ioo a b, HasDerivAt F (F' t) t := | |
| fun t ht => rowFiniteIntegral u L H hu hL hH hb bs hbs hord htotal t β¨ha.trans_lt ht.1,ht.2.trans_le hb1β© x | |
| obtain β¨K,C,hC,hf,hm,hboundβ© := rowVarianceFamily_bounds hbu bs (fun c hc => β¨(hbs c hc).1,(hbs c hc).2.1β©) | |
| have he : F' =α΅[volume.restrict (Set.Ioo a b)] deriv F := by | |
| filter_upwards [ae_restrict_mem measurableSet_Ioo] with t ht | |
| exact (hd t ht).deriv.symm | |
| have hi : IntervalIntegrable F' volume a b := by | |
| rw [intervalIntegrable_iff_integrableOn_Ioo_of_le hab] | |
| apply (integrable_const C).mono' ((aestronglyMeasurable_deriv F _).congr he.symm) | |
| filter_upwards [ae_restrict_mem measurableSet_Ioo] with t ht | |
| have hv := rowFiniteVariance u L H hu hL hH hb bs hbs t β¨ha.trans_lt ht.1,ht.2.trans_le hb1β© x | |
| have heq : F' t = rowFiniteVarianceResponse bs u t x := (hd t ht).deriv.symm.trans hv.deriv | |
| rw [Real.norm_eq_abs,heq] | |
| exact hbound t x | |
| exact (intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hab | |
| (rowVarianceComposition_continuous hbu bs (fun c hc => β¨(hbs c hc).1,(hbs c hc).2.1β©) x).continuousOn hd hi).symm | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma RowExtensionData.finite_pairing {u : β β β} {L H Q : β} (E : RowExtensionData u L Q) | |
| (hu : RowBoundedTerminal u L H) (q r : RowProfile Q) (P : RowFiniteProfile Q) : | |
| rowDirectionPairing q.1 r.1 (P.derivativeProfile hu) = rowDirectionPairing q.1 r.1 (E.derivative P.asProfile) := by | |
| have h := rowDirectionPairing_difference_bound q.1 r.1 q.1 r.1 (P.derivativeProfile hu) (E.derivative P.asProfile) | |
| (fun s _ => (P.derivative_bounds hu s).2) (fun s hs => rowProfile_difference_bound q r hs) | |
| simp only [sphericalProfileDistance_self,zero_add,mul_zero,zero_add,RowFiniteProfile.derivativeProfile, | |
| E.finite_derivative P,mul_zero] at h | |
| exact sub_eq_zero.mp (abs_nonpos_iff.mp h) | |
| lemma rowFiniteProfileFTC {u : β β β} {L H Q : β} (hu : ContDiff β 2 u) | |
| (hL : 0 β€ L) (hH : 0 β€ H) (hb : β x, |deriv u x| β€ L β§ |deriv (deriv u) x| β€ H) | |
| (E : RowExtensionData u L Q) (P R : RowFiniteProfile Q) (hr : P.ranks=R.ranks) | |
| {a b : β} (ha : 0 β€ a) (hab : aβ€b) (hb1 : bβ€1) : | |
| E.value (rowProfileMix P.asProfile R.asProfile b)-E.value (rowProfileMix P.asProfile R.asProfile a) = | |
| β« t in a..b, -(1/2:β)*rowDirectionPairing P.profile R.profile (E.derivative (rowProfileMix P.asProfile R.asProfile t)) := by | |
| have he := rowFiniteSubFTC hu hL hH hb (P.pairBlocks R) (P.pairBlocks_valid R) | |
| (P.pairBlocks_sorted R) (P.pairBlocks_total R hr) ha hab hb1 0 | |
| have ha' : a β Set.Icc (0:β) 1 := β¨ha,hab.trans hb1β© | |
| have hb' : b β Set.Icc (0:β) 1 := β¨ha.trans hab,hb1β© | |
| rw [P.pairBlocks_interpolated R hr ha',P.pairBlocks_interpolated R hr hb'] at he | |
| change (P.mix R hr b).functional u-(P.mix R hr a).functional u = _ at he | |
| rw [E.finite_value,E.finite_value,P.mix_profile R hr a,P.mix_profile R hr b] at he | |
| refine he.trans ?_ | |
| apply intervalIntegral.integral_congr_Ioo_of_le hab | |
| intro t ht | |
| have ht' : t β Set.Icc (0:β) 1 := β¨ha.trans ht.1.le,ht.2.le.trans hb1β© | |
| dsimp only | |
| congr 1 | |
| rw [P.pairBlocks_right R hr,P.pairBlocks_left R,P.pairBlocks_interpolated R hr ht'] | |
| calc | |
| _ = rowDirectionPairing P.profile R.profile ((P.mix R hr t).derivativeProfile (rowTerminal_of_C2 hu hL hH hb)) := by | |
| apply intervalIntegral.integral_congr_Ioo_of_le (by norm_num) | |
| intro s hs | |
| dsimp only | |
| rw [rowFullBlocks_profile R β¨hs.1.le,hs.2β©,rowFullBlocks_profile P β¨hs.1.le,hs.2β©, | |
| rowFullBlocks_derivative (rowTerminal_of_C2 hu hL hH hb) (P.mix R hr t) β¨hs.1.le,hs.2β©] | |
| rfl | |
| _ = _ := by | |
| have hh := E.finite_pairing (rowTerminal_of_C2 hu hL hH hb) P.asProfile R.asProfile (P.mix R hr t) | |
| rw [P.mix_profile R hr t] at hh | |
| exact hh | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma rowProfileMix_tendsto {Q : β} (q r : RowProfile Q) (qn rn : β β RowProfile Q) (t : β) | |
| (hq : Tendsto (fun n => sphericalProfileDistance (qn n).1.val q.1.val) atTop (π 0)) | |
| (hr : Tendsto (fun n => sphericalProfileDistance (rn n).1.val r.1.val) atTop (π 0)) : | |
| Tendsto (fun n => sphericalProfileDistance (rowProfileMix (qn n) (rn n) t).1.val (rowProfileMix q r t).1.val) atTop (π 0) := by | |
| apply squeeze_zero (fun n => sphericalProfileDistance_nonneg _ _) | |
| (fun n => rowProfileMix_distance (qn n) (rn n) q r t) | |
| simpa using (hq.const_mul (1-rowUnitClip t)).add (hr.const_mul (rowUnitClip t)) | |
| lemma rowProfile_distance_le {Q : β} (q r : RowProfile Q) : sphericalProfileDistance r.1.val q.1.val β€ Q := by | |
| unfold sphericalProfileDistance | |
| calc | |
| _ β€ β« _ in (0:β)..1, Q := intervalIntegral.integral_mono_on (by norm_num) | |
| (r.1.integrable.sub q.1.integrable).abs (intervalIntegrable_const) (fun s hs => rowProfile_difference_bound q r hs) | |
| _ = Q := by simp | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma rowGeneralFTC {u : β β β} {L H Q : β} (hu : ContDiff β 2 u) | |
| (hL : 0 β€ L) (hH : 0 β€ H) (hb : β x, |deriv u x| β€ L β§ |deriv (deriv u) x| β€ H) | |
| (E : RowExtensionData u L Q) (q r : RowProfile Q) {b : β} (hb' : b β Set.Icc (0:β) 1) : | |
| E.value (rowProfileMix q r b)-E.value q = | |
| β« t in (0:β)..b, -(1/2:β)*rowDirectionPairing q.1 r.1 (E.derivative (rowProfileMix q r t)) := by | |
| let P : β β RowFiniteProfile Q := q.1.rowGrid q.2 | |
| let R : β β RowFiniteProfile Q := r.1.rowGrid r.2 | |
| let qn := fun n => (P n).asProfile | |
| let rn := fun n => (R n).asProfile | |
| have hqn : Tendsto (fun n => sphericalProfileDistance (qn n).1.val q.1.val) atTop (π 0) := rowGrid_distance_tendsto q.1 q.2 | |
| have hrn : Tendsto (fun n => sphericalProfileDistance (rn n).1.val r.1.val) atTop (π 0) := rowGrid_distance_tendsto r.1 r.2 | |
| let g := fun t => -(1/2:β)*rowDirectionPairing q.1 r.1 (E.derivative (rowProfileMix q r t)) | |
| let gn := fun n t => -(1/2:β)*rowDirectionPairing (qn n).1 (rn n).1 (E.derivative (rowProfileMix (qn n) (rn n) t)) | |
| have hc (n : β) : Continuous (gn n) := continuous_const.mul (E.pairing_continuous (qn n) (rn n)) | |
| have hg : Continuous g := continuous_const.mul (E.pairing_continuous q r) | |
| have hlim (t : β) : Tendsto (fun n => gn n t) atTop (π (g t)) := by | |
| apply Tendsto.const_mul | |
| apply rowDirectionPairing_tendsto q r _ qn rn _ (fun n => E.bound _) hqn hrn | |
| exact E.derivative_continuous _ _ (rowProfileMix_tendsto q r qn rn t hqn hrn) | |
| have hbound (n : β) (t : β) : βgn n tβ β€ (1/2:β)*L^2*Q := by | |
| rw [Real.norm_eq_abs] | |
| change |-(1/2:β)*rowDirectionPairing (qn n).1 (rn n).1 (E.derivative (rowProfileMix (qn n) (rn n) t))| β€ _ | |
| rw [abs_mul] | |
| norm_num only [abs_neg,abs_div,abs_one] | |
| calc | |
| _ β€ (1/2:β)*(L^2*sphericalProfileDistance (rn n).1.val (qn n).1.val) := | |
| mul_le_mul_of_nonneg_left (rowDirectionPairing_bound _ _ _ (E.bound _)) (by norm_num) | |
| _ β€ (1/2:β)*(L^2*Q) := mul_le_mul_of_nonneg_left | |
| (mul_le_mul_of_nonneg_left (rowProfile_distance_le (qn n) (rn n)) (sq_nonneg L)) (by norm_num) | |
| _ = _ := by ring | |
| have hi : Tendsto (fun n => β« t in (0:β)..b, gn n t) atTop (π (β« t in (0:β)..b, g t)) := by | |
| simp only [intervalIntegral.integral_of_le hb'.1] | |
| exact tendsto_integral_of_dominated_convergence (fun _ => (1/2:β)*L^2*Q) | |
| (fun n => (hc n).aestronglyMeasurable) (integrable_const _) (fun n => Eventually.of_forall (hbound n)) (Eventually.of_forall hlim) | |
| have he (n : β) : E.value (rowProfileMix (qn n) (rn n) b)-E.value (qn n) = β« t in (0:β)..b, gn n t := by | |
| have hh := rowFiniteProfileFTC hu hL hH hb E (P n) (R n) (show (P n).ranks=(R n).ranks from rfl) (a := 0) (b := b) le_rfl hb'.1 hb'.2 | |
| simpa [gn,qn,rn,RowFiniteProfile.asProfile,rowProfileMix_zero] using hh | |
| have hv : Tendsto (fun n => E.value (rowProfileMix (qn n) (rn n) b)-E.value (qn n)) atTop (π (E.value (rowProfileMix q r b)-E.value q)) := | |
| (E.value_continuous _ _ (rowProfileMix_tendsto q r qn rn b hqn hrn)).sub (E.value_continuous q qn hqn) | |
| exact tendsto_nhds_unique hv (by simpa only [he] using hi) | |
| lemma rowGeneral_hasDerivWithinAt {u : β β β} {L H Q : β} (hu : ContDiff β 2 u) | |
| (hL : 0 β€ L) (hH : 0 β€ H) (hb : β x, |deriv u x| β€ L β§ |deriv (deriv u) x| β€ H) | |
| (E : RowExtensionData u L Q) (q r : RowProfile Q) {t : β} (ht : t β Set.Icc (0:β) 1) : | |
| HasDerivWithinAt (fun v => E.value (rowProfileMix q r v)) | |
| (-(1/2:β)*rowDirectionPairing q.1 r.1 (E.derivative (rowProfileMix q r t))) (Set.Icc (0:β) 1) t := by | |
| let g := fun v => -(1/2:β)*rowDirectionPairing q.1 r.1 (E.derivative (rowProfileMix q r v)) | |
| have hc : Continuous g := continuous_const.mul (E.pairing_continuous q r) | |
| have hd := (intervalIntegral.integral_hasDerivAt_right (hc.intervalIntegrable 0 t) | |
| hc.aestronglyMeasurable.stronglyMeasurableAtFilter hc.continuousAt).const_add (E.value q) | |
| apply hd.hasDerivWithinAt.congr_of_mem _ ht | |
| intro v hv | |
| have he := rowGeneralFTC hu hL hH hb E q r hv | |
| dsimp [g] | |
| linarith | |
| lemma rowGeneral_lipschitz {u : β β β} {L H Q : β} (hu : ContDiff β 2 u) | |
| (hL : 0 β€ L) (hH : 0 β€ H) (hb : β x, |deriv u x| β€ L β§ |deriv (deriv u) x| β€ H) | |
| (E : RowExtensionData u L Q) (q r : RowProfile Q) : | |
| |E.value q-E.value r| β€ (1/2:β)*L^2*sphericalProfileDistance q.1.val r.1.val := by | |
| have he := rowGeneralFTC hu hL hH hb E r q (b := 1) (by norm_num) | |
| rw [rowProfileMix_one] at he | |
| rw [he] | |
| let g := fun t => -(1/2:β)*rowDirectionPairing r.1 q.1 (E.derivative (rowProfileMix r q t)) | |
| have hc : Continuous g := continuous_const.mul (E.pairing_continuous r q) | |
| calc | |
| _ β€ β« _ in (0:β)..1, (1/2:β)*L^2*sphericalProfileDistance q.1.val r.1.val := by | |
| refine (intervalIntegral.abs_integral_le_integral_abs (by norm_num)).trans ?_ | |
| apply intervalIntegral.integral_mono_on (by norm_num) (hc.intervalIntegrable 0 1).abs intervalIntegrable_const | |
| intro t ht | |
| dsimp [g] | |
| rw [abs_mul] | |
| norm_num only [abs_neg,abs_div,abs_one] | |
| simpa only [mul_assoc] using mul_le_mul_of_nonneg_left | |
| (rowDirectionPairing_bound r.1 q.1 (E.derivative (rowProfileMix r q t)) (E.bound _)) (by norm_num : (0:β) β€ 1/2) | |
| _ = _ := by simp | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma rowRankDerivative_segment (rs : List (β Γ β)) (u : β β β) | |
| (hord : rs.Pairwise (fun r t => r.1 β€ t.1)) {s t : β} (hst : s β€ t) | |
| (hz : β r β rs, s < r.1 β r.1 β€ t β r.2=0) (x : β) : | |
| rowDerivativeRankMoment rs u s x = rowDerivativeRankMoment rs u t x := by | |
| induction rs generalizing x with | |
| | nil => rfl | |
| | cons r rs ih => | |
| obtain β¨hr,htailβ© := List.pairwise_cons.mp hord | |
| have hz' : β v β rs, s < v.1 β v.1 β€ t β v.2=0 := | |
| fun v hv => hz v (List.mem_cons_of_mem r hv) | |
| rw [rowDerivativeRankMoment_cons,rowDerivativeRankMoment_cons] | |
| by_cases hs : s < r.1 | |
| Β· rw [ite_eq_left hs] | |
| by_cases ht : t < r.1 | |
| Β· rw [ite_eq_left ht] | |
| Β· rw [ite_eq_right ht] | |
| have hv := hz r (List.mem_cons_self) hs (le_of_not_gt ht) | |
| rw [hv,rowTiltStep_zero] | |
| have hg : gaussianRowComposition (r::rs) u = gaussianRowComposition rs u := by | |
| funext y | |
| change gaussianRowOperator r.1 r.2 (gaussianRowComposition rs u) y = _ | |
| rw [hv,gaussianRowOperator_zero] | |
| rw [hg] | |
| rw [β ih htail hz' x] | |
| exact (rowDerivativeRankMoment_below rs u s x (fun v hv => hs.trans_le (hr v hv))).symm | |
| Β· rw [ite_eq_right hs,ite_eq_right (not_lt.mpr ((le_of_not_gt hs).trans hst))] | |
| congr 1 | |
| exact funext (ih htail hz') | |
| lemma sphericalProfile_plateau_pointwise (q : SphericalProfile) {a b c : β} | |
| (ha : 0 β€ a) (hb : b β€ 1) | |
| (hc : βα΅ s βvolume.restrict (Set.Ioo a b), q.val s=c) : | |
| β s β Set.Ioo a b, q.val s=c := by | |
| intro s hs | |
| have hl : volume (Set.Ioo a s) β 0 := by | |
| rw [Real.volume_Ioo] | |
| exact ne_of_gt (ENNReal.ofReal_pos.mpr (sub_pos.mpr hs.1)) | |
| have hr : volume (Set.Ioo s b) β 0 := by | |
| rw [Real.volume_Ioo] | |
| exact ne_of_gt (ENNReal.ofReal_pos.mpr (sub_pos.mpr hs.2)) | |
| obtain β¨l,hlm,hleβ© := Measure.exists_mem_of_measure_ne_zero_of_ae hl | |
| (ae_mono (Measure.restrict_mono (Ioo_subset_Ioo_right hs.2.le) le_rfl) hc) | |
| obtain β¨r,hrm,hreβ© := Measure.exists_mem_of_measure_ne_zero_of_ae hr | |
| (ae_mono (Measure.restrict_mono (Ioo_subset_Ioo_left hs.1.le) le_rfl) hc) | |
| have hsl : s β Set.Icc (0:β) 1 := β¨ha.trans hs.1.le,hs.2.le.trans hbβ© | |
| have h1 := q.mono (show l β Set.Icc (0:β) 1 from β¨ha.trans hlm.1.le,hlm.2.le.trans hsl.2β©) hsl hlm.2.le | |
| have h2 := q.mono hsl (show r β Set.Icc (0:β) 1 from β¨hsl.1.trans hrm.1.le,hrm.2.le.trans hbβ©) hrm.1.le | |
| rw [hle] at h1 | |
| rw [hre] at h2 | |
| exact le_antisymm h2 h1 | |
| lemma rowGaussianBlocks_mem_index (ms : List β) (d : β β ββ₯0) (r : β Γ β) | |
| (hr : r β rowGaussianBlocks ms d) : | |
| β j, j < ms.length β§ r.1 = ms[j]! β§ r.2 = (d j:β) := by | |
| induction ms generalizing d with | |
| | nil => simp [rowGaussianBlocks] at hr | |
| | cons m ms ih => | |
| simp only [rowGaussianBlocks,List.mem_cons] at hr | |
| rcases hr with rfl | hr | |
| Β· exact β¨0,by simp,by simp,rflβ© | |
| Β· obtain β¨j,hj,h1,h2β© := ih _ hr | |
| exact β¨j+1,by simpa using Nat.succ_lt_succ hj,by simpa using h1,h2β© | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma rowGrid_derivative_plateau {u : β β β} {L H Q : β} (hu : RowBoundedTerminal u L H) | |
| (q : RowProfile Q) {a b c x y : β} (ha : 0 β€ a) (hb : b β€ 1) | |
| (hc : β s β Set.Ioo a b, q.1.val s=c) (hx : x β Set.Ioo a b) (hy : y β Set.Ioo a b) | |
| (hxy : x β€ y) : | |
| βαΆ n : β in atTop, (q.1.rowGrid q.2 n).derivative u x = (q.1.rowGrid q.2 n).derivative u y := by | |
| have hsmall : Tendsto (fun n : β => (1:β)/((n:β)+1)) atTop (π 0) := | |
| tendsto_const_nhds.div_atTop (tendsto_natCast_atTop_atTop.atTop_add tendsto_const_nhds) | |
| have hs := hsmall.eventually (gt_mem_nhds (sub_pos.mpr hx.1)) | |
| filter_upwards [hs] with n hn | |
| let P := q.1.rowGrid q.2 n | |
| have hx' : x β Set.Ico (0:β) 1 := β¨ha.trans hx.1.le,hx.2.trans_le hbβ© | |
| have hy' : y β Set.Ico (0:β) 1 := β¨ha.trans hy.1.le,hy.2.trans_le hbβ© | |
| rw [βrowFullBlocks_derivative hu P hx',βrowFullBlocks_derivative hu P hy'] | |
| apply rowRankDerivative_segment _ _ (rowRootResidual_sorted P.ranks P.increment P.root P.residual P.ordered P.valid) hxy | |
| intro r hr hxr hry | |
| simp only [List.mem_cons,List.mem_append,List.not_mem_nil,or_false] at hr | |
| rcases hr with rfl | hr | rfl | |
| Β· exact False.elim (not_lt.mpr hx'.1 hxr) | |
| Β· obtain β¨j,hj,h1,h2β© := rowGaussianBlocks_mem_index P.ranks P.increment r hr | |
| change j < (spinGridRanks n).length at hj | |
| rw [spinGridRanks_length] at hj | |
| change r.1 = (spinGridRanks n)[j]! at h1 | |
| rw [spinGridRanks_get n j hj] at h1 | |
| have hdiff : spinGridPoint n (j+1) = spinGridPoint n j+1/((n:β)+1) := by | |
| simp only [spinGridPoint,Nat.cast_add,Nat.cast_one] | |
| ring | |
| have hg1 : spinGridPoint n (j+1) β Set.Ioo a b := by | |
| rw [βh1] | |
| exact β¨hx.1.trans hxr,hry.trans_lt hy.2β© | |
| have hg0 : spinGridPoint n j β Set.Ioo a b := by | |
| constructor | |
| Β· rw [h1,hdiff] at hxr | |
| linarith | |
| Β· exact (spinGridPoint_mono n (Nat.le_succ j)).trans_lt hg1.2 | |
| rw [h2] | |
| change ((q.1.gridStep n).variance j:β)=0 | |
| rw [gridStep_variance q.1 n j hj,hc _ hg1,hc _ hg0,sub_self] | |
| Β· exact False.elim (not_le.mpr hy'.2 hry) | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma profileCompactFilter_pointwise (pn : β β SphericalProfile) (B : β) | |
| (hpn : β n s, s β Set.Icc 0 1 β (pn n).val s β€ B) : | |
| β (p : SphericalProfile) (l : Filter β), l.NeBot β§ l β€ atTop β§ | |
| (β s β Set.Icc 0 1, p.val s β€ B) β§ | |
| Tendsto (fun n => sphericalProfileDistance (pn n).val p.val) l (π 0) β§ | |
| (β s β Set.Icc 0 1, Tendsto (fun n => (pn n).val s) l (π (p.val s))) := by | |
| let c : β β β := fun s => max 0 (min s 1) | |
| have hc (s : β) : c s β Set.Icc 0 1 := | |
| β¨le_max_left _ _,max_le (by norm_num) (min_le_right _ _)β© | |
| have hce (s : β) (hs : s β Set.Icc 0 1) : c s = s := by | |
| simp only [c,min_eq_left hs.2,max_eq_right hs.1] | |
| let seq : β β (β β Set.Icc (0:β) B) := fun n s => β¨(pn n).val (c s), | |
| (pn n).nonneg (c s) (hc s),hpn n (c s) (hc s)β© | |
| let U := Ultrafilter.of (atTop : Filter β) | |
| obtain β¨f,hfβ© := exists_clusterPt_of_compactSpace (U.map seq : Filter (β β Set.Icc (0:β) B)) | |
| have hf' : Tendsto seq (U : Filter β) (π f) := (Ultrafilter.clusterPt_iff).mp hf | |
| have hfpoint (s : β) : Tendsto (fun n => (pn n).val (c s)) (U : Filter β) (π (f s:β)) := | |
| (continuous_subtype_val.tendsto (f s)).comp (((continuous_apply s).tendsto f).comp hf') | |
| have hpoint (s : β) (hs : s β Set.Icc 0 1) : | |
| Tendsto (fun n => (pn n).val s) (U : Filter β) (π (f s:β)) := by | |
| simpa only [hce s hs] using hfpoint s | |
| let p : SphericalProfile := | |
| { val := fun s => (f s:β) | |
| nonneg := fun s _ => (f s).property.1 | |
| mono := fun s hs t ht hst => le_of_tendsto_of_tendsto (hpoint s hs) (hpoint t ht) | |
| (Eventually.of_forall fun n => (pn n).mono hs ht hst) } | |
| have hp : β s β Set.Icc 0 1, p.val s β€ B := fun s _ => (f s).property.2 | |
| exact β¨p,(U:Filter β),inferInstance,Ultrafilter.of_le atTop,hp, | |
| profileDistance_tendsto_pointwise pn p B hpn hp hpoint,hpointβ© | |
| lemma sphericalProfileDistance_zero_ae (p q : SphericalProfile) | |
| (h : sphericalProfileDistance p.val q.val=0) : | |
| p.val =α΅[volume.restrict (Set.Icc (0:β) 1)] q.val := by | |
| have hi := (p.integrable.sub q.integrable).abs | |
| have he : β« s in Set.Ioc (0:β) 1, |p.val s-q.val s| = 0 := by | |
| simpa only [sphericalProfileDistance,intervalIntegral.integral_of_le (by norm_num : (0:β)β€1)] using h | |
| have hz := (integral_eq_zero_iff_of_nonneg (fun s => abs_nonneg (p.val s-q.val s)) hi.1).mp he | |
| rw [restrict_Ioc_eq_restrict_Icc] at hz | |
| filter_upwards [hz] with s hs | |
| exact sub_eq_zero.mp (abs_eq_zero.mp hs) | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| lemma rowGeneral_plateau {u : β β β} {L H Q : β} (hu : RowBoundedTerminal u L H) | |
| (E : RowExtensionData u L Q) (q : RowProfile Q) {a b c : β} | |
| (ha : 0 β€ a) (hab : a<b) (hb : bβ€1) | |
| (hc : βα΅ s βvolume.restrict (Set.Ioo a b), q.1.val s=c) : | |
| β d : β, βα΅ s βvolume.restrict (Set.Ioo a b), (E.derivative q).val s=d := by | |
| let P := q.1.rowGrid q.2 | |
| let dn := fun n => (P n).derivativeProfile hu | |
| have hbound : β n s, s β Set.Icc (0:β) 1 β (dn n).val s β€ L^2 := | |
| fun n s _ => ((P n).derivative_bounds hu s).2 | |
| obtain β¨p,l,hl,hla,hp,hlim,hpointβ© := profileCompactFilter_pointwise dn (L^2) hbound | |
| let : l.NeBot := hl | |
| have hlimE : Tendsto (fun n => sphericalProfileDistance (dn n).val (E.derivative q).val) l (π 0) := | |
| (E.finite_derivative_limit q P (rowGrid_distance_tendsto q.1 q.2)).mono_left hla | |
| have hzero : sphericalProfileDistance p.val (E.derivative q).val=0 := by | |
| have hh : Tendsto (fun _ : β => sphericalProfileDistance p.val (E.derivative q).val) l (π 0) := by | |
| apply squeeze_zero (fun _ => sphericalProfileDistance_nonneg p (E.derivative q)) | |
| (fun n => ?_) (show Tendsto (fun n => sphericalProfileDistance (dn n).val p.val+sphericalProfileDistance (dn n).val (E.derivative q).val) l (π 0) by simpa using hlim.add hlimE) | |
| simpa only [sphericalProfileDistance_comm p (dn n)] using sphericalProfileDistance_triangle p (dn n) (E.derivative q) | |
| exact tendsto_nhds_unique tendsto_const_nhds hh | |
| have hpE := sphericalProfileDistance_zero_ae p (E.derivative q) hzero | |
| have hc' := sphericalProfile_plateau_pointwise q.1 ha hb hc | |
| have hmem (s : β) (hs : s β Set.Ioo a b) : s β Set.Icc (0:β) 1 := β¨ha.trans hs.1.le,hs.2.le.trans hbβ© | |
| have hpeq (x y : β) (hx : x β Set.Ioo a b) (hy : y β Set.Ioo a b) (hxy : xβ€y) : p.val x=p.val y := by | |
| have he : βαΆ n in l, (dn n).val x=(dn n).val y := | |
| hla (rowGrid_derivative_plateau hu q ha hb hc' hx hy hxy) | |
| exact tendsto_nhds_unique (hpoint x (hmem x hx)) ((hpoint y (hmem y hy)).congr' (he.mono (fun _ h => h.symm))) | |
| have hm : (a+b)/2 β Set.Ioo a b := β¨by linarith,by linarithβ© | |
| refine β¨p.val ((a+b)/2),?_β© | |
| have hpE' : p.val =α΅[volume.restrict (Set.Ioo a b)] (E.derivative q).val := | |
| ae_mono (Measure.restrict_mono (fun s hs => hmem s hs) le_rfl) hpE | |
| filter_upwards [hpE',ae_restrict_mem measurableSet_Ioo] with s hs hsm | |
| rw [βhs] | |
| rcases le_total s ((a+b)/2) with hle | hle | |
| Β· exact hpeq s ((a+b)/2) hsm hm hle | |
| Β· exact (hpeq ((a+b)/2) s hm hsm hle).symm | |
| end MicroscopicJamming | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped Topology NNReal ENNReal BigOperators | |
| namespace MicroscopicJamming | |
| theorem rowGeneralInterpolation : RowGeneralInterpolationStatement := by | |
| intro u L H hu hL hH hb Q | |
| obtain β¨Eβ© := rowExtension_exists hu hL hH hb Q | |
| refine β¨E.value,E.derivative,E.bound,?_,?_,?_,?_,?_β© | |
| Β· intro q P hP | |
| exact β¨E.finite_value_limit q P hP,E.finite_derivative_limit q P hPβ© | |
| Β· intro q qn hqn | |
| exact β¨E.value_continuous q qn hqn,E.derivative_continuous q qn hqnβ© | |
| Β· intro q r t ht | |
| exact rowGeneral_hasDerivWithinAt hu hL hH hb E q r ht | |
| Β· exact rowGeneral_lipschitz hu hL hH hb E | |
| Β· intro q a b c ha hab hb' | |
| exact rowGeneral_plateau (rowTerminal_of_C2 hu hL hH hb) E q ha hab hb' | |
| end MicroscopicJamming | |
| end | |
| end OAI | |