aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories
diff options
context:
space:
mode:
Diffstat (limited to 'theories')
-rwxr-xr-xtheories/Arith/Compare_dec.v20
-rwxr-xr-xtheories/Arith/Div.v4
-rw-r--r--theories/Arith/Euclid.v6
-rw-r--r--theories/Arith/Even.v6
-rwxr-xr-xtheories/Arith/Lt.v2
-rwxr-xr-xtheories/Arith/Minus.v6
-rwxr-xr-xtheories/Arith/Mult.v8
-rwxr-xr-xtheories/Arith/Wf_nat.v8
-rwxr-xr-xtheories/Bool/Bool.v102
-rwxr-xr-xtheories/Bool/DecBool.v4
-rwxr-xr-xtheories/Bool/IfProp.v12
-rw-r--r--theories/Bool/Sumbool.v12
-rwxr-xr-xtheories/Bool/Zerob.v8
-rwxr-xr-xtheories/Init/Wf.v10
-rw-r--r--theories/Lists/ListSet.v56
-rwxr-xr-xtheories/Lists/Streams.v6
-rwxr-xr-xtheories/Lists/TheoryList.v22
-rw-r--r--theories/Logic/Decidable.v24
-rw-r--r--theories/Logic/Eqdep_dec.v18
-rw-r--r--theories/Logic/JMeq.v12
-rw-r--r--theories/Num/AddProps.v16
-rw-r--r--theories/Num/DiscrProps.v2
-rw-r--r--theories/Num/LeProps.v30
-rw-r--r--theories/Num/LtProps.v24
-rw-r--r--theories/Num/NeqDef.v6
-rw-r--r--theories/Num/NeqProps.v12
-rw-r--r--theories/Reals/R_Ifp.v34
-rw-r--r--theories/Reals/R_sqr.v114
-rw-r--r--theories/Reals/Ranalysis.v170
-rw-r--r--theories/Reals/Rbase.v424
-rw-r--r--theories/Reals/Rbasic_fun.v68
-rw-r--r--theories/Reals/Rderiv.v22
-rw-r--r--theories/Reals/Rfunctions.v66
-rw-r--r--theories/Reals/Rgeom.v24
-rw-r--r--theories/Reals/Rlimit.v58
-rw-r--r--theories/Reals/Rseries.v16
-rw-r--r--theories/Reals/Rsigma.v14
-rw-r--r--theories/Reals/Rtrigo.v268
-rw-r--r--theories/Reals/Rtrigo_fun.v2
-rwxr-xr-xtheories/Relations/Operators_Properties.v12
-rwxr-xr-xtheories/Relations/Relations.v4
-rw-r--r--theories/Setoids/Setoid.v10
-rwxr-xr-xtheories/Sets/Multiset.v4
-rw-r--r--theories/Sets/Uniset.v4
-rw-r--r--theories/Sorting/Permutation.v4
-rw-r--r--theories/Sorting/Sorting.v4
-rw-r--r--theories/Wellfounded/Disjoint_Union.v2
-rw-r--r--theories/Wellfounded/Inclusion.v4
-rw-r--r--theories/Wellfounded/Inverse_Image.v6
-rw-r--r--theories/Wellfounded/Lexicographic_Product.v14
-rw-r--r--theories/Wellfounded/Union.v6
-rw-r--r--theories/ZArith/Wf_Z.v20
-rw-r--r--theories/ZArith/ZArith_dec.v20
-rw-r--r--theories/ZArith/Zcomplements.v44
-rw-r--r--theories/ZArith/Zdiv.v10
-rw-r--r--theories/ZArith/Zlogarithm.v26
-rw-r--r--theories/ZArith/Zmisc.v80
-rw-r--r--theories/ZArith/Zpower.v42
-rw-r--r--theories/ZArith/Zsyntax.v2
-rw-r--r--theories/ZArith/auxiliary.v180
-rw-r--r--theories/ZArith/fast_integer.v194
-rw-r--r--theories/ZArith/zarith_aux.v228
62 files changed, 1318 insertions, 1318 deletions
diff --git a/theories/Arith/Compare_dec.v b/theories/Arith/Compare_dec.v
index f9e93b9bf..d729253b3 100755
--- a/theories/Arith/Compare_dec.v
+++ b/theories/Arith/Compare_dec.v
@@ -15,7 +15,7 @@ Require Decidable.
Theorem zerop : (n:nat){n=O}+{lt O n}.
NewDestruct n; Auto with arith.
-Save.
+Qed.
Theorem lt_eq_lt_dec : (n,m:nat){(lt n m)}+{n=m}+{(lt m n)}.
Proof.
@@ -61,42 +61,42 @@ Theorem dec_le:(x,y:nat)(decidable (le x y)).
Intros x y; Unfold decidable ; Elim (le_gt_dec x y); [
Auto with arith
| Intro; Right; Apply gt_not_le; Assumption].
-Save.
+Qed.
Theorem dec_lt:(x,y:nat)(decidable (lt x y)).
Intros x y; Unfold lt; Apply dec_le.
-Save.
+Qed.
Theorem dec_gt:(x,y:nat)(decidable (gt x y)).
Intros x y; Unfold gt; Apply dec_lt.
-Save.
+Qed.
Theorem dec_ge:(x,y:nat)(decidable (ge x y)).
Intros x y; Unfold ge; Apply dec_le.
-Save.
+Qed.
Theorem not_eq : (x,y:nat) ~ x=y -> (lt x y) \/ (lt y x).
Intros x y H; Elim (lt_eq_lt_dec x y); [
Intros H1; Elim H1; [ Auto with arith | Intros H2; Absurd x=y; Assumption]
| Auto with arith].
-Save.
+Qed.
Theorem not_le : (x,y:nat) ~(le x y) -> (gt x y).
Intros x y H; Elim (le_gt_dec x y);
[ Intros H1; Absurd (le x y); Assumption | Trivial with arith ].
-Save.
+Qed.
Theorem not_gt : (x,y:nat) ~(gt x y) -> (le x y).
Intros x y H; Elim (le_gt_dec x y);
[ Trivial with arith | Intros H1; Absurd (gt x y); Assumption].
-Save.
+Qed.
Theorem not_ge : (x,y:nat) ~(ge x y) -> (lt x y).
Intros x y H; Exact (not_le y x H).
-Save.
+Qed.
Theorem not_lt : (x,y:nat) ~(lt x y) -> (ge x y).
Intros x y H; Exact (not_gt y x H).
-Save.
+Qed.
diff --git a/theories/Arith/Div.v b/theories/Arith/Div.v
index 718a51613..2b7cfac14 100755
--- a/theories/Arith/Div.v
+++ b/theories/Arith/Div.v
@@ -37,7 +37,7 @@ Simpl.
Elim plus_n_O; Auto with arith.
Apply le_antisym; Auto with arith.
Elim plus_n_Sm; Auto with arith.
-Save.
+Qed.
Theorem div2 : (b:nat)(gt b O)->(a:nat)(diveucl a b).
Realizer Fix div1 {div1/2: nat->nat->diveucl :=
@@ -56,4 +56,4 @@ Simpl.
Elim plus_n_O; Auto with arith.
Apply le_antisym; Auto with arith.
Elim plus_n_Sm; Auto with arith.
-Save.
+Qed.
diff --git a/theories/Arith/Euclid.v b/theories/Arith/Euclid.v
index c6db2917b..5a2dd1a84 100644
--- a/theories/Arith/Euclid.v
+++ b/theories/Arith/Euclid.v
@@ -28,7 +28,7 @@ Elim plus_assoc_l.
Elim e; Auto with arith.
Intros gtbn.
Apply divex with O n; Simpl; Auto with arith.
-Save.
+Qed.
Lemma quotient : (b:nat)(gt b O)->
(a:nat){q:nat|(EX r:nat | (a=(plus (mult q b) r))/\(gt b r))}.
@@ -43,7 +43,7 @@ Elim plus_assoc_l.
Elim H1; Auto with arith.
Intros gtbn.
Exists O; Exists n; Simpl; Auto with arith.
-Save.
+Qed.
Lemma modulo : (b:nat)(gt b O)->
(a:nat){r:nat|(EX q:nat | (a=(plus (mult q b) r))/\(gt b r))}.
@@ -58,4 +58,4 @@ Elim plus_assoc_l.
Elim H1; Auto with arith.
Intros gtbn.
Exists n; Exists O; Simpl; Auto with arith.
-Save.
+Qed.
diff --git a/theories/Arith/Even.v b/theories/Arith/Even.v
index be935d88c..074e0a03d 100644
--- a/theories/Arith/Even.v
+++ b/theories/Arith/Even.v
@@ -26,21 +26,21 @@ Proof.
NewInduction n.
Auto with arith.
Elim IHn; Auto with arith.
-Save.
+Qed.
Lemma even_odd_dec : (n:nat) { (even n) }+{ (odd n) }.
Proof.
NewInduction n.
Auto with arith.
Elim IHn; Auto with arith.
-Save.
+Qed.
Lemma not_even_and_odd : (n:nat) (even n) -> (odd n) -> False.
Proof.
NewInduction n.
Intros. Inversion H0.
Intros. Inversion H. Inversion H0. Auto with arith.
-Save.
+Qed.
Lemma even_plus_aux:
(n,m:nat)
diff --git a/theories/Arith/Lt.v b/theories/Arith/Lt.v
index e6a448a8e..711e065da 100755
--- a/theories/Arith/Lt.v
+++ b/theories/Arith/Lt.v
@@ -61,7 +61,7 @@ Hints Immediate lt_pred : arith v62.
Lemma lt_pred_n_n : (n:nat)(lt O n)->(lt (pred n) n).
NewDestruct 1; Simpl; Auto with arith.
-Save.
+Qed.
Hints Resolve lt_pred_n_n : arith v62.
(** Relationship between [le] and [lt] *)
diff --git a/theories/Arith/Minus.v b/theories/Arith/Minus.v
index 417629621..0f435a560 100755
--- a/theories/Arith/Minus.v
+++ b/theories/Arith/Minus.v
@@ -50,7 +50,7 @@ Hints Immediate plus_minus : arith v62.
Lemma minus_plus : (n,m:nat)(minus (plus n m) n)=m.
Symmetry; Auto with arith.
-Save.
+Qed.
Hints Resolve minus_plus : arith v62.
Lemma le_plus_minus : (n,m:nat)(le n m)->(m=(plus n (minus m n))).
@@ -93,7 +93,7 @@ Hints Immediate lt_O_minus_lt : arith v62.
Theorem pred_of_minus : (x:nat)(pred x)=(minus x (S O)).
NewInduction x; Auto with arith.
-Save.
+Qed.
Theorem inj_minus_aux: (x,y:nat) ~(le y x) -> (minus x y) = O.
@@ -102,4 +102,4 @@ Intros y x; Pattern y x ; Apply nat_double_ind; [
| Intros n H; Absurd (le O (S n)); [ Assumption | Apply le_O_n]
| Simpl; Intros n m H1 H2; Apply H1;
Unfold not ; Intros H3; Apply H2; Apply le_n_S; Assumption].
-Save.
+Qed.
diff --git a/theories/Arith/Mult.v b/theories/Arith/Mult.v
index c7e6a4f1d..ac16d4cb9 100755
--- a/theories/Arith/Mult.v
+++ b/theories/Arith/Mult.v
@@ -51,24 +51,24 @@ Hints Resolve mult_assoc_r : arith v62.
Lemma mult_assoc_l : (n,m,p:nat)(mult n (mult m p)) = (mult (mult n m) p).
Auto with arith.
-Save.
+Qed.
Hints Resolve mult_assoc_l : arith v62.
Lemma mult_1_n : (n:nat)(mult (S O) n)=n.
Simpl; Auto with arith.
-Save.
+Qed.
Hints Resolve mult_1_n : arith v62.
Lemma mult_sym : (n,m:nat)(mult n m)=(mult m n).
Intros; Elim n; Intros; Simpl; Auto with arith.
Elim mult_n_Sm.
Elim H; Apply plus_sym.
-Save.
+Qed.
Hints Resolve mult_sym : arith v62.
Lemma mult_n_1 : (n:nat)(mult n (S O))=n.
Intro; Elim mult_sym; Auto with arith.
-Save.
+Qed.
Hints Resolve mult_n_1 : arith v62.
diff --git a/theories/Arith/Wf_nat.v b/theories/Arith/Wf_nat.v
index 16aa58afa..e8e91670b 100755
--- a/theories/Arith/Wf_nat.v
+++ b/theories/Arith/Wf_nat.v
@@ -100,7 +100,7 @@ Apply Acc_intro.
Intros b ltfafb.
Apply IHn.
Apply lt_le_trans with (f a); Auto with arith.
-Save.
+Qed.
End Well_founded_Nat.
@@ -120,7 +120,7 @@ Proof [p:nat][P:nat->Set][F:(n:nat)((m:nat)(lt m n)->(P m))->(P n)]
Lemma lt_wf_ind : (p:nat)(P:nat->Prop)
((n:nat)((m:nat)(lt m n)->(P m))->(P n)) -> (P p).
Intros; Elim (lt_wf p); Auto with arith.
-Save.
+Qed.
Lemma gt_wf_rec : (p:nat)(P:nat->Set)
((n:nat)((m:nat)(gt n m)->(P m))->(P n)) -> (P p).
@@ -136,7 +136,7 @@ Lemma lt_wf_double_rec :
-> (p,q:nat)(P p q).
Intros P Hrec p; Pattern p; Apply lt_wf_rec.
Intros; Pattern q; Apply lt_wf_rec; Auto with arith.
-Save.
+Qed.
Lemma lt_wf_double_ind :
(P:nat->nat->Prop)
@@ -144,7 +144,7 @@ Lemma lt_wf_double_ind :
-> (p,q:nat)(P p q).
Intros P Hrec p; Pattern p; Apply lt_wf_ind.
Intros; Pattern q; Apply lt_wf_ind; Auto with arith.
-Save.
+Qed.
Hints Resolve lt_wf : arith.
Hints Resolve well_founded_lt_compat : arith.
diff --git a/theories/Bool/Bool.v b/theories/Bool/Bool.v
index 1942ca6b3..cfd6f656a 100755
--- a/theories/Bool/Bool.v
+++ b/theories/Bool/Bool.v
@@ -23,12 +23,12 @@ Hints Unfold Is_true : bool.
Lemma Is_true_eq_left : (x:bool)x=true -> (Is_true x).
Proof.
Intros; Rewrite H; Auto with bool.
-Save.
+Qed.
Lemma Is_true_eq_right : (x:bool)true=x -> (Is_true x).
Proof.
Intros; Rewrite <- H; Auto with bool.
-Save.
+Qed.
Hints Immediate Is_true_eq_right Is_true_eq_left : bool.
@@ -40,7 +40,7 @@ Lemma diff_true_false : ~true=false.
Goal.
Unfold not; Intro contr; Change (Is_true false).
Elim contr; Simpl; Trivial with bool.
-Save.
+Qed.
Hints Resolve diff_true_false : bool v62.
Lemma diff_false_true : ~false=true.
@@ -48,12 +48,12 @@ Goal.
Red; Intros H; Apply diff_true_false.
Symmetry.
Assumption.
-Save.
+Qed.
Hints Resolve diff_false_true : bool v62.
Lemma eq_true_false_abs : (b:bool)(b=true)->(b=false)->False.
Intros b H; Rewrite H; Auto with bool.
-Save.
+Qed.
Hints Resolve eq_true_false_abs : bool.
Lemma not_true_is_false : (b:bool)~b=true->b=false.
@@ -63,7 +63,7 @@ Red in H; Elim H.
Reflexivity.
Intros abs.
Reflexivity.
-Save.
+Qed.
Lemma not_false_is_true : (b:bool)~b=false->b=true.
NewDestruct b.
@@ -71,7 +71,7 @@ Intros.
Reflexivity.
Intro H; Red in H; Elim H.
Reflexivity.
-Save.
+Qed.
(**********************)
(** Order on booleans *)
@@ -99,19 +99,19 @@ Definition eqb : bool->bool->bool :=
Lemma eqb_refl : (x:bool)(Is_true (eqb x x)).
NewDestruct x; Simpl; Auto with bool.
-Save.
+Qed.
Lemma eqb_eq : (x,y:bool)(Is_true (eqb x y))->x=y.
NewDestruct x; NewDestruct y; Simpl; Tauto.
-Save.
+Qed.
Lemma Is_true_eq_true : (x:bool) (Is_true x) -> x=true.
NewDestruct x; Simpl; Tauto.
-Save.
+Qed.
Lemma Is_true_eq_true2 : (x:bool) x=true -> (Is_true x).
NewDestruct x; Simpl; Auto with bool.
-Save.
+Qed.
Lemma eqb_subst :
(P:bool->Prop)(b1,b2:bool)(eqb b1 b2)=true->(P b1)->(P b2).
@@ -127,19 +127,19 @@ Case b2.
Intros H.
Inversion_clear H.
Trivial with bool.
-Save.
+Qed.
Lemma eqb_reflx : (b:bool)(eqb b b)=true.
Intro b.
Case b.
Trivial with bool.
Trivial with bool.
-Save.
+Qed.
Lemma eqb_prop : (a,b:bool)(eqb a b)=true -> a=b.
NewDestruct a; NewDestruct b; Simpl; Intro;
Discriminate H Orelse Reflexivity.
-Save.
+Qed.
(************************)
@@ -180,12 +180,12 @@ Definition negb := [b:bool]Cases b of
Lemma negb_intro : (b:bool)b=(negb (negb b)).
Goal.
Induction b; Reflexivity.
-Save.
+Qed.
Lemma negb_elim : (b:bool)(negb (negb b))=b.
Goal.
Induction b; Reflexivity.
-Save.
+Qed.
Lemma negb_orb : (b1,b2:bool)
(negb (orb b1 b2)) = (andb (negb b1) (negb b2)).
@@ -202,24 +202,24 @@ Qed.
Lemma negb_sym : (b,b':bool)(b'=(negb b))->(b=(negb b')).
Goal.
Induction b; Induction b'; Intros; Simpl; Trivial with bool.
-Save.
+Qed.
Lemma no_fixpoint_negb : (b:bool)~(negb b)=b.
Goal.
Induction b; Simpl; Unfold not; Intro; Apply diff_true_false; Auto with bool.
-Save.
+Qed.
Lemma eqb_negb1 : (b:bool)(eqb (negb b) b)=false.
NewDestruct b.
Trivial with bool.
Trivial with bool.
-Save.
+Qed.
Lemma eqb_negb2 : (b:bool)(eqb b (negb b))=false.
NewDestruct b.
Trivial with bool.
Trivial with bool.
-Save.
+Qed.
Lemma if_negb : (A:Set) (b:bool) (x,y:A) (if (negb b) then x else y)=(if b then y else x).
@@ -235,12 +235,12 @@ Qed.
Lemma orb_prop :
(a,b:bool)(orb a b)=true -> (a = true)\/(b = true).
Induction a; Induction b; Simpl; Try (Intro H;Discriminate H); Auto with bool.
-Save.
+Qed.
Lemma orb_prop2 :
(a,b:bool)(Is_true (orb a b)) -> (Is_true a)\/(Is_true b).
Induction a; Induction b; Simpl; Try (Intro H;Discriminate H); Auto with bool.
-Save.
+Qed.
Lemma orb_true_intro
: (b1,b2:bool)(b1=true)\/(b2=true)->(orb b1 b2)=true.
@@ -248,37 +248,37 @@ NewDestruct b1; Auto with bool.
NewDestruct 1; Intros.
Elim diff_true_false; Auto with bool.
Rewrite H; Trivial with bool.
-Save.
+Qed.
Hints Resolve orb_true_intro : bool v62.
Lemma orb_b_true : (b:bool)(orb b true)=true.
Auto with bool.
-Save.
+Qed.
Hints Resolve orb_b_true : bool v62.
Lemma orb_true_b : (b:bool)(orb true b)=true.
Trivial with bool.
-Save.
+Qed.
Lemma orb_true_elim : (b1,b2:bool)(orb b1 b2)=true -> {b1=true}+{b2=true}.
NewDestruct b1; Simpl; Auto with bool.
-Save.
+Qed.
Lemma orb_false_intro
: (b1,b2:bool)(b1=false)->(b2=false)->(orb b1 b2)=false.
Intros b1 b2 H1 H2; Rewrite H1; Rewrite H2; Trivial with bool.
-Save.
+Qed.
Hints Resolve orb_false_intro : bool v62.
Lemma orb_b_false : (b:bool)(orb b false)=b.
Proof.
NewDestruct b; Trivial with bool.
-Save.
+Qed.
Hints Resolve orb_b_false : bool v62.
Lemma orb_false_b : (b:bool)(orb false b)=b.
Proof.
NewDestruct b; Trivial with bool.
-Save.
+Qed.
Hints Resolve orb_false_b : bool v62.
Lemma orb_false_elim :
@@ -289,23 +289,23 @@ Proof.
NewDestruct b2.
Intros; Elim diff_true_false; Auto with bool.
Auto with bool.
-Save.
+Qed.
Lemma orb_neg_b :
(b:bool)(orb b (negb b))=true.
Proof.
NewDestruct b; Reflexivity.
-Save.
+Qed.
Hints Resolve orb_neg_b : bool v62.
Lemma orb_sym : (b1,b2:bool)(orb b1 b2)=(orb b2 b1).
NewDestruct b1; NewDestruct b2; Reflexivity.
-Save.
+Qed.
Lemma orb_assoc : (b1,b2,b3:bool)(orb b1 (orb b2 b3))=(orb (orb b1 b2) b3).
Proof.
NewDestruct b1; NewDestruct b2; NewDestruct b3; Reflexivity.
-Save.
+Qed.
Hints Resolve orb_sym orb_assoc orb_b_false orb_false_b : bool v62.
@@ -319,7 +319,7 @@ Lemma andb_prop :
Proof.
Induction a; Induction b; Simpl; Try (Intro H;Discriminate H);
Auto with bool.
-Save.
+Qed.
Hints Resolve andb_prop : bool v62.
Definition andb_true_eq : (a,b:bool) true = (andb a b) -> true = a /\ true = b.
@@ -332,67 +332,67 @@ Lemma andb_prop2 :
Proof.
Induction a; Induction b; Simpl; Try (Intro H;Discriminate H);
Auto with bool.
-Save.
+Qed.
Hints Resolve andb_prop2 : bool v62.
Lemma andb_true_intro : (b1,b2:bool)(b1=true)/\(b2=true)->(andb b1 b2)=true.
Proof.
NewDestruct b1; NewDestruct b2; Simpl; Tauto Orelse Auto with bool.
-Save.
+Qed.
Hints Resolve andb_true_intro : bool v62.
Lemma andb_true_intro2 :
(b1,b2:bool)(Is_true b1)->(Is_true b2)->(Is_true (andb b1 b2)).
Proof.
NewDestruct b1; NewDestruct b2; Simpl; Tauto.
-Save.
+Qed.
Hints Resolve andb_true_intro2 : bool v62.
Lemma andb_false_intro1
: (b1,b2:bool)(b1=false)->(andb b1 b2)=false.
NewDestruct b1; NewDestruct b2; Simpl; Tauto Orelse Auto with bool.
-Save.
+Qed.
Lemma andb_false_intro2
: (b1,b2:bool)(b2=false)->(andb b1 b2)=false.
NewDestruct b1; NewDestruct b2; Simpl; Tauto Orelse Auto with bool.
-Save.
+Qed.
Lemma andb_b_false : (b:bool)(andb b false)=false.
NewDestruct b; Auto with bool.
-Save.
+Qed.
Lemma andb_false_b : (b:bool)(andb false b)=false.
Trivial with bool.
-Save.
+Qed.
Lemma andb_b_true : (b:bool)(andb b true)=b.
NewDestruct b; Auto with bool.
-Save.
+Qed.
Lemma andb_true_b : (b:bool)(andb true b)=b.
Trivial with bool.
-Save.
+Qed.
Lemma andb_false_elim :
(b1,b2:bool)(andb b1 b2)=false -> {b1=false}+{b2=false}.
NewDestruct b1; Simpl; Auto with bool.
-Save.
+Qed.
Hints Resolve andb_false_elim : bool v62.
Lemma andb_neg_b :
(b:bool)(andb b (negb b))=false.
NewDestruct b; Reflexivity.
-Save.
+Qed.
Hints Resolve andb_neg_b : bool v62.
Lemma andb_sym : (b1,b2:bool)(andb b1 b2)=(andb b2 b1).
NewDestruct b1; NewDestruct b2; Reflexivity.
-Save.
+Qed.
Lemma andb_assoc : (b1,b2,b3:bool)(andb b1 (andb b2 b3))=(andb (andb b1 b2) b3).
NewDestruct b1; NewDestruct b2; NewDestruct b3; Reflexivity.
-Save.
+Qed.
Hints Resolve andb_sym andb_assoc : bool v62.
@@ -469,22 +469,22 @@ Qed.
Lemma demorgan1 : (b1,b2,b3:bool)
(andb b1 (orb b2 b3)) = (orb (andb b1 b2) (andb b1 b3)).
NewDestruct b1; NewDestruct b2; NewDestruct b3; Reflexivity.
-Save.
+Qed.
Lemma demorgan2 : (b1,b2,b3:bool)
(andb (orb b1 b2) b3) = (orb (andb b1 b3) (andb b2 b3)).
NewDestruct b1; NewDestruct b2; NewDestruct b3; Reflexivity.
-Save.
+Qed.
Lemma demorgan3 : (b1,b2,b3:bool)
(orb b1 (andb b2 b3)) = (andb (orb b1 b2) (orb b1 b3)).
NewDestruct b1; NewDestruct b2; NewDestruct b3; Reflexivity.
-Save.
+Qed.
Lemma demorgan4 : (b1,b2,b3:bool)
(orb (andb b1 b2) b3) = (andb (orb b1 b3) (orb b2 b3)).
NewDestruct b1; NewDestruct b2; NewDestruct b3; Reflexivity.
-Save.
+Qed.
Lemma absoption_andb : (b1,b2:bool)
(andb b1 (orb b1 b2)) = b1.
diff --git a/theories/Bool/DecBool.v b/theories/Bool/DecBool.v
index 8daabd479..28ef57eac 100755
--- a/theories/Bool/DecBool.v
+++ b/theories/Bool/DecBool.v
@@ -17,11 +17,11 @@ Definition ifdec : (A,B:Prop)(C:Set)({A}+{B})->C->C->C
Theorem ifdec_left : (A,B:Prop)(C:Set)(H:{A}+{B})~B->(x,y:C)(ifdec H x y)=x.
Intros; Case H; Auto.
Intro; Absurd B; Trivial.
-Save.
+Qed.
Theorem ifdec_right : (A,B:Prop)(C:Set)(H:{A}+{B})~A->(x,y:C)(ifdec H x y)=y.
Intros; Case H; Auto.
Intro; Absurd A; Trivial.
-Save.
+Qed.
Unset Implicit Arguments.
diff --git a/theories/Bool/IfProp.v b/theories/Bool/IfProp.v
index d0c089c7a..48180678f 100755
--- a/theories/Bool/IfProp.v
+++ b/theories/Bool/IfProp.v
@@ -19,31 +19,31 @@ Hints Resolve Iftrue Iffalse : bool v62.
Lemma Iftrue_inv : (A,B:Prop)(b:bool) (IfProp A B b) -> b=true -> A.
NewDestruct 1; Intros; Auto with bool.
Case diff_true_false; Auto with bool.
-Save.
+Qed.
Lemma Iffalse_inv : (A,B:Prop)(b:bool) (IfProp A B b) -> b=false -> B.
NewDestruct 1; Intros; Auto with bool.
Case diff_true_false; Trivial with bool.
-Save.
+Qed.
Lemma IfProp_true : (A,B:Prop)(IfProp A B true) -> A.
Intros.
Inversion H.
Assumption.
-Save.
+Qed.
Lemma IfProp_false : (A,B:Prop)(IfProp A B false) -> B.
Intros.
Inversion H.
Assumption.
-Save.
+Qed.
Lemma IfProp_or : (A,B:Prop)(b:bool)(IfProp A B b) -> A\/B.
NewDestruct 1; Auto with bool.
-Save.
+Qed.
Lemma IfProp_sum : (A,B:Prop)(b:bool)(IfProp A B b) -> {A}+{B}.
NewDestruct b; Intro H.
Left; Inversion H; Auto with bool.
Right; Inversion H; Auto with bool.
-Save.
+Qed.
diff --git a/theories/Bool/Sumbool.v b/theories/Bool/Sumbool.v
index 44311a127..817212909 100644
--- a/theories/Bool/Sumbool.v
+++ b/theories/Bool/Sumbool.v
@@ -18,19 +18,19 @@
Lemma sumbool_of_bool : (b:bool) {b=true}+{b=false}.
Proof.
Induction b; Auto.
-Save.
+Qed.
Hints Resolve sumbool_of_bool : bool.
Lemma bool_eq_rec : (b:bool)(P:bool->Set)
((b=true)->(P true))->((b=false)->(P false))->(P b).
Induction b; Auto.
-Save.
+Qed.
Lemma bool_eq_ind : (b:bool)(P:bool->Prop)
((b=true)->(P true))->((b=false)->(P false))->(P b).
Induction b; Auto.
-Save.
+Qed.
(*i pourquoi ce machin-la est dans BOOL et pas dans LOGIC ? Papageno i*)
@@ -47,17 +47,17 @@ Hypothesis H2 : {C}+{D}.
Lemma sumbool_and : {A/\C}+{B\/D}.
Proof.
Case H1; Case H2; Auto.
-Save.
+Qed.
Lemma sumbool_or : {A\/C}+{B/\D}.
Proof.
Case H1; Case H2; Auto.
-Save.
+Qed.
Lemma sumbool_not : {B}+{A}.
Proof.
Case H1; Auto.
-Save.
+Qed.
End connectives.
diff --git a/theories/Bool/Zerob.v b/theories/Bool/Zerob.v
index 4422a03f4..07b4c68c8 100755
--- a/theories/Bool/Zerob.v
+++ b/theories/Bool/Zerob.v
@@ -16,18 +16,18 @@ Definition zerob : nat->bool
Lemma zerob_true_intro : (n:nat)(n=O)->(zerob n)=true.
NewDestruct n; [Trivial with bool | Inversion 1].
-Save.
+Qed.
Hints Resolve zerob_true_intro : bool.
Lemma zerob_true_elim : (n:nat)(zerob n)=true->(n=O).
NewDestruct n; [Trivial with bool | Inversion 1].
-Save.
+Qed.
Lemma zerob_false_intro : (n:nat)~(n=O)->(zerob n)=false.
NewDestruct n; [NewDestruct 1; Auto with bool | Trivial with bool].
-Save.
+Qed.
Hints Resolve zerob_false_intro : bool.
Lemma zerob_false_elim : (n:nat)(zerob n)=false -> ~(n=O).
NewDestruct n; [Intro H; Inversion H | Auto with bool].
-Save.
+Qed.
diff --git a/theories/Init/Wf.v b/theories/Init/Wf.v
index 78432dcf4..745af5ef6 100755
--- a/theories/Init/Wf.v
+++ b/theories/Init/Wf.v
@@ -59,13 +59,13 @@ Chapter Well_founded.
(P:A->Type)((x:A)((y:A)(R y x)->(P y))->(P x))->(a:A)(P a).
Proof.
Intros; Apply (Acc_rect P); Auto.
- Save.
+ Qed.
Theorem well_founded_induction :
(P:A->Set)((x:A)((y:A)(R y x)->(P y))->(P x))->(a:A)(P a).
Proof.
Exact [P:A->Set](well_founded_induction_type P).
- Save.
+ Qed.
Theorem well_founded_ind :
(P:A->Prop)((x:A)((y:A)(R y x)->(P y))->(P x))->(a:A)(P a).
@@ -98,13 +98,13 @@ Lemma Fix_F_eq
: (x:A)(r:(Acc x))
(F x [y:A][p:(R y x)](Fix_F y (Acc_inv x r y p)))=(Fix_F x r).
Intros x r; Elim r using Acc_inv_dep; Auto.
-Save.
+Qed.
Lemma Fix_F_inv : (x:A)(r,s:(Acc x))(Fix_F x r)=(Fix_F x s).
Intro x; Elim (Rwf x); Intros.
Case (Fix_F_eq x0 r); Case (Fix_F_eq x0 s); Intros.
Apply F_ext; Auto.
-Save.
+Qed.
Lemma fix_eq : (x:A)(fix x)=(F x [y:A][p:(R y x)](fix y)).
@@ -112,7 +112,7 @@ Intro; Unfold fix.
Case (Fix_F_eq x).
Apply F_ext; Intros.
Apply Fix_F_inv.
-Save.
+Qed.
End FixPoint.
diff --git a/theories/Lists/ListSet.v b/theories/Lists/ListSet.v
index 10ee6226e..a72adbb21 100644
--- a/theories/Lists/ListSet.v
+++ b/theories/Lists/ListSet.v
@@ -96,7 +96,7 @@ Section first_definitions.
Elim Ha0.
Auto with datatypes.
Right; Simpl; Unfold not; Intros [Hc1 | Hc2 ]; Auto with datatypes.
- Save.
+ Qed.
Lemma set_mem_ind :
(B:Set)(P:B->Prop)(y,z:B)(a:A)(x:set)
@@ -108,7 +108,7 @@ Section first_definitions.
Induction x; Simpl; Intros.
Assumption.
Elim (Aeq_dec a a0); Auto with datatypes.
- Save.
+ Qed.
Lemma set_mem_ind2 :
(B:Set)(P:B->Prop)(y,z:B)(a:A)(x:set)
@@ -123,7 +123,7 @@ Section first_definitions.
Intro; Apply H; Intros; Auto.
Apply H1; Red; Intro.
Case H3; Auto.
- Save.
+ Qed.
Lemma set_mem_correct1 :
@@ -132,7 +132,7 @@ Section first_definitions.
Induction x; Simpl.
Discriminate.
Intros a0 l; Elim (Aeq_dec a a0); Auto with datatypes.
- Save.
+ Qed.
Lemma set_mem_correct2 :
(a:A)(x:set)(set_In a x) -> (set_mem a x)=true.
@@ -143,7 +143,7 @@ Section first_definitions.
Intros H1 H2 [H3 | H4].
Absurd a0=a; Auto with datatypes.
Auto with datatypes.
- Save.
+ Qed.
Lemma set_mem_complete1 :
(a:A)(x:set)(set_mem a x)=false -> ~(set_In a x).
@@ -153,7 +153,7 @@ Section first_definitions.
Intros a0 l; Elim (Aeq_dec a a0).
Intros; Discriminate H0.
Unfold not; Intros; Elim H1; Auto with datatypes.
- Save.
+ Qed.
Lemma set_mem_complete2 :
(a:A)(x:set)~(set_In a x) -> (set_mem a x)=false.
@@ -163,7 +163,7 @@ Section first_definitions.
Intros a0 l; Elim (Aeq_dec a a0).
Intros; Elim H0; Auto with datatypes.
Tauto.
- Save.
+ Qed.
Lemma set_add_intro1 : (a,b:A)(x:set)
(set_In a x) -> (set_In a (set_add b x)).
@@ -174,7 +174,7 @@ Section first_definitions.
Intros a0 l H [ Ha0a | Hal ].
Elim (Aeq_dec b a0); Left; Assumption.
Elim (Aeq_dec b a0); Right; [ Assumption | Auto with datatypes ].
- Save.
+ Qed.
Lemma set_add_intro2 : (a,b:A)(x:set)
a=b -> (set_In a (set_add b x)).
@@ -186,7 +186,7 @@ Section first_definitions.
Elim (Aeq_dec b a0);
[ Rewrite Hab; Intro Hba0; Rewrite Hba0; Simpl; Auto with datatypes
| Auto with datatypes ].
- Save.
+ Qed.
Hints Resolve set_add_intro1 set_add_intro2.
@@ -195,7 +195,7 @@ Section first_definitions.
Proof.
Intros a b x [H1 | H2] ; Auto with datatypes.
- Save.
+ Qed.
Lemma set_add_elim : (a,b:A)(x:set)
(set_In a (set_add b x)) -> a=b\/(set_In a x).
@@ -211,13 +211,13 @@ Section first_definitions.
Trivial with datatypes.
Tauto.
Tauto.
- Save.
+ Qed.
Lemma set_add_elim2 : (a,b:A)(x:set)
(set_In a (set_add b x)) -> ~(a=b) -> (set_In a x).
Intros a b x H; Case (set_add_elim H); Intros; Trivial.
Case H1; Trivial.
- Save.
+ Qed.
Hints Resolve set_add_intro set_add_elim set_add_elim2.
@@ -226,14 +226,14 @@ Section first_definitions.
Induction x; Simpl.
Discriminate.
Intros; Elim (Aeq_dec a a0); Intros; Discriminate.
- Save.
+ Qed.
Lemma set_union_intro1 : (a:A)(x,y:set)
(set_In a x) -> (set_In a (set_union x y)).
Proof.
Induction y; Simpl; Auto with datatypes.
- Save.
+ Qed.
Lemma set_union_intro2 : (a:A)(x,y:set)
(set_In a y) -> (set_In a (set_union x y)).
@@ -241,7 +241,7 @@ Section first_definitions.
Induction y; Simpl.
Tauto.
Intros; Elim H0; Auto with datatypes.
- Save.
+ Qed.
Hints Resolve set_union_intro2 set_union_intro1.
@@ -249,7 +249,7 @@ Section first_definitions.
(set_In a x)\/(set_In a y) -> (set_In a (set_union x y)).
Proof.
Intros; Elim H; Auto with datatypes.
- Save.
+ Qed.
Lemma set_union_elim : (a:A)(x,y:set)
(set_In a (set_union x y)) -> (set_In a x)\/(set_In a y).
@@ -261,16 +261,16 @@ Section first_definitions.
Intros [H1 | H1].
Auto with datatypes.
Tauto.
- Save.
+ Qed.
Lemma set_union_emptyL : (a:A)(x:set)(set_In a (set_union empty_set x)) -> (set_In a x).
Intros a x H; Case (set_union_elim H); Auto Orelse Contradiction.
- Save.
+ Qed.
Lemma set_union_emptyR : (a:A)(x:set)(set_In a (set_union x empty_set)) -> (set_In a x).
Intros a x H; Case (set_union_elim H); Auto Orelse Contradiction.
- Save.
+ Qed.
Lemma set_inter_intro : (a:A)(x,y:set)
@@ -286,7 +286,7 @@ Section first_definitions.
Auto with datatypes.
Absurd (set_In a y); Auto with datatypes.
Elim (set_mem a0 y); [ Right; Auto with datatypes | Auto with datatypes].
- Save.
+ Qed.
Lemma set_inter_elim1 : (a:A)(x,y:set)
(set_In a (set_inter x y)) -> (set_In a x).
@@ -298,7 +298,7 @@ Section first_definitions.
Elim (set_mem a0 y); Simpl; Intros.
Elim H0; EAuto with datatypes.
EAuto with datatypes.
- Save.
+ Qed.
Lemma set_inter_elim2 : (a:A)(x,y:set)
(set_In a (set_inter x y)) -> (set_In a y).
@@ -310,7 +310,7 @@ Section first_definitions.
Elim (set_mem a0 y); Simpl; Intros.
Elim H0; [ Intro Hr; Rewrite <- Hr; EAuto with datatypes | EAuto with datatypes ] .
EAuto with datatypes.
- Save.
+ Qed.
Hints Resolve set_inter_elim1 set_inter_elim2.
@@ -318,7 +318,7 @@ Section first_definitions.
(set_In a (set_inter x y)) -> (set_In a x)/\(set_In a y).
Proof.
EAuto with datatypes.
- Save.
+ Qed.
Lemma set_diff_intro : (a:A)(x,y:set)
(set_In a x) -> ~(set_In a y) -> (set_In a (set_diff x y)).
@@ -329,7 +329,7 @@ Section first_definitions.
Rewrite Ha0a; Generalize (set_mem_complete2 Hay).
Elim (set_mem a y); [ Intro Habs; Discriminate Habs | Auto with datatypes ].
Elim (set_mem a0 y); Auto with datatypes.
- Save.
+ Qed.
Lemma set_diff_elim1 : (a:A)(x,y:set)
(set_In a (set_diff x y)) -> (set_In a x).
@@ -340,7 +340,7 @@ Section first_definitions.
EAuto with datatypes.
Intro; Generalize (set_add_elim H).
Intros [H1 | H2]; EAuto with datatypes.
- Save.
+ Qed.
Lemma set_diff_elim2 : (a:A)(x,y:set)
(set_In a (set_diff x y)) -> ~(set_In a y).
@@ -350,13 +350,13 @@ Section first_definitions.
Apply set_mem_ind2; Auto.
Intros H1 H2; Case (set_add_elim H2); Intros; Auto.
Rewrite H; Trivial.
- Save.
+ Qed.
Lemma set_diff_trivial : (a:A)(x:set)~(set_In a (set_diff x x)).
Red; Intros a x H.
Apply (set_diff_elim2 H).
Apply (set_diff_elim1 H).
- Save.
+ Qed.
Hints Resolve set_diff_intro set_diff_trivial.
@@ -384,4 +384,4 @@ Section other_definitions.
End other_definitions.
-Implicit Arguments Off.
+Unset Implicit Arguments.
diff --git a/theories/Lists/Streams.v b/theories/Lists/Streams.v
index f5f15d889..d63fcac2b 100755
--- a/theories/Lists/Streams.v
+++ b/theories/Lists/Streams.v
@@ -43,7 +43,7 @@ Qed.
Lemma tl_nth_tl : (n:nat)(s:Stream)(tl (Str_nth_tl n s))=(Str_nth_tl n (tl s)).
Proof.
Induction n; Simpl; Auto.
-Save.
+Qed.
Hints Resolve tl_nth_tl : datatypes v62.
Lemma Str_nth_tl_plus
@@ -51,12 +51,12 @@ Lemma Str_nth_tl_plus
Induction n; Simpl; Intros; Auto with datatypes.
Rewrite <- H.
Rewrite tl_nth_tl; Trivial with datatypes.
-Save.
+Qed.
Lemma Str_nth_plus
: (n,m:nat)(s:Stream)(Str_nth n (Str_nth_tl m s))=(Str_nth (plus n m) s).
Intros; Unfold Str_nth; Rewrite Str_nth_tl_plus; Trivial with datatypes.
-Save.
+Qed.
(** Extensional Equality between two streams *)
diff --git a/theories/Lists/TheoryList.v b/theories/Lists/TheoryList.v
index 5a59790c0..455d6f649 100755
--- a/theories/Lists/TheoryList.v
+++ b/theories/Lists/TheoryList.v
@@ -232,7 +232,7 @@ Program_all.
Simpl; Elim n; Auto with arith.
(Elim o; Intro); [Absurd ((S p)=O); Auto with arith | Auto with arith].
*)
-Save.
+Qed.
Lemma Item : (l:(list A))(n:nat){a:A|(nth_spec l (S n) a)}+{(le (length l) n)}.
Intros l n; Case (Nth l (S n)); Intro.
@@ -240,7 +240,7 @@ Case s; Intro a; Left; Exists a; Auto.
Right; Case o; Intro.
Absurd (S n)=O; Auto.
Auto with arith.
-Save.
+Qed.
Require Minus.
Require DecBool.
@@ -263,7 +263,7 @@ Case s; Intros n H; Left; Exists n; Auto with arith.
Elim minus_Sn_m; Auto with arith.
Apply lt_le_weak; Apply lt_O_minus_lt; Apply nth_lt_O with m a; Auto with arith.
Auto.
-Save.
+Qed.
Lemma Index : (a:A)(l:(list A))
{n:nat|(fst_nth_spec l n a)}+{(AllS [b:A]~a=b l)}.
@@ -281,7 +281,7 @@ Rewrite (minus_n_O n); Trivial.
Realizer [a:A][l:(list A)](Index_p a l (S O)).
Program_all.
*)
-Save.
+Qed.
Section Find_sec.
Variable R,P : A -> Prop.
@@ -299,23 +299,23 @@ Definition InR_inv :=
Lemma InR_INV : (l:(list A))(InR l)->(InR_inv l).
Induction 1; Simpl; Auto.
-Save.
+Qed.
Lemma InR_cons_inv : (a:A)(l:(list A))(InR (cons a l))->((R a)\/(InR l)).
Intros a l H; Exact (InR_INV H).
-Save.
+Qed.
Lemma InR_or_app : (l,m:(list A))((InR l)\/(InR m))->(InR (app l m)).
Induction 1.
Induction 1; Simpl; Auto.
Intro; Elim l; Simpl; Auto.
-Save.
+Qed.
Lemma InR_app_or : (l,m:(list A))(InR (app l m))->((InR l)\/(InR m)).
Intros l m; Elim l; Simpl; Auto.
Intros b l' Hrec IAc; Elim (InR_cons_inv IAc);Auto.
Intros; Elim Hrec; Auto.
-Save.
+Qed.
Hypothesis RS_dec : (a:A){(R a)}+{(P a)}.
@@ -336,7 +336,7 @@ Auto.
Realizer find.
Program_all.
*)
-Save.
+Qed.
Variable B : Set.
Variable T : A -> B -> Prop.
@@ -370,7 +370,7 @@ Realizer try_find.
Program_all.
*)
-Save.
+Qed.
End Find_sec.
@@ -401,7 +401,7 @@ Auto.
Realizer assoc.
Program_all.
*)
-Save.
+Qed.
End Assoc_sec.
diff --git a/theories/Logic/Decidable.v b/theories/Logic/Decidable.v
index 84649e7a8..82464b3af 100644
--- a/theories/Logic/Decidable.v
+++ b/theories/Logic/Decidable.v
@@ -13,46 +13,46 @@ Definition decidable := [P:Prop] P \/ ~P.
Theorem dec_not_not : (P:Prop)(decidable P) -> (~P -> False) -> P.
Unfold decidable; Tauto.
-Save.
+Qed.
Theorem dec_True: (decidable True).
Unfold decidable; Auto.
-Save.
+Qed.
Theorem dec_False: (decidable False).
Unfold decidable not; Auto.
-Save.
+Qed.
Theorem dec_or: (A,B:Prop)(decidable A) -> (decidable B) -> (decidable (A\/B)).
Unfold decidable; Tauto.
-Save.
+Qed.
Theorem dec_and: (A,B:Prop)(decidable A) -> (decidable B) ->(decidable (A/\B)).
Unfold decidable; Tauto.
-Save.
+Qed.
Theorem dec_not: (A:Prop)(decidable A) -> (decidable ~A).
Unfold decidable; Tauto.
-Save.
+Qed.
Theorem dec_imp: (A,B:Prop)(decidable A) -> (decidable B) ->(decidable (A->B)).
Unfold decidable; Tauto.
-Save.
+Qed.
Theorem not_not : (P:Prop)(decidable P) -> (~(~P)) -> P.
-Unfold decidable; Tauto. Save.
+Unfold decidable; Tauto. Qed.
Theorem not_or : (A,B:Prop) ~(A\/B) -> ~A /\ ~B.
-Tauto. Save.
+Tauto. Qed.
Theorem not_and : (A,B:Prop) (decidable A) -> ~(A/\B) -> ~A \/ ~B.
-Unfold decidable; Tauto. Save.
+Unfold decidable; Tauto. Qed.
Theorem not_imp : (A,B:Prop) (decidable A) -> ~(A -> B) -> A /\ ~B.
Unfold decidable;Tauto.
-Save.
+Qed.
Theorem imp_simp : (A,B:Prop) (decidable A) -> (A -> B) -> ~A \/ B.
Unfold decidable; Tauto.
-Save.
+Qed.
diff --git a/theories/Logic/Eqdep_dec.v b/theories/Logic/Eqdep_dec.v
index 7daff9ba3..8f7e76d51 100644
--- a/theories/Logic/Eqdep_dec.v
+++ b/theories/Logic/Eqdep_dec.v
@@ -34,12 +34,12 @@ Set Implicit Arguments.
Lemma eq_eqT_bij: (A:Set)(x,y:A)(p:x=y)p==(eqT2eq (eq2eqT p)).
Intros.
Case p; Reflexivity.
-Save.
+Qed.
Lemma eqT_eq_bij: (A:Set)(x,y:A)(p:x==y)p==(eq2eqT (eqT2eq p)).
Intros.
Case p; Reflexivity.
-Save.
+Qed.
Section DecidableEqDep.
@@ -52,7 +52,7 @@ Section DecidableEqDep.
Remark trans_sym_eqT: (x,y:A)(u:x==y)(comp u u)==(refl_eqT ? y).
Intros.
Case u; Trivial.
-Save.
+Qed.
@@ -74,7 +74,7 @@ Case (eq_dec x y); Intros.
Reflexivity.
Case n; Trivial.
-Save.
+Qed.
Local nu_inv [y:A]: x==y->x==y := [v](comp (nu (refl_eqT ? x)) v).
@@ -84,7 +84,7 @@ Save.
Intros.
Case u; Unfold nu_inv.
Apply trans_sym_eqT.
-Save.
+Qed.
Theorem eq_proofs_unicity: (y:A)(p1,p2:x==y) p1==p2.
@@ -93,13 +93,13 @@ Elim nu_left_inv with u:=p1.
Elim nu_left_inv with u:=p2.
Elim nu_constant with y p1 p2.
Reflexivity.
-Save.
+Qed.
Theorem K_dec: (P:x==x->Prop)(P (refl_eqT ? x)) -> (p:x==x)(P p).
Intros.
Elim eq_proofs_unicity with x (refl_eqT ? x) p.
Trivial.
-Save.
+Qed.
(** The corollary *)
@@ -128,7 +128,7 @@ Case n; Trivial.
Case H.
Reflexivity.
-Save.
+Qed.
End DecidableEqDep.
@@ -146,4 +146,4 @@ Elim e; Left ; Reflexivity.
Right ; Red; Intro neq; Apply n; Elim neq; Reflexivity.
Trivial.
-Save.
+Qed.
diff --git a/theories/Logic/JMeq.v b/theories/Logic/JMeq.v
index 42f958547..a44edfbf2 100644
--- a/theories/Logic/JMeq.v
+++ b/theories/Logic/JMeq.v
@@ -19,29 +19,29 @@ Hints Resolve JMeq_refl.
Lemma JMeq_sym : (A,B:Set)(x:A)(y:B)(JMeq x y)->(JMeq y x).
NewDestruct 1; Trivial.
-Save.
+Qed.
Hints Immediate JMeq_sym.
Lemma JMeq_trans : (A,B,C:Set)(x:A)(y:B)(z:C)
(JMeq x y)->(JMeq y z)->(JMeq x z).
NewDestruct 1; Trivial.
-Save.
+Qed.
Axiom JMeq_eq : (A:Set)(x,y:A)(JMeq x y)->(x=y).
Lemma JMeq_eq_ind : (A:Set)(x,y:A)(P:A->Prop)(P x)->(JMeq x y)->(P y).
Intros A x y P H H'; Case JMeq_eq with 1:=H'; Trivial.
-Save.
+Qed.
Lemma JMeq_eq_rec : (A:Set)(x,y:A)(P:A->Set)(P x)->(JMeq x y)->(P y).
Intros A x y P H H'; Case JMeq_eq with 1:=H'; Trivial.
-Save.
+Qed.
Lemma JMeq_eq_ind_r : (A:Set)(x,y:A)(P:A->Prop)(P y)->(JMeq x y)->(P x).
Intros A x y P H H'; Case JMeq_eq with 1:=(JMeq_sym H'); Trivial.
-Save.
+Qed.
Lemma JMeq_eq_rec_r : (A:Set)(x,y:A)(P:A->Set)(P y)->(JMeq x y)->(P x).
Intros A x y P H H'; Case JMeq_eq with 1:=(JMeq_sym H'); Trivial.
-Save.
+Qed.
diff --git a/theories/Num/AddProps.v b/theories/Num/AddProps.v
index 739ead5e0..cbd8d9e4e 100644
--- a/theories/Num/AddProps.v
+++ b/theories/Num/AddProps.v
@@ -14,44 +14,44 @@ Require Export EqAxioms.
(** Properties of Addition *)
Lemma add_x_0 : (x:N)(x+zero)=x.
EAuto 3 with num.
-Save.
+Qed.
Hints Resolve add_x_0 : num.
Lemma add_x_Sy : (x,y:N)(x+(S y))=(S (x+y)).
Intros x y; Apply eq_trans with (S y)+x; EAuto with num.
-Save.
+Qed.
Hints Resolve add_x_Sy : num.
Lemma add_x_Sy_swap : (x,y:N)(x+(S y))=((S x)+y).
EAuto with num.
-Save.
+Qed.
Hints Resolve add_x_Sy_swap : num.
Lemma add_Sx_y_swap : (x,y:N)((S x)+y)=(x+(S y)).
Auto with num.
-Save.
+Qed.
Hints Resolve add_Sx_y_swap : num.
Lemma add_assoc_r : (x,y,z:N)(x+(y+z))=((x+y)+z).
Auto with num.
-Save.
+Qed.
Hints Resolve add_assoc_r : num.
Lemma add_x_y_z_perm : (x,y,z:N)((x+y)+z)=(y+(x+z)).
EAuto with num.
-Save.
+Qed.
Hints Resolve add_x_y_z_perm : num.
Lemma add_x_one_S : (x:N)(x+one)=(S x).
Intros; Apply eq_trans with (x+(S zero)); EAuto with num.
-Save.
+Qed.
Hints Resolve add_x_one_S : num.
Lemma add_one_x_S : (x:N)(one+x)=(S x).
Intros; Apply eq_trans with (x+one); Auto with num.
-Save.
+Qed.
Hints Resolve add_one_x_S : num.
diff --git a/theories/Num/DiscrProps.v b/theories/Num/DiscrProps.v
index fd578ad17..fe787589a 100644
--- a/theories/Num/DiscrProps.v
+++ b/theories/Num/DiscrProps.v
@@ -15,5 +15,5 @@ Require Export LtProps.
Lemma lt_le_Sx_y : (x,y:N)(x<y) -> ((S x)<=y).
EAuto with num.
-Save.
+Qed.
Hints Resolve lt_le_Sx_y : num. \ No newline at end of file
diff --git a/theories/Num/LeProps.v b/theories/Num/LeProps.v
index bf7af0d66..9703ec77f 100644
--- a/theories/Num/LeProps.v
+++ b/theories/Num/LeProps.v
@@ -13,18 +13,18 @@ Require Export LeAxioms.
Lemma lt_le : (x,y:N)(x<y)->(x<=y).
Auto with num.
-Save.
+Qed.
Lemma eq_le : (x,y:N)(x=y)->(x<=y).
Auto with num.
-Save.
+Qed.
(** compatibility with equality *)
Lemma le_eq_compat : (x1,x2,y1,y2:N)(x1=y1)->(x2=y2)->(x1<=x2)->(y1<=y2).
Intros x1 x2 y1 y2 eq1 eq2 le1; Case le_lt_or_eq with 1:=le1; Intro.
EAuto with num.
Apply eq_le; Apply eq_trans with x1; EAuto with num.
-Save.
+Qed.
Hints Resolve le_eq_compat : num.
(** Transitivity *)
@@ -33,31 +33,31 @@ Intros x y z le1 le2.
Case le_lt_or_eq with 1:=le1; Intro.
Case le_lt_or_eq with 1:=le2; EAuto with num.
EAuto with num.
-Save.
+Qed.
Hints Resolve le_trans : num.
(** compatibility with equality, addition and successor *)
Lemma le_add_compat_l : (x,y,z:N)(x<=y)->((x+z)<=(y+z)).
Intros x y z le1.
Case le_lt_or_eq with 1:=le1; EAuto with num.
-Save.
+Qed.
Hints Resolve le_add_compat_l : num.
Lemma le_add_compat_r : (x,y,z:N)(x<=y)->((z+x)<=(z+y)).
Intros x y z H; Apply le_eq_compat with (x+z) (y+z); Auto with num.
-Save.
+Qed.
Hints Resolve le_add_compat_r : num.
Lemma le_add_compat : (x1,x2,y1,y2:N)(x1<=x2)->(y1<=y2)->((x1+y1)<=(x2+y2)).
Intros; Apply le_trans with (x1+y2); Auto with num.
-Save.
+Qed.
Hints Immediate le_add_compat : num.
(* compatibility with successor *)
Lemma le_S_compat : (x,y:N)(x<=y)->((S x)<=(S y)).
Intros x y le1.
Case le_lt_or_eq with 1:=le1; EAuto with num.
-Save.
+Qed.
Hints Resolve le_S_compat : num.
@@ -65,39 +65,39 @@ Hints Resolve le_S_compat : num.
Lemma le_lt_x_Sy : (x,y:N)(x<=y)->(x<(S y)).
Intros x y le1.
Case le_lt_or_eq with 1:=le1; Auto with num.
-Save.
+Qed.
Hints Immediate le_lt_x_Sy : num.
Lemma le_le_x_Sy : (x,y:N)(x<=y)->(x<=(S y)).
Auto with num.
-Save.
+Qed.
Hints Immediate le_le_x_Sy : num.
Lemma le_Sx_y_lt : (x,y:N)((S x)<=y)->(x<y).
Intros x y le1.
Case le_lt_or_eq with 1:=le1; EAuto with num.
-Save.
+Qed.
Hints Immediate le_Sx_y_lt : num.
(** Combined transitivity *)
Lemma lt_le_trans : (x,y,z:N)(x<y)->(y<=z)->(x<z).
Intros x y z lt1 le1; Case le_lt_or_eq with 1:= le1; EAuto with num.
-Save.
+Qed.
Lemma le_lt_trans : (x,y,z:N)(x<=y)->(y<z)->(x<z).
Intros x y z le1 lt1; Case le_lt_or_eq with 1:= le1; EAuto with num.
-Save.
+Qed.
Hints Immediate lt_le_trans le_lt_trans : num.
(** weaker compatibility results involving [<] and [<=] *)
Lemma lt_add_compat_weak_l : (x1,x2,y1,y2:N)(x1<=x2)->(y1<y2)->((x1+y1)<(x2+y2)).
Intros; Apply lt_le_trans with (x1+y2); Auto with num.
-Save.
+Qed.
Hints Immediate lt_add_compat_weak_l : num.
Lemma lt_add_compat_weak_r : (x1,x2,y1,y2:N)(x1<x2)->(y1<=y2)->((x1+y1)<(x2+y2)).
Intros; Apply le_lt_trans with (x1+y2); Auto with num.
-Save.
+Qed.
Hints Immediate lt_add_compat_weak_r : num.
diff --git a/theories/Num/LtProps.v b/theories/Num/LtProps.v
index 9b77b3893..511859efb 100644
--- a/theories/Num/LtProps.v
+++ b/theories/Num/LtProps.v
@@ -15,68 +15,68 @@ Require Export NeqProps.
Lemma lt_anti_sym : (x,y:N)x<y->~(y<x).
Red; Intros x y lt1 lt2; Apply (lt_anti_refl x); EAuto with num.
-Save.
+Qed.
Hints Resolve lt_anti_refl : num.
Lemma eq_not_lt : (x,y:N)(x=y)->~(x<y).
Red; Intros x y eq1 lt1; Apply (lt_anti_refl x); EAuto with num.
-Save.
+Qed.
Hints Resolve eq_not_lt : num.
Lemma lt_0_1 : (zero<one).
EAuto with num.
-Save.
+Qed.
Hints Resolve lt_0_1 : num.
Lemma eq_lt_x_Sy : (x,y:N)(x=y)->(x<(S y)).
EAuto with num.
-Save.
+Qed.
Hints Resolve eq_lt_x_Sy : num.
Lemma lt_lt_x_Sy : (x,y:N)(x<y)->(x<(S y)).
EAuto with num.
-Save.
+Qed.
Hints Immediate lt_lt_x_Sy : num.
Lemma lt_Sx_y_lt : (x,y:N)((S x)<y)->(x<y).
EAuto with num.
-Save.
+Qed.
Hints Immediate lt_Sx_y_lt : num.
(** Relating [<] and [=] *)
Lemma lt_neq : (x,y:N)(x<y)->(x<>y).
Red; Intros x y lt1 eq1; Apply (lt_anti_refl x); EAuto with num.
-Save.
+Qed.
Hints Immediate lt_neq : num.
Lemma lt_neq_sym : (x,y:N)(y<x)->(x<>y).
Intros x y lt1 ; Apply neq_sym; Auto with num.
-Save.
+Qed.
Hints Immediate lt_neq_sym : num.
(** Application to inequalities properties *)
Lemma neq_x_Sx : (x:N)x<>(S x).
Auto with num.
-Save.
+Qed.
Hints Resolve neq_x_Sx : num.
Lemma neq_0_1 : zero<>one.
Auto with num.
-Save.
+Qed.
Hints Resolve neq_0_1 : num.
(** Relating [<] and [+] *)
Lemma lt_add_compat_r : (x,y,z:N)(x<y)->((z+x)<(z+y)).
Intros x y z H; Apply lt_eq_compat with (x+z) (y+z); Auto with num.
-Save.
+Qed.
Hints Resolve lt_add_compat_r : num.
Lemma lt_add_compat : (x1,x2,y1,y2:N)(x1<x2)->(y1<y2)->((x1+y1)<(x2+y2)).
Intros; Apply lt_trans with (x1+y2); Auto with num.
-Save.
+Qed.
Hints Immediate lt_add_compat : num.
diff --git a/theories/Num/NeqDef.v b/theories/Num/NeqDef.v
index c13f26247..9d310a039 100644
--- a/theories/Num/NeqDef.v
+++ b/theories/Num/NeqDef.v
@@ -20,17 +20,17 @@ Infix 6 "<>" neq.
(* Proofs of axioms *)
Lemma eq_not_neq : (x,y:N)x=y->~(x<>y).
Unfold neq; Auto with num.
-Save.
+Qed.
Hints Immediate eq_not_neq : num.
Lemma neq_sym : (x,y:N)(x<>y)->(y<>x).
Unfold neq; Auto with num.
-Save.
+Qed.
Hints Resolve neq_sym : num.
Lemma neq_not_neq_trans : (x,y,z:N)(x<>y)->~(y<>z)->(x<>z).
Unfold neq; EAuto with num.
-Save.
+Qed.
Hints Resolve neq_not_neq_trans : num.
diff --git a/theories/Num/NeqProps.v b/theories/Num/NeqProps.v
index 6109c1f80..73f6066ab 100644
--- a/theories/Num/NeqProps.v
+++ b/theories/Num/NeqProps.v
@@ -16,33 +16,33 @@ Require Export EqAxioms.
Lemma neq_antirefl : (x:N)~(x<>x).
Auto with num.
-Save.
+Qed.
Hints Resolve neq_antirefl : num.
Lemma eq_not_neq_y_x : (x,y:N)(x=y)->~(y<>x).
Intros; Apply eq_not_neq; Auto with num.
-Save.
+Qed.
Hints Immediate eq_not_neq_y_x : num.
Lemma neq_not_eq : (x,y:N)(x<>y)->~(x=y).
Red; Intros; Apply (eq_not_neq x y); Trivial.
-Save.
+Qed.
Hints Immediate neq_not_eq : num.
Lemma neq_not_eq_y_x : (x,y:N)(x<>y)->~(y=x).
Intros; Apply neq_not_eq; Auto with num.
-Save.
+Qed.
Hints Immediate neq_not_eq_y_x : num.
Lemma not_neq_neq_trans : (x,y,z:N)~(x<>y)->(y<>z)->(x<>z).
Intros; Apply neq_sym; Apply neq_not_neq_trans with y; Auto with num.
-Save.
+Qed.
Hints Resolve not_neq_neq_trans : num.
Lemma neq_eq_compat : (x1,x2,y1,y2:N)(x1=y1)->(x2=y2)->(x1<>x2)->(y1<>y2).
Intros.
EAuto with num.
-Save.
+Qed.
diff --git a/theories/Reals/R_Ifp.v b/theories/Reals/R_Ifp.v
index 1f6abb175..2152188b6 100644
--- a/theories/Reals/R_Ifp.v
+++ b/theories/Reals/R_Ifp.v
@@ -37,7 +37,7 @@ Generalize (Rle_compatibility r (Rplus (IZR (up r))
Rewrite <-(Rplus_assoc r (Ropp r) (IZR (up r))) in H1;
Rewrite (Rplus_Ropp_r r) in H1;Elim (Rplus_ne (IZR (up r)));Intros a b;
Rewrite b in H1;Clear a b;Apply (single_z_r_R1 r z (up r));Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma up_tech:(r:R)(z:Z)(Rle (IZR z) r)->(Rlt r (IZR `z+1`))->
@@ -47,7 +47,7 @@ Intros;Generalize (Rle_compatibility R1 (IZR z) r H);Intro;Clear H;
Cut (R1==(IZR `1`));Auto with zarith real.
Intro;Generalize H1;Pattern 1 R1;Rewrite H;Intro;Clear H H1;
Rewrite <-(plus_IZR z `1`) in H2;Apply (tech_up r `z+1`);Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma fp_R0:(frac_part R0)==R0.
@@ -62,7 +62,7 @@ Elim (archimed R0);Intros;Clear H2;Unfold Rgt in H1;
Rewrite (minus_R0 (IZR (up R0))) in H0;
Generalize (lt_O_IZR (up R0) H1);Intro;Clear H1;
Generalize (le_IZR_R1 (up R0) H0);Intro;Clear H H0;Omega.
-Save.
+Qed.
(**********)
Lemma for_base_fp:(r:R)(Rgt (Rminus (IZR (up r)) r) R0)/\
@@ -75,7 +75,7 @@ Apply archimed.
Intro; Elim H; Intros.
Exact H1.
Apply archimed.
-Save.
+Qed.
(**********)
Lemma base_fp:(r:R)(Rge (frac_part r) R0)/\(Rlt (frac_part r) R1).
@@ -98,7 +98,7 @@ Rewrite <- Z_R_minus; Simpl;Intro; Unfold Rminus;
Apply Rlt_compatibility;Auto with zarith real.
Elim (for_base_fp r);Intros;Rewrite <-Ropp_O;
Rewrite<-Ropp_distr2;Apply Rgt_Ropp;Auto with zarith real.
-Save.
+Qed.
(*********************************************************)
(** Properties *)
@@ -129,7 +129,7 @@ Generalize (Rgt_plus_plus_r (Ropp R1) (IZR (up r)) r H);Intro;
Rewrite (Rplus_assoc (Ropp R1) r (Ropp r)) in H2;
Rewrite (Rplus_Ropp_r r) in H2;Elim (Rplus_ne (Ropp R1));Intros a b;
Rewrite a in H2;Clear a b;Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma Int_part_INR:(n : nat) (Int_part (INR n)) = (inject_nat n).
@@ -143,17 +143,17 @@ Apply lt_INR; Auto.
Rewrite Zplus_sym; Rewrite <- inj_plus; Simpl; Auto.
Rewrite plus_IZR; Simpl; Auto with real.
Repeat Rewrite <- INR_IZR_INZ; Auto with real.
-Save.
+Qed.
(**********)
Lemma fp_nat:(r:R)(frac_part r)==R0->(Ex [c:Z](r==(IZR c))).
Unfold frac_part;Intros;Split with (Int_part r);Apply Rminus_eq; Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma R0_fp_O:(r:R)~R0==(frac_part r)->~R0==r.
Red;Intros;Rewrite <- H0 in H;Generalize fp_R0;Intro;Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma Rminus_Int_part1:(r1,r2:R)(Rge (frac_part r1) (frac_part r2))->
@@ -236,7 +236,7 @@ Intro;Rewrite H1 in H;Clear H1;
Rewrite <-(plus_IZR `(Int_part r1)-(Int_part r2)` `1`) in H;
Generalize (up_tech (Rminus r1 r2) `(Int_part r1)-(Int_part r2)`
H0 H);Intros;Clear H H0;Unfold 1 Int_part;Omega.
-Save.
+Qed.
(**********)
Lemma Rminus_Int_part2:(r1,r2:R)(Rlt (frac_part r1) (frac_part r2))->
@@ -325,7 +325,7 @@ Intro;Rewrite H1 in H;Rewrite H1 in H0;Clear H1;
Intro;Clear H;
Generalize (up_tech (Rminus r1 r2) `(Int_part r1)-(Int_part r2)-1`
H1 H0);Intros;Clear H0 H1;Unfold 1 Int_part;Omega.
-Save.
+Qed.
(**********)
Lemma Rminus_fp1:(r1,r2:R)(Rge (frac_part r1) (frac_part r2))->
@@ -345,7 +345,7 @@ Intros;Unfold frac_part;
Rewrite <- (Rplus_assoc (Ropp (IZR (Int_part r1))) (Ropp r2)
(IZR (Int_part r2)));
Rewrite -> (Rplus_sym (Ropp r2) (Ropp (IZR (Int_part r1))));Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma Rminus_fp2:(r1,r2:R)(Rlt (frac_part r1) (frac_part r2))->
@@ -373,7 +373,7 @@ Intros;Unfold frac_part;Generalize (Rminus_Int_part2 r1 r2 H);Intro;
Rewrite <- (Rplus_assoc (Ropp (IZR (Int_part r1))) (Ropp r2)
(IZR (Int_part r2)));
Rewrite -> (Rplus_sym (Ropp r2) (Ropp (IZR (Int_part r1))));Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma plus_Int_part1:(r1,r2:R)(Rge (Rplus (frac_part r1) (frac_part r2)) R1)->
@@ -439,7 +439,7 @@ Intro;Rewrite H1 in H0;Rewrite H1 in H;Clear H1;
Rewrite <-(plus_IZR `(Int_part r1)+(Int_part r2)+1` `1`) in H0;
Generalize (up_tech (Rplus r1 r2) `(Int_part r1)+(Int_part r2)+1` H H0);Intro;
Clear H H0;Unfold 1 Int_part;Omega.
-Save.
+Qed.
(**********)
Lemma plus_Int_part2:(r1,r2:R)(Rlt (Rplus (frac_part r1) (frac_part r2)) R1)->
@@ -500,7 +500,7 @@ Intro;Rewrite H in H1;Clear H;
Rewrite <-(plus_IZR `(Int_part r1)+(Int_part r2)` `1`) in H1;
Generalize (up_tech (Rplus r1 r2) `(Int_part r1)+(Int_part r2)` H0 H1);Intro;
Clear H0 H1;Unfold 1 Int_part;Omega.
-Save.
+Qed.
(**********)
Lemma plus_frac_part1:(r1,r2:R)
@@ -527,7 +527,7 @@ Intros;Unfold frac_part;
(Ropp R1));
Rewrite <-(Ropp_distr1 (Rplus (IZR (Int_part r1)) (IZR (Int_part r2))) R1);
Trivial with zarith real.
-Save.
+Qed.
(**********)
Lemma plus_frac_part2:(r1,r2:R)
@@ -547,4 +547,4 @@ Intros;Unfold frac_part;
(Rplus (Ropp (IZR (Int_part r1))) (Ropp (IZR (Int_part r2)))));
Rewrite <-(Ropp_distr1 (IZR (Int_part r1)) (IZR (Int_part r2)));Unfold Rminus;
Trivial with zarith real.
-Save.
+Qed.
diff --git a/theories/Reals/R_sqr.v b/theories/Reals/R_sqr.v
index 78a29437c..7af4dd5f6 100644
--- a/theories/Reals/R_sqr.v
+++ b/theories/Reals/R_sqr.v
@@ -21,35 +21,35 @@ Tactic Definition SqRing := Unfold Rsqr; Ring.
Lemma Rsqr_neg : (x:R) ``(Rsqr x)==(Rsqr (-x))``.
Intros; SqRing.
-Save.
+Qed.
Lemma Rsqr_times : (x,y:R) ``(Rsqr (x*y))==(Rsqr x)*(Rsqr y)``.
Intros; SqRing.
-Save.
+Qed.
Lemma Rsqr_plus : (x,y:R) ``(Rsqr (x+y))==(Rsqr x)+(Rsqr y)+2*x*y``.
Intros; SqRing.
-Save.
+Qed.
Lemma Rsqr_minus : (x,y:R) ``(Rsqr (x-y))==(Rsqr x)+(Rsqr y)-2*x*y``.
Intros; SqRing.
-Save.
+Qed.
Lemma Rsqr_neg_minus : (x,y:R) ``(Rsqr (x-y))==(Rsqr (y-x))``.
Intros; SqRing.
-Save.
+Qed.
Lemma Rsqr_1 : ``(Rsqr 1)==1``.
SqRing.
-Save.
+Qed.
Lemma Rsqr_gt_0_0 : (x:R) ``0<(Rsqr x)`` -> ~``x==0``.
Intros; Red; Intro; Rewrite H0 in H; Rewrite Rsqr_O in H; Elim (Rlt_antirefl ``0`` H).
-Save.
+Qed.
Lemma Rsqr_pos_lt : (x:R) ~(x==R0)->``0<(Rsqr x)``.
Intros; Case (total_order R0 x); Intro; [Unfold Rsqr; Apply Rmult_lt_pos; Assumption | Elim H0; Intro; [Elim H; Symmetry; Exact H1 | Rewrite Rsqr_neg; Generalize (Rlt_Ropp x ``0`` H1); Rewrite Ropp_O; Intro; Unfold Rsqr; Apply Rmult_lt_pos; Assumption]].
-Save.
+Qed.
Lemma Rsqr_div : (x,y:R) ~``y==0`` -> ``(Rsqr (x/y))==(Rsqr x)/(Rsqr y)``.
Intros; Unfold Rsqr.
@@ -63,81 +63,81 @@ Apply Rmult_mult_r.
Reflexivity.
Assumption.
Assumption.
-Save.
+Qed.
Lemma Rsqr_eq_0 : (x:R) ``(Rsqr x)==0`` -> ``x==0``.
Unfold Rsqr; Intros; Generalize (without_div_Od x x H); Intro; Elim H0; Intro ; Assumption.
-Save.
+Qed.
Lemma Rsqr_minus_plus : (a,b:R) ``(a-b)*(a+b)==(Rsqr a)-(Rsqr b)``.
Intros; SqRing.
-Save.
+Qed.
Lemma Rsqr_plus_minus : (a,b:R) ``(a+b)*(a-b)==(Rsqr a)-(Rsqr b)``.
Intros; SqRing.
-Save.
+Qed.
Lemma Rsqr_incr_0 : (x,y:R) ``(Rsqr x)<=(Rsqr y)`` -> ``0<=x`` -> ``0<=y`` -> ``x<=y``.
Intros; Case (total_order_Rle x y); Intro; [Assumption | Cut ``y<x``; [Intro; Unfold Rsqr in H; Generalize (Rmult_lt2 y x y x H1 H1 H2 H2); Intro; Generalize (Rle_lt_trans ``x*x`` ``y*y`` ``x*x`` H H3); Intro; Elim (Rlt_antirefl ``x*x`` H4) | Auto with real]].
-Save.
+Qed.
Lemma Rsqr_incr_0_var : (x,y:R) ``(Rsqr x)<=(Rsqr y)`` -> ``0<=y`` -> ``x<=y``.
Intros; Case (total_order_Rle x y); Intro; [Assumption | Cut ``y<x``; [Intro; Unfold Rsqr in H; Generalize (Rmult_lt2 y x y x H0 H0 H1 H1); Intro; Generalize (Rle_lt_trans ``x*x`` ``y*y`` ``x*x`` H H2); Intro; Elim (Rlt_antirefl ``x*x`` H3) | Auto with real]].
-Save.
+Qed.
Lemma Rsqr_incr_1 : (x,y:R) ``x<=y``->``0<=x``->``0<= y``->``(Rsqr x)<=(Rsqr y)``.
Intros; Unfold Rsqr; Apply Rle_Rmult_comp; Assumption.
-Save.
+Qed.
Lemma Rsqr_incrst_0 : (x,y:R) ``(Rsqr x)<(Rsqr y)``->``0<=x``->``0<=y``-> ``x<y``.
Intros; Case (total_order x y); Intro; [Assumption | Elim H2; Intro; [Rewrite H3 in H; Elim (Rlt_antirefl (Rsqr y) H) | Generalize (Rmult_lt2 y x y x H1 H1 H3 H3); Intro; Unfold Rsqr in H; Generalize (Rlt_trans ``x*x`` ``y*y`` ``x*x`` H H4); Intro; Elim (Rlt_antirefl ``x*x`` H5)]].
-Save.
+Qed.
Lemma Rsqr_incrst_1 : (x,y:R) ``x<y``->``0<=x``->``0<=y``->``(Rsqr x)<(Rsqr y)``.
Intros; Unfold Rsqr; Apply Rmult_lt2; Assumption.
-Save.
+Qed.
Lemma Rsqr_neg_pos_le_0 : (x,y:R) ``(Rsqr x)<=(Rsqr y)``->``0<=y``->``-y<=x``.
Intros; Case (case_Rabsolu x); Intro.
Generalize (Rlt_Ropp x ``0`` r); Rewrite Ropp_O; Intro; Generalize (Rlt_le ``0`` ``-x`` H1); Intro; Rewrite (Rsqr_neg x) in H; Generalize (Rsqr_incr_0 (Ropp x) y H H2 H0); Intro; Rewrite <- (Ropp_Ropp x); Apply Rge_Ropp; Apply Rle_sym1; Assumption.
Apply Rle_trans with ``0``; [Rewrite <- Ropp_O; Apply Rge_Ropp; Apply Rle_sym1; Assumption | Apply Rle_sym2; Assumption].
-Save.
+Qed.
Lemma Rsqr_neg_pos_le_1 : (x,y:R) ``(-y)<=x`` -> ``x<=y`` -> ``0<=y`` -> ``(Rsqr x)<=(Rsqr y)``.
Intros; Case (case_Rabsolu x); Intro.
Generalize (Rlt_Ropp x ``0`` r); Rewrite Ropp_O; Intro; Generalize (Rlt_le ``0`` ``-x`` H2); Intro; Generalize (Rle_Ropp ``-y`` x H); Rewrite Ropp_Ropp; Intro; Generalize (Rle_sym2 ``-x`` y H4); Intro; Rewrite (Rsqr_neg x); Apply Rsqr_incr_1; Assumption.
Generalize (Rle_sym2 ``0`` x r); Intro; Apply Rsqr_incr_1; Assumption.
-Save.
+Qed.
Lemma neg_pos_Rsqr_le : (x,y:R) ``(-y)<=x``->``x<=y``->``(Rsqr x)<=(Rsqr y)``.
Intros; Case (case_Rabsolu x); Intro.
Generalize (Rlt_Ropp x ``0`` r); Rewrite Ropp_O; Intro; Generalize (Rle_Ropp ``-y`` x H); Rewrite Ropp_Ropp; Intro; Generalize (Rle_sym2 ``-x`` y H2); Intro; Generalize (Rlt_le ``0`` ``-x`` H1); Intro; Generalize (Rle_trans ``0`` ``-x`` y H4 H3); Intro; Rewrite (Rsqr_neg x); Apply Rsqr_incr_1; Assumption.
Generalize (Rle_sym2 ``0`` x r); Intro; Generalize (Rle_trans ``0`` x y H1 H0); Intro; Apply Rsqr_incr_1; Assumption.
-Save.
+Qed.
Lemma Rsqr_abs : (x:R) ``(Rsqr x)==(Rsqr (Rabsolu x))``.
Intro; Unfold Rabsolu; Case (case_Rabsolu x); Intro; [Apply Rsqr_neg | Reflexivity].
-Save.
+Qed.
Lemma Rsqr_le_abs_0 : (x,y:R) ``(Rsqr x)<=(Rsqr y)`` -> ``(Rabsolu x)<=(Rabsolu y)``.
Intros; Apply Rsqr_incr_0; Repeat Rewrite <- Rsqr_abs; [Assumption | Apply Rabsolu_pos | Apply Rabsolu_pos].
-Save.
+Qed.
Lemma Rsqr_le_abs_1 : (x,y:R) ``(Rabsolu x)<=(Rabsolu y)`` -> ``(Rsqr x)<=(Rsqr y)``.
Intros; Rewrite (Rsqr_abs x); Rewrite (Rsqr_abs y); Apply (Rsqr_incr_1 (Rabsolu x) (Rabsolu y) H (Rabsolu_pos x) (Rabsolu_pos y)).
-Save.
+Qed.
Lemma Rsqr_lt_abs_0 : (x,y:R) ``(Rsqr x)<(Rsqr y)`` -> ``(Rabsolu x)<(Rabsolu y)``.
Intros; Apply Rsqr_incrst_0; Repeat Rewrite <- Rsqr_abs; [Assumption | Apply Rabsolu_pos | Apply Rabsolu_pos].
-Save.
+Qed.
Lemma Rsqr_lt_abs_1 : (x,y:R) ``(Rabsolu x)<(Rabsolu y)`` -> ``(Rsqr x)<(Rsqr y)``.
Intros; Rewrite (Rsqr_abs x); Rewrite (Rsqr_abs y); Apply (Rsqr_incrst_1 (Rabsolu x) (Rabsolu y) H (Rabsolu_pos x) (Rabsolu_pos y)).
-Save.
+Qed.
Lemma Rsqr_inj : (x,y:R) ``0<=x`` -> ``0<=y`` -> (Rsqr x)==(Rsqr y) -> x==y.
Intros; Generalize (Rle_le_eq (Rsqr x) (Rsqr y)); Intro; Elim H2; Intros _ H3; Generalize (H3 H1); Intro; Elim H4; Intros; Apply Rle_antisym; Apply Rsqr_incr_0; Assumption.
-Save.
+Qed.
Lemma Rsqr_eq_abs_0 : (x,y:R) (Rsqr x)==(Rsqr y) -> (Rabsolu x)==(Rabsolu y).
Intros; Unfold Rabsolu; Case (case_Rabsolu x); Case (case_Rabsolu y); Intros.
@@ -145,25 +145,25 @@ Rewrite -> (Rsqr_neg x) in H; Rewrite -> (Rsqr_neg y) in H; Generalize (Rlt_Ropp
Rewrite -> (Rsqr_neg x) in H; Generalize (Rle_sym2 ``0`` y r); Intro; Generalize (Rlt_Ropp x ``0`` r0); Rewrite Ropp_O; Intro; Generalize (Rlt_le ``0`` ``-x`` H1); Intro; Apply Rsqr_inj; Assumption.
Rewrite -> (Rsqr_neg y) in H; Generalize (Rle_sym2 ``0`` x r0); Intro; Generalize (Rlt_Ropp y ``0`` r); Rewrite Ropp_O; Intro; Generalize (Rlt_le ``0`` ``-y`` H1); Intro; Apply Rsqr_inj; Assumption.
Generalize (Rle_sym2 ``0`` x r0); Generalize (Rle_sym2 ``0`` y r); Intros; Apply Rsqr_inj; Assumption.
-Save.
+Qed.
Lemma Rsqr_eq_asb_1 : (x,y:R) (Rabsolu x)==(Rabsolu y) -> (Rsqr x)==(Rsqr y).
Intros; Cut ``(Rsqr (Rabsolu x))==(Rsqr (Rabsolu y))``.
Intro; Repeat Rewrite <- Rsqr_abs in H0; Assumption.
Rewrite H; Reflexivity.
-Save.
+Qed.
Lemma triangle_rectangle : (x,y,z:R) ``0<=z``->``(Rsqr x)+(Rsqr y)<=(Rsqr z)``->``-z<=x<=z`` /\``-z<=y<=z``.
Intros; Generalize (plus_le_is_le (Rsqr x) (Rsqr y) (Rsqr z) (pos_Rsqr y) H0); Rewrite Rplus_sym in H0; Generalize (plus_le_is_le (Rsqr y) (Rsqr x) (Rsqr z) (pos_Rsqr x) H0); Intros; Split; [Split; [Apply Rsqr_neg_pos_le_0; Assumption | Apply Rsqr_incr_0_var; Assumption] | Split; [Apply Rsqr_neg_pos_le_0; Assumption | Apply Rsqr_incr_0_var; Assumption]].
-Save.
+Qed.
Lemma triangle_rectangle_lt : (x,y,z:R) ``(Rsqr x)+(Rsqr y)<(Rsqr z)`` -> ``(Rabsolu x)<(Rabsolu z)``/\``(Rabsolu y)<(Rabsolu z)``.
Intros; Split; [Generalize (plus_lt_is_lt (Rsqr x) (Rsqr y) (Rsqr z) (pos_Rsqr y) H); Intro; Apply Rsqr_lt_abs_0; Assumption | Rewrite Rplus_sym in H; Generalize (plus_lt_is_lt (Rsqr y) (Rsqr x) (Rsqr z) (pos_Rsqr x) H); Intro; Apply Rsqr_lt_abs_0; Assumption].
-Save.
+Qed.
Lemma triangle_rectangle_le : (x,y,z:R) ``(Rsqr x)+(Rsqr y)<=(Rsqr z)`` -> ``(Rabsolu x)<=(Rabsolu z)``/\``(Rabsolu y)<=(Rabsolu z)``.
Intros; Split; [Generalize (plus_le_is_le (Rsqr x) (Rsqr y) (Rsqr z) (pos_Rsqr y) H); Intro; Apply Rsqr_le_abs_0; Assumption | Rewrite Rplus_sym in H; Generalize (plus_le_is_le (Rsqr y) (Rsqr x) (Rsqr z) (pos_Rsqr x) H); Intro; Apply Rsqr_le_abs_0; Assumption].
-Save.
+Qed.
(*********************************************************************)
@@ -178,91 +178,91 @@ Axiom bar : (x:R) ``0<=x`` -> ``(sqrt x)*(sqrt x)==x``.
Lemma sqrt_0 : ``(sqrt 0)==0``.
Apply Rsqr_eq_0; Unfold Rsqr; Apply bar; Right; Reflexivity.
-Save.
+Qed.
Lemma sqrt_1 : ``(sqrt 1)==1``.
Apply (Rsqr_inj (sqrt R1) R1); [Apply foo; Left | Left | Unfold Rsqr; Rewrite -> bar; [Ring | Left]]; Apply Rlt_R0_R1.
-Save.
+Qed.
Lemma sqrt_eq_0 : (x:R) ``0<=x``->``(sqrt x)==0``->``x==0``.
Intros; Cut ``(Rsqr (sqrt x))==0``.
Intro; Unfold Rsqr in H1; Rewrite -> bar in H1; Assumption.
Rewrite H0; Apply Rsqr_O.
-Save.
+Qed.
Lemma sqrt_lem_0 : (x,y:R) ``0<=x``->``0<=y``->(sqrt x)==y->``y*y==x``.
Intros; Rewrite <- H1; Apply (bar x H).
-Save.
+Qed.
Lemma sqtr_lem_1 : (x,y:R) ``0<=x``->``0<=y``->``y*y==x``->(sqrt x)==y.
Intros; Apply Rsqr_inj; [Apply (foo x H) | Assumption | Unfold Rsqr; Rewrite -> H1; Apply (bar x H)].
-Save.
+Qed.
Lemma sqrt_def : (x:R) ``0<=x``->``(sqrt x)*(sqrt x)==x``.
Intros; Apply (bar x H).
-Save.
+Qed.
Lemma sqrt_square : (x:R) ``0<=x``->``(sqrt (x*x))==x``.
Intros; Apply (Rsqr_inj (sqrt (Rsqr x)) x (foo (Rsqr x) (pos_Rsqr x)) H); Unfold Rsqr; Apply (bar (Rsqr x) (pos_Rsqr x)).
-Save.
+Qed.
Lemma sqrt_Rsqr : (x:R) ``0<=x``->``(sqrt (Rsqr x))==x``.
Intros; Unfold Rsqr; Apply sqrt_square; Assumption.
-Save.
+Qed.
Lemma sqrt_Rsqr_abs : (x:R) (sqrt (Rsqr x))==(Rabsolu x).
Intro x; Rewrite -> Rsqr_abs; Apply sqrt_Rsqr; Apply Rabsolu_pos.
-Save.
+Qed.
Lemma Rsqr_sqrt : (x:R) ``0<=x``->(Rsqr (sqrt x))==x.
Intros x H1; Unfold Rsqr; Apply (bar x H1).
-Save.
+Qed.
Lemma sqrt_times : (x,y:R) ``0<=x``->``0<=y``->``(sqrt (x*y))==(sqrt x)*(sqrt y)``.
Intros x y H1 H2; Apply (Rsqr_inj (sqrt (Rmult x y)) (Rmult (sqrt x) (sqrt y)) (foo (Rmult x y) (Rmult_le_pos x y H1 H2)) (Rmult_le_pos (sqrt x) (sqrt y) (foo x H1) (foo y H2))); Rewrite Rsqr_times; Repeat Rewrite Rsqr_sqrt; [Ring | Assumption |Assumption | Apply (Rmult_le_pos x y H1 H2)].
-Save.
+Qed.
Lemma sqrt_lt_R0 : (x:R) ``0<x`` -> ``0<(sqrt x)``.
Intros x H1; Apply Rsqr_incrst_0; [Rewrite Rsqr_O; Rewrite Rsqr_sqrt ; [Assumption | Left; Assumption] | Right; Reflexivity | Apply (foo x (Rlt_le R0 x H1))].
-Save.
+Qed.
Lemma sqrt_div : (x,y:R) ``0<=x``->``0<y``->``(sqrt (x/y))==(sqrt x)/(sqrt y)``.
Intros x y H1 H2; Apply Rsqr_inj; [ Apply foo; Apply (Rmult_le_pos x (Rinv y)); [ Assumption | Generalize (Rlt_Rinv y H2); Clear H2; Intro H2; Left; Assumption] | Apply (Rmult_le_pos (sqrt x) (Rinv (sqrt y))) ; [ Apply (foo x H1) | Generalize (sqrt_lt_R0 y H2); Clear H2; Intro H2; Generalize (Rlt_Rinv (sqrt y) H2); Clear H2; Intro H2; Left; Assumption] | Rewrite Rsqr_div; Repeat Rewrite Rsqr_sqrt; [ Reflexivity | Left; Assumption | Assumption | Generalize (Rlt_Rinv y H2); Intro H3; Generalize (Rlt_le R0 (Rinv y) H3); Intro H4; Apply (Rmult_le_pos x (Rinv y) H1 H4) |Red; Intro H3; Generalize (Rlt_le R0 y H2); Intro H4; Generalize (sqrt_eq_0 y H4 H3); Intro H5; Rewrite H5 in H2; Elim (Rlt_antirefl R0 H2)]].
-Save.
+Qed.
Lemma sqrt_lt_0 : (x,y:R) ``0<=x``->``0<=y``->``(sqrt x)<(sqrt y)``->``x<y``.
Intros x y H1 H2 H3; Generalize (Rsqr_incrst_1 (sqrt x) (sqrt y) H3 (foo x H1) (foo y H2)); Intro H4; Rewrite (Rsqr_sqrt x H1) in H4; Rewrite (Rsqr_sqrt y H2) in H4; Assumption.
-Save.
+Qed.
Lemma sqrt_lt_1 : (x,y:R) ``0<=x``->``0<=y``->``x<y``->``(sqrt x)<(sqrt y)``.
Intros x y H1 H2 H3; Apply Rsqr_incrst_0; [Rewrite (Rsqr_sqrt x H1); Rewrite (Rsqr_sqrt y H2); Assumption | Apply (foo x H1) | Apply (foo y H2)].
-Save.
+Qed.
Lemma sqrt_le_0 : (x,y:R) ``0<=x``->``0<=y``->``(sqrt x)<=(sqrt y)``->``x<=y``.
Intros x y H1 H2 H3; Generalize (Rsqr_incr_1 (sqrt x) (sqrt y) H3 (foo x H1) (foo y H2)); Intro H4; Rewrite (Rsqr_sqrt x H1) in H4; Rewrite (Rsqr_sqrt y H2) in H4; Assumption.
-Save.
+Qed.
Lemma sqrt_le_1 : (x,y:R) ``0<=x``->``0<=y``->``x<=y``->``(sqrt x)<=(sqrt y)``.
Intros x y H1 H2 H3; Apply Rsqr_incr_0; [ Rewrite (Rsqr_sqrt x H1); Rewrite (Rsqr_sqrt y H2); Assumption | Apply (foo x H1) | Apply (foo y H2)].
-Save.
+Qed.
Lemma sqrt_inj : (x,y:R) ``0<=x``->``0<=y``->(sqrt x)==(sqrt y)->x==y.
Intros; Cut ``(Rsqr (sqrt x))==(Rsqr (sqrt y))``.
Intro; Rewrite (Rsqr_sqrt x H) in H2; Rewrite (Rsqr_sqrt y H0) in H2; Assumption.
Rewrite H1; Reflexivity.
-Save.
+Qed.
Lemma sqrt_less : (x:R) ``0<=x``->``1<x``->``(sqrt x)<x``.
Intros x H1 H2; Generalize (sqrt_lt_1 R1 x (Rlt_le R0 R1 (Rlt_R0_R1)) H1 H2); Intro H3; Rewrite sqrt_1 in H3; Generalize (Rmult_ne (sqrt x)); Intro H4; Elim H4; Intros H5 H6; Rewrite <- H5; Pattern 2 x; Rewrite <- (sqrt_def x H1); Apply (Rlt_monotony (sqrt x) R1 (sqrt x) (sqrt_lt_R0 x (Rlt_trans R0 R1 x Rlt_R0_R1 H2)) H3).
-Save.
+Qed.
Lemma sqrt_more : (x:R) ``0<x``->``x<1``->``x<(sqrt x)``.
Intros x H1 H2; Generalize (sqrt_lt_1 x R1 (Rlt_le R0 x H1) (Rlt_le R0 R1 (Rlt_R0_R1)) H2); Intro H3; Rewrite sqrt_1 in H3; Generalize (Rmult_ne (sqrt x)); Intro H4; Elim H4; Intros H5 H6; Rewrite <- H5; Pattern 1 x; Rewrite <- (sqrt_def x (Rlt_le R0 x H1)); Apply (Rlt_monotony (sqrt x) (sqrt x) R1 (sqrt_lt_R0 x H1) H3).
-Save.
+Qed.
Lemma sqrt_cauchy : (a,b,c,d:R) ``a*c+b*d<=(sqrt ((Rsqr a)+(Rsqr b)))*(sqrt ((Rsqr c)+(Rsqr d)))``.
Intros a b c d; Apply Rsqr_incr_0_var; [Rewrite Rsqr_times; Repeat Rewrite Rsqr_sqrt; Unfold Rsqr; [Replace ``(a*c+b*d)*(a*c+b*d)`` with ``(a*a*c*c+b*b*d*d)+(2*a*b*c*d)``; [Replace ``(a*a+b*b)*(c*c+d*d)`` with ``(a*a*c*c+b*b*d*d)+(a*a*d*d+b*b*c*c)``; [Apply Rle_compatibility; Replace ``a*a*d*d+b*b*c*c`` with ``(2*a*b*c*d)+(a*a*d*d+b*b*c*c-2*a*b*c*d)``; [Pattern 1 ``2*a*b*c*d``; Rewrite <- Rplus_Or; Apply Rle_compatibility; Replace ``a*a*d*d+b*b*c*c-2*a*b*c*d`` with (Rsqr (Rminus (Rmult a d) (Rmult b c))); [Apply pos_Rsqr | Unfold Rsqr; Ring] | Ring] | Ring] | Ring] | Apply (ge0_plus_ge0_is_ge0 (Rsqr c) (Rsqr d) (pos_Rsqr c) (pos_Rsqr d)) | Apply (ge0_plus_ge0_is_ge0 (Rsqr a) (Rsqr b) (pos_Rsqr a) (pos_Rsqr b))] | Apply Rmult_le_pos; Apply foo; Apply ge0_plus_ge0_is_ge0; Apply pos_Rsqr].
-Save.
+Qed.
(************************************************************)
(* Resolution of [a*X^2+b*X+c=0] *)
@@ -279,7 +279,7 @@ Definition sol_x2 [a:nonzeroreal;b,c:R] : R := ``(-b-(sqrt (Delta a b c)))/(2*a)
Lemma Rsqr_inv : (x:R) ~``x==0`` -> ``(Rsqr (/x))==/(Rsqr x)``.
Intros; Unfold Rsqr.
Rewrite Rinv_Rmult; Try Reflexivity Orelse Assumption.
-Save.
+Qed.
Lemma Rsqr_sol_eq_0_1 : (a:nonzeroreal;b,c,x:R) (Delta_is_pos a b c) -> (x==(sol_x1 a b c))\/(x==(sol_x2 a b c)) -> ``a*(Rsqr x)+b*x+c==0``.
Intros; Elim H0; Intro.
@@ -363,7 +363,7 @@ Apply prod_neq_R0; DiscrR Orelse Apply (cond_nonzero a).
Apply prod_neq_R0; DiscrR Orelse Apply (cond_nonzero a).
Apply prod_neq_R0; DiscrR Orelse Apply (cond_nonzero a).
Assumption.
-Save.
+Qed.
Lemma canonical_Rsqr : (a:nonzeroreal;b,c,x:R) ``a*(Rsqr x)+b*x+c == a* (Rsqr (x+b/(2*a))) + (4*a*c - (Rsqr b))/(4*a)``.
Intros.
@@ -419,7 +419,7 @@ DiscrR.
Apply (cond_nonzero a).
DiscrR.
Apply (cond_nonzero a).
-Save.
+Qed.
Lemma Rsqr_eq : (x,y:R) (Rsqr x)==(Rsqr y) -> x==y \/ x==``-y``.
Intros; Unfold Rsqr in H; Generalize (Rplus_plus_r ``-(y*y)`` ``x*x`` ``y*y`` H); Rewrite Rplus_Ropp_l; Replace ``-(y*y)+x*x`` with ``(x-y)*(x+y)``.
@@ -427,7 +427,7 @@ Intro; Generalize (without_div_Od ``x-y`` ``x+y`` H0); Intro; Elim H1; Intros.
Left; Apply Rminus_eq; Assumption.
Right; Apply Rminus_eq; Unfold Rminus; Rewrite Ropp_Ropp; Assumption.
Ring.
-Save.
+Qed.
Lemma Rsqr_sol_eq_0_0 : (a:nonzeroreal;b,c,x:R) (Delta_is_pos a b c) -> ``a*(Rsqr x)+b*x+c==0`` -> (x==(sol_x1 a b c))\/(x==(sol_x2 a b c)).
Intros; Rewrite (canonical_Rsqr a b c x) in H0; Rewrite Rplus_sym in H0; Generalize (Rplus_Ropp ``(4*a*c-(Rsqr b))/(4*a)`` ``a*(Rsqr (x+b/(2*a)))`` H0); Cut ``(Rsqr b)-4*a*c==(Delta a b c)``.
@@ -462,4 +462,4 @@ Unfold Rdiv; Rewrite <- Ropp_mul1.
Rewrite Ropp_distr2.
Reflexivity.
Reflexivity.
-Save.
+Qed.
diff --git a/theories/Reals/Ranalysis.v b/theories/Reals/Ranalysis.v
index a771d2b98..15b31daea 100644
--- a/theories/Reals/Ranalysis.v
+++ b/theories/Reals/Ranalysis.v
@@ -53,22 +53,22 @@ Definition continuity_pt [f:R->R; x0:R] : Prop := (continue_in f no_cond x0).
(**********)
Lemma sum_continuous : (f1,f2:R->R; x0:R) (continuity_pt f1 x0) -> (continuity_pt f2 x0) -> (continuity_pt (plus_fct f1 f2) x0).
Unfold continuity_pt plus_fct; Unfold continue_in; Intros; Apply limit_plus; Assumption.
-Save.
+Qed.
(**********)
Lemma diff_continuous : (f1,f2:R->R; x0:R) (continuity_pt f1 x0) -> (continuity_pt f2 x0) -> (continuity_pt (minus_fct f1 f2) x0).
Unfold continuity_pt minus_fct; Unfold continue_in; Intros; Apply limit_minus; Assumption.
-Save.
+Qed.
(**********)
Lemma prod_continuous : (f1,f2:R->R; x0:R) (continuity_pt f1 x0) -> (continuity_pt f2 x0) -> (continuity_pt (mult_fct f1 f2) x0).
Unfold continuity_pt mult_fct; Unfold continue_in; Intros; Apply limit_mul; Assumption.
-Save.
+Qed.
(**********)
Lemma const_continuous : (f:R->R; x0:R) (constant f) -> (continuity_pt f x0).
Unfold constant continuity_pt; Unfold continue_in; Unfold limit1_in; Unfold limit_in; Intros; Exists ``1``; Split; [Apply Rlt_R0_R1 | Intros; Generalize (H x x0); Intro; Rewrite H2; Simpl; Rewrite R_dist_eq; Assumption].
-Save.
+Qed.
(**********)
Lemma scal_continuous : (f:R->R;a:R; x0:R) (continuity_pt f x0) -> (continuity_pt (mult_real_fct a f) x0).
@@ -77,62 +77,62 @@ Unfold limit1_in; Unfold limit_in; Intros; Exists ``1``; Split.
Apply Rlt_R0_R1.
Intros; Rewrite R_dist_eq; Assumption.
Assumption.
-Save.
+Qed.
(**********)
Lemma opp_continuous : (f:R->R; x0:R) (continuity_pt f x0) -> (continuity_pt (opp_fct f) x0).
Unfold continuity_pt opp_fct; Unfold continue_in; Intros; Apply limit_Ropp; Assumption.
-Save.
+Qed.
(**********)
Lemma inv_continuous : (f:R->R; x0:R) (continuity_pt f x0) -> ~``(f x0)==0`` ->
(continuity_pt ([x:R] ``/(f x)``) x0).
Unfold continuity_pt; Unfold continue_in; Intros; Apply limit_inv; Assumption.
-Save.
+Qed.
Lemma div_eq_inv : (f1,f2:R->R) (div_fct f1 f2)==(mult_fct f1 ([x:R]``/(f2 x)``)).
Intros; Unfold div_fct; Unfold mult_fct; Unfold Rdiv; Apply fct_eq; Intro x; Reflexivity.
-Save.
+Qed.
(**********)
Lemma div_continuous : (f1,f2:R->R; x0:R) (continuity_pt f1 x0) -> (continuity_pt f2 x0) -> ~``(f2 x0)==0`` -> (continuity_pt (div_fct f1 f2) x0).
Intros; Rewrite -> (div_eq_inv f1 f2); Apply prod_continuous; [Assumption | Apply inv_continuous; Assumption].
-Save.
+Qed.
(**********)
Definition continuity [f:R->R] : Prop := (x:R) (continuity_pt f x).
Lemma sum_continuity : (f1,f2:R->R) (continuity f1)->(continuity f2)->(continuity (plus_fct f1 f2)).
Unfold continuity; Intros; Apply (sum_continuous f1 f2 x (H x) (H0 x)).
-Save.
+Qed.
Lemma diff_continuity : (f1,f2:R->R) (continuity f1)->(continuity f2)->(continuity (minus_fct f1 f2)).
Unfold continuity; Intros; Apply (diff_continuous f1 f2 x (H x) (H0 x)).
-Save.
+Qed.
Lemma prod_continuity : (f1,f2:R->R) (continuity f1)->(continuity f2)->(continuity (mult_fct f1 f2)).
Unfold continuity; Intros; Apply (prod_continuous f1 f2 x (H x) (H0 x)).
-Save.
+Qed.
Lemma const_continuity : (f:R->R) (constant f) -> (continuity f).
Unfold continuity; Intros; Apply (const_continuous f x H).
-Save.
+Qed.
Lemma scal_continuity : (f:R->R;a:R) (continuity f) -> (continuity (mult_real_fct a f)).
Unfold continuity; Intros; Apply (scal_continuous f a x (H x)).
-Save.
+Qed.
Lemma opp_continuity : (f:R->R) (continuity f)->(continuity (opp_fct f)).
Unfold continuity; Intros; Apply (opp_continuous f x (H x)).
-Save.
+Qed.
Lemma div_continuity : (f1,f2:R->R) (continuity f1)->(continuity f2)->((x:R) ~``(f2 x)==0``)->(continuity (div_fct f1 f2)).
Unfold continuity; Intros; Apply (div_continuous f1 f2 x (H x) (H0 x) (H1 x)).
-Save.
+Qed.
Lemma inv_continuity : (f:R->R) (continuity f)->((x:R) ~``(f x)==0``)->(continuity ([x:R] ``/(f x)``)).
Unfold continuity; Intros; Apply (inv_continuous f x (H x) (H0 x)).
-Save.
+Qed.
(*****************************************************)
(** Derivative's definition using Landau's kernel *)
@@ -148,12 +148,12 @@ Axiom derive_pt_def : (f:R->R;x,l:R) ((eps:R) ``0<eps``->(EXT delta : posreal |
(**********)
Lemma derive_pt_def_0 : (f:R->R;x,l:R) ((eps:R) ``0<eps``->(EXT delta : posreal | ((h:R) ~``h==0``->``(Rabsolu h)<delta`` -> ``(Rabsolu ((((f (x+h))-(f x))/h)-l))<eps``))) -> (derive_pt f x)==l.
Intros; Elim (derive_pt_def f x l); Intros; Apply (H0 H).
-Save.
+Qed.
(**********)
Lemma derive_pt_def_1 : (f:R->R;x,l:R) (derive_pt f x)==l -> ((eps:R) ``0<eps``->(EXT delta : posreal | ((h:R) ~``h==0``->``(Rabsolu h)<delta`` -> ``(Rabsolu ((((f (x+h))-(f x))/h)-l))<eps``))).
Intros; Elim (derive_pt_def f x l); Intros; Apply (H2 H eps H0).
-Save.
+Qed.
(**********)
Definition derive [f:R->R] := [x:R] (derive_pt f x).
@@ -173,12 +173,12 @@ cond_D2 : (derivable (derive d2)) }.
(**********)
Lemma derivable_derive : (f:R->R;x:R) (derivable_pt f x) -> (EXT l : R | (derive_pt f x)==l).
Intros f x; Unfold derivable_pt; Intro H; Elim H; Intros l H0; Rewrite (derive_pt_def_0 f x l); [Exists l; Reflexivity | Assumption].
-Save.
+Qed.
(**********)
Lemma derive_derivable : (f:R->R;x,l:R) (derive_pt f x)==l -> (derivable_pt f x).
Intros; Unfold derivable_pt; Generalize (derive_pt_def_1 f x l H); Intro H0; Exists l; Assumption.
-Save.
+Qed.
(********************************************************************)
(** Equivalence of this definition with the one using limit concept *)
@@ -196,7 +196,7 @@ Intro; Generalize (H2 ``x0-x`` H8 H5); Replace ``x+(x0-x)`` with x0.
Intro; Assumption.
Ring.
Auto with real.
-Save.
+Qed.
Definition fct_cte [a:R] : R->R := [x:R]a.
@@ -216,11 +216,11 @@ Generalize (H5 H1); Intro.
Unfold continuity_pt.
Apply (cont_deriv f (fct_cte l) no_cond x H6).
Unfold fct_cte; Reflexivity.
-Save.
+Qed.
Theorem derivable_continuous : (f:R->R) (derivable f) -> (continuity f).
Unfold derivable continuity; Intros; Apply (derivable_continuous_pt f x (H x)).
-Save.
+Qed.
(****************************************************************)
(** Main rules *)
@@ -245,62 +245,62 @@ Unfold Rminus.
Repeat Rewrite Ropp_distr1.
Ring.
Discriminate.
-Save.
+Qed.
Lemma sum_derivable_pt : (f1,f2:R->R;x:R) (derivable_pt f1 x)->(derivable_pt f2 x)->(derivable_pt (plus_fct f1 f2) x).
Intros; Generalize (derivable_derive f1 x H); Intro; Generalize (derivable_derive f2 x H0); Intro; Elim H1; Clear H1; Intros l1 H1; Elim H2; Clear H2; Intros l2 H2; Apply (derive_derivable (plus_fct f1 f2) x ``l1+l2``); Rewrite <- H1; Rewrite <- H2; Apply deriv_sum; Assumption.
-Save.
+Qed.
Lemma sum_derivable : (f1,f2:R->R) (derivable f1) -> (derivable f2) -> (derivable (plus_fct f1 f2)).
Unfold derivable; Intros f1 f2 H1 H2 x; Apply sum_derivable_pt; [Exact (H1 x) | Exact (H2 x)].
-Save.
+Qed.
Lemma sum_derivable_pt_var : (f1,f2:R->R;x:R) (derivable_pt f1 x) -> (derivable_pt f2 x) -> (derivable_pt ([y:R]``(f1 y)+(f2 y)``) x).
Intros; Generalize (sum_derivable_pt f1 f2 x H H0); Unfold plus_fct; Intro; Assumption.
-Save.
+Qed.
Lemma derive_sum : (f1,f2:R->R;x:R) (derivable_pt f1 x) -> (derivable_pt f2 x) -> (derive_pt ([y:R]``(f1 y)+(f2 y)``) x)==``(derive_pt f1 x)+(derive_pt f2 x)``.
Intros; Generalize (deriv_sum f1 f2 x H H0); Unfold plus_fct; Intro; Assumption.
-Save.
+Qed.
(* Opposite *)
Lemma deriv_opposite : (f:R->R;x:R) (derivable_pt f x) -> ``(derive_pt (opp_fct f) x)==-(derive_pt f x)``.
Intros; Generalize (derivable_derive f x H); Intro H0; Elim H0; Intros l H1; Rewrite H1; Unfold opp_fct; Apply derive_pt_def_0; Intros; Generalize (derive_pt_def_1 f x l H1); Intro H3; Elim (H3 eps H2); Intros delta H4; Exists delta; Intros; Replace ``( -(f (x+h))- -(f x))/h- -l`` with ``- (((f (x+h))-(f x))/h-l)``.
Rewrite Rabsolu_Ropp; Apply (H4 h H5 H6).
Unfold Rminus Rdiv; Rewrite Ropp_distr1; Repeat Rewrite Ropp_Ropp; Rewrite <- Ropp_mul1; Rewrite Ropp_distr1; Rewrite Ropp_Ropp; Reflexivity.
-Save.
+Qed.
Lemma opposite_derivable_pt : (f:R->R;x:R) (derivable_pt f x) -> (derivable_pt (opp_fct f) x).
Unfold opp_fct derivable_pt; Intros; Elim H; Intros; Exists ``-x0``; Intros; Elim (H0 eps H1); Intros; Exists x1; Intros; Generalize (H2 h H3 H4); Intro H5; Replace ``( -(f (x+h))- -(f x))/h- -x0`` with ``- (((f (x+h))-(f x))/h-x0)``.
Rewrite Rabsolu_Ropp; Assumption.
Unfold Rminus Rdiv; Rewrite Ropp_distr1; Repeat Rewrite Ropp_Ropp; Rewrite <- Ropp_mul1; Rewrite Ropp_distr1; Rewrite Ropp_Ropp; Reflexivity.
-Save.
+Qed.
Lemma opposite_derivable : (f:R->R) (derivable f) -> (derivable (opp_fct f)).
Unfold derivable; Intros f H1 x; Apply opposite_derivable_pt; Exact (H1 x).
-Save.
+Qed.
(* Difference *)
Lemma diff_plus_opp : (f1,f2:R->R) (minus_fct f1 f2)==(plus_fct f1 (opp_fct f2)).
Intros; Unfold minus_fct plus_fct opp_fct; Apply fct_eq; Intro x; Ring.
-Save.
+Qed.
Lemma deriv_diff : (f1,f2:R->R;x:R) (derivable_pt f1 x) -> (derivable_pt f2 x) -> ``(derive_pt (minus_fct f1 f2) x)==(derive_pt f1 x)-(derive_pt f2 x)``.
Intros; Rewrite diff_plus_opp; Unfold Rminus; Rewrite <- (deriv_opposite f2 x H0); Apply deriv_sum; [Assumption | Apply opposite_derivable_pt; Assumption].
-Save.
+Qed.
Lemma diff_derivable_pt : (f1,f2:R->R;x:R) (derivable_pt f1 x)->(derivable_pt f2 x)->(derivable_pt (minus_fct f1 f2) x).
Intros; Rewrite (diff_plus_opp f1 f2); Apply sum_derivable_pt; [Assumption | Apply opposite_derivable_pt; Assumption].
-Save.
+Qed.
Lemma diff_derivable : (f1,f2:R->R) (derivable f1) -> (derivable f2) -> (derivable (minus_fct f1 f2)).
Unfold derivable; Intros f1 f2 H1 H2 x; Apply diff_derivable_pt; [ Exact (H1 x) | Exact (H2 x)].
-Save.
+Qed.
Lemma derive_diff : (f1,f2:R->R;x:R) (derivable_pt f1 x)
-> (derivable_pt f2 x) -> (derive_pt ([y:R]``(f1 y)-(f2 y)``) x)==``(derive_pt f1 x)-(derive_pt f2 x)``.
Intros; Generalize (deriv_diff f1 f2 x H H0); Unfold minus_fct; Intro; Assumption.
-Save.
+Qed.
(**********)
Lemma deriv_scal : (f:R->R;a,x:R) (derivable_pt f x) -> ``(derive_pt (mult_real_fct a f) x)==a*(derive_pt f x)``.
@@ -319,7 +319,7 @@ Rewrite <- Rmult_assoc.
Rewrite Rminus_distr.
Reflexivity.
Unfold Rdiv; Apply Rmult_lt_pos; [Assumption | Apply Rlt_Rinv; Apply (Rabsolu_pos_lt a H1)].
-Save.
+Qed.
Lemma scal_derivable_pt : (f:R->R;a:R; x:R) (derivable_pt f x) ->
(derivable_pt (mult_real_fct a f) x).
@@ -338,19 +338,19 @@ Rewrite <- Rmult_assoc.
Rewrite Rminus_distr.
Reflexivity.
Unfold Rdiv; Apply Rmult_lt_pos; [Assumption | Apply Rlt_Rinv; Apply (Rabsolu_pos_lt a H1)].
-Save.
+Qed.
Lemma scal_derivable_pt_var : (f:R->R;a:R; x:R) (derivable_pt f x) -> (derivable_pt ([y:R]``a*(f y)``) x).
Intros; Generalize (scal_derivable_pt f a x H); Unfold mult_real_fct; Intro; Assumption.
-Save.
+Qed.
Lemma scal_derivable : (f:R->R;a:R) (derivable f) -> (derivable (mult_real_fct a f)).
Unfold derivable; Intros f a H1 x; Apply scal_derivable_pt; Exact (H1 x).
-Save.
+Qed.
Lemma derive_scal : (f:R->R;a,x:R) (derivable_pt f x) -> (derive_pt ([x:R]``a*(f x)``) x)==``a*(derive_pt f x)``.
Intros; Generalize (deriv_scal f a x H); Unfold mult_real_fct; Intro; Assumption.
-Save.
+Qed.
(* Multiplication *)
Lemma deriv_prod : (f1,f2:R->R;x:R) (derivable_pt f1 x) -> (derivable_pt f2 x) -> ``(derive_pt (mult_fct f1 f2) x)==(derive_pt f1 x)*(f2 x)+(derive_pt f2 x)*(f1 x)``.
@@ -361,29 +361,29 @@ Generalize (H5 (mult_fct f1 f2) (plus_fct (mult_fct (fct_cte l1) f2) (mult_fct f
Unfold plus_fct mult_fct fct_cte; Ring.
Unfold fct_cte; Reflexivity.
Unfold fct_cte; Reflexivity.
-Save.
+Qed.
Lemma prod_derivable_pt : (f1,f2:R->R;x:R) (derivable_pt f1 x)->(derivable_pt f2 x)->(derivable_pt (mult_fct f1 f2) x).
Intros; Generalize (deriv_prod f1 f2 x H H0); Intro; Apply (derive_derivable (mult_fct f1 f2) x ``(derive_pt f1 x)*(f2 x)+(derive_pt f2 x)*(f1 x)`` H1).
-Save.
+Qed.
Lemma prod_derivable : (f1,f2:R->R) (derivable f1) -> (derivable f2) -> (derivable (mult_fct f1 f2)).
Unfold derivable; Intros f1 f2 H1 H2 x; Apply prod_derivable_pt; [ Exact (H1 x) | Exact (H2 x)].
-Save.
+Qed.
Lemma derive_prod : (f1,f2:R->R;x:R) (derivable_pt f1 x)
-> (derivable_pt f2 x) -> (derive_pt ([x:R]``(f1 x)*(f2 x)``) x)==``(derive_pt f1 x)*(f2 x)+(derive_pt f2 x)*(f1 x)``.
Intros; Generalize (deriv_prod f1 f2 x H H0); Unfold mult_fct; Intro; Assumption.
-Save.
+Qed.
(**********)
Lemma deriv_const : (a:R;x:R) (derive_pt ([x:R] a) x)==``0``.
Intros; Apply derive_pt_def_0; Intros; Exists (mkposreal ``1`` Rlt_R0_R1); Intros; Replace ``a-a`` with ``0``; [Unfold Rdiv; Rewrite Rmult_Ol; Rewrite minus_R0; Rewrite Rabsolu_R0; Assumption | Ring].
-Save.
+Qed.
Lemma const_derivable : (a:R) (derivable ([x:R] a)).
Unfold derivable; Unfold derivable_pt; Intros; Exists ``0``; Intros; Exists (mkposreal ``1`` Rlt_R0_R1); Intros; Unfold Rminus; Rewrite Rplus_Ropp_r; Unfold Rdiv; Rewrite Rmult_Ol; Rewrite Rplus_Ropp_r; Rewrite Rabsolu_R0; Assumption.
-Save.
+Qed.
(**********)
Lemma deriv_id : (x:R) (derive_pt ([y:R] y) x)==``1``.
@@ -393,7 +393,7 @@ Unfold Rminus; Rewrite Rplus_assoc; Rewrite (Rplus_sym x); Rewrite Rplus_assoc.
Rewrite Rplus_Ropp_l; Rewrite Rplus_Or; Unfold Rdiv; Rewrite <- Rinv_r_sym.
Symmetry; Apply Rplus_Ropp_r.
Assumption.
-Save.
+Qed.
Lemma diff_id : (derivable ([x:R] x)).
Unfold derivable; Intro x; Unfold derivable_pt; Exists ``1``; Intros eps Heps; Exists (mkposreal eps Heps); Intros h H1 H2; Replace ``(x+h-x)/h-1`` with ``0``.
@@ -404,20 +404,20 @@ Unfold Rminus; Rewrite Rplus_assoc; Rewrite (Rplus_sym x); Rewrite Rplus_assoc.
Rewrite Rplus_Ropp_l; Rewrite Rplus_Or; Unfold Rdiv; Rewrite <- Rinv_r_sym.
Symmetry; Apply Rplus_Ropp_r.
Assumption.
-Save.
+Qed.
(**********)
Lemma sum_fct_cte_derive_pt : (f:R->R;t,a:R) (derivable_pt f t) -> (derive_pt ([x:R]``(f x)+a``) t)==(derive_pt f t).
Intros; Generalize (derivable_derive f t H); Intro; Elim H0; Intros l H1; Rewrite H1; Apply derive_pt_def_0; Intros; Generalize (derive_pt_def_1 f t l H1); Intros; Elim (H3 eps H2); Intros delta H4; Exists delta; Intros; Replace ``(f (t+h))+a-((f t)+a)`` with ``(f (t+h))-(f t)``; [Apply (H4 h H5 H6) | Ring].
-Save.
+Qed.
Lemma sum_fct_cte_derivable_pt : (f:R->R;t,a:R) (derivable_pt f t)->(derivable_pt ([t:R]``(f t)+a``) t).
Unfold derivable_pt; Intros; Elim H; Intros; Exists x; Intros; Elim (H0 eps H1); Intros; Exists x0; Intro h; Replace ``(f (t+h))+a-((f t)+a)`` with ``(f (t+h))-(f t)``; [Exact (H2 h) | Ring].
-Save.
+Qed.
Lemma sum_fct_cte_derivable : (f:R->R;a:R) (derivable f)->(derivable ([t:R]``(f t)+a``)).
Unfold derivable; Intros; Apply sum_fct_cte_derivable_pt; Apply (H x).
-Save.
+Qed.
(**********)
Lemma deriv_Rsqr : (x:R) (derive Rsqr x)==``2*x``.
@@ -430,7 +430,7 @@ Repeat Rewrite Rmult_1r; Rewrite Rplus_assoc; Rewrite Rplus_Ropp_r.
Rewrite Rplus_Or; Reflexivity.
Assumption.
Unfold Rsqr; Reflexivity.
-Save.
+Qed.
Lemma diff_Rsqr : (derivable Rsqr).
Unfold derivable; Intro x; Unfold Rsqr; Unfold derivable_pt; Exists ``2*x``; Intros eps Heps; Exists (mkposreal eps Heps); Intros h H1 H2; Replace ``((x+h)*(x+h)-x*x)/h-2*x`` with ``h``.
@@ -442,26 +442,26 @@ Repeat Rewrite Rmult_1r; Rewrite Rplus_assoc; Rewrite Rplus_Ropp_r.
Rewrite Rplus_Or; Reflexivity.
Assumption.
Unfold Rsqr; Reflexivity.
-Save.
+Qed.
Lemma Rsqr_derivable_pt : (f:R->R;t:R) (derivable_pt f t) -> (derivable_pt ([x:R](Rsqr (f x))) t).
Unfold Rsqr; Intros; Generalize (prod_derivable_pt f f t H H); Unfold mult_fct; Intro H0; Assumption.
-Save.
+Qed.
Lemma Rsqr_derivable : (f:R->R) (derivable f)->(derivable ([x:R](Rsqr (f x)))).
Unfold derivable; Intros; Apply (Rsqr_derivable_pt f x (H x)).
-Save.
+Qed.
(* SQRT *)
Axiom deriv_sqrt : (x:R) ``0<x`` -> (derive sqrt)==[y:R] ``1/(2*(sqrt y))``.
Lemma eq_fct : (x:R;f1,f2:R->R) f1==f2 -> (f1 x)==(f2 x).
Intros; Rewrite H; Reflexivity.
-Save.
+Qed.
Lemma diff_sqrt : (x:R) ``0<x`` -> (derivable_pt sqrt x).
Intros; Generalize (deriv_sqrt x H); Unfold derive; Intro; Generalize (eq_fct x ([x:R](derive_pt sqrt x)) ([y:R]``1/(2*(sqrt y))``) H0); Intro; Apply (derive_derivable sqrt x ``1/(2*(sqrt x))`` H1).
-Save.
+Qed.
(* Composition *)
@@ -493,27 +493,27 @@ Assumption.
Unfold mult_fct fct_cte; Rewrite Rmult_sym; Reflexivity.
Unfold fct_cte; Reflexivity.
Unfold fct_cte; Reflexivity.
-Save.
+Qed.
Lemma composition_derivable : (f,g:R->R;x:R) (derivable_pt f x) -> (derivable_pt g (f x)) -> (derivable_pt (comp g f) x).
Intros; Generalize (deriv_composition f g x H H0); Intro; Apply (derive_derivable (comp g f) x ``(derive_pt g (f x))*(derive_pt f x)`` H1).
-Save.
+Qed.
Lemma derive_composition : (f,g:R->R;x:R) (derivable_pt f x) -> (derivable_pt g (f x)) -> (derive_pt ([x:R]``(g (f x))``) x)==``(derive_pt g (f x))*(derive_pt f x)``.
Intros; Generalize (deriv_composition f g x H H0); Unfold comp; Intro; Assumption.
-Save.
+Qed.
Lemma composition_derivable_var : (f,g:R->R;x:R) (derivable_pt f x) -> (derivable_pt g (f x)) -> (derivable_pt ([x:R](g (f x))) x).
Intros; Generalize (composition_derivable f g x H H0); Unfold comp; Intro; Assumption.
-Save.
+Qed.
Lemma diff_comp : (f,g:R->R) (derivable f)->(derivable g)->(derivable (comp g f)).
Intros f g; Unfold derivable; Intros H1 H2 x; Apply (composition_derivable f g x (H1 x) (H2 (f x))).
-Save.
+Qed.
Lemma Rsqr_derive : (f:R->R;t:R) (derivable_pt f t)->(derive_pt ([x:R](Rsqr (f x))) t)==(Rmult ``2`` (Rmult (derive_pt f t) (f t))).
Intros; Generalize diff_Rsqr; Unfold derivable; Intro H0; Generalize (deriv_composition f Rsqr t H (H0 (f t))); Unfold comp; Intro H1; Rewrite H1; Generalize (deriv_Rsqr (f t)); Unfold derive; Intro H2; Rewrite H2; Rewrite Rmult_assoc; Rewrite <- (Rmult_sym (derive_pt f t)); Reflexivity.
-Save.
+Qed.
(* SIN and COS *)
Axiom deriv_sin : (derive sin)==cos.
@@ -522,7 +522,7 @@ Lemma diff_sin : (derivable sin).
Unfold derivable; Intro; Generalize deriv_sin; Unfold derive; Intro; Generalize
(eq_fct x ([x:R](derive_pt sin x)) cos H); Intro; Apply (derive_derivable sin x
(cos x) H0).
-Save.
+Qed.
Lemma diff_cos : (derivable cos).
Unfold derivable; Intro; Cut ([x:R]``(sin (x+PI/2))``)==cos.
@@ -530,11 +530,11 @@ Intro; Rewrite <- H; Apply (composition_derivable_var ([x:R]``x+PI/2``) sin x).
Apply (sum_fct_cte_derivable_pt ([x:R]x) x ``PI/2``); Apply diff_id.
Apply diff_sin.
Apply fct_eq; Intro; Symmetry; Rewrite Rplus_sym; Apply cos_sin.
-Save.
+Qed.
Lemma derive_pt_sin : (x:R) (derive_pt sin x)==(cos x).
Intro; Generalize deriv_sin; Unfold derive; Intro; Apply (eq_fct x [x:R](derive_pt sin x) cos H).
-Save.
+Qed.
Lemma deriv_cos : (derive cos)==(opp_fct sin).
Unfold opp_fct derive; Apply fct_eq; Intro; Cut ([x:R]``(sin (x+PI/2))``)==cos.
@@ -545,11 +545,11 @@ Apply diff_id.
Apply (sum_fct_cte_derivable_pt ([x:R]x) x ``PI/2``); Apply diff_id.
Apply diff_sin.
Apply fct_eq; Intro; Symmetry; Rewrite Rplus_sym; Apply cos_sin.
-Save.
+Qed.
Lemma derive_pt_cos : (x:R) (derive_pt cos x)==``-(sin x)``.
Intro; Generalize deriv_cos; Unfold derive; Intro; Unfold opp_fct in H; Apply (eq_fct x [x:R](derive_pt cos x) [x:R]``-(sin x)`` H).
-Save.
+Qed.
(************************************************************)
(** Local extremum's condition *)
@@ -727,15 +727,15 @@ Unfold Rdiv; Apply Rmult_lt_pos.
Rewrite <- Ropp_O; Apply Rlt_Ropp; Assumption.
Apply (Rlt_Rinv ``2`` Rgt_2_0).
Unfold Rdiv; Apply Ropp_mul1.
-Save.
+Qed.
Theorem deriv_minimum : (f:R->R;a,b,c:R) ``a<c``->``c<b``->(derivable_pt f c)->((x:R) ``a<x``->``x<b``->``(f c)<=(f x)``)->``(derive_pt f c)==0``.
Intros; Generalize (opposite_derivable_pt f c H1); Intro; Rewrite <- (Ropp_Ropp (derive_pt f c)); Apply eq_RoppO; Rewrite <- (deriv_opposite f c H1); Apply (deriv_maximum (opp_fct f) a b c H H0 H3); Intros; Unfold opp_fct; Apply Rge_Ropp; Apply Rle_sym1; Apply (H2 x H4 H5).
-Save.
+Qed.
Theorem deriv_constant2 : (f:R->R;a,b,c:R) ``a<c``->``c<b``->(derivable_pt f c)->((x:R) ``a<x``->``x<b``->``(f x)==(f c)``)->``(derive_pt f c)==0``.
Intros; Apply (deriv_maximum f a b c H H0 H1); Intros; Right; Apply (H2 x H3 H4).
-Save.
+Qed.
(**********)
Lemma nonneg_derivative_0 : (f:R->R) (derivable f)->(increasing f) -> ((x:R) ``0<=(derive_pt f x)``).
@@ -789,7 +789,7 @@ Rewrite <- Rmult_assoc.
Apply Rinv_r_simpl_m.
Apply aze.
Rewrite <- Ropp_O; Apply Rlt_Ropp; Unfold Rdiv; Generalize (Rlt_monotony_r ``/2`` l ``0`` (Rlt_Rinv ``2`` Rgt_2_0) H4); Rewrite Rmult_Ol; Intro; Assumption.
-Save.
+Qed.
(**********)
Axiom nonneg_derivative_1 : (f:R->R) (derivable f)->((x:R) ``0<=(derive_pt f x)``) -> (increasing f).
@@ -877,17 +877,17 @@ Apply aze.
Unfold Rdiv; Apply Rmult_lt_pos.
Assumption.
Apply Rlt_Rinv; Apply Rgt_2_0.
-Save.
+Qed.
(**********)
Lemma increasing_decreasing_opp : (f:R->R) (increasing f) -> (decreasing (opp_fct f)).
Unfold increasing decreasing opp_fct; Intros; Generalize (H x y H0); Intro; Apply Rge_Ropp; Apply Rle_sym1; Assumption.
-Save.
+Qed.
(**********)
Lemma opp_opp_fct : (f:R->R) (opp_fct (opp_fct f))==f.
Intro; Unfold opp_fct; Apply fct_eq; Intro; Rewrite Ropp_Ropp; Reflexivity.
-Save.
+Qed.
(**********)
Lemma nonpos_derivative_1 : (f:R->R) (derivable f)->((x:R) ``(derive_pt f x)<=0``) -> (decreasing f).
@@ -897,7 +897,7 @@ Cut (x:R)``0<=(derive_pt (opp_fct f) x)``.
Intros; Apply (nonneg_derivative_1 (opp_fct f) H2 H1).
Intros; Rewrite (deriv_opposite f x (H x)); Rewrite <- Ropp_O; Apply Rge_Ropp; Apply Rle_sym1; Apply (H0 x).
Apply (opposite_derivable f H).
-Save.
+Qed.
(**********)
Axiom positive_derivative : (f:R->R) (derivable f)->((x:R) ``0<(derive_pt f x)``)->(strict_increasing f).
@@ -905,7 +905,7 @@ Axiom positive_derivative : (f:R->R) (derivable f)->((x:R) ``0<(derive_pt f x)``
(**********)
Lemma strictincreasing_strictdecreasing_opp : (f:R->R) (strict_increasing f) -> (strict_decreasing (opp_fct f)).
Unfold strict_increasing strict_decreasing opp_fct; Intros; Generalize (H x y H0); Intro; Apply Rlt_Ropp; Assumption.
-Save.
+Qed.
(**********)
Lemma negative_derivative : (f:R->R) (derivable f)->((x:R) ``(derive_pt f x)<0``)->(strict_decreasing f).
@@ -915,12 +915,12 @@ Cut (x:R)``0<(derive_pt (opp_fct f) x)``.
Intros; Apply (positive_derivative (opp_fct f) H2 H1).
Intros; Rewrite (deriv_opposite f x (H x)); Rewrite <- Ropp_O; Apply Rlt_Ropp; Apply (H0 x).
Apply (opposite_derivable f H).
-Save.
+Qed.
(**********)
Lemma null_derivative_0 : (f:R->R) (constant f)->((x:R) ``(derive_pt f x)==0``).
Intros; Unfold constant in H; Apply derive_pt_def_0; Intros; Exists (mkposreal ``1`` Rlt_R0_R1); Intros; Rewrite (H x ``x+h``); Unfold Rminus; Unfold Rdiv; Rewrite Rplus_Ropp_r; Rewrite Rmult_Ol; Rewrite Rplus_Ropp_r; Rewrite Rabsolu_R0; Assumption.
-Save.
+Qed.
(**********)
Lemma increasing_decreasing : (f:R->R) (increasing f) -> (decreasing f) -> (constant f).
@@ -929,7 +929,7 @@ Generalize (Rlt_le x y H1); Intro; Apply (Rle_antisym (f x) (f y) (H x y H2) (H0
Elim H1; Intro.
Rewrite H2; Reflexivity.
Generalize (Rlt_le y x H2); Intro; Symmetry; Apply (Rle_antisym (f y) (f x) (H y x H3) (H0 y x H3)).
-Save.
+Qed.
(**********)
Lemma null_derivative_1 : (f:R->R) (derivable f)->((x:R) ``(derive_pt f x)==0``)->(constant f).
@@ -943,7 +943,7 @@ Apply increasing_decreasing; Assumption.
Intro.
Right; Symmetry; Apply (H0 x).
Intro; Right; Apply (H0 x).
-Save.
+Qed.
(**********)
Axiom derive_increasing_interv_ax : (a,b:R;f:R->R) ``a<b``-> (((t:R) ``a<t<b`` -> ``0<(derive_pt f t)``) -> ((x,y:R) ``a<=x<=b``->``a<=y<=b``->``x<y``->``(f x)<(f y)``)) /\ (((t:R) ``a<t<b`` -> ``0<=(derive_pt f t)``) -> ((x,y:R) ``a<=x<=b``->``a<=y<=b``->``x<y``->``(f x)<=(f y)``)).
@@ -951,12 +951,12 @@ Axiom derive_increasing_interv_ax : (a,b:R;f:R->R) ``a<b``-> (((t:R) ``a<t<b`` -
(**********)
Lemma derive_increasing_interv : (a,b:R;f:R->R) ``a<b``-> ((t:R) ``a<t<b`` -> ``0<(derive_pt f t)``) -> ((x,y:R) ``a<=x<=b``->``a<=y<=b``->``x<y``->``(f x)<(f y)``).
Intros; Generalize (derive_increasing_interv_ax a b f H); Intro; Elim H4; Intros H5 _; Apply (H5 H0 x y H1 H2 H3).
-Save.
+Qed.
(**********)
Lemma derive_increasing_interv_var : (a,b:R;f:R->R) ``a<b``-> ((t:R) ``a<t<b`` -> ``0<=(derive_pt f t)``) -> ((x,y:R) ``a<=x<=b``->``a<=y<=b``->``x<y``->``(f x)<=(f y)``).
Intros; Generalize (derive_increasing_interv_ax a b f H); Intro; Elim H4; Intros _ H5; Apply (H5 H0 x y H1 H2 H3).
-Save.
+Qed.
(**********)
(**********)
diff --git a/theories/Reals/Rbase.v b/theories/Reals/Rbase.v
index f20254f62..fd243969b 100644
--- a/theories/Reals/Rbase.v
+++ b/theories/Reals/Rbase.v
@@ -48,22 +48,22 @@ Add Field R Rplus Rmult R1 R0 Ropp [x,y:R]false Rinv RTheory Rinv_l
(**********)
Lemma Rlt_antirefl:(r:R)~``r<r``.
Generalize Rlt_antisym. Intuition EAuto.
-Save.
+Qed.
Hints Resolve Rlt_antirefl : real.
Lemma Rlt_not_eq:(r1,r2:R)``r1<r2``->``r1<>r2``.
Red; Intros r1 r2 H H0; Apply (Rlt_antirefl r1).
Pattern 2 r1; Rewrite H0; Trivial.
-Save.
+Qed.
Lemma Rgt_not_eq:(r1,r2:R)``r1>r2``->``r1<>r2``.
Intros; Apply sym_not_eqT; Apply Rlt_not_eq; Auto with real.
-Save.
+Qed.
(**********)
Lemma imp_not_Req:(r1,r2:R)(``r1<r2``\/ ``r1>r2``) -> ``r1<>r2``.
Generalize Rlt_not_eq Rgt_not_eq. Intuition EAuto.
-Save.
+Qed.
Hints Resolve imp_not_Req : real.
(** Reasoning by case on equalities and order *)
@@ -71,18 +71,18 @@ Hints Resolve imp_not_Req : real.
(**********)
Lemma Req_EM:(r1,r2:R)(r1==r2)\/``r1<>r2``.
Intros ; Generalize (total_order_T r1 r2) imp_not_Req ; Intuition EAuto 3.
-Save.
+Qed.
Hints Resolve Req_EM : real.
(**********)
Lemma total_order:(r1,r2:R)``r1<r2``\/(r1==r2)\/``r1>r2``.
Intros;Generalize (total_order_T r1 r2);Tauto.
-Save.
+Qed.
(**********)
Lemma not_Req:(r1,r2:R)``r1<>r2``->(``r1<r2``\/``r1>r2``).
Intros; Generalize (total_order_T r1 r2) ; Tauto.
-Save.
+Qed.
(*********************************************************************************)
@@ -92,23 +92,23 @@ Save.
(**********)
Lemma Rlt_le:(r1,r2:R)``r1<r2``-> ``r1<=r2``.
Intros ; Red ; Tauto.
-Save.
+Qed.
Hints Resolve Rlt_le : real.
(**********)
Lemma Rle_ge : (r1,r2:R)``r1<=r2`` -> ``r2>=r1``.
NewDestruct 1; Red; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rge_le : (r1,r2:R)``r1>=r2`` -> ``r2<=r1``.
NewDestruct 1; Red; Auto with real.
-Save.
+Qed.
(**********)
Lemma not_Rle:(r1,r2:R)~(``r1<=r2``)->``r1>r2``.
Intros r1 r2 ; Generalize (total_order r1 r2) ; Unfold Rle; Tauto.
-Save.
+Qed.
Hints Immediate Rle_ge Rge_le not_Rle : real.
@@ -116,7 +116,7 @@ Hints Immediate Rle_ge Rge_le not_Rle : real.
Lemma Rlt_le_not:(r1,r2:R)``r2<r1``->~(``r1<=r2``).
Generalize Rlt_antisym imp_not_Req ; Unfold Rle.
Intuition EAuto 3.
-Save.
+Qed.
Lemma Rle_not:(r1,r2:R)``r1>r2`` -> ~(``r1<=r2``).
Proof Rlt_le_not.
@@ -126,109 +126,109 @@ Hints Immediate Rlt_le_not : real.
Lemma Rle_not_lt: (r1, r2:R) ``r2 <= r1`` ->~ (``r1<r2``).
Intros r1 r2. Generalize (Rlt_antisym r1 r2) (imp_not_Req r1 r2).
Unfold Rle; Intuition.
-Save.
+Qed.
(**********)
Lemma Rlt_ge_not:(r1,r2:R)``r1<r2``->~(``r1>=r2``).
Generalize Rlt_le_not. Unfold Rle Rge. Intuition EAuto 3.
-Save.
+Qed.
Hints Immediate Rlt_ge_not : real.
(**********)
Lemma eq_Rle:(r1,r2:R)r1==r2->``r1<=r2``.
Unfold Rle; Tauto.
-Save.
+Qed.
Hints Immediate eq_Rle : real.
Lemma eq_Rge:(r1,r2:R)r1==r2->``r1>=r2``.
Unfold Rge; Tauto.
-Save.
+Qed.
Hints Immediate eq_Rge : real.
Lemma eq_Rle_sym:(r1,r2:R)r2==r1->``r1<=r2``.
Unfold Rle; Auto.
-Save.
+Qed.
Hints Immediate eq_Rle_sym : real.
Lemma eq_Rge_sym:(r1,r2:R)r2==r1->``r1>=r2``.
Unfold Rge; Auto.
-Save.
+Qed.
Hints Immediate eq_Rge_sym : real.
Lemma Rle_antisym : (r1,r2:R)``r1<=r2`` -> ``r2<=r1``-> r1==r2.
Intros r1 r2; Generalize (Rlt_antisym r1 r2) ; Unfold Rle ; Intuition.
-Save.
+Qed.
Hints Resolve Rle_antisym : real.
(**********)
Lemma Rle_le_eq:(r1,r2:R)(``r1<=r2``/\``r2<=r1``)<->(r1==r2).
Intuition.
-Save.
+Qed.
Lemma Rlt_rew : (x,x',y,y':R)``x==x'``->``x'<y'`` -> `` y' == y`` -> ``x < y``.
Intros; Replace x with x'; Replace y with y'; Assumption.
-Save.
+Qed.
(**********)
Lemma Rle_trans:(r1,r2,r3:R) ``r1<=r2``->``r2<=r3``->``r1<=r3``.
Generalize trans_eqT Rlt_trans Rlt_rew.
Unfold Rle.
Intuition EAuto 2.
-Save.
+Qed.
(**********)
Lemma Rle_lt_trans:(r1,r2,r3:R)``r1<=r2``->``r2<r3``->``r1<r3``.
Generalize Rlt_trans Rlt_rew.
Unfold Rle.
Intuition EAuto 2.
-Save.
+Qed.
(**********)
Lemma Rlt_le_trans:(r1,r2,r3:R)``r1<r2``->``r2<=r3``->``r1<r3``.
Generalize Rlt_trans Rlt_rew; Unfold Rle; Intuition EAuto 2.
-Save.
+Qed.
(** Decidability of the order *)
Lemma total_order_Rlt:(r1,r2:R)(sumboolT ``r1<r2`` ~(``r1<r2``)).
Intros;Generalize (total_order_T r1 r2) (imp_not_Req r1 r2) ; Intuition.
-Save.
+Qed.
(**********)
Lemma total_order_Rle:(r1,r2:R)(sumboolT ``r1<=r2`` ~(``r1<=r2``)).
Intros r1 r2.
Generalize (total_order_T r1 r2) (imp_not_Req r1 r2).
Intuition EAuto 4 with real.
-Save.
+Qed.
(**********)
Lemma total_order_Rgt:(r1,r2:R)(sumboolT ``r1>r2`` ~(``r1>r2``)).
Intros;Unfold Rgt;Intros;Apply total_order_Rlt.
-Save.
+Qed.
(**********)
Lemma total_order_Rge:(r1,r2:R)(sumboolT (``r1>=r2``) ~(``r1>=r2``)).
Intros;Generalize (total_order_Rle r2 r1);Intuition.
-Save.
+Qed.
Lemma total_order_Rlt_Rle:(r1,r2:R)(sumboolT ``r1<r2`` ``r2<=r1``).
Intros;Generalize (total_order_T r1 r2); Intuition.
-Save.
+Qed.
Lemma Rle_or_lt: (n, m:R)(Rle n m) \/ (Rlt m n).
Intros n m; Elim (total_order_Rlt_Rle m n);Auto with real.
-Save.
+Qed.
Lemma total_order_Rle_Rlt_eq :(r1,r2:R)``r1<=r2``->
(sumboolT ``r1<r2`` ``r1==r2``).
Intros r1 r2 H;Generalize (total_order_T r1 r2); Intuition.
-Save.
+Qed.
(**********)
Lemma inser_trans_R:(n,m,p,q:R)``n<=m<p``-> (sumboolT ``n<=m<q`` ``q<=m<p``).
Intros; Generalize (total_order_Rlt_Rle m q); Intuition.
-Save.
+Qed.
(****************************************************************)
(** Field Lemmas *)
@@ -240,18 +240,18 @@ Save.
Lemma Rplus_ne:(r:R)``r+0==r``/\``0+r==r``.
Intro;Split;Ring.
-Save.
+Qed.
Hints Resolve Rplus_ne : real v62.
Lemma Rplus_Or:(r:R)``r+0==r``.
Intro; Ring.
-Save.
+Qed.
Hints Resolve Rplus_Or : real.
(**********)
Lemma Rplus_Ropp_l:(r:R)``(-r)+r==0``.
Intro; Ring.
-Save.
+Qed.
Hints Resolve Rplus_Ropp_l : real.
@@ -260,14 +260,14 @@ Lemma Rplus_Ropp:(x,y:R)``x+y==0``->``y== -x``.
Intros; Replace y with ``(-x+x)+y``;
[ Rewrite -> Rplus_assoc; Rewrite -> H; Ring
| Ring ].
-Save.
+Qed.
(*i New i*)
Hint eqT_R_congr : real := Resolve (congr_eqT R).
Lemma Rplus_plus_r:(r,r1,r2:R)(r1==r2)->``r+r1==r+r2``.
Auto with real.
-Save.
+Qed.
(*i Old i*)Hints Resolve Rplus_plus_r : v62.
@@ -278,14 +278,14 @@ Lemma r_Rplus_plus:(r,r1,r2:R)``r+r1==r+r2``->r1==r2.
Transitivity ``(-r+r)+r2``.
Repeat Rewrite -> Rplus_assoc; Rewrite <- H; Reflexivity.
Ring.
-Save.
+Qed.
Hints Resolve r_Rplus_plus : real.
(**********)
Lemma Rplus_ne_i:(r,b:R)``r+b==r`` -> ``b==0``.
Intros r b; Pattern 2 r; Replace r with ``r+0``;
EAuto with real.
-Save.
+Qed.
(***********************************************************)
(** Multiplication *)
@@ -294,47 +294,47 @@ Save.
(**********)
Lemma Rinv_r:(r:R)``r<>0``->``r* (/r)==1``.
Intros; Rewrite -> Rmult_sym; Auto with real.
-Save.
+Qed.
Hints Resolve Rinv_r : real.
Lemma Rinv_l_sym:(r:R)``r<>0``->``1==(/r) * r``.
Symmetry; Auto with real.
-Save.
+Qed.
Lemma Rinv_r_sym:(r:R)``r<>0``->``1==r* (/r)``.
Symmetry; Auto with real.
-Save.
+Qed.
Hints Resolve Rinv_l_sym Rinv_r_sym : real.
(**********)
Lemma Rmult_Or :(r:R) ``r*0==0``.
Intro; Ring.
-Save.
+Qed.
Hints Resolve Rmult_Or : real v62.
(**********)
Lemma Rmult_Ol:(r:R)(``0*r==0``).
Intro; Ring.
-Save.
+Qed.
Hints Resolve Rmult_Ol : real v62.
(**********)
Lemma Rmult_ne:(r:R)``r*1==r``/\``1*r==r``.
Intro;Split;Ring.
-Save.
+Qed.
Hints Resolve Rmult_ne : real v62.
(**********)
Lemma Rmult_1r:(r:R)(``r*1==r``).
Intro; Ring.
-Save.
+Qed.
Hints Resolve Rmult_1r : real.
(**********)
Lemma Rmult_mult_r:(r,r1,r2:R)r1==r2->``r*r1==r*r2``.
Auto with real.
-Save.
+Qed.
(*i OLD i*)Hints Resolve Rmult_mult_r : v62.
@@ -345,7 +345,7 @@ Lemma r_Rmult_mult:(r,r1,r2:R)(``r*r1==r*r2``)->``r<>0``->(r1==r2).
Transitivity ``(/r * r)*r2``.
Repeat Rewrite Rmult_assoc; Rewrite H; Trivial.
Rewrite Rinv_l; Auto with real.
-Save.
+Qed.
(**********)
Lemma without_div_Od:(r1,r2:R)``r1*r2==0`` -> ``r1==0`` \/ ``r2==0``.
@@ -353,43 +353,43 @@ Lemma without_div_Od:(r1,r2:R)``r1*r2==0`` -> ``r1==0`` \/ ``r2==0``.
Auto.
Right; Apply r_Rmult_mult with r1; Trivial.
Rewrite H; Auto with real.
-Save.
+Qed.
(**********)
Lemma without_div_Oi:(r1,r2:R) ``r1==0``\/``r2==0`` -> ``r1*r2==0``.
Intros r1 r2 [H | H]; Rewrite H; Auto with real.
-Save.
+Qed.
Hints Resolve without_div_Oi : real.
(**********)
Lemma without_div_Oi1:(r1,r2:R) ``r1==0`` -> ``r1*r2==0``.
Auto with real.
-Save.
+Qed.
(**********)
Lemma without_div_Oi2:(r1,r2:R) ``r2==0`` -> ``r1*r2==0``.
Auto with real.
-Save.
+Qed.
(**********)
Lemma without_div_O_contr:(r1,r2:R)``r1*r2<>0`` -> ``r1<>0`` /\ ``r2<>0``.
Intros r1 r2 H; Split; Red; Intro; Apply H; Auto with real.
-Save.
+Qed.
(**********)
Lemma mult_non_zero :(r1,r2:R)``r1<>0`` /\ ``r2<>0`` -> ``r1*r2<>0``.
Red; Intros r1 r2 (H1,H2) H.
Case (without_div_Od r1 r2); Auto with real.
-Save.
+Qed.
Hints Resolve mult_non_zero : real.
(**********)
Lemma Rmult_Rplus_distrl:
(r1,r2,r3:R) ``(r1+r2)*r3 == (r1*r3)+(r2*r3)``.
Intros; Ring.
-Save.
+Qed.
(** Square function *)
@@ -399,12 +399,12 @@ Definition Rsqr:R->R:=[r:R]``r*r``.
(***********)
Lemma Rsqr_O:(Rsqr ``0``)==``0``.
Unfold Rsqr; Auto with real.
-Save.
+Qed.
(***********)
Lemma Rsqr_r_R0:(r:R)(Rsqr r)==``0``->``r==0``.
Unfold Rsqr;Intros;Elim (without_div_Od r r H);Trivial.
-Save.
+Qed.
(*********************************************************)
(** Opposite *)
@@ -413,25 +413,25 @@ Save.
(**********)
Lemma eq_Ropp:(r1,r2:R)(r1==r2)->``-r1 == -r2``.
Auto with real.
-Save.
+Qed.
Hints Resolve eq_Ropp : real.
(**********)
Lemma Ropp_O:``-0==0``.
Ring.
-Save.
+Qed.
Hints Resolve Ropp_O : real v62.
(**********)
Lemma eq_RoppO:(r:R)``r==0``-> ``-r==0``.
Intros; Rewrite -> H; Auto with real.
-Save.
+Qed.
Hints Resolve eq_RoppO : real.
(**********)
Lemma Ropp_Ropp:(r:R)``-(-r)==r``.
Intro; Ring.
-Save.
+Qed.
Hints Resolve Ropp_Ropp : real.
(*********)
@@ -439,115 +439,115 @@ Lemma Ropp_neq:(r:R)``r<>0``->``-r<>0``.
Red;Intros r H H0.
Apply H.
Transitivity ``-(-r)``; Auto with real.
-Save.
+Qed.
Hints Resolve Ropp_neq : real.
(**********)
Lemma Ropp_distr1:(r1,r2:R)``-(r1+r2)==(-r1 + -r2)``.
Intros; Ring.
-Save.
+Qed.
Hints Resolve Ropp_distr1 : real.
(** Opposite and multiplication *)
Lemma Ropp_mul1:(r1,r2:R)``(-r1)*r2 == -(r1*r2)``.
Intros; Ring.
-Save.
+Qed.
Hints Resolve Ropp_mul1 : real.
(**********)
Lemma Ropp_mul2:(r1,r2:R)``(-r1)*(-r2)==r1*r2``.
Intros; Ring.
-Save.
+Qed.
Hints Resolve Ropp_mul2 : real.
(** Substraction *)
Lemma minus_R0:(r:R)``r-0==r``.
Intro;Ring.
-Save.
+Qed.
Hints Resolve minus_R0 : real.
Lemma Rminus_Ropp:(r:R)``0-r==-r``.
Intro;Ring.
-Save.
+Qed.
Hints Resolve Rminus_Ropp : real.
(**********)
Lemma Ropp_distr2:(r1,r2:R)``-(r1-r2)==r2-r1``.
Intros; Ring.
-Save.
+Qed.
Hints Resolve Ropp_distr2 : real.
Lemma Ropp_distr3:(r1,r2:R)``-(r2-r1)==r1-r2``.
Intros; Ring.
-Save.
+Qed.
Hints Resolve Ropp_distr3 : real.
(**********)
Lemma eq_Rminus:(r1,r2:R)(r1==r2)->``r1-r2==0``.
Intros; Rewrite H; Ring.
-Save.
+Qed.
Hints Resolve eq_Rminus : real.
(**********)
Lemma Rminus_eq:(r1,r2:R)``r1-r2==0`` -> r1==r2.
Intros r1 r2; Unfold Rminus; Rewrite -> Rplus_sym; Intro.
Rewrite <- (Ropp_Ropp r2); Apply (Rplus_Ropp (Ropp r2) r1 H).
-Save.
+Qed.
Hints Immediate Rminus_eq : real.
Lemma Rminus_eq_right:(r1,r2:R)``r2-r1==0`` -> r1==r2.
Intros;Generalize (Rminus_eq r2 r1 H);Clear H;Intro H;Rewrite H;Ring.
-Save.
+Qed.
Hints Immediate Rminus_eq_right : real.
Lemma Rplus_Rminus: (p,q:R)``p+(q-p)``==q.
Intros; Ring.
-Save.
+Qed.
Hints Resolve Rplus_Rminus:real.
(**********)
Lemma Rminus_eq_contra:(r1,r2:R)``r1<>r2``->``r1-r2<>0``.
Red; Intros r1 r2 H H0.
Apply H; Auto with real.
-Save.
+Qed.
Hints Resolve Rminus_eq_contra : real.
Lemma Rminus_not_eq:(r1,r2:R)``r1-r2<>0``->``r1<>r2``.
Red; Intros; Elim H; Apply eq_Rminus; Auto.
-Save.
+Qed.
Hints Resolve Rminus_not_eq : real.
Lemma Rminus_not_eq_right:(r1,r2:R)``r2-r1<>0`` -> ``r1<>r2``.
Red; Intros;Elim H;Rewrite H0; Ring.
-Save.
+Qed.
Hints Resolve Rminus_not_eq_right : real.
(**********)
Lemma Rminus_distr: (x,y,z:R) ``x*(y-z)==(x*y) - (x*z)``.
Intros; Ring.
-Save.
+Qed.
(** Inverse *)
Lemma Rinv_R1:``/1==1``.
Apply (r_Rmult_mult ``1`` ``/1`` ``1``); Auto with real.
Rewrite (Rinv_r R1 R1_neq_R0);Auto with real.
-Save.
+Qed.
Hints Resolve Rinv_R1 : real.
(*********)
Lemma Rinv_neq_R0:(r:R)``r<>0``->``(/r)<>0``.
Red; Intros; Apply R1_neq_R0.
Replace ``1`` with ``(/r) * r``; Auto with real.
-Save.
+Qed.
Hints Resolve Rinv_neq_R0 : real.
(*********)
Lemma Rinv_Rinv:(r:R)``r<>0``->``/(/r)==r``.
Intros;Apply (r_Rmult_mult ``/r``); Auto with real.
Transitivity ``1``; Auto with real.
-Save.
+Qed.
Hints Resolve Rinv_Rinv : real.
(*********)
@@ -558,30 +558,30 @@ Transitivity ``(r1*/r1)*(r2*(/r2))``; Auto with real.
Rewrite Rinv_r; Trivial.
Rewrite Rinv_r; Auto with real.
Ring.
-Save.
+Qed.
(*********)
Lemma Ropp_Rinv:(r:R)``r<>0``->``-(/r)==/(-r)``.
Intros; Apply (r_Rmult_mult ``-r``);Auto with real.
Transitivity ``1``; Auto with real.
Rewrite (Ropp_mul2 r ``/r``); Auto with real.
-Save.
+Qed.
Lemma Rinv_r_simpl_r : (r1,r2:R)``r1<>0``->``r1*(/r1)*r2==r2``.
Intros; Transitivity ``1*r2``; Auto with real.
Rewrite Rinv_r; Auto with real.
-Save.
+Qed.
Lemma Rinv_r_simpl_l : (r1,r2:R)``r1<>0``->``r2*r1*(/r1)==r2``.
Intros; Transitivity ``r2*1``; Auto with real.
Transitivity ``r2*(r1*/r1)``; Auto with real.
-Save.
+Qed.
Lemma Rinv_r_simpl_m : (r1,r2:R)``r1<>0``->``r1*r2*(/r1)==r2``.
Intros; Transitivity ``r2*1``; Auto with real.
Transitivity ``r2*(r1*/r1)``; Auto with real.
Ring.
-Save.
+Qed.
Hints Resolve Rinv_r_simpl_l Rinv_r_simpl_r Rinv_r_simpl_m : real.
(*********)
@@ -589,14 +589,14 @@ Lemma Rinv_Rmult_simpl:(a,b,c:R)``a<>0``->``(a*(/b))*(c*(/a))==c*(/b)``.
Intros.
Transitivity ``(a*/a)*(c*(/b))``; Auto with real.
Ring.
-Save.
+Qed.
(** Order and addition *)
Lemma Rlt_compatibility_r:(r,r1,r2:R)``r1<r2``->``r1+r<r2+r``.
Intros.
Rewrite (Rplus_sym r1 r); Rewrite (Rplus_sym r2 r); Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_compatibility_r : real.
@@ -608,21 +608,21 @@ Elim (Rplus_ne r1); Elim (Rplus_ne r2); Intros; Rewrite <- H3;
Rewrite <- H1; Auto with zarith real.
Rewrite -> Rplus_assoc; Rewrite -> Rplus_assoc;
Apply (Rlt_compatibility ``-r`` ``r+r1`` ``r+r2`` H).
-Save.
+Qed.
(**********)
Lemma Rle_compatibility:(r,r1,r2:R)``r1<=r2`` -> ``r+r1 <= r+r2 ``.
Unfold Rle; Intros; Elim H; Intro.
Left; Apply (Rlt_compatibility r r1 r2 H0).
Right; Rewrite <- H0; Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma Rle_compatibility_r:(r,r1,r2:R)``r1<=r2`` -> ``r1+r<=r2+r``.
Unfold Rle; Intros; Elim H; Intro.
Left; Apply (Rlt_compatibility_r r r1 r2 H0).
Right; Rewrite <- H0; Auto with real.
-Save.
+Qed.
Hints Resolve Rle_compatibility Rle_compatibility_r : real.
@@ -631,7 +631,7 @@ Lemma Rle_anti_compatibility: (r,r1,r2:R)``r+r1<=r+r2`` -> ``r1<=r2``.
Unfold Rle; Intros; Elim H; Intro.
Left; Apply (Rlt_anti_compatibility r r1 r2 H0).
Right; Apply (r_Rplus_plus r r1 r2 H0).
-Save.
+Qed.
(**********)
Lemma sum_inequa_Rle_lt:(a,x,b,c,y,d:R)``a<=x`` -> ``x<b`` ->
@@ -639,28 +639,28 @@ Lemma sum_inequa_Rle_lt:(a,x,b,c,y,d:R)``a<=x`` -> ``x<b`` ->
Intros;Split.
Apply Rlt_le_trans with ``a+y``; Auto with real.
Apply Rlt_le_trans with ``b+y``; Auto with real.
-Save.
+Qed.
(*********)
Lemma Rplus_lt:(r1,r2,r3,r4:R)``r1<r2`` -> ``r3<r4`` -> ``r1+r3 < r2+r4``.
Intros; Apply Rlt_trans with ``r2+r3``; Auto with real.
-Save.
+Qed.
Lemma Rplus_le:(r1,r2,r3,r4:R)``r1<=r2`` -> ``r3<=r4`` -> ``r1+r3 <= r2+r4``.
Intros; Apply Rle_trans with ``r2+r3``; Auto with real.
-Save.
+Qed.
(*********)
Lemma Rplus_lt_le_lt:(r1,r2,r3,r4:R)``r1<r2`` -> ``r3<=r4`` ->
``r1+r3 < r2+r4``.
Intros; Apply Rlt_le_trans with ``r2+r3``; Auto with real.
-Save.
+Qed.
(*********)
Lemma Rplus_le_lt_lt:(r1,r2,r3,r4:R)``r1<=r2`` -> ``r3<r4`` ->
``r1+r3 < r2+r4``.
Intros; Apply Rle_lt_trans with ``r2+r3``; Auto with real.
-Save.
+Qed.
Hints Immediate Rplus_lt Rplus_le Rplus_lt_le_lt Rplus_le_lt_lt : real.
@@ -675,30 +675,30 @@ Replace ``r2+r1+(-r2)`` with r1.
Trivial.
Ring.
Ring.
-Save.
+Qed.
Hints Resolve Rgt_Ropp.
(**********)
Lemma Rlt_Ropp:(r1,r2:R) ``r1 < r2`` -> ``-r1 > -r2``.
Unfold Rgt; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_Ropp : real.
Lemma Ropp_Rlt: (x,y:R) ``-y < -x`` ->``x<y``.
Intros x y H'.
Rewrite <- (Ropp_Ropp x); Rewrite <- (Ropp_Ropp y); Auto with real.
-Save.
+Qed.
Hints Resolve Ropp_Rlt : real.
Lemma Rlt_Ropp1:(r1,r2:R) ``r2 < r1`` -> ``-r1 < -r2``.
Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_Ropp1 : real.
(**********)
Lemma Rle_Ropp:(r1,r2:R) ``r1 <= r2`` -> ``-r1 >= -r2``.
Unfold Rge; Intros r1 r2 [H|H]; Auto with real.
-Save.
+Qed.
Hints Resolve Rle_Ropp : real.
Lemma Ropp_Rle: (x,y:R) ``-y <= -x`` ->``x <= y``.
@@ -706,50 +706,50 @@ Intros x y H.
Elim H;Auto with real.
Intro H1;Rewrite <-(Ropp_Ropp x);Rewrite <-(Ropp_Ropp y);Rewrite H1;
Auto with real.
-Save.
+Qed.
Hints Resolve Ropp_Rle : real.
Lemma Rle_Ropp1:(r1,r2:R) ``r2 <= r1`` -> ``-r1 <= -r2``.
Intros r1 r2 H;Elim H;Auto with real.
Intro H1;Rewrite H1;Auto with real.
-Save.
+Qed.
Hints Resolve Rle_Ropp1 : real.
(**********)
Lemma Rge_Ropp:(r1,r2:R) ``r1 >= r2`` -> ``-r1 <= -r2``.
Unfold Rge; Intros r1 r2 [H|H]; Auto with real.
-Save.
+Qed.
Hints Resolve Rge_Ropp : real.
(**********)
Lemma Rlt_RO_Ropp:(r:R) ``0 < r`` -> ``0 > -r``.
Intros; Replace ``0`` with ``-0``; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_RO_Ropp : real.
(**********)
Lemma Rgt_RO_Ropp:(r:R) ``0 > r`` -> ``0 < -r``.
Intros; Replace ``0`` with ``-0``; Auto with real.
-Save.
+Qed.
Hints Resolve Rgt_RO_Ropp : real.
(**********)
Lemma Rle_RO_Ropp:(r:R) ``0 <= r`` -> ``0 >= -r``.
Intros; Replace ``0`` with ``-0``; Auto with real.
-Save.
+Qed.
Hints Resolve Rle_RO_Ropp : real.
(**********)
Lemma Rge_RO_Ropp:(r:R) ``0 >= r`` -> ``0 <= -r``.
Intros; Replace ``0`` with ``-0``; Auto with real.
-Save.
+Qed.
Hints Resolve Rge_RO_Ropp : real.
(** Order and multiplication *)
Lemma Rlt_monotony_r:(r,r1,r2:R)``0<r`` -> ``r1 < r2`` -> ``r1*r < r2*r``.
Intros; Rewrite (Rmult_sym r1 r); Rewrite (Rmult_sym r2 r); Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_monotony_r.
Lemma Rlt_monotony_contra:
@@ -760,27 +760,27 @@ Case (total_order x y); Intros Eq0; Auto; Elim Eq0; Clear Eq0; Intros Eq0.
Generalize (Rlt_monotony z y x H Eq0);Intro;ElimType False;
Generalize (Rlt_trans ``z*x`` ``z*y`` ``z*x`` H0 H1);Intro;
Apply (Rlt_antirefl ``z*x``);Auto.
-Save.
+Qed.
Lemma Rlt_anti_monotony:(r,r1,r2:R)``r < 0`` -> ``r1 < r2`` -> ``r*r1 > r*r2``.
Intros; Replace r with ``-(-r)``; Auto with real.
Rewrite (Ropp_mul1 ``-r``); Rewrite (Ropp_mul1 ``-r``).
Apply Rlt_Ropp; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rle_monotony:
(r,r1,r2:R)``0 <= r`` -> ``r1 <= r2`` -> ``r*r1 <= r*r2``.
Intros r r1 r2;Unfold Rle;Intros H H0;Elim H;Elim H0;Intros; Auto with real.
Right;Rewrite <- H2;Ring.
-Save.
+Qed.
Hints Resolve Rle_monotony : real.
Lemma Rle_monotony_r:
(r,r1,r2:R)``0 <= r`` -> ``r1 <= r2`` -> ``r1*r <= r2*r``.
Intros r r1 r2 H;
Rewrite (Rmult_sym r1 r); Rewrite (Rmult_sym r2 r); Auto with real.
-Save.
+Qed.
Hints Resolve Rle_monotony_r : real.
Lemma Rle_monotony_contra:
@@ -793,14 +793,14 @@ Replace y with (Rmult (Rinv z) (Rmult z y)).
Rewrite H1;Auto with real.
Rewrite <- Rmult_assoc; Rewrite Rinv_l; Auto with real.
Rewrite <- Rmult_assoc; Rewrite Rinv_l; Auto with real.
-Save.
+Qed.
Lemma Rle_anti_monotony
:(r,r1,r2:R)``r <= 0`` -> ``r1 <= r2`` -> ``r*r1 >= r*r2``.
Intros; Replace r with ``-(-r)``; Auto with real.
Rewrite (Ropp_mul1 ``-r``); Rewrite (Ropp_mul1 ``-r``).
Apply Rle_Ropp; Auto with real.
-Save.
+Qed.
Hints Resolve Rle_anti_monotony : real.
Lemma Rle_Rmult_comp:
@@ -811,13 +811,13 @@ Apply Rle_trans with r2 := ``x*t``; Auto with real.
Repeat Rewrite [x:?](Rmult_sym x t).
Apply Rle_monotony; Auto.
Apply Rle_trans with z; Auto.
-Save.
+Qed.
Hints Resolve Rle_Rmult_comp :real.
Lemma Rmult_lt:(r1,r2,r3,r4:R)``r3>0`` -> ``r2>0`` ->
`` r1 < r2`` -> ``r3 < r4`` -> ``r1*r3 < r2*r4``.
Intros; Apply Rlt_trans with ``r2*r3``; Auto with real.
-Save.
+Qed.
(** Order and Substractions *)
Lemma Rlt_minus:(r1,r2:R)``r1 < r2`` -> ``r1-r2 < 0``.
@@ -825,33 +825,33 @@ Intros; Apply (Rlt_anti_compatibility ``r2``).
Replace ``r2+(r1-r2)`` with r1.
Replace ``r2+0`` with r2; Auto with real.
Ring.
-Save.
+Qed.
Hints Resolve Rlt_minus : real.
(**********)
Lemma Rle_minus:(r1,r2:R)``r1 <= r2`` -> ``r1-r2 <= 0``.
Unfold Rle; Intros; Elim H; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rminus_lt:(r1,r2:R)``r1-r2 < 0`` -> ``r1 < r2``.
Intros; Replace r1 with ``r1-r2+r2``.
Pattern 3 r2; Replace r2 with ``0+r2``; Auto with real.
Ring.
-Save.
+Qed.
(**********)
Lemma Rminus_le:(r1,r2:R)``r1-r2 <= 0`` -> ``r1 <= r2``.
Intros; Replace r1 with ``r1-r2+r2``.
Pattern 3 r2; Replace r2 with ``0+r2``; Auto with real.
Ring.
-Save.
+Qed.
(**********)
Lemma tech_Rplus:(r,s:R)``0<=r`` -> ``0<s`` -> ``r+s<>0``.
Intros; Apply sym_not_eqT; Apply Rlt_not_eq.
Rewrite Rplus_sym; Replace ``0`` with ``0+0``; Auto with real.
-Save.
+Qed.
Hints Immediate tech_Rplus : real.
(** Order and the square function *)
@@ -860,7 +860,7 @@ Intro; Case (total_order_Rlt_Rle r ``0``); Unfold Rsqr; Intro.
Replace ``r*r`` with ``(-r)*(-r)``; Auto with real.
Replace ``0`` with ``-r*0``; Auto with real.
Replace ``0`` with ``0*r``; Auto with real.
-Save.
+Qed.
(***********)
Lemma pos_Rsqr1:(r:R)``r<>0``->``0<(Rsqr r)``.
@@ -868,14 +868,14 @@ Intros; Case (not_Req r ``0``); Trivial; Unfold Rsqr; Intro.
Replace ``r*r`` with ``(-r)*(-r)``; Auto with real.
Replace ``0`` with ``-r*0``; Auto with real.
Replace ``0`` with ``0*r``; Auto with real.
-Save.
+Qed.
Hints Resolve pos_Rsqr pos_Rsqr1 : real.
(** Zero is less than one *)
Lemma Rlt_R0_R1:``0<1``.
Replace ``1`` with ``(Rsqr 1)``; Auto with real.
Unfold Rsqr; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_R0_R1 : real.
(** Order and inverse *)
@@ -884,7 +884,7 @@ Intros; Change ``/r>0``; Apply not_Rle; Red; Intros.
Absurd ``1<=0``; Auto with real.
Replace ``1`` with ``r*(/r)``; Auto with real.
Replace ``0`` with ``r*0``; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_Rinv : real.
(*********)
@@ -893,7 +893,7 @@ Intros; Change ``0>/r``; Apply not_Rle; Red; Intros.
Absurd ``1<=0``; Auto with real.
Replace ``1`` with ``r*(/r)``; Auto with real.
Replace ``0`` with ``r*0``; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_Rinv2 : real.
(**********)
@@ -905,7 +905,7 @@ Transitivity ``r*/r*r2``; Auto with real.
Ring.
Transitivity ``r*/r*r1``; Auto with real.
Ring.
-Save.
+Qed.
(*********)
Lemma Rinv_lt:(r1,r2:R)``0 < r1*r2`` -> ``r1 < r2`` -> ``/r2 < /r1``.
@@ -915,7 +915,7 @@ Replace ``r1*r2*/r2`` with r1.
Replace ``r1*r2*/r1`` with r2; Trivial.
Symmetry; Auto with real.
Symmetry; Auto with real.
-Save.
+Qed.
Lemma Rlt_Rinv_R1: (x, y:R) ``1 <= x`` -> ``x<y`` ->``/y< /x``.
Intros x y H' H'0.
@@ -931,7 +931,7 @@ Rewrite (Rmult_sym x); Rewrite <- Rmult_assoc; Rewrite (Rmult_sym y (Rinv y));
Rewrite Rinv_l; Auto with real.
Apply imp_not_Req; Right.
Red; Apply Rlt_trans with r2 := x; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_Rinv_R1 :real.
(*********************************************************)
@@ -941,30 +941,30 @@ Hints Resolve Rlt_Rinv_R1 :real.
(**********)
Lemma Rge_ge_eq:(r1,r2:R)``r1 >= r2`` -> ``r2 >= r1`` -> r1==r2.
Intros; Apply Rle_antisym; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rlt_not_ge:(r1,r2:R)~(``r1<r2``)->``r1>=r2``.
Intros; Unfold Rge; Elim (total_order r1 r2); Intro.
Absurd ``r1<r2``; Trivial.
Case H0; Auto.
-Save.
+Qed.
(**********)
Lemma Rgt_not_le:(r1,r2:R)~(``r1>r2``)->``r1<=r2``.
Intros r1 r2 H; Apply Rge_le.
Exact (Rlt_not_ge r2 r1 H).
-Save.
+Qed.
(**********)
Lemma Rgt_ge:(r1,r2:R)``r1>r2`` -> ``r1 >= r2``.
Red; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rlt_sym:(r1,r2:R)``r1<r2`` <-> ``r2>r1``.
Split; Unfold Rgt; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rle_sym1:(r1,r2:R)``r1<=r2``->``r2>=r1``.
@@ -977,38 +977,38 @@ Proof [r1,r2](Rge_le r2 r1).
(**********)
Lemma Rle_sym:(r1,r2:R)``r1<=r2``<->``r2>=r1``.
Split; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rge_gt_trans:(r1,r2,r3:R)``r1>=r2``->``r2>r3``->``r1>r3``.
Unfold Rgt; Intros; Apply Rlt_le_trans with r2; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rgt_ge_trans:(r1,r2,r3:R)``r1>r2`` -> ``r2>=r3`` -> ``r1>r3``.
Unfold Rgt; Intros; Apply Rle_lt_trans with r2; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rgt_trans:(r1,r2,r3:R)``r1>r2`` -> ``r2>r3`` -> ``r1>r3``.
Unfold Rgt; Intros; Apply Rlt_trans with r2; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rge_trans:(r1,r2,r3:R)``r1>=r2`` -> ``r2>=r3`` -> ``r1>=r3``.
Intros; Apply Rle_ge.
Apply Rle_trans with r2; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rgt_RoppO:(r:R)``r>0``->``(-r)<0``.
Intros; Rewrite <- Ropp_O; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rlt_RoppO:(r:R)``r<0``->``-r>0``.
Intros; Rewrite <- Ropp_O; Auto with real.
-Save.
+Qed.
Hints Resolve Rgt_RoppO Rlt_RoppO: real.
(**********)
@@ -1016,87 +1016,87 @@ Lemma Rlt_r_plus_R1:(r:R)``0<=r`` -> ``0<r+1``.
Intros.
Apply Rlt_le_trans with ``1``; Auto with real.
Pattern 1 ``1``; Replace ``1`` with ``0+1``; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_r_plus_R1: real.
(**********)
Lemma Rlt_r_r_plus_R1:(r:R)``r<r+1``.
Intros.
Pattern 1 r; Replace r with ``r+0``; Auto with real.
-Save.
+Qed.
Hints Resolve Rlt_r_r_plus_R1: real.
(**********)
Lemma tech_Rgt_minus:(r1,r2:R)``0<r2``->``r1>r1-r2``.
Red; Unfold Rminus; Intros.
Pattern 2 r1; Replace r1 with ``r1+0``; Auto with real.
-Save.
+Qed.
(***********)
Lemma Rgt_plus_plus_r:(r,r1,r2:R)``r1>r2``->``r+r1 > r+r2``.
Unfold Rgt; Auto with real.
-Save.
+Qed.
Hints Resolve Rgt_plus_plus_r : real.
(***********)
Lemma Rgt_r_plus_plus:(r,r1,r2:R)``r+r1 > r+r2`` -> ``r1 > r2``.
Unfold Rgt; Intros; Apply (Rlt_anti_compatibility r r2 r1 H).
-Save.
+Qed.
(***********)
Lemma Rge_plus_plus_r:(r,r1,r2:R)``r1>=r2`` -> ``r+r1 >= r+r2``.
Intros; Apply Rle_ge; Auto with real.
-Save.
+Qed.
Hints Resolve Rge_plus_plus_r : real.
(***********)
Lemma Rge_r_plus_plus:(r,r1,r2:R)``r+r1 >= r+r2`` -> ``r1>=r2``.
Intros; Apply Rle_ge; Apply Rle_anti_compatibility with r; Auto with real.
-Save.
+Qed.
(***********)
Lemma Rge_monotony:
(x,y,z:R) ``z>=0`` -> ``x>=y`` -> ``x*z >= y*z``.
Intros; Apply Rle_ge; Auto with real.
-Save.
+Qed.
(***********)
Lemma Rgt_minus:(r1,r2:R)``r1>r2`` -> ``r1-r2 > 0``.
Intros; Replace ``0`` with ``r2-r2``; Auto with real.
Unfold Rgt Rminus; Auto with real.
-Save.
+Qed.
(*********)
Lemma minus_Rgt:(r1,r2:R)``r1-r2 > 0`` -> ``r1>r2``.
Intros; Replace r2 with ``r2+0``; Auto with real.
Intros; Replace r1 with ``r2+(r1-r2)``; Auto with real.
-Save.
+Qed.
(**********)
Lemma Rge_minus:(r1,r2:R)``r1>=r2`` -> ``r1-r2 >= 0``.
Unfold Rge; Intros; Elim H; Intro.
Left; Apply (Rgt_minus r1 r2 H0).
Right; Apply (eq_Rminus r1 r2 H0).
-Save.
+Qed.
(*********)
Lemma minus_Rge:(r1,r2:R)``r1-r2 >= 0`` -> ``r1>=r2``.
Intros; Replace r2 with ``r2+0``; Auto with real.
Intros; Replace r1 with ``r2+(r1-r2)``; Auto with real.
-Save.
+Qed.
(*********)
Lemma Rmult_gt:(r1,r2:R)``r1>0`` -> ``r2>0`` -> ``r1*r2>0``.
Unfold Rgt;Intros.
Replace ``0`` with ``0*r2``; Auto with real.
-Save.
+Qed.
(*********)
Lemma Rmult_lt_0
:(r1,r2,r3,r4:R)``r3>=0``->``r2>0``->``r1<r2``->``r3<r4``->``r1*r3<r2*r4``.
Intros; Apply Rle_lt_trans with ``r2*r3``; Auto with real.
-Save.
+Qed.
(*********)
Lemma Rmult_lt_pos:(x,y:R)``0<x`` -> ``0<y`` -> ``0<x*y``.
@@ -1108,7 +1108,7 @@ Intros a b [H|H] H0 H1; Auto with real.
Absurd ``0<a+b``.
Rewrite H1; Auto with real.
Replace ``0`` with ``0+0``; Auto with real.
-Save.
+Qed.
Lemma Rplus_eq_R0
@@ -1117,20 +1117,20 @@ Split.
Apply Rplus_eq_R0_l with b; Auto with real.
Apply Rplus_eq_R0_l with a; Auto with real.
Rewrite Rplus_sym; Auto with real.
-Save.
+Qed.
(***********)
Lemma Rplus_Rsr_eq_R0_l:(a,b:R)``(Rsqr a)+(Rsqr b)==0``->``a==0``.
Intros; Apply Rsqr_r_R0; Apply Rplus_eq_R0_l with (Rsqr b); Auto with real.
-Save.
+Qed.
Lemma Rplus_Rsr_eq_R0:(a,b:R)``(Rsqr a)+(Rsqr b)==0``->``a==0``/\``b==0``.
Split.
Apply Rplus_Rsr_eq_R0_l with b; Auto with real.
Apply Rplus_Rsr_eq_R0_l with a; Auto with real.
Rewrite Rplus_sym; Auto with real.
-Save.
+Qed.
(**********************************************************)
@@ -1140,13 +1140,13 @@ Save.
(**********)
Lemma S_INR:(n:nat)(INR (S n))==``(INR n)+1``.
Intro; Case n; Auto with real.
-Save.
+Qed.
(**********)
Lemma S_O_plus_INR:(n:nat)
(INR (plus (S O) n))==``(INR (S O))+(INR n)``.
Intro; Simpl; Case n; Intros; Auto with real.
-Save.
+Qed.
(**********)
Lemma plus_INR:(n,m:nat)(INR (plus n m))==``(INR n)+(INR m)``.
@@ -1155,7 +1155,7 @@ Simpl; Auto with real.
Replace (plus (S n) m) with (S (plus n m)); Auto with arith.
Repeat Rewrite S_INR.
Rewrite Hrecn; Ring.
-Save.
+Qed.
(**********)
Lemma minus_INR:(n,m:nat)(le m n)->(INR (minus n m))==``(INR n)-(INR m)``.
@@ -1163,7 +1163,7 @@ Intros n m le; Pattern m n; Apply le_elim_rel; Auto with real.
Intros; Rewrite <- minus_n_O; Auto with real.
Intros; Repeat Rewrite S_INR; Simpl.
Rewrite H0; Ring.
-Save.
+Qed.
(*********)
Lemma mult_INR:(n,m:nat)(INR (mult n m))==(Rmult (INR n) (INR m)).
@@ -1171,7 +1171,7 @@ Intros n m; Induction n.
Simpl; Auto with real.
Intros; Repeat Rewrite S_INR; Simpl.
Rewrite plus_INR; Rewrite Hrecn; Ring.
-Save.
+Qed.
Hints Resolve plus_INR minus_INR mult_INR : real.
@@ -1179,19 +1179,19 @@ Hints Resolve plus_INR minus_INR mult_INR : real.
Lemma lt_INR_0:(n:nat)(lt O n)->``0 < (INR n)``.
Induction 1; Intros; Auto with real.
Rewrite S_INR; Auto with real.
-Save.
+Qed.
Hints Resolve lt_INR_0: real.
Lemma lt_INR:(n,m:nat)(lt n m)->``(INR n) < (INR m)``.
Induction 1; Intros; Auto with real.
Rewrite S_INR; Auto with real.
Rewrite S_INR; Apply Rlt_trans with (INR m0); Auto with real.
-Save.
+Qed.
Hints Resolve lt_INR: real.
Lemma INR_lt_1:(n:nat)(lt (S O) n)->``1 < (INR n)``.
Intros;Replace ``1`` with (INR (S O));Auto with real.
-Save.
+Qed.
Hints Resolve INR_lt_1: real.
(**********)
@@ -1199,7 +1199,7 @@ Lemma INR_pos : (p:positive)``0<(INR (convert p))``.
Intro; Apply lt_INR_0.
Simpl; Auto with real.
Apply compare_convert_O.
-Save.
+Qed.
Hints Resolve INR_pos : real.
(**********)
@@ -1207,7 +1207,7 @@ Lemma pos_INR:(n:nat)``0 <= (INR n)``.
Intro n; Case n.
Simpl; Auto with real.
Auto with arith real.
-Save.
+Qed.
Hints Resolve pos_INR: real.
Lemma INR_lt:(n,m:nat)``(INR n) < (INR m)``->(lt n m).
@@ -1222,7 +1222,7 @@ Do 2 Rewrite S_INR in H1;Cut ``(INR n1) < (INR n0)``.
Intro H2;Generalize (H0 n0 H2);Intro;Auto with arith.
Apply (Rlt_anti_compatibility ``1`` (INR n1) (INR n0)).
Rewrite Rplus_sym;Rewrite (Rplus_sym ``1`` (INR n0));Trivial.
-Save.
+Qed.
Hints Resolve INR_lt: real.
(*********)
@@ -1230,7 +1230,7 @@ Lemma le_INR:(n,m:nat)(le n m)->``(INR n)<=(INR m)``.
Induction 1; Intros; Auto with real.
Rewrite S_INR.
Apply Rle_trans with (INR m0); Auto with real.
-Save.
+Qed.
Hints Resolve le_INR: real.
(**********)
@@ -1238,7 +1238,7 @@ Lemma not_INR_O:(n:nat)``(INR n)<>0``->~n=O.
Red; Intros n H H1.
Apply H.
Rewrite H1; Trivial.
-Save.
+Qed.
Hints Immediate not_INR_O : real.
(**********)
@@ -1247,7 +1247,7 @@ Intro n; Case n.
Intro; Absurd (0)=(0); Trivial.
Intros; Rewrite S_INR.
Apply Rgt_not_eq; Red; Auto with real.
-Save.
+Qed.
Hints Resolve not_O_INR : real.
Lemma not_nm_INR:(n,m:nat)~n=m->``(INR n)<>(INR m)``.
@@ -1256,7 +1256,7 @@ Case (le_lt_or_eq ? ? H1); Intros H2.
Apply imp_not_Req; Auto with real.
ElimType False;Auto.
Apply sym_not_eqT; Apply imp_not_Req; Auto with real.
-Save.
+Qed.
Hints Resolve not_nm_INR : real.
Lemma INR_eq: (n,m:nat)(INR n)==(INR m)->n=m.
@@ -1270,19 +1270,19 @@ Symmetry;Cut ~m=n.
Intro H3;Generalize (not_nm_INR m n H3);Intro H4;
ElimType False;Auto.
Omega.
-Save.
+Qed.
Hints Resolve INR_eq : real.
Lemma INR_le: (n, m : nat) (Rle (INR n) (INR m)) -> (le n m).
Intros;Elim H;Intro.
Generalize (INR_lt n m H0);Intro;Auto with arith.
Generalize (INR_eq n m H0);Intro;Rewrite H1;Auto.
-Save.
+Qed.
Hints Resolve INR_le : real.
Lemma not_1_INR:(n:nat)~n=(S O)->``(INR n)<>1``.
Replace ``1`` with (INR (S O)); Auto with real.
-Save.
+Qed.
Hints Resolve not_1_INR : real.
(**********************************************************)
@@ -1295,13 +1295,13 @@ Definition INZ:=inject_nat.
(**********)
Lemma IZN:(z:Z)(`0<=z`)->(Ex [n:nat] z=(INZ n)).
Unfold INZ;Intros;Apply inject_nat_complete;Assumption.
-Save.
+Qed.
(**********)
Lemma INR_IZR_INZ:(n:nat)(INR n)==(IZR (INZ n)).
Induction n; Auto with real.
Intros; Simpl; Rewrite bij1; Auto with real.
-Save.
+Qed.
Lemma plus_IZR_NEG_POS :
(p,q:positive)(IZR `(POS p)+(NEG q)`)==``(IZR (POS p))+(IZR (NEG q))``.
@@ -1319,7 +1319,7 @@ Rewrite convert_compare_SUPERIEUR; Simpl; Auto with arith.
Rewrite (true_sub_convert p q).
Rewrite minus_INR; Auto with arith; Ring.
Apply ZC2; Apply convert_compare_INFERIEUR; Trivial.
-Save.
+Qed.
(**********)
Lemma plus_IZR:(z,t:Z)(IZR `z+t`)==``(IZR z)+(IZR t)``.
@@ -1328,7 +1328,7 @@ Simpl; Intros; Rewrite convert_add; Auto with real.
Apply plus_IZR_NEG_POS.
Rewrite Zplus_sym; Rewrite Rplus_sym; Apply plus_IZR_NEG_POS.
Simpl; Intros; Rewrite convert_add; Rewrite plus_INR; Auto with real.
-Save.
+Qed.
(**********)
Lemma mult_IZR:(z,t:Z)(IZR `z*t`)==``(IZR z)*(IZR t)``.
@@ -1342,18 +1342,18 @@ Intros t1 z1; Rewrite times_convert; Auto with real.
Rewrite Ropp_mul1; Auto with real.
Intros t1 z1; Rewrite times_convert; Auto with real.
Rewrite Ropp_mul2; Auto with real.
-Save.
+Qed.
(**********)
Lemma Ropp_Ropp_IZR:(z:Z)(IZR (`-z`))==``-(IZR z)``.
Intro z; Case z; Simpl; Auto with real.
-Save.
+Qed.
(**********)
Lemma Z_R_minus:(z1,z2:Z)``(IZR z1)-(IZR z2)``==(IZR `z1-z2`).
Intros; Unfold Rminus; Unfold Zminus.
Rewrite <-(Ropp_Ropp_IZR z2); Symmetry; Apply plus_IZR.
-Save.
+Qed.
(**********)
Lemma lt_O_IZR:(z:Z)``0 < (IZR z)``->`0<z`.
@@ -1362,7 +1362,7 @@ Absurd ``0<0``; Auto with real.
Unfold Zlt; Simpl; Trivial.
Case Rlt_le_not with 1:=H.
Replace ``0`` with ``-0``; Auto with real.
-Save.
+Qed.
(**********)
Lemma lt_IZR:(z1,z2:Z)``(IZR z1)<(IZR z2)``->`z1<z2`.
@@ -1370,34 +1370,34 @@ Intros; Apply Zlt_O_minus_lt.
Apply lt_O_IZR.
Rewrite <- Z_R_minus.
Exact (Rgt_minus (IZR z2) (IZR z1) H).
-Save.
+Qed.
(**********)
Lemma eq_IZR_R0:(z:Z)``(IZR z)==0``->`z=0`.
NewDestruct z; Simpl; Intros; Auto with zarith.
Case (Rlt_not_eq ``0`` (INR (convert p))); Auto with real.
Case (Rlt_not_eq ``-(INR (convert p))`` ``0`` ); Auto with real.
-Save.
+Qed.
(**********)
Lemma eq_IZR:(z1,z2:Z)(IZR z1)==(IZR z2)->z1=z2.
Intros;Generalize (eq_Rminus (IZR z1) (IZR z2) H);
Rewrite (Z_R_minus z1 z2);Intro;Generalize (eq_IZR_R0 `z1-z2` H0);
Intro;Omega.
-Save.
+Qed.
(**********)
Lemma not_O_IZR:(z:Z)`z<>0`->``(IZR z)<>0``.
Intros z H; Red; Intros H0; Case H.
Apply eq_IZR; Auto.
-Save.
+Qed.
(*********)
Lemma le_O_IZR:(z:Z)``0<= (IZR z)``->`0<=z`.
Unfold Rle; Intros z [H|H].
Red;Intro;Apply (Zlt_le_weak `0` z (lt_O_IZR z H)); Assumption.
Rewrite (eq_IZR_R0 z); Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma le_IZR:(z1,z2:Z)``(IZR z1)<=(IZR z2)``->`z1<=z2`.
@@ -1405,31 +1405,31 @@ Unfold Rle; Intros z1 z2 [H|H].
Apply (Zlt_le_weak z1 z2); Auto with real.
Apply lt_IZR; Trivial.
Rewrite (eq_IZR z1 z2); Auto with zarith real.
-Save.
+Qed.
(**********)
Lemma le_IZR_R1:(z:Z)``(IZR z)<=1``-> `z<=1`.
Pattern 1 ``1``; Replace ``1`` with (IZR `1`); Intros; Auto.
Apply le_IZR; Trivial.
-Save.
+Qed.
(**********)
Lemma IZR_ge: (m,n:Z) `m>= n` -> ``(IZR m)>=(IZR n)``.
Intros;Apply Rlt_not_ge;Red;Intro.
Generalize (lt_IZR m n H0); Intro; Omega.
-Save.
+Qed.
Lemma IZR_le: (m,n:Z) `m<= n` -> ``(IZR m)<=(IZR n)``.
Intros;Apply Rgt_not_le;Red;Intro.
Unfold Rgt in H0;Generalize (lt_IZR n m H0); Intro; Omega.
-Save.
+Qed.
Lemma IZR_lt: (m,n:Z) `m< n` -> ``(IZR m)<(IZR n)``.
Intros;Cut `m<=n`.
Intro H0;Elim (IZR_le m n H0);Intro;Auto.
Generalize (eq_IZR m n H1);Intro;ElimType False;Omega.
Omega.
-Save.
+Qed.
Lemma one_IZR_lt1 : (z:Z)``-1<(IZR z)<1``->`z=0`.
Intros z (H1,H2).
@@ -1437,7 +1437,7 @@ Apply Zle_antisym.
Apply Zlt_n_Sm_le; Apply lt_IZR; Trivial.
Replace `0` with (Zs `-1`); Trivial.
Apply Zlt_le_S; Apply lt_IZR; Trivial.
-Save.
+Qed.
Lemma one_IZR_r_R1
: (r:R)(z,x:Z)``r<(IZR z)<=r+1``->``r<(IZR x)<=r+1``->z=x.
@@ -1451,7 +1451,7 @@ Ring.
Replace ``1`` with ``(r+1)-r``.
Unfold Rminus; Apply Rplus_le_lt_lt; Auto with real.
Ring.
-Save.
+Qed.
(**********)
@@ -1459,7 +1459,7 @@ Lemma single_z_r_R1:
(r:R)(z,x:Z)``r<(IZR z)``->``(IZR z)<=r+1``->``r<(IZR x)``->
``(IZR x)<=r+1``->z=x.
Intros; Apply one_IZR_r_R1 with r; Auto.
-Save.
+Qed.
(**********)
Lemma tech_single_z_r_R1
@@ -1467,7 +1467,7 @@ Lemma tech_single_z_r_R1
-> (Ex [s:Z] (~s=z/\``r<(IZR s)``/\``(IZR s)<=r+1``))->False.
Intros r z H1 H2 (s, (H3,(H4,H5))).
Apply H3; Apply single_z_r_R1 with r; Trivial.
-Save.
+Qed.
(*****************************************************************)
(** Definitions of new types *)
@@ -1496,12 +1496,12 @@ cond_nonzero : ~``nonzero==0`` }.
(**********)
Lemma prod_neq_R0 : (x,y:R) ~``x==0``->~``y==0``->~``x*y==0``.
Intros; Red; Intro; Generalize (without_div_Od x y H1); Intro; Elim H2; Intro; [Rewrite H3 in H; Elim H | Rewrite H3 in H0; Elim H0]; Reflexivity.
-Save.
+Qed.
(*********)
Lemma Rmult_le_pos : (x,y:R) ``0<=x`` -> ``0<=y`` -> ``0<=x*y``.
Intros; Rewrite <- (Rmult_Ol x); Rewrite <- (Rmult_sym x); Apply (Rle_monotony x R0 y H H0).
-Save.
+Qed.
(**********************************************************)
(** Other rules about < and <= *)
@@ -1509,31 +1509,31 @@ Save.
Lemma gt0_plus_gt0_is_gt0 : (x,y:R) ``0<x`` -> ``0<y`` -> ``0<x+y``.
Intros; Apply Rlt_trans with x; [Assumption | Pattern 1 x; Rewrite <- (Rplus_Or x); Apply Rlt_compatibility; Assumption].
-Save.
+Qed.
Lemma ge0_plus_gt0_is_gt0 : (x,y:R) ``0<=x`` -> ``0<y`` -> ``0<x+y``.
Intros; Apply Rle_lt_trans with x; [Assumption | Pattern 1 x; Rewrite <- (Rplus_Or x); Apply Rlt_compatibility; Assumption].
-Save.
+Qed.
Lemma gt0_plus_ge0_is_gt0 : (x,y:R) ``0<x`` -> ``0<=y`` -> ``0<x+y``.
Intros; Rewrite <- Rplus_sym; Apply ge0_plus_gt0_is_gt0; Assumption.
-Save.
+Qed.
Lemma ge0_plus_ge0_is_ge0 : (x,y:R) ``0<=x`` -> ``0<=y`` -> ``0<=x+y``.
Intros; Apply Rle_trans with x; [Assumption | Pattern 1 x; Rewrite <- (Rplus_Or x); Apply Rle_compatibility; Assumption].
-Save.
+Qed.
Lemma plus_le_is_le : (x,y,z:R) ``0<=y`` -> ``x+y<=z`` -> ``x<=z``.
Intros; Apply Rle_trans with ``x+y``; [Pattern 1 x; Rewrite <- (Rplus_Or x); Apply Rle_compatibility; Assumption | Assumption].
-Save.
+Qed.
Lemma plus_lt_is_lt : (x,y,z:R) ``0<=y`` -> ``x+y<z`` -> ``x<z``.
Intros; Apply Rle_lt_trans with ``x+y``; [Pattern 1 x; Rewrite <- (Rplus_Or x); Apply Rle_compatibility; Assumption | Assumption].
-Save.
+Qed.
Lemma Rmult_lt2 : (r1,r2,r3,r4:R) ``0<=r1`` -> ``0<=r3`` -> ``r1<r2`` -> ``r3<r4`` -> ``r1*r3<r2*r4``.
Intros; Apply Rle_lt_trans with ``r2*r3``; [Apply Rle_monotony_r; [Assumption | Left; Assumption] | Apply Rlt_monotony; [Apply Rle_lt_trans with r1; Assumption | Assumption]].
-Save.
+Qed.
Lemma le_epsilon : (x,y:R) ((eps : R) ``0<eps``->``x<=y+eps``) -> ``x<=y``.
Intros; Elim (total_order x y); Intro.
@@ -1564,7 +1564,7 @@ Discriminate.
Unfold INR; Reflexivity.
Intro; Ring.
Cut ~(O=(2)); [Intro H0; Generalize (lt_INR_0 (2) (neq_O_lt (2) H0)); Unfold INR; Intro; Assumption | Discriminate].
-Save.
+Qed.
(*****************************************************)
(** Complementary results about [INR] *)
@@ -1580,8 +1580,8 @@ end.
Theorem INR_eq_INR2 : (n:nat) (INR n)==(INR2 n).
Induction n; [Unfold INR INR2; Reflexivity | Intros; Unfold INR INR2; Fold INR INR2; Rewrite H; Case n0; [Reflexivity | Intros; Ring]].
-Save.
+Qed.
Lemma add_auto : (p,q:nat) ``(INR2 (S p))+(INR2 q)==(INR2 p)+(INR2 (S q))``.
Intros; Repeat Rewrite <- INR_eq_INR2; Repeat Rewrite S_INR; Ring.
-Save. \ No newline at end of file
+Qed. \ No newline at end of file
diff --git a/theories/Reals/Rbasic_fun.v b/theories/Reals/Rbasic_fun.v
index 7ecd0e143..6698d627b 100644
--- a/theories/Reals/Rbasic_fun.v
+++ b/theories/Reals/Rbasic_fun.v
@@ -38,14 +38,14 @@ Unfold Rgt;Unfold Rgt in H;Exact (Rlt_le_trans r r1 r2 H r0).
Split.
Generalize (not_Rle r1 r2 n);Intro;Exact (Rgt_trans r1 r2 r H0 H).
Assumption.
-Save.
+Qed.
(*********)
Lemma Rmin_Rgt_r:(r1,r2,r:R)(((Rgt r1 r)/\(Rgt r2 r)) ->
(Rgt (Rmin r1 r2) r)).
Intros;Unfold Rmin;Case (total_order_Rle r1 r2);Elim H;Clear H;Intros;
Assumption.
-Save.
+Qed.
(*********)
Lemma Rmin_Rgt:(r1,r2,r:R)(Rgt (Rmin r1 r2) r)<->
@@ -53,22 +53,22 @@ Lemma Rmin_Rgt:(r1,r2,r:R)(Rgt (Rmin r1 r2) r)<->
Intros; Split.
Exact (Rmin_Rgt_l r1 r2 r).
Exact (Rmin_Rgt_r r1 r2 r).
-Save.
+Qed.
(*********)
Lemma Rmin_l : (x,y:R) ``(Rmin x y)<=x``.
Intros; Unfold Rmin; Case (total_order_Rle x y); Intro H1; [Right; Reflexivity | Auto with real].
-Save.
+Qed.
(*********)
Lemma Rmin_r : (x,y:R) ``(Rmin x y)<=y``.
Intros; Unfold Rmin; Case (total_order_Rle x y); Intro H1; [Assumption | Auto with real].
-Save.
+Qed.
(*********)
Lemma Rmin_stable_in_posreal : (x,y:posreal) ``0<(Rmin x y)``.
Intros; Apply Rmin_Rgt_r; Split; [Apply (cond_pos x) | Apply (cond_pos y)].
-Save.
+Qed.
(*******************************)
(** Rmax *)
@@ -90,21 +90,21 @@ Intro;Unfold Rmax;Case (total_order_Rle r1 r2);Elim H;Clear H;Intros;Auto.
Apply (Rle_trans r r1 r2);Auto.
Generalize (not_Rle r1 r2 n);Clear n;Intro;Unfold Rgt in H0;
Apply (Rlt_le r r1 (Rle_lt_trans r r2 r1 H H0)).
-Save.
+Qed.
Lemma RmaxLess1: (r1, r2 : R) (Rle r1 (Rmax r1 r2)).
Intros r1 r2; Unfold Rmax; Case (total_order_Rle r1 r2); Auto with real.
-Save.
+Qed.
Lemma RmaxLess2: (r1, r2 : R) (Rle r2 (Rmax r1 r2)).
Intros r1 r2; Unfold Rmax; Case (total_order_Rle r1 r2); Auto with real.
-Save.
+Qed.
Lemma RmaxSym: (p, q : R) (Rmax p q) == (Rmax q p).
Intros p q; Unfold Rmax;
Case (total_order_Rle p q); Case (total_order_Rle q p); Auto; Intros H1 H2;
Apply Rle_antisym; Auto with real.
-Save.
+Qed.
Lemma RmaxRmult:
(p, q, r : R)
@@ -119,11 +119,11 @@ Case H; Intros E1.
Case H2; Auto with real.
Apply Rle_monotony_contra with z := r; Auto.
Rewrite <- E1; Repeat Rewrite Rmult_Ol; Auto.
-Save.
+Qed.
Lemma Rmax_stable_in_negreal : (x,y:negreal) ``(Rmax x y)<0``.
Intros; Unfold Rmax; Case (total_order_Rle x y); Intro; [Apply (cond_neg y) | Apply (cond_neg x)].
-Save.
+Qed.
(*******************************)
(** Rabsolu *)
@@ -134,7 +134,7 @@ Lemma case_Rabsolu:(r:R)(sumboolT (Rlt r R0) (Rge r R0)).
Intro;Generalize (total_order_Rle R0 r);Intro;Elim X;Intro;Clear X.
Right;Apply (Rle_sym1 R0 r a).
Left;Fold (Rgt R0 r);Apply (not_Rle R0 r b).
-Save.
+Qed.
(*********)
Definition Rabsolu:R->R:=
@@ -147,25 +147,25 @@ Definition Rabsolu:R->R:=
Lemma Rabsolu_R0:(Rabsolu R0)==R0.
Unfold Rabsolu;Case (case_Rabsolu R0);Auto;Intro.
Generalize (Rlt_antirefl R0);Intro;ElimType False;Auto.
-Save.
+Qed.
Lemma Rabsolu_R1: (Rabsolu R1)==R1.
Unfold Rabsolu; Case (case_Rabsolu R1); Auto with real.
Intros H; Absurd ``1 < 0``;Auto with real.
-Save.
+Qed.
(*********)
Lemma Rabsolu_no_R0:(r:R)~r==R0->~(Rabsolu r)==R0.
Intros;Unfold Rabsolu;Case (case_Rabsolu r);Intro;Auto.
Apply Ropp_neq;Auto.
-Save.
+Qed.
(*********)
Lemma Rabsolu_left: (r:R)(Rlt r R0)->((Rabsolu r) == (Ropp r)).
Intros;Unfold Rabsolu;Case (case_Rabsolu r);Trivial;Intro;Absurd (Rge r R0).
Exact (Rlt_ge_not r R0 H).
Assumption.
-Save.
+Qed.
(*********)
Lemma Rabsolu_right: (r:R)(Rge r R0)->((Rabsolu r) == r).
@@ -174,13 +174,13 @@ Absurd (Rge r R0).
Exact (Rlt_ge_not r R0 r0).
Assumption.
Trivial.
-Save.
+Qed.
Lemma Rabsolu_left1: (a : R) (Rle a R0) -> (Rabsolu a) == (Ropp a).
Intros a H; Case H; Intros H1.
Apply Rabsolu_left; Auto.
Rewrite H1; Simpl; Rewrite Rabsolu_right; Auto with real.
-Save.
+Qed.
(*********)
Lemma Rabsolu_pos:(x:R)(Rle R0 (Rabsolu x)).
@@ -188,23 +188,23 @@ Intros;Unfold Rabsolu;Case (case_Rabsolu x);Intro.
Generalize (Rlt_Ropp x R0 r);Intro;Unfold Rgt in H;
Rewrite Ropp_O in H;Unfold Rle;Left;Assumption.
Apply Rle_sym2;Assumption.
-Save.
+Qed.
Lemma Rle_Rabsolu:
(x:R) (Rle x (Rabsolu x)).
Intro; Unfold Rabsolu;Case (case_Rabsolu x);Intros;Fourier.
-Save.
+Qed.
(*********)
Lemma Rabsolu_pos_eq:(x:R)(Rle R0 x)->(Rabsolu x)==x.
Intros;Unfold Rabsolu;Case (case_Rabsolu x);Intro;
[Generalize (Rle_not R0 x r);Intro;ElimType False;Auto|Trivial].
-Save.
+Qed.
(*********)
Lemma Rabsolu_Rabsolu:(x:R)(Rabsolu (Rabsolu x))==(Rabsolu x).
Intro;Apply (Rabsolu_pos_eq (Rabsolu x) (Rabsolu_pos x)).
-Save.
+Qed.
(*********)
Lemma Rabsolu_pos_lt:(x:R)(~x==R0)->(Rlt R0 (Rabsolu x)).
@@ -214,7 +214,7 @@ ElimType False;Clear H0;Elim H;Clear H;Generalize H1;
Unfold Rabsolu;Case (case_Rabsolu x);Intros;Auto.
Clear r H1; Generalize (Rplus_plus_r x R0 (Ropp x) H0);
Rewrite (let (H1,H2)=(Rplus_ne x) in H1);Rewrite (Rplus_Ropp_r x);Trivial.
-Save.
+Qed.
(*********)
Lemma Rabsolu_minus_sym:(x,y:R)
@@ -232,7 +232,7 @@ Generalize (Rgt_RoppO (Rminus x y) H);Rewrite (Ropp_distr2 x y);
Rewrite (Rminus_eq x y H);Trivial.
Rewrite (Rminus_eq y x H0);Trivial.
Rewrite (Rminus_eq y x H0);Trivial.
-Save.
+Qed.
(*********)
Lemma Rabsolu_mult:(x,y:R)
@@ -277,7 +277,7 @@ Generalize (imp_not_Req y R0 (or_introl (Rlt y R0) (Rgt y R0) r));
Rewrite H0 in H;Rewrite (Rmult_Ol y) in H;Unfold Rgt in H;
Generalize (Rlt_antirefl R0);Intro;ElimType False;Auto.
Rewrite H0;Rewrite (Rmult_Ol y);Rewrite (Rmult_Ol (Ropp y));Trivial.
-Save.
+Qed.
(*********)
Lemma Rabsolu_Rinv:(r:R)(~r==R0)->(Rabsolu (Rinv r))==
@@ -296,7 +296,7 @@ Unfold Rge in r1;Elim r1;Clear r1;Intro.
Unfold Rgt in H0;Generalize (Rlt_antisym R0 (Rinv r)
(Rlt_Rinv r H0));Intro;ElimType False;Auto.
ElimType False;Auto.
-Save.
+Qed.
Lemma Rabsolu_Ropp:
(x:R) (Rabsolu (Ropp x))==(Rabsolu x).
@@ -315,7 +315,7 @@ Intro;Generalize (Rle_not R1 R0 Rlt_R0_R1);Intro;
Generalize (Rle_sym2 R1 R0 H2);Intro;
ElimType False;Auto.
Ring.
-Save.
+Qed.
(*********)
Lemma Rabsolu_triang:(a,b:R)(Rle (Rabsolu (Rplus a b))
@@ -376,7 +376,7 @@ Apply (Rle_compatibility a b (Ropp b));
Apply (Rlt_le (Rplus b b) R0 H0).
(**)
Unfold Rle;Right;Reflexivity.
-Save.
+Qed.
(*********)
Lemma Rabsolu_triang_inv:(a,b:R)(Rle (Rminus (Rabsolu a) (Rabsolu b))
@@ -397,7 +397,7 @@ Intros;
Rewrite (Rplus_assoc b a (Ropp b)).
Exact (Rabsolu_triang b (Rplus a (Ropp b))).
Rewrite (proj1 ? ? (Rplus_ne a));Trivial.
-Save.
+Qed.
(*********)
Lemma Rabsolu_def1:(x,a:R)(Rlt x a)->(Rlt (Ropp a) x)->(Rlt (Rabsolu x) a).
@@ -405,7 +405,7 @@ Unfold Rabsolu;Intros;Case (case_Rabsolu x);Intro.
Generalize (Rlt_Ropp (Ropp a) x H0);Unfold Rgt;Rewrite Ropp_Ropp;Intro;
Assumption.
Assumption.
-Save.
+Qed.
(*********)
Lemma Rabsolu_def2:(x,a:R)(Rlt (Rabsolu x) a)->(Rlt x a)/\(Rlt (Ropp a) x).
@@ -418,7 +418,7 @@ Fold (Rgt a x) in H;Generalize (Rgt_ge_trans a x R0 H r);Intro;
Generalize (Rgt_RoppO a H0);Intro;Fold (Rgt R0 (Ropp a));
Generalize (Rge_gt_trans x R0 (Ropp a) r H1);Unfold Rgt;Intro;Split;
Assumption.
-Save.
+Qed.
Lemma RmaxAbs:
(p, q, r : R)
@@ -443,7 +443,7 @@ Apply RmaxLess1; Auto.
Rewrite (Rabsolu_left r); Auto.
Apply Rle_trans with (Ropp p); Auto with real.
Apply RmaxLess1; Auto.
-Save.
+Qed.
Lemma Rabsolu_Zabs: (z : Z) (Rabsolu (IZR z)) == (IZR (Zabs z)).
Intros z; Case z; Simpl; Auto with real.
@@ -451,5 +451,5 @@ Apply Rabsolu_right; Auto with real.
Intros p0; Apply Rabsolu_right; Auto with real zarith.
Intros p0; Rewrite Rabsolu_Ropp.
Apply Rabsolu_right; Auto with real zarith.
-Save.
+Qed.
diff --git a/theories/Reals/Rderiv.v b/theories/Reals/Rderiv.v
index 5e4cf7ac5..37fa2aa77 100644
--- a/theories/Reals/Rderiv.v
+++ b/theories/Reals/Rderiv.v
@@ -198,7 +198,7 @@ Intro;Generalize (Rlt_antisym R0 (Rplus R1 R1) H7);Intro;ElimType False;
Fourier.
Apply Rabsolu_no_R0.
DiscrR.
-Save.
+Qed.
(*********)
@@ -212,7 +212,7 @@ Intros;Rewrite (eq_Rminus y y (refl_eqT R y));
Absurd (Rlt R0 R0);Auto.
Red;Intro;Apply (Rlt_antirefl R0 H1).
Unfold Rgt in H0;Assumption.
-Save.
+Qed.
(*********)
Lemma Dx:(D:R->Prop)(x0:R)(D_in [x:R]x [x:R]R1 D x0).
@@ -228,7 +228,7 @@ Intros;Elim H0;Clear H0;Intros;Unfold D_x in H0;
Absurd (Rlt R0 R0);Auto.
Red;Intro;Apply (Rlt_antirefl R0 r).
Unfold Rgt in H;Assumption.
-Save.
+Qed.
(*********)
Lemma Dadd:(D:R->Prop)(df,dg:R->R)(f,g:R->R)(x0:R)
@@ -252,7 +252,7 @@ Unfold D_in;Intros;Generalize (limit_plus
(Rminus (Rplus (f x1) (g x1)) (Rplus (f x0) (g x0))).
Intro;Rewrite H3 in H1;Assumption.
Ring.
-Save.
+Qed.
(*********)
Lemma Dmult:(D:R->Prop)(df,dg:R->R)(f,g:R->R)(x0:R)
@@ -298,7 +298,7 @@ Ring.
Unfold limit1_in;Unfold limit_in;Simpl;Intros;
Split with eps;Split;Auto;Intros;Elim (R_dist_refl (g x0) (g x0));
Intros a b;Rewrite (b (refl_eqT R (g x0)));Unfold Rgt in H;Assumption.
-Save.
+Qed.
(*********)
Lemma Dmult_const:(D:R->Prop)(f,df:R->R)(x0:R)(a:R)(D_in f df D x0)->
@@ -308,7 +308,7 @@ Intros;Generalize (Dmult D [_:R]R0 df [_:R]a f x0 (Dconst D a x0) H);
Rewrite (Rmult_Ol (f x0)) in H0;
Rewrite (let (H1,H2)=(Rplus_ne (Rmult a (df x0))) in H2) in H0;
Assumption.
-Save.
+Qed.
(*********)
Lemma Dopp:(D:R->Prop)(f,df:R->R)(x0:R)(D_in f df D x0)->
@@ -322,7 +322,7 @@ Intros;Generalize (H2 x1 H3);Clear H2;Intro;Rewrite Ropp_mul1 in H2;
Rewrite (let (H1,H2)=(Rmult_ne (f x1)) in H2) in H2;
Rewrite (let (H1,H2)=(Rmult_ne (f x0)) in H2) in H2;
Rewrite (let (H1,H2)=(Rmult_ne (df x0)) in H2) in H2;Assumption.
-Save.
+Qed.
(*********)
Lemma Dminus:(D:R->Prop)(df,dg:R->R)(f,g:R->R)(x0:R)
@@ -330,7 +330,7 @@ Lemma Dminus:(D:R->Prop)(df,dg:R->R)(f,g:R->R)(x0:R)
(D_in [x:R](Rminus (f x) (g x)) [x:R](Rminus (df x) (dg x)) D x0).
Unfold Rminus;Intros;Generalize (Dopp D g dg x0 H0);Intro;
Apply (Dadd D df [x:R](Ropp (dg x)) f [x:R](Ropp (g x)) x0);Assumption.
-Save.
+Qed.
(*********)
Lemma Dx_pow_n:(n:nat)(D:R->Prop)(x0:R)
@@ -360,7 +360,7 @@ Rewrite cond in H2;Rewrite cond;Simpl in H2;Simpl;
Cut ~(n0=O)->(S (minus n0 (1)))=n0;[Intro|Omega];
Rewrite (H3 cond) in H2; Rewrite (Rmult_sym (pow x0 n0) (INR n0)) in H2;
Rewrite (tech_pow_Rplus x0 n0 n0) in H2; Assumption.
-Save.
+Qed.
(*********)
Lemma Dcomp:(Df,Dg:R->Prop)(df,dg:R->R)(f,g:R->R)(x0:R)
@@ -428,7 +428,7 @@ Clear H5 H3 H4 H2;Unfold limit1_in;Unfold limit_in;Simpl;
Split with x;Split;Auto;Intros;Unfold D_x Dgf in H4 H3;
Elim H4;Clear H4;Intros;Elim H4;Clear H4;Intros;
Exact (H3 x1 (conj (Df x1)/\~x0==x1 (Rlt (R_dist x1 x0) x) H4 H5)).
-Save.
+Qed.
(*********)
Lemma D_pow_n:(n:nat)(D:R->Prop)(x0:R)(expr,dexpr:R->R)
@@ -445,5 +445,5 @@ Intros n D x0 expr dexpr H;
Cut ``((dexpr x0)*((INR n)*(pow (expr x0) (minus n (S O)))))==
((INR n)*(pow (expr x0) (minus n (S O)))*(dexpr x0))``;
[Intro Rew;Rewrite <- Rew;Exact (H2 x1 H3)|Ring].
-Save.
+Qed.
diff --git a/theories/Reals/Rfunctions.v b/theories/Reals/Rfunctions.v
index 90f297bbd..7bb1236ad 100644
--- a/theories/Reals/Rfunctions.v
+++ b/theories/Reals/Rfunctions.v
@@ -41,12 +41,12 @@ Intro;Apply H;Assumption.
Replace (plus n0 (1)) with (S n0);[Auto|Ring].
Intros;Ring.
Double Induction 1 2;Simpl;Auto.
-Save.
+Qed.
(*********)
Lemma INR_fact_neq_0:(n:nat)~(INR (fact n))==R0.
Intro;Red;Intro;Apply (not_O_INR (fact n) (fact_neq_0 n));Assumption.
-Save.
+Qed.
(*********)
Lemma simpl_fact:(n:nat)(Rmult (Rinv (INR (fact (S n))))
@@ -61,7 +61,7 @@ Rewrite (Rmult_assoc (Rinv (INR (S n))) (Rinv (INR (fact n)))
Apply (let (H1,H2)=(Rmult_ne (Rinv (INR (S n)))) in H1).
Apply not_O_INR;Auto.
Apply INR_fact_neq_0.
-Save.
+Qed.
(*******************************)
(* Power *)
@@ -75,17 +75,17 @@ Fixpoint pow [r:R;n:nat]:R:=
Lemma pow_O: (e : R) (pow e O) == R1.
Simpl; Auto with real.
-Save.
+Qed.
Lemma pow_1: (e : R) (pow e (1)) == e.
Simpl; Auto with real.
-Save.
+Qed.
Lemma pow_add:
(e : R) (n, m : nat) (pow e (plus n m)) == (Rmult (pow e n) (pow e m)).
Intros e n; Elim n; Simpl; Auto with real.
Intros n0 H' m; Rewrite H'; Auto with real.
-Save.
+Qed.
Lemma pow_nonzero:
(x:R) (n:nat) ~(x==R0) -> ~((pow x n)==R0).
@@ -94,7 +94,7 @@ Intro; Red;Intro;Apply R1_neq_R0;Assumption.
Intros;Red; Intro;Elim (without_div_Od x (pow x n0) H1).
Intro; Auto.
Apply H;Assumption.
-Save.
+Qed.
Hints Resolve pow_O pow_1 pow_add pow_nonzero:real.
@@ -105,12 +105,12 @@ Lemma pow_RN_plus:
Intros e n; Elim n; Simpl; Auto with real.
Intros n0 H' m H'0.
Rewrite Rmult_assoc; Rewrite <- H'; Auto.
-Save.
+Qed.
Lemma pow_lt: (e : R) (n : nat) (Rlt R0 e) -> (Rlt R0 (pow e n)).
Intros e n; Elim n; Simpl; Auto with real.
Intros n0 H' H'0; Replace R0 with (Rmult e R0); Auto with real.
-Save.
+Qed.
Hints Resolve pow_lt :real.
Lemma Rlt_pow_R1:
@@ -125,7 +125,7 @@ Apply Rlt_trans with r2 := (Rmult e R1); Auto with real.
Apply Rlt_monotony; Auto with real.
Apply Rlt_trans with r2 := R1; Auto with real.
Apply H'; Auto with arith.
-Save.
+Qed.
Hints Resolve Rlt_pow_R1 :real.
Lemma Rlt_pow:
@@ -145,13 +145,13 @@ Apply Rlt_pow_R1; Auto with arith.
Apply simpl_lt_plus_l with p := n; Auto with arith.
Rewrite le_plus_minus_r; Auto with arith; Rewrite <- plus_n_O; Auto.
Rewrite plus_sym; Auto with arith.
-Save.
+Qed.
Hints Resolve Rlt_pow :real.
(*********)
Lemma tech_pow_Rmult:(x:R)(n:nat)(Rmult x (pow x n))==(pow x (S n)).
Induction n; Simpl; Trivial.
-Save.
+Qed.
(*********)
Lemma tech_pow_Rplus:(x:R)(a,n:nat)
@@ -163,7 +163,7 @@ Intros; Pattern 1 (pow x a);
Rewrite <- (Rmult_Rplus_distr (pow x a) R1 (INR n));
Rewrite (Rplus_sym R1 (INR n)); Rewrite <-(S_INR n);
Apply Rmult_sym.
-Save.
+Qed.
Lemma poly: (n:nat)(e:R)(Rlt R0 e)->
(Rle (Rplus R1 (Rmult (INR n) e)) (pow (Rplus R1 e) n)).
@@ -195,7 +195,7 @@ Rewrite Rplus_sym;
Apply (Rlt_r_plus_R1 e (Rlt_le R0 e H)).
Assumption.
Rewrite H1;Unfold Rle;Right;Trivial.
-Save.
+Qed.
Lemma Power_monotonic:
(x:R) (m,n:nat) (Rgt (Rabsolu x) R1)
@@ -216,14 +216,14 @@ Apply Rle_monotony.
Apply Rabsolu_pos.
Unfold Rgt in H.
Apply Rlt_le; Assumption.
-Save.
+Qed.
Lemma Pow_Rabsolu: (x:R) (n:nat)
(pow (Rabsolu x) n)==(Rabsolu (pow x n)).
Intro;Induction n;Simpl.
Apply sym_eqT;Apply Rabsolu_pos_eq;Apply Rlt_le;Apply Rlt_R0_R1.
Intros; Rewrite H;Apply sym_eqT;Apply Rabsolu_mult.
-Save.
+Qed.
Lemma Pow_x_infinity:
@@ -281,7 +281,7 @@ Exists O;Apply (Rge_trans (INR (0))
Rewrite INR_IZR_INZ;Apply IZR_ge;Simpl;Omega.
Unfold Rge; Left; Assumption.
Omega.
-Save.
+Qed.
Lemma pow_ne_zero:
(n:nat) ~(n=(0))-> (pow R0 n) == R0.
@@ -289,7 +289,7 @@ Induction n.
Simpl;Auto.
Intros;Elim H;Reflexivity.
Intros; Simpl;Apply Rmult_Ol.
-Save.
+Qed.
Lemma Rinv_pow:
(x:R) (n:nat) ~(x==R0) -> (Rinv (pow x n))==(pow (Rinv x) n).
@@ -299,7 +299,7 @@ Intro m;Intro;Rewrite Rinv_Rmult.
Rewrite H0; Reflexivity;Assumption.
Assumption.
Apply pow_nonzero;Assumption.
-Save.
+Qed.
Lemma pow_lt_1_zero:
(x:R) (Rlt (Rabsolu x) R1)
@@ -353,7 +353,7 @@ Rewrite Rinv_R1; Apply Rlt_R0_R1.
Rewrite Rinv_R1; Assumption.
Assumption.
Red;Intro; Apply R1_neq_R0;Assumption.
-Save.
+Qed.
Lemma pow_R1:
(r : R) (n : nat) (pow r n) == R1 -> (Rabsolu r) == R1 \/ n = O.
@@ -389,7 +389,7 @@ Absurd (Rlt (pow (Rabsolu r) O) (pow (Rabsolu r) (S n0)));
Repeat Rewrite Pow_Rabsolu; Rewrite H'0; Simpl; Auto with real.
Red;Intro;Absurd ``(pow r (S n0)) == 1``;Auto.
Simpl; Rewrite H; Rewrite Rmult_Ol; Auto with real.
-Save.
+Qed.
(*******************************)
(** PowerRZ *)
@@ -409,19 +409,19 @@ Definition powerRZ :=
Lemma Zpower_NR0:
(e : Z) (n : nat) (Zle ZERO e) -> (Zle ZERO (Zpower_nat e n)).
Intros e n; Elim n; Unfold Zpower_nat; Simpl; Auto with zarith.
-Save.
+Qed.
Lemma powerRZ_O: (e : R) (powerRZ e ZERO) == R1.
Simpl; Auto.
-Save.
+Qed.
Lemma powerRZ_1: (e : R) (powerRZ e (Zs ZERO)) == e.
Simpl; Auto with real.
-Save.
+Qed.
Lemma powerRZ_NOR: (e : R) (z : Z) ~ e == R0 -> ~ (powerRZ e z) == R0.
Intros e z; Case z; Simpl; Auto with real.
-Save.
+Qed.
Lemma powerRZ_add:
(e : R)
@@ -469,7 +469,7 @@ Intros H'; Rewrite pow_add; Auto with real.
Apply Rinv_Rmult; Auto.
Apply pow_nonzero; Auto.
Apply pow_nonzero; Auto.
-Save.
+Qed.
Hints Resolve powerRZ_O powerRZ_1 powerRZ_NOR powerRZ_add :real.
Lemma Zpower_nat_powerRZ:
@@ -485,16 +485,16 @@ Rewrite H'; Simpl.
Case m1; Simpl; Auto with real.
Intros m2; Rewrite bij1; Auto.
Unfold Zpower_nat; Auto.
-Save.
+Qed.
Lemma powerRZ_lt: (e : R) (z : Z) (Rlt R0 e) -> (Rlt R0 (powerRZ e z)).
Intros e z; Case z; Simpl; Auto with real.
-Save.
+Qed.
Hints Resolve powerRZ_lt :real.
Lemma powerRZ_le: (e : R) (z : Z) (Rlt R0 e) -> (Rle R0 (powerRZ e z)).
Intros e z H'; Apply Rlt_le; Auto with real.
-Save.
+Qed.
Hints Resolve powerRZ_le :real.
Lemma Zpower_nat_powerRZ_absolu:
@@ -505,7 +505,7 @@ Intros p H'; Elim (convert p); Simpl; Auto with zarith.
Intros n0 H'0; Rewrite <- H'0; Simpl; Auto with zarith.
Rewrite <- mult_IZR; Auto.
Intros p H'; Absurd `0 <= (NEG p)`;Auto with zarith.
-Save.
+Qed.
Lemma powerRZ_R1: (n : Z) (powerRZ R1 n) == R1.
Intros n; Case n; Simpl; Auto.
@@ -514,7 +514,7 @@ Intros p; Elim (convert p); Simpl.
Exact Rinv_R1.
Intros n1 H'; Rewrite Rinv_Rmult; Try Rewrite Rinv_R1; Try Rewrite H';
Auto with real.
-Save.
+Qed.
(*******************************)
(** Sum of n first naturals *)
@@ -561,7 +561,7 @@ Ring.
Rewrite Rmult_Rplus_distrl;Rewrite Hrecn;Cut (plus n (1))=(S n).
Intro H;Rewrite H;Simpl;Ring.
Omega.
-Save.
+Qed.
Lemma sum_f_R0_triangle:
(x:nat->R)(n:nat) (Rle (Rabsolu (sum_f_R0 x n))
@@ -578,7 +578,7 @@ Apply Rabsolu_triang.
Rewrite Rplus_sym;Rewrite (Rplus_sym
(sum_f_R0 [i:nat](Rabsolu (x i)) m) (Rabsolu (x (S m))));
Apply Rle_compatibility;Assumption.
-Save.
+Qed.
(*******************************)
diff --git a/theories/Reals/Rgeom.v b/theories/Reals/Rgeom.v
index c9fec070b..5f357f307 100644
--- a/theories/Reals/Rgeom.v
+++ b/theories/Reals/Rgeom.v
@@ -17,19 +17,19 @@ Definition dist_euc [x0,y0,x1,y1:R] : R := ``(sqrt ((Rsqr (x0-x1))+(Rsqr (y0-y1)
Lemma distance_refl : (x0,y0:R) ``(dist_euc x0 y0 x0 y0)==0``.
Intros x0 y0; Unfold dist_euc; Apply Rsqr_inj; [Apply foo; Apply ge0_plus_ge0_is_ge0; [Apply pos_Rsqr | Apply pos_Rsqr] | Right; Reflexivity | Rewrite Rsqr_O; Rewrite Rsqr_sqrt; [Unfold Rsqr; Ring | Apply ge0_plus_ge0_is_ge0; [Apply pos_Rsqr | Apply pos_Rsqr]]].
-Save.
+Qed.
Lemma distance_symm : (x0,y0,x1,y1:R) ``(dist_euc x0 y0 x1 y1) == (dist_euc x1 y1 x0 y0)``.
Intros x0 y0 x1 y1; Unfold dist_euc; Apply Rsqr_inj; [ Apply foo; Apply ge0_plus_ge0_is_ge0 | Apply foo; Apply ge0_plus_ge0_is_ge0 | Repeat Rewrite Rsqr_sqrt; [Unfold Rsqr; Ring | Apply ge0_plus_ge0_is_ge0 |Apply ge0_plus_ge0_is_ge0]]; Apply pos_Rsqr.
-Save.
+Qed.
Lemma law_cosines : (x0,y0,x1,y1,x2,y2,ac:R) let a = (dist_euc x1 y1 x0 y0) in let b=(dist_euc x2 y2 x0 y0) in let c=(dist_euc x2 y2 x1 y1) in ( ``a*c*(cos ac) == ((x0-x1)*(x2-x1) + (y0-y1)*(y2-y1))`` -> ``(Rsqr b)==(Rsqr c)+(Rsqr a)-2*(a*c*(cos ac))`` ).
Unfold dist_euc; Intros; Repeat Rewrite -> Rsqr_sqrt; [ Rewrite H; Unfold Rsqr; Ring | Apply ge0_plus_ge0_is_ge0 | Apply ge0_plus_ge0_is_ge0 | Apply ge0_plus_ge0_is_ge0]; Apply pos_Rsqr.
-Save.
+Qed.
Lemma triangle : (x0,y0,x1,y1,x2,y2:R) ``(dist_euc x0 y0 x1 y1)<=(dist_euc x0 y0 x2 y2)+(dist_euc x2 y2 x1 y1)``.
Intros; Unfold dist_euc; Apply Rsqr_incr_0; [Rewrite Rsqr_plus; Repeat Rewrite Rsqr_sqrt; [Replace ``(Rsqr (x0-x1))`` with ``(Rsqr (x0-x2))+(Rsqr (x2-x1))+2*(x0-x2)*(x2-x1)``; [Replace ``(Rsqr (y0-y1))`` with ``(Rsqr (y0-y2))+(Rsqr (y2-y1))+2*(y0-y2)*(y2-y1)``; [Apply Rle_anti_compatibility with ``-(Rsqr (x0-x2))-(Rsqr (x2-x1))-(Rsqr (y0-y2))-(Rsqr (y2-y1))``; Replace `` -(Rsqr (x0-x2))-(Rsqr (x2-x1))-(Rsqr (y0-y2))-(Rsqr (y2-y1))+((Rsqr (x0-x2))+(Rsqr (x2-x1))+2*(x0-x2)*(x2-x1)+((Rsqr (y0-y2))+(Rsqr (y2-y1))+2*(y0-y2)*(y2-y1)))`` with ``2*((x0-x2)*(x2-x1)+(y0-y2)*(y2-y1))``; [Replace ``-(Rsqr (x0-x2))-(Rsqr (x2-x1))-(Rsqr (y0-y2))-(Rsqr (y2-y1))+((Rsqr (x0-x2))+(Rsqr (y0-y2))+((Rsqr (x2-x1))+(Rsqr (y2-y1)))+2*(sqrt ((Rsqr (x0-x2))+(Rsqr (y0-y2))))*(sqrt ((Rsqr (x2-x1))+(Rsqr (y2-y1)))))`` with ``2*((sqrt ((Rsqr (x0-x2))+(Rsqr (y0-y2))))*(sqrt ((Rsqr (x2-x1))+(Rsqr (y2-y1)))))``; [Apply Rle_monotony; [Left; Cut ~(O=(2)); [Intros; Generalize (lt_INR_0 (2) (neq_O_lt (2) H)); Intro H0; Assumption | Discriminate] | Apply sqrt_cauchy] | Ring] | Ring] | SqRing] | SqRing] | Apply ge0_plus_ge0_is_ge0; Apply pos_Rsqr | Apply ge0_plus_ge0_is_ge0; Apply pos_Rsqr | Apply ge0_plus_ge0_is_ge0; Apply pos_Rsqr] | Apply foo; Apply ge0_plus_ge0_is_ge0; Apply pos_Rsqr | Apply ge0_plus_ge0_is_ge0; Apply foo; Apply ge0_plus_ge0_is_ge0; Apply pos_Rsqr].
-Save.
+Qed.
(******************************************************************)
(** Translation *)
@@ -40,11 +40,11 @@ Definition yt[y,ty:R] : R := ``y+ty``.
Lemma translation_0 : (x,y:R) ``(xt x 0)==x``/\``(yt y 0)==y``.
Intros x y; Split; [Unfold xt | Unfold yt]; Ring.
-Save.
+Qed.
Lemma isometric_translation : (x1,x2,y1,y2,tx,ty:R) ``(Rsqr (x1-x2))+(Rsqr (y1-y2))==(Rsqr ((xt x1 tx)-(xt x2 tx)))+(Rsqr ((yt y1 ty)-(yt y2 ty)))``.
Intros; Unfold Rsqr xt yt; Ring.
-Save.
+Qed.
(******************************************************************)
(** Rotation *)
@@ -55,19 +55,19 @@ Definition yr [x,y,theta:R] : R := ``-x*(sin theta)+y*(cos theta)``.
Lemma rotation_0 : (x,y:R) ``(xr x y 0)==x`` /\ ``(yr x y 0)==y``.
Intros x y; Unfold xr yr; Split; Rewrite cos_0; Rewrite sin_0; Ring.
-Save.
+Qed.
Lemma rotation_PI2 : (x,y:R) ``(xr x y PI/2)==y`` /\ ``(yr x y PI/2)==-x``.
Intros x y; Unfold xr yr; Split; Rewrite cos_PI2; Rewrite sin_PI2; Ring.
-Save.
+Qed.
Lemma isometric_rotation_0 : (x1,y1,x2,y2,theta:R) ``(Rsqr (x1-x2))+(Rsqr (y1-y2)) == (Rsqr ((xr x1 y1 theta))-(xr x2 y2 theta)) + (Rsqr ((yr x1 y1 theta))-(yr x2 y2 theta))``.
Intros; Unfold xr yr; Replace ``x1*(cos theta)+y1*(sin theta)-(x2*(cos theta)+y2*(sin theta))`` with ``(cos theta)*(x1-x2)+(sin theta)*(y1-y2)``; [Replace ``-x1*(sin theta)+y1*(cos theta)-( -x2*(sin theta)+y2*(cos theta))`` with ``(cos theta)*(y1-y2)+(sin theta)*(x2-x1)``; [Repeat Rewrite Rsqr_plus; Repeat Rewrite Rsqr_times; Repeat Rewrite cos2; Ring; Replace ``x2-x1`` with ``-(x1-x2)``; [Rewrite <- Rsqr_neg; Ring | Ring] |Ring] | Ring].
-Save.
+Qed.
Lemma isometric_rotation : (x1,y1,x2,y2,theta:R) ``(dist_euc x1 y1 x2 y2) == (dist_euc (xr x1 y1 theta) (yr x1 y1 theta) (xr x2 y2 theta) (yr x2 y2 theta))``.
Unfold dist_euc; Intros; Apply Rsqr_inj; [Apply foo; Apply ge0_plus_ge0_is_ge0 | Apply foo; Apply ge0_plus_ge0_is_ge0 | Repeat Rewrite Rsqr_sqrt; [ Apply isometric_rotation_0 | Apply ge0_plus_ge0_is_ge0 | Apply ge0_plus_ge0_is_ge0]]; Apply pos_Rsqr.
-Save.
+Qed.
(******************************************************************)
(** Similarity *)
@@ -75,8 +75,8 @@ Save.
Lemma isometric_rot_trans : (x1,y1,x2,y2,tx,ty,theta:R) ``(Rsqr (x1-x2))+(Rsqr (y1-y2)) == (Rsqr ((xr (xt x1 tx) (yt y1 ty) theta)-(xr (xt x2 tx) (yt y2 ty) theta))) + (Rsqr ((yr (xt x1 tx) (yt y1 ty) theta)-(yr (xt x2 tx) (yt y2 ty) theta)))``.
Intros; Rewrite <- isometric_rotation_0; Apply isometric_translation.
-Save.
+Qed.
Lemma isometric_trans_rot : (x1,y1,x2,y2,tx,ty,theta:R) ``(Rsqr (x1-x2))+(Rsqr (y1-y2)) == (Rsqr ((xt (xr x1 y1 theta) tx)-(xt (xr x2 y2 theta) tx))) + (Rsqr ((yt (yr x1 y1 theta) ty)-(yt (yr x2 y2 theta) ty)))``.
Intros; Rewrite <- isometric_translation; Apply isometric_rotation_0.
-Save.
+Qed.
diff --git a/theories/Reals/Rlimit.v b/theories/Reals/Rlimit.v
index dfab20d09..7b8d1100a 100644
--- a/theories/Reals/Rlimit.v
+++ b/theories/Reals/Rlimit.v
@@ -23,16 +23,16 @@ Require SplitAbsolu.
(** Modif **)
Lemma double : (x:R) ``2*x==x+x``.
Intro; Ring.
-Save.
+Qed.
Lemma aze : ``2<>0``.
DiscrR.
-Save.
+Qed.
Lemma double_var : (x:R) ``x == x/2 + x/2``.
Intro; Rewrite <- double; Unfold Rdiv; Rewrite <- Rmult_assoc; Symmetry; Apply Rinv_r_simpl_m.
Apply aze.
-Save.
+Qed.
(*******************************)
(* Calculus *)
@@ -41,7 +41,7 @@ Save.
Lemma eps2_Rgt_R0:(eps:R)(Rgt eps R0)->
(Rgt (Rmult eps (Rinv (Rplus R1 R1))) R0).
Intros;Fourier.
-Save.
+Qed.
(*********)
Lemma eps2:(eps:R)(Rplus (Rmult eps (Rinv (Rplus R1 R1)))
@@ -50,7 +50,7 @@ Intro esp.
Assert H := (double_var esp).
Unfold Rdiv in H.
Symmetry; Exact H.
-Save.
+Qed.
(*********)
Lemma eps4:(eps:R)
@@ -68,7 +68,7 @@ Reflexivity.
Apply aze.
Apply aze.
Ring.
-Save.
+Qed.
(*********)
Lemma Rlt_eps2_eps:(eps:R)(Rgt eps R0)->
@@ -83,7 +83,7 @@ Fourier.
Rewrite Rmult_1r; Rewrite <- Rinv_r_sym.
Fourier.
DiscrR.
-Save.
+Qed.
(*********)
Lemma Rlt_eps4_eps:(eps:R)(Rgt eps R0)->
@@ -102,7 +102,7 @@ Rewrite Rmult_1r; Rewrite <- Rinv_r_sym.
Fourier.
DiscrR.
Ring.
-Save.
+Qed.
(*********)
Lemma prop_eps:(r:R)((eps:R)(Rgt eps R0)->(Rlt r eps))->(Rle r R0).
@@ -112,7 +112,7 @@ Elim H0; Intro.
Apply eq_Rle; Assumption.
Clear H0;Generalize (H r H1); Intro;Generalize (Rlt_antirefl r);
Intro;ElimType False; Auto.
-Save.
+Qed.
(*********)
Definition mul_factor := [l,l':R](Rinv (Rplus R1 (Rplus (Rabsolu l)
@@ -129,7 +129,7 @@ Exact (Rle_trans ? ? ?).
Exact (Rabsolu_pos (Rplus l l')).
Exact (Rabsolu_triang ? ?).
Exact Rlt_R0_R1.
-Save.
+Qed.
(*********)
Lemma mul_factor_gt:(eps:R)(l,l':R)(Rgt eps R0)->
@@ -150,7 +150,7 @@ Exact (Rle_trans ? ? ?).
Exact (Rabsolu_pos ?).
Exact (Rabsolu_triang ? ?).
Rewrite (proj1 ? ? (Rplus_ne R1));Trivial.
-Save.
+Qed.
(*********)
Lemma mul_factor_gt_f:(eps:R)(l,l':R)(Rgt eps R0)->
@@ -158,7 +158,7 @@ Lemma mul_factor_gt_f:(eps:R)(l,l':R)(Rgt eps R0)->
Intros;Apply Rmin_Rgt_r;Split.
Exact Rlt_R0_R1.
Exact (mul_factor_gt eps l l' H).
-Save.
+Qed.
(*******************************)
@@ -200,7 +200,7 @@ Lemma R_dist_pos:(x,y:R)(Rge (R_dist x y) R0).
Intros;Unfold R_dist;Unfold Rabsolu;Case (case_Rabsolu (Rminus x y));Intro l.
Unfold Rge;Left;Apply (Rlt_RoppO (Rminus x y) l).
Trivial.
-Save.
+Qed.
(*********)
Lemma R_dist_sym:(x,y:R)(R_dist x y)==(R_dist y x).
@@ -212,7 +212,7 @@ Generalize (Rlt_RoppO (Rminus y x) r); Intro;
Generalize (minus_Rge y x r); Intro;
Generalize (minus_Rge x y r0); Intro;
Generalize (Rge_ge_eq x y H0 H); Intro;Rewrite H1;Ring.
-Save.
+Qed.
(*********)
Lemma R_dist_refl:(x,y:R)((R_dist x y)==R0<->x==y).
@@ -223,11 +223,11 @@ Rewrite (Ropp_distr2 x y);Generalize (sym_eqT R x y H);Intro;
Apply (eq_Rminus y x H0).
Apply (Rminus_eq x y H).
Apply (eq_Rminus x y H).
-Save.
+Qed.
Lemma R_dist_eq:(x:R)(R_dist x x)==R0.
Unfold R_dist;Intros;SplitAbsolu;Intros;Ring.
-Save.
+Qed.
(***********)
Lemma R_dist_tri:(x,y,z:R)(Rle (R_dist x y)
@@ -353,7 +353,7 @@ Unfold 2 3 Rminus;
Rewrite (Rplus_Ropp_l z);Elim (Rplus_ne (Ropp y));Intros a b;Rewrite b;
Clear a b;Fold (Rminus x y);
Apply (eq_Rle (Rminus x y) (Rminus x y) (refl_eqT R (Rminus x y))).
-Save.
+Qed.
(*********)
Lemma R_dist_plus: (a,b,c,d:R)(Rle (R_dist (Rplus a c) (Rplus b d))
@@ -363,7 +363,7 @@ Intros;Unfold R_dist;
with (Rplus (Rminus a b) (Rminus c d)).
Exact (Rabsolu_triang (Rminus a b) (Rminus c d)).
Ring.
-Save.
+Qed.
(*******************************)
(* R is a metric space *)
@@ -396,19 +396,19 @@ Elim (H0 (R_dist (f x0) l) H3);Intros;Elim H2;Clear H2 H0;
Clear H2;Generalize (Rlt_antirefl (R_dist (f x0) l));Intro;Auto.
Elim (R_dist_refl (f x0) l);Intros a b;Clear b;Generalize (a H3);Intro;
Generalize (sym_eqT R (f x0) l H2);Intro;Auto.
-Save.
+Qed.
(*********)
Lemma tech_limit_contr:(f:R->R)(D:R->Prop)(l:R)(x0:R)(D x0)->~l==(f x0)
->~(limit1_in f D l x0).
Intros;Generalize (tech_limit f D l x0);Tauto.
-Save.
+Qed.
(*********)
Lemma lim_x:(D:R->Prop)(x0:R)(limit1_in [x:R]x D x0 x0).
Unfold limit1_in; Unfold limit_in; Simpl; Intros;Split with eps;
Split; Auto;Intros;Elim H0; Intros; Auto.
-Save.
+Qed.
(*********)
Lemma limit_plus:(f,g:R->R)(D:R->Prop)(l,l':R)(x0:R)
@@ -435,7 +435,7 @@ Generalize (H3 x2 (conj (D x2) (Rlt (R_dist x2 x0) x) H4 H6));
(Rmult eps (Rinv (Rplus R1 R1)))).
Exact (Rplus_lt ? ? ? ? H7 H8).
Exact (eps2 eps).
-Save.
+Qed.
(*********)
Lemma limit_Ropp:(f:R->R)(D:R->Prop)(l:R)(x0:R)
@@ -446,7 +446,7 @@ Unfold limit1_in;Unfold limit_in;Simpl;Intros;Elim (H eps H0);Clear H;
Rewrite (Ropp_Ropp l);Rewrite (Rplus_sym (Ropp (f x1)) l);
Fold (Rminus l (f x1));Fold (R_dist l (f x1));Rewrite R_dist_sym;
Assumption.
-Save.
+Qed.
(*********)
Lemma limit_minus:(f,g:R->R)(D:R->Prop)(l,l':R)(x0:R)
@@ -454,7 +454,7 @@ Lemma limit_minus:(f,g:R->R)(D:R->Prop)(l,l':R)(x0:R)
(limit1_in [x:R](Rminus (f x) (g x)) D (Rminus l l') x0).
Intros;Unfold Rminus;Generalize (limit_Ropp g D l' x0 H0);Intro;
Exact (limit_plus f [x:R](Ropp (g x)) D l (Ropp l') x0 H H1).
-Save.
+Qed.
(*********)
Lemma limit_free:(f:R->R)(D:R->Prop)(x:R)(x0:R)
@@ -462,7 +462,7 @@ Lemma limit_free:(f:R->R)(D:R->Prop)(x:R)(x0:R)
Unfold limit1_in;Unfold limit_in;Simpl;Intros;Split with eps;Split;
Auto;Intros;Elim (R_dist_refl (f x) (f x));Intros a b;
Rewrite (b (refl_eqT R (f x)));Unfold Rgt in H;Assumption.
-Save.
+Qed.
(*********)
Lemma limit_mul:(f,g:R->R)(D:R->Prop)(l,l':R)(x0:R)
@@ -533,7 +533,7 @@ Rewrite (Rmult_sym (Rplus R1 (Rabsolu l)) (Rmult eps (mul_factor l l')));
(mul_factor_wd l l'));
Rewrite (proj1 ? ? (Rmult_ne eps));Apply eq_Rle;Trivial.
Ring.
-Save.
+Qed.
(*********)
Definition adhDa:(R->Prop)->R->Prop:=[D:R->Prop][a:R]
@@ -616,7 +616,7 @@ Intros;Unfold adhDa in H;Elim (H0 eps H2);Intros;Elim (H1 eps H2);
Apply (Rle_lt_trans (Rabsolu (Rminus l l'))
(Rplus (Rabsolu (Rminus l (f x2))) (Rabsolu (Rminus (f x2) l')))
(Rplus eps eps) H3 H1).
-Save.
+Qed.
(*********)
Lemma limit_comp:(f,g:R->R)(Df,Dg:R->Prop)(l,l':R)(x0:R)
@@ -630,7 +630,7 @@ Unfold limit1_in;Unfold limit_in;Simpl;Intros;
Generalize (H3 x2 (conj (Df x2) (Rlt (R_dist x2 x0) x1) H4 H5));
Intro;Exact (H2 (f x2) (conj (Dg (f x2)) (Rlt (R_dist (f x2) l) x)
H6 H7)).
-Save.
+Qed.
(*********)
@@ -729,4 +729,4 @@ Assumption.
Apply Rsqr_pos_lt; Assumption.
Apply Rlt_Rinv; Cut ~(O=(2)); [Intro H3; Generalize (lt_INR_0 (2) (neq_O_lt (2) H3)); Unfold INR; Intro; Assumption | Discriminate].
Change ``0<(Rabsolu l)/2``; Unfold Rdiv; Apply Rmult_lt_pos; [Apply Rabsolu_pos_lt; Assumption | Apply Rlt_Rinv; Cut ~(O=(2)); [Intro H3; Generalize (lt_INR_0 (2) (neq_O_lt (2) H3)); Unfold INR; Intro; Assumption | Discriminate]].
-Save.
+Qed.
diff --git a/theories/Reals/Rseries.v b/theories/Reals/Rseries.v
index a388e2ae3..c88cdfaf2 100644
--- a/theories/Reals/Rseries.v
+++ b/theories/Reals/Rseries.v
@@ -49,18 +49,18 @@ Definition Un_growing:Prop:=(n:nat)(Rle (Un n) (Un (S n))).
(*********)
Lemma EUn_noempty:(ExT [r:R] (EUn r)).
Unfold EUn;Split with (Un O);Split with O;Trivial.
-Save.
+Qed.
(*********)
Lemma Un_in_EUn:(n:nat)(EUn (Un n)).
Intro;Unfold EUn;Split with n;Trivial.
-Save.
+Qed.
(*********)
Lemma Un_bound_imp:(x:R)((n:nat)(Rle (Un n) x))->(is_upper_bound EUn x).
Intros;Unfold is_upper_bound;Intros;Unfold EUn in H0;Elim H0;Clear H0;
Intros;Generalize (H x1);Intro;Rewrite <- H0 in H1;Trivial.
-Save.
+Qed.
(*********)
Lemma growing_prop:(n,m:nat)Un_growing->(ge n m)->(Rge (Un n) (Un m)).
@@ -81,7 +81,7 @@ Unfold ge in H0;Generalize (H0 (S n0) H1 (lt_le_S n0 n1 y));Intro;
Unfold Un_growing in H1;
Apply (Rge_trans (Un (S n1)) (Un n1) (Un (S n0))
(Rle_sym1 (Un n1) (Un (S n1)) (H1 n1)) H3).
-Save.
+Qed.
(* classical is needed: [not_all_not_ex] *)
@@ -123,7 +123,7 @@ Intro;Elim (H6 N);Intro;Unfold Rle.
Left;Unfold Rgt in H7;Assumption.
Right;Auto.
Apply (H1 (Un n) (Un_in_EUn n)).
-Save.
+Qed.
(*********)
Lemma finite_greater:(N:nat)(ExT [M:R] (n:nat)(le n N)->(Rle (Un n) M)).
@@ -137,7 +137,7 @@ Rewrite <-H1;Rewrite <-H1 in H2;
(eq_Rle (Un n) (Un n) (refl_eqT R (Un n))))).
Apply (H2 (or_intror (Rle (Un n) (Un (S N))) (Rle (Un n) x)
(H n H3))).
-Save.
+Qed.
(*********)
Lemma cauchy_bound:Cauchy_crit->(bound EUn).
@@ -159,7 +159,7 @@ Unfold ge in H0;Generalize (H0 x2 (le_n x) y);Clear H0;Intro;
Generalize (H2 x2 y);Clear H2 H0;Intro;Rewrite<-H in H0;
Elim (Rmax_Rle x0 (Rplus (Un x) R1) x1);Intros;Clear H1;Apply H2;
Left;Assumption.
-Save.
+Qed.
End sequence.
@@ -271,7 +271,7 @@ Assumption.
Apply Rabsolu_pos_lt.
Apply Rinv_neq_R0.
Assumption.
-Save.
+Qed.
diff --git a/theories/Reals/Rsigma.v b/theories/Reals/Rsigma.v
index 379b6485d..91f5a9d5c 100644
--- a/theories/Reals/Rsigma.v
+++ b/theories/Reals/Rsigma.v
@@ -27,7 +27,7 @@ Hypothesis def_sigma : (low,high:nat) (le low high) -> (sigma low high)==(sigma
Lemma sigma_aux_inv : (diff,low,high,high2:nat) (sigma_aux low high diff)==(sigma_aux low high2 diff).
Unfold sigma_aux; Induction diff; [Intros; Reflexivity | Intros; Rewrite (H (S low) high high2); Reflexivity].
-Save.
+Qed.
Theorem sigma_split : (low,high,k:nat) (le low k)->(lt k high)->``(sigma low high)==(sigma low k)+(sigma (S k) high)``.
Intros.
@@ -57,26 +57,26 @@ Apply INR_eq; Repeat Rewrite plus_INR Orelse Rewrite S_INR; Try Ring.
Apply lt_le_S; Assumption.
Assumption.
Apply lt_le_weak; Apply le_lt_trans with k; Assumption.
-Save.
+Qed.
Theorem sigma_diff : (low,high,k:nat) (le low k) -> (lt k high )->``(sigma low high)-(sigma low k)==(sigma (S k) high)``.
Intros low high k H1 H2; Symmetry; Rewrite -> (sigma_split H1 H2); Ring.
-Save.
+Qed.
Theorem sigma_diff_neg : (low,high,k:nat) (le low k) -> (lt k high)-> ``(sigma low k)-(sigma low high)==-(sigma (S k) high)``.
Intros low high k H1 H2; Rewrite -> (sigma_split H1 H2); Ring.
-Save.
+Qed.
Theorem sigma_first : (low,high:nat) (lt low high) -> ``(sigma low high)==(f low)+(sigma (S low) high)``.
Intros low high H1; Generalize (lt_le_S low high H1); Intro H2; Generalize (lt_le_weak low high H1); Intro H3; Replace ``(f low)`` with ``(sigma low low)``; [Apply sigma_split; Trivial | Rewrite def_sigma; [Replace (minus low low) with O; Ring; Apply minus_n_n | Trivial]].
-Save.
+Qed.
Theorem sigma_last : (low,high:nat) (lt low high) -> ``(sigma low high)==(f high)+(sigma low (pred high))``.
Intros low high H1; Generalize (lt_le_S low high H1); Intro H2; Generalize (lt_le_weak low high H1); Intro H3; Replace ``(f high)`` with ``(sigma high high)``; [Rewrite Rplus_sym; Pattern 3 high; Rewrite (S_pred high low H1); Apply sigma_split; [Apply gt_S_le; Rewrite <- (S_pred high low H1); Assumption | Pattern 2 high; Rewrite (S_pred high low H1); Apply lt_n_Sn] | Rewrite def_sigma; [ Rewrite <- (minus_n_n high) | Trivial ]; Trivial].
-Save.
+Qed.
Theorem sigma_eq_arg : (low:nat) (sigma low low)==(f low).
Intro low; Rewrite def_sigma; [Rewrite <- (minus_n_n low); Trivial | Trivial].
-Save.
+Qed.
End Sigma.
diff --git a/theories/Reals/Rtrigo.v b/theories/Reals/Rtrigo.v
index 4eeb015f0..e2cdb2434 100644
--- a/theories/Reals/Rtrigo.v
+++ b/theories/Reals/Rtrigo.v
@@ -25,7 +25,7 @@ Lemma PI_neq0 : ~``PI==0``.
Red; Intro.
Generalize PI_RGT_0; Intro; Rewrite H in H0.
Elim (Rlt_antirefl ``0`` H0).
-Save.
+Qed.
(******************************************************************)
(* Axiomatic definitions of cos and sin *)
@@ -49,7 +49,7 @@ Axiom sin_PI2 : ``(sin (PI/2))==1``.
(**********)
Lemma sin2_cos2 : (x:R) ``(Rsqr (sin x)) + (Rsqr (cos x))==1``.
Intro; Unfold Rsqr; Rewrite Rplus_sym; Rewrite <- (cos_minus x x); Unfold Rminus; Rewrite Rplus_Ropp_r; Apply cos_0.
-Save.
+Qed.
(**********)
@@ -57,7 +57,7 @@ Definition tan [x:R] : R := ``(sin x)/(cos x)``.
Lemma Ropp_mul3 : (r1,r2:R) ``r1*(-r2) == -(r1*r2)``.
Intros; Rewrite <- Ropp_mul1; Ring.
-Save.
+Qed.
Lemma tan_plus : (x,y:R) ~``(cos x)==0`` -> ~``(cos y)==0`` -> ~``(cos (x+y))==0`` -> ~``1-(tan x)*(tan y)==0`` -> ``(tan (x+y))==((tan x)+(tan y))/(1-(tan x)*(tan y))``.
Intros; Unfold tan; Rewrite sin_plus; Rewrite cos_plus; Unfold Rdiv; Replace ``((cos x)*(cos y)-(sin x)*(sin y))`` with ``((cos x)*(cos y))*(1-(sin x)*/(cos x)*((sin y)*/(cos y)))``.
@@ -76,7 +76,7 @@ Rewrite Rmult_1l; Rewrite (Rmult_sym (sin x)); Rewrite <- Ropp_mul3; Repeat Rewr
Apply Rmult_1r.
Assumption.
Assumption.
-Save.
+Qed.
(*******************************************************)
(* Some properties of cos, sin and tan *)
@@ -84,75 +84,75 @@ Save.
Lemma cos2 : (x:R) ``(Rsqr (cos x))==1-(Rsqr (sin x))``.
Intro x; Generalize (sin2_cos2 x); Intro H1; Rewrite <- H1; Unfold Rminus; Rewrite <- (Rplus_sym (Rsqr (cos x))); Rewrite Rplus_assoc; Rewrite Rplus_Ropp_r; Symmetry; Apply Rplus_Or.
-Save.
+Qed.
Lemma sin2 : (x:R) ``(Rsqr (sin x))==1-(Rsqr (cos x))``.
Intro x; Generalize (cos2 x); Intro H1; Rewrite -> H1.
Unfold Rminus; Rewrite Ropp_distr1; Rewrite <- Rplus_assoc; Rewrite Rplus_Ropp_r; Rewrite Rplus_Ol; Symmetry; Apply Ropp_Ropp.
-Save.
+Qed.
Axiom arc_sin_cos : (x,y,z:R) ``0<=x`` -> ``0<=y`` -> ``0<=z`` -> ``(Rsqr x)+(Rsqr y)==(Rsqr z)`` -> (EXT t : R | (x==(Rmult z (cos t))) /\ (y==(Rmult z (sin t)))).
Lemma pythagorean : (x,y,z:R) ``(Rsqr x)+(Rsqr y)==(Rsqr z)`` -> ``0<=x`` -> ``0<=y`` -> ``0<=z`` -> (EXT t : R | z==(Rplus (Rmult x (cos t)) (Rmult y (sin t)))).
Intros x y z H1 H2 H3 H4; Generalize (arc_sin_cos x y z H2 H3 H4); Intro H5; Elim H5; [ Intros x0 H6; Elim H6; Intros H7 H8; Exists x0; Rewrite H7; Rewrite H8; Replace ``z*(cos x0)*(cos x0)+z*(sin x0)*(sin x0)`` with ``z*((Rsqr (sin x0))+(Rsqr (cos x0)))``; [ Rewrite sin2_cos2; Ring | Unfold Rsqr; Ring] | Assumption].
-Save.
+Qed.
Lemma double : (x:R) ``2*x==x+x``.
Intro; Ring.
-Save.
+Qed.
Lemma aze : ``2<>0``.
DiscrR.
-Save.
+Qed.
Lemma double_var : (x:R) ``x == x/2 + x/2``.
Intro; Rewrite <- double; Unfold Rdiv; Rewrite <- Rmult_assoc; Symmetry; Apply Rinv_r_simpl_m.
Apply aze.
-Save.
+Qed.
Lemma sin_2a : (x:R) ``(sin (2*x))==2*(sin x)*(cos x)``.
Intro x; Rewrite double; Rewrite sin_plus.
Rewrite <- (Rmult_sym (sin x)); Symmetry; Rewrite Rmult_assoc; Apply double.
-Save.
+Qed.
Lemma cos_2a : (x:R) ``(cos (2*x))==(cos x)*(cos x)-(sin x)*(sin x)``.
Intro x; Rewrite double; Apply cos_plus.
-Save.
+Qed.
Lemma cos_2a_cos : (x:R) ``(cos (2*x))==2*(cos x)*(cos x)-1``.
Intro x; Rewrite double; Unfold Rminus; Rewrite Rmult_assoc; Rewrite cos_plus; Generalize (sin2_cos2 x); Rewrite double; Intro H1; Rewrite <- H1; SqRing.
-Save.
+Qed.
Lemma cos_2a_sin : (x:R) ``(cos (2*x))==1-2*(sin x)*(sin x)``.
Intro x; Rewrite Rmult_assoc; Unfold Rminus; Repeat Rewrite double.
Generalize (sin2_cos2 x); Intro H1; Rewrite <- H1; Rewrite cos_plus; SqRing.
-Save.
+Qed.
Lemma tan_2a : (x:R) ~``(cos x)==0`` -> ~``(cos (2*x))==0`` -> ~``1-(tan x)*(tan x)==0`` ->``(tan (2*x))==(2*(tan x))/(1-(tan x)*(tan x))``.
Repeat Rewrite double; Intros; Repeat Rewrite double; Rewrite double in H0; Apply tan_plus; Assumption.
-Save.
+Qed.
Lemma sin_0 : ``(sin 0)==0``.
Apply Rsqr_eq_0; Rewrite sin2; Rewrite cos_0; SqRing.
-Save.
+Qed.
Lemma sin_neg : (x:R) ``(sin (-x))==-(sin x)``.
Intro x; Replace ``-x`` with ``0-x``; Ring; Replace `` -(sin x)`` with ``(sin 0)*(cos x)-(cos 0)*(sin x)``; [ Apply sin_minus |Rewrite -> sin_0; Rewrite -> cos_0; Ring ].
-Save.
+Qed.
Lemma cos_neg : (x:R) ``(cos (-x))==(cos x)``.
Intro x; Replace ``(-x)`` with ``(0-x)``; Ring; Replace ``(cos x)`` with ``(cos 0)*(cos x)+(sin 0)*(sin x)``; [ Apply cos_minus | Rewrite -> cos_0; Rewrite -> sin_0; Ring ].
-Save.
+Qed.
Lemma tan_0 : ``(tan 0)==0``.
Unfold tan; Rewrite -> sin_0; Rewrite -> cos_0.
Unfold Rdiv; Apply Rmult_Ol.
-Save.
+Qed.
Lemma tan_neg : (x:R) ``(tan (-x))==-(tan x)``.
Intros x; Unfold tan; Rewrite sin_neg; Rewrite cos_neg; Unfold Rdiv.
Apply Ropp_mul1.
-Save.
+Qed.
Lemma tan_minus : (x,y:R) ~``(cos x)==0`` -> ~``(cos y)==0`` -> ~``(cos (x-y))==0`` -> ~``1+(tan x)*(tan y)==0`` -> ``(tan (x-y))==((tan x)-(tan y))/(1+(tan x)*(tan y))``.
Intros; Unfold Rminus; Rewrite tan_plus.
@@ -161,11 +161,11 @@ Assumption.
Rewrite cos_neg; Assumption.
Assumption.
Rewrite tan_neg; Unfold Rminus; Rewrite <- Ropp_mul1; Rewrite Ropp_mul2; Assumption.
-Save.
+Qed.
Lemma cos_PI2 : ``(cos (PI/2))==0``.
Apply Rsqr_eq_0; Rewrite cos2; Rewrite sin_PI2; Rewrite Rsqr_1; Unfold Rminus; Apply Rplus_Ropp_r.
-Save.
+Qed.
Lemma sin_PI : ``(sin PI)==0``.
Replace ``PI`` with ``2*(PI/2)``.
@@ -173,7 +173,7 @@ Rewrite -> sin_2a; Rewrite -> sin_PI2; Rewrite -> cos_PI2; Ring.
Unfold Rdiv.
Repeat Rewrite <- Rmult_assoc; Apply Rinv_r_simpl_m.
Apply aze.
-Save.
+Qed.
Lemma cos_PI : ``(cos PI)==(-1)``.
Replace ``PI`` with ``2*(PI/2)``.
@@ -184,104 +184,104 @@ Unfold Rdiv.
Repeat Rewrite <- Rmult_assoc.
Apply Rinv_r_simpl_m.
Apply aze.
-Save.
+Qed.
Lemma tan_PI : ``(tan PI)==0``.
Unfold tan; Rewrite -> sin_PI; Rewrite -> cos_PI.
Unfold Rdiv; Apply Rmult_Ol.
-Save.
+Qed.
Lemma sin_3PI2 : ``(sin (3*(PI/2)))==(-1)``.
Replace ``3*(PI/2)`` with ``PI+(PI/2)``.
Rewrite -> sin_plus; Rewrite -> sin_PI; Rewrite -> cos_PI; Rewrite -> sin_PI2; Ring.
Pattern 1 PI; Rewrite (double_var PI).
Ring.
-Save.
+Qed.
Lemma cos_3PI2 : ``(cos (3*(PI/2)))==0``.
Replace ``3*(PI/2)`` with ``PI+(PI/2)``.
Rewrite -> cos_plus; Rewrite -> sin_PI; Rewrite -> cos_PI2; Ring.
Pattern 1 PI; Rewrite (double_var PI).
Ring.
-Save.
+Qed.
Lemma sin_2PI : ``(sin (2*PI))==0``.
Rewrite -> sin_2a; Rewrite -> sin_PI.
Rewrite Rmult_Or.
Rewrite Rmult_Ol.
Reflexivity.
-Save.
+Qed.
Lemma cos_2PI : ``(cos (2*PI))==1``.
Rewrite -> cos_2a; Rewrite -> sin_PI; Rewrite -> cos_PI; Rewrite Rmult_Or; Rewrite minus_R0; Rewrite Ropp_mul1; Rewrite Rmult_1l; Apply Ropp_Ropp.
-Save.
+Qed.
Lemma tan_2PI : ``(tan (2*PI))==0``.
Unfold tan; Rewrite sin_2PI; Unfold Rdiv; Apply Rmult_Ol.
-Save.
+Qed.
Lemma neg_cos : (x:R) ``(cos (x+PI))==-(cos x)``.
Intro x; Rewrite -> cos_plus; Rewrite -> sin_PI; Rewrite -> cos_PI; Rewrite Rmult_Or; Rewrite minus_R0; Rewrite Ropp_mul3; Rewrite Rmult_1r; Reflexivity.
-Save.
+Qed.
Lemma neg_sin : (x:R) ``(sin (x+PI))==-(sin x)``.
Intro x; Rewrite -> sin_plus; Rewrite -> sin_PI; Rewrite -> cos_PI.
Rewrite Rmult_Or; Rewrite Rplus_Or; Rewrite Ropp_mul3; Rewrite Rmult_1r; Reflexivity.
-Save.
+Qed.
Lemma sin_PI_x : (x:R) ``(sin (PI-x))==(sin x)``.
Intro x; Rewrite -> sin_minus; Rewrite -> sin_PI; Rewrite -> cos_PI; Rewrite Rmult_Ol; Unfold Rminus; Rewrite Rplus_Ol; Rewrite Ropp_mul1; Rewrite Ropp_Ropp; Apply Rmult_1l.
-Save.
+Qed.
Lemma sin_period : (x:R)(k:nat) ``(sin (x+2*(INR k)*PI))==(sin x)``.
Intros x k; Induction k.
Cut ``x+2*(INR O)*PI==x``; [Intro; Rewrite H; Reflexivity | Ring].
Replace ``x+2*(INR (S k))*PI`` with ``(x+2*(INR k)*PI)+(2*PI)``; [Rewrite -> sin_plus; Rewrite -> sin_2PI; Rewrite -> cos_2PI; Ring; Apply Hreck | Rewrite -> S_INR; Ring].
-Save.
+Qed.
Lemma cos_period : (x:R)(k:nat) ``(cos (x+2*(INR k)*PI))==(cos x)``.
Intros x k; Induction k.
Cut ``x+2*(INR O)*PI==x``; [Intro; Rewrite H; Reflexivity | Ring].
Replace ``x+2*(INR (S k))*PI`` with ``(x+2*(INR k)*PI)+(2*PI)``; [Rewrite -> cos_plus; Rewrite -> sin_2PI; Rewrite -> cos_2PI; Ring; Apply Hreck | Rewrite -> S_INR; Ring].
-Save.
+Qed.
Lemma sin_shift : (x:R) ``(sin (PI/2-x))==(cos x)``.
Intro x; Rewrite -> sin_minus; Rewrite -> sin_PI2; Rewrite -> cos_PI2; Ring.
-Save.
+Qed.
Lemma cos_shift : (x:R) ``(cos (PI/2-x))==(sin x)``.
Intro x; Rewrite -> cos_minus; Rewrite -> sin_PI2; Rewrite -> cos_PI2; Ring.
-Save.
+Qed.
Lemma cos_sin : (x:R) ``(cos x)==(sin (PI/2+x))``.
Intro x; Rewrite -> sin_plus; Rewrite -> sin_PI2; Rewrite -> cos_PI2; Ring.
-Save.
+Qed.
Lemma sin_cos : (x:R) ``(sin x)==-(cos (PI/2+x))``.
Intro x; Rewrite -> cos_plus; Rewrite -> sin_PI2; Rewrite -> cos_PI2; Ring.
-Save.
+Qed.
Axiom sin_eq_0 : (x:R) (sin x)==R0 <-> (EXT k:Z | x==(Rmult (IZR k) PI)).
Lemma sin_eq_0_0 : (x:R) (sin x)==R0 -> (EXT k:Z | x==(Rmult (IZR k) PI)).
Intros; Elim (sin_eq_0 x); Intros; Apply (H0 H).
-Save.
+Qed.
Lemma sin_eq_0_1 : (x:R) (EXT k:Z | x==(Rmult (IZR k) PI)) -> (sin x)==R0.
Intros; Elim (sin_eq_0 x); Intros; Apply (H1 H).
-Save.
+Qed.
Lemma cos_eq_0_0 : (x:R) (cos x)==R0 -> (EXT k : Z | ``x==(IZR k)*PI+PI/2``).
Intros x H; Rewrite -> cos_sin in H; Generalize (sin_eq_0_0 (Rplus (Rdiv PI (INR (2))) x) H); Intro H2; Elim H2; Intros x0 H3; Exists (Zminus x0 (inject_nat (S O))); Rewrite <- Z_R_minus; Ring; Rewrite Rmult_sym; Rewrite <- H3; Unfold INR.
Rewrite (double_var ``-PI``); Unfold Rdiv; Ring.
-Save.
+Qed.
Lemma cos_eq_0_1 : (x:R) (EXT k : Z | ``x==(IZR k)*PI+PI/2``) -> ``(cos x)==0``.
Intros x H1; Rewrite cos_sin; Elim H1; Intros x0 H2; Rewrite H2; Replace ``PI/2+((IZR x0)*PI+PI/2)`` with ``(IZR x0)*PI+PI``.
Rewrite neg_sin; Rewrite <- Ropp_O.
Apply eq_Ropp; Apply sin_eq_0_1; Exists x0; Reflexivity.
Pattern 2 PI; Rewrite (double_var PI); Ring.
-Save.
+Qed.
Lemma sin_eq_O_2PI_0 : (x:R) ``0<=x`` -> ``x<=2*PI`` -> ``(sin x)==0`` -> ``x==0``\/``x==PI``\/``x==2*PI``.
Intros; Generalize (sin_eq_0_0 x H1); Intro.
@@ -326,19 +326,19 @@ Assumption.
Assumption.
Apply PI_neq0.
Apply PI_neq0.
-Save.
+Qed.
Lemma sin_eq_O_2PI_1 : (x:R) ``0<=x`` -> ``x<=2*PI`` -> ``x==0``\/``x==PI``\/``x==2*PI`` -> ``(sin x)==0``.
Intros x H1 H2 H3; Elim H3; Intro H4; [ Rewrite H4; Rewrite -> sin_0; Reflexivity | Elim H4; Intro H5; [Rewrite H5; Rewrite -> sin_PI; Reflexivity | Rewrite H5; Rewrite -> sin_2PI; Reflexivity]].
-Save.
+Qed.
Lemma PI2_RGT_0 : ``0<PI/2``.
Cut ~(O=(2)); [Intro H; Generalize (lt_INR_0 (2) (neq_O_lt (2) H)); Rewrite INR_eq_INR2; Unfold INR2; Intro H1; Generalize (Rmult_lt_pos PI (Rinv ``2``) PI_RGT_0 (Rlt_Rinv ``2`` H1)); Intro H2; Assumption | Discriminate].
-Save.
+Qed.
Lemma Rgt_2_0 : ``0<2``.
Cut ~(O=(2)); [Intro H0; Generalize (lt_INR_0 (2) (neq_O_lt (2) H0)); Unfold INR; Intro H; Assumption | Discriminate].
-Save.
+Qed.
Lemma cos_eq_0_2PI_0 : (x:R) ``R0<=x`` -> ``x<=2*PI`` -> ``(cos x)==0`` -> ``x==(PI/2)``\/``x==3*(PI/2)``.
Intros; Case (total_order x ``3*(PI/2)``); Intro.
@@ -431,11 +431,11 @@ Apply PI_neq0.
Rewrite double; Pattern 3 4 PI; Rewrite double_var; Ring.
Ring.
Pattern 1 PI; Rewrite double_var; Ring.
-Save.
+Qed.
Lemma cos_eq_0_2PI_1 : (x:R) ``0<=x`` -> ``x<=2*PI`` -> ``x==PI/2``\/``x==3*(PI/2)`` -> ``(cos x)==0``.
Intros x H1 H2 H3; Elim H3; Intro H4; [ Rewrite H4; Rewrite -> cos_PI2; Reflexivity | Rewrite H4; Rewrite -> cos_3PI2; Reflexivity ].
-Save.
+Qed.
Lemma SIN_bound : (x:R) ``-1<=(sin x)<=1``.
Intro; Case (total_order_Rle ``-1`` (sin x)); Intro.
@@ -447,7 +447,7 @@ Auto with real.
Cut ``(sin x)< -1``.
Intro; Generalize (Rlt_Ropp (sin x) ``-1`` H); Rewrite Ropp_Ropp; Clear H; Intro; Generalize (Rsqr_incrst_1 ``1`` ``-(sin x)`` H (Rlt_le ``0`` ``1`` Rlt_R0_R1) (Rlt_le ``0`` ``-(sin x)`` (Rlt_trans ``0`` ``1`` ``-(sin x)`` Rlt_R0_R1 H))); Rewrite Rsqr_1; Intro; Rewrite <- Rsqr_neg in H0; Rewrite sin2 in H0; Unfold Rminus in H0; Generalize (Rlt_compatibility ``-1`` ``1`` ``1+ -(Rsqr (cos x))`` H0); Repeat Rewrite <- Rplus_assoc; Repeat Rewrite Rplus_Ropp_l; Rewrite Rplus_Ol; Intro; Rewrite <- Ropp_O in H1; Generalize (Rlt_Ropp ``-0`` ``-(Rsqr (cos x))`` H1); Repeat Rewrite Ropp_Ropp; Intro; Generalize (pos_Rsqr (cos x)); Intro; Elim (Rlt_antirefl ``0`` (Rle_lt_trans ``0`` (Rsqr (cos x)) ``0`` H3 H2)).
Auto with real.
-Save.
+Qed.
Lemma COS_bound : (x:R) ``-1<=(cos x)<=1``.
Intro; Case (total_order_Rle ``-1`` (cos x)); Intro.
@@ -459,15 +459,15 @@ Auto with real.
Cut ``(cos x)< -1``.
Intro; Generalize (Rlt_Ropp (cos x) ``-1`` H); Rewrite Ropp_Ropp; Clear H; Intro; Generalize (Rsqr_incrst_1 ``1`` ``-(cos x)`` H (Rlt_le ``0`` ``1`` Rlt_R0_R1) (Rlt_le ``0`` ``-(cos x)`` (Rlt_trans ``0`` ``1`` ``-(cos x)`` Rlt_R0_R1 H))); Rewrite Rsqr_1; Intro; Rewrite <- Rsqr_neg in H0; Rewrite cos2 in H0; Unfold Rminus in H0; Generalize (Rlt_compatibility ``-1`` ``1`` ``1+ -(Rsqr (sin x))`` H0); Repeat Rewrite <- Rplus_assoc; Repeat Rewrite Rplus_Ropp_l; Rewrite Rplus_Ol; Intro; Rewrite <- Ropp_O in H1; Generalize (Rlt_Ropp ``-0`` ``-(Rsqr (sin x))`` H1); Repeat Rewrite Ropp_Ropp; Intro; Generalize (pos_Rsqr (sin x)); Intro; Elim (Rlt_antirefl ``0`` (Rle_lt_trans ``0`` (Rsqr (sin x)) ``0`` H3 H2)).
Auto with real.
-Save.
+Qed.
Lemma cos_sin_0 : (x:R) ~(``(cos x)==0``/\``(sin x)==0``).
Intro; Red; Intro; Elim H; Intros; Generalize (sin2_cos2 x); Intro; Rewrite H0 in H2; Rewrite H1 in H2; Repeat Rewrite Rsqr_O in H2; Rewrite Rplus_Or in H2; Generalize Rlt_R0_R1; Intro; Rewrite <- H2 in H3; Elim (Rlt_antirefl ``0`` H3).
-Save.
+Qed.
Lemma cos_sin_0_var : (x:R) ~``(cos x)==0``\/~``(sin x)==0``.
Intro; Apply not_and_or; Apply cos_sin_0.
-Save.
+Qed.
(*****************************************************************)
(* Using series definitions of cos and sin *)
@@ -494,24 +494,24 @@ Axiom sin_lb_gt_0 : (a:R) ``0<a``->``a<=PI/2``->``0<(sin_lb a)``.
Lemma SIN : (a:R) ``0<=a`` -> ``a<=PI`` -> ``(sin_lb a)<=(sin a)<=(sin_ub a)``.
Intros; Unfold sin_lb sin_ub; Apply (sin_bound a (S O) H H0).
-Save.
+Qed.
Lemma COS : (a:R) ``-PI/2<=a`` -> ``a<=PI/2`` -> ``(cos_lb a)<=(cos a)<=(cos_ub a)``.
Intros; Unfold cos_lb cos_ub; Apply (cos_bound a (S O) H H0).
-Save.
+Qed.
(**********)
Lemma PI4_RGT_0 : ``0<PI/4``.
Cut ~(O=(4)); [Intro H; Generalize (lt_INR_0 (4) (neq_O_lt (4) H)); Rewrite INR_eq_INR2; Unfold INR2; Intro H1; Generalize (Rmult_lt_pos PI (Rinv ``4``) PI_RGT_0 (Rlt_Rinv ``4`` H1)); Intro H2; Assumption | Discriminate].
-Save.
+Qed.
Lemma PI6_RGT_0 : ``0<PI/6``.
Cut ~(O=(6)); [Intro H; Generalize (lt_INR_0 (6) (neq_O_lt (6) H)); Rewrite INR_eq_INR2; Unfold INR2; Intro H1; Generalize (Rmult_lt_pos PI (Rinv ``6``) PI_RGT_0 (Rlt_Rinv ``6`` H1)); Intro H2; Assumption | Discriminate].
-Save.
+Qed.
Lemma _PI2_RLT_0 : ``-(PI/2)<0``.
Rewrite <- Ropp_O; Apply Rlt_Ropp1; Apply PI2_RGT_0.
-Save.
+Qed.
Lemma PI4_RLT_PI2 : ``PI/4<PI/2``.
Cut ~(O=(2)).
@@ -525,39 +525,39 @@ Clear H3; Intro H3; Generalize (Rlt_Rinv_R1 ``2`` ``4`` (Rlt_le ``1`` ``2`` H3)
Ring.
Discriminate.
Discriminate.
-Save.
+Qed.
Lemma PI6_RLT_PI2 : ``PI/6<PI/2``.
Cut ~(O=(4)); [ Intro H; Cut ~(O=(1)); [Intro H0; Generalize (lt_INR_0 (4) (neq_O_lt (4) H)); Rewrite INR_eq_INR2; Unfold INR2; Intro H1; Generalize (Rlt_compatibility ``2`` ``0`` ``4`` H1); Rewrite Rplus_sym; Rewrite Rplus_Ol; Replace ``2+4`` with ``6``; [Intro H2; Generalize (lt_INR_0 (1) (neq_O_lt (1) H0)); Rewrite INR_eq_INR2; Unfold INR2; Intro H3; Generalize (Rlt_compatibility ``1`` ``0`` ``1`` H3); Rewrite Rplus_sym; Rewrite Rplus_Ol; Clear H3; Intro H3; Generalize (Rlt_Rinv_R1 ``2`` ``6`` (Rlt_le ``1`` ``2`` H3) H2); Intro H4; Generalize (Rlt_monotony PI (Rinv ``6``) (Rinv ``2``) PI_RGT_0 H4); Intro H5; Assumption | Ring] | Discriminate] | Discriminate ].
-Save.
+Qed.
Lemma Rgt_3_0 : ``0<3``.
Cut ~(O=(3)); [Intro H0; Generalize (lt_INR_0 (3) (neq_O_lt (3) H0)); Rewrite INR_eq_INR2; Unfold INR2; Intro H; Assumption | Discriminate].
-Save.
+Qed.
Lemma sqrt2_neq_0 : ~``(sqrt 2)==0``.
Generalize (Rlt_le ``0`` ``2`` Rgt_2_0); Intro H1; Red; Intro H2; Generalize (sqrt_eq_0 ``2`` H1 H2); Intro H; Absurd ``2==0``; [ DiscrR | Assumption].
-Save.
+Qed.
Lemma R1_sqrt2_neq_0 : ~``1/(sqrt 2)==0``.
Generalize (Rinv_neq_R0 ``(sqrt 2)`` sqrt2_neq_0); Intro H; Generalize (prod_neq_R0 ``1`` ``(Rinv (sqrt 2))`` R1_neq_R0 H); Intro H0; Assumption.
-Save.
+Qed.
Lemma sqrt3_2_neq_0 : ~``2*(sqrt 3)==0``.
Apply prod_neq_R0; [DiscrR | Generalize (Rlt_le ``0`` ``3`` Rgt_3_0); Intro H1; Red; Intro H2; Generalize (sqrt_eq_0 ``3`` H1 H2); Intro H; Absurd ``3==0``; [ DiscrR | Assumption]].
-Save.
+Qed.
Lemma not_sym : (r1,r2:R) ``r1<>r2`` -> ``r2<>r1``.
Intros; Red; Intro H0; Rewrite H0 in H; Elim H; Reflexivity.
-Save.
+Qed.
Lemma Rlt_sqrt2_0 : ``0<(sqrt 2)``.
Generalize (foo ``2`` (Rlt_le ``0`` ``2`` Rgt_2_0)); Intro H1; Elim H1; Intro H2; [Assumption | Absurd ``0 == (sqrt 2)``; [Apply not_sym; Apply sqrt2_neq_0 | Assumption]].
-Save.
+Qed.
Lemma Rlt_sqrt3_0 : ``0<(sqrt 3)``.
Cut ~(O=(1)); [Intro H0; Generalize (Rlt_le ``0`` ``2`` Rgt_2_0); Intro H1; Generalize (Rlt_le ``0`` ``3`` Rgt_3_0); Intro H2; Generalize (lt_INR_0 (1) (neq_O_lt (1) H0)); Unfold INR; Intro H3; Generalize (Rlt_compatibility ``2`` ``0`` ``1`` H3); Rewrite Rplus_sym; Rewrite Rplus_Ol; Replace ``2+1`` with ``3``; [Intro H4; Generalize (sqrt_lt_1 ``2`` ``3`` H1 H2 H4); Clear H3; Intro H3; Apply (Rlt_trans ``0`` ``(sqrt 2)`` ``(sqrt 3)`` Rlt_sqrt2_0 H3) | Ring] | Discriminate].
-Save.
+Qed.
Lemma PI2_Rlt_PI : ``PI/2<PI``.
Cut ~(O=(1)).
@@ -568,7 +568,7 @@ Rewrite Rmult_1r.
Intro; Assumption.
Right; Reflexivity.
Discriminate.
-Save.
+Qed.
Theorem sin_gt_0 : (x:R) ``0<x`` -> ``x<PI`` -> ``0<(sin x)``.
Intros; Elim (SIN x (Rlt_le R0 x H) (Rlt_le x PI H0)); Intros H1 _; Case (total_order x ``PI/2``); Intro H2.
@@ -585,24 +585,24 @@ Intro H7; Elim (SIN ``PI-x`` (Rlt_le R0 ``PI-x`` H7) (Rlt_le ``PI-x`` PI (Rlt_tr
Reflexivity.
Pattern 2 PI; Rewrite double_var; Ring.
Reflexivity.
-Save.
+Qed.
Theorem cos_gt_0 : (x:R) ``-(PI/2)<x`` -> ``x<PI/2`` -> ``0<(cos x)``.
Intros; Rewrite cos_sin; Generalize (Rlt_compatibility ``PI/2`` ``-(PI/2)`` x H).
Rewrite Rplus_Ropp_r; Intro H1; Generalize (Rlt_compatibility ``PI/2`` x ``PI/2`` H0); Rewrite <- double_var; Intro H2; Apply (sin_gt_0 ``PI/2+x`` H1 H2).
-Save.
+Qed.
Lemma sin_ge_0 : (x:R) ``0<=x`` -> ``x<=PI`` -> ``0<=(sin x)``.
Intros x H1 H2; Elim H1; Intro H3; [ Elim H2; Intro H4; [ Left ; Apply (sin_gt_0 x H3 H4) | Rewrite H4; Right; Symmetry; Apply sin_PI ] | Rewrite <- H3; Right; Symmetry; Apply sin_0].
-Save.
+Qed.
Lemma cos_ge_0 : (x:R) ``-(PI/2)<=x`` -> ``x<=PI/2`` -> ``0<=(cos x)``.
Intros x H1 H2; Elim H1; Intro H3; [ Elim H2; Intro H4; [ Left ; Apply (cos_gt_0 x H3 H4) | Rewrite H4; Right; Symmetry; Apply cos_PI2 ] | Rewrite <- H3; Rewrite cos_neg; Right; Symmetry; Apply cos_PI2 ].
-Save.
+Qed.
Lemma sin_le_0 : (x:R) ``PI<=x`` -> ``x<=2*PI`` -> ``(sin x)<=0``.
Intros x H1 H2; Apply Rle_sym2; Rewrite <- Ropp_O; Rewrite <- (Ropp_Ropp (sin x)); Apply Rle_Ropp; Rewrite <- neg_sin; Replace ``x+PI`` with ``(x-PI)+2*(INR (S O))*PI``; [Rewrite -> (sin_period (Rminus x PI) (S O)); Apply sin_ge_0; [Replace ``x-PI`` with ``x+(-PI)``; [Rewrite Rplus_sym; Replace ``0`` with ``(-PI)+PI``; [Apply Rle_compatibility; Assumption | Ring] | Ring] | Replace ``x-PI`` with ``x+(-PI)``; Rewrite Rplus_sym; [Pattern 2 PI; Replace ``PI`` with ``(-PI)+2*PI``; [Apply Rle_compatibility; Assumption | Ring] | Ring]] |Unfold INR; Ring].
-Save.
+Qed.
Lemma cos_le_0 : (x:R) ``PI/2<=x``->``x<=3*(PI/2)``->``(cos x)<=0``.
@@ -615,15 +615,15 @@ Unfold Rminus; Rewrite Rplus_sym; Replace ``PI/2`` with ``(-PI)+3*(PI/2)``.
Apply Rle_compatibility; Assumption.
Pattern 1 PI; Rewrite (double_var PI); Rewrite Ropp_distr1; Ring.
Unfold INR; Ring.
-Save.
+Qed.
Lemma sin_lt_0 : (x:R) ``PI<x`` -> ``x<2*PI`` -> ``(sin x)<0``.
Intros x H1 H2; Rewrite <- Ropp_O; Rewrite <- (Ropp_Ropp (sin x)); Apply Rlt_Ropp; Rewrite <- neg_sin; Replace ``x+PI`` with ``(x-PI)+2*(INR (S O))*PI``; [Rewrite -> (sin_period (Rminus x PI) (S O)); Apply sin_gt_0; [Replace ``x-PI`` with ``x+(-PI)``; [Rewrite Rplus_sym; Replace ``0`` with ``(-PI)+PI``; [Apply Rlt_compatibility; Assumption | Ring] | Ring] | Replace ``x-PI`` with ``x+(-PI)``; Rewrite Rplus_sym; [Pattern 2 PI; Replace ``PI`` with ``(-PI)+2*PI``; [Apply Rlt_compatibility; Assumption | Ring] | Ring]] |Unfold INR; Ring].
-Save.
+Qed.
Lemma sin_lt_0_var : (x:R) ``-PI<x`` -> ``x<0`` -> ``(sin x)<0``.
Intros; Generalize (Rlt_compatibility ``2*PI`` ``-PI`` x H); Replace ``2*PI+(-PI)`` with ``PI``; [Intro H1; Rewrite Rplus_sym in H1; Generalize (Rlt_compatibility ``2*PI`` x ``0`` H0); Intro H2; Rewrite (Rplus_sym ``2*PI``) in H2; Rewrite <- (Rplus_sym R0) in H2; Rewrite Rplus_Ol in H2; Rewrite <- (sin_period x (1)); Unfold INR; Replace ``2*1*PI`` with ``2*PI``; [Apply (sin_lt_0 ``x+2*PI`` H1 H2) | Ring] | Ring].
-Save.
+Qed.
Lemma cos_lt_0 : (x:R) ``PI/2<x`` -> ``x<3*(PI/2)``-> ``(cos x)<0``.
Intros x H1 H2; Rewrite <- Ropp_O; Rewrite <- (Ropp_Ropp (cos x)); Apply Rlt_Ropp; Rewrite <- neg_cos; Replace ``x+PI`` with ``(x-PI)+2*(INR (S O))*PI``.
@@ -635,13 +635,13 @@ Unfold Rminus; Rewrite Rplus_sym; Replace ``PI/2`` with ``(-PI)+3*(PI/2)``.
Apply Rlt_compatibility; Assumption.
Pattern 1 PI; Rewrite (double_var PI); Rewrite Ropp_distr1; Ring.
Unfold INR; Ring.
-Save.
+Qed.
Lemma tan_gt_0 : (x:R) ``0<x`` -> ``x<PI/2`` -> ``0<(tan x)``.
Intros x H1 H2; Unfold tan; Generalize _PI2_RLT_0; Generalize (Rlt_trans R0 x ``PI/2`` H1 H2); Intros; Generalize (Rlt_trans ``-(PI/2)`` R0 x H0 H1); Intro H5; Generalize (Rlt_trans x ``PI/2`` PI H2 PI2_Rlt_PI); Intro H7; Unfold Rdiv; Apply Rmult_lt_pos.
Apply sin_gt_0; Assumption.
Apply Rlt_Rinv; Apply cos_gt_0; Assumption.
-Save.
+Qed.
Lemma tan_lt_0 : (x:R) ``-(PI/2)<x``->``x<0``->``(tan x)<0``.
Intros x H1 H2; Unfold tan; Generalize (cos_gt_0 x H1 (Rlt_trans x ``0`` ``PI/2`` H2 PI2_RGT_0)); Intro H3; Rewrite <- Ropp_O; Replace ``(sin x)/(cos x)`` with ``- ((-(sin x))/(cos x))``.
@@ -653,7 +653,7 @@ Rewrite <- (Ropp_Ropp ``PI/2``); Apply Rgt_Ropp; Assumption.
Apply PI2_Rlt_PI.
Apply Rlt_Rinv; Assumption.
Unfold Rdiv; Ring.
-Save.
+Qed.
Lemma cos_ge_0_3PI2 : (x:R) ``3*(PI/2)<=x``->``x<=2*PI``->``0<=(cos x)``.
Intros; Rewrite <- cos_neg; Rewrite <- (cos_period ``-x`` (1)); Unfold INR; Replace ``-x+2*1*PI`` with ``2*PI-x``.
@@ -664,7 +664,7 @@ Replace ``2*PI+ -(3*PI/2)`` with ``PI/2``.
Intro H4; Apply (cos_ge_0 ``2*PI-x`` (Rlt_le ``-(PI/2)`` ``2*PI-x`` (Rlt_le_trans ``-(PI/2)`` ``0`` ``2*PI-x`` _PI2_RLT_0 H2)) H4).
Rewrite double; Pattern 2 3 PI; Rewrite double_var; Ring.
Ring.
-Save.
+Qed.
Lemma form1 : (p,q:R) ``(cos p)+(cos q)==2*(cos ((p-q)/2))*(cos ((p+q)/2))``.
Intros p q; Pattern 1 p; Replace ``p`` with ``(p-q)/2+(p+q)/2``.
@@ -673,7 +673,7 @@ Rewrite cos_plus; Rewrite cos_minus; Ring.
Unfold Rdiv Rminus; Rewrite Rmult_Rplus_distrl; Ring.
Rewrite (Rmult_sym ``/2``); Repeat Rewrite <- Ropp_mul1; Assert H := (double_var ``-q``); Unfold Rdiv in H; Symmetry ; Assumption.
Unfold Rdiv Rminus; Rewrite Rmult_Rplus_distrl; Ring; Rewrite (Rmult_sym ``/2``); Repeat Rewrite <- Ropp_mul1; Assert H := (double_var ``p``); Unfold Rdiv in H; Symmetry ; Assumption.
-Save.
+Qed.
Lemma form2 : (p,q:R) ``(cos p)-(cos q)==-2*(sin ((p-q)/2))*(sin ((p+q)/2))``.
Intros p q; Pattern 1 p; Replace ``p`` with ``(p-q)/2+(p+q)/2``.
@@ -681,7 +681,7 @@ Rewrite <- (cos_neg q); Replace``-q`` with ``(p-q)/2-(p+q)/2``.
Rewrite cos_plus; Rewrite cos_minus; Ring.
Unfold Rdiv Rminus; Rewrite Rmult_Rplus_distrl; Ring; Rewrite (Rmult_sym ``/2``); Repeat Rewrite <- Ropp_mul1; Assert H := (double_var ``-q``); Unfold Rdiv in H; Symmetry ; Assumption.
Unfold Rdiv Rminus; Rewrite Rmult_Rplus_distrl; Ring; Rewrite (Rmult_sym ``/2``); Repeat Rewrite <- Ropp_mul1; Assert H := (double_var ``p``); Unfold Rdiv in H; Symmetry ; Assumption.
-Save.
+Qed.
Lemma form3 : (p,q:R) ``(sin p)+(sin q)==2*(cos ((p-q)/2))*(sin ((p+q)/2))``.
Intros p q; Pattern 1 p; Replace ``p`` with ``(p-q)/2+(p+q)/2``.
@@ -701,7 +701,7 @@ Rewrite (Rmult_sym ``/2``).
Repeat Rewrite <- Ropp_mul1.
Assert H := (double_var ``p``).
Unfold Rdiv in H; Symmetry ; Assumption.
-Save.
+Qed.
Lemma form4 : (p,q:R) ``(sin p)-(sin q)==2*(cos ((p+q)/2))*(sin ((p-q)/2))``.
Intros p q; Pattern 1 p; Replace ``p`` with ``(p-q)/2+(p+q)/2``.
@@ -721,7 +721,7 @@ Rewrite (Rmult_sym ``/2``).
Repeat Rewrite <- Ropp_mul1.
Assert H := (double_var ``p``).
Unfold Rdiv in H; Symmetry ; Assumption.
-Save.
+Qed.
Lemma sin_increasing_0 : (x,y:R) ``-(PI/2)<=x``->``x<=PI/2``->``-(PI/2)<=y``->``y<=PI/2``->``(sin x)<(sin y)``->``x<y``.
Intros; Cut ``(sin ((x-y)/2))<0``.
@@ -767,7 +767,7 @@ Unfold Rdiv; Apply Rmult_sym.
Pattern 1 PI; Rewrite double_var.
Rewrite Ropp_distr1.
Reflexivity.
-Save.
+Qed.
Lemma sin_increasing_1 : (x,y:R) ``-(PI/2)<=x``->``x<=PI/2``->``-(PI/2)<=y``->``y<=PI/2``->``x<y``->``(sin x)<(sin y)``.
Intros; Generalize (Rlt_compatibility ``x`` ``x`` ``y`` H3); Intro H4; Generalize (Rplus_le ``-(PI/2)`` x ``-(PI/2)`` x H H); Replace ``-(PI/2)+ (-(PI/2))`` with ``-PI``.
@@ -804,7 +804,7 @@ Apply Rmult_sym.
Pattern 1 PI; Rewrite double_var.
Rewrite Ropp_distr1.
Reflexivity.
-Save.
+Qed.
Lemma sin_decreasing_0 : (x,y:R) ``x<=3*(PI/2)``-> ``PI/2<=x`` -> ``y<=3*(PI/2)``-> ``PI/2<=y`` -> ``(sin x)<(sin y)`` -> ``y<x``.
Intros; Rewrite <- (sin_PI_x x) in H3; Rewrite <- (sin_PI_x y) in H3; Generalize (Rlt_Ropp ``(sin (PI-x))`` ``(sin (PI-y))`` H3); Repeat Rewrite <- sin_neg; Generalize (Rle_compatibility ``-PI`` x ``3*(PI/2)`` H); Generalize (Rle_compatibility ``-PI`` ``PI/2`` x H0); Generalize (Rle_compatibility ``-PI`` y ``3*(PI/2)`` H1); Generalize (Rle_compatibility ``-PI`` ``PI/2`` y H2); Replace ``-PI+x`` with ``x-PI``.
@@ -832,7 +832,7 @@ Pattern 2 PI; Rewrite double_var.
Rewrite Ropp_distr1.
Ring.
Unfold Rminus; Apply Rplus_sym.
-Save.
+Qed.
Lemma sin_decreasing_1 : (x,y:R) ``x<=3*(PI/2)``-> ``PI/2<=x`` -> ``y<=3*(PI/2)``-> ``PI/2<=y`` -> ``x<y`` -> ``(sin y)<(sin x)``.
Intros; Rewrite <- (sin_PI_x x); Rewrite <- (sin_PI_x y); Generalize (Rle_compatibility ``-PI`` x ``3*(PI/2)`` H); Generalize (Rle_compatibility ``-PI`` ``PI/2`` x H0); Generalize (Rle_compatibility ``-PI`` y ``3*(PI/2)`` H1); Generalize (Rle_compatibility ``-PI`` ``PI/2`` y H2); Generalize (Rlt_compatibility ``-PI`` x y H3); Replace ``-PI+PI/2`` with ``-(PI/2)``.
@@ -852,7 +852,7 @@ Unfold Rminus; Apply Rplus_sym.
Pattern 2 PI; Rewrite double_var; Ring.
Unfold Rminus; Apply Rplus_sym.
Pattern 2 PI; Rewrite double_var; Ring.
-Save.
+Qed.
Lemma cos_increasing_0 : (x,y:R) ``PI<=x`` -> ``x<=2*PI`` ->``PI<=y`` -> ``y<=2*PI`` -> ``(cos x)<(cos y)`` -> ``x<y``.
Intros x y H1 H2 H3 H4; Rewrite <- (cos_neg x); Rewrite <- (cos_neg y); Rewrite <- (cos_period ``-x`` (1)); Rewrite <- (cos_period ``-y`` (1)); Unfold INR; Replace ``-x+2*1*PI`` with ``PI/2-(x-3*(PI/2))``.
@@ -887,7 +887,7 @@ Ring.
Rewrite Rmult_1r.
Rewrite (double PI); Pattern 3 4 PI; Rewrite double_var.
Ring.
-Save.
+Qed.
Lemma cos_increasing_1 : (x,y:R) ``PI<=x`` -> ``x<=2*PI`` ->``PI<=y`` -> ``y<=2*PI`` -> ``x<y`` -> ``(cos x)<(cos y)``.
Intros x y H1 H2 H3 H4 H5; Generalize (Rle_compatibility ``-3*(PI/2)`` PI x H1); Generalize (Rle_compatibility ``-3*(PI/2)`` x ``2*PI`` H2); Generalize (Rle_compatibility ``-3*(PI/2)`` PI y H3); Generalize (Rle_compatibility ``-3*(PI/2)`` y ``2*PI`` H4); Generalize (Rlt_compatibility ``-3*(PI/2)`` x y H5); Rewrite <- (cos_neg x); Rewrite <- (cos_neg y); Rewrite <- (cos_period ``-x`` (1)); Rewrite <- (cos_period ``-y`` (1)); Unfold INR; Replace ``-3*(PI/2)+x`` with ``x-3*(PI/2)``.
@@ -912,19 +912,19 @@ Apply Rplus_sym.
Unfold Rminus.
Rewrite <- Ropp_mul1.
Apply Rplus_sym.
-Save.
+Qed.
Lemma cos_decreasing_0 : (x,y:R) ``0<=x``->``x<=PI``->``0<=y``->``y<=PI``->``(cos x)<(cos y)``->``y<x``.
Intros; Generalize (Rlt_Ropp (cos x) (cos y) H3); Repeat Rewrite <- neg_cos; Intro H4; Change ``(cos (y+PI))<(cos (x+PI))`` in H4; Rewrite (Rplus_sym x) in H4; Rewrite (Rplus_sym y) in H4; Generalize (Rle_compatibility PI ``0`` x H); Generalize (Rle_compatibility PI x PI H0); Generalize (Rle_compatibility PI ``0`` y H1); Generalize (Rle_compatibility PI y PI H2); Rewrite Rplus_Or.
Rewrite <- double.
Clear H H0 H1 H2 H3; Intros; Apply Rlt_anti_compatibility with ``PI``; Apply (cos_increasing_0 ``PI+y`` ``PI+x`` H0 H H2 H1 H4).
-Save.
+Qed.
Lemma cos_decreasing_1 : (x,y:R) ``0<=x``->``x<=PI``->``0<=y``->``y<=PI``->``x<y``->``(cos y)<(cos x)``.
Intros; Apply Ropp_Rlt; Repeat Rewrite <- neg_cos; Rewrite (Rplus_sym x); Rewrite (Rplus_sym y); Generalize (Rle_compatibility PI ``0`` x H); Generalize (Rle_compatibility PI x PI H0); Generalize (Rle_compatibility PI ``0`` y H1); Generalize (Rle_compatibility PI y PI H2); Rewrite Rplus_Or.
Rewrite <- double.
Generalize (Rlt_compatibility PI x y H3); Clear H H0 H1 H2 H3; Intros; Apply (cos_increasing_1 ``PI+x`` ``PI+y`` H3 H2 H1 H0 H).
-Save.
+Qed.
Lemma tan_diff : (x,y:R) ~``(cos x)==0``->~``(cos y)==0``->``(tan x)-(tan y)==(sin (x-y))/((cos x)*(cos y))``.
Intros; Unfold tan;Rewrite sin_minus.
@@ -953,7 +953,7 @@ Assumption.
Assumption.
Assumption.
Assumption.
-Save.
+Qed.
Lemma tan_increasing_0 : (x,y:R) ``-(PI/4)<=x``->``x<=PI/4`` ->``-(PI/4)<=y``->``y<=PI/4``->``(tan x)<(tan y)``->``x<y``.
@@ -996,7 +996,7 @@ Rewrite Rinv_Rmult.
Reflexivity.
Assumption.
Assumption.
-Save.
+Qed.
Lemma tan_increasing_1 : (x,y:R) ``-(PI/4)<=x``->``x<=PI/4`` ->``-(PI/4)<=y``->``y<=PI/4``->``x<y``->``(tan x)<(tan y)``.
Intros; Apply Rminus_lt; Generalize PI4_RLT_PI2; Intro H4; Generalize (Rlt_Ropp ``PI/4`` ``PI/2`` H4); Intro H5; Change ``-(PI/2)< -(PI/4)`` in H5; Generalize (cos_gt_0 x (Rlt_le_trans ``-(PI/2)`` ``-(PI/4)`` x H5 H) (Rle_lt_trans x ``PI/4`` ``PI/2`` H0 H4)); Intro HP1; Generalize (cos_gt_0 y (Rlt_le_trans ``-(PI/2)`` ``-(PI/4)`` y H5 H1) (Rle_lt_trans y ``PI/4`` ``PI/2`` H2 H4)); Intro HP2; Generalize (not_sym ``0`` (cos x) (Rlt_not_eq ``0`` (cos x) (cos_gt_0 x (Rlt_le_trans ``-(PI/2)`` ``-(PI/4)`` x H5 H) (Rle_lt_trans x ``PI/4`` ``PI/2`` H0 H4)))); Intro H6; Generalize (not_sym ``0`` (cos y) (Rlt_not_eq ``0`` (cos y) (cos_gt_0 y (Rlt_le_trans ``-(PI/2)`` ``-(PI/4)`` y H5 H1) (Rle_lt_trans y ``PI/4`` ``PI/2`` H2 H4)))); Intro H7; Rewrite (tan_diff x y H6 H7); Generalize (Rlt_Rinv (cos x) HP1); Intro H10; Generalize (Rlt_Rinv (cos y) HP2); Intro H11; Generalize (Rmult_lt_pos (Rinv (cos x)) (Rinv (cos y)) H10 H11); Replace ``/(cos x)*/(cos y)`` with ``/((cos x)*(cos y))``.
@@ -1016,69 +1016,69 @@ Apply aze.
Apply aze.
Reflexivity.
Apply Rinv_Rmult; Assumption.
-Save.
+Qed.
Lemma sin_incr_0 : (x,y:R) ``-(PI/2)<=x``->``x<=PI/2``->``-(PI/2)<=y``->``y<=PI/2``->``(sin x)<=(sin y)``->``x<=y``.
Intros; Case (total_order (sin x) (sin y)); Intro H4; [Left; Apply (sin_increasing_0 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order x y); Intro H6; [Left; Assumption | Elim H6; Intro H7; [Right; Assumption | Generalize (sin_increasing_1 y x H1 H2 H H0 H7); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl (sin y) H8)]] | Elim (Rlt_antirefl (sin x) (Rle_lt_trans (sin x) (sin y) (sin x) H3 H5))]].
-Save.
+Qed.
Lemma sin_incr_1 : (x,y:R) ``-(PI/2)<=x``->``x<=PI/2``->``-(PI/2)<=y``->``y<=PI/2``->``x<=y``->``(sin x)<=(sin y)``.
Intros; Case (total_order x y); Intro H4; [Left; Apply (sin_increasing_1 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order (sin x) (sin y)); Intro H6; [Left; Assumption | Elim H6; Intro H7; [Right; Assumption | Generalize (sin_increasing_0 y x H1 H2 H H0 H7); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl y H8)]] | Elim (Rlt_antirefl x (Rle_lt_trans x y x H3 H5))]].
-Save.
+Qed.
Lemma sin_decr_0 : (x,y:R) ``x<=3*(PI/2)``->``PI/2<=x``->``y<=3*(PI/2)``->``PI/2<=y``-> ``(sin x)<=(sin y)`` -> ``y<=x``.
Intros; Case (total_order (sin x) (sin y)); Intro H4; [Left; Apply (sin_decreasing_0 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order x y); Intro H6; [Generalize (sin_decreasing_1 x y H H0 H1 H2 H6); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl (sin y) H8) | Elim H6; Intro H7; [Right; Symmetry; Assumption | Left; Assumption]] | Elim (Rlt_antirefl (sin x) (Rle_lt_trans (sin x) (sin y) (sin x) H3 H5))]].
-Save.
+Qed.
Lemma sin_decr_1 : (x,y:R) ``x<=3*(PI/2)``-> ``PI/2<=x`` -> ``y<=3*(PI/2)``-> ``PI/2<=y`` -> ``x<=y`` -> ``(sin y)<=(sin x)``.
Intros; Case (total_order x y); Intro H4; [Left; Apply (sin_decreasing_1 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order (sin x) (sin y)); Intro H6; [Generalize (sin_decreasing_0 x y H H0 H1 H2 H6); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl y H8) | Elim H6; Intro H7; [Right; Symmetry; Assumption | Left; Assumption]] | Elim (Rlt_antirefl x (Rle_lt_trans x y x H3 H5))]].
-Save.
+Qed.
Lemma cos_incr_0 : (x,y:R) ``PI<=x`` -> ``x<=2*PI`` ->``PI<=y`` -> ``y<=2*PI`` -> ``(cos x)<=(cos y)`` -> ``x<=y``.
Intros; Case (total_order (cos x) (cos y)); Intro H4; [Left; Apply (cos_increasing_0 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order x y); Intro H6; [Left; Assumption | Elim H6; Intro H7; [Right; Assumption | Generalize (cos_increasing_1 y x H1 H2 H H0 H7); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl (cos y) H8)]] | Elim (Rlt_antirefl (cos x) (Rle_lt_trans (cos x) (cos y) (cos x) H3 H5))]].
-Save.
+Qed.
Lemma cos_incr_1 : (x,y:R) ``PI<=x`` -> ``x<=2*PI`` ->``PI<=y`` -> ``y<=2*PI`` -> ``x<=y`` -> ``(cos x)<=(cos y)``.
Intros; Case (total_order x y); Intro H4; [Left; Apply (cos_increasing_1 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order (cos x) (cos y)); Intro H6; [Left; Assumption | Elim H6; Intro H7; [Right; Assumption | Generalize (cos_increasing_0 y x H1 H2 H H0 H7); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl y H8)]] | Elim (Rlt_antirefl x (Rle_lt_trans x y x H3 H5))]].
-Save.
+Qed.
Lemma cos_decr_0 : (x,y:R) ``0<=x``->``x<=PI``->``0<=y``->``y<=PI``->``(cos x)<=(cos y)`` -> ``y<=x``.
Intros; Case (total_order (cos x) (cos y)); Intro H4; [Left; Apply (cos_decreasing_0 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order x y); Intro H6; [Generalize (cos_decreasing_1 x y H H0 H1 H2 H6); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl (cos y) H8) | Elim H6; Intro H7; [Right; Symmetry; Assumption | Left; Assumption]] | Elim (Rlt_antirefl (cos x) (Rle_lt_trans (cos x) (cos y) (cos x) H3 H5))]].
-Save.
+Qed.
Lemma cos_decr_1 : (x,y:R) ``0<=x``->``x<=PI``->``0<=y``->``y<=PI``->``x<=y``->``(cos y)<=(cos x)``.
Intros; Case (total_order x y); Intro H4; [Left; Apply (cos_decreasing_1 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order (cos x) (cos y)); Intro H6; [Generalize (cos_decreasing_0 x y H H0 H1 H2 H6); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl y H8) | Elim H6; Intro H7; [Right; Symmetry; Assumption | Left; Assumption]] | Elim (Rlt_antirefl x (Rle_lt_trans x y x H3 H5))]].
-Save.
+Qed.
Lemma tan_incr_0 : (x,y:R) ``-(PI/4)<=x``->``x<=PI/4`` ->``-(PI/4)<=y``->``y<=PI/4``->``(tan x)<=(tan y)``->``x<=y``.
Intros; Case (total_order (tan x) (tan y)); Intro H4; [Left; Apply (tan_increasing_0 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order x y); Intro H6; [Left; Assumption | Elim H6; Intro H7; [Right; Assumption | Generalize (tan_increasing_1 y x H1 H2 H H0 H7); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl (tan y) H8)]] | Elim (Rlt_antirefl (tan x) (Rle_lt_trans (tan x) (tan y) (tan x) H3 H5))]].
-Save.
+Qed.
Lemma tan_incr_1 : (x,y:R) ``-(PI/4)<=x``->``x<=PI/4`` ->``-(PI/4)<=y``->``y<=PI/4``->``x<=y``->``(tan x)<=(tan y)``.
Intros; Case (total_order x y); Intro H4; [Left; Apply (tan_increasing_1 x y H H0 H1 H2 H4) | Elim H4; Intro H5; [Case (total_order (tan x) (tan y)); Intro H6; [Left; Assumption | Elim H6; Intro H7; [Right; Assumption | Generalize (tan_increasing_0 y x H1 H2 H H0 H7); Intro H8; Rewrite H5 in H8; Elim (Rlt_antirefl y H8)]] | Elim (Rlt_antirefl x (Rle_lt_trans x y x H3 H5))]].
-Save.
+Qed.
Lemma Rgt_3PI2_0 : ``0<3*(PI/2)``.
Cut ~(O=(3)); [Intro H1; Generalize (lt_INR_0 (3) (neq_O_lt (3) H1)); Rewrite INR_eq_INR2; Unfold INR2; Intro H2; Generalize (Rlt_monotony ``PI/2`` ``0`` ``3`` PI2_RGT_0 H2); Rewrite Rmult_Or; Rewrite Rmult_sym; Intro H3; Assumption | Discriminate].
-Save.
+Qed.
Lemma Rgt_2PI_0 : ``0<2*PI``.
Cut ~(O=(2)); [Intro H1; Generalize (lt_INR_0 (2) (neq_O_lt (2) H1)); Unfold INR; Intro H2; Generalize (Rlt_monotony PI ``0`` ``2`` PI_RGT_0 H2); Rewrite Rmult_Or; Rewrite Rmult_sym; Intro H3; Assumption | Discriminate].
-Save.
+Qed.
Lemma Rlt_PI_3PI2 : ``PI<3*(PI/2)``.
Generalize PI2_RGT_0; Intro H1; Generalize (Rlt_compatibility PI ``0`` ``PI/2`` H1); Replace ``PI+(PI/2)`` with ``3*(PI/2)``.
Rewrite Rplus_Or; Intro H2; Assumption.
Pattern 2 PI; Rewrite double_var.
Ring.
-Save.
+Qed.
Lemma Rlt_3PI2_2PI : ``3*(PI/2)<2*PI``.
Generalize PI2_RGT_0; Intro H1; Generalize (Rlt_compatibility ``3*(PI/2)`` ``0`` ``PI/2`` H1); Replace ``3*(PI/2)+(PI/2)`` with ``2*PI``.
Rewrite Rplus_Or; Intro H2; Assumption.
Rewrite double; Pattern 1 2 PI; Rewrite double_var.
Ring.
-Save.
+Qed.
Lemma sin_cos_PI4 : ``(sin (PI/4)) == (cos (PI/4))``.
Rewrite cos_sin; Replace ``PI/2+PI/4`` with ``-(PI/4)+PI``.
@@ -1098,7 +1098,7 @@ Apply aze.
Ring.
Symmetry; Apply double_var.
Symmetry; Apply double_var.
-Save.
+Qed.
Lemma cos_PI4 : ``(cos (PI/4))==1/(sqrt 2)``.
Apply Rsqr_inj.
@@ -1136,11 +1136,11 @@ Reflexivity.
Apply aze.
Left; Apply Rgt_2_0.
Apply sqrt2_neq_0.
-Save.
+Qed.
Lemma sin_PI4 : ``(sin (PI/4))==1/(sqrt 2)``.
Rewrite sin_cos_PI4; Apply cos_PI4.
-Save.
+Qed.
Lemma cos3PI4 : ``(cos (3*(PI/4)))==-1/(sqrt 2)``.
Replace ``3*(PI/4)`` with ``(PI/2)-(-(PI/4))``.
@@ -1160,7 +1160,7 @@ Ring.
Ring.
Apply aze.
Apply aze.
-Save.
+Qed.
Lemma sin3PI4 : ``(sin (3*(PI/4)))==1/(sqrt 2)``.
Replace ``3*(PI/4)`` with ``(PI/2)-(-(PI/4))``.
@@ -1177,7 +1177,7 @@ Ring.
Ring.
Apply aze.
Apply aze.
-Save.
+Qed.
Lemma tan_PI4 : ``(tan (PI/4))==1``.
Unfold tan; Rewrite sin_cos_PI4.
@@ -1186,7 +1186,7 @@ Apply Rinv_r.
Replace ``PI*/4`` with ``PI/4``.
Rewrite cos_PI4; Apply R1_sqrt2_neq_0.
Unfold Rdiv; Reflexivity.
-Save.
+Qed.
Lemma sin_PI3_cos_PI6 : ``(sin (PI/3))==(cos (PI/6))``.
Replace ``PI/6`` with ``(PI/2)-(PI/3)``.
@@ -1217,7 +1217,7 @@ Rewrite Rmult_assoc.
Rewrite <- Rinv_l_sym.
Rewrite Rmult_1r; Reflexivity.
DiscrR.
-Save.
+Qed.
Lemma sin_PI6_cos_PI3 : ``(cos (PI/3))==(sin (PI/6))``.
Replace ``PI/6`` with ``(PI/2)-(PI/3)``.
@@ -1248,7 +1248,7 @@ Rewrite Rmult_assoc.
Rewrite <- Rinv_l_sym.
Rewrite Rmult_1r; Reflexivity.
DiscrR.
-Save.
+Qed.
Lemma sin_PI6 : ``(sin (PI/6))==1/2``.
Apply r_Rmult_mult with ``2*(cos (PI/6))``.
@@ -1278,7 +1278,7 @@ DiscrR.
Ring.
Ring.
Apply prod_neq_R0; [DiscrR | Cut ``0<(cos (PI/6))``; [Intro H1; Auto with real | Apply cos_gt_0; [Apply (Rlt_trans ``-(PI/2)`` ``0`` ``PI/6`` _PI2_RLT_0 PI6_RGT_0) | Apply PI6_RLT_PI2]]].
-Save.
+Qed.
Lemma cos_PI6 : ``(cos (PI/6))==(sqrt 3)/2``.
Apply Rsqr_inj.
@@ -1313,7 +1313,7 @@ Apply aze.
Apply aze.
Left; Apply Rgt_3_0.
Apply aze.
-Save.
+Qed.
Lemma tan_PI6 : ``(tan (PI/6))==1/(sqrt 3)``.
Unfold tan; Rewrite sin_PI6; Rewrite cos_PI6.
@@ -1332,15 +1332,15 @@ Assert H1 := Rlt_sqrt3_0.
Rewrite H in H1; Elim (Rlt_antirefl ``0`` H1).
Apply Rinv_neq_R0.
Apply aze.
-Save.
+Qed.
Lemma sin_PI3 : ``(sin (PI/3))==(sqrt 3)/2``.
Rewrite sin_PI3_cos_PI6; Apply cos_PI6.
-Save.
+Qed.
Lemma cos_PI3 : ``(cos (PI/3))==1/2``.
Rewrite sin_PI6_cos_PI3; Apply sin_PI6.
-Save.
+Qed.
Lemma tan_PI3 : ``(tan (PI/3))==(sqrt 3)``.
Unfold tan; Rewrite sin_PI3; Rewrite cos_PI3.
@@ -1352,7 +1352,7 @@ Rewrite <- Rinv_l_sym.
Apply Rmult_1r.
Apply aze.
Apply aze.
-Save.
+Qed.
Lemma sin_2PI3 : ``(sin (2*(PI/3)))==(sqrt 3)/2``.
Rewrite double.
@@ -1370,7 +1370,7 @@ Reflexivity.
Ring.
Apply aze.
Apply aze.
-Save.
+Qed.
Lemma cos_2PI3 : ``(cos (2*(PI/3)))==-1/2``.
Rewrite double.
@@ -1412,7 +1412,7 @@ Apply aze.
Apply aze.
Apply aze.
Apply prod_neq_R0; Apply aze.
-Save.
+Qed.
Lemma tan_2PI3 : ``(tan (2*(PI/3)))==-(sqrt 3)``.
Unfold tan; Rewrite sin_2PI3; Rewrite cos_2PI3.
@@ -1432,7 +1432,7 @@ Apply aze.
Apply aze.
DiscrR.
Apply Rinv_neq_R0; Apply aze.
-Save.
+Qed.
Lemma cos_5PI4 : ``(cos (5*(PI/4)))==-1/(sqrt 2)``.
Replace ``5*(PI/4)`` with ``(PI/4)+(PI)``.
@@ -1450,7 +1450,7 @@ Ring.
Ring.
Apply aze.
Apply aze.
-Save.
+Qed.
Lemma sin_5PI4 : ``(sin (5*(PI/4)))==-1/(sqrt 2)``.
Replace ``5*(PI/4)`` with ``(PI/4)+(PI)``.
@@ -1467,11 +1467,11 @@ Ring.
Ring.
Apply aze.
Apply aze.
-Save.
+Qed.
Lemma sin_cos5PI4 : ``(cos (5*(PI/4)))==(sin (5*(PI/4)))``.
Rewrite cos_5PI4; Rewrite sin_5PI4; Reflexivity.
-Save.
+Qed.
(***************************************************************)
(* Radian -> Degree | Degree -> Radian *)
@@ -1494,7 +1494,7 @@ Apply PI_neq0.
Unfold plat.
Apply not_O_IZR.
Discriminate.
-Save.
+Qed.
Lemma toRad_inj : (x,y:R) (toRad x)==(toRad y) -> x==y.
Intros; Unfold toRad in H; Apply r_Rmult_mult with PI.
@@ -1506,11 +1506,11 @@ Unfold plat.
Apply not_O_IZR.
Discriminate.
Apply PI_neq0.
-Save.
+Qed.
Lemma deg_rad : (x:R) (toDeg (toRad x))==x.
Intro x; Apply toRad_inj; Rewrite -> (rad_deg (toRad x)); Reflexivity.
-Save.
+Qed.
Definition sind [x:R] : R := (sin (toRad x)).
Definition cosd [x:R] : R := (cos (toRad x)).
@@ -1518,7 +1518,7 @@ Definition tand [x:R] : R := (tan (toRad x)).
Lemma Rsqr_sin_cos_d_one : (x:R) ``(Rsqr (sind x))+(Rsqr (cosd x))==1``.
Intro x; Unfold sind; Unfold cosd; Apply sin2_cos2.
-Save.
+Qed.
(***************************************************)
(* Other properties *)
@@ -1535,4 +1535,4 @@ Simpl; Discriminate.
Simpl; Discriminate.
Simpl; Discriminate.
Elim (Rlt_antirefl ``0`` (Rle_lt_trans ``0`` a ``0`` H H2)).
-Save. \ No newline at end of file
+Qed. \ No newline at end of file
diff --git a/theories/Reals/Rtrigo_fun.v b/theories/Reals/Rtrigo_fun.v
index 2bc5063eb..1bf7e72b1 100644
--- a/theories/Reals/Rtrigo_fun.v
+++ b/theories/Reals/Rtrigo_fun.v
@@ -105,7 +105,7 @@ Left;Unfold Rgt in H;
Right;Rewrite H0;Rewrite Rinv_R1;Apply sym_eqT;Apply eq_Rminus;Auto.
Elim (archimed (Rminus (Rinv eps) R1));Intros;Clear H1;
Unfold Rgt in H0;Apply Rlt_le;Assumption.
-Save.
+Qed.
diff --git a/theories/Relations/Operators_Properties.v b/theories/Relations/Operators_Properties.v
index 5c3a46529..d7cb7a7eb 100755
--- a/theories/Relations/Operators_Properties.v
+++ b/theories/Relations/Operators_Properties.v
@@ -31,7 +31,7 @@ Apply Build_preorder.
Exact (rt_refl A R).
Exact (rt_trans A R).
-Save.
+Qed.
@@ -42,7 +42,7 @@ Red.
Induction 1; Auto with sets.
Intros.
Apply rt_trans with y0; Auto with sets.
-Save.
+Qed.
Lemma clos_refl_trans_ind_left: (A:Set)(R:A->A->Prop)(M:A)(P:A->Prop)
(P M)
@@ -61,7 +61,7 @@ Apply H0; Auto with sets.
Intros.
Apply H5 with P0; Auto with sets.
Apply rt_trans with y; Auto with sets.
-Save.
+Qed.
End Clos_Refl_Trans.
@@ -75,7 +75,7 @@ Red.
Induction 1; Auto with sets.
Intros.
Apply rst_trans with y0; Auto with sets.
-Save.
+Qed.
Lemma clos_rst_is_equiv: (equivalence A (clos_refl_sym_trans A R)).
Apply Build_equivalence.
@@ -84,7 +84,7 @@ Exact (rst_refl A R).
Exact (rst_trans A R).
Exact (rst_sym A R).
-Save.
+Qed.
Lemma clos_rst_idempotent:
(incl (clos_refl_sym_trans A (clos_refl_sym_trans A R))
@@ -93,7 +93,7 @@ Red.
Induction 1; Auto with sets.
Intros.
Apply rst_trans with y0; Auto with sets.
-Save.
+Qed.
End Clos_Refl_Sym_Trans.
diff --git a/theories/Relations/Relations.v b/theories/Relations/Relations.v
index 60cb9b4d7..86627c8b3 100755
--- a/theories/Relations/Relations.v
+++ b/theories/Relations/Relations.v
@@ -16,7 +16,7 @@ Lemma inverse_image_of_equivalence : (A,B:Set)(f:A->B)
(r:(relation B))(equivalence B r)->(equivalence A [x,y:A](r (f x) (f y))).
Intros; Split; Elim H; Red; Auto.
Intros; Apply equiv_trans with (f y); Assumption.
-Save.
+Qed.
Lemma inverse_image_of_eq : (A,B:Set)(f:A->B)
(equivalence A [x,y:A](f x)=(f y)).
@@ -25,4 +25,4 @@ Split; Red;
| (* transitivity *) Intros; Transitivity (f y); Assumption
| (* symmetry *) Intros; Symmetry; Assumption
].
-Save.
+Qed.
diff --git a/theories/Setoids/Setoid.v b/theories/Setoids/Setoid.v
index 4e33e4728..0807f93b9 100644
--- a/theories/Setoids/Setoid.v
+++ b/theories/Setoids/Setoid.v
@@ -25,7 +25,7 @@ End Setoid.
Definition Prop_S : (Setoid_Theory Prop iff).
Split; [Exact iff_refl | Exact iff_sym | Exact iff_trans].
-Save.
+Qed.
Add Setoid Prop iff Prop_S.
@@ -43,7 +43,7 @@ Apply (H3 H2).
Right.
Inversion H0.
Apply (H3 H2).
-Save.
+Qed.
Add Morphism and : and_ext.
Intros.
@@ -54,14 +54,14 @@ Apply (H4 H2).
Inversion H0.
Apply (H4 H3).
-Save.
+Qed.
Add Morphism not : not_ext.
Red ; Intros.
Apply H0.
Inversion H.
Apply (H3 H1).
-Save.
+Qed.
Definition fleche [A,B:Prop] := A -> B.
@@ -71,5 +71,5 @@ Intros.
Inversion H0.
Inversion H.
Apply (H3 (H1 (H6 H2))).
-Save.
+Qed.
diff --git a/theories/Sets/Multiset.v b/theories/Sets/Multiset.v
index 4abaaaa60..68d3ec7a5 100755
--- a/theories/Sets/Multiset.v
+++ b/theories/Sets/Multiset.v
@@ -12,7 +12,7 @@
Require Permut.
-Implicit Arguments On.
+Set Implicit Arguments.
Section multiset_defs.
@@ -179,7 +179,7 @@ i*)
End multiset_defs.
-Implicit Arguments Off.
+Unset Implicit Arguments.
Hints Unfold meq multiplicity : v62 datatypes.
Hints Resolve munion_empty_right munion_comm munion_ass meq_left meq_right munion_empty_left : v62 datatypes.
diff --git a/theories/Sets/Uniset.v b/theories/Sets/Uniset.v
index d4e5c44b9..17b10ae3a 100644
--- a/theories/Sets/Uniset.v
+++ b/theories/Sets/Uniset.v
@@ -15,7 +15,7 @@
Require Bool.
-Implicit Arguments On.
+Set Implicit Arguments.
Section defs.
@@ -209,4 +209,4 @@ i*)
End defs.
-Implicit Arguments Off.
+Unset Implicit Arguments.
diff --git a/theories/Sorting/Permutation.v b/theories/Sorting/Permutation.v
index 5bf3f6273..3702387a7 100644
--- a/theories/Sorting/Permutation.v
+++ b/theories/Sorting/Permutation.v
@@ -12,7 +12,7 @@ Require Relations.
Require PolyList.
Require Multiset.
-Implicit Arguments On.
+Set Implicit Arguments.
Section defs.
@@ -107,5 +107,5 @@ Qed.
Hints Resolve permut_middle.
End defs.
-Implicit Arguments Off.
+Unset Implicit Arguments.
diff --git a/theories/Sorting/Sorting.v b/theories/Sorting/Sorting.v
index 77407c9ef..cad4e2019 100644
--- a/theories/Sorting/Sorting.v
+++ b/theories/Sorting/Sorting.v
@@ -13,7 +13,7 @@ Require Multiset.
Require Permutation.
Require Relations.
-Implicit Arguments On.
+Set Implicit Arguments.
Section defs.
@@ -112,6 +112,6 @@ Qed.
End defs.
-Implicit Arguments Off.
+Unset Implicit Arguments.
Hint constr_sort : datatypes v62 := Constructors sort.
Hint constr_lelistA : datatypes v62 := Constructors lelistA.
diff --git a/theories/Wellfounded/Disjoint_Union.v b/theories/Wellfounded/Disjoint_Union.v
index 5cb4b79d5..ac3233704 100644
--- a/theories/Wellfounded/Disjoint_Union.v
+++ b/theories/Wellfounded/Disjoint_Union.v
@@ -36,7 +36,7 @@ Proof.
Apply Acc_intro;Intros.
Inversion_clear H3;Auto with sets.
Apply acc_A_sum;Auto with sets.
-Save.
+Qed.
Lemma wf_disjoint_sum:
diff --git a/theories/Wellfounded/Inclusion.v b/theories/Wellfounded/Inclusion.v
index db9cfe227..d2658e717 100644
--- a/theories/Wellfounded/Inclusion.v
+++ b/theories/Wellfounded/Inclusion.v
@@ -20,7 +20,7 @@ Section WfInclusion.
Proof.
Induction 2;Intros.
Apply Acc_intro;Auto with sets.
- Save.
+ Qed.
Hints Resolve Acc_incl.
@@ -28,6 +28,6 @@ Section WfInclusion.
(inclusion A R1 R2)->(well_founded A R2)->(well_founded A R1).
Proof.
Unfold well_founded ;Auto with sets.
- Save.
+ Qed.
End WfInclusion.
diff --git a/theories/Wellfounded/Inverse_Image.v b/theories/Wellfounded/Inverse_Image.v
index 3e4bca83f..f29151cae 100644
--- a/theories/Wellfounded/Inverse_Image.v
+++ b/theories/Wellfounded/Inverse_Image.v
@@ -23,15 +23,15 @@ Section Inverse_Image.
Apply Acc_intro; Intros.
Apply (H1 (f y0)); Try Trivial.
Rewrite H2; Trivial.
- Save.
+ Qed.
Lemma Acc_inverse_image : (x:A)(Acc B R (f x)) -> (Acc A Rof x).
Intros; Apply (Acc_lemma (f x)); Trivial.
- Save.
+ Qed.
Theorem wf_inverse_image: (well_founded B R)->(well_founded A Rof).
Red; Intros; Apply Acc_inverse_image; Auto.
- Save.
+ Qed.
End Inverse_Image.
diff --git a/theories/Wellfounded/Lexicographic_Product.v b/theories/Wellfounded/Lexicographic_Product.v
index c57a75133..3e8ba318a 100644
--- a/theories/Wellfounded/Lexicographic_Product.v
+++ b/theories/Wellfounded/Lexicographic_Product.v
@@ -74,7 +74,7 @@ Proof.
Apply acc_A_B_lexprod;Auto with sets;Intros.
Red in wfB.
Auto with sets.
-Save.
+Qed.
End WfLexicographic_Product.
@@ -104,7 +104,7 @@ Proof.
(Apply left_lex;Auto with sets).
(Apply right_lex;Auto with sets).
-Save.
+Qed.
i*)
Lemma Acc_symprod: (x:A)(Acc A leA x)->(y:B)(Acc B leB y)
@@ -116,7 +116,7 @@ Proof.
Inversion_clear H5;Auto with sets.
Apply H1;Auto with sets.
Apply Acc_intro;Auto with sets.
-Save.
+Qed.
Lemma wf_symprod: (well_founded A leA)->(well_founded B leB)
@@ -125,7 +125,7 @@ Proof.
Red.
Induction a;Intros.
Apply Acc_symprod;Auto with sets.
-Save.
+Qed.
End Wf_Symmetric_Product.
@@ -156,7 +156,7 @@ Proof.
Apply sp_noswap.
Apply left_sym;Auto with sets.
-Save.
+Qed.
Lemma Acc_swapprod: (x,y:A)(Acc A R x)->(Acc A R y)
@@ -184,7 +184,7 @@ Proof.
Apply right_sym;Auto with sets.
Auto with sets.
-Save.
+Qed.
Lemma wf_swapprod: (well_founded A R)->(well_founded A*A SwapProd).
@@ -192,6 +192,6 @@ Proof.
Red.
Induction a;Intros.
Apply Acc_swapprod;Auto with sets.
-Save.
+Qed.
End Swap.
diff --git a/theories/Wellfounded/Union.v b/theories/Wellfounded/Union.v
index 576c83cb4..9c013bd11 100644
--- a/theories/Wellfounded/Union.v
+++ b/theories/Wellfounded/Union.v
@@ -34,7 +34,7 @@ Proof.
Elim H4 with x1 ;Auto with sets;Intros.
Exists x2;Auto with sets.
Apply t_trans with x1 ;Auto with sets.
-Save.
+Qed.
Lemma Acc_union: (commut A R1 R2)->((x:A)(Acc A R2 x)->(Acc A R1 x))
@@ -61,7 +61,7 @@ Proof.
Apply Acc_inv with x ;Auto with sets.
Apply H0.
Apply Acc_intro;Auto with sets.
-Save.
+Qed.
Theorem wf_union: (commut A R1 R2)->(well_founded A R1)->(well_founded A R2)
@@ -70,6 +70,6 @@ Proof.
Unfold well_founded .
Intros.
Apply Acc_union;Auto with sets.
-Save.
+Qed.
End WfUnion.
diff --git a/theories/ZArith/Wf_Z.v b/theories/ZArith/Wf_Z.v
index 5f1d6ba47..be8820481 100644
--- a/theories/ZArith/Wf_Z.v
+++ b/theories/ZArith/Wf_Z.v
@@ -45,7 +45,7 @@ NewDestruct x; Intros;
[ Unfold Zle; Simpl; Do 2 (Unfold not); Auto with arith
| Assumption]
].
-Save.
+Qed.
Lemma ZL4_inf: (y:positive) { h:nat | (convert y)=(S h) }.
Induction y; [
@@ -55,7 +55,7 @@ Induction y; [
| Intros p H1;Elim H1;Intros x H2; Exists (plus x (S x)); Unfold convert;
Simpl; Rewrite ZL0; Rewrite ZL2;Unfold convert in H2; Rewrite H2; Auto with arith
| Exists O ;Auto with arith].
-Save.
+Qed.
Lemma inject_nat_complete_inf :
(x:Z)`0 <= x` -> { n:nat | (x=(inject_nat n)) }.
@@ -71,7 +71,7 @@ NewDestruct x; Intros;
[ Unfold Zle; Simpl; Do 2 (Unfold not); Auto with arith
| Assumption]
].
-Save.
+Qed.
Lemma inject_nat_prop :
(P:Z->Prop)((n:nat)(P (inject_nat n))) ->
@@ -80,7 +80,7 @@ Intros.
Specialize (inject_nat_complete x H0).
Intros Hn; Elim Hn; Intros.
Rewrite -> H1; Apply H.
-Save.
+Qed.
Lemma inject_nat_set :
(P:Z->Set)((n:nat)(P (inject_nat n))) ->
@@ -89,14 +89,14 @@ Intros.
Specialize (inject_nat_complete_inf x H0).
Intros Hn; Elim Hn; Intros.
Rewrite -> p; Apply H.
-Save.
+Qed.
Lemma ZERO_le_inj :
(n:nat) `0 <= (inject_nat n)`.
Induction n; Simpl; Intros;
[ Apply Zle_n
| Unfold Zle; Simpl; Discriminate].
-Save.
+Qed.
Lemma natlike_ind : (P:Z->Prop) (P `0`) ->
((x:Z)(`0 <= x` -> (P x) -> (P (Zs x)))) ->
@@ -107,7 +107,7 @@ Intros; Apply inject_nat_prop;
| Intros; Rewrite -> (inj_S n0);
Exact (H0 (inject_nat n0) (ZERO_le_inj n0) H2) ]
| Assumption].
-Save.
+Qed.
Lemma natlike_rec : (P:Z->Set) (P `0`) ->
((x:Z)(`0 <= x` -> (P x) -> (P (Zs x)))) ->
@@ -118,7 +118,7 @@ Intros; Apply inject_nat_set;
| Intros; Rewrite -> (inj_S n0);
Exact (H0 (inject_nat n0) (ZERO_le_inj n0) H2) ]
| Assumption].
-Save.
+Qed.
Lemma Z_lt_induction :
(P:Z->Prop)
@@ -148,7 +148,7 @@ Apply Zlt_le_trans with y. Intuition.
Apply Zgt_S_le. Apply Zlt_gt. Intuition.
Assumption.
-Save.
+Qed.
Lemma Z_lt_rec :
(P:Z->Set)
@@ -178,4 +178,4 @@ Apply Zlt_le_trans with y. Intuition.
Apply Zgt_S_le. Apply Zlt_gt. Intuition.
Assumption.
-Save.
+Qed.
diff --git a/theories/ZArith/ZArith_dec.v b/theories/ZArith/ZArith_dec.v
index ee7ee48b7..040a7414e 100644
--- a/theories/ZArith/ZArith_dec.v
+++ b/theories/ZArith/ZArith_dec.v
@@ -18,7 +18,7 @@ Require Zsyntax.
Lemma Dcompare_inf : (r:relation) {r=EGAL} + {r=INFERIEUR} + {r=SUPERIEUR}.
Proof.
Induction r; Auto with arith.
-Save.
+Qed.
Lemma Zcompare_rec :
(P:Set)(x,y:Z)
@@ -30,7 +30,7 @@ Proof.
Intros P x y H1 H2 H3.
Elim (Dcompare_inf (Zcompare x y)).
Intro H. Elim H; Auto with arith. Auto with arith.
-Save.
+Qed.
Section decidability.
@@ -49,7 +49,7 @@ Intro H3. Right. Elim (Zcompare_EGAL x y). Intros H1 H2. Unfold not. Intro H4.
Rewrite (H2 H4) in H3. Discriminate H3.
Intro H3. Right. Elim (Zcompare_EGAL x y). Intros H1 H2. Unfold not. Intro H4.
Rewrite (H2 H4) in H3. Discriminate H3.
-Save.
+Qed.
Theorem Z_lt_dec : (inf_decidable (Zlt x y)).
Proof.
@@ -58,7 +58,7 @@ Apply Zcompare_rec with x:=x y:=y; Intro H.
Right. Rewrite H. Discriminate.
Left; Assumption.
Right. Rewrite H. Discriminate.
-Save.
+Qed.
Theorem Z_le_dec : (inf_decidable (Zle x y)).
Proof.
@@ -67,7 +67,7 @@ Apply Zcompare_rec with x:=x y:=y; Intro H.
Left. Rewrite H. Discriminate.
Left. Rewrite H. Discriminate.
Right. Tauto.
-Save.
+Qed.
Theorem Z_gt_dec : (inf_decidable (Zgt x y)).
Proof.
@@ -76,7 +76,7 @@ Apply Zcompare_rec with x:=x y:=y; Intro H.
Right. Rewrite H. Discriminate.
Right. Rewrite H. Discriminate.
Left; Assumption.
-Save.
+Qed.
Theorem Z_ge_dec : (inf_decidable (Zge x y)).
Proof.
@@ -85,7 +85,7 @@ Apply Zcompare_rec with x:=x y:=y; Intro H.
Left. Rewrite H. Discriminate.
Right. Tauto.
Left. Rewrite H. Discriminate.
-Save.
+Qed.
Theorem Z_lt_ge_dec : {`x < y`}+{`x >= y`}.
Proof Z_lt_dec.
@@ -94,7 +94,7 @@ Theorem Z_le_gt_dec : {`x <= y`}+{`x > y`}.
Proof.
Elim Z_le_dec; Auto with arith.
Intro. Right. Apply not_Zle; Auto with arith.
-Save.
+Qed.
Theorem Z_gt_le_dec : {`x > y`}+{`x <= y`}.
Proof Z_gt_dec.
@@ -103,7 +103,7 @@ Theorem Z_ge_lt_dec : {`x >= y`}+{`x < y`}.
Proof.
Elim Z_ge_dec; Auto with arith.
Intro. Right. Apply not_Zge; Auto with arith.
-Save.
+Qed.
Theorem Z_le_lt_eq_dec : `x <= y` -> {`x < y`}+{x=y}.
@@ -113,7 +113,7 @@ Apply Zcompare_rec with x:=x y:=y.
Intro. Right. Elim (Zcompare_EGAL x y); Auto with arith.
Intro. Left. Elim (Zcompare_EGAL x y); Auto with arith.
Intro H1. Absurd `x > y`; Auto with arith.
-Save.
+Qed.
End decidability.
diff --git a/theories/ZArith/Zcomplements.v b/theories/ZArith/Zcomplements.v
index 815d22ebf..20309ab06 100644
--- a/theories/ZArith/Zcomplements.v
+++ b/theories/ZArith/Zcomplements.v
@@ -15,7 +15,7 @@ Require Wf_nat.
(** Multiplication by a number >0 preserves [Zcompare]. It also perserves
[Zle], [Zlt], [Zge], [Zgt] *)
-Implicit Arguments On.
+Set Implicit Arguments.
Lemma Zmult_zero : (x,y:Z)`x*y=0` -> `x=0` \/ `y=0`.
NewDestruct x; NewDestruct y; Auto.
@@ -23,28 +23,28 @@ Simpl; Intros; Discriminate H.
Simpl; Intros; Discriminate H.
Simpl; Intros; Discriminate H.
Simpl; Intros; Discriminate H.
-Save.
+Qed.
Lemma Zeq_Zminus : (x,y:Z)x=y -> `x-y = 0`.
Intros; Omega.
-Save.
+Qed.
Lemma Zminus_Zeq : (x,y:Z)`x-y=0` -> x=y.
Intros; Omega.
-Save.
+Qed.
Lemma Zmult_Zminus_distr_l : (x,y,z:Z)`(x-y)*z = x*z - y*z`.
Intros; Unfold Zminus.
Rewrite <- Zopp_Zmult.
Apply Zmult_plus_distr_l.
-Save.
+Qed.
Lemma Zmult_Zminus_distr_r : (x,y,z:Z)`z*(x-y) = z*x - z*y`.
Intros; Rewrite (Zmult_sym z `x-y`).
Rewrite (Zmult_sym z x).
Rewrite (Zmult_sym z y).
Apply Zmult_Zminus_distr_l.
-Save.
+Qed.
Lemma Zmult_reg_left : (x,y,z:Z)`z>0` -> `z*x=z*y` -> x=y.
Intros.
@@ -55,23 +55,23 @@ Rewrite <- Zmult_Zminus_distr_r in H1.
Elim (Zmult_zero H1).
Omega.
Trivial.
-Save.
+Qed.
Lemma Zmult_reg_right : (x,y,z:Z)`z>0` -> `x*z=y*z` -> x=y.
Intros x y z Hz.
Rewrite (Zmult_sym x z).
Rewrite (Zmult_sym y z).
Intro; Apply Zmult_reg_left with z; Assumption.
-Save.
+Qed.
Lemma Zgt0_le_pred : (y:Z) `y > 0` -> `0 <= (Zpred y)`.
Intro; Unfold Zpred; Omega.
-Save.
+Qed.
Lemma Zlt_Zplus :
(x1,x2,y1,y2:Z)`x1 < x2` -> `y1 < y2` -> `x1 + y1 < x2 + y2`.
Intros; Omega.
-Save.
+Qed.
Lemma Zlt_Zmult_right : (x,y,z:Z)`z>0` -> `x < y` -> `x*z < y*z`.
@@ -82,7 +82,7 @@ Apply natlike_ind with P:=[z:Z]`x*(Zs z) < y*(Zs z)`;
Repeat Rewrite Zmult_n_1;
Intro; Apply Zlt_Zplus; Assumption
| Assumption ].
-Save.
+Qed.
Lemma Zlt_Zmult_right2 : (x,y,z:Z)`z>0` -> `x*z < y*z` -> `x < y`.
Intros x y z H; Rewrite (Zs_pred z).
@@ -93,7 +93,7 @@ Intros x0 Hx0; Repeat Rewrite Zmult_plus_distr_r.
Repeat Rewrite Zmult_n_1.
Omega. (* Auto with zarith. *)
Unfold Zpred; Omega.
-Save.
+Qed.
Lemma Zle_Zmult_right : (x,y,z:Z)`z>0` -> `x <= y` -> `x*z <= y*z`.
Intros x y z Hz Hxy.
@@ -102,7 +102,7 @@ Intros; Apply Zlt_le_weak.
Apply Zlt_Zmult_right; Trivial.
Intros; Apply Zle_refl.
Rewrite H; Trivial.
-Save.
+Qed.
Lemma Zle_Zmult_right2 : (x,y,z:Z)`z>0` -> `x*z <= y*z` -> `x <= y`.
Intros x y z Hz Hxy.
@@ -111,26 +111,26 @@ Intros; Apply Zlt_le_weak.
Apply Zlt_Zmult_right2 with z; Trivial.
Intros; Apply Zle_refl.
Apply Zmult_reg_right with z; Trivial.
-Save.
+Qed.
Lemma Zgt_Zmult_right : (x,y,z:Z)`z>0` -> `x > y` -> `x*z > y*z`.
Intros; Apply Zlt_gt; Apply Zlt_Zmult_right;
[ Assumption | Apply Zgt_lt ; Assumption ].
-Save.
+Qed.
Lemma Zlt_Zmult_left : (x,y,z:Z)`z>0` -> `x < y` -> `z*x < z*y`.
Intros;
Rewrite (Zmult_sym z x); Rewrite (Zmult_sym z y);
Apply Zlt_Zmult_right; Assumption.
-Save.
+Qed.
Lemma Zgt_Zmult_left : (x,y,z:Z)`z>0` -> `x > y` -> `z*x > z*y`.
Intros;
Rewrite (Zmult_sym z x); Rewrite (Zmult_sym z y);
Apply Zgt_Zmult_right; Assumption.
-Save.
+Qed.
Theorem Zcompare_Zmult_right : (x,y,z:Z)` z>0` -> `x ?= y`=`x*z ?= y*z`.
@@ -140,14 +140,14 @@ Intros; Apply Zcompare_egal_dec;
Rewrite ((let (t1,t2)=(Zcompare_EGAL x y) in t1) Hxy); Trivial
| Intros; Apply Zgt_Zmult_right; Trivial
].
-Save.
+Qed.
Theorem Zcompare_Zmult_left : (x,y,z:Z)`z>0` -> `x ?= y`=`z*x ?= z*y`.
Intros;
Rewrite (Zmult_sym z x);
Rewrite (Zmult_sym z y);
Apply Zcompare_Zmult_right; Assumption.
-Save.
+Qed.
Lemma two_or_two_plus_one : (x:Z) { y:Z | `x = 2*y`}+{ y:Z | `x = 2*y+1`}.
@@ -170,7 +170,7 @@ Omega.
Left ; Split with (NEG p); Reflexivity.
Right ; Split with `-1`; Reflexivity.
-Save.
+Qed.
(** The biggest power of 2 that is stricly less than [a]
@@ -190,7 +190,7 @@ Lemma floor_gt0 : (x:positive) `(floor x) > 0`.
Intro.
Compute.
Trivial.
-Save.
+Qed.
Lemma floor_ok : (a:positive)
`(floor a) <= (POS a) < 2*(floor a)`.
@@ -211,7 +211,7 @@ Rewrite (POS_xO p).
Omega.
Simpl; Omega.
-Save.
+Qed.
(** Two more induction principles over [Z]. *)
diff --git a/theories/ZArith/Zdiv.v b/theories/ZArith/Zdiv.v
index 87fbe0f19..d3aa637bb 100644
--- a/theories/ZArith/Zdiv.v
+++ b/theories/ZArith/Zdiv.v
@@ -143,7 +143,7 @@ Case (Zgt_bool b `r+r`);
Generalize (Zge_cases b `2`).
Case (Zge_bool b `2`); (Intros; Split; [Ring | Omega ]).
Omega.
-Save.
+Qed.
@@ -179,12 +179,12 @@ Generalize (NEG_lt_ZERO p1); Omega.
Intros.
Absurd `(NEG p)>0`; [ Generalize (NEG_lt_ZERO p); Omega | Omega ].
-Save.
+Qed.
(** Existence theorems *)
-Implicit Arguments On.
+Set Implicit Arguments.
Theorem Zdiv_eucl_exist : (b:Z)`b > 0` -> (a:Z)
{ qr:Z*Z | let (q,r)=qr in `a=b*q+r` /\ `0 <= r < b` }.
@@ -192,7 +192,7 @@ Proof.
Intros b Hb a.
Exists (Zdiv_eucl a b).
Exact (Z_div_mod a b Hb).
-Save.
+Qed.
Theorem Zdiv_eucl_extended : (b:Z)`b <> 0` -> (a:Z)
{ qr:Z*Z | let (q,r)=qr in `a=b*q+r` /\ `0 <= r < |b|` }.
@@ -209,7 +209,7 @@ Elim Hqr;Intros.
Split.
Rewrite <- Zmult_Zopp_left;Assumption.
Rewrite Zabs_non_eq;[Assumption|Omega].
-Save.
+Qed.
(** Syntax *)
diff --git a/theories/ZArith/Zlogarithm.v b/theories/ZArith/Zlogarithm.v
index c33b1f157..336886b5a 100644
--- a/theories/ZArith/Zlogarithm.v
+++ b/theories/ZArith/Zlogarithm.v
@@ -66,7 +66,7 @@ Induction x; Intros; Simpl;
Rewrite (POS_xO p); Omega ]
| Unfold two_power_pos; Unfold shift_pos; Simpl; Omega
].
-Save.
+Qed.
Definition log_inf_correct1 :=
[p:positive](proj1 ? ? (log_inf_correct p)).
@@ -79,7 +79,7 @@ Hints Resolve log_inf_correct1 log_inf_correct2 : zarith.
Lemma log_sup_correct1 : (p:positive)` 0 <= (log_sup p)`.
Induction p; Intros; Simpl; Auto with zarith.
-Save.
+Qed.
(** For every [p], either [p] is a power of two and [(log_inf p)=(log_sup p)]
either [(log_sup p)=(log_inf p)+1] *)
@@ -103,7 +103,7 @@ Induction p; Intros;
Rewrite (two_p_S (log_inf p0) (log_inf_correct1 p0));
Rewrite POS_xO; Unfold Zs; Omega ]
| Left; Auto ].
-Save.
+Qed.
Theorem log_sup_correct2 : (x:positive)
` (two_p (Zpred (log_sup x))) < (POS x) <= (two_p (log_sup x))`.
@@ -116,17 +116,17 @@ Split ; [ Apply two_p_pred; Apply log_sup_correct1 | Apply Zle_n ].
Intros (E1,E2); Rewrite E2.
Rewrite <- (Zpred_Sn (log_inf x)).
Generalize (log_inf_correct2 x); Omega.
-Save.
+Qed.
Lemma log_inf_le_log_sup :
(p:positive) `(log_inf p) <= (log_sup p)`.
Induction p; Simpl; Intros; Omega.
-Save.
+Qed.
Lemma log_sup_le_Slog_inf :
(p:positive) `(log_sup p) <= (Zs (log_inf p))`.
Induction p; Simpl; Intros; Omega.
-Save.
+Qed.
(** Now it's possible to specify and build the [Log] rounded to the nearest *)
@@ -148,7 +148,7 @@ Generalize H0; Elim p1; Intros; Simpl;
Intros; Apply Zle_le_S.
Generalize H0; Elim p1; Intros; Simpl;
[ Assumption | Assumption | Apply ZERO_le_POS ].
-Save.
+Qed.
Theorem log_near_correct2: (p:positive)
(log_near p)=(log_inf p)
@@ -172,7 +172,7 @@ Simpl.
Repeat Rewrite Esup.
Case p0; Intros; Auto with zarith.
Auto.
-Save.
+Qed.
(*i******************
Theorem log_near_correct: (p:positive)
@@ -214,21 +214,21 @@ Induction x; Simpl;
[ Apply Zle_n
| Exact log_inf_correct1
| Exact log_inf_correct1].
-Save.
+Qed.
Lemma log_inf_shift_nat :
(n:nat)(log_inf (shift_nat n xH))=(inject_nat n).
Induction n; Intros;
[ Try Trivial
| Rewrite -> inj_S; Rewrite <- H; Reflexivity].
-Save.
+Qed.
Lemma log_sup_shift_nat :
(n:nat)(log_sup (shift_nat n xH))=(inject_nat n).
Induction n; Intros;
[ Try Trivial
| Rewrite -> inj_S; Rewrite <- H; Reflexivity].
-Save.
+Qed.
(** [Is_power p] means that p is a power of two *)
Fixpoint Is_power[p:positive] : Prop :=
@@ -248,7 +248,7 @@ Split;
Exists (S y0); Rewrite Hy0; Reflexivity
| Intro; Exists O; Reflexivity]
| Intros; Elim H; Intros; Rewrite -> H0; Elim x; Intros; Simpl; Trivial].
-Save.
+Qed.
Lemma Is_power_or : (p:positive) (Is_power p)\/~(Is_power p).
Induction p;
@@ -257,7 +257,7 @@ Induction p;
[ Intros; Left; Simpl; Exact H0
| Intros; Right; Simpl; Exact H0]
| Left; Simpl; Trivial].
-Save.
+Qed.
End divers.
diff --git a/theories/ZArith/Zmisc.v b/theories/ZArith/Zmisc.v
index 396ef8e5a..5f1eb0721 100644
--- a/theories/ZArith/Zmisc.v
+++ b/theories/ZArith/Zmisc.v
@@ -31,7 +31,7 @@ Section logic.
Lemma rename : (A:Set)(P:A->Prop)(x:A) ((y:A)(x=y)->(P y)) -> (P x).
Auto with arith.
-Save.
+Qed.
End logic.
@@ -44,24 +44,24 @@ Definition Z_of_entier := [x:entier]Case x of ZERO POS end.
Lemma POS_xI : (p:positive) (POS (xI p))=`2*(POS p) + 1`.
Intro; Apply refl_equal.
-Save.
+Qed.
Lemma POS_xO : (p:positive) (POS (xO p))=`2*(POS p)`.
Intro; Apply refl_equal.
-Save.
+Qed.
Lemma NEG_xI : (p:positive) (NEG (xI p))=`2*(NEG p) - 1`.
Intro; Apply refl_equal.
-Save.
+Qed.
Lemma NEG_xO : (p:positive) (NEG (xO p))=`2*(NEG p)`.
Intro; Apply refl_equal.
-Save.
+Qed.
Lemma POS_add : (p,p':positive)`(POS (add p p'))=(POS p)+(POS p')`.
Induction p; Induction p'; Simpl; Auto with arith.
-Save.
+Qed.
Lemma NEG_add : (p,p':positive)`(NEG (add p p'))=(NEG p)+(NEG p')`.
Induction p; Induction p'; Simpl; Auto with arith.
-Save.
+Qed.
(** Boolean comparisons *)
@@ -82,25 +82,25 @@ Lemma Zle_cases : (x,y:Z)if (Zle_bool x y) then `x<=y` else `x>y`.
Proof.
Intros x y; Unfold Zle_bool Zle Zgt.
Case (Zcompare x y); Auto; Discriminate.
-Save.
+Qed.
Lemma Zlt_cases : (x,y:Z)if (Zlt_bool x y) then `x<y` else `x>=y`.
Proof.
Intros x y; Unfold Zlt_bool Zlt Zge.
Case (Zcompare x y); Auto; Discriminate.
-Save.
+Qed.
Lemma Zge_cases : (x,y:Z)if (Zge_bool x y) then `x>=y` else `x<y`.
Proof.
Intros x y; Unfold Zge_bool Zge Zlt.
Case (Zcompare x y); Auto; Discriminate.
-Save.
+Qed.
Lemma Zgt_cases : (x,y:Z)if (Zgt_bool x y) then `x>y` else `x<=y`.
Proof.
Intros x y; Unfold Zgt_bool Zgt Zle.
Case (Zcompare x y); Auto; Discriminate.
-Save.
+Qed.
End numbers.
@@ -137,7 +137,7 @@ Induction n;
[ Simpl; Auto with arith
| Intros; Simpl; Apply f_equal with f:=f; Apply H
].
-Save.
+Qed.
Theorem iter_convert : (n:positive)(A:Set)(f:A->A)(x:A)
(iter_pos n A f x) = (iter_nat (convert n) A f x).
@@ -153,7 +153,7 @@ Induction n;
Apply iter_nat_plus
| Simpl; Auto with arith
].
-Save.
+Qed.
Theorem iter_pos_add :
(n,m:positive)(A:Set)(f:A->A)(x:A)
@@ -165,7 +165,7 @@ Rewrite -> (iter_convert n A f (iter_nat (convert m) A f x)).
Rewrite -> (iter_convert (add n m) A f x).
Rewrite -> (convert_add n m).
Apply iter_nat_plus.
-Save.
+Qed.
(** Preservation of invariants : if [f : A->A] preserves the invariant [Inv],
then the iterates of [f] also preserve it. *)
@@ -176,13 +176,13 @@ Theorem iter_nat_invariant :
Induction n; Intros;
[ Trivial with arith
| Simpl; Apply H0 with x:=(iter_nat n0 A f x); Apply H; Trivial with arith].
-Save.
+Qed.
Theorem iter_pos_invariant :
(n:positive)(A:Set)(f:A->A)(Inv:A->Prop)
((x:A)(Inv x)->(Inv (f x)))->(x:A)(Inv x)->(Inv (iter_pos n A f x)).
Intros; Rewrite iter_convert; Apply iter_nat_invariant; Trivial with arith.
-Save.
+Qed.
End iterate.
@@ -191,12 +191,12 @@ Section arith.
Lemma POS_gt_ZERO : (p:positive) `(POS p) > 0`.
Unfold Zgt; Trivial.
-Save.
+Qed.
(* weaker but useful (in [Zpower] for instance) *)
Lemma ZERO_le_POS : (p:positive) `0 <= (POS p)`.
Intro; Unfold Zle; Unfold Zcompare; Discriminate.
-Save.
+Qed.
Lemma Zlt_ZERO_pred_le_ZERO : (x:Z) `0 < x` -> `0 <= (Zpred x)`.
Intros.
@@ -204,11 +204,11 @@ Rewrite (Zs_pred x) in H.
Apply Zgt_S_le.
Apply Zlt_gt.
Assumption.
-Save.
+Qed.
Lemma NEG_lt_ZERO : (p:positive)`(NEG p) < 0`.
Unfold Zlt; Trivial.
-Save.
+Qed.
(** [Zeven], [Zodd], [Zdiv2] and their related properties *)
@@ -254,7 +254,7 @@ Proof.
Realizer Zeven_bool.
Repeat Program; Compute; Trivial.
i*)
-Save.
+Qed.
Lemma Zeven_dec : (z:Z) { (Zeven z) }+{ ~(Zeven z) }.
Proof.
@@ -268,7 +268,7 @@ Proof.
Realizer Zeven_bool.
Repeat Program; Compute; Trivial.
i*)
-Save.
+Qed.
Lemma Zodd_dec : (z:Z) { (Zodd z) }+{ ~(Zodd z) }.
Proof.
@@ -282,17 +282,17 @@ Proof.
Realizer Zodd_bool.
Repeat Program; Compute; Trivial.
i*)
-Save.
+Qed.
Lemma Zeven_not_Zodd : (z:Z)(Zeven z) -> ~(Zodd z).
Proof.
NewDestruct z; [ Idtac | NewDestruct p | NewDestruct p ]; Compute; Trivial.
-Save.
+Qed.
Lemma Zodd_not_Zeven : (z:Z)(Zodd z) -> ~(Zeven z).
Proof.
NewDestruct z; [ Idtac | NewDestruct p | NewDestruct p ]; Compute; Trivial.
-Save.
+Qed.
Hints Unfold Zeven Zodd : zarith.
@@ -323,7 +323,7 @@ Intros. Absurd (Zeven `1`); Red; Auto with arith.
NewDestruct p; Auto with arith.
Intros. Absurd (Zeven (NEG (xI p))); Red; Auto with arith.
Intros. Absurd (Zeven `-1`); Red; Auto with arith.
-Save.
+Qed.
Lemma Zodd_div2 : (x:Z) `x >= 0` -> (Zodd x) -> `x = 2*(Zdiv2 x)+1`.
Proof.
@@ -332,7 +332,7 @@ Intros. Absurd (Zodd `0`); Red; Auto with arith.
NewDestruct p; Auto with arith.
Intros. Absurd (Zodd (POS (xO p))); Red; Auto with arith.
Intros. Absurd `(NEG p) >= 0`; Red; Auto with arith.
-Save.
+Qed.
Lemma Z_modulo_2 : (x:Z) `x >= 0` -> { y:Z | `x=2*y` }+{ y:Z | `x=2*y+1` }.
Proof.
@@ -340,7 +340,7 @@ Intros x Hx.
Elim (Zeven_odd_dec x); Intro.
Left. Split with (Zdiv2 x). Exact (Zeven_div2 x a).
Right. Split with (Zdiv2 x). Exact (Zodd_div2 x Hx b).
-Save.
+Qed.
(* Very simple *)
Lemma Zminus_Zplus_compatible :
@@ -354,7 +354,7 @@ Rewrite <- (Zplus_assoc x n (Zopp n)).
Rewrite -> (Zplus_inverse_r n).
Rewrite <- Zplus_n_O.
Reflexivity.
-Save.
+Qed.
(** Decompose an egality between two [?=] relations into 3 implications *)
Theorem Zcompare_egal_dec :
@@ -365,7 +365,7 @@ Theorem Zcompare_egal_dec :
Intros x1 y1 x2 y2.
Unfold Zgt; Unfold Zlt;
Case `x1 ?= y1`; Case `x2 ?= y2`; Auto with arith; Symmetry; Auto with arith.
-Save.
+Qed.
Theorem Zcompare_elim :
(c1,c2,c3:Prop)(x,y:Z)
@@ -377,12 +377,12 @@ Apply rename with x:=`x ?= y`; Intro r; Elim r;
[ Intro; Apply H; Apply (let (h1, h2)=(Zcompare_EGAL x y) in h1); Assumption
| Unfold Zlt in H0; Assumption
| Unfold Zgt in H1; Assumption ].
-Save.
+Qed.
Lemma Zcompare_x_x : (x:Z) `x ?= x` = EGAL.
Intro; Apply Case (Zcompare_EGAL x x) of [h1,h2: ?]h2 end.
Apply refl_equal.
-Save.
+Qed.
Lemma Zlt_not_eq : (x,y:Z)`x < y` -> ~x=y.
Proof.
@@ -394,35 +394,35 @@ Generalize (proj2 ? ? (Zcompare_EGAL x y) H0).
Intro.
Rewrite H1 in H.
Discriminate H.
-Save.
+Qed.
Lemma Zcompare_eq_case :
(c1,c2,c3:Prop)(x,y:Z) c1 -> x=y -> (Case `x ?= y` of c1 c2 c3 end).
Intros.
Rewrite -> (Case (Zcompare_EGAL x y) of [h1,h2: ?]h2 end H0).
Assumption.
-Save.
+Qed.
(** Four very basic lemmas about [Zle], [Zlt], [Zge], [Zgt] *)
Lemma Zle_Zcompare :
(x,y:Z)`x <= y` -> Case `x ?= y` of True True False end.
Intros x y; Unfold Zle; Elim `x ?=y`; Auto with arith.
-Save.
+Qed.
Lemma Zlt_Zcompare :
(x,y:Z)`x < y` -> Case `x ?= y` of False True False end.
Intros x y; Unfold Zlt; Elim `x ?=y`; Intros; Discriminate Orelse Trivial with arith.
-Save.
+Qed.
Lemma Zge_Zcompare :
(x,y:Z)` x >= y`-> Case `x ?= y` of True False True end.
Intros x y; Unfold Zge; Elim `x ?=y`; Auto with arith.
-Save.
+Qed.
Lemma Zgt_Zcompare :
(x,y:Z)`x > y` -> Case `x ?= y` of False False True end.
Intros x y; Unfold Zgt; Elim `x ?= y`; Intros; Discriminate Orelse Trivial with arith.
-Save.
+Qed.
(** Lemmas about [Zmin] *)
@@ -432,7 +432,7 @@ Rewrite (Zplus_sym x n);
Rewrite (Zplus_sym y n);
Rewrite (Zcompare_Zplus_compatible x y n).
Case `x ?= y`; Apply Zplus_sym.
-Save.
+Qed.
(** Lemmas about [absolu] *)
@@ -454,7 +454,7 @@ Intros. Absurd `(POS p0) < (NEG p)`.
Compute. Intro H0. Discriminate H0. Intuition.
Intros. Absurd `0 <= (NEG p)`. Compute. Auto with arith. Intuition.
-Save.
+Qed.
(** Lemmas on [Zle_bool] used in contrib/graphs *)
diff --git a/theories/ZArith/Zpower.v b/theories/ZArith/Zpower.v
index 4fe30db88..02b8ebd51 100644
--- a/theories/ZArith/Zpower.v
+++ b/theories/ZArith/Zpower.v
@@ -31,7 +31,7 @@ Intros; Elim n;
[ Simpl; Elim (Zpower_nat z m); Auto with zarith
| Unfold Zpower_nat; Intros; Simpl; Rewrite H;
Apply Zmult_assoc].
-Save.
+Qed.
(** [Zpower_pos z n] is the n-th power of [z] when [n] is an binary
integer (type [positive]) and [z] a signed integer (type [Z]) *)
@@ -46,7 +46,7 @@ Theorem Zpower_pos_nat :
(z:Z)(p:positive)(Zpower_pos z p) = (Zpower_nat z (convert p)).
Intros; Unfold Zpower_pos; Unfold Zpower_nat; Apply iter_convert.
-Save.
+Qed.
(** Using the theorem [Zpower_pos_nat] and the lemma [Zpower_nat_is_exp] we
deduce that the function [[n:positive](Zpower_pos z n)] is a morphism
@@ -62,7 +62,7 @@ Rewrite -> (Zpower_pos_nat z m).
Rewrite -> (Zpower_pos_nat z (add n m)).
Rewrite -> (convert_add n m).
Apply Zpower_nat_is_exp.
-Save.
+Qed.
Definition Zpower :=
[x,y:Z]Cases y of
@@ -83,7 +83,7 @@ Simpl; Intros; Apply Zred_factor0.
Simpl; Auto with zarith.
Intros; Compute in H0; Absurd INFERIEUR=INFERIEUR; Auto with zarith.
Intros; Compute in H0; Absurd INFERIEUR=INFERIEUR; Auto with zarith.
-Save.
+Qed.
End section1.
@@ -119,14 +119,14 @@ Definition two_power_pos := [x:positive] (POS (shift_pos x xH)).
Lemma two_power_nat_S :
(n:nat)` (two_power_nat (S n)) = 2*(two_power_nat n)`.
Intro; Simpl; Apply refl_equal.
-Save.
+Qed.
Lemma shift_nat_plus :
(n,m:nat)(x:positive)
(shift_nat (plus n m) x)=(shift_nat n (shift_nat m x)).
Intros; Unfold shift_nat; Apply iter_nat_plus.
-Save.
+Qed.
Theorem shift_nat_correct :
(n:nat)(x:positive)(POS (shift_nat n x))=`(Zpower_nat 2 n)*(POS x)`.
@@ -137,7 +137,7 @@ Unfold shift_nat; Induction n;
[ Rewrite <- Zmult_assoc; Rewrite <- (H x); Simpl; Reflexivity
| Auto with zarith ]
].
-Save.
+Qed.
Theorem two_power_nat_correct :
(n:nat)(two_power_nat n)=(Zpower_nat `2` n).
@@ -146,7 +146,7 @@ Intro n.
Unfold two_power_nat.
Rewrite -> (shift_nat_correct n).
Omega.
-Save.
+Qed.
(** Second we show that [two_power_pos] and [two_power_nat] are the same *)
Lemma shift_pos_nat : (p:positive)(x:positive)
@@ -155,7 +155,7 @@ Lemma shift_pos_nat : (p:positive)(x:positive)
Unfold shift_pos.
Unfold shift_nat.
Intros; Apply iter_convert.
-Save.
+Qed.
Lemma two_power_pos_nat :
(p:positive) (two_power_pos p)=(two_power_nat (convert p)).
@@ -163,7 +163,7 @@ Lemma two_power_pos_nat :
Intro; Unfold two_power_pos; Unfold two_power_nat.
Apply f_equal with f:=POS.
Apply shift_pos_nat.
-Save.
+Qed.
(** Then we deduce that [two_power_pos] is also correct *)
@@ -174,7 +174,7 @@ Intros.
Rewrite -> (shift_pos_nat p x).
Rewrite -> (Zpower_pos_nat `2` p).
Apply shift_nat_correct.
-Save.
+Qed.
Theorem two_power_pos_correct :
(x:positive) (two_power_pos x)=(Zpower_pos `2` x).
@@ -183,7 +183,7 @@ Intro.
Rewrite -> two_power_pos_nat.
Rewrite -> Zpower_pos_nat.
Apply two_power_nat_correct.
-Save.
+Qed.
(** Some consequences *)
@@ -195,7 +195,7 @@ Rewrite -> (two_power_pos_correct (add x y)).
Rewrite -> (two_power_pos_correct x).
Rewrite -> (two_power_pos_correct y).
Apply Zpower_pos_is_exp.
-Save.
+Qed.
(** The exponentiation [z -> 2^z] for [z] a signed integer.
For convenience, we assume that [2^z = 0] for all [z < 0]
@@ -231,7 +231,7 @@ Induction x;
Absurd (SUPERIEUR=SUPERIEUR); Trivial with zarith
]
].
-Save.
+Qed.
Lemma two_p_gt_ZERO : (x:Z) ` 0 <= x` -> ` (two_p x) > 0`.
Induction x; Intros;
@@ -242,14 +242,14 @@ Induction x; Intros;
Do 2 Unfold not; Auto with zarith
| Assumption ]
].
-Save.
+Qed.
Lemma two_p_S : (x:Z) ` 0 <= x` ->
`(two_p (Zs x)) = 2 * (two_p x)`.
Intros; Unfold Zs.
Rewrite (two_p_is_exp x `1` H (ZERO_le_POS xH)).
Apply Zmult_sym.
-Save.
+Qed.
Lemma two_p_pred :
(x:Z)` 0 <= x` -> ` (two_p (Zpred x)) < (two_p x)`.
@@ -268,10 +268,10 @@ with P:=[x:Z]` (two_p (Zpred x)) < (two_p x)`;
| Rewrite <- (Zs_pred x0); Rewrite <- (Zpred_Sn x0); Trivial with zarith]
| Intro Hx0; Rewrite <- Hx0; Simpl; Unfold Zlt; Auto with zarith]
| Assumption].
-Save.
+Qed.
Lemma Zlt_lt_double : (x,y:Z) ` 0 <= x < y` -> ` x < 2*y`.
-Intros; Omega. Save.
+Intros; Omega. Qed.
End Powers_of_2.
@@ -314,7 +314,7 @@ Elim (convert p); Simpl;
Unfold 2 Zdiv_rest_aux;
Elim (iter_nat n (Z*Z)*Z Zdiv_rest_aux ((x,`0`),`1`));
NewDestruct a; Intros; Apply f_equal with f:=[z:Z]`2*z`; Assumption ].
-Save.
+Qed.
Lemma Zdiv_rest_correct2 :
(x:Z)(p:positive)
@@ -361,7 +361,7 @@ Intros; Apply iter_pos_invariant with
| Omega ]
| Omega ] ]
| Omega].
-Save.
+Qed.
Inductive Set Zdiv_rest_proofs[x:Z; p:positive] :=
Zdiv_rest_proof : (q:Z)(r:Z)
@@ -381,6 +381,6 @@ Elim H; Intros H1 H2; Clear H.
Rewrite -> H0 in H1; Rewrite -> H0 in H2;
Elim H2; Intros;
Apply Zdiv_rest_proof with q:=a0 r:=b; Assumption.
-Save.
+Qed.
End power_div_with_rest.
diff --git a/theories/ZArith/Zsyntax.v b/theories/ZArith/Zsyntax.v
index a9c050191..c68c9b218 100644
--- a/theories/ZArith/Zsyntax.v
+++ b/theories/ZArith/Zsyntax.v
@@ -157,7 +157,7 @@ Syntax constr
Zappl_inside [ << (ZEXPR (APPLIST $h ($LIST $t))) >> ]
-> [ [<hov 0> "("(ZEXPR $h):E [1 0] (ZAPPLINSIDETAIL ($LIST $t)):E ")"] ]
| Zappl_inject_nat [ << (ZEXPR (APPLIST <<inject_nat>> $n)) >> ]
- -> [ (APPLIST <<inject_nat>> $n) ]
+ -> [ [<hov 0> "(inject_nat" [1 1] $n ")"] ]
| Zappl_inside_tail [ << (ZAPPLINSIDETAIL $h ($LIST $t)) >> ]
-> [(ZEXPR $h):E [1 0] (ZAPPLINSIDETAIL ($LIST $t)):E]
| Zappl_inside_one [ << (ZAPPLINSIDETAIL $e) >> ] ->[(ZEXPR $e):E]
diff --git a/theories/ZArith/auxiliary.v b/theories/ZArith/auxiliary.v
index b6505d6bb..68a523783 100644
--- a/theories/ZArith/auxiliary.v
+++ b/theories/ZArith/auxiliary.v
@@ -21,7 +21,7 @@ Definition neq := [x,y:nat] ~(x=y).
Definition Zne := [x,y:Z] ~(x=y).
Theorem add_un_Zs : (x:positive) (POS (add_un x)) = (Zs (POS x)).
Intro; Rewrite -> ZL12; Unfold Zs; Simpl; Trivial with arith.
-Save.
+Qed.
Theorem inj_S : (y:nat) (inject_nat (S y)) = (Zs (inject_nat y)).
Induction y; [
@@ -29,12 +29,12 @@ Induction y; [
| Intros n; Intros H;
Change (POS (add_un (anti_convert n)))=(Zs (inject_nat (S n)));
Rewrite add_un_Zs; Trivial with arith].
-Save.
+Qed.
Theorem Zplus_S_n: (x,y:Z) (Zplus (Zs x) y) = (Zs (Zplus x y)).
Intros x y; Unfold Zs; Rewrite (Zplus_sym (Zplus x y)); Rewrite Zplus_assoc;
Rewrite (Zplus_sym (POS xH)); Trivial with arith.
-Save.
+Qed.
Theorem inj_plus :
(x,y:nat) (inject_nat (plus x y)) = (Zplus (inject_nat x) (inject_nat y)).
@@ -46,7 +46,7 @@ Induction x; Induction y; [
| Intros m H1; Change (inject_nat (S (plus n (S m))))=
(Zplus (inject_nat (S n)) (inject_nat (S m)));
Rewrite inj_S; Rewrite H; Do 2 Rewrite inj_S; Rewrite Zplus_S_n; Trivial with arith].
-Save.
+Qed.
Theorem inj_mult :
(x,y:nat) (inject_nat (mult x y)) = (Zmult (inject_nat x) (inject_nat y)).
@@ -55,7 +55,7 @@ Induction x; [
Simpl; Trivial with arith
| Intros n H y; Rewrite -> inj_S; Rewrite <- Zmult_Sm_n;
Rewrite <- H;Rewrite <- inj_plus; Simpl; Rewrite plus_sym; Trivial with arith].
-Save.
+Qed.
Theorem inj_neq:
(x,y:nat) (neq x y) -> (Zne (inject_nat x) (inject_nat y)).
@@ -66,7 +66,7 @@ Case x; Case y; Intros; [
| Discriminate H0
| Discriminate H0
| Simpl in H0; Injection H0; Do 2 Rewrite <- bij1; Intros E; Rewrite E; Auto with arith].
-Save.
+Qed.
Theorem inj_le:
(x,y:nat) (le x y) -> (Zle (inject_nat x) (inject_nat y)).
@@ -76,24 +76,24 @@ Intros x y; Intros H; Elim H; [
Intros H1 H2; Rewrite H2; [ Discriminate | Trivial with arith]
| Intros m H1 H2; Apply Zle_trans with (inject_nat m);
[Assumption | Rewrite inj_S; Apply Zle_n_Sn]].
-Save.
+Qed.
Theorem inj_lt: (x,y:nat) (lt x y) -> (Zlt (inject_nat x) (inject_nat y)).
Intros x y H; Apply Zgt_lt; Apply Zle_S_gt; Rewrite <- inj_S; Apply inj_le;
Exact H.
-Save.
+Qed.
Theorem inj_gt: (x,y:nat) (gt x y) -> (Zgt (inject_nat x) (inject_nat y)).
Intros x y H; Apply Zlt_gt; Apply inj_lt; Exact H.
-Save.
+Qed.
Theorem inj_ge: (x,y:nat) (ge x y) -> (Zge (inject_nat x) (inject_nat y)).
Intros x y H; Apply Zle_ge; Apply inj_le; Apply H.
-Save.
+Qed.
Theorem inj_eq: (x,y:nat) x=y -> (inject_nat x) = (inject_nat y).
Intros x y H; Rewrite H; Trivial with arith.
-Save.
+Qed.
Theorem intro_Z :
(x:nat) (EX y:Z | (inject_nat x)=y /\
@@ -102,7 +102,7 @@ Intros x; Exists (inject_nat x); Split; [
Trivial with arith
| Rewrite Zmult_sym; Rewrite Zmult_one; Rewrite Zero_right;
Unfold Zle ; Elim x; Intros;Simpl; Discriminate ].
-Save.
+Qed.
Theorem inj_minus1 :
(x,y:nat) (le y x) ->
@@ -110,11 +110,11 @@ Theorem inj_minus1 :
Intros x y H; Apply (Zsimpl_plus_l (inject_nat y)); Unfold Zminus ;
Rewrite Zplus_permute; Rewrite Zplus_inverse_r; Rewrite <- inj_plus;
Rewrite <- (le_plus_minus y x H);Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Theorem inj_minus2: (x,y:nat) (gt y x) -> (inject_nat (minus x y)) = ZERO.
Intros x y H; Rewrite inj_minus_aux; [ Trivial with arith | Apply gt_not_le; Assumption].
-Save.
+Qed.
Theorem dec_eq: (x,y:Z) (decidable (x=y)).
Intros x y; Unfold decidable ; Elim (Zcompare_EGAL x y);
@@ -122,7 +122,7 @@ Intros H1 H2; Elim (Dcompare (Zcompare x y)); [
Tauto
| Intros H3; Right; Unfold not ; Intros H4;
Elim H3; Rewrite (H2 H4); Intros H5; Discriminate H5].
-Save.
+Qed.
Theorem dec_Zne: (x,y:Z) (decidable (Zne x y)).
Intros x y; Unfold decidable Zne ; Elim (Zcompare_EGAL x y).
@@ -131,52 +131,52 @@ Intros H1 H2; Elim (Dcompare (Zcompare x y));
| Left; Unfold not; Intro; Absurd (Zcompare x y)=EGAL;
[ Elim H; Intros HR; Rewrite HR; Discriminate
| Auto]].
-Save.
+Qed.
Theorem dec_Zle: (x,y:Z) (decidable (Zle x y)).
Intros x y; Unfold decidable Zle ; Elim (Zcompare x y); [
Left; Discriminate
| Left; Discriminate
| Right; Unfold not ; Intros H; Apply H; Trivial with arith].
-Save.
+Qed.
Theorem dec_Zgt: (x,y:Z) (decidable (Zgt x y)).
Intros x y; Unfold decidable Zgt ; Elim (Zcompare x y);
[ Right; Discriminate | Right; Discriminate | Auto with arith].
-Save.
+Qed.
Theorem dec_Zge: (x,y:Z) (decidable (Zge x y)).
Intros x y; Unfold decidable Zge ; Elim (Zcompare x y); [
Left; Discriminate
| Right; Unfold not ; Intros H; Apply H; Trivial with arith
| Left; Discriminate].
-Save.
+Qed.
Theorem dec_Zlt: (x,y:Z) (decidable (Zlt x y)).
Intros x y; Unfold decidable Zlt ; Elim (Zcompare x y);
[ Right; Discriminate | Auto with arith | Right; Discriminate].
-Save.
+Qed.
Theorem dec_eq_nat:(x,y:nat)(decidable (x=y)).
Intros x y; Unfold decidable; Elim (eq_nat_dec x y); Auto with arith.
-Save.
+Qed.
Theorem not_Zge : (x,y:Z) ~(Zge x y) -> (Zlt x y).
Unfold Zge Zlt ; Intros x y H; Apply dec_not_not;
[ Exact (dec_Zlt x y) | Assumption].
-Save.
+Qed.
Theorem not_Zlt : (x,y:Z) ~(Zlt x y) -> (Zge x y).
Unfold Zlt Zge; Auto with arith.
-Save.
+Qed.
Theorem not_Zle : (x,y:Z) ~(Zle x y) -> (Zgt x y).
Unfold Zle Zgt ; Intros x y H; Apply dec_not_not;
[ Exact (dec_Zgt x y) | Assumption].
- Save.
+ Qed.
Theorem not_Zgt : (x,y:Z) ~(Zgt x y) -> (Zle x y).
Unfold Zgt Zle; Auto with arith.
-Save.
+Qed.
Theorem not_Zeq : (x,y:Z) ~ x=y -> (Zlt x y) \/ (Zlt y x).
@@ -184,130 +184,130 @@ Intros x y; Elim (Dcompare (Zcompare x y)); [
Intros H1 H2; Absurd x=y; [ Assumption | Elim (Zcompare_EGAL x y); Auto with arith]
| Unfold Zlt ; Intros H; Elim H; Intros H1;
[Auto with arith | Right; Elim (Zcompare_ANTISYM x y); Auto with arith]].
-Save.
+Qed.
Lemma new_var: (x:Z) (EX y:Z |(x=y)).
Intros x; Exists x; Trivial with arith.
-Save.
+Qed.
Theorem Zne_left : (x,y:Z) (Zne x y) -> (Zne (Zplus x (Zopp y)) ZERO).
Intros x y; Unfold Zne; Unfold not; Intros H1 H2; Apply H1;
Apply Zsimpl_plus_l with (Zopp y); Rewrite Zplus_inverse_l; Rewrite Zplus_sym;
Trivial with arith.
-Save.
+Qed.
Theorem Zegal_left : (x,y:Z) (x=y) -> (Zplus x (Zopp y)) = ZERO.
Intros x y H;
Apply (Zsimpl_plus_l y);Rewrite -> Zplus_permute;
Rewrite -> Zplus_inverse_r;Do 2 Rewrite -> Zero_right;Assumption.
-Save.
+Qed.
Theorem Zle_left : (x,y:Z) (Zle x y) -> (Zle ZERO (Zplus y (Zopp x))).
Intros x y H; Replace ZERO with (Zplus x (Zopp x)).
Apply Zle_reg_r; Trivial.
Apply Zplus_inverse_r.
-Save.
+Qed.
Theorem Zle_left_rev : (x,y:Z) (Zle ZERO (Zplus y (Zopp x)))
-> (Zle x y).
Intros x y H; Apply (Zsimpl_le_plus_r (Zopp x)).
Rewrite Zplus_inverse_r; Trivial.
-Save.
+Qed.
Theorem Zlt_left_rev : (x,y:Z) (Zlt ZERO (Zplus y (Zopp x)))
-> (Zlt x y).
Intros x y H; Apply Zsimpl_lt_plus_r with (Zopp x).
Rewrite Zplus_inverse_r; Trivial.
-Save.
+Qed.
Theorem Zlt_left :
(x,y:Z) (Zlt x y) -> (Zle ZERO (Zplus (Zplus y (NEG xH)) (Zopp x))).
Intros x y H; Apply Zle_left; Apply Zle_S_n;
Change (Zle (Zs x) (Zs (Zpred y))); Rewrite <- Zs_pred; Apply Zlt_le_S;
Assumption.
-Save.
+Qed.
Theorem Zlt_left_lt :
(x,y:Z) (Zlt x y) -> (Zlt ZERO (Zplus y (Zopp x))).
Intros x y H; Replace ZERO with (Zplus x (Zopp x)).
Apply Zlt_reg_r; Trivial.
Apply Zplus_inverse_r.
-Save.
+Qed.
Theorem Zge_left : (x,y:Z) (Zge x y) -> (Zle ZERO (Zplus x (Zopp y))).
Intros x y H; Apply Zle_left; Apply Zge_le; Assumption.
-Save.
+Qed.
Theorem Zgt_left :
(x,y:Z) (Zgt x y) -> (Zle ZERO (Zplus (Zplus x (NEG xH)) (Zopp y))).
Intros x y H; Apply Zlt_left; Apply Zgt_lt; Assumption.
-Save.
+Qed.
Theorem Zgt_left_gt :
(x,y:Z) (Zgt x y) -> (Zgt (Zplus x (Zopp y)) ZERO).
Intros x y H; Replace ZERO with (Zplus y (Zopp y)).
Apply Zgt_reg_r; Trivial.
Apply Zplus_inverse_r.
-Save.
+Qed.
Theorem Zgt_left_rev : (x,y:Z) (Zgt (Zplus x (Zopp y)) ZERO)
-> (Zgt x y).
Intros x y H; Apply Zsimpl_gt_plus_r with (Zopp y).
Rewrite Zplus_inverse_r; Trivial.
-Save.
+Qed.
Theorem Zopp_one : (x:Z)(Zopp x)=(Zmult x (NEG xH)).
Induction x; Intros; Rewrite Zmult_sym; Auto with arith.
-Save.
+Qed.
Theorem Zopp_Zmult_r : (x,y:Z)(Zopp (Zmult x y)) = (Zmult x (Zopp y)).
Intros x y; Rewrite Zmult_sym; Rewrite <- Zopp_Zmult; Apply Zmult_sym.
-Save.
+Qed.
Theorem Zmult_Zopp_left : (x,y:Z)(Zmult (Zopp x) y) = (Zmult x (Zopp y)).
Intros; Rewrite Zopp_Zmult; Rewrite Zopp_Zmult_r; Trivial with arith.
-Save.
+Qed.
Theorem Zopp_Zmult_l : (x,y:Z)(Zopp (Zmult x y)) = (Zmult (Zopp x) y).
Intros x y; Symmetry; Apply Zopp_Zmult.
-Save.
+Qed.
Theorem Zred_factor0 : (x:Z) x = (Zmult x (POS xH)).
Intro x; Rewrite (Zmult_n_1 x); Trivial with arith.
-Save.
+Qed.
Theorem Zred_factor1 : (x:Z) (Zplus x x) = (Zmult x (POS (xO xH))).
Intros x; Pattern 1 2 x ; Rewrite <- (Zmult_n_1 x);
Rewrite <- Zmult_plus_distr_r; Auto with arith.
-Save.
+Qed.
Theorem Zred_factor2 :
(x,y:Z) (Zplus x (Zmult x y)) = (Zmult x (Zplus (POS xH) y)).
Intros x y; Pattern 1 x ; Rewrite <- (Zmult_n_1 x);
Rewrite <- Zmult_plus_distr_r; Trivial with arith.
-Save.
+Qed.
Theorem Zred_factor3 :
(x,y:Z) (Zplus (Zmult x y) x) = (Zmult x (Zplus (POS xH) y)).
Intros x y; Pattern 2 x ; Rewrite <- (Zmult_n_1 x);
Rewrite <- Zmult_plus_distr_r; Rewrite Zplus_sym; Trivial with arith.
-Save.
+Qed.
Theorem Zred_factor4 :
(x,y,z:Z) (Zplus (Zmult x y) (Zmult x z)) = (Zmult x (Zplus y z)).
Intros x y z; Symmetry; Apply Zmult_plus_distr_r.
-Save.
+Qed.
Theorem Zred_factor5 : (x,y:Z) (Zplus (Zmult x ZERO) y) = y.
Intros x y; Rewrite <- Zmult_n_O;Auto with arith.
-Save.
+Qed.
Theorem Zred_factor6 : (x:Z) x = (Zplus x ZERO).
Intro; Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Theorem Zcompare_Zplus_compatible2 :
(r:relation)(x,y,z,t:Z)
@@ -332,12 +332,12 @@ Intros r x y z t; Case r; [
Rewrite Zcompare_Zplus_compatible; Assumption
| Do 2 Rewrite <- (Zplus_sym t);
Rewrite Zcompare_Zplus_compatible; Assumption]].
-Save.
+Qed.
Lemma add_x_x : (x:positive) (add x x) = (xO x).
Intros p; Apply convert_intro; Simpl; Rewrite convert_add;
Unfold 3 convert ; Simpl; Rewrite ZL6; Trivial with arith.
-Save.
+Qed.
Theorem Zcompare_Zmult_compatible :
(x:positive)(y,z:Z)
@@ -357,7 +357,7 @@ Induction x; [
Apply Zcompare_Zplus_compatible2; Apply H
| Simpl; Rewrite (add_x_x p); Trivial with arith]
| Intros y z; Do 2 Rewrite Zmult_one; Trivial with arith].
-Save.
+Qed.
Theorem Zmult_eq:
(x,y:Z) ~(x=ZERO) -> (Zmult y x) = ZERO -> y = ZERO.
@@ -374,12 +374,12 @@ Intros x y; Case x; [
Rewrite -> Zero_mult_right; Rewrite -> Zmult_sym;
Rewrite -> Zmult_Zopp_left; Simpl;
Elim (Zcompare_EGAL (Zmult y (NEG p)) ZERO); Auto with arith].
-Save.
+Qed.
Theorem Z_eq_mult:
(x,y:Z) y = ZERO -> (Zmult y x) = ZERO.
Intros x y H; Rewrite H; Auto with arith.
-Save.
+Qed.
Theorem Zmult_le:
(x,y:Z) (Zgt x ZERO) -> (Zle ZERO (Zmult y x)) -> (Zle ZERO y).
@@ -390,7 +390,7 @@ Intros x y; Case x; [
Pattern 1 ZERO ; Rewrite <- (Zero_mult_right (POS p));
Rewrite Zcompare_Zmult_compatible; Auto with arith
| Intros p; Unfold Zgt ; Simpl; Intros H; Discriminate H].
-Save.
+Qed.
Theorem Zle_ZERO_mult :
(x,y:Z) (Zle ZERO x) -> (Zle ZERO y) -> (Zle ZERO (Zmult x y)).
@@ -401,7 +401,7 @@ Intros p H1; Unfold Zle.
Rewrite Zcompare_Zmult_compatible; Trivial.
Intros p H1 H2; Absurd (Zgt ZERO (NEG p)); Trivial.
Unfold Zgt; Simpl; Auto with zarith.
-Save.
+Qed.
Lemma Zgt_ZERO_mult: (a,b:Z) (Zgt a ZERO)->(Zgt b ZERO)
->(Zgt (Zmult a b) ZERO).
@@ -411,13 +411,13 @@ Intros p H1; Unfold Zgt;
Pattern 2 ZERO ; Rewrite <- (Zero_mult_right (POS p)).
Rewrite Zcompare_Zmult_compatible; Trivial.
Intros p H; Discriminate H.
-Save.
+Qed.
Theorem Zle_mult:
(x,y:Z) (Zgt x ZERO) -> (Zle ZERO y) -> (Zle ZERO (Zmult y x)).
Intros x y H1 H2; Apply Zle_ZERO_mult; Trivial.
Apply Zlt_le_weak; Apply Zgt_lt; Trivial.
-Save.
+Qed.
Theorem Zmult_lt:
(x,y:Z) (Zgt x ZERO) -> (Zlt ZERO (Zmult y x)) -> (Zlt ZERO y).
@@ -428,7 +428,7 @@ Intros x y; Case x; [
Pattern 1 ZERO ; Rewrite <- (Zero_mult_right (POS p));
Rewrite Zcompare_Zmult_compatible; Auto with arith
| Intros p; Unfold Zgt ; Simpl; Intros H; Discriminate H].
-Save.
+Qed.
Theorem Zmult_gt:
(x,y:Z) (Zgt x ZERO) -> (Zgt (Zmult x y) ZERO) -> (Zgt y ZERO).
@@ -439,7 +439,7 @@ Intros x y; Case x.
Pattern 1 ZERO ; Rewrite <- (Zero_mult_right (POS p)).
Rewrite Zcompare_Zmult_compatible; Trivial.
Intros p H; Discriminate H.
-Save.
+Qed.
Theorem Zle_mult_approx:
(x,y,z:Z) (Zgt x ZERO) -> (Zgt z ZERO) -> (Zle ZERO y) ->
@@ -449,7 +449,7 @@ Intros x y z H1 H2 H3; Apply Zle_trans with m:=(Zmult y x) ; [
Apply Zle_mult; Assumption
| Pattern 1 (Zmult y x) ; Rewrite <- Zero_right; Apply Zle_reg_l;
Apply Zlt_le_weak; Apply Zgt_lt; Assumption].
-Save.
+Qed.
Lemma Zle_Zmult_pos_right :
(a,b,c : Z)
@@ -459,28 +459,28 @@ Rewrite Zopp_Zmult_l.
Rewrite <- Zmult_plus_distr_l.
Apply Zle_ZERO_mult; Trivial.
Apply Zle_left; Trivial.
-Save.
+Qed.
Lemma Zle_Zmult_pos_left :
(a,b,c : Z)
(Zle a b) -> (Zle ZERO c) -> (Zle (Zmult c a) (Zmult c b)).
Intros a b c H1 H2; Rewrite (Zmult_sym c a);Rewrite (Zmult_sym c b).
Apply Zle_Zmult_pos_right; Trivial.
-Save.
+Qed.
Lemma Zge_Zmult_pos_right :
(a,b,c : Z)
(Zge a b) -> (Zge c ZERO) -> (Zge (Zmult a c) (Zmult b c)).
Intros a b c H1 H2; Apply Zle_ge.
Apply Zle_Zmult_pos_right; Apply Zge_le; Trivial.
-Save.
+Qed.
Lemma Zge_Zmult_pos_left :
(a,b,c : Z)
(Zge a b) -> (Zge c ZERO) -> (Zge (Zmult c a) (Zmult c b)).
Intros a b c H1 H2; Apply Zle_ge.
Apply Zle_Zmult_pos_left; Apply Zge_le; Trivial.
-Save.
+Qed.
Lemma Zge_Zmult_pos_compat :
(a,b,c,d : Z)
@@ -491,7 +491,7 @@ Apply Zge_trans with (Zmult a d).
Apply Zge_Zmult_pos_left; Trivial.
Apply Zge_trans with c; Trivial.
Apply Zge_Zmult_pos_right; Trivial.
-Save.
+Qed.
Lemma Zle_mult_simpl
: (a,b,c:Z) (Zgt c ZERO)->(Zle (Zmult a c) (Zmult b c))->(Zle a b).
@@ -500,14 +500,14 @@ Apply Zmult_le with c; Trivial.
Rewrite Zmult_plus_distr_l.
Rewrite <- Zopp_Zmult_l.
Apply Zle_left; Trivial.
-Save.
+Qed.
Lemma Zge_mult_simpl
: (a,b,c:Z) (Zgt c ZERO)->(Zge (Zmult a c) (Zmult b c))->(Zge a b).
Intros a b c H1 H2; Apply Zle_ge; Apply Zle_mult_simpl with c; Trivial.
Apply Zge_le; Trivial.
-Save.
+Qed.
Lemma Zgt_mult_simpl
: (a,b,c:Z) (Zgt c ZERO)->(Zgt (Zmult a c) (Zmult b c))->(Zgt a b).
@@ -517,7 +517,7 @@ Rewrite Zmult_sym.
Rewrite Zmult_plus_distr_l.
Rewrite <- Zopp_Zmult_l.
Apply Zgt_left_gt; Trivial.
-Save.
+Qed.
Lemma Zgt_square_simpl:
(x, y : Z) (Zge x ZERO) -> (Zge y ZERO)
@@ -543,15 +543,15 @@ Intros x y z H1 H2 H3; Apply Zlt_n_Sm_le; Apply (Zmult_lt x); [
| Apply Zle_lt_trans with 1:=H3 ; Rewrite <- Zmult_Sm_n;
Apply Zlt_reg_l; Apply Zgt_lt; Assumption].
-Save.
+Qed.
Theorem OMEGA1 : (x,y:Z) (x=y) -> (Zle ZERO x) -> (Zle ZERO y).
Intros x y H; Rewrite H; Auto with arith.
-Save.
+Qed.
Theorem OMEGA2 : (x,y:Z) (Zle ZERO x) -> (Zle ZERO y) -> (Zle ZERO (Zplus x y)).
Intros x y H1 H2;Rewrite <- (Zero_left ZERO); Apply Zle_plus_plus; Assumption.
-Save.
+Qed.
Theorem OMEGA3 :
(x,y,k:Z)(Zgt k ZERO)-> (x=(Zmult y k)) -> (x=ZERO) -> (y=ZERO).
@@ -560,7 +560,7 @@ Intros x y k H1 H2 H3; Apply (Zmult_eq k); [
Unfold not ; Intros H4; Absurd (Zgt k ZERO); [
Rewrite H4; Unfold Zgt ; Simpl; Discriminate | Assumption]
| Rewrite <- H2; Assumption].
-Save.
+Qed.
Theorem OMEGA4 :
(x,y,z:Z)(Zgt x ZERO) -> (Zgt y x) -> ~(Zplus (Zmult z y) x) = ZERO.
@@ -581,17 +581,17 @@ Unfold not ; Intros x y z H1 H2 H3; Cut (Zgt y ZERO); [
| Assumption]]
| Rewrite -> H3; Unfold Zle ; Simpl; Discriminate]
| Apply Zgt_trans with x ; [ Assumption | Assumption]].
-Save.
+Qed.
Theorem OMEGA5: (x,y,z:Z)(x=ZERO) -> (y=ZERO) -> (Zplus x (Zmult y z)) = ZERO.
Intros x y z H1 H2; Rewrite H1; Rewrite H2; Simpl; Trivial with arith.
-Save.
+Qed.
Theorem OMEGA6:
(x,y,z:Z)(Zle ZERO x) -> (y=ZERO) -> (Zle ZERO (Zplus x (Zmult y z))).
Intros x y z H1 H2; Rewrite H2; Simpl; Rewrite Zero_right; Assumption.
-Save.
+Qed.
Theorem OMEGA7:
(x,y,z,t:Z)(Zgt z ZERO) -> (Zgt t ZERO) -> (Zle ZERO x) -> (Zle ZERO y) ->
@@ -599,7 +599,7 @@ Theorem OMEGA7:
Intros x y z t H1 H2 H3 H4; Rewrite <- (Zero_left ZERO);
Apply Zle_plus_plus; Apply Zle_mult; Assumption.
-Save.
+Qed.
Theorem OMEGA8:
(x,y:Z) (Zle ZERO x) -> (Zle ZERO y) -> x = (Zopp y) -> x = ZERO.
@@ -610,14 +610,14 @@ Intros x y H1 H2 H3; Elim (Zle_lt_or_eq ZERO x H1); [
Rewrite -> H3; Rewrite Zplus_inverse_r; Rewrite Zero_right; Assumption
| Assumption]
| Intros H4; Rewrite -> H4; Trivial with arith].
-Save.
+Qed.
Theorem OMEGA9:(x,y,z,t:Z) y=ZERO -> x = z ->
(Zplus y (Zmult (Zplus (Zopp x) z) t)) = ZERO.
Intros x y z t H1 H2; Rewrite H2; Rewrite Zplus_inverse_l;
Rewrite Zero_mult_left; Rewrite Zero_right; Assumption.
-Save.
+Qed.
Theorem OMEGA10:(v,c1,c2,l1,l2,k1,k2:Z)
(Zplus (Zmult (Zplus (Zmult v c1) l1) k1) (Zmult (Zplus (Zmult v c2) l2) k2))
= (Zplus (Zmult v (Zplus (Zmult c1 k1) (Zmult c2 k2)))
@@ -626,7 +626,7 @@ Theorem OMEGA10:(v,c1,c2,l1,l2,k1,k2:Z)
Intros; Repeat (Rewrite Zmult_plus_distr_l Orelse Rewrite Zmult_plus_distr_r);
Repeat Rewrite Zmult_assoc; Repeat Elim Zplus_assoc;
Rewrite (Zplus_permute (Zmult l1 k1) (Zmult (Zmult v c2) k2)); Trivial with arith.
-Save.
+Qed.
Theorem OMEGA11:(v1,c1,l1,l2,k1:Z)
(Zplus (Zmult (Zplus (Zmult v1 c1) l1) k1) l2)
@@ -634,7 +634,7 @@ Theorem OMEGA11:(v1,c1,l1,l2,k1:Z)
Intros; Repeat (Rewrite Zmult_plus_distr_l Orelse Rewrite Zmult_plus_distr_r);
Repeat Rewrite Zmult_assoc; Repeat Elim Zplus_assoc; Trivial with arith.
-Save.
+Qed.
Theorem OMEGA12:(v2,c2,l1,l2,k2:Z)
(Zplus l1 (Zmult (Zplus (Zmult v2 c2) l2) k2))
@@ -643,7 +643,7 @@ Theorem OMEGA12:(v2,c2,l1,l2,k2:Z)
Intros; Repeat (Rewrite Zmult_plus_distr_l Orelse Rewrite Zmult_plus_distr_r);
Repeat Rewrite Zmult_assoc; Repeat Elim Zplus_assoc; Rewrite Zplus_permute;
Trivial with arith.
-Save.
+Qed.
Theorem OMEGA13:(v,l1,l2:Z)(x:positive)
(Zplus (Zplus (Zmult v (POS x)) l1) (Zplus (Zmult v (NEG x)) l2))
@@ -653,7 +653,7 @@ Intros; Rewrite Zplus_assoc; Rewrite (Zplus_sym (Zmult v (POS x)) l1);
Rewrite (Zplus_assoc_r l1); Rewrite <- Zmult_plus_distr_r;
Rewrite <- Zopp_NEG; Rewrite (Zplus_sym (Zopp (NEG x)) (NEG x));
Rewrite Zplus_inverse_r; Rewrite Zero_mult_right; Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Theorem OMEGA14:(v,l1,l2:Z)(x:positive)
(Zplus (Zplus (Zmult v (NEG x)) l1) (Zplus (Zmult v (POS x)) l2))
@@ -663,7 +663,7 @@ Intros; Rewrite Zplus_assoc; Rewrite (Zplus_sym (Zmult v (NEG x)) l1);
Rewrite (Zplus_assoc_r l1); Rewrite <- Zmult_plus_distr_r;
Rewrite <- Zopp_NEG; Rewrite Zplus_inverse_r; Rewrite Zero_mult_right;
Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Theorem OMEGA15:(v,c1,c2,l1,l2,k2:Z)
(Zplus (Zplus (Zmult v c1) l1) (Zmult (Zplus (Zmult v c2) l2) k2))
= (Zplus (Zmult v (Zplus c1 (Zmult c2 k2)))
@@ -672,7 +672,7 @@ Theorem OMEGA15:(v,c1,c2,l1,l2,k2:Z)
Intros; Repeat (Rewrite Zmult_plus_distr_l Orelse Rewrite Zmult_plus_distr_r);
Repeat Rewrite Zmult_assoc; Repeat Elim Zplus_assoc;
Rewrite (Zplus_permute l1 (Zmult (Zmult v c2) k2)); Trivial with arith.
-Save.
+Qed.
Theorem OMEGA16:
(v,c,l,k:Z)
@@ -680,7 +680,7 @@ Theorem OMEGA16:
Intros; Repeat (Rewrite Zmult_plus_distr_l Orelse Rewrite Zmult_plus_distr_r);
Repeat Rewrite Zmult_assoc; Repeat Elim Zplus_assoc; Trivial with arith.
-Save.
+Qed.
Theorem OMEGA17:
(x,y,z:Z)(Zne x ZERO) -> (y=ZERO) -> (Zne (Zplus x (Zmult y z)) ZERO).
@@ -688,13 +688,13 @@ Theorem OMEGA17:
Unfold Zne not; Intros x y z H1 H2 H3; Apply H1;
Apply Zsimpl_plus_l with (Zmult y z); Rewrite Zplus_sym; Rewrite H3;
Rewrite H2; Auto with arith.
-Save.
+Qed.
Theorem OMEGA18:
(x,y,k:Z) (x=(Zmult y k)) -> (Zne x ZERO) -> (Zne y ZERO).
Unfold Zne not; Intros x y k H1 H2 H3; Apply H2; Rewrite H1; Rewrite H3; Auto with arith.
-Save.
+Qed.
Theorem OMEGA19:
(x:Z) (Zne x ZERO) ->
@@ -707,14 +707,14 @@ Unfold Zne ; Intros x H; Elim (Zle_or_lt ZERO x); [
| Intros H2; Absurd x=ZERO; Auto with arith]
| Intros H1; Right; Rewrite <- Zopp_one; Rewrite Zplus_sym;
Apply Zle_left; Apply Zle_S_n; Simpl; Apply Zlt_le_S; Auto with arith].
-Save.
+Qed.
Theorem OMEGA20:
(x,y,z:Z)(Zne x ZERO) -> (y=ZERO) -> (Zne (Zplus x (Zmult y z)) ZERO).
Unfold Zne not; Intros x y z H1 H2 H3; Apply H1; Rewrite H2 in H3;
Simpl in H3; Rewrite Zero_right in H3; Trivial with arith.
-Save.
+Qed.
Definition fast_Zplus_sym :=
[x,y:Z][P:Z -> Prop][H: (P (Zplus y x))]
diff --git a/theories/ZArith/fast_integer.v b/theories/ZArith/fast_integer.v
index bbc239259..3e294df59 100644
--- a/theories/ZArith/fast_integer.v
+++ b/theories/ZArith/fast_integer.v
@@ -100,7 +100,7 @@ Lemma convert_add_un :
Proof.
Induction x; Simpl; Auto with arith; Intros x' H0 m; Rewrite H0;
Rewrite plus_assoc_l; Trivial with arith.
-Save.
+Qed.
Theorem convert_add_carry :
(x,y:positive)(m:nat)
@@ -112,13 +112,13 @@ Induction x; Induction y; Simpl; Auto with arith; [
| Intros y' H1 m; Rewrite H; Rewrite plus_assoc_l; Trivial with arith
| Intros m; Rewrite convert_add_un; Rewrite plus_assoc_l; Trivial with arith
| Intros y' H m; Rewrite convert_add_un; Apply plus_assoc_r ].
-Save.
+Qed.
Theorem cvt_carry :
(x,y:positive)(convert (add_carry x y)) = (S (convert (add x y))).
Proof.
Intros;Unfold convert; Rewrite convert_add_carry; Simpl; Trivial with arith.
-Save.
+Qed.
Theorem add_verif :
(x,y:positive)(m:nat)
@@ -135,13 +135,13 @@ Induction x;Induction y;Simpl;Auto with arith; [
Apply plus_assoc_r
| Intros y' H1 m; Rewrite H; Apply plus_permute
| Intros y' H1 m; Rewrite convert_add_un; Apply plus_assoc_r ].
-Save.
+Qed.
Theorem convert_add:
(x,y:positive) (convert (add x y)) = (plus (convert x) (convert y)).
Proof.
Intros x y; Exact (add_verif x y (S O)).
-Save.
+Qed.
(** Correctness of conversion *)
Theorem bij1 : (m:nat) (convert (anti_convert m)) = (S m).
@@ -149,18 +149,18 @@ Proof.
Induction m; [
Unfold convert; Simpl; Trivial with arith
| Unfold convert; Intros n H; Simpl; Rewrite convert_add_un; Rewrite H; Auto with arith].
-Save.
+Qed.
Theorem compare_positive_to_nat_O :
(p:positive)(m:nat)(le m (positive_to_nat p m)).
Induction p; Simpl; Auto with arith.
Intros; Apply le_trans with (plus m m); Auto with arith.
-Save.
+Qed.
Theorem compare_convert_O : (p:positive)(lt O (convert p)).
Intro; Unfold convert; Apply lt_le_trans with (S O); Auto with arith.
Apply compare_positive_to_nat_O.
-Save.
+Qed.
Hints Resolve compare_convert_O.
@@ -184,12 +184,12 @@ Proof.
(Induction x; [Idtac | Idtac | Simpl;Auto with arith ]);
(Intros p; Elim p; [Idtac | Idtac | Simpl;Auto with arith]);
Simpl; Intros q H1 H2; Case H2; Simpl; Trivial with arith.
-Save.
+Qed.
Lemma is_double_moins_un : (x:positive) (add_un (double_moins_un x)) = (xO x).
Proof.
(Induction x;Simpl;Auto with arith); Intros m H;Rewrite H;Trivial with arith.
-Save.
+Qed.
Lemma add_sub_one : (x:positive) (x=xH) \/ (add_un (sub_un x)) = x.
Proof.
@@ -197,15 +197,15 @@ Induction x; [
Simpl; Auto with arith
| Simpl; Intros;Right;Apply is_double_moins_un
| Auto with arith ].
-Save.
+Qed.
Lemma ZL0 : (S (S O))=(plus (S O) (S O)).
-Proof. Auto with arith. Save.
+Proof. Auto with arith. Qed.
Lemma ZL1: (y:positive)(xO (add_un y)) = (add_un (add_un (xO y))).
Proof.
Induction y; Simpl; Auto with arith.
-Save.
+Qed.
Lemma ZL2:
(y:positive)(m:nat)
@@ -218,14 +218,14 @@ Induction y; [
Rewrite plus_assoc_r; Auto with arith
| Intros p H m; Simpl; Rewrite H; Auto with arith
| Intro;Simpl; Trivial with arith ].
-Save.
+Qed.
Lemma ZL3: (x:nat) (add_un (anti_convert (plus x x))) = (xO (anti_convert x)).
Proof.
Induction x; [
Simpl; Auto with arith
| Intros y H; Simpl; Rewrite plus_sym; Simpl; Rewrite H; Rewrite ZL1;Auto with arith].
-Save.
+Qed.
Lemma ZL4: (y:positive) (EX h:nat |(convert y)=(S h)).
Proof.
@@ -236,14 +236,14 @@ Induction y; [
| Intros p H1;Elim H1;Intros x H2; Exists (plus x (S x)); Unfold convert;
Simpl; Rewrite ZL0; Rewrite ZL2;Unfold convert in H2; Rewrite H2; Auto with arith
| Exists O ;Auto with arith ].
-Save.
+Qed.
Lemma ZL5: (x:nat) (anti_convert (plus (S x) (S x))) = (xI (anti_convert x)).
Proof.
Induction x;Simpl; [
Auto with arith
| Intros y H; Rewrite <- plus_n_Sm; Simpl; Rewrite H; Auto with arith].
-Save.
+Qed.
Lemma bij2 : (x:positive) (anti_convert (convert x)) = (add_un x).
Proof.
@@ -259,7 +259,7 @@ Induction x; [
Simpl;Rewrite <- H;Elim (ZL4 p); Unfold convert ;Intros n H1;Rewrite H1;
Rewrite ZL5; Simpl; Trivial with arith
| Unfold convert; Simpl; Auto with arith ].
-Save.
+Qed.
(** Comparison of positive *)
Fixpoint compare [x,y:positive]: relation -> relation :=
@@ -287,7 +287,7 @@ Theorem compare_convert1 :
Proof.
Induction x;Induction y;Split;Simpl;Auto with arith;
Discriminate Orelse (Elim (H p0); Auto with arith).
-Save.
+Qed.
Theorem compare_convert_EGAL : (x,y:positive) (compare x y EGAL) = EGAL -> x=y.
Proof.
@@ -302,13 +302,13 @@ Induction x;Induction y;Simpl;Auto with arith; [
| Intros H1;Discriminate H1
| Intros p H H1;Discriminate H1
| Intros p H H1;Discriminate H1 ].
-Save.
+Qed.
Lemma ZL6:
(p:positive) (positive_to_nat p (S(S O))) = (plus (convert p) (convert p)).
Proof.
Intros p;Rewrite ZL0; Rewrite ZL2; Trivial with arith.
-Save.
+Qed.
Lemma ZL7:
(m,n:nat) (lt m n) -> (lt (plus m m) (plus n n)).
@@ -316,7 +316,7 @@ Proof.
Intros m n H; Apply lt_trans with m:=(plus m n); [
Apply lt_reg_l with 1:=H
| Rewrite (plus_sym m n); Apply lt_reg_l with 1:=H ].
-Save.
+Qed.
Lemma ZL8:
(m,n:nat) (lt m n) -> (lt (S (plus m m)) (plus n n)).
@@ -324,7 +324,7 @@ Proof.
Intros m n H; Apply le_lt_trans with m:=(plus m n); [
Change (lt (plus m m) (plus m n)) ; Apply lt_reg_l with 1:=H
| Rewrite (plus_sym m n); Apply lt_reg_l with 1:=H ].
-Save.
+Qed.
Lemma ZLSI:
(x,y:positive) (compare x y SUPERIEUR) = INFERIEUR ->
@@ -332,7 +332,7 @@ Lemma ZLSI:
Proof.
Induction x;Induction y;Simpl;Auto with arith;
Discriminate Orelse Intros H;Discriminate H.
-Save.
+Qed.
Lemma ZLIS:
(x,y:positive) (compare x y INFERIEUR) = SUPERIEUR ->
@@ -340,7 +340,7 @@ Lemma ZLIS:
Proof.
Induction x;Induction y;Simpl;Auto with arith;
Discriminate Orelse Intros H;Discriminate H.
-Save.
+Qed.
Lemma ZLII:
(x,y:positive) (compare x y INFERIEUR) = INFERIEUR ->
@@ -349,7 +349,7 @@ Proof.
(Induction x;Induction y;Simpl;Auto with arith;Try Discriminate);
Intros z H1 H2; Elim (H z H2);Auto with arith; Intros E;Rewrite E;
Auto with arith.
-Save.
+Qed.
Lemma ZLSS:
(x,y:positive) (compare x y SUPERIEUR) = SUPERIEUR ->
@@ -358,7 +358,7 @@ Proof.
(Induction x;Induction y;Simpl;Auto with arith;Try Discriminate);
Intros z H1 H2; Elim (H z H2);Auto with arith; Intros E;Rewrite E;
Auto with arith.
-Save.
+Qed.
Theorem compare_convert_INFERIEUR :
(x,y:positive) (compare x y EGAL) = INFERIEUR ->
@@ -382,7 +382,7 @@ Induction x;Induction y; [
| Intros q H1 H2; Unfold convert ;Simpl; Rewrite ZL6; Elim (ZL4 q);Intros h H3;
Rewrite H3; Simpl; Rewrite <- plus_n_Sm; Apply lt_n_S; Apply lt_O_Sn
| Simpl; Intros H;Discriminate H ].
-Save.
+Qed.
Theorem compare_convert_SUPERIEUR :
(x,y:positive) (compare x y EGAL)=SUPERIEUR -> (gt (convert x) (convert y)).
@@ -406,12 +406,12 @@ Unfold gt; Induction x;Induction y; [
| Simpl; Intros q H1 H2;Discriminate H2
| Simpl; Intros q H1 H2;Discriminate H2
| Simpl;Intros H;Discriminate H ].
-Save.
+Qed.
Lemma Dcompare : (r:relation) r=EGAL \/ r = INFERIEUR \/ r = SUPERIEUR.
Proof.
Induction r; Auto with arith.
-Save.
+Qed.
Theorem convert_compare_INFERIEUR :
(x,y:positive)(lt (convert x) (convert y)) -> (compare x y EGAL) = INFERIEUR.
@@ -425,7 +425,7 @@ Intros x y; Unfold gt; Elim (Dcompare (compare x y EGAL)); [
Apply lt_not_sym; Change (gt (convert x) (convert y));
Apply compare_convert_SUPERIEUR; Assumption
| Assumption ]]].
-Save.
+Qed.
Theorem convert_compare_SUPERIEUR :
(x,y:positive)(gt (convert x) (convert y)) -> (compare x y EGAL) = SUPERIEUR.
@@ -438,11 +438,11 @@ Intros x y; Unfold gt; Elim (Dcompare (compare x y EGAL)); [
Apply lt_not_sym; Apply compare_convert_INFERIEUR; Assumption
| Assumption ]
| Auto with arith]].
-Save.
+Qed.
Theorem convert_compare_EGAL: (x:positive)(compare x x EGAL)=EGAL.
Induction x; Auto with arith.
-Save.
+Qed.
(** Natural numbers coded with positive *)
@@ -463,22 +463,22 @@ Definition double_moins_deux :=
Lemma ZS: (p:entier) (Zero_suivi_de p) = Nul -> p = Nul.
Proof.
Induction p;Simpl; [ Trivial with arith | Intros q H;Discriminate H ].
-Save.
+Qed.
Lemma US: (p:entier) ~(Un_suivi_de p)=Nul.
Proof.
Induction p; Intros; Discriminate.
-Save.
+Qed.
Lemma USH: (p:entier) (Un_suivi_de p) = (Pos xH) -> p = Nul.
Proof.
Induction p;Simpl; [ Trivial with arith | Intros q H;Discriminate H ].
-Save.
+Qed.
Lemma ZSH: (p:entier) ~(Zero_suivi_de p)= (Pos xH).
Proof.
Induction p; Intros; Discriminate.
-Save.
+Qed.
Fixpoint sub_pos[x,y:positive]:entier :=
<entier>Cases x of
@@ -523,7 +523,7 @@ Induction x; [
Simpl; Intros p H;Rewrite H;Simpl; Trivial with arith
| Intros p H;Simpl;Rewrite H;Auto with arith
| Auto with arith ].
-Save.
+Qed.
Theorem ZL10: (x,y:positive)
(compare x y EGAL) = SUPERIEUR ->
@@ -549,29 +549,29 @@ Induction x;Induction y; [
| Simpl; Intros q H1 H2 H3;Discriminate H2
| Simpl; Intros q H1 H2 H3;Discriminate H2
| Simpl; Intros H;Discriminate H ].
-Save.
+Qed.
Lemma ZL11: (x:positive) (x=xH) \/ ~(x=xH).
Proof.
Intros x;Case x;Intros; (Left;Reflexivity) Orelse (Right;Discriminate).
-Save.
+Qed.
Lemma ZL12: (q:positive) (add_un q) = (add q xH).
Proof.
Induction q; Intros; Simpl; Trivial with arith.
-Save.
+Qed.
Lemma ZL12bis: (q:positive) (add_un q) = (add xH q).
Proof.
Induction q; Intros; Simpl; Trivial with arith.
-Save.
+Qed.
Theorem ZL13:
(x,y:positive)(add_carry x y) = (add_un (add x y)).
Proof.
(Induction x;Induction y;Simpl;Auto with arith); Intros q H1;Rewrite H;
Auto with arith.
-Save.
+Qed.
Theorem ZL14:
(x,y:positive)(add x (add_un y)) = (add_un (add x y)).
@@ -582,7 +582,7 @@ Induction x;Induction y;Simpl;Auto with arith; [
| Elim p;Simpl;Auto with arith
| Intros q H1;Rewrite H;Auto with arith
| Elim p;Simpl;Auto with arith ].
-Save.
+Qed.
Theorem ZL15:
(q,z:positive) ~z=xH -> (add_carry q (sub_un z)) = (add q z).
@@ -590,7 +590,7 @@ Proof.
Intros q z H; Elim (add_sub_one z); [
Intro;Absurd z=xH;Auto with arith
| Intros E;Pattern 2 z ;Rewrite <- E; Rewrite ZL14; Rewrite ZL13; Trivial with arith ].
-Save.
+Qed.
Theorem sub_pos_SUPERIEUR:
(x,y:positive)(compare x y EGAL)=SUPERIEUR ->
@@ -670,7 +670,7 @@ Induction x;Induction y; [
| Intros p H1 H2;Simpl in H2; Discriminate H2
| Intros p H1 H2;Simpl in H2;Discriminate H2
| Intros H1;Simpl in H1;Discriminate H1 ].
-Save.
+Qed.
Lemma ZC1:
(x,y:positive)(compare x y EGAL)=SUPERIEUR -> (compare y x EGAL)=INFERIEUR.
@@ -678,20 +678,20 @@ Proof.
Intros x y H;Apply convert_compare_INFERIEUR;
Change (gt (convert x) (convert y));Apply compare_convert_SUPERIEUR;
Assumption.
-Save.
+Qed.
Lemma ZC2:
(x,y:positive)(compare x y EGAL)=INFERIEUR -> (compare y x EGAL)=SUPERIEUR.
Proof.
Intros x y H;Apply convert_compare_SUPERIEUR;Unfold gt;
Apply compare_convert_INFERIEUR;Assumption.
-Save.
+Qed.
Lemma ZC3: (x,y:positive)(compare x y EGAL)=EGAL -> (compare y x EGAL)=EGAL.
Proof.
Intros x y H; Rewrite (compare_convert_EGAL x y H);
Apply convert_compare_EGAL.
-Save.
+Qed.
Definition Op := [r:relation]
<relation>Cases r of
@@ -704,44 +704,44 @@ Lemma ZC4: (x,y:positive) (compare x y EGAL) = (Op (compare y x EGAL)).
Proof.
(((Intros x y;Elim (Dcompare (compare y x EGAL));[Idtac | Intros H;Elim H]);
Intros E;Rewrite E;Simpl); [Apply ZC3 | Apply ZC2 | Apply ZC1 ]); Assumption.
-Save.
+Qed.
Theorem add_sym : (x,y:positive) (add x y) = (add y x).
Proof.
Induction x;Induction y;Simpl;Auto with arith; Intros q H1; [
Clear H1; Do 2 Rewrite ZL13; Rewrite H;Auto with arith
| Rewrite H;Auto with arith | Rewrite H;Auto with arith | Rewrite H;Auto with arith ].
-Save.
+Qed.
Lemma bij3: (x:positive)(sub_un (anti_convert (convert x))) = x.
Proof.
Intros x; Rewrite bij2; Rewrite sub_add_one; Trivial with arith.
-Save.
+Qed.
Lemma convert_intro : (x,y:positive)(convert x)=(convert y) -> x=y.
Proof.
Intros x y H;Rewrite <- (bij3 x);Rewrite <- (bij3 y); Rewrite H; Trivial with arith.
-Save.
+Qed.
Lemma simpl_add_r : (x,y,z:positive) (add x z)=(add y z) -> x=y.
Proof.
Intros x y z H;Apply convert_intro;
Apply (simpl_plus_l (convert z)); Do 2 Rewrite (plus_sym (convert z));
Do 2 Rewrite <- convert_add; Rewrite H; Trivial with arith.
-Save.
+Qed.
Lemma simpl_add_l : (x,y,z:positive) (add x y)=(add x z) -> y=z.
Proof.
Intros x y z H;Apply convert_intro;
Apply (simpl_plus_l (convert x)); Do 2 Rewrite <- convert_add;
Rewrite H; Trivial with arith.
-Save.
+Qed.
Theorem add_assoc: (x,y,z:positive)(add x (add y z)) = (add (add x y) z).
Proof.
Intros x y z; Apply convert_intro; Do 4 Rewrite convert_add;
Apply plus_assoc_l.
-Save.
+Qed.
Local true_sub := [x,y:positive]
<positive> Cases (sub_pos x y) of Nul => xH | (Pos z) => z end.
@@ -752,7 +752,7 @@ Theorem sub_add:
Intros x y H;Elim sub_pos_SUPERIEUR with 1:=H;
Intros z H1;Elim H1;Intros H2 H3; Elim H3;Intros H4 H5;
Unfold true_sub ;Rewrite H2; Exact H4.
-Save.
+Qed.
Theorem true_sub_convert:
(x,y:positive) (compare x y EGAL) = SUPERIEUR ->
@@ -762,7 +762,7 @@ Intros x y H; Apply (simpl_plus_l (convert y));
Rewrite le_plus_minus_r; [
Rewrite <- convert_add; Rewrite sub_add; Auto with arith
| Apply lt_le_weak; Exact (compare_convert_SUPERIEUR x y H)].
-Save.
+Qed.
(** Addition on integers *)
Definition Zplus := [x,y:Z]
@@ -804,18 +804,18 @@ Definition Zopp := [x:Z]
Theorem Zero_left: (x:Z) (Zplus ZERO x) = x.
Proof.
Induction x; Auto with arith.
-Save.
+Qed.
Theorem Zopp_Zopp: (x:Z) (Zopp (Zopp x)) = x.
Proof.
Induction x; Auto with arith.
-Save.
+Qed.
(** Addition and opposite *)
Theorem Zero_right: (x:Z) (Zplus x ZERO) = x.
Proof.
Induction x; Auto with arith.
-Save.
+Qed.
Theorem Zplus_inverse_r: (x:Z) (Zplus x (Zopp x)) = ZERO.
Proof.
@@ -823,14 +823,14 @@ Induction x; [
Simpl;Auto with arith
| Simpl; Intros p;Rewrite (convert_compare_EGAL p); Auto with arith
| Simpl; Intros p;Rewrite (convert_compare_EGAL p); Auto with arith ].
-Save.
+Qed.
Theorem Zopp_Zplus:
(x,y:Z) (Zopp (Zplus x y)) = (Zplus (Zopp x) (Zopp y)).
Proof.
(Intros x y;Case x;Case y;Auto with arith);
Intros p q;Simpl;Case (compare q p EGAL);Auto with arith.
-Save.
+Qed.
Theorem Zplus_sym: (x,y:Z) (Zplus x y) = (Zplus y x).
Proof.
@@ -843,12 +843,12 @@ Induction x;Induction y;Simpl;Auto with arith; [
(Elim (Dcompare (compare p q EGAL));[Idtac|Intros H;Elim H]);
Intros E;Rewrite E;Auto with arith
| Intros q;Rewrite add_sym;Auto with arith ].
-Save.
+Qed.
Theorem Zplus_inverse_l: (x:Z) (Zplus (Zopp x) x) = ZERO.
Proof.
Intro; Rewrite Zplus_sym; Apply Zplus_inverse_r.
-Save.
+Qed.
Theorem Zopp_intro : (x,y:Z) (Zopp x) = (Zopp y) -> x = y.
Proof.
@@ -857,12 +857,12 @@ Intros x y;Case x;Case y;Simpl;Intros; [
| Simplify_eq H; Intro E; Rewrite E; Trivial with arith
| Discriminate H | Discriminate H | Discriminate H
| Simplify_eq H; Intro E; Rewrite E; Trivial with arith ].
-Save.
+Qed.
Theorem Zopp_NEG : (x:positive) (Zopp (NEG x)) = (POS x).
Proof.
Induction x; Auto with arith.
-Save.
+Qed.
Hints Resolve Zero_left Zero_right.
@@ -968,7 +968,7 @@ Intros x y z';Case z'; [
| Apply (simpl_add_l z);Rewrite (add_sym x k);
Rewrite add_assoc; Rewrite H5;Rewrite H9;
Rewrite add_sym; Trivial with arith ]]].
-Save.
+Qed.
Hints Resolve weak_assoc.
@@ -999,12 +999,12 @@ Intros x y z;Case x;Case y;Case z;Auto with arith; Intros; [
| Apply Zopp_intro; Do 4 Rewrite Zopp_Zplus; Do 2 Rewrite Zopp_NEG;
Apply weak_assoc]
.
-Save.
+Qed.
Lemma Zplus_simpl : (n,m,p,q:Z) n=m -> p=q -> (Zplus n p)=(Zplus m q).
Proof.
Intros; Elim H; Elim H0; Auto with arith.
-Save.
+Qed.
(** Addition on positive numbers *)
Fixpoint times1 [x:positive] : (positive -> positive) -> positive -> positive:=
@@ -1030,14 +1030,14 @@ Induction x; [
Do 2 Rewrite ZL6; Rewrite (mult_sym (convert x'));
Do 2 Rewrite mult_plus_distr; Rewrite (mult_sym (convert x')); Auto with arith
| Simpl; Intros;Rewrite <- plus_n_O; Trivial with arith ].
-Save.
+Qed.
(** Correctness of multiplication on positive *)
Theorem times_convert :
(x,y:positive) (convert (times x y)) = (mult (convert x) (convert y)).
Proof.
Intros x y;Unfold times; Rewrite times1_convert; Trivial with arith.
-Save.
+Qed.
(** Multiplication on integers *)
Definition Zmult := [x,y:Z]
@@ -1062,30 +1062,30 @@ Theorem times_assoc :
Proof.
Intros x y z;Apply convert_intro; Do 4 Rewrite times_convert;
Apply mult_assoc_l.
-Save.
+Qed.
Theorem times_sym : (x,y:positive) (times x y) = (times y x).
Proof.
Intros x y; Apply convert_intro; Do 2 Rewrite times_convert; Apply mult_sym.
-Save.
+Qed.
Theorem Zmult_sym : (x,y:Z) (Zmult x y) = (Zmult y x).
Proof.
Induction x; Induction y; Simpl; Auto with arith; Intro q; Rewrite (times_sym p q); Auto with arith.
-Save.
+Qed.
Theorem Zmult_assoc :
(x,y,z:Z) (Zmult x (Zmult y z))= (Zmult (Zmult x y) z).
Proof.
Induction x; Induction y; Induction z; Simpl; Auto with arith; Intro p1;
Rewrite times_assoc; Auto with arith.
-Save.
+Qed.
Theorem Zmult_one:
(x:Z) (Zmult (POS xH) x) = x.
Proof.
Induction x; Simpl; Unfold times; Auto with arith.
-Save.
+Qed.
Theorem times_add_distr:
(x,y,z:positive) (times x (add y z)) = (add (times x y) (times x z)).
@@ -1093,7 +1093,7 @@ Proof.
Intros x y z;Apply convert_intro;Rewrite times_convert;
Do 2 Rewrite convert_add; Do 2 Rewrite times_convert;
Do 3 Rewrite (mult_sym (convert x)); Apply mult_plus_distr.
-Save.
+Qed.
Theorem lt_mult_left :
(x,y,z:nat) (lt x y) -> (lt (mult (S z) x) (mult (S z) y)).
@@ -1104,7 +1104,7 @@ Intros x y z H;Elim z; [
Rewrite (plus_sym x (plus x (mult n x)));
Rewrite (plus_sym y (plus x (mult n x))); Apply lt_reg_l; Assumption
| Apply lt_reg_l;Assumption ]].
-Save.
+Qed.
Theorem times_true_sub_distr:
(x,y,z:positive) (compare y z EGAL) = SUPERIEUR ->
@@ -1119,17 +1119,17 @@ Rewrite times_convert; Rewrite true_sub_convert; [
Unfold gt; Elim (ZL4 x);Intros h H1;Rewrite H1; Apply lt_mult_left;
Exact (compare_convert_SUPERIEUR y z H) ]
| Assumption ].
-Save.
+Qed.
Theorem Zero_mult_left: (x:Z) (Zmult ZERO x) = ZERO.
Proof.
Induction x; Auto with arith.
-Save.
+Qed.
Theorem Zero_mult_right: (x:Z) (Zmult x ZERO) = ZERO.
Proof.
Induction x; Auto with arith.
-Save.
+Qed.
Hints Resolve Zero_mult_left Zero_mult_right.
@@ -1138,13 +1138,13 @@ Theorem Zopp_Zmult:
(x,y:Z) (Zmult (Zopp x) y) = (Zopp (Zmult x y)).
Proof.
Intros x y; Case x; Case y; Simpl; Auto with arith.
-Save.
+Qed.
Theorem Zmult_Zopp_Zopp:
(x,y:Z) (Zmult (Zopp x) (Zopp y)) = (Zmult x y).
Proof.
NewDestruct x; NewDestruct y; Reflexivity.
-Save.
+Qed.
Theorem weak_Zmult_plus_distr_r:
(x:positive)(y,z:Z)
@@ -1169,7 +1169,7 @@ Orelse
| Apply convert_compare_SUPERIEUR; Unfold gt; Do 2 Rewrite times_convert;
Elim (ZL4 x);Intros h H1;Rewrite H1;Apply lt_mult_left;
Exact (compare_convert_SUPERIEUR z y E0) ]]).
-Save.
+Qed.
Theorem Zmult_plus_distr_r:
(x,y,z:Z) (Zmult x (Zplus y z)) = (Zplus (Zmult x y) (Zmult x z)).
@@ -1180,7 +1180,7 @@ Intros x y z; Case x; [
| Intros p; Apply Zopp_intro; Rewrite Zopp_Zplus;
Do 3 Rewrite <- Zopp_Zmult; Rewrite Zopp_NEG;
Apply weak_Zmult_plus_distr_r ].
-Save.
+Qed.
(** Comparison on integers *)
Definition Zcompare := [x,y:Z]
@@ -1215,7 +1215,7 @@ Intros x y;Split; [
Trivial with arith
| Simpl;Exact convert_compare_EGAL
| Simpl; Intros p;Rewrite convert_compare_EGAL;Auto with arith ]].
-Save.
+Qed.
Theorem Zcompare_ANTISYM :
(x,y:Z) (Zcompare x y) = SUPERIEUR <-> (Zcompare y x) = INFERIEUR.
@@ -1233,7 +1233,7 @@ Intros x y;Split; [
Intros H1;Rewrite H1;Auto with arith
| Apply ZC1; Generalize H ; Case (compare p p0 EGAL);
Trivial with arith Orelse (Intros H2;Discriminate H2)]))].
-Save.
+Qed.
Theorem le_minus: (i,h:nat) (le (minus i h) i).
Proof.
@@ -1241,26 +1241,26 @@ Intros i h;Pattern i h; Apply nat_double_ind; [
Auto with arith
| Auto with arith
| Intros m n H; Simpl; Apply le_trans with m:=m; Auto with arith ].
-Save.
+Qed.
Lemma ZL16: (p,q:positive)(lt (minus (convert p) (convert q)) (convert p)).
Proof.
Intros p q; Elim (ZL4 p);Elim (ZL4 q); Intros h H1 i H2;
Rewrite H1;Rewrite H2; Simpl;Unfold lt; Apply le_n_S; Apply le_minus.
-Save.
+Qed.
Lemma ZL17: (p,q:positive)(lt (convert p) (convert (add p q))).
Proof.
Intros p q; Rewrite convert_add;Unfold lt;Elim (ZL4 q); Intros k H;Rewrite H;
Rewrite plus_sym;Simpl; Apply le_n_S; Apply le_plus_r.
-Save.
+Qed.
Theorem Zcompare_Zopp :
(x,y:Z) (Zcompare x y) = (Zcompare (Zopp y) (Zopp x)).
Proof.
(Intros x y;Case x;Case y;Simpl;Auto with arith);
Intros;Rewrite <- ZC4;Trivial with arith.
-Save.
+Qed.
Hints Resolve convert_compare_EGAL.
@@ -1273,7 +1273,7 @@ Proof.
Try (Intros; Rewrite Zcompare_Zopp; Do 2 Rewrite Zopp_Zplus;
Rewrite Zopp_NEG; Rewrite H; Simpl; Auto with arith));
Try (Intros; Simpl; Rewrite <- ZC4; Auto with arith).
-Save.
+Qed.
Hints Resolve ZC4.
@@ -1438,13 +1438,13 @@ Intros x y z;Case x;Case y;Simpl;Auto with arith; [
| Apply lt_le_weak;Apply compare_convert_INFERIEUR;Apply ZC1;Assumption]
| Assumption]
| Assumption]]].
-Save.
+Qed.
Theorem Zcompare_Zplus_compatible :
(x,y,z:Z) (Zcompare (Zplus z x) (Zplus z y)) = (Zcompare x y).
Proof.
Exact (weaken_Zcompare_Zplus_compatible weak_Zcompare_Zplus_compatible).
-Save.
+Qed.
Theorem Zcompare_trans_SUPERIEUR :
(x,y,z:Z) (Zcompare x y) = SUPERIEUR ->
@@ -1460,7 +1460,7 @@ Auto with arith; [
| Intros p q r; Do 3 Rewrite <- ZC4; Intros H H0;
Apply convert_compare_SUPERIEUR;Unfold gt;Apply lt_trans with m:=(convert q);
Apply compare_convert_INFERIEUR;Apply ZC1;Assumption ].
-Save.
+Qed.
Lemma SUPERIEUR_POS :
(x,y:Z) (Zcompare x y) = SUPERIEUR ->
@@ -1478,5 +1478,5 @@ Intros x y;Case x;Case y; [
| Simpl; Intros q p H; Discriminate H
| Unfold Zcompare; Intros q p; Rewrite <- ZC4; Intros H; Exists (true_sub q p);
Simpl; Rewrite (ZC1 q p H); Trivial with arith].
-Save.
+Qed.
End fast_integers.
diff --git a/theories/ZArith/zarith_aux.v b/theories/ZArith/zarith_aux.v
index 0b7a92289..a49c60fb4 100644
--- a/theories/ZArith/zarith_aux.v
+++ b/theories/ZArith/zarith_aux.v
@@ -52,27 +52,27 @@ Definition Zabs [z:Z] : Z :=
Lemma Zabs_eq : (x:Z) (Zle ZERO x) -> (Zabs x)=x.
NewDestruct x; Auto with arith.
Compute; Intros; Absurd SUPERIEUR=SUPERIEUR; Trivial with arith.
-Save.
+Qed.
Lemma Zabs_non_eq : (x:Z) (Zle x ZERO) -> (Zabs x)=(Zopp x).
Proof.
NewDestruct x; Auto with arith.
Compute; Intros; Absurd SUPERIEUR=SUPERIEUR; Trivial with arith.
-Save.
+Qed.
Lemma Zabs_dec : (x:Z){x=(Zabs x)}+{x=(Zopp (Zabs x))}.
Proof.
NewDestruct x;Auto with arith.
-Save.
+Qed.
Lemma Zabs_pos : (x:Z)(Zle ZERO (Zabs x)).
NewDestruct x;Auto with arith; Compute; Intros H;Inversion H.
-Save.
+Qed.
Lemma Zsgn_Zabs: (x:Z)(Zmult x (Zsgn x))=(Zabs x).
Proof.
Destruct x;Intros;Rewrite Zmult_sym;Auto with arith.
-Save.
+Qed.
Lemma Zabs_Zsgn: (x:Z)(Zabs x)=(Zmult (Zsgn x) x).
Proof.
@@ -95,7 +95,7 @@ Theorem Zgt_Sn_n : (n:Z)(Zgt (Zs n) n).
Intros n; Unfold Zgt Zs; Pattern 2 n; Rewrite <- (Zero_right n);
Rewrite Zcompare_Zplus_compatible;Auto with arith.
-Save.
+Qed.
(** Properties of the order *)
Theorem Zle_gt_trans : (n,m,p:Z)(Zle m n)->(Zgt m p)->(Zgt n p).
@@ -106,7 +106,7 @@ Unfold Zle Zgt; Intros n m p H1 H2; (ElimCompare 'm 'n); [
Elim (Zcompare_ANTISYM n m); Intros H4 H5;Apply H5; Assumption
| Assumption ]
| Intro H3; Absurd (Zcompare m n)=SUPERIEUR;Assumption ].
-Save.
+Qed.
Theorem Zgt_le_trans : (n,m,p:Z)(Zgt n m)->(Zle p m)->(Zgt n p).
@@ -116,49 +116,49 @@ Unfold Zle Zgt ;Intros n m p H1 H2; (ElimCompare 'p 'm); [
Assumption
| Elim (Zcompare_ANTISYM m p); Auto with arith ]
| Intro H3; Absurd (Zcompare p m)=SUPERIEUR;Assumption ].
-Save.
+Qed.
Theorem Zle_S_gt : (n,m:Z) (Zle (Zs n) m) -> (Zgt m n).
Intros n m H;Apply Zle_gt_trans with m:=(Zs n);[ Assumption | Apply Zgt_Sn_n ].
-Save.
+Qed.
Theorem Zcompare_n_S : (n,m:Z)(Zcompare (Zs n) (Zs m)) = (Zcompare n m).
Intros n m;Unfold Zs ;Do 2 Rewrite -> [t:Z](Zplus_sym t (POS xH));
Rewrite -> Zcompare_Zplus_compatible;Auto with arith.
-Save.
+Qed.
Theorem Zgt_n_S : (n,m:Z)(Zgt m n) -> (Zgt (Zs m) (Zs n)).
Unfold Zgt; Intros n m H; Rewrite Zcompare_n_S; Auto with arith.
-Save.
+Qed.
Lemma Zle_not_gt : (n,m:Z)(Zle n m) -> ~(Zgt n m).
Unfold Zle Zgt; Auto with arith.
-Save.
+Qed.
Lemma Zgt_antirefl : (n:Z)~(Zgt n n).
Unfold Zgt ;Intros n; Elim (Zcompare_EGAL n n); Intros H1 H2;
Rewrite H2; [ Discriminate | Trivial with arith ].
-Save.
+Qed.
Lemma Zgt_not_sym : (n,m:Z)(Zgt n m) -> ~(Zgt m n).
Unfold Zgt ;Intros n m H; Elim (Zcompare_ANTISYM n m); Intros H1 H2;
Rewrite -> H1; [ Discriminate | Assumption ].
-Save.
+Qed.
Lemma Zgt_not_le : (n,m:Z)(Zgt n m) -> ~(Zle n m).
Unfold Zgt Zle not; Auto with arith.
-Save.
+Qed.
Lemma Zgt_trans : (n,m,p:Z)(Zgt n m)->(Zgt m p)->(Zgt n p).
Unfold Zgt; Exact Zcompare_trans_SUPERIEUR.
-Save.
+Qed.
Lemma Zle_gt_S : (n,p:Z)(Zle n p)->(Zgt (Zs p) n).
@@ -171,7 +171,7 @@ Unfold Zle Zgt ;Intros n p H; (ElimCompare 'n 'p); [
Exact (Zgt_Sn_n p)
| Elim (Zcompare_ANTISYM p n); Auto with arith ]
| Intros H1;Absurd (Zcompare n p)=SUPERIEUR;Assumption ].
-Save.
+Qed.
Lemma Zgt_pred
: (n,p:Z)(Zgt p (Zs n))->(Zgt (Zpred p) n).
@@ -180,14 +180,14 @@ Unfold Zgt Zs Zpred ;Intros n p H;
Rewrite <- [x,y:Z](Zcompare_Zplus_compatible x y (POS xH));
Rewrite (Zplus_sym p); Rewrite Zplus_assoc; Rewrite [x:Z](Zplus_sym x n);
Simpl; Assumption.
-Save.
+Qed.
Lemma Zsimpl_gt_plus_l
: (n,m,p:Z)(Zgt (Zplus p n) (Zplus p m))->(Zgt n m).
Unfold Zgt; Intros n m p H;
Rewrite <- (Zcompare_Zplus_compatible n m p); Assumption.
-Save.
+Qed.
Lemma Zsimpl_gt_plus_r
: (n,m,p:Z)(Zgt (Zplus n p) (Zplus m p))->(Zgt n m).
@@ -195,18 +195,18 @@ Lemma Zsimpl_gt_plus_r
Intros n m p H; Apply Zsimpl_gt_plus_l with p.
Rewrite (Zplus_sym p n); Rewrite (Zplus_sym p m); Trivial.
-Save.
+Qed.
Lemma Zgt_reg_l
: (n,m,p:Z)(Zgt n m)->(Zgt (Zplus p n) (Zplus p m)).
Unfold Zgt; Intros n m p H; Rewrite (Zcompare_Zplus_compatible n m p);
Assumption.
-Save.
+Qed.
Lemma Zgt_reg_r : (n,m,p:Z)(Zgt n m)->(Zgt (Zplus n p) (Zplus m p)).
Intros n m p H; Rewrite (Zplus_sym n p); Rewrite (Zplus_sym m p); Apply Zgt_reg_l; Trivial.
-Save.
+Qed.
Theorem Zcompare_et_un:
(x,y:Z) (Zcompare x y)=SUPERIEUR <->
@@ -235,20 +235,20 @@ Intros x y; Split; [
| Intros H1;Absurd (Zcompare x (Zplus y (POS xH)))=INFERIEUR;Assumption
| Intros H1; Apply Zcompare_trans_SUPERIEUR with y:=(Zs y);
[ Exact H1 | Exact (Zgt_Sn_n y) ]]].
-Save.
+Qed.
Lemma Zgt_S_n : (n,p:Z)(Zgt (Zs p) (Zs n))->(Zgt p n).
Unfold Zs Zgt;Intros n p;Do 2 Rewrite -> [m:Z](Zplus_sym m (POS xH));
Rewrite -> (Zcompare_Zplus_compatible p n (POS xH));Trivial with arith.
-Save.
+Qed.
Lemma Zle_S_n : (n,m:Z) (Zle (Zs m) (Zs n)) -> (Zle m n).
Unfold Zle not ;Intros m n H1 H2;Apply H1;
Unfold Zs ;Do 2 Rewrite <- (Zplus_sym (POS xH));
Rewrite -> (Zcompare_Zplus_compatible n m (POS xH));Assumption.
-Save.
+Qed.
Lemma Zgt_le_S : (n,p:Z)(Zgt p n)->(Zle (Zs n) p).
@@ -256,12 +256,12 @@ Unfold Zgt Zle; Intros n p H; Elim (Zcompare_et_un p n); Intros H1 H2;
Unfold not ;Intros H3; Unfold not in H1; Apply H1; [
Assumption
| Elim (Zcompare_ANTISYM (Zplus n (POS xH)) p);Intros H4 H5;Apply H4;Exact H3].
-Save.
+Qed.
Lemma Zgt_S_le : (n,p:Z)(Zgt (Zs p) n)->(Zle n p).
Intros n p H;Apply Zle_S_n; Apply Zgt_le_S; Assumption.
-Save.
+Qed.
Theorem Zgt_S : (n,m:Z)(Zgt (Zs n) m)->((Zgt n m)\/(<Z>m=n)).
@@ -270,22 +270,22 @@ Intros n m H; Unfold Zgt; (ElimCompare 'n 'm); [
| Intros H1;Absurd (Zcompare m n)=SUPERIEUR;
[ Exact (Zgt_S_le m n H) | Elim (Zcompare_ANTISYM m n); Auto with arith ]
| Auto with arith ].
-Save.
+Qed.
Theorem Zgt_trans_S : (n,m,p:Z)(Zgt (Zs n) m)->(Zgt m p)->(Zgt n p).
Intros n m p H1 H2;Apply Zle_gt_trans with m:=m;
[ Apply Zgt_S_le; Assumption | Assumption ].
-Save.
+Qed.
Theorem Zeq_S : (n,m:Z) n=m -> (Zs n)=(Zs m).
Intros n m H; Rewrite H; Auto with arith.
-Save.
+Qed.
Theorem Zpred_Sn : (m:Z) m=(Zpred (Zs m)).
Intros m; Unfold Zpred Zs; Rewrite <- Zplus_assoc; Simpl;
Rewrite Zplus_sym; Auto with arith.
-Save.
+Qed.
Theorem Zeq_add_S : (n,m:Z) (Zs n)=(Zs m) -> n=m.
Intros n m H.
@@ -293,81 +293,81 @@ Change (Zplus (Zplus (NEG xH) (POS xH)) n)=
(Zplus (Zplus (NEG xH) (POS xH)) m);
Do 2 Rewrite <- Zplus_assoc; Do 2 Rewrite (Zplus_sym (POS xH));
Unfold Zs in H;Rewrite H; Trivial with arith.
-Save.
+Qed.
Theorem Znot_eq_S : (n,m:Z) ~(n=m) -> ~((Zs n)=(Zs m)).
Unfold not ;Intros n m H1 H2;Apply H1;Apply Zeq_add_S; Assumption.
-Save.
+Qed.
Lemma Zsimpl_plus_l : (n,m,p:Z)(Zplus n m)=(Zplus n p)->m=p.
Intros n m p H; Cut (Zplus (Zopp n) (Zplus n m))=(Zplus (Zopp n) (Zplus n p));[
Do 2 Rewrite -> Zplus_assoc; Rewrite -> (Zplus_sym (Zopp n) n);
Rewrite -> Zplus_inverse_r;Simpl; Trivial with arith
| Rewrite -> H; Trivial with arith ].
-Save.
+Qed.
Theorem Zn_Sn : (n:Z) ~(n=(Zs n)).
Intros n;Cut ~ZERO=(POS xH);[
Unfold not ;Intros H1 H2;Apply H1;Apply (Zsimpl_plus_l n);Rewrite Zero_right;
Exact H2
| Discriminate ].
-Save.
+Qed.
Lemma Zplus_n_O : (n:Z) n=(Zplus n ZERO).
Intro; Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Lemma Zplus_unit_left : (n,m:Z) (Zplus n ZERO)=m -> n=m.
Intro; Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Lemma Zplus_unit_right : (n,m:Z) n=(Zplus m ZERO) -> n=m.
Intros n m; Rewrite (Zero_right m); Trivial with arith.
-Save.
+Qed.
Lemma Zplus_n_Sm : (n,m:Z) (Zs (Zplus n m))=(Zplus n (Zs m)).
Intros n m; Unfold Zs; Rewrite Zplus_assoc; Trivial with arith.
-Save.
+Qed.
Lemma Zmult_n_O : (n:Z) ZERO=(Zmult n ZERO).
Intro;Rewrite Zmult_sym;Simpl; Trivial with arith.
-Save.
+Qed.
Lemma Zmult_n_Sm : (n,m:Z) (Zplus (Zmult n m) n)=(Zmult n (Zs m)).
Intros n m;Unfold Zs; Rewrite Zmult_plus_distr_r;
Rewrite (Zmult_sym n (POS xH));Rewrite Zmult_one; Trivial with arith.
-Save.
+Qed.
Theorem Zle_n : (n:Z) (Zle n n).
Intros n;Elim (Zcompare_EGAL n n);Unfold Zle ;Intros H1 H2;Rewrite H2;
[ Discriminate | Trivial with arith ].
-Save.
+Qed.
Theorem Zle_refl : (n,m:Z) n=m -> (Zle n m).
Intros; Rewrite H; Apply Zle_n.
-Save.
+Qed.
Theorem Zle_trans : (n,m,p:Z)(Zle n m)->(Zle m p)->(Zle n p).
Intros n m p;Unfold 1 3 Zle; Unfold not; Intros H1 H2 H3;Apply H1;
Exact (Zgt_le_trans n p m H3 H2).
-Save.
+Qed.
Theorem Zle_n_Sn : (n:Z)(Zle n (Zs n)).
Intros n; Apply Zgt_S_le;Apply Zgt_trans with m:=(Zs n) ;Apply Zgt_Sn_n.
-Save.
+Qed.
Lemma Zle_n_S : (n,m:Z) (Zle m n) -> (Zle (Zs m) (Zs n)).
Unfold Zle not ;Intros m n H1 H2; Apply H1;
Rewrite <- (Zcompare_Zplus_compatible n m (POS xH));
Do 2 Rewrite (Zplus_sym (POS xH)); Exact H2.
-Save.
+Qed.
Hints Resolve Zle_n Zle_n_Sn Zle_trans Zle_n_S : zarith.
Hints Immediate Zle_refl : zarith.
@@ -376,24 +376,24 @@ Lemma Zs_pred : (n:Z) n=(Zs (Zpred n)).
Intros n; Unfold Zs Zpred ;Rewrite <- Zplus_assoc; Simpl; Rewrite Zero_right;
Trivial with arith.
-Save.
+Qed.
Hints Immediate Zs_pred : zarith.
Theorem Zle_pred_n : (n:Z)(Zle (Zpred n) n).
Intros n;Pattern 2 n ;Rewrite Zs_pred; Apply Zle_n_Sn.
-Save.
+Qed.
Theorem Zle_trans_S : (n,m:Z)(Zle (Zs n) m)->(Zle n m).
Intros n m H;Apply Zle_trans with m:=(Zs n); [ Apply Zle_n_Sn | Assumption ].
-Save.
+Qed.
Theorem Zle_Sn_n : (n:Z)~(Zle (Zs n) n).
Intros n; Apply Zgt_not_le; Apply Zgt_Sn_n.
-Save.
+Qed.
Theorem Zle_antisym : (n,m:Z)(Zle n m)->(Zle m n)->(n=m).
@@ -403,96 +403,96 @@ Unfold Zle ;Intros n m H1 H2; (ElimCompare 'n 'm); [
Assumption
| Elim (Zcompare_ANTISYM m n);Auto with arith ]
| Intros H3;Absurd (Zcompare n m)=SUPERIEUR;Assumption ].
-Save.
+Qed.
Theorem Zgt_lt : (m,n:Z) (Zgt m n) -> (Zlt n m).
Unfold Zgt Zlt ;Intros m n H; Elim (Zcompare_ANTISYM m n); Auto with arith.
-Save.
+Qed.
Theorem Zlt_gt : (m,n:Z) (Zlt m n) -> (Zgt n m).
Unfold Zgt Zlt ;Intros m n H; Elim (Zcompare_ANTISYM n m); Auto with arith.
-Save.
+Qed.
Theorem Zge_le : (m,n:Z) (Zge m n) -> (Zle n m).
Intros m n; Change ~(Zlt m n)-> ~(Zgt n m);
Unfold not; Intros H1 H2; Apply H1; Apply Zgt_lt; Assumption.
-Save.
+Qed.
Theorem Zle_ge : (m,n:Z) (Zle m n) -> (Zge n m).
Intros m n; Change ~(Zgt m n)-> ~(Zlt n m);
Unfold not; Intros H1 H2; Apply H1; Apply Zlt_gt; Assumption.
-Save.
+Qed.
Theorem Zge_trans : (n, m, p : Z) (Zge n m) -> (Zge m p) -> (Zge n p).
Intros n m p H1 H2.
Apply Zle_ge.
Apply Zle_trans with m; Apply Zge_le; Trivial.
-Save.
+Qed.
Theorem Zlt_n_Sn : (n:Z)(Zlt n (Zs n)).
Intro n; Apply Zgt_lt; Apply Zgt_Sn_n.
-Save.
+Qed.
Theorem Zlt_S : (n,m:Z)(Zlt n m)->(Zlt n (Zs m)).
Intros n m H;Apply Zgt_lt; Apply Zgt_trans with m:=m; [
Apply Zgt_Sn_n
| Apply Zlt_gt; Assumption ].
-Save.
+Qed.
Theorem Zlt_n_S : (n,m:Z)(Zlt n m)->(Zlt (Zs n) (Zs m)).
Intros n m H;Apply Zgt_lt;Apply Zgt_n_S;Apply Zlt_gt; Assumption.
-Save.
+Qed.
Theorem Zlt_S_n : (n,m:Z)(Zlt (Zs n) (Zs m))->(Zlt n m).
Intros n m H;Apply Zgt_lt;Apply Zgt_S_n;Apply Zlt_gt; Assumption.
-Save.
+Qed.
Theorem Zlt_n_n : (n:Z)~(Zlt n n).
Intros n;Elim (Zcompare_EGAL n n); Unfold Zlt ;Intros H1 H2;
Rewrite H2; [ Discriminate | Trivial with arith ].
-Save.
+Qed.
Lemma Zlt_pred : (n,p:Z)(Zlt (Zs n) p)->(Zlt n (Zpred p)).
Intros n p H;Apply Zlt_S_n; Rewrite <- Zs_pred; Assumption.
-Save.
+Qed.
Lemma Zlt_pred_n_n : (n:Z)(Zlt (Zpred n) n).
Intros n; Apply Zlt_S_n; Rewrite <- Zs_pred; Apply Zlt_n_Sn.
-Save.
+Qed.
Theorem Zlt_le_S : (n,p:Z)(Zlt n p)->(Zle (Zs n) p).
Intros n p H; Apply Zgt_le_S; Apply Zlt_gt; Assumption.
-Save.
+Qed.
Theorem Zlt_n_Sm_le : (n,m:Z)(Zlt n (Zs m))->(Zle n m).
Intros n m H; Apply Zgt_S_le; Apply Zlt_gt; Assumption.
-Save.
+Qed.
Theorem Zle_lt_n_Sm : (n,m:Z)(Zle n m)->(Zlt n (Zs m)).
Intros n m H; Apply Zgt_lt; Apply Zle_gt_S; Assumption.
-Save.
+Qed.
Theorem Zlt_le_weak : (n,m:Z)(Zlt n m)->(Zle n m).
Unfold Zlt Zle ;Intros n m H;Rewrite H;Discriminate.
-Save.
+Qed.
Theorem Zlt_trans : (n,m,p:Z)(Zlt n m)->(Zlt m p)->(Zlt n p).
Intros n m p H1 H2; Apply Zgt_lt; Apply Zgt_trans with m:= m;
Apply Zlt_gt; Assumption.
-Save.
+Qed.
Theorem Zlt_le_trans : (n,m,p:Z)(Zlt n m)->(Zle m p)->(Zlt n p).
Intros n m p H1 H2;Apply Zgt_lt;Apply Zle_gt_trans with m:=m;
[ Assumption | Apply Zlt_gt;Assumption ].
-Save.
+Qed.
Theorem Zle_lt_trans : (n,m,p:Z)(Zle n m)->(Zlt m p)->(Zlt n p).
Intros n m p H1 H2;Apply Zgt_lt;Apply Zgt_le_trans with m:=m;
[ Apply Zlt_gt;Assumption | Assumption ].
-Save.
+Qed.
Theorem Zle_lt_or_eq : (n,m:Z)(Zle n m)->((Zlt n m) \/ n=m).
@@ -500,7 +500,7 @@ Unfold Zle Zlt ;Intros n m H; (ElimCompare 'n 'm); [
Elim (Zcompare_EGAL n m);Auto with arith
| Auto with arith
| Intros H';Absurd (Zcompare n m)=SUPERIEUR;Assumption ].
-Save.
+Qed.
Theorem Zle_or_lt : (n,m:Z)((Zle n m)\/(Zlt m n)).
@@ -508,27 +508,27 @@ Unfold Zle Zlt ;Intros n m; (ElimCompare 'n 'm); [
Intros E;Rewrite -> E;Left;Discriminate
| Intros E;Rewrite -> E;Left;Discriminate
| Elim (Zcompare_ANTISYM n m); Auto with arith ].
-Save.
+Qed.
Theorem Zle_not_lt : (n,m:Z)(Zle n m) -> ~(Zlt m n).
Unfold Zle Zlt; Unfold not ;Intros n m H1 H2;Apply H1;
Elim (Zcompare_ANTISYM n m);Auto with arith.
-Save.
+Qed.
Theorem Zlt_not_le : (n,m:Z)(Zlt n m) -> ~(Zle m n).
Unfold Zlt Zle not ;Intros n m H1 H2; Apply H2; Elim (Zcompare_ANTISYM m n);
Auto with arith.
-Save.
+Qed.
Theorem Zlt_not_sym : (n,m:Z)(Zlt n m) -> ~(Zlt m n).
Intros n m H;Apply Zle_not_lt; Apply Zlt_le_weak; Assumption.
-Save.
+Qed.
Theorem Zle_le_S : (x,y:Z)(Zle x y)->(Zle x (Zs y)).
Intros.
Apply Zle_trans with y; Trivial with zarith.
-Save.
+Qed.
Hints Resolve Zle_le_S : zarith.
@@ -543,13 +543,13 @@ Lemma Zmin_SS : (n,m:Z)((Zs (Zmin n m))=(Zmin (Zs n) (Zs m))).
Intros n m;Unfold Zmin; Rewrite (Zcompare_n_S n m);
(ElimCompare 'n 'm);Intros E;Rewrite E;Auto with arith.
-Save.
+Qed.
Lemma Zle_min_l : (n,m:Z)(Zle (Zmin n m) n).
Intros n m;Unfold Zmin ; (ElimCompare 'n 'm);Intros E;Rewrite -> E;
[ Apply Zle_n | Apply Zle_n | Apply Zlt_le_weak; Apply Zgt_lt;Exact E ].
-Save.
+Qed.
Lemma Zle_min_r : (n,m:Z)(Zle (Zmin n m) m).
@@ -557,93 +557,93 @@ Intros n m;Unfold Zmin ; (ElimCompare 'n 'm);Intros E;Rewrite -> E;[
Unfold Zle ;Rewrite -> E;Discriminate
| Unfold Zle ;Rewrite -> E;Discriminate
| Apply Zle_n ].
-Save.
+Qed.
Lemma Zmin_case : (n,m:Z)(P:Z->Set)(P n)->(P m)->(P (Zmin n m)).
Intros n m P H1 H2; Unfold Zmin; Case (Zcompare n m);Auto with arith.
-Save.
+Qed.
Lemma Zmin_or : (n,m:Z)(Zmin n m)=n \/ (Zmin n m)=m.
Unfold Zmin; Intros; Elim (Zcompare n m); Auto.
-Save.
+Qed.
Lemma Zmin_n_n : (n:Z) (Zmin n n)=n.
Unfold Zmin; Intros; Elim (Zcompare n n); Auto.
-Save.
+Qed.
Lemma Zplus_assoc_l : (n,m,p:Z)((Zplus n (Zplus m p))=(Zplus (Zplus n m) p)).
Exact Zplus_assoc.
-Save.
+Qed.
Lemma Zplus_assoc_r : (n,m,p:Z)(Zplus (Zplus n m) p) =(Zplus n (Zplus m p)).
Intros; Symmetry; Apply Zplus_assoc.
-Save.
+Qed.
Lemma Zplus_permute : (n,m,p:Z) (Zplus n (Zplus m p))=(Zplus m (Zplus n p)).
Intros n m p;
Rewrite Zplus_sym;Rewrite <- Zplus_assoc; Rewrite (Zplus_sym p n); Trivial with arith.
-Save.
+Qed.
Lemma Zsimpl_le_plus_l : (p,n,m:Z)(Zle (Zplus p n) (Zplus p m))->(Zle n m).
Intros p n m; Unfold Zle not ;Intros H1 H2;Apply H1;
Rewrite (Zcompare_Zplus_compatible n m p); Assumption.
-Save.
+Qed.
Lemma Zsimpl_le_plus_r : (p,n,m:Z)(Zle (Zplus n p) (Zplus m p))->(Zle n m).
Intros p n m H; Apply Zsimpl_le_plus_l with p.
Rewrite (Zplus_sym p n); Rewrite (Zplus_sym p m); Trivial.
-Save.
+Qed.
Lemma Zle_reg_l : (n,m,p:Z)(Zle n m)->(Zle (Zplus p n) (Zplus p m)).
Intros n m p; Unfold Zle not ;Intros H1 H2;Apply H1;
Rewrite <- (Zcompare_Zplus_compatible n m p); Assumption.
-Save.
+Qed.
Lemma Zle_reg_r : (a,b,c:Z) (Zle a b)->(Zle (Zplus a c) (Zplus b c)).
Intros a b c;Do 2 Rewrite [n:Z](Zplus_sym n c); Exact (Zle_reg_l a b c).
-Save.
+Qed.
Lemma Zle_plus_plus :
(n,m,p,q:Z) (Zle n m)->(Zle p q)->(Zle (Zplus n p) (Zplus m q)).
Intros n m p q; Intros H1 H2;Apply Zle_trans with m:=(Zplus n q); [
Apply Zle_reg_l;Assumption | Apply Zle_reg_r;Assumption ].
-Save.
+Qed.
Lemma Zplus_Snm_nSm : (n,m:Z)(Zplus (Zs n) m)=(Zplus n (Zs m)).
Unfold Zs ;Intros n m; Rewrite <- Zplus_assoc; Rewrite (Zplus_sym (POS xH));
Trivial with arith.
-Save.
+Qed.
Lemma Zsimpl_lt_plus_l
: (n,m,p:Z)(Zlt (Zplus p n) (Zplus p m))->(Zlt n m).
Unfold Zlt ;Intros n m p;
Rewrite Zcompare_Zplus_compatible;Trivial with arith.
-Save.
+Qed.
Lemma Zsimpl_lt_plus_r
: (n,m,p:Z)(Zlt (Zplus n p) (Zplus m p))->(Zlt n m).
Intros n m p H; Apply Zsimpl_lt_plus_l with p.
Rewrite (Zplus_sym p n); Rewrite (Zplus_sym p m); Trivial.
-Save.
+Qed.
Lemma Zlt_reg_l : (n,m,p:Z)(Zlt n m)->(Zlt (Zplus p n) (Zplus p m)).
Unfold Zlt ;Intros n m p; Rewrite Zcompare_Zplus_compatible;Trivial with arith.
-Save.
+Qed.
Lemma Zlt_reg_r : (n,m,p:Z)(Zlt n m)->(Zlt (Zplus n p) (Zplus m p)).
Intros n m p H; Rewrite (Zplus_sym n p); Rewrite (Zplus_sym m p); Apply Zlt_reg_l; Trivial.
-Save.
+Qed.
Lemma Zlt_le_reg :
(a,b,c,d:Z) (Zlt a b)->(Zle c d)->(Zlt (Zplus a c) (Zplus b d)).
@@ -651,7 +651,7 @@ Intros a b c d H0 H1.
Apply Zlt_le_trans with (Zplus b c).
Apply Zlt_reg_r; Trivial.
Apply Zle_reg_l; Trivial.
-Save.
+Qed.
Lemma Zle_lt_reg :
@@ -660,7 +660,7 @@ Intros a b c d H0 H1.
Apply Zle_lt_trans with (Zplus b c).
Apply Zle_reg_r; Trivial.
Apply Zlt_reg_l; Trivial.
-Save.
+Qed.
Definition Zminus := [m,n:Z](Zplus m (Zopp n)).
@@ -671,92 +671,92 @@ Lemma Zminus_plus_simpl :
Intros n m p;Unfold Zminus; Rewrite Zopp_Zplus; Rewrite Zplus_assoc;
Rewrite (Zplus_sym p); Rewrite <- (Zplus_assoc n p); Rewrite Zplus_inverse_r;
Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Lemma Zminus_n_O : (n:Z)(n=(Zminus n ZERO)).
Intro; Unfold Zminus; Simpl;Rewrite Zero_right; Trivial with arith.
-Save.
+Qed.
Lemma Zminus_n_n : (n:Z)(ZERO=(Zminus n n)).
Intro; Unfold Zminus; Rewrite Zplus_inverse_r; Trivial with arith.
-Save.
+Qed.
Lemma Zplus_minus : (n,m,p:Z)(n=(Zplus m p))->(p=(Zminus n m)).
Intros n m p H;Unfold Zminus;Apply (Zsimpl_plus_l m);
Rewrite (Zplus_sym m (Zplus n (Zopp m))); Rewrite <- Zplus_assoc;
Rewrite Zplus_inverse_l; Rewrite Zero_right; Rewrite H; Trivial with arith.
-Save.
+Qed.
Lemma Zminus_plus : (n,m:Z)(Zminus (Zplus n m) n)=m.
Intros n m;Unfold Zminus ;Rewrite -> (Zplus_sym n m);Rewrite <- Zplus_assoc;
Rewrite -> Zplus_inverse_r; Apply Zero_right.
-Save.
+Qed.
Lemma Zle_plus_minus : (n,m:Z) (Zplus n (Zminus m n))=m.
Unfold Zminus; Intros n m; Rewrite Zplus_permute; Rewrite Zplus_inverse_r;
Apply Zero_right.
-Save.
+Qed.
Lemma Zminus_Sn_m : (n,m:Z)((Zs (Zminus n m))=(Zminus (Zs n) m)).
Intros n m;Unfold Zminus Zs; Rewrite (Zplus_sym n (Zopp m));
Rewrite <- Zplus_assoc;Apply Zplus_sym.
-Save.
+Qed.
Lemma Zlt_minus : (n,m:Z)(Zlt ZERO m)->(Zlt (Zminus n m) n).
Intros n m H; Apply Zsimpl_lt_plus_l with p:=m; Rewrite Zle_plus_minus;
Pattern 1 n ;Rewrite <- (Zero_right n); Rewrite (Zplus_sym m n);
Apply Zlt_reg_l; Assumption.
-Save.
+Qed.
Lemma Zlt_O_minus_lt : (n,m:Z)(Zlt ZERO (Zminus n m))->(Zlt m n).
Intros n m H; Apply Zsimpl_lt_plus_l with p:=(Zopp m); Rewrite Zplus_inverse_l;
Rewrite Zplus_sym;Exact H.
-Save.
+Qed.
Lemma Zmult_plus_distr_l :
(n,m,p:Z)((Zmult (Zplus n m) p)=(Zplus (Zmult n p) (Zmult m p))).
Intros n m p;Rewrite Zmult_sym;Rewrite Zmult_plus_distr_r;
Do 2 Rewrite -> (Zmult_sym p); Trivial with arith.
-Save.
+Qed.
Lemma Zmult_minus_distr :
(n,m,p:Z)((Zmult (Zminus n m) p)=(Zminus (Zmult n p) (Zmult m p))).
Intros n m p;Unfold Zminus; Rewrite Zmult_plus_distr_l; Rewrite Zopp_Zmult;
Trivial with arith.
-Save.
+Qed.
Lemma Zmult_assoc_r : (n,m,p:Z)((Zmult (Zmult n m) p) = (Zmult n (Zmult m p))).
Intros n m p; Rewrite Zmult_assoc; Trivial with arith.
-Save.
+Qed.
Lemma Zmult_assoc_l : (n,m,p:Z)(Zmult n (Zmult m p)) = (Zmult (Zmult n m) p).
Intros n m p; Rewrite Zmult_assoc; Trivial with arith.
-Save.
+Qed.
Theorem Zmult_permute : (n,m,p:Z)(Zmult n (Zmult m p)) = (Zmult m (Zmult n p)).
Intros; Rewrite -> (Zmult_assoc m n p); Rewrite -> (Zmult_sym m n).
Apply Zmult_assoc.
-Save.
+Qed.
Lemma Zmult_1_n : (n:Z)(Zmult (POS xH) n)=n.
Exact Zmult_one.
-Save.
+Qed.
Lemma Zmult_n_1 : (n:Z)(Zmult n (POS xH))=n.
Intro; Rewrite Zmult_sym; Apply Zmult_one.
-Save.
+Qed.
Lemma Zmult_Sm_n : (n,m:Z) (Zplus (Zmult n m) m)=(Zmult (Zs n) m).
Intros n m; Unfold Zs; Rewrite Zmult_plus_distr_l; Rewrite Zmult_1_n;
Trivial with arith.
-Save.
+Qed.
(** Just for compatibility with previous versions.