Skip to content

Commit b5790f4

Browse files
committed
feat(NumberTheory/ArithmeticFunction/LFunction): ofPowerSeries produces multiplicative power series (#37767)
This PR proves that `ArithmeticFunction.ofPowerSeries` produces multiplicative power series. I had to assume `CommRing` in order to use `PowerSeries.subst`. Co-authored-by: tb65536 <thomas.l.browning@gmail.com>
1 parent 77d929d commit b5790f4

File tree

1 file changed

+70
-5
lines changed

1 file changed

+70
-5
lines changed

Mathlib/NumberTheory/ArithmeticFunction/LFunction.lean

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ For context, here is a diagram of the possible routes from polynomials to L-func
4242
| (product) | (product) | (product)
4343
v T=q⁻ˢ V s ∈ ℂ V
4444
[multivariate power series] ----> [Dirichlet series] ----> [L-function in s] (the Euler product)
45-
46-
## TODO
47-
48-
* If each `q` is a prime power, then `ArithmeticFunction.ofPowerSeries q f` is multiplicative.
4945
-/
5046

5147
@[expose] public section
@@ -54,7 +50,11 @@ namespace ArithmeticFunction
5450

5551
section PowerSeries
5652

57-
variable {R : Type*} [CommSemiring R]
53+
variable {R : Type*}
54+
55+
section CommSemiring
56+
57+
variable [CommSemiring R]
5858

5959
/-- The arithmetic function corresponding to the Dirichlet series `f(q⁻ˢ)`.
6060
For example, if `f = 1 + X + X² + ...` and `q = p`, then `f(q⁻ˢ) = 1 + p⁻ˢ + p⁻²ˢ + ...`.
@@ -147,6 +147,71 @@ theorem ofPowerSeries_apply_one (q : ℕ) (f : PowerSeries R) :
147147
· rw [← pow_zero q, ofPowerSeries_apply_pow hq, PowerSeries.coeff_zero_eq_constantCoeff]
148148
· simp [ofPowerSeries, dif_neg hq]
149149

150+
end CommSemiring
151+
152+
section CommRing
153+
154+
variable [CommRing R]
155+
156+
/-- In `ArithmeticFunction.ofPowerSeries`, replacing the base `q` with a power `q ^ k` corresponds
157+
to substituting `X` with `X ^ k` in the original power series. -/
158+
theorem ofPowerSeries_pow (q : ℕ) {k : ℕ} (hk : k ≠ 0) (f : PowerSeries R) :
159+
ofPowerSeries (q ^ k) f = ofPowerSeries q (f.subst (PowerSeries.X ^ k)) := by
160+
classical
161+
by_cases hq : 1 < q
162+
· ext n
163+
by_cases hn : ∃ i, q ^ i = n
164+
· obtain ⟨i, rfl⟩ := hn
165+
rw [ofPowerSeries_apply_pow hq, PowerSeries.coeff_subst_X_pow hk]
166+
split_ifs with hn
167+
· obtain ⟨j, rfl⟩ := hn
168+
rw [pow_mul, ofPowerSeries_apply_pow (one_lt_pow' hq hk)]
169+
simp [hk]
170+
· rw [ofPowerSeries_apply (one_lt_pow' hq hk), Function.extend_apply', Pi.zero_apply]
171+
simp_rw [← pow_mul, Nat.pow_right_inj hq, eq_comm, ← dvd_def]
172+
exact hn
173+
· rwa [ofPowerSeries_apply hq, ofPowerSeries_apply (one_lt_pow' hq hk),
174+
Function.extend_apply', Function.extend_apply']
175+
contrapose! hn
176+
obtain ⟨i, rfl⟩ := hn
177+
exact ⟨k * i, pow_mul q k i⟩
178+
· simp [ofPowerSeries, hq, hk]
179+
180+
-- todo: generalize to `CommSemiring`
181+
/-- `ArithmeticFunction.ofPowerSeries` produces multiplicative power series. -/
182+
theorem isMultiplicative_ofPowerSeries_of_isPrimePow
183+
(q : ℕ) (hq : IsPrimePow q) (f : PowerSeries R) (hf : f.constantCoeff = 1) :
184+
IsMultiplicative (ofPowerSeries q f) := by
185+
refine ⟨(ofPowerSeries_apply_one q f).trans hf, fun {m n} hmn ↦ ?_⟩
186+
obtain ⟨p, k, hp, hk, rfl⟩ := hq
187+
rw [← Nat.prime_iff] at hp
188+
rw [ofPowerSeries_pow p hk.ne']
189+
by_cases hm : ∃ i, p ^ i = m
190+
· obtain ⟨i, rfl⟩ := hm
191+
by_cases hn : ∃ j, p ^ j = n
192+
· obtain ⟨j, rfl⟩ := hn
193+
cases i
194+
· simp [hk.ne', hf]
195+
· cases j
196+
· simp [hk.ne', hf]
197+
· simp [hp.ne_one] at hmn
198+
· simp_rw [ofPowerSeries_apply hp.one_lt]
199+
rw [Function.extend_apply', Function.extend_apply' _ _ _ hn,
200+
Pi.zero_apply, Pi.zero_apply, mul_zero]
201+
contrapose! hn
202+
obtain ⟨j, hj⟩ := hn
203+
obtain ⟨v, -, rfl⟩ := (Nat.dvd_prime_pow hp).mp (Dvd.intro_left _ hj.symm)
204+
exact ⟨v, rfl⟩
205+
· simp_rw [ofPowerSeries_apply hp.one_lt]
206+
rw [Function.extend_apply', Function.extend_apply' _ _ _ hm,
207+
Pi.zero_apply, Pi.zero_apply, zero_mul]
208+
contrapose! hm
209+
obtain ⟨i, hi⟩ := hm
210+
obtain ⟨j, -, rfl⟩ := (Nat.dvd_prime_pow hp).mp ⟨n, hi⟩
211+
exact ⟨j, rfl⟩
212+
213+
end CommRing
214+
150215
end PowerSeries
151216

152217
section EulerProduct

0 commit comments

Comments
 (0)