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
is_absolute_value
: a type class stating thatf : β → α
satisfies the axioms of an abs valis_cau_seq
: a predicate that saysf : ℕ → β
is Cauchy.cau_seq
: the type of Cauchy sequences valued in typeβ
with respect to an absolute value functionabv
.
Tags
sequence, cauchy, abs val, absolute value
- abv_nonneg : ∀ (x : β), 0 ≤ f x
- abv_eq_zero : ∀ {x : β}, f x = 0 ↔ x = 0
- abv_add : ∀ (x y : β), f (x + y) ≤ f x + f y
- abv_mul : ∀ (x y : β), f (x * y) = f x * f y
A function f
is an absolute value if it is nonnegative, zero only at 0, additive, and
multiplicative.
Equations
A sequence is Cauchy if the distance between its entries tends to zero.
cau_seq β abv
is the type of β
-valued Cauchy sequences, with respect to the absolute value
function abv
.
Equations
- cau_seq β abv = {f // is_cau_seq abv f}
Equations
- cau_seq.has_coe_to_fun = {F := λ (x : cau_seq β abv), ℕ → β, coe := subtype.val (λ (f : ℕ → β), is_cau_seq abv f)}
Given a Cauchy sequence f
, create a Cauchy sequence from a sequence g
with
the same values as f
.
The constant Cauchy sequence.
Equations
- cau_seq.const abv x = ⟨λ (i : ℕ), x, _⟩
Equations
- cau_seq.has_zero = {zero := cau_seq.const abv 0}
Equations
- cau_seq.has_one = {one := cau_seq.const abv 1}
Equations
- cau_seq.inhabited = {default := 0}
Equations
- cau_seq.ring = {add := has_add.add cau_seq.has_add, add_assoc := _, zero := 0, zero_add := _, add_zero := _, neg := has_neg.neg cau_seq.has_neg, add_left_neg := _, add_comm := _, mul := has_mul.mul cau_seq.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _}
Equations
- cau_seq.comm_ring = {add := ring.add cau_seq.ring, add_assoc := _, zero := ring.zero cau_seq.ring, zero_add := _, add_zero := _, neg := ring.neg cau_seq.ring, add_left_neg := _, add_comm := _, mul := ring.mul cau_seq.ring, mul_assoc := _, one := ring.one cau_seq.ring, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _}
Given a Cauchy sequence f
with nonzero limit, create a Cauchy sequence with values equal to
the inverses of the values of f
.
Equations
- cau_seq.preorder = {le := λ (f g : cau_seq α abs), f < g ∨ f ≈ g, lt := has_lt.lt cau_seq.has_lt, le_refl := _, le_trans := _, lt_iff_le_not_le := _}