The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V06. Rings, fields and ordered algebra

Mathlib.Algebra.Ring.IsFormallyReal

21 declarations and 1 deprecated aliases. Mathlib docs · Source

Formally real rings

A ring R is formally real if, whenever ∑ i, x i ^ 2 = 0, in fact x i = 0 for all i.

We define formally real rings in an index-free manner using the inductive predicate IsSumNonzeroSq, which asserts that an element is a finite sum of squares of nonzero elements. A ring is then formally real if ¬ IsSumNonzeroSq 0.

Main declaration

  • IsFormallyReal: typeclass stating that a ring is formally real.

ctor IsSumNonzeroSq.below.sq_add E0 #

∀ {R : Type u_1} [inst : Mul R] [inst_1 : Add R] [inst_2 : Zero R] {motive : (a : R) → IsSumNonzeroSq a → Prop}
  {a s : R} (ha : a ≠ 0) (hs : IsSumNonzeroSq s), IsSumNonzeroSq.below hs → motive s hs → IsSumNonzeroSq.below ⋯

ctor IsSumNonzeroSq.below.sq E0 #

∀ {R : Type u_1} [inst : Mul R] [inst_1 : Add R] [inst_2 : Zero R] {motive : (a : R) → IsSumNonzeroSq a → Prop} {a : R}
  (ha : a ≠ 0), IsSumNonzeroSq.below ⋯

inductive IsSumNonzeroSq E1 #

{R : Type u_1} → [Mul R] → [Add R] → [Zero R] → R → Prop

The property of being a sum of squares of nonzero elements (S) is defined inductively by: a * a : R is (S) for all nonzero a, and if s : R is (S), and a ≠ 0, then a * a + s is (S).

theorem isSumNonzeroSq_iff E0 #

∀ {R : Type u_1} [inst : Mul R] [inst_1 : Add R] [inst_2 : Zero R] (a : R),
  IsSumNonzeroSq a ↔ (∃ a_1, a_1 ≠ 0 ∧ a = a_1 * a_1) ∨ ∃ a_1 s, a_1 ≠ 0 ∧ IsSumNonzeroSq s ∧ a = a_1 * a_1 + s

ctor IsSumNonzeroSq.sq E0 #

∀ {R : Type u_1} [inst : Mul R] [inst_1 : Add R] [inst_2 : Zero R] {a : R}, a ≠ 0 → IsSumNonzeroSq (a * a)

ctor IsSumNonzeroSq.sq_add E0 #

∀ {R : Type u_1} [inst : Mul R] [inst_1 : Add R] [inst_2 : Zero R] {a s : R},
  a ≠ 0 → IsSumNonzeroSq s → IsSumNonzeroSq (a * a + s)

theorem IsSumNonzeroSq.add E1 #

∀ {R : Type u_1} [inst : AddMonoid R] [inst_1 : Mul R] {s₁ s₂ : R},
  IsSumNonzeroSq s₁ → IsSumNonzeroSq s₂ → IsSumNonzeroSq (s₁ + s₂)

theorem IsSumNonzeroSq.isSumSq E1 #

∀ {R : Type u_1} [inst : AddMonoid R] [inst_1 : Mul R] {s : R}, IsSumNonzeroSq s → IsSumSq s

theorem isSumNonzeroSq_iff_isSumSq E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocSemiring R] {s : R}, s ≠ 0 → (IsSumNonzeroSq s ↔ IsSumSq s)

theorem IsSumSq.isSumNonzeroSq_of_ne_zero E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocSemiring R] {s : R}, s ≠ 0 → IsSumSq s → IsSumNonzeroSq s

Alias of the reverse direction of isSumNonzeroSq_iff_isSumSq.

def AddSubsemigroup.sumNonzeroSq E1 #

(R : Type u_1) → [inst : AddMonoid R] → [Mul R] → AddSubsemigroup R

The subsemigroup of sums of squares of nonzero elements.

theorem AddSubsemigroup.coe_sumNonzeroSq E0 #

∀ (R : Type u_1) [inst : AddMonoid R] [inst_1 : Mul R], ↑(AddSubsemigroup.sumNonzeroSq R) = {s | IsSumNonzeroSq s}

theorem AddSubsemigroup.mem_sumNonzeroSq E0 #

∀ {R : Type u_1} [inst : AddMonoid R] [inst_1 : Mul R] {s : R}, s ∈ AddSubsemigroup.sumNonzeroSq R ↔ IsSumNonzeroSq s

theorem AddSubsemigroup.closure_mul_self E0 #

∀ {R : Type u_1} [inst : AddMonoid R] [inst_1 : Mul R],
  AddSubsemigroup.closure {x | ∃ x_1, x_1 ≠ 0 ∧ x_1 * x_1 = x} = AddSubsemigroup.sumNonzeroSq R

class IsFormallyReal E3 #

(R : Type u_1) → [AddCommMonoid R] → [Mul R] → Prop

A ring is formally real if, whenever ∑ i, x i ^ 2 = 0, we in fact have x i = 0 for all i.

ctor IsFormallyReal.mk E0 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Mul R], ¬IsSumNonzeroSq 0 → IsFormallyReal R

theorem IsFormallyReal.not_isSumNonzeroSq_zero E1 #

∀ {R : Type u_1} {inst : AddCommMonoid R} {inst_1 : Mul R} [self : IsFormallyReal R], ¬IsSumNonzeroSq 0

theorem IsFormallyReal.of_eq_zero_of_mul_self_of_eq_zero_of_add E1 #

∀ {R : Type u_1} [inst : AddCommMonoid R] [inst_1 : Mul R],
  (∀ {a : R}, a * a = 0 → a = 0) → (∀ {s₁ s₂ : R}, IsSumSq s₁ → IsSumSq s₂ → s₁ + s₂ = 0 → s₁ = 0) → IsFormallyReal R

theorem IsFormallyReal.of_eq_zero_of_mul_self_add E1 #

∀ {R : Type u_1} [inst : NonUnitalNonAssocSemiring R],
  (∀ {s a : R}, IsSumSq s → a * a + s = 0 → a = 0) → IsFormallyReal R

instance IsFormallyReal.instOfIsStrictOrderedRing E0 #

∀ {R : Type u_1} [inst : Ring R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R], IsFormallyReal R

instance IsFormallyReal.instIsReduced E0 #

∀ {R : Type u_1} [inst : Ring R] [IsFormallyReal R], IsReduced R

Deprecated aliases

NameNew nameSince
IsFormallyReal.of_eq_zero_of_eq_zero_of_mul_self_addIsFormallyReal.of_eq_zero_of_mul_self_add2026-11-24