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 (**************************************************************************)
17 include "nat/orders.ma".
18 include "nat/times.ma".
19 include "ordered_group.ma".
20 include "divisible_group.ma".
22 record todgroup : Type ≝ {
24 todg_division_: dgroup;
25 todg_with_: dg_carr todg_division_ = og_abelian_group todg_order
28 lemma todg_division: todgroup → dgroup.
29 intro G; apply (mk_dgroup G); unfold abelian_group_OF_todgroup;
30 cases (todg_with_ G); exact (dg_prop (todg_division_ G));
33 coercion cic:/matita/ordered_divisible_group/todg_division.con.
35 lemma mul_ge: ∀G:todgroup.∀x:G.∀n.0 ≤ x → 0 ≤ n * x.
36 intros (G x n); elim n; simplify; [apply le_reflexive]
37 apply (le_transitive ???? H1);
38 apply (Le≪ (0+(n1*x)) (zero_neutral ??));
39 apply fle_plusr; assumption;
42 lemma lt_ltmul: ∀G:todgroup.∀x,y:G.∀n. x < y → S n * x < S n * y.
43 intros; elim n; [simplify; apply flt_plusr; assumption]
44 simplify; apply (ltplus); [assumption] assumption;
47 lemma ltmul_lt: ∀G:todgroup.∀x,y:G.∀n. S n * x < S n * y → x < y.
48 intros 4; elim n; [apply (plus_cancr_lt ??? 0); assumption]
49 simplify in l; cases (ltplus_orlt ????? l); [assumption]
53 lemma divide_preserves_lt: ∀G:todgroup.∀e:G.∀n.0<e → 0 < e/n.
54 intros; elim n; [apply (Lt≫ ? (div1 ??));assumption]
55 unfold divide; elim (dg_prop G e (S n1)); simplify; simplify in f;
56 apply (ltmul_lt ??? (S n1)); simplify; apply (Lt≫ ? p);
57 apply (Lt≪ ? (zero_neutral ??)); (* bug se faccio repeat *)
58 apply (Lt≪ ? (zero_neutral ??));
59 apply (Lt≪ ? (mulzero ?n1));
63 lemma muleqplus_lt: ∀G:todgroup.∀x,y:G.∀n,m.
64 0<x → 0<y → S n * x ≈ S (n + S m) * y → y < x.
65 intros (G x y n m H1 H2 H3); apply (ltmul_lt ??? n); apply (Lt≫ ? H3);
67 rewrite > sym_plus; simplify; apply (Lt≪ (0+(y+n*y))); [
68 apply eq_sym; apply zero_neutral]
69 apply flt_plusr; assumption;]
70 apply (lt_transitive ???? l); rewrite > sym_plus; simplify;
71 rewrite > (sym_plus n); simplify; repeat apply flt_plusl;
72 apply (Lt≪ (0+(n1+n)*y)); [apply eq_sym; apply zero_neutral]
73 apply flt_plusr; assumption;