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

:- 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
