doc-next-gen

Mathlib.Algebra.Order.CauSeq.Basic

Module docstring

{"# Cauchy sequences

A basic theory of Cauchy sequences, used in the construction of the reals and p-adic numbers. Where applicable, lemmas that will be reused in other contexts have been stated in extra generality. There are other \"versions\" of Cauchyness in the library, in particular Cauchy filters in topology. This is a concrete implementation that is useful for simplicity and computability reasons.

Important definitions

  • IsCauSeq: a predicate that says f : ℕ → β is Cauchy.
  • CauSeq: the type of Cauchy sequences valued in type β with respect to an absolute value function abv.

Tags

sequence, cauchy, abs val, absolute value ","Note that DistribLattice (CauSeq α abs) is not true because there is no PartialOrder. "}

rat_add_continuous_lemma theorem
{ε : α} (ε0 : 0 < ε) : ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ + a₂ - (b₁ + b₂)) < ε
Full source
theorem rat_add_continuous_lemma {ε : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ →
      abv (a₁ + a₂ - (b₁ + b₂)) < ε :=
  ⟨ε / 2, half_pos ε0, fun {a₁ a₂ b₁ b₂} h₁ h₂ => by
    simpa [add_halves, sub_eq_add_neg, add_comm, add_left_comm, add_assoc] using
      lt_of_le_of_lt (abv_add abv _ _) (add_lt_add h₁ h₂)⟩
Uniform Continuity of Addition with Respect to an Absolute Value
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$. For any $\varepsilon > 0$ in $\alpha$, there exists $\delta > 0$ such that for any $a_1, a_2, b_1, b_2 \in \beta$, if $\text{abv}(a_1 - b_1) < \delta$ and $\text{abv}(a_2 - b_2) < \delta$, then $\text{abv}(a_1 + a_2 - (b_1 + b_2)) < \varepsilon$.
rat_mul_continuous_lemma theorem
{ε K₁ K₂ : α} (ε0 : 0 < ε) : ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ → abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε
Full source
theorem rat_mul_continuous_lemma {ε K₁ K₂ : α} (ε0 : 0 < ε) :
    ∃ δ > 0, ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁ → abv b₂ < K₂ → abv (a₁ - b₁) < δ →
      abv (a₂ - b₂) < δ → abv (a₁ * a₂ - b₁ * b₂) < ε := by
  have K0 : (0 : α) < max 1 (max K₁ K₂) := lt_of_lt_of_le zero_lt_one (le_max_left _ _)
  have εK := div_pos (half_pos ε0) K0
  refine ⟨_, εK, fun {a₁ a₂ b₁ b₂} ha₁ hb₂ h₁ h₂ => ?_⟩
  replace ha₁ := lt_of_lt_of_le ha₁ (le_trans (le_max_left _ K₂) (le_max_right 1 _))
  replace hb₂ := lt_of_lt_of_le hb₂ (le_trans (le_max_right K₁ _) (le_max_right 1 _))
  set M := max 1 (max K₁ K₂)
  have : abv (a₁ - b₁) * abv b₂ + abv (a₂ - b₂) * abv a₁ < ε / 2 / M * M + ε / 2 / M * M := by
    gcongr
  rw [← abv_mul abv, mul_comm, div_mul_cancel₀ _ (ne_of_gt K0), ← abv_mul abv, add_halves] at this
  simpa [sub_eq_add_neg, mul_add, add_mul, add_left_comm] using
    lt_of_le_of_lt (abv_add abv _ _) this
Uniform Continuity of Multiplication with Respect to an Absolute Value
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$. For any $\varepsilon > 0$ and bounds $K_1, K_2 > 0$ in $\alpha$, there exists $\delta > 0$ such that for any elements $a_1, a_2, b_1, b_2 \in \beta$ with $\text{abv}(a_1) < K_1$ and $\text{abv}(b_2) < K_2$, if $\text{abv}(a_1 - b_1) < \delta$ and $\text{abv}(a_2 - b_2) < \delta$, then $\text{abv}(a_1 \cdot a_2 - b_1 \cdot b_2) < \varepsilon$.
rat_inv_continuous_lemma theorem
{β : Type*} [DivisionRing β] (abv : β → α) [IsAbsoluteValue abv] {ε K : α} (ε0 : 0 < ε) (K0 : 0 < K) : ∃ δ > 0, ∀ {a b : β}, K ≤ abv a → K ≤ abv b → abv (a - b) < δ → abv (a⁻¹ - b⁻¹) < ε
Full source
theorem rat_inv_continuous_lemma {β : Type*} [DivisionRing β] (abv : β → α) [IsAbsoluteValue abv]
    {ε K : α} (ε0 : 0 < ε) (K0 : 0 < K) :
    ∃ δ > 0, ∀ {a b : β}, K ≤ abv a → K ≤ abv b → abv (a - b) < δ → abv (a⁻¹ - b⁻¹) < ε := by
  refine ⟨K * ε * K, mul_pos (mul_pos K0 ε0) K0, fun {a b} ha hb h => ?_⟩
  have a0 := K0.trans_le ha
  have b0 := K0.trans_le hb
  rw [inv_sub_inv' ((abv_pos abv).1 a0) ((abv_pos abv).1 b0), abv_mul abv, abv_mul abv, abv_inv abv,
    abv_inv abv, abv_sub abv]
  refine lt_of_mul_lt_mul_left (lt_of_mul_lt_mul_right ?_ b0.le) a0.le
  rw [mul_assoc, inv_mul_cancel_right₀ b0.ne', ← mul_assoc, mul_inv_cancel₀ a0.ne', one_mul]
  refine h.trans_le ?_
  gcongr
Uniform Continuity of Inversion in a Division Ring with Respect to an Absolute Value
Informal description
Let $\beta$ be a division 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 $\varepsilon > 0$ and $K > 0$ in $\alpha$, there exists $\delta > 0$ such that for any $a, b \in \beta$ with $\text{abv}(a) \geq K$ and $\text{abv}(b) \geq K$, if $\text{abv}(a - b) < \delta$, then $\text{abv}(a^{-1} - b^{-1}) < \varepsilon$.
IsCauSeq definition
{α : Type*} [Field α] [LinearOrder α] [IsStrictOrderedRing α] {β : Type*} [Ring β] (abv : β → α) (f : ℕ → β) : Prop
Full source
/-- A sequence is Cauchy if the distance between its entries tends to zero. -/
@[nolint unusedArguments]
def IsCauSeq {α : Type*} [Field α] [LinearOrder α] [IsStrictOrderedRing α]
    {β : Type*} [Ring β] (abv : β → α) (f :  → β) :
    Prop :=
  ∀ ε > 0, ∃ i, ∀ j ≥ i, abv (f j - f i) < ε
Cauchy sequence with respect to an absolute value
Informal description
A sequence \( f : \mathbb{N} \to \beta \) is called a Cauchy sequence with respect to an absolute value function \( \text{abv} : \beta \to \alpha \) if for every \( \varepsilon > 0 \) in \( \alpha \), there exists an index \( i \) such that for all \( j \geq i \), the distance \( \text{abv}(f_j - f_i) < \varepsilon \). Here, \( \alpha \) is a linearly ordered field with a strict ordered ring structure, and \( \beta \) is a ring.
IsCauSeq.cauchy₂ theorem
(hf : IsCauSeq abv f) {ε : α} (ε0 : 0 < ε) : ∃ i, ∀ j ≥ i, ∀ k ≥ i, abv (f j - f k) < ε
Full source
theorem cauchy₂ (hf : IsCauSeq abv f) {ε : α} (ε0 : 0 < ε) :
    ∃ i, ∀ j ≥ i, ∀ k ≥ i, abv (f j - f k) < ε := by
  refine (hf _ (half_pos ε0)).imp fun i hi j ij k ik => ?_
  rw [← add_halves ε]
  refine lt_of_le_of_lt (abv_sub_le abv _ _ _) (add_lt_add (hi _ ij) ?_)
  rw [abv_sub abv]; exact hi _ ik
Uniform Cauchy Criterion for Sequences with Respect to an Absolute Value
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, $\beta$ be a ring, and $abv : \beta \to \alpha$ be an absolute value function. If $f : \mathbb{N} \to \beta$ is a Cauchy sequence with respect to $abv$, then for any $\varepsilon > 0$ in $\alpha$, there exists an index $i \in \mathbb{N}$ such that for all $j, k \geq i$, the distance between $f_j$ and $f_k$ satisfies $abv(f_j - f_k) < \varepsilon$.
IsCauSeq.cauchy₃ theorem
(hf : IsCauSeq abv f) {ε : α} (ε0 : 0 < ε) : ∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (f k - f j) < ε
Full source
theorem cauchy₃ (hf : IsCauSeq abv f) {ε : α} (ε0 : 0 < ε) :
    ∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (f k - f j) < ε :=
  let ⟨i, H⟩ := hf.cauchy₂ ε0
  ⟨i, fun _ ij _ jk => H _ (le_trans ij jk) _ ij⟩
Uniform Cauchy Criterion for Sequences with Respect to an Absolute Value (Variant)
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, $\beta$ a ring, and $\text{abv} : \beta \to \alpha$ an absolute value function. If $f : \mathbb{N} \to \beta$ is a Cauchy sequence with respect to $\text{abv}$, then for any $\varepsilon > 0$ in $\alpha$, there exists an index $i \in \mathbb{N}$ such that for all $j \geq i$ and all $k \geq j$, the distance between $f_k$ and $f_j$ satisfies $\text{abv}(f_k - f_j) < \varepsilon$.
IsCauSeq.bounded theorem
(hf : IsCauSeq abv f) : ∃ r, ∀ i, abv (f i) < r
Full source
lemma bounded (hf : IsCauSeq abv f) : ∃ r, ∀ i, abv (f i) < r := by
  obtain ⟨i, h⟩ := hf _ zero_lt_one
  set R : ℕ → α := @Nat.rec (fun _ => α) (abv (f 0)) fun i c => max c (abv (f i.succ)) with hR
  have : ∀ i, ∀ j ≤ i, abv (f j) ≤ R i := by
    refine Nat.rec (by simp [hR]) ?_
    rintro i hi j (rfl | hj)
    · simp [R]
    · exact (hi j hj).trans (le_max_left _ _)
  refine ⟨R i + 1, fun j ↦ ?_⟩
  obtain hji | hij := le_total j i
  · exact (this i _ hji).trans_lt (lt_add_one _)
  · simpa using (abv_add abv _ _).trans_lt <| add_lt_add_of_le_of_lt (this i _ le_rfl) (h _ hij)
Boundedness of Cauchy Sequences with Respect to an Absolute Value
Informal description
For any Cauchy sequence \( f : \mathbb{N} \to \beta \) with respect to an absolute value function \( \text{abv} : \beta \to \alpha \), there exists a real number \( r \) such that the absolute value of every term \( f_i \) is bounded above by \( r \), i.e., \( \text{abv}(f_i) < r \) for all \( i \in \mathbb{N} \).
IsCauSeq.bounded' theorem
(hf : IsCauSeq abv f) (x : α) : ∃ r > x, ∀ i, abv (f i) < r
Full source
lemma bounded' (hf : IsCauSeq abv f) (x : α) : ∃ r > x, ∀ i, abv (f i) < r :=
  let ⟨r, h⟩ := hf.bounded
  ⟨max r (x + 1), (lt_add_one x).trans_le (le_max_right _ _),
    fun i ↦ (h i).trans_le (le_max_left _ _)⟩
Existence of Upper Bound for Cauchy Sequence Terms Above Any Given Value
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, $\beta$ a ring, and $\text{abv} : \beta \to \alpha$ an absolute value function. For any Cauchy sequence $f : \mathbb{N} \to \beta$ with respect to $\text{abv}$ and any $x \in \alpha$, there exists $r > x$ such that $\text{abv}(f_i) < r$ for all $i \in \mathbb{N}$.
IsCauSeq.const theorem
(x : β) : IsCauSeq abv fun _ ↦ x
Full source
lemma const (x : β) : IsCauSeq abv fun _ ↦ x :=
  fun ε ε0 ↦ ⟨0, fun j _ => by simpa [abv_zero] using ε0⟩
Constant Sequences are Cauchy
Informal description
For any element $x$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the constant sequence $f : \mathbb{N} \to \beta$ defined by $f(n) = x$ for all $n \in \mathbb{N}$ is a Cauchy sequence with respect to $\text{abv}$.
IsCauSeq.add theorem
(hf : IsCauSeq abv f) (hg : IsCauSeq abv g) : IsCauSeq abv (f + g)
Full source
theorem add (hf : IsCauSeq abv f) (hg : IsCauSeq abv g) : IsCauSeq abv (f + g) := fun _ ε0 =>
  let ⟨_, δ0, Hδ⟩ := rat_add_continuous_lemma abv ε0
  let ⟨i, H⟩ := exists_forall_ge_and (hf.cauchy₃ δ0) (hg.cauchy₃ δ0)
  ⟨i, fun _ ij =>
    let ⟨H₁, H₂⟩ := H _ le_rfl
    Hδ (H₁ _ ij) (H₂ _ ij)⟩
Sum of Cauchy Sequences is Cauchy
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, $\beta$ a ring, and $\text{abv} : \beta \to \alpha$ an absolute value function. If $f, g : \mathbb{N} \to \beta$ are Cauchy sequences with respect to $\text{abv}$, then their pointwise sum $f + g$ is also a Cauchy sequence with respect to $\text{abv}$.
IsCauSeq.mul theorem
(hf : IsCauSeq abv f) (hg : IsCauSeq abv g) : IsCauSeq abv (f * g)
Full source
lemma mul (hf : IsCauSeq abv f) (hg : IsCauSeq abv g) : IsCauSeq abv (f * g) := fun _ ε0 =>
  let ⟨_, _, hF⟩ := hf.bounded' 0
  let ⟨_, _, hG⟩ := hg.bounded' 0
  let ⟨_, δ0, Hδ⟩ := rat_mul_continuous_lemma abv ε0
  let ⟨i, H⟩ := exists_forall_ge_and (hf.cauchy₃ δ0) (hg.cauchy₃ δ0)
  ⟨i, fun j ij =>
    let ⟨H₁, H₂⟩ := H _ le_rfl
    Hδ (hF j) (hG i) (H₁ _ ij) (H₂ _ ij)⟩
Product of Cauchy Sequences is Cauchy
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, $\beta$ a ring, and $\text{abv} : \beta \to \alpha$ an absolute value function. If $f, g : \mathbb{N} \to \beta$ are Cauchy sequences with respect to $\text{abv}$, then their pointwise product $f \cdot g$ is also a Cauchy sequence with respect to $\text{abv}$.
CauSeq definition
{α : Type*} [Field α] [LinearOrder α] [IsStrictOrderedRing α] (β : Type*) [Ring β] (abv : β → α) : Type _
Full source
/-- `CauSeq β abv` is the type of `β`-valued Cauchy sequences, with respect to the absolute value
function `abv`. -/
def CauSeq {α : Type*} [Field α] [LinearOrder α] [IsStrictOrderedRing α]
    (β : Type*) [Ring β] (abv : β → α) : Type _ :=
  { f : ℕ → β // IsCauSeq abv f }
Cauchy sequences with respect to an absolute value
Informal description
The type of Cauchy sequences 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. A sequence $f : \mathbb{N} \to \beta$ belongs to this type if for every $\varepsilon > 0$ in $\alpha$, there exists an index $i$ such that for all $j \geq i$, the distance $\text{abv}(f_j - f_i) < \varepsilon$.
CauSeq.instCoeFunForallNat instance
: CoeFun (CauSeq β abv) fun _ => ℕ → β
Full source
instance : CoeFun (CauSeq β abv) fun _ =>  → β :=
  ⟨Subtype.val⟩
Cauchy Sequences as Functions from Naturals
Informal description
The type of Cauchy sequences `CauSeq β abv` can be treated as a function from natural numbers to `β`, where `β` is a ring and `abv` is an absolute value function from `β` to a linearly ordered field `α` with a strict ordered ring structure.
CauSeq.ext theorem
{f g : CauSeq β abv} (h : ∀ i, f i = g i) : f = g
Full source
@[ext]
theorem ext {f g : CauSeq β abv} (h : ∀ i, f i = g i) : f = g := Subtype.eq (funext h)
Extensionality of Cauchy Sequences: $f(i) = g(i)$ for all $i$ implies $f = g$
Informal description
Let $f$ and $g$ be two Cauchy sequences 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. If $f(i) = g(i)$ for all natural numbers $i$, then $f = g$ as Cauchy sequences.
CauSeq.isCauSeq theorem
(f : CauSeq β abv) : IsCauSeq abv f
Full source
theorem isCauSeq (f : CauSeq β abv) : IsCauSeq abv f :=
  f.2
Cauchy Sequence Condition Holds for CauSeq Elements
Informal description
For any Cauchy sequence $f$ in the ring $\beta$ with respect to the absolute value function $\text{abv} : \beta \to \alpha$, the sequence $f$ satisfies the Cauchy condition: for every $\varepsilon > 0$ in $\alpha$, there exists an index $i$ such that for all $j \geq i$, the distance $\text{abv}(f_j - f_i) < \varepsilon$.
CauSeq.cauchy theorem
(f : CauSeq β abv) : ∀ {ε}, 0 < ε → ∃ i, ∀ j ≥ i, abv (f j - f i) < ε
Full source
theorem cauchy (f : CauSeq β abv) : ∀ {ε}, 0 < ε → ∃ i, ∀ j ≥ i, abv (f j - f i) < ε := @f.2
Cauchy Criterion for Sequences with Respect to an Absolute Value
Informal description
For any Cauchy sequence $f$ in the ring $\beta$ with respect to the absolute value function $\text{abv} : \beta \to \alpha$, and for any $\varepsilon > 0$ in $\alpha$, there exists an index $i$ such that for all $j \geq i$, the distance $\text{abv}(f_j - f_i) < \varepsilon$.
CauSeq.ofEq definition
(f : CauSeq β abv) (g : ℕ → β) (e : ∀ i, f i = g i) : CauSeq β abv
Full source
/-- Given a Cauchy sequence `f`, create a Cauchy sequence from a sequence `g` with
the same values as `f`. -/
def ofEq (f : CauSeq β abv) (g :  → β) (e : ∀ i, f i = g i) : CauSeq β abv :=
  ⟨g, fun ε => by rw [show g = f from (funext e).symm]; exact f.cauchy⟩
Cauchy sequence equality preservation
Informal description
Given a Cauchy sequence \( f \) with respect to an absolute value function \( \text{abv} \), and a sequence \( g \) such that \( g_i = f_i \) for all indices \( i \), then \( g \) is also a Cauchy sequence with respect to \( \text{abv} \).
CauSeq.cauchy₂ theorem
(f : CauSeq β abv) {ε} : 0 < ε → ∃ i, ∀ j ≥ i, ∀ k ≥ i, abv (f j - f k) < ε
Full source
theorem cauchy₂ (f : CauSeq β abv) {ε} :
    0 < ε → ∃ i, ∀ j ≥ i, ∀ k ≥ i, abv (f j - f k) < ε :=
  f.2.cauchy₂
Uniform Cauchy Criterion for Sequences with Respect to an Absolute Value
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 Cauchy sequence $f : \mathbb{N} \to \beta$ with respect to $\text{abv}$ and any $\varepsilon > 0$ in $\alpha$, there exists an index $i \in \mathbb{N}$ such that for all $j, k \geq i$, the distance $\text{abv}(f_j - f_k) < \varepsilon$.
CauSeq.cauchy₃ theorem
(f : CauSeq β abv) {ε} : 0 < ε → ∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (f k - f j) < ε
Full source
theorem cauchy₃ (f : CauSeq β abv) {ε} : 0 < ε → ∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (f k - f j) < ε :=
  f.2.cauchy₃
Uniform Cauchy Criterion for Sequences with Respect to an Absolute Value (Variant)
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 Cauchy sequence $f : \mathbb{N} \to \beta$ with respect to $\text{abv}$ and any $\varepsilon > 0$ in $\alpha$, there exists an index $i \in \mathbb{N}$ such that for all $j \geq i$ and all $k \geq j$, the distance $\text{abv}(f_k - f_j) < \varepsilon$.
CauSeq.bounded theorem
(f : CauSeq β abv) : ∃ r, ∀ i, abv (f i) < r
Full source
theorem bounded (f : CauSeq β abv) : ∃ r, ∀ i, abv (f i) < r := f.2.bounded
Boundedness of Cauchy Sequences with Respect to an Absolute Value
Informal description
For any Cauchy sequence $f$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, there exists a real number $r$ such that $\text{abv}(f_i) < r$ for all indices $i \in \mathbb{N}$.
CauSeq.bounded' theorem
(f : CauSeq β abv) (x : α) : ∃ r > x, ∀ i, abv (f i) < r
Full source
theorem bounded' (f : CauSeq β abv) (x : α) : ∃ r > x, ∀ i, abv (f i) < r := f.2.bounded' x
Existence of Upper Bound for Cauchy Sequence Terms Above Any Given Value
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 Cauchy sequence $f$ in $\beta$ with respect to $\text{abv}$ and any $x \in \alpha$, there exists a real number $r > x$ such that $\text{abv}(f_i) < r$ for all indices $i \in \mathbb{N}$.
CauSeq.instAdd instance
: Add (CauSeq β abv)
Full source
instance : Add (CauSeq β abv) :=
  ⟨fun f g => ⟨f + g, f.2.add g.2⟩⟩
Pointwise Addition of Cauchy Sequences
Informal description
The type of Cauchy sequences $CauSeq(\beta, abv)$ in a ring $\beta$ with respect to an absolute value function $abv : \beta \to \alpha$ is equipped with a pointwise addition operation. Specifically, for any two Cauchy sequences $f$ and $g$, their sum $f + g$ is defined by $(f + g)(i) = f(i) + g(i)$ for each index $i \in \mathbb{N}$.
CauSeq.coe_add theorem
(f g : CauSeq β abv) : ⇑(f + g) = (f : ℕ → β) + g
Full source
@[simp, norm_cast]
theorem coe_add (f g : CauSeq β abv) : ⇑(f + g) = (f :  → β) + g :=
  rfl
Pointwise Addition of Cauchy Sequences Preserves Function Equality
Informal description
For any two Cauchy sequences $f$ and $g$ in the ring $\beta$ with respect to the absolute value function $\text{abv}$, the sequence obtained by pointwise addition $(f + g)$ is equal to the sum of the sequences $f$ and $g$ as functions from $\mathbb{N}$ to $\beta$. That is, $(f + g)(i) = f(i) + g(i)$ for all $i \in \mathbb{N}$.
CauSeq.add_apply theorem
(f g : CauSeq β abv) (i : ℕ) : (f + g) i = f i + g i
Full source
@[simp, norm_cast]
theorem add_apply (f g : CauSeq β abv) (i : ) : (f + g) i = f i + g i :=
  rfl
Pointwise Addition of Cauchy Sequences: $(f + g)(i) = f(i) + g(i)$
Informal description
For any two Cauchy sequences $f$ and $g$ with respect to an absolute value function $\text{abv}$ on a ring $\beta$, and for any natural number $i$, the $i$-th term of the sum sequence $f + g$ is equal to the sum of the $i$-th terms of $f$ and $g$, i.e., $(f + g)(i) = f(i) + g(i)$.
CauSeq.const definition
(x : β) : CauSeq β abv
Full source
/-- The constant Cauchy sequence. -/
def const (x : β) : CauSeq β abv := ⟨fun _ ↦ x, IsCauSeq.const _⟩
Constant Cauchy sequence
Informal description
The constant Cauchy sequence, where every term is equal to a fixed element $x$ in the ring $\beta$, with respect to the absolute value function $\text{abv} : \beta \to \alpha$.
CauSeq.coe_const theorem
(x : β) : (const x : ℕ → β) = Function.const ℕ x
Full source
@[simp, norm_cast]
theorem coe_const (x : β) : (const x :  → β) = Function.const  x :=
  rfl
Constant Cauchy Sequence as Constant Function
Informal description
For any element $x$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the constant Cauchy sequence $\text{const}(x)$ (viewed as a function $\mathbb{N} \to \beta$) is equal to the constant function $\lambda n, x$.
CauSeq.const_apply theorem
(x : β) (i : ℕ) : (const x : ℕ → β) i = x
Full source
@[simp, norm_cast]
theorem const_apply (x : β) (i : ) : (const x :  → β) i = x :=
  rfl
Constant Cauchy Sequence Evaluation: $(\text{const } x)_i = x$
Informal description
For any element $x$ in a ring $\beta$ and any natural number $i$, the $i$-th term of the constant Cauchy sequence (with respect to an absolute value function $\text{abv}$) is equal to $x$, i.e., $(\text{const } x)_i = x$.
CauSeq.const_inj theorem
{x y : β} : (const x : CauSeq β abv) = const y ↔ x = y
Full source
theorem const_inj {x y : β} : (const x : CauSeq β abv) = const y ↔ x = y :=
  ⟨fun h => congr_arg (fun f : CauSeq β abv => (f : ℕ → β) 0) h, congr_arg _⟩
Injectivity of Constant Cauchy Sequences: $\text{const}(x) = \text{const}(y) \leftrightarrow x = 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 constant Cauchy sequences $\text{const}(x)$ and $\text{const}(y)$ are equal if and only if $x = y$.
CauSeq.instZero instance
: Zero (CauSeq β abv)
Full source
instance : Zero (CauSeq β abv) :=
  ⟨const 0⟩
The Zero Element of Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ has a canonical zero element, given by the constant sequence $0$.
CauSeq.instOne instance
: One (CauSeq β abv)
Full source
instance : One (CauSeq β abv) :=
  ⟨const 1⟩
The One Element of Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ has a canonical one element, given by the constant sequence $1$.
CauSeq.instInhabited instance
: Inhabited (CauSeq β abv)
Full source
instance : Inhabited (CauSeq β abv) :=
  ⟨0⟩
Inhabitedness of Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is inhabited, meaning it contains at least one element.
CauSeq.coe_zero theorem
: ⇑(0 : CauSeq β abv) = 0
Full source
@[simp, norm_cast]
theorem coe_zero : ⇑(0 : CauSeq β abv) = 0 :=
  rfl
Zero Cauchy Sequence is the Constant Zero Function
Informal description
The zero Cauchy sequence in $\text{CauSeq}(\beta, \text{abv})$ is equal to the constant zero function, i.e., $(0 : \text{CauSeq}(\beta, \text{abv}))(i) = 0$ for all $i \in \mathbb{N}$.
CauSeq.coe_one theorem
: ⇑(1 : CauSeq β abv) = 1
Full source
@[simp, norm_cast]
theorem coe_one : ⇑(1 : CauSeq β abv) = 1 :=
  rfl
Constant One Sequence in Cauchy Sequences
Informal description
The constant sequence $1$ in the type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ is equal to the constant function $1 : \mathbb{N} \to \beta$.
CauSeq.zero_apply theorem
(i) : (0 : CauSeq β abv) i = 0
Full source
@[simp, norm_cast]
theorem zero_apply (i) : (0 : CauSeq β abv) i = 0 :=
  rfl
Zero Cauchy Sequence Evaluates to Zero at Any Index
Informal description
For any index $i \in \mathbb{N}$, the $i$-th term of the zero Cauchy sequence in $\text{CauSeq}(\beta, \text{abv})$ is equal to $0$, i.e., $(0 : \text{CauSeq}(\beta, \text{abv}))_i = 0$.
CauSeq.one_apply theorem
(i) : (1 : CauSeq β abv) i = 1
Full source
@[simp, norm_cast]
theorem one_apply (i) : (1 : CauSeq β abv) i = 1 :=
  rfl
Multiplicative Identity Cauchy Sequence Evaluates to One at Any Index
Informal description
For any index $i \in \mathbb{N}$, the $i$-th term of the multiplicative identity Cauchy sequence in $\text{CauSeq}(\beta, \text{abv})$ is equal to $1$, i.e., $(1 : \text{CauSeq}(\beta, \text{abv}))_i = 1$.
CauSeq.const_zero theorem
: const 0 = 0
Full source
@[simp]
theorem const_zero : const 0 = 0 :=
  rfl
Constant Zero Sequence Equals Zero in Cauchy Sequences
Informal description
The constant Cauchy sequence with value $0$ is equal to the zero element in the ring of Cauchy sequences, i.e., $\text{const}(0) = 0$.
CauSeq.const_one theorem
: const 1 = 1
Full source
@[simp]
theorem const_one : const 1 = 1 :=
  rfl
Constant One Sequence Equals Multiplicative Identity in Cauchy Sequences
Informal description
The constant Cauchy sequence with value $1$ is equal to the multiplicative identity element in the ring of Cauchy sequences, i.e., $\text{const}(1) = 1$.
CauSeq.const_add theorem
(x y : β) : const (x + y) = const x + const y
Full source
theorem const_add (x y : β) : const (x + y) = const x + const y :=
  rfl
Additivity of Constant Cauchy Sequences: $\text{const}(x + y) = \text{const}(x) + \text{const}(y)$
Informal description
For any elements $x, y$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the constant Cauchy sequence corresponding to $x + y$ is equal to the sum of the constant Cauchy sequences corresponding to $x$ and $y$. That is, $\text{const}(x + y) = \text{const}(x) + \text{const}(y)$.
CauSeq.instMul instance
: Mul (CauSeq β abv)
Full source
instance : Mul (CauSeq β abv) := ⟨fun f g ↦ ⟨f * g, f.2.mul g.2⟩⟩
Pointwise Multiplication on Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with values in a ring $\beta$ and absolute value $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure) is equipped with a multiplication operation defined pointwise.
CauSeq.coe_mul theorem
(f g : CauSeq β abv) : ⇑(f * g) = (f : ℕ → β) * g
Full source
@[simp, norm_cast]
theorem coe_mul (f g : CauSeq β abv) : ⇑(f * g) = (f :  → β) * g :=
  rfl
Pointwise Multiplication of Cauchy Sequences
Informal description
For any two Cauchy sequences $f$ and $g$ in $\text{CauSeq}(\beta, \text{abv})$, the pointwise multiplication sequence $f * g$ is equal to the pointwise product of the underlying functions $f$ and $g$ as sequences from $\mathbb{N}$ to $\beta$. That is, $(f * g)(n) = f(n) * g(n)$ for all $n \in \mathbb{N}$.
CauSeq.mul_apply theorem
(f g : CauSeq β abv) (i : ℕ) : (f * g) i = f i * g i
Full source
@[simp, norm_cast]
theorem mul_apply (f g : CauSeq β abv) (i : ) : (f * g) i = f i * g i :=
  rfl
Pointwise Product of Cauchy Sequences: $(f \cdot g)_i = f_i \cdot g_i$
Informal description
For any two Cauchy sequences $f$ and $g$ 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 and $\beta$ is a ring), and for any natural number $i$, the $i$-th term of the product sequence $f \cdot g$ is equal to the product of the $i$-th terms of $f$ and $g$, i.e., $(f \cdot g)_i = f_i \cdot g_i$.
CauSeq.const_mul theorem
(x y : β) : const (x * y) = const x * const y
Full source
theorem const_mul (x y : β) : const (x * y) = const x * const y :=
  rfl
Product of Constant Cauchy Sequences: $\text{const}(x \cdot y) = \text{const}(x) \cdot \text{const}(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 constant Cauchy sequence corresponding to the product $x \cdot y$ is equal to the pointwise product of the constant Cauchy sequences corresponding to $x$ and $y$.
CauSeq.instNeg instance
: Neg (CauSeq β abv)
Full source
instance : Neg (CauSeq β abv) := ⟨fun f ↦ ⟨-f, f.2.neg⟩⟩
Negation Operation on Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ has a negation operation, where the negation of a Cauchy sequence $f$ is defined pointwise as $(-f)_i = -f_i$ for each index $i$.
CauSeq.coe_neg theorem
(f : CauSeq β abv) : ⇑(-f) = -f
Full source
@[simp, norm_cast]
theorem coe_neg (f : CauSeq β abv) : ⇑(-f) = -f :=
  rfl
Pointwise Negation of Cauchy Sequences
Informal description
For any Cauchy sequence $f$ in the ring $\beta$ with respect to the absolute value function $\text{abv}$, the pointwise negation of $f$ is equal to the negation of the sequence $f$ itself, i.e., $(-f)(i) = -f(i)$ for all indices $i$.
CauSeq.neg_apply theorem
(f : CauSeq β abv) (i) : (-f) i = -f i
Full source
@[simp, norm_cast]
theorem neg_apply (f : CauSeq β abv) (i) : (-f) i = -f i :=
  rfl
Pointwise Negation of Cauchy Sequences: $(-f)_i = -f_i$
Informal description
For any Cauchy sequence $f$ in the ring $\beta$ with respect to the absolute value function $\text{abv}$, and for any index $i$, the $i$-th term of the negation of $f$ is equal to the negation of the $i$-th term of $f$, i.e., $(-f)_i = -f_i$.
CauSeq.const_neg theorem
(x : β) : const (-x) = -const x
Full source
theorem const_neg (x : β) : const (-x) = -const x :=
  rfl
Negation of Constant Cauchy Sequences: $\text{const}(-x) = -\text{const}(x)$
Informal description
For any element $x$ in the ring $\beta$, the constant Cauchy sequence with value $-x$ is equal to the negation of the constant Cauchy sequence with value $x$, i.e., $\text{const}(-x) = -\text{const}(x)$.
CauSeq.instSub instance
: Sub (CauSeq β abv)
Full source
instance : Sub (CauSeq β abv) :=
  ⟨fun f g => ofEq (f + -g) (fun x => f x - g x) fun i => by simp [sub_eq_add_neg]⟩
Pointwise Subtraction of Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ is equipped with a pointwise subtraction operation. Specifically, for any two Cauchy sequences $f$ and $g$, their difference $f - g$ is defined by $(f - g)(i) = f(i) - g(i)$ for each index $i \in \mathbb{N}$.
CauSeq.coe_sub theorem
(f g : CauSeq β abv) : ⇑(f - g) = (f : ℕ → β) - g
Full source
@[simp, norm_cast]
theorem coe_sub (f g : CauSeq β abv) : ⇑(f - g) = (f :  → β) - g :=
  rfl
Pointwise Difference of Underlying Functions of Cauchy Sequences: $(f - g)(i) = f(i) - g(i)$
Informal description
For any two Cauchy sequences $f, g$ in the ring $\beta$ with respect to the absolute value function $\text{abv} : \beta \to \alpha$, the underlying function of their difference sequence $f - g$ is equal to the pointwise difference of the underlying functions of $f$ and $g$. That is, $(f - g)(i) = f(i) - g(i)$ for all indices $i \in \mathbb{N}$.
CauSeq.sub_apply theorem
(f g : CauSeq β abv) (i : ℕ) : (f - g) i = f i - g i
Full source
@[simp, norm_cast]
theorem sub_apply (f g : CauSeq β abv) (i : ) : (f - g) i = f i - g i :=
  rfl
Pointwise Difference of Cauchy Sequences: $(f - g)(i) = f(i) - g(i)$
Informal description
For any two Cauchy sequences $f$ and $g$ in the ring $\beta$ with respect to the absolute value function $\text{abv} : \beta \to \alpha$, and for any natural number $i$, the $i$-th term of the difference sequence $f - g$ is equal to the difference of the $i$-th terms of $f$ and $g$, i.e., $(f - g)(i) = f(i) - g(i)$.
CauSeq.const_sub theorem
(x y : β) : const (x - y) = const x - const y
Full source
theorem const_sub (x y : β) : const (x - y) = const x - const y :=
  rfl
Subtraction of Constant Cauchy Sequences: $\text{const}(x - y) = \text{const}(x) - \text{const}(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 constant Cauchy sequence associated with their difference $x - y$ is equal to the difference of the constant Cauchy sequences associated with $x$ and $y$. In other words, the map sending an element to its constant Cauchy sequence preserves subtraction.
CauSeq.instSMul instance
: SMul G (CauSeq β abv)
Full source
instance : SMul G (CauSeq β abv) :=
  ⟨fun a f => (ofEq (const (a • (1 : β)) * f) (a • (f : ℕ → β))) fun _ => smul_one_mul _ _⟩
Pointwise Scalar Multiplication on Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with values in a ring $\beta$ and absolute value $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure) is equipped with a scalar multiplication operation defined pointwise.
CauSeq.coe_smul theorem
(a : G) (f : CauSeq β abv) : ⇑(a • f) = a • (f : ℕ → β)
Full source
@[simp, norm_cast]
theorem coe_smul (a : G) (f : CauSeq β abv) : ⇑(a • f) = a • (f :  → β) :=
  rfl
Pointwise Scalar Multiplication of Cauchy Sequences: $(a \cdot f)(n) = a \cdot f(n)$
Informal description
Let $G$ be a type with a scalar multiplication operation on a ring $\beta$, and let $\text{abv} : \beta \to \alpha$ be an absolute value function where $\alpha$ is a linearly ordered field with a strict ordered ring structure. For any scalar $a \in G$ and any Cauchy sequence $f$ in $\text{CauSeq}(\beta, \text{abv})$, the underlying function of the scalar multiple $a \cdot f$ is equal to the pointwise scalar multiplication of $a$ with the underlying function of $f$, i.e., $(a \cdot f)(n) = a \cdot f(n)$ for all $n \in \mathbb{N}$.
CauSeq.smul_apply theorem
(a : G) (f : CauSeq β abv) (i : ℕ) : (a • f) i = a • f i
Full source
@[simp, norm_cast]
theorem smul_apply (a : G) (f : CauSeq β abv) (i : ) : (a • f) i = a • f i :=
  rfl
Pointwise Scalar Multiplication of Cauchy Sequences: $(a \cdot f)_i = a \cdot f_i$
Informal description
For any scalar $a \in G$, any Cauchy sequence $f$ in $\text{CauSeq}(\beta, \text{abv})$, and any index $i \in \mathbb{N}$, the $i$-th term of the scalar multiple sequence $a \cdot f$ is equal to the scalar multiple of the $i$-th term of $f$, i.e., $(a \cdot f)_i = a \cdot f_i$.
CauSeq.const_smul theorem
(a : G) (x : β) : const (a • x) = a • const x
Full source
theorem const_smul (a : G) (x : β) : const (a • x) = a • const x :=
  rfl
Scalar Multiplication of Constant Cauchy Sequences: $a \cdot \text{const}(x) = \text{const}(a \cdot x)$
Informal description
For any scalar $a$ in a group $G$ and any element $x$ in a ring $\beta$ with an absolute value function $\text{abv} : \beta \to \alpha$, the constant Cauchy sequence with value $a \cdot x$ is equal to the scalar multiple $a$ applied to the constant Cauchy sequence with value $x$.
CauSeq.instIsScalarTower instance
: IsScalarTower G (CauSeq β abv) (CauSeq β abv)
Full source
instance : IsScalarTower G (CauSeq β abv) (CauSeq β abv) :=
  ⟨fun a f g => Subtype.ext <| smul_assoc a (f : ℕ → β) (g : ℕ → β)⟩
Scalar Tower Condition for Scalar Multiplication on Cauchy Sequences
Informal description
For any scalar type $G$ and 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 scalar multiplication operation on the type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ satisfies the scalar tower condition. That is, for any $a \in G$ and any Cauchy sequences $f, g \in \text{CauSeq}(\beta, \text{abv})$, we have $a \cdot (f \cdot g) = (a \cdot f) \cdot g = f \cdot (a \cdot g)$.
CauSeq.addGroup instance
: AddGroup (CauSeq β abv)
Full source
instance addGroup : AddGroup (CauSeq β abv) :=
  Function.Injective.addGroup Subtype.val Subtype.val_injective rfl coe_add coe_neg coe_sub
    (fun _ _ => coe_smul _ _) fun _ _ => coe_smul _ _
Additive Group Structure on Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ forms an additive group, where $\alpha$ is a linearly ordered field with a strict ordered ring structure and $\beta$ is a ring. The group operation is given by pointwise addition of sequences, the zero element is the constant zero sequence, and the negation operation is given by pointwise negation.
CauSeq.instNatCast instance
: NatCast (CauSeq β abv)
Full source
instance instNatCast : NatCast (CauSeq β abv) := ⟨fun n => const n⟩
Natural Numbers as Constant Cauchy Sequences
Informal description
For any ring $\beta$ with an absolute value function $\text{abv} : \beta \to \alpha$ (where $\alpha$ is a linearly ordered field with strict ordered ring structure), the type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ has a canonical way to include natural numbers as constant sequences.
CauSeq.instIntCast instance
: IntCast (CauSeq β abv)
Full source
instance instIntCast : IntCast (CauSeq β abv) := ⟨fun n => const n⟩
Integer Casting for Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ 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 and $\beta$ is a ring.
CauSeq.addGroupWithOne instance
: AddGroupWithOne (CauSeq β abv)
Full source
instance addGroupWithOne : AddGroupWithOne (CauSeq β abv) :=
  Function.Injective.addGroupWithOne Subtype.val Subtype.val_injective rfl rfl
  coe_add coe_neg coe_sub
  (by intros; rfl)
  (by intros; rfl)
  (by intros; rfl)
  (by intros; rfl)
Additive Group with One Structure on Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ forms an additive group with one, where $\alpha$ is a linearly ordered field with a strict ordered ring structure and $\beta$ is a ring. This structure includes pointwise addition, negation, and subtraction operations, as well as integer and natural number scalar multiplication, and a distinguished element 1 given by the constant sequence.
CauSeq.instPowNat instance
: Pow (CauSeq β abv) ℕ
Full source
instance : Pow (CauSeq β abv)  :=
  ⟨fun f n =>
    (ofEq (npowRec n f) fun i => f i ^ n) <| by induction n <;> simp [*, npowRec, pow_succ]⟩
Natural Number Power Operation on Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ 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 and $\beta$ is a ring. For a Cauchy sequence $f$ and a natural number $n$, the power $f^n$ is defined pointwise as $(f^n)_i = (f_i)^n$ for each index $i$.
CauSeq.coe_pow theorem
(f : CauSeq β abv) (n : ℕ) : ⇑(f ^ n) = (f : ℕ → β) ^ n
Full source
@[simp, norm_cast]
theorem coe_pow (f : CauSeq β abv) (n : ) : ⇑(f ^ n) = (f :  → β) ^ n :=
  rfl
Pointwise Power of Cauchy Sequences
Informal description
For any Cauchy sequence $f$ with respect to an absolute value function $\text{abv}$ and any natural number $n$, the $n$-th power of $f$ (as a Cauchy sequence) is equal to the pointwise $n$-th power of $f$ (as a function from $\mathbb{N}$ to $\beta$). That is, $(f^n)_i = (f_i)^n$ for all indices $i$.
CauSeq.pow_apply theorem
(f : CauSeq β abv) (n i : ℕ) : (f ^ n) i = f i ^ n
Full source
@[simp, norm_cast]
theorem pow_apply (f : CauSeq β abv) (n i : ) : (f ^ n) i = f i ^ n :=
  rfl
Pointwise Power Operation for Cauchy Sequences: $(f^n)_i = (f_i)^n$
Informal description
For any Cauchy sequence $f$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$, any natural number $n$, and any index $i$, the $i$-th term of the sequence $f^n$ is equal to the $n$-th power of the $i$-th term of $f$, i.e., $(f^n)_i = (f_i)^n$.
CauSeq.const_pow theorem
(x : β) (n : ℕ) : const (x ^ n) = const x ^ n
Full source
theorem const_pow (x : β) (n : ) : const (x ^ n) = const x ^ n :=
  rfl
Power of Constant Cauchy Sequence: $\text{const}(x^n) = (\text{const}\,x)^n$
Informal description
For any element $x$ in the ring $\beta$ and any natural number $n$, the constant Cauchy sequence corresponding to $x^n$ is equal to the $n$-th power of the constant Cauchy sequence corresponding to $x$, i.e., $\text{const}(x^n) = (\text{const}\,x)^n$.
CauSeq.ring instance
: Ring (CauSeq β abv)
Full source
instance ring : Ring (CauSeq β abv) :=
  Function.Injective.ring Subtype.val Subtype.val_injective rfl rfl coe_add coe_mul coe_neg coe_sub
    (fun _ _ => coe_smul _ _) (fun _ _ => coe_smul _ _) coe_pow (fun _ => rfl) fun _ => rfl
Ring Structure on Cauchy Sequences
Informal description
The type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ 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 and $\beta$ is a ring. The ring operations are defined pointwise: addition, subtraction, and multiplication of sequences are performed termwise, and the zero and one elements are the constant sequences of the zero and one elements of $\beta$, respectively.
CauSeq.instCommRingOfIsAbsoluteValue instance
{β : Type*} [CommRing β] {abv : β → α} [IsAbsoluteValue abv] : CommRing (CauSeq β abv)
Full source
instance {β : Type*} [CommRing β] {abv : β → α} [IsAbsoluteValue abv] : CommRing (CauSeq β abv) :=
  { CauSeq.ring with
    mul_comm := fun a b => ext fun n => by simp [mul_left_comm, mul_comm] }
Commutative Ring Structure on Cauchy Sequences with Absolute Value
Informal description
For any commutative 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 type of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ forms a commutative ring. The ring operations are defined pointwise: addition and multiplication of sequences are performed termwise, and the zero and one elements are the constant sequences of the zero and one elements of $\beta$, respectively.
CauSeq.LimZero definition
{abv : β → α} (f : CauSeq β abv) : Prop
Full source
/-- `LimZero f` holds when `f` approaches 0. -/
def LimZero {abv : β → α} (f : CauSeq β abv) : Prop :=
  ∀ ε > 0, ∃ i, ∀ j ≥ i, abv (f j) < ε
Sequence approaching zero in Cauchy sequences
Informal description
A sequence \( f \) in the type of Cauchy sequences `CauSeq β abv` is said to approach zero (denoted `LimZero f`) if for every positive \( \varepsilon \) in the linearly ordered field \( \alpha \), there exists an index \( i \) such that for all \( j \geq i \), the absolute value \( \text{abv}(f_j) < \varepsilon \). Here, \( \text{abv} : \beta \to \alpha \) is an absolute value function on the ring \( \beta \).
CauSeq.add_limZero theorem
{f g : CauSeq β abv} (hf : LimZero f) (hg : LimZero g) : LimZero (f + g)
Full source
theorem add_limZero {f g : CauSeq β abv} (hf : LimZero f) (hg : LimZero g) : LimZero (f + g)
  | ε, ε0 =>
    (exists_forall_ge_and (hf _ <| half_pos ε0) (hg _ <| half_pos ε0)).imp fun _ H j ij => by
      let ⟨H₁, H₂⟩ := H _ ij
      simpa [add_halves ε] using lt_of_le_of_lt (abv_add abv _ _) (add_lt_add H₁ H₂)
Sum of Zero-Convergent Cauchy Sequences Converges to Zero
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 : \mathbb{N} \to \beta$ in $\text{CauSeq}(\beta, \text{abv})$ that both approach zero (i.e., $\text{LimZero}\, f$ and $\text{LimZero}\, g$ hold), their pointwise sum $f + g$ also approaches zero.
CauSeq.mul_limZero_right theorem
(f : CauSeq β abv) {g} (hg : LimZero g) : LimZero (f * g)
Full source
theorem mul_limZero_right (f : CauSeq β abv) {g} (hg : LimZero g) : LimZero (f * g)
  | ε, ε0 =>
    let ⟨F, F0, hF⟩ := f.bounded' 0
    (hg _ <| div_pos ε0 F0).imp fun _ H j ij => by
      have := mul_lt_mul' (le_of_lt <| hF j) (H _ ij) (abv_nonneg abv _) F0
      rwa [mul_comm F, div_mul_cancel₀ _ (ne_of_gt F0), ← abv_mul] at this
Product of a Cauchy Sequence and a Zero-Convergent Sequence Converges to Zero
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 sequence $g$ in $\text{CauSeq}(\beta, \text{abv})$ that approaches zero (i.e., $\text{LimZero}\, g$ holds), the pointwise product sequence $f \cdot g$ also approaches zero.
CauSeq.mul_limZero_left theorem
{f} (g : CauSeq β abv) (hg : LimZero f) : LimZero (f * g)
Full source
theorem mul_limZero_left {f} (g : CauSeq β abv) (hg : LimZero f) : LimZero (f * g)
  | ε, ε0 =>
    let ⟨G, G0, hG⟩ := g.bounded' 0
    (hg _ <| div_pos ε0 G0).imp fun _ H j ij => by
      have := mul_lt_mul'' (H _ ij) (hG j) (abv_nonneg abv _) (abv_nonneg abv _)
      rwa [div_mul_cancel₀ _ (ne_of_gt G0), ← abv_mul] at this
Left Multiplication of Zero-Convergent Sequence with Cauchy Sequence Converges to Zero
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 $g$ in $\text{CauSeq}(\beta, \text{abv})$ and any sequence $f$ such that $f$ approaches zero (i.e., $\text{LimZero}\, f$ holds), the pointwise product $f * g$ also approaches zero.
CauSeq.neg_limZero theorem
{f : CauSeq β abv} (hf : LimZero f) : LimZero (-f)
Full source
theorem neg_limZero {f : CauSeq β abv} (hf : LimZero f) : LimZero (-f) := by
  rw [← neg_one_mul f]
  exact mul_limZero_right _ hf
Negation Preserves Zero-Convergence in 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 Cauchy sequence $f$ in $\text{CauSeq}(\beta, \text{abv})$ that approaches zero (i.e., $\text{LimZero}\, f$ holds), the negation sequence $-f$ also approaches zero.
CauSeq.sub_limZero theorem
{f g : CauSeq β abv} (hf : LimZero f) (hg : LimZero g) : LimZero (f - g)
Full source
theorem sub_limZero {f g : CauSeq β abv} (hf : LimZero f) (hg : LimZero g) : LimZero (f - g) := by
  simpa only [sub_eq_add_neg] using add_limZero hf (neg_limZero hg)
Difference of Zero-Convergent Cauchy Sequences Converges to Zero
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 : \mathbb{N} \to \beta$ in $\text{CauSeq}(\beta, \text{abv})$ that both approach zero (i.e., $\text{LimZero}\, f$ and $\text{LimZero}\, g$ hold), their pointwise difference $f - g$ also approaches zero.
CauSeq.limZero_sub_rev theorem
{f g : CauSeq β abv} (hfg : LimZero (f - g)) : LimZero (g - f)
Full source
theorem limZero_sub_rev {f g : CauSeq β abv} (hfg : LimZero (f - g)) : LimZero (g - f) := by
  simpa using neg_limZero hfg
Reversed Difference of Cauchy Sequences Approaches Zero
Informal description
For any two Cauchy sequences $f$ and $g$ in $\text{CauSeq}(\beta, \text{abv})$, if the difference sequence $f - g$ approaches zero, then the reversed difference sequence $g - f$ also approaches zero.
CauSeq.zero_limZero theorem
: LimZero (0 : CauSeq β abv)
Full source
theorem zero_limZero : LimZero (0 : CauSeq β abv)
  | ε, ε0 => ⟨0, fun j _ => by simpa [abv_zero abv] using ε0⟩
Zero Sequence is LimZero in Cauchy Sequences
Informal description
The constant zero sequence in the space of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ approaches zero, i.e., $\text{LimZero}(0)$ holds.
CauSeq.const_limZero theorem
{x : β} : LimZero (const x) ↔ x = 0
Full source
theorem const_limZero {x : β} : LimZeroLimZero (const x) ↔ x = 0 :=
  ⟨fun H =>
    (abv_eq_zero abv).1 <|
      (eq_of_le_of_forall_lt_imp_le_of_dense (abv_nonneg abv _)) fun _ ε0 =>
        let ⟨_, hi⟩ := H _ ε0
        le_of_lt <| hi _ le_rfl,
    fun e => e.symm ▸ zero_limZero⟩
Constant Sequence Approaches Zero if and only if Constant is Zero
Informal description
For any element $x$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the constant Cauchy sequence $(x, x, \dots)$ approaches zero if and only if $x = 0$.
CauSeq.equiv instance
: Setoid (CauSeq β abv)
Full source
instance equiv : Setoid (CauSeq β abv) :=
  ⟨fun f g => LimZero (f - g),
    ⟨fun f => by simp [zero_limZero],
    fun f ε hε => by simpa using neg_limZero f ε hε,
    fun fg gh => by simpa using add_limZero fg gh⟩⟩
Equivalence Relation on Cauchy Sequences
Informal description
The set of Cauchy sequences $\text{CauSeq}(\beta, \text{abv})$ in a ring $\beta$ with respect to an absolute value function $\text{abv} : \beta \to \alpha$ forms a setoid, where two sequences are considered equivalent if their difference tends to zero. Here, $\alpha$ is a linearly ordered field with a strict ordered ring structure.
CauSeq.add_equiv_add theorem
{f1 f2 g1 g2 : CauSeq β abv} (hf : f1 ≈ f2) (hg : g1 ≈ g2) : f1 + g1 ≈ f2 + g2
Full source
theorem add_equiv_add {f1 f2 g1 g2 : CauSeq β abv} (hf : f1 ≈ f2) (hg : g1 ≈ g2) :
    f1 + g1 ≈ f2 + g2 := by simpa only [← add_sub_add_comm] using add_limZero hf hg
Addition Preserves Equivalence of 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 four Cauchy sequences $f_1, f_2, g_1, g_2 \in \text{CauSeq}(\beta, \text{abv})$, if $f_1$ is equivalent to $f_2$ (i.e., their difference tends to zero) and $g_1$ is equivalent to $g_2$, then the pointwise sum $f_1 + g_1$ is equivalent to $f_2 + g_2$.
CauSeq.neg_equiv_neg theorem
{f g : CauSeq β abv} (hf : f ≈ g) : -f ≈ -g
Full source
theorem neg_equiv_neg {f g : CauSeq β abv} (hf : f ≈ g) : -f ≈ -g := by
  simpa only [neg_sub'] using neg_limZero hf
Negation Preserves Equivalence of 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})$, if $f$ is equivalent to $g$ (i.e., their difference tends to zero), then the negation sequences $-f$ and $-g$ are also equivalent.
CauSeq.sub_equiv_sub theorem
{f1 f2 g1 g2 : CauSeq β abv} (hf : f1 ≈ f2) (hg : g1 ≈ g2) : f1 - g1 ≈ f2 - g2
Full source
theorem sub_equiv_sub {f1 f2 g1 g2 : CauSeq β abv} (hf : f1 ≈ f2) (hg : g1 ≈ g2) :
    f1 - g1 ≈ f2 - g2 := by simpa only [sub_eq_add_neg] using add_equiv_add hf (neg_equiv_neg hg)
Subtraction Preserves Equivalence of 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 four Cauchy sequences $f_1, f_2, g_1, g_2 \in \text{CauSeq}(\beta, \text{abv})$, if $f_1$ is equivalent to $f_2$ (i.e., their difference tends to zero) and $g_1$ is equivalent to $g_2$, then the pointwise difference $f_1 - g_1$ is equivalent to $f_2 - g_2$.
CauSeq.equiv_def₃ theorem
{f g : CauSeq β abv} (h : f ≈ g) {ε : α} (ε0 : 0 < ε) : ∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (f k - g j) < ε
Full source
theorem equiv_def₃ {f g : CauSeq β abv} (h : f ≈ g) {ε : α} (ε0 : 0 < ε) :
    ∃ i, ∀ j ≥ i, ∀ k ≥ j, abv (f k - g j) < ε :=
  (exists_forall_ge_and (h _ <| half_pos ε0) (f.cauchy₃ <| half_pos ε0)).imp fun _ H j ij k jk => by
    let ⟨h₁, h₂⟩ := H _ ij
    have := lt_of_le_of_lt (abv_add abv (f j - g j) _) (add_lt_add h₁ (h₂ _ jk))
    rwa [sub_add_sub_cancel', add_halves] at this
Uniform Cauchy Criterion for Equivalent Sequences: $\text{abv}(f_k - g_j) < \varepsilon$ for Large Indices
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. Given two Cauchy sequences $f, g : \mathbb{N} \to \beta$ that are equivalent (i.e., $f \approx g$) and a positive real number $\varepsilon > 0$, there exists an index $i \in \mathbb{N}$ such that for all $j \geq i$ and all $k \geq j$, the distance $\text{abv}(f_k - g_j) < \varepsilon$.
CauSeq.limZero_congr theorem
{f g : CauSeq β abv} (h : f ≈ g) : LimZero f ↔ LimZero g
Full source
theorem limZero_congr {f g : CauSeq β abv} (h : f ≈ g) : LimZeroLimZero f ↔ LimZero g :=
  ⟨fun l => by simpa using add_limZero (Setoid.symm h) l, fun l => by simpa using add_limZero h l⟩
Equivalence of Zero-Convergence for Equivalent 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 : \mathbb{N} \to \beta$ in $\text{CauSeq}(\beta, \text{abv})$ that are equivalent (i.e., $f \approx g$), the sequence $f$ approaches zero if and only if $g$ approaches zero.
CauSeq.abv_pos_of_not_limZero theorem
{f : CauSeq β abv} (hf : ¬LimZero f) : ∃ K > 0, ∃ i, ∀ j ≥ i, K ≤ abv (f j)
Full source
theorem abv_pos_of_not_limZero {f : CauSeq β abv} (hf : ¬LimZero f) :
    ∃ K > 0, ∃ i, ∀ j ≥ i, K ≤ abv (f j) := by
  haveI := Classical.propDecidable
  by_contra nk
  refine hf fun ε ε0 => ?_
  simp? [not_forall] at nk says
    simp only [gt_iff_lt, ge_iff_le, not_exists, not_and, not_forall, Classical.not_imp,
      not_le] at nk
  obtain ⟨i, hi⟩ := f.cauchy₃ (half_pos ε0)
  rcases nk _ (half_pos ε0) i with ⟨j, ij, hj⟩
  refine ⟨j, fun k jk => ?_⟩
  have := lt_of_le_of_lt (abv_add abv _ _) (add_lt_add (hi j ij k jk) hj)
  rwa [sub_add_cancel, add_halves] at this
Existence of Positive Lower Bound for Non-Zero-Convergent Cauchy Sequences
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 Cauchy sequence $f : \mathbb{N} \to \beta$ with respect to $\text{abv}$ that does not converge to zero, there exists a positive constant $K > 0$ and an index $i \in \mathbb{N}$ such that for all $j \geq i$, the absolute value $\text{abv}(f_j) \geq K$.
CauSeq.of_near theorem
(f : ℕ → β) (g : CauSeq β abv) (h : ∀ ε > 0, ∃ i, ∀ j ≥ i, abv (f j - g j) < ε) : IsCauSeq abv f
Full source
theorem of_near (f :  → β) (g : CauSeq β abv) (h : ∀ ε > 0, ∃ i, ∀ j ≥ i, abv (f j - g j) < ε) :
    IsCauSeq abv f
  | ε, ε0 =>
    let ⟨i, hi⟩ := exists_forall_ge_and (h _ (half_pos <| half_pos ε0)) (g.cauchy₃ <| half_pos ε0)
    ⟨i, fun j ij => by
      obtain ⟨h₁, h₂⟩ := hi _ le_rfl; rw [abv_sub abv] at h₁
      have := lt_of_le_of_lt (abv_add abv _ _) (add_lt_add (hi _ ij).1 h₁)
      have := lt_of_le_of_lt (abv_add abv _ _) (add_lt_add this (h₂ _ ij))
      rwa [add_halves, add_halves, add_right_comm, sub_add_sub_cancel, sub_add_sub_cancel] at this⟩
Cauchy Property Preservation under Uniform Approximation
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. Given a sequence $f : \mathbb{N} \to \beta$ and a Cauchy sequence $g : \mathbb{N} \to \beta$ with respect to $\text{abv}$, if for every $\varepsilon > 0$ there exists an index $i$ such that for all $j \geq i$, the distance $\text{abv}(f_j - g_j) < \varepsilon$, then $f$ is also a Cauchy sequence with respect to $\text{abv}$.
CauSeq.not_limZero_of_not_congr_zero theorem
{f : CauSeq _ abv} (hf : ¬f ≈ 0) : ¬LimZero f
Full source
theorem not_limZero_of_not_congr_zero {f : CauSeq _ abv} (hf : ¬f ≈ 0) : ¬LimZero f := by
  intro h
  have : LimZero (f - 0) := by simp [h]
  exact hf this
Non-Equivalence to Zero Implies Non-Zero Convergence for Cauchy Sequences
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 Cauchy sequence $f : \mathbb{N} \to \beta$ with respect to $\text{abv}$, if $f$ is not equivalent to the zero sequence (i.e., $f \not\approx 0$), then $f$ does not converge to zero (i.e., $\neg \text{LimZero}(f)$).
CauSeq.mul_equiv_zero theorem
(g : CauSeq _ abv) {f : CauSeq _ abv} (hf : f ≈ 0) : g * f ≈ 0
Full source
theorem mul_equiv_zero (g : CauSeq _ abv) {f : CauSeq _ abv} (hf : f ≈ 0) : g * f ≈ 0 :=
  have : LimZero (f - 0) := hf
  have : LimZero (g * f) := mul_limZero_right _ <| by simpa
  show LimZero (g * f - 0) by simpa
Product of a Cauchy Sequence and a Zero-Equivalent Sequence is Zero-Equivalent
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 $g$ in $\text{CauSeq}(\beta, \text{abv})$ and any sequence $f$ in $\text{CauSeq}(\beta, \text{abv})$ that is equivalent to zero (i.e., $f \approx 0$), the pointwise product sequence $g \cdot f$ is also equivalent to zero.
CauSeq.mul_equiv_zero' theorem
(g : CauSeq _ abv) {f : CauSeq _ abv} (hf : f ≈ 0) : f * g ≈ 0
Full source
theorem mul_equiv_zero' (g : CauSeq _ abv) {f : CauSeq _ abv} (hf : f ≈ 0) : f * g ≈ 0 :=
  have : LimZero (f - 0) := hf
  have : LimZero (f * g) := mul_limZero_left _ <| by simpa
  show LimZero (f * g - 0) by simpa
Right Multiplication of Zero-Equivalent Sequence with Cauchy Sequence is Zero-Equivalent
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 $g$ in $\text{CauSeq}(\beta, \text{abv})$ and any sequence $f$ such that $f$ is equivalent to zero (i.e., $f \approx 0$), the pointwise product $f * g$ is also equivalent to zero.
CauSeq.mul_not_equiv_zero theorem
{f g : CauSeq _ abv} (hf : ¬f ≈ 0) (hg : ¬g ≈ 0) : ¬f * g ≈ 0
Full source
theorem mul_not_equiv_zero {f g : CauSeq _ abv} (hf : ¬f ≈ 0) (hg : ¬g ≈ 0) : ¬f * g ≈ 0 :=
  fun (this : LimZero (f * g - 0)) => by
  have hlz : LimZero (f * g) := by simpa
  have hf' : ¬LimZero f := by simpa using show ¬LimZero (f - 0) from hf
  have hg' : ¬LimZero g := by simpa using show ¬LimZero (g - 0) from hg
  rcases abv_pos_of_not_limZero hf' with ⟨a1, ha1, N1, hN1⟩
  rcases abv_pos_of_not_limZero hg' with ⟨a2, ha2, N2, hN2⟩
  have : 0 < a1 * a2 := mul_pos ha1 ha2
  obtain ⟨N, hN⟩ := hlz _ this
  let i := max N (max N1 N2)
  have hN' := hN i (le_max_left _ _)
  have hN1' := hN1 i (le_trans (le_max_left _ _) (le_max_right _ _))
  have hN1' := hN2 i (le_trans (le_max_right _ _) (le_max_right _ _))
  apply not_le_of_lt hN'
  change _ ≤ abv (_ * _)
  rw [abv_mul abv]
  gcongr
Non-Vanishing Product of Non-Zero Cauchy Sequences
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 two Cauchy sequences $f, g : \mathbb{N} \to \beta$ with respect to $\text{abv}$, if neither $f$ nor $g$ is equivalent to the zero sequence, then their product $f \cdot g$ is also not equivalent to the zero sequence.
CauSeq.const_equiv theorem
{x y : β} : const x ≈ const y ↔ x = y
Full source
theorem const_equiv {x y : β} : constconst x ≈ const yconst x ≈ const y ↔ x = y :=
  show LimZeroLimZero _ ↔ _ by rw [← const_sub, const_limZero, sub_eq_zero]
Equivalence of Constant Cauchy Sequences: $\text{const}(x) \approx \text{const}(y) \leftrightarrow x = 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 constant Cauchy sequences $(x, x, \dots)$ and $(y, y, \dots)$ are equivalent (their difference tends to zero) if and only if $x = y$.
CauSeq.mul_equiv_mul theorem
{f1 f2 g1 g2 : CauSeq β abv} (hf : f1 ≈ f2) (hg : g1 ≈ g2) : f1 * g1 ≈ f2 * g2
Full source
theorem mul_equiv_mul {f1 f2 g1 g2 : CauSeq β abv} (hf : f1 ≈ f2) (hg : g1 ≈ g2) :
    f1 * g1 ≈ f2 * g2 := by
  simpa only [mul_sub, sub_mul, sub_add_sub_cancel]
    using add_limZero (mul_limZero_left g1 hf) (mul_limZero_right f2 hg)
Product of Equivalent Cauchy Sequences is Equivalent
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 four Cauchy sequences $f_1, f_2, g_1, g_2 \in \text{CauSeq}(\beta, \text{abv})$ such that $f_1$ is equivalent to $f_2$ and $g_1$ is equivalent to $g_2$ (i.e., their differences tend to zero), the pointwise product sequences $f_1 \cdot g_1$ and $f_2 \cdot g_2$ are also equivalent.
CauSeq.smul_equiv_smul theorem
{G : Type*} [SMul G β] [IsScalarTower G β β] {f1 f2 : CauSeq β abv} (c : G) (hf : f1 ≈ f2) : c • f1 ≈ c • f2
Full source
theorem smul_equiv_smul {G : Type*} [SMul G β] [IsScalarTower G β β] {f1 f2 : CauSeq β abv} (c : G)
    (hf : f1 ≈ f2) : c • f1 ≈ c • f2 := by
  simpa [const_smul, smul_one_mul _ _] using
    mul_equiv_mul (const_equiv.mpr <| Eq.refl <| c • (1 : β)) hf
Scalar Multiplication Preserves Equivalence of Cauchy Sequences
Informal description
Let $G$ be a type with a scalar multiplication operation on a ring $\beta$, and assume that $G$ acts on $\beta$ in a way that satisfies the scalar tower condition. For any two equivalent Cauchy sequences $f_1, f_2$ in $\text{CauSeq}(\beta, \text{abv})$ (i.e., $f_1 \approx f_2$) and any scalar $c \in G$, the scalar multiples $c \cdot f_1$ and $c \cdot f_2$ are also equivalent.
CauSeq.pow_equiv_pow theorem
{f1 f2 : CauSeq β abv} (hf : f1 ≈ f2) (n : ℕ) : f1 ^ n ≈ f2 ^ n
Full source
theorem pow_equiv_pow {f1 f2 : CauSeq β abv} (hf : f1 ≈ f2) (n : ) : f1 ^ n ≈ f2 ^ n := by
  induction n with
  | zero => simp only [pow_zero, Setoid.refl]
  | succ n ih => simpa only [pow_succ'] using mul_equiv_mul hf ih
Equivalence of Powers of Equivalent Cauchy Sequences: $f_1 \approx f_2 \implies f_1^n \approx f_2^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 two Cauchy sequences $f_1, f_2 \in \text{CauSeq}(\beta, \text{abv})$ such that $f_1$ is equivalent to $f_2$ (i.e., their difference tends to zero), and for any natural number $n$, the $n$-th power sequences $f_1^n$ and $f_2^n$ are also equivalent.
CauSeq.one_not_equiv_zero theorem
: ¬const abv 1 ≈ const abv 0
Full source
theorem one_not_equiv_zero : ¬const abv 1 ≈ const abv 0 := fun h =>
  have : ∀ ε > 0, ∃ i, ∀ k, i ≤ k → abv (1 - 0) < ε := h
  have h1 : abv 1 ≤ 0 :=
    le_of_not_gt fun h2 : 0 < abv 1 =>
      (Exists.elim (this _ h2)) fun i hi => lt_irrefl (abv 1) <| by simpa using hi _ le_rfl
  have h2 : 0 ≤ abv 1 := abv_nonneg abv _
  have : abv 1 = 0 := le_antisymm h1 h2
  have : (1 : β) = 0 := (abv_eq_zero abv).mp this
  absurd this one_ne_zero
Non-equivalence of Constant Sequences $1$ and $0$ in Cauchy Sequences
Informal description
The constant Cauchy sequence with value $1$ is not equivalent to the constant Cauchy sequence with value $0$ under the equivalence relation of tending to zero, i.e., $\text{const}(1) \not\approx \text{const}(0)$.
CauSeq.inv_aux theorem
{f : CauSeq β abv} (hf : ¬LimZero f) : ∀ ε > 0, ∃ i, ∀ j ≥ i, abv ((f j)⁻¹ - (f i)⁻¹) < ε
Full source
theorem inv_aux {f : CauSeq β abv} (hf : ¬LimZero f) :
    ∀ ε > 0, ∃ i, ∀ j ≥ i, abv ((f j)⁻¹ - (f i)⁻¹) < ε
  | _, ε0 =>
    let ⟨_, K0, HK⟩ := abv_pos_of_not_limZero hf
    let ⟨_, δ0, Hδ⟩ := rat_inv_continuous_lemma abv ε0 K0
    let ⟨i, H⟩ := exists_forall_ge_and HK (f.cauchy₃ δ0)
    ⟨i, fun _ ij =>
      let ⟨iK, H'⟩ := H _ le_rfl
      Hδ (H _ ij).1 iK (H' _ ij)⟩
Uniform Cauchy Condition for Inverses of Non-Zero-Convergent Cauchy Sequences
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 Cauchy sequence $f : \mathbb{N} \to \beta$ with respect to $\text{abv}$ that does not converge to zero, and for any $\varepsilon > 0$ in $\alpha$, there exists an index $i \in \mathbb{N}$ such that for all $j \geq i$, the absolute value of the difference between the inverses $\text{abv}(f_j^{-1} - f_i^{-1}) < \varepsilon$.
CauSeq.inv definition
(f : CauSeq β abv) (hf : ¬LimZero f) : CauSeq β abv
Full source
/-- Given a Cauchy sequence `f` with nonzero limit, create a Cauchy sequence with values equal to
the inverses of the values of `f`. -/
def inv (f : CauSeq β abv) (hf : ¬LimZero f) : CauSeq β abv :=
  ⟨_, inv_aux hf⟩
Inverse of a non-zero-convergent Cauchy sequence
Informal description
Given a Cauchy sequence \( f \) 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), and assuming that \( f \) does not converge to zero, the sequence \( f^{-1} \) defined by \( f^{-1}_n = (f_n)^{-1} \) is also a Cauchy sequence with respect to \( \text{abv} \).
CauSeq.coe_inv theorem
{f : CauSeq β abv} (hf) : ⇑(inv f hf) = (f : ℕ → β)⁻¹
Full source
@[simp, norm_cast]
theorem coe_inv {f : CauSeq β abv} (hf) : ⇑(inv f hf) = (f : ℕ → β)⁻¹ :=
  rfl
Pointwise Inverse of Non-Zero-Convergent Cauchy Sequence
Informal description
For any Cauchy sequence $f$ 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), if $f$ does not converge to zero, then the sequence of inverses $f^{-1}$ is equal to the pointwise inverse of $f$ as functions from $\mathbb{N}$ to $\beta$. That is, for all $n \in \mathbb{N}$, $(f^{-1})_n = (f_n)^{-1}$.
CauSeq.inv_apply theorem
{f : CauSeq β abv} (hf i) : inv f hf i = (f i)⁻¹
Full source
@[simp, norm_cast]
theorem inv_apply {f : CauSeq β abv} (hf i) : inv f hf i = (f i)⁻¹ :=
  rfl
Termwise Inverse of a Non-Zero Cauchy Sequence
Informal description
Let $f$ be a Cauchy sequence 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. If $f$ does not converge to zero, then for any index $i$, the $i$-th term of the inverse sequence $f^{-1}$ is equal to the multiplicative inverse of the $i$-th term of $f$, i.e., $(f^{-1})_i = (f_i)^{-1}$.
CauSeq.inv_mul_cancel theorem
{f : CauSeq β abv} (hf) : inv f hf * f ≈ 1
Full source
theorem inv_mul_cancel {f : CauSeq β abv} (hf) : invinv f hf * f ≈ 1 := fun ε ε0 =>
  let ⟨K, K0, i, H⟩ := abv_pos_of_not_limZero hf
  ⟨i, fun j ij => by simpa [(abv_pos abv).1 (lt_of_lt_of_le K0 (H _ ij)), abv_zero abv] using ε0⟩
Inverse Sequence Property: $f^{-1} * f \approx 1$ 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$ (where $\alpha$ is a linearly ordered field with a strict ordered ring structure), if $f$ does not converge to zero, then the product of the inverse sequence $f^{-1}$ and $f$ is equivalent to the constant sequence $1$ under the equivalence relation of Cauchy sequences.
CauSeq.mul_inv_cancel theorem
{f : CauSeq β abv} (hf) : f * inv f hf ≈ 1
Full source
theorem mul_inv_cancel {f : CauSeq β abv} (hf) : f * inv f hf ≈ 1 := fun ε ε0 =>
  let ⟨K, K0, i, H⟩ := abv_pos_of_not_limZero hf
  ⟨i, fun j ij => by simpa [(abv_pos abv).1 (lt_of_lt_of_le K0 (H _ ij)), abv_zero abv] using ε0⟩
Product of Cauchy Sequence with its Inverse is Equivalent to One
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 : \mathbb{N} \to \beta$ with respect to $\text{abv}$ that does not converge to zero, the product of $f$ with its pointwise inverse is equivalent to the constant sequence $1$ under the Cauchy equivalence relation.
CauSeq.const_inv theorem
{x : β} (hx : x ≠ 0) : const abv x⁻¹ = inv (const abv x) (by rwa [const_limZero])
Full source
theorem const_inv {x : β} (hx : x ≠ 0) :
    const abv x⁻¹ = inv (const abv x) (by rwa [const_limZero]) :=
  rfl
Inverse of Constant Cauchy Sequence Equals Constant Sequence of Inverses
Informal description
For any nonzero element $x$ in a ring $\beta$ equipped with an absolute value function $\text{abv} : \beta \to \alpha$, the constant Cauchy sequence $(x^{-1}, x^{-1}, \dots)$ is equal to the inverse of the constant Cauchy sequence $(x, x, \dots)$, where the latter is well-defined since $x \neq 0$.
CauSeq.Pos definition
(f : CauSeq α abs) : Prop
Full source
/-- The entries of a positive Cauchy sequence eventually have a positive lower bound. -/
def Pos (f : CauSeq α abs) : Prop :=
  ∃ K > 0, ∃ i, ∀ j ≥ i, K ≤ f j
Positive Cauchy sequence
Informal description
A Cauchy sequence \( f \) with respect to an absolute value function is called *positive* if there exists a positive lower bound \( K > 0 \) and an index \( i \) such that for all \( j \geq i \), the \( j \)-th term of the sequence satisfies \( K \leq f j \).
CauSeq.not_limZero_of_pos theorem
{f : CauSeq α abs} : Pos f → ¬LimZero f
Full source
theorem not_limZero_of_pos {f : CauSeq α abs} : Pos f → ¬LimZero f
  | ⟨_, F0, hF⟩, H =>
    let ⟨_, h⟩ := exists_forall_ge_and hF (H _ F0)
    let ⟨h₁, h₂⟩ := h _ le_rfl
    not_lt_of_le h₁ (abs_lt.1 h₂).2
Positive Cauchy Sequences Do Not Approach Zero
Informal description
For any positive Cauchy sequence $f$ with respect to an absolute value function, $f$ does not approach zero. That is, if there exists a positive lower bound $K > 0$ and an index $i$ such that for all $j \geq i$, $K \leq f_j$, then it is not the case that for every $\varepsilon > 0$ there exists an index $i$ such that for all $j \geq i$, $|f_j| < \varepsilon$.
CauSeq.const_pos theorem
{x : α} : Pos (const x) ↔ 0 < x
Full source
theorem const_pos {x : α} : PosPos (const x) ↔ 0 < x :=
  ⟨fun ⟨_, K0, _, h⟩ => lt_of_lt_of_le K0 (h _ le_rfl), fun h => ⟨x, h, 0, fun _ _ => le_rfl⟩⟩
Positivity of Constant Cauchy Sequence: $\text{Pos}(\text{const}(x)) \leftrightarrow x > 0$
Informal description
For any element $x$ in a linearly ordered field $\alpha$ with a strict ordered ring structure, the constant Cauchy sequence with value $x$ is positive if and only if $x > 0$.
CauSeq.add_pos theorem
{f g : CauSeq α abs} : Pos f → Pos g → Pos (f + g)
Full source
theorem add_pos {f g : CauSeq α abs} : Pos f → Pos g → Pos (f + g)
  | ⟨_, F0, hF⟩, ⟨_, G0, hG⟩ =>
    let ⟨i, h⟩ := exists_forall_ge_and hF hG
    ⟨_, _root_.add_pos F0 G0, i, fun _ ij =>
      let ⟨h₁, h₂⟩ := h _ ij
      add_le_add h₁ h₂⟩
Sum of Positive Cauchy Sequences is Positive
Informal description
Let $f$ and $g$ be Cauchy sequences with respect to an absolute value function on a linearly ordered field $\alpha$. If $f$ is positive and $g$ is positive, then their pointwise sum $f + g$ is also positive.
CauSeq.pos_add_limZero theorem
{f g : CauSeq α abs} : Pos f → LimZero g → Pos (f + g)
Full source
theorem pos_add_limZero {f g : CauSeq α abs} : Pos f → LimZero g → Pos (f + g)
  | ⟨F, F0, hF⟩, H =>
    let ⟨i, h⟩ := exists_forall_ge_and hF (H _ (half_pos F0))
    ⟨_, half_pos F0, i, fun j ij => by
      obtain ⟨h₁, h₂⟩ := h j ij
      have := add_le_add h₁ (le_of_lt (abs_lt.1 h₂).1)
      rwa [← sub_eq_add_neg, sub_self_div_two] at this⟩
Sum of Positive and Vanishing Cauchy Sequences is Positive
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\text{abs} : \alpha \to \alpha$ be the standard absolute value function. For any two Cauchy sequences $f, g$ with respect to $\text{abs}$, if $f$ is positive and $g$ approaches zero, then the sum $f + g$ is positive. Here, a sequence $f$ is called *positive* if there exists a positive lower bound $K > 0$ and an index $i$ such that for all $j \geq i$, $K \leq f(j)$. A sequence $g$ *approaches zero* if for every $\varepsilon > 0$, there exists an index $i$ such that for all $j \geq i$, $\text{abs}(g(j)) < \varepsilon$.
CauSeq.mul_pos theorem
{f g : CauSeq α abs} : Pos f → Pos g → Pos (f * g)
Full source
protected theorem mul_pos {f g : CauSeq α abs} : Pos f → Pos g → Pos (f * g)
  | ⟨_, F0, hF⟩, ⟨_, G0, hG⟩ =>
    let ⟨i, h⟩ := exists_forall_ge_and hF hG
    ⟨_, mul_pos F0 G0, i, fun _ ij =>
      let ⟨h₁, h₂⟩ := h _ ij
      mul_le_mul h₁ h₂ (le_of_lt G0) (le_trans (le_of_lt F0) h₁)⟩
Product of Positive Cauchy Sequences is Positive
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$. For any two Cauchy sequences $f, g : \mathbb{N} \to \beta$ with respect to $\text{abv}$, if $f$ and $g$ are positive (i.e., there exist positive lower bounds $K_f, K_g > 0$ and indices $i_f, i_g$ such that for all $j \geq i_f$, $K_f \leq f j$ and for all $j \geq i_g$, $K_g \leq g j$), then the product sequence $f \cdot g$ is also positive.
CauSeq.trichotomy theorem
(f : CauSeq α abs) : Pos f ∨ LimZero f ∨ Pos (-f)
Full source
theorem trichotomy (f : CauSeq α abs) : PosPos f ∨ LimZero f ∨ Pos (-f) := by
  rcases Classical.em (LimZero f) with h | h <;> simp [*]
  rcases abv_pos_of_not_limZero h with ⟨K, K0, hK⟩
  rcases exists_forall_ge_and hK (f.cauchy₃ K0) with ⟨i, hi⟩
  refine (le_total 0 (f i)).imp ?_ ?_ <;>
    refine fun h => ⟨K, K0, i, fun j ij => ?_⟩ <;>
    have := (hi _ ij).1 <;>
    obtain ⟨h₁, h₂⟩ := hi _ le_rfl
  · rwa [abs_of_nonneg] at this
    rw [abs_of_nonneg h] at h₁
    exact
      (le_add_iff_nonneg_right _).1
        (le_trans h₁ <| neg_le_sub_iff_le_add'.1 <| le_of_lt (abs_lt.1 <| h₂ _ ij).1)
  · rwa [abs_of_nonpos] at this
    rw [abs_of_nonpos h] at h₁
    rw [← sub_le_sub_iff_right, zero_sub]
    exact le_trans (le_of_lt (abs_lt.1 <| h₂ _ ij).2) h₁
Trichotomy Theorem for Cauchy Sequences
Informal description
For any Cauchy sequence $f$ with respect to the absolute value function on a linearly ordered field $\alpha$, exactly one of the following holds: 1. $f$ is eventually positive (there exists $K > 0$ and $i \in \mathbb{N}$ such that for all $j \geq i$, $f(j) \geq K$), 2. $f$ converges to zero (for every $\varepsilon > 0$, there exists $i \in \mathbb{N}$ such that for all $j \geq i$, $|f(j)| < \varepsilon$), or 3. $-f$ is eventually positive.
CauSeq.instLTAbs instance
: LT (CauSeq α abs)
Full source
instance : LT (CauSeq α abs) :=
  ⟨fun f g => Pos (g - f)⟩
Less-Than Relation on Cauchy Sequences with Respect to Absolute Value
Informal description
The type of Cauchy sequences $\text{CauSeq}(\alpha, \text{abs})$ with respect to an absolute value function $\text{abs} : \alpha \to \alpha$ is equipped with a less-than relation $<$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure.
CauSeq.instLEAbs instance
: LE (CauSeq α abs)
Full source
instance : LE (CauSeq α abs) :=
  ⟨fun f g => f < g ∨ f ≈ g⟩
Less-Than-or-Equal Relation on Cauchy Sequences with Respect to Absolute Value
Informal description
The type of Cauchy sequences $\text{CauSeq}(\alpha, \text{abs})$ with respect to an absolute value function $\text{abs} : \alpha \to \alpha$ is equipped with a less-than-or-equal relation $\leq$, where $\alpha$ is a linearly ordered field with a strict ordered ring structure.
CauSeq.lt_of_lt_of_eq theorem
{f g h : CauSeq α abs} (fg : f < g) (gh : g ≈ h) : f < h
Full source
theorem lt_of_lt_of_eq {f g h : CauSeq α abs} (fg : f < g) (gh : g ≈ h) : f < h :=
  show Pos (h - f) by
    convert pos_add_limZero fg (neg_limZero gh) using 1
    simp
Strict Inequality Preserved Under Equivalence of Cauchy Sequences
Informal description
For any three Cauchy sequences $f$, $g$, and $h$ with respect to the absolute value function on a linearly ordered field $\alpha$, if $f < g$ and $g$ is equivalent to $h$, then $f < h$.
CauSeq.lt_of_eq_of_lt theorem
{f g h : CauSeq α abs} (fg : f ≈ g) (gh : g < h) : f < h
Full source
theorem lt_of_eq_of_lt {f g h : CauSeq α abs} (fg : f ≈ g) (gh : g < h) : f < h := by
  have := pos_add_limZero gh (neg_limZero fg)
  rwa [← sub_eq_add_neg, sub_sub_sub_cancel_right] at this
Strict Order Preservation under Equivalence: $f \approx g \land g < h \Rightarrow f < h$
Informal description
For any three Cauchy sequences $f$, $g$, and $h$ with respect to an absolute value function on a linearly ordered field $\alpha$, if $f$ is equivalent to $g$ (i.e., $f \approx g$) and $g$ is strictly less than $h$ (i.e., $g < h$), then $f$ is strictly less than $h$ (i.e., $f < h$).
CauSeq.lt_trans theorem
{f g h : CauSeq α abs} (fg : f < g) (gh : g < h) : f < h
Full source
theorem lt_trans {f g h : CauSeq α abs} (fg : f < g) (gh : g < h) : f < h :=
  show Pos (h - f) by
    convert add_pos fg gh using 1
    simp
Transitivity of Strict Order on Cauchy Sequences
Informal description
For any three Cauchy sequences $f$, $g$, and $h$ with respect to an absolute value function on a linearly ordered field $\alpha$, if $f < g$ and $g < h$, then $f < h$.
CauSeq.lt_irrefl theorem
{f : CauSeq α abs} : ¬f < f
Full source
theorem lt_irrefl {f : CauSeq α abs} : ¬f < f
  | h => not_limZero_of_pos h (by simp [zero_limZero])
Irreflexivity of Strict Order on Cauchy Sequences
Informal description
For any Cauchy sequence $f$ with respect to the absolute value function on a linearly ordered field $\alpha$, it is not the case that $f$ is strictly less than itself.
CauSeq.le_of_eq_of_le theorem
{f g h : CauSeq α abs} (hfg : f ≈ g) (hgh : g ≤ h) : f ≤ h
Full source
theorem le_of_eq_of_le {f g h : CauSeq α abs} (hfg : f ≈ g) (hgh : g ≤ h) : f ≤ h :=
  hgh.elim (Or.inlOr.inl ∘ CauSeq.lt_of_eq_of_lt hfg) (Or.inrOr.inr ∘ Setoid.trans hfg)
Order Preservation under Equivalence: $f \approx g \land g \leq h \Rightarrow f \leq h$
Informal description
For any three Cauchy sequences $f$, $g$, and $h$ with respect to an absolute value function on a linearly ordered field $\alpha$, if $f$ is equivalent to $g$ (i.e., $f \approx g$) and $g$ is less than or equal to $h$ (i.e., $g \leq h$), then $f$ is less than or equal to $h$ (i.e., $f \leq h$).
CauSeq.le_of_le_of_eq theorem
{f g h : CauSeq α abs} (hfg : f ≤ g) (hgh : g ≈ h) : f ≤ h
Full source
theorem le_of_le_of_eq {f g h : CauSeq α abs} (hfg : f ≤ g) (hgh : g ≈ h) : f ≤ h :=
  hfg.elim (fun h => Or.inl (CauSeq.lt_of_lt_of_eq h hgh)) fun h => Or.inr (Setoid.trans h hgh)
Transitivity of $\leq$ under Equivalence for Cauchy Sequences
Informal description
For any three Cauchy sequences $f$, $g$, and $h$ with respect to the absolute value function on a linearly ordered field $\alpha$, if $f \leq g$ and $g$ is equivalent to $h$, then $f \leq h$.
CauSeq.instPreorderAbs instance
: Preorder (CauSeq α abs)
Full source
instance : Preorder (CauSeq α abs) where
  lt := (· < ·)
  le f g := f < g ∨ f ≈ g
  le_refl _ := Or.inr (Setoid.refl _)
  le_trans _ _ _ fg gh :=
    match fg, gh with
    | Or.inl fg, Or.inl gh => Or.inl <| lt_trans fg gh
    | Or.inl fg, Or.inr gh => Or.inl <| lt_of_lt_of_eq fg gh
    | Or.inr fg, Or.inl gh => Or.inl <| lt_of_eq_of_lt fg gh
    | Or.inr fg, Or.inr gh => Or.inr <| Setoid.trans fg gh
  lt_iff_le_not_le _ _ :=
    ⟨fun h => ⟨Or.inl h, not_or_intro (mt (lt_trans h) lt_irrefl) (not_limZero_of_pos h)⟩,
      fun ⟨h₁, h₂⟩ => h₁.resolve_right (mt (fun h => Or.inr (Setoid.symm h)) h₂)⟩
Preorder Structure on Cauchy Sequences with Respect to Absolute Value
Informal description
The set of Cauchy sequences $\text{CauSeq}(\alpha, \text{abs})$ with respect to an absolute value function $\text{abs} : \alpha \to \alpha$ forms a preorder, where $\alpha$ is a linearly ordered field with a strict ordered ring structure. This preorder is defined by the pointwise comparison of sequences.
CauSeq.le_antisymm theorem
{f g : CauSeq α abs} (fg : f ≤ g) (gf : g ≤ f) : f ≈ g
Full source
theorem le_antisymm {f g : CauSeq α abs} (fg : f ≤ g) (gf : g ≤ f) : f ≈ g :=
  fg.resolve_left (not_lt_of_le gf)
Antisymmetry of the Order Relation on Cauchy Sequences: $f \leq g \land g \leq f \implies f \approx g$
Informal description
For any two Cauchy sequences $f$ and $g$ with respect to the absolute value function $\text{abs}$ on a linearly ordered field $\alpha$, if $f \leq g$ and $g \leq f$, then $f$ and $g$ are equivalent (i.e., their difference tends to zero).
CauSeq.lt_total theorem
(f g : CauSeq α abs) : f < g ∨ f ≈ g ∨ g < f
Full source
theorem lt_total (f g : CauSeq α abs) : f < g ∨ f ≈ g ∨ g < f :=
  (trichotomy (g - f)).imp_right fun h =>
    h.imp (fun h => Setoid.symm h) fun h => by rwa [neg_sub] at h
Trichotomy for Cauchy Sequences: $f < g \lor f \approx g \lor g < f$
Informal description
For any two Cauchy sequences $f$ and $g$ with respect to the absolute value function on a linearly ordered field $\alpha$, exactly one of the following holds: 1. $f$ is eventually strictly less than $g$, 2. $f$ and $g$ are equivalent (their difference tends to zero), or 3. $g$ is eventually strictly less than $f$.
CauSeq.le_total theorem
(f g : CauSeq α abs) : f ≤ g ∨ g ≤ f
Full source
theorem le_total (f g : CauSeq α abs) : f ≤ g ∨ g ≤ f :=
  (or_assoc.2 (lt_total f g)).imp_right Or.inl
Total Order on Cauchy Sequences: $f \leq g \lor g \leq f$
Informal description
For any two Cauchy sequences $f$ and $g$ with respect to the absolute value function $\text{abs}$ on a linearly ordered field $\alpha$, either $f \leq g$ or $g \leq f$ holds.
CauSeq.const_lt theorem
{x y : α} : const x < const y ↔ x < y
Full source
theorem const_lt {x y : α} : constconst x < const y ↔ x < y :=
  show PosPos _ ↔ _ by rw [← const_sub, const_pos, sub_pos]
Comparison of Constant Cauchy Sequences: $\text{const}(x) < \text{const}(y) \leftrightarrow x < y$
Informal description
For any two elements $x$ and $y$ in a linearly ordered field $\alpha$ with a strict ordered ring structure, the constant Cauchy sequence $\text{const}(x)$ is less than $\text{const}(y)$ if and only if $x < y$.
CauSeq.const_le theorem
{x y : α} : const x ≤ const y ↔ x ≤ y
Full source
theorem const_le {x y : α} : constconst x ≤ const y ↔ x ≤ y := by
  rw [le_iff_lt_or_eq]; exact or_congr const_lt const_equiv
Comparison of Constant Cauchy Sequences: $\text{const}(x) \leq \text{const}(y) \leftrightarrow x \leq y$
Informal description
For any two elements $x$ and $y$ in a linearly ordered field $\alpha$ with a strict ordered ring structure, the constant Cauchy sequence $\text{const}(x)$ is less than or equal to $\text{const}(y)$ if and only if $x \leq y$.
CauSeq.le_of_exists theorem
{f g : CauSeq α abs} (h : ∃ i, ∀ j ≥ i, f j ≤ g j) : f ≤ g
Full source
theorem le_of_exists {f g : CauSeq α abs} (h : ∃ i, ∀ j ≥ i, f j ≤ g j) : f ≤ g :=
  let ⟨i, hi⟩ := h
  (or_assoc.2 (CauSeq.lt_total f g)).elim id fun hgf =>
    False.elim
      (let ⟨_, hK0, j, hKj⟩ := hgf
      not_lt_of_ge (hi (max i j) (le_max_left _ _))
        (sub_pos.1 (lt_of_lt_of_le hK0 (hKj _ (le_max_right _ _)))))
Comparison of Cauchy sequences via eventual inequality
Informal description
For any two Cauchy sequences $f$ and $g$ with respect to the absolute value function on a linearly ordered field $\alpha$, if there exists an index $i$ such that for all $j \geq i$ we have $f_j \leq g_j$, then $f \leq g$ as Cauchy sequences.
CauSeq.exists_gt theorem
(f : CauSeq α abs) : ∃ a : α, f < const a
Full source
theorem exists_gt (f : CauSeq α abs) : ∃ a : α, f < const a :=
  let ⟨K, H⟩ := f.bounded
  ⟨K + 1, 1, zero_lt_one, 0, fun i _ => by
    rw [sub_apply, const_apply, le_sub_iff_add_le', add_le_add_iff_right]
    exact le_of_lt (abs_lt.1 (H _)).2⟩
Existence of Upper Bound for Cauchy Sequence: $f < \text{const } a$
Informal description
For any Cauchy sequence $f$ with respect to the absolute value function on a linearly ordered field $\alpha$, there exists an element $a \in \alpha$ such that $f$ is eventually strictly less than the constant sequence $\text{const } a$.
CauSeq.exists_lt theorem
(f : CauSeq α abs) : ∃ a : α, const a < f
Full source
theorem exists_lt (f : CauSeq α abs) : ∃ a : α, const a < f :=
  let ⟨a, h⟩ := (-f).exists_gt
  ⟨-a, show Pos _ by rwa [const_neg, sub_neg_eq_add, add_comm, ← sub_neg_eq_add]⟩
Existence of Lower Bound for Cauchy Sequence: $\text{const}(a) < f$
Informal description
For any Cauchy sequence $f$ with respect to the absolute value function on a linearly ordered field $\alpha$, there exists an element $a \in \alpha$ such that the constant sequence $\text{const}(a)$ is eventually strictly less than $f$.
CauSeq.rat_sup_continuous_lemma theorem
{ε : α} {a₁ a₂ b₁ b₂ : α} : abs (a₁ - b₁) < ε → abs (a₂ - b₂) < ε → abs (a₁ ⊔ a₂ - b₁ ⊔ b₂) < ε
Full source
theorem rat_sup_continuous_lemma {ε : α} {a₁ a₂ b₁ b₂ : α} :
    abs (a₁ - b₁) < ε → abs (a₂ - b₂) < ε → abs (a₁ ⊔ a₂ - b₁ ⊔ b₂) < ε := fun h₁ h₂ =>
  (abs_max_sub_max_le_max _ _ _ _).trans_lt (max_lt h₁ h₂)
Continuity of Supremum Operation in Cauchy Sequences: $|a₁ \sqcup a₂ - b₁ \sqcup b₂| < \varepsilon$ under Componentwise $\varepsilon$-Closeness
Informal description
For any elements $a₁, a₂, b₁, b₂$ in a linearly ordered field $\alpha$ and any positive $\varepsilon \in \alpha$, if the absolute differences $|a₁ - b₁| < \varepsilon$ and $|a₂ - b₂| < \varepsilon$, then the absolute difference between the suprema satisfies $|a₁ \sqcup a₂ - b₁ \sqcup b₂| < \varepsilon$.
CauSeq.rat_inf_continuous_lemma theorem
{ε : α} {a₁ a₂ b₁ b₂ : α} : abs (a₁ - b₁) < ε → abs (a₂ - b₂) < ε → abs (a₁ ⊓ a₂ - b₁ ⊓ b₂) < ε
Full source
theorem rat_inf_continuous_lemma {ε : α} {a₁ a₂ b₁ b₂ : α} :
    abs (a₁ - b₁) < ε → abs (a₂ - b₂) < ε → abs (a₁ ⊓ a₂ - b₁ ⊓ b₂) < ε := fun h₁ h₂ =>
  (abs_min_sub_min_le_max _ _ _ _).trans_lt (max_lt h₁ h₂)
Uniform Continuity of Minimum Operation on Cauchy Sequences
Informal description
For any elements $a₁, a₂, b₁, b₂$ in a linearly ordered field $\alpha$ with an absolute value function $|\cdot|$, and for any $\varepsilon > 0$, if $|a₁ - b₁| < \varepsilon$ and $|a₂ - b₂| < \varepsilon$, then the absolute difference between the minima satisfies $|\min(a₁, a₂) - \min(b₁, b₂)| < \varepsilon$.
CauSeq.instMaxAbs instance
: Max (CauSeq α abs)
Full source
instance : Max (CauSeq α abs) :=
  ⟨fun f g =>
    ⟨f ⊔ g, fun _ ε0 =>
      (exists_forall_ge_and (f.cauchy₃ ε0) (g.cauchy₃ ε0)).imp fun _ H _ ij =>
        let ⟨H₁, H₂⟩ := H _ le_rfl
        rat_sup_continuous_lemma (H₁ _ ij) (H₂ _ ij)⟩⟩
Pointwise Maximum Operation on Cauchy Sequences
Informal description
The type of Cauchy sequences `CauSeq α abs` with respect to an absolute value function `abs` on a linearly ordered field `α` has a maximum operation defined pointwise. That is, for any two Cauchy sequences $f$ and $g$, their supremum $f \sqcup g$ is the sequence given by $(f \sqcup g)(n) = f(n) \sqcup g(n)$ for each $n \in \mathbb{N}$.
CauSeq.instMinAbs instance
: Min (CauSeq α abs)
Full source
instance : Min (CauSeq α abs) :=
  ⟨fun f g =>
    ⟨f ⊓ g, fun _ ε0 =>
      (exists_forall_ge_and (f.cauchy₃ ε0) (g.cauchy₃ ε0)).imp fun _ H _ ij =>
        let ⟨H₁, H₂⟩ := H _ le_rfl
        rat_inf_continuous_lemma (H₁ _ ij) (H₂ _ ij)⟩⟩
Pointwise Minimum Operation on Cauchy Sequences
Informal description
The type of Cauchy sequences `CauSeq α abs` with respect to an absolute value function `abs` on a linearly ordered field `α` has a minimum operation defined pointwise.
CauSeq.coe_sup theorem
(f g : CauSeq α abs) : ⇑(f ⊔ g) = (f : ℕ → α) ⊔ g
Full source
@[simp, norm_cast]
theorem coe_sup (f g : CauSeq α abs) : ⇑(f ⊔ g) = (f : ℕ → α) ⊔ g :=
  rfl
Pointwise Supremum of Cauchy Sequences Equals Supremum of Pointwise Values
Informal description
For any two Cauchy sequences $f$ and $g$ with respect to an absolute value function $\text{abv}$ on a linearly ordered field $\alpha$, the pointwise supremum sequence $f \sqcup g$ is equal to the function $\lambda n, f(n) \sqcup g(n)$, where $\sqcup$ denotes the maximum operation in $\alpha$.
CauSeq.coe_inf theorem
(f g : CauSeq α abs) : ⇑(f ⊓ g) = (f : ℕ → α) ⊓ g
Full source
@[simp, norm_cast]
theorem coe_inf (f g : CauSeq α abs) : ⇑(f ⊓ g) = (f : ℕ → α) ⊓ g :=
  rfl
Pointwise Infimum of Cauchy Sequences Equals Infimum of Underlying Functions
Informal description
For any two Cauchy sequences $f$ and $g$ with respect to an absolute value function $\text{abv}$ on a linearly ordered field $\alpha$, the pointwise infimum of the sequences $f \sqcap g$ is equal to the infimum of the underlying functions $f$ and $g$ as functions from $\mathbb{N}$ to $\alpha$. That is, $(f \sqcap g)(n) = \min(f(n), g(n))$ for all $n \in \mathbb{N}$.
CauSeq.sup_limZero theorem
{f g : CauSeq α abs} (hf : LimZero f) (hg : LimZero g) : LimZero (f ⊔ g)
Full source
theorem sup_limZero {f g : CauSeq α abs} (hf : LimZero f) (hg : LimZero g) : LimZero (f ⊔ g)
  | ε, ε0 =>
    (exists_forall_ge_and (hf _ ε0) (hg _ ε0)).imp fun _ H j ij => by
      let ⟨H₁, H₂⟩ := H _ ij
      rw [abs_lt] at H₁ H₂ ⊢
      exact ⟨lt_sup_iff.mpr (Or.inl H₁.1), sup_lt_iff.mpr ⟨H₁.2, H₂.2⟩⟩
Supremum of Cauchy Sequences Approaching Zero Also Approaches Zero
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$. For any two Cauchy sequences $f, g : \mathbb{N} \to \beta$ with respect to $\text{abv}$, if both $f$ and $g$ approach zero (i.e., $\text{LimZero}(f)$ and $\text{LimZero}(g)$ hold), then their pointwise supremum $f \sqcup g$ also approaches zero.
CauSeq.inf_limZero theorem
{f g : CauSeq α abs} (hf : LimZero f) (hg : LimZero g) : LimZero (f ⊓ g)
Full source
theorem inf_limZero {f g : CauSeq α abs} (hf : LimZero f) (hg : LimZero g) : LimZero (f ⊓ g)
  | ε, ε0 =>
    (exists_forall_ge_and (hf _ ε0) (hg _ ε0)).imp fun _ H j ij => by
      let ⟨H₁, H₂⟩ := H _ ij
      rw [abs_lt] at H₁ H₂ ⊢
      exact ⟨lt_inf_iff.mpr ⟨H₁.1, H₂.1⟩, inf_lt_iff.mpr (Or.inl H₁.2)⟩
Pointwise Infimum of Cauchy Sequences Approaching Zero Also Approaches Zero
Informal description
Let $f$ and $g$ be Cauchy sequences 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. If both $f$ and $g$ approach zero (i.e., for any $\varepsilon > 0$ there exists an index beyond which all terms of the sequence have absolute value less than $\varepsilon$), then the pointwise infimum sequence $f \sqcap g$ also approaches zero.
CauSeq.sup_equiv_sup theorem
{a₁ b₁ a₂ b₂ : CauSeq α abs} (ha : a₁ ≈ a₂) (hb : b₁ ≈ b₂) : a₁ ⊔ b₁ ≈ a₂ ⊔ b₂
Full source
theorem sup_equiv_sup {a₁ b₁ a₂ b₂ : CauSeq α abs} (ha : a₁ ≈ a₂) (hb : b₁ ≈ b₂) :
    a₁ ⊔ b₁a₁ ⊔ b₁ ≈ a₂ ⊔ b₂ := by
  intro ε ε0
  obtain ⟨ai, hai⟩ := ha ε ε0
  obtain ⟨bi, hbi⟩ := hb ε ε0
  exact
    ⟨ai ⊔ bi, fun i hi =>
      (abs_max_sub_max_le_max (a₁ i) (b₁ i) (a₂ i) (b₂ i)).trans_lt
        (max_lt (hai i (sup_le_iff.mp hi).1) (hbi i (sup_le_iff.mp hi).2))⟩
Equivalence of Suprema of Equivalent Cauchy Sequences
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\beta$ be a ring equipped with an absolute value function $\text{abv} : \beta \to \alpha$. For any four Cauchy sequences $a_1, a_2, b_1, b_2 : \mathbb{N} \to \beta$ with respect to $\text{abv}$, if $a_1$ is equivalent to $a_2$ and $b_1$ is equivalent to $b_2$ (i.e., their differences tend to zero), then the pointwise supremum $a_1 \sqcup b_1$ is equivalent to $a_2 \sqcup b_2$.
CauSeq.inf_equiv_inf theorem
{a₁ b₁ a₂ b₂ : CauSeq α abs} (ha : a₁ ≈ a₂) (hb : b₁ ≈ b₂) : a₁ ⊓ b₁ ≈ a₂ ⊓ b₂
Full source
theorem inf_equiv_inf {a₁ b₁ a₂ b₂ : CauSeq α abs} (ha : a₁ ≈ a₂) (hb : b₁ ≈ b₂) :
    a₁ ⊓ b₁a₁ ⊓ b₁ ≈ a₂ ⊓ b₂ := by
  intro ε ε0
  obtain ⟨ai, hai⟩ := ha ε ε0
  obtain ⟨bi, hbi⟩ := hb ε ε0
  exact
    ⟨ai ⊔ bi, fun i hi =>
      (abs_min_sub_min_le_max (a₁ i) (b₁ i) (a₂ i) (b₂ i)).trans_lt
        (max_lt (hai i (sup_le_iff.mp hi).1) (hbi i (sup_le_iff.mp hi).2))⟩
Equivalence of Pointwise Infima of Equivalent Cauchy Sequences
Informal description
Let $a_1, a_2, b_1, b_2$ be Cauchy sequences 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. If $a_1$ is equivalent to $a_2$ and $b_1$ is equivalent to $b_2$ (i.e., their differences tend to zero), then the pointwise infimum sequence $a_1 \sqcap b_1$ is equivalent to $a_2 \sqcap b_2$.
CauSeq.sup_lt theorem
{a b c : CauSeq α abs} (ha : a < c) (hb : b < c) : a ⊔ b < c
Full source
protected theorem sup_lt {a b c : CauSeq α abs} (ha : a < c) (hb : b < c) : a ⊔ b < c := by
  obtain ⟨⟨εa, εa0, ia, ha⟩, ⟨εb, εb0, ib, hb⟩⟩ := ha, hb
  refine ⟨εa ⊓ εb, lt_inf_iff.mpr ⟨εa0, εb0⟩, ia ⊔ ib, fun i hi => ?_⟩
  have := min_le_min (ha _ (sup_le_iff.mp hi).1) (hb _ (sup_le_iff.mp hi).2)
  exact this.trans_eq (min_sub_sub_left _ _ _)
Pointwise Supremum of Two Cauchy Sequences is Less Than a Third Sequence if Both Are Less Than It
Informal description
For any three Cauchy sequences $a$, $b$, and $c$ with respect to an absolute value function, if $a < c$ and $b < c$, then the pointwise supremum $a \sqcup b$ is also less than $c$.
CauSeq.lt_inf theorem
{a b c : CauSeq α abs} (hb : a < b) (hc : a < c) : a < b ⊓ c
Full source
protected theorem lt_inf {a b c : CauSeq α abs} (hb : a < b) (hc : a < c) : a < b ⊓ c := by
  obtain ⟨⟨εb, εb0, ib, hb⟩, ⟨εc, εc0, ic, hc⟩⟩ := hb, hc
  refine ⟨εb ⊓ εc, lt_inf_iff.mpr ⟨εb0, εc0⟩, ib ⊔ ic, fun i hi => ?_⟩
  have := min_le_min (hb _ (sup_le_iff.mp hi).1) (hc _ (sup_le_iff.mp hi).2)
  exact this.trans_eq (min_sub_sub_right _ _ _)
Strict Inequality Preserved Under Infimum of Cauchy Sequences: $a < b \land a < c \Rightarrow a < b \sqcap c$
Informal description
For any three Cauchy sequences $a$, $b$, and $c$ with respect to an absolute value function, if $a < b$ and $a < c$, then $a$ is strictly less than the pointwise infimum $b \sqcap c$.
CauSeq.sup_idem theorem
(a : CauSeq α abs) : a ⊔ a = a
Full source
@[simp]
protected theorem sup_idem (a : CauSeq α abs) : a ⊔ a = a := Subtype.ext (sup_idem _)
Idempotency of Pointwise Supremum for Cauchy Sequences
Informal description
For any Cauchy sequence $a$ with respect to an absolute value function, the pointwise supremum of $a$ with itself equals $a$, i.e., $a \sqcup a = a$.
CauSeq.inf_idem theorem
(a : CauSeq α abs) : a ⊓ a = a
Full source
@[simp]
protected theorem inf_idem (a : CauSeq α abs) : a ⊓ a = a := Subtype.ext (inf_idem _)
Idempotence of Pointwise Infimum for Cauchy Sequences: $a \sqcap a = a$
Informal description
For any Cauchy sequence $a$ with respect to an absolute value function $\text{abv}$ on a linearly ordered field $\alpha$, the pointwise infimum of $a$ with itself equals $a$, i.e., $a \sqcap a = a$.
CauSeq.sup_comm theorem
(a b : CauSeq α abs) : a ⊔ b = b ⊔ a
Full source
protected theorem sup_comm (a b : CauSeq α abs) : a ⊔ b = b ⊔ a := Subtype.ext (sup_comm _ _)
Commutativity of Pointwise Supremum for Cauchy Sequences
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to an absolute value function $\text{abv}$ on a ring $\beta$ (where $\beta$ is valued in a linearly ordered field $\alpha$ with a strict ordered ring structure), the pointwise supremum operation is commutative, i.e., $a \sqcup b = b \sqcup a$.
CauSeq.inf_comm theorem
(a b : CauSeq α abs) : a ⊓ b = b ⊓ a
Full source
protected theorem inf_comm (a b : CauSeq α abs) : a ⊓ b = b ⊓ a := Subtype.ext (inf_comm _ _)
Commutativity of Pointwise Meet Operation on Cauchy Sequences
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to an absolute value function $\text{abv}$ on a linearly ordered field $\alpha$, the pointwise meet operation $\sqcap$ is commutative, i.e., $a \sqcap b = b \sqcap a$.
CauSeq.sup_eq_right theorem
{a b : CauSeq α abs} (h : a ≤ b) : a ⊔ b ≈ b
Full source
protected theorem sup_eq_right {a b : CauSeq α abs} (h : a ≤ b) : a ⊔ ba ⊔ b ≈ b := by
  obtain ⟨ε, ε0 : _ < _, i, h⟩ | h := h
  · intro _ _
    refine ⟨i, fun j hj => ?_⟩
    dsimp
    rw [← max_sub_sub_right]
    rwa [sub_self, max_eq_right, abs_zero]
    rw [sub_nonpos, ← sub_nonneg]
    exact ε0.le.trans (h _ hj)
  · refine Setoid.trans (sup_equiv_sup h (Setoid.refl _)) ?_
    rw [CauSeq.sup_idem]
Pointwise Supremum of Ordered Cauchy Sequences Equals Larger Sequence
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\text{abs} : \alpha \to \alpha$ be an absolute value function. For any two Cauchy sequences $a, b : \mathbb{N} \to \alpha$ with respect to $\text{abs}$, if $a \leq b$ (pointwise), then the pointwise supremum $a \sqcup b$ is equivalent to $b$ (i.e., their difference tends to zero).
CauSeq.inf_eq_right theorem
{a b : CauSeq α abs} (h : b ≤ a) : a ⊓ b ≈ b
Full source
protected theorem inf_eq_right {a b : CauSeq α abs} (h : b ≤ a) : a ⊓ ba ⊓ b ≈ b := by
  obtain ⟨ε, ε0 : _ < _, i, h⟩ | h := h
  · intro _ _
    refine ⟨i, fun j hj => ?_⟩
    dsimp
    rw [← min_sub_sub_right]
    rwa [sub_self, min_eq_right, abs_zero]
    exact ε0.le.trans (h _ hj)
  · refine Setoid.trans (inf_equiv_inf (Setoid.symm h) (Setoid.refl _)) ?_
    rw [CauSeq.inf_idem]
Pointwise Infimum of Cauchy Sequences Equals Smaller Sequence When $b \leq a$
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to the absolute value function $\text{abs}$ on a linearly ordered field $\alpha$, if $b \leq a$, then the pointwise infimum sequence $a \sqcap b$ is equivalent to $b$.
CauSeq.sup_eq_left theorem
{a b : CauSeq α abs} (h : b ≤ a) : a ⊔ b ≈ a
Full source
protected theorem sup_eq_left {a b : CauSeq α abs} (h : b ≤ a) : a ⊔ ba ⊔ b ≈ a := by
  simpa only [CauSeq.sup_comm] using CauSeq.sup_eq_right h
Pointwise Supremum of Ordered Cauchy Sequences Equals Larger Sequence When $b \leq a$
Informal description
Let $\alpha$ be a linearly ordered field with a strict ordered ring structure, and let $\text{abs} : \alpha \to \alpha$ be an absolute value function. For any two Cauchy sequences $a, b : \mathbb{N} \to \alpha$ with respect to $\text{abs}$, if $b \leq a$ (pointwise), then the pointwise supremum $a \sqcup b$ is equivalent to $a$ (i.e., their difference tends to zero).
CauSeq.inf_eq_left theorem
{a b : CauSeq α abs} (h : a ≤ b) : a ⊓ b ≈ a
Full source
protected theorem inf_eq_left {a b : CauSeq α abs} (h : a ≤ b) : a ⊓ ba ⊓ b ≈ a := by
  simpa only [CauSeq.inf_comm] using CauSeq.inf_eq_right h
Pointwise Infimum of Cauchy Sequences Equals Left Sequence When $a \leq b$
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to the absolute value function $\text{abs}$ on a linearly ordered field $\alpha$, if $a \leq b$, then the pointwise infimum sequence $a \sqcap b$ is equivalent to $a$.
CauSeq.le_sup_left theorem
{a b : CauSeq α abs} : a ≤ a ⊔ b
Full source
protected theorem le_sup_left {a b : CauSeq α abs} : a ≤ a ⊔ b :=
  le_of_exists ⟨0, fun _ _ => le_sup_left⟩
Left Cauchy sequence is less than or equal to their supremum
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to an absolute value function on a linearly ordered field $\alpha$, the sequence $a$ is pointwise less than or equal to the pointwise supremum sequence $a \sqcup b$.
CauSeq.inf_le_left theorem
{a b : CauSeq α abs} : a ⊓ b ≤ a
Full source
protected theorem inf_le_left {a b : CauSeq α abs} : a ⊓ b ≤ a :=
  le_of_exists ⟨0, fun _ _ => inf_le_left⟩
Infimum of Cauchy sequences is less than or equal to left sequence
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to the absolute value function $\text{abv}$ on a linearly ordered field $\alpha$, the infimum sequence $a \sqcap b$ is less than or equal to $a$ in the pointwise order.
CauSeq.le_sup_right theorem
{a b : CauSeq α abs} : b ≤ a ⊔ b
Full source
protected theorem le_sup_right {a b : CauSeq α abs} : b ≤ a ⊔ b :=
  le_of_exists ⟨0, fun _ _ => le_sup_right⟩
Right sequence is less than or equal to supremum of Cauchy sequences
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to an absolute value function on a linearly ordered field $\alpha$, the sequence $b$ is pointwise less than or equal to the pointwise supremum $a \sqcup b$.
CauSeq.inf_le_right theorem
{a b : CauSeq α abs} : a ⊓ b ≤ b
Full source
protected theorem inf_le_right {a b : CauSeq α abs} : a ⊓ b ≤ b :=
  le_of_exists ⟨0, fun _ _ => inf_le_right⟩
Infimum of Cauchy Sequences is Less Than or Equal to Right Sequence
Informal description
For any two Cauchy sequences $a$ and $b$ with respect to an absolute value function on a linearly ordered field, the infimum sequence $a \sqcap b$ is pointwise less than or equal to $b$.
CauSeq.sup_le theorem
{a b c : CauSeq α abs} (ha : a ≤ c) (hb : b ≤ c) : a ⊔ b ≤ c
Full source
protected theorem sup_le {a b c : CauSeq α abs} (ha : a ≤ c) (hb : b ≤ c) : a ⊔ b ≤ c := by
  obtain ha | ha := ha
  · obtain hb | hb := hb
    · exact Or.inl (CauSeq.sup_lt ha hb)
    · replace ha := le_of_le_of_eq ha.le (Setoid.symm hb)
      refine le_of_le_of_eq (Or.inr ?_) hb
      exact CauSeq.sup_eq_right ha
  · replace hb := le_of_le_of_eq hb (Setoid.symm ha)
    refine le_of_le_of_eq (Or.inr ?_) ha
    exact CauSeq.sup_eq_left hb
Supremum of Bounded Cauchy Sequences is Bounded Above
Informal description
For any three Cauchy sequences $a, b, c$ with respect to an absolute value function on a linearly ordered field, if $a \leq c$ and $b \leq c$ (pointwise), then the pointwise supremum $a \sqcup b$ is also less than or equal to $c$.
CauSeq.le_inf theorem
{a b c : CauSeq α abs} (hb : a ≤ b) (hc : a ≤ c) : a ≤ b ⊓ c
Full source
protected theorem le_inf {a b c : CauSeq α abs} (hb : a ≤ b) (hc : a ≤ c) : a ≤ b ⊓ c := by
  obtain hb | hb := hb
  · obtain hc | hc := hc
    · exact Or.inl (CauSeq.lt_inf hb hc)
    · replace hb := le_of_eq_of_le (Setoid.symm hc) hb.le
      refine le_of_eq_of_le hc (Or.inr ?_)
      exact Setoid.symm (CauSeq.inf_eq_right hb)
  · replace hc := le_of_eq_of_le (Setoid.symm hb) hc
    refine le_of_eq_of_le hb (Or.inr ?_)
    exact Setoid.symm (CauSeq.inf_eq_left hc)
Infimum Lower Bound for Cauchy Sequences: $a \leq b \land a \leq c \Rightarrow a \leq b \sqcap c$
Informal description
For any three Cauchy sequences $a$, $b$, and $c$ with respect to an absolute value function on a linearly ordered field, if $a \leq b$ and $a \leq c$, then $a$ is less than or equal to the pointwise infimum $b \sqcap c$.
CauSeq.sup_inf_distrib_left theorem
(a b c : CauSeq α abs) : a ⊔ b ⊓ c = (a ⊔ b) ⊓ (a ⊔ c)
Full source
protected theorem sup_inf_distrib_left (a b c : CauSeq α abs) : a ⊔ b ⊓ c = (a ⊔ b) ⊓ (a ⊔ c) :=
  ext fun _ ↦ max_min_distrib_left _ _ _
Left Distributivity of Supremum over Infimum for Cauchy Sequences: $a \sqcup (b \sqcap c) = (a \sqcup b) \sqcap (a \sqcup c)$
Informal description
For any three Cauchy sequences $a, b, c$ with respect to an absolute value function on a linearly ordered field, the following distributive law holds: $$ a \sqcup (b \sqcap c) = (a \sqcup b) \sqcap (a \sqcup c). $$ Here $\sqcup$ denotes the pointwise maximum and $\sqcap$ denotes the pointwise minimum of sequences.
CauSeq.sup_inf_distrib_right theorem
(a b c : CauSeq α abs) : a ⊓ b ⊔ c = (a ⊔ c) ⊓ (b ⊔ c)
Full source
protected theorem sup_inf_distrib_right (a b c : CauSeq α abs) : a ⊓ ba ⊓ b ⊔ c = (a ⊔ c) ⊓ (b ⊔ c) :=
  ext fun _ ↦ max_min_distrib_right _ _ _
Right Distributivity of Supremum over Infimum for Cauchy Sequences: $(a \sqcap b) \sqcup c = (a \sqcup c) \sqcap (b \sqcup c)$
Informal description
For any three Cauchy sequences $a, b, c$ with respect to an absolute value function on a linearly ordered field, the following distributive law holds: $$ (a \sqcap b) \sqcup c = (a \sqcup c) \sqcap (b \sqcup c). $$ Here $\sqcup$ denotes the pointwise maximum and $\sqcap$ denotes the pointwise minimum of sequences.