inlining, experimental extension
[chr.git] / guard_entailment.chr
blob04c47523c720d0bc7aab387342520a2ecd182a8f
1 :- module(guard_entailment,
2           [ entails_guard/2,
3             simplify_guards/5
4           ]).
5 :- include(chr_op).
6 :- use_module(hprolog).
7 :- use_module(builtins).
8 :- use_module(chr_compiler_errors).
9 :- chr_option(debug, off).
10 :- chr_option(optimize, full).
11 :- chr_option(verbosity,off).
12 :- chr_constraint known/1, test/1, cleanup/0, variables/1.
13 entails_guard(A, B) :-
14         copy_term_nat((A, B), (C, F)),
15         term_variables(C, D),
16         variables(D),
17         sort(C, E),
18         entails_guard2(E), !,
19         test(F), !,
20         cleanup.
21 entails_guard2([]).
22 entails_guard2([A|B]) :-
23         known(A),
24         entails_guard2(B).
25 simplify_guards(A, H, B, G, I) :-
26         copy_term_nat((A, B), (C, E)),
27         term_variables(C, D),
28         variables(D),
29         entails_guard2(C), !,
30         simplify(E, F),
31         simplified(B, F, G, H, I), !,
32         cleanup.
33 simplified([], [], [], A, A).
34 simplified([A|B], [keep|C], [A|D], E, F) :-
35         simplified(B, C, D, E, F).
36 simplified([_|_], [fail|_], fail, A, A).
37 simplified([A|B], [true|L], [I|M], F, J) :-
38         builtins:binds_b(A, C),
39         term_variables(B, D),
40         intersect_eq(C, D, E), !,
41         (   E=[]
42         ->  term_variables(F, G),
43             intersect_eq(C, G, H), !,
44             (   H=[]
45             ->  I=true,
46                 J=K
47             ;   I=true,
48                 J= (A, K)
49             )
50         ;   I=A,
51             J=K
52         ),
53         simplified(B, L, M, F, K).
54 simplify([], []).
55 simplify([A|D], [B|E]) :-
56         (   \+try(true, A)
57         ->  B=true
58         ;   builtins:negate_b(A, C),
59             (   \+try(true, C)
60             ->  B=fail
61             ;   B=keep
62             )
63         ),
64         known(A),
65         simplify(D, E).
66 try(A, B) :-
67         (   known(A)
68         ->  true
69         ;   chr_error(internal, 'Entailment Checker: try/2.\n', [])
70         ),
71         (   test(B)
72         ->  fail
73         ;   true
74         ).
75 add_args_unif([], [], true).
76 add_args_unif([A|C], [B|D], (A=B, E)) :-
77         add_args_unif(C, D, E).
78 add_args_nunif([], [], fail).
79 add_args_nunif([A|C], [B|D], (A\=B;E)) :-
80         add_args_nunif(C, D, E).
81 add_args_nmatch([], [], fail).
82 add_args_nmatch([A|C], [B|D], (A\==B;E)) :-
83         add_args_nmatch(C, D, E).
84 all_unique_vars(A, B) :-
85         all_unique_vars(A, B, []).
86 all_unique_vars([], _, _).
87 all_unique_vars([A|D], B, C) :-
88         var(A),
89         \+memberchk_eq(A, B),
90         \+memberchk_eq(A, C),
91         all_unique_vars(D, [A|C]).
92 :- chr_constraint'test/1_1_$default'/1, 'test/1_1_$special_,/2'/2, 'test/1_1_$special_\\+/1'/1, 'test/1_1_$special_integer/1'/1, 'test/1_1_$special_float/1'/1, 'test/1_1_$special_number/1'/1, 'test/1_1_$special_ground/1'/1, 'test/1_1_$special_=:=/2'/2, 'test/1_1_$special_==/2'/2, 'test/1_1_$special_true/0'/0, 'test/1_1_$special_functor/3'/3, 'test/1_1_$special_=/2'/2, 'test/1_1_$special_;/2'/2, 'test/1_1_$special_is/2'/2, 'test/1_1_$special_</2'/2, 'test/1_1_$special_>=/2'/2, 'test/1_1_$special_>/2'/2, 'test/1_1_$special_=\\=/2'/2, 'test/1_1_$special_=</2'/2, 'test/1_1_$special_\\==/2'/2, 'known/1_1_$default'/1, 'known/1_1_$special_;/2'/2, 'known/1_1_$special_nonvar/1'/1, 'known/1_1_$special_var/1'/1, 'known/1_1_$special_atom/1'/1, 'known/1_1_$special_atomic/1'/1, 'known/1_1_$special_compound/1'/1, 'known/1_1_$special_ground/1'/1, 'known/1_1_$special_integer/1'/1, 'known/1_1_$special_float/1'/1, 'known/1_1_$special_number/1'/1, 'known/1_1_$special_=\\=/2'/2, 'known/1_1_$special_\\+/1'/1, 'known/1_1_$special_functor/3'/3, 'known/1_1_$special_\\=/2'/2, 'known/1_1_$special_=/2'/2, 'known/1_1_$special_,/2'/2, 'known/1_1_$special_\\==/2'/2, 'known/1_1_$special_==/2'/2, 'known/1_1_$special_is/2'/2, 'known/1_1_$special_</2'/2, 'known/1_1_$special_>=/2'/2, 'known/1_1_$special_>/2'/2, 'known/1_1_$special_=</2'/2, 'known/1_1_$special_=:=/2'/2, 'known/1_1_$special_fail/0'/0.
93 test((A, B))<=>'test/1_1_$special_,/2'(A, B).
94 test(\+A)<=>'test/1_1_$special_\\+/1'(A).
95 test(integer(A))<=>'test/1_1_$special_integer/1'(A).
96 test(float(A))<=>'test/1_1_$special_float/1'(A).
97 test(number(A))<=>'test/1_1_$special_number/1'(A).
98 test(ground(A))<=>'test/1_1_$special_ground/1'(A).
99 test(A=:=B)<=>'test/1_1_$special_=:=/2'(A, B).
100 test(A==B)<=>'test/1_1_$special_==/2'(A, B).
101 test(true)<=>'test/1_1_$special_true/0'.
102 test(functor(A, B, C))<=>'test/1_1_$special_functor/3'(A, B, C).
103 test(A=B)<=>'test/1_1_$special_=/2'(A, B).
104 test((A;B))<=>'test/1_1_$special_;/2'(A, B).
105 test(A is B)<=>'test/1_1_$special_is/2'(A, B).
106 test(A<B)<=>'test/1_1_$special_</2'(A, B).
107 test(A>=B)<=>'test/1_1_$special_>=/2'(A, B).
108 test(A>B)<=>'test/1_1_$special_>/2'(A, B).
109 test(A=\=B)<=>'test/1_1_$special_=\\=/2'(A, B).
110 test(A=<B)<=>'test/1_1_$special_=</2'(A, B).
111 test(A\==B)<=>'test/1_1_$special_\\==/2'(A, B).
112 test(A)<=>'test/1_1_$default'(A).
113 known((A;B))<=>'known/1_1_$special_;/2'(A, B).
114 known(nonvar(A))<=>'known/1_1_$special_nonvar/1'(A).
115 known(var(A))<=>'known/1_1_$special_var/1'(A).
116 known(atom(A))<=>'known/1_1_$special_atom/1'(A).
117 known(atomic(A))<=>'known/1_1_$special_atomic/1'(A).
118 known(compound(A))<=>'known/1_1_$special_compound/1'(A).
119 known(ground(A))<=>'known/1_1_$special_ground/1'(A).
120 known(integer(A))<=>'known/1_1_$special_integer/1'(A).
121 known(float(A))<=>'known/1_1_$special_float/1'(A).
122 known(number(A))<=>'known/1_1_$special_number/1'(A).
123 known(A=\=B)<=>'known/1_1_$special_=\\=/2'(A, B).
124 known(\+A)<=>'known/1_1_$special_\\+/1'(A).
125 known(functor(A, B, C))<=>'known/1_1_$special_functor/3'(A, B, C).
126 known(A\=B)<=>'known/1_1_$special_\\=/2'(A, B).
127 known(A=B)<=>'known/1_1_$special_=/2'(A, B).
128 known((A, B))<=>'known/1_1_$special_,/2'(A, B).
129 known(A\==B)<=>'known/1_1_$special_\\==/2'(A, B).
130 known(A==B)<=>'known/1_1_$special_==/2'(A, B).
131 known(A is B)<=>'known/1_1_$special_is/2'(A, B).
132 known(A<B)<=>'known/1_1_$special_</2'(A, B).
133 known(A>=B)<=>'known/1_1_$special_>=/2'(A, B).
134 known(A>B)<=>'known/1_1_$special_>/2'(A, B).
135 known(A=<B)<=>'known/1_1_$special_=</2'(A, B).
136 known(A=:=B)<=>'known/1_1_$special_=:=/2'(A, B).
137 known(fail)<=>'known/1_1_$special_fail/0'.
138 known(A)<=>'known/1_1_$default'(A).
139 'known/1_1_$special_;/2'(A, B)\'known/1_1_$special_;/2'(A, B)<=>true.
140 'known/1_1_$special_nonvar/1'(A)\'known/1_1_$special_nonvar/1'(A)<=>true.
141 'known/1_1_$special_var/1'(A)\'known/1_1_$special_var/1'(A)<=>true.
142 'known/1_1_$special_atom/1'(A)\'known/1_1_$special_atom/1'(A)<=>true.
143 'known/1_1_$special_atomic/1'(A)\'known/1_1_$special_atomic/1'(A)<=>true.
144 'known/1_1_$special_compound/1'(A)\'known/1_1_$special_compound/1'(A)<=>true.
145 'known/1_1_$special_ground/1'(A)\'known/1_1_$special_ground/1'(A)<=>true.
146 'known/1_1_$special_integer/1'(A)\'known/1_1_$special_integer/1'(A)<=>true.
147 'known/1_1_$special_float/1'(A)\'known/1_1_$special_float/1'(A)<=>true.
148 'known/1_1_$special_number/1'(A)\'known/1_1_$special_number/1'(A)<=>true.
149 'known/1_1_$special_=\\=/2'(A, B)\'known/1_1_$special_=\\=/2'(A, B)<=>true.
150 'known/1_1_$special_\\+/1'(A)\'known/1_1_$special_\\+/1'(A)<=>true.
151 'known/1_1_$special_functor/3'(A, B, C)\'known/1_1_$special_functor/3'(A, B, C)<=>true.
152 'known/1_1_$special_\\=/2'(A, B)\'known/1_1_$special_\\=/2'(A, B)<=>true.
153 'known/1_1_$special_=/2'(A, B)\'known/1_1_$special_=/2'(A, B)<=>true.
154 'known/1_1_$special_,/2'(A, B)\'known/1_1_$special_,/2'(A, B)<=>true.
155 'known/1_1_$special_\\==/2'(A, B)\'known/1_1_$special_\\==/2'(A, B)<=>true.
156 'known/1_1_$special_==/2'(A, B)\'known/1_1_$special_==/2'(A, B)<=>true.
157 'known/1_1_$special_is/2'(A, B)\'known/1_1_$special_is/2'(A, B)<=>true.
158 'known/1_1_$special_</2'(A, B)\'known/1_1_$special_</2'(A, B)<=>true.
159 'known/1_1_$special_>=/2'(A, B)\'known/1_1_$special_>=/2'(A, B)<=>true.
160 'known/1_1_$special_>/2'(A, B)\'known/1_1_$special_>/2'(A, B)<=>true.
161 'known/1_1_$special_=</2'(A, B)\'known/1_1_$special_=</2'(A, B)<=>true.
162 'known/1_1_$special_=:=/2'(A, B)\'known/1_1_$special_=:=/2'(A, B)<=>true.
163 'known/1_1_$special_fail/0'\'known/1_1_$special_fail/0'<=>true.
164 'known/1_1_$default'(A)\'known/1_1_$default'(A)<=>true.
165 'known/1_1_$special_fail/0'\'test/1_1_$special_,/2'(_, _)<=>true.
166 'known/1_1_$special_fail/0'\'test/1_1_$special_\\+/1'(_)<=>true.
167 'known/1_1_$special_fail/0'\'test/1_1_$special_integer/1'(_)<=>true.
168 'known/1_1_$special_fail/0'\'test/1_1_$special_float/1'(_)<=>true.
169 'known/1_1_$special_fail/0'\'test/1_1_$special_number/1'(_)<=>true.
170 'known/1_1_$special_fail/0'\'test/1_1_$special_ground/1'(_)<=>true.
171 'known/1_1_$special_fail/0'\'test/1_1_$special_=:=/2'(_, _)<=>true.
172 'known/1_1_$special_fail/0'\'test/1_1_$special_==/2'(_, _)<=>true.
173 'known/1_1_$special_fail/0'\'test/1_1_$special_true/0'<=>true.
174 'known/1_1_$special_fail/0'\'test/1_1_$special_functor/3'(_, _, _)<=>true.
175 'known/1_1_$special_fail/0'\'test/1_1_$special_=/2'(_, _)<=>true.
176 'known/1_1_$special_fail/0'\'test/1_1_$special_;/2'(_, _)<=>true.
177 'known/1_1_$special_fail/0'\'test/1_1_$special_is/2'(_, _)<=>true.
178 'known/1_1_$special_fail/0'\'test/1_1_$special_</2'(_, _)<=>true.
179 'known/1_1_$special_fail/0'\'test/1_1_$special_>=/2'(_, _)<=>true.
180 'known/1_1_$special_fail/0'\'test/1_1_$special_>/2'(_, _)<=>true.
181 'known/1_1_$special_fail/0'\'test/1_1_$special_=\\=/2'(_, _)<=>true.
182 'known/1_1_$special_fail/0'\'test/1_1_$special_=</2'(_, _)<=>true.
183 'known/1_1_$special_fail/0'\'test/1_1_$special_\\==/2'(_, _)<=>true.
184 'known/1_1_$special_fail/0'\'test/1_1_$default'(_)<=>true.
185 'known/1_1_$special_;/2'(A, B)\'test/1_1_$special_;/2'(A, B)<=>true.
186 'known/1_1_$special_nonvar/1'(A)\'test/1_1_$default'(nonvar(A))<=>true.
187 'known/1_1_$special_var/1'(A)\'test/1_1_$default'(var(A))<=>true.
188 'known/1_1_$special_atom/1'(A)\'test/1_1_$default'(atom(A))<=>true.
189 'known/1_1_$special_atomic/1'(A)\'test/1_1_$default'(atomic(A))<=>true.
190 'known/1_1_$special_compound/1'(A)\'test/1_1_$default'(compound(A))<=>true.
191 'known/1_1_$special_ground/1'(A)\'test/1_1_$special_ground/1'(A)<=>true.
192 'known/1_1_$special_integer/1'(A)\'test/1_1_$special_integer/1'(A)<=>true.
193 'known/1_1_$special_float/1'(A)\'test/1_1_$special_float/1'(A)<=>true.
194 'known/1_1_$special_number/1'(A)\'test/1_1_$special_number/1'(A)<=>true.
195 'known/1_1_$special_=\\=/2'(A, B)\'test/1_1_$special_=\\=/2'(A, B)<=>true.
196 'known/1_1_$special_\\+/1'(A)\'test/1_1_$special_\\+/1'(A)<=>true.
197 'known/1_1_$special_functor/3'(A, B, C)\'test/1_1_$special_functor/3'(A, B, C)<=>true.
198 'known/1_1_$special_\\=/2'(A, B)\'test/1_1_$default'(A\=B)<=>true.
199 'known/1_1_$special_=/2'(A, B)\'test/1_1_$special_=/2'(A, B)<=>true.
200 'known/1_1_$special_,/2'(A, B)\'test/1_1_$special_,/2'(A, B)<=>true.
201 'known/1_1_$special_\\==/2'(A, B)\'test/1_1_$special_\\==/2'(A, B)<=>true.
202 'known/1_1_$special_==/2'(A, B)\'test/1_1_$special_==/2'(A, B)<=>true.
203 'known/1_1_$special_is/2'(A, B)\'test/1_1_$special_is/2'(A, B)<=>true.
204 'known/1_1_$special_</2'(A, B)\'test/1_1_$special_</2'(A, B)<=>true.
205 'known/1_1_$special_>=/2'(A, B)\'test/1_1_$special_>=/2'(A, B)<=>true.
206 'known/1_1_$special_>/2'(A, B)\'test/1_1_$special_>/2'(A, B)<=>true.
207 'known/1_1_$special_=</2'(A, B)\'test/1_1_$special_=</2'(A, B)<=>true.
208 'known/1_1_$special_=:=/2'(A, B)\'test/1_1_$special_=:=/2'(A, B)<=>true.
209 'known/1_1_$special_fail/0'\'test/1_1_$default'(fail)<=>true.
210 'known/1_1_$default'(A)\'test/1_1_$default'(A)<=>true.
211 'test/1_1_$special_\\==/2'(F, A)<=>nonvar(A), functor(A, C, B)|A=..[_|E], length(D, B), G=..[C|D], add_args_nmatch(D, E, H), I= (\+functor(F, C, B);functor(F, C, B), F=G, H), test(I).
212 'test/1_1_$special_\\==/2'(A, B)<=>nonvar(A)|test(B\==A).
213 'known/1_1_$special_=:=/2'(A, B)\'test/1_1_$special_=</2'(A, B)<=>true.
214 'known/1_1_$special_=:=/2'(A, C)\'test/1_1_$special_=</2'(A, B)<=>number(B), number(C), C=<B|true.
215 'known/1_1_$special_=:=/2'(A, C)\'test/1_1_$special_=</2'(B, A)<=>number(B), number(C), B=<C|true.
216 'known/1_1_$special_=</2'(A, C)\'test/1_1_$special_=</2'(A, B)<=>number(B), number(C), C=<B|true.
217 'known/1_1_$special_=</2'(B, A)\'test/1_1_$special_=</2'(C, A)<=>number(B), number(C), C=<B|true.
218 'known/1_1_$special_=</2'(A, C)\'test/1_1_$special_=\\=/2'(A, B)<=>number(B), number(C), B>C|true.
219 'known/1_1_$special_=</2'(B, A)\'test/1_1_$special_=\\=/2'(A, C)<=>number(B), number(C), C<B|true.
220 'known/1_1_$special_>/2'(B, A)<=>known(A<B).
221 'known/1_1_$special_>=/2'(B, A)<=>known(A=<B).
222 'known/1_1_$special_</2'(A, B)<=>known(A=<B), known(A=\=B).
223 'known/1_1_$special_is/2'(A, B)<=>known(A=:=B).
224 'test/1_1_$special_>/2'(B, A)<=>test(A<B).
225 'test/1_1_$special_>=/2'(B, A)<=>test(A=<B).
226 'test/1_1_$special_</2'(A, B)<=>test((A=<B, A=\=B)).
227 'test/1_1_$special_is/2'(A, B)<=>test(A=:=B).
228 'known/1_1_$special_==/2'(A, B)==>number(A)|known(A=:=B).
229 'known/1_1_$special_==/2'(B, A)==>number(A)|known(B=:=A).
230 'known/1_1_$special_\\==/2'(A, B)==>number(A)|known(A=\=B).
231 'known/1_1_$special_\\==/2'(B, A)==>number(A)|known(B=\=A).
232 'known/1_1_$special_fail/0'\'known/1_1_$special_;/2'(_, _)<=>true.
233 'known/1_1_$special_fail/0'\'known/1_1_$special_nonvar/1'(_)<=>true.
234 'known/1_1_$special_fail/0'\'known/1_1_$special_var/1'(_)<=>true.
235 'known/1_1_$special_fail/0'\'known/1_1_$special_atom/1'(_)<=>true.
236 'known/1_1_$special_fail/0'\'known/1_1_$special_atomic/1'(_)<=>true.
237 'known/1_1_$special_fail/0'\'known/1_1_$special_compound/1'(_)<=>true.
238 'known/1_1_$special_fail/0'\'known/1_1_$special_ground/1'(_)<=>true.
239 'known/1_1_$special_fail/0'\'known/1_1_$special_integer/1'(_)<=>true.
240 'known/1_1_$special_fail/0'\'known/1_1_$special_float/1'(_)<=>true.
241 'known/1_1_$special_fail/0'\'known/1_1_$special_number/1'(_)<=>true.
242 'known/1_1_$special_fail/0'\'known/1_1_$special_=\\=/2'(_, _)<=>true.
243 'known/1_1_$special_fail/0'\'known/1_1_$special_\\+/1'(_)<=>true.
244 'known/1_1_$special_fail/0'\'known/1_1_$special_functor/3'(_, _, _)<=>true.
245 'known/1_1_$special_fail/0'\'known/1_1_$special_\\=/2'(_, _)<=>true.
246 'known/1_1_$special_fail/0'\'known/1_1_$special_=/2'(_, _)<=>true.
247 'known/1_1_$special_fail/0'\'known/1_1_$special_,/2'(_, _)<=>true.
248 'known/1_1_$special_fail/0'\'known/1_1_$special_\\==/2'(_, _)<=>true.
249 'known/1_1_$special_fail/0'\'known/1_1_$special_==/2'(_, _)<=>true.
250 'known/1_1_$special_fail/0'\'known/1_1_$special_is/2'(_, _)<=>true.
251 'known/1_1_$special_fail/0'\'known/1_1_$special_</2'(_, _)<=>true.
252 'known/1_1_$special_fail/0'\'known/1_1_$special_>=/2'(_, _)<=>true.
253 'known/1_1_$special_fail/0'\'known/1_1_$special_>/2'(_, _)<=>true.
254 'known/1_1_$special_fail/0'\'known/1_1_$special_=</2'(_, _)<=>true.
255 'known/1_1_$special_fail/0'\'known/1_1_$special_=:=/2'(_, _)<=>true.
256 'known/1_1_$special_fail/0'\'known/1_1_$special_fail/0'<=>true.
257 'known/1_1_$special_fail/0'\'known/1_1_$default'(_)<=>true.
258 'known/1_1_$special_,/2'(A, B)<=>known(A), known(B).
259 'known/1_1_$special_=:=/2'(A, A)<=>true.
260 'known/1_1_$special_==/2'(A, A)<=>true.
261 'known/1_1_$special_=</2'(A, A)<=>true.
262 'known/1_1_$special_=/2'(A, A)<=>true.
263 'known/1_1_$special_=/2'(A, B)<=>var(A)|A=B.
264 'known/1_1_$special_=/2'(B, A)<=>var(A)|B=A.
265 'known/1_1_$special_\\=/2'(A, B)<=>ground(A), ground(B), A=B|known(fail).
266 variables(E), 'known/1_1_$special_functor/3'(A, B, C)<=>var(A), ground(B), ground(C)|functor(A, B, C), A=..[_|D], append(D, E, F), variables(F).
267 'known/1_1_$special_functor/3'(A, B, C)<=>nonvar(A), \+functor(A, B, C)|known(fail).
268 'known/1_1_$special_\\+/1'(functor(A, B, C))<=>nonvar(A), functor(A, B, C)|known(fail).
269 'known/1_1_$special_functor/3'(A, B, C), 'known/1_1_$special_functor/3'(A, D, E)<=>nonvar(B), nonvar(C), nonvar(D), nonvar(E)|known(fail).
270 'known/1_1_$special_\\=/2'(A, A)<=>known(fail).
271 'known/1_1_$special_=/2'(A, B)<=>nonvar(A), nonvar(B), functor(A, C, D)|functor(B, C, D), A=B->true;known(fail).
272 'known/1_1_$special_\\=/2'(A, B)<=>var(A), nonvar(B), functor(B, D, C), C>0|length(E, C), B=..[D|F], G=..[D|E], add_args_nunif(F, E, H), I= (\+functor(A, D, C);A=G, H), known(I).
273 'known/1_1_$special_\\=/2'(A, B)<=>nonvar(A), nonvar(B), functor(A, C, D)|functor(B, C, D)->A=..[C|E], B=..[C|F], add_args_nunif(E, F, G), known(G);true.
274 'known/1_1_$special_\\=/2'(B, A)==>known(A\=B).
275 'known/1_1_$special_=</2'(A, B)<=>number(A), number(B), A>B|known(fail).
276 'known/1_1_$special_=</2'(A, B)\'known/1_1_$special_=</2'(A, C)<=>number(B), number(C), B=<C|true.
277 'known/1_1_$special_=</2'(C, A)\'known/1_1_$special_=</2'(B, A)<=>number(B), number(C), B=<C|true.
278 'known/1_1_$special_=</2'(B, A), 'known/1_1_$special_=</2'(A, B)<=>known(B=:=A).
279 'known/1_1_$special_=</2'(B, A), 'known/1_1_$special_=</2'(A, C)==>known(B=<C).
280 'known/1_1_$special_=</2'(A, B), 'known/1_1_$special_=\\=/2'(A, B), 'known/1_1_$special_=</2'(B, C), 'known/1_1_$special_=\\=/2'(B, C)==>known(A=\=C).
281 'known/1_1_$special_=:=/2'(A, B)<=>number(A), number(B), A=\=B|known(fail).
282 'known/1_1_$special_=\\=/2'(A, B)<=>number(A), number(B), A=:=B|known(fail).
283 'known/1_1_$special_=\\=/2'(A, A)<=>known(fail).
284 'known/1_1_$special_=:=/2'(A, B), 'known/1_1_$special_=\\=/2'(A, B)<=>known(fail).
285 'known/1_1_$special_=:=/2'(B, A), 'known/1_1_$special_=:=/2'(A, C)==>B\==C|known(B=:=C).
286 'known/1_1_$special_=:=/2'(B, A)==>known(A=:=B).
287 'known/1_1_$special_=\\=/2'(B, A)==>known(A=\=B).
288 'known/1_1_$special_number/1'(A)<=>nonvar(A), \+number(A)|known(fail).
289 'known/1_1_$special_float/1'(A)<=>nonvar(A), \+float(A)|known(fail).
290 'known/1_1_$special_integer/1'(A)<=>nonvar(A), \+integer(A)|known(fail).
291 'known/1_1_$special_integer/1'(A)==>known(number(A)).
292 'known/1_1_$special_float/1'(A)==>known(number(A)).
293 'known/1_1_$special_;/2'(A, B), 'known/1_1_$special_\\+/1'((A;B))<=>known(fail).
294 'known/1_1_$special_nonvar/1'(A), 'known/1_1_$special_\\+/1'(nonvar(A))<=>known(fail).
295 'known/1_1_$special_var/1'(A), 'known/1_1_$special_\\+/1'(var(A))<=>known(fail).
296 'known/1_1_$special_atom/1'(A), 'known/1_1_$special_\\+/1'(atom(A))<=>known(fail).
297 'known/1_1_$special_atomic/1'(A), 'known/1_1_$special_\\+/1'(atomic(A))<=>known(fail).
298 'known/1_1_$special_compound/1'(A), 'known/1_1_$special_\\+/1'(compound(A))<=>known(fail).
299 'known/1_1_$special_ground/1'(A), 'known/1_1_$special_\\+/1'(ground(A))<=>known(fail).
300 'known/1_1_$special_integer/1'(A), 'known/1_1_$special_\\+/1'(integer(A))<=>known(fail).
301 'known/1_1_$special_float/1'(A), 'known/1_1_$special_\\+/1'(float(A))<=>known(fail).
302 'known/1_1_$special_number/1'(A), 'known/1_1_$special_\\+/1'(number(A))<=>known(fail).
303 'known/1_1_$special_=\\=/2'(A, B), 'known/1_1_$special_\\+/1'(A=\=B)<=>known(fail).
304 'known/1_1_$special_\\+/1'(A), 'known/1_1_$special_\\+/1'(\+A)<=>known(fail).
305 'known/1_1_$special_functor/3'(A, B, C), 'known/1_1_$special_\\+/1'(functor(A, B, C))<=>known(fail).
306 'known/1_1_$special_\\=/2'(A, B), 'known/1_1_$special_\\+/1'(A\=B)<=>known(fail).
307 'known/1_1_$special_=/2'(A, B), 'known/1_1_$special_\\+/1'(A=B)<=>known(fail).
308 'known/1_1_$special_,/2'(A, B), 'known/1_1_$special_\\+/1'((A, B))<=>known(fail).
309 'known/1_1_$special_\\==/2'(A, B), 'known/1_1_$special_\\+/1'(A\==B)<=>known(fail).
310 'known/1_1_$special_==/2'(A, B), 'known/1_1_$special_\\+/1'(A==B)<=>known(fail).
311 'known/1_1_$special_is/2'(A, B), 'known/1_1_$special_\\+/1'(A is B)<=>known(fail).
312 'known/1_1_$special_</2'(A, B), 'known/1_1_$special_\\+/1'(A<B)<=>known(fail).
313 'known/1_1_$special_>=/2'(A, B), 'known/1_1_$special_\\+/1'(A>=B)<=>known(fail).
314 'known/1_1_$special_>/2'(A, B), 'known/1_1_$special_\\+/1'(A>B)<=>known(fail).
315 'known/1_1_$special_=</2'(A, B), 'known/1_1_$special_\\+/1'(A=<B)<=>known(fail).
316 'known/1_1_$special_=:=/2'(A, B), 'known/1_1_$special_\\+/1'(A=:=B)<=>known(fail).
317 'known/1_1_$special_fail/0', 'known/1_1_$special_\\+/1'(fail)<=>known(fail).
318 'known/1_1_$default'(A), 'known/1_1_$special_\\+/1'(A)<=>known(fail).
319 'known/1_1_$special_\\==/2'(A, B), 'known/1_1_$special_==/2'(A, B)<=>known(fail).
320 'known/1_1_$special_==/2'(B, A), 'known/1_1_$special_==/2'(A, C)==>known(B==C).
321 'known/1_1_$special_==/2'(B, A), 'known/1_1_$special_\\==/2'(A, C)==>known(B\==C).
322 'known/1_1_$special_==/2'(B, A)==>known(A==B).
323 'known/1_1_$special_\\==/2'(B, A)==>known(A\==B).
324 'known/1_1_$special_\\==/2'(A, A)==>known(fail).
325 'known/1_1_$special_\\==/2'(A, B)<=>nonvar(A), nonvar(B), functor(A, C, D)|functor(B, C, D)->A=..[C|E], B=..[C|F], add_args_nmatch(E, F, G), known(G);true.
326 'known/1_1_$special_==/2'(A, B)==>known(A=B).
327 'known/1_1_$special_ground/1'(A)==>known(nonvar(A)).
328 'known/1_1_$special_compound/1'(A)==>known(nonvar(A)).
329 'known/1_1_$special_atomic/1'(A)==>known(nonvar(A)).
330 'known/1_1_$special_number/1'(A)==>known(nonvar(A)).
331 'known/1_1_$special_atom/1'(A)==>known(nonvar(A)).
332 'known/1_1_$special_var/1'(A), 'known/1_1_$special_nonvar/1'(A)<=>known(fail).
333 'known/1_1_$special_;/2'(A, B)\'known/1_1_$special_;/2'(\+ (A;B), C)<=>known(C).
334 'known/1_1_$special_nonvar/1'(A)\'known/1_1_$special_;/2'(\+nonvar(A), B)<=>known(B).
335 'known/1_1_$special_var/1'(A)\'known/1_1_$special_;/2'(\+var(A), B)<=>known(B).
336 'known/1_1_$special_atom/1'(A)\'known/1_1_$special_;/2'(\+atom(A), B)<=>known(B).
337 'known/1_1_$special_atomic/1'(A)\'known/1_1_$special_;/2'(\+atomic(A), B)<=>known(B).
338 'known/1_1_$special_compound/1'(A)\'known/1_1_$special_;/2'(\+compound(A), B)<=>known(B).
339 'known/1_1_$special_ground/1'(A)\'known/1_1_$special_;/2'(\+ground(A), B)<=>known(B).
340 'known/1_1_$special_integer/1'(A)\'known/1_1_$special_;/2'(\+integer(A), B)<=>known(B).
341 'known/1_1_$special_float/1'(A)\'known/1_1_$special_;/2'(\+float(A), B)<=>known(B).
342 'known/1_1_$special_number/1'(A)\'known/1_1_$special_;/2'(\+number(A), B)<=>known(B).
343 'known/1_1_$special_=\\=/2'(A, B)\'known/1_1_$special_;/2'(\+A=\=B, C)<=>known(C).
344 'known/1_1_$special_\\+/1'(A)\'known/1_1_$special_;/2'(\+ \+A, B)<=>known(B).
345 'known/1_1_$special_functor/3'(A, B, C)\'known/1_1_$special_;/2'(\+functor(A, B, C), D)<=>known(D).
346 'known/1_1_$special_\\=/2'(A, B)\'known/1_1_$special_;/2'(\+A\=B, C)<=>known(C).
347 'known/1_1_$special_=/2'(A, B)\'known/1_1_$special_;/2'(\+A=B, C)<=>known(C).
348 'known/1_1_$special_,/2'(A, B)\'known/1_1_$special_;/2'(\+ (A, B), C)<=>known(C).
349 'known/1_1_$special_\\==/2'(A, B)\'known/1_1_$special_;/2'(\+A\==B, C)<=>known(C).
350 'known/1_1_$special_==/2'(A, B)\'known/1_1_$special_;/2'(\+A==B, C)<=>known(C).
351 'known/1_1_$special_is/2'(A, B)\'known/1_1_$special_;/2'(\+A is B, C)<=>known(C).
352 'known/1_1_$special_</2'(A, B)\'known/1_1_$special_;/2'(\+A<B, C)<=>known(C).
353 'known/1_1_$special_>=/2'(A, B)\'known/1_1_$special_;/2'(\+A>=B, C)<=>known(C).
354 'known/1_1_$special_>/2'(A, B)\'known/1_1_$special_;/2'(\+A>B, C)<=>known(C).
355 'known/1_1_$special_=</2'(A, B)\'known/1_1_$special_;/2'(\+A=<B, C)<=>known(C).
356 'known/1_1_$special_=:=/2'(A, B)\'known/1_1_$special_;/2'(\+A=:=B, C)<=>known(C).
357 'known/1_1_$special_fail/0'\'known/1_1_$special_;/2'(\+fail, A)<=>known(A).
358 'known/1_1_$default'(A)\'known/1_1_$special_;/2'(\+A, B)<=>known(B).
359 'known/1_1_$special_;/2'(A, B)\'known/1_1_$special_;/2'((\+ (A;B), _), C)<=>known(C).
360 'known/1_1_$special_nonvar/1'(A)\'known/1_1_$special_;/2'((\+nonvar(A), _), B)<=>known(B).
361 'known/1_1_$special_var/1'(A)\'known/1_1_$special_;/2'((\+var(A), _), B)<=>known(B).
362 'known/1_1_$special_atom/1'(A)\'known/1_1_$special_;/2'((\+atom(A), _), B)<=>known(B).
363 'known/1_1_$special_atomic/1'(A)\'known/1_1_$special_;/2'((\+atomic(A), _), B)<=>known(B).
364 'known/1_1_$special_compound/1'(A)\'known/1_1_$special_;/2'((\+compound(A), _), B)<=>known(B).
365 'known/1_1_$special_ground/1'(A)\'known/1_1_$special_;/2'((\+ground(A), _), B)<=>known(B).
366 'known/1_1_$special_integer/1'(A)\'known/1_1_$special_;/2'((\+integer(A), _), B)<=>known(B).
367 'known/1_1_$special_float/1'(A)\'known/1_1_$special_;/2'((\+float(A), _), B)<=>known(B).
368 'known/1_1_$special_number/1'(A)\'known/1_1_$special_;/2'((\+number(A), _), B)<=>known(B).
369 'known/1_1_$special_=\\=/2'(A, B)\'known/1_1_$special_;/2'((\+A=\=B, _), C)<=>known(C).
370 'known/1_1_$special_\\+/1'(A)\'known/1_1_$special_;/2'((\+ \+A, _), B)<=>known(B).
371 'known/1_1_$special_functor/3'(A, B, C)\'known/1_1_$special_;/2'((\+functor(A, B, C), _), D)<=>known(D).
372 'known/1_1_$special_\\=/2'(A, B)\'known/1_1_$special_;/2'((\+A\=B, _), C)<=>known(C).
373 'known/1_1_$special_=/2'(A, B)\'known/1_1_$special_;/2'((\+A=B, _), C)<=>known(C).
374 'known/1_1_$special_,/2'(A, B)\'known/1_1_$special_;/2'((\+ (A, B), _), C)<=>known(C).
375 'known/1_1_$special_\\==/2'(A, B)\'known/1_1_$special_;/2'((\+A\==B, _), C)<=>known(C).
376 'known/1_1_$special_==/2'(A, B)\'known/1_1_$special_;/2'((\+A==B, _), C)<=>known(C).
377 'known/1_1_$special_is/2'(A, B)\'known/1_1_$special_;/2'((\+A is B, _), C)<=>known(C).
378 'known/1_1_$special_</2'(A, B)\'known/1_1_$special_;/2'((\+A<B, _), C)<=>known(C).
379 'known/1_1_$special_>=/2'(A, B)\'known/1_1_$special_;/2'((\+A>=B, _), C)<=>known(C).
380 'known/1_1_$special_>/2'(A, B)\'known/1_1_$special_;/2'((\+A>B, _), C)<=>known(C).
381 'known/1_1_$special_=</2'(A, B)\'known/1_1_$special_;/2'((\+A=<B, _), C)<=>known(C).
382 'known/1_1_$special_=:=/2'(A, B)\'known/1_1_$special_;/2'((\+A=:=B, _), C)<=>known(C).
383 'known/1_1_$special_fail/0'\'known/1_1_$special_;/2'((\+fail, _), A)<=>known(A).
384 'known/1_1_$default'(A)\'known/1_1_$special_;/2'((\+A, _), B)<=>known(B).
385 'known/1_1_$special_\\+/1'(A)\'known/1_1_$special_;/2'(A, B)<=>known(B).
386 'known/1_1_$special_\\+/1'(A)\'known/1_1_$special_;/2'((A, _), B)<=>known(B).
387 'known/1_1_$special_;/2'(fail, A)<=>known(A).
388 'known/1_1_$special_;/2'(A, fail)<=>known(A).
389 'known/1_1_$special_;/2'(true, _)<=>true.
390 'known/1_1_$special_;/2'(_, true)<=>true.
391 'known/1_1_$special_functor/3'(A, _, _)\'known/1_1_$special_;/2'(\+functor(A, _, _), _)<=>true.
392 'known/1_1_$special_;/2'(\+functor(A, B, C), D)<=>nonvar(A), functor(A, B, C)|known(D).
393 'known/1_1_$special_;/2'(\+functor(A, B, C), _)<=>nonvar(A), \+functor(A, B, C)|true.
394 'test/1_1_$special_;/2'(fail, A)<=>test(A).
395 'test/1_1_$special_;/2'(A, fail)<=>test(A).
396 'test/1_1_$special_=/2'(A, B)<=>A=B|A=B.
397 'test/1_1_$special_=/2'(A, B)<=>ground(A), ground(B)|A=B.
398 'test/1_1_$special_=/2'(A, B)<=>nonvar(A), var(B)|test(B=A).
399 variables(F)\'test/1_1_$special_=/2'(A, B)<=>var(A), nonvar(B), functor(B, D, C), C>0, B=..[D|E], \+all_unique_vars(E, F)|G= (functor(A, D, C), A=B), test(G).
400 'test/1_1_$special_=/2'(A, B)<=>var(A), nonvar(B), functor(B, C, D), B=..[C|_]|E=functor(A, C, D), test(E).
401 'test/1_1_$special_=/2'(A, B)<=>nonvar(A), nonvar(B), functor(B, C, D), B=..[C|F]|functor(A, C, D), A=..[C|E], add_args_unif(E, F, G), test(G).
402 variables(D)\'test/1_1_$special_functor/3'(A, B, C)<=>var(A), ground(B), ground(C), \+memberchk_eq(A, D)|functor(A, B, C).
403 'test/1_1_$special_true/0'<=>true.
404 'test/1_1_$special_==/2'(A, B)<=>A==B|true.
405 'test/1_1_$special_=:=/2'(A, B)<=>A==B|true.
406 'test/1_1_$special_=</2'(A, B)<=>A==B|true.
407 'test/1_1_$special_=</2'(A, B)<=>ground(A), ground(B), A=<B|true.
408 'test/1_1_$special_=</2'(A, B)<=>ground(A), ground(B), A>B|fail.
409 'test/1_1_$special_=:=/2'(A, B)<=>ground(A), ground(B), A=:=B|true.
410 'test/1_1_$special_=:=/2'(A, B)<=>ground(A), ground(B), A=\=B|fail.
411 'test/1_1_$special_=\\=/2'(A, B)<=>ground(A), ground(B), A=\=B|true.
412 'test/1_1_$special_=\\=/2'(A, B)<=>ground(A), ground(B), A=:=B|fail.
413 'test/1_1_$special_functor/3'(A, B, C)<=>nonvar(A), functor(A, B, C)|true.
414 'test/1_1_$special_functor/3'(A, _, _)<=>nonvar(A)|fail.
415 'test/1_1_$special_ground/1'(A)<=>ground(A)|true.
416 'test/1_1_$special_number/1'(A)<=>number(A)|true.
417 'test/1_1_$special_float/1'(A)<=>float(A)|true.
418 'test/1_1_$special_integer/1'(A)<=>integer(A)|true.
419 'test/1_1_$special_number/1'(A)<=>nonvar(A)|fail.
420 'test/1_1_$special_float/1'(A)<=>nonvar(A)|fail.
421 'test/1_1_$special_integer/1'(A)<=>nonvar(A)|fail.
422 'test/1_1_$special_\\+/1'(functor(A, B, C))<=>nonvar(A), functor(A, B, C)|fail.
423 'test/1_1_$special_\\+/1'(functor(A, _, _))<=>nonvar(A)|true.
424 'test/1_1_$special_\\+/1'(ground(A))<=>ground(A)|fail.
425 'test/1_1_$special_\\+/1'(number(A))<=>number(A)|fail.
426 'test/1_1_$special_\\+/1'(float(A))<=>float(A)|fail.
427 'test/1_1_$special_\\+/1'(integer(A))<=>integer(A)|fail.
428 'test/1_1_$special_\\+/1'(number(A))<=>nonvar(A)|true.
429 'test/1_1_$special_\\+/1'(float(A))<=>nonvar(A)|true.
430 'test/1_1_$special_\\+/1'(integer(A))<=>nonvar(A)|true.
431 'test/1_1_$special_,/2'(A, B)<=>test(A), known(A), test(B).
432 'test/1_1_$special_;/2'(A, B)<=>true|negate_b(A, D), negate_b(B, C), (known(C), test(A);known(D), test(B)).
433 'test/1_1_$special_,/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, (B, C)), !, negate_b(A, D), known(D), \+try(E, (B, C)).
434 'test/1_1_$special_\\+/1'(B), 'known/1_1_$special_;/2'(A, D)<=>true|\+try(A, \+B), !, negate_b(A, C), known(C), \+try(D, \+B).
435 'test/1_1_$special_integer/1'(B), 'known/1_1_$special_;/2'(A, D)<=>true|\+try(A, integer(B)), !, negate_b(A, C), known(C), \+try(D, integer(B)).
436 'test/1_1_$special_float/1'(B), 'known/1_1_$special_;/2'(A, D)<=>true|\+try(A, float(B)), !, negate_b(A, C), known(C), \+try(D, float(B)).
437 'test/1_1_$special_number/1'(B), 'known/1_1_$special_;/2'(A, D)<=>true|\+try(A, number(B)), !, negate_b(A, C), known(C), \+try(D, number(B)).
438 'test/1_1_$special_ground/1'(B), 'known/1_1_$special_;/2'(A, D)<=>true|\+try(A, ground(B)), !, negate_b(A, C), known(C), \+try(D, ground(B)).
439 'test/1_1_$special_=:=/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B=:=C), !, negate_b(A, D), known(D), \+try(E, B=:=C).
440 'test/1_1_$special_==/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B==C), !, negate_b(A, D), known(D), \+try(E, B==C).
441 'test/1_1_$special_true/0', 'known/1_1_$special_;/2'(A, C)<=>true|\+try(A, true), !, negate_b(A, B), known(B), \+try(C, true).
442 'test/1_1_$special_functor/3'(B, C, D), 'known/1_1_$special_;/2'(A, F)<=>true|\+try(A, functor(B, C, D)), !, negate_b(A, E), known(E), \+try(F, functor(B, C, D)).
443 'test/1_1_$special_=/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B=C), !, negate_b(A, D), known(D), \+try(E, B=C).
444 'test/1_1_$special_;/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, (B;C)), !, negate_b(A, D), known(D), \+try(E, (B;C)).
445 'test/1_1_$special_is/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B is C), !, negate_b(A, D), known(D), \+try(E, B is C).
446 'test/1_1_$special_</2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B<C), !, negate_b(A, D), known(D), \+try(E, B<C).
447 'test/1_1_$special_>=/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B>=C), !, negate_b(A, D), known(D), \+try(E, B>=C).
448 'test/1_1_$special_>/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B>C), !, negate_b(A, D), known(D), \+try(E, B>C).
449 'test/1_1_$special_=\\=/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B=\=C), !, negate_b(A, D), known(D), \+try(E, B=\=C).
450 'test/1_1_$special_=</2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B=<C), !, negate_b(A, D), known(D), \+try(E, B=<C).
451 'test/1_1_$special_\\==/2'(B, C), 'known/1_1_$special_;/2'(A, E)<=>true|\+try(A, B\==C), !, negate_b(A, D), known(D), \+try(E, B\==C).
452 'test/1_1_$default'(B), 'known/1_1_$special_;/2'(A, D)<=>true|\+try(A, B), !, negate_b(A, C), known(C), \+try(D, B).
453 'test/1_1_$special_,/2'(_, _)<=>fail.
454 'test/1_1_$special_\\+/1'(_)<=>fail.
455 'test/1_1_$special_integer/1'(_)<=>fail.
456 'test/1_1_$special_float/1'(_)<=>fail.
457 'test/1_1_$special_number/1'(_)<=>fail.
458 'test/1_1_$special_ground/1'(_)<=>fail.
459 'test/1_1_$special_=:=/2'(_, _)<=>fail.
460 'test/1_1_$special_==/2'(_, _)<=>fail.
461 'test/1_1_$special_true/0'<=>fail.
462 'test/1_1_$special_functor/3'(_, _, _)<=>fail.
463 'test/1_1_$special_=/2'(_, _)<=>fail.
464 'test/1_1_$special_;/2'(_, _)<=>fail.
465 'test/1_1_$special_is/2'(_, _)<=>fail.
466 'test/1_1_$special_</2'(_, _)<=>fail.
467 'test/1_1_$special_>=/2'(_, _)<=>fail.
468 'test/1_1_$special_>/2'(_, _)<=>fail.
469 'test/1_1_$special_=\\=/2'(_, _)<=>fail.
470 'test/1_1_$special_=</2'(_, _)<=>fail.
471 'test/1_1_$special_\\==/2'(_, _)<=>fail.
472 'test/1_1_$default'(_)<=>fail.
473 cleanup\'known/1_1_$special_;/2'(_, _)<=>true.
474 cleanup\'known/1_1_$special_nonvar/1'(_)<=>true.
475 cleanup\'known/1_1_$special_var/1'(_)<=>true.
476 cleanup\'known/1_1_$special_atom/1'(_)<=>true.
477 cleanup\'known/1_1_$special_atomic/1'(_)<=>true.
478 cleanup\'known/1_1_$special_compound/1'(_)<=>true.
479 cleanup\'known/1_1_$special_ground/1'(_)<=>true.
480 cleanup\'known/1_1_$special_integer/1'(_)<=>true.
481 cleanup\'known/1_1_$special_float/1'(_)<=>true.
482 cleanup\'known/1_1_$special_number/1'(_)<=>true.
483 cleanup\'known/1_1_$special_=\\=/2'(_, _)<=>true.
484 cleanup\'known/1_1_$special_\\+/1'(_)<=>true.
485 cleanup\'known/1_1_$special_functor/3'(_, _, _)<=>true.
486 cleanup\'known/1_1_$special_\\=/2'(_, _)<=>true.
487 cleanup\'known/1_1_$special_=/2'(_, _)<=>true.
488 cleanup\'known/1_1_$special_,/2'(_, _)<=>true.
489 cleanup\'known/1_1_$special_\\==/2'(_, _)<=>true.
490 cleanup\'known/1_1_$special_==/2'(_, _)<=>true.
491 cleanup\'known/1_1_$special_is/2'(_, _)<=>true.
492 cleanup\'known/1_1_$special_</2'(_, _)<=>true.
493 cleanup\'known/1_1_$special_>=/2'(_, _)<=>true.
494 cleanup\'known/1_1_$special_>/2'(_, _)<=>true.
495 cleanup\'known/1_1_$special_=</2'(_, _)<=>true.
496 cleanup\'known/1_1_$special_=:=/2'(_, _)<=>true.
497 cleanup\'known/1_1_$special_fail/0'<=>true.
498 cleanup\'known/1_1_$default'(_)<=>true.
499 cleanup\variables(_)<=>true.
500 cleanup<=>true.