This repository has been archived by the owner on Apr 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cauchy.v
59 lines (42 loc) · 1.44 KB
/
cauchy.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Require Import HoTT.
Require Import FunextAxiom.
Require Import basics quotient hit.Truncations.
Module Cauchy.
Export Field_pr OrderedRing OrderedMagma_pr Relation_pr.
Section VarSec.
Context {T : Type}.
Variable L : PreringFull T.
Context {Hdec : DecidablePaths T} {HpropLt : RelationProp (<)}
{Hfield : IsDecField L}
{Hfo : FullPseudoSemiringOrder L} {Htri : Trichotomic (<)}.
Let Hset : IsHSet T := _.
Record Tpos := mkTpos { posV :> T; posP : ZeroV < posV }.
Lemma Tpos_plus_pr : forall a b : Tpos, ZeroV < (a:T) + b.
Proof.
intros.
Admitted.
Instance Tpos_plus : Plus Tpos := fun a b => mkTpos _ (Tpos_plus_pr a b).
Notation "- e" := (inverse_val (ropp e)).
Local Inductive real : Type :=
| rat : T -> real
| lim : forall (f : Tpos -> real), (forall d e : Tpos, equiv (d+e) (f d) (f e)) -> real
with equiv : Tpos -> real -> real -> Type :=
| equiv_rat_rat : forall (q r : T) (e : Tpos),
- (e : T) < q + (- r) ->
(q : T) + (- r) < e ->
equiv e (rat q) (rat r)
| equiv_rat_lim : forall q y Hy (e d d' : Tpos),
(e:T) = (d:T) + d' ->
equiv d' (rat q) (y d) ->
equiv e (rat q) (lim y Hy)
| equiv_lim_rat : forall x Hx r (e d d' : Tpos),
(e:T) = (d:T) + d' ->
equiv d' (x d) (rat r) ->
equiv e (lim x Hx) (rat r)
| equiv_lim_lim : forall x Hx y Hy (e d n e' : Tpos),
(e:T) = (d:T) + n + e' ->
equiv e' (x d) (y n) ->
equiv e (lim x Hx) (lim y Hy)
.
End VarSec.
End Cauchy.