equal
deleted
inserted
replaced
11 typedecl ty |
11 typedecl ty |
12 |
12 |
13 axiomatization |
13 axiomatization |
14 bool :: ty and |
14 bool :: ty and |
15 nat :: ty and |
15 nat :: ty and |
16 arrow :: "ty => ty => ty" (infixr "->" 20) and |
16 arrow :: "ty \<Rightarrow> ty \<Rightarrow> ty" (infixr "->" 20) and |
17 typeof :: "[tm, ty] => bool" and |
17 typeof :: "[tm, ty] \<Rightarrow> bool" and |
18 anyterm :: tm |
18 anyterm :: tm |
19 where common_typeof: " |
19 where common_typeof: " |
20 typeof (app M N) B :- typeof M (A -> B) & typeof N A.. |
20 typeof (app M N) B :- typeof M (A -> B) \<and> typeof N A.. |
21 |
21 |
22 typeof (cond C L R) A :- typeof C bool & typeof L A & typeof R A.. |
22 typeof (cond C L R) A :- typeof C bool \<and> typeof L A \<and> typeof R A.. |
23 typeof (fix F) A :- (!x. typeof x A => typeof (F x) A).. |
23 typeof (fix F) A :- (\<forall>x. typeof x A => typeof (F x) A).. |
24 |
24 |
25 typeof true bool.. |
25 typeof true bool.. |
26 typeof false bool.. |
26 typeof false bool.. |
27 typeof (M and N) bool :- typeof M bool & typeof N bool.. |
27 typeof (M and N) bool :- typeof M bool & typeof N bool.. |
28 |
28 |
33 typeof (M + N) nat :- typeof M nat & typeof N nat.. |
33 typeof (M + N) nat :- typeof M nat & typeof N nat.. |
34 typeof (M - N) nat :- typeof M nat & typeof N nat.. |
34 typeof (M - N) nat :- typeof M nat & typeof N nat.. |
35 typeof (M * N) nat :- typeof M nat & typeof N nat" |
35 typeof (M * N) nat :- typeof M nat & typeof N nat" |
36 |
36 |
37 axiomatization where good_typeof: " |
37 axiomatization where good_typeof: " |
38 typeof (abs Bo) (A -> B) :- (!x. typeof x A => typeof (Bo x) B)" |
38 typeof (abs Bo) (A -> B) :- (\<forall>x. typeof x A => typeof (Bo x) B)" |
39 |
39 |
40 axiomatization where bad1_typeof: " |
40 axiomatization where bad1_typeof: " |
41 typeof (abs Bo) (A -> B) :- (typeof varterm A => typeof (Bo varterm) B)" |
41 typeof (abs Bo) (A -> B) :- (typeof varterm A => typeof (Bo varterm) B)" |
42 |
42 |
43 axiomatization where bad2_typeof: " |
43 axiomatization where bad2_typeof: " |