doc-next-gen

Mathlib.Algebra.Order.CauSeq.Completion

Module docstring

{"# Cauchy completion

This file generalizes the Cauchy completion of (ℚ, abs) to the completion of a ring with absolute value. "}

CauSeq.Completion.Cauchy definition
Full source
/-- The Cauchy completion of a ring with absolute value. -/
def Cauchy :=
  @Quotient (CauSeq _ abv) CauSeq.equiv
Cauchy completion of a ring with absolute value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. It is constructed as the quotient of the set of Cauchy sequences in $\beta$ by the equivalence relation that identifies two sequences if their difference tends to zero.
CauSeq.Completion.mk definition
: CauSeq _ abv → Cauchy abv
Full source
/-- The map from Cauchy sequences into the Cauchy completion. -/
def mk : CauSeq _ abv → Cauchy abv :=
  Quotient.mk''
Canonical map from Cauchy sequences to their completion
Informal description
The function maps a Cauchy sequence $f$ in the ring $\beta$ with respect to the absolute value $\text{abv}$ to its equivalence class in the Cauchy completion $\text{Cauchy}(\text{abv})$.
CauSeq.Completion.mk_eq_mk theorem
(f : CauSeq _ abv) : @Eq (Cauchy abv) ⟦f⟧ (mk f)
Full source
@[simp]
theorem mk_eq_mk (f : CauSeq _ abv) : @Eq (Cauchy abv) ⟦f⟧ (mk f) :=
  rfl
Equivalence Class of Cauchy Sequence Equals its Completion Image
Informal description
For any Cauchy sequence $f$ in the ring $\beta$ with respect to the absolute value $\text{abv}$, the equivalence class of $f$ in the Cauchy completion $\text{Cauchy}(\text{abv})$ is equal to the image of $f$ under the canonical map $\text{mk}$.
CauSeq.Completion.mk_eq theorem
{f g : CauSeq _ abv} : mk f = mk g ↔ f ≈ g
Full source
theorem mk_eq {f g : CauSeq _ abv} : mkmk f = mk g ↔ f ≈ g :=
  Quotient.eq
Equality in Cauchy Completion is Equivalent to Sequence Equivalence
Informal description
For any two Cauchy sequences $f$ and $g$ in the ring $\beta$ with respect to the absolute value $\text{abv}$, the equivalence classes of $f$ and $g$ in the Cauchy completion $\text{Cauchy}(\text{abv})$ are equal if and only if $f$ and $g$ are equivalent (i.e., their difference tends to zero). In symbols: $$[f] = [g] \leftrightarrow f \approx g$$
CauSeq.Completion.ofRat definition
(x : β) : Cauchy abv
Full source
/-- The map from the original ring into the Cauchy completion. -/
def ofRat (x : β) : Cauchy abv :=
  mk (const abv x)
Canonical embedding into Cauchy completion
Informal description
The canonical embedding of an element $x$ from the ring $\beta$ into its Cauchy completion with respect to the absolute value function $\text{abv} : \beta \to \alpha$. This is defined as the equivalence class of the constant Cauchy sequence where every term is equal to $x$.
CauSeq.Completion.instZeroCauchy instance
: Zero (Cauchy abv)
Full source
instance : Zero (Cauchy abv) :=
  ⟨ofRat 0⟩
Zero Element in Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$ has a zero element, where $\alpha$ is a linearly ordered field with a strict ordered ring structure.
CauSeq.Completion.instOneCauchy instance
: One (Cauchy abv)
Full source
instance : One (Cauchy abv) :=
  ⟨ofRat 1⟩
Multiplicative Identity in Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ has a canonical multiplicative identity element.
CauSeq.Completion.instInhabitedCauchy instance
: Inhabited (Cauchy abv)
Full source
instance : Inhabited (Cauchy abv) :=
  ⟨0⟩
Inhabited Type Structure on Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$ is an inhabited type, where $\alpha$ is a linearly ordered field with a strict ordered ring structure.
CauSeq.Completion.ofRat_zero theorem
: (ofRat 0 : Cauchy abv) = 0
Full source
theorem ofRat_zero : (ofRat 0 : Cauchy abv) = 0 :=
  rfl
Embedding of Zero in Cauchy Completion
Informal description
The canonical embedding of the zero element from the ring $\beta$ into its Cauchy completion with respect to the absolute value function $\text{abv} : \beta \to \alpha$ is equal to the zero element of the completion, i.e., $\text{ofRat}(0) = 0$.
CauSeq.Completion.ofRat_one theorem
: (ofRat 1 : Cauchy abv) = 1
Full source
theorem ofRat_one : (ofRat 1 : Cauchy abv) = 1 :=
  rfl
Embedding of One in Cauchy Completion
Informal description
The canonical embedding of the multiplicative identity $1$ from the ring $\beta$ into its Cauchy completion with respect to the absolute value function $\text{abv}$ is equal to the multiplicative identity in the completion, i.e., $\text{ofRat}(1) = 1$.
CauSeq.Completion.mk_eq_zero theorem
{f : CauSeq _ abv} : mk f = 0 ↔ LimZero f
Full source
@[simp]
theorem mk_eq_zero {f : CauSeq _ abv} : mkmk f = 0 ↔ LimZero f := by
  have : mkmk f = 0 ↔ LimZero (f - 0) := Quotient.eq
  rwa [sub_zero] at this
Characterization of Zero in Cauchy Completion: $\text{mk}(f) = 0 \leftrightarrow \text{LimZero}(f)$
Informal description
For a Cauchy sequence $f$ in a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$, the equivalence class of $f$ in the Cauchy completion is zero if and only if $f$ converges to zero. In other words, the canonical map $\text{mk}$ sends $f$ to $0$ if and only if $\text{LimZero}(f)$ holds.
CauSeq.Completion.instAddCauchy instance
: Add (Cauchy abv)
Full source
instance : Add (Cauchy abv) :=
  ⟨(Quotient.map₂ (· + ·)) fun _ _ hf _ _ hg => add_equiv_add hf hg⟩
Addition on the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equipped with an addition operation, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. This addition is defined by lifting the pointwise addition of Cauchy sequences to the quotient space of Cauchy sequences modulo equivalence (where two sequences are equivalent if their difference tends to zero).
CauSeq.Completion.mk_add theorem
(f g : CauSeq β abv) : mk f + mk g = mk (f + g)
Full source
@[simp]
theorem mk_add (f g : CauSeq β abv) : mk f + mk g = mk (f + g) :=
  rfl
Additivity of the Canonical Map in Cauchy Completion
Informal description
For any two Cauchy sequences $f$ and $g$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, the sum of their equivalence classes in the Cauchy completion is equal to the equivalence class of their pointwise sum. That is, $\text{mk}(f) + \text{mk}(g) = \text{mk}(f + g)$.
CauSeq.Completion.instNegCauchy instance
: Neg (Cauchy abv)
Full source
instance : Neg (Cauchy abv) :=
  ⟨(Quotient.map Neg.neg) fun _ _ hf => neg_equiv_neg hf⟩
Negation Operation on the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equipped with a negation operation, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. This operation is defined by lifting the pointwise negation of Cauchy sequences to the quotient space of equivalent Cauchy sequences.
CauSeq.Completion.mk_neg theorem
(f : CauSeq β abv) : -mk f = mk (-f)
Full source
@[simp]
theorem mk_neg (f : CauSeq β abv) : -mk f = mk (-f) :=
  rfl
Negation Preserved Under Cauchy Completion: $- [f] = [-f]$
Informal description
For any Cauchy sequence $f$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, the negation of its equivalence class in the Cauchy completion equals the equivalence class of its pointwise negation. That is, \[ -[f] = [-f], \] where $[f]$ denotes the equivalence class of $f$ in the Cauchy completion.
CauSeq.Completion.instMulCauchy instance
: Mul (Cauchy abv)
Full source
instance : Mul (Cauchy abv) :=
  ⟨(Quotient.map₂ (· * ·)) fun _ _ hf _ _ hg => mul_equiv_mul hf hg⟩
Multiplication on the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equipped with a multiplication operation, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. This operation is defined by lifting the pointwise multiplication of Cauchy sequences to the quotient space of equivalent Cauchy sequences.
CauSeq.Completion.mk_mul theorem
(f g : CauSeq β abv) : mk f * mk g = mk (f * g)
Full source
@[simp]
theorem mk_mul (f g : CauSeq β abv) : mk f * mk g = mk (f * g) :=
  rfl
Multiplication in Cauchy Completion Preserves Pointwise Product
Informal description
Let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any two Cauchy sequences $f, g$ in $\text{CauSeq}(\beta, \text{abv})$, the product of their equivalence classes in the Cauchy completion $\text{Cauchy}(\text{abv})$ equals the equivalence class of their pointwise product, i.e., \[ [f] \cdot [g] = [f \cdot g] \] where $[f]$ denotes the equivalence class of $f$ in the Cauchy completion.
CauSeq.Completion.instSubCauchy instance
: Sub (Cauchy abv)
Full source
instance : Sub (Cauchy abv) :=
  ⟨(Quotient.map₂ Sub.sub) fun _ _ hf _ _ hg => sub_equiv_sub hf hg⟩
Subtraction on the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equipped with a subtraction operation, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. This operation is defined by lifting the pointwise subtraction of Cauchy sequences to the quotient space of equivalent Cauchy sequences.
CauSeq.Completion.mk_sub theorem
(f g : CauSeq β abv) : mk f - mk g = mk (f - g)
Full source
@[simp]
theorem mk_sub (f g : CauSeq β abv) : mk f - mk g = mk (f - g) :=
  rfl
Subtraction in Cauchy Completion Preserves Pointwise Difference: $[f] - [g] = [f - g]$
Informal description
Let $\beta$ be a ring equipped with an absolute value $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any two Cauchy sequences $f, g$ in $\text{CauSeq}(\beta, \text{abv})$, the difference of their equivalence classes in the Cauchy completion $\text{Cauchy}(\text{abv})$ equals the equivalence class of their pointwise difference, i.e., \[ [f] - [g] = [f - g] \] where $[f]$ denotes the equivalence class of $f$ in the Cauchy completion.
CauSeq.Completion.instSMulCauchyOfIsScalarTower instance
{γ : Type*} [SMul γ β] [IsScalarTower γ β β] : SMul γ (Cauchy abv)
Full source
instance {γ : Type*} [SMul γ β] [IsScalarTower γ β β] : SMul γ (Cauchy abv) :=
  ⟨fun c => (Quotient.map (c • ·)) fun _ _ hf => smul_equiv_smul _ hf⟩
Scalar Multiplication on the Cauchy Completion of a Ring with Absolute Value
Informal description
For any type $\gamma$ with a scalar multiplication operation on a ring $\beta$ that satisfies the scalar tower condition (i.e., the action of $\gamma$ on $\beta$ is compatible with the multiplication in $\beta$), the Cauchy completion $\text{Cauchy}(\text{abv})$ of $\beta$ with respect to an absolute value $\text{abv}$ inherits a scalar multiplication operation from $\gamma$. This means that for any scalar $c \in \gamma$ and any element $x$ in the Cauchy completion represented by a Cauchy sequence $f$, the scalar multiple $c \cdot x$ is represented by the Cauchy sequence $c \cdot f$.
CauSeq.Completion.mk_smul theorem
{γ : Type*} [SMul γ β] [IsScalarTower γ β β] (c : γ) (f : CauSeq β abv) : c • mk f = mk (c • f)
Full source
@[simp]
theorem mk_smul {γ : Type*} [SMul γ β] [IsScalarTower γ β β] (c : γ) (f : CauSeq β abv) :
    c • mk f = mk (c • f) :=
  rfl
Scalar Multiplication Commutes with Completion: $c \cdot [f] = [c \cdot f]$
Informal description
Let $\beta$ be a ring equipped with an absolute value $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. Let $\gamma$ be a type with a scalar multiplication operation on $\beta$ satisfying the scalar tower condition (i.e., the action of $\gamma$ on $\beta$ is compatible with the multiplication in $\beta$). For any scalar $c \in \gamma$ and any Cauchy sequence $f$ in $\beta$ with respect to $\text{abv}$, the scalar multiplication $c \cdot [f]$ in the Cauchy completion $\text{Cauchy}(\text{abv})$ is equal to the equivalence class of the Cauchy sequence $c \cdot f$, where $[f]$ denotes the equivalence class of $f$ in the completion. In other words, $c \cdot [f] = [c \cdot f]$.
CauSeq.Completion.instPowCauchyNat instance
: Pow (Cauchy abv) ℕ
Full source
instance : Pow (Cauchy abv)  :=
  ⟨fun x n => Quotient.map (· ^ n) (fun _ _ hf => pow_equiv_pow hf _) x⟩
Natural Number Power Operation on the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equipped with a natural number power operation, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any element $x$ in the completion represented by a Cauchy sequence $f$ and any natural number $n$, the power $x^n$ is represented by the Cauchy sequence $f^n$ obtained by raising each term of $f$ to the $n$-th power.
CauSeq.Completion.mk_pow theorem
(n : ℕ) (f : CauSeq β abv) : mk f ^ n = mk (f ^ n)
Full source
@[simp]
theorem mk_pow (n : ) (f : CauSeq β abv) : mk f ^ n = mk (f ^ n) :=
  rfl
Power operation commutes with Cauchy completion: $(f)^n = (f^n)$
Informal description
Let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any natural number $n$ and any Cauchy sequence $f$ in $\beta$ with respect to $\text{abv}$, the $n$-th power of the equivalence class of $f$ in the Cauchy completion is equal to the equivalence class of the $n$-th power of $f$. In other words, $(f)^n = (f^n)$, where $(\cdot)$ denotes the equivalence class in the completion.
CauSeq.Completion.instNatCastCauchy instance
: NatCast (Cauchy abv)
Full source
instance : NatCast (Cauchy abv) :=
  ⟨fun n => mk n⟩
Natural Numbers as Constant Sequences in the Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure) has a canonical way to include natural numbers as constant sequences. Specifically, for any natural number $n$, the element $n$ in the completion is represented by the equivalence class of the constant Cauchy sequence with value $n$.
CauSeq.Completion.instIntCastCauchy instance
: IntCast (Cauchy abv)
Full source
instance : IntCast (Cauchy abv) :=
  ⟨fun n => mk n⟩
Integer Casting in the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ has a canonical integer casting operation, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. This means that every integer can be naturally embedded into the Cauchy completion as a constant sequence.
CauSeq.Completion.ofRat_natCast theorem
(n : ℕ) : (ofRat n : Cauchy abv) = n
Full source
@[simp]
theorem ofRat_natCast (n : ) : (ofRat n : Cauchy abv) = n :=
  rfl
Canonical Embedding of Natural Numbers in Cauchy Completion
Informal description
For any natural number $n$, the canonical embedding of $n$ into the Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equal to the constant sequence $n$ in the completion. That is, $\text{ofRat}(n) = n$ in $\text{Cauchy}(\text{abv})$.
CauSeq.Completion.ofRat_intCast theorem
(z : ℤ) : (ofRat z : Cauchy abv) = z
Full source
@[simp]
theorem ofRat_intCast (z : ) : (ofRat z : Cauchy abv) = z :=
  rfl
Canonical Embedding Preserves Integers in Cauchy Completion
Informal description
For any integer $z$, the canonical embedding of $z$ into the Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equal to the integer $z$ itself, i.e., $\text{ofRat}(z) = z$.
CauSeq.Completion.ofRat_add theorem
(x y : β) : ofRat (x + y) = (ofRat x + ofRat y : Cauchy abv)
Full source
theorem ofRat_add (x y : β) :
    ofRat (x + y) = (ofRat x + ofRat y : Cauchy abv) :=
  congr_arg mk (const_add _ _)
Additivity of Canonical Embedding into Cauchy Completion: $\text{ofRat}(x + y) = \text{ofRat}(x) + \text{ofRat}(y)$
Informal description
For any elements $x$ and $y$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the canonical embedding of their sum $x + y$ into the Cauchy completion $\text{Cauchy}(\text{abv})$ is equal to the sum of their individual embeddings. That is, $\text{ofRat}(x + y) = \text{ofRat}(x) + \text{ofRat}(y)$.
CauSeq.Completion.ofRat_neg theorem
(x : β) : ofRat (-x) = (-ofRat x : Cauchy abv)
Full source
theorem ofRat_neg (x : β) : ofRat (-x) = (-ofRat x : Cauchy abv) :=
  congr_arg mk (const_neg _)
Negation Preserved Under Canonical Embedding into Cauchy Completion: $\text{ofRat}(-x) = -\text{ofRat}(x)$
Informal description
For any element $x$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the canonical embedding of $-x$ into the Cauchy completion $\text{Cauchy}(\text{abv})$ is equal to the negation of the canonical embedding of $x$, i.e., $\text{ofRat}(-x) = -\text{ofRat}(x)$.
CauSeq.Completion.ofRat_mul theorem
(x y : β) : ofRat (x * y) = (ofRat x * ofRat y : Cauchy abv)
Full source
theorem ofRat_mul (x y : β) :
    ofRat (x * y) = (ofRat x * ofRat y : Cauchy abv) :=
  congr_arg mk (const_mul _ _)
Multiplicativity of Canonical Embedding into Cauchy Completion: $\text{ofRat}(x \cdot y) = \text{ofRat}(x) \cdot \text{ofRat}(y)$
Informal description
For any two elements $x$ and $y$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the canonical embedding of their product $x \cdot y$ into the Cauchy completion $\text{Cauchy}(\text{abv})$ is equal to the product of their individual embeddings. That is, $\text{ofRat}(x \cdot y) = \text{ofRat}(x) \cdot \text{ofRat}(y)$.
CauSeq.Completion.Cauchy.ring instance
: Ring (Cauchy abv)
Full source
instance Cauchy.ring : Ring (Cauchy abv) := fast_instance%
  Function.Surjective.ring mk Quotient.mk'_surjective zero_def.symm one_def.symm
    (fun _ _ => (mk_add _ _).symm) (fun _ _ => (mk_mul _ _).symm) (fun _ => (mk_neg _).symm)
    (fun _ _ => (mk_sub _ _).symm) (fun _ _ => (mk_smul _ _).symm) (fun _ _ => (mk_smul _ _).symm)
    (fun _ _ => (mk_pow _ _).symm) (fun _ => rfl) fun _ => rfl
Ring Structure on the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ forms a ring, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. The ring operations are defined by lifting the pointwise operations on Cauchy sequences to the quotient space of equivalent Cauchy sequences (where two sequences are equivalent if their difference tends to zero).
CauSeq.Completion.ofRatRingHom definition
: β →+* (Cauchy abv)
Full source
/-- `CauSeq.Completion.ofRat` as a `RingHom` -/
@[simps]
def ofRatRingHom : β →+* (Cauchy abv) where
  toFun := ofRat
  map_zero' := ofRat_zero
  map_one' := ofRat_one
  map_add' := ofRat_add
  map_mul' := ofRat_mul
Canonical ring homomorphism into Cauchy completion
Informal description
The canonical ring homomorphism from a ring $\beta$ to its Cauchy completion $\text{Cauchy}(\text{abv})$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$. This homomorphism maps each element $x \in \beta$ to the equivalence class of the constant Cauchy sequence with all terms equal to $x$. It preserves the ring structure, satisfying: - $\text{ofRatRingHom}(0) = 0$ - $\text{ofRatRingHom}(1) = 1$ - $\text{ofRatRingHom}(x + y) = \text{ofRatRingHom}(x) + \text{ofRatRingHom}(y)$ - $\text{ofRatRingHom}(x \cdot y) = \text{ofRatRingHom}(x) \cdot \text{ofRatRingHom}(y)$
CauSeq.Completion.ofRat_sub theorem
(x y : β) : ofRat (x - y) = (ofRat x - ofRat y : Cauchy abv)
Full source
theorem ofRat_sub (x y : β) : ofRat (x - y) = (ofRat x - ofRat y : Cauchy abv) :=
  congr_arg mk (const_sub _ _)
Embedding Preserves Subtraction in Cauchy Completion
Informal description
For any elements $x$ and $y$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the canonical embedding of their difference $x - y$ into the Cauchy completion $\text{Cauchy}(\text{abv})$ is equal to the difference of the canonical embeddings of $x$ and $y$. That is, $\text{ofRat}(x - y) = \text{ofRat}(x) - \text{ofRat}(y)$.
CauSeq.Completion.Cauchy.commRing instance
: CommRing (Cauchy abv)
Full source
instance Cauchy.commRing : CommRing (Cauchy abv) := fast_instance%
  Function.Surjective.commRing mk Quotient.mk'_surjective zero_def.symm one_def.symm
    (fun _ _ => (mk_add _ _).symm) (fun _ _ => (mk_mul _ _).symm) (fun _ => (mk_neg _).symm)
    (fun _ _ => (mk_sub _ _).symm) (fun _ _ => (mk_smul _ _).symm) (fun _ _ => (mk_smul _ _).symm)
    (fun _ _ => (mk_pow _ _).symm) (fun _ => rfl) fun _ => rfl
Commutative Ring Structure on Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ forms a commutative ring, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. The ring operations are defined by lifting the pointwise operations on Cauchy sequences to the quotient space of equivalent Cauchy sequences (where two sequences are equivalent if their difference tends to zero).
CauSeq.Completion.instNNRatCast instance
: NNRatCast (Cauchy abv)
Full source
instance instNNRatCast : NNRatCast (Cauchy abv) where nnratCast q := ofRat q
Nonnegative Rationals Embed into Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ has a canonical homomorphism from the nonnegative rational numbers $\mathbb{Q}_{\geq 0}$.
CauSeq.Completion.instRatCast instance
: RatCast (Cauchy abv)
Full source
instance instRatCast : RatCast (Cauchy abv) where ratCast q := ofRat q
Rational Number Coefficients in Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ has a canonical structure of a ring with rational number coefficients, where the rational numbers are embedded via the constant Cauchy sequences.
CauSeq.Completion.ofRat_nnratCast theorem
(q : ℚ≥0) : ofRat (q : β) = (q : Cauchy abv)
Full source
@[simp, norm_cast] lemma ofRat_nnratCast (q : ℚ≥0) : ofRat (q : β) = (q : Cauchy abv) := rfl
Compatibility of Embedding and Homomorphism for Nonnegative Rationals in Cauchy Completion
Informal description
For any nonnegative rational number $q \in \mathbb{Q}_{\geq 0}$, the canonical embedding of $q$ into the Cauchy completion of $\beta$ with respect to the absolute value $\text{abv}$ is equal to the image of $q$ under the canonical homomorphism from $\mathbb{Q}_{\geq 0}$ to the Cauchy completion. In other words, $\text{ofRat}(q) = q$ as elements of the Cauchy completion.
CauSeq.Completion.ofRat_ratCast theorem
(q : ℚ) : ofRat (q : β) = (q : Cauchy abv)
Full source
@[simp, norm_cast] lemma ofRat_ratCast (q : ℚ) : ofRat (q : β) = (q : Cauchy abv) := rfl
Rational Embedding in Cauchy Completion Preserves Rational Numbers
Informal description
For any rational number $q \in \mathbb{Q}$, the canonical embedding of $q$ into the Cauchy completion of $\beta$ with respect to the absolute value $\text{abv}$ is equal to the rational number $q$ interpreted in the Cauchy completion. That is, $\text{ofRat}(q) = q$ as elements of the Cauchy completion.
CauSeq.Completion.instInvCauchy instance
: Inv (Cauchy abv)
Full source
noncomputable instance : Inv (Cauchy abv) :=
  ⟨fun x =>
    (Quotient.liftOn x fun f => mk <| if h : LimZero f then 0 else inv f h) fun f g fg => by
      have := limZero_congr fg
      by_cases hf : LimZero f
      · simp [hf, this.1 hf, Setoid.refl]
      · have hg := mt this.2 hf
        simp only [hf, dite_false, hg]
        have If : mk (inv f hf) * mk f = 1 := mk_eq.2 (inv_mul_cancel hf)
        have Ig : mk (inv g hg) * mk g = 1 := mk_eq.2 (inv_mul_cancel hg)
        have Ig' : mk g * mk (inv g hg) = 1 := mk_eq.2 (mul_inv_cancel hg)
        rw [mk_eq.2 fg, ← Ig] at If
        rw [← mul_one (mk (inv f hf)), ← Ig', ← mul_assoc, If, mul_assoc, Ig', mul_one]⟩
Inversion Operation on the Cauchy Completion of a Ring with Absolute Value
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure) has a canonical inversion operation. This operation assigns to each equivalence class of Cauchy sequences its multiplicative inverse, defined when the sequence does not converge to zero.
CauSeq.Completion.inv_zero theorem
: (0 : (Cauchy abv))⁻¹ = 0
Full source
theorem inv_zero : (0 : (Cauchy abv))⁻¹ = 0 :=
  congr_arg mk <| by rw [dif_pos] <;> [rfl; exact zero_limZero]
Inverse of Zero in Cauchy Completion is Zero
Informal description
In the Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$, the multiplicative inverse of zero is zero, i.e., $0^{-1} = 0$.
CauSeq.Completion.inv_mk theorem
{f} (hf) : (mk (abv := abv) f)⁻¹ = mk (inv f hf)
Full source
@[simp]
theorem inv_mk {f} (hf) : (mk (abv := abv) f)⁻¹ = mk (inv f hf) :=
  congr_arg mk <| by rw [dif_neg]
Inverse of Equivalence Class in Cauchy Completion Equals Equivalence Class of Inverse Sequence
Informal description
Let $\beta$ be a ring equipped with an absolute value $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any Cauchy sequence $f$ in $\text{CauSeq}(\beta, \text{abv})$ that does not converge to zero, the inverse of its equivalence class in the Cauchy completion $\text{Cauchy}(\text{abv})$ is equal to the equivalence class of the inverse sequence, i.e., $(\text{mk}\, f)^{-1} = \text{mk}\, (f^{-1})$.
CauSeq.Completion.cau_seq_zero_ne_one theorem
: ¬(0 : CauSeq _ abv) ≈ 1
Full source
theorem cau_seq_zero_ne_one : ¬(0 : CauSeq _ abv) ≈ 1 := fun h =>
  have : LimZero (1 - 0 : CauSeq _ abv) := Setoid.symm h
  have : LimZero (1 : CauSeq _ abv) := by simpa
  by apply one_ne_zero <| const_limZero.1 this
Non-equivalence of Zero and One in Cauchy Sequences
Informal description
The constant zero Cauchy sequence is not equivalent to the constant one Cauchy sequence in the ring of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$, i.e., $0 \not\approx 1$.
CauSeq.Completion.zero_ne_one theorem
: (0 : (Cauchy abv)) ≠ 1
Full source
theorem zero_ne_one : (0 : (Cauchy abv)) ≠ 1 := fun h => cau_seq_zero_ne_one <| mk_eq.1 h
Non-Equality of Zero and One in Cauchy Completion
Informal description
In the Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$, the zero element is not equal to the multiplicative identity element, i.e., $0 \neq 1$.
CauSeq.Completion.inv_mul_cancel theorem
{x : (Cauchy abv)} : x ≠ 0 → x⁻¹ * x = 1
Full source
protected theorem inv_mul_cancel {x : (Cauchy abv)} : x ≠ 0x⁻¹ * x = 1 :=
  Quotient.inductionOn x fun f hf => by
    simp only [mk_eq_mk, ne_eq, mk_eq_zero] at hf
    simp only [mk_eq_mk, hf, not_false_eq_true, inv_mk, mk_mul]
    exact Quotient.sound (CauSeq.inv_mul_cancel hf)
Inverse Property in Cauchy Completion: $x^{-1} \cdot x = 1$ for $x \neq 0$
Informal description
For any nonzero element $x$ in the Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$, the product of its multiplicative inverse and itself equals the multiplicative identity, i.e., $x^{-1} \cdot x = 1$.
CauSeq.Completion.mul_inv_cancel theorem
{x : (Cauchy abv)} : x ≠ 0 → x * x⁻¹ = 1
Full source
protected theorem mul_inv_cancel {x : (Cauchy abv)} : x ≠ 0 → x * x⁻¹ = 1 :=
  Quotient.inductionOn x fun f hf => by
    simp only [mk_eq_mk, ne_eq, mk_eq_zero] at hf
    simp only [mk_eq_mk, hf, not_false_eq_true, inv_mk, mk_mul]
    exact Quotient.sound (CauSeq.mul_inv_cancel hf)
Multiplicative Inverse Property in Cauchy Completion: $x \cdot x^{-1} = 1$ for $x \neq 0$
Informal description
For any nonzero element $x$ in the Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure, the product of $x$ with its multiplicative inverse $x^{-1}$ equals the multiplicative identity, i.e., $x \cdot x^{-1} = 1$.
CauSeq.Completion.ofRat_inv theorem
(x : β) : ofRat x⁻¹ = ((ofRat x)⁻¹ : (Cauchy abv))
Full source
theorem ofRat_inv (x : β) : ofRat x⁻¹ = ((ofRat x)⁻¹ : (Cauchy abv)) :=
  congr_arg mk <| by split_ifs with h <;>
    [simp only [const_limZero.1 h, GroupWithZero.inv_zero, const_zero]; rfl]
Inverse of Canonical Embedding in Cauchy Completion
Informal description
Let $\beta$ be a ring with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any element $x \in \beta$, the canonical embedding of the inverse $x^{-1}$ into the Cauchy completion $\text{Cauchy}(\text{abv})$ equals the inverse of the canonical embedding of $x$ in the completion, i.e., \[ \text{ofRat}(x^{-1}) = (\text{ofRat}(x))^{-1}. \]
CauSeq.Completion.instDivInvMonoid instance
: DivInvMonoid (Cauchy abv)
Full source
noncomputable instance instDivInvMonoid : DivInvMonoid (Cauchy abv) where
Division-Inversion Monoid Structure on Cauchy Completion
Informal description
The Cauchy completion $\text{Cauchy}(\text{abv})$ of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure) forms a division-inversion monoid. This means it is equipped with a division operation and an inversion operation, where division is defined in terms of multiplication and inversion as $a / b = a * b^{-1}$.
CauSeq.Completion.ofRat_div theorem
(x y : β) : ofRat (x / y) = (ofRat x / ofRat y : Cauchy abv)
Full source
lemma ofRat_div (x y : β) : ofRat (x / y) = (ofRat x / ofRat y : Cauchy abv) := by
  simp only [div_eq_mul_inv, ofRat_inv, ofRat_mul]
Multiplicativity of Canonical Embedding for Division: $\text{ofRat}(x / y) = \text{ofRat}(x) / \text{ofRat}(y)$
Informal description
Let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any elements $x, y \in \beta$, the canonical embedding of the quotient $x / y$ into the Cauchy completion $\text{Cauchy}(\text{abv})$ equals the quotient of the canonical embeddings of $x$ and $y$ in the completion, i.e., \[ \text{ofRat}(x / y) = \text{ofRat}(x) / \text{ofRat}(y). \]
CauSeq.Completion.Cauchy.divisionRing instance
: DivisionRing (Cauchy abv)
Full source
/-- The Cauchy completion forms a division ring. -/
noncomputable instance Cauchy.divisionRing : DivisionRing (Cauchy abv) where
  exists_pair_ne := ⟨0, 1, zero_ne_one⟩
  inv_zero := inv_zero
  mul_inv_cancel _ := CauSeq.Completion.mul_inv_cancel
  nnqsmul := (· • ·)
  qsmul := (· • ·)
  nnratCast_def q := by simp_rw [← ofRat_nnratCast, NNRat.cast_def, ofRat_div, ofRat_natCast]
  ratCast_def q := by rw [← ofRat_ratCast, Rat.cast_def, ofRat_div, ofRat_natCast, ofRat_intCast]
  nnqsmul_def _ x := Quotient.inductionOn x fun _ ↦ congr_arg mk <| ext fun _ ↦ NNRat.smul_def _ _
  qsmul_def _ x := Quotient.inductionOn x fun _ ↦ congr_arg mk <| ext fun _ ↦ Rat.smul_def _ _
Division Ring Structure on Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure) forms a division ring. This means it is equipped with addition, multiplication, and multiplicative inverses for all nonzero elements.
CauSeq.Completion.instReprCauchy instance
[Repr β] : Repr (Cauchy abv)
Full source
/-- Show the first 10 items of a representative of this equivalence class of cauchy sequences.

The representative chosen is the one passed in the VM to `Quot.mk`, so two cauchy sequences
converging to the same number may be printed differently.
-/
unsafe instance [Repr β] : Repr (Cauchy abv) where
  reprPrec r _ :=
    let N := 10
    let seq := r.unquot
    "(sorry /- " ++ Std.Format.joinSep ((List.range N).map <| reprrepr ∘ seq) ", " ++ ", ... -/)"
Representation of Elements in the Cauchy Completion
Informal description
For any ring $\beta$ with an absolute value function $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure), the Cauchy completion $\text{Cauchy}(\text{abv})$ has a representation instance when $\beta$ itself has a representation. This means that elements of the Cauchy completion can be displayed, typically by showing the first few terms of a representative Cauchy sequence from their equivalence class.
CauSeq.Completion.Cauchy.field instance
: Field (Cauchy abv)
Full source
/-- The Cauchy completion forms a field. -/
noncomputable instance Cauchy.field : Field (Cauchy abv) :=
  { Cauchy.divisionRing, Cauchy.commRing with }
Field Structure on Cauchy Completion
Informal description
The Cauchy completion of a ring $\beta$ with respect to an absolute value $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure) forms a field. This means it is equipped with addition, multiplication, and multiplicative inverses for all nonzero elements, extending the division ring structure.
CauSeq.IsComplete structure
Full source
/-- A class stating that a ring with an absolute value is complete, i.e. every Cauchy
sequence has a limit. -/
class IsComplete : Prop where
  /-- Every Cauchy sequence has a limit. -/
  isComplete : ∀ s : CauSeq β abv, ∃ b : β, s ≈ const abv b
Complete ring with absolute value
Informal description
A ring $\beta$ with an absolute value $abv$ is called *complete* if every Cauchy sequence in $\beta$ converges to a limit in $\beta$. More formally, for every Cauchy sequence $s$ with respect to $abv$, there exists an element $b \in \beta$ such that $s$ converges to $b$ (i.e., $abv(s_n - b) \to 0$ as $n \to \infty$).
CauSeq.complete theorem
: ∀ s : CauSeq β abv, ∃ b : β, s ≈ const abv b
Full source
theorem complete : ∀ s : CauSeq β abv, ∃ b : β, s ≈ const abv b :=
  IsComplete.isComplete
Completeness of a Ring with Absolute Value: Every Cauchy Sequence Converges
Informal description
For every Cauchy sequence $s$ in the ring $\beta$ with respect to the absolute value function $\text{abv} : \beta \to \alpha$, there exists an element $b \in \beta$ such that $s$ is equivalent to the constant sequence $\text{const}(b)$. Here, $\alpha$ is a linearly ordered field with a strict ordered ring structure, and two sequences are equivalent if their difference tends to zero under $\text{abv}$.
CauSeq.lim definition
(s : CauSeq β abv) : β
Full source
/-- The limit of a Cauchy sequence in a complete ring. Chosen non-computably. -/
noncomputable def lim (s : CauSeq β abv) : β :=
  Classical.choose (complete s)
Limit of a Cauchy sequence in a ring with absolute value
Informal description
The limit of a Cauchy sequence \( s \) in a ring \( \beta \) with respect to an absolute value function \( \text{abv} : \beta \to \alpha \), where \( \alpha \) is a linearly ordered field with a strict ordered ring structure. The limit is chosen non-constructively, ensuring that \( s \) converges to \( \text{lim}(s) \) under \( \text{abv} \).
CauSeq.equiv_lim theorem
(s : CauSeq β abv) : s ≈ const abv (lim s)
Full source
theorem equiv_lim (s : CauSeq β abv) : s ≈ const abv (lim s) :=
  Classical.choose_spec (complete s)
Cauchy Sequence Equivalence to its Limit Constant Sequence
Informal description
For any Cauchy sequence $s$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, the sequence $s$ is equivalent to the constant sequence whose terms are all equal to the limit $\text{lim}(s)$ of $s$. Here, $\alpha$ is a linearly ordered field with a strict ordered ring structure, and two sequences are equivalent if their difference tends to zero under $\text{abv}$.
CauSeq.lim_eq_of_equiv_const theorem
{f : CauSeq β abv} {x : β} (h : f ≈ CauSeq.const abv x) : lim f = x
Full source
theorem lim_eq_of_equiv_const {f : CauSeq β abv} {x : β} (h : f ≈ CauSeq.const abv x) : lim f = x :=
  (eq_lim_of_const_equiv <| Setoid.symm h).symm
Limit of Equivalent Constant Cauchy Sequence
Informal description
Let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any Cauchy sequence $f$ in $\beta$ with respect to $\text{abv}$, if $f$ is equivalent to the constant sequence with value $x \in \beta$, then the limit of $f$ is equal to $x$.
CauSeq.lim_eq_lim_of_equiv theorem
{f g : CauSeq β abv} (h : f ≈ g) : lim f = lim g
Full source
theorem lim_eq_lim_of_equiv {f g : CauSeq β abv} (h : f ≈ g) : lim f = lim g :=
  lim_eq_of_equiv_const <| Setoid.trans h <| equiv_lim g
Equivalence of Cauchy Sequences Implies Equality of Limits
Informal description
Let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any two Cauchy sequences $f$ and $g$ in $\beta$ with respect to $\text{abv}$, if $f$ and $g$ are equivalent (i.e., their difference tends to zero), then their limits are equal: $\lim f = \lim g$.
CauSeq.lim_const theorem
(x : β) : lim (const abv x) = x
Full source
@[simp]
theorem lim_const (x : β) : lim (const abv x) = x :=
  lim_eq_of_equiv_const <| Setoid.refl _
Limit of Constant Cauchy Sequence Equals Constant Value
Informal description
For any element $x$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure, the limit of the constant Cauchy sequence with value $x$ is equal to $x$ itself.
CauSeq.lim_add theorem
(f g : CauSeq β abv) : lim f + lim g = lim (f + g)
Full source
theorem lim_add (f g : CauSeq β abv) : lim f + lim g = lim (f + g) :=
  eq_lim_of_const_equiv <|
    show LimZero (const abv (lim f + lim g) - (f + g)) by
      rw [const_add, add_sub_add_comm]
      exact add_limZero (Setoid.symm (equiv_lim f)) (Setoid.symm (equiv_lim g))
Limit of Sum Equals Sum of Limits for Cauchy Sequences
Informal description
Let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any two Cauchy sequences $f, g$ in $\text{CauSeq}(\beta, \text{abv})$, the sum of their limits equals the limit of their pointwise sum, i.e., $\lim f + \lim g = \lim (f + g)$.
CauSeq.lim_mul_lim theorem
(f g : CauSeq β abv) : lim f * lim g = lim (f * g)
Full source
theorem lim_mul_lim (f g : CauSeq β abv) : lim f * lim g = lim (f * g) :=
  eq_lim_of_const_equiv <|
    show LimZero (const abv (lim f * lim g) - f * g) by
      have h :
        const abv (lim f * lim g) - f * g =
          (const abv (lim f) - f) * g + const abv (lim f) * (const abv (lim g) - g) := by
              apply Subtype.ext
              rw [coe_add]
              simp [sub_mul, mul_sub]
      rw [h]
      exact
        add_limZero (mul_limZero_left _ (Setoid.symm (equiv_lim _)))
          (mul_limZero_right _ (Setoid.symm (equiv_lim _)))
Limit of Product Equals Product of Limits for Cauchy Sequences
Informal description
For any two Cauchy sequences $f$ and $g$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, the product of their limits equals the limit of their pointwise product, i.e., $\lim f \cdot \lim g = \lim (f \cdot g)$. Here, $\alpha$ is a linearly ordered field with a strict ordered ring structure.
CauSeq.lim_mul theorem
(f : CauSeq β abv) (x : β) : lim f * x = lim (f * const abv x)
Full source
theorem lim_mul (f : CauSeq β abv) (x : β) : lim f * x = lim (f * const abv x) := by
  rw [← lim_mul_lim, lim_const]
Limit-Multiplication Commutation for Cauchy Sequences: $\lim f \cdot x = \lim (f \cdot \text{const}(x))$
Informal description
Let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any Cauchy sequence $f$ in $\text{CauSeq}(\beta, \text{abv})$ and any element $x \in \beta$, the product of the limit of $f$ and $x$ equals the limit of the pointwise product of $f$ with the constant Cauchy sequence with value $x$, i.e., $\lim f \cdot x = \lim (f \cdot \text{const}(x))$.
CauSeq.lim_neg theorem
(f : CauSeq β abv) : lim (-f) = -lim f
Full source
theorem lim_neg (f : CauSeq β abv) : lim (-f) = -lim f :=
  lim_eq_of_equiv_const
    (show LimZero (-f - const abv (-lim f)) by
      rw [const_neg, sub_neg_eq_add, add_comm, ← sub_eq_add_neg]
      exact Setoid.symm (equiv_lim f))
Limit of Negated Cauchy Sequence Equals Negation of Limit
Informal description
For any Cauchy sequence $f$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, the limit of the negated sequence $-f$ is equal to the negation of the limit of $f$, i.e., $\lim(-f) = -\lim(f)$.
CauSeq.lim_eq_zero_iff theorem
(f : CauSeq β abv) : lim f = 0 ↔ LimZero f
Full source
theorem lim_eq_zero_iff (f : CauSeq β abv) : limlim f = 0 ↔ LimZero f :=
  ⟨fun h => by
    have hf := equiv_lim f
    rw [h] at hf
    exact (limZero_congr hf).mpr (const_limZero.mpr rfl),
   fun h => by
    have h₁ : f = f - const abv 0 := ext fun n => by simp [sub_apply, const_apply]
    rw [h₁] at h
    exact lim_eq_of_equiv_const h⟩
Limit Equals Zero if and only if Sequence Converges to Zero
Informal description
For a Cauchy sequence $f$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, the limit of $f$ is zero if and only if $f$ converges to zero (i.e., for every $\varepsilon > 0$ in $\alpha$, there exists an index $i$ such that for all $j \geq i$, $\text{abv}(f_j) < \varepsilon$).
CauSeq.lim_inv theorem
{f : CauSeq β abv} (hf : ¬LimZero f) : lim (inv f hf) = (lim f)⁻¹
Full source
theorem lim_inv {f : CauSeq β abv} (hf : ¬LimZero f) : lim (inv f hf) = (lim f)⁻¹ :=
  have hl : limlim f ≠ 0 := by rwa [← lim_eq_zero_iff] at hf
  lim_eq_of_equiv_const <|
    show LimZero (inv f hf - const abv (lim f)⁻¹) from
      have h₁ : ∀ (g f : CauSeq β abv) (hf : ¬LimZero f), LimZero (g - f * inv f hf * g) :=
        fun g f hf => by
          have h₂ : g - f * inv f hf * g = 1 * g - f * inv f hf * g := by rw [one_mul g]
          have h₃ : f * inv f hf * g = (f * inv f hf) * g := by simp [mul_assoc]
          have h₄ : g - f * inv f hf * g = (1 - f * inv f hf) * g := by rw [h₂, h₃, ← sub_mul]
          have h₅ : g - f * inv f hf * g = g * (1 - f * inv f hf) := by rw [h₄, mul_comm]
          have h₆ : g - f * inv f hf * g = g * (1 - inv f hf * f) := by rw [h₅, mul_comm f]
          rw [h₆]; exact mul_limZero_right _ (Setoid.symm (CauSeq.inv_mul_cancel _))
      have h₂ :
        LimZero
          (inv f hf - const abv (lim f)⁻¹ -
            (const abv (lim f) - f) * (inv f hf * const abv (lim f)⁻¹)) := by
              rw [sub_mul, ← sub_add, sub_sub, sub_add_eq_sub_sub, sub_right_comm, sub_add]
              show LimZero
                (inv f hf - const abv (lim f) * (inv f hf * const abv (lim f)⁻¹) -
                  (const abv (lim f)⁻¹ - f * (inv f hf * const abv (lim f)⁻¹)))
              exact sub_limZero
                (by rw [← mul_assoc, mul_right_comm, const_inv hl]; exact h₁ _ _ _)
                (by rw [← mul_assoc]; exact h₁ _ _ _)
      (limZero_congr h₂).mpr <| mul_limZero_left _ (Setoid.symm (equiv_lim f))
Limit of Inverse Sequence Equals Inverse of Limit for Non-Zero-Convergent Cauchy Sequences
Informal description
For any Cauchy sequence $f$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, if $f$ does not converge to zero, then the limit of the inverse sequence $f^{-1}$ is equal to the inverse of the limit of $f$, i.e., $\lim(f^{-1}) = (\lim f)^{-1}$.
CauSeq.lim_le theorem
{f : CauSeq α abs} {x : α} (h : f ≤ CauSeq.const abs x) : lim f ≤ x
Full source
theorem lim_le {f : CauSeq α abs} {x : α} (h : f ≤ CauSeq.const abs x) : lim f ≤ x :=
  CauSeq.const_le.1 <| CauSeq.le_of_eq_of_le (Setoid.symm (equiv_lim f)) h
Limit Inequality: $\lim f \leq x$ if $f \leq \text{const}(x)$
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $f$ be a Cauchy sequence in $\alpha$ with respect to the absolute value function. If $f$ is less than or equal to the constant Cauchy sequence $\text{const}(x)$, then the limit of $f$ is less than or equal to $x$.
CauSeq.le_lim theorem
{f : CauSeq α abs} {x : α} (h : CauSeq.const abs x ≤ f) : x ≤ lim f
Full source
theorem le_lim {f : CauSeq α abs} {x : α} (h : CauSeq.const abs x ≤ f) : x ≤ lim f :=
  CauSeq.const_le.1 <| CauSeq.le_of_le_of_eq h (equiv_lim f)
Limit Preserves Inequality: $x \leq \lim f$ if $\text{const}(x) \leq f$
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $f$ be a Cauchy sequence in $\alpha$ with respect to the absolute value function. If the constant Cauchy sequence $\text{const}(x)$ is less than or equal to $f$, then $x$ is less than or equal to the limit of $f$.
CauSeq.lt_lim theorem
{f : CauSeq α abs} {x : α} (h : CauSeq.const abs x < f) : x < lim f
Full source
theorem lt_lim {f : CauSeq α abs} {x : α} (h : CauSeq.const abs x < f) : x < lim f :=
  CauSeq.const_lt.1 <| CauSeq.lt_of_lt_of_eq h (equiv_lim f)
Strict Inequality Between Constant Sequence and Limit of Cauchy Sequence: $x < \lim f$ if $\text{const}(x) < f$
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $f$ be a Cauchy sequence in $\alpha$ with respect to the absolute value function. If the constant Cauchy sequence $\text{const}(x)$ is strictly less than $f$, then $x$ is strictly less than the limit of $f$.
CauSeq.lim_lt theorem
{f : CauSeq α abs} {x : α} (h : f < CauSeq.const abs x) : lim f < x
Full source
theorem lim_lt {f : CauSeq α abs} {x : α} (h : f < CauSeq.const abs x) : lim f < x :=
  CauSeq.const_lt.1 <| CauSeq.lt_of_eq_of_lt (Setoid.symm (equiv_lim f)) h
Limit of Cauchy Sequence Preserves Strict Inequality: $f < \text{const}(x) \Rightarrow \text{lim}(f) < x$
Informal description
For any Cauchy sequence $f$ with respect to the absolute value function on a linearly ordered field $\alpha$, and for any element $x \in \alpha$, if $f$ is strictly less than the constant Cauchy sequence $\text{const}(x)$, then the limit of $f$ is strictly less than $x$.