File size: 2,293 Bytes
cdec422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import Mathlib.RingTheory.Localization.AtPrime.Basic
import Mathlib.Algebra.Prime.Lemmas
import Mathlib.Data.Nat.Prime.Int

namespace OAI

universe uA

/-!
# Reflecting prime-power divisibility from the localized integers

A denominator inverted in the localization at `(p)` is not divisible by `p`.
Clearing that denominator and using primality therefore reflects divisibility
by every power of `p` back to the integers. The argument includes the zeroth
power and the zero numerator, without any nonzero numerator hypothesis.
-/

namespace CirculantHadamard

/-- Divisibility by a rational prime power in its actual integer localization
implies the same divisibility in the integers. -/
theorem integer_prime_pow_dvd_of_localization
    {A : Type uA} [CommRing A] [Algebra ℤ A]
    {P : Ideal ℤ} [P.IsPrime] [IsLocalization.AtPrime A P]
    {p : ℕ} (hp : p.Prime) (hP : P = Ideal.span ({(p : ℤ)} : Set ℤ))
    (t : ℕ) (x : ℤ) (hx : (p : A) ^ t ∣ algebraMap ℤ A x) :
    (p : ℤ) ^ t ∣ x := by
  obtain ⟨y, hy⟩ := hx
  obtain ⟨⟨a, s⟩, hs⟩ := IsLocalization.surj P.primeCompl y
  have hinj : Function.Injective (algebraMap ℤ A) :=
    IsLocalization.injective A P.primeCompl_le_nonZeroDivisors
  have hclear : x * (s : ℤ) = (p : ℤ) ^ t * a := by
    apply hinj
    rw [map_mul, map_mul, map_pow, map_natCast, hy, mul_assoc, hs]
  have hsprime : ¬ (p : ℤ) ∣ (s : ℤ) := by
    intro hdiv
    have hmem : (s : ℤ) ∈ Ideal.span ({(p : ℤ)} : Set ℤ) :=
      Ideal.mem_span_singleton.mpr hdiv
    exact s.property (hP.symm ▸ hmem)
  exact (Nat.prime_iff_prime_int.mp hp).pow_dvd_of_dvd_mul_right t hsprime
    ⟨a, hclear⟩

/-- Prime-power divisibility of integer coefficients is unchanged by
localization at that prime. -/
theorem integer_prime_pow_dvd_localization_iff
    {A : Type uA} [CommRing A] [Algebra ℤ A]
    {P : Ideal ℤ} [P.IsPrime] [IsLocalization.AtPrime A P]
    {p : ℕ} (hp : p.Prime) (hP : P = Ideal.span ({(p : ℤ)} : Set ℤ))
    (t : ℕ) (x : ℤ) :
    (p : A) ^ t ∣ algebraMap ℤ A x ↔ (p : ℤ) ^ t ∣ x := by
  constructor
  · exact integer_prime_pow_dvd_of_localization hp hP t x
  · intro hx
    simpa only [map_pow, map_natCast] using map_dvd (algebraMap ℤ A) hx

end CirculantHadamard

end OAI