:- module(tables,[]).  % converted djd
:- style_check(-singleton). % added djd
%% :- module('tables', []).
:- discontiguous 'tables':'tables.firstNode.p3.0'/3. %% added djd
:- discontiguous 'tables':'~tables.firstNode.p3.0'/3. %% added djd
:- discontiguous 'tables':'tables.combine.p5'/5. %% added djd
:- discontiguous 'tables':'~tables.combine.p5'/5. %% added djd
:- discontiguous 'tables':'tables.adjustment.p4'/4. %% added djd
:- discontiguous 'tables':'~tables.adjustment.p4'/4. %% added djd
:- discontiguous 'tables':'tables.adjust.p6'/6. %% added djd
:- discontiguous 'tables':'~tables.adjust.p6'/6. %% added djd
:- discontiguous 'tables':'tables.amend.p7'/7. %% added djd
:- discontiguous 'tables':'~tables.amend.p7'/7. %% added djd
:- discontiguous 'tables':'tables.balanceTable1.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.balanceTable1.p3'/3. %% added djd
:- discontiguous 'tables':'tables.balanceTable2.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.balanceTable2.p3'/3. %% added djd
:- discontiguous 'tables':'tables.deleteKey.p5'/5. %% added djd
:- discontiguous 'tables':'~tables.deleteKey.p5'/5. %% added djd
:- discontiguous 'tables':'tables.heightIncreased.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.heightIncreased.p3'/3. %% added djd
:- discontiguous 'tables':'tables.heightDecreased.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.heightDecreased.p3'/3. %% added djd
:- discontiguous 'tables':'tables.insert.p5'/5.  %% added djd
:- discontiguous 'tables':'~tables.insert.p5'/5. %% added djd
:- discontiguous 'tables':'tables.joinAux.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.joinAux.p3'/3. %% added djd
:- discontiguous 'tables':'tables.lastNode.p3.0'/3. %% added djd
:- discontiguous 'tables':'~tables.lastNode.p3.0'/3. %% added djd
:- discontiguous 'tables':'tables.restructure.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.restructure.p3'/3. %% added djd
:- discontiguous 'tables':'tables.previousNode.p4.0'/4. %% added djd
:- discontiguous 'tables':'~tables.previousNode.p4.0'/4. %% added djd
:- discontiguous 'tables':'tables.nextNode.p4.0'/4. %% added djd
:- discontiguous 'tables':'~tables.nextNode.p4.0'/4. %% added djd
:- discontiguous 'tables':'tables.listsToTable.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.listsToTable.p3'/3. %% added djd
:- discontiguous 'tables':'tables.listsToTable1.p5'/5. %% added djd
:- discontiguous 'tables':'~tables.listsToTable1.p5'/5. %% added djd
:- discontiguous 'tables':'tables.removeRightmost.p5'/5. %% added djd
:- discontiguous 'tables':'~tables.removeRightmost.p5'/5. %% added djd
:- discontiguous 'tables':'tables.rebalance.p4'/4. %% added djd
:- discontiguous 'tables':'~tables.rebalance.p4'/4. %% added djd
:- discontiguous 'tables':'tables.tableSearch.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.tableSearch.p3'/3. %% added djd
:- discontiguous 'tables':'tables.tableMember.p3'/3. %% added djd
:- discontiguous 'tables':'~tables.tableMember.p3'/3. %% added djd
:- discontiguous 'tables':'tables.updateTable.p5.0'/5. %% added djd
:- discontiguous 'tables':'~tables.updateTable.p5.0'/5. %% added djd
:- discontiguous 'tables':'tables.tableToLists.p5'/5. %% added djd
:- discontiguous 'tables':'~tables.tableToLists.p5'/5. %% added djd
:- discontiguous 'tables.firstNode.p3.0'/3. %% added djd
:- discontiguous '~tables.firstNode.p3.0'/3. %% added djd
:- discontiguous 'tables.combine.p5'/5. %% added djd
:- discontiguous '~tables.combine.p5'/5. %% added djd
:- discontiguous 'tables.adjustment.p4'/4. %% added djd
:- discontiguous '~tables.adjustment.p4'/4. %% added djd
:- discontiguous 'tables.adjust.p6'/6. %% added djd
:- discontiguous '~tables.adjust.p6'/6. %% added djd
:- discontiguous 'tables.amend.p7'/7. %% added djd
:- discontiguous '~tables.amend.p7'/7. %% added djd
:- discontiguous 'tables.balanceTable1.p3'/3. %% added djd
:- discontiguous '~tables.balanceTable1.p3'/3. %% added djd
:- discontiguous 'tables.balanceTable2.p3'/3. %% added djd
:- discontiguous '~tables.balanceTable2.p3'/3. %% added djd
:- discontiguous 'tables.deleteKey.p5'/5. %% added djd
:- discontiguous '~tables.deleteKey.p5'/5. %% added djd
:- discontiguous 'tables.heightIncreased.p3'/3. %% added djd
:- discontiguous '~tables.heightIncreased.p3'/3. %% added djd
:- discontiguous 'tables.heightDecreased.p3'/3. %% added djd
:- discontiguous '~tables.heightDecreased.p3'/3. %% added djd
:- discontiguous 'tables.insert.p5'/5. %% added djd
:- discontiguous '~tables.insert.p5'/5. %% added djd
:- discontiguous 'tables.joinAux.p3'/3. %% added djd
:- discontiguous '~tables.joinAux.p3'/3. %% added djd
:- discontiguous 'tables.lastNode.p3.0'/3. %% added djd
:- discontiguous '~tables.lastNode.p3.0'/3. %% added djd
:- discontiguous 'tables.restructure.p3'/3. %% added djd
:- discontiguous '~tables.restructure.p3'/3. %% added djd
:- discontiguous 'tables.previousNode.p4.0'/4. %% added djd
:- discontiguous '~tables.previousNode.p4.0'/4. %% added djd
:- discontiguous 'tables.nextNode.p4.0'/4. %% added djd
:- discontiguous '~tables.nextNode.p4.0'/4. %% added djd
:- discontiguous 'tables.listsToTable.p3'/3. %% added djd
:- discontiguous '~tables.listsToTable.p3'/3. %% added djd
:- discontiguous 'tables.listsToTable1.p5'/5. %% added djd
:- discontiguous '~tables.listsToTable1.p5'/5. %% added djd
:- discontiguous 'tables.removeRightmost.p5'/5. %% added djd
:- discontiguous '~tables.removeRightmost.p5'/5. %% added djd
:- discontiguous 'tables.rebalance.p4'/4. %% added djd
:- discontiguous '~tables.rebalance.p4'/4. %% added djd
:- discontiguous 'tables.tableSearch.p3'/3. %% added djd
:- discontiguous '~tables.tableSearch.p3'/3. %% added djd
:- discontiguous 'tables.tableMember.p3'/3. %% added djd
:- discontiguous '~tables.tableMember.p3'/3. %% added djd
:- discontiguous 'tables.updateTable.p5.0'/5. %% added djd
:- discontiguous '~tables.updateTable.p5.0'/5. %% added djd
:- discontiguous 'tables.tableToLists.p5'/5. %% added djd
:- discontiguous '~tables.tableToLists.p5'/5. %% added djd


:- op(500, yfx, and).
:- op(400, yfx, or).

'tables.listTable.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A)or(nonvar(B)and nonvar(C)), 'tables':'tables.listTable.p3.0'(A,B,C)).
'~tables.listTable.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A)or(nonvar(B)and nonvar(C)), 'tables':'~tables.listTable.p3.0'(A,B,C)).
'tables.listTable.p3.0'(A, B, C) :-
        'tables.listTableAux.p3'(A, B, C).
'~tables.listTable.p3.0'(A, B, C) :-
        '~tables.listTableAux.p3'(A, B, C).
'tables.firstNode.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A), 'tables':'tables.firstNode.p3.0'(A,B,C)).
'~tables.firstNode.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A), 'tables':'~tables.firstNode.p3.0'(A,B,C)).
'tables.firstNode.p3.0'('tables.node.f5'('tables.null.c0',A,B,_,_), A, B) :- !.
'~tables.firstNode.p3.0'('tables.node.f5'('tables.null.c0',A,B,_,_), A, B).
'tables.firstNode.p3.0'('tables.node.f5'(A,_,_,_,_), B, C) :-
        call_residue(user:not_equal([],[A],A,'tables.null.c0'), D),
        (   D=[] ->
            !
        ;   user:release_suspended(D)
        ),
        'tables.firstNode.p3'(A, B, C).
'~tables.firstNode.p3.0'('tables.node.f5'(A,_,_,_,_), B, C) :-
        user:not_equal([], [A], A, 'tables.null.c0'),
        '~tables.firstNode.p3'(A, B, C).
'tables.combine.p5'('tables.null.c0', _, A, A, 'tables.yes.c0') :- !.
'~tables.combine.p5'('tables.null.c0', _, A, A, 'tables.yes.c0').
'tables.combine.p5'(A, _, 'tables.null.c0', A, 'tables.yes.c0') :- !.
'~tables.combine.p5'(A, _, 'tables.null.c0', A, 'tables.yes.c0').
'tables.combine.p5'(A, B, C, D, E) :-
        call_residue((user:not_equal([],[A],A,'tables.null.c0'),user:not_equal([],[C],C,'tables.null.c0')), F),
        (   F=[] ->
            !
        ;   user:release_suspended(F)
        ),
        'tables.removeRightmost.p5'(A, G, H, I, J),
        'tables.adjust.p6'(J, 'tables.node.f5'(I,G,H,B,C), B, 'tables.right.c0', K, D),
        'tables.heightDecreased.p3'(B, K, E).
'~tables.combine.p5'(A, B, C, D, E) :-
        user:not_equal([], [A], A, 'tables.null.c0'),
        user:not_equal([], [C], C, 'tables.null.c0'),
        '~tables.removeRightmost.p5'(A, F, G, H, I),
        '~tables.adjust.p6'(I, 'tables.node.f5'(H,F,G,B,C), B, 'tables.right.c0', J, D),
        '~tables.heightDecreased.p3'(B, J, E).
'tables.amendTable.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(nonvar(A)and ground([B]), 'tables':'tables.amendTable.p6.0'(A,B,C,D,E,F)).
'~tables.amendTable.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(nonvar(A)and ground([B]), 'tables':'~tables.amendTable.p6.0'(A,B,C,D,E,F)).
'tables.amendTable.p6.0'(A, B, C, D, E, F) :-
        'tables.amend.p7'(A, B, C, D, E, F, _).
'~tables.amendTable.p6.0'(A, B, C, D, E, F) :-
        '~tables.amend.p7'(A, B, C, D, E, F, _).
'tables.adjustment.p4'('tables.eQ.c0', 'tables.left.c0', 'tables.lH.c0', 'tables.no.c0') :- !.
'~tables.adjustment.p4'('tables.eQ.c0', 'tables.left.c0', 'tables.lH.c0', 'tables.no.c0').
'tables.adjustment.p4'('tables.eQ.c0', 'tables.right.c0', 'tables.rH.c0', 'tables.no.c0') :- !.
'~tables.adjustment.p4'('tables.eQ.c0', 'tables.right.c0', 'tables.rH.c0', 'tables.no.c0').
'tables.adjustment.p4'('tables.lH.c0', 'tables.left.c0', _, 'tables.yes.c0') :- !.
'~tables.adjustment.p4'('tables.lH.c0', 'tables.left.c0', _, 'tables.yes.c0').
'tables.adjustment.p4'('tables.lH.c0', 'tables.right.c0', 'tables.eQ.c0', 'tables.no.c0') :- !.
'~tables.adjustment.p4'('tables.lH.c0', 'tables.right.c0', 'tables.eQ.c0', 'tables.no.c0').
'tables.adjustment.p4'('tables.rH.c0', 'tables.left.c0', 'tables.eQ.c0', 'tables.no.c0') :- !.
'~tables.adjustment.p4'('tables.rH.c0', 'tables.left.c0', 'tables.eQ.c0', 'tables.no.c0').
'tables.adjustment.p4'('tables.rH.c0', 'tables.right.c0', _, 'tables.yes.c0') :- !.
'~tables.adjustment.p4'('tables.rH.c0', 'tables.right.c0', _, 'tables.yes.c0').
'tables.adjust.p6'('tables.no.c0', A, B, _, B, A).
'~tables.adjust.p6'('tables.no.c0', A, B, _, B, A).
'tables.adjust.p6'('tables.yes.c0', A, B, C, D, E) :-
        'tables.adjustment.p4'(B, C, D, F),
        'tables.rebalance.p4'(F, A, D, E).
'~tables.adjust.p6'('tables.yes.c0', A, B, C, D, E) :-
        '~tables.adjustment.p4'(B, C, D, F),
        '~tables.rebalance.p4'(F, A, D, E).
'tables.amend.p7'('tables.null.c0', A, B, C, 'tables.node.f5'('tables.null.c0',A,B,'tables.eQ.c0','tables.null.c0'), C, 'tables.yes.c0').
'~tables.amend.p7'('tables.null.c0', A, B, C, 'tables.node.f5'('tables.null.c0',A,B,'tables.eQ.c0','tables.null.c0'), C, 'tables.yes.c0').
'tables.amend.p7'('tables.node.f5'(A,B,C,D,E), F, G, H, I, J, K) :-
        call_residue('strings':'strings.<.p2'(F,B), L),
        (   L=[] ->
            !
        ;   user:release_suspended(L)
        ),
        'tables.amend.p7'(A, F, G, H, M, J, N),
        'tables.adjust.p6'(N, 'tables.node.f5'(M,B,C,D,E), D, 'tables.left.c0', O, I),
        'tables.heightIncreased.p3'(D, O, K).
'~tables.amend.p7'('tables.node.f5'(A,B,C,D,E), F, G, H, I, J, K) :-
        'strings':'~strings.<.p2'(F, B),
        '~tables.amend.p7'(A, F, G, H, L, J, M),
        '~tables.adjust.p6'(M, 'tables.node.f5'(L,B,C,D,E), D, 'tables.left.c0', N, I),
        '~tables.heightIncreased.p3'(D, N, K).
'tables.amend.p7'('tables.node.f5'(A,B,C,D,E), F, G, H, I, J, K) :-
        call_residue('strings':'strings.>.p2'(F,B), L),
        (   L=[] ->
            !
        ;   user:release_suspended(L)
        ),
        'tables.amend.p7'(E, F, G, H, M, J, N),
        'tables.adjust.p6'(N, 'tables.node.f5'(A,B,C,D,M), D, 'tables.right.c0', O, I),
        'tables.heightIncreased.p3'(D, O, K).
'~tables.amend.p7'('tables.node.f5'(A,B,C,D,E), F, G, H, I, J, K) :-
        'strings':'~strings.>.p2'(F, B),
        '~tables.amend.p7'(E, F, G, H, L, J, M),
        '~tables.adjust.p6'(M, 'tables.node.f5'(A,B,C,D,L), D, 'tables.right.c0', N, I),
        '~tables.heightIncreased.p3'(D, N, K).
'tables.amend.p7'('tables.node.f5'(A,B,C,D,E), F, G, _, H, I, J) :-
        call_residue(F=B, K),
        (   K=[] ->
            !
        ;   user:release_suspended(K)
        ),
        H='tables.node.f5'(A,F,G,D,E),
        I=C,
        J='tables.no.c0'.
'~tables.amend.p7'('tables.node.f5'(A,B,C,D,E), F, G, _, H, I, J) :-
        F=B,
        H='tables.node.f5'(A,F,G,D,E),
        I=C,
        J='tables.no.c0'.
'tables.balanceTable1.p3'('tables.eQ.c0', 'tables.rH.c0', 'tables.lH.c0').
'~tables.balanceTable1.p3'('tables.eQ.c0', 'tables.rH.c0', 'tables.lH.c0').
'tables.balanceTable1.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.eQ.c0').
'~tables.balanceTable1.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.eQ.c0').
'tables.balanceTable1.p3'('tables.rH.c0', 'tables.eQ.c0', 'tables.eQ.c0').
'~tables.balanceTable1.p3'('tables.rH.c0', 'tables.eQ.c0', 'tables.eQ.c0').
'tables.balanceTable2.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.rH.c0').
'~tables.balanceTable2.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.rH.c0').
'tables.balanceTable2.p3'('tables.rH.c0', 'tables.lH.c0', 'tables.eQ.c0').
'~tables.balanceTable2.p3'('tables.rH.c0', 'tables.lH.c0', 'tables.eQ.c0').
'tables.balanceTable2.p3'('tables.eQ.c0', 'tables.eQ.c0', 'tables.eQ.c0').
'~tables.balanceTable2.p3'('tables.eQ.c0', 'tables.eQ.c0', 'tables.eQ.c0').
'tables.deleteNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A), 'tables':'tables.deleteNode.p4.0'(A,B,C,D)).
'~tables.deleteNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A), 'tables':'~tables.deleteNode.p4.0'(A,B,C,D)).
'tables.deleteNode.p4.0'(A, B, C, D) :-
        'tables.deleteKey.p5'(A, B, C, D, _).
'~tables.deleteNode.p4.0'(A, B, C, D) :-
        '~tables.deleteKey.p5'(A, B, C, D, _).
'tables.deleteKey.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue('strings':'strings.<.p2'(F,B), J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        'tables.deleteKey.p5'(A, F, G, K, L),
        'tables.adjust.p6'(L, 'tables.node.f5'(K,B,C,D,E), D, 'tables.right.c0', M, H),
        'tables.heightDecreased.p3'(D, M, I).
'~tables.deleteKey.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        'strings':'~strings.<.p2'(F, B),
        '~tables.deleteKey.p5'(A, F, G, J, K),
        '~tables.adjust.p6'(K, 'tables.node.f5'(J,B,C,D,E), D, 'tables.right.c0', L, H),
        '~tables.heightDecreased.p3'(D, L, I).
'tables.deleteKey.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue('strings':'strings.>.p2'(F,B), J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        'tables.deleteKey.p5'(E, F, G, K, L),
        'tables.adjust.p6'(L, 'tables.node.f5'(A,B,C,D,K), D, 'tables.left.c0', M, H),
        'tables.heightDecreased.p3'(D, M, I).
'~tables.deleteKey.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        'strings':'~strings.>.p2'(F, B),
        '~tables.deleteKey.p5'(E, F, G, J, K),
        '~tables.adjust.p6'(K, 'tables.node.f5'(A,B,C,D,J), D, 'tables.left.c0', L, H),
        '~tables.heightDecreased.p3'(D, L, I).
'tables.deleteKey.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue(F=B, J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        G=C,
        'tables.combine.p5'(A, D, E, H, I).
'~tables.deleteKey.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        F=B,
        G=C,
        '~tables.combine.p5'(A, D, E, H, I).
'tables.emptyTable.p1'('tables.null.c0').
'~tables.emptyTable.p1'('tables.null.c0').
'tables.insertNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A)and ground([B]), 'tables':'tables.insertNode.p4.0'(A,B,C,D)).
'~tables.insertNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A)and ground([B]), 'tables':'~tables.insertNode.p4.0'(A,B,C,D)).
'tables.insertNode.p4.0'(A, B, C, D) :-
        'tables.insert.p5'(A, B, C, D, _).
'~tables.insertNode.p4.0'(A, B, C, D) :-
        '~tables.insert.p5'(A, B, C, D, _).
'tables.heightIncreased.p3'('tables.rH.c0', 'tables.eQ.c0', 'tables.no.c0') :- !.
'~tables.heightIncreased.p3'('tables.rH.c0', 'tables.eQ.c0', 'tables.no.c0').
'tables.heightIncreased.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.no.c0') :- !.
'~tables.heightIncreased.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.no.c0').
'tables.heightIncreased.p3'('tables.eQ.c0', 'tables.lH.c0', 'tables.yes.c0') :- !.
'~tables.heightIncreased.p3'('tables.eQ.c0', 'tables.lH.c0', 'tables.yes.c0').
'tables.heightIncreased.p3'('tables.eQ.c0', 'tables.rH.c0', 'tables.yes.c0') :- !.
'~tables.heightIncreased.p3'('tables.eQ.c0', 'tables.rH.c0', 'tables.yes.c0').
'tables.heightIncreased.p3'(A, A, 'tables.no.c0') :- !.
'~tables.heightIncreased.p3'(A, A, 'tables.no.c0').
'tables.heightDecreased.p3'('tables.lH.c0', 'tables.rH.c0', 'tables.no.c0') :- !.
'~tables.heightDecreased.p3'('tables.lH.c0', 'tables.rH.c0', 'tables.no.c0').
'tables.heightDecreased.p3'('tables.rH.c0', 'tables.lH.c0', 'tables.no.c0') :- !.
'~tables.heightDecreased.p3'('tables.rH.c0', 'tables.lH.c0', 'tables.no.c0').
'tables.heightDecreased.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.yes.c0') :- !.
'~tables.heightDecreased.p3'('tables.lH.c0', 'tables.eQ.c0', 'tables.yes.c0').
'tables.heightDecreased.p3'('tables.rH.c0', 'tables.eQ.c0', 'tables.yes.c0') :- !.
'~tables.heightDecreased.p3'('tables.rH.c0', 'tables.eQ.c0', 'tables.yes.c0').
'tables.heightDecreased.p3'('tables.eQ.c0', _, 'tables.no.c0') :- !.
'~tables.heightDecreased.p3'('tables.eQ.c0', _, 'tables.no.c0').
'tables.heightDecreased.p3'(A, A, 'tables.no.c0') :- !.
'~tables.heightDecreased.p3'(A, A, 'tables.no.c0').
'tables.insert.p5'('tables.null.c0', A, B, 'tables.node.f5'('tables.null.c0',A,B,'tables.eQ.c0','tables.null.c0'), 'tables.yes.c0').
'~tables.insert.p5'('tables.null.c0', A, B, 'tables.node.f5'('tables.null.c0',A,B,'tables.eQ.c0','tables.null.c0'), 'tables.yes.c0').
'tables.insert.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue('strings':'strings.<.p2'(F,B), J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        'tables.insert.p5'(A, F, G, K, L),
        'tables.adjust.p6'(L, 'tables.node.f5'(K,B,C,D,E), D, 'tables.left.c0', M, H),
        'tables.heightIncreased.p3'(D, M, I).
'~tables.insert.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        'strings':'~strings.<.p2'(F, B),
        '~tables.insert.p5'(A, F, G, J, K),
        '~tables.adjust.p6'(K, 'tables.node.f5'(J,B,C,D,E), D, 'tables.left.c0', L, H),
        '~tables.heightIncreased.p3'(D, L, I).
'tables.insert.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue('strings':'strings.>.p2'(F,B), J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        'tables.insert.p5'(E, F, G, K, L),
        'tables.adjust.p6'(L, 'tables.node.f5'(A,B,C,D,K), D, 'tables.right.c0', M, H),
        'tables.heightIncreased.p3'(D, M, I).
'~tables.insert.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        'strings':'~strings.>.p2'(F, B),
        '~tables.insert.p5'(E, F, G, J, K),
        '~tables.adjust.p6'(K, 'tables.node.f5'(A,B,C,D,J), D, 'tables.right.c0', L, H),
        '~tables.heightIncreased.p3'(D, L, I).
'tables.insert.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue(F=B, J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        G=C,
        H='tables.node.f5'(A,B,C,D,E),
        I='tables.no.c0'.
'~tables.insert.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        F=B,
        G=C,
        H='tables.node.f5'(A,B,C,D,E),
        I='tables.no.c0'.
'tables.joinTables.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A)and nonvar(B), 'tables':'tables.joinTables.p3.0'(A,B,C)).
'~tables.joinTables.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A)and nonvar(B), 'tables':'~tables.joinTables.p3.0'(A,B,C)).
'tables.joinTables.p3.0'(A, B, C) :-
        'tables.joinAux.p3'(B, A, C).
'~tables.joinTables.p3.0'(A, B, C) :-
        '~tables.joinAux.p3'(B, A, C).
'tables.joinAux.p3'('tables.null.c0', A, A).
'~tables.joinAux.p3'('tables.null.c0', A, A).
'tables.joinAux.p3'('tables.node.f5'(A,B,C,_,D), E, F) :-
        'tables.amend.p7'(E, B, C, _, G, _, _),
        'tables.joinAux.p3'(A, G, H),
        'tables.joinAux.p3'(D, H, F).
'~tables.joinAux.p3'('tables.node.f5'(A,B,C,_,D), E, F) :-
        '~tables.amend.p7'(E, B, C, _, G, _, _),
        '~tables.joinAux.p3'(A, G, H),
        '~tables.joinAux.p3'(D, H, F).
'tables.lastNode.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A), 'tables':'tables.lastNode.p3.0'(A,B,C)).
'~tables.lastNode.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A), 'tables':'~tables.lastNode.p3.0'(A,B,C)).
'tables.lastNode.p3.0'('tables.node.f5'(_,A,B,_,'tables.null.c0'), A, B) :- !.
'~tables.lastNode.p3.0'('tables.node.f5'(_,A,B,_,'tables.null.c0'), A, B).
'tables.lastNode.p3.0'('tables.node.f5'(_,_,_,_,A), B, C) :-
        call_residue(user:not_equal([],[A],A,'tables.null.c0'), D),
        (   D=[] ->
            !
        ;   user:release_suspended(D)
        ),
        'tables.lastNode.p3'(A, B, C).
'~tables.lastNode.p3.0'('tables.node.f5'(_,_,_,_,A), B, C) :-
        user:not_equal([], [A], A, 'tables.null.c0'),
        '~tables.lastNode.p3'(A, B, C).
'tables.restructure.p3'('tables.node.f5'(A,B,C,'tables.rH.c0','tables.node.f5'(D,E,F,G,H)), I, J) :-
        call_residue(user:not_equal([],[G],G,'tables.lH.c0'), K),
        (   K=[] ->
            !
        ;   user:release_suspended(K)
        ),
        J='tables.node.f5'('tables.node.f5'(A,B,C,L,D),E,F,I,H),
        'tables.balanceTable1.p3'(G, L, I).
'~tables.restructure.p3'('tables.node.f5'(A,B,C,'tables.rH.c0','tables.node.f5'(D,E,F,G,H)), I, J) :-
        user:not_equal([], [G], G, 'tables.lH.c0'),
        J='tables.node.f5'('tables.node.f5'(A,B,C,K,D),E,F,I,H),
        '~tables.balanceTable1.p3'(G, K, I).
'tables.restructure.p3'('tables.node.f5'('tables.node.f5'(A,B,C,D,E),F,G,'tables.lH.c0',H), I, J) :-
        call_residue(user:not_equal([],[D],D,'tables.rH.c0'), K),
        (   K=[] ->
            !
        ;   user:release_suspended(K)
        ),
        J='tables.node.f5'(A,B,C,I,'tables.node.f5'(E,F,G,L,H)),
        'tables.balanceTable1.p3'(D, I, L).
'~tables.restructure.p3'('tables.node.f5'('tables.node.f5'(A,B,C,D,E),F,G,'tables.lH.c0',H), I, J) :-
        user:not_equal([], [D], D, 'tables.rH.c0'),
        J='tables.node.f5'(A,B,C,I,'tables.node.f5'(E,F,G,K,H)),
        '~tables.balanceTable1.p3'(D, I, K).
'tables.restructure.p3'('tables.node.f5'(A,B,C,'tables.rH.c0','tables.node.f5'('tables.node.f5'(D,E,F,G,H),I,J,'tables.lH.c0',K)), 'tables.eQ.c0', 'tables.node.f5'('tables.node.f5'(A,B,C,L,D),E,F,'tables.eQ.c0','tables.node.f5'(H,I,J,M,K))) :- !,
        'tables.balanceTable2.p3'(G, L, M).
'~tables.restructure.p3'('tables.node.f5'(A,B,C,'tables.rH.c0','tables.node.f5'('tables.node.f5'(D,E,F,G,H),I,J,'tables.lH.c0',K)), 'tables.eQ.c0', 'tables.node.f5'('tables.node.f5'(A,B,C,L,D),E,F,'tables.eQ.c0','tables.node.f5'(H,I,J,M,K))) :-
        true,
        '~tables.balanceTable2.p3'(G, L, M).
'tables.restructure.p3'('tables.node.f5'('tables.node.f5'(A,B,C,'tables.rH.c0','tables.node.f5'(D,E,F,G,H)),I,J,'tables.lH.c0',K), 'tables.eQ.c0', 'tables.node.f5'('tables.node.f5'(A,B,C,L,D),E,F,'tables.eQ.c0','tables.node.f5'(H,I,J,M,K))) :- !,
        'tables.balanceTable2.p3'(G, L, M).
'~tables.restructure.p3'('tables.node.f5'('tables.node.f5'(A,B,C,'tables.rH.c0','tables.node.f5'(D,E,F,G,H)),I,J,'tables.lH.c0',K), 'tables.eQ.c0', 'tables.node.f5'('tables.node.f5'(A,B,C,L,D),E,F,'tables.eQ.c0','tables.node.f5'(H,I,J,M,K))) :-
        true,
        '~tables.balanceTable2.p3'(G, L, M).
'tables.previousNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A)and nonvar(B), 'tables':'tables.previousNode.p4.0'(A,B,C,D)).
'~tables.previousNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A)and nonvar(B), 'tables':'~tables.previousNode.p4.0'(A,B,C,D)).
'tables.previousNode.p4.0'('tables.node.f5'(A,B,_,_,_), C, D, E) :-
        call_residue(C=B, F),
        (   F=[] ->
            !
        ;   user:release_suspended(F)
        ),
        'tables.lastNode.p3'(A, D, E).
'~tables.previousNode.p4.0'('tables.node.f5'(A,B,_,_,_), C, D, E) :-
        C=B,
        '~tables.lastNode.p3'(A, D, E).
'tables.previousNode.p4.0'('tables.node.f5'(A,B,_,_,_), C, D, E) :-
        call_residue('strings':'strings.<.p2'(C,B), F),
        (   F=[] ->
            !
        ;   user:release_suspended(F)
        ),
        'tables.previousNode.p4'(A, C, D, E).
'~tables.previousNode.p4.0'('tables.node.f5'(A,B,_,_,_), C, D, E) :-
        'strings':'~strings.<.p2'(C, B),
        '~tables.previousNode.p4'(A, C, D, E).
'tables.previousNode.p4.0'('tables.node.f5'(_,A,B,_,C), D, E, F) :-
        call_residue('strings':'strings.>.p2'(D,A), G),
        (   G=[] ->
            !
        ;   user:release_suspended(G)
        ),
        user:goedel_freeze(ground([C,D]), if(('tables':'~tables.previousNode.p4'(C,D,H,I),true),(E=H,F=I),('tables':'tables.firstNode.p3'(C,D,_),E=A,F=B))).
'~tables.previousNode.p4.0'('tables.node.f5'(_,A,B,_,C), D, E, F) :-
        'strings':'~strings.>.p2'(D, A),
        user:goedel_freeze(ground([C,D]), if(('tables':'~tables.previousNode.p4'(C,D,G,H),true),(E=G,F=H),('tables':'~tables.firstNode.p3'(C,D,_),E=A,F=B))).
'tables.nextNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A)and nonvar(B), 'tables':'tables.nextNode.p4.0'(A,B,C,D)).
'~tables.nextNode.p4'(A, B, C, D) :-
        user:goedel_freeze(nonvar(A)and nonvar(B), 'tables':'~tables.nextNode.p4.0'(A,B,C,D)).
'tables.nextNode.p4.0'('tables.node.f5'(_,A,_,_,B), C, D, E) :-
        call_residue(C=A, F),
        (   F=[] ->
            !
        ;   user:release_suspended(F)
        ),
        'tables.firstNode.p3'(B, D, E).
'~tables.nextNode.p4.0'('tables.node.f5'(_,A,_,_,B), C, D, E) :-
        C=A,
        '~tables.firstNode.p3'(B, D, E).
'tables.nextNode.p4.0'('tables.node.f5'(A,B,C,_,_), D, E, F) :-
        call_residue('strings':'strings.<.p2'(D,B), G),
        (   G=[] ->
            !
        ;   user:release_suspended(G)
        ),
        user:goedel_freeze(ground([A,D]), if(('tables':'~tables.nextNode.p4'(A,D,H,I),true),(E=H,F=I),('tables':'tables.lastNode.p3'(A,D,_),E=B,F=C))).
'~tables.nextNode.p4.0'('tables.node.f5'(A,B,C,_,_), D, E, F) :-
        'strings':'~strings.<.p2'(D, B),
        user:goedel_freeze(ground([A,D]), if(('tables':'~tables.nextNode.p4'(A,D,G,H),true),(E=G,F=H),('tables':'~tables.lastNode.p3'(A,D,_),E=B,F=C))).
'tables.nextNode.p4.0'('tables.node.f5'(_,A,_,_,B), C, D, E) :-
        call_residue('strings':'strings.>.p2'(C,A), F),
        (   F=[] ->
            !
        ;   user:release_suspended(F)
        ),
        'tables.nextNode.p4'(B, C, D, E).
'~tables.nextNode.p4.0'('tables.node.f5'(_,A,_,_,B), C, D, E) :-
        'strings':'~strings.>.p2'(C, A),
        '~tables.nextNode.p4'(B, C, D, E).
'tables.listsToTable.p3'([], [], 'tables.null.c0').
'~tables.listsToTable.p3'([], [], 'tables.null.c0').
'tables.listsToTable.p3'([A|B], C, D) :-
        'tables.listsToTable1.p5'(B, A, C, 'tables.null.c0', D).
'~tables.listsToTable.p3'([A|B], C, D) :-
        '~tables.listsToTable1.p5'(B, A, C, 'tables.null.c0', D).
'tables.listsToTable1.p5'([], A, [B], C, D) :-
        'tables.insertNode.p4'(C, A, B, D).
'~tables.listsToTable1.p5'([], A, [B], C, D) :-
        '~tables.insertNode.p4'(C, A, B, D).
'tables.listsToTable1.p5'([A|B], C, [D|E], F, G) :-
        'strings':'strings.<.p2'(C, A),
        'tables.insertNode.p4'(F, C, D, H),
        'tables.listsToTable1.p5'(B, A, E, H, G).
'~tables.listsToTable1.p5'([A|B], C, [D|E], F, G) :-
        'strings':'~strings.<.p2'(C, A),
        '~tables.insertNode.p4'(F, C, D, H),
        '~tables.listsToTable1.p5'(B, A, E, H, G).
'tables.nodeInTable.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A), 'tables':'tables.nodeInTable.p3.0'(A,B,C)).
'~tables.nodeInTable.p3'(A, B, C) :-
        user:goedel_freeze(nonvar(A), 'tables':'~tables.nodeInTable.p3.0'(A,B,C)).
'tables.nodeInTable.p3.0'(A, B, C) :-
        'tables.nodeInTableAux.p3'(A, B, C).
'~tables.nodeInTable.p3.0'(A, B, C) :-
        '~tables.nodeInTableAux.p3'(A, B, C).
'tables.removeRightmost.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue(user:not_equal([],[E],E,'tables.null.c0'), J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        'tables.removeRightmost.p5'(E, F, G, K, L),
        'tables.adjust.p6'(L, 'tables.node.f5'(A,B,C,D,K), D, 'tables.left.c0', M, H),
        'tables.heightDecreased.p3'(D, M, I).
'~tables.removeRightmost.p5'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        user:not_equal([], [E], E, 'tables.null.c0'),
        '~tables.removeRightmost.p5'(E, F, G, J, K),
        '~tables.adjust.p6'(K, 'tables.node.f5'(A,B,C,D,J), D, 'tables.left.c0', L, H),
        '~tables.heightDecreased.p3'(D, L, I).
'tables.removeRightmost.p5'('tables.node.f5'(A,B,C,_,'tables.null.c0'), B, C, A, 'tables.yes.c0') :- !.
'~tables.removeRightmost.p5'('tables.node.f5'(A,B,C,_,'tables.null.c0'), B, C, A, 'tables.yes.c0').
'tables.rebalance.p4'('tables.no.c0', 'tables.node.f5'(A,B,C,_,D), E, 'tables.node.f5'(A,B,C,E,D)).
'~tables.rebalance.p4'('tables.no.c0', 'tables.node.f5'(A,B,C,_,D), E, 'tables.node.f5'(A,B,C,E,D)).
'tables.rebalance.p4'('tables.yes.c0', A, B, C) :-
        'tables.restructure.p3'(A, B, C).
'~tables.rebalance.p4'('tables.yes.c0', A, B, C) :-
        '~tables.restructure.p3'(A, B, C).
'tables.tableSearch.p3'('tables.node.f5'(_,A,B,_,_), C, D) :-
        call_residue(C=A, E),
        (   E=[] ->
            !
        ;   user:release_suspended(E)
        ),
        D=B.
'~tables.tableSearch.p3'('tables.node.f5'(_,A,B,_,_), C, D) :-
        C=A,
        D=B.
'tables.tableSearch.p3'('tables.node.f5'(A,B,_,_,_), C, D) :-
        call_residue('strings':'strings.<.p2'(C,B), E),
        (   E=[] ->
            !
        ;   user:release_suspended(E)
        ),
        'tables.tableSearch.p3'(A, C, D).
'~tables.tableSearch.p3'('tables.node.f5'(A,B,_,_,_), C, D) :-
        'strings':'~strings.<.p2'(C, B),
        '~tables.tableSearch.p3'(A, C, D).
'tables.tableSearch.p3'('tables.node.f5'(_,A,_,_,B), C, D) :-
        call_residue('strings':'strings.>.p2'(C,A), E),
        (   E=[] ->
            !
        ;   user:release_suspended(E)
        ),
        'tables.tableSearch.p3'(B, C, D).
'~tables.tableSearch.p3'('tables.node.f5'(_,A,_,_,B), C, D) :-
        'strings':'~strings.>.p2'(C, A),
        '~tables.tableSearch.p3'(B, C, D).
'tables.tableMember.p3'('tables.node.f5'(_,A,B,_,_), A, B).
'~tables.tableMember.p3'('tables.node.f5'(_,A,B,_,_), A, B).
'tables.tableMember.p3'('tables.node.f5'(A,_,_,_,_), B, C) :-
        'tables.tableMember.p3'(A, B, C).
'~tables.tableMember.p3'('tables.node.f5'(A,_,_,_,_), B, C) :-
        '~tables.tableMember.p3'(A, B, C).
'tables.tableMember.p3'('tables.node.f5'(_,_,_,_,A), B, C) :-
        'tables.tableMember.p3'(A, B, C).
'~tables.tableMember.p3'('tables.node.f5'(_,_,_,_,A), B, C) :-
        '~tables.tableMember.p3'(A, B, C).
'tables.updateTable.p5'(A, B, C, D, E) :-
        user:goedel_freeze(nonvar(A)and ground([B]), 'tables':'tables.updateTable.p5.0'(A,B,C,D,E)).
'~tables.updateTable.p5'(A, B, C, D, E) :-
        user:goedel_freeze(nonvar(A)and ground([B]), 'tables':'~tables.updateTable.p5.0'(A,B,C,D,E)).
'tables.updateTable.p5.0'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue(F=B, J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        H='tables.node.f5'(A,B,G,D,E),
        I=C.
'~tables.updateTable.p5.0'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        F=B,
        H='tables.node.f5'(A,B,G,D,E),
        I=C.
'tables.updateTable.p5.0'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue('strings':'strings.<.p2'(F,B), J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        'tables.updateTable.p5'(A, F, G, K, I),
        H='tables.node.f5'(K,B,C,D,E).
'~tables.updateTable.p5.0'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        'strings':'~strings.<.p2'(F, B),
        '~tables.updateTable.p5'(A, F, G, J, I),
        H='tables.node.f5'(J,B,C,D,E).
'tables.updateTable.p5.0'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        call_residue('strings':'strings.>.p2'(F,B), J),
        (   J=[] ->
            !
        ;   user:release_suspended(J)
        ),
        'tables.updateTable.p5'(E, F, G, K, I),
        H='tables.node.f5'(A,B,C,D,K).
'~tables.updateTable.p5.0'('tables.node.f5'(A,B,C,D,E), F, G, H, I) :-
        'strings':'~strings.>.p2'(F, B),
        '~tables.updateTable.p5'(E, F, G, J, I),
        H='tables.node.f5'(A,B,C,D,J).
'tables.tableToLists.p5'('tables.null.c0', A, A, B, B).
'~tables.tableToLists.p5'('tables.null.c0', A, A, B, B).
'tables.tableToLists.p5'('tables.node.f5'(A,B,C,_,D), E, F, G, H) :-
        'tables.tableToLists.p5'(A, E, [B|I], G, [C|J]),
        'tables.tableToLists.p5'(D, I, F, J, H).
'~tables.tableToLists.p5'('tables.node.f5'(A,B,C,_,D), E, F, G, H) :-
        '~tables.tableToLists.p5'(A, E, [B|I], G, [C|J]),
        '~tables.tableToLists.p5'(D, I, F, J, H).
%------------------------------------------------------------------------------
% Supplementary routines for Tables.
%------------------------------------------------------------------------------

% %Z%%M% %I% last updated %E% %U% by %Q%

'tables.nodeInTableAux.p3'(Tree, Key, Item) :-
   ( var(Key) ->
     'tables.tableMember.p3'(Tree, Key, Item)
   ; 'tables.tableSearch.p3'(Tree, Key, Item)
   ).

'~tables.nodeInTableAux.p3'(Tree, Key, Item) :-
   'tables.nodeInTableAux.p3'(Tree, Key, Item).


'tables.listTableAux.p3'(Tree, Keys, Items) :-
   ( var(Tree) ->
     'tables.listsToTable.p3'(Keys, Items, Tree)
   ; 'tables.tableToLists.p5'(Tree, Keys, [], Items, [])
   ).

'~tables.listTableAux.p3'(Tree, Keys, Items) :-
   'tables.listTableAux.p3'(Tree, Keys, Items).
