Module

RationalLocalization.lean

Nyll.AlgebraicCurves.Foundations.CommutativeAlgebra.RationalLocalization
13 declarations indexed from sourceView source ↗

Rational Localization

Declarations

Rat.LocalizationAt

The subring of ℚ whose denominators are prime to p; equivalently, the localization of ℤ at the prime ideal (p) when p is prime.

Source context 1 command

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
def LocalizationAt (p : ℕ) : Subring ℚ where
  carrier := {q : ℚ | q.den.Coprime p}
  mul_mem' {a b} ha hb :=
    Nat.Coprime.coprime_dvd_left (Rat.mul_den_dvd a b) (ha.mul_left hb)
  one_mem' := by simp
  add_mem' {a b} ha hb :=
    Nat.Coprime.coprime_dvd_left (Rat.add_den_dvd a b) (ha.mul_left hb)
  zero_mem' := by simp
  neg_mem' {a} ha := by simpa using ha
Rat.LocalizationAt.mem_iff_den_coprime
Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem mem_iff_den_coprime {p : ℕ} (q : ℚ) :
    q ∈ Rat.LocalizationAt p ↔ q.den.Coprime p
Rat.LocalizationAt.mem_iff_not_dvd_den
Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem mem_iff_not_dvd_den {p : ℕ} (hp : p.Prime) (q : ℚ) :
    q ∈ Rat.LocalizationAt p ↔ ¬p ∣ q.den
Rat.LocalizationAt.isUnit_iff_not_dvd_num
Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem isUnit_iff_not_dvd_num {p : ℕ} (hp : p.Prime) (x : Rat.LocalizationAt p) :
    IsUnit x ↔ ¬p ∣ (x : ℚ).num.natAbs
Rat.LocalizationAt.isLocalization

Rat.LocalizationAt p is the localization of ℤ at (p).

Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem isLocalization {p : ℕ} (hp : p.Prime)
    [(Ideal.span {(p : ℤ)}).IsPrime] :
    IsLocalization.AtPrime (Rat.LocalizationAt p) (Ideal.span {(p : ℤ)})
Rat.LocalizationAt.denominatorMonoid
Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
def denominatorMonoid (p : ℕ) : Submonoid ℤ where
  carrier := {z : ℤ | z ≠ 0 ∧ ((z : ℚ)⁻¹ ∈ Rat.LocalizationAt p)}
  one_mem' := by
    refine ⟨one_ne_zero, ?_⟩
    rw [Int.cast_one, inv_one, mem_iff_den_coprime]
    simp
  mul_mem' := by
    rintro a b ⟨ha0, ha⟩ ⟨hb0, hb⟩
    refine ⟨mul_ne_zero ha0 hb0, ?_⟩
    rw [Int.cast_mul, mul_inv]
    exact mul_mem ha hb
Rat.LocalizationAt.natCast_den_mem_denominatorMonoid
Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
lemma natCast_den_mem_denominatorMonoid {p : ℕ} {q : ℚ}
    (hq : q ∈ Rat.LocalizationAt p) : (q.den : ℤ) ∈ denominatorMonoid p
Rat.LocalizationAt.denominatorMonoid_isLocalization
Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
instance denominatorMonoid_isLocalization (p : ℕ) :
    IsLocalization (denominatorMonoid p) (Rat.LocalizationAt p)
Rat.LocalizationAt.isFractionRing

The rational localization has fraction field ℚ.

Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem isFractionRing (p : ℕ) : IsFractionRing (Rat.LocalizationAt p) ℚ
Rat.LocalizationAt.isPrincipalIdealRing

The rational localization is a principal ideal ring.

Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem isPrincipalIdealRing (p : ℕ) : IsPrincipalIdealRing (Rat.LocalizationAt p)
Rat.LocalizationAt.denominatorMonoid_eq_primeCompl
Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem denominatorMonoid_eq_primeCompl {p : ℕ} (hp : p.Prime)
    [(Ideal.span {(p : ℤ)}).IsPrime] :
    denominatorMonoid p = (Ideal.span {(p : ℤ)}).primeCompl
Rat.LocalizationAt.isDiscreteValuationRing

The rational localization at a prime is a discrete valuation ring.

Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem isDiscreteValuationRing (p : ℕ) (hp : p.Prime) :
    IsDiscreteValuationRing (Rat.LocalizationAt p)
Rat.LocalizationAt.irreducible_natCast

The image of p is a uniformizer in the rational localization at p.

Source context 2 commands

Surrounding namespaces, section variables, and local commands at this declaration.

namespace Rat
namespace LocalizationAt
theorem irreducible_natCast (p : ℕ) (hp : p.Prime) :
    Irreducible ((p : ℕ) : Rat.LocalizationAt p)