-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.makam
46 lines (37 loc) · 1020 Bytes
/
tests.makam
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
%use "init".
categorical : testsuite.
%testsuite categorical.
(* Check Basic Numbers Work *)
>> typecheck << 1 >> Domain Range ?
>> Yes:
>> Range := "Z ",
>> Domain := "term ".
(* Check Basic Addition Works *)
>> typecheck << (add lift 4) lift 8 >> Domain Range ?
>> Yes:
>> Range := "Z ",
>> Domain := "term ".
(* Check Identity Works *)
>> typecheck << λ "a" : 1 → * . λ "x" : 1 → "a" . "x" >> Domain Range ?
>> Yes:
>> Y := "∃ \"x1\" : 1 → * . ∃ \"x2\" : 1 → \"x1\" . \"x1\" ",
>> X := "term ".
(* Check Axioms Work *)
>> typecheck {
>> Let "myaxiom" := axiom "myaxiom" : Z → Z .
>> "myaxiom"
>> } Domain Range ?
>> Yes:
>> Range := "Z ",
>> Domain := "Z ".
>> normalize << 1 >> Result ?
>> Yes:
>> Result := "1 ".
>> normalize << λ "a" : 1 → * . "a" >> Result ?
>> Yes:
>> Result := "λ \"x1\" : 1 → * . \"x1\" ∘ ! term ".
>> normalize << id Z ∘ 1 >> Result ?
>> Yes:
>> Result := "1 ".
(* FIXME demonstrate more forall/exists stuff *)
(* FIXME experiment with coforall/coexists *)