abbrev
definition
sigma
show as:
view math explainer →
open explainer
Generate a durable explainer page for this declaration.
open lean source
IndisputableMonolith.NumberTheory.Primes.ArithmeticFunctions on GitHub at line 173.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
used by
-
canonicalRecognitionCostSystem -
RecognitionCostSystem -
encodeIndex -
decodeCoeff -
decodeMag -
voxelStep_foldPlusOne_encodeIndex -
within3Sigma -
withinSigma -
band_excludes_falsifier -
DarkMatterCrossSectionCert -
alpha_over_pi_bounds -
AbileneParadoxCert -
group_sigma -
group_sigma_cons -
sigma -
sigma_abilene -
sigma_truthful -
sigma_truthfulGo -
sigma_truthfulStay -
sigma_preserving_consensual -
valueFunctional -
AgentState -
automorphism_preserves_sigma -
coupling_conserves_total -
CrossLatticeTransform -
love_changes_individual_sigma -
love_equilibrates -
loveOperator -
SingleLatticeTransform -
externalization -
externalization_creates_debt -
love_is_just -
mutual_benefit_is_just -
love_is_fastest_equilibration -
loveStrategy -
selfishStrategy -
SigmaPopulation -
sigmaSpread -
ReachableTransition -
SigmaPreserving
formal source
170/-! ### Sigma function (sum of divisors) -/
171
172/-- The sum-of-divisors function σ_k. -/
173abbrev sigma (k : ℕ) : ArithmeticFunction ℕ := ArithmeticFunction.sigma k
174
175@[simp] theorem sigma_def (k : ℕ) : sigma k = ArithmeticFunction.sigma k := rfl
176
177/-- σ_k(n) = ∑ d ∣ n, d^k. -/
178theorem sigma_apply {k n : ℕ} : sigma k n = ∑ d ∈ n.divisors, d ^ k := by
179 simp only [sigma, ArithmeticFunction.sigma_apply]
180
181/-- σ_0(n) = number of divisors of n. -/
182theorem sigma_zero_apply {n : ℕ} : sigma 0 n = n.divisors.card := by
183 simp only [sigma, ArithmeticFunction.sigma_zero_apply]
184
185/-- σ_1(n) = sum of divisors of n. -/
186theorem sigma_one_apply {n : ℕ} : sigma 1 n = ∑ d ∈ n.divisors, d := by
187 simp only [sigma, ArithmeticFunction.sigma_one_apply]
188
189/-- σ_k is multiplicative. -/
190theorem sigma_isMultiplicative (k : ℕ) : ArithmeticFunction.IsMultiplicative (sigma k) := by
191 simp only [sigma]
192 exact ArithmeticFunction.isMultiplicative_sigma
193
194/-- σ_0(p) = 2 for prime p. -/
195theorem sigma_zero_prime {p : ℕ} (hp : Prime p) : sigma 0 p = 2 := by
196 have hp' : Nat.Prime p := (prime_iff p).1 hp
197 simp only [sigma_zero_apply, hp'.divisors]
198 have h_ne : (1 : ℕ) ≠ p := hp'.one_lt.ne'.symm
199 rw [Finset.card_insert_of_notMem (by simp [h_ne]), Finset.card_singleton]
200
201/-- σ_1(p) = p + 1 for prime p. -/
202theorem sigma_one_prime {p : ℕ} (hp : Prime p) : sigma 1 p = p + 1 := by
203 have hp' : Nat.Prime p := (prime_iff p).1 hp