-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathExamples.v
82 lines (65 loc) · 1.24 KB
/
Examples.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Require Import Arith NPeano.
Require Import Magic.Wand.
(* --- Geminio --- *)
Theorem obvious:
forall n : nat,
(nat * nat).
Proof.
intros. geminio n. apply (n, n0).
Qed.
(* --- Sectumsempra --- *)
Theorem lt_S_m_p:
forall n m p : nat,
n < m + S p -> n < S (p + m).
Proof.
intros n m p H.
rewrite <- Nat.add_succ_l.
rewrite plus_comm.
apply H.
Qed.
Sectumsempra lt_S_m_p.
Theorem test_lt_S_m_p_0:
forall n m p : nat,
n < m + S p -> n < S p + m.
Proof.
exact lt_S_m_p_0.
Qed.
Theorem test_lt_S_m_p_1:
forall n m p : nat,
n < S p + m -> n < S (p + m).
Proof.
exact lt_S_m_p_1.
Qed.
(* --- Levicorpus --- *)
Levicorpus lt_S_m_p.
Theorem test_lt_S_m_p_inv:
forall n m p : nat,
n < S (p + m) -> n < m + S p.
Proof.
exact lt_S_m_p_inv.
Qed.
(* --- Reducio --- *)
Theorem engorged:
forall (a b : nat),
a <= b ->
a <= S b.
Proof.
intros. rewrite plus_n_O. rewrite plus_comm.
constructor. auto.
Qed.
Reducio engorged.
Theorem found_minimal_app:
engorged_red = le_S.
Proof.
reflexivity.
Qed.
(* --- Spells in combination --- *)
Theorem lt_S_m_p_iff:
forall n m p : nat,
n < m + S p <-> n < S (p + m).
Proof.
intros.
geminio lt_S_m_p.
levicorpus lt_S_m_p.
constructor; auto.
Qed.