-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVariants2.v
56 lines (46 loc) · 1014 Bytes
/
Variants2.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
(* Variants for second proof *)
Require Import Arith NPeano.
(*
Things we can change:
1. Outside/inside induction
2. Apply to conclusion/apply to hypothesis/both
3. Apply function/use hint or rewrite db/use special tactic
*)
(* Variant 1: Outside, conclusion, function *)
Theorem old2_v1:
forall (n m p : nat),
n <= m ->
m <= p ->
n <= S p.
Proof.
intros. apply le_S. induction H0; auto.
Qed.
(* Variant 2: Inside, conclusion, function *)
Theorem old2_v2:
forall (n m p : nat),
n <= m ->
m <= p ->
n <= S p.
Proof.
intros. induction H0; auto with arith.
Qed.
(* Variant 3: Outside, conclusion, rws [1] *)
Theorem old2_v3:
forall (n m p : nat),
n <= m ->
m <= p ->
n <= S p.
Proof.
intros. rewrite le_S; auto. induction H0; auto.
Qed.
(* Variant 4: Inside, conclusion, rw [2] *)
Theorem old2_v4:
forall (n m p : nat),
n <= m ->
m <= p ->
n <= S p.
Proof.
intros. induction H0.
- rewrite le_S; auto.
- constructor. auto.
Qed.