lemmaradialDensityWeight_one_on_inner {a x : Cover} {r s : ℝ}
(hr : 0≤ r) (hrs : r < s) (hx : x ∈Metric.closedBall a r) :
radialDensityWeight a s (s^2-r^2) x = 1:=by
proof · 4
lines
havehn : ‖x-a‖ ≤ r :=by simpa only [Metric.mem_closedBall,dist_eq_norm] using hx
apply Real.smoothTransition.one_of_one_le
apply (one_le_div (bynlinarith : 0 < s^2-r^2)).mpr
nlinarith [norm_nonneg (x-a)]
lemmadivergence_inner_radialDensityField {a x : Cover} {r s : ℝ}
(hr : 0 < r) (hrs : r < s) (hx : x ∈Metric.ball a r) :
divergence (radialDensityField a s (s^2-r^2)) x = 3:=by
proof · 5
lines
havehe : radialDensityField a s (s^2-r^2) =ᶠ[𝓝 x] (funy : Cover↦ y-a) :=by
filter_upwards [Metric.isOpen_ball.mem_nhds hx] with y hy
rw [radialDensityField,radialDensityWeight_one_on_inner hr.le hrs (Metric.ball_subset_closedBall hy),one_smul]
simp only [divergence,he.fderiv_eq]
exact divergence_sub_const a x
have hf := axialProjection.hasFDerivAt.comp x ((hasFDerivAt_id x).sub_const cubeCenter)
change HasFDerivAt (funy : Cover↦ axialProjection (y-cubeCenter)) axialProjection x at hf
simp only [divergence,hf.fderiv]
simp only [Fin.sum_univ_succ,axialProjection_zero,axialProjection_succ]
norm_num [PiLp.single_apply]
lemmatubeCalibration_periodic_divergence (b : ContDiffBump (1/2 : ℝ)) (hb : b.rOut < 1/2)
{r s : ℝ} (hr : 0 < r) (hrs : r < s) (hs : s < 1/2) (x : Cover) (hx : x ∈ coverTube r) :
divergence (latticePeriodize (tubeCalibration b r s)) x = (2/s)*b (x 0) :=by
proof · 5
lines
have hm := coverTube_subset_cube (hrs.le.trans hs.le) hx
have he := latticePeriodize_eventuallyEq (tubeCalibration_compact b hr hrs)
(tubeCalibration_interior b hb hr hrs hs) (fun i ↦ ⟨(hm i).1,(hm i).2.le⟩)
simp only [divergence,he.fderiv_eq]
exact tubeCalibration_divergence_inner b hr hrs x hx
lemmaintegral_axialScalar_coverTube {f : ℝ→ℝ} (hf : Continuous f) {r : ℝ} (hr : 0≤ r) :
(∫ x in coverTube r, f (x 0)) = (∫ t inIco (0 : ℝ) 1, f t)*(Real.pi*r^2) :=by
proof · 18
lines
letg : ℝ×Plane→ℝ:=fun p ↦ f p.1havehint : IntegrableOn (funx : Cover↦ f (x 0)) (coverTube r) :=
(((hf.comp (EuclideanSpace.proj 0 : Cover→L[ℝ] ℝ).continuous).continuousOn.integrableOn_compact
(isCompact_closure_coverTube r))).mono_set subset_closure
havehi : IntegrableOn g (Ico (0 : ℝ) 1×ˢ Metric.ball discCenter r) volume :=by
rw [← tubeSplit_measurePreserving.integrableOn_comp_preimage tubeSplit.measurableEmbedding]
simpa only [g,Function.comp_def,tubeSplit_apply,coverTube] using hint
have he := tubeSplit_measurePreserving.setIntegral_preimage_emb tubeSplit.measurableEmbedding
g (Ico (0 : ℝ) 1×ˢ Metric.ball discCenter r)
change (∫ x in coverTube r, f (x 0)) = _ at he
rw [he,Measure.volume_eq_prod,←Measure.prod_restrict]
rw [IntegrableOn,Measure.volume_eq_prod,←Measure.prod_restrict] at hi
rw [integral_prod g hi]
simp only [g,integral_const,smul_eq_mul,measureReal_def,Measure.restrict_apply_univ,
EuclideanSpace.volume_ball_fin_two,ENNReal.toReal_mul,ENNReal.toReal_pow,
ENNReal.toReal_ofReal hr,ENNReal.toReal_ofReal Real.pi_pos.le,
integral_const_mul]
ring
lemmatube_calibration_flux_le (b : ContDiffBump (1/2 : ℝ)) (hb : b.rOut < 1/2)
{r s : ℝ} (hr : 0 < r) (hrs : r < s) (hs : s < 1/2) :
ENNReal.ofReal ((2/s)*((∫ t inIco (0 : ℝ) 1, b t)*(Real.pi*r^2))) ≤ perimeter (cubeTube r) :=by
proof · 8
lines
have hp := admissible_latticePeriodize (tubeCalibration_contDiff b r s)
(tubeCalibration_compact b hr hrs) (tubeCalibration_interior b hb hr hrs hs) (tubeCalibration_norm b hr hrs)
havehh : ENNReal.ofReal (∫ x in fundamentalCube ∩ quotientMap ⁻¹' cubeTube r,
divergence (latticePeriodize (tubeCalibration b r s)) x) ≤ perimeter (cubeTube r) :=
le_iSup_of_le _ (le_iSup_of_le hp le_rfl)
rw [cubeTube_lift (hrs.le.trans hs.le)] at hh
rwa [setIntegral_congr_fun (measurableSet_coverTube r) (tubeCalibration_periodic_divergence b hb hr hrs hs),
integral_const_mul,integral_axialScalar_coverTube b.continuous hr.le] at hh
lemmaaxialExhaustionBump_integral {a : ℝ} (ha : 0 < a) (ha' : a < 1/2) :
2*a ≤∫ t inIco (0 : ℝ) 1, axialExhaustionBump a ha ha' t :=by
proof · 17
lines
let b := axialExhaustionBump a ha ha'
havehi : IntegrableOn (b : ℝ→ℝ) (Ico01) :=
(b.continuous.continuousOn.integrableOn_compact isCompact_Icc).mono_set Ico_subset_Icc_selfhavehsub : Metric.closedBall (1/2 : ℝ) a ⊆Ico01:=by
intro t ht
havehh : |t-1/2| ≤ a :=by simpa only [Metric.mem_closedBall,Real.dist_eq] using ht
rw [abs_le] at hh
constructor <;> linarith
have hlo := setIntegral_mono_set hi (Eventually.of_forall fun _ ↦ b.nonneg)
(Eventually.of_forall hsub)
havehe : (∫ t inMetric.closedBall (1/2 : ℝ) a, b t) = 2*a :=byhave hpoint (t : ℝ) (ht : t ∈Metric.closedBall (1/2 : ℝ) a) : b t = 1:=
b.one_of_mem_closedBall ht
rw [setIntegral_congr_fun Metric.isClosed_closedBall.measurableSet hpoint,integral_const]
simp only [smul_eq_mul,mul_one,measureReal_def,Measure.restrict_apply_univ,
Real.volume_closedBall,ENNReal.toReal_ofReal (bypositivity : 0≤2*a)]
exact he ▸ hlo
vadd n x := x+latticeVector n
zero_vadd x :=by change x+latticeVector 0=x; ext i; simp [latticeVector]
add_vadd n m x :=by
change x+latticeVector (n+m)=(x+latticeVector m)+latticeVector n
ext i; simp [latticeVector]; ring
lemmaperiodicCoordinateRegion_lift (i : Fin3) {f : Cover→ℝ}
(hp : ∀ n x,f (x+latticeVector n)=f x) (t : ℝ) (E : SetTorus) :
quotientMap ⁻¹' periodicCoordinateRegion i f t E=coordinateMove i f t '' (quotientMap ⁻¹' E) :=by
proof · 18
lines
ext x
havehind : ∀ n y, (y+latticeVector n∈coordinateMove i f t '' (quotientMap ⁻¹' E)) ↔
y∈coordinateMove i f t '' (quotientMap ⁻¹' E) :=by
intro n y
constructor
· rintro ⟨z,hz,he⟩
refine ⟨z+latticeVector (-n),?_,?_⟩
· change quotientMap (z+latticeVector (-n))∈E
simpa only [mem_preimage,quotientMap_add,quotientMap_latticeVector,add_zero] using hz
· rw [coordinateMove_periodic i hp,he]
ext j; simp [latticeVector]
· rintro ⟨z,hz,rfl⟩
refine ⟨z+latticeVector n,?_,coordinateMove_periodic i hp t n z⟩
simpa only [mem_preimage,quotientMap_add,quotientMap_latticeVector,add_zero] using hz
change representative (quotientMap x)∈coordinateMove i f t '' (quotientMap ⁻¹' E) ↔
x∈coordinateMove i f t '' (quotientMap ⁻¹' E)
obtain ⟨n,hn⟩ := same_quotient_lattice (quotientMap_representative (quotientMap x))
rw [hn,hind]
lemmaintegral_periodicCoordinateRegion (i : Fin3) {f : Cover→ℝ}
(hf : Differentiableℝ f) (hp : ∀ n x,f (x+latticeVector n)=f x)
{M : NNReal} (hM : ∀ x,‖fderiv ℝ f x‖₊≤M) {t : ℝ} (ht : |t| *M<1)
{E : SetTorus} (hE : MeasurableSetE) {g : Cover→ℝ}
(hg : ∀ n x,g (x+latticeVector n)=g x) :
(∫ x in fundamentalCube∩quotientMap ⁻¹' periodicCoordinateRegion i f t E,g x)=
∫ x in fundamentalCube∩quotientMap ⁻¹' E,
coordinateJacobian i f t x*g (coordinateMove i f t x) :=by
proof · 33
lines
letS:= quotientMap ⁻¹' periodicCoordinateRegion i f t EhavehS : MeasurableSetS:= measurable_quotientMap (periodicCoordinateRegion_measurable i hf hM ht hE)
havehsp : ∀ n x,S.indicator g (x+latticeVector n)=S.indicator g x :=by
intro n x
by_cases hx : x∈S
· havehx' : x+latticeVector n∈S:=by
simpa only [S,mem_preimage,quotientMap_add,quotientMap_latticeVector,add_zero] using hx
simp only [indicator_of_mem hx,indicator_of_mem hx',hg]
· havehx' : x+latticeVector n∉S:=by
simpa only [S,mem_preimage,quotientMap_add,quotientMap_latticeVector,add_zero] using hx
simp only [indicator_of_notMem hx,indicator_of_notMem hx']
havehc : Continuous (coordinateMove i f t) := continuous_id.add
((continuous_const.mul hf.continuous).smul continuous_const)
have he := integral_periodic_image_cube hc
⟨coordinateMove_injective i hf hM ht,coordinateMove_surjective i hf hM ht⟩
(coordinateMove_periodic i hp t) hsp
rw [integral_indicator hS,integral_indicator hS] at he
simp only [Measure.restrict_restrict hS,inter_comm S] at he
change (∫ x in fundamentalCube∩S,g x)=_
rw [he]
havehim : coordinateMove i f t '' fundamentalCube∩S=
coordinateMove i f t '' (fundamentalCube∩quotientMap ⁻¹' E) :=by
dsimp only [S]
rw [periodicCoordinateRegion_lift i hp]
exact (Set.image_inter (coordinateMove_injective i hf hM ht)).symm
rw [him,integral_image_eq_integral_abs_det_fderiv_smul volume
(measurableSet_fundamentalCube.inter (measurable_quotientMap hE))
(fun x _ ↦ (coordinateMove_hasFDerivAt i (hf x) t).hasFDerivWithinAt)
(coordinateMove_injective i hf hM ht).injOn]
apply integral_congr_ae
filter_upwards [] with x
rw [coordinateMoveDeriv_det,abs_of_pos (coordinateJacobian_pos i
(fun y ↦by exact_mod_cast hM y) ht x),smul_eq_mul]
lemmaperimeter_periodicCoordinateRegion_le (i : Fin3) {f : Cover→ℝ}
(hf : ContDiffℝ (⊤ : ℕ∞) f)
(hp : ∀ n x, f (x + latticeVector n) = f x)
{M : NNReal} (hM : ∀ x, ‖fderiv ℝ f x‖₊ ≤M)
{t : ℝ} (ht : |t| * M < 1) {E : SetTorus} (hE : MeasurableSetE)
(hP : perimeter E≠ ⊤) :
perimeter (periodicCoordinateRegion i f t E) ≤ENNReal.ofReal (1 + 2 * |t| * M) * perimeter E:=by
proof · 16
lines
have hfd := hf.differentiable (by simp)
havehC : 0 < 1 + 2 * |t| * M:=by positivity
havehMr : ∀ x, ‖fderiv ℝ f x‖ ≤ (M : ℝ) :=fun x ↦by exact_mod_cast hM x
unfold perimeter at ⊢
refine iSup_le funG↦ iSup_le fun hG ↦ ?_
rw [integral_periodicCoordinateRegion i hfd hp hM ht hE (divergence_periodic hG.2.1)]
have hh := abs_flux_le_mul_perimeter hP
(coordinatePullback_contDiff i hf t hG.1) (coordinatePullback_periodic i hp t hG.2.1)
hC (coordinatePullback_norm_le i M.coe_nonneg hMr t hG.2.2)
simp_rw [coordinatePullback_divergence i hf t hG.1] at hh
calc
_ ≤ENNReal.ofReal ((1 + 2 * |t| * M) * (perimeter E).toReal) :=ENNReal.ofReal_le_ofReal ((le_abs_self _).trans hh)
_ = _ :=by
rw [ENNReal.ofReal_mul hC.le, ENNReal.ofReal_toReal hP]
rfl
induction l with
| nil => exact contDiff_const
| cons p l ih =>
rcases p with ⟨a,t⟩
exact (coordinateJacobian_contDiff a.coordinate a.smooth t).mul
(ih.comp (coordinateMove_contDiff a.coordinate a.smooth t))
lemmachainPullback_periodic (l : VariationChain) {F : Cover→Cover}
(hF : ∀ n x,F (x+latticeVector n)=F x) :
∀ n x,chainPullback l F (x+latticeVector n)=chainPullback l F x :=by
proof · 3
lines
induction l with
| nil => exact hF
| cons p l ih => rcases p with ⟨a,t⟩; exact coordinatePullback_periodic a.coordinate a.periodic t ih
lemmachainPullback_norm (l : VariationChain) {F : Cover→Cover} (hF : ∀ x,‖F x‖≤1) :
∀ x,‖chainPullback l F x‖≤chainBound l :=by
proof · 6
lines
induction l with
| nil => exact hF
| cons p l ih =>
rcases p with ⟨a,t⟩
exact coordinatePullback_norm_le_mul a.coordinate a.bound.coe_nonneg
(fun x ↦by exact_mod_cast a.derivative_bound x) t (chainBound_pos l) ih
lemmachainPullback_divergence (l : VariationChain) {F : Cover→Cover}
(hF : ContDiffℝ (⊤ : ℕ∞) F) (x : Cover) :
divergence (chainPullback l F) x = chainJacobian l x * divergence F (chainMove l x) :=by
proof · 6
lines
induction l generalizing x with
| nil => simp [chainPullback,chainJacobian,chainMove]
| cons p l ih =>
rcases p with ⟨a,t⟩
rw [chainPullback,coordinatePullback_divergence a.coordinate a.smooth t (chainPullback_contDiff l hF),ih]
simp only [chainJacobian,chainMove,mul_assoc]
induction l generalizing Ewith
| nil => exact hE
| cons p l ih =>
rcases p with ⟨a,t⟩
exact ih (fun p hp ↦ hl p (by simp [hp]))
(periodicCoordinateRegion_measurable a.coordinate (a.smooth.differentiable (by simp))
a.derivative_bound (hl (a,t) (by simp)) hE)
induction l generalizing Ewith
| nil => exact ⟨hE.nullMeasurableSet,hfin⟩
| cons p l ih =>
rcases p with ⟨a,t⟩
have ht := hl (a,t) (by simp)
exact ih (fun p hp ↦ hl p (by simp [hp]))
(periodicCoordinateRegion_measurable a.coordinate (a.smooth.differentiable (by simp)) a.derivative_bound ht hE)
(finitePerimeter_periodicCoordinateRegion a.coordinate a.smooth a.periodic a.derivative_bound ht hE hfin.ne).2
lemmachainMove_periodic (l : VariationChain) (n : Fin3→ℤ) (x : Cover) :
chainMove l (x+latticeVector n)=chainMove l x+latticeVector n :=by
proof · 6
lines
induction l generalizing x with
| nil => rfl
| cons p l ih =>
rcases p with ⟨a,t⟩
rw [chainMove,coordinateMove_periodic a.coordinate a.periodic,ih]
rfl
lemmachainJacobian_periodic (l : VariationChain) (n : Fin3→ℤ) (x : Cover) :
chainJacobian l (x+latticeVector n)=chainJacobian l x :=by
proof · 6
lines
induction l generalizing x with
| nil => rfl
| cons p l ih =>
rcases p with ⟨a,t⟩
simp only [chainJacobian,coordinateMove_periodic a.coordinate a.periodic,ih,
coordinateJacobian,fderiv_periodic a.periodic]
lemmaintegral_chainRegion {l : VariationChain} (hl : ChainValid l)
{E : SetTorus} (hE : MeasurableSetE) {g : Cover→ℝ}
(hg : ∀ n x,g (x+latticeVector n)=g x) :
(∫ x in fundamentalCube∩quotientMap ⁻¹' chainRegion l E,g x)=
∫ x in fundamentalCube∩quotientMap ⁻¹' E,chainJacobian l x*g (chainMove l x) :=by
proof · 11
lines
induction l generalizing Ewith
| nil => simp [chainRegion,chainJacobian,chainMove]
| cons p l ih =>
rcases p with ⟨a,t⟩
have ht := hl (a,t) (by simp)
rw [chainRegion,ih (fun p hp ↦ hl p (by simp [hp]))
(periodicCoordinateRegion_measurable a.coordinate (a.smooth.differentiable (by simp)) a.derivative_bound ht hE),
integral_periodicCoordinateRegion a.coordinate (a.smooth.differentiable (by simp))
a.periodic a.derivative_bound ht hE (fun n x ↦by
rw [chainJacobian_periodic,chainMove_periodic,hg])]
simp only [chainJacobian,chainMove,mul_assoc]
induction l with
| nil => exact contDiff_const
| cons p l ih =>
rcases p with ⟨a,t⟩
exact (coordinateJacobian_contDiff a.coordinate a.smooth t).mul
(ih.comp (coordinateMove_contDiff a.coordinate a.smooth t))