1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/ordered_fields_ch0/".
19 record is_total_order_relation (C:Type) (le:C→C→Prop) : Type \def
20 { to_cotransitive: ∀x,y,z:C. le x y → le x z ∨ le z y;
21 to_antisimmetry: ∀x,y:C. le x y → le y x → x=y
24 record is_ordered_field_ch0 (F:field) (le:F→F→Prop) : Type \def
25 { of_total_order_relation:> is_total_order_relation ? le;
26 of_mult_compat: ∀a,b. le 0 a → le 0 b → le 0 (a*b);
27 of_plus_compat: ∀a,b,c. le a b → le (a+c) (b+c);
28 of_weak_tricotomy : ∀a,b. a≠b → le a b ∨ le b a;
29 (* 0 characteristics *)
30 of_char0: ∀n. n > O → sum ? (plus F) 0 1 n ≠ 0
33 record ordered_field_ch0 : Type \def
35 of_le: of_field → of_field → Prop;
36 of_ordered_field_properties:> is_ordered_field_ch0 of_field of_le
39 interpretation "Ordered field le" 'leq a b =
40 (cic:/matita/ordered_fields_ch0/of_le.con _ a b).
42 definition lt \def λF:ordered_field_ch0.λa,b:F.a ≤ b ∧ a ≠ b.
44 interpretation "Ordered field lt" 'lt a b =
45 (cic:/matita/ordered_fields_ch0/lt.con _ a b).
47 lemma le_zero_x_to_le_opp_x_zero: ∀F:ordered_field_ch0.∀x:F. 0 ≤ x → -x ≤ 0.
49 generalize in match (of_plus_compat ? ? F ? ? (-x) H); intro;
50 rewrite > zero_neutral in H1;
51 rewrite > plus_comm in H1;
52 rewrite > opp_inverse in H1;
56 lemma le_x_zero_to_le_zero_opp_x: ∀F:ordered_field_ch0.∀x:F. x ≤ 0 → 0 ≤ -x.
58 generalize in match (of_plus_compat ? ? F ? ? (-x) H); intro;
59 rewrite > zero_neutral in H1;
60 rewrite > plus_comm in H1;
61 rewrite > opp_inverse in H1;
66 lemma eq_opp_x_times_opp_one_x: ∀F:ordered_field_ch0.∀x:F.-x = -1*x.
69 lemma not_eq_x_zero_to_lt_zero_mult_x_x:
70 ∀F:ordered_field_ch0.∀x:F. x ≠ 0 → 0 < x * x.
72 elim (of_weak_tricotomy ? ? ? ? ? ? ? ? F ? ? H);
73 [ generalize in match (le_x_zero_to_le_zero_opp_x F ? H1); intro;
74 generalize in match (of_mult_compat ? ? ? ? ? ? ? ? F ? ? H2 H2); intro;
77 axiom lt_zero_to_lt_inv_zero:
78 ∀F:ordered_field_ch0.∀x:F.∀p:x≠0. 0 < x → 0 < inv ? x p.
80 (* The ordering is not necessary. *)
81 axiom not_eq_sum_field_zero: ∀F:ordered_field_ch0.∀n. O<n → sum_field F n ≠ 0.
82 axiom le_zero_sum_field: ∀F:ordered_field_ch0.∀n. O<n → 0 < sum_field F n.
84 axiom lt_zero_to_le_inv_zero:
85 ∀F:ordered_field_ch0.∀n:nat.∀p:sum_field F n ≠ 0. 0 ≤ inv ? (sum_field F n) p.
87 definition tends_to : ∀F:ordered_field_ch0.∀f:nat→F.∀l:F.Prop.
88 alias symbol "leq" = "Ordered field le".
89 alias id "le" = "cic:/matita/nat/orders/le.ind#xpointer(1/1)".
91 (λF:ordered_field_ch0.λf:nat → F.λl:F.
92 ∀n:nat.∃m:nat.∀j:nat. le m j →
93 l - (inv F (sum_field F (S n)) ?) ≤ f j ∧
94 f j ≤ l + (inv F (sum_field F (S n)) ?));
95 apply not_eq_sum_field_zero;
101 definition is_cauchy_seq ≝
102 λF:ordered_field_ch0.λf:nat→F.
105 -eps ≤ f M - f n ∧ f M - f n ≤ eps.
108 definition is_cauchy_seq : ∀F:ordered_field_ch0.∀f:nat→F.Prop.
110 (λF:ordered_field_ch0.λf:nat→F.
113 -(inv ? (sum_field F (S m)) ?) ≤ f N - f n ∧
114 f N - f n ≤ inv ? (sum_field F (S m)) ?);
115 apply not_eq_sum_field_zero;
120 definition is_complete ≝
121 λF:ordered_field_ch0.
122 ∀f:nat→F. is_cauchy_seq ? f →
123 ∃l:F. tends_to ? f l.