Documentation

Mathlib.Algebra.Order.Ring.StandardPart

Standard part function #

Given a finite element in a non-archimedean field, the standard part function rounds it to the unique closest real number. That is, it chops off any infinitesimals.

Let K be a linearly ordered field. The subset of finite elements (i.e. those bounded by a natural number) is a ValuationSubring, which means we can construct its residue field FiniteResidueField, roughly corresponding to the finite elements quotiented by infinitesimals. This field inherits a LinearOrder instance, which makes it into an Archimedean linearly ordered field, meaning we can uniquely embed it in the reals.

Given a finite element of the field, the ArchimedeanClass.stdPart function returns the real number corresponding to this unique embedding. This function generalizes, among other things, the standard part function on Hyperreal.

References #

Finite residue field #

noncomputable def ArchimedeanClass.FiniteElement (K : Type u_1) [LinearOrder K] [Field K] [IsOrderedRing K] :
Type u_1

The valuation subring of elements in non-negative Archimedean classes, i.e. elements bounded by some natural number.

Equations
Instances For
    @[simp]
    theorem ArchimedeanClass.FiniteElement.val_add {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : FiniteElement K) :
    ↑(x + y) = x + y
    @[simp]
    theorem ArchimedeanClass.FiniteElement.val_sub {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : FiniteElement K) :
    ↑(x - y) = x - y
    @[simp]
    theorem ArchimedeanClass.FiniteElement.val_mul {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : FiniteElement K) :
    ↑(x * y) = x * y
    theorem ArchimedeanClass.FiniteElement.ext {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : FiniteElement K} (h : x = y) :
    x = y

    The constructor for FiniteElement.

    Equations
    Instances For
      @[simp]
      @[deprecated ArchimedeanClass.FiniteElement.neg_mk (since := "2025-12-24")]

      Alias of ArchimedeanClass.FiniteElement.neg_mk.

      @[simp]
      theorem ArchimedeanClass.FiniteElement.mk_add_mk {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : K) (hx : 0 mk x) (hy : 0 mk y) :
      @[simp]
      theorem ArchimedeanClass.FiniteElement.mk_sub_mk {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : K) (hx : 0 mk x) (hy : 0 mk y) :
      @[simp]
      theorem ArchimedeanClass.FiniteElement.mk_mul_mk {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : K) (hx : 0 mk x) (hy : 0 mk y) :
      @[simp]
      theorem ArchimedeanClass.FiniteElement.mk_le_mk {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : K) (hx : 0 mk x) (hy : 0 mk y) :
      @[simp]
      theorem ArchimedeanClass.FiniteElement.mk_lt_mk {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x y : K) (hx : 0 mk x) (hy : 0 mk y) :

      The residue field of FiniteElement. This quotient inherits an order from K, which makes it into a linearly ordered Archimedean field.

      Equations
      Instances For
        @[implicit_reducible]
        Equations
        • One or more equations did not get rendered due to their size.

        The quotient map from finite elements on the field to the associated residue field.

        Equations
        Instances For
          theorem ArchimedeanClass.FiniteResidueField.ind {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {motive : FiniteResidueField KProp} (mk : ∀ (x : FiniteElement K), motive (mk x)) (x : FiniteResidueField K) :
          motive x
          @[simp]

          An embedding from an Archimedean field into K induces an embedding into FiniteResidueField K.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Standard part #

            noncomputable def ArchimedeanClass.stdPart {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x : K) :

            The standard part of a FiniteElement is the unique real number with an infinitesimal difference.

            For any infinite inputs, this function outputs a junk value of 0.

            Equations
            Instances For
              @[simp]
              theorem ArchimedeanClass.stdPart_eq_zero {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} :
              stdPart x = 0 mk x 0
              theorem ArchimedeanClass.stdPart_of_mk_ne_zero {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} :
              mk x 0stdPart x = 0

              Alias of the reverse direction of ArchimedeanClass.stdPart_eq_zero.

              @[simp]
              theorem ArchimedeanClass.stdPart_neg {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (x : K) :
              theorem ArchimedeanClass.stdPart_add {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hx : 0 mk x) (hy : 0 mk y) :
              theorem ArchimedeanClass.stdPart_add_eq_right {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hx : 0 < mk x) :
              stdPart (x + y) = stdPart y
              theorem ArchimedeanClass.stdPart_add_eq_left {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hy : 0 < mk y) :
              stdPart (x + y) = stdPart x
              theorem ArchimedeanClass.stdPart_sub {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hx : 0 mk x) (hy : 0 mk y) :
              theorem ArchimedeanClass.stdPart_sub_eq_right {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hx : 0 < mk x) :
              theorem ArchimedeanClass.stdPart_sub_eq_left {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hy : 0 < mk y) :
              stdPart (x - y) = stdPart x
              theorem ArchimedeanClass.stdPart_mul {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hx : 0 mk x) (hy : 0 mk y) :
              theorem ArchimedeanClass.stdPart_div {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x y : K} (hx : 0 mk x) (hy : 0 -mk y) :
              @[simp]
              theorem ArchimedeanClass.stdPart_ratCast {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (q : ) :
              stdPart q = q
              @[simp]
              theorem ArchimedeanClass.stdPart_intCast {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (n : ) :
              stdPart n = n
              @[simp]
              theorem ArchimedeanClass.stdPart_natCast {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (n : ) :
              stdPart n = n
              @[simp]
              theorem ArchimedeanClass.stdPart_map_real {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (f : →+*o K) (r : ) :
              stdPart (f r) = r
              theorem ArchimedeanClass.stdPart_nonneg {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (h : 0 x) :
              theorem ArchimedeanClass.stdPart_nonpos {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (h : x 0) :
              theorem ArchimedeanClass.mk_sub_pos_iff {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (f : →+*o K) {r : } (hx : 0 mk x) :
              0 < mk (x - f r) stdPart x = r

              The standard part of x is the unique real r such that x - r is infinitesimal.

              theorem ArchimedeanClass.mk_sub_stdPart_pos {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (f : →+*o K) (hx : 0 mk x) :
              0 < mk (x - f (stdPart x))
              theorem ArchimedeanClass.lt_of_lt_stdPart {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (f : →+*o K) {r : } (hx : 0 mk x) (h : r < stdPart x) :
              f r < x
              theorem ArchimedeanClass.lt_of_stdPart_lt {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (f : →+*o K) {r : } (hx : 0 mk x) (h : stdPart x < r) :
              x < f r
              theorem ArchimedeanClass.stdPart_le_of_le {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (f : →+*o K) {r : } (hx : 0 mk x) (h : x f r) :
              theorem ArchimedeanClass.le_stdPart_of_le {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (f : →+*o K) {r : } (hx : 0 mk x) (h : f r x) :
              theorem ArchimedeanClass.stdPart_eq {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] {x : K} (f : →+*o K) {r : } (hl : s < r, f s x) (hr : s > r, x f s) :
              theorem ArchimedeanClass.stdPart_eq_sInf {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (f : →+*o K) (x : K) :
              stdPart x = sInf {r : | x < f r}
              theorem ArchimedeanClass.stdPart_eq_sSup {K : Type u_1} [LinearOrder K] [Field K] [IsOrderedRing K] (f : →+*o K) (x : K) :
              stdPart x = sSup {r : | f r < x}