Documentation

Mathlib.Algebra.Order.Ring.Ordering.Defs

Ring orderings #

Let R be a commutative ring. We define orderings and preorderings on R as predicates on Subsemiring R.

Definitions #

All orderings are preorderings.

References #

structure Subsemiring.IsOrdering {R : Type u_1} [CommRing R] (S : Subsemiring R) :

An ordering O on a ring R is a subsemiring of R such that O ∪ -O = R and the support O ∩ -O of O forms a prime ideal.

Instances For
    structure Subsemiring.IsPreordering {R : Type u_1} [CommRing R] (S : Subsemiring R) :

    A preordering on a ring R is a subsemiring of R that contains all squares, but not -1.

    • mem_of_isSquare {x : R} (hx : IsSquare x) : x ∈ S
    • neg_one_notMem : -1 ∉ S
    Instances For
      @[simp]
      theorem Subsemiring.IsPreordering.mul_self_mem {R : Type u_1} [CommRing R] {S : Subsemiring R} (hS : S.IsPreordering) (x : R) :
      x * x ∈ S
      @[simp]
      theorem Subsemiring.IsPreordering.pow_two_mem {R : Type u_1} [CommRing R] {S : Subsemiring R} (hS : S.IsPreordering) (x : R) :
      x ^ 2 ∈ S
      theorem Subsemiring.IsPreordering.mem_of_isSumSq {R : Type u_1} [CommRing R] {S : Subsemiring R} (hS : S.IsPreordering) {x : R} (hx : IsSumSq x) :
      x ∈ S
      theorem Subsemiring.IsPreordering.of_sumSq_le {R : Type u_1} [CommRing R] {S : Subsemiring R} (hS : sumSq R ≤ S) (h : -1 ∉ S) :

      An ordering is a preordering.

      @[deprecated Subsemiring.IsPreordering (since := "2026-10-28")]
      structure RingPreordering (R : Type u_1) [CommRing R] extends Subsemiring R :
      Type u_1

      A preordering on a ring R is a subsemiring of R containing all squares, but not containing -1.

      Instances For
        @[deprecated "no replacement" (since := "2026-10-28")]
        theorem RingPreordering.ext_iff {R : Type u_1} {inst✝ : CommRing R} {x y : RingPreordering R} :
        x = y ↔ (↑x).carrier = (↑y).carrier
        theorem RingPreordering.ext {R : Type u_1} {inst✝ : CommRing R} {x y : RingPreordering R} (carrier : (↑x).carrier = (↑y).carrier) :
        x = y
        @[instance_reducible, deprecated "no replacement" (since := "2026-10-28")]
        Equations
        @[instance_reducible, deprecated "no replacement" (since := "2026-10-28")]
        Equations
        @[deprecated "no replacement" (since := "2026-10-28")]
        @[deprecated Subsemiring.IsPreordering.mem_of_isSquare (since := "2026-10-28")]
        theorem RingPreordering.mem_of_isSquare {R : Type u_1} [CommRing R] (P : RingPreordering R) {x : R} (hx : IsSquare x) :
        x ∈ P
        @[simp, deprecated Subsemiring.IsPreordering.mul_self_mem (since := "2026-10-28")]
        theorem RingPreordering.mul_self_mem {R : Type u_1} [CommRing R] (P : RingPreordering R) (x : R) :
        x * x ∈ P
        @[simp, deprecated Subsemiring.IsPreordering.pow_two_mem (since := "2026-10-28")]
        theorem RingPreordering.pow_two_mem {R : Type u_1} [CommRing R] (P : RingPreordering R) (x : R) :
        x ^ 2 ∈ P
        @[deprecated Subsemiring.IsPreordering.neg_one_notMem (since := "2026-10-28")]
        theorem RingPreordering.neg_one_notMem {R : Type u_1} [CommRing R] (P : RingPreordering R) :
        -1 ∉ P
        @[deprecated "no replacement" (since := "2026-10-28")]
        @[simp, deprecated "no replacement" (since := "2026-10-28")]
        theorem RingPreordering.toSubsemiring_inj {R : Type u_1} [CommRing R] {P₁ P₂ : RingPreordering R} :
        ↑P₁ = ↑P₂ ↔ P₁ = P₂
        @[simp, deprecated "no replacement" (since := "2026-10-28")]
        theorem RingPreordering.mem_toSubsemiring {R : Type u_1} [CommRing R] {P : RingPreordering R} {x : R} :
        x ∈ ↑P ↔ x ∈ P
        @[simp, deprecated "no replacement" (since := "2026-10-28")]
        theorem RingPreordering.coe_toSubsemiring {R : Type u_1} [CommRing R] (P : RingPreordering R) :
        ↑↑P = ↑P
        @[simp, deprecated "no replacement" (since := "2026-10-28")]
        theorem RingPreordering.mem_mk {R : Type u_1} [CommRing R] {toSubsemiring : Subsemiring R} (mem_of_isSquare : ∀ {x : R}, IsSquare x → x ∈ toSubsemiring.carrier) (neg_one_notMem : -1 ∉ toSubsemiring.carrier) {x : R} :
        x ∈ { toSubsemiring := toSubsemiring, mem_of_isSquare' := mem_of_isSquare, neg_one_notMem' := neg_one_notMem } ↔ x ∈ toSubsemiring
        @[simp, deprecated "no replacement" (since := "2026-10-28")]
        theorem RingPreordering.coe_set_mk {R : Type u_1} [CommRing R] (toSubsemiring : Subsemiring R) (mem_of_isSquare : ∀ {x : R}, IsSquare x → x ∈ toSubsemiring.carrier) (neg_one_notMem : -1 ∉ toSubsemiring.carrier) :
        ↑{ toSubsemiring := toSubsemiring, mem_of_isSquare' := mem_of_isSquare, neg_one_notMem' := neg_one_notMem } = ↑toSubsemiring
        @[deprecated "no replacement" (since := "2026-10-28")]
        def RingPreordering.copy {R : Type u_1} [CommRing R] (P : RingPreordering R) (S : Set R) (hS : S = ↑P) :

        Copy of a preordering with a new carrier equal to the old one. Useful to fix definitional equalities.

        Equations
        • P.copy S hS = { carrier := S, mul_mem' := ⋯, one_mem' := ⋯, add_mem' := ⋯, zero_mem' := ⋯, mem_of_isSquare' := ⋯, neg_one_notMem' := ⋯ }
        Instances For
          @[simp, deprecated "no replacement" (since := "2026-10-28")]
          theorem RingPreordering.coe_copy {R : Type u_1} [CommRing R] (P : RingPreordering R) (S : Set R) (hS : S = ↑P) :
          ↑(P.copy S hS) = S
          @[simp, deprecated "no replacement" (since := "2026-10-28")]
          theorem RingPreordering.mem_copy {R : Type u_1} [CommRing R] (P : RingPreordering R) (S : Set R) (hS : S = ↑P) {x : R} :
          x ∈ P.copy S hS ↔ x ∈ S
          @[deprecated "no replacement" (since := "2026-10-28")]
          theorem RingPreordering.copy_eq {R : Type u_1} [CommRing R] (P : RingPreordering R) (S : Set R) (hS : S = ↑P) :
          ↑(P.copy S hS) = S

          Support #

          @[deprecated AddSubmonoid.support (since := "2026-10-28")]

          The support of a ring preordering P in a commutative ring R is the set of elements x in R such that both x and -x lie in P.

          Equations
          Instances For
            @[deprecated AddSubmonoid.mem_support (since := "2026-10-28")]
            @[deprecated AddSubmonoid.coe_support (since := "2026-10-28")]
            @[deprecated "no replacement" (since := "2026-10-28")]

            Typeclass to track whether the support of a preordering forms an ideal.

            Instances
              @[deprecated "no replacement" (since := "2026-10-28")]
              theorem RingPreordering.hasIdealSupport_iff {R : Type u_1} [CommRing R] {P : RingPreordering R} :
              P.HasIdealSupport ↔ ∀ (x a : R), a ∈ P → -a ∈ P → x * a ∈ P ∧ -(x * a) ∈ P
              @[deprecated Subsemiring.supportIdeal (since := "2026-10-28")]
              @[deprecated Subsemiring.supportIdeal (since := "2026-10-28")]

              The support of a ring preordering P in a commutative ring R is the set of elements x in R such that both x and -x lie in P.

              Equations
              Instances For
                @[deprecated Subsemiring.mem_supportIdeal (since := "2026-10-28")]
                theorem RingPreordering.mem_support {R : Type u_1} [CommRing R] {P : RingPreordering R} [P.HasIdealSupport] {x : R} :
                x ∈ P.support ↔ x ∈ P ∧ -x ∈ P
                @[deprecated Subsemiring.coe_supportIdeal (since := "2026-10-28")]
                theorem RingPreordering.coe_support {R : Type u_1} [CommRing R] {P : RingPreordering R} [P.HasIdealSupport] :
                ↑P.support = ↑P ∩ -↑P
                @[simp, deprecated Subsemiring.supportIdeal_toAddSubgroup (since := "2026-10-28")]
                @[deprecated Subsemiring.IsOrdering (since := "2026-10-28")]

                An ordering O on a ring R is a preordering such that

                1. O contains either x or -x for each x in R and
                2. the support of O is a prime ideal.
                Instances