havehc:Continuous (funs:ℝ=>fderiv ℝA (x,s)):=
(hA.continuous_fderiv (by norm_num)).comp (continuous_const.prodMk continuous_id)
have hi (s:ℝ) (v:E):fderiv ℝ (funy:E=>A (y,s)) x v=fderiv ℝA (x,s) (v,0):=by
rw [(sliceLeft_hasFDerivAt ((hA.differentiable (by norm_num)) (x,s))).fderiv]
simp
simp only [divergence,hi]
exact continuous_finsetSum _ (fun i _=>continuous_const.inner (hc.clm_apply continuous_const))
Integrating the nonlinear bulk inequality gives exactly the flux difference.
This is FTC and parameter differentiation, not a postulated graph comparison.
lemmagraph_potential_identity {A:E×ℝ→E} (hA:ContDiffℝ1A)
{u v:E→ℝ} {x:E} (hu:DifferentiableAtℝ u x) (hv:DifferentiableAtℝ v x) :
divergence (graphPotential A u v) x=
2*(∫s in u x..v x,divergence (funy:E=>A (y,s)) x)+
2*inner ℝ (A (x,v x)) (gradient v x)-2*inner ℝ (A (x,u x)) (gradient u x) :=by
proof · 12
lines
have hd(w:E→ℝ)(hw:DifferentiableAtℝ w x):
DifferentiableAtℝ (funy:E=>heightPrimitive A (y,w y)) x:=DifferentiableAt.comp (f:=funy:E=>(y,w y)) (g:=heightPrimitive A) x
(heightPrimitive_differentiable hA (x,w x)) (differentiableAt_id.prodMk hw)
unfold graphPotential
rw [divergence_smul_sub (hd v hv) (hd u hu),
divergence_graph_primitive hA hv,divergence_graph_primitive hA hu]
have hi:=intervalIntegral.integral_interval_sub_left (μ:=volume)
((continuous_spatial_divergence hA x).intervalIntegrable 0 (v x))
((continuous_spatial_divergence hA x).intervalIntegrable 0 (u x))
rw [←hi]
ring
lemmagraph_potential_bulk_bound {A:E×ℝ→E} (hA:ContDiffℝ1A)
{u v:E→ℝ} {x:E} (hu:DifferentiableAtℝ u x) (hv:DifferentiableAtℝ v x)
(huv:u x≤v x)
(hbulk:∀s∈Icc (u x) (v x),divergence (funy:E=>A (y,s)) x+
inner ℝ (A (x,s)) (deriv (funt:ℝ=>A (x,t)) s)≤0) :
divergence (graphPotential A u v) x≤‖gradient v x‖^2+
‖A (x,u x)‖^2-2*inner ℝ (A (x,u x)) (gradient u x) :=by
proof · 7
lines
have hi:=integrated_bulk hA x huv hbulk
havehs:0≤‖gradient v x-A (x,v x)‖^2:=sq_nonneg _
rw [norm_sub_sq_real] at hs
havehe:inner ℝ (gradient v x) (A (x,v x))=inner ℝ (A (x,v x)) (gradient v x):=real_inner_comm _ _
rw [he] at hs
rw [graph_potential_identity hA hu hv]
linarith