:- style_check(-singleton). % added djd
%% :- module('Syntax', []).
:- module(syntax).  %% convered djd

:- discontiguous 'Syntax.GroundType.P1.0'/1. %% added djd
:- discontiguous '~Syntax.GroundType.P1.0'/1. %% added djd
:- discontiguous 'Syntax.CommitFreeFormula.P1.0'/1. %% added djd
:- discontiguous '~Syntax.CommitFreeFormula.P1.0'/1. %% added djd
:- discontiguous 'Syntax.Atom.P1.0'/1. %% added djd
:- discontiguous '~Syntax.Atom.P1.0'/1. %% added djd
:- discontiguous 'Syntax.AppendTypeBindings.P3'/3. %% added djd
:- discontiguous '~Syntax.AppendTypeBindings.P3'/3. %% added djd
:- discontiguous 'Syntax.AppendTermBindings.P3'/3. %% added djd
:- discontiguous '~Syntax.AppendTermBindings.P3'/3. %% added djd
:- discontiguous 'Syntax.ApplySubstToTerm.P8'/8. %% added djd
:- discontiguous '~Syntax.ApplySubstToTerm.P8'/8. %% added djd
:- discontiguous 'Syntax.ApplySubstToFormula.P9'/9. %% added djd
:- discontiguous '~Syntax.ApplySubstToFormula.P9'/9. %% added djd
:- discontiguous 'Syntax.ApplySubstToFormula.P3.0'/3. %% added djd
:- discontiguous '~Syntax.ApplySubstToFormula.P3.0'/3. %% added djd
:- discontiguous 'Syntax.ApplySubstToArgs.P8'/8. %% added djd
:- discontiguous '~Syntax.ApplySubstToArgs.P8'/8. %% added djd
:- discontiguous 'Syntax.ApplySubstToVarTypes.P3'/3. %% added djd
:- discontiguous '~Syntax.ApplySubstToVarTypes.P3'/3. %% added djd
:- discontiguous 'Syntax.CheckVariantTerms1.P4'/4. %% added djd
:- discontiguous '~Syntax.CheckVariantTerms1.P4'/4. %% added djd
:- discontiguous 'Syntax.CheckVariantFormulas1.P4'/4. %% added djd
:- discontiguous '~Syntax.CheckVariantFormulas1.P4'/4. %% added djd
:- discontiguous 'Syntax.CheckFunctionTerm1.P10'/10. %% added djd
:- discontiguous '~Syntax.CheckFunctionTerm1.P10'/10. %% added djd
:- discontiguous 'Syntax.CheckFunctionTerm.P10'/10. %% added djd
:- discontiguous '~Syntax.CheckFunctionTerm.P10'/10. %% added djd
:- discontiguous 'Syntax.CheckVariantFormulas.P4'/4. %% added djd
:- discontiguous '~Syntax.CheckVariantFormulas.P4'/4. %% added djd
:- discontiguous 'Syntax.CheckVariantTerms.P4'/4. %% added djd
:- discontiguous '~Syntax.CheckVariantTerms.P4'/4. %% added djd
:- discontiguous 'Syntax.CombineVarTypings1.P6'/6. %% added djd
:- discontiguous '~Syntax.CombineVarTypings1.P6'/6. %% added djd
:- discontiguous 'Syntax.ConjunctionOfAtoms.P1.0'/1. %% added djd
:- discontiguous '~Syntax.ConjunctionOfAtoms.P1.0'/1. %% added djd
:- discontiguous 'Syntax.ConditionalFreeFormula.P1'/1. %% added djd
:- discontiguous '~Syntax.ConditionalFreeFormula.P1'/1. %% added djd
:- discontiguous 'Syntax.ConstantTerm.P2'/2. %% added djd
:- discontiguous '~Syntax.ConstantTerm.P2'/2. %% added djd
:- discontiguous 'Syntax.DefiniteBody.P1.0'/1. %% added djd
:- discontiguous '~Syntax.DefiniteBody.P1.0'/1. %% added djd
:- discontiguous 'Syntax.DefiniteStatement.P1.0'/1. %% added djd
:- discontiguous '~Syntax.DefiniteStatement.P1.0'/1. %% added djd
:- discontiguous 'Syntax.DeleteBindings.P3'/3. %% added djd
:- discontiguous '~Syntax.DeleteBindings.P3'/3. %% added djd
:- discontiguous 'Syntax.DeleteAllVars.P3'/3. %% added djd
:- discontiguous '~Syntax.DeleteAllVars.P3'/3. %% added djd
:- discontiguous 'Syntax.Derive.P7.0'/7. %% added djd
:- discontiguous '~Syntax.Derive.P7.0'/7. %% added djd
:- discontiguous 'Syntax.DeleteVarTypeBindings.P3'/3. %% added djd
:- discontiguous '~Syntax.DeleteVarTypeBindings.P3'/3. %% added djd
:- discontiguous 'Syntax.FindTypeBindings.P3'/3. %% added djd
:- discontiguous '~Syntax.FindTypeBindings.P3'/3. %% added djd
:- discontiguous 'Syntax.FindTermBindings.P3'/3. %% added djd
:- discontiguous '~Syntax.FindTermBindings.P3'/3. %% added djd
:- discontiguous 'Syntax.GroundAtom.P1.0'/1. %% added djd
:- discontiguous '~Syntax.GroundAtom.P1.0'/1. %% added djd
:- discontiguous 'Syntax.GroundTerm.P1.0'/1. %% added djd
:- discontiguous '~Syntax.GroundTerm.P1.0'/1. %% added djd
:- discontiguous 'Syntax.GroundTerm1.P1'/1. %% added djd
:- discontiguous '~Syntax.GroundTerm1.P1'/1. %% added djd
:- discontiguous 'Syntax.Parameter.P1.0'/1. %% added djd
:- discontiguous '~Syntax.Parameter.P1.0'/1. %% added djd
:- discontiguous 'Syntax.NormalBody.P1.0'/1. %% added djd
:- discontiguous '~Syntax.NormalBody.P1.0'/1. %% added djd
:- discontiguous 'Syntax.GroundType1.P1'/1. %% added djd
:- discontiguous '~Syntax.GroundType1.P1'/1. %% added djd
:- discontiguous 'Syntax.MaxParIndex.P3'/3. %% added djd
:- discontiguous '~Syntax.MaxParIndex.P3'/3. %% added djd
:- discontiguous 'Syntax.MaxParIndex1.P3'/3. %% added djd
:- discontiguous '~Syntax.MaxParIndex1.P3'/3. %% added djd
:- discontiguous 'Syntax.NonParameter.P1.0'/1. %% added djd
:- discontiguous '~Syntax.NonParameter.P1.0'/1. %% added djd
:- discontiguous 'Syntax.NonVariable.P1.0'/1. %% added djd
:- discontiguous '~Syntax.NonVariable.P1.0'/1. %% added djd
:- discontiguous 'Syntax.NormalStatement.P1.0'/1. %% added djd
:- discontiguous '~Syntax.NormalStatement.P1.0'/1. %% added djd
:- discontiguous 'Syntax.OpaqueTerm.P1.0'/1. %% added djd
:- discontiguous '~Syntax.OpaqueTerm.P1.0'/1. %% added djd
:- discontiguous 'Syntax.NotMember.P2'/2. %% added djd
:- discontiguous '~Syntax.NotMember.P2'/2. %% added djd
:- discontiguous 'Syntax.OpaqueAtom.P1.0'/1. %% added djd
:- discontiguous '~Syntax.OpaqueAtom.P1.0'/1. %% added djd
:- discontiguous 'Syntax.OpaqueType.P1.0'/1. %% added djd
:- discontiguous '~Syntax.OpaqueType.P1.0'/1. %% added djd
:- discontiguous 'Syntax.RenameAllTerm2.P4'/4. %% added djd
:- discontiguous '~Syntax.RenameAllTerm2.P4'/4. %% added djd
:- discontiguous 'Syntax.ParamsInType.P3'/3. %% added djd
:- discontiguous '~Syntax.ParamsInType.P3'/3. %% added djd
:- discontiguous 'Syntax.ParameterName.P3'/3. %% added djd
:- discontiguous '~Syntax.ParameterName.P3'/3. %% added djd
:- discontiguous 'Syntax.ParamsInType1.P3'/3. %% added djd
:- discontiguous '~Syntax.ParamsInType1.P3'/3. %% added djd
:- discontiguous 'Syntax.RenameAllFormula2.P4'/4. %% added djd
:- discontiguous '~Syntax.RenameAllFormula2.P4'/4. %% added djd
:- discontiguous 'Syntax.RenameAllFormula3.P6'/6. %% added djd
:- discontiguous '~Syntax.RenameAllFormula3.P6'/6. %% added djd
:- discontiguous 'Syntax.RenameAllType3.P6'/6. %% added djd
:- discontiguous '~Syntax.RenameAllType3.P6'/6. %% added djd
:- discontiguous 'Syntax.RenameAllTerm4.P6'/6. %% added djd
:- discontiguous '~Syntax.RenameAllTerm4.P6'/6. %% added djd
:- discontiguous 'Syntax.RenameAllTerm3.P6'/6. %% added djd
:- discontiguous '~Syntax.RenameAllTerm3.P6'/6. %% added djd
:- discontiguous 'Syntax.RenameAllType2.P4'/4. %% added djd
:- discontiguous '~Syntax.RenameAllType2.P4'/4. %% added djd
:- discontiguous 'Syntax.RenameAllType4.P6'/6. %% added djd
:- discontiguous '~Syntax.RenameAllType4.P6'/6. %% added djd
:- discontiguous 'Syntax.Resolve1.P9'/9. %% added djd
:- discontiguous '~Syntax.Resolve1.P9'/9. %% added djd
:- discontiguous 'Syntax.ResolveAll1.P10'/10. %% added djd
:- discontiguous '~Syntax.ResolveAll1.P10'/10. %% added djd
:- discontiguous 'Syntax.StandardiseApartQuants.P6'/6. %% added djd
:- discontiguous '~Syntax.StandardiseApartQuants.P6'/6. %% added djd
:- discontiguous 'Syntax.StandardiseCommits.P5'/5. %% added djd
:- discontiguous '~Syntax.StandardiseCommits.P5'/5. %% added djd
:- discontiguous 'Syntax.Statement.P1.0'/1. %% added djd
:- discontiguous '~Syntax.Statement.P1.0'/1. %% added djd
:- discontiguous 'Syntax.TypeNotOccur1.P2'/2. %% added djd
:- discontiguous '~Syntax.TypeNotOccur1.P2'/2. %% added djd
:- discontiguous 'Syntax.TypeNotOccur.P2'/2. %% added djd
:- discontiguous '~Syntax.TypeNotOccur.P2'/2. %% added djd
:- discontiguous 'Syntax.TypeOccurCheck.P3'/3. %% added djd
:- discontiguous '~Syntax.TypeOccurCheck.P3'/3. %% added djd
:- discontiguous 'Syntax.UnifyTerms.P13'/13. %% added djd
:- discontiguous '~Syntax.UnifyTerms.P13'/13. %% added djd
:- discontiguous 'Syntax.UnifyArgs.P11'/11. %% added djd
:- discontiguous '~Syntax.UnifyArgs.P11'/11. %% added djd
:- discontiguous 'Syntax.UnifyTypeArgs.P5'/5. %% added djd
:- discontiguous '~Syntax.UnifyTypeArgs.P5'/5. %% added djd
:- discontiguous 'Syntax.UnifyTypes1.P5'/5. %% added djd
:- discontiguous '~Syntax.UnifyTypes1.P5'/5. %% added djd
:- discontiguous 'Syntax.UnifyTypes0.P4'/4. %% added djd
:- discontiguous '~Syntax.UnifyTypes0.P4'/4. %% added djd
:- discontiguous 'Syntax.Variable.P1.0'/1. %% added djd
:- discontiguous '~Syntax.Variable.P1.0'/1. %% added djd
:- discontiguous 'Syntax.UnifyValue.P5'/5. %% added djd
:- discontiguous '~Syntax.UnifyValue.P5'/5. %% added djd



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

'Syntax.GroundType.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.GroundType.P1.0'(A)).
'~Syntax.GroundType.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.GroundType.P1.0'(A)).
'Syntax.GroundType.P1.0'('MetaDefs.BType.F1'(_)).
'~Syntax.GroundType.P1.0'('MetaDefs.BType.F1'(_)).
'Syntax.GroundType.P1.0'('MetaDefs.Type.F2'(_,A)) :-
        'Syntax.GroundType1.P1'(A).
'~Syntax.GroundType.P1.0'('MetaDefs.Type.F2'(_,A)) :-
        '~Syntax.GroundType1.P1'(A).
'Syntax.GroundType.P1.0'('MetaDefs.XBType.F1'(_)).
'~Syntax.GroundType.P1.0'('MetaDefs.XBType.F1'(_)).
'Syntax.GroundType.P1.0'('MetaDefs.XType.F2'(_,A)) :-
        'Syntax.GroundType1.P1'(A).
'~Syntax.GroundType.P1.0'('MetaDefs.XType.F2'(_,A)) :-
        '~Syntax.GroundType1.P1'(A).
'Syntax.CommitFreeFormula.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.CommitFreeFormula.P1.0'(A)).
'~Syntax.CommitFreeFormula.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.CommitFreeFormula.P1.0'(A)).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.Empty.C0').
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.Empty.C0').
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.PAtom.F1'(_)).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.PAtom.F1'(_)).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.Atom.F2'(_,_)).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.Atom.F2'(_,_)).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.\\/''.F2'(A,B)) :-  % added \ djd
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.\\/''.F2'(A,B)) :-   % added \ djd
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.->''.F2'(A,B)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.->''.F2'(A,B)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.<-''.F2'(A,B)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.<-''.F2'(A,B)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.<->''.F2'(A,B)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.<->''.F2'(A,B)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.~''.F1'(A)) :-
        'Syntax.CommitFreeFormula.P1'(A).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.~''.F1'(A)) :-
        '~Syntax.CommitFreeFormula.P1'(A).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.Some.F2'(_,A)) :-
        'Syntax.CommitFreeFormula.P1'(A).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.Some.F2'(_,A)) :-
        '~Syntax.CommitFreeFormula.P1'(A).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.All.F2'(_,A)) :-
        'Syntax.CommitFreeFormula.P1'(A).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.All.F2'(_,A)) :-
        '~Syntax.CommitFreeFormula.P1'(A).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.IT.F2'(A,B)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.IT.F2'(A,B)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.IST.F3'(_,A,B)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.IST.F3'(_,A,B)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.ITE.F3'(A,B,C)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B),
        'Syntax.CommitFreeFormula.P1'(C).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.ITE.F3'(A,B,C)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B),
        '~Syntax.CommitFreeFormula.P1'(C).
'Syntax.CommitFreeFormula.P1.0'('MetaDefs.ISTE.F4'(_,A,B,C)) :-
        'Syntax.CommitFreeFormula.P1'(A),
        'Syntax.CommitFreeFormula.P1'(B),
        'Syntax.CommitFreeFormula.P1'(C).
'~Syntax.CommitFreeFormula.P1.0'('MetaDefs.ISTE.F4'(_,A,B,C)) :-
        '~Syntax.CommitFreeFormula.P1'(A),
        '~Syntax.CommitFreeFormula.P1'(B),
        '~Syntax.CommitFreeFormula.P1'(C).
'Syntax.BindingToTermSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.BindingToTermSubst.P3.0'(A,B,C)).
'~Syntax.BindingToTermSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.BindingToTermSubst.P3.0'(A,B,C)).
'Syntax.BindingToTermSubst.P3.0'(A, B, C) :-
        'Syntax.Variable.P1'(A),
        user:goedel_freeze(ground([B,A]), (A=B,true->'Syntax':'Syntax.EmptyTermSubst.P1'(C);'SharedSyntax':'SharedSyntax.TermNotOccur.P2'(B,A),'Syntax':'Syntax.EmptyTermSubst.P1'(D),'Substs':'Substs.BindVariable.P4'(A,B,D,C))).
'~Syntax.BindingToTermSubst.P3.0'(A, B, C) :-
        '~Syntax.Variable.P1'(A),
        user:goedel_freeze(ground([B,A]), (A=B,true->'Syntax':'~Syntax.EmptyTermSubst.P1'(C);'SharedSyntax':'~SharedSyntax.TermNotOccur.P2'(B,A),'Syntax':'~Syntax.EmptyTermSubst.P1'(D),'Substs':'~Substs.BindVariable.P4'(A,B,D,C))).
'Syntax.Atom.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.Atom.P1.0'(A)).
'~Syntax.Atom.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.Atom.P1.0'(A)).
'Syntax.Atom.P1.0'('MetaDefs.Atom.F2'(_,_)).
'~Syntax.Atom.P1.0'('MetaDefs.Atom.F2'(_,_)).
'Syntax.Atom.P1.0'('MetaDefs.PAtom.F1'(_)).
'~Syntax.Atom.P1.0'('MetaDefs.PAtom.F1'(_)).
'Syntax.AppendTypeBindings.P3'([], A, A).
'~Syntax.AppendTypeBindings.P3'([], A, A).
'Syntax.AppendTypeBindings.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        'Substs':'Substs.BindParameter.P4'(B, C, D, F),
        'Syntax.AppendTypeBindings.P3'(A, F, E).
'~Syntax.AppendTypeBindings.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        'Substs':'~Substs.BindParameter.P4'(B, C, D, F),
        '~Syntax.AppendTypeBindings.P3'(A, F, E).
'Syntax.AndWithEmpty.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.AndWithEmpty.P3.0'(A,B,C)).
'~Syntax.AndWithEmpty.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.AndWithEmpty.P3.0'(A,B,C)).
'Syntax.AndWithEmpty.P3.0'(A, B, C) :-
        user:goedel_freeze(ground([A]), ('Syntax':'~Syntax.EmptyFormula.P1'(A),true->C=B;user:goedel_freeze(ground([B]),('Syntax':'~Syntax.EmptyFormula.P1'(B),true->C=A;C='MetaDefs.&''.F2'(A,B))))).
'~Syntax.AndWithEmpty.P3.0'(A, B, C) :-
        user:goedel_freeze(ground([A]), ('Syntax':'~Syntax.EmptyFormula.P1'(A),true->C=B;user:goedel_freeze(ground([B]),('Syntax':'~Syntax.EmptyFormula.P1'(B),true->C=A;C='MetaDefs.&''.F2'(A,B))))).
'Syntax.And.P3'(A, B, 'MetaDefs.&''.F2'(A,B)).
'~Syntax.And.P3'(A, B, 'MetaDefs.&''.F2'(A,B)).
'Syntax.All.P3'(A, B, 'MetaDefs.All.F2'(A,B)).
'~Syntax.All.P3'(A, B, 'MetaDefs.All.F2'(A,B)).
'Syntax.AppendTermBindings.P3'([], A, A).
'~Syntax.AppendTermBindings.P3'([], A, A).
'Syntax.AppendTermBindings.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        'Substs':'Substs.BindVariable.P4'(B, C, D, F),
        'Syntax.AppendTermBindings.P3'(A, F, E).
'~Syntax.AppendTermBindings.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        'Substs':'~Substs.BindVariable.P4'(B, C, D, F),
        '~Syntax.AppendTermBindings.P3'(A, F, E).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.Var.F1'(A), B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),I),D),true),(C=B,G=F,H=I),user:goedel_freeze(ground([A,F]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),J),F),true),(C=B,G=F,H=J),user:goedel_freeze(ground([A,E]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),K),E),true),(C=B,G=F,H=K),(('Integers':plus(B,1,L),C=L),G=['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),H)|F],H='MetaDefs.Var.F1'(B)))))))).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.Var.F1'(A), B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),I),D),true),(C=B,G=F,H=I),user:goedel_freeze(ground([A,F]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),J),F),true),(C=B,G=F,H=J),user:goedel_freeze(ground([A,E]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),K),E),true),(C=B,G=F,H=K),(('Integers':plus(B,1,L),C=L),G=['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),H)|F],H='MetaDefs.Var.F1'(B)))))))).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.Var.F2'(A,B), C, D, E, F, G, H, I) :-
        user:goedel_freeze(ground([B,E,A]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),J),E),true),(D=C,H=G,I=J),user:goedel_freeze(ground([B,G,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),K),G),true),(D=C,H=G,I=K),user:goedel_freeze(ground([B,F,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),L),F),true),(D=C,H=G,I=L),(('Integers':plus(C,1,M),D=M),H=['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),I)|G],I='MetaDefs.Var.F1'(C)))))))).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.Var.F2'(A,B), C, D, E, F, G, H, I) :-
        user:goedel_freeze(ground([B,E,A]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),J),E),true),(D=C,H=G,I=J),user:goedel_freeze(ground([B,G,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),K),G),true),(D=C,H=G,I=K),user:goedel_freeze(ground([B,F,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),L),F),true),(D=C,H=G,I=L),(('Integers':plus(C,1,M),D=M),H=['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),I)|G],I='MetaDefs.Var.F1'(C)))))))).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.Term.F2'(A,B), C, D, E, F, G, H, 'MetaDefs.Term.F2'(A,I)) :-
        'Syntax.ApplySubstToArgs.P8'(B, C, D, E, F, G, H, I).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.Term.F2'(A,B), C, D, E, F, G, H, 'MetaDefs.Term.F2'(A,I)) :-
        '~Syntax.ApplySubstToArgs.P8'(B, C, D, E, F, G, H, I).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, H, I, 'MetaDefs.XTerm.F3'(A,J,C)) :-
        'Syntax.ApplySubstToArgs.P8'(B, D, E, F, G, H, I, J).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, H, I, 'MetaDefs.XTerm.F3'(A,J,C)) :-
        '~Syntax.ApplySubstToArgs.P8'(B, D, E, F, G, H, I, J).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.CTerm.F1'(A), B, B, _, _, C, C, 'MetaDefs.CTerm.F1'(A)).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.CTerm.F1'(A), B, B, _, _, C, C, 'MetaDefs.CTerm.F1'(A)).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.XCTerm.F2'(A,B), C, C, _, _, D, D, 'MetaDefs.XCTerm.F2'(A,B)).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.XCTerm.F2'(A,B), C, C, _, _, D, D, 'MetaDefs.XCTerm.F2'(A,B)).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.Int.F1'(A), B, B, _, _, C, C, 'MetaDefs.Int.F1'(A)).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.Int.F1'(A), B, B, _, _, C, C, 'MetaDefs.Int.F1'(A)).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.Str.F1'(A), B, B, _, _, C, C, 'MetaDefs.Str.F1'(A)).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.Str.F1'(A), B, B, _, _, C, C, 'MetaDefs.Str.F1'(A)).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.Prm.F1'(A), B, B, _, _, C, C, 'MetaDefs.Prm.F1'(A)).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.Prm.F1'(A), B, B, _, _, C, C, 'MetaDefs.Prm.F1'(A)).
'Syntax.ApplySubstToTerm.P8'('MetaDefs.SuchThat.F2'(A,B), C, D, E, F, G, H, 'MetaDefs.SuchThat.F2'(I,J)) :-
        'SharedSyntax':'SharedSyntax.STermFreeVars.P2'(A, K),
        'Syntax.StandardiseApartQuants.P6'(K, _, E, L, C, M),
        'Syntax.ApplySubstToTerm.P8'(A, M, N, L, F, G, O, I),
        'Syntax.ApplySubstToFormula.P9'(B, N, D, L, F, O, H, [], J).
'~Syntax.ApplySubstToTerm.P8'('MetaDefs.SuchThat.F2'(A,B), C, D, E, F, G, H, 'MetaDefs.SuchThat.F2'(I,J)) :-
        'SharedSyntax':'~SharedSyntax.STermFreeVars.P2'(A, K),
        '~Syntax.StandardiseApartQuants.P6'(K, _, E, L, C, M),
        '~Syntax.ApplySubstToTerm.P8'(A, M, N, L, F, G, O, I),
        '~Syntax.ApplySubstToFormula.P9'(B, N, D, L, F, O, H, [], J).
'Syntax.ApplySubstToTerm.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.ApplySubstToTerm.P3.0'(A,B,C)).
'~Syntax.ApplySubstToTerm.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.ApplySubstToTerm.P3.0'(A,B,C)).
'Syntax.ApplySubstToTerm.P3.0'(A, B, C) :-
        'Substs':'Substs.SubstApplyToTerm.P3'(A, B, C).
'~Syntax.ApplySubstToTerm.P3.0'(A, B, C) :-
        'Substs':'~Substs.SubstApplyToTerm.P3'(A, B, C).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.&''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.&''.F2'(J,K)) :-
        'Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        'Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.&''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.&''.F2'(J,K)) :-
        '~Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        '~Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.Atom.F2'(A,B), C, D, E, F, G, H, _, 'MetaDefs.Atom.F2'(A,I)) :-
        'Syntax.ApplySubstToArgs.P8'(B, C, D, E, F, G, H, I).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.Atom.F2'(A,B), C, D, E, F, G, H, _, 'MetaDefs.Atom.F2'(A,I)) :-
        '~Syntax.ApplySubstToArgs.P8'(B, C, D, E, F, G, H, I).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.XAtom.F2'(A,B), C, D, E, F, G, H, _, 'MetaDefs.XAtom.F2'(A,I)) :-
        'Syntax.ApplySubstToArgs.P8'(B, C, D, E, F, G, H, I).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.XAtom.F2'(A,B), C, D, E, F, G, H, _, 'MetaDefs.XAtom.F2'(A,I)) :-
        '~Syntax.ApplySubstToArgs.P8'(B, C, D, E, F, G, H, I).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.Some.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.Some.F2'(J,K)) :-
        'Syntax.StandardiseApartQuants.P6'(A, J, E, L, C, M),
        'Syntax.ApplySubstToFormula.P9'(B, M, D, L, F, G, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.Some.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.Some.F2'(J,K)) :-
        '~Syntax.StandardiseApartQuants.P6'(A, J, E, L, C, M),
        '~Syntax.ApplySubstToFormula.P9'(B, M, D, L, F, G, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.ISTE.F4'(A,B,C,D), E, F, G, H, I, J, K, 'MetaDefs.ISTE.F4'(L,M,N,O)) :-
        'Syntax.StandardiseApartQuants.P6'(A, L, G, P, E, Q),
        'Syntax.ApplySubstToFormula.P9'(B, Q, R, P, H, I, S, K, M),
        'Syntax.ApplySubstToFormula.P9'(C, R, T, P, H, S, U, K, N),
        'Syntax.ApplySubstToFormula.P9'(D, T, F, G, H, U, J, K, O).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.ISTE.F4'(A,B,C,D), E, F, G, H, I, J, K, 'MetaDefs.ISTE.F4'(L,M,N,O)) :-
        '~Syntax.StandardiseApartQuants.P6'(A, L, G, P, E, Q),
        '~Syntax.ApplySubstToFormula.P9'(B, Q, R, P, H, I, S, K, M),
        '~Syntax.ApplySubstToFormula.P9'(C, R, T, P, H, S, U, K, N),
        '~Syntax.ApplySubstToFormula.P9'(D, T, F, G, H, U, J, K, O).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.Commit.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.Commit.F2'(J,K)) :-
        'Lists':'Lists.MemberCheck.P2'('Syntax.LabelPair.F2'(A,J), I),
        'Syntax.ApplySubstToFormula.P9'(B, C, D, E, F, G, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.Commit.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.Commit.F2'(J,K)) :-
        'Lists':'~Lists.MemberCheck.P2'('Syntax.LabelPair.F2'(A,J), I),
        '~Syntax.ApplySubstToFormula.P9'(B, C, D, E, F, G, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.Empty.C0', A, A, _, _, B, B, _, 'MetaDefs.Empty.C0').
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.Empty.C0', A, A, _, _, B, B, _, 'MetaDefs.Empty.C0').
'Syntax.ApplySubstToFormula.P9'('MetaDefs.PAtom.F1'(A), B, B, _, _, C, C, _, 'MetaDefs.PAtom.F1'(A)).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.PAtom.F1'(A), B, B, _, _, C, C, _, 'MetaDefs.PAtom.F1'(A)).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.XPAtom.F1'(A), B, B, _, _, C, C, _, 'MetaDefs.XPAtom.F1'(A)).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.XPAtom.F1'(A), B, B, _, _, C, C, _, 'MetaDefs.XPAtom.F1'(A)).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.\\/''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.\\/''.F2'(J,K)) :-  % added 2 \ djd
        'Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        'Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.\\/''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.\\/''.F2'(J,K)) :-   % added 2 \ djd
        '~Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        '~Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.ITE.F3'(A,B,C), D, E, F, G, H, I, J, 'MetaDefs.ITE.F3'(K,L,M)) :-
        'Syntax.ApplySubstToFormula.P9'(A, D, N, F, G, H, O, J, K),
        'Syntax.ApplySubstToFormula.P9'(B, N, P, F, G, O, Q, J, L),
        'Syntax.ApplySubstToFormula.P9'(C, P, E, F, G, Q, I, J, M).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.ITE.F3'(A,B,C), D, E, F, G, H, I, J, 'MetaDefs.ITE.F3'(K,L,M)) :-
        '~Syntax.ApplySubstToFormula.P9'(A, D, N, F, G, H, O, J, K),
        '~Syntax.ApplySubstToFormula.P9'(B, N, P, F, G, O, Q, J, L),
        '~Syntax.ApplySubstToFormula.P9'(C, P, E, F, G, Q, I, J, M).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.IST.F3'(A,B,C), D, E, F, G, H, I, J, 'MetaDefs.IST.F3'(K,L,M)) :-
        'Syntax.StandardiseApartQuants.P6'(A, K, F, N, D, O),
        'Syntax.ApplySubstToFormula.P9'(B, O, P, N, G, H, Q, J, L),
        'Syntax.ApplySubstToFormula.P9'(C, P, E, N, G, Q, I, J, M).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.IST.F3'(A,B,C), D, E, F, G, H, I, J, 'MetaDefs.IST.F3'(K,L,M)) :-
        '~Syntax.StandardiseApartQuants.P6'(A, K, F, N, D, O),
        '~Syntax.ApplySubstToFormula.P9'(B, O, P, N, G, H, Q, J, L),
        '~Syntax.ApplySubstToFormula.P9'(C, P, E, N, G, Q, I, J, M).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.IT.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.IT.F2'(J,K)) :-
        'Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        'Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.IT.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.IT.F2'(J,K)) :-
        '~Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        '~Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.~''.F1'(A), B, C, D, E, F, G, H, 'MetaDefs.~''.F1'(I)) :-
        'Syntax.ApplySubstToFormula.P9'(A, B, C, D, E, F, G, H, I).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.~''.F1'(A), B, C, D, E, F, G, H, 'MetaDefs.~''.F1'(I)) :-
        '~Syntax.ApplySubstToFormula.P9'(A, B, C, D, E, F, G, H, I).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.->''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.->''.F2'(J,K)) :-
        'Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        'Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.->''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.->''.F2'(J,K)) :-
        '~Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        '~Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.<-''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.<-''.F2'(J,K)) :-
        'Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        'Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.<-''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.<-''.F2'(J,K)) :-
        '~Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        '~Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.<->''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.<->''.F2'(J,K)) :-
        'Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        'Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.<->''.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.<->''.F2'(J,K)) :-
        '~Syntax.ApplySubstToFormula.P9'(A, C, L, E, F, G, M, I, J),
        '~Syntax.ApplySubstToFormula.P9'(B, L, D, E, F, M, H, I, K).
'Syntax.ApplySubstToFormula.P9'('MetaDefs.All.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.All.F2'(J,K)) :-
        'Syntax.StandardiseApartQuants.P6'(A, J, E, L, C, M),
        'Syntax.ApplySubstToFormula.P9'(B, M, D, L, F, G, H, I, K).
'~Syntax.ApplySubstToFormula.P9'('MetaDefs.All.F2'(A,B), C, D, E, F, G, H, I, 'MetaDefs.All.F2'(J,K)) :-
        '~Syntax.StandardiseApartQuants.P6'(A, J, E, L, C, M),
        '~Syntax.ApplySubstToFormula.P9'(B, M, D, L, F, G, H, I, K).
'Syntax.ApplySubstToFormula.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.ApplySubstToFormula.P3.0'(A,B,C)).
'~Syntax.ApplySubstToFormula.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.ApplySubstToFormula.P3.0'(A,B,C)).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Empty.C0', _, 'MetaDefs.Empty.C0').
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Empty.C0', _, 'MetaDefs.Empty.C0').
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.PAtom.F1'(A), _, 'MetaDefs.PAtom.F1'(A)).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.PAtom.F1'(A), _, 'MetaDefs.PAtom.F1'(A)).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.XPAtom.F1'(A), _, 'MetaDefs.XPAtom.F1'(A)).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.XPAtom.F1'(A), _, 'MetaDefs.XPAtom.F1'(A)).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Atom.F2'(A,B), C, 'MetaDefs.Atom.F2'(A,D)) :-
        'Substs':'Substs.ApplyTermSubst.P3'(B, C, D).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Atom.F2'(A,B), C, 'MetaDefs.Atom.F2'(A,D)) :-
        'Substs':'~Substs.ApplyTermSubst.P3'(B, C, D).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.XAtom.F2'(A,B), C, 'MetaDefs.XAtom.F2'(A,D)) :-
        'Substs':'Substs.ApplyTermSubst.P3'(B, C, D).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.XAtom.F2'(A,B), C, 'MetaDefs.XAtom.F2'(A,D)) :-
        'Substs':'~Substs.ApplyTermSubst.P3'(B, C, D).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.&''.F2'(A,B), C, 'MetaDefs.&''.F2'(D,E)) :-
        'Syntax.ApplySubstToFormula.P3'(A, C, D),
        'Syntax.ApplySubstToFormula.P3'(B, C, E).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.&''.F2'(A,B), C, 'MetaDefs.&''.F2'(D,E)) :-
        '~Syntax.ApplySubstToFormula.P3'(A, C, D),
        '~Syntax.ApplySubstToFormula.P3'(B, C, E).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.\\/''.F2'(A,B), C, 'MetaDefs.\\/''.F2'(D,E)) :-  % added 2 \ djd
        'Syntax.ApplySubstToFormula.P3'(A, C, D),
        'Syntax.ApplySubstToFormula.P3'(B, C, E).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.\\/''.F2'(A,B), C, 'MetaDefs.\\/''.F2'(D,E)) :-  % added 2 \ djd
        '~Syntax.ApplySubstToFormula.P3'(A, C, D),
        '~Syntax.ApplySubstToFormula.P3'(B, C, E).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.~''.F1'(A), B, 'MetaDefs.~''.F1'(C)) :-
        'Syntax.ApplySubstToFormula.P3'(A, B, C).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.~''.F1'(A), B, 'MetaDefs.~''.F1'(C)) :-
        '~Syntax.ApplySubstToFormula.P3'(A, B, C).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.<-''.F2'(A,B), C, 'MetaDefs.<-''.F2'(D,E)) :-
        'Syntax.ApplySubstToFormula.P3'(A, C, D),
        'Syntax.ApplySubstToFormula.P3'(B, C, E).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.<-''.F2'(A,B), C, 'MetaDefs.<-''.F2'(D,E)) :-
        '~Syntax.ApplySubstToFormula.P3'(A, C, D),
        '~Syntax.ApplySubstToFormula.P3'(B, C, E).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.->''.F2'(A,B), C, 'MetaDefs.->''.F2'(D,E)) :-
        'Syntax.ApplySubstToFormula.P3'(A, C, D),
        'Syntax.ApplySubstToFormula.P3'(B, C, E).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.->''.F2'(A,B), C, 'MetaDefs.->''.F2'(D,E)) :-
        '~Syntax.ApplySubstToFormula.P3'(A, C, D),
        '~Syntax.ApplySubstToFormula.P3'(B, C, E).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.<->''.F2'(A,B), C, 'MetaDefs.<->''.F2'(D,E)) :-
        'Syntax.ApplySubstToFormula.P3'(A, C, D),
        'Syntax.ApplySubstToFormula.P3'(B, C, E).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.<->''.F2'(A,B), C, 'MetaDefs.<->''.F2'(D,E)) :-
        '~Syntax.ApplySubstToFormula.P3'(A, C, D),
        '~Syntax.ApplySubstToFormula.P3'(B, C, E).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.All.F2'(A,B), C, 'MetaDefs.All.F2'(A,D)) :-
        'Syntax.DeleteBindings.P3'(A, C, E),
        'Syntax.ApplySubstToFormula.P3'(B, E, D).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.All.F2'(A,B), C, 'MetaDefs.All.F2'(A,D)) :-
        '~Syntax.DeleteBindings.P3'(A, C, E),
        '~Syntax.ApplySubstToFormula.P3'(B, E, D).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Some.F2'(A,B), C, 'MetaDefs.Some.F2'(A,D)) :-
        'Syntax.DeleteBindings.P3'(A, C, E),
        'Syntax.ApplySubstToFormula.P3'(B, E, D).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Some.F2'(A,B), C, 'MetaDefs.Some.F2'(A,D)) :-
        '~Syntax.DeleteBindings.P3'(A, C, E),
        '~Syntax.ApplySubstToFormula.P3'(B, E, D).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.IT.F2'(A,B), C, 'MetaDefs.IT.F2'(D,E)) :-
        'Syntax.ApplySubstToFormula.P3'(A, C, D),
        'Syntax.ApplySubstToFormula.P3'(B, C, E).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.IT.F2'(A,B), C, 'MetaDefs.IT.F2'(D,E)) :-
        '~Syntax.ApplySubstToFormula.P3'(A, C, D),
        '~Syntax.ApplySubstToFormula.P3'(B, C, E).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.ITE.F3'(A,B,C), D, 'MetaDefs.ITE.F3'(E,F,G)) :-
        'Syntax.ApplySubstToFormula.P3'(A, D, E),
        'Syntax.ApplySubstToFormula.P3'(B, D, F),
        'Syntax.ApplySubstToFormula.P3'(C, D, G).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.ITE.F3'(A,B,C), D, 'MetaDefs.ITE.F3'(E,F,G)) :-
        '~Syntax.ApplySubstToFormula.P3'(A, D, E),
        '~Syntax.ApplySubstToFormula.P3'(B, D, F),
        '~Syntax.ApplySubstToFormula.P3'(C, D, G).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.IST.F3'(A,B,C), D, 'MetaDefs.IST.F3'(A,E,F)) :-
        'Syntax.DeleteBindings.P3'(A, D, G),
        'Syntax.ApplySubstToFormula.P3'(B, G, E),
        'Syntax.ApplySubstToFormula.P3'(C, G, F).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.IST.F3'(A,B,C), D, 'MetaDefs.IST.F3'(A,E,F)) :-
        '~Syntax.DeleteBindings.P3'(A, D, G),
        '~Syntax.ApplySubstToFormula.P3'(B, G, E),
        '~Syntax.ApplySubstToFormula.P3'(C, G, F).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.ISTE.F4'(A,B,C,D), E, 'MetaDefs.ISTE.F4'(A,F,G,H)) :-
        'Syntax.DeleteBindings.P3'(A, E, I),
        'Syntax.ApplySubstToFormula.P3'(B, I, F),
        'Syntax.ApplySubstToFormula.P3'(C, I, G),
        'Syntax.ApplySubstToFormula.P3'(D, I, H).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.ISTE.F4'(A,B,C,D), E, 'MetaDefs.ISTE.F4'(A,F,G,H)) :-
        '~Syntax.DeleteBindings.P3'(A, E, I),
        '~Syntax.ApplySubstToFormula.P3'(B, I, F),
        '~Syntax.ApplySubstToFormula.P3'(C, I, G),
        '~Syntax.ApplySubstToFormula.P3'(D, I, H).
'Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Commit.F2'(A,B), C, 'MetaDefs.Commit.F2'(A,D)) :-
        'Syntax.ApplySubstToFormula.P3'(B, C, D).
'~Syntax.ApplySubstToFormula.P3.0'('MetaDefs.Commit.F2'(A,B), C, 'MetaDefs.Commit.F2'(A,D)) :-
        '~Syntax.ApplySubstToFormula.P3'(B, C, D).
'Syntax.ApplySubstToArgs.P8'([], A, A, _, _, B, B, []).
'~Syntax.ApplySubstToArgs.P8'([], A, A, _, _, B, B, []).
'Syntax.ApplySubstToArgs.P8'([A|B], C, D, E, F, G, H, [I|J]) :-
        'Syntax.ApplySubstToTerm.P8'(A, C, K, E, F, G, L, I),
        'Syntax.ApplySubstToArgs.P8'(B, K, D, E, F, L, H, J).
'~Syntax.ApplySubstToArgs.P8'([A|B], C, D, E, F, G, H, [I|J]) :-
        '~Syntax.ApplySubstToTerm.P8'(A, C, K, E, F, G, L, I),
        '~Syntax.ApplySubstToArgs.P8'(B, K, D, E, F, L, H, J).
'Syntax.ApplySubstToType.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.ApplySubstToType.P3.0'(A,B,C)).
'~Syntax.ApplySubstToType.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.ApplySubstToType.P3.0'(A,B,C)).
'Syntax.ApplySubstToType.P3.0'(A, B, C) :-
        'Substs':'Substs.SubstApplyToType.P3'(A, B, C).
'~Syntax.ApplySubstToType.P3.0'(A, B, C) :-
        'Substs':'~Substs.SubstApplyToType.P3'(A, B, C).
'Syntax.ApplySubstToVarTypes.P3'([], _, []).
'~Syntax.ApplySubstToVarTypes.P3'([], _, []).
'Syntax.ApplySubstToVarTypes.P3'(['MetaDefs.@.F2'(B,C)|A], D, ['MetaDefs.@.F2'(B,F)|E]) :-
        'Syntax.ApplySubstToType.P3'(C, D, F),
        'Syntax.ApplySubstToVarTypes.P3'(A, D, E).
'~Syntax.ApplySubstToVarTypes.P3'(['MetaDefs.@.F2'(B,C)|A], D, ['MetaDefs.@.F2'(B,F)|E]) :-
        '~Syntax.ApplySubstToType.P3'(C, D, F),
        '~Syntax.ApplySubstToVarTypes.P3'(A, D, E).
'Syntax.BindingInTypeSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.BindingInTypeSubst.P3.0'(A,B,C)).
'~Syntax.BindingInTypeSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.BindingInTypeSubst.P3.0'(A,B,C)).
'Syntax.BindingInTypeSubst.P3.0'(A, B, C) :-
        'Substs':'Substs.SBindingInTypeSubst.P3'(A, B, C).
'~Syntax.BindingInTypeSubst.P3.0'(A, B, C) :-
        'Substs':'~Substs.SBindingInTypeSubst.P3'(A, B, C).
'Syntax.BindingInTermSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.BindingInTermSubst.P3.0'(A,B,C)).
'~Syntax.BindingInTermSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.BindingInTermSubst.P3.0'(A,B,C)).
'Syntax.BindingInTermSubst.P3.0'(A, B, C) :-
        'Substs':'Substs.SBindingInTermSubst.P3'(A, B, C).
'~Syntax.BindingInTermSubst.P3.0'(A, B, C) :-
        'Substs':'~Substs.SBindingInTermSubst.P3'(A, B, C).
'Syntax.BaseType.P2'('MetaDefs.BType.F1'(A), A).
'~Syntax.BaseType.P2'('MetaDefs.BType.F1'(A), A).
'Syntax.BindingInVarTyping.P3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.BindingInVarTyping.P3.0'(A,B,C)).
'~Syntax.BindingInVarTyping.P3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.BindingInVarTyping.P3.0'(A,B,C)).
'Syntax.BindingInVarTyping.P3.0'('MetaDefs.VarTyping.F1'(A), B, C) :-
        'ExtraSyntax':'ExtraSyntax.EBindingInVarTyping.P3'(A, B, C).
'~Syntax.BindingInVarTyping.P3.0'('MetaDefs.VarTyping.F1'(A), B, C) :-
        'ExtraSyntax':'~ExtraSyntax.EBindingInVarTyping.P3'(A, B, C).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F1'(A), B, C, 'MetaDefs.Var.F2'(D,E)) :-
        'SharedSyntax':'SharedSyntax.SNotNewBinding.P4'(B, C, 'MetaDefs.Var.F1'(A), 'MetaDefs.Var.F2'(D,E)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F1'(A), B, C, 'MetaDefs.Var.F2'(D,E)) :-
        'SharedSyntax':'~SharedSyntax.SNotNewBinding.P4'(B, C, 'MetaDefs.Var.F1'(A), 'MetaDefs.Var.F2'(D,E)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F1'(A), B, C, 'MetaDefs.Var.F1'(D)) :-
        'SharedSyntax':'SharedSyntax.SNotNewBinding.P4'(B, C, 'MetaDefs.Var.F1'(A), 'MetaDefs.Var.F1'(D)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F1'(A), B, C, 'MetaDefs.Var.F1'(D)) :-
        'SharedSyntax':'~SharedSyntax.SNotNewBinding.P4'(B, C, 'MetaDefs.Var.F1'(A), 'MetaDefs.Var.F1'(D)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F2'(A,B), C, D, 'MetaDefs.Var.F1'(E)) :-
        'SharedSyntax':'SharedSyntax.SNotNewBinding.P4'(C, D, 'MetaDefs.Var.F2'(A,B), 'MetaDefs.Var.F1'(E)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F2'(A,B), C, D, 'MetaDefs.Var.F1'(E)) :-
        'SharedSyntax':'~SharedSyntax.SNotNewBinding.P4'(C, D, 'MetaDefs.Var.F2'(A,B), 'MetaDefs.Var.F1'(E)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F2'(A,B), C, D, 'MetaDefs.Var.F2'(E,F)) :-
        'SharedSyntax':'SharedSyntax.SNotNewBinding.P4'(C, D, 'MetaDefs.Var.F2'(A,B), 'MetaDefs.Var.F2'(E,F)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Var.F2'(A,B), C, D, 'MetaDefs.Var.F2'(E,F)) :-
        'SharedSyntax':'~SharedSyntax.SNotNewBinding.P4'(C, D, 'MetaDefs.Var.F2'(A,B), 'MetaDefs.Var.F2'(E,F)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.CTerm.F1'(A), B, B, 'MetaDefs.CTerm.F1'(A)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.CTerm.F1'(A), B, B, 'MetaDefs.CTerm.F1'(A)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Term.F2'(A,B), C, D, 'MetaDefs.Term.F2'(A,E)) :-
        'Syntax.CheckVariantTerms.P4'(B, C, D, E).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Term.F2'(A,B), C, D, 'MetaDefs.Term.F2'(A,E)) :-
        '~Syntax.CheckVariantTerms.P4'(B, C, D, E).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.XCTerm.F2'(A,B), C, C, 'MetaDefs.XCTerm.F2'(A,B)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.XCTerm.F2'(A,B), C, C, 'MetaDefs.XCTerm.F2'(A,B)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Int.F1'(A), B, B, 'MetaDefs.Int.F1'(A)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Int.F1'(A), B, B, 'MetaDefs.Int.F1'(A)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Str.F1'(A), B, B, 'MetaDefs.Str.F1'(A)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Str.F1'(A), B, B, 'MetaDefs.Str.F1'(A)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.Prm.F1'(A), B, B, 'MetaDefs.Prm.F1'(A)).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.Prm.F1'(A), B, B, 'MetaDefs.Prm.F1'(A)).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.XTerm.F3'(A,B,C), D, E, 'MetaDefs.XTerm.F3'(A,F,C)) :-
        'Syntax.CheckVariantTerms.P4'(B, D, E, F).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.XTerm.F3'(A,B,C), D, E, 'MetaDefs.XTerm.F3'(A,F,C)) :-
        '~Syntax.CheckVariantTerms.P4'(B, D, E, F).
'Syntax.CheckVariantTerms1.P4'('MetaDefs.SuchThat.F2'(A,B), C, D, 'MetaDefs.SuchThat.F2'(E,F)) :-
        'Syntax.CheckVariantTerms1.P4'(A, C, G, E),
        'Syntax.CheckVariantFormulas1.P4'(B, F, G, D).
'~Syntax.CheckVariantTerms1.P4'('MetaDefs.SuchThat.F2'(A,B), C, D, 'MetaDefs.SuchThat.F2'(E,F)) :-
        '~Syntax.CheckVariantTerms1.P4'(A, C, G, E),
        '~Syntax.CheckVariantFormulas1.P4'(B, F, G, D).
'Syntax.BindingToTypeSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.BindingToTypeSubst.P3.0'(A,B,C)).
'~Syntax.BindingToTypeSubst.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.BindingToTypeSubst.P3.0'(A,B,C)).
'Syntax.BindingToTypeSubst.P3.0'(A, B, C) :-
        'Syntax.Parameter.P1'(A),
        user:goedel_freeze(ground([B,A]), (A=B,true->'Syntax':'Syntax.EmptyTypeSubst.P1'(C);'Syntax':'Syntax.TypeNotOccur.P2'(B,A),'Syntax':'Syntax.EmptyTypeSubst.P1'(D),'Substs':'Substs.BindParameter.P4'(A,B,D,C))).
'~Syntax.BindingToTypeSubst.P3.0'(A, B, C) :-
        '~Syntax.Parameter.P1'(A),
        user:goedel_freeze(ground([B,A]), (A=B,true->'Syntax':'~Syntax.EmptyTypeSubst.P1'(C);'Syntax':'~Syntax.TypeNotOccur.P2'(B,A),'Syntax':'~Syntax.EmptyTypeSubst.P1'(D),'Substs':'~Substs.BindParameter.P4'(A,B,D,C))).
'Syntax.BindingToVarTyping.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.BindingToVarTyping.P3.0'(A,B,C)).
'~Syntax.BindingToVarTyping.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.BindingToVarTyping.P3.0'(A,B,C)).
'Syntax.BindingToVarTyping.P3.0'(A, B, 'MetaDefs.VarTyping.F1'(['MetaDefs.@.F2'(A,B)])) :-
        'Syntax.Variable.P1'(A).
'~Syntax.BindingToVarTyping.P3.0'(A, B, 'MetaDefs.VarTyping.F1'(['MetaDefs.@.F2'(A,B)])) :-
        '~Syntax.Variable.P1'(A).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.Empty.C0', 'MetaDefs.Empty.C0', A, A).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.Empty.C0', 'MetaDefs.Empty.C0', A, A).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.PAtom.F1'(A), 'MetaDefs.PAtom.F1'(A), B, B).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.PAtom.F1'(A), 'MetaDefs.PAtom.F1'(A), B, B).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.Atom.F2'(A,B), 'MetaDefs.Atom.F2'(A,C), D, E) :-
        'Syntax.CheckVariantTerms.P4'(B, D, E, C).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.Atom.F2'(A,B), 'MetaDefs.Atom.F2'(A,C), D, E) :-
        '~Syntax.CheckVariantTerms.P4'(B, D, E, C).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.XPAtom.F1'(A), 'MetaDefs.XPAtom.F1'(A), B, B).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.XPAtom.F1'(A), 'MetaDefs.XPAtom.F1'(A), B, B).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.XAtom.F2'(A,B), 'MetaDefs.XAtom.F2'(A,C), D, E) :-
        'Syntax.CheckVariantTerms.P4'(B, D, E, C).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.XAtom.F2'(A,B), 'MetaDefs.XAtom.F2'(A,C), D, E) :-
        '~Syntax.CheckVariantTerms.P4'(B, D, E, C).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.&''.F2'(A,B), 'MetaDefs.&''.F2'(C,D), E, F) :-
        'Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.&''.F2'(A,B), 'MetaDefs.&''.F2'(C,D), E, F) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.\\/''.F2'(A,B), 'MetaDefs.\\/''.F2'(C,D), E, F) :-  % added 2 \ djd
        'Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.\\/''.F2'(A,B), 'MetaDefs.\\/''.F2'(C,D), E, F) :-  % added 2 \ djd
        '~Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.~''.F1'(A), 'MetaDefs.~''.F1'(B), C, D) :-
        'Syntax.CheckVariantFormulas1.P4'(A, B, C, D).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.~''.F1'(A), 'MetaDefs.~''.F1'(B), C, D) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, B, C, D).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.<-''.F2'(A,B), 'MetaDefs.<-''.F2'(C,D), E, F) :-
        'Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.<-''.F2'(A,B), 'MetaDefs.<-''.F2'(C,D), E, F) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.->''.F2'(A,B), 'MetaDefs.->''.F2'(C,D), E, F) :-
        'Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.->''.F2'(A,B), 'MetaDefs.->''.F2'(C,D), E, F) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.<->''.F2'(A,B), 'MetaDefs.<->''.F2'(C,D), E, F) :-
        'Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.<->''.F2'(A,B), 'MetaDefs.<->''.F2'(C,D), E, F) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.All.F2'(A,B), 'MetaDefs.All.F2'(C,D), E, F) :-
        'Syntax.CheckVariantTerms.P4'(A, E, G, C),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.All.F2'(A,B), 'MetaDefs.All.F2'(C,D), E, F) :-
        '~Syntax.CheckVariantTerms.P4'(A, E, G, C),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.Some.F2'(A,B), 'MetaDefs.Some.F2'(C,D), E, F) :-
        'Syntax.CheckVariantTerms.P4'(A, E, G, C),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.Some.F2'(A,B), 'MetaDefs.Some.F2'(C,D), E, F) :-
        '~Syntax.CheckVariantTerms.P4'(A, E, G, C),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.IT.F2'(A,B), 'MetaDefs.IT.F2'(C,D), E, F) :-
        'Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        'Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.IT.F2'(A,B), 'MetaDefs.IT.F2'(C,D), E, F) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, C, E, G),
        '~Syntax.CheckVariantFormulas1.P4'(B, D, G, F).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.ITE.F3'(A,B,C), 'MetaDefs.ITE.F3'(D,E,F), G, H) :-
        'Syntax.CheckVariantFormulas1.P4'(A, D, G, I),
        'Syntax.CheckVariantFormulas1.P4'(B, E, I, J),
        'Syntax.CheckVariantFormulas1.P4'(C, F, J, H).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.ITE.F3'(A,B,C), 'MetaDefs.ITE.F3'(D,E,F), G, H) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, D, G, I),
        '~Syntax.CheckVariantFormulas1.P4'(B, E, I, J),
        '~Syntax.CheckVariantFormulas1.P4'(C, F, J, H).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.IST.F3'(A,B,C), 'MetaDefs.IST.F3'(D,E,F), G, H) :-
        'Syntax.CheckVariantTerms.P4'(A, G, I, D),
        'Syntax.CheckVariantFormulas1.P4'(B, E, I, J),
        'Syntax.CheckVariantFormulas1.P4'(C, F, J, H).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.IST.F3'(A,B,C), 'MetaDefs.IST.F3'(D,E,F), G, H) :-
        '~Syntax.CheckVariantTerms.P4'(A, G, I, D),
        '~Syntax.CheckVariantFormulas1.P4'(B, E, I, J),
        '~Syntax.CheckVariantFormulas1.P4'(C, F, J, H).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.ISTE.F4'(A,B,C,D), 'MetaDefs.ISTE.F4'(E,F,G,H), I, J) :-
        'Syntax.CheckVariantTerms.P4'(A, I, K, E),
        'Syntax.CheckVariantFormulas1.P4'(B, F, K, L),
        'Syntax.CheckVariantFormulas1.P4'(C, G, L, M),
        'Syntax.CheckVariantFormulas1.P4'(D, H, M, J).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.ISTE.F4'(A,B,C,D), 'MetaDefs.ISTE.F4'(E,F,G,H), I, J) :-
        '~Syntax.CheckVariantTerms.P4'(A, I, K, E),
        '~Syntax.CheckVariantFormulas1.P4'(B, F, K, L),
        '~Syntax.CheckVariantFormulas1.P4'(C, G, L, M),
        '~Syntax.CheckVariantFormulas1.P4'(D, H, M, J).
'Syntax.CheckVariantFormulas1.P4'('MetaDefs.Commit.F2'(A,B), 'MetaDefs.Commit.F2'(A,C), D, E) :-
        'Syntax.CheckVariantFormulas1.P4'(B, C, D, E).
'~Syntax.CheckVariantFormulas1.P4'('MetaDefs.Commit.F2'(A,B), 'MetaDefs.Commit.F2'(A,C), D, E) :-
        '~Syntax.CheckVariantFormulas1.P4'(B, C, D, E).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.Var.F2'(A,B), C, D, E, F, G, H, I, J, K) :-
        user:goedel_freeze(ground([B,G,A]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),L),G),true),('Syntax':'Syntax.UnifyValue.P5'(D,L,C,J,K),F=E,I=H),user:goedel_freeze(ground([B,H,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),M),H),true),('Syntax':'Syntax.UnifyValue.P5'(D,M,C,J,K),F=E,I=H),('Substs':'Substs.UnifyVariable.P4'(D,C,E,F),I=['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|H],K=J))))).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.Var.F2'(A,B), C, D, E, F, G, H, I, J, K) :-
        user:goedel_freeze(ground([B,G,A]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),L),G),true),('Syntax':'~Syntax.UnifyValue.P5'(D,L,C,J,K),F=E,I=H),user:goedel_freeze(ground([B,H,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),M),H),true),('Syntax':'~Syntax.UnifyValue.P5'(D,M,C,J,K),F=E,I=H),('Substs':'~Substs.UnifyVariable.P4'(D,C,E,F),I=['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|H],K=J))))).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.Var.F1'(A), B, C, D, E, F, G, H, I, J) :-
        user:goedel_freeze(ground([A,F]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),K),F),true),('Syntax':'Syntax.UnifyValue.P5'(C,K,B,I,J),E=D,H=G),user:goedel_freeze(ground([A,G]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),L),G),true),('Syntax':'Syntax.UnifyValue.P5'(C,L,B,I,J),E=D,H=G),('Substs':'Substs.UnifyVariable.P4'(C,B,D,E),H=['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),B)|G],J=I))))).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.Var.F1'(A), B, C, D, E, F, G, H, I, J) :-
        user:goedel_freeze(ground([A,F]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),K),F),true),('Syntax':'~Syntax.UnifyValue.P5'(C,K,B,I,J),E=D,H=G),user:goedel_freeze(ground([A,G]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),L),G),true),('Syntax':'~Syntax.UnifyValue.P5'(C,L,B,I,J),E=D,H=G),('Substs':'~Substs.UnifyVariable.P4'(C,B,D,E),H=['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),B)|G],J=I))))).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.Term.F2'(A,B), C, D, E, F, G, H, I, J, K) :-
        'Substs':'Substs.UnifyFunction.P6'(D, C, 'MetaDefs.Term.F2'(A,L), M, J, N),
        'Syntax.CheckFunctionTerm.P10'(B, L, M, E, F, G, H, I, N, K).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.Term.F2'(A,B), C, D, E, F, G, H, I, J, K) :-
        'Substs':'~Substs.UnifyFunction.P6'(D, C, 'MetaDefs.Term.F2'(A,L), M, J, N),
        '~Syntax.CheckFunctionTerm.P10'(B, L, M, E, F, G, H, I, N, K).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, H, I, J, K, L) :-
        'Substs':'Substs.UnifyFunction.P6'(E, D, 'MetaDefs.XTerm.F3'(A,M,C), N, K, O),
        'Syntax.CheckFunctionTerm.P10'(B, M, N, F, G, H, I, J, O, L).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, H, I, J, K, L) :-
        'Substs':'~Substs.UnifyFunction.P6'(E, D, 'MetaDefs.XTerm.F3'(A,M,C), N, K, O),
        '~Syntax.CheckFunctionTerm.P10'(B, M, N, F, G, H, I, J, O, L).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.CTerm.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'Substs.UnifyConstant.P5'(C, B, 'MetaDefs.CTerm.F1'(A), F, G).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.CTerm.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'~Substs.UnifyConstant.P5'(C, B, 'MetaDefs.CTerm.F1'(A), F, G).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.XCTerm.F2'(A,B), C, D, E, E, _, F, F, G, H) :-
        'Substs':'Substs.UnifyConstant.P5'(D, C, 'MetaDefs.XCTerm.F2'(A,B), G, H).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.XCTerm.F2'(A,B), C, D, E, E, _, F, F, G, H) :-
        'Substs':'~Substs.UnifyConstant.P5'(D, C, 'MetaDefs.XCTerm.F2'(A,B), G, H).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.Int.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'Substs.UnifyConstant.P5'(C, B, 'MetaDefs.Int.F1'(A), F, G).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.Int.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'~Substs.UnifyConstant.P5'(C, B, 'MetaDefs.Int.F1'(A), F, G).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.Str.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'Substs.UnifyConstant.P5'(C, B, 'MetaDefs.Str.F1'(A), F, G).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.Str.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'~Substs.UnifyConstant.P5'(C, B, 'MetaDefs.Str.F1'(A), F, G).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.Prm.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'Substs.UnifyConstant.P5'(C, B, 'MetaDefs.Prm.F1'(A), F, G).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.Prm.F1'(A), B, C, D, D, _, E, E, F, G) :-
        'Substs':'~Substs.UnifyConstant.P5'(C, B, 'MetaDefs.Prm.F1'(A), F, G).
'Syntax.CheckFunctionTerm1.P10'('MetaDefs.SuchThat.F2'(A,B), C, D, E, E, _, F, F, G, H) :-
        'Substs':'Substs.UnifyConstant.P5'(D, C, 'MetaDefs.SuchThat.F2'(A,B), G, H).
'~Syntax.CheckFunctionTerm1.P10'('MetaDefs.SuchThat.F2'(A,B), C, D, E, E, _, F, F, G, H) :-
        'Substs':'~Substs.UnifyConstant.P5'(D, C, 'MetaDefs.SuchThat.F2'(A,B), G, H).
'Syntax.CheckFunctionTerm.P10'([], [], _, A, A, _, B, B, C, C).
'~Syntax.CheckFunctionTerm.P10'([], [], _, A, A, _, B, B, C, C).
'Syntax.CheckFunctionTerm.P10'([A|B], [C|D], E, F, G, H, I, J, K, L) :-
        'Syntax.CheckFunctionTerm1.P10'(A, C, E, F, M, H, I, N, K, O),
        'Syntax.CheckFunctionTerm.P10'(B, D, E, M, G, H, N, J, O, L).
'~Syntax.CheckFunctionTerm.P10'([A|B], [C|D], E, F, G, H, I, J, K, L) :-
        '~Syntax.CheckFunctionTerm1.P10'(A, C, E, F, M, H, I, N, K, O),
        '~Syntax.CheckFunctionTerm.P10'(B, D, E, M, G, H, N, J, O, L).
'Syntax.CheckVariantFormulas.P4'([], A, A, []).
'~Syntax.CheckVariantFormulas.P4'([], A, A, []).
'Syntax.CheckVariantFormulas.P4'([A|B], C, D, [E|F]) :-
        'Syntax.CheckVariantFormulas1.P4'(A, E, C, G),
        'Syntax.CheckVariantFormulas.P4'(B, G, D, F).
'~Syntax.CheckVariantFormulas.P4'([A|B], C, D, [E|F]) :-
        '~Syntax.CheckVariantFormulas1.P4'(A, E, C, G),
        '~Syntax.CheckVariantFormulas.P4'(B, G, D, F).
'Syntax.CheckVariantTerms.P4'([], A, A, []).
'~Syntax.CheckVariantTerms.P4'([], A, A, []).
'Syntax.CheckVariantTerms.P4'([A|B], C, D, [E|F]) :-
        'Syntax.CheckVariantTerms1.P4'(A, C, G, E),
        'Syntax.CheckVariantTerms.P4'(B, G, D, F).
'~Syntax.CheckVariantTerms.P4'([A|B], C, D, [E|F]) :-
        '~Syntax.CheckVariantTerms1.P4'(A, C, G, E),
        '~Syntax.CheckVariantTerms.P4'(B, G, D, F).
'Syntax.CombineVarTypings.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.CombineVarTypings.P3.0'(A,B,C)).
'~Syntax.CombineVarTypings.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.CombineVarTypings.P3.0'(A,B,C)).
'Syntax.CombineVarTypings.P3.0'('MetaDefs.VarTyping.F1'(A), 'MetaDefs.VarTyping.F1'(B), 'MetaDefs.VarTyping.F1'(C)) :-
        'Substs':'Substs.EmptyHeap.P1'(D),
        'Syntax.CombineVarTypings1.P6'(A, [], 'Substs.TypeSubst.F2'(D,[]), E, B, F),
        'Syntax.ApplySubstToVarTypes.P3'(F, E, C).
'~Syntax.CombineVarTypings.P3.0'('MetaDefs.VarTyping.F1'(A), 'MetaDefs.VarTyping.F1'(B), 'MetaDefs.VarTyping.F1'(C)) :-
        'Substs':'~Substs.EmptyHeap.P1'(D),
        '~Syntax.CombineVarTypings1.P6'(A, [], 'Substs.TypeSubst.F2'(D,[]), E, B, F),
        '~Syntax.ApplySubstToVarTypes.P3'(F, E, C).
'Syntax.ClosedFormula.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.ClosedFormula.P1.0'(A)).
'~Syntax.ClosedFormula.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.ClosedFormula.P1.0'(A)).
'Syntax.ClosedFormula.P1.0'(A) :-
        'SharedSyntax':'SharedSyntax.SFormulaFreeVars.P2'(A, []).
'~Syntax.ClosedFormula.P1.0'(A) :-
        'SharedSyntax':'~SharedSyntax.SFormulaFreeVars.P2'(A, []).
'Syntax.Commit.P3'(A, B, 'MetaDefs.Commit.F2'(A,B)).
'~Syntax.Commit.P3'(A, B, 'MetaDefs.Commit.F2'(A,B)).
'Syntax.CombineVarTypings1.P6'([], A, B, B, C, D) :-
        'Syntax.DeleteVarTypeBindings.P3'(A, C, D).
'~Syntax.CombineVarTypings1.P6'([], A, B, B, C, D) :-
        '~Syntax.DeleteVarTypeBindings.P3'(A, C, D).
'Syntax.CombineVarTypings1.P6'(['MetaDefs.@.F2'(B,C)|A], D, E, F, G, ['MetaDefs.@.F2'(B,I)|H]) :-
        'Syntax.ApplySubstToType.P3'(C, E, J),
        user:goedel_freeze(ground([G,B]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.@.F2'(B,K),G),true),('Syntax':'Syntax.ApplySubstToType.P3'(K,E,L),'Substs':'Substs.EmptyHeap.P1'(M),'Syntax':'Syntax.UnifyTypes.P4'(J,L,'Substs.TypeSubst.F2'(M,[]),N),'Syntax':'Syntax.ApplySubstToType.P3'(J,N,I),'Syntax':'Syntax.ComposeTypeSubsts.P3'(N,E,O)),(I=J,O=E))),
        'Syntax.CombineVarTypings1.P6'(A, [B|D], O, F, G, H).
'~Syntax.CombineVarTypings1.P6'(['MetaDefs.@.F2'(B,C)|A], D, E, F, G, ['MetaDefs.@.F2'(B,I)|H]) :-
        '~Syntax.ApplySubstToType.P3'(C, E, J),
        user:goedel_freeze(ground([G,B]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.@.F2'(B,K),G),true),('Syntax':'~Syntax.ApplySubstToType.P3'(K,E,L),'Substs':'~Substs.EmptyHeap.P1'(M),'Syntax':'~Syntax.UnifyTypes.P4'(J,L,'Substs.TypeSubst.F2'(M,[]),N),'Syntax':'~Syntax.ApplySubstToType.P3'(J,N,I),'Syntax':'~Syntax.ComposeTypeSubsts.P3'(N,E,O)),(I=J,O=E))),
        '~Syntax.CombineVarTypings1.P6'(A, [B|D], O, F, G, H).
'Syntax.DelBindingInTypeSubst.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.DelBindingInTypeSubst.P4.0'(A,B,C,D)).
'~Syntax.DelBindingInTypeSubst.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.DelBindingInTypeSubst.P4.0'(A,B,C,D)).
'Syntax.DelBindingInTypeSubst.P4.0'(A, B, C, D) :-
        'Substs':'Substs.ComposeTypeSubsts1.P3'(A, A, E),
        'Substs':'Substs.SDelBindingInTypeSubst.P4'(E, B, C, D).
'~Syntax.DelBindingInTypeSubst.P4.0'(A, B, C, D) :-
        'Substs':'~Substs.ComposeTypeSubsts1.P3'(A, A, E),
        'Substs':'~Substs.SDelBindingInTypeSubst.P4'(E, B, C, D).
'Syntax.ConstructorType.P3'('MetaDefs.Type.F2'(A,B), A, B).
'~Syntax.ConstructorType.P3'('MetaDefs.Type.F2'(A,B), A, B).
'Syntax.ConjunctionOfAtoms.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.ConjunctionOfAtoms.P1.0'(A)).
'~Syntax.ConjunctionOfAtoms.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.ConjunctionOfAtoms.P1.0'(A)).
'Syntax.ConjunctionOfAtoms.P1.0'('MetaDefs.PAtom.F1'(_)).
'~Syntax.ConjunctionOfAtoms.P1.0'('MetaDefs.PAtom.F1'(_)).
'Syntax.ConjunctionOfAtoms.P1.0'('MetaDefs.Atom.F2'(_,_)).
'~Syntax.ConjunctionOfAtoms.P1.0'('MetaDefs.Atom.F2'(_,_)).
'Syntax.ConjunctionOfAtoms.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        'Syntax.ConjunctionOfAtoms.P1'(A),
        'Syntax.ConjunctionOfAtoms.P1'(B).
'~Syntax.ConjunctionOfAtoms.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        '~Syntax.ConjunctionOfAtoms.P1'(A),
        '~Syntax.ConjunctionOfAtoms.P1'(B).
'Syntax.ComposeTypeSubsts.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.ComposeTypeSubsts.P3.0'(A,B,C)).
'~Syntax.ComposeTypeSubsts.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.ComposeTypeSubsts.P3.0'(A,B,C)).
'Syntax.ComposeTypeSubsts.P3.0'(A, B, C) :-
        'Substs':'Substs.SubstsComposeType.P3'(A, B, C).
'~Syntax.ComposeTypeSubsts.P3.0'(A, B, C) :-
        'Substs':'~Substs.SubstsComposeType.P3'(A, B, C).
'Syntax.ComposeTermSubsts.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.ComposeTermSubsts.P3.0'(A,B,C)).
'~Syntax.ComposeTermSubsts.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.ComposeTermSubsts.P3.0'(A,B,C)).
'Syntax.ComposeTermSubsts.P3.0'(A, B, C) :-
        'Substs':'Substs.SubstsComposeTerm.P3'(A, B, C).
'~Syntax.ComposeTermSubsts.P3.0'(A, B, C) :-
        'Substs':'~Substs.SubstsComposeTerm.P3'(A, B, C).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.Empty.C0').
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.Empty.C0').
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.PAtom.F1'(_)).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.PAtom.F1'(_)).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.Atom.F2'(_,_)).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.Atom.F2'(_,_)).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.&''.F2'(A,B)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.&''.F2'(A,B)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.\\/''.F2'(A,B)) :-  % added \ djd
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.\\/''.F2'(A,B)) :-  % added \ djd
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.->''.F2'(A,B)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.->''.F2'(A,B)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.<-''.F2'(A,B)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.<-''.F2'(A,B)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.<->''.F2'(A,B)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.<->''.F2'(A,B)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.~''.F1'(A)) :-
        'Syntax.ConditionalFreeFormula.P1'(A).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.~''.F1'(A)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.Some.F2'(_,A)) :-
        'Syntax.ConditionalFreeFormula.P1'(A).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.Some.F2'(_,A)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.All.F2'(_,A)) :-
        'Syntax.ConditionalFreeFormula.P1'(A).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.All.F2'(_,A)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A).
'Syntax.ConditionalFreeFormula.P1'('MetaDefs.Commit.F2'(_,A)) :-
        'Syntax.ConditionalFreeFormula.P1'(A).
'~Syntax.ConditionalFreeFormula.P1'('MetaDefs.Commit.F2'(_,A)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A).
'Syntax.ConjunctionOfLiterals.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.ConjunctionOfLiterals.P1.0'(A)).
'~Syntax.ConjunctionOfLiterals.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.ConjunctionOfLiterals.P1.0'(A)).
'Syntax.ConjunctionOfLiterals.P1.0'(A) :-
        user:goedel_freeze(ground([A]), ('Syntax':'~Syntax.Literal.P1'(A),true->true;A='MetaDefs.&''.F2'(B,C),'Syntax':'Syntax.ConjunctionOfLiterals.P1'(B),'Syntax':'Syntax.ConjunctionOfLiterals.P1'(C))).
'~Syntax.ConjunctionOfLiterals.P1.0'(A) :-
        user:goedel_freeze(ground([A]), ('Syntax':'~Syntax.Literal.P1'(A),true->true;A='MetaDefs.&''.F2'(B,C),'Syntax':'~Syntax.ConjunctionOfLiterals.P1'(B),'Syntax':'~Syntax.ConjunctionOfLiterals.P1'(C))).
'Syntax.ConstantTerm.P2'('MetaDefs.CTerm.F1'(A), A).
'~Syntax.ConstantTerm.P2'('MetaDefs.CTerm.F1'(A), A).
'Syntax.ConstantTerm.P2'('MetaDefs.Int.F1'(A), 'MetaDefs.Name.F4'('"Integers',B,'MetaDefs.Constant.C0',0)) :-
        'SharedSyntax':'SharedSyntax.IntegerToCharDL.P3'(A, C, []),
        'Strings':'Strings.StringInts.P2'(B, C).
'~Syntax.ConstantTerm.P2'('MetaDefs.Int.F1'(A), 'MetaDefs.Name.F4'('"Integers',B,'MetaDefs.Constant.C0',0)) :-
        'SharedSyntax':'~SharedSyntax.IntegerToCharDL.P3'(A, C, []),
        'Strings':'~Strings.StringInts.P2'(B, C).
'Syntax.DefiniteGoal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.DefiniteGoal.P1.0'(A)).
'~Syntax.DefiniteGoal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.DefiniteGoal.P1.0'(A)).
'Syntax.DefiniteGoal.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Empty.C0',A)) :-
        'Syntax.DefiniteBody.P1'(A).
'~Syntax.DefiniteGoal.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Empty.C0',A)) :-
        '~Syntax.DefiniteBody.P1'(A).
'Syntax.DefiniteBody.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.DefiniteBody.P1.0'(A)).
'~Syntax.DefiniteBody.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.DefiniteBody.P1.0'(A)).
'Syntax.DefiniteBody.P1.0'('MetaDefs.Empty.C0').
'~Syntax.DefiniteBody.P1.0'('MetaDefs.Empty.C0').
'Syntax.DefiniteBody.P1.0'('MetaDefs.PAtom.F1'(_)).
'~Syntax.DefiniteBody.P1.0'('MetaDefs.PAtom.F1'(_)).
'Syntax.DefiniteBody.P1.0'('MetaDefs.Atom.F2'(_,_)).
'~Syntax.DefiniteBody.P1.0'('MetaDefs.Atom.F2'(_,_)).
'Syntax.DefiniteBody.P1.0'('MetaDefs.XPAtom.F1'(_)).
'~Syntax.DefiniteBody.P1.0'('MetaDefs.XPAtom.F1'(_)).
'Syntax.DefiniteBody.P1.0'('MetaDefs.XAtom.F2'(_,_)).
'~Syntax.DefiniteBody.P1.0'('MetaDefs.XAtom.F2'(_,_)).
'Syntax.DefiniteBody.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        'Syntax.DefiniteBody.P1'(A),
        'Syntax.DefiniteBody.P1'(B).
'~Syntax.DefiniteBody.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        '~Syntax.DefiniteBody.P1'(A),
        '~Syntax.DefiniteBody.P1'(B).
'Syntax.DefiniteBody.P1.0'('MetaDefs.Commit.F2'(_,A)) :-
        'Syntax.DefiniteBody.P1'(A).
'~Syntax.DefiniteBody.P1.0'('MetaDefs.Commit.F2'(_,A)) :-
        '~Syntax.DefiniteBody.P1'(A).
'Syntax.DefiniteStatement.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.DefiniteStatement.P1.0'(A)).
'~Syntax.DefiniteStatement.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.DefiniteStatement.P1.0'(A)).
'Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(_),A)) :-
        'Syntax.DefiniteBody.P1'(A).
'~Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(_),A)) :-
        '~Syntax.DefiniteBody.P1'(A).
'Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(_,_),A)) :-
        'Syntax.DefiniteBody.P1'(A).
'~Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(_,_),A)) :-
        '~Syntax.DefiniteBody.P1'(A).
'Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(_),A)) :-
        'Syntax.DefiniteBody.P1'(A).
'~Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(_),A)) :-
        '~Syntax.DefiniteBody.P1'(A).
'Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(_,_),A)) :-
        'Syntax.DefiniteBody.P1'(A).
'~Syntax.DefiniteStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(_,_),A)) :-
        '~Syntax.DefiniteBody.P1'(A).
'Syntax.DefiniteResultant.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.DefiniteResultant.P1.0'(A)).
'~Syntax.DefiniteResultant.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.DefiniteResultant.P1.0'(A)).
'Syntax.DefiniteResultant.P1.0'('MetaDefs.<-''.F2'(A,B)) :-
        'Syntax.DefiniteBody.P1'(A),
        'Syntax.DefiniteBody.P1'(B).
'~Syntax.DefiniteResultant.P1.0'('MetaDefs.<-''.F2'(A,B)) :-
        '~Syntax.DefiniteBody.P1'(A),
        '~Syntax.DefiniteBody.P1'(B).
'Syntax.DelBindingInTermSubst.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.DelBindingInTermSubst.P4.0'(A,B,C,D)).
'~Syntax.DelBindingInTermSubst.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.DelBindingInTermSubst.P4.0'(A,B,C,D)).
'Syntax.DelBindingInTermSubst.P4.0'(A, B, C, D) :-
        'Substs':'Substs.ComposeTermSubsts1.P3'(A, A, E),
        'Substs':'Substs.SDelBindingInTermSubst.P4'(E, B, C, D).
'~Syntax.DelBindingInTermSubst.P4.0'(A, B, C, D) :-
        'Substs':'~Substs.ComposeTermSubsts1.P3'(A, A, E),
        'Substs':'~Substs.SDelBindingInTermSubst.P4'(E, B, C, D).
'Syntax.FormulaMaxVarIndex.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.FormulaMaxVarIndex.P2.0'(A,B)).
'~Syntax.FormulaMaxVarIndex.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.FormulaMaxVarIndex.P2.0'(A,B)).
'Syntax.FormulaMaxVarIndex.P2.0'(A, B) :-
        'SharedSyntax':'SharedSyntax.SFormulaMaxVarIndex.P2'(A, B).
'~Syntax.FormulaMaxVarIndex.P2.0'(A, B) :-
        'SharedSyntax':'~SharedSyntax.SFormulaMaxVarIndex.P2'(A, B).
'Syntax.EmptyFormula.P1'('MetaDefs.Empty.C0').
'~Syntax.EmptyFormula.P1'('MetaDefs.Empty.C0').
'Syntax.DeleteBindings.P3'([], A, A).
'~Syntax.DeleteBindings.P3'([], A, A).
'Syntax.DeleteBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Syntax':'~Syntax.DelBindingInTermSubst.P4'(C,A,_,E),true),'Syntax':'Syntax.DeleteBindings.P3'(B,E,D),'Syntax':'Syntax.DeleteBindings.P3'(B,C,D))).
'~Syntax.DeleteBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Syntax':'~Syntax.DelBindingInTermSubst.P4'(C,A,_,E),true),'Syntax':'~Syntax.DeleteBindings.P3'(B,E,D),'Syntax':'~Syntax.DeleteBindings.P3'(B,C,D))).
'Syntax.DelBindingInVarTyping.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.DelBindingInVarTyping.P4.0'(A,B,C,D)).
'~Syntax.DelBindingInVarTyping.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.DelBindingInVarTyping.P4.0'(A,B,C,D)).
'Syntax.DelBindingInVarTyping.P4.0'('MetaDefs.VarTyping.F1'(A), B, C, 'MetaDefs.VarTyping.F1'(D)) :-
        'ExtraSyntax':'ExtraSyntax.EDelBindingInVarTyping.P4'(A, B, C, D).
'~Syntax.DelBindingInVarTyping.P4.0'('MetaDefs.VarTyping.F1'(A), B, C, 'MetaDefs.VarTyping.F1'(D)) :-
        'ExtraSyntax':'~ExtraSyntax.EDelBindingInVarTyping.P4'(A, B, C, D).
'Syntax.DeleteAllVars.P3'([], _, []).
'~Syntax.DeleteAllVars.P3'([], _, []).
'Syntax.DeleteAllVars.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), ('Lists':'~Lists.MemberCheck.P2'(A,C),true->'Syntax':'Syntax.DeleteAllVars.P3'(B,C,D);D=[A|E],'Syntax':'Syntax.DeleteAllVars.P3'(B,C,E))).
'~Syntax.DeleteAllVars.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), ('Lists':'~Lists.MemberCheck.P2'(A,C),true->'Syntax':'~Syntax.DeleteAllVars.P3'(B,C,D);D=[A|E],'Syntax':'~Syntax.DeleteAllVars.P3'(B,C,E))).
'Syntax.Derive.P7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'Syntax':'Syntax.Derive.P7.0'(A,B,C,D,E,F,G)).
'~Syntax.Derive.P7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'Syntax':'~Syntax.Derive.P7.0'(A,B,C,D,E,F,G)).
'Syntax.Derive.P7.0'(A, B, 'MetaDefs.PAtom.F1'(C), D, 'MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(C),E), F, 'MetaDefs.<-''.F2'(A,G)) :- !,
        'Syntax.NormalBody.P1'(E),
        'Syntax.AndWithEmpty.P3'(B, E, H),
        'Syntax.AndWithEmpty.P3'(H, D, G),
        'Syntax.EmptyTermSubst.P1'(F).
'~Syntax.Derive.P7.0'(A, B, 'MetaDefs.PAtom.F1'(C), D, 'MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(C),E), F, 'MetaDefs.<-''.F2'(A,G)) :-
        true,
        '~Syntax.NormalBody.P1'(E),
        '~Syntax.AndWithEmpty.P3'(B, E, H),
        '~Syntax.AndWithEmpty.P3'(H, D, G),
        '~Syntax.EmptyTermSubst.P1'(F).
'Syntax.Derive.P7.0'(A, B, 'MetaDefs.Atom.F2'(C,D), E, 'MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(C,F),G), H, 'MetaDefs.<-''.F2'(I,J)) :- !,
        'Syntax.NormalBody.P1'(G),
        'Syntax.EmptyTermSubst.P1'(K),
        'SharedSyntax':'SharedSyntax.UnifyingTermSubst.P4'(D, F, K, H),
        'Syntax.ApplySubstToFormula.P3'(A, H, I),
        'Syntax.ApplySubstToFormula.P3'(B, H, L),
        'Syntax.ApplySubstToFormula.P3'(E, H, M),
        'Syntax.ApplySubstToFormula.P3'(G, H, N),
        'Syntax.AndWithEmpty.P3'(L, N, O),
        'Syntax.AndWithEmpty.P3'(O, M, J).
'~Syntax.Derive.P7.0'(A, B, 'MetaDefs.Atom.F2'(C,D), E, 'MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(C,F),G), H, 'MetaDefs.<-''.F2'(I,J)) :-
        true,
        '~Syntax.NormalBody.P1'(G),
        '~Syntax.EmptyTermSubst.P1'(K),
        'SharedSyntax':'~SharedSyntax.UnifyingTermSubst.P4'(D, F, K, H),
        '~Syntax.ApplySubstToFormula.P3'(A, H, I),
        '~Syntax.ApplySubstToFormula.P3'(B, H, L),
        '~Syntax.ApplySubstToFormula.P3'(E, H, M),
        '~Syntax.ApplySubstToFormula.P3'(G, H, N),
        '~Syntax.AndWithEmpty.P3'(L, N, O),
        '~Syntax.AndWithEmpty.P3'(O, M, J).
'Syntax.Derive.P7.0'(A, B, 'MetaDefs.XPAtom.F1'(C), D, 'MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(C),E), F, 'MetaDefs.<-''.F2'(A,G)) :- !,
        'Syntax.NormalBody.P1'(E),
        'Syntax.AndWithEmpty.P3'(B, E, H),
        'Syntax.AndWithEmpty.P3'(H, D, G),
        'Syntax.EmptyTermSubst.P1'(F).
'~Syntax.Derive.P7.0'(A, B, 'MetaDefs.XPAtom.F1'(C), D, 'MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(C),E), F, 'MetaDefs.<-''.F2'(A,G)) :-
        true,
        '~Syntax.NormalBody.P1'(E),
        '~Syntax.AndWithEmpty.P3'(B, E, H),
        '~Syntax.AndWithEmpty.P3'(H, D, G),
        '~Syntax.EmptyTermSubst.P1'(F).
'Syntax.Derive.P7.0'(A, B, 'MetaDefs.XAtom.F2'(C,D), E, 'MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(C,F),G), H, 'MetaDefs.<-''.F2'(I,J)) :- !,
        'Syntax.NormalBody.P1'(G),
        'Syntax.EmptyTermSubst.P1'(K),
        'SharedSyntax':'SharedSyntax.UnifyingTermSubst.P4'(D, F, K, H),
        'Syntax.ApplySubstToFormula.P3'(A, H, I),
        'Syntax.ApplySubstToFormula.P3'(B, H, L),
        'Syntax.ApplySubstToFormula.P3'(E, H, M),
        'Syntax.ApplySubstToFormula.P3'(G, H, N),
        'Syntax.AndWithEmpty.P3'(L, N, O),
        'Syntax.AndWithEmpty.P3'(O, M, J).
'~Syntax.Derive.P7.0'(A, B, 'MetaDefs.XAtom.F2'(C,D), E, 'MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(C,F),G), H, 'MetaDefs.<-''.F2'(I,J)) :-
        true,
        '~Syntax.NormalBody.P1'(G),
        '~Syntax.EmptyTermSubst.P1'(K),
        'SharedSyntax':'~SharedSyntax.UnifyingTermSubst.P4'(D, F, K, H),
        '~Syntax.ApplySubstToFormula.P3'(A, H, I),
        '~Syntax.ApplySubstToFormula.P3'(B, H, L),
        '~Syntax.ApplySubstToFormula.P3'(E, H, M),
        '~Syntax.ApplySubstToFormula.P3'(G, H, N),
        '~Syntax.AndWithEmpty.P3'(L, N, O),
        '~Syntax.AndWithEmpty.P3'(O, M, J).
'Syntax.DeleteVarTypeBindings.P3'([], A, A).
'~Syntax.DeleteVarTypeBindings.P3'([], A, A).
'Syntax.DeleteVarTypeBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Lists':'~Lists.DeleteFirst.P3'('MetaDefs.@.F2'(A,_),C,E),true),'Syntax':'Syntax.DeleteVarTypeBindings.P3'(B,E,D),'Syntax':'Syntax.DeleteVarTypeBindings.P3'(B,C,D))).
'~Syntax.DeleteVarTypeBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Lists':'~Lists.DeleteFirst.P3'('MetaDefs.@.F2'(A,_),C,E),true),'Syntax':'~Syntax.DeleteVarTypeBindings.P3'(B,E,D),'Syntax':'~Syntax.DeleteVarTypeBindings.P3'(B,C,D))).
'Syntax.Equivalent.P3'(A, B, 'MetaDefs.<->''.F2'(A,B)).
'~Syntax.Equivalent.P3'(A, B, 'MetaDefs.<->''.F2'(A,B)).
'Syntax.EmptyTypeSubst.P1'('Substs.TypeSubst.F2'(A,[])) :-
        'Substs':'Substs.EmptyHeap.P1'(A).
'~Syntax.EmptyTypeSubst.P1'('Substs.TypeSubst.F2'(A,[])) :-
        'Substs':'~Substs.EmptyHeap.P1'(A).
'Syntax.EmptyTermSubst.P1'(A) :-
        'SharedSyntax':'SharedSyntax.SEmptyTermSubst.P1'(A).
'~Syntax.EmptyTermSubst.P1'(A) :-
        'SharedSyntax':'~SharedSyntax.SEmptyTermSubst.P1'(A).
'Syntax.EmptyVarTyping.P1'('MetaDefs.VarTyping.F1'([])).
'~Syntax.EmptyVarTyping.P1'('MetaDefs.VarTyping.F1'([])).
'Syntax.FindTypeBindings.P3'([], _, []).
'~Syntax.FindTypeBindings.P3'([], _, []).
'Syntax.FindTypeBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Syntax':'~Syntax.BindingInTypeSubst.P3'(C,A,E),true),D=['MetaDefs.!.F2'(A,E)|F],D=F)),
        'Syntax.FindTypeBindings.P3'(B, C, F).
'~Syntax.FindTypeBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Syntax':'~Syntax.BindingInTypeSubst.P3'(C,A,E),true),D=['MetaDefs.!.F2'(A,E)|F],D=F)),
        '~Syntax.FindTypeBindings.P3'(B, C, F).
'Syntax.FindTermBindings.P3'([], _, []).
'~Syntax.FindTermBindings.P3'([], _, []).
'Syntax.FindTermBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Syntax':'~Syntax.BindingInTermSubst.P3'(C,A,E),true),D=['MetaDefs.!.F2'(A,E)|F],D=F)),
        'Syntax.FindTermBindings.P3'(B, C, F).
'~Syntax.FindTermBindings.P3'([A|B], C, D) :-
        user:goedel_freeze(ground([C,A]), if(('Syntax':'~Syntax.BindingInTermSubst.P3'(C,A,E),true),D=['MetaDefs.!.F2'(A,E)|F],D=F)),
        '~Syntax.FindTermBindings.P3'(B, C, F).
'Syntax.GroundAtom.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.GroundAtom.P1.0'(A)).
'~Syntax.GroundAtom.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.GroundAtom.P1.0'(A)).
'Syntax.GroundAtom.P1.0'('MetaDefs.PAtom.F1'(_)).
'~Syntax.GroundAtom.P1.0'('MetaDefs.PAtom.F1'(_)).
'Syntax.GroundAtom.P1.0'('MetaDefs.Atom.F2'(_,A)) :-
        'Syntax.GroundTerm1.P1'(A).
'~Syntax.GroundAtom.P1.0'('MetaDefs.Atom.F2'(_,A)) :-
        '~Syntax.GroundTerm1.P1'(A).
'Syntax.GroundAtom.P1.0'('MetaDefs.XPAtom.F1'(_)).
'~Syntax.GroundAtom.P1.0'('MetaDefs.XPAtom.F1'(_)).
'Syntax.GroundAtom.P1.0'('MetaDefs.XAtom.F2'(_,A)) :-
        'Syntax.GroundTerm1.P1'(A).
'~Syntax.GroundAtom.P1.0'('MetaDefs.XAtom.F2'(_,A)) :-
        '~Syntax.GroundTerm1.P1'(A).
'Syntax.FunctionTerm.P3'('MetaDefs.Term.F2'(A,B), A, B).
'~Syntax.FunctionTerm.P3'('MetaDefs.Term.F2'(A,B), A, B).
'Syntax.FormulaVariables.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.FormulaVariables.P2.0'(A,B)).
'~Syntax.FormulaVariables.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.FormulaVariables.P2.0'(A,B)).
'Syntax.FormulaVariables.P2.0'(A, B) :-
        'SharedSyntax':'SharedSyntax.SFormulaFreeVars.P2'(A, B).
'~Syntax.FormulaVariables.P2.0'(A, B) :-
        'SharedSyntax':'~SharedSyntax.SFormulaFreeVars.P2'(A, B).
'Syntax.Goal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.Goal.P1.0'(A)).
'~Syntax.Goal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.Goal.P1.0'(A)).
'Syntax.Goal.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Empty.C0',_)).
'~Syntax.Goal.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Empty.C0',_)).
'Syntax.GetParameter.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'Syntax':'Syntax.TypeNotOccur.P2'(A,B),'Substs':'Substs.BindParameter.P4'(B,A,C,D);D=C)).
'~Syntax.GetParameter.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'Syntax':'~Syntax.TypeNotOccur.P2'(A,B),'Substs':'~Substs.BindParameter.P4'(B,A,C,D);D=C)).
'Syntax.GroundTerm.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.GroundTerm.P1.0'(A)).
'~Syntax.GroundTerm.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.GroundTerm.P1.0'(A)).
'Syntax.GroundTerm.P1.0'('MetaDefs.CTerm.F1'(_)).
'~Syntax.GroundTerm.P1.0'('MetaDefs.CTerm.F1'(_)).
'Syntax.GroundTerm.P1.0'('MetaDefs.Term.F2'(_,A)) :-
        'Syntax.GroundTerm1.P1'(A).
'~Syntax.GroundTerm.P1.0'('MetaDefs.Term.F2'(_,A)) :-
        '~Syntax.GroundTerm1.P1'(A).
'Syntax.GroundTerm.P1.0'('MetaDefs.XCTerm.F2'(_,_)).
'~Syntax.GroundTerm.P1.0'('MetaDefs.XCTerm.F2'(_,_)).
'Syntax.GroundTerm.P1.0'('MetaDefs.Int.F1'(_)).
'~Syntax.GroundTerm.P1.0'('MetaDefs.Int.F1'(_)).
'Syntax.GroundTerm.P1.0'('MetaDefs.Str.F1'(_)).
'~Syntax.GroundTerm.P1.0'('MetaDefs.Str.F1'(_)).
'Syntax.GroundTerm.P1.0'('MetaDefs.Prm.F1'(_)).
'~Syntax.GroundTerm.P1.0'('MetaDefs.Prm.F1'(_)).
'Syntax.GroundTerm.P1.0'('MetaDefs.XTerm.F3'(_,A,_)) :-
        'Syntax.GroundTerm1.P1'(A).
'~Syntax.GroundTerm.P1.0'('MetaDefs.XTerm.F3'(_,A,_)) :-
        '~Syntax.GroundTerm1.P1'(A).
'Syntax.GroundTerm1.P1'([]).
'~Syntax.GroundTerm1.P1'([]).
'Syntax.GroundTerm1.P1'([A|B]) :-
        'Syntax.GroundTerm.P1'(A),
        'Syntax.GroundTerm1.P1'(B).
'~Syntax.GroundTerm1.P1'([A|B]) :-
        '~Syntax.GroundTerm.P1'(A),
        '~Syntax.GroundTerm1.P1'(B).
'Syntax.Resultant.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.Resultant.P1.0'(A)).
'~Syntax.Resultant.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.Resultant.P1.0'(A)).
'Syntax.Resultant.P1.0'('MetaDefs.<-''.F2'(_,_)).
'~Syntax.Resultant.P1.0'('MetaDefs.<-''.F2'(_,_)).
'Syntax.Parameter.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.Parameter.P1.0'(A)).
'~Syntax.Parameter.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.Parameter.P1.0'(A)).
'Syntax.Parameter.P1.0'('MetaDefs.Par.F1'(_)).
'~Syntax.Parameter.P1.0'('MetaDefs.Par.F1'(_)).
'Syntax.Parameter.P1.0'('MetaDefs.Par.F2'(_,_)).
'~Syntax.Parameter.P1.0'('MetaDefs.Par.F2'(_,_)).
'Syntax.NormalBody.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.NormalBody.P1.0'(A)).
'~Syntax.NormalBody.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.NormalBody.P1.0'(A)).
'Syntax.NormalBody.P1.0'('MetaDefs.Empty.C0').
'~Syntax.NormalBody.P1.0'('MetaDefs.Empty.C0').
'Syntax.NormalBody.P1.0'('MetaDefs.PAtom.F1'(_)).
'~Syntax.NormalBody.P1.0'('MetaDefs.PAtom.F1'(_)).
'Syntax.NormalBody.P1.0'('MetaDefs.Atom.F2'(_,_)).
'~Syntax.NormalBody.P1.0'('MetaDefs.Atom.F2'(_,_)).
'Syntax.NormalBody.P1.0'('MetaDefs.XPAtom.F1'(_)).
'~Syntax.NormalBody.P1.0'('MetaDefs.XPAtom.F1'(_)).
'Syntax.NormalBody.P1.0'('MetaDefs.XAtom.F2'(_,_)).
'~Syntax.NormalBody.P1.0'('MetaDefs.XAtom.F2'(_,_)).
'Syntax.NormalBody.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        'Syntax.NormalBody.P1'(A),
        'Syntax.NormalBody.P1'(B).
'~Syntax.NormalBody.P1.0'('MetaDefs.&''.F2'(A,B)) :-
        '~Syntax.NormalBody.P1'(A),
        '~Syntax.NormalBody.P1'(B).
'Syntax.NormalBody.P1.0'('MetaDefs.~''.F1'(A)) :-
        'Syntax.NormalBody.P1'(A).
'~Syntax.NormalBody.P1.0'('MetaDefs.~''.F1'(A)) :-
        '~Syntax.NormalBody.P1'(A).
'Syntax.NormalBody.P1.0'('MetaDefs.IT.F2'(A,B)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.NormalBody.P1.0'('MetaDefs.IT.F2'(A,B)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.NormalBody.P1.0'('MetaDefs.ITE.F3'(A,B,_)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.NormalBody.P1.0'('MetaDefs.ITE.F3'(A,B,_)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.NormalBody.P1.0'('MetaDefs.IST.F3'(_,A,B)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.NormalBody.P1.0'('MetaDefs.IST.F3'(_,A,B)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.NormalBody.P1.0'('MetaDefs.ISTE.F4'(_,A,B,_)) :-
        'Syntax.ConditionalFreeFormula.P1'(A),
        'Syntax.ConditionalFreeFormula.P1'(B).
'~Syntax.NormalBody.P1.0'('MetaDefs.ISTE.F4'(_,A,B,_)) :-
        '~Syntax.ConditionalFreeFormula.P1'(A),
        '~Syntax.ConditionalFreeFormula.P1'(B).
'Syntax.NormalBody.P1.0'('MetaDefs.Commit.F2'(_,A)) :-
        'Syntax.NormalBody.P1'(A).
'~Syntax.NormalBody.P1.0'('MetaDefs.Commit.F2'(_,A)) :-
        '~Syntax.NormalBody.P1'(A).
'Syntax.IsImpliedBy.P3'(A, B, 'MetaDefs.<-''.F2'(A,B)).
'~Syntax.IsImpliedBy.P3'(A, B, 'MetaDefs.<-''.F2'(A,B)).
'Syntax.IfThen.P3'(A, B, 'MetaDefs.IT.F2'(A,B)).
'~Syntax.IfThen.P3'(A, B, 'MetaDefs.IT.F2'(A,B)).
'Syntax.IfSomeThen.P4'(A, B, C, 'MetaDefs.IST.F3'(A,B,C)).
'~Syntax.IfSomeThen.P4'(A, B, C, 'MetaDefs.IST.F3'(A,B,C)).
'Syntax.GroundType1.P1'([]).
'~Syntax.GroundType1.P1'([]).
'Syntax.GroundType1.P1'([A|B]) :-
        'Syntax.GroundType.P1'(A),
        'Syntax.GroundType1.P1'(B).
'~Syntax.GroundType1.P1'([A|B]) :-
        '~Syntax.GroundType.P1'(A),
        '~Syntax.GroundType1.P1'(B).
'Syntax.IfSomeThenElse.P5'(A, B, C, D, 'MetaDefs.ISTE.F4'(A,B,C,D)).
'~Syntax.IfSomeThenElse.P5'(A, B, C, D, 'MetaDefs.ISTE.F4'(A,B,C,D)).
'Syntax.Implies.P3'(A, B, 'MetaDefs.->''.F2'(A,B)).
'~Syntax.Implies.P3'(A, B, 'MetaDefs.->''.F2'(A,B)).
'Syntax.IfThenElse.P4'(A, B, C, 'MetaDefs.ITE.F3'(A,B,C)).
'~Syntax.IfThenElse.P4'(A, B, C, 'MetaDefs.ITE.F3'(A,B,C)).
'Syntax.IntensionalSet.P3'(A, B, 'MetaDefs.SuchThat.F2'(A,B)).
'~Syntax.IntensionalSet.P3'(A, B, 'MetaDefs.SuchThat.F2'(A,B)).
'Syntax.NewCommit.P5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,D]), ('Lists':'~Lists.MemberCheck.P2'('Syntax.LabelPair.F2'(A,_),D),true->C=B,E=D;user:goedel_freeze(ground([B]),('Integers':'~Integers.>=.P2'(B,0),true->E=['Syntax.LabelPair.F2'(A,B)|D],'Integers':plus(B,1,F),C=F;E=['Syntax.LabelPair.F2'(A,A)|D],C=B)))).
'~Syntax.NewCommit.P5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,D]), ('Lists':'~Lists.MemberCheck.P2'('Syntax.LabelPair.F2'(A,_),D),true->C=B,E=D;user:goedel_freeze(ground([B]),('Integers':'~Integers.>=.P2'(B,0),true->E=['Syntax.LabelPair.F2'(A,B)|D],'Integers':plus(B,1,F),C=F;E=['Syntax.LabelPair.F2'(A,A)|D],C=B)))).
'Syntax.MaxParIndex.P3'([], A, A).
'~Syntax.MaxParIndex.P3'([], A, A).
'Syntax.MaxParIndex.P3'([A|B], C, D) :-
        'Syntax.MaxParIndex1.P3'(A, C, E),
        'Syntax.MaxParIndex.P3'(B, E, D).
'~Syntax.MaxParIndex.P3'([A|B], C, D) :-
        '~Syntax.MaxParIndex1.P3'(A, C, E),
        '~Syntax.MaxParIndex.P3'(B, E, D).
'Syntax.Literal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.Literal.P1.0'(A)).
'~Syntax.Literal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.Literal.P1.0'(A)).
'Syntax.Literal.P1.0'(A) :-
        user:goedel_freeze(ground([A]), ('Syntax':'~Syntax.Atom.P1'(A),true->true;A='MetaDefs.~''.F1'(B),'Syntax':'Syntax.Atom.P1'(B))).
'~Syntax.Literal.P1.0'(A) :-
        user:goedel_freeze(ground([A]), ('Syntax':'~Syntax.Atom.P1'(A),true->true;A='MetaDefs.~''.F1'(B),'Syntax':'~Syntax.Atom.P1'(B))).
'Syntax.MaxParIndex1.P3'('MetaDefs.Par.F1'(A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('Integers':'~Integers.>.P2'(A,B),true->C=A;C=B)).
'~Syntax.MaxParIndex1.P3'('MetaDefs.Par.F1'(A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('Integers':'~Integers.>.P2'(A,B),true->C=A;C=B)).
'Syntax.MaxParIndex1.P3'('MetaDefs.Par.F2'(_,A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('Integers':'~Integers.>.P2'(A,B),true->C=A;C=B)).
'~Syntax.MaxParIndex1.P3'('MetaDefs.Par.F2'(_,A), B, C) :-
        user:goedel_freeze(ground([B,A]), ('Integers':'~Integers.>.P2'(A,B),true->C=A;C=B)).
'Syntax.MaxParIndex1.P3'('MetaDefs.BType.F1'(_), A, A).
'~Syntax.MaxParIndex1.P3'('MetaDefs.BType.F1'(_), A, A).
'Syntax.MaxParIndex1.P3'('MetaDefs.XBType.F1'(_), A, A).
'~Syntax.MaxParIndex1.P3'('MetaDefs.XBType.F1'(_), A, A).
'Syntax.MaxParIndex1.P3'('MetaDefs.Type.F2'(_,A), B, C) :-
        'Syntax.MaxParIndex.P3'(A, B, C).
'~Syntax.MaxParIndex1.P3'('MetaDefs.Type.F2'(_,A), B, C) :-
        '~Syntax.MaxParIndex.P3'(A, B, C).
'Syntax.MaxParIndex1.P3'('MetaDefs.XType.F2'(_,A), B, C) :-
        'Syntax.MaxParIndex.P3'(A, B, C).
'~Syntax.MaxParIndex1.P3'('MetaDefs.XType.F2'(_,A), B, C) :-
        '~Syntax.MaxParIndex.P3'(A, B, C).
'Syntax.NonParameter.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.NonParameter.P1.0'(A)).
'~Syntax.NonParameter.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.NonParameter.P1.0'(A)).
'Syntax.NonParameter.P1.0'('MetaDefs.BType.F1'(_)).
'~Syntax.NonParameter.P1.0'('MetaDefs.BType.F1'(_)).
'Syntax.NonParameter.P1.0'('MetaDefs.Type.F2'(_,_)).
'~Syntax.NonParameter.P1.0'('MetaDefs.Type.F2'(_,_)).
'Syntax.NonParameter.P1.0'('MetaDefs.XBType.F1'(_)).
'~Syntax.NonParameter.P1.0'('MetaDefs.XBType.F1'(_)).
'Syntax.NonParameter.P1.0'('MetaDefs.XType.F2'(_,_)).
'~Syntax.NonParameter.P1.0'('MetaDefs.XType.F2'(_,_)).
'Syntax.NonVariable.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.NonVariable.P1.0'(A)).
'~Syntax.NonVariable.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.NonVariable.P1.0'(A)).
'Syntax.NonVariable.P1.0'('MetaDefs.CTerm.F1'(_)).
'~Syntax.NonVariable.P1.0'('MetaDefs.CTerm.F1'(_)).
'Syntax.NonVariable.P1.0'('MetaDefs.Term.F2'(_,_)).
'~Syntax.NonVariable.P1.0'('MetaDefs.Term.F2'(_,_)).
'Syntax.NonVariable.P1.0'('MetaDefs.XCTerm.F2'(_,_)).
'~Syntax.NonVariable.P1.0'('MetaDefs.XCTerm.F2'(_,_)).
'Syntax.NonVariable.P1.0'('MetaDefs.XTerm.F3'(_,_,_)).
'~Syntax.NonVariable.P1.0'('MetaDefs.XTerm.F3'(_,_,_)).
'Syntax.NonVariable.P1.0'('MetaDefs.Int.F1'(_)).
'~Syntax.NonVariable.P1.0'('MetaDefs.Int.F1'(_)).
'Syntax.NonVariable.P1.0'('MetaDefs.Str.F1'(_)).
'~Syntax.NonVariable.P1.0'('MetaDefs.Str.F1'(_)).
'Syntax.NonVariable.P1.0'('MetaDefs.Prm.F1'(_)).
'~Syntax.NonVariable.P1.0'('MetaDefs.Prm.F1'(_)).
'Syntax.NormalStatement.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.NormalStatement.P1.0'(A)).
'~Syntax.NormalStatement.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.NormalStatement.P1.0'(A)).
'Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(_),A)) :-
        'Syntax.NormalBody.P1'(A).
'~Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(_),A)) :-
        '~Syntax.NormalBody.P1'(A).
'Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(_,_),A)) :-
        'Syntax.NormalBody.P1'(A).
'~Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(_,_),A)) :-
        '~Syntax.NormalBody.P1'(A).
'Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(_),A)) :-
        'Syntax.NormalBody.P1'(A).
'~Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(_),A)) :-
        '~Syntax.NormalBody.P1'(A).
'Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(_,_),A)) :-
        'Syntax.NormalBody.P1'(A).
'~Syntax.NormalStatement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(_,_),A)) :-
        '~Syntax.NormalBody.P1'(A).
'Syntax.NormalResultant.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.NormalResultant.P1.0'(A)).
'~Syntax.NormalResultant.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.NormalResultant.P1.0'(A)).
'Syntax.NormalResultant.P1.0'('MetaDefs.<-''.F2'(A,B)) :-
        'Syntax.NormalBody.P1'(A),
        'Syntax.NormalBody.P1'(B).
'~Syntax.NormalResultant.P1.0'('MetaDefs.<-''.F2'(A,B)) :-
        '~Syntax.NormalBody.P1'(A),
        '~Syntax.NormalBody.P1'(B).
'Syntax.NormalGoal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.NormalGoal.P1.0'(A)).
'~Syntax.NormalGoal.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.NormalGoal.P1.0'(A)).
'Syntax.NormalGoal.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Empty.C0',A)) :-
        'Syntax.NormalBody.P1'(A).
'~Syntax.NormalGoal.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Empty.C0',A)) :-
        '~Syntax.NormalBody.P1'(A).
'Syntax.OpaqueTerm.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.OpaqueTerm.P1.0'(A)).
'~Syntax.OpaqueTerm.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.OpaqueTerm.P1.0'(A)).
'Syntax.OpaqueTerm.P1.0'('MetaDefs.XCTerm.F2'(_,_)).
'~Syntax.OpaqueTerm.P1.0'('MetaDefs.XCTerm.F2'(_,_)).
'Syntax.OpaqueTerm.P1.0'('MetaDefs.Str.F1'(_)).
'~Syntax.OpaqueTerm.P1.0'('MetaDefs.Str.F1'(_)).
'Syntax.OpaqueTerm.P1.0'('MetaDefs.Prm.F1'(_)).
'~Syntax.OpaqueTerm.P1.0'('MetaDefs.Prm.F1'(_)).
'Syntax.OpaqueTerm.P1.0'('MetaDefs.XTerm.F3'(_,_,_)).
'~Syntax.OpaqueTerm.P1.0'('MetaDefs.XTerm.F3'(_,_,_)).
'Syntax.NotMember.P2'([], _).
'~Syntax.NotMember.P2'([], _).
'Syntax.NotMember.P2'([A|B], C) :-
        user:not_equal([], [C,A], C, A),
        'Syntax.NotMember.P2'(B, C).
'~Syntax.NotMember.P2'([A|B], C) :-
        user:not_equal([], [C,A], C, A),
        '~Syntax.NotMember.P2'(B, C).
'Syntax.Not.P2'(A, 'MetaDefs.~''.F1'(A)).
'~Syntax.Not.P2'(A, 'MetaDefs.~''.F1'(A)).
'Syntax.OpaqueAtom.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.OpaqueAtom.P1.0'(A)).
'~Syntax.OpaqueAtom.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.OpaqueAtom.P1.0'(A)).
'Syntax.OpaqueAtom.P1.0'('MetaDefs.XPAtom.F1'(_)).
'~Syntax.OpaqueAtom.P1.0'('MetaDefs.XPAtom.F1'(_)).
'Syntax.OpaqueAtom.P1.0'('MetaDefs.XAtom.F2'(_,_)).
'~Syntax.OpaqueAtom.P1.0'('MetaDefs.XAtom.F2'(_,_)).
'Syntax.OpaqueType.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.OpaqueType.P1.0'(A)).
'~Syntax.OpaqueType.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.OpaqueType.P1.0'(A)).
'Syntax.OpaqueType.P1.0'('MetaDefs.XBType.F1'(_)).
'~Syntax.OpaqueType.P1.0'('MetaDefs.XBType.F1'(_)).
'Syntax.OpaqueType.P1.0'('MetaDefs.XType.F2'(_,_)).
'~Syntax.OpaqueType.P1.0'('MetaDefs.XType.F2'(_,_)).
'Syntax.Or.P3'(A, B, 'MetaDefs.\\/''.F2'(A,B)).  % added \ djd
'~Syntax.Or.P3'(A, B, 'MetaDefs.\\/''.F2'(A,B)).  % added \ djd
'Syntax.RenameTypes.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.RenameTypes.P3.0'(A,B,C)).
'~Syntax.RenameTypes.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.RenameTypes.P3.0'(A,B,C)).
'Syntax.RenameTypes.P3.0'(A, B, C) :-
        'Syntax.TypeMaxParIndex.P2'(A, D),
        'Syntax.RenameAllType2.P4'(B, D, [], C).
'~Syntax.RenameTypes.P3.0'(A, B, C) :-
        '~Syntax.TypeMaxParIndex.P2'(A, D),
        '~Syntax.RenameAllType2.P4'(B, D, [], C).
'Syntax.RenameAllTerm2.P4'([], _, _, []).
'~Syntax.RenameAllTerm2.P4'([], _, _, []).
'Syntax.RenameAllTerm2.P4'([A|B], C, D, [E|F]) :-
        'Syntax.RenameAllTerm3.P6'(A, C, G, D, H, E),
        'Syntax.RenameAllTerm2.P4'(B, G, H, F).
'~Syntax.RenameAllTerm2.P4'([A|B], C, D, [E|F]) :-
        '~Syntax.RenameAllTerm3.P6'(A, C, G, D, H, E),
        '~Syntax.RenameAllTerm2.P4'(B, G, H, F).
'Syntax.PredicateAtom.P3'('MetaDefs.Atom.F2'(A,B), A, B).
'~Syntax.PredicateAtom.P3'('MetaDefs.Atom.F2'(A,B), A, B).
'Syntax.ParamsInType.P3'('MetaDefs.Par.F2'(A,B), C, D) :-
        user:goedel_freeze(ground([B,A,C]), ('Lists':'~Lists.MemberCheck.P2'('MetaDefs.Par.F2'(A,B),C),true->D=C;D=['MetaDefs.Par.F2'(A,B)|C])).
'~Syntax.ParamsInType.P3'('MetaDefs.Par.F2'(A,B), C, D) :-
        user:goedel_freeze(ground([B,A,C]), ('Lists':'~Lists.MemberCheck.P2'('MetaDefs.Par.F2'(A,B),C),true->D=C;D=['MetaDefs.Par.F2'(A,B)|C])).
'Syntax.ParamsInType.P3'('MetaDefs.Par.F1'(A), B, C) :-
        user:goedel_freeze(ground([A,B]), ('Lists':'~Lists.MemberCheck.P2'('MetaDefs.Par.F1'(A),B),true->C=B;C=['MetaDefs.Par.F1'(A)|B])).
'~Syntax.ParamsInType.P3'('MetaDefs.Par.F1'(A), B, C) :-
        user:goedel_freeze(ground([A,B]), ('Lists':'~Lists.MemberCheck.P2'('MetaDefs.Par.F1'(A),B),true->C=B;C=['MetaDefs.Par.F1'(A)|B])).
'Syntax.ParamsInType.P3'('MetaDefs.BType.F1'(_), A, A).
'~Syntax.ParamsInType.P3'('MetaDefs.BType.F1'(_), A, A).
'Syntax.ParamsInType.P3'('MetaDefs.Type.F2'(_,A), B, C) :-
        'Syntax.ParamsInType1.P3'(A, B, C).
'~Syntax.ParamsInType.P3'('MetaDefs.Type.F2'(_,A), B, C) :-
        '~Syntax.ParamsInType1.P3'(A, B, C).
'Syntax.ParamsInType.P3'('MetaDefs.XBType.F1'(_), A, A).
'~Syntax.ParamsInType.P3'('MetaDefs.XBType.F1'(_), A, A).
'Syntax.ParamsInType.P3'('MetaDefs.XType.F2'(_,A), B, C) :-
        'Syntax.ParamsInType1.P3'(A, B, C).
'~Syntax.ParamsInType.P3'('MetaDefs.XType.F2'(_,A), B, C) :-
        '~Syntax.ParamsInType1.P3'(A, B, C).
'Syntax.ParameterName.P3'('MetaDefs.Par.F2'(A,B), A, B) :-
        user:not_equal([], [A], A, '"p').
'~Syntax.ParameterName.P3'('MetaDefs.Par.F2'(A,B), A, B) :-
        user:not_equal([], [A], A, '"p').
'Syntax.ParameterName.P3'('MetaDefs.Par.F1'(A), '"p', A).
'~Syntax.ParameterName.P3'('MetaDefs.Par.F1'(A), '"p', A).
'Syntax.ParamsInType1.P3'([], A, A).
'~Syntax.ParamsInType1.P3'([], A, A).
'Syntax.ParamsInType1.P3'([A|B], C, D) :-
        'Syntax.ParamsInType.P3'(A, C, E),
        'Syntax.ParamsInType1.P3'(B, E, D).
'~Syntax.ParamsInType1.P3'([A|B], C, D) :-
        '~Syntax.ParamsInType.P3'(A, C, E),
        '~Syntax.ParamsInType1.P3'(B, E, D).
'Syntax.RenameAllFormula2.P4'([], _, _, []).
'~Syntax.RenameAllFormula2.P4'([], _, _, []).
'Syntax.RenameAllFormula2.P4'([A|B], C, D, [E|F]) :-
        'Syntax.RenameAllFormula3.P6'(A, C, G, D, H, E),
        'Syntax.RenameAllFormula2.P4'(B, G, H, F).
'~Syntax.RenameAllFormula2.P4'([A|B], C, D, [E|F]) :-
        '~Syntax.RenameAllFormula3.P6'(A, C, G, D, H, E),
        '~Syntax.RenameAllFormula2.P4'(B, G, H, F).
'Syntax.PropositionAtom.P2'('MetaDefs.PAtom.F1'(A), A).
'~Syntax.PropositionAtom.P2'('MetaDefs.PAtom.F1'(A), A).
'Syntax.RenameAllFormula3.P6'('MetaDefs.Empty.C0', A, A, B, B, 'MetaDefs.Empty.C0').
'~Syntax.RenameAllFormula3.P6'('MetaDefs.Empty.C0', A, A, B, B, 'MetaDefs.Empty.C0').
'Syntax.RenameAllFormula3.P6'('MetaDefs.PAtom.F1'(A), B, B, C, C, 'MetaDefs.PAtom.F1'(A)).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.PAtom.F1'(A), B, B, C, C, 'MetaDefs.PAtom.F1'(A)).
'Syntax.RenameAllFormula3.P6'('MetaDefs.Atom.F2'(A,B), C, D, E, F, 'MetaDefs.Atom.F2'(A,G)) :-
        'Syntax.RenameAllTerm4.P6'(B, C, D, E, F, G).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.Atom.F2'(A,B), C, D, E, F, 'MetaDefs.Atom.F2'(A,G)) :-
        '~Syntax.RenameAllTerm4.P6'(B, C, D, E, F, G).
'Syntax.RenameAllFormula3.P6'('MetaDefs.XPAtom.F1'(A), B, B, C, C, 'MetaDefs.XPAtom.F1'(A)).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.XPAtom.F1'(A), B, B, C, C, 'MetaDefs.XPAtom.F1'(A)).
'Syntax.RenameAllFormula3.P6'('MetaDefs.XAtom.F2'(A,B), C, D, E, F, 'MetaDefs.XAtom.F2'(A,G)) :-
        'Syntax.RenameAllTerm4.P6'(B, C, D, E, F, G).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.XAtom.F2'(A,B), C, D, E, F, 'MetaDefs.XAtom.F2'(A,G)) :-
        '~Syntax.RenameAllTerm4.P6'(B, C, D, E, F, G).
'Syntax.RenameAllFormula3.P6'('MetaDefs.&''.F2'(A,B), C, D, E, F, 'MetaDefs.&''.F2'(G,H)) :-
        'Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.&''.F2'(A,B), C, D, E, F, 'MetaDefs.&''.F2'(G,H)) :-
        '~Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.\\/''.F2'(A,B), C, D, E, F, 'MetaDefs.\\/''.F2'(G,H)) :-  % added 2 \ djd
        'Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.\\/''.F2'(A,B), C, D, E, F, 'MetaDefs.\\/''.F2'(G,H)) :-   % added 2 \ djd
        '~Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.~''.F1'(A), B, C, D, E, 'MetaDefs.~''.F1'(F)) :-
        'Syntax.RenameAllFormula3.P6'(A, B, C, D, E, F).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.~''.F1'(A), B, C, D, E, 'MetaDefs.~''.F1'(F)) :-
        '~Syntax.RenameAllFormula3.P6'(A, B, C, D, E, F).
'Syntax.RenameAllFormula3.P6'('MetaDefs.<-''.F2'(A,B), C, D, E, F, 'MetaDefs.<-''.F2'(G,H)) :-
        'Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.<-''.F2'(A,B), C, D, E, F, 'MetaDefs.<-''.F2'(G,H)) :-
        '~Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.->''.F2'(A,B), C, D, E, F, 'MetaDefs.->''.F2'(G,H)) :-
        'Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.->''.F2'(A,B), C, D, E, F, 'MetaDefs.->''.F2'(G,H)) :-
        '~Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.<->''.F2'(A,B), C, D, E, F, 'MetaDefs.<->''.F2'(G,H)) :-
        'Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.<->''.F2'(A,B), C, D, E, F, 'MetaDefs.<->''.F2'(G,H)) :-
        '~Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.All.F2'(A,B), C, D, E, F, 'MetaDefs.All.F2'(G,H)) :-
        'Syntax.RenameAllTerm4.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.All.F2'(A,B), C, D, E, F, 'MetaDefs.All.F2'(G,H)) :-
        '~Syntax.RenameAllTerm4.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.Some.F2'(A,B), C, D, E, F, 'MetaDefs.Some.F2'(G,H)) :-
        'Syntax.RenameAllTerm4.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.Some.F2'(A,B), C, D, E, F, 'MetaDefs.Some.F2'(G,H)) :-
        '~Syntax.RenameAllTerm4.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.IT.F2'(A,B), C, D, E, F, 'MetaDefs.IT.F2'(G,H)) :-
        'Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.IT.F2'(A,B), C, D, E, F, 'MetaDefs.IT.F2'(G,H)) :-
        '~Syntax.RenameAllFormula3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllFormula3.P6'('MetaDefs.ITE.F3'(A,B,C), D, E, F, G, 'MetaDefs.ITE.F3'(H,I,J)) :-
        'Syntax.RenameAllFormula3.P6'(A, D, K, F, L, H),
        'Syntax.RenameAllFormula3.P6'(B, K, M, L, N, I),
        'Syntax.RenameAllFormula3.P6'(C, M, E, N, G, J).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.ITE.F3'(A,B,C), D, E, F, G, 'MetaDefs.ITE.F3'(H,I,J)) :-
        '~Syntax.RenameAllFormula3.P6'(A, D, K, F, L, H),
        '~Syntax.RenameAllFormula3.P6'(B, K, M, L, N, I),
        '~Syntax.RenameAllFormula3.P6'(C, M, E, N, G, J).
'Syntax.RenameAllFormula3.P6'('MetaDefs.IST.F3'(A,B,C), D, E, F, G, 'MetaDefs.IST.F3'(H,I,J)) :-
        'Syntax.RenameAllTerm4.P6'(A, D, K, F, L, H),
        'Syntax.RenameAllFormula3.P6'(B, K, M, L, N, I),
        'Syntax.RenameAllFormula3.P6'(C, M, E, N, G, J).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.IST.F3'(A,B,C), D, E, F, G, 'MetaDefs.IST.F3'(H,I,J)) :-
        '~Syntax.RenameAllTerm4.P6'(A, D, K, F, L, H),
        '~Syntax.RenameAllFormula3.P6'(B, K, M, L, N, I),
        '~Syntax.RenameAllFormula3.P6'(C, M, E, N, G, J).
'Syntax.RenameAllFormula3.P6'('MetaDefs.ISTE.F4'(A,B,C,D), E, F, G, H, 'MetaDefs.ISTE.F4'(I,J,K,L)) :-
        'Syntax.RenameAllTerm4.P6'(A, E, M, G, N, I),
        'Syntax.RenameAllFormula3.P6'(B, M, O, N, P, J),
        'Syntax.RenameAllFormula3.P6'(C, O, Q, P, R, K),
        'Syntax.RenameAllFormula3.P6'(D, Q, F, R, H, L).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.ISTE.F4'(A,B,C,D), E, F, G, H, 'MetaDefs.ISTE.F4'(I,J,K,L)) :-
        '~Syntax.RenameAllTerm4.P6'(A, E, M, G, N, I),
        '~Syntax.RenameAllFormula3.P6'(B, M, O, N, P, J),
        '~Syntax.RenameAllFormula3.P6'(C, O, Q, P, R, K),
        '~Syntax.RenameAllFormula3.P6'(D, Q, F, R, H, L).
'Syntax.RenameAllFormula3.P6'('MetaDefs.Commit.F2'(A,B), C, D, E, F, 'MetaDefs.Commit.F2'(A,G)) :-
        'Syntax.RenameAllFormula3.P6'(B, C, D, E, F, G).
'~Syntax.RenameAllFormula3.P6'('MetaDefs.Commit.F2'(A,B), C, D, E, F, 'MetaDefs.Commit.F2'(A,G)) :-
        '~Syntax.RenameAllFormula3.P6'(B, C, D, E, F, G).
'Syntax.RenameAllType3.P6'('MetaDefs.Par.F2'(A,B), C, D, E, F, 'MetaDefs.Par.F1'(G)) :-
        user:goedel_freeze(ground([B,A,E]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),'MetaDefs.Par.F1'(H)),E),true),(G=H,F=E,D=C),(G=C,F=['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),'MetaDefs.Par.F1'(C))|E],'Integers':plus(C,1,I),D=I))).
'~Syntax.RenameAllType3.P6'('MetaDefs.Par.F2'(A,B), C, D, E, F, 'MetaDefs.Par.F1'(G)) :-
        user:goedel_freeze(ground([B,A,E]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),'MetaDefs.Par.F1'(H)),E),true),(G=H,F=E,D=C),(G=C,F=['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),'MetaDefs.Par.F1'(C))|E],'Integers':plus(C,1,I),D=I))).
'Syntax.RenameAllType3.P6'('MetaDefs.Par.F1'(A), B, C, D, E, 'MetaDefs.Par.F1'(F)) :-
        user:goedel_freeze(ground([A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Par.F1'(A),'MetaDefs.Par.F1'(G)),D),true),(F=G,E=D,C=B),(F=B,E=['MetaDefs.!.F2'('MetaDefs.Par.F1'(A),'MetaDefs.Par.F1'(B))|D],'Integers':plus(B,1,H),C=H))).
'~Syntax.RenameAllType3.P6'('MetaDefs.Par.F1'(A), B, C, D, E, 'MetaDefs.Par.F1'(F)) :-
        user:goedel_freeze(ground([A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Par.F1'(A),'MetaDefs.Par.F1'(G)),D),true),(F=G,E=D,C=B),(F=B,E=['MetaDefs.!.F2'('MetaDefs.Par.F1'(A),'MetaDefs.Par.F1'(B))|D],'Integers':plus(B,1,H),C=H))).
'Syntax.RenameAllType3.P6'('MetaDefs.BType.F1'(A), B, B, C, C, 'MetaDefs.BType.F1'(A)).
'~Syntax.RenameAllType3.P6'('MetaDefs.BType.F1'(A), B, B, C, C, 'MetaDefs.BType.F1'(A)).
'Syntax.RenameAllType3.P6'('MetaDefs.Type.F2'(A,B), C, D, E, F, 'MetaDefs.Type.F2'(A,G)) :-
        'Syntax.RenameAllType4.P6'(B, C, D, E, F, G).
'~Syntax.RenameAllType3.P6'('MetaDefs.Type.F2'(A,B), C, D, E, F, 'MetaDefs.Type.F2'(A,G)) :-
        '~Syntax.RenameAllType4.P6'(B, C, D, E, F, G).
'Syntax.RenameAllType3.P6'('MetaDefs.XBType.F1'(A), B, B, C, C, 'MetaDefs.XBType.F1'(A)).
'~Syntax.RenameAllType3.P6'('MetaDefs.XBType.F1'(A), B, B, C, C, 'MetaDefs.XBType.F1'(A)).
'Syntax.RenameAllType3.P6'('MetaDefs.XType.F2'(A,B), C, D, E, F, 'MetaDefs.XType.F2'(A,G)) :-
        'Syntax.RenameAllType4.P6'(B, C, D, E, F, G).
'~Syntax.RenameAllType3.P6'('MetaDefs.XType.F2'(A,B), C, D, E, F, 'MetaDefs.XType.F2'(A,G)) :-
        '~Syntax.RenameAllType4.P6'(B, C, D, E, F, G).
'Syntax.RenameAllTerm4.P6'([], A, A, B, B, []).
'~Syntax.RenameAllTerm4.P6'([], A, A, B, B, []).
'Syntax.RenameAllTerm4.P6'([A|B], C, D, E, F, [G|H]) :-
        'Syntax.RenameAllTerm3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllTerm4.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllTerm4.P6'([A|B], C, D, E, F, [G|H]) :-
        '~Syntax.RenameAllTerm3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllTerm4.P6'(B, I, D, J, F, H).
'Syntax.RenameAllTerm3.P6'('MetaDefs.Var.F2'(A,B), C, D, E, F, 'MetaDefs.Var.F1'(G)) :-
        user:goedel_freeze(ground([B,A,E]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),'MetaDefs.Var.F1'(H)),E),true),(G=H,F=E,D=C),(G=C,F=['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),'MetaDefs.Var.F1'(C))|E],'Integers':plus(C,1,I),D=I))).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.Var.F2'(A,B), C, D, E, F, 'MetaDefs.Var.F1'(G)) :-
        user:goedel_freeze(ground([B,A,E]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),'MetaDefs.Var.F1'(H)),E),true),(G=H,F=E,D=C),(G=C,F=['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),'MetaDefs.Var.F1'(C))|E],'Integers':plus(C,1,I),D=I))).
'Syntax.RenameAllTerm3.P6'('MetaDefs.Var.F1'(A), B, C, D, E, 'MetaDefs.Var.F1'(F)) :-
        user:goedel_freeze(ground([A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),'MetaDefs.Var.F1'(G)),D),true),(F=G,E=D,C=B),(F=B,E=['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),'MetaDefs.Var.F1'(B))|D],'Integers':plus(B,1,H),C=H))).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.Var.F1'(A), B, C, D, E, 'MetaDefs.Var.F1'(F)) :-
        user:goedel_freeze(ground([A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),'MetaDefs.Var.F1'(G)),D),true),(F=G,E=D,C=B),(F=B,E=['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),'MetaDefs.Var.F1'(B))|D],'Integers':plus(B,1,H),C=H))).
'Syntax.RenameAllTerm3.P6'('MetaDefs.CTerm.F1'(A), B, B, C, C, 'MetaDefs.CTerm.F1'(A)).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.CTerm.F1'(A), B, B, C, C, 'MetaDefs.CTerm.F1'(A)).
'Syntax.RenameAllTerm3.P6'('MetaDefs.Term.F2'(A,B), C, D, E, F, 'MetaDefs.Term.F2'(A,G)) :-
        'Syntax.RenameAllTerm4.P6'(B, C, D, E, F, G).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.Term.F2'(A,B), C, D, E, F, 'MetaDefs.Term.F2'(A,G)) :-
        '~Syntax.RenameAllTerm4.P6'(B, C, D, E, F, G).
'Syntax.RenameAllTerm3.P6'('MetaDefs.XCTerm.F2'(A,B), C, C, D, D, 'MetaDefs.XCTerm.F2'(A,B)).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.XCTerm.F2'(A,B), C, C, D, D, 'MetaDefs.XCTerm.F2'(A,B)).
'Syntax.RenameAllTerm3.P6'('MetaDefs.Int.F1'(A), B, B, C, C, 'MetaDefs.Int.F1'(A)).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.Int.F1'(A), B, B, C, C, 'MetaDefs.Int.F1'(A)).
'Syntax.RenameAllTerm3.P6'('MetaDefs.Str.F1'(A), B, B, C, C, 'MetaDefs.Str.F1'(A)).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.Str.F1'(A), B, B, C, C, 'MetaDefs.Str.F1'(A)).
'Syntax.RenameAllTerm3.P6'('MetaDefs.Prm.F1'(A), B, B, C, C, 'MetaDefs.Prm.F1'(A)).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.Prm.F1'(A), B, B, C, C, 'MetaDefs.Prm.F1'(A)).
'Syntax.RenameAllTerm3.P6'('MetaDefs.SuchThat.F2'(A,B), C, D, E, F, 'MetaDefs.SuchThat.F2'(G,H)) :-
        'Syntax.RenameAllTerm3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.SuchThat.F2'(A,B), C, D, E, F, 'MetaDefs.SuchThat.F2'(G,H)) :-
        '~Syntax.RenameAllTerm3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllFormula3.P6'(B, I, D, J, F, H).
'Syntax.RenameAllTerm3.P6'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, 'MetaDefs.XTerm.F3'(A,H,C)) :-
        'Syntax.RenameAllTerm4.P6'(B, D, E, F, G, H).
'~Syntax.RenameAllTerm3.P6'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, 'MetaDefs.XTerm.F3'(A,H,C)) :-
        '~Syntax.RenameAllTerm4.P6'(B, D, E, F, G, H).
'Syntax.RenameAllType2.P4'([], _, _, []).
'~Syntax.RenameAllType2.P4'([], _, _, []).
'Syntax.RenameAllType2.P4'([A|B], C, D, [E|F]) :-
        'Syntax.RenameAllType3.P6'(A, C, G, D, H, E),
        'Syntax.RenameAllType2.P4'(B, G, H, F).
'~Syntax.RenameAllType2.P4'([A|B], C, D, [E|F]) :-
        '~Syntax.RenameAllType3.P6'(A, C, G, D, H, E),
        '~Syntax.RenameAllType2.P4'(B, G, H, F).
'Syntax.RenameFormulas.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.RenameFormulas.P3.0'(A,B,C)).
'~Syntax.RenameFormulas.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.RenameFormulas.P3.0'(A,B,C)).
'Syntax.RenameFormulas.P3.0'(A, B, C) :-
        'Syntax.FormulaMaxVarIndex.P2'(A, D),
        'Syntax.RenameAllFormula2.P4'(B, D, [], C).
'~Syntax.RenameFormulas.P3.0'(A, B, C) :-
        '~Syntax.FormulaMaxVarIndex.P2'(A, D),
        '~Syntax.RenameAllFormula2.P4'(B, D, [], C).
'Syntax.RenameAllType4.P6'([], A, A, B, B, []).
'~Syntax.RenameAllType4.P6'([], A, A, B, B, []).
'Syntax.RenameAllType4.P6'([A|B], C, D, E, F, [G|H]) :-
        'Syntax.RenameAllType3.P6'(A, C, I, E, J, G),
        'Syntax.RenameAllType4.P6'(B, I, D, J, F, H).
'~Syntax.RenameAllType4.P6'([A|B], C, D, E, F, [G|H]) :-
        '~Syntax.RenameAllType3.P6'(A, C, I, E, J, G),
        '~Syntax.RenameAllType4.P6'(B, I, D, J, F, H).
'Syntax.RenameTerms.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.RenameTerms.P3.0'(A,B,C)).
'~Syntax.RenameTerms.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.RenameTerms.P3.0'(A,B,C)).
'Syntax.RenameTerms.P3.0'(A, B, C) :-
        'Syntax.TermMaxVarIndex.P2'(A, D),
        'Syntax.RenameAllTerm2.P4'(B, D, [], C).
'~Syntax.RenameTerms.P3.0'(A, B, C) :-
        '~Syntax.TermMaxVarIndex.P2'(A, D),
        '~Syntax.RenameAllTerm2.P4'(B, D, [], C).
'Syntax.RestrictSubstToFormula.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.RestrictSubstToFormula.P3.0'(A,B,C)).
'~Syntax.RestrictSubstToFormula.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.RestrictSubstToFormula.P3.0'(A,B,C)).
'Syntax.RestrictSubstToFormula.P3.0'(A, B, C) :-
        'Syntax.FormulaVariables.P2'(A, D),
        'Syntax.FindTermBindings.P3'(D, B, E),
        'Syntax.EmptyTermSubst.P1'(F),
        'Syntax.AppendTermBindings.P3'(E, F, C).
'~Syntax.RestrictSubstToFormula.P3.0'(A, B, C) :-
        '~Syntax.FormulaVariables.P2'(A, D),
        '~Syntax.FindTermBindings.P3'(D, B, E),
        '~Syntax.EmptyTermSubst.P1'(F),
        '~Syntax.AppendTermBindings.P3'(E, F, C).
'Syntax.ResolveAll.P9'(A, B, C, D, E, F, G, H, I) :-
        user:goedel_freeze(ground([A,B,C,E,G]), 'Syntax':'Syntax.ResolveAll.P9.0'(A,B,C,D,E,F,G,H,I)).
'~Syntax.ResolveAll.P9'(A, B, C, D, E, F, G, H, I) :-
        user:goedel_freeze(ground([A,B,C,E,G]), 'Syntax':'~Syntax.ResolveAll.P9.0'(A,B,C,D,E,F,G,H,I)).
'Syntax.ResolveAll.P9.0'(A, B, C, D, E, F, G, H, I) :-
        'Integers':'Integers.>=.P2'(C, 0),
        'Integers':'Integers.>=.P2'(E, 0),
        'Syntax.ResolveAll1.P10'(B, A, C, D, E, F, [], G, H, I).
'~Syntax.ResolveAll.P9.0'(A, B, C, D, E, F, G, H, I) :-
        'Integers':'~Integers.>=.P2'(C, 0),
        'Integers':'~Integers.>=.P2'(E, 0),
        '~Syntax.ResolveAll1.P10'(B, A, C, D, E, F, [], G, H, I).
'Syntax.Resolve.P7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,E]), 'Syntax':'Syntax.Resolve.P7.0'(A,B,C,D,E,F,G)).
'~Syntax.Resolve.P7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,E]), 'Syntax':'~Syntax.Resolve.P7.0'(A,B,C,D,E,F,G)).
'Syntax.Resolve.P7.0'(A, 'MetaDefs.<-''.F2'(B,C), D, E, F, G, H) :-
        'Integers':negative(1, I),
        'Syntax.StandardiseCommits.P5'(C, I, _, [], J),
        'Syntax.Resolve1.P9'(A, B, C, D, E, J, F, G, H).
'~Syntax.Resolve.P7.0'(A, 'MetaDefs.<-''.F2'(B,C), D, E, F, G, H) :-
        'Integers':negative(1, I),
        '~Syntax.StandardiseCommits.P5'(C, I, _, [], J),
        '~Syntax.Resolve1.P9'(A, B, C, D, E, J, F, G, H).
'Syntax.Resolve1.P9'('MetaDefs.Atom.F2'(A,B), 'MetaDefs.Atom.F2'(A,C), D, E, F, G, H, I, J) :-
        'Syntax.UnifyArgs.P11'(B, C, E, F, [], [], H, I, G, D, J).
'~Syntax.Resolve1.P9'('MetaDefs.Atom.F2'(A,B), 'MetaDefs.Atom.F2'(A,C), D, E, F, G, H, I, J) :-
        '~Syntax.UnifyArgs.P11'(B, C, E, F, [], [], H, I, G, D, J).
'Syntax.Resolve1.P9'('MetaDefs.XAtom.F2'(A,B), 'MetaDefs.XAtom.F2'(A,C), D, E, F, G, H, I, J) :-
        'Syntax.UnifyArgs.P11'(B, C, E, F, [], [], H, I, G, D, J).
'~Syntax.Resolve1.P9'('MetaDefs.XAtom.F2'(A,B), 'MetaDefs.XAtom.F2'(A,C), D, E, F, G, H, I, J) :-
        '~Syntax.UnifyArgs.P11'(B, C, E, F, [], [], H, I, G, D, J).
'Syntax.Resolve1.P9'('MetaDefs.PAtom.F1'(A), 'MetaDefs.PAtom.F1'(A), B, C, D, E, F, F, G) :-
        'Syntax.ApplySubstToFormula.P9'(B, C, D, [], [], [], _, E, G).
'~Syntax.Resolve1.P9'('MetaDefs.PAtom.F1'(A), 'MetaDefs.PAtom.F1'(A), B, C, D, E, F, F, G) :-
        '~Syntax.ApplySubstToFormula.P9'(B, C, D, [], [], [], _, E, G).
'Syntax.Resolve1.P9'('MetaDefs.XPAtom.F1'(A), 'MetaDefs.XPAtom.F1'(A), B, C, D, E, F, F, G) :-
        'Syntax.ApplySubstToFormula.P9'(B, C, D, [], [], [], _, E, G).
'~Syntax.Resolve1.P9'('MetaDefs.XPAtom.F1'(A), 'MetaDefs.XPAtom.F1'(A), B, C, D, E, F, F, G) :-
        '~Syntax.ApplySubstToFormula.P9'(B, C, D, [], [], [], _, E, G).
'Syntax.ResolveAll1.P10'([], _, A, A, B, B, _, _, [], []).
'~Syntax.ResolveAll1.P10'([], _, A, A, B, B, _, _, [], []).
'Syntax.ResolveAll1.P10'(['MetaDefs.<-''.F2'(B,C)|A], D, E, F, G, H, I, J, K, L) :-
        'Integers':maximum(M, N, F),
        'Syntax.StandardiseCommits.P5'(C, G, O, I, P),
        user:goedel_freeze(ground([E,D,C,B,P,J]), if(('Syntax':'~Syntax.Resolve1.P9'(D,B,C,E,Q,P,J,R,S),true),(L=[S|T],K=[R|U],M=Q),(L=T,K=U,M=E))),
        'Syntax.ResolveAll1.P10'(A, D, E, N, O, H, P, J, U, T).
'~Syntax.ResolveAll1.P10'(['MetaDefs.<-''.F2'(B,C)|A], D, E, F, G, H, I, J, K, L) :-
        'Integers':maximum(M, N, F),
        '~Syntax.StandardiseCommits.P5'(C, G, O, I, P),
        user:goedel_freeze(ground([E,D,C,B,P,J]), if(('Syntax':'~Syntax.Resolve1.P9'(D,B,C,E,Q,P,J,R,S),true),(L=[S|T],K=[R|U],M=Q),(L=T,K=U,M=E))),
        '~Syntax.ResolveAll1.P10'(A, D, E, N, O, H, P, J, U, T).
'Syntax.RestrictSubstToTerm.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.RestrictSubstToTerm.P3.0'(A,B,C)).
'~Syntax.RestrictSubstToTerm.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.RestrictSubstToTerm.P3.0'(A,B,C)).
'Syntax.RestrictSubstToTerm.P3.0'(A, B, C) :-
        'Syntax.TermVariables.P2'(A, D),
        'Syntax.FindTermBindings.P3'(D, B, E),
        'Syntax.EmptyTermSubst.P1'(F),
        'Syntax.AppendTermBindings.P3'(E, F, C).
'~Syntax.RestrictSubstToTerm.P3.0'(A, B, C) :-
        '~Syntax.TermVariables.P2'(A, D),
        '~Syntax.FindTermBindings.P3'(D, B, E),
        '~Syntax.EmptyTermSubst.P1'(F),
        '~Syntax.AppendTermBindings.P3'(E, F, C).
'Syntax.RestrictSubstToType.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.RestrictSubstToType.P3.0'(A,B,C)).
'~Syntax.RestrictSubstToType.P3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.RestrictSubstToType.P3.0'(A,B,C)).
'Syntax.RestrictSubstToType.P3.0'(A, B, C) :-
        'Syntax.TypeParameters.P2'(A, D),
        'Syntax.FindTypeBindings.P3'(D, B, E),
        'Syntax.EmptyTypeSubst.P1'(F),
        'Syntax.AppendTypeBindings.P3'(E, F, C).
'~Syntax.RestrictSubstToType.P3.0'(A, B, C) :-
        '~Syntax.TypeParameters.P2'(A, D),
        '~Syntax.FindTypeBindings.P3'(D, B, E),
        '~Syntax.EmptyTypeSubst.P1'(F),
        '~Syntax.AppendTypeBindings.P3'(E, F, C).
'Syntax.TypeParameters.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.TypeParameters.P2.0'(A,B)).
'~Syntax.TypeParameters.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.TypeParameters.P2.0'(A,B)).
'Syntax.TypeParameters.P2.0'(A, B) :-
        'Syntax.ParamsInType.P3'(A, [], B).
'~Syntax.TypeParameters.P2.0'(A, B) :-
        '~Syntax.ParamsInType.P3'(A, [], B).
'Syntax.TypeMaxParIndex.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.TypeMaxParIndex.P2.0'(A,B)).
'~Syntax.TypeMaxParIndex.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.TypeMaxParIndex.P2.0'(A,B)).
'Syntax.TypeMaxParIndex.P2.0'(A, B) :-
        'Integers':negative(1, C),
        'Syntax.MaxParIndex.P3'(A, C, B).
'~Syntax.TypeMaxParIndex.P2.0'(A, B) :-
        'Integers':negative(1, C),
        '~Syntax.MaxParIndex.P3'(A, C, B).
'Syntax.StandardiseFormula.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.StandardiseFormula.P4.0'(A,B,C,D)).
'~Syntax.StandardiseFormula.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.StandardiseFormula.P4.0'(A,B,C,D)).
'Syntax.StandardiseFormula.P4.0'(A, B, C, D) :-
        'Syntax.RenameAllFormula3.P6'(A, B, C, [], _, D).
'~Syntax.StandardiseFormula.P4.0'(A, B, C, D) :-
        '~Syntax.RenameAllFormula3.P6'(A, B, C, [], _, D).
'Syntax.StandardiseApartQuants.P6'([], [], A, A, B, B).
'~Syntax.StandardiseApartQuants.P6'([], [], A, A, B, B).
'Syntax.StandardiseApartQuants.P6'([A|B], ['MetaDefs.Var.F1'(D)|C], E, F, D, G) :-
        'Integers':plus(D, 1, H),
        'Syntax.StandardiseApartQuants.P6'(B, C, ['MetaDefs.!.F2'(A,'MetaDefs.Var.F1'(D))|E], F, H, G).
'~Syntax.StandardiseApartQuants.P6'([A|B], ['MetaDefs.Var.F1'(D)|C], E, F, D, G) :-
        'Integers':plus(D, 1, H),
        '~Syntax.StandardiseApartQuants.P6'(B, C, ['MetaDefs.!.F2'(A,'MetaDefs.Var.F1'(D))|E], F, H, G).
'Syntax.Some.P3'(A, B, 'MetaDefs.Some.F2'(A,B)).
'~Syntax.Some.P3'(A, B, 'MetaDefs.Some.F2'(A,B)).
'Syntax.StandardiseCommits.P5'('MetaDefs.&''.F2'(A,B), C, D, E, F) :-
        'Syntax.StandardiseCommits.P5'(A, C, G, E, H),
        'Syntax.StandardiseCommits.P5'(B, G, D, H, F).
'~Syntax.StandardiseCommits.P5'('MetaDefs.&''.F2'(A,B), C, D, E, F) :-
        '~Syntax.StandardiseCommits.P5'(A, C, G, E, H),
        '~Syntax.StandardiseCommits.P5'(B, G, D, H, F).
'Syntax.StandardiseCommits.P5'('MetaDefs.Commit.F2'(A,B), C, D, E, F) :-
        'Syntax.NewCommit.P5'(A, C, G, E, H),
        'Syntax.StandardiseCommits.P5'(B, G, D, H, F).
'~Syntax.StandardiseCommits.P5'('MetaDefs.Commit.F2'(A,B), C, D, E, F) :-
        '~Syntax.NewCommit.P5'(A, C, G, E, H),
        '~Syntax.StandardiseCommits.P5'(B, G, D, H, F).
'Syntax.StandardiseCommits.P5'('MetaDefs.Empty.C0', A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.Empty.C0', A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.\\/''.F2'(_,_), A, A, B, B). % added \ djd
'~Syntax.StandardiseCommits.P5'('MetaDefs.\\/''.F2'(_,_), A, A, B, B). % added \ djd
'Syntax.StandardiseCommits.P5'('MetaDefs.~''.F1'(_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.~''.F1'(_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.->''.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.->''.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.<-''.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.<-''.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.<->''.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.<->''.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.Some.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.Some.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.All.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.All.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.IT.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.IT.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.ITE.F3'(_,_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.ITE.F3'(_,_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.IST.F3'(_,_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.IST.F3'(_,_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.ISTE.F4'(_,_,_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.ISTE.F4'(_,_,_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.Atom.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.Atom.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.PAtom.F1'(_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.PAtom.F1'(_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.XAtom.F2'(_,_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.XAtom.F2'(_,_), A, A, B, B).
'Syntax.StandardiseCommits.P5'('MetaDefs.XPAtom.F1'(_), A, A, B, B).
'~Syntax.StandardiseCommits.P5'('MetaDefs.XPAtom.F1'(_), A, A, B, B).
'Syntax.TermMaxVarIndex.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.TermMaxVarIndex.P2.0'(A,B)).
'~Syntax.TermMaxVarIndex.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.TermMaxVarIndex.P2.0'(A,B)).
'Syntax.TermMaxVarIndex.P2.0'(A, B) :-
        'SharedSyntax':'SharedSyntax.STermMaxVarIndex.P2'(A, B).
'~Syntax.TermMaxVarIndex.P2.0'(A, B) :-
        'SharedSyntax':'~SharedSyntax.STermMaxVarIndex.P2'(A, B).
'Syntax.Statement.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.Statement.P1.0'(A)).
'~Syntax.Statement.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.Statement.P1.0'(A)).
'Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(_),_)).
'~Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.PAtom.F1'(_),_)).
'Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(_,_),_)).
'~Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.Atom.F2'(_,_),_)).
'Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(_),_)).
'~Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XPAtom.F1'(_),_)).
'Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(_,_),_)).
'~Syntax.Statement.P1.0'('MetaDefs.<-''.F2'('MetaDefs.XAtom.F2'(_,_),_)).
'Syntax.TermVariables.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.TermVariables.P2.0'(A,B)).
'~Syntax.TermVariables.P2'(A, B) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.TermVariables.P2.0'(A,B)).
'Syntax.TermVariables.P2.0'(A, B) :-
        'SharedSyntax':'SharedSyntax.STermFreeVars.P2'(A, B).
'~Syntax.TermVariables.P2.0'(A, B) :-
        'SharedSyntax':'~SharedSyntax.STermFreeVars.P2'(A, B).
'Syntax.TypeNotOccur1.P2'([], _).
'~Syntax.TypeNotOccur1.P2'([], _).
'Syntax.TypeNotOccur1.P2'([A|B], C) :-
        'Syntax.TypeNotOccur.P2'(A, C),
        'Syntax.TypeNotOccur1.P2'(B, C).
'~Syntax.TypeNotOccur1.P2'([A|B], C) :-
        '~Syntax.TypeNotOccur.P2'(A, C),
        '~Syntax.TypeNotOccur1.P2'(B, C).
'Syntax.TypeNotOccur.P2'('MetaDefs.Par.F1'(A), B) :-
        user:not_equal([], [B,A], B, 'MetaDefs.Par.F1'(A)).
'~Syntax.TypeNotOccur.P2'('MetaDefs.Par.F1'(A), B) :-
        user:not_equal([], [B,A], B, 'MetaDefs.Par.F1'(A)).
'Syntax.TypeNotOccur.P2'('MetaDefs.Par.F2'(A,B), C) :-
        user:not_equal([], [C,A,B], C, 'MetaDefs.Par.F2'(A,B)).
'~Syntax.TypeNotOccur.P2'('MetaDefs.Par.F2'(A,B), C) :-
        user:not_equal([], [C,A,B], C, 'MetaDefs.Par.F2'(A,B)).
'Syntax.TypeNotOccur.P2'('MetaDefs.BType.F1'(_), _).
'~Syntax.TypeNotOccur.P2'('MetaDefs.BType.F1'(_), _).
'Syntax.TypeNotOccur.P2'('MetaDefs.Type.F2'(_,A), B) :-
        'Syntax.TypeNotOccur1.P2'(A, B).
'~Syntax.TypeNotOccur.P2'('MetaDefs.Type.F2'(_,A), B) :-
        '~Syntax.TypeNotOccur1.P2'(A, B).
'Syntax.TypeNotOccur.P2'('MetaDefs.XBType.F1'(_), _).
'~Syntax.TypeNotOccur.P2'('MetaDefs.XBType.F1'(_), _).
'Syntax.TypeNotOccur.P2'('MetaDefs.XType.F2'(_,A), B) :-
        'Syntax.TypeNotOccur1.P2'(A, B).
'~Syntax.TypeNotOccur.P2'('MetaDefs.XType.F2'(_,A), B) :-
        '~Syntax.TypeNotOccur1.P2'(A, B).
'Syntax.TypeOccurCheck.P3'('Substs.Read.C0', A, B) :-
        'Syntax.TypeNotOccur1.P2'(B, A).
'~Syntax.TypeOccurCheck.P3'('Substs.Read.C0', A, B) :-
        '~Syntax.TypeNotOccur1.P2'(B, A).
'Syntax.TypeOccurCheck.P3'('Substs.Write.C0', _, _).
'~Syntax.TypeOccurCheck.P3'('Substs.Write.C0', _, _).
'Syntax.UnifyTypes.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'Syntax':'Syntax.UnifyTypes.P4.0'(A,B,C,D)).
'~Syntax.UnifyTypes.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'Syntax':'~Syntax.UnifyTypes.P4.0'(A,B,C,D)).
'Syntax.UnifyTypes.P4.0'(A, B, C, D) :-
        'Syntax.ApplySubstToType.P3'(A, C, E),
        'Syntax.UnifyTypes0.P4'(E, B, C, D).
'~Syntax.UnifyTypes.P4.0'(A, B, C, D) :-
        '~Syntax.ApplySubstToType.P3'(A, C, E),
        '~Syntax.UnifyTypes0.P4'(E, B, C, D).
'Syntax.UnifyTerms.P13'('MetaDefs.Var.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        user:goedel_freeze(ground([B,F,A]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),O),F),true),('Syntax':'Syntax.UnifyTerms.P4'(O,C,H,P),'Syntax':'Syntax.UnifyArgs.P11'(J,K,D,E,F,G,P,I,L,M,N)),user:goedel_freeze(ground([B,G,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),Q),G),true),('Syntax':'Syntax.UnifyTerms.P4'(Q,C,H,P),'Syntax':'Syntax.UnifyArgs.P11'(J,K,D,E,F,G,P,I,L,M,N)),'Syntax':'Syntax.UnifyArgs.P11'(J,K,D,E,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|F],G,H,I,L,M,N))))).
'~Syntax.UnifyTerms.P13'('MetaDefs.Var.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        user:goedel_freeze(ground([B,F,A]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),O),F),true),('Syntax':'~Syntax.UnifyTerms.P4'(O,C,H,P),'Syntax':'~Syntax.UnifyArgs.P11'(J,K,D,E,F,G,P,I,L,M,N)),user:goedel_freeze(ground([B,G,A]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),Q),G),true),('Syntax':'~Syntax.UnifyTerms.P4'(Q,C,H,P),'Syntax':'~Syntax.UnifyArgs.P11'(J,K,D,E,F,G,P,I,L,M,N)),'Syntax':'~Syntax.UnifyArgs.P11'(J,K,D,E,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|F],G,H,I,L,M,N))))).
'Syntax.UnifyTerms.P13'('MetaDefs.Var.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        user:goedel_freeze(ground([A,E]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),N),E),true),('Syntax':'Syntax.UnifyTerms.P4'(N,B,G,O),'Syntax':'Syntax.UnifyArgs.P11'(I,J,C,D,E,F,O,H,K,L,M)),user:goedel_freeze(ground([A,F]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),P),F),true),('Syntax':'Syntax.UnifyTerms.P4'(P,B,G,O),'Syntax':'Syntax.UnifyArgs.P11'(I,J,C,D,E,F,O,H,K,L,M)),'Syntax':'Syntax.UnifyArgs.P11'(I,J,C,D,['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),B)|E],F,G,H,K,L,M))))).
'~Syntax.UnifyTerms.P13'('MetaDefs.Var.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        user:goedel_freeze(ground([A,E]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),N),E),true),('Syntax':'~Syntax.UnifyTerms.P4'(N,B,G,O),'Syntax':'~Syntax.UnifyArgs.P11'(I,J,C,D,E,F,O,H,K,L,M)),user:goedel_freeze(ground([A,F]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F1'(A),P),F),true),('Syntax':'~Syntax.UnifyTerms.P4'(P,B,G,O),'Syntax':'~Syntax.UnifyArgs.P11'(I,J,C,D,E,F,O,H,K,L,M)),'Syntax':'~Syntax.UnifyArgs.P11'(I,J,C,D,['MetaDefs.!.F2'('MetaDefs.Var.F1'(A),B)|E],F,G,H,K,L,M))))).
'Syntax.UnifyTerms.P13'('MetaDefs.Term.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        'Substs':'Substs.GetFunction.P5'(C, 'MetaDefs.Term.F2'(A,O), P, H, Q),
        'Syntax.CheckFunctionTerm.P10'(B, O, P, D, R, F, G, S, Q, T),
        'Syntax.UnifyArgs.P11'(J, K, R, E, F, S, T, I, L, M, N).
'~Syntax.UnifyTerms.P13'('MetaDefs.Term.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        'Substs':'~Substs.GetFunction.P5'(C, 'MetaDefs.Term.F2'(A,O), P, H, Q),
        '~Syntax.CheckFunctionTerm.P10'(B, O, P, D, R, F, G, S, Q, T),
        '~Syntax.UnifyArgs.P11'(J, K, R, E, F, S, T, I, L, M, N).
'Syntax.UnifyTerms.P13'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, H, I, J, K, L, M, N, O) :-
        'Substs':'Substs.GetFunction.P5'(D, 'MetaDefs.XTerm.F3'(A,P,C), Q, I, R),
        'Syntax.CheckFunctionTerm.P10'(B, P, Q, E, S, G, H, T, R, U),
        'Syntax.UnifyArgs.P11'(K, L, S, F, G, T, U, J, M, N, O).
'~Syntax.UnifyTerms.P13'('MetaDefs.XTerm.F3'(A,B,C), D, E, F, G, H, I, J, K, L, M, N, O) :-
        'Substs':'~Substs.GetFunction.P5'(D, 'MetaDefs.XTerm.F3'(A,P,C), Q, I, R),
        '~Syntax.CheckFunctionTerm.P10'(B, P, Q, E, S, G, H, T, R, U),
        '~Syntax.UnifyArgs.P11'(K, L, S, F, G, T, U, J, M, N, O).
'Syntax.UnifyTerms.P13'('MetaDefs.CTerm.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'Substs.GetConstant.P4'(B, 'MetaDefs.CTerm.F1'(A), G, N),
        'Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'~Syntax.UnifyTerms.P13'('MetaDefs.CTerm.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'~Substs.GetConstant.P4'(B, 'MetaDefs.CTerm.F1'(A), G, N),
        '~Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'Syntax.UnifyTerms.P13'('MetaDefs.XCTerm.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        'Substs':'Substs.GetConstant.P4'(C, 'MetaDefs.XCTerm.F2'(A,B), H, O),
        'Syntax.UnifyArgs.P11'(J, K, D, E, F, G, O, I, L, M, N).
'~Syntax.UnifyTerms.P13'('MetaDefs.XCTerm.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        'Substs':'~Substs.GetConstant.P4'(C, 'MetaDefs.XCTerm.F2'(A,B), H, O),
        '~Syntax.UnifyArgs.P11'(J, K, D, E, F, G, O, I, L, M, N).
'Syntax.UnifyTerms.P13'('MetaDefs.Int.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'Substs.GetConstant.P4'(B, 'MetaDefs.Int.F1'(A), G, N),
        'Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'~Syntax.UnifyTerms.P13'('MetaDefs.Int.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'~Substs.GetConstant.P4'(B, 'MetaDefs.Int.F1'(A), G, N),
        '~Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'Syntax.UnifyTerms.P13'('MetaDefs.Str.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'Substs.GetConstant.P4'(B, 'MetaDefs.Str.F1'(A), G, N),
        'Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'~Syntax.UnifyTerms.P13'('MetaDefs.Str.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'~Substs.GetConstant.P4'(B, 'MetaDefs.Str.F1'(A), G, N),
        '~Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'Syntax.UnifyTerms.P13'('MetaDefs.Prm.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'Substs.GetConstant.P4'(B, 'MetaDefs.Prm.F1'(A), G, N),
        'Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'~Syntax.UnifyTerms.P13'('MetaDefs.Prm.F1'(A), B, C, D, E, F, G, H, I, J, K, L, M) :-
        'Substs':'~Substs.GetConstant.P4'(B, 'MetaDefs.Prm.F1'(A), G, N),
        '~Syntax.UnifyArgs.P11'(I, J, C, D, E, F, N, H, K, L, M).
'Syntax.UnifyTerms.P13'('MetaDefs.SuchThat.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        'Substs':'Substs.GetConstant.P4'(C, 'MetaDefs.SuchThat.F2'(A,B), H, O),
        'Syntax.UnifyArgs.P11'(J, K, D, E, F, G, O, I, L, M, N).
'~Syntax.UnifyTerms.P13'('MetaDefs.SuchThat.F2'(A,B), C, D, E, F, G, H, I, J, K, L, M, N) :-
        'Substs':'~Substs.GetConstant.P4'(C, 'MetaDefs.SuchThat.F2'(A,B), H, O),
        '~Syntax.UnifyArgs.P11'(J, K, D, E, F, G, O, I, L, M, N).
'Syntax.UnifyTerms.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'Syntax':'Syntax.UnifyTerms.P4.0'(A,B,C,D)).
'~Syntax.UnifyTerms.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'Syntax':'~Syntax.UnifyTerms.P4.0'(A,B,C,D)).
'Syntax.UnifyTerms.P4.0'(A, B, C, D) :-
        'SharedSyntax':'SharedSyntax.SUnifyTerms.P4'(A, B, C, D).
'~Syntax.UnifyTerms.P4.0'(A, B, C, D) :-
        'SharedSyntax':'~SharedSyntax.SUnifyTerms.P4'(A, B, C, D).
'Syntax.UnifyAtoms.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'Syntax':'Syntax.UnifyAtoms.P4.0'(A,B,C,D)).
'~Syntax.UnifyAtoms.P4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'Syntax':'~Syntax.UnifyAtoms.P4.0'(A,B,C,D)).
'Syntax.UnifyAtoms.P4.0'(A, B, C, D) :-
        'SharedSyntax':'SharedSyntax.SUnifyAtoms.P4'(A, B, C, D).
'~Syntax.UnifyAtoms.P4.0'(A, B, C, D) :-
        'SharedSyntax':'~SharedSyntax.SUnifyAtoms.P4'(A, B, C, D).
'Syntax.UnifyArgs.P11'([], [], A, B, C, D, E, E, F, G, H) :-
        'Syntax.ApplySubstToFormula.P9'(G, A, B, [], D, C, _, F, H).
'~Syntax.UnifyArgs.P11'([], [], A, B, C, D, E, E, F, G, H) :-
        '~Syntax.ApplySubstToFormula.P9'(G, A, B, [], D, C, _, F, H).
'Syntax.UnifyArgs.P11'([A|B], [C|D], E, F, G, H, I, J, K, L, M) :-
        'Syntax.UnifyTerms.P13'(C, A, E, F, G, H, I, J, B, D, K, L, M).
'~Syntax.UnifyArgs.P11'([A|B], [C|D], E, F, G, H, I, J, K, L, M) :-
        '~Syntax.UnifyTerms.P13'(C, A, E, F, G, H, I, J, B, D, K, L, M).
'Syntax.UnifyTypeArgs.P5'([], [], _, A, A).
'~Syntax.UnifyTypeArgs.P5'([], [], _, A, A).
'Syntax.UnifyTypeArgs.P5'([A|B], [C|D], E, F, G) :-
        'Syntax.UnifyTypes1.P5'(A, C, E, F, H),
        'Syntax.UnifyTypeArgs.P5'(B, D, E, H, G).
'~Syntax.UnifyTypeArgs.P5'([A|B], [C|D], E, F, G) :-
        '~Syntax.UnifyTypes1.P5'(A, C, E, F, H),
        '~Syntax.UnifyTypeArgs.P5'(B, D, E, H, G).
'Syntax.VariableName.P3'(A, B, C) :-
        'SharedSyntax':'SharedSyntax.SVariableName.P3'(A, B, C).
'~Syntax.VariableName.P3'(A, B, C) :-
        'SharedSyntax':'~SharedSyntax.SVariableName.P3'(A, B, C).
'Syntax.UnifyTypes1.P5'('MetaDefs.Par.F2'(A,B), C, D, E, F) :-
        'Substs':'Substs.UnifyParameter.P5'(D, C, 'MetaDefs.Par.F2'(A,B), E, F).
'~Syntax.UnifyTypes1.P5'('MetaDefs.Par.F2'(A,B), C, D, E, F) :-
        'Substs':'~Substs.UnifyParameter.P5'(D, C, 'MetaDefs.Par.F2'(A,B), E, F).
'Syntax.UnifyTypes1.P5'('MetaDefs.Par.F1'(A), B, C, D, E) :-
        'Substs':'Substs.UnifyParameter.P5'(C, B, 'MetaDefs.Par.F1'(A), D, E).
'~Syntax.UnifyTypes1.P5'('MetaDefs.Par.F1'(A), B, C, D, E) :-
        'Substs':'~Substs.UnifyParameter.P5'(C, B, 'MetaDefs.Par.F1'(A), D, E).
'Syntax.UnifyTypes1.P5'('MetaDefs.BType.F1'(A), B, C, D, E) :-
        'Substs':'Substs.UnifyBase.P5'(C, B, 'MetaDefs.BType.F1'(A), D, E).
'~Syntax.UnifyTypes1.P5'('MetaDefs.BType.F1'(A), B, C, D, E) :-
        'Substs':'~Substs.UnifyBase.P5'(C, B, 'MetaDefs.BType.F1'(A), D, E).
'Syntax.UnifyTypes1.P5'('MetaDefs.Type.F2'(A,B), C, D, E, F) :-
        'Substs':'Substs.UnifyType.P6'(D, C, 'MetaDefs.Type.F2'(A,G), H, E, I),
        'Syntax.TypeOccurCheck.P3'(H, C, B),
        'Syntax.UnifyTypeArgs.P5'(B, G, H, I, F).
'~Syntax.UnifyTypes1.P5'('MetaDefs.Type.F2'(A,B), C, D, E, F) :-
        'Substs':'~Substs.UnifyType.P6'(D, C, 'MetaDefs.Type.F2'(A,G), H, E, I),
        '~Syntax.TypeOccurCheck.P3'(H, C, B),
        '~Syntax.UnifyTypeArgs.P5'(B, G, H, I, F).
'Syntax.UnifyTypes1.P5'('MetaDefs.XType.F2'(A,B), C, D, E, F) :-
        'Substs':'Substs.UnifyType.P6'(D, C, 'MetaDefs.XType.F2'(A,G), H, E, I),
        'Syntax.TypeOccurCheck.P3'(H, C, B),
        'Syntax.UnifyTypeArgs.P5'(B, G, H, I, F).
'~Syntax.UnifyTypes1.P5'('MetaDefs.XType.F2'(A,B), C, D, E, F) :-
        'Substs':'~Substs.UnifyType.P6'(D, C, 'MetaDefs.XType.F2'(A,G), H, E, I),
        '~Syntax.TypeOccurCheck.P3'(H, C, B),
        '~Syntax.UnifyTypeArgs.P5'(B, G, H, I, F).
'Syntax.UnifyTypes1.P5'('MetaDefs.XBType.F1'(A), B, C, D, E) :-
        'Substs':'Substs.UnifyBase.P5'(C, B, 'MetaDefs.XBType.F1'(A), D, E).
'~Syntax.UnifyTypes1.P5'('MetaDefs.XBType.F1'(A), B, C, D, E) :-
        'Substs':'~Substs.UnifyBase.P5'(C, B, 'MetaDefs.XBType.F1'(A), D, E).
'Syntax.UnifyTypes0.P4'('MetaDefs.Par.F2'(A,B), C, D, E) :-
        'Syntax.GetParameter.P4'(C, 'MetaDefs.Par.F2'(A,B), D, E).
'~Syntax.UnifyTypes0.P4'('MetaDefs.Par.F2'(A,B), C, D, E) :-
        '~Syntax.GetParameter.P4'(C, 'MetaDefs.Par.F2'(A,B), D, E).
'Syntax.UnifyTypes0.P4'('MetaDefs.Par.F1'(A), B, C, D) :-
        'Syntax.GetParameter.P4'(B, 'MetaDefs.Par.F1'(A), C, D).
'~Syntax.UnifyTypes0.P4'('MetaDefs.Par.F1'(A), B, C, D) :-
        '~Syntax.GetParameter.P4'(B, 'MetaDefs.Par.F1'(A), C, D).
'Syntax.UnifyTypes0.P4'('MetaDefs.BType.F1'(A), B, C, D) :-
        'Substs':'Substs.GetBase.P4'(B, 'MetaDefs.BType.F1'(A), C, D).
'~Syntax.UnifyTypes0.P4'('MetaDefs.BType.F1'(A), B, C, D) :-
        'Substs':'~Substs.GetBase.P4'(B, 'MetaDefs.BType.F1'(A), C, D).
'Syntax.UnifyTypes0.P4'('MetaDefs.Type.F2'(A,B), C, D, E) :-
        'Substs':'Substs.GetType.P5'(C, 'MetaDefs.Type.F2'(A,F), G, D, H),
        'Syntax.TypeOccurCheck.P3'(G, C, B),
        'Syntax.UnifyTypeArgs.P5'(B, F, G, H, E).
'~Syntax.UnifyTypes0.P4'('MetaDefs.Type.F2'(A,B), C, D, E) :-
        'Substs':'~Substs.GetType.P5'(C, 'MetaDefs.Type.F2'(A,F), G, D, H),
        '~Syntax.TypeOccurCheck.P3'(G, C, B),
        '~Syntax.UnifyTypeArgs.P5'(B, F, G, H, E).
'Syntax.UnifyTypes0.P4'('MetaDefs.XType.F2'(A,B), C, D, E) :-
        'Substs':'Substs.GetType.P5'(C, 'MetaDefs.XType.F2'(A,F), G, D, H),
        'Syntax.TypeOccurCheck.P3'(G, C, B),
        'Syntax.UnifyTypeArgs.P5'(B, F, G, H, E).
'~Syntax.UnifyTypes0.P4'('MetaDefs.XType.F2'(A,B), C, D, E) :-
        'Substs':'~Substs.GetType.P5'(C, 'MetaDefs.XType.F2'(A,F), G, D, H),
        '~Syntax.TypeOccurCheck.P3'(G, C, B),
        '~Syntax.UnifyTypeArgs.P5'(B, F, G, H, E).
'Syntax.UnifyTypes0.P4'('MetaDefs.XBType.F1'(A), B, C, D) :-
        'Substs':'Substs.GetBase.P4'(B, 'MetaDefs.XBType.F1'(A), C, D).
'~Syntax.UnifyTypes0.P4'('MetaDefs.XBType.F1'(A), B, C, D) :-
        'Substs':'~Substs.GetBase.P4'(B, 'MetaDefs.XBType.F1'(A), C, D).
'Syntax.Variable.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'Syntax.Variable.P1.0'(A)).
'~Syntax.Variable.P1'(A) :-
        user:goedel_freeze(ground([A]), 'Syntax':'~Syntax.Variable.P1.0'(A)).
'Syntax.Variable.P1.0'('MetaDefs.Var.F2'(_,_)).
'~Syntax.Variable.P1.0'('MetaDefs.Var.F2'(_,_)).
'Syntax.Variable.P1.0'('MetaDefs.Var.F1'(_)).
'~Syntax.Variable.P1.0'('MetaDefs.Var.F1'(_)).
'Syntax.UnifyValue.P5'('Substs.Write.C0', A, A, B, B).
'~Syntax.UnifyValue.P5'('Substs.Write.C0', A, A, B, B).
'Syntax.UnifyValue.P5'('Substs.Read.C0', A, B, C, D) :-
        'Syntax.UnifyTerms.P4'(A, B, C, D).
'~Syntax.UnifyValue.P5'('Substs.Read.C0', A, B, C, D) :-
        '~Syntax.UnifyTerms.P4'(A, B, C, D).
'Syntax.VariantTerms.P2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.VariantTerms.P2.0'(A,B)).
'~Syntax.VariantTerms.P2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.VariantTerms.P2.0'(A,B)).
'Syntax.VariantTerms.P2.0'(A, B) :-
        'Syntax.CheckVariantTerms.P4'(A, [], _, B).
'~Syntax.VariantTerms.P2.0'(A, B) :-
        '~Syntax.CheckVariantTerms.P4'(A, [], _, B).
'Syntax.VariantFormulas.P2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.VariantFormulas.P2.0'(A,B)).
'~Syntax.VariantFormulas.P2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.VariantFormulas.P2.0'(A,B)).
'Syntax.VariantFormulas.P2.0'(A, B) :-
        'Syntax.CheckVariantFormulas.P4'(A, [], _, B).
'~Syntax.VariantFormulas.P2.0'(A, B) :-
        '~Syntax.CheckVariantFormulas.P4'(A, [], _, B).
'Syntax.VariantTypes.P2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'Syntax.VariantTypes.P2.0'(A,B)).
'~Syntax.VariantTypes.P2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'Syntax':'~Syntax.VariantTypes.P2.0'(A,B)).
'Syntax.VariantTypes.P2.0'(A, B) :-
        'SharedSyntax':'SharedSyntax.SCheckVariantTypes.P4'(A, [], _, B).
'~Syntax.VariantTypes.P2.0'(A, B) :-
        'SharedSyntax':'~SharedSyntax.SCheckVariantTypes.P4'(A, [], _, B).
:- style_check(-singleton). % added djd
%% :- module('ExtraSyntax', []).
:- module(extraSyntax).  % converted djd

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

%------------------------------------------------------------------------------
% Prolog support for Syntax system module
%------------------------------------------------------------------------------
 
% %Z%%M% %I% last updated %E% %U% by %Q%

%------------------------------------------------------------------------------
% Bindings in variable typings
%------------------------------------------------------------------------------
 
% Avoid unnecessary choicepoints

'ExtraSyntax.EBindingInVarTyping.P3'(Subst, Param, Type) :-
   ( var(Param) ->
     user:'Lists.Member.P2'('MetaDefs.@.F2'(Param,Type), Subst)
   ; user:'Lists.MemberCheck.P2'('MetaDefs.@.F2'(Param,Type),Subst)
   ).

'~ExtraSyntax.EBindingInVarTyping.P3'(Subst, Param, Type) :-
   'ExtraSyntax.EBindingInVarTyping.P3'(Subst, Param, Type).


'ExtraSyntax.EDelBindingInVarTyping.P4'(Typing, Var, Type, NewTyping) :-
   ( var(Var) ->
     user:'Lists.Delete.P3'('MetaDefs.@.F2'(Var, Type), Typing, NewTyping)
   ; user:'Lists.DeleteFirst.P3'('MetaDefs.@.F2'(Var, Type), Typing, NewTyping)
   ).

'~ExtraSyntax.EDelBindingInVarTyping.P4'(Typing, Var, Type, NewTyping) :-
   'ExtraSyntax.DelBindingInVarTyping.P4'(Typing, Var, Type, NewTyping).

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

'ExtraSyntax.Order.P2'(X, Y) :-
   sort(X, Y).

'~ExtraSyntax.Order.P2'(X, Y) :-
   sort(X, Y).
 
'ExtraSyntax.Union.P3'(X, Y, Z) :-
   user:union(X, Y, Z).

'~ExtraSyntax.Union.P3'(X, Y, Z) :-
   user:union(X, Y, Z).

'ExtraSyntax.Difference.P3'(X, Y, Z) :-
   user:difference(X, Y, Z).

'~ExtraSyntax.Difference.P3'(X, Y, Z) :-
   user:difference(X, Y, Z).

:- style_check(-singleton). % added djd
%% :- module('SharedSyntax', []).
:- module(sharedSyntax).  %% converted 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
:- 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 = [0'0|CharsT]
   ; Int < 0 ->
     Chars = [0'-|Chars1],
     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 0'0 + Int mod 10,
     Int1 is Int // 10,
     int_to_char_dl(Int1, Chars, [C|CharsT])
   ).

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

:- discontiguous 'substs.FullDerefType.P4'/4. %% added djd
:- discontiguous '~substs.FullDerefType.P4'/4. %% added djd
:- discontiguous 'substs.FullDerefType.P3'/3. %% added djd
:- discontiguous '~substs.FullDerefType.P3'/3. %% added djd
:- discontiguous 'substs.ApplyTypeSubst.P3'/3. %% added djd
:- discontiguous '~substs.ApplyTypeSubst.P3'/3. %% added djd
:- discontiguous 'substs.AddTypeBinding1.P4'/4. %% added djd
:- discontiguous '~substs.AddTypeBinding1.P4'/4. %% added djd
:- discontiguous 'substs.AddTermBinding1.P4'/4. %% added djd
:- discontiguous '~substs.AddTermBinding1.P4'/4. %% added djd
:- discontiguous 'substs.AddNewBinding.P5'/5. %% added djd
:- discontiguous '~substs.AddNewBinding.P5'/5. %% added djd
:- discontiguous 'substs.AddBinding2.P21'/21. %% added djd
:- discontiguous '~substs.AddBinding2.P21'/21. %% added djd
:- discontiguous 'substs.ApplyTermSubst.P3'/3. %% added djd
:- discontiguous '~substs.ApplyTermSubst.P3'/3. %% added djd
:- discontiguous 'substs.BindVariable.P4'/4. %% added djd
:- discontiguous '~substs.BindVariable.P4'/4. %% added djd
:- discontiguous 'substs.BindParameter.P4'/4. %% added djd
:- discontiguous '~substs.BindParameter.P4'/4. %% added djd
:- discontiguous 'substs.ComposeLists.P3'/3. %% added djd
:- discontiguous '~substs.ComposeLists.P3'/3. %% added djd
:- discontiguous 'substs.ComposeHeaps1.P5'/5. %% added djd
:- discontiguous '~substs.ComposeHeaps1.P5'/5. %% added djd
:- discontiguous 'substs.DerefType1.P6'/6. %% added djd
:- discontiguous '~substs.DerefType1.P6'/6. %% added djd
:- discontiguous 'substs.DelTypeBinding.P4'/4. %% added djd
:- discontiguous '~substs.DelTypeBinding.P4'/4. %% added djd
:- discontiguous 'substs.DB.P3'/3. %% added djd
:- discontiguous '~substs.DB.P3'/3. %% added djd
:- discontiguous 'substs.DelTermBinding.P4'/4. %% added djd
:- discontiguous '~substs.DelTermBinding.P4'/4. %% added djd
:- discontiguous 'substs.DerefType.P3'/3. %% added djd
:- discontiguous '~substs.DerefType.P3'/3. %% added djd
:- discontiguous 'substs.Dereference1.P6'/6. %% added djd
:- discontiguous '~substs.Dereference1.P6'/6. %% added djd
:- discontiguous 'substs.Dereference.P3'/3. %% added djd
:- discontiguous '~substs.Dereference.P3'/3. %% added djd
:- discontiguous 'substs.FullDerefTerm.P4'/4. %% added djd
:- discontiguous '~substs.FullDerefTerm.P4'/4. %% added djd
:- discontiguous 'substs.FullDerefTerm1.P4'/4. %% added djd
:- discontiguous '~substs.FullDerefTerm1.P4'/4. %% added djd
:- discontiguous 'substs.RationaliseTypeHeap.P6'/6. %% added djd
:- discontiguous '~substs.RationaliseTypeHeap.P6'/6. %% added djd
:- discontiguous 'substs.HeapTerm.P2'/2. %% added djd
:- discontiguous '~substs.HeapTerm.P2'/2. %% added djd
:- discontiguous 'substs.GetConstant1.P4'/4. %% added djd
:- discontiguous '~substs.GetConstant1.P4'/4. %% added djd
:- discontiguous 'substs.FullDereference.P3'/3. %% added djd
:- discontiguous '~substs.FullDereference.P3'/3. %% added djd
:- discontiguous 'substs.FullDerefType1.P4'/4. %% added djd
:- discontiguous '~substs.FullDerefType1.P4'/4. %% added djd
:- discontiguous 'substs.GetBase1.P4'/4. %% added djd
:- discontiguous '~substs.GetBase1.P4'/4. %% added djd
:- discontiguous 'substs.GetFunction1.P5'/5. %% added djd
:- discontiguous '~substs.GetFunction1.P5'/5. %% added djd
:- discontiguous 'substs.GetType1.P5'/5. %% added djd
:- discontiguous '~substs.GetType1.P5'/5. %% added djd
:- discontiguous 'substs.ParameterInSubst.P3'/3. %% added djd
:- discontiguous '~substs.ParameterInSubst.P3'/3. %% added djd
:- discontiguous 'substs.HeapType.P2'/2. %% added djd
:- discontiguous '~substs.HeapType.P2'/2. %% added djd
:- discontiguous 'substs.RationaliseTermHeap.P6'/6. %% added djd
:- discontiguous '~substs.RationaliseTermHeap.P6'/6. %% added djd
:- discontiguous 'substs.RationaliseTermList.P3'/3. %% added djd
:- discontiguous '~substs.RationaliseTermList.P3'/3. %% added djd
:- discontiguous 'substs.RationaliseTypeList.P3'/3. %% added djd
:- discontiguous '~substs.RationaliseTypeList.P3'/3. %% added djd
:- discontiguous 'substs.UnifyParameter.P5'/5. %% added djd
:- discontiguous '~substs.UnifyParameter.P5'/5. %% added djd
:- discontiguous 'substs.UnifyConstant.P5'/5. %% added djd
:- discontiguous '~substs.UnifyConstant.P5'/5. %% added djd
:- discontiguous 'substs.UnifyBase.P5'/5. %% added djd
:- discontiguous '~substs.UnifyBase.P5'/5. %% added djd
:- discontiguous 'substs.UnifyKnownVariable.P5'/5. %% added djd
:- discontiguous '~substs.UnifyKnownVariable.P5'/5. %% added djd
:- discontiguous 'substs.UnifyFunction.P6'/6. %% added djd
:- discontiguous '~substs.UnifyFunction.P6'/6. %% added djd
:- discontiguous 'substs.UnifyVariable.P4'/4. %% added djd
:- discontiguous '~substs.UnifyVariable.P4'/4. %% added djd
:- discontiguous 'substs.UnifyType.P6'/6. %% added djd
:- discontiguous '~substs.UnifyType.P6'/6. %% added djd
:- discontiguous 'substs.VariableInSubst.P3'/3. %% added djd
:- discontiguous '~substs.VariableInSubst.P3'/3. %% added djd


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

'substs.FullDerefType.P4'('MetaDefs.Par.F1'(A), B, _, C) :-
        user:goedel_freeze(ground([A,B]), (B='MetaDefs.Par.F1'(A),true->C='MetaDefs.Occ.F1'('MetaDefs.Par.F1'(A));C='MetaDefs.Par.F1'(A))).
'~substs.FullDerefType.P4'('MetaDefs.Par.F1'(A), B, _, C) :-
        user:goedel_freeze(ground([A,B]), (B='MetaDefs.Par.F1'(A),true->C='MetaDefs.Occ.F1'('MetaDefs.Par.F1'(A));C='MetaDefs.Par.F1'(A))).
'substs.FullDerefType.P4'('MetaDefs.Par.F2'(A,B), C, _, D) :-
        user:goedel_freeze(ground([B,C,A]), (C='MetaDefs.Par.F2'(A,B),true->D='MetaDefs.Occ.F1'('MetaDefs.Par.F2'(A,B));D='MetaDefs.Par.F2'(A,B))).
'~substs.FullDerefType.P4'('MetaDefs.Par.F2'(A,B), C, _, D) :-
        user:goedel_freeze(ground([B,C,A]), (C='MetaDefs.Par.F2'(A,B),true->D='MetaDefs.Occ.F1'('MetaDefs.Par.F2'(A,B));D='MetaDefs.Par.F2'(A,B))).
'substs.FullDerefType.P4'('MetaDefs.BType.F1'(A), _, _, 'MetaDefs.BType.F1'(A)).
'~substs.FullDerefType.P4'('MetaDefs.BType.F1'(A), _, _, 'MetaDefs.BType.F1'(A)).
'substs.FullDerefType.P4'('MetaDefs.Type.F2'(A,B), C, D, 'MetaDefs.Type.F2'(A,E)) :-
        'substs.FullDerefType1.P4'(B, C, D, E).
'~substs.FullDerefType.P4'('MetaDefs.Type.F2'(A,B), C, D, 'MetaDefs.Type.F2'(A,E)) :-
        '~substs.FullDerefType1.P4'(B, C, D, E).
'substs.FullDerefType.P4'('MetaDefs.XBType.F1'(A), _, _, 'MetaDefs.XBType.F1'(A)).
'~substs.FullDerefType.P4'('MetaDefs.XBType.F1'(A), _, _, 'MetaDefs.XBType.F1'(A)).
'substs.FullDerefType.P4'('MetaDefs.XType.F2'(A,B), C, D, 'MetaDefs.XType.F2'(A,E)) :-
        'substs.FullDerefType1.P4'(B, C, D, E).
'~substs.FullDerefType.P4'('MetaDefs.XType.F2'(A,B), C, D, 'MetaDefs.XType.F2'(A,E)) :-
        '~substs.FullDerefType1.P4'(B, C, D, E).
'substs.FullDerefType.P3'('MetaDefs.Par.F2'(A,B), _, 'MetaDefs.Par.F2'(A,B)).
'~substs.FullDerefType.P3'('MetaDefs.Par.F2'(A,B), _, 'MetaDefs.Par.F2'(A,B)).
'substs.FullDerefType.P3'('MetaDefs.Par.F1'(A), _, 'MetaDefs.Par.F1'(A)).
'~substs.FullDerefType.P3'('MetaDefs.Par.F1'(A), _, 'MetaDefs.Par.F1'(A)).
'substs.FullDerefType.P3'('MetaDefs.Type.F2'(A,B), C, 'MetaDefs.Type.F2'(A,D)) :-
        'substs.ApplyTypeSubst.P3'(B, C, D).
'~substs.FullDerefType.P3'('MetaDefs.Type.F2'(A,B), C, 'MetaDefs.Type.F2'(A,D)) :-
        '~substs.ApplyTypeSubst.P3'(B, C, D).
'substs.FullDerefType.P3'('MetaDefs.BType.F1'(A), _, 'MetaDefs.BType.F1'(A)).
'~substs.FullDerefType.P3'('MetaDefs.BType.F1'(A), _, 'MetaDefs.BType.F1'(A)).
'substs.FullDerefType.P3'('MetaDefs.XType.F2'(A,B), C, 'MetaDefs.XType.F2'(A,D)) :-
        'substs.ApplyTypeSubst.P3'(B, C, D).
'~substs.FullDerefType.P3'('MetaDefs.XType.F2'(A,B), C, 'MetaDefs.XType.F2'(A,D)) :-
        '~substs.ApplyTypeSubst.P3'(B, C, D).
'substs.FullDerefType.P3'('MetaDefs.XBType.F1'(A), _, 'MetaDefs.XBType.F1'(A)).
'~substs.FullDerefType.P3'('MetaDefs.XBType.F1'(A), _, 'MetaDefs.XBType.F1'(A)).
'substs.ComposeTypeSubsts2.P3'('substs.TypeSubst.F2'(A,B), 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,F)) :-
        'substs.ComposeHeaps.P3'(A, C, E),
        'substs.ComposeLists.P3'(D, B, F).
'~substs.ComposeTypeSubsts2.P3'('substs.TypeSubst.F2'(A,B), 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,F)) :-
        '~substs.ComposeHeaps.P3'(A, C, E),
        '~substs.ComposeLists.P3'(D, B, F).
'substs.ApplyTypeSubst.P3'([], _, []).
'~substs.ApplyTypeSubst.P3'([], _, []).
'substs.ApplyTypeSubst.P3'([A|B], C, [D|E]) :-
        'substs.SubstApplyToType.P3'(A, C, D),
        'substs.ApplyTypeSubst.P3'(B, C, E).
'~substs.ApplyTypeSubst.P3'([A|B], C, [D|E]) :-
        '~substs.SubstApplyToType.P3'(A, C, D),
        '~substs.ApplyTypeSubst.P3'(B, C, E).
'substs.AddTypeBinding1.P4'('MetaDefs.Par.F2'(A,B), C, D, E) :-
        'substs.AddBinding.P4'(C, 'substs.V.F1'('MetaDefs.Par.F2'(A,B)), D, E).
'~substs.AddTypeBinding1.P4'('MetaDefs.Par.F2'(A,B), C, D, E) :-
        '~substs.AddBinding.P4'(C, 'substs.V.F1'('MetaDefs.Par.F2'(A,B)), D, E).
'substs.AddTypeBinding1.P4'('MetaDefs.Par.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.R.F1'(A), C, D).
'~substs.AddTypeBinding1.P4'('MetaDefs.Par.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.R.F1'(A), C, D).
'substs.AddTypeBinding1.P4'('MetaDefs.BType.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.BType.F1'(A)), C, D).
'~substs.AddTypeBinding1.P4'('MetaDefs.BType.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.BType.F1'(A)), C, D).
'substs.AddTypeBinding1.P4'('MetaDefs.Type.F2'(A,B), C, D, E) :-
        'substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.Type.F2'(A,B)), D, E).
'~substs.AddTypeBinding1.P4'('MetaDefs.Type.F2'(A,B), C, D, E) :-
        '~substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.Type.F2'(A,B)), D, E).
'substs.AddTypeBinding1.P4'('MetaDefs.XType.F2'(A,B), C, D, E) :-
        'substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.XType.F2'(A,B)), D, E).
'~substs.AddTypeBinding1.P4'('MetaDefs.XType.F2'(A,B), C, D, E) :-
        '~substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.XType.F2'(A,B)), D, E).
'substs.AddTypeBinding1.P4'('MetaDefs.XBType.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.XBType.F1'(A)), C, D).
'~substs.AddTypeBinding1.P4'('MetaDefs.XBType.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.XBType.F1'(A)), C, D).
'substs.AddTermBinding1.P4'('MetaDefs.Var.F2'(A,B), C, D, E) :-
        'substs.AddBinding.P4'(C, 'substs.V.F1'('MetaDefs.Var.F2'(A,B)), D, E).
'~substs.AddTermBinding1.P4'('MetaDefs.Var.F2'(A,B), C, D, E) :-
        '~substs.AddBinding.P4'(C, 'substs.V.F1'('MetaDefs.Var.F2'(A,B)), D, E).
'substs.AddTermBinding1.P4'('MetaDefs.Var.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.R.F1'(A), C, D).
'~substs.AddTermBinding1.P4'('MetaDefs.Var.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.R.F1'(A), C, D).
'substs.AddTermBinding1.P4'('MetaDefs.CTerm.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.CTerm.F1'(A)), C, D).
'~substs.AddTermBinding1.P4'('MetaDefs.CTerm.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.CTerm.F1'(A)), C, D).
'substs.AddTermBinding1.P4'('MetaDefs.Term.F2'(A,B), C, D, E) :-
        'substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.Term.F2'(A,B)), D, E).
'~substs.AddTermBinding1.P4'('MetaDefs.Term.F2'(A,B), C, D, E) :-
        '~substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.Term.F2'(A,B)), D, E).
'substs.AddTermBinding1.P4'('MetaDefs.XTerm.F3'(A,B,C), D, E, F) :-
        'substs.AddBinding.P4'(D, 'substs.T.F1'('MetaDefs.XTerm.F3'(A,B,C)), E, F).
'~substs.AddTermBinding1.P4'('MetaDefs.XTerm.F3'(A,B,C), D, E, F) :-
        '~substs.AddBinding.P4'(D, 'substs.T.F1'('MetaDefs.XTerm.F3'(A,B,C)), E, F).
'substs.AddTermBinding1.P4'('MetaDefs.XCTerm.F2'(A,B), C, D, E) :-
        'substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.XCTerm.F2'(A,B)), D, E).
'~substs.AddTermBinding1.P4'('MetaDefs.XCTerm.F2'(A,B), C, D, E) :-
        '~substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.XCTerm.F2'(A,B)), D, E).
'substs.AddTermBinding1.P4'('MetaDefs.Int.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.Int.F1'(A)), C, D).
'~substs.AddTermBinding1.P4'('MetaDefs.Int.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.Int.F1'(A)), C, D).
'substs.AddTermBinding1.P4'('MetaDefs.Prm.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.Prm.F1'(A)), C, D).
'~substs.AddTermBinding1.P4'('MetaDefs.Prm.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.Prm.F1'(A)), C, D).
'substs.AddTermBinding1.P4'('MetaDefs.Str.F1'(A), B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.Str.F1'(A)), C, D).
'~substs.AddTermBinding1.P4'('MetaDefs.Str.F1'(A), B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.T.F1'('MetaDefs.Str.F1'(A)), C, D).
'substs.AddTermBinding1.P4'('MetaDefs.SuchThat.F2'(A,B), C, D, E) :-
        'substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.SuchThat.F2'(A,B)), D, E).
'~substs.AddTermBinding1.P4'('MetaDefs.SuchThat.F2'(A,B), C, D, E) :-
        '~substs.AddBinding.P4'(C, 'substs.T.F1'('MetaDefs.SuchThat.F2'(A,B)), D, E).
'substs.AddNewBinding.P5'(15, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D)) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(15, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D)) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(14, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(14, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(13, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(13, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(12, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(12, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(11, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(11, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(10, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(10, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(9, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(9, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(8, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(8, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(7, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(7, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(6, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(6, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(5, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(5, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(4, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(4, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(3, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(3, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(2, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(2, A, B, C, 'substs.H.F16'('substs.N.C0','substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(1, A, B, C, 'substs.H.F16'('substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(1, A, B, C, 'substs.H.F16'('substs.N.C0',D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddNewBinding.P5'(0, A, B, C, 'substs.H.F16'(D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        'substs.AddNewBinding1.P4'(A, B, C, D).
'~substs.AddNewBinding.P5'(0, A, B, C, 'substs.H.F16'(D,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0')) :-
        '~substs.AddNewBinding1.P4'(A, B, C, D).
'substs.AddBinding2.P21'(15, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,T)) :-
        'substs.AddBinding1.P5'(S, A, B, C, T).
'~substs.AddBinding2.P21'(15, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,T)) :-
        '~substs.AddBinding1.P5'(S, A, B, C, T).
'substs.AddBinding2.P21'(14, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,P,Q,T,S)) :-
        'substs.AddBinding1.P5'(R, A, B, C, T).
'~substs.AddBinding2.P21'(14, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,P,Q,T,S)) :-
        '~substs.AddBinding1.P5'(R, A, B, C, T).
'substs.AddBinding2.P21'(13, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,P,T,R,S)) :-
        'substs.AddBinding1.P5'(Q, A, B, C, T).
'~substs.AddBinding2.P21'(13, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,P,T,R,S)) :-
        '~substs.AddBinding1.P5'(Q, A, B, C, T).
'substs.AddBinding2.P21'(12, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,T,Q,R,S)) :-
        'substs.AddBinding1.P5'(P, A, B, C, T).
'~substs.AddBinding2.P21'(12, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,O,T,Q,R,S)) :-
        '~substs.AddBinding1.P5'(P, A, B, C, T).
'substs.AddBinding2.P21'(11, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,T,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(O, A, B, C, T).
'~substs.AddBinding2.P21'(11, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,N,T,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(O, A, B, C, T).
'substs.AddBinding2.P21'(10, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,T,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(N, A, B, C, T).
'~substs.AddBinding2.P21'(10, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,M,T,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(N, A, B, C, T).
'substs.AddBinding2.P21'(9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,T,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(M, A, B, C, T).
'~substs.AddBinding2.P21'(9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,L,T,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(M, A, B, C, T).
'substs.AddBinding2.P21'(8, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,T,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(L, A, B, C, T).
'~substs.AddBinding2.P21'(8, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,K,T,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(L, A, B, C, T).
'substs.AddBinding2.P21'(7, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,T,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(K, A, B, C, T).
'~substs.AddBinding2.P21'(7, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,J,T,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(K, A, B, C, T).
'substs.AddBinding2.P21'(6, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,T,K,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(J, A, B, C, T).
'~substs.AddBinding2.P21'(6, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,I,T,K,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(J, A, B, C, T).
'substs.AddBinding2.P21'(5, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,T,J,K,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(I, A, B, C, T).
'~substs.AddBinding2.P21'(5, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,H,T,J,K,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(I, A, B, C, T).
'substs.AddBinding2.P21'(4, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,T,I,J,K,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(H, A, B, C, T).
'~substs.AddBinding2.P21'(4, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,G,T,I,J,K,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(H, A, B, C, T).
'substs.AddBinding2.P21'(3, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,T,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(G, A, B, C, T).
'~substs.AddBinding2.P21'(3, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,F,T,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(G, A, B, C, T).
'substs.AddBinding2.P21'(2, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,T,G,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(F, A, B, C, T).
'~substs.AddBinding2.P21'(2, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,E,T,G,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(F, A, B, C, T).
'substs.AddBinding2.P21'(1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,T,F,G,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(E, A, B, C, T).
'~substs.AddBinding2.P21'(1, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(D,T,F,G,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(E, A, B, C, T).
'substs.AddBinding2.P21'(0, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(T,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        'substs.AddBinding1.P5'(D, A, B, C, T).
'~substs.AddBinding2.P21'(0, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, 'substs.H.F16'(T,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S)) :-
        '~substs.AddBinding1.P5'(D, A, B, C, T).
'substs.AddTermBinding.P4'(A, B, 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        'substs.AddTermBinding1.P4'(A, B, C, E).
'~substs.AddTermBinding.P4'(A, B, 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        '~substs.AddTermBinding1.P4'(A, B, C, E).
'substs.AddTypeBinding.P4'(A, B, 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        'substs.AddTypeBinding1.P4'(A, B, C, E).
'~substs.AddTypeBinding.P4'(A, B, 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        '~substs.AddTypeBinding1.P4'(A, B, C, E).
'substs.ApplySubstToType.P4'(A, B, C, D) :-
        'substs.DerefType.P3'(A, C, E),
        'substs.FullDerefType.P4'(E, B, C, D).
'~substs.ApplySubstToType.P4'(A, B, C, D) :-
        '~substs.DerefType.P3'(A, C, E),
        '~substs.FullDerefType.P4'(E, B, C, D).
'substs.ApplySubstToTerm.P4'(A, B, C, D) :-
        'substs.Dereference.P3'(A, C, E),
        'substs.FullDerefTerm.P4'(E, B, C, D).
'~substs.ApplySubstToTerm.P4'(A, B, C, D) :-
        '~substs.Dereference.P3'(A, C, E),
        '~substs.FullDerefTerm.P4'(E, B, C, D).
'substs.ApplyTermSubst.P3'([], _, []).
'~substs.ApplyTermSubst.P3'([], _, []).
'substs.ApplyTermSubst.P3'([A|B], C, [D|E]) :-
        'substs.SubstApplyToTerm.P3'(A, C, D),
        'substs.ApplyTermSubst.P3'(B, C, E).
'~substs.ApplyTermSubst.P3'([A|B], C, [D|E]) :-
        '~substs.SubstApplyToTerm.P3'(A, C, D),
        '~substs.ApplyTermSubst.P3'(B, C, E).
'substs.ComposeTermSubsts1.P3'('substs.TermSubst.F2'('substs.Heap.F2'(A,B),C), D, 'substs.TermSubst.F2'(E,F)) :-
        'substs.RationaliseTermList.P3'(C, F, D),
        'substs.EmptyHeap.P1'(G),
        'substs.RationaliseTermHeap.P6'(B, A, 0, D, G, E).
'~substs.ComposeTermSubsts1.P3'('substs.TermSubst.F2'('substs.Heap.F2'(A,B),C), D, 'substs.TermSubst.F2'(E,F)) :-
        '~substs.RationaliseTermList.P3'(C, F, D),
        '~substs.EmptyHeap.P1'(G),
        '~substs.RationaliseTermHeap.P6'(B, A, 0, D, G, E).
'substs.ComposeHeaps.P3'(A, 'substs.Heap.F2'(B,C), D) :-
        'substs.ComposeHeaps1.P5'(C, B, 0, A, D).
'~substs.ComposeHeaps.P3'(A, 'substs.Heap.F2'(B,C), D) :-
        '~substs.ComposeHeaps1.P5'(C, B, 0, A, D).
'substs.BindVariable.P4'('MetaDefs.Var.F2'(A,B), C, 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|E])).
'~substs.BindVariable.P4'('MetaDefs.Var.F2'(A,B), C, 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|E])).
'substs.BindVariable.P4'('MetaDefs.Var.F1'(A), B, C, D) :-
        'substs.AddTermBinding.P4'(B, A, C, D).
'~substs.BindVariable.P4'('MetaDefs.Var.F1'(A), B, C, D) :-
        '~substs.AddTermBinding.P4'(B, A, C, D).
'substs.BindParameter.P4'('MetaDefs.Par.F2'(A,B), C, 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),C)|E])).
'~substs.BindParameter.P4'('MetaDefs.Par.F2'(A,B), C, 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),C)|E])).
'substs.BindParameter.P4'('MetaDefs.Par.F1'(A), B, C, D) :-
        'substs.AddTypeBinding.P4'(B, A, C, D).
'~substs.BindParameter.P4'('MetaDefs.Par.F1'(A), B, C, D) :-
        '~substs.AddTypeBinding.P4'(B, A, C, D).
'substs.BindingInHeap.P3'('substs.Heap.F2'(A,B), C, D) :-
        'substs.Address.P5'(B, A, 0, C, D).
'~substs.BindingInHeap.P3'('substs.Heap.F2'(A,B), C, D) :-
        '~substs.Address.P5'(B, A, 0, C, D).
'substs.ComposeLists.P3'([], A, A).
'~substs.ComposeLists.P3'([], A, A).
'substs.ComposeLists.P3'(['MetaDefs.!.F2'(B,C)|A], D, ['MetaDefs.!.F2'(B,C)|E]) :-
        'substs.DB.P3'(D, B, F),
        'substs.ComposeLists.P3'(A, F, E).
'~substs.ComposeLists.P3'(['MetaDefs.!.F2'(B,C)|A], D, ['MetaDefs.!.F2'(B,C)|E]) :-
        '~substs.DB.P3'(D, B, F),
        '~substs.ComposeLists.P3'(A, F, E).
'substs.ComposeHeaps1.P5'('substs.N.C0', _, _, A, A).
'~substs.ComposeHeaps1.P5'('substs.N.C0', _, _, A, A).
'substs.ComposeHeaps1.P5'('substs.R.F1'(A), _, B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.R.F1'(A), C, D).
'~substs.ComposeHeaps1.P5'('substs.R.F1'(A), _, B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.R.F1'(A), C, D).
'substs.ComposeHeaps1.P5'('substs.V.F1'(A), _, B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.V.F1'(A), C, D).
'~substs.ComposeHeaps1.P5'('substs.V.F1'(A), _, B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.V.F1'(A), C, D).
'substs.ComposeHeaps1.P5'('substs.T.F1'(A), _, B, C, D) :-
        'substs.AddBinding.P4'(B, 'substs.T.F1'(A), C, D).
'~substs.ComposeHeaps1.P5'('substs.T.F1'(A), _, B, C, D) :-
        '~substs.AddBinding.P4'(B, 'substs.T.F1'(A), C, D).
'substs.ComposeHeaps1.P5'('substs.H.F16'(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), Q, R, S, T) :-
        'Integers':minus(Q, 1, V),
        U=V,
        'Integers':power(16, Q, X),
        W=X,
        'substs.ComposeHeaps1.P5'(A, U, R, S, Y),
        'Integers':plus(W, R, Z),
        'substs.ComposeHeaps1.P5'(B, U, Z, Y, A1),
        'Integers':times(2, W, D1),
        'Integers':plus(D1, R, B1),
        'substs.ComposeHeaps1.P5'(C, U, B1, A1, C1),
        'Integers':times(3, W, G1),
        'Integers':plus(G1, R, E1),
        'substs.ComposeHeaps1.P5'(D, U, E1, C1, F1),
        'Integers':times(4, W, J1),
        'Integers':plus(J1, R, H1),
        'substs.ComposeHeaps1.P5'(E, U, H1, F1, I1),
        'Integers':times(5, W, M1),
        'Integers':plus(M1, R, K1),
        'substs.ComposeHeaps1.P5'(F, U, K1, I1, L1),
        'Integers':times(6, W, P1),
        'Integers':plus(P1, R, N1),
        'substs.ComposeHeaps1.P5'(G, U, N1, L1, O1),
        'Integers':times(7, W, S1),
        'Integers':plus(S1, R, Q1),
        'substs.ComposeHeaps1.P5'(H, U, Q1, O1, R1),
        'Integers':times(8, W, V1),
        'Integers':plus(V1, R, T1),
        'substs.ComposeHeaps1.P5'(I, U, T1, R1, U1),
        'Integers':times(9, W, Y1),
        'Integers':plus(Y1, R, W1),
        'substs.ComposeHeaps1.P5'(J, U, W1, U1, X1),
        'Integers':times(10, W, B2),
        'Integers':plus(B2, R, Z1),
        'substs.ComposeHeaps1.P5'(K, U, Z1, X1, A2),
        'Integers':times(11, W, E2),
        'Integers':plus(E2, R, C2),
        'substs.ComposeHeaps1.P5'(L, U, C2, A2, D2),
        'Integers':times(12, W, H2),
        'Integers':plus(H2, R, F2),
        'substs.ComposeHeaps1.P5'(M, U, F2, D2, G2),
        'Integers':times(13, W, K2),
        'Integers':plus(K2, R, I2),
        'substs.ComposeHeaps1.P5'(N, U, I2, G2, J2),
        'Integers':times(14, W, N2),
        'Integers':plus(N2, R, L2),
        'substs.ComposeHeaps1.P5'(O, U, L2, J2, M2),
        'Integers':times(15, W, P2),
        'Integers':plus(P2, R, O2),
        'substs.ComposeHeaps1.P5'(P, U, O2, M2, T).
'~substs.ComposeHeaps1.P5'('substs.H.F16'(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), Q, R, S, T) :-
        'Integers':minus(Q, 1, V),
        U=V,
        'Integers':power(16, Q, X),
        W=X,
        '~substs.ComposeHeaps1.P5'(A, U, R, S, Y),
        'Integers':plus(W, R, Z),
        '~substs.ComposeHeaps1.P5'(B, U, Z, Y, A1),
        'Integers':times(2, W, D1),
        'Integers':plus(D1, R, B1),
        '~substs.ComposeHeaps1.P5'(C, U, B1, A1, C1),
        'Integers':times(3, W, G1),
        'Integers':plus(G1, R, E1),
        '~substs.ComposeHeaps1.P5'(D, U, E1, C1, F1),
        'Integers':times(4, W, J1),
        'Integers':plus(J1, R, H1),
        '~substs.ComposeHeaps1.P5'(E, U, H1, F1, I1),
        'Integers':times(5, W, M1),
        'Integers':plus(M1, R, K1),
        '~substs.ComposeHeaps1.P5'(F, U, K1, I1, L1),
        'Integers':times(6, W, P1),
        'Integers':plus(P1, R, N1),
        '~substs.ComposeHeaps1.P5'(G, U, N1, L1, O1),
        'Integers':times(7, W, S1),
        'Integers':plus(S1, R, Q1),
        '~substs.ComposeHeaps1.P5'(H, U, Q1, O1, R1),
        'Integers':times(8, W, V1),
        'Integers':plus(V1, R, T1),
        '~substs.ComposeHeaps1.P5'(I, U, T1, R1, U1),
        'Integers':times(9, W, Y1),
        'Integers':plus(Y1, R, W1),
        '~substs.ComposeHeaps1.P5'(J, U, W1, U1, X1),
        'Integers':times(10, W, B2),
        'Integers':plus(B2, R, Z1),
        '~substs.ComposeHeaps1.P5'(K, U, Z1, X1, A2),
        'Integers':times(11, W, E2),
        'Integers':plus(E2, R, C2),
        '~substs.ComposeHeaps1.P5'(L, U, C2, A2, D2),
        'Integers':times(12, W, H2),
        'Integers':plus(H2, R, F2),
        '~substs.ComposeHeaps1.P5'(M, U, F2, D2, G2),
        'Integers':times(13, W, K2),
        'Integers':plus(K2, R, I2),
        '~substs.ComposeHeaps1.P5'(N, U, I2, G2, J2),
        'Integers':times(14, W, N2),
        'Integers':plus(N2, R, L2),
        '~substs.ComposeHeaps1.P5'(O, U, L2, J2, M2),
        'Integers':times(15, W, P2),
        'Integers':plus(P2, R, O2),
        '~substs.ComposeHeaps1.P5'(P, U, O2, M2, T).
'substs.ComposeTypeSubsts1.P3'('substs.TypeSubst.F2'('substs.Heap.F2'(A,B),C), D, 'substs.TypeSubst.F2'(E,F)) :-
        'substs.RationaliseTypeList.P3'(C, F, D),
        'substs.EmptyHeap.P1'(G),
        'substs.RationaliseTypeHeap.P6'(B, A, 0, D, G, E).
'~substs.ComposeTypeSubsts1.P3'('substs.TypeSubst.F2'('substs.Heap.F2'(A,B),C), D, 'substs.TypeSubst.F2'(E,F)) :-
        '~substs.RationaliseTypeList.P3'(C, F, D),
        '~substs.EmptyHeap.P1'(G),
        '~substs.RationaliseTypeHeap.P6'(B, A, 0, D, G, E).
'substs.ComposeTermSubsts2.P3'('substs.TermSubst.F2'(A,B), 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,F)) :-
        'substs.ComposeHeaps.P3'(A, C, E),
        'substs.ComposeLists.P3'(D, B, F).
'~substs.ComposeTermSubsts2.P3'('substs.TermSubst.F2'(A,B), 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,F)) :-
        '~substs.ComposeHeaps.P3'(A, C, E),
        '~substs.ComposeLists.P3'(D, B, F).
'substs.DerefType1.P6'('substs.N.C0', A, _, _, _, A).
'~substs.DerefType1.P6'('substs.N.C0', A, _, _, _, A).
'substs.DerefType1.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        'substs.Contents.P4'(A, B, C, F),
        'substs.DerefType1.P6'(F, 'MetaDefs.Par.F1'(A), B, C, D, E).
'~substs.DerefType1.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        '~substs.Contents.P4'(A, B, C, F),
        '~substs.DerefType1.P6'(F, 'MetaDefs.Par.F1'(A), B, C, D, E).
'substs.DerefType1.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        'substs.DerefType.P3'(A, 'substs.TypeSubst.F2'('substs.Heap.F2'(B,C),D), E).
'~substs.DerefType1.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        '~substs.DerefType.P3'(A, 'substs.TypeSubst.F2'('substs.Heap.F2'(B,C),D), E).
'substs.DerefType1.P6'('substs.T.F1'(A), _, _, _, _, A).
'~substs.DerefType1.P6'('substs.T.F1'(A), _, _, _, _, A).
'substs.DelTypeBinding.P4'('MetaDefs.Par.F2'(A,B), C, 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,F)) :-
        'Lists':'Lists.DeleteFirst.P3'('MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),G), E, F),
        'substs.SubstApplyToType.P3'(G, 'substs.TypeSubst.F2'(D,E), C).
'~substs.DelTypeBinding.P4'('MetaDefs.Par.F2'(A,B), C, 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,F)) :-
        'Lists':'~Lists.DeleteFirst.P3'('MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),G), E, F),
        '~substs.SubstApplyToType.P3'(G, 'substs.TypeSubst.F2'(D,E), C).
'substs.DelTypeBinding.P4'('MetaDefs.Par.F1'(A), B, 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        'substs.AddBinding.P4'(A, 'substs.N.C0', C, E),
        'substs.SubstApplyToType.P3'('MetaDefs.Par.F1'(A), 'substs.TypeSubst.F2'(C,D), B),
        user:not_equal([], [B,A], B, 'MetaDefs.Par.F1'(A)).
'~substs.DelTypeBinding.P4'('MetaDefs.Par.F1'(A), B, 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        '~substs.AddBinding.P4'(A, 'substs.N.C0', C, E),
        '~substs.SubstApplyToType.P3'('MetaDefs.Par.F1'(A), 'substs.TypeSubst.F2'(C,D), B),
        user:not_equal([], [B,A], B, 'MetaDefs.Par.F1'(A)).
'substs.DB.P3'([], _, []).
'~substs.DB.P3'([], _, []).
'substs.DB.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        user:goedel_freeze(ground([B,D]), (B=D,true->E=A;E=['MetaDefs.!.F2'(B,C)|F],'Substs':'substs.DB.P3'(A,D,F))).
'~substs.DB.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        user:goedel_freeze(ground([B,D]), (B=D,true->E=A;E=['MetaDefs.!.F2'(B,C)|F],'Substs':'~substs.DB.P3'(A,D,F))).
'substs.DelTermBinding.P4'('MetaDefs.Var.F2'(A,B), C, 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,F)) :-
        'Lists':'Lists.DeleteFirst.P3'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),G), E, F),
        'substs.SubstApplyToTerm.P3'(G, 'substs.TermSubst.F2'(D,E), C).
'~substs.DelTermBinding.P4'('MetaDefs.Var.F2'(A,B), C, 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,F)) :-
        'Lists':'~Lists.DeleteFirst.P3'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),G), E, F),
        '~substs.SubstApplyToTerm.P3'(G, 'substs.TermSubst.F2'(D,E), C).
'substs.DelTermBinding.P4'('MetaDefs.Var.F1'(A), B, 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        'substs.AddBinding.P4'(A, 'substs.N.C0', C, E),
        'substs.SubstApplyToTerm.P3'('MetaDefs.Var.F1'(A), 'substs.TermSubst.F2'(C,D), B),
        user:not_equal([], [B,A], B, 'MetaDefs.Var.F1'(A)).
'~substs.DelTermBinding.P4'('MetaDefs.Var.F1'(A), B, 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        '~substs.AddBinding.P4'(A, 'substs.N.C0', C, E),
        '~substs.SubstApplyToTerm.P3'('MetaDefs.Var.F1'(A), 'substs.TermSubst.F2'(C,D), B),
        user:not_equal([], [B,A], B, 'MetaDefs.Var.F1'(A)).
'substs.DerefType.P3'('MetaDefs.Occ.F1'(A), _, A).
'~substs.DerefType.P3'('MetaDefs.Occ.F1'(A), _, A).
'substs.DerefType.P3'('MetaDefs.Par.F1'(A), 'substs.TypeSubst.F2'('substs.Heap.F2'(B,C),D), E) :-
        'substs.Contents.P4'(A, B, C, F),
        'substs.DerefType1.P6'(F, 'MetaDefs.Par.F1'(A), B, C, D, E).
'~substs.DerefType.P3'('MetaDefs.Par.F1'(A), 'substs.TypeSubst.F2'('substs.Heap.F2'(B,C),D), E) :-
        '~substs.Contents.P4'(A, B, C, F),
        '~substs.DerefType1.P6'(F, 'MetaDefs.Par.F1'(A), B, C, D, E).
'substs.DerefType.P3'('MetaDefs.Type.F2'(A,B), _, 'MetaDefs.Type.F2'(A,B)).
'~substs.DerefType.P3'('MetaDefs.Type.F2'(A,B), _, 'MetaDefs.Type.F2'(A,B)).
'substs.DerefType.P3'('MetaDefs.BType.F1'(A), _, 'MetaDefs.BType.F1'(A)).
'~substs.DerefType.P3'('MetaDefs.BType.F1'(A), _, 'MetaDefs.BType.F1'(A)).
'substs.DerefType.P3'('MetaDefs.XType.F2'(A,B), _, 'MetaDefs.XType.F2'(A,B)).
'~substs.DerefType.P3'('MetaDefs.XType.F2'(A,B), _, 'MetaDefs.XType.F2'(A,B)).
'substs.DerefType.P3'('MetaDefs.XBType.F1'(A), _, 'MetaDefs.XBType.F1'(A)).
'~substs.DerefType.P3'('MetaDefs.XBType.F1'(A), _, 'MetaDefs.XBType.F1'(A)).
'substs.DerefType.P3'('MetaDefs.Par.F2'(A,B), 'substs.TypeSubst.F2'(C,D), E) :-
        user:one_solution(user:goedel_freeze(ground([B,A,D]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),F),D),true),'Substs':'substs.DerefType.P3'(F,'substs.TypeSubst.F2'(C,D),E),E='MetaDefs.Par.F2'(A,B)))).
'~substs.DerefType.P3'('MetaDefs.Par.F2'(A,B), 'substs.TypeSubst.F2'(C,D), E) :-
        user:goedel_freeze(ground([B,A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),F),D),true),'Substs':'~substs.DerefType.P3'(F,'substs.TypeSubst.F2'(C,D),E),E='MetaDefs.Par.F2'(A,B))).
'substs.Dereference1.P6'('substs.N.C0', A, _, _, _, A).
'~substs.Dereference1.P6'('substs.N.C0', A, _, _, _, A).
'substs.Dereference1.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        'substs.Contents.P4'(A, B, C, F),
        'substs.Dereference1.P6'(F, 'MetaDefs.Var.F1'(A), B, C, D, E).
'~substs.Dereference1.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        '~substs.Contents.P4'(A, B, C, F),
        '~substs.Dereference1.P6'(F, 'MetaDefs.Var.F1'(A), B, C, D, E).
'substs.Dereference1.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        'substs.Dereference.P3'(A, 'substs.TermSubst.F2'('substs.Heap.F2'(B,C),D), E).
'~substs.Dereference1.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        '~substs.Dereference.P3'(A, 'substs.TermSubst.F2'('substs.Heap.F2'(B,C),D), E).
'substs.Dereference1.P6'('substs.T.F1'(A), _, _, _, _, A).
'~substs.Dereference1.P6'('substs.T.F1'(A), _, _, _, _, A).
'substs.Dereference.P3'('MetaDefs.Occ.F1'(A), _, A).
'~substs.Dereference.P3'('MetaDefs.Occ.F1'(A), _, A).
'substs.Dereference.P3'('MetaDefs.Var.F1'(A), 'substs.TermSubst.F2'('substs.Heap.F2'(B,C),D), E) :-
        'substs.Contents.P4'(A, B, C, F),
        'substs.Dereference1.P6'(F, 'MetaDefs.Var.F1'(A), B, C, D, E).
'~substs.Dereference.P3'('MetaDefs.Var.F1'(A), 'substs.TermSubst.F2'('substs.Heap.F2'(B,C),D), E) :-
        '~substs.Contents.P4'(A, B, C, F),
        '~substs.Dereference1.P6'(F, 'MetaDefs.Var.F1'(A), B, C, D, E).
'substs.Dereference.P3'('MetaDefs.Term.F2'(A,B), _, 'MetaDefs.Term.F2'(A,B)).
'~substs.Dereference.P3'('MetaDefs.Term.F2'(A,B), _, 'MetaDefs.Term.F2'(A,B)).
'substs.Dereference.P3'('MetaDefs.CTerm.F1'(A), _, 'MetaDefs.CTerm.F1'(A)).
'~substs.Dereference.P3'('MetaDefs.CTerm.F1'(A), _, 'MetaDefs.CTerm.F1'(A)).
'substs.Dereference.P3'('MetaDefs.XTerm.F3'(A,B,C), _, 'MetaDefs.XTerm.F3'(A,B,C)).
'~substs.Dereference.P3'('MetaDefs.XTerm.F3'(A,B,C), _, 'MetaDefs.XTerm.F3'(A,B,C)).
'substs.Dereference.P3'('MetaDefs.XCTerm.F2'(A,B), _, 'MetaDefs.XCTerm.F2'(A,B)).
'~substs.Dereference.P3'('MetaDefs.XCTerm.F2'(A,B), _, 'MetaDefs.XCTerm.F2'(A,B)).
'substs.Dereference.P3'('MetaDefs.Str.F1'(A), _, 'MetaDefs.Str.F1'(A)).
'~substs.Dereference.P3'('MetaDefs.Str.F1'(A), _, 'MetaDefs.Str.F1'(A)).
'substs.Dereference.P3'('MetaDefs.Int.F1'(A), _, 'MetaDefs.Int.F1'(A)).
'~substs.Dereference.P3'('MetaDefs.Int.F1'(A), _, 'MetaDefs.Int.F1'(A)).
'substs.Dereference.P3'('MetaDefs.Prm.F1'(A), _, 'MetaDefs.Prm.F1'(A)).
'~substs.Dereference.P3'('MetaDefs.Prm.F1'(A), _, 'MetaDefs.Prm.F1'(A)).
'substs.Dereference.P3'('MetaDefs.SuchThat.F2'(A,B), _, 'MetaDefs.SuchThat.F2'(A,B)).
'~substs.Dereference.P3'('MetaDefs.SuchThat.F2'(A,B), _, 'MetaDefs.SuchThat.F2'(A,B)).
'substs.Dereference.P3'('MetaDefs.Var.F2'(A,B), 'substs.TermSubst.F2'(C,D), E) :-
        user:one_solution(user:goedel_freeze(ground([B,A,D]),if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),F),D),true),'Substs':'substs.Dereference.P3'(F,'substs.TermSubst.F2'(C,D),E),E='MetaDefs.Var.F2'(A,B)))).
'~substs.Dereference.P3'('MetaDefs.Var.F2'(A,B), 'substs.TermSubst.F2'(C,D), E) :-
        user:goedel_freeze(ground([B,A,D]), if(('Lists':'~Lists.MemberCheck.P2'('MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),F),D),true),'Substs':'~substs.Dereference.P3'(F,'substs.TermSubst.F2'(C,D),E),E='MetaDefs.Var.F2'(A,B))).
'substs.FullDerefTerm.P4'('MetaDefs.Var.F1'(A), B, _, C) :-
        user:goedel_freeze(ground([A,B]), (B='MetaDefs.Var.F1'(A),true->C='MetaDefs.Occ.F1'(B);C='MetaDefs.Var.F1'(A))).
'~substs.FullDerefTerm.P4'('MetaDefs.Var.F1'(A), B, _, C) :-
        user:goedel_freeze(ground([A,B]), (B='MetaDefs.Var.F1'(A),true->C='MetaDefs.Occ.F1'(B);C='MetaDefs.Var.F1'(A))).
'substs.FullDerefTerm.P4'('MetaDefs.Var.F2'(A,B), C, _, D) :-
        user:goedel_freeze(ground([B,C,A]), (C='MetaDefs.Var.F2'(A,B),true->D='MetaDefs.Occ.F1'(C);D='MetaDefs.Var.F2'(A,B))).
'~substs.FullDerefTerm.P4'('MetaDefs.Var.F2'(A,B), C, _, D) :-
        user:goedel_freeze(ground([B,C,A]), (C='MetaDefs.Var.F2'(A,B),true->D='MetaDefs.Occ.F1'(C);D='MetaDefs.Var.F2'(A,B))).
'substs.FullDerefTerm.P4'('MetaDefs.CTerm.F1'(A), _, _, 'MetaDefs.CTerm.F1'(A)).
'~substs.FullDerefTerm.P4'('MetaDefs.CTerm.F1'(A), _, _, 'MetaDefs.CTerm.F1'(A)).
'substs.FullDerefTerm.P4'('MetaDefs.Term.F2'(A,B), C, D, 'MetaDefs.Term.F2'(A,E)) :-
        'substs.FullDerefTerm1.P4'(B, C, D, E).
'~substs.FullDerefTerm.P4'('MetaDefs.Term.F2'(A,B), C, D, 'MetaDefs.Term.F2'(A,E)) :-
        '~substs.FullDerefTerm1.P4'(B, C, D, E).
'substs.FullDerefTerm.P4'('MetaDefs.XCTerm.F2'(A,B), _, _, 'MetaDefs.XCTerm.F2'(A,B)).
'~substs.FullDerefTerm.P4'('MetaDefs.XCTerm.F2'(A,B), _, _, 'MetaDefs.XCTerm.F2'(A,B)).
'substs.FullDerefTerm.P4'('MetaDefs.XTerm.F3'(A,B,C), D, E, 'MetaDefs.XTerm.F3'(A,F,C)) :-
        'substs.FullDerefTerm1.P4'(B, D, E, F).
'~substs.FullDerefTerm.P4'('MetaDefs.XTerm.F3'(A,B,C), D, E, 'MetaDefs.XTerm.F3'(A,F,C)) :-
        '~substs.FullDerefTerm1.P4'(B, D, E, F).
'substs.FullDerefTerm.P4'('MetaDefs.Int.F1'(A), _, _, 'MetaDefs.Int.F1'(A)).
'~substs.FullDerefTerm.P4'('MetaDefs.Int.F1'(A), _, _, 'MetaDefs.Int.F1'(A)).
'substs.FullDerefTerm.P4'('MetaDefs.Prm.F1'(A), _, _, 'MetaDefs.Prm.F1'(A)).
'~substs.FullDerefTerm.P4'('MetaDefs.Prm.F1'(A), _, _, 'MetaDefs.Prm.F1'(A)).
'substs.FullDerefTerm.P4'('MetaDefs.Str.F1'(A), _, _, 'MetaDefs.Str.F1'(A)).
'~substs.FullDerefTerm.P4'('MetaDefs.Str.F1'(A), _, _, 'MetaDefs.Str.F1'(A)).
'substs.FullDerefTerm.P4'('MetaDefs.SuchThat.F2'(A,B), _, _, 'MetaDefs.SuchThat.F2'(A,B)).
'~substs.FullDerefTerm.P4'('MetaDefs.SuchThat.F2'(A,B), _, _, 'MetaDefs.SuchThat.F2'(A,B)).
'substs.EmptyHeap.P1'('substs.Heap.F2'(0,'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0'))).
'~substs.EmptyHeap.P1'('substs.Heap.F2'(0,'substs.H.F16'('substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0'))).
'substs.FullDerefTerm1.P4'([], _, _, []).
'~substs.FullDerefTerm1.P4'([], _, _, []).
'substs.FullDerefTerm1.P4'([A|B], C, D, [E|F]) :-
        'substs.ApplySubstToTerm.P4'(A, C, D, E),
        'substs.FullDerefTerm1.P4'(B, C, D, F).
'~substs.FullDerefTerm1.P4'([A|B], C, D, [E|F]) :-
        '~substs.ApplySubstToTerm.P4'(A, C, D, E),
        '~substs.FullDerefTerm1.P4'(B, C, D, F).
'substs.RationaliseTypeHeap.P6'('substs.N.C0', _, _, _, A, A).
'~substs.RationaliseTypeHeap.P6'('substs.N.C0', _, _, _, A, A).
'substs.RationaliseTypeHeap.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        'substs.ApplySubstToType.P4'('MetaDefs.Par.F1'(A), 'MetaDefs.Par.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Par.F1'(B))),true->'Substs':'substs.AddTypeBinding1.P4'(F,B,D,E);E=D)).
'~substs.RationaliseTypeHeap.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        '~substs.ApplySubstToType.P4'('MetaDefs.Par.F1'(A), 'MetaDefs.Par.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Par.F1'(B))),true->'Substs':'~substs.AddTypeBinding1.P4'(F,B,D,E);E=D)).
'substs.RationaliseTypeHeap.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        'substs.ApplySubstToType.P4'(A, 'MetaDefs.Par.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Par.F1'(B))),true->'Substs':'substs.AddTypeBinding1.P4'(F,B,D,E);E=D)).
'~substs.RationaliseTypeHeap.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        '~substs.ApplySubstToType.P4'(A, 'MetaDefs.Par.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Par.F1'(B))),true->'Substs':'~substs.AddTypeBinding1.P4'(F,B,D,E);E=D)).
'substs.RationaliseTypeHeap.P6'('substs.T.F1'(A), _, B, C, D, E) :-
        'substs.ApplySubstToType.P4'(A, 'MetaDefs.Par.F1'(B), C, F),
        'substs.AddTypeBinding1.P4'(F, B, D, E).
'~substs.RationaliseTypeHeap.P6'('substs.T.F1'(A), _, B, C, D, E) :-
        '~substs.ApplySubstToType.P4'(A, 'MetaDefs.Par.F1'(B), C, F),
        '~substs.AddTypeBinding1.P4'(F, B, D, E).
'substs.RationaliseTypeHeap.P6'('substs.H.F16'(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), Q, R, S, T, U) :-
        'Integers':minus(Q, 1, W),
        V=W,
        'Integers':power(16, Q, Y),
        X=Y,
        'substs.RationaliseTypeHeap.P6'(A, V, R, S, T, Z),
        'Integers':plus(X, R, A1),
        'substs.RationaliseTypeHeap.P6'(B, V, A1, S, Z, B1),
        'Integers':times(2, X, E1),
        'Integers':plus(E1, R, C1),
        'substs.RationaliseTypeHeap.P6'(C, V, C1, S, B1, D1),
        'Integers':times(3, X, H1),
        'Integers':plus(H1, R, F1),
        'substs.RationaliseTypeHeap.P6'(D, V, F1, S, D1, G1),
        'Integers':times(4, X, K1),
        'Integers':plus(K1, R, I1),
        'substs.RationaliseTypeHeap.P6'(E, V, I1, S, G1, J1),
        'Integers':times(5, X, N1),
        'Integers':plus(N1, R, L1),
        'substs.RationaliseTypeHeap.P6'(F, V, L1, S, J1, M1),
        'Integers':times(6, X, Q1),
        'Integers':plus(Q1, R, O1),
        'substs.RationaliseTypeHeap.P6'(G, V, O1, S, M1, P1),
        'Integers':times(7, X, T1),
        'Integers':plus(T1, R, R1),
        'substs.RationaliseTypeHeap.P6'(H, V, R1, S, P1, S1),
        'Integers':times(8, X, W1),
        'Integers':plus(W1, R, U1),
        'substs.RationaliseTypeHeap.P6'(I, V, U1, S, S1, V1),
        'Integers':times(9, X, Z1),
        'Integers':plus(Z1, R, X1),
        'substs.RationaliseTypeHeap.P6'(J, V, X1, S, V1, Y1),
        'Integers':times(10, X, C2),
        'Integers':plus(C2, R, A2),
        'substs.RationaliseTypeHeap.P6'(K, V, A2, S, Y1, B2),
        'Integers':times(11, X, F2),
        'Integers':plus(F2, R, D2),
        'substs.RationaliseTypeHeap.P6'(L, V, D2, S, B2, E2),
        'Integers':times(12, X, I2),
        'Integers':plus(I2, R, G2),
        'substs.RationaliseTypeHeap.P6'(M, V, G2, S, E2, H2),
        'Integers':times(13, X, L2),
        'Integers':plus(L2, R, J2),
        'substs.RationaliseTypeHeap.P6'(N, V, J2, S, H2, K2),
        'Integers':times(14, X, O2),
        'Integers':plus(O2, R, M2),
        'substs.RationaliseTypeHeap.P6'(O, V, M2, S, K2, N2),
        'Integers':times(15, X, Q2),
        'Integers':plus(Q2, R, P2),
        'substs.RationaliseTypeHeap.P6'(P, V, P2, S, N2, U).
'~substs.RationaliseTypeHeap.P6'('substs.H.F16'(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), Q, R, S, T, U) :-
        'Integers':minus(Q, 1, W),
        V=W,
        'Integers':power(16, Q, Y),
        X=Y,
        '~substs.RationaliseTypeHeap.P6'(A, V, R, S, T, Z),
        'Integers':plus(X, R, A1),
        '~substs.RationaliseTypeHeap.P6'(B, V, A1, S, Z, B1),
        'Integers':times(2, X, E1),
        'Integers':plus(E1, R, C1),
        '~substs.RationaliseTypeHeap.P6'(C, V, C1, S, B1, D1),
        'Integers':times(3, X, H1),
        'Integers':plus(H1, R, F1),
        '~substs.RationaliseTypeHeap.P6'(D, V, F1, S, D1, G1),
        'Integers':times(4, X, K1),
        'Integers':plus(K1, R, I1),
        '~substs.RationaliseTypeHeap.P6'(E, V, I1, S, G1, J1),
        'Integers':times(5, X, N1),
        'Integers':plus(N1, R, L1),
        '~substs.RationaliseTypeHeap.P6'(F, V, L1, S, J1, M1),
        'Integers':times(6, X, Q1),
        'Integers':plus(Q1, R, O1),
        '~substs.RationaliseTypeHeap.P6'(G, V, O1, S, M1, P1),
        'Integers':times(7, X, T1),
        'Integers':plus(T1, R, R1),
        '~substs.RationaliseTypeHeap.P6'(H, V, R1, S, P1, S1),
        'Integers':times(8, X, W1),
        'Integers':plus(W1, R, U1),
        '~substs.RationaliseTypeHeap.P6'(I, V, U1, S, S1, V1),
        'Integers':times(9, X, Z1),
        'Integers':plus(Z1, R, X1),
        '~substs.RationaliseTypeHeap.P6'(J, V, X1, S, V1, Y1),
        'Integers':times(10, X, C2),
        'Integers':plus(C2, R, A2),
        '~substs.RationaliseTypeHeap.P6'(K, V, A2, S, Y1, B2),
        'Integers':times(11, X, F2),
        'Integers':plus(F2, R, D2),
        '~substs.RationaliseTypeHeap.P6'(L, V, D2, S, B2, E2),
        'Integers':times(12, X, I2),
        'Integers':plus(I2, R, G2),
        '~substs.RationaliseTypeHeap.P6'(M, V, G2, S, E2, H2),
        'Integers':times(13, X, L2),
        'Integers':plus(L2, R, J2),
        '~substs.RationaliseTypeHeap.P6'(N, V, J2, S, H2, K2),
        'Integers':times(14, X, O2),
        'Integers':plus(O2, R, M2),
        '~substs.RationaliseTypeHeap.P6'(O, V, M2, S, K2, N2),
        'Integers':times(15, X, Q2),
        'Integers':plus(Q2, R, P2),
        '~substs.RationaliseTypeHeap.P6'(P, V, P2, S, N2, U).
'substs.HeapTerm.P2'('substs.R.F1'(A), 'MetaDefs.Var.F1'(A)).
'~substs.HeapTerm.P2'('substs.R.F1'(A), 'MetaDefs.Var.F1'(A)).
'substs.HeapTerm.P2'('substs.V.F1'(A), A).
'~substs.HeapTerm.P2'('substs.V.F1'(A), A).
'substs.HeapTerm.P2'('substs.T.F1'(A), A).
'~substs.HeapTerm.P2'('substs.T.F1'(A), A).
'substs.GetConstant1.P4'('MetaDefs.Var.F1'(A), B, 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        'substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'~substs.GetConstant1.P4'('MetaDefs.Var.F1'(A), B, 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        '~substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'substs.GetConstant1.P4'('MetaDefs.Var.F2'(A,B), C, 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|E])).
'~substs.GetConstant1.P4'('MetaDefs.Var.F2'(A,B), C, 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|E])).
'substs.GetConstant1.P4'('MetaDefs.CTerm.F1'(A), 'MetaDefs.CTerm.F1'(A), B, B).
'~substs.GetConstant1.P4'('MetaDefs.CTerm.F1'(A), 'MetaDefs.CTerm.F1'(A), B, B).
'substs.GetConstant1.P4'('MetaDefs.XCTerm.F2'(A,B), 'MetaDefs.XCTerm.F2'(A,B), C, C).
'~substs.GetConstant1.P4'('MetaDefs.XCTerm.F2'(A,B), 'MetaDefs.XCTerm.F2'(A,B), C, C).
'substs.GetConstant1.P4'('MetaDefs.Int.F1'(A), 'MetaDefs.Int.F1'(A), B, B).
'~substs.GetConstant1.P4'('MetaDefs.Int.F1'(A), 'MetaDefs.Int.F1'(A), B, B).
'substs.GetConstant1.P4'('MetaDefs.Prm.F1'(A), 'MetaDefs.Prm.F1'(A), B, B).
'~substs.GetConstant1.P4'('MetaDefs.Prm.F1'(A), 'MetaDefs.Prm.F1'(A), B, B).
'substs.GetConstant1.P4'('MetaDefs.Str.F1'(A), 'MetaDefs.Str.F1'(A), B, B).
'~substs.GetConstant1.P4'('MetaDefs.Str.F1'(A), 'MetaDefs.Str.F1'(A), B, B).
'substs.GetBase.P4'(A, B, C, D) :-
        'substs.DerefType.P3'(A, C, E),
        'substs.GetBase1.P4'(E, B, C, D).
'~substs.GetBase.P4'(A, B, C, D) :-
        '~substs.DerefType.P3'(A, C, E),
        '~substs.GetBase1.P4'(E, B, C, D).
'substs.FullDereference.P3'('MetaDefs.Var.F2'(A,B), _, 'MetaDefs.Var.F2'(A,B)).
'~substs.FullDereference.P3'('MetaDefs.Var.F2'(A,B), _, 'MetaDefs.Var.F2'(A,B)).
'substs.FullDereference.P3'('MetaDefs.Var.F1'(A), _, 'MetaDefs.Var.F1'(A)).
'~substs.FullDereference.P3'('MetaDefs.Var.F1'(A), _, 'MetaDefs.Var.F1'(A)).
'substs.FullDereference.P3'('MetaDefs.Term.F2'(A,B), C, 'MetaDefs.Term.F2'(A,D)) :-
        'substs.ApplyTermSubst.P3'(B, C, D).
'~substs.FullDereference.P3'('MetaDefs.Term.F2'(A,B), C, 'MetaDefs.Term.F2'(A,D)) :-
        '~substs.ApplyTermSubst.P3'(B, C, D).
'substs.FullDereference.P3'('MetaDefs.CTerm.F1'(A), _, 'MetaDefs.CTerm.F1'(A)).
'~substs.FullDereference.P3'('MetaDefs.CTerm.F1'(A), _, 'MetaDefs.CTerm.F1'(A)).
'substs.FullDereference.P3'('MetaDefs.XTerm.F3'(A,B,C), D, 'MetaDefs.XTerm.F3'(A,E,C)) :-
        'substs.ApplyTermSubst.P3'(B, D, E).
'~substs.FullDereference.P3'('MetaDefs.XTerm.F3'(A,B,C), D, 'MetaDefs.XTerm.F3'(A,E,C)) :-
        '~substs.ApplyTermSubst.P3'(B, D, E).
'substs.FullDereference.P3'('MetaDefs.XCTerm.F2'(A,B), _, 'MetaDefs.XCTerm.F2'(A,B)).
'~substs.FullDereference.P3'('MetaDefs.XCTerm.F2'(A,B), _, 'MetaDefs.XCTerm.F2'(A,B)).
'substs.FullDereference.P3'('MetaDefs.Str.F1'(A), _, 'MetaDefs.Str.F1'(A)).
'~substs.FullDereference.P3'('MetaDefs.Str.F1'(A), _, 'MetaDefs.Str.F1'(A)).
'substs.FullDereference.P3'('MetaDefs.Int.F1'(A), _, 'MetaDefs.Int.F1'(A)).
'~substs.FullDereference.P3'('MetaDefs.Int.F1'(A), _, 'MetaDefs.Int.F1'(A)).
'substs.FullDereference.P3'('MetaDefs.Prm.F1'(A), _, 'MetaDefs.Prm.F1'(A)).
'~substs.FullDereference.P3'('MetaDefs.Prm.F1'(A), _, 'MetaDefs.Prm.F1'(A)).
'substs.FullDereference.P3'('MetaDefs.SuchThat.F2'(A,B), _, 'MetaDefs.SuchThat.F2'(A,B)).
'~substs.FullDereference.P3'('MetaDefs.SuchThat.F2'(A,B), _, 'MetaDefs.SuchThat.F2'(A,B)).
'substs.FullDerefType1.P4'([], _, _, []).
'~substs.FullDerefType1.P4'([], _, _, []).
'substs.FullDerefType1.P4'([A|B], C, D, [E|F]) :-
        'substs.ApplySubstToType.P4'(A, C, D, E),
        'substs.FullDerefType1.P4'(B, C, D, F).
'~substs.FullDerefType1.P4'([A|B], C, D, [E|F]) :-
        '~substs.ApplySubstToType.P4'(A, C, D, E),
        '~substs.FullDerefType1.P4'(B, C, D, F).
'substs.GetConstant.P4'(A, B, C, D) :-
        'substs.Dereference.P3'(A, C, E),
        'substs.GetConstant1.P4'(E, B, C, D).
'~substs.GetConstant.P4'(A, B, C, D) :-
        '~substs.Dereference.P3'(A, C, E),
        '~substs.GetConstant1.P4'(E, B, C, D).
'substs.GetBase1.P4'('MetaDefs.Par.F1'(A), B, 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        'substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'~substs.GetBase1.P4'('MetaDefs.Par.F1'(A), B, 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        '~substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'substs.GetBase1.P4'('MetaDefs.Par.F2'(A,B), C, 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),C)|E])).
'~substs.GetBase1.P4'('MetaDefs.Par.F2'(A,B), C, 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),C)|E])).
'substs.GetBase1.P4'('MetaDefs.BType.F1'(A), 'MetaDefs.BType.F1'(A), B, B).
'~substs.GetBase1.P4'('MetaDefs.BType.F1'(A), 'MetaDefs.BType.F1'(A), B, B).
'substs.GetBase1.P4'('MetaDefs.XBType.F1'(A), 'MetaDefs.XBType.F1'(A), B, B).
'~substs.GetBase1.P4'('MetaDefs.XBType.F1'(A), 'MetaDefs.XBType.F1'(A), B, B).
'substs.GetType.P5'(A, B, C, D, E) :-
        'substs.DerefType.P3'(A, D, F),
        'substs.GetType1.P5'(F, B, C, D, E).
'~substs.GetType.P5'(A, B, C, D, E) :-
        '~substs.DerefType.P3'(A, D, F),
        '~substs.GetType1.P5'(F, B, C, D, E).
'substs.GetFunction.P5'(A, B, C, D, E) :-
        'substs.Dereference.P3'(A, D, F),
        'substs.GetFunction1.P5'(F, B, C, D, E).
'~substs.GetFunction.P5'(A, B, C, D, E) :-
        '~substs.Dereference.P3'(A, D, F),
        '~substs.GetFunction1.P5'(F, B, C, D, E).
'substs.GetFunction1.P5'('MetaDefs.Var.F1'(A), B, 'substs.Write.C0', 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        'substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'~substs.GetFunction1.P5'('MetaDefs.Var.F1'(A), B, 'substs.Write.C0', 'substs.TermSubst.F2'(C,D), 'substs.TermSubst.F2'(E,D)) :-
        '~substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'substs.GetFunction1.P5'('MetaDefs.Var.F2'(A,B), C, 'substs.Write.C0', 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|E])).
'~substs.GetFunction1.P5'('MetaDefs.Var.F2'(A,B), C, 'substs.Write.C0', 'substs.TermSubst.F2'(D,E), 'substs.TermSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Var.F2'(A,B),C)|E])).
'substs.GetFunction1.P5'('MetaDefs.Term.F2'(A,B), 'MetaDefs.Term.F2'(A,B), 'substs.Read.C0', C, C).
'~substs.GetFunction1.P5'('MetaDefs.Term.F2'(A,B), 'MetaDefs.Term.F2'(A,B), 'substs.Read.C0', C, C).
'substs.GetFunction1.P5'('MetaDefs.XTerm.F3'(A,B,C), 'MetaDefs.XTerm.F3'(A,B,C), 'substs.Read.C0', D, D).
'~substs.GetFunction1.P5'('MetaDefs.XTerm.F3'(A,B,C), 'MetaDefs.XTerm.F3'(A,B,C), 'substs.Read.C0', D, D).
'substs.GetType1.P5'('MetaDefs.Par.F1'(A), B, 'substs.Write.C0', 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        'substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'~substs.GetType1.P5'('MetaDefs.Par.F1'(A), B, 'substs.Write.C0', 'substs.TypeSubst.F2'(C,D), 'substs.TypeSubst.F2'(E,D)) :-
        '~substs.AddBinding.P4'(A, 'substs.T.F1'(B), C, E).
'substs.GetType1.P5'('MetaDefs.Par.F2'(A,B), C, 'substs.Write.C0', 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),C)|E])).
'~substs.GetType1.P5'('MetaDefs.Par.F2'(A,B), C, 'substs.Write.C0', 'substs.TypeSubst.F2'(D,E), 'substs.TypeSubst.F2'(D,['MetaDefs.!.F2'('MetaDefs.Par.F2'(A,B),C)|E])).
'substs.GetType1.P5'('MetaDefs.Type.F2'(A,B), 'MetaDefs.Type.F2'(A,B), 'substs.Read.C0', C, C).
'~substs.GetType1.P5'('MetaDefs.Type.F2'(A,B), 'MetaDefs.Type.F2'(A,B), 'substs.Read.C0', C, C).
'substs.GetType1.P5'('MetaDefs.XType.F2'(A,B), 'MetaDefs.XType.F2'(A,B), 'substs.Read.C0', C, C).
'~substs.GetType1.P5'('MetaDefs.XType.F2'(A,B), 'MetaDefs.XType.F2'(A,B), 'substs.Read.C0', C, C).
'substs.ParameterInSubst.P3'('substs.TypeSubst.F2'(_,A), B, C) :-
        'Lists':'Lists.Member.P2'('MetaDefs.!.F2'(B,C), A).
'~substs.ParameterInSubst.P3'('substs.TypeSubst.F2'(_,A), B, C) :-
        'Lists':'~Lists.Member.P2'('MetaDefs.!.F2'(B,C), A).
'substs.ParameterInSubst.P3'('substs.TypeSubst.F2'(A,_), 'MetaDefs.Par.F1'(B), C) :-
        'substs.BindingInHeap.P3'(A, B, D),
        'substs.HeapType.P2'(D, C).
'~substs.ParameterInSubst.P3'('substs.TypeSubst.F2'(A,_), 'MetaDefs.Par.F1'(B), C) :-
        '~substs.BindingInHeap.P3'(A, B, D),
        '~substs.HeapType.P2'(D, C).
'substs.HeapType.P2'('substs.R.F1'(A), 'MetaDefs.Par.F1'(A)).
'~substs.HeapType.P2'('substs.R.F1'(A), 'MetaDefs.Par.F1'(A)).
'substs.HeapType.P2'('substs.V.F1'(A), A).
'~substs.HeapType.P2'('substs.V.F1'(A), A).
'substs.HeapType.P2'('substs.T.F1'(A), A).
'~substs.HeapType.P2'('substs.T.F1'(A), A).
'substs.RationaliseTermHeap.P6'('substs.N.C0', _, _, _, A, A).
'~substs.RationaliseTermHeap.P6'('substs.N.C0', _, _, _, A, A).
'substs.RationaliseTermHeap.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        'substs.ApplySubstToTerm.P4'('MetaDefs.Var.F1'(A), 'MetaDefs.Var.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Var.F1'(B))),true->'Substs':'substs.AddTermBinding1.P4'(F,B,D,E);E=D)).
'~substs.RationaliseTermHeap.P6'('substs.R.F1'(A), _, B, C, D, E) :-
        '~substs.ApplySubstToTerm.P4'('MetaDefs.Var.F1'(A), 'MetaDefs.Var.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Var.F1'(B))),true->'Substs':'~substs.AddTermBinding1.P4'(F,B,D,E);E=D)).
'substs.RationaliseTermHeap.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        'substs.ApplySubstToTerm.P4'(A, 'MetaDefs.Var.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Var.F1'(B))),true->'Substs':'substs.AddTermBinding1.P4'(F,B,D,E);E=D)).
'~substs.RationaliseTermHeap.P6'('substs.V.F1'(A), _, B, C, D, E) :-
        '~substs.ApplySubstToTerm.P4'(A, 'MetaDefs.Var.F1'(B), C, F),
        user:goedel_freeze(ground([B,F]), (user:not_equal([],[F,B],F,'MetaDefs.Occ.F1'('MetaDefs.Var.F1'(B))),true->'Substs':'~substs.AddTermBinding1.P4'(F,B,D,E);E=D)).
'substs.RationaliseTermHeap.P6'('substs.T.F1'(A), _, B, C, D, E) :-
        'substs.ApplySubstToTerm.P4'(A, 'MetaDefs.Var.F1'(B), C, F),
        'substs.AddTermBinding1.P4'(F, B, D, E).
'~substs.RationaliseTermHeap.P6'('substs.T.F1'(A), _, B, C, D, E) :-
        '~substs.ApplySubstToTerm.P4'(A, 'MetaDefs.Var.F1'(B), C, F),
        '~substs.AddTermBinding1.P4'(F, B, D, E).
'substs.RationaliseTermHeap.P6'('substs.H.F16'(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), Q, R, S, T, U) :-
        'Integers':minus(Q, 1, W),
        V=W,
        'Integers':power(16, Q, Y),
        X=Y,
        'substs.RationaliseTermHeap.P6'(A, V, R, S, T, Z),
        'Integers':plus(X, R, A1),
        'substs.RationaliseTermHeap.P6'(B, V, A1, S, Z, B1),
        'Integers':times(2, X, E1),
        'Integers':plus(E1, R, C1),
        'substs.RationaliseTermHeap.P6'(C, V, C1, S, B1, D1),
        'Integers':times(3, X, H1),
        'Integers':plus(H1, R, F1),
        'substs.RationaliseTermHeap.P6'(D, V, F1, S, D1, G1),
        'Integers':times(4, X, K1),
        'Integers':plus(K1, R, I1),
        'substs.RationaliseTermHeap.P6'(E, V, I1, S, G1, J1),
        'Integers':times(5, X, N1),
        'Integers':plus(N1, R, L1),
        'substs.RationaliseTermHeap.P6'(F, V, L1, S, J1, M1),
        'Integers':times(6, X, Q1),
        'Integers':plus(Q1, R, O1),
        'substs.RationaliseTermHeap.P6'(G, V, O1, S, M1, P1),
        'Integers':times(7, X, T1),
        'Integers':plus(T1, R, R1),
        'substs.RationaliseTermHeap.P6'(H, V, R1, S, P1, S1),
        'Integers':times(8, X, W1),
        'Integers':plus(W1, R, U1),
        'substs.RationaliseTermHeap.P6'(I, V, U1, S, S1, V1),
        'Integers':times(9, X, Z1),
        'Integers':plus(Z1, R, X1),
        'substs.RationaliseTermHeap.P6'(J, V, X1, S, V1, Y1),
        'Integers':times(10, X, C2),
        'Integers':plus(C2, R, A2),
        'substs.RationaliseTermHeap.P6'(K, V, A2, S, Y1, B2),
        'Integers':times(11, X, F2),
        'Integers':plus(F2, R, D2),
        'substs.RationaliseTermHeap.P6'(L, V, D2, S, B2, E2),
        'Integers':times(12, X, I2),
        'Integers':plus(I2, R, G2),
        'substs.RationaliseTermHeap.P6'(M, V, G2, S, E2, H2),
        'Integers':times(13, X, L2),
        'Integers':plus(L2, R, J2),
        'substs.RationaliseTermHeap.P6'(N, V, J2, S, H2, K2),
        'Integers':times(14, X, O2),
        'Integers':plus(O2, R, M2),
        'substs.RationaliseTermHeap.P6'(O, V, M2, S, K2, N2),
        'Integers':times(15, X, Q2),
        'Integers':plus(Q2, R, P2),
        'substs.RationaliseTermHeap.P6'(P, V, P2, S, N2, U).
'~substs.RationaliseTermHeap.P6'('substs.H.F16'(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P), Q, R, S, T, U) :-
        'Integers':minus(Q, 1, W),
        V=W,
        'Integers':power(16, Q, Y),
        X=Y,
        '~substs.RationaliseTermHeap.P6'(A, V, R, S, T, Z),
        'Integers':plus(X, R, A1),
        '~substs.RationaliseTermHeap.P6'(B, V, A1, S, Z, B1),
        'Integers':times(2, X, E1),
        'Integers':plus(E1, R, C1),
        '~substs.RationaliseTermHeap.P6'(C, V, C1, S, B1, D1),
        'Integers':times(3, X, H1),
        'Integers':plus(H1, R, F1),
        '~substs.RationaliseTermHeap.P6'(D, V, F1, S, D1, G1),
        'Integers':times(4, X, K1),
        'Integers':plus(K1, R, I1),
        '~substs.RationaliseTermHeap.P6'(E, V, I1, S, G1, J1),
        'Integers':times(5, X, N1),
        'Integers':plus(N1, R, L1),
        '~substs.RationaliseTermHeap.P6'(F, V, L1, S, J1, M1),
        'Integers':times(6, X, Q1),
        'Integers':plus(Q1, R, O1),
        '~substs.RationaliseTermHeap.P6'(G, V, O1, S, M1, P1),
        'Integers':times(7, X, T1),
        'Integers':plus(T1, R, R1),
        '~substs.RationaliseTermHeap.P6'(H, V, R1, S, P1, S1),
        'Integers':times(8, X, W1),
        'Integers':plus(W1, R, U1),
        '~substs.RationaliseTermHeap.P6'(I, V, U1, S, S1, V1),
        'Integers':times(9, X, Z1),
        'Integers':plus(Z1, R, X1),
        '~substs.RationaliseTermHeap.P6'(J, V, X1, S, V1, Y1),
        'Integers':times(10, X, C2),
        'Integers':plus(C2, R, A2),
        '~substs.RationaliseTermHeap.P6'(K, V, A2, S, Y1, B2),
        'Integers':times(11, X, F2),
        'Integers':plus(F2, R, D2),
        '~substs.RationaliseTermHeap.P6'(L, V, D2, S, B2, E2),
        'Integers':times(12, X, I2),
        'Integers':plus(I2, R, G2),
        '~substs.RationaliseTermHeap.P6'(M, V, G2, S, E2, H2),
        'Integers':times(13, X, L2),
        'Integers':plus(L2, R, J2),
        '~substs.RationaliseTermHeap.P6'(N, V, J2, S, H2, K2),
        'Integers':times(14, X, O2),
        'Integers':plus(O2, R, M2),
        '~substs.RationaliseTermHeap.P6'(O, V, M2, S, K2, N2),
        'Integers':times(15, X, Q2),
        'Integers':plus(Q2, R, P2),
        '~substs.RationaliseTermHeap.P6'(P, V, P2, S, N2, U).
'substs.RationaliseTermList.P3'([], [], _).
'~substs.RationaliseTermList.P3'([], [], _).
'substs.RationaliseTermList.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        'substs.ApplySubstToTerm.P4'(C, B, E, F),
        user:goedel_freeze(ground([C,B]), (user:not_equal([],[C,B],C,'MetaDefs.Occ.F1'(B)),true->D=['MetaDefs.!.F2'(B,F)|G];D=G)),
        'substs.RationaliseTermList.P3'(A, G, E).
'~substs.RationaliseTermList.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        '~substs.ApplySubstToTerm.P4'(C, B, E, F),
        user:goedel_freeze(ground([C,B]), (user:not_equal([],[C,B],C,'MetaDefs.Occ.F1'(B)),true->D=['MetaDefs.!.F2'(B,F)|G];D=G)),
        '~substs.RationaliseTermList.P3'(A, G, E).
'substs.SubstsComposeType.P3'(A, B, C) :-
        'substs.ComposeTypeSubsts1.P3'(A, A, D),
        'substs.ComposeTypeSubsts1.P3'(D, B, E),
        'substs.ComposeTypeSubsts1.P3'(B, B, F),
        'substs.ComposeTypeSubsts2.P3'(E, F, C).
'~substs.SubstsComposeType.P3'(A, B, C) :-
        '~substs.ComposeTypeSubsts1.P3'(A, A, D),
        '~substs.ComposeTypeSubsts1.P3'(D, B, E),
        '~substs.ComposeTypeSubsts1.P3'(B, B, F),
        '~substs.ComposeTypeSubsts2.P3'(E, F, C).
'substs.SubstApplyToType.P3'(A, B, C) :-
        'substs.DerefType.P3'(A, B, D),
        'substs.FullDerefType.P3'(D, B, C).
'~substs.SubstApplyToType.P3'(A, B, C) :-
        '~substs.DerefType.P3'(A, B, D),
        '~substs.FullDerefType.P3'(D, B, C).
'substs.RationaliseTypeList.P3'([], [], _).
'~substs.RationaliseTypeList.P3'([], [], _).
'substs.RationaliseTypeList.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        'substs.ApplySubstToType.P4'(C, B, E, F),
        user:goedel_freeze(ground([C,B]), (user:not_equal([],[C,B],C,'MetaDefs.Occ.F1'(B)),true->D=['MetaDefs.!.F2'(B,F)|G];D=G)),
        'substs.RationaliseTypeList.P3'(A, G, E).
'~substs.RationaliseTypeList.P3'(['MetaDefs.!.F2'(B,C)|A], D, E) :-
        '~substs.ApplySubstToType.P4'(C, B, E, F),
        user:goedel_freeze(ground([C,B]), (user:not_equal([],[C,B],C,'MetaDefs.Occ.F1'(B)),true->D=['MetaDefs.!.F2'(B,F)|G];D=G)),
        '~substs.RationaliseTypeList.P3'(A, G, E).
'substs.SubstApplyToTerm.P3'(A, B, C) :-
        'substs.Dereference.P3'(A, B, D),
        'substs.FullDereference.P3'(D, B, C).
'~substs.SubstApplyToTerm.P3'(A, B, C) :-
        '~substs.Dereference.P3'(A, B, D),
        '~substs.FullDereference.P3'(D, B, C).
'substs.SubstsComposeTerm.P3'(A, B, C) :-
        'substs.ComposeTermSubsts1.P3'(A, A, D),
        'substs.ComposeTermSubsts1.P3'(D, B, E),
        'substs.ComposeTermSubsts1.P3'(B, B, F),
        'substs.ComposeTermSubsts2.P3'(E, F, C).
'~substs.SubstsComposeTerm.P3'(A, B, C) :-
        '~substs.ComposeTermSubsts1.P3'(A, A, D),
        '~substs.ComposeTermSubsts1.P3'(D, B, E),
        '~substs.ComposeTermSubsts1.P3'(B, B, F),
        '~substs.ComposeTermSubsts2.P3'(E, F, C).
'substs.UnifyParameter.P5'('substs.Write.C0', A, A, B, B).
'~substs.UnifyParameter.P5'('substs.Write.C0', A, A, B, B).
'substs.UnifyParameter.P5'('substs.Read.C0', A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'Substs':'substs.BindParameter.P4'(B,A,C,D);D=C)).
'~substs.UnifyParameter.P5'('substs.Read.C0', A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'Substs':'~substs.BindParameter.P4'(B,A,C,D);D=C)).
'substs.UnifyConstant.P5'('substs.Write.C0', A, A, B, B).
'~substs.UnifyConstant.P5'('substs.Write.C0', A, A, B, B).
'substs.UnifyConstant.P5'('substs.Read.C0', A, B, C, D) :-
        'substs.Dereference.P3'(A, C, E),
        'substs.GetConstant1.P4'(E, B, C, D).
'~substs.UnifyConstant.P5'('substs.Read.C0', A, B, C, D) :-
        '~substs.Dereference.P3'(A, C, E),
        '~substs.GetConstant1.P4'(E, B, C, D).
'substs.UnifyBase.P5'('substs.Write.C0', A, A, B, B).
'~substs.UnifyBase.P5'('substs.Write.C0', A, A, B, B).
'substs.UnifyBase.P5'('substs.Read.C0', A, B, C, D) :-
        'substs.DerefType.P3'(A, C, E),
        'substs.GetBase1.P4'(E, B, C, D).
'~substs.UnifyBase.P5'('substs.Read.C0', A, B, C, D) :-
        '~substs.DerefType.P3'(A, C, E),
        '~substs.GetBase1.P4'(E, B, C, D).
'substs.UnifyKnownVariable.P5'('substs.Write.C0', A, A, B, B).
'~substs.UnifyKnownVariable.P5'('substs.Write.C0', A, A, B, B).
'substs.UnifyKnownVariable.P5'('substs.Read.C0', A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'Substs':'substs.BindVariable.P4'(B,A,C,D);D=C)).
'~substs.UnifyKnownVariable.P5'('substs.Read.C0', A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), (user:not_equal([],[A,B],A,B),true->'Substs':'~substs.BindVariable.P4'(B,A,C,D);D=C)).
'substs.UnifyFunction.P6'('substs.Write.C0', A, A, 'substs.Write.C0', B, B).
'~substs.UnifyFunction.P6'('substs.Write.C0', A, A, 'substs.Write.C0', B, B).
'substs.UnifyFunction.P6'('substs.Read.C0', A, B, C, D, E) :-
        'substs.Dereference.P3'(A, D, F),
        'substs.GetFunction1.P5'(F, B, C, D, E).
'~substs.UnifyFunction.P6'('substs.Read.C0', A, B, C, D, E) :-
        '~substs.Dereference.P3'(A, D, F),
        '~substs.GetFunction1.P5'(F, B, C, D, E).
'substs.UnifyVariable.P4'('substs.Write.C0', 'MetaDefs.Var.F1'(A), A, B) :-
        'Integers':plus(A, 1, B),
        true.
'~substs.UnifyVariable.P4'('substs.Write.C0', 'MetaDefs.Var.F1'(A), A, B) :-
        'Integers':plus(A, 1, B),
        true.
'substs.UnifyVariable.P4'('substs.Read.C0', _, A, A).
'~substs.UnifyVariable.P4'('substs.Read.C0', _, A, A).
'substs.UnifyType.P6'('substs.Write.C0', A, A, 'substs.Write.C0', B, B).
'~substs.UnifyType.P6'('substs.Write.C0', A, A, 'substs.Write.C0', B, B).
'substs.UnifyType.P6'('substs.Read.C0', A, B, C, D, E) :-
        'substs.DerefType.P3'(A, D, F),
        'substs.GetType1.P5'(F, B, C, D, E).
'~substs.UnifyType.P6'('substs.Read.C0', A, B, C, D, E) :-
        '~substs.DerefType.P3'(A, D, F),
        '~substs.GetType1.P5'(F, B, C, D, E).
'substs.VariableInSubst.P3'('substs.TermSubst.F2'(_,A), B, C) :-
        'Lists':'Lists.Member.P2'('MetaDefs.!.F2'(B,C), A).
'~substs.VariableInSubst.P3'('substs.TermSubst.F2'(_,A), B, C) :-
        'Lists':'~Lists.Member.P2'('MetaDefs.!.F2'(B,C), A).
'substs.VariableInSubst.P3'('substs.TermSubst.F2'(A,_), 'MetaDefs.Var.F1'(B), C) :-
        'substs.BindingInHeap.P3'(A, B, D),
        'substs.HeapTerm.P2'(D, C).
'~substs.VariableInSubst.P3'('substs.TermSubst.F2'(A,_), 'MetaDefs.Var.F1'(B), C) :-
        '~substs.BindingInHeap.P3'(A, B, D),
        '~substs.HeapTerm.P2'(D, C).
%	---------------------------------------------------
%	---------------------------------------------------
%	Fast Prolog code for Substs bindings.
%	---------------------------------------------------
%	---------------------------------------------------


'substs.AddBinding.P4'(Index,Term,'substs.Heap.F2'(Exp,Heap)
				,'substs.Heap.F2'(Exp1,Heap1)) :-
	Exp2 is Exp+1,
	power16(Exp2,Pow),
	( Index < Pow ->
		Exp1 = Exp,
		'substs.AddBinding1.P5'(Heap,Index,Exp,Term,Heap1)
	;	newbinding(Index,Exp2,Exp1,Term,Heap,Heap1)).

'~substs.AddBinding.P4'(A, B, C, D) :-
	'substs.AddBinding.P4'(A, B, C, D).


newbinding(Index,Exp,Exp1,Term,Heap,Heap1) :-
	Exp2 is Exp+1,
	power16(Exp2,Pow),
	( Index < Pow ->
		'substs.AddBinding1.P5'('substs.H.F16'(Heap,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0'),Index,Exp,Term,Heap1),
		Exp1 = Exp
	;	newbinding(Index,Exp2,Exp1,Term,'substs.H.F16'(Heap,'substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0','substs.N.C0'),Heap1)).


'substs.AddBinding1.P5'('substs.H.F16'(H0,H1,H2,H3,H4,H5,H6,H7,H8,H9,HA,HB,HC,HD,HE,HF),Index,Exp,Term,Heap1) :-
	power16(Exp,Pow),
	Div is Index // Pow,
	Mod is Index mod Pow,
	Exp1 is Exp-1,
	'substs.AddBinding2.P21'(Div,Mod,Exp1,Term,H0,H1,H2,H3,H4,H5,H6,H7,H8,H9,HA,HB,HC,HD,HE,HF,Heap1).

'substs.AddBinding1.P5'('substs.N.C0',Index,Exp,Term,Heap1) :-
	'substs.AddNewBinding1.P4'(Index,Exp,Term,Heap1).

'substs.AddBinding1.P5'('substs.R.F1'(_),_,_,Term,Term).
	       
'substs.AddBinding1.P5'('substs.V.F1'(_),_,_,Term,Term).
	       
'substs.AddBinding1.P5'('substs.T.F1'(_),_,_,Term,Term).
	       
'~substs.AddBinding1.P5'(Heap,Index,Exp,Term,Heap1) :-
	'substs.AddBinding1.P5'(Heap,Index,Exp,Term,Heap1).


'substs.AddNewBinding1.P4'(Index,Exp,Term,Heap) :-
	( Exp =  -1 ->
		Heap = Term
	;	power16(Exp,Pow),
		Div is Index // Pow,
		Mod is Index mod Pow,
		Exp1 is Exp-1,
		'substs.AddNewBinding.P5'(Div,Mod,Exp1,Term,Heap)).

'~substs.AddNewBinding1.P4'(A, B, C, D) :-
	'substs.AddNewBinding1.P4'(A, B, C, D).


'substs.Contents.P4'(Index,Exp,Heap,Value) :-
	Index1 is Index+1,
	Exp1 is Exp+1,
	power16(Exp1,Pow),
	( Index1 > Pow ->
		Value = 'substs.N.C0'
	;	contents(Heap,Index,Exp,Value)).

'~substs.Contents.P4'(Index,Exp,Heap,Value) :-
	'substs.Contents.P4'(Index,Exp,Heap,Value).


contents(Heap,Indx,Exp,Val):-
	( Heap = 'substs.N.C0' ->
		Val = 'substs.N.C0'
	;	( Exp = 0 ->
			Indx1 is Indx+1,
			arg(Indx1,Heap,Val)
		;	power16(Exp,Pow),
			Div is Indx // Pow,
			Div1 is Div+1,
			arg(Div1,Heap,V1),
			Mod is Indx mod Pow,
			Exp1 is Exp-1,
			contents(V1,Mod,Exp1,Val))).
	

'substs.Address.P5'(Heap, Exp, A, A1, Term) :-
  (  Heap = 'substs.N.C0' ->
       fail
  ;    ( Heap = 'substs.V.F1'(_) ->
            A = A1,
            Term = Heap
       ;    ( Heap = 'substs.R.F1'(_) ->
                 A = A1,
                 Term = Heap
            ;    ( Heap = 'substs.T.F1'(_) ->
                     A = A1,
                     Term = Heap
                 ;   power16(Exp,Pow),
                     Exp1 is Exp-1,
                     member3(Arg,1,[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),
                     Arg1 is Arg-1,
                     A2 is A + (Pow * Arg1),
                     arg(Arg,Heap,Heap1),
                     'substs.Address.P5'(Heap1,Exp1,A2,A1,Term) )))).

'~substs.Address.P5'(Heap, Exp, A, A1, Term) :-
	'substs.Address.P5'(Heap, Exp, A, A1, Term).

power16(0,1).
power16(1,16).
power16(2,256).
power16(3,4096).
power16(4,65536).
%power16(5,1048576).
%power10(6,16777216).
%power10(7,268435456).
%power10(8,4294967296).

member3(X,X,_).

member3(X,_,[Y|L]) :-
	member3(X,Y,L).

%------------------------------------------------------------------------------
% Predicates required by Syntax (moved here from Syntax.sup)
%------------------------------------------------------------------------------
 
% Avoid unnecessary choicepoints

'substs.SBindingInTypeSubst.P3'(Subst, Var, Type) :-
        ( var(Var) ->
                'Substs':'substs.ParameterInSubst.P3'(Subst, Var, Type1),
                'Substs':'substs.SubstApplyToType.P3'(Type1, Subst, Type)
                ; 'Substs':'substs.SubstApplyToType.P3'(Var, Subst, Type),
		  Type \== Var
        ).

'~substs.SBindingInTypeSubst.P3'(Subst, Param, Type) :-
   'substs.BindingInTypeSubst.P3'(Subst, Param, Type).


'substs.SBindingInTermSubst.P3'(Subst, Var, Term) :-
        ( var(Var) ->
                'Substs':'substs.VariableInSubst.P3'(Subst, Var, Term1),
                'Substs':'substs.SubstApplyToTerm.P3'(Term1, Subst, Term)
                ; 'Substs':'substs.SubstApplyToTerm.P3'(Var, Subst, Term),
		  Term \== Var
        ).

'~substs.SBindingInTermSubst.P3'(Subst, Param, Term) :-
   'substs.SBindingInTermSubst.P3'(Subst, Param, Term).


'substs.SDelBindingInTypeSubst.P4'(Subst, Var, Type, NewSubst) :-
   ( var(Var) ->
	'Substs':'substs.ParameterInSubst.P3'(Subst, Var, _),
	'Substs':'substs.DelTypeBinding.P4'(Var, Type, Subst, NewSubst)
     ;  'Substs':'substs.DelTypeBinding.P4'(Var, Type, Subst, NewSubst)
   ).

'~substs.SDelBindingInTypeSubst.P4'(Subst, Var, Type, NewSubst) :-
   'substs.SDelBindingInTypeSubst.P4'(Subst, Var, Type, NewSubst).


'substs.SDelBindingInTermSubst.P4'(Subst, Var, Term, NewSubst) :-
   ( var(Var) ->
	'Substs':'substs.VariableInSubst.P3'(Subst, Var, _),
	'Substs':'substs.DelTermBinding.P4'(Var, Term, Subst, NewSubst)
     ;  'Substs':'substs.DelTermBinding.P4'(Var, Term, Subst, NewSubst)
   ).

'~substs.SDelBindingInTermSubst.P4'(Subst, Var, Term, NewSubst) :-
   'substs.SDelBindingInTermSubst.P4'(Subst, Var, Term, NewSubst).

%% 260 lines cleaned djd
