Skip to content

Commit 481e854

Browse files
committed
Update examples to use coq_codewars
1 parent 31adb77 commit 481e854

File tree

4 files changed

+20
-30
lines changed

4 files changed

+20
-30
lines changed

examples/failing/Solution.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Theorem thm4 : 1 = 1. Proof. reflexivity. Qed.
1+
Theorem thm4 : 1 = 1. Proof. Admitted.

examples/failing/SolutionTest.v

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
Require Import Solution.
2-
3-
Theorem thm1 : 1 = 1 + 0. Proof. admit. Admitted.
4-
Print Assumptions thm1.
5-
6-
Parameter thm2 : 1 + 0 = 0 + 1.
7-
Print Assumptions thm2.
8-
9-
Theorem thm3 : 1 = 0 + 1. Proof. rewrite <- thm2. exact thm1. Qed.
10-
Print Assumptions thm3.
11-
12-
Theorem thm4_check : 1 = 1.
13-
Proof.
14-
exact thm4.
15-
Print Assumptions thm4.
16-
Qed.
1+
Require Solution.
2+
From CW Require Import Loader.
3+
4+
CWGroup "Solution.thm4".
5+
CWTest "should have the correct type".
6+
CWAssert Solution.thm4 : (1 = 1).
7+
CWTest "should be closed under the global context".
8+
CWAssert Solution.thm4 Assumes.
9+
CWEndGroup.

examples/passing/Solution.v

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
Theorem plus_n_O : forall n:nat, n = n + 0.
2-
Proof.
3-
intros n.
4-
induction n.
5-
- reflexivity.
6-
- simpl. rewrite <- IHn. reflexivity.
7-
Qed.
1+
Theorem thm4 : 1 = 1. Proof. reflexivity. Qed.

examples/passing/SolutionTest.v

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
Require Import Solution.
2-
Theorem plus_n_O_check : forall n:nat, n = n + 0.
3-
Proof.
4-
exact plus_n_O.
5-
Print Assumptions plus_n_O.
6-
Qed.
1+
Require Solution.
2+
From CW Require Import Loader.
3+
4+
CWGroup "Solution.thm4".
5+
CWTest "should have the correct type".
6+
CWAssert Solution.thm4 : (1 = 1).
7+
CWTest "should be closed under the global context".
8+
CWAssert Solution.thm4 Assumes.
9+
CWEndGroup.

0 commit comments

Comments
 (0)