aboutsummaryrefslogtreecommitdiff
path: root/theories/Arith/Le.v
diff options
context:
space:
mode:
Diffstat (limited to 'theories/Arith/Le.v')
-rwxr-xr-xtheories/Arith/Le.v106
1 files changed, 53 insertions, 53 deletions
diff --git a/theories/Arith/Le.v b/theories/Arith/Le.v
index c80689836e..d311046650 100755
--- a/theories/Arith/Le.v
+++ b/theories/Arith/Le.v
@@ -9,114 +9,114 @@
(*i $Id$ i*)
(** Order on natural numbers *)
-V7only [Import nat_scope.].
Open Local Scope nat_scope.
-Implicit Variables Type m,n,p:nat.
+Implicit Types m n p : nat.
(** Reflexivity *)
-Theorem le_refl : (n:nat)(le n n).
+Theorem le_refl : forall n, n <= n.
Proof.
-Exact le_n.
+exact le_n.
Qed.
(** Transitivity *)
-Theorem le_trans : (n,m,p:nat)(le n m)->(le m p)->(le n p).
+Theorem le_trans : forall n m p, n <= m -> m <= p -> n <= p.
Proof.
- NewInduction 2; Auto.
+ induction 2; auto.
Qed.
-Hints Resolve le_trans : arith v62.
+Hint Resolve le_trans: arith v62.
(** Order, successor and predecessor *)
-Theorem le_n_S : (n,m:nat)(le n m)->(le (S n) (S m)).
+Theorem le_n_S : forall n m, n <= m -> S n <= S m.
Proof.
- NewInduction 1; Auto.
+ induction 1; auto.
Qed.
-Theorem le_n_Sn : (n:nat)(le n (S n)).
+Theorem le_n_Sn : forall n, n <= S n.
Proof.
- Auto.
+ auto.
Qed.
-Theorem le_O_n : (n:nat)(le O n).
+Theorem le_O_n : forall n, 0 <= n.
Proof.
- NewInduction n ; Auto.
+ induction n; auto.
Qed.
-Hints Resolve le_n_S le_n_Sn le_O_n le_n_S : arith v62.
+Hint Resolve le_n_S le_n_Sn le_O_n le_n_S: arith v62.
-Theorem le_pred_n : (n:nat)(le (pred n) n).
+Theorem le_pred_n : forall n, pred n <= n.
Proof.
-NewInduction n ; Auto with arith.
+induction n; auto with arith.
Qed.
-Hints Resolve le_pred_n : arith v62.
+Hint Resolve le_pred_n: arith v62.
-Theorem le_trans_S : (n,m:nat)(le (S n) m)->(le n m).
+Theorem le_Sn_le : forall n m, S n <= m -> n <= m.
Proof.
-Intros n m H ; Apply le_trans with (S n); Auto with arith.
+intros n m H; apply le_trans with (S n); auto with arith.
Qed.
-Hints Immediate le_trans_S : arith v62.
+Hint Immediate le_Sn_le: arith v62.
-Theorem le_S_n : (n,m:nat)(le (S n) (S m))->(le n m).
+Theorem le_S_n : forall n m, S n <= S m -> n <= m.
Proof.
-Intros n m H ; Change (le (pred (S n)) (pred (S m))).
-Elim H ; Simpl ; Auto with arith.
+intros n m H; change (pred (S n) <= pred (S m)) in |- *.
+elim H; simpl in |- *; auto with arith.
Qed.
-Hints Immediate le_S_n : arith v62.
+Hint Immediate le_S_n: arith v62.
-Theorem le_pred : (n,m:nat)(le n m)->(le (pred n) (pred m)).
+Theorem le_pred : forall n m, n <= m -> pred n <= pred m.
Proof.
-NewInduction n as [|n IHn]. Simpl. Auto with arith.
-NewDestruct m as [|m]. Simpl. Intro H. Inversion H.
-Simpl. Auto with arith.
+induction n as [| n IHn]. simpl in |- *. auto with arith.
+destruct m as [| m]. simpl in |- *. intro H. inversion H.
+simpl in |- *. auto with arith.
Qed.
(** Comparison to 0 *)
-Theorem le_Sn_O : (n:nat)~(le (S n) O).
+Theorem le_Sn_O : forall n, ~ S n <= 0.
Proof.
-Red ; Intros n H.
-Change (IsSucc O) ; Elim H ; Simpl ; Auto with arith.
+red in |- *; intros n H.
+change (IsSucc 0) in |- *; elim H; simpl in |- *; auto with arith.
Qed.
-Hints Resolve le_Sn_O : arith v62.
+Hint Resolve le_Sn_O: arith v62.
-Theorem le_n_O_eq : (n:nat)(le n O)->(O=n).
+Theorem le_n_O_eq : forall n, n <= 0 -> 0 = n.
Proof.
-NewInduction n; Auto with arith.
-Intro; Contradiction le_Sn_O with n.
+induction n; auto with arith.
+intro; contradiction le_Sn_O with n.
Qed.
-Hints Immediate le_n_O_eq : arith v62.
+Hint Immediate le_n_O_eq: arith v62.
(** Negative properties *)
-Theorem le_Sn_n : (n:nat)~(le (S n) n).
+Theorem le_Sn_n : forall n, ~ S n <= n.
Proof.
-NewInduction n; Auto with arith.
+induction n; auto with arith.
Qed.
-Hints Resolve le_Sn_n : arith v62.
+Hint Resolve le_Sn_n: arith v62.
(** Antisymmetry *)
-Theorem le_antisym : (n,m:nat)(le n m)->(le m n)->(n=m).
+Theorem le_antisym : forall n m, n <= m -> m <= n -> n = m.
Proof.
-Intros n m h ; NewDestruct h as [|m0]; Auto with arith.
-Intros H1.
-Absurd (le (S m0) m0) ; Auto with arith.
-Apply le_trans with n ; Auto with arith.
+intros n m h; destruct h as [| m0 H]; auto with arith.
+intros H1.
+absurd (S m0 <= m0); auto with arith.
+apply le_trans with n; auto with arith.
Qed.
-Hints Immediate le_antisym : arith v62.
+Hint Immediate le_antisym: arith v62.
(** A different elimination principle for the order on natural numbers *)
-Lemma le_elim_rel : (P:nat->nat->Prop)
- ((p:nat)(P O p))->
- ((p,q:nat)(le p q)->(P p q)->(P (S p) (S q)))->
- (n,m:nat)(le n m)->(P n m).
+Lemma le_elim_rel :
+ forall P:nat -> nat -> Prop,
+ (forall p, P 0 p) ->
+ (forall p (q:nat), p <= q -> P p q -> P (S p) (S q)) ->
+ forall n m, n <= m -> P n m.
Proof.
-NewInduction n; Auto with arith.
-Intros m Le.
-Elim Le; Auto with arith.
-Qed.
+induction n; auto with arith.
+intros m Le.
+elim Le; auto with arith.
+Qed. \ No newline at end of file