Axiom IR : CReals.
Notation PartIR := (PartFunct IR).
Notation ProjIR1 := (prj1 IR _ _ _).
Notation ProjIR2 := (prj2 IR _ _ _).
Section CReals_axioms.
First properties which follow trivially from the axioms.
Lemma Lim_Cauchy : forall s : CauchySeq IR, SeqLimit s (Lim s).
Lemma Archimedes : forall x : IR, {n : N | x [<=] nring n}.
Lemma Archimedes' : forall x : IR, {n : N | x [<] nring n}.
A stronger version, which often comes in useful.
Lemma str_Archimedes : forall x : IR,
0 [<=] x -> {n : N | x [<=] nring n /\ (2 <= n -> nring n[-]2 [<=] x)}.
Definition CauchySeqR := CauchySeq IR.
End CReals_axioms.
Section Cauchy_Defs.
Cauchy sequences
Alternative definitions
This section gives several definitions of Cauchy sequences. There are no lemmas in this section.The current definition of Cauchy (Cauchy_prop) is:
for all e>0 there exists N such that for all m≥ N |seqm-seqN|≤ e
Variant 1 of Cauchy (Cauchy_prop1) is:
for all k there exists N such that for all m ≥ N |seqm-seqN| ≤ 1/(k+1)
In all of the following variants the limit occurs in the definition. Therefore it is useful to define an auxiliary predicate Cauchy_Lim_prop?, in terms of which Cauchy_prop? is defined.
Variant 2 of Cauchy (Cauchy_prop2) is exists y, (Cauchy_Lim_prop2 seq y) where
Cauchy_Lim_prop2 seq y := forall ε [>] 0, exists N, forall m >= N, (AbsIR seq m - y) [<=] ε
Note that Cauchy_Lim_prop2 equals seqLimit.
Variant 3 of Cauchy (Cauchy_prop3) reads exists y, (Cauchy_Lim_prop3 seq y) where
Cauchy_Lim_prop3 seq y := forall k, exists N, forall m >= N, (AbsIR seq m - y) [<=] 1[/] (k[+]1)
The following variant is more restricted.
Variant 4 of Cauchy (Cauchy_prop4): exists y, (Cauchy_Lim_prop4 seq y) where
Cauchy_Lim_prop4 seq y := forall k, (AbsIR seq m - y) [<=] 1[/] (k[+]1)
So
Cauchy_prop4 -> Cauchy_prop3 ⇔ Cauchy_prop2 ⇔ Cauchy_prop1 ⇔ Cauchy_prop
Note: we don't know which formulations are useful.
The inequalities are stated with ≤ rather than with < for the following reason: both formulations are equivalent, as is well known; and ≤ being a negative statement, this makes proofs sometimes easier and program extraction much more efficient.
Definition Cauchy_prop1 (seq : N -> IR) := forall k,
{N : N | forall m, N <= m -> AbsSmall (one_div_succ k) (seq m[-]seq N)}.
Definition Cauchy_Lim_prop2 (seq : N -> IR) (y : IR) := forall ε,
0 [<] ε -> {N : N | forall m, N <= m -> AbsSmall ε (seq m[-]y)}.
Definition Cauchy_prop2 (seq : N -> IR) := {y : IR | Cauchy_Lim_prop2 seq y}.
Definition Cauchy_Lim_prop3 (seq : N -> IR) (y : IR) := forall k,
{N : N | forall m, N <= m -> AbsSmall (one_div_succ k) (seq m[-]y)}.
Definition Cauchy_prop3 (seq : N -> IR) := {y : IR | Cauchy_Lim_prop3 seq y}.
Definition Cauchy_Lim_prop4 (seq : N -> IR) (y : IR) := forall m,
AbsSmall (one_div_succ m) (seq m[-]y).
Definition Cauchy_prop4 (seq : N -> IR) := {y : IR | Cauchy_Lim_prop4 seq y}.
End Cauchy_Defs.
Section Inequalities.
Lemma Cauchy_complete : forall seq : CauchySeq IR, Cauchy_Lim_prop2 seq (Lim seq).
Lemma less_Lim_so_less_seq : forall (seq : CauchySeq IR) y,
y [<] Lim seq -> {N : N | forall m, N <= m -> y [<] seq m}.
Lemma Lim_less_so_seq_less : forall (seq : CauchySeq IR) y,
Lim seq [<] y -> {N : N | forall m, N <= m -> seq m [<] y}.
Lemma Lim_less_Lim_so_seq_less_seq : forall seq1 seq2 : CauchySeq IR,
Lim seq1 [<] Lim seq2 -> {N : N | forall m, N <= m -> seq1 m [<] seq2 m}.
The next lemma follows from less_Lim_so_less_seq with y := (y+ (Lim seq)) /2.
Lemma less_Lim_so : forall (seq : CauchySeq IR) y, y [<] Lim seq ->
{ε : IR | 0 [<] ε | {N : N | forall m, N <= m -> y[+]ε [<] seq m}}.
Lemma Lim_less_so : forall (seq : CauchySeq IR) y, Lim seq [<] y ->
{ε : IR | 0 [<] ε | {N : N | forall m, N <= m -> seq m[+]ε [<] y}}.
Lemma leEq_seq_so_leEq_Lim : forall (seq : CauchySeqR) y, (forall i, y [<=] seq i) -> y [<=] Lim seq.
Lemma str_leEq_seq_so_leEq_Lim : forall (seq : CauchySeq IR) y,
(exists N : N, (forall i, N <= i -> y [<=] seq i)) -> y [<=] Lim seq.
Lemma Lim_leEq_Lim : forall seq1 seq2 : CauchySeqR,
(forall i, seq1 i [<=] seq2 i) -> Lim seq1 [<=] Lim seq2.
Lemma seq_leEq_so_Lim_leEq : forall (seq : CauchySeqR) y, (forall i, seq i [<=] y) -> Lim seq [<=] y.
Lemma str_seq_leEq_so_Lim_leEq : forall (seq : CauchySeq IR) y,
(exists N : N, (forall i, N <= i -> seq i [<=] y)) -> Lim seq [<=] y.
Lemma Limits_unique : forall (seq : CauchySeq IR) y,
Cauchy_Lim_prop2 seq y -> y [=] Lim seq.
Lemma Lim_wd : forall (seq : N -> IR) x y,
x [=] y -> Cauchy_Lim_prop2 seq x -> Cauchy_Lim_prop2 seq y.
Lemma Lim_strext : forall seq1 seq2 : CauchySeq IR,
Lim seq1 [#] Lim seq2 -> {n : N | seq1 n [#] seq2 n}.
Lemma Lim_ap_imp_seq_ap : forall seq1 seq2 : CauchySeq IR,
Lim seq1 [#] Lim seq2 -> {N : N | forall m, N <= m -> seq1 m [#] seq2 m}.
Lemma Lim_ap_imp_seq_ap' : forall seq1 seq2 : CauchySeq IR,
Lim seq1 [#] Lim seq2 -> {N : N | seq1 N [#] seq2 N}.
End Inequalities.
Section Equiv_Cauchy.
Lemma Cauchy_prop1_prop : forall seq, Cauchy_prop1 seq -> Cauchy_prop seq.
Lemma Cauchy_prop2_prop : forall seq, Cauchy_prop2 seq -> Cauchy_prop seq.
Lemma Cauchy_Lim_prop3_prop2 : forall seq y,
Cauchy_Lim_prop3 seq y -> Cauchy_Lim_prop2 seq y.
Lemma Cauchy_prop3_prop2 : forall seq, Cauchy_prop3 seq -> Cauchy_prop2 seq.
Lemma Cauchy_prop3_prop : forall seq, Cauchy_prop3 seq -> Cauchy_prop seq.
Definition Build_CauchySeq1 : forall seq, Cauchy_prop1 seq -> CauchySeqR.
Defined.
Lemma Cauchy_Lim_prop4_prop3 : forall seq y,
Cauchy_Lim_prop4 seq y -> Cauchy_Lim_prop3 seq y.
Lemma Cauchy_Lim_prop4_prop2 : forall seq y,
Cauchy_Lim_prop4 seq y -> Cauchy_Lim_prop2 seq y.
Lemma Cauchy_prop4_prop3 : forall seq, Cauchy_prop4 seq -> Cauchy_prop3 seq.
Lemma Cauchy_prop4_prop : forall seq, Cauchy_prop4 seq -> Cauchy_prop seq.
Definition Build_CauchySeq4 : forall seq, Cauchy_prop4 seq -> CauchySeqR.
Defined.
Definition Build_CauchySeq4_y : forall seq y, Cauchy_Lim_prop4 seq y -> CauchySeqR.
Defined.
Lemma Lim_CauchySeq4 : forall seq y H, Lim (Build_CauchySeq4_y seq y H) [=] y.
Definition Build_CauchySeq2 : forall seq, Cauchy_prop2 seq -> CauchySeqR.
Defined.
Definition Build_CauchySeq2_y : forall seq y, Cauchy_Lim_prop2 seq y -> CauchySeqR.
Defined.
Lemma Lim_CauchySeq2 : forall seq y H, Lim (Build_CauchySeq2_y seq y H) [=] y.
Well definedness.
Lemma Cauchy_prop_wd' : forall seq1 seq2 : N -> IR,
Cauchy_prop seq1 -> {N : N | forall n, N <= n -> seq1 n [=] seq2 n} -> Cauchy_prop seq2.
Lemma Cauchy_prop_wd : forall seq1 seq2 : N -> IR,
Cauchy_prop seq1 -> (forall n, seq1 n [=] seq2 n) -> Cauchy_prop seq2.
Lemma Cauchy_Lim_prop2_wd' : forall seq1 seq2 c, Cauchy_Lim_prop2 seq1 c ->
{ N : N | forall n, N <= n -> seq1 n [=] seq2 n} -> Cauchy_Lim_prop2 seq2 c.
Lemma Cauchy_Lim_prop2_wd : forall seq1 seq2 c, Cauchy_Lim_prop2 seq1 c ->
(forall n, seq1 n [=] seq2 n) -> Cauchy_Lim_prop2 seq2 c.
Lemma Lim_wd'' : forall seq1 seq2 : CauchySeqR,
{N : N | forall n : N, N <= n -> seq1 n [=] seq2 n} -> Lim seq1 [=] Lim seq2.
Lemma Lim_wd' : forall seq1 seq2 : CauchySeqR,
(forall n : N, seq1 n [=] seq2 n) -> Lim seq1 [=] Lim seq2.
Lemma Lim_unique : forall seq x y,
Cauchy_Lim_prop2 seq x -> Cauchy_Lim_prop2 seq y -> x [=] y.
End Equiv_Cauchy.
Section Cauchy_props.
Properties of Cauchy sequences
Some of these lemmas are now obsolete, because they were reproved for arbitrary ordered fields...
We begin by defining the constant sequence and proving that it is Cauchy with the expected limit.
Definition Cauchy_const : IR -> CauchySeq IR.
Defined.
Lemma Lim_const : forall x : IR, x [=] Lim (Cauchy_const x).
Lemma Cauchy_Lim_plus : forall seq1 seq2 y1 y2,
Cauchy_Lim_prop2 seq1 y1 -> Cauchy_Lim_prop2 seq2 y2 ->
Cauchy_Lim_prop2 (fun n => seq1 n [+] seq2 n) (y1 [+] y2).
Lemma Cauchy_plus : forall seq1 seq2 : CauchySeqR,
Cauchy_prop (fun n => seq1 n [+] seq2 n).
Lemma Lim_plus : forall seq1 seq2 : CauchySeqR,
Lim (Build_CauchySeq _ _ (Cauchy_plus seq1 seq2)) [=] Lim seq1 [+] Lim seq2.
Lemma Cauchy_Lim_inv : forall seq y,
Cauchy_Lim_prop2 seq y -> Cauchy_Lim_prop2 (fun n => [--] (seq n)) [--]y.
Lemma Cauchy_inv : forall seq : CauchySeqR, Cauchy_prop (fun n => [--] (seq n)).
Lemma Lim_inv : forall seq : CauchySeqR,
Lim (Build_CauchySeq _ _ (Cauchy_inv seq)) [=] [--] (Lim seq).
Lemma Cauchy_Lim_minus : forall seq1 seq2 y1 y2,
Cauchy_Lim_prop2 seq1 y1 -> Cauchy_Lim_prop2 seq2 y2 ->
Cauchy_Lim_prop2 (fun n => seq1 n[-]seq2 n) (y1[-]y2).
Lemma Cauchy_minus : forall seq1 seq2 : CauchySeqR,
Cauchy_prop (fun n => seq1 n[-]seq2 n).
Lemma Lim_minus : forall seq1 seq2 : CauchySeqR,
Lim (Build_CauchySeq _ _ (Cauchy_minus seq1 seq2)) [=] Lim seq1[-]Lim seq2.
Lemma Cauchy_Lim_mult : forall seq1 seq2 y1 y2,
Cauchy_Lim_prop2 seq1 y1 -> Cauchy_Lim_prop2 seq2 y2 ->
Cauchy_Lim_prop2 (fun n => seq1 n [*] seq2 n) (y1 [*] y2).
Lemma Cauchy_mult : forall seq1 seq2 : CauchySeqR,
Cauchy_prop (fun n => seq1 n [*] seq2 n).
Lemma Lim_mult : forall seq1 seq2 : CauchySeqR,
Lim (Build_CauchySeq _ _ (Cauchy_mult seq1 seq2)) [=] Lim seq1 [*] Lim seq2.
End Cauchy_props.