xmt-lib 0.1.2

A grounder for SMT solvers
Documentation
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
(set-option :backend none)
(declare-datatype Node ( ( |1| ) ( |2| ) ( |3| )))
(declare-fun Edge (Node Node) Bool)
(declare-fun phi (Node Node Node) Bool)
(x-interpret-pred Edge
  (x-set
    (|1| |2|)
    (|2| |3|)
    (|1| |3|)
  )
)
(assert (forall ((x Node) (y Node) (z Node))
            (=> (and (Edge x y) (Edge y z) (Edge x z))
                (phi x y z)
            )))
(assert (forall ((x Node)) (Edge x x)))
(assert (exists ((x Node) (y Node)) (Edge x y)))
(x-ground)
(x-debug solver groundings)
(check-sat)
------- RESULTS ------------------
(declare-datatype Node ((|1|) (|2|) (|3|)))
(declare-fun Edge (Node Node) Bool)
(declare-fun phi (Node Node Node) Bool)
(assert (phi |1| |2| |3|))
(assert false)
Groundings:
===  x ======================================
 -- Join(0)
SELECT _xmt_sort_node.G AS x,
       _xmt_sort_node.G AS G
  FROM _xmt_sort_node
===  y ======================================
 -- Join(0)
SELECT _xmt_sort_node_1.G AS y,
       _xmt_sort_node_1.G AS G
  FROM _xmt_sort_node AS _xmt_sort_node_1
===  (Edge x y) ======================================
----- T ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_2.a_1 AS x,
       _xmt_interp_edge_TU_2.a_2 AS y,
       "true" AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
----- F ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_UF_2.a_1 AS x,
       _xmt_interp_edge_UF_2.a_2 AS y,
       "false" AS G
  FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_2
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_2.a_1 AS x,
       _xmt_interp_edge_G_2.a_2 AS y,
       _xmt_interp_edge_G_2.G AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_2

===  (not (Edge x y)) ======================================
----- T ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_UF_2.a_1 AS x,
       _xmt_interp_edge_UF_2.a_2 AS y,
       "true" AS G
  FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_2
----- F ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_2.a_1 AS x,
       _xmt_interp_edge_TU_2.a_2 AS y,
       "false" AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_2.a_1 AS x,
       _xmt_interp_edge_G_2.a_2 AS y,
       not_(_xmt_interp_edge_G_2.G) AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_2

===  z ======================================
 -- Join(0)
SELECT _xmt_sort_node_4.G AS z,
       _xmt_sort_node_4.G AS G
  FROM _xmt_sort_node AS _xmt_sort_node_4
===  (Edge y z) ======================================
----- T ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_5.a_1 AS y,
       _xmt_interp_edge_TU_5.a_2 AS z,
       "true" AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
----- F ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_UF_5.a_1 AS y,
       _xmt_interp_edge_UF_5.a_2 AS z,
       "false" AS G
  FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_5
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_5.a_1 AS y,
       _xmt_interp_edge_G_5.a_2 AS z,
       _xmt_interp_edge_G_5.G AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_5

===  (not (Edge y z)) ======================================
----- T ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_UF_5.a_1 AS y,
       _xmt_interp_edge_UF_5.a_2 AS z,
       "true" AS G
  FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_5
----- F ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_5.a_1 AS y,
       _xmt_interp_edge_TU_5.a_2 AS z,
       "false" AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_5.a_1 AS y,
       _xmt_interp_edge_G_5.a_2 AS z,
       not_(_xmt_interp_edge_G_5.G) AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_5

===  (Edge x z) ======================================
----- T ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_7.a_1 AS x,
       _xmt_interp_edge_TU_7.a_2 AS z,
       "true" AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
----- F ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_UF_7.a_1 AS x,
       _xmt_interp_edge_UF_7.a_2 AS z,
       "false" AS G
  FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_7
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_7.a_1 AS x,
       _xmt_interp_edge_G_7.a_2 AS z,
       _xmt_interp_edge_G_7.G AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_7

===  (not (Edge x z)) ======================================
----- T ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_UF_7.a_1 AS x,
       _xmt_interp_edge_UF_7.a_2 AS z,
       "true" AS G
  FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_7
----- F ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_7.a_1 AS x,
       _xmt_interp_edge_TU_7.a_2 AS z,
       "false" AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_7.a_1 AS x,
       _xmt_interp_edge_G_7.a_2 AS z,
       not_(_xmt_interp_edge_G_7.G) AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_7

===  (phi x y z) ======================================
----- TU -----------------------------------------------------------
-- Join(0)
SELECT _xmt_sort_node.G AS x,
       _xmt_sort_node_1.G AS y,
       _xmt_sort_node_4.G AS z,
       apply("phi", _xmt_sort_node.G, _xmt_sort_node_1.G, _xmt_sort_node_4.G) AS G
  FROM _xmt_sort_node
  JOIN _xmt_sort_node AS _xmt_sort_node_1
  JOIN _xmt_sort_node AS _xmt_sort_node_4
----- UF -----------------------------------------------------------
-- Join(0)
SELECT _xmt_sort_node.G AS x,
       _xmt_sort_node_1.G AS y,
       _xmt_sort_node_4.G AS z,
       apply("phi", _xmt_sort_node.G, _xmt_sort_node_1.G, _xmt_sort_node_4.G) AS G
  FROM _xmt_sort_node
  JOIN _xmt_sort_node AS _xmt_sort_node_1
  JOIN _xmt_sort_node AS _xmt_sort_node_4
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_sort_node.G AS x,
       _xmt_sort_node_1.G AS y,
       _xmt_sort_node_4.G AS z,
       apply("phi", _xmt_sort_node.G, _xmt_sort_node_1.G, _xmt_sort_node_4.G) AS G
  FROM _xmt_sort_node
  JOIN _xmt_sort_node AS _xmt_sort_node_1
  JOIN _xmt_sort_node AS _xmt_sort_node_4

===  (or (not (Edge x y)) (not (Edge y z)) (not (Edge x z)) (phi x y z)) ======================================
----- T ------------------------------------------------------------
-- Agg (0)
SELECT x, y, z,
       or_aggregate(G) as G
 FROM (-- exclude(7)
       SELECT *
        FROM (-- Join(14)
              SELECT negate_3_UF.x AS x,
                     negate_3_UF.y AS y,
                     _xmt_sort_node_4.G AS z,
                     negate_3_UF.G AS G
                FROM (-- Join(22)
                      SELECT _xmt_interp_edge_UF_2.a_1 AS x,
                             _xmt_interp_edge_UF_2.a_2 AS y,
                             "true" AS G
                        FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_2
                      ) AS negate_3_UF
                JOIN _xmt_sort_node AS _xmt_sort_node_4
              UNION ALL
              -- Join(14)
              SELECT _xmt_sort_node.G AS x,
                     negate_6_UF.y AS y,
                     negate_6_UF.z AS z,
                     negate_6_UF.G AS G
                FROM (-- Join(22)
                      SELECT _xmt_interp_edge_UF_5.a_1 AS y,
                             _xmt_interp_edge_UF_5.a_2 AS z,
                             "true" AS G
                        FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_5
                      ) AS negate_6_UF
                JOIN _xmt_sort_node
              UNION ALL
              -- Join(14)
              SELECT negate_8_UF.x AS x,
                     _xmt_sort_node_1.G AS y,
                     negate_8_UF.z AS z,
                     negate_8_UF.G AS G
                FROM (-- Join(22)
                      SELECT _xmt_interp_edge_UF_7.a_1 AS x,
                             _xmt_interp_edge_UF_7.a_2 AS z,
                             "true" AS G
                        FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_7
                      ) AS negate_8_UF
                JOIN _xmt_sort_node AS _xmt_sort_node_1
              UNION ALL
              -- Join(14)
              SELECT _xmt_sort_node.G AS x,
                     _xmt_sort_node_1.G AS y,
                     _xmt_sort_node_4.G AS z,
                     apply("phi", _xmt_sort_node.G, _xmt_sort_node_1.G, _xmt_sort_node_4.G) AS G
                FROM _xmt_sort_node
                JOIN _xmt_sort_node AS _xmt_sort_node_1
                JOIN _xmt_sort_node AS _xmt_sort_node_4)
        WHERE G <> "false")
 GROUP BY x, y, z
----- UF -----------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_2.a_1 AS x,
       _xmt_interp_edge_TU_2.a_2 AS y,
       _xmt_interp_edge_TU_5.a_2 AS z,
       apply("phi", _xmt_interp_edge_TU_2.a_1, _xmt_interp_edge_TU_2.a_2, _xmt_interp_edge_TU_5.a_2) AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
  JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
        ON _xmt_interp_edge_TU_2.a_2 = _xmt_interp_edge_TU_5.a_1
  JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
        ON _xmt_interp_edge_TU_2.a_1 = _xmt_interp_edge_TU_7.a_1 
       AND _xmt_interp_edge_TU_5.a_2 = _xmt_interp_edge_TU_7.a_2
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_2.a_1 AS x,
       _xmt_interp_edge_G_2.a_2 AS y,
       _xmt_interp_edge_G_5.a_2 AS z,
       or_(not_(_xmt_interp_edge_G_2.G), not_(_xmt_interp_edge_G_5.G), not_(_xmt_interp_edge_G_7.G), apply("phi", _xmt_interp_edge_G_2.a_1, _xmt_interp_edge_G_2.a_2, _xmt_interp_edge_G_5.a_2)) AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_2
  JOIN _xmt_interp_edge_G AS _xmt_interp_edge_G_5
        ON _xmt_interp_edge_G_2.a_2 = _xmt_interp_edge_G_5.a_1
  JOIN _xmt_interp_edge_G AS _xmt_interp_edge_G_7
        ON _xmt_interp_edge_G_2.a_1 = _xmt_interp_edge_G_7.a_1 
       AND _xmt_interp_edge_G_5.a_2 = _xmt_interp_edge_G_7.a_2

=== (top) (forall ((x Node) (y Node) (z Node)) (or (not (Edge x y)) (not (Edge y z)) (not (Edge x z)) (phi x y z))) ======================================
----- TU -----------------------------------------------------------
-- Agg (0)
SELECT and_aggregate(G) as G
 FROM (SELECT NULL AS x, NULL AS y, NULL AS z, "true" AS G 
       UNION ALL
       -- Join(7)
       SELECT _xmt_interp_edge_TU_2.a_1 AS x,
              _xmt_interp_edge_TU_2.a_2 AS y,
              _xmt_interp_edge_TU_5.a_2 AS z,
              apply("phi", _xmt_interp_edge_TU_2.a_1, _xmt_interp_edge_TU_2.a_2, _xmt_interp_edge_TU_5.a_2) AS G
         FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
         JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
               ON _xmt_interp_edge_TU_2.a_2 = _xmt_interp_edge_TU_5.a_1
         JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
               ON _xmt_interp_edge_TU_2.a_1 = _xmt_interp_edge_TU_7.a_1 
              AND _xmt_interp_edge_TU_5.a_2 = _xmt_interp_edge_TU_7.a_2)
----- UF -----------------------------------------------------------
-- Agg (0)
SELECT G as G
 FROM (-- Join(7)
       SELECT _xmt_interp_edge_TU_2.a_1 AS x,
              _xmt_interp_edge_TU_2.a_2 AS y,
              _xmt_interp_edge_TU_5.a_2 AS z,
              apply("phi", _xmt_interp_edge_TU_2.a_1, _xmt_interp_edge_TU_2.a_2, _xmt_interp_edge_TU_5.a_2) AS G
         FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
         JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
               ON _xmt_interp_edge_TU_2.a_2 = _xmt_interp_edge_TU_5.a_1
         JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
               ON _xmt_interp_edge_TU_2.a_1 = _xmt_interp_edge_TU_7.a_1 
              AND _xmt_interp_edge_TU_5.a_2 = _xmt_interp_edge_TU_7.a_2)
----- G ------------------------------------------------------------
-- Agg (0)
SELECT and_aggregate(G) as G
 FROM (SELECT NULL AS x, NULL AS y, NULL AS z, "true" AS G 
       UNION ALL
       -- Join(7)
       SELECT _xmt_interp_edge_TU_2.a_1 AS x,
              _xmt_interp_edge_TU_2.a_2 AS y,
              _xmt_interp_edge_TU_5.a_2 AS z,
              apply("phi", _xmt_interp_edge_TU_2.a_1, _xmt_interp_edge_TU_2.a_2, _xmt_interp_edge_TU_5.a_2) AS G
         FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
         JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
               ON _xmt_interp_edge_TU_2.a_2 = _xmt_interp_edge_TU_5.a_1
         JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
               ON _xmt_interp_edge_TU_2.a_1 = _xmt_interp_edge_TU_7.a_1 
              AND _xmt_interp_edge_TU_5.a_2 = _xmt_interp_edge_TU_7.a_2)

===  (Edge x x) ======================================
----- T ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_TU_12.a_1 AS x,
       "true" AS G
  FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_12
 WHERE _xmt_interp_edge_TU_12.a_1 = _xmt_interp_edge_TU_12.a_2
----- F ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_UF_12.a_1 AS x,
       "false" AS G
  FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_12
 WHERE _xmt_interp_edge_UF_12.a_1 = _xmt_interp_edge_UF_12.a_2
----- G ------------------------------------------------------------
-- Join(0)
SELECT _xmt_interp_edge_G_12.a_1 AS x,
       _xmt_interp_edge_G_12.G AS G
  FROM _xmt_interp_edge_G AS _xmt_interp_edge_G_12
 WHERE _xmt_interp_edge_G_12.a_1 = _xmt_interp_edge_G_12.a_2

=== (top) (forall ((x Node)) (Edge x x)) ======================================
----- T ------------------------------------------------------------
-- Agg (0)
SELECT and_aggregate(G) as G
 FROM (SELECT NULL AS x, "true" AS G 
       UNION ALL
       -- Join(7)
       SELECT _xmt_interp_edge_UF_12.a_1 AS x,
              "false" AS G
         FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_12
        WHERE _xmt_interp_edge_UF_12.a_1 = _xmt_interp_edge_UF_12.a_2)
----- F ------------------------------------------------------------
-- Agg (0)
SELECT G as G
 FROM (-- Join(7)
       SELECT _xmt_interp_edge_UF_12.a_1 AS x,
              "false" AS G
         FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_12
        WHERE _xmt_interp_edge_UF_12.a_1 = _xmt_interp_edge_UF_12.a_2)
----- G ------------------------------------------------------------
-- Agg (0)
SELECT and_aggregate(G) as G
 FROM (SELECT NULL AS x, "true" AS G 
       UNION ALL
       -- Join(7)
       SELECT _xmt_interp_edge_UF_12.a_1 AS x,
              "false" AS G
         FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_12
        WHERE _xmt_interp_edge_UF_12.a_1 = _xmt_interp_edge_UF_12.a_2)

=== (top) (exists ((x Node) (y Node)) (Edge x y)) ======================================
----- T ------------------------------------------------------------
-- Agg (0)
SELECT or_aggregate(G) as G
 FROM (-- Join(7)
       SELECT _xmt_interp_edge_TU_2.a_1 AS x,
              _xmt_interp_edge_TU_2.a_2 AS y,
              "true" AS G
         FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2)
----- F ------------------------------------------------------------
-- Agg (0)
SELECT or_aggregate(G) as G
 FROM (SELECT NULL AS x, NULL AS y, "false" AS G 
       UNION ALL
       -- Join(7)
       SELECT _xmt_interp_edge_TU_2.a_1 AS x,
              _xmt_interp_edge_TU_2.a_2 AS y,
              "true" AS G
         FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2)
----- G ------------------------------------------------------------
-- Agg (0)
SELECT or_aggregate(G) as G
 FROM (SELECT NULL AS x, NULL AS y, "false" AS G 
       UNION ALL
       -- Join(7)
       SELECT _xmt_interp_edge_TU_2.a_1 AS x,
              _xmt_interp_edge_TU_2.a_2 AS y,
              "true" AS G
         FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2)

=== (top) (and (forall ((x Node) (y Node) (z Node)) (or (not (Edge x y)) (not (Edge y z)) (not (Edge x z)) (phi x y z))) (forall ((x Node)) (Edge x x)) (exists ((x Node) (y Node)) (Edge x y))) ======================================
----- TU -----------------------------------------------------------
-- Join(0)
SELECT and_(Agg_11_TU.G, Agg_13_TU.G, Agg_14_TU.G) AS G
  FROM (-- Agg (8)
        SELECT and_aggregate(G) as G
         FROM (SELECT NULL AS x, NULL AS y, NULL AS z, "true" AS G 
               UNION ALL
               -- Join(15)
               SELECT _xmt_interp_edge_TU_2.a_1 AS x,
                      _xmt_interp_edge_TU_2.a_2 AS y,
                      _xmt_interp_edge_TU_5.a_2 AS z,
                      apply("phi", _xmt_interp_edge_TU_2.a_1, _xmt_interp_edge_TU_2.a_2, _xmt_interp_edge_TU_5.a_2) AS G
                 FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
                 JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
                       ON _xmt_interp_edge_TU_2.a_2 = _xmt_interp_edge_TU_5.a_1
                 JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
                       ON _xmt_interp_edge_TU_2.a_1 = _xmt_interp_edge_TU_7.a_1 
                      AND _xmt_interp_edge_TU_5.a_2 = _xmt_interp_edge_TU_7.a_2)
        ) AS Agg_11_TU
  JOIN (-- Agg (8)
        SELECT and_aggregate(G) as G
         FROM (SELECT NULL AS x, "true" AS G 
               UNION ALL
               -- Join(15)
               SELECT _xmt_interp_edge_UF_12.a_1 AS x,
                      "false" AS G
                 FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_12
                WHERE _xmt_interp_edge_UF_12.a_1 = _xmt_interp_edge_UF_12.a_2)
        ) AS Agg_13_TU
  JOIN (-- Agg (8)
        SELECT or_aggregate(G) as G
         FROM (-- Join(15)
               SELECT _xmt_interp_edge_TU_2.a_1 AS x,
                      _xmt_interp_edge_TU_2.a_2 AS y,
                      "true" AS G
                 FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2)
        ) AS Agg_14_TU
----- F ------------------------------------------------------------
-- Agg (0)
SELECT G as G
 FROM (-- exclude(7)
       SELECT *
        FROM (-- Agg (14)
              SELECT G as G
               FROM (-- Join(21)
                     SELECT _xmt_interp_edge_TU_2.a_1 AS x,
                            _xmt_interp_edge_TU_2.a_2 AS y,
                            _xmt_interp_edge_TU_5.a_2 AS z,
                            apply("phi", _xmt_interp_edge_TU_2.a_1, _xmt_interp_edge_TU_2.a_2, _xmt_interp_edge_TU_5.a_2) AS G
                       FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
                       JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
                             ON _xmt_interp_edge_TU_2.a_2 = _xmt_interp_edge_TU_5.a_1
                       JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
                             ON _xmt_interp_edge_TU_2.a_1 = _xmt_interp_edge_TU_7.a_1 
                            AND _xmt_interp_edge_TU_5.a_2 = _xmt_interp_edge_TU_7.a_2)
              UNION ALL
              -- Agg (14)
              SELECT G as G
               FROM (-- Join(21)
                     SELECT _xmt_interp_edge_UF_12.a_1 AS x,
                            "false" AS G
                       FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_12
                      WHERE _xmt_interp_edge_UF_12.a_1 = _xmt_interp_edge_UF_12.a_2)
              UNION ALL
              -- Agg (14)
              SELECT or_aggregate(G) as G
               FROM (SELECT NULL AS x, NULL AS y, "false" AS G 
                     UNION ALL
                     -- Join(21)
                     SELECT _xmt_interp_edge_TU_2.a_1 AS x,
                            _xmt_interp_edge_TU_2.a_2 AS y,
                            "true" AS G
                       FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2))
        WHERE G <> "true")
----- G ------------------------------------------------------------
-- Join(0)
SELECT and_(Agg_11_G.G, Agg_13_G.G, Agg_14_G.G) AS G
  FROM (-- Agg (8)
        SELECT and_aggregate(G) as G
         FROM (SELECT NULL AS x, NULL AS y, NULL AS z, "true" AS G 
               UNION ALL
               -- Join(15)
               SELECT _xmt_interp_edge_TU_2.a_1 AS x,
                      _xmt_interp_edge_TU_2.a_2 AS y,
                      _xmt_interp_edge_TU_5.a_2 AS z,
                      apply("phi", _xmt_interp_edge_TU_2.a_1, _xmt_interp_edge_TU_2.a_2, _xmt_interp_edge_TU_5.a_2) AS G
                 FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2
                 JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_5
                       ON _xmt_interp_edge_TU_2.a_2 = _xmt_interp_edge_TU_5.a_1
                 JOIN _xmt_interp_edge_TU AS _xmt_interp_edge_TU_7
                       ON _xmt_interp_edge_TU_2.a_1 = _xmt_interp_edge_TU_7.a_1 
                      AND _xmt_interp_edge_TU_5.a_2 = _xmt_interp_edge_TU_7.a_2)
        ) AS Agg_11_G
  JOIN (-- Agg (8)
        SELECT and_aggregate(G) as G
         FROM (SELECT NULL AS x, "true" AS G 
               UNION ALL
               -- Join(15)
               SELECT _xmt_interp_edge_UF_12.a_1 AS x,
                      "false" AS G
                 FROM _xmt_interp_edge_UF AS _xmt_interp_edge_UF_12
                WHERE _xmt_interp_edge_UF_12.a_1 = _xmt_interp_edge_UF_12.a_2)
        ) AS Agg_13_G
  JOIN (-- Agg (8)
        SELECT or_aggregate(G) as G
         FROM (SELECT NULL AS x, NULL AS y, "false" AS G 
               UNION ALL
               -- Join(15)
               SELECT _xmt_interp_edge_TU_2.a_1 AS x,
                      _xmt_interp_edge_TU_2.a_2 AS y,
                      "true" AS G
                 FROM _xmt_interp_edge_TU AS _xmt_interp_edge_TU_2)
        ) AS Agg_14_G

===========================================
(check-sat)