-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProofObjectsTest.v
65 lines (52 loc) · 1.32 KB
/
ProofObjectsTest.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
Set Warnings "-notation-overridden,-parsing".
Require Import ProofObjects.
Parameter MISSING: Type.
Module Check.
Ltac check_type A B :=
match type of A with
| context[MISSING] => idtac "Missing:" A
| ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"]
end.
Ltac print_manual_grade A :=
first [
match eval compute in A with
| ?T => idtac "Score:" T
end
| idtac "Score: Ungraded"].
End Check.
Require Import ProofObjects.
Import Check.
Goal True.
idtac "------------------- eight_is_even --------------------".
idtac " ".
idtac "#> ev_8".
idtac "Possible points: 1".
check_type @ev_8 ((ev 8)).
idtac "Assumptions:".
Abort.
Print Assumptions ev_8.
Goal True.
idtac " ".
idtac "#> ev_8'".
idtac "Possible points: 1".
check_type @ev_8' ((ev 8)).
idtac "Assumptions:".
Abort.
Print Assumptions ev_8'.
Goal True.
idtac " ".
idtac "------------------- equality__leibniz_equality --------------------".
idtac " ".
idtac "#> equality__leibniz_equality".
idtac "Possible points: 2".
check_type @equality__leibniz_equality (
(forall (X : Type) (x y : X), x = y -> forall P : X -> Prop, P x -> P y)).
idtac "Assumptions:".
Abort.
Print Assumptions equality__leibniz_equality.
Goal True.
idtac " ".
idtac " ".
idtac "Max points - standard: 4".
idtac "Max points - advanced: 4".
Abort.