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

costSpectrumValue_mul

proved
show as:
view math explainer →
module
IndisputableMonolith.NumberTheory.PrimeCostSpectrum
domain
NumberTheory
line
162 · github
papers citing
none yet

open explainer

Generate a durable explainer page for this declaration.

open lean source

IndisputableMonolith.NumberTheory.PrimeCostSpectrum on GitHub at line 162.

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

 159/-- The cost is completely additive over coprime products.
 160    For arbitrary products with positive factors, the same identity holds
 161    because `Nat.factorization` is additive on positive multiplications. -/
 162theorem costSpectrumValue_mul {m n : ℕ} (hm : m ≠ 0) (hn : n ≠ 0) :
 163    costSpectrumValue (m * n) = costSpectrumValue m + costSpectrumValue n := by
 164  unfold costSpectrumValue
 165  rw [Nat.factorization_mul hm hn]
 166  rw [Finsupp.sum_add_index']
 167  · intro p
 168    simp
 169  · intro p i j
 170    push_cast
 171    ring
 172
 173/-- The cost is nonnegative for any positive `n`.
 174    Each summand `k · J(p) ≥ 0` by primality of `p`, so the sum is ≥ 0. -/
 175theorem costSpectrumValue_nonneg (n : ℕ) :
 176    0 ≤ costSpectrumValue n := by
 177  unfold costSpectrumValue
 178  apply Finsupp.sum_nonneg
 179  intro p hp_mem
 180  have hp_prime : Nat.Prime p := Nat.prime_of_mem_primeFactors
 181    (Nat.support_factorization n ▸ hp_mem)
 182  have hk_nonneg : (0 : ℝ) ≤ (n.factorization p : ℝ) := by
 183    exact_mod_cast Nat.zero_le _
 184  have hJ_nonneg : 0 ≤ primeCost p := le_of_lt (primeCost_pos hp_prime)
 185  exact mul_nonneg hk_nonneg hJ_nonneg
 186
 187/-- Cost is monotonic under multiplication by positive integers
 188    (a direct consequence of additivity and nonnegativity of prime costs). -/
 189theorem costSpectrumValue_le_mul {m n : ℕ} (hm : m ≠ 0) (hn : n ≠ 0) :
 190    costSpectrumValue m ≤ costSpectrumValue (m * n) := by
 191  rw [costSpectrumValue_mul hm hn]
 192  have := costSpectrumValue_nonneg n