cfahlgren1/math / lean /OAI /Dynamics /EntropyCounterexample /PredictionDerivative.lean
cfahlgren1's picture
download
raw
4.13 kB
import Mathlib
namespace OAI
noncomputable section
namespace Problem340.Prediction
variable {π•œ E F : Type*} [NontriviallyNormedField π•œ]
[NormedAddCommGroup E] [NormedSpace π•œ E]
[NormedAddCommGroup F] [NormedSpace π•œ F]
theorem norm_fderiv_iterate_le {G : E β†’ E} {B : ℝ}
(hG : Differentiable π•œ G) (hB : 0 ≀ B)
(hbound : βˆ€ x, β€–fderiv π•œ G xβ€– ≀ B) (m : β„•) (x : E) :
β€–fderiv π•œ (G^[m]) xβ€– ≀ B ^ m := by
induction m generalizing x with
| zero =>
simpa using ContinuousLinearMap.norm_id_le (π•œ := π•œ) (E := E)
| succ m hm =>
rw [Function.iterate_succ, fderiv_comp x (hG.iterate m (G x)) (hG x)]
calc
β€–(fderiv π•œ (G^[m]) (G x)).comp (fderiv π•œ G x)β€–
≀ β€–fderiv π•œ (G^[m]) (G x)β€– * β€–fderiv π•œ G xβ€– :=
ContinuousLinearMap.opNorm_comp_le _ _
_ ≀ B ^ m * B := mul_le_mul (hm (G x)) (hbound x)
(norm_nonneg _) (pow_nonneg hB _)
_ = B ^ (m + 1) := (pow_succ B m).symm
theorem differentiableAt_iterate_and_norm_le_on {G : E β†’ E} {B : ℝ} {s : Set E}
(hG : βˆ€ x ∈ s, DifferentiableAt π•œ G x) (hmap : Set.MapsTo G s s)
(hB : 0 ≀ B) (hbound : βˆ€ x ∈ s, β€–fderiv π•œ G xβ€– ≀ B)
(m : β„•) (x : E) (hx : x ∈ s) :
DifferentiableAt π•œ (G^[m]) x ∧ β€–fderiv π•œ (G^[m]) xβ€– ≀ B ^ m := by
induction m generalizing x with
| zero =>
constructor
Β· exact differentiableAt_id
Β· simpa using ContinuousLinearMap.norm_id_le (π•œ := π•œ) (E := E)
| succ m hm =>
obtain ⟨hd, hn⟩ := hm (G x) (hmap hx)
rw [Function.iterate_succ]
refine ⟨hd.comp x (hG x hx), ?_⟩
rw [fderiv_comp x hd (hG x hx)]
calc
β€–(fderiv π•œ (G^[m]) (G x)).comp (fderiv π•œ G x)β€–
≀ β€–fderiv π•œ (G^[m]) (G x)β€– * β€–fderiv π•œ G xβ€– :=
ContinuousLinearMap.opNorm_comp_le _ _
_ ≀ B ^ m * B := mul_le_mul hn (hbound x hx)
(norm_nonneg _) (pow_nonneg hB _)
_ = B ^ (m + 1) := (pow_succ B m).symm
theorem norm_fderiv_projection_iterate_le {G : E β†’ E} {B : ℝ}
(hG : Differentiable π•œ G) (hB : 0 ≀ B)
(hbound : βˆ€ x, β€–fderiv π•œ G xβ€– ≀ B) (p : E β†’L[π•œ] F) (hp : β€–pβ€– ≀ 1)
(m : β„•) (x : E) :
β€–fderiv π•œ (p ∘ G^[m]) xβ€– ≀ B ^ m := by
rw [fderiv_comp x p.differentiableAt (hG.iterate m x), p.fderiv]
calc
β€–p.comp (fderiv π•œ (G^[m]) x)β€– ≀ β€–pβ€– * β€–fderiv π•œ (G^[m]) xβ€– :=
ContinuousLinearMap.opNorm_comp_le _ _
_ ≀ 1 * B ^ m := mul_le_mul hp (norm_fderiv_iterate_le hG hB hbound m x)
(norm_nonneg _) (by norm_num)
_ = B ^ m := one_mul _
theorem exists_iterate_fderiv_bound_of_compact {G : E β†’ E} {s : Set E}
(hG : ContDiff π•œ 1 G) (hs : IsCompact s) (hmap : Set.MapsTo G s s) :
βˆƒ B : ℝ, 1 ≀ B ∧ βˆ€ m : β„•, βˆ€ x ∈ s, β€–fderiv π•œ (G^[m]) xβ€– ≀ B ^ m := by
obtain ⟨C, hC⟩ := hs.exists_bound_of_continuousOn
(hG.continuous_fderiv (by norm_num)).continuousOn
refine ⟨max 1 C, le_max_left _ _, ?_⟩
intro m x hx
exact (differentiableAt_iterate_and_norm_le_on
(fun y _ => hG.differentiable (by norm_num) y) hmap
(le_trans (by norm_num) (le_max_left _ _))
(fun y hy => (hC y hy).trans (le_max_right _ _)) m x hx).2
theorem norm_fderiv_projection_iterate_le_on {G : E β†’ E} {B : ℝ} {s : Set E}
(hG : βˆ€ x ∈ s, DifferentiableAt π•œ G x) (hmap : Set.MapsTo G s s)
(hB : 0 ≀ B) (hbound : βˆ€ x ∈ s, β€–fderiv π•œ G xβ€– ≀ B)
(p : E β†’L[π•œ] F) (hp : β€–pβ€– ≀ 1) (m : β„•) (x : E) (hx : x ∈ s) :
β€–fderiv π•œ (p ∘ G^[m]) xβ€– ≀ B ^ m := by
obtain ⟨hd, hn⟩ := differentiableAt_iterate_and_norm_le_on hG hmap hB hbound m x hx
rw [fderiv_comp x p.differentiableAt hd, p.fderiv]
calc
β€–p.comp (fderiv π•œ (G^[m]) x)β€– ≀ β€–pβ€– * β€–fderiv π•œ (G^[m]) xβ€– :=
ContinuousLinearMap.opNorm_comp_le _ _
_ ≀ 1 * B ^ m := mul_le_mul hp hn (norm_nonneg _) (by norm_num)
_ = B ^ m := one_mul _
end Problem340.Prediction
end
end OAI

Xet Storage Details

Size:
4.13 kB
Β·
Xet hash:
4ca3de522c3cece815c2977d739855643d9280df486fd06830d819d3b9c54343

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.