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_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
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 = {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 := _, nsmul := nsmul_rec {add := has_add.add cau_seq.has_add}, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg cau_seq.has_neg, sub := has_sub.sub cau_seq.has_sub, sub_eq_add_neg := _, zsmul := zsmul_rec {neg := has_neg.neg cau_seq.has_neg}, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := has_mul.mul cau_seq.has_mul, mul_assoc := _, one := 1, one_mul := _, mul_one := _, npow := npow_rec {mul := has_mul.mul cau_seq.has_mul}, npow_zero' := _, npow_succ' := _, 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 := _, nsmul := ring.nsmul cau_seq.ring, nsmul_zero' := _, nsmul_succ' := _, neg := ring.neg cau_seq.ring, sub := ring.sub cau_seq.ring, sub_eq_add_neg := _, zsmul := ring.zsmul cau_seq.ring, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := ring.mul cau_seq.ring, mul_assoc := _, one := ring.one cau_seq.ring, one_mul := _, mul_one := _, npow := ring.npow cau_seq.ring, npow_zero' := _, npow_succ' := _, 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 := _}