Documentation

Atlas.ArithmeticGeometry.code.PadicNumbers

structure InverseLimit.NatInverseSystem :
Type (u_1 + 1)

A countable inverse system: a sequence of types obj n together with transition maps map n : obj (n + 1) → obj n.

Instances For

    The inverse limit of a NatInverseSystem $S$: coherent sequences $(a_n)$ with $a_n \in S_n$ and $S.\mathrm{map}\,n\,(a_{n+1}) = a_n$.

    Instances For

      Canonical projection $\mathrm{proj}_n : \mathrm{InverseLimit}\,S \to S_n$.

      Instances For
        theorem InverseLimit.NatInverseSystem.ext (S : NatInverseSystem) {a b : S.InverseLimit} (h : ∀ (n : ), S.proj n a = S.proj n b) :
        a = b

        Extensionality: two elements of the inverse limit agree iff they agree in every projection.

        theorem InverseLimit.NatInverseSystem.ext_iff {S : NatInverseSystem} {a b : S.InverseLimit} :
        a = b ∀ (n : ), S.proj n a = S.proj n b
        def InverseLimit.NatInverseSystem.lift (S : NatInverseSystem) {X : Type u_1} (g : (n : ) → XS.obj n) (hg : ∀ (n : ) (x : X), S.map n (g (n + 1) x) = g n x) :
        XS.InverseLimit

        Universal property (lift): a compatible family g n : X → S.obj n factors through the inverse limit.

        Instances For
          theorem InverseLimit.NatInverseSystem.proj_lift (S : NatInverseSystem) {X : Type u_1} (g : (n : ) → XS.obj n) (hg : ∀ (n : ) (x : X), S.map n (g (n + 1) x) = g n x) (n : ) (x : X) :
          S.proj n (S.lift g hg x) = g n x

          Computational rule for lift: projecting the lifted map recovers the original family.

          theorem InverseLimit.NatInverseSystem.lift_unique (S : NatInverseSystem) {X : Type u_1} (g : (n : ) → XS.obj n) (hg : ∀ (n : ) (x : X), S.map n (g (n + 1) x) = g n x) (φ : XS.InverseLimit) ( : ∀ (n : ) (x : X), S.proj n (φ x) = g n x) :
          φ = S.lift g hg

          Uniqueness of the lift: any map into the inverse limit whose projections agree with g is equal to S.lift g hg.

          A countable inverse system of commutative rings: a sequence of CommRings with ring homomorphism transition maps.

          Instances For

            The inverse limit of a NatRingInverseSystem realized as a subring of the product $\prod_n S_n$, consisting of coherent sequences.

            Instances For
              @[reducible, inline]

              The inverse limit of a NatRingInverseSystem as a commutative ring (alias for the subring invLimSubring).

              Instances For

                The $n$-th projection ring homomorphism InverseLimitRing →+* S.obj n.

                Instances For

                  The NatInverseSystem whose $n$-th object is $\mathbb{Z}/p^{n+1}\mathbb{Z}$ and whose transition maps are reduction modulo $p^{n+1}$ to $p^n$.

                  Instances For

                    The NatRingInverseSystem whose $n$-th object is the commutative ring $\mathbb{Z}/p^{n+1}\mathbb{Z}$ with reduction ring homomorphisms.

                    Instances For
                      structure DiscreteValuation (R : Type u_1) [CommRing R] :
                      Type u_1

                      Definition 4.18 (discrete valuation): a function $v : R \to \mathbb{Z} \cup \{\infty\}$ satisfying $v(a) = \infty \iff a = 0$, $v(ab) = v(a) + v(b)$, and the ultrametric inequality $\min(v(a), v(b)) \le v(a + b)$.

                      Instances For
                        @[implicit_reducible]
                        @[simp]
                        theorem DiscreteValuation.coe_mk {R : Type u_1} [CommRing R] (f : RWithTop ) (h1 : ∀ (a : R), f a = a = 0) (h2 : ∀ (a b : R), f (a * b) = f a + f b) (h3 : ∀ (a b : R), min (f a) (f b) f (a + b)) :
                        { val := f, val_eq_top_iff := h1, val_mul := h2, val_add := h3 }.val = f

                        Definitional unfolding: the coercion of the anonymous constructor ⟨f, h1, h2, h3⟩ to a function is f itself.

                        theorem DiscreteValuation.ext {R : Type u_1} [CommRing R] {v w : DiscreteValuation R} (h : ∀ (x : R), v.val x = w.val x) :
                        v = w

                        Extensionality for discrete valuations: agreement pointwise on $R$ implies equality.

                        theorem DiscreteValuation.ext_iff {R : Type u_1} [CommRing R] {v w : DiscreteValuation R} :
                        v = w ∀ (x : R), v.val x = w.val x
                        @[simp]

                        A discrete valuation sends $0$ to $\infty$.

                        def PadicIntegers.zmodInvLimSubring (p : ) :
                        Subring ((n : ) → ZMod (p ^ n))

                        The subring of $\prod_n \mathbb{Z}/p^n\mathbb{Z}$ consisting of compatible sequences with respect to all reduction maps $\mathbb{Z}/p^n\mathbb{Z} \to \mathbb{Z}/p^m\mathbb{Z}$ for $m \le n$. This is the explicit inverse-limit model for $\mathbb{Z}_p$.

                        Instances For

                          The $n$-th projection ring homomorphism from zmodInvLimSubring to $\mathbb{Z}/p^n\mathbb{Z}$.

                          Instances For
                            theorem PadicIntegers.invLimProj_compat (p m n : ) (h : m n) :
                            (ZMod.castHom (ZMod (p ^ m))).comp (invLimProj p n) = invLimProj p m

                            Compatibility of the projections: the reduction $\mathbb{Z}/p^n\mathbb{Z} \to \mathbb{Z}/p^m\mathbb{Z}$ composed with invLimProj p n equals invLimProj p m for $m \le n$.

                            noncomputable def PadicIntegers.padicIntToInvLim (p : ) [hp : Fact (Nat.Prime p)] :

                            Forward map of the isomorphism $\mathbb{Z}_p \simeq \varprojlim \mathbb{Z}/p^n\mathbb{Z}$: sends $x \in \mathbb{Z}_p$ to the compatible sequence of its reductions modulo $p^n$.

                            Instances For

                              Inverse map of the isomorphism $\mathbb{Z}_p \simeq \varprojlim \mathbb{Z}/p^n\mathbb{Z}$: obtained via the universal property PadicInt.lift from the family of compatible projections.

                              Instances For

                                Theorem 4.6 (inverse-limit description): the ring isomorphism $\mathbb{Z}_p \simeq \varprojlim_n \mathbb{Z}/p^n\mathbb{Z}$.

                                Instances For
                                  @[reducible]
                                  noncomputable def PadicIntegers.padicInt_commRing (p : ) [hp : Fact (Nat.Prime p)] :

                                  Reducible alias for the commutative ring structure on $\mathbb{Z}_p$.

                                  Instances For
                                    @[reducible, inline]

                                    The group of units of $\mathbb{Z}_p$, abbreviated padicUnits p.

                                    Instances For
                                      @[implicit_reducible]
                                      noncomputable instance PadicUnits.instGroupPadicUnits (p : ) [Fact (Nat.Prime p)] :
                                      @[implicit_reducible]
                                      noncomputable def PadicInt.padicDigit {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (n : ) :

                                      The $n$-th digit in the $p$-adic expansion of $a \in \mathbb{Z}_p$, defined via the PadicInt.appr natural-number approximation.

                                      Instances For
                                        theorem PadicInt.padicDigit_lt {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (n : ) :

                                        Each $p$-adic digit lies in $\{0, 1, \ldots, p-1\}$.

                                        noncomputable def PadicInt.padicExpansion {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (n : ) :
                                        Fin p

                                        The $p$-adic expansion of $a \in \mathbb{Z}_p$ as a sequence valued in Fin p, packaging padicDigit together with the bound padicDigit_lt.

                                        Instances For
                                          theorem PadicInt.padicDigit_mul_pow {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (n : ) :
                                          a.padicDigit n * p ^ n = a.appr (n + 1) - a.appr n

                                          Reconstruction relation: the digit times $p^n$ equals the difference of consecutive approximations of $a$.

                                          theorem PadicInt.appr_succ_eq {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (n : ) :
                                          a.appr (n + 1) = a.appr n + a.padicDigit n * p ^ n

                                          Successor relation for approximations: $a_{n+1} = a_n + d_n \cdot p^n$, where $d_n$ is the $n$-th $p$-adic digit.

                                          theorem PadicInt.appr_eq_sum_padicDigit {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (n : ) :
                                          a.appr n = kFinset.range n, a.padicDigit k * p ^ k

                                          Closed-form for the approximation: $a_n = \sum_{k<n} d_k\,p^k$.

                                          noncomputable def PadicInt.digitPartialSum {p : } (b : Fin p) (n : ) :

                                          Given a sequence of digits $b : \mathbb{N} \to \mathrm{Fin}\,p$, the partial sum $\sum_{k<n} b_k\,p^k \in \mathbb{Z}$.

                                          Instances For
                                            theorem PadicInt.digitPartialSum_nonneg {p : } (b : Fin p) (n : ) :

                                            The digit partial sum is nonnegative.

                                            theorem PadicInt.digitPartialSum_lt {p : } (b : Fin p) (n : ) :
                                            digitPartialSum b n < p ^ n

                                            The partial sum is strictly bounded by $p^n$.

                                            theorem PadicInt.padicExpansion_surjective {p : } [hp : Fact (Nat.Prime p)] (b : Fin p) :
                                            ∃ (x : ℤ_[p]), ∀ (n : ), x.padicExpansion n = b n

                                            Surjectivity of padicExpansion: every sequence $(b_n)_{n \in \mathbb{N}}$ with $b_n \in \{0, \ldots, p - 1\}$ arises as the digit sequence of some $x \in \mathbb{Z}_p$.

                                            Injectivity of padicExpansion: two $p$-adic integers with the same digit sequence are equal.

                                            Theorem 4.6 (bijection between $p$-adic expansions and $\mathbb{Z}_p$): the digit-extraction map padicExpansion : ℤ_[p] → (ℕ → Fin p) is a bijection.

                                            A discrete valuation ring is a principal ideal ring.

                                            A discrete valuation ring is a local ring.

                                            $\mathbb{Z}_p$ is a discrete valuation ring.

                                            The reduction $\mathbb{Z}_p \twoheadrightarrow \mathbb{Z}/p^m\mathbb{Z}$ is surjective.

                                            theorem PadicInt.exact_mul_pow_p_toZModPow {p : } [hp : Fact (Nat.Prime p)] (m : ) :
                                            (Set.range fun (a : ℤ_[p]) => p ^ m * a) = (RingHom.ker (toZModPow m))

                                            Exactness statement: the image of multiplication by $p^m$ on $\mathbb{Z}_p$ coincides with the kernel of the reduction toZModPow m.

                                            noncomputable def PadicInt.quotientSpanPowPEquivZMod {p : } [hp : Fact (Nat.Prime p)] (m : ) :

                                            Ring isomorphism $\mathbb{Z}_p / (p^m) \simeq \mathbb{Z}/p^m\mathbb{Z}$ obtained from the first isomorphism theorem applied to toZModPow m.

                                            Instances For
                                              noncomputable def PadicInt.corollary_4_9 (p : ) [Fact (Nat.Prime p)] (m : ) :

                                              Corollary 4.9: the ring isomorphism $\mathbb{Z}_p / (p^m) \simeq \mathbb{Z}/p^m\mathbb{Z}$.

                                              Instances For
                                                noncomputable def padicValuationDef {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) :

                                                The $p$-adic valuation on $\mathbb{Z}_p$ extended to $\mathbb{N} \cup \{\infty\}$: $v(0) = \infty$ and $v(a) = \mathrm{PadicInt.valuation}(a)$ otherwise.

                                                Instances For
                                                  @[simp]

                                                  $v(0) = \infty$.

                                                  @[simp]
                                                  theorem padicValuationDef_of_ne_zero {p : } [hp : Fact (Nat.Prime p)] {a : ℤ_[p]} (ha : a 0) :

                                                  For nonzero $a$, the extended valuation agrees with the natural-number-valued PadicInt.valuation.

                                                  theorem padicValuationDef_ne_top {p : } [hp : Fact (Nat.Prime p)] {a : ℤ_[p]} (ha : a 0) :

                                                  A nonzero $p$-adic integer has finite valuation.

                                                  theorem padicValuationDef_mul {p : } [hp : Fact (Nat.Prime p)] {a b : ℤ_[p]} (ha : a 0) (hb : b 0) :

                                                  Multiplicativity of the valuation: $v(ab) = v(a) + v(b)$ when both $a, b$ are nonzero.

                                                  Ultrametric inequality: $\min(v(a), v(b)) \le v(a + b)$.

                                                  Corollary 4.13 (part): $\mathbb{Z}_p$ is an integral domain.

                                                  theorem unit_valuation_zero {p : } [hp : Fact (Nat.Prime p)] (u : ℤ_[p]ˣ) :
                                                  (↑u).valuation = 0

                                                  Any unit of $\mathbb{Z}_p$ has valuation $0$.

                                                  theorem thm_4_15_units_valuation {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (ha : a 0) :

                                                  Theorem 4.15 (units): a nonzero $a \in \mathbb{Z}_p$ is a unit if and only if its valuation is zero.

                                                  theorem thm_4_15_unique_factorization {p : } [hp : Fact (Nat.Prime p)] (a : ℤ_[p]) (ha : a 0) :
                                                  ∃! nu : × ℤ_[p]ˣ, a = p ^ nu.1 * nu.2

                                                  Theorem 4.15 (unique factorization): every nonzero $a \in \mathbb{Z}_p$ admits a unique factorization $a = p^n \cdot u$ with $n \in \mathbb{N}$ and $u \in \mathbb{Z}_p^\times$.

                                                  theorem thm_4_16_nonzero_ideal_span_pow {p : } [hp : Fact (Nat.Prime p)] (I : Ideal ℤ_[p]) (hI : I ) :
                                                  ∃ (m : ), I = Ideal.span {p ^ m}

                                                  Theorem 4.16: every nonzero ideal of $\mathbb{Z}_p$ is of the form $(p^m)$ for some $m \in \mathbb{N}$.

                                                  Corollary 4.17 (part): $\mathbb{Z}_p$ is a principal ideal ring.

                                                  Corollary 4.17 (part): $\mathbb{Z}_p$ is a local ring.