|
| 1 | +/- |
| 2 | +Copyright (c) 2026 Thomas Browning. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Thomas Browning |
| 5 | +-/ |
| 6 | +module |
| 7 | + |
| 8 | +public import Mathlib.NumberTheory.ArithmeticFunction.Defs |
| 9 | +public import Mathlib.RingTheory.PowerSeries.PiTopology |
| 10 | +public import Mathlib.RingTheory.PowerSeries.Substitution |
| 11 | + |
| 12 | +/-! |
| 13 | +# Construction of L-functions |
| 14 | +
|
| 15 | +This file constructs L-functions as formal Dirichlet series. |
| 16 | +
|
| 17 | +## Main definitions |
| 18 | +
|
| 19 | +* `ArithmeticFunction.eulerProduct f`: the Euler product of a family `f i` of Dirichlet series. |
| 20 | +
|
| 21 | +## TODO |
| 22 | +* If each `f i` is multiplicative, then `ArithmeticFunction.eulerProduct f` is multiplicative. |
| 23 | +-/ |
| 24 | + |
| 25 | +@[expose] public section |
| 26 | + |
| 27 | +namespace ArithmeticFunction |
| 28 | + |
| 29 | +section EulerProduct |
| 30 | + |
| 31 | +open Filter |
| 32 | + |
| 33 | +variable {ι R : Type*} [CommSemiring R] |
| 34 | + |
| 35 | +/-- A private uniform space instance on `ArithmeticFunction R` in order to define `eulerProduct` as |
| 36 | +a `tprod`. If `R` is viewed as having the discrete topology, then the resulting topology on |
| 37 | +`ArithmeticFunction R` is the topology of pointwise convergence (see `tendsto_iff`). |
| 38 | +
|
| 39 | +See `tendsTo_eulerProduct_of_tendsTo` for the outward facing `eulerProduct` API. -/ |
| 40 | +local instance uniformSpace : UniformSpace (ArithmeticFunction R) := |
| 41 | + letI : UniformSpace R := ⊥ |
| 42 | + .comap ((↑) : ArithmeticFunction R → (ℕ → R)) inferInstance |
| 43 | + |
| 44 | +/-- A family `f i : ArithmeticFunction R` tends to `g` if and only if for each `n`, the `n`th |
| 45 | +coefficient of `f i` is eventually equal to the `n`th coefficient of `g`. If `R` is viewed as |
| 46 | +having the discrete topology, then this is the topology of pointwise convergence. |
| 47 | +
|
| 48 | +See `tendsTo_eulerProduct_of_tendsTo` for the outward facing `eulerProduct` API. -/ |
| 49 | +private theorem tendsto_iff |
| 50 | + {f : ι → ArithmeticFunction R} {F : Filter ι} {g : ArithmeticFunction R} : |
| 51 | + Tendsto f F (nhds g) ↔ ∀ n, ∀ᶠ i in F, f i n = g n := by |
| 52 | + let : UniformSpace R := ⊥ |
| 53 | + have : Topology.IsInducing ((↑) : ArithmeticFunction R → (ℕ → R)) := ⟨rfl⟩ |
| 54 | + simp [this.tendsto_nhds_iff, tendsto_pi_nhds] |
| 55 | + |
| 56 | +/-- The uniform space structure on arithmetic functions is complete. |
| 57 | +See `tendsTo_eulerProduct_of_tendsTo` for the outward facing `eulerProduct` API. -/ |
| 58 | +local instance : CompleteSpace (ArithmeticFunction R) := by |
| 59 | + let : UniformSpace R := ⊥ |
| 60 | + apply IsUniformInducing.completeSpace ⟨rfl⟩ |
| 61 | + apply IsClosed.isComplete |
| 62 | + have : Set.range ((↑) : ArithmeticFunction R → (ℕ → R)) = {f | f 0 = 0} := by |
| 63 | + ext f |
| 64 | + exact ⟨by rintro ⟨f, rfl⟩; simp, fun hf ↦ ⟨⟨f, hf⟩, rfl⟩⟩ |
| 65 | + rw [ArithmeticFunction.range_coe] |
| 66 | + apply isClosed_setOf_map_zero |
| 67 | + |
| 68 | +/-- The Euler product of a family of arithmetic functions. Defined as a `tprod`, but see |
| 69 | +`tendsTo_eulerProduct_of_tendsTo` for the outward facing `eulerProduct` API. -/ |
| 70 | +noncomputable def eulerProduct (f : ι → ArithmeticFunction R) : ArithmeticFunction R := |
| 71 | + ∏' i, f i |
| 72 | + |
| 73 | +/-- If arithmetic functions `f i` converges to `1` pointwise, then the partial products |
| 74 | +`∏ i ∈ s, f i` converge to `eulerProduct f` pointwise. -/ |
| 75 | +theorem tendsTo_eulerProduct_of_tendsTo (f : ι → ArithmeticFunction R) |
| 76 | + (hf : ∀ n, ∀ᶠ i in cofinite, f i n = (1 : ArithmeticFunction R) n) : |
| 77 | + ∀ n, ∀ᶠ s in atTop, (∏ i ∈ s, f i) n = eulerProduct f n := by |
| 78 | + let : UniformSpace R := ⊥ |
| 79 | + have : IsUniformInducing ((↑) : ArithmeticFunction R → (ℕ → R)) := ⟨rfl⟩ |
| 80 | + classical |
| 81 | + suffices Multipliable f from tendsto_iff.mp this.hasProd |
| 82 | + simp_rw [multipliable_iff_cauchySeq_finset, CauchySeq, ← this.cauchy_map_iff, |
| 83 | + Filter.map_map, cauchy_map_iff', Pi.uniformity, DiscreteUniformity.eq_principal_setRelId, |
| 84 | + tendsto_iInf, tendsto_comap_iff, tendsto_principal, Function.comp_apply, prod_atTop_atTop_eq, |
| 85 | + eventually_atTop_prod_self, SetRel.mem_id] |
| 86 | + intro n |
| 87 | + replace hf : ∀ k ∈ Set.Iic n, ∀ᶠ (x : ι) in cofinite, (f x) k = (1 : ArithmeticFunction R) k := |
| 88 | + fun k hk ↦ hf k |
| 89 | + rw [← eventually_all_finite (Set.finite_Iic n), eventually_iff_exists_mem] at hf |
| 90 | + obtain ⟨s, hs, hs'⟩ := hf |
| 91 | + let t := (mem_cofinite.mp hs).toFinset |
| 92 | + refine ⟨t, fun u v hu hv ↦ ?_⟩ |
| 93 | + rw [← Finset.prod_sdiff hu, ← Finset.prod_sdiff hv] |
| 94 | + replace hu : ∀ i ∈ u \ t, i ∈ s := by |
| 95 | + intro i hi |
| 96 | + rw [Finset.mem_sdiff, Set.Finite.mem_toFinset, Set.notMem_compl_iff] at hi |
| 97 | + exact hi.2 |
| 98 | + replace hv : ∀ i ∈ v \ t, i ∈ s := by |
| 99 | + intro i hi |
| 100 | + rw [Finset.mem_sdiff, Set.Finite.mem_toFinset, Set.notMem_compl_iff] at hi |
| 101 | + exact hi.2 |
| 102 | + suffices ∀ k ≤ n, (∏ x ∈ u \ t, f x) k = (∏ x ∈ v \ t, f x) k by |
| 103 | + rw [mul_apply, mul_apply] |
| 104 | + refine Finset.sum_congr rfl fun k hk ↦ ?_ |
| 105 | + rw [this k.1 (Nat.divisor_le (Nat.fst_mem_divisors_of_mem_antidiagonal hk))] |
| 106 | + suffices ∀ w, (∀ i ∈ w, i ∈ s) → ∀ k ≤ n, (∏ x ∈ w, f x) k = (1 : ArithmeticFunction R) k by |
| 107 | + intro k hk |
| 108 | + rw [this (u \ t) hu k hk, this (v \ t) hv k hk] |
| 109 | + intro w hw |
| 110 | + induction w using Finset.induction_on |
| 111 | + case empty => simp |
| 112 | + case insert i w hi hw' => |
| 113 | + intro k hk |
| 114 | + rw [← one_mul (1 : ArithmeticFunction R), Finset.prod_insert hi, mul_apply, mul_apply] |
| 115 | + refine Finset.sum_congr rfl fun j hj ↦ ?_ |
| 116 | + have h1 := hs' i (hw i (Finset.mem_insert_self i w)) j.1 |
| 117 | + ((Nat.divisor_le (Nat.fst_mem_divisors_of_mem_antidiagonal hj)).trans hk) |
| 118 | + have h2 := hw' (fun i hi ↦ hw i (Finset.mem_insert_of_mem hi)) j.2 |
| 119 | + ((Nat.divisor_le (Nat.snd_mem_divisors_of_mem_antidiagonal hj)).trans hk) |
| 120 | + rw [h1, h2] |
| 121 | + |
| 122 | +end EulerProduct |
| 123 | + |
| 124 | +end ArithmeticFunction |
0 commit comments