@@ -18,19 +18,18 @@ axiom function_sort_abstraction: $ ,(is_function '(sym sort_abstraction_sym) '[a
18
18
19
19
def is_atom_sort (alpha: Pattern): Pattern = $ (is_func alpha) /\ (alpha C= dom atoms) $;
20
20
def is_nominal_sort (tau: Pattern): Pattern = $ (is_func tau) /\ (tau C= dom nominal_sorts) $;
21
- def is_atom {a: EVar} ( alpha: Pattern): Pattern a = $ is_of_sort (eVar a) alpha $;
21
+ def is_atom (a alpha: Pattern): Pattern = $ is_sorted_func alpha a $;
22
22
23
23
term swap_sym: Symbol;
24
- def swap {a b: EVar} (phi: Pattern a b): Pattern a b = $ (sym swap_sym) @@ eVar a @@ eVar b @@ phi $;
25
- def moot_swap {a: EVar} (phi: Pattern a): Pattern a = $ (sym swap_sym) @@ eVar a @@ eVar a @@ phi $;
24
+ def swap (a b phi: Pattern): Pattern = $ (sym swap_sym) @@ a @@ b @@ phi $;
26
25
term abstraction_sym: Symbol;
27
26
def abstraction (phi rho: Pattern): Pattern = $ (sym abstraction_sym) @@ phi @@ rho $;
28
27
term supp_sym: Symbol;
29
28
def supp (phi: Pattern): Pattern = $ (sym supp_sym) @@ phi $;
30
29
def fresh_for (phi psi: Pattern): Pattern = $ ~ (phi C= supp psi) $;
31
30
32
31
def EV_pattern {.a .b: EVar} (alpha phi: Pattern): Pattern =
33
- $ s_forall alpha a (s_forall alpha b ((swap a b phi) == phi)) $;
32
+ $ s_forall alpha a (s_forall alpha b ((swap (eVar a) (eVar b) phi) == phi)) $;
34
33
35
34
axiom function_swap:
36
35
$ is_atom_sort alpha $ >
@@ -48,79 +47,83 @@ axiom multifunction_supp:
48
47
axiom EV_abstraction {a b: EVar} (alpha tau: Pattern) (phi psi: Pattern a b):
49
48
$ is_atom_sort alpha $ >
50
49
$ is_nominal_sort tau $ >
51
- $ (is_of_sort phi alpha) ->
52
- (is_of_sort psi tau) ->
53
- (s_forall alpha a (s_forall alpha b ((swap a b (abstraction phi psi)) == abstraction (swap a b phi) (swap a b psi)))) $;
54
-
50
+ $ s_forall alpha a (s_forall alpha b (
51
+ (is_of_sort phi alpha) ->
52
+ (is_of_sort psi tau) ->
53
+ ((swap (eVar a) (eVar b) (abstraction phi psi)) == abstraction (swap (eVar a) (eVar b) phi) (swap (eVar a) (eVar b) psi)))) $;
54
+ -- add EV axiom for swap
55
+ -- add EV axiom for freshness
55
56
56
57
axiom EV_pred (alpha tau: Pattern):
57
58
$ is_atom_sort alpha $ >
58
59
$ is_nominal_sort tau $ >
59
60
$ EV_pattern alpha (dom tau) $;
60
- axiom S1 (alpha tau: Pattern) {a: EVar} ( phi: Pattern a ):
61
+ axiom S1 (alpha tau a phi: Pattern):
61
62
$ is_atom_sort alpha $ >
62
63
$ is_nominal_sort tau $ >
63
64
$ (is_atom a alpha) ->
64
65
(is_of_sort phi tau) ->
65
- ((moot_swap a phi) == phi) $;
66
- axiom S2 (alpha tau: Pattern) { a b: EVar} ( phi: Pattern a b ):
66
+ ((swap a a phi) == phi) $;
67
+ axiom S2 (alpha tau a b phi: Pattern):
67
68
$ is_atom_sort alpha $ >
68
69
$ is_nominal_sort tau $ >
69
70
$ (is_atom a alpha) ->
70
71
(is_atom b alpha) ->
71
72
(is_of_sort phi tau) ->
72
73
(swap a b (swap a b phi)) == phi $;
73
- axiom S3 (alpha: Pattern) { a b: EVar} :
74
+ axiom S3 {a b: EVar} (alpha: Pattern a b) :
74
75
$ is_atom_sort alpha $ >
75
- $ (is_atom a alpha) ->
76
- (is_atom b alpha) ->
77
- ((swap a b (eVar a)) == eVar b) $;
78
- axiom S4 (alpha tau: Pattern) { a b: EVar} ( phi: Pattern a b ):
76
+ $ s_forall alpha a (
77
+ s_forall alpha b (
78
+ ((swap (eVar a) (eVar b) (eVar a)) == ( eVar b))) ) $;
79
+ axiom S4 (alpha tau a b phi: Pattern):
79
80
$ is_atom_sort alpha $ >
80
81
$ is_nominal_sort tau $ >
81
82
$ (is_atom a alpha) ->
82
83
(is_atom b alpha) ->
83
84
(is_of_sort phi tau) ->
84
85
((swap a b phi) == (swap b a phi)) $;
85
- axiom F1 (alpha tau: Pattern) { a b: EVar} ( phi: Pattern a b ):
86
+ axiom F1 (alpha tau a b phi: Pattern):
86
87
$ is_atom_sort alpha $ >
87
88
$ is_nominal_sort tau $ >
88
89
$ (is_atom a alpha) ->
89
90
(is_atom b alpha) ->
90
91
(is_of_sort phi tau) ->
91
- ((fresh_for (eVar a) phi) /\ (fresh_for (eVar b) phi) -> ((swap a b phi) == phi)) $;
92
- axiom F2 (alpha: Pattern) { a b: EVar} :
92
+ ((fresh_for a phi) /\ (fresh_for b phi) -> ((swap a b phi) == phi)) $;
93
+ axiom F2 (alpha a b: Pattern) :
93
94
$ is_atom_sort alpha $ >
94
95
$ (is_atom a alpha) ->
95
96
(is_atom b alpha) ->
96
- (((eVar a) != (eVar b)) <-> (fresh_for (eVar a) (eVar b) )) $;
97
- axiom F3 (alpha1 alpha2: Pattern) { a b: EVar} :
97
+ ((a != b) <-> (fresh_for a b )) $;
98
+ axiom F3 (alpha1 alpha2 a b: Pattern) :
98
99
$ is_atom_sort alpha1 $ >
99
100
$ is_atom_sort alpha2 $ >
100
101
$ (is_atom a alpha1) ->
101
102
(is_atom b alpha2) ->
102
103
(alpha1 != alpha2) ->
103
- ((eVar a) != (eVar b)) $;
104
- axiom F4 (alpha tau phi: Pattern) {a: EVar}:
104
+ (a != b) $;
105
+ -- We restrict F4 to only accept singleton phi's to avoid inconsistencies
106
+ -- caused by using the full set of atoms in place of phi
107
+ axiom F4 {a: EVar} (alpha tau phi: Pattern):
105
108
$ is_atom_sort alpha $ >
106
109
$ is_nominal_sort tau $ >
107
- $ (is_of_sort phi tau) ->
110
+ $ (is_sorted_func tau phi ) ->
108
111
(s_exists alpha a (fresh_for (eVar a) phi)) $;
109
- axiom A1 (alpha tau: Pattern) { a b: EVar} ( phi rho: Pattern a b ):
112
+ axiom A1 (alpha tau a b phi rho: Pattern):
110
113
$ is_atom_sort alpha $ >
111
114
$ is_nominal_sort tau $ >
112
115
$ (is_atom a alpha) ->
113
116
(is_atom b alpha) ->
114
117
(is_of_sort phi tau) ->
115
118
(is_of_sort rho tau) ->
116
- (((abstraction (eVar a) phi) == (abstraction (eVar b) rho)) <->
117
- ((eVar a == eVar b) /\ (phi == rho)) \/
118
- ((fresh_for (eVar a) rho) /\ ((swap a b phi) == rho))) $;
119
+ (((abstraction a phi) == (abstraction b rho)) <->
120
+ ((a == b) /\ (phi == rho)) \/
121
+ ((fresh_for a rho) /\ ((swap a b phi) == rho))) $;
119
122
axiom A2 (alpha tau: Pattern) {x a y: EVar}:
120
123
$ is_atom_sort alpha $ >
121
124
$ is_nominal_sort tau $ >
122
125
$ s_forall (sort_abstraction alpha tau) x
123
126
(s_exists alpha a (s_exists tau y (eVar x == abstraction (eVar a) (eVar y)))) $;
124
127
125
- def coercion {a: EVar} ( phi: Pattern a ) {.y: EVar}: Pattern a =
126
- $ exists y (eVar y /\ ((abstraction (eVar a) (eVar y)) == phi)) $;
128
+ def coercion (a phi: Pattern) {.y: EVar}: Pattern =
129
+ $ exists y (eVar y /\ ((abstraction a (eVar y)) == phi)) $;
0 commit comments