:- module(sharedSyntax,[]).  %% converted djd
:- style_check(-singleton). % added djd
%% :- module('sharedSyntax', []).

:- discontiguous 'sharedSyntax.maxVarIndexInTerms.p3'/3. %% added djd
:- discontiguous 'sharedSyntax.maxVarIndex.p3'/3. %% added djd
:- discontiguous 'sharedSyntax.checkVariantTypes1.p4'/4. %% added djd
:- discontiguous 'sharedSyntax.argFreeVars.p2'/2. %% added djd
:- discontiguous 'sharedSyntax.maxVarIndex1.p3'/3. %% added djd
:- discontiguous 'sharedSyntax.maxVarIndexInTerm.p3'/3. %% added djd
:- discontiguous 'sharedSyntax.sCheckVariantTypes.p4'/4. %% added djd
:- discontiguous 'sharedSyntax.sFormulaFreeVars.p2'/2. %% added djd
:- discontiguous 'sharedSyntax.sNotNewBinding.p4'/4. %% added djd
:- discontiguous 'sharedSyntax.sTermFreeVars.p2'/2. %% added djd
:- discontiguous 'sharedSyntax.unifyTermArgs.p5'/5. %% added djd
:- discontiguous 'sharedSyntax.sVariableName.p3'/3. %% added djd
:- discontiguous 'sharedSyntax.sUnifyAtoms.p4'/4. %% added djd
:- discontiguous 'sharedSyntax.termNotOccur1.p2'/2. %% added djd
:- discontiguous 'sharedSyntax.termNotOccur.p2'/2. %% added djd
:- discontiguous 'sharedSyntax.termOccurCheck.p3'/3. %% added djd
:- discontiguous 'sharedSyntax.unifyTerms1.p5'/5. %% added djd
:- discontiguous 'sharedSyntax.unifyTerms0.p4'/4. %% added djd
:- discontiguous 'sharedSyntax.unifyingTermSubst.p4'/4. %% added djd
:- discontiguous '~sharedSyntax.maxVarIndexInTerms.p3'/3. %% added djd
:- discontiguous '~sharedSyntax.maxVarIndex.p3'/3. %% added djd
:- discontiguous '~sharedSyntax.checkVariantTypes1.p4'/4. %% added djd
:- discontiguous '~sharedSyntax.argFreeVars.p2'/2. %% added djd
:- discontiguous '~sharedSyntax.maxVarIndex1.p3'/3. %% added djd
:- discontiguous '~sharedSyntax.maxVarIndexInTerm.p3'/3. %% added djd
:- discontiguous '~sharedSyntax.sCheckVariantTypes.p4'/4. %% added djd
:- discontiguous '~sharedSyntax.sFormulaFreeVars.p2'/2. %% added djd
:- discontiguous '~sharedSyntax.sNotNewBinding.p4'/4. %% added djd
:- discontiguous '~sharedSyntax.sTermFreeVars.p2'/2. %% added djd
:- discontiguous '~sharedSyntax.unifyTermArgs.p5'/5. %% added djd
:- discontiguous '~sharedSyntax.sVariableName.p3'/3. %% added djd
:- discontiguous '~sharedSyntax.sUnifyAtoms.p4'/4. %% added djd
:- discontiguous '~sharedSyntax.termNotOccur1.p2'/2. %% added djd
:- discontiguous '~sharedSyntax.termNotOccur.p2'/2. %% added djd
:- discontiguous '~sharedSyntax.termOccurCheck.p3'/3. %% added djd
:- discontiguous '~sharedSyntax.unifyTerms1.p5'/5. %% added djd
:- discontiguous '~sharedSyntax.unifyTerms0.p4'/4. %% added djd
:- discontiguous '~sharedSyntax.unifyingTermSubst.p4'/4. %% added djd




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

'sharedSyntax.sTermMaxVarIndex.p2'(A, B) :-
        'integers':plus(C, 1, B),
        'integers':negative(1, D),
        'sharedSyntax.maxVarIndexInTerms.p3'(A, D, C).
'~sharedSyntax.sTermMaxVarIndex.p2'(A, B) :-
        'integers':plus(C, 1, B),
        'integers':negative(1, D),
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, D, C).
'sharedSyntax.maxVarIndexInTerms.p3'([], A, A).
'~sharedSyntax.maxVarIndexInTerms.p3'([], A, A).
'sharedSyntax.maxVarIndexInTerms.p3'([A|B], C, D) :-
        'sharedSyntax.maxVarIndexInTerm.p3'(A, C, E),
        'sharedSyntax.maxVarIndexInTerms.p3'(B, E, D).
'~sharedSyntax.maxVarIndexInTerms.p3'([A|B], C, D) :-
        '~sharedSyntax.maxVarIndexInTerm.p3'(A, C, E),
        '~sharedSyntax.maxVarIndexInTerms.p3'(B, E, D).
'sharedSyntax.maxVarIndex.p3'([], A, A).
'~sharedSyntax.maxVarIndex.p3'([], A, A).
'sharedSyntax.maxVarIndex.p3'([A|B], C, D) :-
        'sharedSyntax.maxVarIndex1.p3'(A, C, E),
        'sharedSyntax.maxVarIndex.p3'(B, E, D).
'~sharedSyntax.maxVarIndex.p3'([A|B], C, D) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex.p3'(B, E, D).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f1'(A), B, C, 'metaDefs.par.f2'(D,E)) :-
        'sharedSyntax.sNotNewBinding.p4'(B, C, 'metaDefs.par.f1'(A), 'metaDefs.par.f2'(D,E)).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f1'(A), B, C, 'metaDefs.par.f2'(D,E)) :-
        '~sharedSyntax.sNotNewBinding.p4'(B, C, 'metaDefs.par.f1'(A), 'metaDefs.par.f2'(D,E)).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f1'(A), B, C, 'metaDefs.par.f1'(D)) :-
        'sharedSyntax.sNotNewBinding.p4'(B, C, 'metaDefs.par.f1'(A), 'metaDefs.par.f1'(D)).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f1'(A), B, C, 'metaDefs.par.f1'(D)) :-
        '~sharedSyntax.sNotNewBinding.p4'(B, C, 'metaDefs.par.f1'(A), 'metaDefs.par.f1'(D)).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f2'(A,B), C, D, 'metaDefs.par.f1'(E)) :-
        'sharedSyntax.sNotNewBinding.p4'(C, D, 'metaDefs.par.f2'(A,B), 'metaDefs.par.f1'(E)).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f2'(A,B), C, D, 'metaDefs.par.f1'(E)) :-
        '~sharedSyntax.sNotNewBinding.p4'(C, D, 'metaDefs.par.f2'(A,B), 'metaDefs.par.f1'(E)).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f2'(A,B), C, D, 'metaDefs.par.f2'(E,F)) :-
        'sharedSyntax.sNotNewBinding.p4'(C, D, 'metaDefs.par.f2'(A,B), 'metaDefs.par.f2'(E,F)).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.par.f2'(A,B), C, D, 'metaDefs.par.f2'(E,F)) :-
        '~sharedSyntax.sNotNewBinding.p4'(C, D, 'metaDefs.par.f2'(A,B), 'metaDefs.par.f2'(E,F)).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.bType.f1'(A), B, B, 'metaDefs.bType.f1'(A)).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.bType.f1'(A), B, B, 'metaDefs.bType.f1'(A)).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.type.f2'(A,B), C, D, 'metaDefs.type.f2'(A,E)) :-
        'sharedSyntax.sCheckVariantTypes.p4'(B, C, D, E).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.type.f2'(A,B), C, D, 'metaDefs.type.f2'(A,E)) :-
        '~sharedSyntax.sCheckVariantTypes.p4'(B, C, D, E).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.xBType.f1'(A), B, B, 'metaDefs.xBType.f1'(A)).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.xBType.f1'(A), B, B, 'metaDefs.xBType.f1'(A)).
'sharedSyntax.checkVariantTypes1.p4'('metaDefs.xType.f2'(A,B), C, D, 'metaDefs.xType.f2'(A,E)) :-
        'sharedSyntax.sCheckVariantTypes.p4'(B, C, D, E).
'~sharedSyntax.checkVariantTypes1.p4'('metaDefs.xType.f2'(A,B), C, D, 'metaDefs.xType.f2'(A,E)) :-
        '~sharedSyntax.sCheckVariantTypes.p4'(B, C, D, E).
'sharedSyntax.argFreeVars.p2'([], []).
'~sharedSyntax.argFreeVars.p2'([], []).
'sharedSyntax.argFreeVars.p2'([A|B], C) :-
        'sharedSyntax.sTermFreeVars.p2'(A, D),
        'sharedSyntax.argFreeVars.p2'(B, E),
        'sharedSyntax.union.p3'(D, E, C).
'~sharedSyntax.argFreeVars.p2'([A|B], C) :-
        '~sharedSyntax.sTermFreeVars.p2'(A, D),
        '~sharedSyntax.argFreeVars.p2'(B, E),
        '~sharedSyntax.union.p3'(D, E, C).
'sharedSyntax.getVariable.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'sharedSyntax':'sharedSyntax.termNotOccur.p2'(A,B),'substs':'substs.bindVariable.p4'(B,A,C,D);D=C)).
'~sharedSyntax.getVariable.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'sharedSyntax':'~sharedSyntax.termNotOccur.p2'(A,B),'substs':'~substs.bindVariable.p4'(B,A,C,D);D=C)).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.empty.c0', A, A).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.empty.c0', A, A).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.pAtom.f1'(_), A, A).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.pAtom.f1'(_), A, A).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.atom.f2'(_,A), B, C) :-
        'sharedSyntax.maxVarIndexInTerms.p3'(A, B, C).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.atom.f2'(_,A), B, C) :-
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, B, C).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.&''.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndex1.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.&''.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.\\/''.f2'(A,B), C, D) :-   % added \ djd
        'sharedSyntax.maxVarIndex1.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.\\/''.f2'(A,B), C, D) :-  % added \ djd
        '~sharedSyntax.maxVarIndex1.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.->''.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndex1.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.->''.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.<-''.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndex1.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.<-''.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.<->''.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndex1.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.<->''.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.~''.f1'(A), B, C) :-
        'sharedSyntax.maxVarIndex1.p3'(A, B, C).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.~''.f1'(A), B, C) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, B, C).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.some.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndexInTerms.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.some.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.all.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndexInTerms.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.all.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.iT.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndex1.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.iT.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.iST.f3'(A,B,C), D, E) :-
        'sharedSyntax.maxVarIndexInTerms.p3'(A, D, F),
        'sharedSyntax.maxVarIndex1.p3'(B, F, G),
        'sharedSyntax.maxVarIndex1.p3'(C, G, E).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.iST.f3'(A,B,C), D, E) :-
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, D, F),
        '~sharedSyntax.maxVarIndex1.p3'(B, F, G),
        '~sharedSyntax.maxVarIndex1.p3'(C, G, E).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.iTE.f3'(A,B,C), D, E) :-
        'sharedSyntax.maxVarIndex1.p3'(A, D, F),
        'sharedSyntax.maxVarIndex1.p3'(B, F, G),
        'sharedSyntax.maxVarIndex1.p3'(C, G, E).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.iTE.f3'(A,B,C), D, E) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, D, F),
        '~sharedSyntax.maxVarIndex1.p3'(B, F, G),
        '~sharedSyntax.maxVarIndex1.p3'(C, G, E).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.iSTE.f4'(A,B,C,D), E, F) :-
        'sharedSyntax.maxVarIndexInTerms.p3'(A, E, G),
        'sharedSyntax.maxVarIndex1.p3'(B, G, H),
        'sharedSyntax.maxVarIndex1.p3'(C, H, I),
        'sharedSyntax.maxVarIndex1.p3'(D, I, F).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.iSTE.f4'(A,B,C,D), E, F) :-
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, E, G),
        '~sharedSyntax.maxVarIndex1.p3'(B, G, H),
        '~sharedSyntax.maxVarIndex1.p3'(C, H, I),
        '~sharedSyntax.maxVarIndex1.p3'(D, I, F).
'sharedSyntax.maxVarIndex1.p3'('metaDefs.commit.f2'(_,A), B, C) :-
        'sharedSyntax.maxVarIndex1.p3'(A, B, C).
'~sharedSyntax.maxVarIndex1.p3'('metaDefs.commit.f2'(_,A), B, C) :-
        '~sharedSyntax.maxVarIndex1.p3'(A, B, C).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.var.f1'(A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('integers':'~integers.>.p2'(A,B),true->C=A;C=B)).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.var.f1'(A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('integers':'~integers.>.p2'(A,B),true->C=A;C=B)).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.var.f2'(_,A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('integers':'~integers.>.p2'(A,B),true->C=A;C=B)).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.var.f2'(_,A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('integers':'~integers.>.p2'(A,B),true->C=A;C=B)).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.cTerm.f1'(_), A, A).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.cTerm.f1'(_), A, A).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.xCTerm.f2'(_,_), A, A).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.xCTerm.f2'(_,_), A, A).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.term.f2'(_,A), B, C) :-
        'sharedSyntax.maxVarIndexInTerms.p3'(A, B, C).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.term.f2'(_,A), B, C) :-
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, B, C).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.xTerm.f3'(_,A,_), B, C) :-
        'sharedSyntax.maxVarIndexInTerms.p3'(A, B, C).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.xTerm.f3'(_,A,_), B, C) :-
        '~sharedSyntax.maxVarIndexInTerms.p3'(A, B, C).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.int.f1'(_), A, A).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.int.f1'(_), A, A).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.str.f1'(_), A, A).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.str.f1'(_), A, A).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.prm.f1'(_), A, A).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.prm.f1'(_), A, A).
'sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.suchThat.f2'(A,B), C, D) :-
        'sharedSyntax.maxVarIndexInTerm.p3'(A, C, E),
        'sharedSyntax.maxVarIndex1.p3'(B, E, D).
'~sharedSyntax.maxVarIndexInTerm.p3'('metaDefs.suchThat.f2'(A,B), C, D) :-
        '~sharedSyntax.maxVarIndexInTerm.p3'(A, C, E),
        '~sharedSyntax.maxVarIndex1.p3'(B, E, D).
'sharedSyntax.sFormulaMaxVarIndex.p2'(A, B) :-
        'integers':plus(C, 1, B),
        'integers':negative(1, D),
        'sharedSyntax.maxVarIndex.p3'(A, D, C).
'~sharedSyntax.sFormulaMaxVarIndex.p2'(A, B) :-
        'integers':plus(C, 1, B),
        'integers':negative(1, D),
        '~sharedSyntax.maxVarIndex.p3'(A, D, C).
'sharedSyntax.sEmptyTermSubst.p1'('substs.termSubst.f2'(A,[])) :-
        'substs':'substs.emptyHeap.p1'(A).
'~sharedSyntax.sEmptyTermSubst.p1'('substs.termSubst.f2'(A,[])) :-
        'substs':'~substs.emptyHeap.p1'(A).
'sharedSyntax.sCheckVariantTypes.p4'([], A, A, []).
'~sharedSyntax.sCheckVariantTypes.p4'([], A, A, []).
'sharedSyntax.sCheckVariantTypes.p4'([A|B], C, D, [E|F]) :-
        'sharedSyntax.checkVariantTypes1.p4'(A, C, G, E),
        'sharedSyntax.sCheckVariantTypes.p4'(B, G, D, F).
'~sharedSyntax.sCheckVariantTypes.p4'([A|B], C, D, [E|F]) :-
        '~sharedSyntax.checkVariantTypes1.p4'(A, C, G, E),
        '~sharedSyntax.sCheckVariantTypes.p4'(B, G, D, F).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.empty.c0', []).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.empty.c0', []).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.pAtom.f1'(_), []).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.pAtom.f1'(_), []).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.atom.f2'(_,A), B) :-
        'sharedSyntax.argFreeVars.p2'(A, B).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.atom.f2'(_,A), B) :-
        '~sharedSyntax.argFreeVars.p2'(A, B).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.xPAtom.f1'(_), []).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.xPAtom.f1'(_), []).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.xAtom.f2'(_,A), B) :-
        'sharedSyntax.argFreeVars.p2'(A, B).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.xAtom.f2'(_,A), B) :-
        '~sharedSyntax.argFreeVars.p2'(A, B).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.~''.f1'(A), B) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, B).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.~''.f1'(A), B) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, B).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.&''.f2'(A,B), C) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.union.p3'(D, E, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.&''.f2'(A,B), C) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.union.p3'(D, E, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.\\/''.f2'(A,B), C) :-   % added \ djd
        'sharedSyntax.sFormulaFreeVars.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.union.p3'(D, E, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.\\/''.f2'(A,B), C) :-   % added \ djd
        '~sharedSyntax.sFormulaFreeVars.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.union.p3'(D, E, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.->''.f2'(A,B), C) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.union.p3'(D, E, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.->''.f2'(A,B), C) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.union.p3'(D, E, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.<-''.f2'(A,B), C) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.union.p3'(D, E, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.<-''.f2'(A,B), C) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.union.p3'(D, E, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.<->''.f2'(A,B), C) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.union.p3'(D, E, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.<->''.f2'(A,B), C) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.union.p3'(D, E, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.all.f2'(A,B), C) :-
        'sharedSyntax.order.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.difference.p3'(E, D, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.all.f2'(A,B), C) :-
        '~sharedSyntax.order.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.difference.p3'(E, D, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.some.f2'(A,B), C) :-
        'sharedSyntax.order.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.difference.p3'(E, D, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.some.f2'(A,B), C) :-
        '~sharedSyntax.order.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.difference.p3'(E, D, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iSTE.f4'(A,B,C,D), E) :-
        'sharedSyntax.order.p2'(A, F),
        'sharedSyntax.sFormulaFreeVars.p2'(B, G),
        'sharedSyntax.sFormulaFreeVars.p2'(C, H),
        'sharedSyntax.sFormulaFreeVars.p2'(D, I),
        'sharedSyntax.union.p3'(G, H, J),
        'sharedSyntax.difference.p3'(J, F, K),
        'sharedSyntax.union.p3'(K, I, E).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iSTE.f4'(A,B,C,D), E) :-
        '~sharedSyntax.order.p2'(A, F),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, G),
        '~sharedSyntax.sFormulaFreeVars.p2'(C, H),
        '~sharedSyntax.sFormulaFreeVars.p2'(D, I),
        '~sharedSyntax.union.p3'(G, H, J),
        '~sharedSyntax.difference.p3'(J, F, K),
        '~sharedSyntax.union.p3'(K, I, E).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iTE.f3'(A,B,C), D) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, E),
        'sharedSyntax.sFormulaFreeVars.p2'(B, F),
        'sharedSyntax.sFormulaFreeVars.p2'(C, G),
        'sharedSyntax.union.p3'(E, F, H),
        'sharedSyntax.union.p3'(H, G, D).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iTE.f3'(A,B,C), D) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, E),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, F),
        '~sharedSyntax.sFormulaFreeVars.p2'(C, G),
        '~sharedSyntax.union.p3'(E, F, H),
        '~sharedSyntax.union.p3'(H, G, D).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iST.f3'(A,B,C), D) :-
        'sharedSyntax.order.p2'(A, E),
        'sharedSyntax.sFormulaFreeVars.p2'(B, F),
        'sharedSyntax.sFormulaFreeVars.p2'(C, G),
        'sharedSyntax.union.p3'(F, G, H),
        'sharedSyntax.difference.p3'(H, E, D).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iST.f3'(A,B,C), D) :-
        '~sharedSyntax.order.p2'(A, E),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, F),
        '~sharedSyntax.sFormulaFreeVars.p2'(C, G),
        '~sharedSyntax.union.p3'(F, G, H),
        '~sharedSyntax.difference.p3'(H, E, D).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iT.f2'(A,B), C) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.union.p3'(D, E, C).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.iT.f2'(A,B), C) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.union.p3'(D, E, C).
'sharedSyntax.sFormulaFreeVars.p2'('metaDefs.commit.f2'(_,A), B) :-
        'sharedSyntax.sFormulaFreeVars.p2'(A, B).
'~sharedSyntax.sFormulaFreeVars.p2'('metaDefs.commit.f2'(_,A), B) :-
        '~sharedSyntax.sFormulaFreeVars.p2'(A, B).
'sharedSyntax.sNotNewBinding.p4'([], ['metaDefs.!.f2'(A,B)], A, B).
'~sharedSyntax.sNotNewBinding.p4'([], ['metaDefs.!.f2'(A,B)], A, B).
'sharedSyntax.sNotNewBinding.p4'(['metaDefs.!.f2'(B,C)|A], D, E, F) :-
        user:goedel_freeze(ground([B,E]), (B=E,true->C=F,D=G;user:not_equal([],[C,F],C,F),D=['metaDefs.!.f2'(B,C)|G])),
        'sharedSyntax.sNotNewBinding.p4'(A, G, E, F).
'~sharedSyntax.sNotNewBinding.p4'(['metaDefs.!.f2'(B,C)|A], D, E, F) :-
        user:goedel_freeze(ground([B,E]), (B=E,true->C=F,D=G;user:not_equal([],[C,F],C,F),D=['metaDefs.!.f2'(B,C)|G])),
        '~sharedSyntax.sNotNewBinding.p4'(A, G, E, F).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.var.f2'(A,B), ['metaDefs.var.f2'(A,B)]).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.var.f2'(A,B), ['metaDefs.var.f2'(A,B)]).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.var.f1'(A), ['metaDefs.var.f1'(A)]).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.var.f1'(A), ['metaDefs.var.f1'(A)]).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.term.f2'(_,A), B) :-
        'sharedSyntax.argFreeVars.p2'(A, B).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.term.f2'(_,A), B) :-
        '~sharedSyntax.argFreeVars.p2'(A, B).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.xTerm.f3'(_,A,_), B) :-
        'sharedSyntax.argFreeVars.p2'(A, B).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.xTerm.f3'(_,A,_), B) :-
        '~sharedSyntax.argFreeVars.p2'(A, B).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.cTerm.f1'(_), []).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.cTerm.f1'(_), []).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.xCTerm.f2'(_,_), []).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.xCTerm.f2'(_,_), []).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.int.f1'(_), []).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.int.f1'(_), []).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.num.f1'(_), []).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.num.f1'(_), []).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.str.f1'(_), []).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.str.f1'(_), []).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.prm.f1'(_), []).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.prm.f1'(_), []).
'sharedSyntax.sTermFreeVars.p2'('metaDefs.suchThat.f2'(A,B), C) :-
        'sharedSyntax.sTermFreeVars.p2'(A, D),
        'sharedSyntax.sFormulaFreeVars.p2'(B, E),
        'sharedSyntax.difference.p3'(E, D, C).
'~sharedSyntax.sTermFreeVars.p2'('metaDefs.suchThat.f2'(A,B), C) :-
        '~sharedSyntax.sTermFreeVars.p2'(A, D),
        '~sharedSyntax.sFormulaFreeVars.p2'(B, E),
        '~sharedSyntax.difference.p3'(E, D, C).
'sharedSyntax.unifyTermArgs.p5'([], [], _, A, A).
'~sharedSyntax.unifyTermArgs.p5'([], [], _, A, A).
'sharedSyntax.unifyTermArgs.p5'([A|B], [C|D], E, F, G) :-
        'sharedSyntax.unifyTerms1.p5'(A, C, E, F, H),
        'sharedSyntax.unifyTermArgs.p5'(B, D, E, H, G).
'~sharedSyntax.unifyTermArgs.p5'([A|B], [C|D], E, F, G) :-
        '~sharedSyntax.unifyTerms1.p5'(A, C, E, F, H),
        '~sharedSyntax.unifyTermArgs.p5'(B, D, E, H, G).
'sharedSyntax.sVariableName.p3'('metaDefs.var.f2'(A,B), A, B) :-
        call_residue(user:not_equal([],[A],A,'"v'), C),
        (   C=[] ->
            !
        ;   user:release_suspended(C)
        ).
'~sharedSyntax.sVariableName.p3'('metaDefs.var.f2'(A,B), A, B) :-
        user:not_equal([], [A], A, '"v').
'sharedSyntax.sVariableName.p3'('metaDefs.var.f1'(A), '"v', A) :- !.
'~sharedSyntax.sVariableName.p3'('metaDefs.var.f1'(A), '"v', A).
'sharedSyntax.sUnifyTerms.p4'(A, B, C, D) :-
        'substs':'substs.substApplyToTerm.p3'(A, C, E),
        'sharedSyntax.unifyTerms0.p4'(E, B, C, D).
'~sharedSyntax.sUnifyTerms.p4'(A, B, C, D) :-
        'substs':'~substs.substApplyToTerm.p3'(A, C, E),
        '~sharedSyntax.unifyTerms0.p4'(E, B, C, D).
'sharedSyntax.sUnifyAtoms.p4'('metaDefs.pAtom.f1'(A), 'metaDefs.pAtom.f1'(A), B, B).
'~sharedSyntax.sUnifyAtoms.p4'('metaDefs.pAtom.f1'(A), 'metaDefs.pAtom.f1'(A), B, B).
'sharedSyntax.sUnifyAtoms.p4'('metaDefs.xPAtom.f1'(A), 'metaDefs.xPAtom.f1'(A), B, B).
'~sharedSyntax.sUnifyAtoms.p4'('metaDefs.xPAtom.f1'(A), 'metaDefs.xPAtom.f1'(A), B, B).
'sharedSyntax.sUnifyAtoms.p4'('metaDefs.atom.f2'(A,B), 'metaDefs.atom.f2'(A,C), D, E) :-
        'sharedSyntax.unifyingTermSubst.p4'(B, C, D, E).
'~sharedSyntax.sUnifyAtoms.p4'('metaDefs.atom.f2'(A,B), 'metaDefs.atom.f2'(A,C), D, E) :-
        '~sharedSyntax.unifyingTermSubst.p4'(B, C, D, E).
'sharedSyntax.sUnifyAtoms.p4'('metaDefs.xAtom.f2'(A,B), 'metaDefs.xAtom.f2'(A,C), D, E) :-
        'sharedSyntax.unifyingTermSubst.p4'(B, C, D, E).
'~sharedSyntax.sUnifyAtoms.p4'('metaDefs.xAtom.f2'(A,B), 'metaDefs.xAtom.f2'(A,C), D, E) :-
        '~sharedSyntax.unifyingTermSubst.p4'(B, C, D, E).
'sharedSyntax.termNotOccur1.p2'([], _).
'~sharedSyntax.termNotOccur1.p2'([], _).
'sharedSyntax.termNotOccur1.p2'([A|B], C) :-
        'sharedSyntax.termNotOccur.p2'(A, C),
        'sharedSyntax.termNotOccur1.p2'(B, C).
'~sharedSyntax.termNotOccur1.p2'([A|B], C) :-
        '~sharedSyntax.termNotOccur.p2'(A, C),
        '~sharedSyntax.termNotOccur1.p2'(B, C).
'sharedSyntax.termNotOccur.p2'('metaDefs.var.f2'(A,B), C) :-
        user:not_equal([], [C,A,B], C, 'metaDefs.var.f2'(A,B)).
'~sharedSyntax.termNotOccur.p2'('metaDefs.var.f2'(A,B), C) :-
        user:not_equal([], [C,A,B], C, 'metaDefs.var.f2'(A,B)).
'sharedSyntax.termNotOccur.p2'('metaDefs.var.f1'(A), B) :-
        user:not_equal([], [B,A], B, 'metaDefs.var.f1'(A)).
'~sharedSyntax.termNotOccur.p2'('metaDefs.var.f1'(A), B) :-
        user:not_equal([], [B,A], B, 'metaDefs.var.f1'(A)).
'sharedSyntax.termNotOccur.p2'('metaDefs.cTerm.f1'(_), _).
'~sharedSyntax.termNotOccur.p2'('metaDefs.cTerm.f1'(_), _).
'sharedSyntax.termNotOccur.p2'('metaDefs.term.f2'(_,A), B) :-
        'sharedSyntax.termNotOccur1.p2'(A, B).
'~sharedSyntax.termNotOccur.p2'('metaDefs.term.f2'(_,A), B) :-
        '~sharedSyntax.termNotOccur1.p2'(A, B).
'sharedSyntax.termNotOccur.p2'('metaDefs.xCTerm.f2'(_,_), _).
'~sharedSyntax.termNotOccur.p2'('metaDefs.xCTerm.f2'(_,_), _).
'sharedSyntax.termNotOccur.p2'('metaDefs.int.f1'(_), _).
'~sharedSyntax.termNotOccur.p2'('metaDefs.int.f1'(_), _).
'sharedSyntax.termNotOccur.p2'('metaDefs.str.f1'(_), _).
'~sharedSyntax.termNotOccur.p2'('metaDefs.str.f1'(_), _).
'sharedSyntax.termNotOccur.p2'('metaDefs.prm.f1'(_), _).
'~sharedSyntax.termNotOccur.p2'('metaDefs.prm.f1'(_), _).
'sharedSyntax.termNotOccur.p2'('metaDefs.xTerm.f3'(_,A,_), B) :-
        'sharedSyntax.termNotOccur1.p2'(A, B).
'~sharedSyntax.termNotOccur.p2'('metaDefs.xTerm.f3'(_,A,_), B) :-
        '~sharedSyntax.termNotOccur1.p2'(A, B).
'sharedSyntax.termOccurCheck.p3'('substs.read.c0', A, B) :-
        'sharedSyntax.termNotOccur1.p2'(B, A).
'~sharedSyntax.termOccurCheck.p3'('substs.read.c0', A, B) :-
        '~sharedSyntax.termNotOccur1.p2'(B, A).
'sharedSyntax.termOccurCheck.p3'('substs.write.c0', _, _).
'~sharedSyntax.termOccurCheck.p3'('substs.write.c0', _, _).
'sharedSyntax.unifyTerms1.p5'('metaDefs.var.f2'(A,B), C, D, E, F) :-
        'substs':'substs.unifyKnownVariable.p5'(D, C, 'metaDefs.var.f2'(A,B), E, F).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.var.f2'(A,B), C, D, E, F) :-
        'substs':'~substs.unifyKnownVariable.p5'(D, C, 'metaDefs.var.f2'(A,B), E, F).
'sharedSyntax.unifyTerms1.p5'('metaDefs.var.f1'(A), B, C, D, E) :-
        'substs':'substs.unifyKnownVariable.p5'(C, B, 'metaDefs.var.f1'(A), D, E).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.var.f1'(A), B, C, D, E) :-
        'substs':'~substs.unifyKnownVariable.p5'(C, B, 'metaDefs.var.f1'(A), D, E).
'sharedSyntax.unifyTerms1.p5'('metaDefs.cTerm.f1'(A), B, C, D, E) :-
        'substs':'substs.unifyConstant.p5'(C, B, 'metaDefs.cTerm.f1'(A), D, E).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.cTerm.f1'(A), B, C, D, E) :-
        'substs':'~substs.unifyConstant.p5'(C, B, 'metaDefs.cTerm.f1'(A), D, E).
'sharedSyntax.unifyTerms1.p5'('metaDefs.term.f2'(A,B), C, D, E, F) :-
        'substs':'substs.unifyFunction.p6'(D, C, 'metaDefs.term.f2'(A,G), H, E, I),
        'sharedSyntax.termOccurCheck.p3'(H, C, B),
        'sharedSyntax.unifyTermArgs.p5'(B, G, H, I, F).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.term.f2'(A,B), C, D, E, F) :-
        'substs':'~substs.unifyFunction.p6'(D, C, 'metaDefs.term.f2'(A,G), H, E, I),
        '~sharedSyntax.termOccurCheck.p3'(H, C, B),
        '~sharedSyntax.unifyTermArgs.p5'(B, G, H, I, F).
'sharedSyntax.unifyTerms1.p5'('metaDefs.xTerm.f3'(A,B,C), D, E, F, G) :-
        'substs':'substs.unifyFunction.p6'(E, D, 'metaDefs.xTerm.f3'(A,H,C), I, F, J),
        'sharedSyntax.termOccurCheck.p3'(I, D, B),
        'sharedSyntax.unifyTermArgs.p5'(B, H, I, J, G).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.xTerm.f3'(A,B,C), D, E, F, G) :-
        'substs':'~substs.unifyFunction.p6'(E, D, 'metaDefs.xTerm.f3'(A,H,C), I, F, J),
        '~sharedSyntax.termOccurCheck.p3'(I, D, B),
        '~sharedSyntax.unifyTermArgs.p5'(B, H, I, J, G).
'sharedSyntax.unifyTerms1.p5'('metaDefs.xCTerm.f2'(A,B), C, D, E, F) :-
        'substs':'substs.unifyConstant.p5'(D, C, 'metaDefs.xCTerm.f2'(A,B), E, F).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.xCTerm.f2'(A,B), C, D, E, F) :-
        'substs':'~substs.unifyConstant.p5'(D, C, 'metaDefs.xCTerm.f2'(A,B), E, F).
'sharedSyntax.unifyTerms1.p5'('metaDefs.int.f1'(A), B, C, D, E) :-
        'substs':'substs.unifyConstant.p5'(C, B, 'metaDefs.int.f1'(A), D, E).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.int.f1'(A), B, C, D, E) :-
        'substs':'~substs.unifyConstant.p5'(C, B, 'metaDefs.int.f1'(A), D, E).
'sharedSyntax.unifyTerms1.p5'('metaDefs.str.f1'(A), B, C, D, E) :-
        'substs':'substs.unifyConstant.p5'(C, B, 'metaDefs.str.f1'(A), D, E).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.str.f1'(A), B, C, D, E) :-
        'substs':'~substs.unifyConstant.p5'(C, B, 'metaDefs.str.f1'(A), D, E).
'sharedSyntax.unifyTerms1.p5'('metaDefs.prm.f1'(A), B, C, D, E) :-
        'substs':'substs.unifyConstant.p5'(C, B, 'metaDefs.prm.f1'(A), D, E).
'~sharedSyntax.unifyTerms1.p5'('metaDefs.prm.f1'(A), B, C, D, E) :-
        'substs':'~substs.unifyConstant.p5'(C, B, 'metaDefs.prm.f1'(A), D, E).
'sharedSyntax.unifyTerms0.p4'('metaDefs.var.f2'(A,B), C, D, E) :-
        'sharedSyntax.getVariable.p4'(C, 'metaDefs.var.f2'(A,B), D, E).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.var.f2'(A,B), C, D, E) :-
        '~sharedSyntax.getVariable.p4'(C, 'metaDefs.var.f2'(A,B), D, E).
'sharedSyntax.unifyTerms0.p4'('metaDefs.var.f1'(A), B, C, D) :-
        'sharedSyntax.getVariable.p4'(B, 'metaDefs.var.f1'(A), C, D).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.var.f1'(A), B, C, D) :-
        '~sharedSyntax.getVariable.p4'(B, 'metaDefs.var.f1'(A), C, D).
'sharedSyntax.unifyTerms0.p4'('metaDefs.cTerm.f1'(A), B, C, D) :-
        'substs':'substs.getConstant.p4'(B, 'metaDefs.cTerm.f1'(A), C, D).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.cTerm.f1'(A), B, C, D) :-
        'substs':'~substs.getConstant.p4'(B, 'metaDefs.cTerm.f1'(A), C, D).
'sharedSyntax.unifyTerms0.p4'('metaDefs.term.f2'(A,B), C, D, E) :-
        'substs':'substs.getFunction.p5'(C, 'metaDefs.term.f2'(A,F), G, D, H),
        'sharedSyntax.termOccurCheck.p3'(G, C, B),
        'sharedSyntax.unifyTermArgs.p5'(B, F, G, H, E).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.term.f2'(A,B), C, D, E) :-
        'substs':'~substs.getFunction.p5'(C, 'metaDefs.term.f2'(A,F), G, D, H),
        '~sharedSyntax.termOccurCheck.p3'(G, C, B),
        '~sharedSyntax.unifyTermArgs.p5'(B, F, G, H, E).
'sharedSyntax.unifyTerms0.p4'('metaDefs.xTerm.f3'(A,B,C), D, E, F) :-
        'substs':'substs.getFunction.p5'(D, 'metaDefs.xTerm.f3'(A,G,C), H, E, I),
        'sharedSyntax.termOccurCheck.p3'(H, D, B),
        'sharedSyntax.unifyTermArgs.p5'(B, G, H, I, F).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.xTerm.f3'(A,B,C), D, E, F) :-
        'substs':'~substs.getFunction.p5'(D, 'metaDefs.xTerm.f3'(A,G,C), H, E, I),
        '~sharedSyntax.termOccurCheck.p3'(H, D, B),
        '~sharedSyntax.unifyTermArgs.p5'(B, G, H, I, F).
'sharedSyntax.unifyTerms0.p4'('metaDefs.xCTerm.f2'(A,B), C, D, E) :-
        'substs':'substs.getConstant.p4'(C, 'metaDefs.xCTerm.f2'(A,B), D, E).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.xCTerm.f2'(A,B), C, D, E) :-
        'substs':'~substs.getConstant.p4'(C, 'metaDefs.xCTerm.f2'(A,B), D, E).
'sharedSyntax.unifyTerms0.p4'('metaDefs.int.f1'(A), B, C, D) :-
        'substs':'substs.getConstant.p4'(B, 'metaDefs.int.f1'(A), C, D).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.int.f1'(A), B, C, D) :-
        'substs':'~substs.getConstant.p4'(B, 'metaDefs.int.f1'(A), C, D).
'sharedSyntax.unifyTerms0.p4'('metaDefs.str.f1'(A), B, C, D) :-
        'substs':'substs.getConstant.p4'(B, 'metaDefs.str.f1'(A), C, D).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.str.f1'(A), B, C, D) :-
        'substs':'~substs.getConstant.p4'(B, 'metaDefs.str.f1'(A), C, D).
'sharedSyntax.unifyTerms0.p4'('metaDefs.prm.f1'(A), B, C, D) :-
        'substs':'substs.getConstant.p4'(B, 'metaDefs.prm.f1'(A), C, D).
'~sharedSyntax.unifyTerms0.p4'('metaDefs.prm.f1'(A), B, C, D) :-
        'substs':'~substs.getConstant.p4'(B, 'metaDefs.prm.f1'(A), C, D).
'sharedSyntax.unifyingTermSubst.p4'([], [], A, A).
'~sharedSyntax.unifyingTermSubst.p4'([], [], A, A).
'sharedSyntax.unifyingTermSubst.p4'([A|B], [C|D], E, F) :-
        'sharedSyntax.sUnifyTerms.p4'(A, C, E, G),
        'sharedSyntax.unifyingTermSubst.p4'(B, D, G, F).
'~sharedSyntax.unifyingTermSubst.p4'([A|B], [C|D], E, F) :-
        '~sharedSyntax.sUnifyTerms.p4'(A, C, E, G),
        '~sharedSyntax.unifyingTermSubst.p4'(B, D, G, F).
%------------------------------------------------------------------------------
% Supplementary Syntax routines shared by the parser
%------------------------------------------------------------------------------

%------------------------------------------------------------------------------
% Pseudo-set maniplation predicates
%------------------------------------------------------------------------------

'sharedSyntax.order.p2'(X, Y) :-
   sort(X, Y).

'~sharedSyntax.order.p2'(X, Y) :-
   sort(X, Y).
 
'sharedSyntax.union.p3'(X, Y, Z) :-
   user:union(X, Y, Z).

'~sharedSyntax.union.p3'(X, Y, Z) :-
   user:union(X, Y, Z).

'sharedSyntax.difference.p3'(X, Y, Z) :-
   user:difference(X, Y, Z).

'~sharedSyntax.difference.p3'(X, Y, Z) :-
   user:difference(X, Y, Z).

%------------------------------------------------------------------------------
% Integer to Character List conversion
%------------------------------------------------------------------------------
 
'sharedSyntax.integerToCharDL.p3'(Int, Chars, CharsT) :-
   ( Int = 0 ->
     Chars = [48|CharsT]   % 48 for 0
   ; Int < 0 ->
     Chars = [45|Chars1],   % 45 for -
     Int1 is -Int,
     int_to_char_dl(Int1, Chars1, CharsT) 
   ; int_to_char_dl(Int, Chars, CharsT)
   ).

'~sharedSyntax.integerToCharDL.p3'(Int, Chars, CharsT) :-
   'sharedSyntax.integerToCharDL.p3'(Int, Chars, CharsT).

int_to_char_dl(Int, Chars, CharsT) :-
   ( Int = 0 ->
     Chars = CharsT
   ; C is 48 + Int mod 10,   % 48 for 0
     Int1 is Int // 10,
     int_to_char_dl(Int1, Chars, [C|CharsT])
   ).

