File size: 3,430 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | import OAI.MeasureTheory.Falconer.Geometry.DyadicCube
import Mathlib.Analysis.InnerProductSpace.Basic
namespace OAI
/-! # The actual distance Taylor error for the suffix reduction
The error estimate is dimension independent before insertion of the cube
diameter. Its proof is the exact squared-norm identity, so no differentiable
extension across the diagonal is needed.
-/
namespace Falconer
open Set
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E]
theorem norm_linearization_bounds (u v : E) (hu : 0 < βuβ) :
0 β€ βvβ-inner β (βuββ»ΒΉ β’ u) v β§
βvβ-inner β (βuββ»ΒΉ β’ u) v β€ βv-uβ^2/(2*βuβ) := by
have hi : inner β (βuββ»ΒΉ β’ u) v = inner β u v/βuβ := by
rw [real_inner_smul_left]
ring
rw [hi]
have hb : inner β u v/βuβ β€ βvβ := by
apply (div_le_iffβ hu).mpr
exact (real_inner_le_norm u v).trans_eq (mul_comm _ _)
have he : 2*βuβ*(βvβ-inner β u v/βuβ) =
βv-uβ^2-(βvβ-βuβ)^2 := by
have hs := norm_sub_sq_real v u
rw [real_inner_comm u v] at hs
field_simp
nlinarith
refine β¨sub_nonneg.mpr hb,?_β©
apply (le_div_iffβ (mul_pos (by norm_num) hu)).mpr
nlinarith [sq_nonneg (βvβ-βuβ)]
theorem norm_linearization_abs_le (u v : E) (hu : 0 < βuβ) :
|βvβ-inner β (βuββ»ΒΉ β’ u) v| β€ βv-uβ^2/(2*βuβ) := by
rw [abs_of_nonneg (norm_linearization_bounds u v hu).1]
exact (norm_linearization_bounds u v hu).2
omit [InnerProductSpace β E] in
theorem pair_displacement_bound (x y cβ cβ : E) {Ξ΄β Ξ΄β : β}
(hβ : βx-cββ β€ Ξ΄β) (hβ : βy-cββ β€ Ξ΄β) :
β(x-y)-(cβ-cβ)β β€ Ξ΄β+Ξ΄β := by
have he : (x-y)-(cβ-cβ) = (x-cβ)-(y-cβ) := by abel
rw [he]
exact (norm_sub_le _ _).trans (add_le_add hβ hβ)
/-- Original distances on a pair of small cubes have the required
quadratic error relative to their center direction. -/
theorem DyadicCube.distance_linearization {d : β} (P Q : DyadicCube d)
(hP : 0 < P.side) (hQ : Q.side = P.side)
{g : β} (hg : 0 < g) (hsep : g β€ βP.center-Q.centerβ)
{x y : Space d} (hx : x β P.carrier) (hy : y β Q.carrier) :
|dist x y-inner β (βP.center-Q.centerββ»ΒΉ β’ (P.center-Q.center)) (x-y)| β€
2*(d:β)*P.side^2/g := by
have hQp : 0 < Q.side := by rw [hQ]; exact hP
have hΞ΄ : β(x-y)-(P.center-Q.center)β β€ 2*Real.sqrt d*P.side := by
have hβ := P.dist_le hP.le hx (P.center_mem hP)
have hβ := Q.dist_le hQp.le hy (Q.center_mem hQp)
rw [hQ] at hβ
simpa only [dist_eq_norm,two_mul,mul_add,add_mul] using
pair_displacement_bound x y P.center Q.center hβ hβ
have hsquare : β(x-y)-(P.center-Q.center)β^2 β€ 4*(d:β)*P.side^2 := by
have hh := (sq_le_sqβ (norm_nonneg _) (by positivity)).mpr hΞ΄
nlinarith [Real.sq_sqrt (Nat.cast_nonneg (Ξ± := β) d)]
have hnorm : 0 < βP.center-Q.centerβ := hg.trans_le hsep
rw [dist_eq_norm]
apply (norm_linearization_abs_le _ _ hnorm).trans
calc
_ β€ (4*(d:β)*P.side^2)/(2*βP.center-Q.centerβ) :=
div_le_div_of_nonneg_right hsquare (by positivity)
_ β€ (4*(d:β)*P.side^2)/(2*g) :=
div_le_div_of_nonneg_left (by positivity) (by positivity)
(mul_le_mul_of_nonneg_left hsep (by norm_num))
_ = _ := by ring
end Falconer
end OAI
|