-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVariants7.v
67 lines (57 loc) · 1.22 KB
/
Variants7.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Require Import Arith NPeano.
Hint Resolve Nat.le_max_r Nat.le_max_r : arith.
Theorem new8 :
forall n m n0 : nat,
m = n ->
n <= max n0 m.
Proof.
intros. subst. auto with arith.
Qed.
(* Same as rewrite H *)
Theorem old8_v1 :
forall n m n0 : nat,
m = n ->
n <= max n0 m + 1.
Proof.
intros. subst. auto with arith.
Qed.
(* Moves le_plus_trans outside of rewrite *)
Theorem old8_v2 :
forall n m n0 : nat,
m = n ->
n <= max n0 m + 1.
Proof.
intros. apply le_plus_trans. subst. auto with arith.
Qed.
(* Rewrite le_plus_trans first *)
Theorem old8_v3 :
forall n m n0 : nat,
m = n ->
n <= max n0 m + 1.
Proof.
intros. rewrite le_plus_trans; subst; auto with arith.
Qed.
(* Rewrite le_max_r first *)
Theorem old8_v4 :
forall n m n0 : nat,
m = n ->
n <= max n0 m + 1.
Proof.
intros. rewrite Nat.le_max_r. subst. eauto with arith.
Qed.
(* Rewrite by H instead of subst *)
Theorem old8_v5 :
forall n m n0 : nat,
m = n ->
n <= max n0 m + 1.
Proof.
intros. rewrite <- H. auto with arith.
Qed.
(* Rewrite by le_plus_trans first *)
Theorem old8_v6 :
forall n m n0 : nat,
m = n ->
n <= max n0 m + 1.
Proof.
intros. rewrite <- le_plus_trans; subst; auto with arith.
Qed.