Buckets:
| import Mathlib | |
| import OAI.Analysis.AffineBernstein.GraphPatchArea | |
| import OAI.Analysis.AffineBernstein.SupportGeometry | |
| namespace OAI | |
| noncomputable section | |
| namespace AffineBernstein | |
| open Set MeasureTheory | |
| open scoped BigOperators ContDiff ENNReal | |
| open Filter | |
| open scoped Topology | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] | |
| /- A genuine affine slice of the original epigraph, in arbitrary transverse | |
| coordinates. -/ | |
| def affineEpigraphFiber {n : ℕ} (Ω : Set (Space n)) (u : Space n → ℝ) | |
| (x : Space n) (z : ℝ) (A : E →L[ℝ] Space n) (b : E →L[ℝ] ℝ) : Set E := | |
| {y | x + A y ∈ Ω ∧ u (x + A y) ≤ z + b y} | |
| /- A compact nonempty affine epigraph fiber has no vertical direction. -/ | |
| theorem affineEpigraphFiber_no_vertical {n : ℕ} {Ω : Set (Space n)} | |
| {u : Space n → ℝ} {x : Space n} {z : ℝ} {A : E →L[ℝ] Space n} | |
| {b : E →L[ℝ] ℝ} (hK : IsCompact (affineEpigraphFiber Ω u x z A b)) | |
| (hne : (affineEpigraphFiber Ω u x z A b).Nonempty) | |
| {v : E} (hv : A v = 0) : b v = 0 := by | |
| by_contra hb | |
| obtain ⟨y₀, hy₀⟩ := hne | |
| obtain ⟨M, hM⟩ := (hK.image b.continuous).bddAbove | |
| let r := max M (u (x + A y₀) - z) + 1 | |
| let t := (r - b y₀) / b v | |
| have hbase : x + A (y₀ + t • v) = x + A y₀ := by simp [hv] | |
| have hheight : b (y₀ + t • v) = r := by | |
| simp only [map_add, map_smul, smul_eq_mul, t] | |
| field_simp | |
| ring | |
| have hy : y₀ + t • v ∈ affineEpigraphFiber Ω u x z A b := by | |
| refine ⟨by rw [hbase]; exact hy₀.1, ?_⟩ | |
| rw [hbase, hheight] | |
| have hh := le_max_right M (u (x + A y₀) - z) | |
| dsimp [r] | |
| linarith | |
| have hh := hM (show b (y₀ + t • v) ∈ b '' affineEpigraphFiber Ω u x z A b from | |
| ⟨_, hy, rfl⟩) | |
| rw [hheight] at hh | |
| have hh' := le_max_left M (u (x + A y₀) - z) | |
| dsimp [r] at hh | |
| linarith | |
| /- For an affine coordinate isomorphism compact fibers force injectivity of | |
| its horizontal linear part. -/ | |
| theorem affineEpigraphFiber_injective {n : ℕ} {Ω : Set (Space n)} | |
| {u : Space n → ℝ} {x : Space n} {z : ℝ} {A : E →L[ℝ] Space n} | |
| {b : E →L[ℝ] ℝ} (hK : IsCompact (affineEpigraphFiber Ω u x z A b)) | |
| (hne : (affineEpigraphFiber Ω u x z A b).Nonempty) | |
| (hi : Function.Injective (fun y => (A y, b y))) : Function.Injective A := by | |
| intro v w hvw | |
| have hav : A (v - w) = 0 := by simpa [map_sub] using sub_eq_zero.mpr hvw | |
| have hb := affineEpigraphFiber_no_vertical hK hne hav | |
| have hbw : b v = b w := sub_eq_zero.mp (by simpa [map_sub] using hb) | |
| exact hi (Prod.ext hvw hbw) | |
| /- Chain rule for the actual second differential of an affine epigraph slice. -/ | |
| theorem affineSlice_second {n : ℕ} {u : Space n → ℝ} {x : Space n} {z : ℝ} | |
| {A : E →L[ℝ] Space n} {b : E →L[ℝ] ℝ} {y : E} | |
| (hu : ContDiffAt ℝ ∞ u (x + A y)) (v w : E) : | |
| fderiv ℝ (fderiv ℝ (fun q => u (x + A q) - (z + b q))) y v w = | |
| fderiv ℝ (fderiv ℝ u) (x + A y) (A v) (A w) := by | |
| have he : fderiv ℝ (fun q => u (x + A q) - (z + b q)) =ᶠ[𝓝 y] | |
| (fun q => (fderiv ℝ u (x + A q)).comp A - b) := by | |
| have hne : ∀ᶠ q in 𝓝 y, DifferentiableAt ℝ u (x + A q) := by | |
| apply (continuous_const.add A.continuous).continuousAt.eventually | |
| have hh : ∀ᶠ p in 𝓝 (x + A y), ContDiffAt ℝ 1 u p := | |
| (hu.of_le (by simp)).eventually (by simp) | |
| exact hh.mono (fun p hp => hp.differentiableAt (by simp)) | |
| filter_upwards [hne] with q hq | |
| exact ((hq.hasFDerivAt.comp q (A.hasFDerivAt.const_add x)).sub | |
| (b.hasFDerivAt.const_add z)).fderiv | |
| rw [he.fderiv_eq] | |
| have hd := ((hu.fderiv_right (m := ∞) (by simp)).differentiableAt (by simp)).hasFDerivAt | |
| have hc := (hd.comp y (A.hasFDerivAt.const_add x)).clm_comp (hasFDerivAt_const A y) | |
| have heq := (hc.sub_const b).fderiv | |
| simp only [Function.comp_def] at heq | |
| rw [heq] | |
| simp | |
| /- An interior point of a convex sublevel is a strict sublevel point whenever | |
| its actual Hessian is positive definite. -/ | |
| theorem sublevel_interior_strict [Nontrivial E] {W : Set E} {F : E → ℝ} | |
| (hcv : ConvexOn ℝ W F) {z : E} | |
| (hz : z ∈ interior {y | y ∈ W ∧ F y ≤ 0}) | |
| (hd : DifferentiableAt ℝ F z) | |
| (hH : ∀ v : E, v ≠ 0 → 0 < fderiv ℝ (fderiv ℝ F) z v v) : F z < 0 := by | |
| have hzK := interior_subset hz | |
| by_contra hn | |
| have hz0 : F z = 0 := le_antisymm hzK.2 (le_of_not_gt hn) | |
| have hnK : {y | y ∈ W ∧ F y ≤ 0} ∈ 𝓝 z := mem_interior_iff_mem_nhds.mp hz | |
| have hm : IsLocalMax F z := by | |
| filter_upwards [hnK] with y hy | |
| simpa [hz0] using hy.2 | |
| have hdz := hm.fderiv_eq_zero | |
| have he : F =ᶠ[𝓝 z] (fun _ => (0 : ℝ)) := by | |
| filter_upwards [hnK] with y hy | |
| have hh := convex_first_order hcv hzK.1 hy.1 hd | |
| simp only [hdz, zero_apply, hz0, sub_zero] at hh | |
| exact le_antisymm hy.2 hh | |
| obtain ⟨v, hv⟩ := exists_ne (0 : E) | |
| have hh := hH v hv | |
| rw [he.fderiv.fderiv_eq] at hh | |
| simp at hh | |
| /- Convexity survives the actual affine slice and subtraction of its height. -/ | |
| theorem convexOn_affineSlice {n : ℕ} {Ω : Set (Space n)} {u : Space n → ℝ} | |
| (hcv : ConvexOn ℝ Ω u) (x : Space n) (z : ℝ) | |
| (A : E →L[ℝ] Space n) (b : E →L[ℝ] ℝ) : | |
| ConvexOn ℝ {y | x + A y ∈ Ω} (fun y => u (x + A y) - (z + b y)) := by | |
| let g : E →ᵃ[ℝ] Space n := | |
| { toFun := fun y => x + A y | |
| linear := A.toLinearMap | |
| map_vadd' := by | |
| intro v p | |
| change x + A (p + v) = A p + (x + A v) | |
| rw [map_add] | |
| abel } | |
| have hc := hcv.comp_affineMap g | |
| have hb := (b.toLinearMap.concaveOn hc.1).add_const z | |
| have hh := hc.sub hb | |
| change ConvexOn ℝ {y | x + A y ∈ Ω} (fun y => u (x + A y) - (b y + z)) at hh | |
| simpa only [add_comm (b _) z] using hh | |
| variable {S : Type*} [NormedAddCommGroup S] [NormedSpace ℝ S] | |
| /- The literal inverse image of the original epigraph under affine coordinates. -/ | |
| def affineEpigraphPullback {n : ℕ} (Ω : Set (Space n)) (u : Space n → ℝ) | |
| (a : Space n × ℝ) (L : (S × E) ≃L[ℝ] (Space n × ℝ)) : Set (S × E) := | |
| {p | (a + L p).1 ∈ Ω ∧ u (a + L p).1 ≤ (a + L p).2} | |
| def affineFiberHorizontal {n : ℕ} (L : (S × E) ≃L[ℝ] (Space n × ℝ)) : E →L[ℝ] Space n := | |
| (ContinuousLinearMap.fst ℝ (Space n) ℝ).comp | |
| (L.toContinuousLinearMap.comp (ContinuousLinearMap.inr ℝ S E)) | |
| def affineFiberHeight {n : ℕ} (L : (S × E) ≃L[ℝ] (Space n × ℝ)) : E →L[ℝ] ℝ := | |
| (ContinuousLinearMap.snd ℝ (Space n) ℝ).comp | |
| (L.toContinuousLinearMap.comp (ContinuousLinearMap.inr ℝ S E)) | |
| theorem affine_coordinates_split {n : ℕ} (a : Space n × ℝ) | |
| (L : (S × E) ≃L[ℝ] (Space n × ℝ)) (s : S) (y : E) : | |
| a + L (s, y) = ((a + L (s, 0)).1 + affineFiberHorizontal L y, | |
| (a + L (s, 0)).2 + affineFiberHeight L y) := by | |
| have hh : L (s, y) = L (s, 0) + L (0, y) := by rw [← map_add]; simp | |
| rw [hh] | |
| ext <;> simp [affineFiberHorizontal, affineFiberHeight, add_assoc] | |
| theorem affineEpigraphPullback_fiber {n : ℕ} (Ω : Set (Space n)) (u : Space n → ℝ) | |
| (a : Space n × ℝ) (L : (S × E) ≃L[ℝ] (Space n × ℝ)) (s : S) : | |
| {y | (s, y) ∈ affineEpigraphPullback Ω u a L} = | |
| affineEpigraphFiber Ω u (a + L (s, 0)).1 (a + L (s, 0)).2 | |
| (affineFiberHorizontal L) (affineFiberHeight L) := by | |
| ext y | |
| change ((a + L (s, y)).1 ∈ Ω ∧ u (a + L (s, y)).1 ≤ (a + L (s, y)).2) ↔ _ | |
| rw [affine_coordinates_split a L s y] | |
| rfl | |
| theorem affineFiberHorizontal_injective {n : ℕ} {Ω : Set (Space n)} | |
| {u : Space n → ℝ} {a : Space n × ℝ} {L : (S × E) ≃L[ℝ] (Space n × ℝ)} {s : S} | |
| (hK : IsCompact {y | (s, y) ∈ affineEpigraphPullback Ω u a L}) | |
| (hne : {y | (s, y) ∈ affineEpigraphPullback Ω u a L}.Nonempty) : | |
| Function.Injective (affineFiberHorizontal L) := by | |
| rw [affineEpigraphPullback_fiber] at hK hne | |
| apply affineEpigraphFiber_injective hK hne | |
| intro v w hvw | |
| have hh : L (0, v) = L (0, w) := hvw | |
| exact congrArg Prod.snd (L.injective hh) | |
| variable [CompleteSpace S] | |
| /- The principal support-coordinate regularity assertion in tubes.tex:39–60, | |
| for actual affine images of the standing epigraph, not abstract smooth bodies. | |
| The transverse dimension is nonzero, as in the manuscript (m=n+1-k≥1). -/ | |
| theorem affineEpigraph_support_smooth [FiniteDimensional ℝ E] [Nontrivial E] | |
| {n : ℕ} {Ω : Set (Space n)} (hΩ : IsOpen Ω) (hcv : Convex ℝ Ω) | |
| {u : Space n → ℝ} (hu : ContDiffOn ℝ ∞ u Ω) | |
| (hp : ∀ x ∈ Ω, (hessian u x).PosDef) | |
| (a : Space n × ℝ) (L : (S × E) ≃L[ℝ] (Space n × ℝ)) | |
| {B : Set S} (hB : IsOpen B) | |
| (hK : ∀ s ∈ B, IsCompact {y | (s, y) ∈ affineEpigraphPullback Ω u a L}) | |
| (hzero : ∀ s ∈ B, (0 : E) ∈ interior {y | (s, y) ∈ affineEpigraphPullback Ω u a L}) | |
| {s : S} (hs : s ∈ B) {ℓ : E →L[ℝ] ℝ} (hℓ : ℓ ≠ 0) : | |
| ContDiffAt ℝ ∞ (fun q : S × (E →L[ℝ] ℝ) => | |
| supportValue {y | (q.1, y) ∈ affineEpigraphPullback Ω u a L} q.2) (s, ℓ) ∧ | |
| 0 < supportValue {y | (s, y) ∈ affineEpigraphPullback Ω u a L} ℓ := by | |
| let W : Set (S × E) := {p | (a + L p).1 ∈ Ω} | |
| let F : S × E → ℝ := fun p => u (a + L p).1 - (a + L p).2 | |
| have hbase : ContDiff ℝ ∞ (fun p : S × E => (a + L p).1) := | |
| (contDiff_const.add L.contDiff).fst | |
| have hheight : ContDiff ℝ ∞ (fun p : S × E => (a + L p).2) := | |
| (contDiff_const.add L.contDiff).snd | |
| have hW : IsOpen W := hΩ.preimage hbase.continuous | |
| have hF : ContDiffOn ℝ ∞ F W := | |
| (hu.comp hbase.contDiffOn (fun _ h => h)).sub hheight.contDiffOn | |
| have hFu : ConvexOn ℝ Ω u := | |
| convexOn_of_hessian_posSemidef hΩ hcv hu (fun x hx => (hp x hx).posSemidef) | |
| have hFeq (r : S) : (fun q => F (r, q)) = (fun q => | |
| u ((a + L (r, 0)).1 + affineFiberHorizontal L q) - | |
| ((a + L (r, 0)).2 + affineFiberHeight L q)) := by | |
| funext q | |
| change u (a + L (r, q)).1 - (a + L (r, q)).2 = _ | |
| rw [affine_coordinates_split a L r q] | |
| have hWeq (r : S) : {y | (r, y) ∈ W} = | |
| {y | (a + L (r, 0)).1 + affineFiberHorizontal L y ∈ Ω} := by | |
| ext y | |
| change (a + L (r, y)).1 ∈ Ω ↔ _ | |
| rw [affine_coordinates_split a L r y] | |
| rfl | |
| have hcvF (r : S) : ConvexOn ℝ {y | (r, y) ∈ W} (fun y => F (r, y)) := by | |
| rw [hFeq, hWeq] | |
| exact convexOn_affineSlice hFu (a + L (r, 0)).1 (a + L (r, 0)).2 | |
| (affineFiberHorizontal L) (affineFiberHeight L) | |
| have hKeq (r : S) : {y | (r, y) ∈ W ∧ F (r, y) ≤ 0} = | |
| {y | (r, y) ∈ affineEpigraphPullback Ω u a L} := by | |
| ext y | |
| simp only [W, F, affineEpigraphPullback, mem_ofPred_eq, sub_nonpos] | |
| have hK' : IsCompact {y | (s, y) ∈ W ∧ F (s, y) ≤ 0} := by rw [hKeq]; exact hK s hs | |
| have hzero' : (0 : E) ∈ interior {y | (s, y) ∈ W ∧ F (s, y) ≤ 0} := by | |
| rw [hKeq]; exact hzero s hs | |
| have hA : Function.Injective (affineFiberHorizontal L) := | |
| affineFiberHorizontal_injective (hK s hs) ⟨0, interior_subset (hzero s hs)⟩ | |
| have hH (y : E) (hy : (s, y) ∈ W) (v : E) (hv : v ≠ 0) : | |
| 0 < fderiv ℝ (fderiv ℝ (fun q => F (s, q))) y v v := by | |
| have huc := hu.contDiffAt (hΩ.mem_nhds hy) | |
| have hx : (a + L (s, y)).1 = (a + L (s, 0)).1 + affineFiberHorizontal L y := | |
| congrArg Prod.fst (affine_coordinates_split a L s y) | |
| rw [hFeq, affineSlice_second (by rw [← hx]; exact huc)] | |
| exact second_fderiv_pos (by rw [← hx]; exact huc) | |
| (by rw [← hx]; exact hp _ hy) | |
| (fun hh => hv (hA (by simpa using hh))) | |
| have hzW : (s, (0 : E)) ∈ W := (interior_subset hzero').1 | |
| have hzF : F (s, 0) < 0 := sublevel_interior_strict (hcvF s) hzero' | |
| (((hF.contDiffAt (hW.mem_nhds hzW)).comp 0 | |
| (contDiffAt_const.prodMk contDiffAt_id)).differentiableAt (by simp)) (hH 0 hzW) | |
| have hh := contDiffAt_supportValue_fibers hB hW hF (fun r _ => hcvF r) | |
| hs hzW hzF hK' (fun y hy _ => hH y hy) hℓ | |
| refine ⟨?_, supportValue_pos (hK s hs) (hzero s hs) hℓ⟩ | |
| convert hh using 1 | |
| ext q | |
| rw [hKeq] | |
| end AffineBernstein | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 12 kB
- Xet hash:
- 3acc9c919d7d4c75f388f8b38e4889265816b9916d8387daa1c1cf8e061d0530
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.