Skip to content

Commit 6fd5453

Browse files
committed
refactor: generalized weak approximation (leanprover-community#41157)
refactor the existing proof of weak approximation to the generalized version applied to pairwise inequivalent absolute value
1 parent 313e59a commit 6fd5453

2 files changed

Lines changed: 50 additions & 35 deletions

File tree

Mathlib/Analysis/AbsoluteValue/Equivalence.lean

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,4 +389,51 @@ theorem isEquiv_iff_isHomeomorph (v w : AbsoluteValue F ℝ) :
389389

390390
end Real
391391

392+
section WeakApproximation
393+
394+
open Filter
395+
open scoped Topology
396+
397+
variable {F : Type*} [Field F]
398+
399+
/--
400+
If `v : ι → AbsoluteValue F ℝ` is a finite family of nontrivial, pairwise inequivalent
401+
real absolute values on a field `F`, then the diagonal embedding
402+
`algebraMap F ((i : ι) → WithAbs (v i))` has dense range.
403+
404+
This is the abstract weak approximation theorem; see
405+
`NumberField.InfinitePlace.denseRange_algebraMap_pi` for the number-field special case.
406+
-/
407+
theorem denseRange_algebraMap_pi {ι : Type*} [Finite ι] {v : ι → AbsoluteValue F ℝ}
408+
(h : ∀ i, (v i).IsNontrivial)
409+
(hv : Pairwise fun i j ↦ ¬(v i).IsEquiv (v j)) :
410+
DenseRange <| algebraMap F ((i : ι) → WithAbs (v i)) := by
411+
classical
412+
have := Fintype.ofFinite ι
413+
refine Metric.denseRange_iff.mpr fun z r hr ↦ ?_
414+
choose a hx using exists_one_lt_lt_one_pi_of_not_isEquiv h hv
415+
let y := fun n : ℕ ↦ ∑ i, (1 / (1 + (a i)⁻¹ ^ n)) * WithAbs.equiv (v i) (z i)
416+
have htend : atTop.Tendsto (fun n i ↦ (WithAbs.equiv (v i)).symm (y n)) (𝓝 z) := by
417+
refine tendsto_pi_nhds.mpr fun u ↦ ?_
418+
simp_rw [← Fintype.sum_pi_single u z, y, map_sum, map_mul]
419+
refine tendsto_finsetSum _ fun w _ ↦ ?_
420+
by_cases hw : u = w
421+
· rw [← hw, Pi.single_eq_same]
422+
have hlt : (v u) (a u)⁻¹ < 1 := by
423+
simpa [← inv_pow, inv_lt_one_iff₀] using Or.inr (hx u).1
424+
simpa using (WithAbs.tendsto_one_div_one_add_pow_nhds_one hlt).mul_const (z u)
425+
· rw [Pi.single_eq_of_ne (M := fun i ↦ WithAbs (v i)) hw (z w)]
426+
have hgt : 1 < (v u) (a w)⁻¹ := by
427+
rw [map_inv₀]
428+
refine one_lt_inv_iff₀.mpr ⟨(v u).pos_iff.mpr fun ha ↦ ?_, (hx w).2 u hw⟩
429+
linarith [map_zero (v w) ▸ ha ▸ (hx w).1]
430+
have := (v u).tendsto_div_one_add_pow_nhds_zero hgt
431+
simp_rw [← WithAbs.norm_toAbs_eq] at this
432+
simpa using (tendsto_zero_iff_norm_tendsto_zero.2 this).mul_const
433+
((WithAbs.equiv (v u)).symm _)
434+
let ⟨N, hN⟩ := Metric.tendsto_atTop.1 htend r hr
435+
exact ⟨y N, dist_comm z (algebraMap F _ (y N)) ▸ hN N le_rfl⟩
436+
437+
end WeakApproximation
438+
392439
end AbsoluteValue

Mathlib/NumberTheory/NumberField/InfinitePlace/Basic.lean

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -596,47 +596,15 @@ theorem isNontrivial : v.1.IsNontrivial := by
596596

597597
variable {v} (K)
598598

599-
open Filter in
600599
/--
601600
*Weak approximation for infinite places*
602601
The number field `K` is dense when embedded diagonally in the product
603602
`(v : InfinitePlace K) → WithAbs v.1`, in which `WithAbs v.1` represents `K` equipped with the
604603
topology coming from the infinite place `v`.
605604
-/
606605
theorem denseRange_algebraMap_pi [NumberField K] :
607-
DenseRange <| algebraMap K ((v : InfinitePlace K) → WithAbs v.1) := by
608-
classical
609-
-- We have to show that given `(zᵥ)ᵥ` with `zᵥ : WithAbs v.1`, there is a `y : K` that is
610-
-- arbitrarily close to each `zᵥ` in `v`'s topology.
611-
refine Metric.denseRange_iff.mpr fun z r hr ↦ ?_
612-
-- Given `v`, by previous results we can select a `aᵥ : K` for each infinite place `v`
613-
-- such that `1 < v aᵥ` while `w aᵥ < 1` for all `w ≠ v`.
614-
choose a hx using AbsoluteValue.exists_one_lt_lt_one_pi_of_not_isEquiv isNontrivial
615-
fun _ _ hwv ↦ (eq_iff_isEquiv (K := K)).not.mp hwv
616-
-- Define the sequence `yₙ = ∑ v, 1 / (1 + aᵥ⁻ⁿ) * zᵥ` in `K`
617-
let y := fun n ↦ ∑ v, (1 / (1 + (a v)⁻¹ ^ n)) * WithAbs.equiv v.1 (z v)
618-
-- We will show that this sequence converges to `z` in the product topology.
619-
have : atTop.Tendsto
620-
(fun n (v : InfinitePlace K) ↦ (WithAbs.equiv v.1).symm (y n)) (𝓝 z) := by
621-
-- At a fixed place `u`, the limit of `y` with respect to `u`'s topology is `zᵤ`.
622-
refine tendsto_pi_nhds.mpr fun u ↦ ?_
623-
simp_rw [← Fintype.sum_pi_single u z, y, map_sum, map_mul]
624-
refine tendsto_finsetSum _ fun w _ ↦ ?_
625-
by_cases hw : u = w
626-
· -- Because `1 / (1 + aᵤ⁻ⁿ) → 1` in `WithAbs u.1`.
627-
rw [← hw, Pi.single_eq_same]
628-
have : u (a u)⁻¹ < 1 := by simpa [← inv_pow, inv_lt_one_iff₀] using .inr (hx u).1
629-
simpa using (WithAbs.tendsto_one_div_one_add_pow_nhds_one this).mul_const (z u)
630-
· -- And `1 / (1 + aᵤ⁻ⁿ) → 0` in `WithAbs w.1` when `w ≠ u`.
631-
rw [Pi.single_eq_of_ne (M := fun v ↦ WithAbs v.1) hw (z w)]
632-
have hu : 1 < u (a w)⁻¹ := by simpa [one_lt_inv_iff₀] using
633-
⟨u.pos_iff.2 fun ha ↦ by linarith [map_zero w ▸ ha ▸ (hx w).1], (hx w).2 u hw⟩
634-
have := u.1.tendsto_div_one_add_pow_nhds_zero hu
635-
simp_rw [← WithAbs.norm_toAbs_eq] at this
636-
simpa using (tendsto_zero_iff_norm_tendsto_zero.2 this).mul_const
637-
((WithAbs.equiv u.1).symm (WithAbs.equiv w.1 (z w)))
638-
-- So taking a sufficiently large index of the sequence `yₙ` gives the desired term.
639-
let ⟨N, h⟩ := Metric.tendsto_atTop.1 this r hr
640-
exact ⟨y N, dist_comm z (algebraMap K _ (y N)) ▸ h N le_rfl⟩
606+
DenseRange <| algebraMap K ((v : InfinitePlace K) → WithAbs v.1) :=
607+
AbsoluteValue.denseRange_algebraMap_pi (fun v ↦ v.isNontrivial)
608+
fun _ _ h ↦ (eq_iff_isEquiv (K := K)).not.mp h
641609

642610
end NumberField.InfinitePlace

0 commit comments

Comments
 (0)