File: Mathlib/Algebra/Star/Order.lean

full_name: StarOrderedRing.le_iff
code: /-- An ordered `*`-ring is a `*`ring with a partial order such that the nonnegative elements
constitute precisely the `AddSubmonoid` generated by elements of the form `star s * s`.

If you are working with a `NonUnitalRing` and not a `NonUnitalSemiring`, it may be more
convenient to declare instances using `StarOrderedRing.of_nonneg_iff`.

Porting note: dropped an unneeded assumption
`add_le_add_left : ∀ {x y}, x ≤ y → ∀ z, z + x ≤ z + y` -/
class StarOrderedRing (R : Type u) [NonUnitalSemiring R] [PartialOrder R]
    [StarRing R] : Prop where
  /-- characterization of the order in terms of the `StarRing` structure. -/
  le_iff :
    ∀ x y : R, x ≤ y ↔ ∃ p, p ∈ AddSubmonoid.closure (Set.range fun s => star s * s) ∧ y = x + p
goal: x ≤ y ↔ ∃ p ∈ AddSubmonoid.closure (Set.range fun s => star s * s), y = x + p

full_name: StarOrderedRing
code: /-- An ordered `*`-ring is a `*`ring with a partial order such that the nonnegative elements
constitute precisely the `AddSubmonoid` generated by elements of the form `star s * s`.

If you are working with a `NonUnitalRing` and not a `NonUnitalSemiring`, it may be more
convenient to declare instances using `StarOrderedRing.of_nonneg_iff`.

Porting note: dropped an unneeded assumption
`add_le_add_left : ∀ {x y}, x ≤ y → ∀ z, z + x ≤ z + y` -/
class StarOrderedRing (R : Type u) [NonUnitalSemiring R] [PartialOrder R]
    [StarRing R] : Prop where
  /-- characterization of the order in terms of the `StarRing` structure. -/
  le_iff :
    ∀ x y : R, x ≤ y ↔ ∃ p, p ∈ AddSubmonoid.closure (Set.range fun s => star s * s) ∧ y = x + p
goal: Prop

full_name: StarOrderedRing.toOrderedAddCommMonoid
code: instance (priority := 100) toOrderedAddCommMonoid [NonUnitalSemiring R] [PartialOrder R]
    [StarRing R] [StarOrderedRing R] : OrderedAddCommMonoid R 
goal: OrderedAddCommMonoid R

full_name: StarOrderedRing.toExistsAddOfLE
code: instance (priority := 100) toExistsAddOfLE [NonUnitalSemiring R] [PartialOrder R]
    [StarRing R] [StarOrderedRing R] : ExistsAddOfLE R 
goal: ExistsAddOfLE R

full_name: StarOrderedRing.toOrderedAddCommGroup
code: instance (priority := 100) toOrderedAddCommGroup [NonUnitalRing R] [PartialOrder R]
    [StarRing R] [StarOrderedRing R] : OrderedAddCommGroup R 
goal: OrderedAddCommGroup R

full_name: StarOrderedRing.of_le_iff
code: /-- To construct a `StarOrderedRing` instance it suffices to show that `x ≤ y` if and only if
`y = x + star s * s` for some `s : R`.

This is provided for convenience because it holds in some common scenarios (e.g.,`ℝ≥0`, `C(X, ℝ≥0)`)
and obviates the hassle of `AddSubmonoid.closure_induction` when creating those instances.

If you are working with a `NonUnitalRing` and not a `NonUnitalSemiring`, see
`StarOrderedRing.of_nonneg_iff` for a more convenient version.
 -/
lemma of_le_iff [NonUnitalSemiring R] [PartialOrder R] [StarRing R]
    (h_le_iff : ∀ x y : R, x ≤ y ↔ ∃ s, y = x + star s * s) : StarOrderedRing R 
goal: StarOrderedRing R

full_name: StarOrderedRing.of_nonneg_iff
code: /-- When `R` is a non-unital ring, to construct a `StarOrderedRing` instance it suffices to
show that the nonnegative elements are precisely those elements in the `AddSubmonoid` generated
by `star s * s` for `s : R`. -/
lemma of_nonneg_iff [NonUnitalRing R] [PartialOrder R] [StarRing R]
    (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y)
    (h_nonneg_iff : ∀ x : R, 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s : R => star s * s)) :
    StarOrderedRing R 
goal: StarOrderedRing R

full_name: StarOrderedRing.of_nonneg_iff'
code: /-- When `R` is a non-unital ring, to construct a `StarOrderedRing` instance it suffices to
show that the nonnegative elements are precisely those elements of the form `star s * s`
for `s : R`.

This is provided for convenience because it holds in many common scenarios (e.g.,`ℝ`, `ℂ`, or
any C⋆-algebra), and obviates the hassle of `AddSubmonoid.closure_induction` when creating those
instances. -/
lemma of_nonneg_iff' [NonUnitalRing R] [PartialOrder R] [StarRing R]
    (h_add : ∀ {x y : R}, x ≤ y → ∀ z, z + x ≤ z + y)
    (h_nonneg_iff : ∀ x : R, 0 ≤ x ↔ ∃ s, x = star s * s) : StarOrderedRing R 
goal: StarOrderedRing R

full_name: StarOrderedRing.nonneg_iff
code: theorem nonneg_iff [NonUnitalSemiring R] [PartialOrder R] [StarRing R] [StarOrderedRing R] {x : R} :
    0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s : R => star s * s) 
goal: 0 ≤ x ↔ x ∈ AddSubmonoid.closure (Set.range fun s => star s * s)

full_name: star_mul_self_nonneg
code: theorem star_mul_self_nonneg (r : R) : 0 ≤ star r * r 
goal: 0 ≤ star r * r

full_name: mul_star_self_nonneg
code: theorem mul_star_self_nonneg (r : R) : 0 ≤ r * star r 
goal: 0 ≤ r * star r

full_name: conjugate_nonneg
code: theorem conjugate_nonneg {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ star c * a * c 
goal: 0 ≤ star c * a * c

full_name: conjugate_nonneg'
code: theorem conjugate_nonneg' {a : R} (ha : 0 ≤ a) (c : R) : 0 ≤ c * a * star c 
goal: 0 ≤ c * a * star c

full_name: conjugate_le_conjugate
code: theorem conjugate_le_conjugate {a b : R} (hab : a ≤ b) (c : R) :
    star c * a * c ≤ star c * b * c 
goal: star c * a * c ≤ star c * b * c

full_name: conjugate_le_conjugate'
code: theorem conjugate_le_conjugate' {a b : R} (hab : a ≤ b) (c : R) :
    c * a * star c ≤ c * b * star c 
goal: c * a * star c ≤ c * b * star c

full_name: star_le_star_iff
code: @[simp]
lemma star_le_star_iff {x y : R} : star x ≤ star y ↔ x ≤ y 
goal: star x ≤ star y ↔ x ≤ y

full_name: star_lt_star_iff
code: @[simp]
lemma star_lt_star_iff {x y : R} : star x < star y ↔ x < y 
goal: star x < star y ↔ x < y

full_name: star_le_iff
code: lemma star_le_iff {x y : R} : star x ≤ y ↔ x ≤ star y 
goal: star x ≤ y ↔ x ≤ star y

full_name: star_lt_iff
code: lemma star_lt_iff {x y : R} : star x < y ↔ x < star y 
goal: star x < y ↔ x < star y

full_name: star_nonneg_iff
code: @[simp]
lemma star_nonneg_iff {x : R} : 0 ≤ star x ↔ 0 ≤ x 
goal: 0 ≤ star x ↔ 0 ≤ x

full_name: star_nonpos_iff
code: @[simp]
lemma star_nonpos_iff {x : R} : star x ≤ 0 ↔ x ≤ 0 
goal: star x ≤ 0 ↔ x ≤ 0

full_name: star_pos_iff
code: @[simp]
lemma star_pos_iff {x : R} : 0 < star x ↔ 0 < x 
goal: 0 < star x ↔ 0 < x

full_name: star_neg_iff
code: @[simp]
lemma star_neg_iff {x : R} : star x < 0 ↔ x < 0 
goal: star x < 0 ↔ x < 0

full_name: IsSelfAdjoint.mono
code: lemma IsSelfAdjoint.mono {x y : R} (h : x ≤ y) (hx : IsSelfAdjoint x) : IsSelfAdjoint y 
goal: IsSelfAdjoint y

full_name: IsSelfAdjoint.of_nonneg
code: @[aesop 10% apply]
lemma IsSelfAdjoint.of_nonneg {x : R} (hx : 0 ≤ x) : IsSelfAdjoint x 
goal: IsSelfAdjoint x

full_name: conjugate_lt_conjugate
code: theorem conjugate_lt_conjugate {a b : R} (hab : a < b) {c : R} (hc : IsRegular c) :
    star c * a * c < star c * b * c 
goal: star c * a * c < star c * b * c

full_name: conjugate_lt_conjugate'
code: theorem conjugate_lt_conjugate' {a b : R} (hab : a < b) {c : R} (hc : IsRegular c) :
    c * a * star c < c * b * star c 
goal: c * a * star c < c * b * star c

full_name: conjugate_pos
code: theorem conjugate_pos {a : R} (ha : 0 < a) {c : R} (hc : IsRegular c) : 0 < star c * a * c 
goal: 0 < star c * a * c

full_name: conjugate_pos'
code: theorem conjugate_pos' {a : R} (ha : 0 < a) {c : R} (hc : IsRegular c) : 0 < c * a * star c 
goal: 0 < c * a * star c

full_name: star_mul_self_pos
code: theorem star_mul_self_pos [Nontrivial R] {x : R} (hx : IsRegular x) : 0 < star x * x 
goal: 0 < star x * x

full_name: mul_star_self_pos
code: theorem mul_star_self_pos [Nontrivial R] {x : R} (hx : IsRegular x) : 0 < x * star x 
goal: 0 < x * star x

full_name: instZeroLEOneClass
code: instance : ZeroLEOneClass R 
goal: ZeroLEOneClass R

full_name: one_le_star_iff
code: @[simp]
lemma one_le_star_iff {x : R} : 1 ≤ star x ↔ 1 ≤ x 
goal: 1 ≤ star x ↔ 1 ≤ x

full_name: star_le_one_iff
code: @[simp]
lemma star_le_one_iff {x : R} : star x ≤ 1 ↔ x ≤ 1 
goal: star x ≤ 1 ↔ x ≤ 1

full_name: one_lt_star_iff
code: @[simp]
lemma one_lt_star_iff {x : R} : 1 < star x ↔ 1 < x 
goal: 1 < star x ↔ 1 < x

full_name: star_lt_one_iff
code: @[simp]
lemma star_lt_one_iff {x : R} : star x < 1 ↔ x < 1 
goal: star x < 1 ↔ x < 1

full_name: StarModule.smul_lt_smul_of_pos
code: lemma StarModule.smul_lt_smul_of_pos {a b : A} {c : R} (hab : a < b) (hc : 0 < c) :
    c • a < c • b 
goal: c • a < c • b

full_name: NonUnitalStarRingHom.map_le_map_of_map_star
code: lemma NonUnitalStarRingHom.map_le_map_of_map_star (f : R →⋆ₙ+* S) {x y : R} (hxy : x ≤ y) :
    f x ≤ f y 
goal: f x ≤ f y

full_name: StarRingHomClass.instOrderHomClass
code: instance (priority := 100) StarRingHomClass.instOrderHomClass [FunLike F R S]
    [NonUnitalSemiring R] [StarRing R] [StarOrderedRing R] [NonUnitalSemiring S]
    [StarRing S] [StarOrderedRing S] [NonUnitalRingHomClass F R S]
    [NonUnitalStarRingHomClass F R S] : OrderHomClass F R S 
goal: OrderHomClass F R S

full_name: StarRingEquivClass.instOrderIsoClass
code: instance (priority := 100) StarRingEquivClass.instOrderIsoClass [EquivLike F R S]
    [StarRingEquivClass F R S] : OrderIsoClass F R S 
goal: OrderIsoClass F R S

full_name: Nat.instStarOrderedRing
code: instance Nat.instStarOrderedRing : StarOrderedRing ℕ 
goal: StarOrderedRing ℕ