pith. machine review for the scientific record. sign in
theorem

dot_sq_le_sqNorm_mul

proved
show as:
view math explainer →
module
IndisputableMonolith.Cost.Ndim.Bridge
domain
Cost
line
32 · github
papers citing
none yet

open explainer

Generate a durable explainer page for this declaration.

open lean source

IndisputableMonolith.Cost.Ndim.Bridge on GitHub at line 32.

browse module

All declarations in this module, on Recognition.

explainer page

Tracked in the explainer inventory; generation is lazy so crawlers do not trigger LLM jobs.

open explainer

depends on

used by

formal source

  29  ring
  30
  31/-- Squared Cauchy-Schwarz bound in our notation. -/
  32theorem dot_sq_le_sqNorm_mul {n : ℕ} (α ε : Vec n) :
  33    (dot α ε) ^ 2 ≤ (dot α α) * (∑ i : Fin n, (ε i) ^ 2) := by
  34  unfold dot
  35  simpa [pow_two] using
  36    (Finset.sum_mul_sq_le_sq_mul_sq (s := (Finset.univ : Finset (Fin n))) α ε)
  37
  38/-- If `‖α‖² ≤ 1`, multiplicative quadratic cost is bounded by additive quadratic cost. -/
  39theorem multiplicative_le_additive_of_sqNorm_le_one {n : ℕ}
  40    (α ε : Vec n) (hα : dot α α ≤ 1) :
  41    multiplicativeQuadratic α ε ≤ additiveQuadratic ε := by
  42  have hsq : (dot α ε) ^ 2 ≤ ∑ i : Fin n, (ε i) ^ 2 := by
  43    have hcs : (dot α ε) ^ 2 ≤ (dot α α) * (∑ i : Fin n, (ε i) ^ 2) :=
  44      dot_sq_le_sqNorm_mul α ε
  45    have hsum_nonneg : 0 ≤ ∑ i : Fin n, (ε i) ^ 2 := by
  46      exact Finset.sum_nonneg (fun i _ => sq_nonneg (ε i))
  47    have hmul : (dot α α) * (∑ i : Fin n, (ε i) ^ 2) ≤ 1 * (∑ i : Fin n, (ε i) ^ 2) :=
  48      mul_le_mul_of_nonneg_right hα hsum_nonneg
  49    exact le_trans hcs (by simpa using hmul)
  50  have hhalf : (0 : ℝ) ≤ 1 / 2 := by norm_num
  51  have hscaled := mul_le_mul_of_nonneg_left hsq hhalf
  52  simpa [multiplicativeQuadratic, additiveQuadratic, one_mul] using hscaled
  53
  54/-- Under normalized weights (`‖α‖² ≤ 1`), the compensatory term is nonnegative. -/
  55theorem compensatory_nonneg_of_sqNorm_le_one {n : ℕ}
  56    (α ε : Vec n) (hα : dot α α ≤ 1) :
  57    0 ≤ compensatoryQuadratic α ε := by
  58  unfold compensatoryQuadratic
  59  have hle := multiplicative_le_additive_of_sqNorm_le_one α ε hα
  60  linarith
  61
  62end Ndim