mathlib documentation

data.real.cau_seq

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 #

Tags #

sequence, cauchy, abs val, absolute value

theorem exists_forall_ge_and {α : Type u_1} [linear_order α] {P Q : α → Prop} :
(∃ (i : α), ∀ (j : α), j iP j)(∃ (i : α), ∀ (j : α), j iQ j)(∃ (i : α), ∀ (j : α), j iP j Q j)
theorem rat_add_continuous_lemma {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] (abv : β → α) [is_absolute_value abv] {ε : α} (ε0 : 0 < ε) :
∃ (δ : α) (H : δ > 0), ∀ {a₁ a₂ b₁ b₂ : β}, abv (a₁ - b₁) < δabv (a₂ - b₂) < δabv (a₁ + a₂ - (b₁ + b₂)) < ε
theorem rat_mul_continuous_lemma {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] (abv : β → α) [is_absolute_value abv] {ε K₁ K₂ : α} (ε0 : 0 < ε) :
∃ (δ : α) (H : δ > 0), ∀ {a₁ a₂ b₁ b₂ : β}, abv a₁ < K₁abv b₂ < K₂abv (a₁ - b₁) < δabv (a₂ - b₂) < δabv (a₁ * a₂ - b₁ * b₂) < ε
theorem rat_inv_continuous_lemma {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [field β] (abv : β → α) [is_absolute_value abv] {ε K : α} (ε0 : 0 < ε) (K0 : 0 < K) :
∃ (δ : α) (H : δ > 0), ∀ {a b : β}, K abv aK abv babv (a - b) < δabv (a⁻¹ - b⁻¹) < ε
def is_cau_seq {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] (abv : β → α) (f : → β) :
Prop

A sequence is Cauchy if the distance between its entries tends to zero.

Equations
@[nolint]
theorem is_cau_seq.cauchy₂ {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f : → β} (hf : is_cau_seq abv f) {ε : α} (ε0 : 0 < ε) :
∃ (i : ), ∀ (j : ), j i∀ (k : ), k iabv (f j - f k) < ε
theorem is_cau_seq.cauchy₃ {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f : → β} (hf : is_cau_seq abv f) {ε : α} (ε0 : 0 < ε) :
∃ (i : ), ∀ (j : ), j i∀ (k : ), k jabv (f k - f j) < ε
def cau_seq {α : Type u_1} [linear_ordered_field α] (β : Type u_2) [ring β] (abv : β → α) :
Type u_2

cau_seq β abv is the type of β-valued Cauchy sequences, with respect to the absolute value function abv.

Equations
@[protected, instance]
def cau_seq.has_coe_to_fun {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} :
has_coe_to_fun (cau_seq β abv) (λ (_x : cau_seq β abv), → β)
Equations
@[simp]
theorem cau_seq.mk_to_fun {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} (f : → β) (hf : is_cau_seq abv f) :
f, hf⟩ = f
theorem cau_seq.ext {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} {f g : cau_seq β abv} (h : ∀ (i : ), f i = g i) :
f = g
theorem cau_seq.is_cau {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} (f : cau_seq β abv) :
theorem cau_seq.cauchy {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} (f : cau_seq β abv) {ε : α} :
0 < ε(∃ (i : ), ∀ (j : ), j iabv (f j - f i) < ε)
def cau_seq.of_eq {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} (f : cau_seq β abv) (g : → β) (e : ∀ (i : ), f i = g i) :
cau_seq β abv

Given a Cauchy sequence f, create a Cauchy sequence from a sequence g with the same values as f.

Equations
@[nolint]
theorem cau_seq.cauchy₂ {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f : cau_seq β abv) {ε : α} :
0 < ε(∃ (i : ), ∀ (j : ), j i∀ (k : ), k iabv (f j - f k) < ε)
theorem cau_seq.cauchy₃ {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f : cau_seq β abv) {ε : α} :
0 < ε(∃ (i : ), ∀ (j : ), j i∀ (k : ), k jabv (f k - f j) < ε)
theorem cau_seq.bounded {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f : cau_seq β abv) :
∃ (r : α), ∀ (i : ), abv (f i) < r
theorem cau_seq.bounded' {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f : cau_seq β abv) (x : α) :
∃ (r : α) (H : r > x), ∀ (i : ), abv (f i) < r
@[protected, instance]
def cau_seq.has_add {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
has_add (cau_seq β abv)
Equations
@[simp]
theorem cau_seq.add_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f g : cau_seq β abv) (i : ) :
(f + g) i = f i + g i
def cau_seq.const {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] (abv : β → α) [is_absolute_value abv] (x : β) :
cau_seq β abv

The constant Cauchy sequence.

Equations
@[simp]
theorem cau_seq.const_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (x : β) (i : ) :
(cau_seq.const abv x) i = x
theorem cau_seq.const_inj {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {x y : β} :
@[protected, instance]
def cau_seq.has_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
has_zero (cau_seq β abv)
Equations
@[protected, instance]
def cau_seq.has_one {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
has_one (cau_seq β abv)
Equations
@[protected, instance]
def cau_seq.inhabited {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
Equations
@[simp]
theorem cau_seq.zero_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (i : ) :
0 i = 0
@[simp]
theorem cau_seq.one_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (i : ) :
1 i = 1
@[simp]
theorem cau_seq.const_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
theorem cau_seq.const_add {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (x y : β) :
@[protected, instance]
def cau_seq.has_mul {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
has_mul (cau_seq β abv)
Equations
@[simp]
theorem cau_seq.mul_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f g : cau_seq β abv) (i : ) :
(f * g) i = (f i) * g i
theorem cau_seq.const_mul {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (x y : β) :
cau_seq.const abv (x * y) = (cau_seq.const abv x) * cau_seq.const abv y
@[protected, instance]
def cau_seq.has_neg {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
has_neg (cau_seq β abv)
Equations
@[simp]
theorem cau_seq.neg_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f : cau_seq β abv) (i : ) :
(-f) i = -f i
theorem cau_seq.const_neg {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (x : β) :
@[protected, instance]
def cau_seq.has_sub {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
has_sub (cau_seq β abv)
Equations
@[simp]
theorem cau_seq.sub_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f g : cau_seq β abv) (i : ) :
(f - g) i = f i - g i
theorem cau_seq.const_sub {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (x y : β) :
def cau_seq.lim_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} (f : cau_seq β abv) :
Prop

lim_zero f holds when f approaches 0.

Equations
theorem cau_seq.add_lim_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f g : cau_seq β abv} (hf : f.lim_zero) (hg : g.lim_zero) :
(f + g).lim_zero
theorem cau_seq.mul_lim_zero_right {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f : cau_seq β abv) {g : cau_seq β abv} (hg : g.lim_zero) :
(f * g).lim_zero
theorem cau_seq.mul_lim_zero_left {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f : cau_seq β abv} (g : cau_seq β abv) (hg : f.lim_zero) :
(f * g).lim_zero
theorem cau_seq.neg_lim_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f : cau_seq β abv} (hf : f.lim_zero) :
theorem cau_seq.sub_lim_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f g : cau_seq β abv} (hf : f.lim_zero) (hg : g.lim_zero) :
(f - g).lim_zero
theorem cau_seq.lim_zero_sub_rev {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f g : cau_seq β abv} (hfg : (f - g).lim_zero) :
(g - f).lim_zero
theorem cau_seq.zero_lim_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
theorem cau_seq.const_lim_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {x : β} :
@[protected, instance]
def cau_seq.equiv {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] :
setoid (cau_seq β abv)
Equations
theorem cau_seq.add_equiv_add {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f1 f2 g1 g2 : cau_seq β abv} (hf : f1 f2) (hg : g1 g2) :
f1 + g1 f2 + g2
theorem cau_seq.neg_equiv_neg {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f g : cau_seq β abv} (hf : f g) :
-f -g
theorem cau_seq.equiv_def₃ {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f g : cau_seq β abv} (h : f g) {ε : α} (ε0 : 0 < ε) :
∃ (i : ), ∀ (j : ), j i∀ (k : ), k jabv (f k - g j) < ε
theorem cau_seq.lim_zero_congr {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f g : cau_seq β abv} (h : f g) :
theorem cau_seq.abv_pos_of_not_lim_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f : cau_seq β abv} (hf : ¬f.lim_zero) :
∃ (K : α) (H : K > 0) (i : ), ∀ (j : ), j iK abv (f j)
theorem cau_seq.of_near {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (f : → β) (g : cau_seq β abv) (h : ∀ (ε : α), ε > 0(∃ (i : ), ∀ (j : ), j iabv (f j - g j) < ε)) :
theorem cau_seq.not_lim_zero_of_not_congr_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f : cau_seq β abv} (hf : ¬f 0) :
theorem cau_seq.mul_equiv_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] (g : cau_seq β abv) {f : cau_seq β abv} (hf : f 0) :
g * f 0
theorem cau_seq.mul_not_equiv_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {f g : cau_seq β abv} (hf : ¬f 0) (hg : ¬g 0) :
¬f * g 0
theorem cau_seq.const_equiv {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] {abv : β → α} [is_absolute_value abv] {x y : β} :
theorem cau_seq.mul_equiv_zero' {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [comm_ring β] {abv : β → α} [is_absolute_value abv] (g : cau_seq β abv) {f : cau_seq β abv} (hf : f 0) :
f * g 0
theorem cau_seq.one_not_equiv_zero {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [ring β] [is_domain β] (abv : β → α) [is_absolute_value abv] :
theorem cau_seq.inv_aux {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [field β] {abv : β → α} [is_absolute_value abv] {f : cau_seq β abv} (hf : ¬f.lim_zero) (ε : α) (H : ε > 0) :
∃ (i : ), ∀ (j : ), j iabv ((f j)⁻¹ - (f i)⁻¹) < ε
def cau_seq.inv {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [field β] {abv : β → α} [is_absolute_value abv] (f : cau_seq β abv) (hf : ¬f.lim_zero) :
cau_seq β abv

Given a Cauchy sequence f with nonzero limit, create a Cauchy sequence with values equal to the inverses of the values of f.

Equations
@[simp]
theorem cau_seq.inv_apply {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [field β] {abv : β → α} [is_absolute_value abv] {f : cau_seq β abv} (hf : ¬f.lim_zero) (i : ) :
(f.inv hf) i = (f i)⁻¹
theorem cau_seq.inv_mul_cancel {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [field β] {abv : β → α} [is_absolute_value abv] {f : cau_seq β abv} (hf : ¬f.lim_zero) :
(f.inv hf) * f 1
theorem cau_seq.const_inv {α : Type u_1} [linear_ordered_field α] {β : Type u_2} [field β] {abv : β → α} [is_absolute_value abv] {x : β} (hx : x 0) :
def cau_seq.pos {α : Type u_1} [linear_ordered_field α] (f : cau_seq α abs) :
Prop

The entries of a positive Cauchy sequence eventually have a positive lower bound.

Equations
theorem cau_seq.not_lim_zero_of_pos {α : Type u_1} [linear_ordered_field α] {f : cau_seq α abs} :
f.pos¬f.lim_zero
theorem cau_seq.const_pos {α : Type u_1} [linear_ordered_field α] {x : α} :
theorem cau_seq.add_pos {α : Type u_1} [linear_ordered_field α] {f g : cau_seq α abs} :
f.posg.pos(f + g).pos
theorem cau_seq.pos_add_lim_zero {α : Type u_1} [linear_ordered_field α] {f g : cau_seq α abs} :
f.posg.lim_zero(f + g).pos
@[protected]
theorem cau_seq.mul_pos {α : Type u_1} [linear_ordered_field α] {f g : cau_seq α abs} :
f.posg.pos(f * g).pos
theorem cau_seq.trichotomy {α : Type u_1} [linear_ordered_field α] (f : cau_seq α abs) :
@[protected, instance]
def cau_seq.has_lt {α : Type u_1} [linear_ordered_field α] :
Equations
@[protected, instance]
def cau_seq.has_le {α : Type u_1} [linear_ordered_field α] :
Equations
theorem cau_seq.lt_of_lt_of_eq {α : Type u_1} [linear_ordered_field α] {f g h : cau_seq α abs} (fg : f < g) (gh : g h) :
f < h
theorem cau_seq.lt_of_eq_of_lt {α : Type u_1} [linear_ordered_field α] {f g h : cau_seq α abs} (fg : f g) (gh : g < h) :
f < h
theorem cau_seq.lt_trans {α : Type u_1} [linear_ordered_field α] {f g h : cau_seq α abs} (fg : f < g) (gh : g < h) :
f < h
theorem cau_seq.lt_irrefl {α : Type u_1} [linear_ordered_field α] {f : cau_seq α abs} :
¬f < f
theorem cau_seq.le_of_eq_of_le {α : Type u_1} [linear_ordered_field α] {f g h : cau_seq α abs} (hfg : f g) (hgh : g h) :
f h
theorem cau_seq.le_of_le_of_eq {α : Type u_1} [linear_ordered_field α] {f g h : cau_seq α abs} (hfg : f g) (hgh : g h) :
f h
@[protected, instance]
def cau_seq.preorder {α : Type u_1} [linear_ordered_field α] :
Equations
theorem cau_seq.le_antisymm {α : Type u_1} [linear_ordered_field α] {f g : cau_seq α abs} (fg : f g) (gf : g f) :
f g
theorem cau_seq.lt_total {α : Type u_1} [linear_ordered_field α] (f g : cau_seq α abs) :
f < g f g g < f
theorem cau_seq.le_total {α : Type u_1} [linear_ordered_field α] (f g : cau_seq α abs) :
f g g f
theorem cau_seq.const_lt {α : Type u_1} [linear_ordered_field α] {x y : α} :
theorem cau_seq.const_le {α : Type u_1} [linear_ordered_field α] {x y : α} :
theorem cau_seq.le_of_exists {α : Type u_1} [linear_ordered_field α] {f g : cau_seq α abs} (h : ∃ (i : ), ∀ (j : ), j if j g j) :
f g
theorem cau_seq.exists_gt {α : Type u_1} [linear_ordered_field α] (f : cau_seq α abs) :
∃ (a : α), f < cau_seq.const abs a
theorem cau_seq.exists_lt {α : Type u_1} [linear_ordered_field α] (f : cau_seq α abs) :
∃ (a : α), cau_seq.const abs a < f