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


:- discontiguous 'programs.declaredInOpenModule.p3.0'/3. %% added djd
:- discontiguous '~programs.declaredInOpenModule.p3.0'/3. %% added djd
:- discontiguous 'programs.compileObjectCode.p1'/1. %% added djd
:- discontiguous '~programs.compileObjectCode.p1'/1. %% added djd
:- discontiguous 'programs.cModulePart.p2.0'/2. %% added djd
:- discontiguous '~programs.cModulePart.p2.0'/2. %% added djd
:- discontiguous 'programs.composeAll.p3'/3. %% added djd
:- discontiguous '~programs.composeAll.p3'/3. %% added djd
:- discontiguous 'programs.conditionSatisfied.p2'/2. %% added djd
:- discontiguous '~programs.conditionSatisfied.p2'/2. %% added djd
:- discontiguous 'programs.constraintsToBindings.p4'/4. %% added djd
:- discontiguous '~programs.constraintsToBindings.p4'/4. %% added djd
:- discontiguous 'programs.constraintsToBindingsAll.p4'/4. %% added djd
:- discontiguous '~programs.constraintsToBindingsAll.p4'/4. %% added djd
:- discontiguous 'programs.declaredInClosedModule.p3.0'/3. %% added djd
:- discontiguous '~programs.declaredInClosedModule.p3.0'/3. %% added djd
:- discontiguous 'programs.delayInModule.p5.0'/5. %% added djd
:- discontiguous '~programs.delayInModule.p5.0'/5. %% added djd
:- discontiguous 'programs.definitionInProgram.p4.0'/4. %% added djd
:- discontiguous '~programs.definitionInProgram.p4.0'/4. %% added djd
:- discontiguous 'programs.delayInKind.p5'/5. %% added djd
:- discontiguous '~programs.delayInKind.p5'/5. %% added djd
:- discontiguous 'programs.delayInPart.p4'/4. %% added djd
:- discontiguous '~programs.delayInPart.p4'/4. %% added djd
:- discontiguous 'programs.deleteImportFromPart.p6'/6. %% added djd
:- discontiguous '~programs.deleteImportFromPart.p6'/6. %% added djd
:- discontiguous 'programs.deleteDelayFromPart.p6'/6. %% added djd
:- discontiguous '~programs.deleteDelayFromPart.p6'/6. %% added djd
:- discontiguous 'programs.deleteProgramImport.p5.0'/5. %% added djd
:- discontiguous '~programs.deleteProgramImport.p5.0'/5. %% added djd
:- discontiguous 'programs.deleteStatement.p4.0'/4. %% added djd
:- discontiguous '~programs.deleteStatement.p4.0'/4. %% added djd
:- discontiguous 'programs.groundCondition.p2'/2. %% added djd
:- discontiguous '~programs.groundCondition.p2'/2. %% added djd
:- discontiguous 'programs.formulaInProgram.p4.0'/4. %% added djd
:- discontiguous '~programs.formulaInProgram.p4.0'/4. %% added djd
:- discontiguous 'programs.importInModule.p4.0'/4. %% added djd
:- discontiguous '~programs.importInModule.p4.0'/4. %% added djd
:- discontiguous 'programs.hasIntensionalSet.p1'/1. %% added djd
:- discontiguous '~programs.hasIntensionalSet.p1'/1. %% added djd
:- discontiguous 'programs.importInPart.p5'/5. %% added djd
:- discontiguous '~programs.importInPart.p5'/5. %% added djd
:- discontiguous 'programs.insertProgramImport.p5.0'/5. %% added djd
:- discontiguous '~programs.insertProgramImport.p5.0'/5. %% added djd
:- discontiguous 'programs.instanceOfHead1.p4'/4. %% added djd
:- discontiguous '~programs.instanceOfHead1.p4'/4. %% added djd
:- discontiguous 'programs.instanceOfHead2.p4'/4. %% added djd
:- discontiguous '~programs.instanceOfHead2.p4'/4. %% added djd
:- discontiguous 'programs.modulePartLanguage.p4'/4. %% added djd
:- discontiguous '~programs.modulePartLanguage.p4'/4. %% added djd
:- discontiguous 'programs.moduleInProgram.p2.0'/2. %% added djd
:- discontiguous '~programs.moduleInProgram.p2.0'/2. %% added djd
:- discontiguous 'programs.nonVarCondition.p2'/2. %% added djd
:- discontiguous '~programs.nonVarCondition.p2'/2. %% added djd
:- discontiguous 'programs.predOrPropInLanguage.p3'/3. %% added djd
:- discontiguous '~programs.predOrPropInLanguage.p3'/3. %% added djd
:- discontiguous 'programs.openStatementPredicate.p2.1'/2. %% added djd
:- discontiguous '~programs.openStatementPredicate.p2.1'/2. %% added djd
:- discontiguous 'programs.openStatementPredicate.p2.0'/2. %% added djd
:- discontiguous '~programs.openStatementPredicate.p2.0'/2. %% added djd
:- discontiguous 'programs.partAccessibility.p2'/2. %% added djd
:- discontiguous '~programs.partAccessibility.p2'/2. %% added djd
:- discontiguous 'programs.rightHandType.p4'/4. %% added djd
:- discontiguous '~programs.rightHandType.p4'/4. %% added djd
:- discontiguous 'programs.statementMatchAtom.p4.0'/4. %% added djd
:- discontiguous '~programs.statementMatchAtom.p4.0'/4. %% added djd
:- discontiguous 'programs.termInProgram.p5.0'/5. %% added djd
:- discontiguous '~programs.termInProgram.p5.0'/5. %% added djd
:- discontiguous 'programs.symbolInFormula.p2'/2. %% added djd
:- discontiguous '~programs.symbolInFormula.p2'/2. %% added djd
:- discontiguous 'programs.symbolInTerm.p2'/2. %% added djd
:- discontiguous '~programs.symbolInTerm.p2'/2. %% added djd
:- discontiguous 'programs.topLevelName.p2.0'/2. %% added djd
:- discontiguous '~programs.topLevelName.p2.0'/2. %% added djd
:- discontiguous 'programs.typeSymbolInType.p2'/2. %% added djd
:- discontiguous '~programs.typeSymbolInType.p2'/2. %% added djd
:- discontiguous 'programs.typeInProgram.p2.0'/2. %% added djd
:- discontiguous '~programs.typeInProgram.p2.0'/2. %% added djd
:- discontiguous 'programs.typeSymbolInDeclaration.p2'/2. %% added djd
:- discontiguous '~programs.typeSymbolInDeclaration.p2'/2. %% added djd
:- discontiguous 'programs.validDeclaration.p4'/4. %% added djd
:- discontiguous '~programs.validDeclaration.p4'/4. %% added djd

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

'programs.mainModuleInProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.mainModuleInProgram.p2.0'(A,B)).
'~programs.mainModuleInProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.mainModuleInProgram.p2.0'(A,B)).
'programs.mainModuleInProgram.p2.0'(A, B) :-
        'programCache':'programCache.unCacheProgram.p2'(A, C),
        'sharedPrograms':'sharedPrograms.sMainModuleInProgram.p2'(C, B).
'~programs.mainModuleInProgram.p2.0'(A, B) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, C),
        'sharedPrograms':'~sharedPrograms.sMainModuleInProgram.p2'(C, B).
'programs.formulaInModule.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'programs.formulaInModule.p6.0'(A,B,C,D,E,F)).
'~programs.formulaInModule.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'~programs.formulaInModule.p6.0'(A,B,C,D,E,F)).
'programs.formulaInModule.p6.0'(A, B, C, D, E, F) :-
        'programCache':'programCache.unCacheProgram.p2'(A, G),
        'programs.cModulePart.p2'(C, H),
        'programs.modulePartLanguage.p4'(H, B, G, I),
        'sharedPrograms':'sharedPrograms.formulaInLanguage.p4'(E, I, D, F).
'~programs.formulaInModule.p6.0'(A, B, C, D, E, F) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, G),
        '~programs.cModulePart.p2'(C, H),
        '~programs.modulePartLanguage.p4'(H, B, G, I),
        'sharedPrograms':'~sharedPrograms.formulaInLanguage.p4'(E, I, D, F).
'programs.declaredInOpenModule.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,C]), 'programs':'programs.declaredInOpenModule.p3.0'(A,B,C)).
'~programs.declaredInOpenModule.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,C]), 'programs':'~programs.declaredInOpenModule.p3.0'(A,B,C)).
'programs.declaredInOpenModule.p3.0'('progDefs.cachedProgram.f1'(A), B, C) :-
        'programCache':'programCache.getCachedProgram.p2'(A, D),
        'programs.declaredInOpenModule.p3'(D, B, C).
'~programs.declaredInOpenModule.p3.0'('progDefs.cachedProgram.f1'(A), B, C) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, D),
        '~programs.declaredInOpenModule.p3'(D, B, C).
'programs.declaredInOpenModule.p3.0'('progDefs.program.f4'(_,A,B,_), C, D) :-
        'syntax':'syntax.atom.p1'(D),
        'syntax':'syntax.emptyVarTyping.p1'(E),
        'sharedPrograms':'sharedPrograms.formulaInLanguage.p4'(D, B, E, _),
        'programs.topLevelName.p2'(D, 'metaDefs.name.f4'(C,_,_,_)),
        'sharedPrograms':'sharedPrograms.openModuleAux.p2'(A, C).
'~programs.declaredInOpenModule.p3.0'('progDefs.program.f4'(_,A,B,_), C, D) :-
        'syntax':'~syntax.atom.p1'(D),
        'syntax':'~syntax.emptyVarTyping.p1'(E),
        'sharedPrograms':'~sharedPrograms.formulaInLanguage.p4'(D, B, E, _),
        '~programs.topLevelName.p2'(D, 'metaDefs.name.f4'(C,_,_,_)),
        'sharedPrograms':'~sharedPrograms.openModuleAux.p2'(A, C).
'programs.compute.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,E]), 'programs':'programs.compute.p7.0'(A,B,C,D,E,F,G)).
'~programs.compute.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,E]), 'programs':'~programs.compute.p7.0'(A,B,C,D,E,F,G)).
'programs.compute.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'programCache.unCacheProgram.p2'(A, H),
        'sharedPrograms':'sharedPrograms.programLanguage.p2'(H, I),
        'syntax':'syntax.applySubstToFormula.p3'(B, E, J),
        'sharedPrograms':'sharedPrograms.meltedBodyTyping.p8'(J, I, [], _, _, [], [], []),
        'programs.compileObjectProgram.p1'(H),
        'programs.runGoal.p6'(J, C, E, K, D, L),
        'programs.constraintsToBindings.p4'(L, G, K, F).
'~programs.compute.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, H),
        'sharedPrograms':'~sharedPrograms.programLanguage.p2'(H, I),
        'syntax':'~syntax.applySubstToFormula.p3'(B, E, J),
        'sharedPrograms':'~sharedPrograms.meltedBodyTyping.p8'(J, I, [], _, _, [], [], []),
        '~programs.compileObjectProgram.p1'(H),
        '~programs.runGoal.p6'(J, C, E, K, D, L),
        '~programs.constraintsToBindings.p4'(L, G, K, F).
'programs.baseInModule.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.baseInModule.p5.0'(A,B,C,D,E)).
'~programs.baseInModule.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.baseInModule.p5.0'(A,B,C,D,E)).
'programs.baseInModule.p5.0'(A, B, C, D, E) :-
        'programCache':'programCache.unCacheProgram.p2'(A, F),
        'programs.cModulePart.p2'(C, G),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(F, B, G),
        'programs.modulePartLanguage.p4'(G, B, F, H),
        'sharedPrograms':'sharedPrograms.baseInLanguage.p2'(D, H),
        D='metaDefs.name.f4'(E,_,_,_).
'~programs.baseInModule.p5.0'(A, B, C, D, E) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, F),
        '~programs.cModulePart.p2'(C, G),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(F, B, G),
        '~programs.modulePartLanguage.p4'(G, B, F, H),
        'sharedPrograms':'~sharedPrograms.baseInLanguage.p2'(D, H),
        D='metaDefs.name.f4'(E,_,_,_).
'programs.andCondition.p3'(A, B, 'progDefs.and.f2'(A,B)).
'~programs.andCondition.p3'(A, B, 'progDefs.and.f2'(A,B)).
'programs.applicableDelay.p5'([A|B], [C|D], E, F, G) :-
        'syntax':'syntax.emptyTermSubst.p1'(H),
        user:goedel_freeze(ground([E,H,A]), ('syntax':'~syntax.unifyAtoms.p4'(A,E,H,_),true->F=A,G=C;'programs':'programs.applicableDelay.p5'(B,D,E,F,G))).
'~programs.applicableDelay.p5'([A|B], [C|D], E, F, G) :-
        'syntax':'~syntax.emptyTermSubst.p1'(H),
        user:goedel_freeze(ground([E,H,A]), ('syntax':'~syntax.unifyAtoms.p4'(A,E,H,_),true->F=A,G=C;'programs':'~programs.applicableDelay.p5'(B,D,E,F,G))).
'programs.compileObjectCode.p1'('avlTrees.empty.c0').
'~programs.compileObjectCode.p1'('avlTrees.empty.c0').
'programs.compileObjectCode.p1'('avlTrees.tree.f4'(A,B,'progDefs.code.f2'(C,D),E)) :-
        user:goedel_freeze(ground([B]), ('sharedPrograms':'~sharedPrograms.systemModule.p1'(B),true->'programs':'programs.ensureLoaded.p1'(B);'programs':'programs.ensureCompiled.p3'(B,C,D))),
        'programs.compileObjectCode.p1'(A),
        'programs.compileObjectCode.p1'(E).
'~programs.compileObjectCode.p1'('avlTrees.tree.f4'(A,B,'progDefs.code.f2'(C,D),E)) :-
        user:goedel_freeze(ground([B]), ('sharedPrograms':'~sharedPrograms.systemModule.p1'(B),true->'programs':'~programs.ensureLoaded.p1'(B);'programs':'~programs.ensureCompiled.p3'(B,C,D))),
        '~programs.compileObjectCode.p1'(A),
        '~programs.compileObjectCode.p1'(E).
'programs.cModulePart.p2'(A, B) :-
        user:goedel_freeze(nonvar(A)or nonvar(B), 'programs':'programs.cModulePart.p2.0'(A,B)).
'~programs.cModulePart.p2'(A, B) :-
        user:goedel_freeze(nonvar(A)or nonvar(B), 'programs':'~programs.cModulePart.p2.0'(A,B)).
'programs.cModulePart.p2.0'('programs.export.c0', 'progDefs.export.c0') :- !.
'~programs.cModulePart.p2.0'('programs.export.c0', 'progDefs.export.c0').
'programs.cModulePart.p2.0'('programs.local.c0', 'progDefs.local.c0') :- !.
'~programs.cModulePart.p2.0'('programs.local.c0', 'progDefs.local.c0').
'programs.cModulePart.p2.0'('programs.module.c0', 'progDefs.module.c0') :- !.
'~programs.cModulePart.p2.0'('programs.module.c0', 'progDefs.module.c0').
'programs.cModulePart.p2.0'('programs.closed.c0', 'progDefs.closed.c0') :- !.
'~programs.cModulePart.p2.0'('programs.closed.c0', 'progDefs.closed.c0').
'programs.compileObjectProgram.p1'('progDefs.program.f4'(_,_,_,A)) :-
        'avlTrees':'avlTrees.avlToBinary.p2'(A, B),
        'programs.compileObjectCode.p1'(B).
'~programs.compileObjectProgram.p1'('progDefs.program.f4'(_,_,_,A)) :-
        'avlTrees':'~avlTrees.avlToBinary.p2'(A, B),
        '~programs.compileObjectCode.p1'(B).
'programs.composeAll.p3'([], [], []).
'~programs.composeAll.p3'([], [], []).
'programs.composeAll.p3'([A|B], [C|D], [E|F]) :-
        'syntax':'syntax.composeTermSubsts.p3'(A, C, E),
        'programs.composeAll.p3'(B, D, F).
'~programs.composeAll.p3'([A|B], [C|D], [E|F]) :-
        'syntax':'~syntax.composeTermSubsts.p3'(A, C, E),
        '~programs.composeAll.p3'(B, D, F).
'programs.constructorInModule.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.constructorInModule.p6.0'(A,B,C,D,E,F)).
'~programs.constructorInModule.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.constructorInModule.p6.0'(A,B,C,D,E,F)).
'programs.constructorInModule.p6.0'(A, B, C, D, E, F) :-
        'programCache':'programCache.unCacheProgram.p2'(A, G),
        'programs.cModulePart.p2'(C, H),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(G, B, H),
        'programs.modulePartLanguage.p4'(H, B, G, I),
        'sharedPrograms':'sharedPrograms.constructorInLanguage.p3'(D, I, E),
        D='metaDefs.name.f4'(F,_,_,_).
'~programs.constructorInModule.p6.0'(A, B, C, D, E, F) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, G),
        '~programs.cModulePart.p2'(C, H),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(G, B, H),
        '~programs.modulePartLanguage.p4'(H, B, G, I),
        'sharedPrograms':'~sharedPrograms.constructorInLanguage.p3'(D, I, E),
        D='metaDefs.name.f4'(F,_,_,_).
'programs.conditionToString.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.conditionToString.p2.0'(A,B)).
'~programs.conditionToString.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.conditionToString.p2.0'(A,B)).
'programs.conditionToString.p2.0'(A, B) :-
        'sharedPrograms':'sharedPrograms.sConditionToString.p2'(A, B).
'~programs.conditionToString.p2.0'(A, B) :-
        'sharedPrograms':'~sharedPrograms.sConditionToString.p2'(A, B).
'programs.computeAll.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,E]), 'programs':'programs.computeAll.p7.0'(A,B,C,D,E,F,G)).
'~programs.computeAll.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,E]), 'programs':'~programs.computeAll.p7.0'(A,B,C,D,E,F,G)).
'programs.computeAll.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'programCache.unCacheProgram.p2'(A, H),
        'sharedPrograms':'sharedPrograms.programLanguage.p2'(H, I),
        'syntax':'syntax.applySubstToFormula.p3'(B, E, J),
        'sharedPrograms':'sharedPrograms.meltedBodyTyping.p8'(J, I, [], _, _, [], [], []),
        'programs.compileObjectProgram.p1'(H),
        'programs.runAllGoal.p6'(J, C, E, K, D, L),
        'programs.constraintsToBindingsAll.p4'(L, G, K, F).
'~programs.computeAll.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, H),
        'sharedPrograms':'~sharedPrograms.programLanguage.p2'(H, I),
        'syntax':'~syntax.applySubstToFormula.p3'(B, E, J),
        'sharedPrograms':'~sharedPrograms.meltedBodyTyping.p8'(J, I, [], _, _, [], [], []),
        '~programs.compileObjectProgram.p1'(H),
        '~programs.runAllGoal.p6'(J, C, E, K, D, L),
        '~programs.constraintsToBindingsAll.p4'(L, G, K, F).
'programs.conditionSatisfied.p2'('progDefs.nonvar.f1'(A), B) :-
        'syntax':'syntax.bindingInTermSubst.p3'(B, A, C),
        'syntax':'syntax.nonVariable.p1'(C).
'~programs.conditionSatisfied.p2'('progDefs.nonvar.f1'(A), B) :-
        'syntax':'~syntax.bindingInTermSubst.p3'(B, A, C),
        'syntax':'~syntax.nonVariable.p1'(C).
'programs.conditionSatisfied.p2'('progDefs.and.f2'(A,B), C) :-
        'programs.conditionSatisfied.p2'(A, C),
        'programs.conditionSatisfied.p2'(B, C).
'~programs.conditionSatisfied.p2'('progDefs.and.f2'(A,B), C) :-
        '~programs.conditionSatisfied.p2'(A, C),
        '~programs.conditionSatisfied.p2'(B, C).
'programs.conditionSatisfied.p2'('progDefs.ground.f1'(A), B) :-
        'syntax':'syntax.bindingInTermSubst.p3'(B, A, C),
        'syntax':'syntax.groundTerm.p1'(C).
'~programs.conditionSatisfied.p2'('progDefs.ground.f1'(A), B) :-
        'syntax':'~syntax.bindingInTermSubst.p3'(B, A, C),
        'syntax':'~syntax.groundTerm.p1'(C).
'programs.conditionSatisfied.p2'('progDefs.trueCond.c0', _).
'~programs.conditionSatisfied.p2'('progDefs.trueCond.c0', _).
'programs.conditionSatisfied.p2'('progDefs.or.f2'(A,B), C) :-
        user:one_solution(('programs':'programs.conditionSatisfied.p2'(A,C);'programs':'programs.conditionSatisfied.p2'(B,C))).
'~programs.conditionSatisfied.p2'('progDefs.or.f2'(A,B), C) :-
        (   '~programs.conditionSatisfied.p2'(A, C)
        ;   '~programs.conditionSatisfied.p2'(B, C)
        ).
'programs.constraintsToBindings.p4'('metaDefs.empty.c0', 'metaDefs.empty.c0', A, A).
'~programs.constraintsToBindings.p4'('metaDefs.empty.c0', 'metaDefs.empty.c0', A, A).
'programs.constraintsToBindings.p4'('metaDefs.&''.f2'(A,B), C, D, E) :-
        'programs.constraintsToBindings.p4'(A, F, D, G),
        'programs.constraintsToBindings.p4'(B, H, G, E),
        'syntax':'syntax.andWithEmpty.p3'(F, H, C).
'~programs.constraintsToBindings.p4'('metaDefs.&''.f2'(A,B), C, D, E) :-
        '~programs.constraintsToBindings.p4'(A, F, D, G),
        '~programs.constraintsToBindings.p4'(B, H, G, E),
        'syntax':'~syntax.andWithEmpty.p3'(F, H, C).
'programs.constraintsToBindings.p4'('metaDefs.atom.f2'(A,B), C, D, E) :-
        user:one_solution(user:goedel_freeze(ground([B,A]),if(((A='metaDefs.name.f4'('"','"=',_,2),B=[F,G],'syntax':'~syntax.variable.p1'(F)),true),('substs':'substs.bindVariable.p4'(F,G,D,E),C='metaDefs.empty.c0'),(E=D,C='metaDefs.atom.f2'(A,B))))).
'~programs.constraintsToBindings.p4'('metaDefs.atom.f2'(A,B), C, D, E) :-
        user:goedel_freeze(ground([B,A]), if(((A='metaDefs.name.f4'('"','"=',_,2),B=[F,G],'syntax':'~syntax.variable.p1'(F)),true),('substs':'~substs.bindVariable.p4'(F,G,D,E),C='metaDefs.empty.c0'),(E=D,C='metaDefs.atom.f2'(A,B)))).
'programs.constantInModule.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.constantInModule.p6.0'(A,B,C,D,E,F)).
'~programs.constantInModule.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.constantInModule.p6.0'(A,B,C,D,E,F)).
'programs.constantInModule.p6.0'(A, B, C, D, E, F) :-
        'programCache':'programCache.unCacheProgram.p2'(A, G),
        'programs.cModulePart.p2'(C, H),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(G, B, H),
        'programs.modulePartLanguage.p4'(H, B, G, I),
        'sharedPrograms':'sharedPrograms.constantInLanguage.p3'(D, I, E),
        D='metaDefs.name.f4'(F,_,_,_).
'~programs.constantInModule.p6.0'(A, B, C, D, E, F) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, G),
        '~programs.cModulePart.p2'(C, H),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(G, B, H),
        '~programs.modulePartLanguage.p4'(H, B, G, I),
        'sharedPrograms':'~sharedPrograms.constantInLanguage.p3'(D, I, E),
        D='metaDefs.name.f4'(F,_,_,_).
'programs.constraintsToBindingsAll.p4'([], [], [], []).
'~programs.constraintsToBindingsAll.p4'([], [], [], []).
'programs.constraintsToBindingsAll.p4'([A|B], [C|D], [E|F], [G|H]) :-
        'programs.constraintsToBindings.p4'(A, C, E, G),
        'programs.constraintsToBindingsAll.p4'(B, D, F, H).
'~programs.constraintsToBindingsAll.p4'([A|B], [C|D], [E|F], [G|H]) :-
        '~programs.constraintsToBindings.p4'(A, C, E, G),
        '~programs.constraintsToBindingsAll.p4'(B, D, F, H).
'programs.controlInProgram.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.controlInProgram.p5.0'(A,B,C,D,E)).
'~programs.controlInProgram.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.controlInProgram.p5.0'(A,B,C,D,E)).
'programs.controlInProgram.p5.0'(A, B, C, D, E) :-
        'programCache':'programCache.unCacheProgram.p2'(A, F),
        'sharedPrograms':'sharedPrograms.sControlInProgram.p5'(F, B, C, D, E).
'~programs.controlInProgram.p5.0'(A, B, C, D, E) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, F),
        'sharedPrograms':'~sharedPrograms.sControlInProgram.p5'(F, B, C, D, E).
'programs.declaredInClosedModule.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,C]), 'programs':'programs.declaredInClosedModule.p3.0'(A,B,C)).
'~programs.declaredInClosedModule.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,C]), 'programs':'~programs.declaredInClosedModule.p3.0'(A,B,C)).
'programs.declaredInClosedModule.p3.0'('progDefs.cachedProgram.f1'(A), B, C) :-
        'programCache':'programCache.getCachedProgram.p2'(A, D),
        'programs.declaredInClosedModule.p3'(D, B, C).
'~programs.declaredInClosedModule.p3.0'('progDefs.cachedProgram.f1'(A), B, C) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, D),
        '~programs.declaredInClosedModule.p3'(D, B, C).
'programs.declaredInClosedModule.p3.0'('progDefs.program.f4'(_,A,B,_), C, D) :-
        'syntax':'syntax.atom.p1'(D),
        'syntax':'syntax.emptyVarTyping.p1'(E),
        'sharedPrograms':'sharedPrograms.formulaInLanguage.p4'(D, B, E, _),
        'programs.topLevelName.p2'(D, 'metaDefs.name.f4'(C,_,_,_)),
        user:goedel_freeze(ground([C]), (user:not_equal([],[C],C,'"'),true->'avlTrees':'avlTrees.avlSearch.p3'(A,C,'progDefs.modDef.f4'('progDefs.closedKind.c0',_,_,_));true)).
'~programs.declaredInClosedModule.p3.0'('progDefs.program.f4'(_,A,B,_), C, D) :-
        'syntax':'~syntax.atom.p1'(D),
        'syntax':'~syntax.emptyVarTyping.p1'(E),
        'sharedPrograms':'~sharedPrograms.formulaInLanguage.p4'(D, B, E, _),
        '~programs.topLevelName.p2'(D, 'metaDefs.name.f4'(C,_,_,_)),
        user:goedel_freeze(ground([C]), (user:not_equal([],[C],C,'"'),true->'avlTrees':'~avlTrees.avlSearch.p3'(A,C,'progDefs.modDef.f4'('progDefs.closedKind.c0',_,_,_));true)).
'programs.deleteProgramConstant.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteProgramConstant.p6.0'(A,B,C,D,E,F)).
'~programs.deleteProgramConstant.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteProgramConstant.p6.0'(A,B,C,D,E,F)).
'programs.deleteProgramConstant.p6.0'(A, B, C, D, E, F) :-
        'programs.delDeclaration.p6'(F, B, C, D, 'progDefs.constantDecl.f1'(E), A).
'~programs.deleteProgramConstant.p6.0'(A, B, C, D, E, F) :-
        '~programs.delDeclaration.p6'(F, B, C, D, 'progDefs.constantDecl.f1'(E), A).
'programs.delayInModule.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.delayInModule.p5.0'(A,B,C,D,E)).
'~programs.delayInModule.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.delayInModule.p5.0'(A,B,C,D,E)).
'programs.delayInModule.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'programCache.getCachedProgram.p2'(A, F),
        'programs.delayInModule.p5'(F, B, C, D, E).
'~programs.delayInModule.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, F),
        '~programs.delayInModule.p5'(F, B, C, D, E).
'programs.delayInModule.p5.0'('progDefs.program.f4'(_,A,_,B), C, D, E, F) :-
        'programs.topLevelName.p2'(E, 'metaDefs.name.f4'(C,G,_,H)),
        'sharedPrograms':'sharedPrograms.avlFind.p3'(B, C, 'progDefs.code.f2'(_,I)),
        'sharedPrograms':'sharedPrograms.avlFind.p3'(I, G, J),
        'sharedPrograms':'sharedPrograms.findPredDef.p3'(H, J, 'progDefs.predDef.f4'(H,_,K,L)),
        'avlTrees':'avlTrees.avlSearch.p3'(A, C, 'progDefs.modDef.f4'(M,_,_,_)),
        'programs.delayInKind.p5'(M, D, K, L, 'progDefs.delay.f2'(E,F)).
'~programs.delayInModule.p5.0'('progDefs.program.f4'(_,A,_,B), C, D, E, F) :-
        '~programs.topLevelName.p2'(E, 'metaDefs.name.f4'(C,G,_,H)),
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(B, C, 'progDefs.code.f2'(_,I)),
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(I, G, J),
        'sharedPrograms':'~sharedPrograms.findPredDef.p3'(H, J, 'progDefs.predDef.f4'(H,_,K,L)),
        'avlTrees':'~avlTrees.avlSearch.p3'(A, C, 'progDefs.modDef.f4'(M,_,_,_)),
        '~programs.delayInKind.p5'(M, D, K, L, 'progDefs.delay.f2'(E,F)).
'programs.delTypeDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'programCache.unCacheProgram.p2'(F, G),
        'programs.cModulePart.p2'(C, H),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        'programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        'programs.deleteTypeSymbol.p5'(D, L, I, E, N),
        'programs.freeTypeSymbol.p4'(B, C, D, G),
        A='progDefs.program.f4'(J,K,N,M).
'~programs.delTypeDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'~programCache.unCacheProgram.p2'(F, G),
        '~programs.cModulePart.p2'(C, H),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        '~programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        '~programs.deleteTypeSymbol.p5'(D, L, I, E, N),
        '~programs.freeTypeSymbol.p4'(B, C, D, G),
        A='progDefs.program.f4'(J,K,N,M).
'programs.definitionInProgram.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.definitionInProgram.p4.0'(A,B,C,D)).
'~programs.definitionInProgram.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.definitionInProgram.p4.0'(A,B,C,D)).
'programs.definitionInProgram.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'programCache.getCachedProgram.p2'(A, E),
        'programs.definitionInProgram.p4'(E, B, C, D).
'~programs.definitionInProgram.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, E),
        '~programs.definitionInProgram.p4'(E, B, C, D).
'programs.definitionInProgram.p4.0'('progDefs.program.f4'(_,A,B,C), D, E, F) :-
        E='metaDefs.name.f4'(D,G,H,I),
        'sharedPrograms':'sharedPrograms.openModuleAux.p2'(A, D),
        'programs.predOrPropInLanguage.p3'(H, E, B),
        'avlTrees':'avlTrees.avlSearch.p3'(C, D, 'progDefs.code.f2'(_,J)),
        user:goedel_freeze(ground([I,J,G]), if((('avlTrees':'~avlTrees.avlSearch.p3'(J,G,K),'sharedPrograms':'~sharedPrograms.findPredDef.p3'(I,K,'progDefs.predDef.f4'(I,L,_,_))),true),F=L,F=[])).
'~programs.definitionInProgram.p4.0'('progDefs.program.f4'(_,A,B,C), D, E, F) :-
        E='metaDefs.name.f4'(D,G,H,I),
        'sharedPrograms':'~sharedPrograms.openModuleAux.p2'(A, D),
        '~programs.predOrPropInLanguage.p3'(H, E, B),
        'avlTrees':'~avlTrees.avlSearch.p3'(C, D, 'progDefs.code.f2'(_,J)),
        user:goedel_freeze(ground([I,J,G]), if((('avlTrees':'~avlTrees.avlSearch.p3'(J,G,K),'sharedPrograms':'~sharedPrograms.findPredDef.p3'(I,K,'progDefs.predDef.f4'(I,L,_,_))),true),F=L,F=[])).
'programs.delDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'programCache.unCacheProgram.p2'(F, G),
        'programs.cModulePart.p2'(C, H),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        'programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        'programs.deleteSymbol.p5'(D, L, I, E, N),
        'programs.freeSymbol.p4'(B, C, D, G),
        A='progDefs.program.f4'(J,K,N,M).
'~programs.delDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'~programCache.unCacheProgram.p2'(F, G),
        '~programs.cModulePart.p2'(C, H),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        '~programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        '~programs.deleteSymbol.p5'(D, L, I, E, N),
        '~programs.freeSymbol.p4'(B, C, D, G),
        A='progDefs.program.f4'(J,K,N,M).
'programs.delayInKind.p5'('progDefs.normalKind.c0', A, B, C, D) :-
        'programs.delayInPart.p4'(A, B, C, D).
'~programs.delayInKind.p5'('progDefs.normalKind.c0', A, B, C, D) :-
        '~programs.delayInPart.p4'(A, B, C, D).
'programs.delayInKind.p5'('progDefs.closedKind.c0', 'programs.closed.c0', A, _, B) :-
        'lists':'lists.member.p2'(B, A).
'~programs.delayInKind.p5'('progDefs.closedKind.c0', 'programs.closed.c0', A, _, B) :-
        'lists':'~lists.member.p2'(B, A).
'programs.delayInKind.p5'('progDefs.moduleKind.c0', 'programs.module.c0', _, A, B) :-
        'lists':'lists.member.p2'(B, A).
'~programs.delayInKind.p5'('progDefs.moduleKind.c0', 'programs.module.c0', _, A, B) :-
        'lists':'~lists.member.p2'(B, A).
'programs.deleteDelay.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteDelay.p6.0'(A,B,C,D,E,F)).
'~programs.deleteDelay.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteDelay.p6.0'(A,B,C,D,E,F)).
'programs.deleteDelay.p6.0'(A, B, C, D, E, 'progDefs.program.f4'(F,G,H,I)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, J),
        'programs.cModulePart.p2'(C, K),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(J, B, K),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        'sharedPrograms':'sharedPrograms.nextModuleVersion.p2'(B, L),
        J='progDefs.program.f4'(F,G,H,M),
        'avlTrees':'avlTrees.avlUpdate.p5'(M, B, 'progDefs.code.f2'(L,N), I, 'progDefs.code.f2'(_,O)),
        D='metaDefs.atom.f2'('metaDefs.name.f4'(B,P,'metaDefs.predicate.c0',Q),_),
        'sharedPrograms':'sharedPrograms.avlFind.p3'(O, P, R),
        'sharedPrograms':'sharedPrograms.pickPredDef.p4'(Q, R, 'progDefs.predDef.f4'(Q,S,T,U), V),
        'programs.deleteDelayFromPart.p6'(C, 'progDefs.delay.f2'(D,E), T, U, W, X),
        user:goedel_freeze(ground([W,X,S]), ((S=[],W=[],X=[]),true->Y=V;Y=['progDefs.predDef.f4'(Q,S,W,X)|V])),
        user:goedel_freeze(ground([Y]), (Y=[],true->'avlTrees':'avlTrees.avlDelete.p3'(O,P,N);'avlTrees':'avlTrees.avlUpdate.p5'(O,P,Y,N,_))).
'~programs.deleteDelay.p6.0'(A, B, C, D, E, 'progDefs.program.f4'(F,G,H,I)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, J),
        '~programs.cModulePart.p2'(C, K),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(J, B, K),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        'sharedPrograms':'~sharedPrograms.nextModuleVersion.p2'(B, L),
        J='progDefs.program.f4'(F,G,H,M),
        'avlTrees':'~avlTrees.avlUpdate.p5'(M, B, 'progDefs.code.f2'(L,N), I, 'progDefs.code.f2'(_,O)),
        D='metaDefs.atom.f2'('metaDefs.name.f4'(B,P,'metaDefs.predicate.c0',Q),_),
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(O, P, R),
        'sharedPrograms':'~sharedPrograms.pickPredDef.p4'(Q, R, 'progDefs.predDef.f4'(Q,S,T,U), V),
        '~programs.deleteDelayFromPart.p6'(C, 'progDefs.delay.f2'(D,E), T, U, W, X),
        user:goedel_freeze(ground([W,X,S]), ((S=[],W=[],X=[]),true->Y=V;Y=['progDefs.predDef.f4'(Q,S,W,X)|V])),
        user:goedel_freeze(ground([Y]), (Y=[],true->'avlTrees':'~avlTrees.avlDelete.p3'(O,P,N);'avlTrees':'~avlTrees.avlUpdate.p5'(O,P,Y,N,_))).
'programs.delayInPart.p4'('programs.export.c0', A, _, B) :-
        'lists':'lists.member.p2'(B, A).
'~programs.delayInPart.p4'('programs.export.c0', A, _, B) :-
        'lists':'~lists.member.p2'(B, A).
'programs.delayInPart.p4'('programs.local.c0', _, A, B) :-
        'lists':'lists.member.p2'(B, A).
'~programs.delayInPart.p4'('programs.local.c0', _, A, B) :-
        'lists':'~lists.member.p2'(B, A).
'programs.deleteImportFromPart.p6'('programs.export.c0', A, B, C, D, C) :-
        'sharedPrograms':'sharedPrograms.pickOne.p3'(A, B, D).
'~programs.deleteImportFromPart.p6'('programs.export.c0', A, B, C, D, C) :-
        'sharedPrograms':'~sharedPrograms.pickOne.p3'(A, B, D).
'programs.deleteImportFromPart.p6'('programs.local.c0', A, B, C, B, D) :-
        'sharedPrograms':'sharedPrograms.pickOne.p3'(A, C, D).
'~programs.deleteImportFromPart.p6'('programs.local.c0', A, B, C, B, D) :-
        'sharedPrograms':'~sharedPrograms.pickOne.p3'(A, C, D).
'programs.deleteImportFromPart.p6'('programs.module.c0', A, B, C, B, D) :-
        'sharedPrograms':'sharedPrograms.pickOne.p3'(A, C, D).
'~programs.deleteImportFromPart.p6'('programs.module.c0', A, B, C, B, D) :-
        'sharedPrograms':'~sharedPrograms.pickOne.p3'(A, C, D).
'programs.deleteDelayFromPart.p6'('programs.export.c0', A, B, C, D, C) :-
        'sharedPrograms':'sharedPrograms.pickOne.p3'(A, B, D).
'~programs.deleteDelayFromPart.p6'('programs.export.c0', A, B, C, D, C) :-
        'sharedPrograms':'~sharedPrograms.pickOne.p3'(A, B, D).
'programs.deleteDelayFromPart.p6'('programs.local.c0', A, B, C, B, D) :-
        'sharedPrograms':'sharedPrograms.pickOne.p3'(A, C, D).
'~programs.deleteDelayFromPart.p6'('programs.local.c0', A, B, C, B, D) :-
        'sharedPrograms':'~sharedPrograms.pickOne.p3'(A, C, D).
'programs.deleteDelayFromPart.p6'('programs.module.c0', A, B, C, B, D) :-
        'sharedPrograms':'sharedPrograms.pickOne.p3'(A, C, D).
'~programs.deleteDelayFromPart.p6'('programs.module.c0', A, B, C, B, D) :-
        'sharedPrograms':'~sharedPrograms.pickOne.p3'(A, C, D).
'programs.deleteProgramBase.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteProgramBase.p5.0'(A,B,C,D,E)).
'~programs.deleteProgramBase.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteProgramBase.p5.0'(A,B,C,D,E)).
'programs.deleteProgramBase.p5.0'(A, B, C, D, E) :-
        'programs.delTypeDeclaration.p6'(E, B, C, D, 'progDefs.baseDecl.c0', A).
'~programs.deleteProgramBase.p5.0'(A, B, C, D, E) :-
        '~programs.delTypeDeclaration.p6'(E, B, C, D, 'progDefs.baseDecl.c0', A).
'programs.deleteProgramPredicate.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteProgramPredicate.p7.0'(A,B,C,D,E,F,G)).
'~programs.deleteProgramPredicate.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteProgramPredicate.p7.0'(A,B,C,D,E,F,G)).
'programs.deleteProgramPredicate.p7.0'(A, B, C, D, E, F, G) :-
        'programs.delDeclaration.p6'(G, B, C, D, 'progDefs.predicateDecl.f3'(_,E,F), A).
'~programs.deleteProgramPredicate.p7.0'(A, B, C, D, E, F, G) :-
        '~programs.delDeclaration.p6'(G, B, C, D, 'progDefs.predicateDecl.f3'(_,E,F), A).
'programs.deleteProgramFunction.p8'(A, B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteProgramFunction.p8.0'(A,B,C,D,E,F,G,H)).
'~programs.deleteProgramFunction.p8'(A, B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteProgramFunction.p8.0'(A,B,C,D,E,F,G,H)).
'programs.deleteProgramFunction.p8.0'(A, B, C, D, E, F, G, H) :-
        'programs.delDeclaration.p6'(H, B, C, D, 'progDefs.functionDecl.f4'(_,E,F,G), A).
'~programs.deleteProgramFunction.p8.0'(A, B, C, D, E, F, G, H) :-
        '~programs.delDeclaration.p6'(H, B, C, D, 'progDefs.functionDecl.f4'(_,E,F,G), A).
'programs.deleteProgramConstructor.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteProgramConstructor.p6.0'(A,B,C,D,E,F)).
'~programs.deleteProgramConstructor.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteProgramConstructor.p6.0'(A,B,C,D,E,F)).
'programs.deleteProgramConstructor.p6.0'(A, B, C, D, E, F) :-
        'programs.delTypeDeclaration.p6'(F, B, C, D, 'progDefs.constructorDecl.f1'(E), A).
'~programs.deleteProgramConstructor.p6.0'(A, B, C, D, E, F) :-
        '~programs.delTypeDeclaration.p6'(F, B, C, D, 'progDefs.constructorDecl.f1'(E), A).
'programs.deleteProgramImport.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteProgramImport.p5.0'(A,B,C,D,E)).
'~programs.deleteProgramImport.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteProgramImport.p5.0'(A,B,C,D,E)).
'programs.deleteProgramImport.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'programCache.getCachedProgram.p2'(A, E),
        'programs.deleteProgramImport.p5'(E, B, C, D, E).
'~programs.deleteProgramImport.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, E),
        '~programs.deleteProgramImport.p5'(E, B, C, D, E).
'programs.deleteProgramImport.p5.0'('progDefs.program.f4'(A,B,'progDefs.language.f1'(C),D), E, F, G, 'progDefs.program.f4'(A,H,'progDefs.language.f1'(I),J)) :-
        'programs.cModulePart.p2'(F, K),
        'avlTrees':'avlTrees.avlUpdate.p5'(B, E, 'progDefs.modDef.f4'(L,M,N,O), P, 'progDefs.modDef.f4'(L,Q,R,O)),
        'sharedPrograms':'sharedPrograms.openKind.p1'(L),
        'sharedPrograms':'sharedPrograms.kindHasPart.p2'(L, K),
        'programs.deleteImportFromPart.p6'(F, G, Q, R, M, N),
        user:goedel_freeze(ground([G,B]), ('programs':'~programs.unreferencedModule.p2'(G,B),true->'avlTrees':'avlTrees.avlDelete.p3'(P,G,H),'avlTrees':'avlTrees.avlDelete.p3'(C,G,I),'avlTrees':'avlTrees.avlDelete.p3'(D,G,J);H=P,I=C,J=D)).
'~programs.deleteProgramImport.p5.0'('progDefs.program.f4'(A,B,'progDefs.language.f1'(C),D), E, F, G, 'progDefs.program.f4'(A,H,'progDefs.language.f1'(I),J)) :-
        '~programs.cModulePart.p2'(F, K),
        'avlTrees':'~avlTrees.avlUpdate.p5'(B, E, 'progDefs.modDef.f4'(L,M,N,O), P, 'progDefs.modDef.f4'(L,Q,R,O)),
        'sharedPrograms':'~sharedPrograms.openKind.p1'(L),
        'sharedPrograms':'~sharedPrograms.kindHasPart.p2'(L, K),
        '~programs.deleteImportFromPart.p6'(F, G, Q, R, M, N),
        user:goedel_freeze(ground([G,B]), ('programs':'~programs.unreferencedModule.p2'(G,B),true->'avlTrees':'~avlTrees.avlDelete.p3'(P,G,H),'avlTrees':'~avlTrees.avlDelete.p3'(C,G,I),'avlTrees':'~avlTrees.avlDelete.p3'(D,G,J);H=P,I=C,J=D)).
'programs.deleteStatement.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), 'programs':'programs.deleteStatement.p4.0'(A,B,C,D)).
'~programs.deleteStatement.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B]), 'programs':'~programs.deleteStatement.p4.0'(A,B,C,D)).
'programs.deleteStatement.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'programCache.getCachedProgram.p2'(A, E),
        'programs.deleteStatement.p4'(E, B, C, D).
'~programs.deleteStatement.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, E),
        '~programs.deleteStatement.p4'(E, B, C, D).
'programs.deleteStatement.p4.0'('progDefs.program.f4'(A,B,C,D), E, F, 'progDefs.program.f4'(A,B,C,G)) :-
        user:goedel_freeze(ground([E]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(E))),
        'sharedPrograms':'sharedPrograms.nextModuleVersion.p2'(E, H),
        'avlTrees':'avlTrees.avlUpdate.p5'(D, E, 'progDefs.code.f2'(H,I), G, 'progDefs.code.f2'(_,J)),
        'programs.openStatementPredicate.p2'(F, 'metaDefs.name.f4'(_,K,_,L)),
        'sharedPrograms':'sharedPrograms.avlFind.p3'(J, K, M),
        'sharedPrograms':'sharedPrograms.pickPredDef.p4'(L, M, 'progDefs.predDef.f4'(L,N,O,P), Q),
        'lists':'lists.delete.p3'(F, N, R),
        user:goedel_freeze(ground([O,P,R]), ((R=[],O=[],P=[]),true->S=Q;S=['progDefs.predDef.f4'(L,R,O,P)|Q])),
        user:goedel_freeze(ground([S]), (S=[],true->'avlTrees':'avlTrees.avlDelete.p3'(J,K,I);'avlTrees':'avlTrees.avlUpdate.p5'(J,K,S,I,_))).
'~programs.deleteStatement.p4.0'('progDefs.program.f4'(A,B,C,D), E, F, 'progDefs.program.f4'(A,B,C,G)) :-
        user:goedel_freeze(ground([E]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(E))),
        'sharedPrograms':'~sharedPrograms.nextModuleVersion.p2'(E, H),
        'avlTrees':'~avlTrees.avlUpdate.p5'(D, E, 'progDefs.code.f2'(H,I), G, 'progDefs.code.f2'(_,J)),
        '~programs.openStatementPredicate.p2'(F, 'metaDefs.name.f4'(_,K,_,L)),
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(J, K, M),
        'sharedPrograms':'~sharedPrograms.pickPredDef.p4'(L, M, 'progDefs.predDef.f4'(L,N,O,P), Q),
        'lists':'~lists.delete.p3'(F, N, R),
        user:goedel_freeze(ground([O,P,R]), ((R=[],O=[],P=[]),true->S=Q;S=['progDefs.predDef.f4'(L,R,O,P)|Q])),
        user:goedel_freeze(ground([S]), (S=[],true->'avlTrees':'~avlTrees.avlDelete.p3'(J,K,I);'avlTrees':'~avlTrees.avlUpdate.p5'(J,K,S,I,_))).
'programs.deleteProgramProposition.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.deleteProgramProposition.p5.0'(A,B,C,D,E)).
'~programs.deleteProgramProposition.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.deleteProgramProposition.p5.0'(A,B,C,D,E)).
'programs.deleteProgramProposition.p5.0'(A, B, C, D, E) :-
        'programs.delDeclaration.p6'(E, B, C, D, 'progDefs.propositionDecl.c0', A).
'~programs.deleteProgramProposition.p5.0'(A, B, C, D, E) :-
        '~programs.delDeclaration.p6'(E, B, C, D, 'progDefs.propositionDecl.c0', A).
'programs.deleteTypeSymbol.p5'('metaDefs.name.f4'(A,B,C,D), 'progDefs.language.f1'(E), F, G, 'progDefs.language.f1'(H)) :-
        'sharedPrograms':'sharedPrograms.avlFind.p3'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(J,K),L)),
        'sharedPrograms':'sharedPrograms.avlFind.p3'(J, B, M),
        'sharedPrograms':'sharedPrograms.findDescriptor.p5'(M, I, C, D, G),
        'lists':'lists.deleteFirst.p3'('progDefs.symbol.f2'(F,G), M, N),
        user:goedel_freeze(ground([N]), (N=[],true->'avlTrees':'avlTrees.avlDelete.p3'(J,B,O);'avlTrees':'avlTrees.avlUpdate.p5'(J,B,N,O,_))),
        'avlTrees':'avlTrees.avlUpdate.p5'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(O,K),L), H, _).
'~programs.deleteTypeSymbol.p5'('metaDefs.name.f4'(A,B,C,D), 'progDefs.language.f1'(E), F, G, 'progDefs.language.f1'(H)) :-
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(J,K),L)),
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(J, B, M),
        'sharedPrograms':'~sharedPrograms.findDescriptor.p5'(M, I, C, D, G),
        'lists':'~lists.deleteFirst.p3'('progDefs.symbol.f2'(F,G), M, N),
        user:goedel_freeze(ground([N]), (N=[],true->'avlTrees':'~avlTrees.avlDelete.p3'(J,B,O);'avlTrees':'~avlTrees.avlUpdate.p5'(J,B,N,O,_))),
        'avlTrees':'~avlTrees.avlUpdate.p5'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(O,K),L), H, _).
'programs.deleteSymbol.p5'('metaDefs.name.f4'(A,B,C,D), 'progDefs.language.f1'(E), F, G, 'progDefs.language.f1'(H)) :-
        'sharedPrograms':'sharedPrograms.avlFind.p3'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(J,K),L)),
        'sharedPrograms':'sharedPrograms.avlFind.p3'(K, B, M),
        'sharedPrograms':'sharedPrograms.findDescriptor.p5'(M, I, C, D, G),
        'lists':'lists.deleteFirst.p3'('progDefs.symbol.f2'(F,G), M, N),
        user:goedel_freeze(ground([N]), (N=[],true->'avlTrees':'avlTrees.avlDelete.p3'(K,B,O);'avlTrees':'avlTrees.avlUpdate.p5'(K,B,N,O,_))),
        'avlTrees':'avlTrees.avlUpdate.p5'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(J,O),L), H, _).
'~programs.deleteSymbol.p5'('metaDefs.name.f4'(A,B,C,D), 'progDefs.language.f1'(E), F, G, 'progDefs.language.f1'(H)) :-
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(J,K),L)),
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(K, B, M),
        'sharedPrograms':'~sharedPrograms.findDescriptor.p5'(M, I, C, D, G),
        'lists':'~lists.deleteFirst.p3'('progDefs.symbol.f2'(F,G), M, N),
        user:goedel_freeze(ground([N]), (N=[],true->'avlTrees':'~avlTrees.avlDelete.p3'(K,B,O);'avlTrees':'~avlTrees.avlUpdate.p5'(K,B,N,O,_))),
        'avlTrees':'~avlTrees.avlUpdate.p5'(E, A, 'progDefs.module.f3'(I,'progDefs.categories.f2'(J,O),L), H, _).
'programs.fail.p2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'programs':'programs.fail.p2.0'(A,B)).
'~programs.fail.p2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'programs':'~programs.fail.p2.0'(A,B)).
'programs.fail.p2.0'(A, B) :-
        'programCache':'programCache.unCacheProgram.p2'(A, C),
        'sharedPrograms':'sharedPrograms.programLanguage.p2'(C, D),
        'sharedPrograms':'sharedPrograms.meltedBodyTyping.p8'(B, D, [], _, _, [], [], []),
        'programs.compileObjectProgram.p1'(C),
        'programs.failedGoal.p1'(B).
'~programs.fail.p2.0'(A, B) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, C),
        'sharedPrograms':'~sharedPrograms.programLanguage.p2'(C, D),
        'sharedPrograms':'~sharedPrograms.meltedBodyTyping.p8'(B, D, [], _, _, [], [], []),
        '~programs.compileObjectProgram.p1'(C),
        '~programs.failedGoal.p1'(B).
'programs.insertProgramBase.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'programs.insertProgramBase.p5.0'(A,B,C,D,E)).
'~programs.insertProgramBase.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'~programs.insertProgramBase.p5.0'(A,B,C,D,E)).
'programs.insertProgramBase.p5.0'(A, B, C, D, E) :-
        'programs.insTypeDeclaration.p6'(A, B, C, D, 'progDefs.baseDecl.c0', E).
'~programs.insertProgramBase.p5.0'(A, B, C, D, E) :-
        '~programs.insTypeDeclaration.p6'(A, B, C, D, 'progDefs.baseDecl.c0', E).
'programs.groundCondition.p2'('metaDefs.var.f2'(A,B), 'progDefs.ground.f1'('metaDefs.var.f2'(A,B))).
'~programs.groundCondition.p2'('metaDefs.var.f2'(A,B), 'progDefs.ground.f1'('metaDefs.var.f2'(A,B))).
'programs.groundCondition.p2'('metaDefs.var.f1'(A), 'progDefs.ground.f1'('metaDefs.var.f1'(A))).
'~programs.groundCondition.p2'('metaDefs.var.f1'(A), 'progDefs.ground.f1'('metaDefs.var.f1'(A))).
'programs.freeTypeSymbol.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([B]), (B='programs.export.c0',true->'programs':'programs.typeSymbolFreeInModule.p3'(A,C,D),D='progDefs.program.f4'(_,E,_,_),user:goedel_freeze(ground([A,E,C,D]),user:goedel_not((('avlTrees':'~avlTrees.avlMember.p3'(E,F,G),user:not_equal([],[F,A],F,A),'programs':'~programs.moduleImported.p3'(A,G,E)),user:goedel_freeze(ground([F,C,D]),user:goedel_not('programs':'~programs.typeSymbolFreeInModule.p3'(F,C,D))))));'programs':'programs.typeSymbolFreeInModule.p3'(A,C,D))).
'~programs.freeTypeSymbol.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([B]), (B='programs.export.c0',true->'programs':'~programs.typeSymbolFreeInModule.p3'(A,C,D),D='progDefs.program.f4'(_,E,_,_),user:goedel_freeze(ground([A,E,C,D]),user:goedel_not((('avlTrees':'~avlTrees.avlMember.p3'(E,F,G),user:not_equal([],[F,A],F,A),'programs':'~programs.moduleImported.p3'(A,G,E)),user:goedel_freeze(ground([F,C,D]),user:goedel_not('programs':'~programs.typeSymbolFreeInModule.p3'(F,C,D))))));'programs':'~programs.typeSymbolFreeInModule.p3'(A,C,D))).
'programs.formulaInProgram.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.formulaInProgram.p4.0'(A,B,C,D)).
'~programs.formulaInProgram.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.formulaInProgram.p4.0'(A,B,C,D)).
'programs.formulaInProgram.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'programCache.getCachedProgram.p2'(A, E),
        'programs.formulaInProgram.p4'(E, B, C, D).
'~programs.formulaInProgram.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, E),
        '~programs.formulaInProgram.p4'(E, B, C, D).
'programs.formulaInProgram.p4.0'('progDefs.program.f4'(_,_,A,_), B, C, D) :-
        'sharedPrograms':'sharedPrograms.formulaInLanguage.p4'(C, A, B, D).
'~programs.formulaInProgram.p4.0'('progDefs.program.f4'(_,_,A,_), B, C, D) :-
        'sharedPrograms':'~sharedPrograms.formulaInLanguage.p4'(C, A, B, D).
'programs.freeSymbol.p4'(A, B, C, D) :-
        'programs.symbolFreeInModule.p3'(A, C, D),
        user:goedel_freeze(ground([B]), (B='programs.export.c0',true->D='progDefs.program.f4'(_,E,_,_),user:goedel_freeze(ground([A,E,C,D]),user:goedel_not((('avlTrees':'~avlTrees.avlMember.p3'(E,F,G),user:not_equal([],[F,A],F,A),'programs':'~programs.moduleImported.p3'(A,G,E)),user:goedel_freeze(ground([F,C,D]),user:goedel_not('programs':'~programs.symbolFreeInModule.p3'(F,C,D))))));true)).
'~programs.freeSymbol.p4'(A, B, C, D) :-
        '~programs.symbolFreeInModule.p3'(A, C, D),
        user:goedel_freeze(ground([B]), (B='programs.export.c0',true->D='progDefs.program.f4'(_,E,_,_),user:goedel_freeze(ground([A,E,C,D]),user:goedel_not((('avlTrees':'~avlTrees.avlMember.p3'(E,F,G),user:not_equal([],[F,A],F,A),'programs':'~programs.moduleImported.p3'(A,G,E)),user:goedel_freeze(ground([F,C,D]),user:goedel_not('programs':'~programs.symbolFreeInModule.p3'(F,C,D))))));true)).
'programs.functionInModule.p8'(A, B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.functionInModule.p8.0'(A,B,C,D,E,F,G,H)).
'~programs.functionInModule.p8'(A, B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.functionInModule.p8.0'(A,B,C,D,E,F,G,H)).
'programs.functionInModule.p8.0'(A, B, C, D, E, F, G, H) :-
        'programCache':'programCache.unCacheProgram.p2'(A, I),
        'programs.cModulePart.p2'(C, J),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(I, B, J),
        'programs.modulePartLanguage.p4'(J, B, I, K),
        'sharedPrograms':'sharedPrograms.functionInLanguage.p5'(D, K, E, F, G),
        D='metaDefs.name.f4'(H,_,_,_).
'~programs.functionInModule.p8.0'(A, B, C, D, E, F, G, H) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, I),
        '~programs.cModulePart.p2'(C, J),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(I, B, J),
        '~programs.modulePartLanguage.p4'(J, B, I, K),
        'sharedPrograms':'~sharedPrograms.functionInLanguage.p5'(D, K, E, F, G),
        D='metaDefs.name.f4'(H,_,_,_).
'programs.importInModule.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.importInModule.p4.0'(A,B,C,D)).
'~programs.importInModule.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.importInModule.p4.0'(A,B,C,D)).
'programs.importInModule.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'programCache.getCachedProgram.p2'(A, E),
        'programs.importInModule.p4'(E, B, C, D).
'~programs.importInModule.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, E),
        '~programs.importInModule.p4'(E, B, C, D).
'programs.importInModule.p4.0'('progDefs.program.f4'(_,A,_,_), B, C, D) :-
        'sharedPrograms':'sharedPrograms.avlFind.p3'(A, B, 'progDefs.modDef.f4'(E,F,G,_)),
        'programs.importInPart.p5'(C, E, F, G, D).
'~programs.importInModule.p4.0'('progDefs.program.f4'(_,A,_,_), B, C, D) :-
        'sharedPrograms':'~sharedPrograms.avlFind.p3'(A, B, 'progDefs.modDef.f4'(E,F,G,_)),
        '~programs.importInPart.p5'(C, E, F, G, D).
'programs.hasIntensionalSet.p1'('metaDefs.term.f2'(_,A)) :-
        'programs.hasIntensionalSet1.p1'(A).
'~programs.hasIntensionalSet.p1'('metaDefs.term.f2'(_,A)) :-
        '~programs.hasIntensionalSet1.p1'(A).
'programs.hasIntensionalSet.p1'('metaDefs.suchThat.f2'(_,_)).
'~programs.hasIntensionalSet.p1'('metaDefs.suchThat.f2'(_,_)).
'programs.hasIntensionalSet1.p1'([A|B]) :-
        (   'programs.hasIntensionalSet.p1'(A)
        ;   'programs.hasIntensionalSet1.p1'(B)
        ).
'~programs.hasIntensionalSet1.p1'([A|B]) :-
        (   '~programs.hasIntensionalSet.p1'(A)
        ;   '~programs.hasIntensionalSet1.p1'(B)
        ).
'programs.insTypeDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'programCache.unCacheProgram.p2'(A, G),
        'programs.cModulePart.p2'(C, H),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        'programs.validDeclaration.p4'(E, G, B, C),
        'programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        'sharedPrograms':'sharedPrograms.insertTypeSymbol.p5'(D, L, I, E, N),
        F='progDefs.program.f4'(J,K,N,M).
'~programs.insTypeDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, G),
        '~programs.cModulePart.p2'(C, H),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        '~programs.validDeclaration.p4'(E, G, B, C),
        '~programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        'sharedPrograms':'~sharedPrograms.insertTypeSymbol.p5'(D, L, I, E, N),
        F='progDefs.program.f4'(J,K,N,M).
'programs.insDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'programCache.unCacheProgram.p2'(A, G),
        'programs.cModulePart.p2'(C, H),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        'programs.validDeclaration.p4'(E, G, B, C),
        'programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        'sharedPrograms':'sharedPrograms.insertSymbol.p5'(D, L, I, E, N),
        F='progDefs.program.f4'(J,K,N,M).
'~programs.insDeclaration.p6'(A, B, C, D, E, F) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, G),
        '~programs.cModulePart.p2'(C, H),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(G, B, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        D='metaDefs.name.f4'(B,_,_,_),
        '~programs.validDeclaration.p4'(E, G, B, C),
        '~programs.partAccessibility.p2'(C, I),
        G='progDefs.program.f4'(J,K,L,M),
        'sharedPrograms':'~sharedPrograms.insertSymbol.p5'(D, L, I, E, N),
        F='progDefs.program.f4'(J,K,N,M).
'programs.importInPart.p5'('programs.closed.c0', _, A, _, B) :-
        'sharedPrograms':'sharedPrograms.findMember.p2'(B, A).
'~programs.importInPart.p5'('programs.closed.c0', _, A, _, B) :-
        'sharedPrograms':'~sharedPrograms.findMember.p2'(B, A).
'programs.importInPart.p5'('programs.export.c0', _, A, _, B) :-
        'sharedPrograms':'sharedPrograms.findMember.p2'(B, A).
'~programs.importInPart.p5'('programs.export.c0', _, A, _, B) :-
        'sharedPrograms':'~sharedPrograms.findMember.p2'(B, A).
'programs.importInPart.p5'('programs.module.c0', _, _, A, B) :-
        'sharedPrograms':'sharedPrograms.findMember.p2'(B, A).
'~programs.importInPart.p5'('programs.module.c0', _, _, A, B) :-
        'sharedPrograms':'~sharedPrograms.findMember.p2'(B, A).
'programs.importInPart.p5'('programs.local.c0', A, _, B, C) :-
        user:not_equal([], [A], A, 'progDefs.closedKind.c0'),
        'sharedPrograms':'sharedPrograms.findMember.p2'(C, B).
'~programs.importInPart.p5'('programs.local.c0', A, _, B, C) :-
        user:not_equal([], [A], A, 'progDefs.closedKind.c0'),
        'sharedPrograms':'~sharedPrograms.findMember.p2'(C, B).
'programs.insertDelay.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'programs.insertDelay.p6.0'(A,B,C,D,E,F)).
'~programs.insertDelay.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'~programs.insertDelay.p6.0'(A,B,C,D,E,F)).
'programs.insertDelay.p6.0'(A, B, C, D, E, 'progDefs.program.f4'(F,G,H,I)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, J),
        'programs.cModulePart.p2'(C, K),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(J, B, K),
        user:not_equal([], [K], K, 'progDefs.closed.c0'),
        'sharedPrograms':'sharedPrograms.moduleLanguage.p3'(J, B, H),
        'syntax':'syntax.emptyVarTyping.p1'(L),
        'sharedPrograms':'sharedPrograms.formulaInLanguage.p4'(D, H, L, _),
        'syntax':'syntax.predicateAtom.p3'(D, 'metaDefs.name.f4'(B,M,_,N), _),
        'programs.intensionalSetFree.p1'(D),
        'sharedPrograms':'sharedPrograms.nextModuleVersion.p2'(B, O),
        J='progDefs.program.f4'(F,G,H,P),
        'avlTrees':'avlTrees.avlUpdate.p5'(P, B, 'progDefs.code.f2'(O,Q), I, 'progDefs.code.f2'(_,R)),
        'avlTrees':'avlTrees.avlAmend.p6'(R, M, S, [], Q, T),
        user:goedel_freeze(ground([N,T]), if(('lists':'~lists.deleteFirst.p3'('progDefs.predDef.f4'(N,U,V,W),T,X),true),('sharedPrograms':'sharedPrograms.updateDelays.p6'(K,'progDefs.delay.f2'(D,E),V,W,Y,Z),S=['progDefs.predDef.f4'(N,U,Y,Z)|X]),('sharedPrograms':'sharedPrograms.updateDelays.p6'(K,'progDefs.delay.f2'(D,E),[],[],Y,Z),S=['progDefs.predDef.f4'(N,[],Y,Z)|T]))).
'~programs.insertDelay.p6.0'(A, B, C, D, E, 'progDefs.program.f4'(F,G,H,I)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, J),
        '~programs.cModulePart.p2'(C, K),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(J, B, K),
        user:not_equal([], [K], K, 'progDefs.closed.c0'),
        'sharedPrograms':'~sharedPrograms.moduleLanguage.p3'(J, B, H),
        'syntax':'~syntax.emptyVarTyping.p1'(L),
        'sharedPrograms':'~sharedPrograms.formulaInLanguage.p4'(D, H, L, _),
        'syntax':'~syntax.predicateAtom.p3'(D, 'metaDefs.name.f4'(B,M,_,N), _),
        '~programs.intensionalSetFree.p1'(D),
        'sharedPrograms':'~sharedPrograms.nextModuleVersion.p2'(B, O),
        J='progDefs.program.f4'(F,G,H,P),
        'avlTrees':'~avlTrees.avlUpdate.p5'(P, B, 'progDefs.code.f2'(O,Q), I, 'progDefs.code.f2'(_,R)),
        'avlTrees':'~avlTrees.avlAmend.p6'(R, M, S, [], Q, T),
        user:goedel_freeze(ground([N,T]), if(('lists':'~lists.deleteFirst.p3'('progDefs.predDef.f4'(N,U,V,W),T,X),true),('sharedPrograms':'~sharedPrograms.updateDelays.p6'(K,'progDefs.delay.f2'(D,E),V,W,Y,Z),S=['progDefs.predDef.f4'(N,U,Y,Z)|X]),('sharedPrograms':'~sharedPrograms.updateDelays.p6'(K,'progDefs.delay.f2'(D,E),[],[],Y,Z),S=['progDefs.predDef.f4'(N,[],Y,Z)|T]))).
'programs.insertProgramProposition.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'programs.insertProgramProposition.p5.0'(A,B,C,D,E)).
'~programs.insertProgramProposition.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'~programs.insertProgramProposition.p5.0'(A,B,C,D,E)).
'programs.insertProgramProposition.p5.0'(A, B, C, D, E) :-
        'programs.insDeclaration.p6'(A, B, C, D, 'progDefs.propositionDecl.c0', E).
'~programs.insertProgramProposition.p5.0'(A, B, C, D, E) :-
        '~programs.insDeclaration.p6'(A, B, C, D, 'progDefs.propositionDecl.c0', E).
'programs.insertProgramFunction.p8'(A, B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A,B,C,D,E,F,G]), 'programs':'programs.insertProgramFunction.p8.0'(A,B,C,D,E,F,G,H)).
'~programs.insertProgramFunction.p8'(A, B, C, D, E, F, G, H) :-
        user:goedel_freeze(ground([A,B,C,D,E,F,G]), 'programs':'~programs.insertProgramFunction.p8.0'(A,B,C,D,E,F,G,H)).
'programs.insertProgramFunction.p8.0'(A, B, C, D, E, F, G, H) :-
        'programs.insDeclaration.p6'(A, B, C, D, 'progDefs.functionDecl.f4'(_,E,F,G), H).
'~programs.insertProgramFunction.p8.0'(A, B, C, D, E, F, G, H) :-
        '~programs.insDeclaration.p6'(A, B, C, D, 'progDefs.functionDecl.f4'(_,E,F,G), H).
'programs.insertProgramConstructor.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'programs.insertProgramConstructor.p6.0'(A,B,C,D,E,F)).
'~programs.insertProgramConstructor.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'~programs.insertProgramConstructor.p6.0'(A,B,C,D,E,F)).
'programs.insertProgramConstructor.p6.0'(A, B, C, D, E, F) :-
        'programs.insTypeDeclaration.p6'(A, B, C, D, 'progDefs.constructorDecl.f1'(E), F).
'~programs.insertProgramConstructor.p6.0'(A, B, C, D, E, F) :-
        '~programs.insTypeDeclaration.p6'(A, B, C, D, 'progDefs.constructorDecl.f1'(E), F).
'programs.insertProgramConstant.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'programs.insertProgramConstant.p6.0'(A,B,C,D,E,F)).
'~programs.insertProgramConstant.p6'(A, B, C, D, E, F) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'~programs.insertProgramConstant.p6.0'(A,B,C,D,E,F)).
'programs.insertProgramConstant.p6.0'(A, B, C, D, E, F) :-
        'programs.insDeclaration.p6'(A, B, C, D, 'progDefs.constantDecl.f1'(E), F).
'~programs.insertProgramConstant.p6.0'(A, B, C, D, E, F) :-
        '~programs.insDeclaration.p6'(A, B, C, D, 'progDefs.constantDecl.f1'(E), F).
'programs.insertProgramImport.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'programs.insertProgramImport.p5.0'(A,B,C,D,E)).
'~programs.insertProgramImport.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'~programs.insertProgramImport.p5.0'(A,B,C,D,E)).
'programs.insertProgramImport.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'programCache.getCachedProgram.p2'(A, E),
        'programs.insertProgramImport.p5'(E, B, C, D, E).
'~programs.insertProgramImport.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, E),
        '~programs.insertProgramImport.p5'(E, B, C, D, E).
'programs.insertProgramImport.p5.0'('progDefs.program.f4'(A,B,'progDefs.language.f1'(C),D), E, F, G, 'progDefs.program.f4'(A,H,'progDefs.language.f1'(I),J)) :-
        'programs.cModulePart.p2'(F, K),
        'avlTrees':'avlTrees.avlUpdate.p5'(B, E, 'progDefs.modDef.f4'(L,M,N,O), P, 'progDefs.modDef.f4'(L,Q,R,O)),
        user:goedel_freeze(ground([E]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(E))),
        'sharedPrograms':'sharedPrograms.kindHasPart.p2'(L, K),
        'sharedPrograms':'sharedPrograms.addImportToPart.p6'(K, G, Q, R, M, N),
        user:goedel_freeze(ground([G,P]), ('avlTrees':'~avlTrees.avlSearch.p3'(P,G,_),true->H=P,I=C,J=D;'sharedPrograms':'sharedPrograms.addModule.p7'(G,P,C,D,H,I,J))).
'~programs.insertProgramImport.p5.0'('progDefs.program.f4'(A,B,'progDefs.language.f1'(C),D), E, F, G, 'progDefs.program.f4'(A,H,'progDefs.language.f1'(I),J)) :-
        '~programs.cModulePart.p2'(F, K),
        'avlTrees':'~avlTrees.avlUpdate.p5'(B, E, 'progDefs.modDef.f4'(L,M,N,O), P, 'progDefs.modDef.f4'(L,Q,R,O)),
        user:goedel_freeze(ground([E]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(E))),
        'sharedPrograms':'~sharedPrograms.kindHasPart.p2'(L, K),
        'sharedPrograms':'~sharedPrograms.addImportToPart.p6'(K, G, Q, R, M, N),
        user:goedel_freeze(ground([G,P]), ('avlTrees':'~avlTrees.avlSearch.p3'(P,G,_),true->H=P,I=C,J=D;'sharedPrograms':'~sharedPrograms.addModule.p7'(G,P,C,D,H,I,J))).
'programs.insertProgramPredicate.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,D,E,F]), 'programs':'programs.insertProgramPredicate.p7.0'(A,B,C,D,E,F,G)).
'~programs.insertProgramPredicate.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,D,E,F]), 'programs':'~programs.insertProgramPredicate.p7.0'(A,B,C,D,E,F,G)).
'programs.insertProgramPredicate.p7.0'(A, B, C, D, E, F, G) :-
        'programs.insDeclaration.p6'(A, B, C, D, 'progDefs.predicateDecl.f3'(_,E,F), G).
'~programs.insertProgramPredicate.p7.0'(A, B, C, D, E, F, G) :-
        '~programs.insDeclaration.p6'(A, B, C, D, 'progDefs.predicateDecl.f3'(_,E,F), G).
'programs.intensionalSetFree.p1'('metaDefs.atom.f2'(_,A)) :-
        user:goedel_freeze(ground([A]), user:goedel_not('programs':'~programs.hasIntensionalSet1.p1'(A))).
'~programs.intensionalSetFree.p1'('metaDefs.atom.f2'(_,A)) :-
        user:goedel_freeze(ground([A]), user:goedel_not('programs':'~programs.hasIntensionalSet1.p1'(A))).
'programs.instanceOfHead.p3'('metaDefs.atom.f2'(A,B), 'metaDefs.atom.f2'(A,C), D) :-
        'syntax':'syntax.emptyTermSubst.p1'(E),
        'programs.instanceOfHead2.p4'(B, C, E, D).
'~programs.instanceOfHead.p3'('metaDefs.atom.f2'(A,B), 'metaDefs.atom.f2'(A,C), D) :-
        'syntax':'~syntax.emptyTermSubst.p1'(E),
        '~programs.instanceOfHead2.p4'(B, C, E, D).
'programs.insertStatement.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.insertStatement.p4.0'(A,B,C,D)).
'~programs.insertStatement.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.insertStatement.p4.0'(A,B,C,D)).
'programs.insertStatement.p4.0'(A, B, C, 'progDefs.program.f4'(D,E,F,G)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        'programs.statementInModuleLanguage.p3'(H, B, C),
        'programs.openStatementPredicate.p2'(C, 'metaDefs.name.f4'(B,I,_,J)),
        'sharedPrograms':'sharedPrograms.nextModuleVersion.p2'(B, K),
        H='progDefs.program.f4'(D,E,F,L),
        'avlTrees':'avlTrees.avlUpdate.p5'(L, B, 'progDefs.code.f2'(K,M), G, 'progDefs.code.f2'(_,N)),
        'avlTrees':'avlTrees.avlAmend.p6'(N, I, O, [], M, P),
        user:goedel_freeze(ground([J,P]), if(('lists':'~lists.deleteFirst.p3'('progDefs.predDef.f4'(J,Q,R,S),P,T),true),O=['progDefs.predDef.f4'(J,[C|Q],R,S)|T],O=['progDefs.predDef.f4'(J,[C],[],[])|P])).
'~programs.insertStatement.p4.0'(A, B, C, 'progDefs.program.f4'(D,E,F,G)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, H),
        user:goedel_freeze(ground([B]), user:goedel_not('sharedPrograms':'~sharedPrograms.systemModule.p1'(B))),
        '~programs.statementInModuleLanguage.p3'(H, B, C),
        '~programs.openStatementPredicate.p2'(C, 'metaDefs.name.f4'(B,I,_,J)),
        'sharedPrograms':'~sharedPrograms.nextModuleVersion.p2'(B, K),
        H='progDefs.program.f4'(D,E,F,L),
        'avlTrees':'~avlTrees.avlUpdate.p5'(L, B, 'progDefs.code.f2'(K,M), G, 'progDefs.code.f2'(_,N)),
        'avlTrees':'~avlTrees.avlAmend.p6'(N, I, O, [], M, P),
        user:goedel_freeze(ground([J,P]), if(('lists':'~lists.deleteFirst.p3'('progDefs.predDef.f4'(J,Q,R,S),P,T),true),O=['progDefs.predDef.f4'(J,[C|Q],R,S)|T],O=['progDefs.predDef.f4'(J,[C],[],[])|P])).
'programs.instanceOfHead1.p4'('metaDefs.var.f2'(A,B), C, D, E) :-
        'syntax':'syntax.bindingToTermSubst.p3'('metaDefs.var.f2'(A,B), C, F),
        'syntax':'syntax.composeTermSubsts.p3'(D, F, E).
'~programs.instanceOfHead1.p4'('metaDefs.var.f2'(A,B), C, D, E) :-
        'syntax':'~syntax.bindingToTermSubst.p3'('metaDefs.var.f2'(A,B), C, F),
        'syntax':'~syntax.composeTermSubsts.p3'(D, F, E).
'programs.instanceOfHead1.p4'('metaDefs.var.f1'(A), B, C, D) :-
        'syntax':'syntax.bindingToTermSubst.p3'('metaDefs.var.f1'(A), B, E),
        'syntax':'syntax.composeTermSubsts.p3'(C, E, D).
'~programs.instanceOfHead1.p4'('metaDefs.var.f1'(A), B, C, D) :-
        'syntax':'~syntax.bindingToTermSubst.p3'('metaDefs.var.f1'(A), B, E),
        'syntax':'~syntax.composeTermSubsts.p3'(C, E, D).
'programs.instanceOfHead1.p4'('metaDefs.term.f2'(A,B), 'metaDefs.term.f2'(A,C), D, E) :-
        'programs.instanceOfHead2.p4'(B, C, D, E).
'~programs.instanceOfHead1.p4'('metaDefs.term.f2'(A,B), 'metaDefs.term.f2'(A,C), D, E) :-
        '~programs.instanceOfHead2.p4'(B, C, D, E).
'programs.instanceOfHead1.p4'('metaDefs.cTerm.f1'(A), 'metaDefs.cTerm.f1'(A), B, B).
'~programs.instanceOfHead1.p4'('metaDefs.cTerm.f1'(A), 'metaDefs.cTerm.f1'(A), B, B).
'programs.instanceOfHead1.p4'('metaDefs.int.f1'(A), 'metaDefs.int.f1'(A), B, B).
'~programs.instanceOfHead1.p4'('metaDefs.int.f1'(A), 'metaDefs.int.f1'(A), B, B).
'programs.instanceOfHead1.p4'('metaDefs.str.f1'(A), 'metaDefs.str.f1'(A), B, B).
'~programs.instanceOfHead1.p4'('metaDefs.str.f1'(A), 'metaDefs.str.f1'(A), B, B).
'programs.instanceOfHead1.p4'('metaDefs.prm.f1'(A), 'metaDefs.prm.f1'(A), B, B).
'~programs.instanceOfHead1.p4'('metaDefs.prm.f1'(A), 'metaDefs.prm.f1'(A), B, B).
'programs.instanceOfHead2.p4'([], [], A, A).
'~programs.instanceOfHead2.p4'([], [], A, A).
'programs.instanceOfHead2.p4'([A|B], [C|D], E, F) :-
        'programs.instanceOfHead1.p4'(A, C, E, G),
        'programs.instanceOfHead2.p4'(B, D, G, F).
'~programs.instanceOfHead2.p4'([A|B], [C|D], E, F) :-
        '~programs.instanceOfHead1.p4'(A, C, E, G),
        '~programs.instanceOfHead2.p4'(B, D, G, F).
'programs.listTypesInModule.p4'(A, B, C, D) :-
        'programs.cModulePart.p2'(C, E),
        'programs.modulePartLanguage.p4'(E, B, A, F),
        'sharedPrograms':'sharedPrograms.listTypesInLanguage.p2'(D, F).
'~programs.listTypesInModule.p4'(A, B, C, D) :-
        '~programs.cModulePart.p2'(C, E),
        '~programs.modulePartLanguage.p4'(E, B, A, F),
        'sharedPrograms':'~sharedPrograms.listTypesInLanguage.p2'(D, F).
'programs.programTermToString.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.programTermToString.p4.0'(A,B,C,D)).
'~programs.programTermToString.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.programTermToString.p4.0'(A,B,C,D)).
'programs.programTermToString.p4.0'(A, B, C, D) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'sharedPrograms':'sharedPrograms.sProgramTermToString.p4'(E, B, C, D).
'~programs.programTermToString.p4.0'(A, B, C, D) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        'sharedPrograms':'~sharedPrograms.sProgramTermToString.p4'(E, B, C, D).
'programs.programConstructorName.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A])and(ground([B])and(ground([C])and ground([D])))or ground([E]), 'programs':'programs.programConstructorName.p5.0'(A,B,C,D,E)).
'~programs.programConstructorName.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A])and(ground([B])and(ground([C])and ground([D])))or ground([E]), 'programs':'~programs.programConstructorName.p5.0'(A,B,C,D,E)).
'programs.programConstructorName.p5.0'(A, B, C, D, 'metaDefs.name.f4'(B,C,'metaDefs.constructor.c0',D)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'programs.moduleInProgram.p2'(E, B).
'~programs.programConstructorName.p5.0'(A, B, C, D, 'metaDefs.name.f4'(B,C,'metaDefs.constructor.c0',D)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        '~programs.moduleInProgram.p2'(E, B).
'programs.openModule.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.openModule.p2.0'(A,B)).
'~programs.openModule.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.openModule.p2.0'(A,B)).
'programs.openModule.p2.0'(A, B) :-
        'programCache':'programCache.unCacheProgram.p2'(A, C),
        'sharedPrograms':'sharedPrograms.sOpenModule.p2'(C, B).
'~programs.openModule.p2.0'(A, B) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, C),
        'sharedPrograms':'~sharedPrograms.sOpenModule.p2'(C, B).
'programs.modulePartLanguage.p4'('progDefs.export.c0', A, B, C) :-
        'sharedPrograms':'sharedPrograms.exportLanguage.p3'(B, A, C).
'~programs.modulePartLanguage.p4'('progDefs.export.c0', A, B, C) :-
        'sharedPrograms':'~sharedPrograms.exportLanguage.p3'(B, A, C).
'programs.modulePartLanguage.p4'('progDefs.closed.c0', A, B, C) :-
        'sharedPrograms':'sharedPrograms.exportLanguage.p3'(B, A, C).
'~programs.modulePartLanguage.p4'('progDefs.closed.c0', A, B, C) :-
        'sharedPrograms':'~sharedPrograms.exportLanguage.p3'(B, A, C).
'programs.modulePartLanguage.p4'('progDefs.local.c0', A, B, C) :-
        'sharedPrograms':'sharedPrograms.moduleLanguage.p3'(B, A, C).
'~programs.modulePartLanguage.p4'('progDefs.local.c0', A, B, C) :-
        'sharedPrograms':'~sharedPrograms.moduleLanguage.p3'(B, A, C).
'programs.modulePartLanguage.p4'('progDefs.module.c0', A, B, C) :-
        'sharedPrograms':'sharedPrograms.moduleLanguage.p3'(B, A, C).
'~programs.modulePartLanguage.p4'('progDefs.module.c0', A, B, C) :-
        'sharedPrograms':'~sharedPrograms.moduleLanguage.p3'(B, A, C).
'programs.moduleInProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.moduleInProgram.p2.0'(A,B)).
'~programs.moduleInProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.moduleInProgram.p2.0'(A,B)).
'programs.moduleInProgram.p2.0'('progDefs.cachedProgram.f1'(A), B) :-
        'programCache':'programCache.getCachedProgram.p2'(A, C),
        'programs.moduleInProgram.p2'(C, B).
'~programs.moduleInProgram.p2.0'('progDefs.cachedProgram.f1'(A), B) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, C),
        '~programs.moduleInProgram.p2'(C, B).
'programs.moduleInProgram.p2.0'('progDefs.program.f4'(_,A,_,_), B) :-
        'programs.moduleInProgramAux.p2'(A, B).
'~programs.moduleInProgram.p2.0'('progDefs.program.f4'(_,A,_,_), B) :-
        '~programs.moduleInProgramAux.p2'(A, B).
'programs.moduleImported.p3'(A, 'progDefs.modDef.f4'(_,B,C,D), E) :-
        'lists':'lists.append.p3'(B, C, F),
        'lists':'lists.append.p3'(D, F, G),
        'programs.reachableModules.p4'(G, E, [], H),
        'lists':'lists.memberCheck.p2'(A, H).
'~programs.moduleImported.p3'(A, 'progDefs.modDef.f4'(_,B,C,D), E) :-
        'lists':'~lists.append.p3'(B, C, F),
        'lists':'~lists.append.p3'(D, F, G),
        '~programs.reachableModules.p4'(G, E, [], H),
        'lists':'~lists.memberCheck.p2'(A, H).
'programs.newProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.newProgram.p2.0'(A,B)).
'~programs.newProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.newProgram.p2.0'(A,B)).
'programs.newProgram.p2.0'(A, B) :-
        'programs.newProgramAux.p2'(B, A).
'~programs.newProgram.p2.0'(A, B) :-
        '~programs.newProgramAux.p2'(B, A).
'programs.nonVarCondition.p2'('metaDefs.var.f2'(A,B), 'progDefs.nonvar.f1'('metaDefs.var.f2'(A,B))).
'~programs.nonVarCondition.p2'('metaDefs.var.f2'(A,B), 'progDefs.nonvar.f1'('metaDefs.var.f2'(A,B))).
'programs.nonVarCondition.p2'('metaDefs.var.f1'(A), 'progDefs.nonvar.f1'('metaDefs.var.f1'(A))).
'~programs.nonVarCondition.p2'('metaDefs.var.f1'(A), 'progDefs.nonvar.f1'('metaDefs.var.f1'(A))).
'programs.predOrPropInLanguage.p3'('metaDefs.predicate.c0', A, B) :-
        'sharedPrograms':'sharedPrograms.predicateInLanguage.p4'(A, B, _, _).
'~programs.predOrPropInLanguage.p3'('metaDefs.predicate.c0', A, B) :-
        'sharedPrograms':'~sharedPrograms.predicateInLanguage.p4'(A, B, _, _).
'programs.predOrPropInLanguage.p3'('metaDefs.proposition.c0', A, B) :-
        'sharedPrograms':'sharedPrograms.propositionInLanguage.p2'(A, B).
'~programs.predOrPropInLanguage.p3'('metaDefs.proposition.c0', A, B) :-
        'sharedPrograms':'~sharedPrograms.propositionInLanguage.p2'(A, B).
'programs.orCondition.p3'(A, B, 'progDefs.or.f2'(A,B)).
'~programs.orCondition.p3'(A, B, 'progDefs.or.f2'(A,B)).
'programs.openStatementPredicate.p2'(B, A) :-
        user:goedel_freeze(nonvar(B), 'programs':'programs.openStatementPredicate.p2.1'(B,A)).
'~programs.openStatementPredicate.p2'(B, A) :-
        user:goedel_freeze(nonvar(B), 'programs':'~programs.openStatementPredicate.p2.1'(B,A)).
'programs.openStatementPredicate.p2.1'('metaDefs.<-''.f2'(A,B), C) :- !,
        user:goedel_freeze(nonvar(A), 'programs':'programs.openStatementPredicate.p2.0'('metaDefs.<-''.f2'(A,B),C)).
'~programs.openStatementPredicate.p2.1'('metaDefs.<-''.f2'(A,B), C) :- !,
        user:goedel_freeze(nonvar(A), 'programs':'~programs.openStatementPredicate.p2.0'('metaDefs.<-''.f2'(A,B),C)).
'programs.openStatementPredicate.p2.1'(A, B) :-
        'programs.openStatementPredicate.p2.0'(A, B).
'~programs.openStatementPredicate.p2.1'(A, B) :-
        '~programs.openStatementPredicate.p2.0'(A, B).
'programs.openStatementPredicate.p2.0'('metaDefs.<-''.f2'('metaDefs.pAtom.f1'(A),_), A).
'~programs.openStatementPredicate.p2.0'('metaDefs.<-''.f2'('metaDefs.pAtom.f1'(A),_), A).
'programs.openStatementPredicate.p2.0'('metaDefs.<-''.f2'('metaDefs.atom.f2'(A,_),_), A).
'~programs.openStatementPredicate.p2.0'('metaDefs.<-''.f2'('metaDefs.atom.f2'(A,_),_), A).
'programs.partAccessibility.p2'('programs.export.c0', 'progDefs.exported.c0').
'~programs.partAccessibility.p2'('programs.export.c0', 'progDefs.exported.c0').
'programs.partAccessibility.p2'('programs.closed.c0', 'progDefs.exported.c0').
'~programs.partAccessibility.p2'('programs.closed.c0', 'progDefs.exported.c0').
'programs.partAccessibility.p2'('programs.local.c0', 'progDefs.hidden.c0').
'~programs.partAccessibility.p2'('programs.local.c0', 'progDefs.hidden.c0').
'programs.partAccessibility.p2'('programs.module.c0', 'progDefs.hidden.c0').
'~programs.partAccessibility.p2'('programs.module.c0', 'progDefs.hidden.c0').
'programs.programBaseName.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A])and(ground([B])and ground([C]))or ground([D]), 'programs':'programs.programBaseName.p4.0'(A,B,C,D)).
'~programs.programBaseName.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A])and(ground([B])and ground([C]))or ground([D]), 'programs':'~programs.programBaseName.p4.0'(A,B,C,D)).
'programs.programBaseName.p4.0'(A, B, C, 'metaDefs.name.f4'(B,C,'metaDefs.base.c0',0)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, D),
        'programs.moduleInProgram.p2'(D, B).
'~programs.programBaseName.p4.0'(A, B, C, 'metaDefs.name.f4'(B,C,'metaDefs.base.c0',0)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, D),
        '~programs.moduleInProgram.p2'(D, B).
'programs.predicateInModule.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.predicateInModule.p7.0'(A,B,C,D,E,F,G)).
'~programs.predicateInModule.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.predicateInModule.p7.0'(A,B,C,D,E,F,G)).
'programs.predicateInModule.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'programCache.unCacheProgram.p2'(A, H),
        'programs.cModulePart.p2'(C, I),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(H, B, I),
        'programs.modulePartLanguage.p4'(I, B, H, J),
        'sharedPrograms':'sharedPrograms.predicateInLanguage.p4'(D, J, E, F),
        D='metaDefs.name.f4'(G,_,_,_).
'~programs.predicateInModule.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, H),
        '~programs.cModulePart.p2'(C, I),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(H, B, I),
        '~programs.modulePartLanguage.p4'(I, B, H, J),
        'sharedPrograms':'~sharedPrograms.predicateInLanguage.p4'(D, J, E, F),
        D='metaDefs.name.f4'(G,_,_,_).
'programs.programConstantName.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A])and(ground([B])and ground([C]))or ground([D]), 'programs':'programs.programConstantName.p4.0'(A,B,C,D)).
'~programs.programConstantName.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A])and(ground([B])and ground([C]))or ground([D]), 'programs':'~programs.programConstantName.p4.0'(A,B,C,D)).
'programs.programConstantName.p4.0'(A, B, C, 'metaDefs.name.f4'(B,C,'metaDefs.constant.c0',0)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, D),
        'programs.moduleInProgram.p2'(D, B).
'~programs.programConstantName.p4.0'(A, B, C, 'metaDefs.name.f4'(B,C,'metaDefs.constant.c0',0)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, D),
        '~programs.moduleInProgram.p2'(D, B).
'programs.programFunctionName.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A])and(ground([B])and(ground([C])and ground([D])))or ground([E]), 'programs':'programs.programFunctionName.p5.0'(A,B,C,D,E)).
'~programs.programFunctionName.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A])and(ground([B])and(ground([C])and ground([D])))or ground([E]), 'programs':'~programs.programFunctionName.p5.0'(A,B,C,D,E)).
'programs.programFunctionName.p5.0'(A, B, C, D, 'metaDefs.name.f4'(B,C,'metaDefs.function.c0',D)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'programs.moduleInProgram.p2'(E, B).
'~programs.programFunctionName.p5.0'(A, B, C, D, 'metaDefs.name.f4'(B,C,'metaDefs.function.c0',D)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        '~programs.moduleInProgram.p2'(E, B).
'programs.programFormulaToString.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.programFormulaToString.p4.0'(A,B,C,D)).
'~programs.programFormulaToString.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.programFormulaToString.p4.0'(A,B,C,D)).
'programs.programFormulaToString.p4.0'(A, B, C, D) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'sharedPrograms':'sharedPrograms.sProgramFormulaToString.p4'(E, B, C, D).
'~programs.programFormulaToString.p4.0'(A, B, C, D) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        'sharedPrograms':'~sharedPrograms.sProgramFormulaToString.p4'(E, B, C, D).
'programs.programPropositionName.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A])and(ground([B])and ground([C]))or ground([D]), 'programs':'programs.programPropositionName.p4.0'(A,B,C,D)).
'~programs.programPropositionName.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A])and(ground([B])and ground([C]))or ground([D]), 'programs':'~programs.programPropositionName.p4.0'(A,B,C,D)).
'programs.programPropositionName.p4.0'(A, B, C, 'metaDefs.name.f4'(B,C,'metaDefs.proposition.c0',0)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, D),
        'programs.moduleInProgram.p2'(D, B).
'~programs.programPropositionName.p4.0'(A, B, C, 'metaDefs.name.f4'(B,C,'metaDefs.proposition.c0',0)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, D),
        '~programs.moduleInProgram.p2'(D, B).
'programs.programPredicateName.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A])and(ground([B])and(ground([C])and ground([D])))or ground([E]), 'programs':'programs.programPredicateName.p5.0'(A,B,C,D,E)).
'~programs.programPredicateName.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A])and(ground([B])and(ground([C])and ground([D])))or ground([E]), 'programs':'~programs.programPredicateName.p5.0'(A,B,C,D,E)).
'programs.programPredicateName.p5.0'(A, B, C, D, 'metaDefs.name.f4'(B,C,'metaDefs.predicate.c0',D)) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'programs.moduleInProgram.p2'(E, B).
'~programs.programPredicateName.p5.0'(A, B, C, D, 'metaDefs.name.f4'(B,C,'metaDefs.predicate.c0',D)) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        '~programs.moduleInProgram.p2'(E, B).
'programs.stringToProgramTerm.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.stringToProgramTerm.p4.0'(A,B,C,D)).
'~programs.stringToProgramTerm.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.stringToProgramTerm.p4.0'(A,B,C,D)).
'programs.stringToProgramTerm.p4.0'(A, B, C, D) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'programs.stringToProgramTermAux.p4'(E, B, C, D).
'~programs.stringToProgramTerm.p4.0'(A, B, C, D) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        '~programs.stringToProgramTermAux.p4'(E, B, C, D).
'programs.statementInModule.p3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.statementInModule.p3.0'(A,B,C)).
'~programs.statementInModule.p3'(A, B, C) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.statementInModule.p3.0'(A,B,C)).
'programs.statementInModule.p3.0'(A, B, C) :-
        'programCache':'programCache.unCacheProgram.p2'(A, D),
        'programs.openStatementPredicate.p2'(C, E),
        'programs.definitionInProgram.p4'(D, B, E, F),
        'lists':'lists.member.p2'(C, F).
'~programs.statementInModule.p3.0'(A, B, C) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, D),
        '~programs.openStatementPredicate.p2'(C, E),
        '~programs.definitionInProgram.p4'(D, B, E, F),
        'lists':'~lists.member.p2'(C, F).
'programs.propositionInModule.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.propositionInModule.p5.0'(A,B,C,D,E)).
'~programs.propositionInModule.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.propositionInModule.p5.0'(A,B,C,D,E)).
'programs.propositionInModule.p5.0'(A, B, C, D, E) :-
        'programCache':'programCache.unCacheProgram.p2'(A, F),
        'programs.cModulePart.p2'(C, G),
        'sharedPrograms':'sharedPrograms.modulePartInProgram.p3'(F, B, G),
        'programs.modulePartLanguage.p4'(G, B, F, H),
        'sharedPrograms':'sharedPrograms.propositionInLanguage.p2'(D, H),
        D='metaDefs.name.f4'(E,_,_,_).
'~programs.propositionInModule.p5.0'(A, B, C, D, E) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, F),
        '~programs.cModulePart.p2'(C, G),
        'sharedPrograms':'~sharedPrograms.modulePartInProgram.p3'(F, B, G),
        '~programs.modulePartLanguage.p4'(G, B, F, H),
        'sharedPrograms':'~sharedPrograms.propositionInLanguage.p2'(D, H),
        D='metaDefs.name.f4'(E,_,_,_).
'programs.programTypeToString.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.programTypeToString.p4.0'(A,B,C,D)).
'~programs.programTypeToString.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.programTypeToString.p4.0'(A,B,C,D)).
'programs.programTypeToString.p4.0'(A, B, C, D) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'sharedPrograms':'sharedPrograms.sProgramTypeToString.p4'(E, B, C, D).
'~programs.programTypeToString.p4.0'(A, B, C, D) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        'sharedPrograms':'~sharedPrograms.sProgramTypeToString.p4'(E, B, C, D).
'programs.runnableAtom.p2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'programs':'programs.runnableAtom.p2.0'(A,B)).
'~programs.runnableAtom.p2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'programs':'~programs.runnableAtom.p2.0'(A,B)).
'programs.runnableAtom.p2.0'(A, B) :-
        'programCache':'programCache.unCacheProgram.p2'(A, C),
        'programs.declaredInOpenModule.p3'(C, D, B),
        'syntax':'syntax.predicateAtom.p3'(B, E, _),
        'programs.controlInProgram.p5'(C, D, E, F, G),
        user:goedel_freeze(ground([B,G,F]), if(('programs':'~programs.applicableDelay.p5'(F,G,B,H,I),true),('syntax':'syntax.renameFormulas.p3'([H],[B],[J]),'programs':'programs.instanceOfHead.p3'(H,J,K),'programs':'programs.conditionSatisfied.p2'(I,K)),true)).
'~programs.runnableAtom.p2.0'(A, B) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, C),
        '~programs.declaredInOpenModule.p3'(C, D, B),
        'syntax':'~syntax.predicateAtom.p3'(B, E, _),
        '~programs.controlInProgram.p5'(C, D, E, F, G),
        user:goedel_freeze(ground([B,G,F]), if(('programs':'~programs.applicableDelay.p5'(F,G,B,H,I),true),('syntax':'~syntax.renameFormulas.p3'([H],[B],[J]),'programs':'~programs.instanceOfHead.p3'(H,J,K),'programs':'~programs.conditionSatisfied.p2'(I,K)),true)).
'programs.rightHandType.p4'('metaDefs.bType.f1'(A), B, C, D) :-
        'programs.baseInModule.p5'(B, C, D, A, C).
'~programs.rightHandType.p4'('metaDefs.bType.f1'(A), B, C, D) :-
        '~programs.baseInModule.p5'(B, C, D, A, C).
'programs.rightHandType.p4'('metaDefs.type.f2'(A,_), B, C, D) :-
        'programs.constructorInModule.p6'(B, C, D, A, _, C).
'~programs.rightHandType.p4'('metaDefs.type.f2'(A,_), B, C, D) :-
        '~programs.constructorInModule.p6'(B, C, D, A, _, C).
'programs.stringToCondition.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'programs.stringToCondition.p2.0'(A,B)).
'~programs.stringToCondition.p2'(A, B) :-
        user:goedel_freeze(ground([A]), 'programs':'~programs.stringToCondition.p2.0'(A,B)).
'programs.stringToCondition.p2.0'(A, B) :-
        'sharedPrograms':'sharedPrograms.sStringToCondition.p2'(A, B).
'~programs.stringToCondition.p2.0'(A, B) :-
        'sharedPrograms':'~sharedPrograms.sStringToCondition.p2'(A, B).
'programs.statementMatchAtom.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,C]), 'programs':'programs.statementMatchAtom.p4.0'(A,B,C,D)).
'~programs.statementMatchAtom.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,C]), 'programs':'~programs.statementMatchAtom.p4.0'(A,B,C,D)).
'programs.statementMatchAtom.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'programCache.getCachedProgram.p2'(A, E),
        'programs.statementMatchAtom.p4'(E, B, C, D).
'~programs.statementMatchAtom.p4.0'('progDefs.cachedProgram.f1'(A), B, C, D) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, E),
        '~programs.statementMatchAtom.p4'(E, B, C, D).
'programs.statementMatchAtom.p4.0'('progDefs.program.f4'(_,A,B,C), D, E, F) :-
        'syntax':'syntax.atom.p1'(E),
        'syntax':'syntax.emptyVarTyping.p1'(G),
        'sharedPrograms':'sharedPrograms.formulaInLanguage.p4'(E, B, G, _),
        'programs.topLevelName.p2'(E, 'metaDefs.name.f4'(D,H,_,I)),
        'sharedPrograms':'sharedPrograms.openModuleAux.p2'(A, D),
        'avlTrees':'avlTrees.avlSearch.p3'(C, D, 'progDefs.code.f2'(_,J)),
        'avlTrees':'avlTrees.avlSearch.p3'(J, H, K),
        'lists':'lists.memberCheck.p2'('progDefs.predDef.f4'(I,L,_,_), K),
        'lists':'lists.member.p2'(F, L).
'~programs.statementMatchAtom.p4.0'('progDefs.program.f4'(_,A,B,C), D, E, F) :-
        'syntax':'~syntax.atom.p1'(E),
        'syntax':'~syntax.emptyVarTyping.p1'(G),
        'sharedPrograms':'~sharedPrograms.formulaInLanguage.p4'(E, B, G, _),
        '~programs.topLevelName.p2'(E, 'metaDefs.name.f4'(D,H,_,I)),
        'sharedPrograms':'~sharedPrograms.openModuleAux.p2'(A, D),
        'avlTrees':'~avlTrees.avlSearch.p3'(C, D, 'progDefs.code.f2'(_,J)),
        'avlTrees':'~avlTrees.avlSearch.p3'(J, H, K),
        'lists':'~lists.memberCheck.p2'('progDefs.predDef.f4'(I,L,_,_), K),
        'lists':'~lists.member.p2'(F, L).
'programs.statementInModuleLanguage.p3'(A, B, C) :-
        'sharedPrograms':'sharedPrograms.moduleLanguage.p3'(A, B, D),
        'sharedPrograms':'sharedPrograms.statementInLanguage.p5'(C, D, _, _, []).
'~programs.statementInModuleLanguage.p3'(A, B, C) :-
        'sharedPrograms':'~sharedPrograms.moduleLanguage.p3'(A, B, D),
        'sharedPrograms':'~sharedPrograms.statementInLanguage.p5'(C, D, _, _, []).
'programs.stringToProgramFormula.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.stringToProgramFormula.p4.0'(A,B,C,D)).
'~programs.stringToProgramFormula.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.stringToProgramFormula.p4.0'(A,B,C,D)).
'programs.stringToProgramFormula.p4.0'(A, B, C, D) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'programs.stringToProgramFormulaAux.p4'(E, B, C, D).
'~programs.stringToProgramFormula.p4.0'(A, B, C, D) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        '~programs.stringToProgramFormulaAux.p4'(E, B, C, D).
'programs.termInProgram.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.termInProgram.p5.0'(A,B,C,D,E)).
'~programs.termInProgram.p5'(A, B, C, D, E) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.termInProgram.p5.0'(A,B,C,D,E)).
'programs.termInProgram.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'programCache.getCachedProgram.p2'(A, F),
        'programs.termInProgram.p5'(F, B, C, D, E).
'~programs.termInProgram.p5.0'('progDefs.cachedProgram.f1'(A), B, C, D, E) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, F),
        '~programs.termInProgram.p5'(F, B, C, D, E).
'programs.termInProgram.p5.0'('progDefs.program.f4'(_,_,A,_), B, C, D, E) :-
        'sharedPrograms':'sharedPrograms.termInLanguage.p5'(C, A, B, E, D).
'~programs.termInProgram.p5.0'('progDefs.program.f4'(_,_,A,_), B, C, D, E) :-
        'sharedPrograms':'~sharedPrograms.termInLanguage.p5'(C, A, B, E, D).
'programs.symbolFreeInModule.p3'(A, B, 'progDefs.program.f4'(_,_,_,C)) :-
        'avlTrees':'avlTrees.avlSearch.p3'(C, A, 'progDefs.code.f2'(_,D)),
        user:goedel_freeze(ground([B,D]), user:goedel_not((('avlTrees':'~avlTrees.avlMember.p3'(D,_,E),'lists':'~lists.member.p2'('progDefs.predDef.f4'(_,F,G,H),E)),('lists':'~lists.member.p2'(I,F),'programs':'~programs.symbolInFormula.p2'(I,B);'lists':'~lists.member.p2'(J,G),'programs':'~programs.symbolInDelay.p2'(J,B);'lists':'~lists.member.p2'(K,H),'programs':'~programs.symbolInDelay.p2'(K,B))))).
'~programs.symbolFreeInModule.p3'(A, B, 'progDefs.program.f4'(_,_,_,C)) :-
        'avlTrees':'~avlTrees.avlSearch.p3'(C, A, 'progDefs.code.f2'(_,D)),
        user:goedel_freeze(ground([B,D]), user:goedel_not((('avlTrees':'~avlTrees.avlMember.p3'(D,_,E),'lists':'~lists.member.p2'('progDefs.predDef.f4'(_,F,G,H),E)),('lists':'~lists.member.p2'(I,F),'programs':'~programs.symbolInFormula.p2'(I,B);'lists':'~lists.member.p2'(J,G),'programs':'~programs.symbolInDelay.p2'(J,B);'lists':'~lists.member.p2'(K,H),'programs':'~programs.symbolInDelay.p2'(K,B))))).
'programs.succeed.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'programs':'programs.succeed.p3.0'(A,B,C)).
'~programs.succeed.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'programs':'~programs.succeed.p3.0'(A,B,C)).
'programs.succeed.p3.0'(A, B, C) :-
        'programCache':'programCache.unCacheProgram.p2'(A, D),
        'sharedPrograms':'sharedPrograms.programLanguage.p2'(D, E),
        'sharedPrograms':'sharedPrograms.meltedBodyTyping.p8'(B, E, [], _, _, [], [], []),
        'programs.compileObjectProgram.p1'(D),
        'syntax':'syntax.formulaMaxVarIndex.p2'([B], F),
        'syntax':'syntax.emptyTermSubst.p1'(G),
        'programs.runGoal.p6'(B, F, G, C, _, _).
'~programs.succeed.p3.0'(A, B, C) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, D),
        'sharedPrograms':'~sharedPrograms.programLanguage.p2'(D, E),
        'sharedPrograms':'~sharedPrograms.meltedBodyTyping.p8'(B, E, [], _, _, [], [], []),
        '~programs.compileObjectProgram.p1'(D),
        'syntax':'~syntax.formulaMaxVarIndex.p2'([B], F),
        'syntax':'~syntax.emptyTermSubst.p1'(G),
        '~programs.runGoal.p6'(B, F, G, C, _, _).
'programs.stringToProgramType.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'programs.stringToProgramType.p4.0'(A,B,C,D)).
'~programs.stringToProgramType.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C]), 'programs':'~programs.stringToProgramType.p4.0'(A,B,C,D)).
'programs.stringToProgramType.p4.0'(A, B, C, D) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'programs.stringToProgramTypeAux.p4'(E, B, C, D).
'~programs.stringToProgramType.p4.0'(A, B, C, D) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        '~programs.stringToProgramTypeAux.p4'(E, B, C, D).
'programs.succeedAll.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'programs':'programs.succeedAll.p3.0'(A,B,C)).
'~programs.succeedAll.p3'(A, B, C) :-
        user:goedel_freeze(ground([A,B]), 'programs':'~programs.succeedAll.p3.0'(A,B,C)).
'programs.succeedAll.p3.0'(A, B, C) :-
        'programCache':'programCache.unCacheProgram.p2'(A, D),
        'sharedPrograms':'sharedPrograms.programLanguage.p2'(D, E),
        'sharedPrograms':'sharedPrograms.meltedBodyTyping.p8'(B, E, [], _, _, [], [], []),
        'programs.compileObjectProgram.p1'(D),
        'syntax':'syntax.formulaMaxVarIndex.p2'([B], F),
        'syntax':'syntax.emptyTermSubst.p1'(G),
        'programs.runAllGoal.p6'(B, F, G, C, _, _).
'~programs.succeedAll.p3.0'(A, B, C) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, D),
        'sharedPrograms':'~sharedPrograms.programLanguage.p2'(D, E),
        'sharedPrograms':'~sharedPrograms.meltedBodyTyping.p8'(B, E, [], _, _, [], [], []),
        '~programs.compileObjectProgram.p1'(D),
        'syntax':'~syntax.formulaMaxVarIndex.p2'([B], F),
        'syntax':'~syntax.emptyTermSubst.p1'(G),
        '~programs.runAllGoal.p6'(B, F, G, C, _, _).
'programs.symbolInTermList.p2'([A|B], C) :-
        (   'programs.symbolInTerm.p2'(A, C)
        ;   'programs.symbolInTermList.p2'(B, C)
        ).
'~programs.symbolInTermList.p2'([A|B], C) :-
        (   '~programs.symbolInTerm.p2'(A, C)
        ;   '~programs.symbolInTermList.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.pAtom.f1'(A), A).
'~programs.symbolInFormula.p2'('metaDefs.pAtom.f1'(A), A).
'programs.symbolInFormula.p2'('metaDefs.atom.f2'(A,B), C) :-
        (   C=A
        ;   'programs.symbolInTermList.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.atom.f2'(A,B), C) :-
        (   C=A
        ;   '~programs.symbolInTermList.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.~''.f1'(A), B) :-
        'programs.symbolInFormula.p2'(A, B).
'~programs.symbolInFormula.p2'('metaDefs.~''.f1'(A), B) :-
        '~programs.symbolInFormula.p2'(A, B).
'programs.symbolInFormula.p2'('metaDefs.&''.f2'(A,B), C) :-
        (   'programs.symbolInFormula.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.&''.f2'(A,B), C) :-
        (   '~programs.symbolInFormula.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.\\/''.f2'(A,B), C) :-   % added \ djd
        (   'programs.symbolInFormula.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.\\/''.f2'(A,B), C) :-  % added \ djd
        (   '~programs.symbolInFormula.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.->''.f2'(A,B), C) :-
        (   'programs.symbolInFormula.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.->''.f2'(A,B), C) :-
        (   '~programs.symbolInFormula.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.<-''.f2'(A,B), C) :-
        (   'programs.symbolInFormula.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.<-''.f2'(A,B), C) :-
        (   '~programs.symbolInFormula.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.<->''.f2'(A,B), C) :-
        (   'programs.symbolInFormula.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.<->''.f2'(A,B), C) :-
        (   '~programs.symbolInFormula.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.all.f2'(_,A), B) :-
        'programs.symbolInFormula.p2'(A, B).
'~programs.symbolInFormula.p2'('metaDefs.all.f2'(_,A), B) :-
        '~programs.symbolInFormula.p2'(A, B).
'programs.symbolInFormula.p2'('metaDefs.some.f2'(_,A), B) :-
        'programs.symbolInFormula.p2'(A, B).
'~programs.symbolInFormula.p2'('metaDefs.some.f2'(_,A), B) :-
        '~programs.symbolInFormula.p2'(A, B).
'programs.symbolInFormula.p2'('metaDefs.iSTE.f4'(_,A,B,C), D) :-
        (   'programs.symbolInFormula.p2'(A, D)
        ;   'programs.symbolInFormula.p2'(B, D)
        ;   'programs.symbolInFormula.p2'(C, D)
        ).
'~programs.symbolInFormula.p2'('metaDefs.iSTE.f4'(_,A,B,C), D) :-
        (   '~programs.symbolInFormula.p2'(A, D)
        ;   '~programs.symbolInFormula.p2'(B, D)
        ;   '~programs.symbolInFormula.p2'(C, D)
        ).
'programs.symbolInFormula.p2'('metaDefs.iTE.f3'(A,B,C), D) :-
        (   'programs.symbolInFormula.p2'(A, D)
        ;   'programs.symbolInFormula.p2'(B, D)
        ;   'programs.symbolInFormula.p2'(C, D)
        ).
'~programs.symbolInFormula.p2'('metaDefs.iTE.f3'(A,B,C), D) :-
        (   '~programs.symbolInFormula.p2'(A, D)
        ;   '~programs.symbolInFormula.p2'(B, D)
        ;   '~programs.symbolInFormula.p2'(C, D)
        ).
'programs.symbolInFormula.p2'('metaDefs.iST.f3'(_,A,B), C) :-
        (   'programs.symbolInFormula.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.iST.f3'(_,A,B), C) :-
        (   '~programs.symbolInFormula.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.symbolInFormula.p2'('metaDefs.iT.f2'(A,B), C) :-
        (   'programs.symbolInFormula.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInFormula.p2'('metaDefs.iT.f2'(A,B), C) :-
        (   '~programs.symbolInFormula.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.symbolInDelay.p2'('progDefs.delay.f2'(A,_), B) :-
        'programs.symbolInFormula.p2'(A, B).
'~programs.symbolInDelay.p2'('progDefs.delay.f2'(A,_), B) :-
        '~programs.symbolInFormula.p2'(A, B).
'programs.symbolInTerm.p2'('metaDefs.cTerm.f1'(A), A).
'~programs.symbolInTerm.p2'('metaDefs.cTerm.f1'(A), A).
'programs.symbolInTerm.p2'('metaDefs.term.f2'(A,B), C) :-
        (   A=C
        ;   'programs.symbolInTermList.p2'(B, C)
        ).
'~programs.symbolInTerm.p2'('metaDefs.term.f2'(A,B), C) :-
        (   A=C
        ;   '~programs.symbolInTermList.p2'(B, C)
        ).
'programs.symbolInTerm.p2'('metaDefs.suchThat.f2'(A,B), C) :-
        (   'programs.symbolInTerm.p2'(A, C)
        ;   'programs.symbolInFormula.p2'(B, C)
        ).
'~programs.symbolInTerm.p2'('metaDefs.suchThat.f2'(A,B), C) :-
        (   '~programs.symbolInTerm.p2'(A, C)
        ;   '~programs.symbolInFormula.p2'(B, C)
        ).
'programs.termInModule.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'programs.termInModule.p7.0'(A,B,C,D,E,F,G)).
'~programs.termInModule.p7'(A, B, C, D, E, F, G) :-
        user:goedel_freeze(ground([A,B,C,D,E]), 'programs':'~programs.termInModule.p7.0'(A,B,C,D,E,F,G)).
'programs.termInModule.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'programCache.unCacheProgram.p2'(A, H),
        'programs.cModulePart.p2'(C, I),
        'programs.modulePartLanguage.p4'(I, B, H, J),
        'sharedPrograms':'sharedPrograms.termInLanguage.p5'(E, J, D, G, F).
'~programs.termInModule.p7.0'(A, B, C, D, E, F, G) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, H),
        '~programs.cModulePart.p2'(C, I),
        '~programs.modulePartLanguage.p4'(I, B, H, J),
        'sharedPrograms':'~sharedPrograms.termInLanguage.p5'(E, J, D, G, F).
'programs.typeInModule.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'programs.typeInModule.p4.0'(A,B,C,D)).
'~programs.typeInModule.p4'(A, B, C, D) :-
        user:goedel_freeze(ground([A,B,C,D]), 'programs':'~programs.typeInModule.p4.0'(A,B,C,D)).
'programs.typeInModule.p4.0'(A, B, C, D) :-
        'programCache':'programCache.unCacheProgram.p2'(A, E),
        'programs.cModulePart.p2'(C, F),
        'programs.modulePartLanguage.p4'(F, B, E, G),
        'sharedPrograms':'sharedPrograms.typeInLanguage.p2'(D, G).
'~programs.typeInModule.p4.0'(A, B, C, D) :-
        'programCache':'~programCache.unCacheProgram.p2'(A, E),
        '~programs.cModulePart.p2'(C, F),
        '~programs.modulePartLanguage.p4'(F, B, E, G),
        'sharedPrograms':'~sharedPrograms.typeInLanguage.p2'(D, G).
'programs.topLevelName.p2'(A, B) :-
        user:goedel_freeze(nonvar(A), 'programs':'programs.topLevelName.p2.0'(A,B)).
'~programs.topLevelName.p2'(A, B) :-
        user:goedel_freeze(nonvar(A), 'programs':'~programs.topLevelName.p2.0'(A,B)).
'programs.topLevelName.p2.0'('metaDefs.pAtom.f1'(A), A).
'~programs.topLevelName.p2.0'('metaDefs.pAtom.f1'(A), A).
'programs.topLevelName.p2.0'('metaDefs.atom.f2'(A,_), A).
'~programs.topLevelName.p2.0'('metaDefs.atom.f2'(A,_), A).
'programs.topLevelName.p2.0'('metaDefs.xPAtom.f1'(A), A).
'~programs.topLevelName.p2.0'('metaDefs.xPAtom.f1'(A), A).
'programs.topLevelName.p2.0'('metaDefs.xAtom.f2'(A,_), A).
'~programs.topLevelName.p2.0'('metaDefs.xAtom.f2'(A,_), A).
'programs.trueCondition.p1'('progDefs.trueCond.c0').
'~programs.trueCondition.p1'('progDefs.trueCond.c0').
'programs.typeSymbolInType.p2'('metaDefs.bType.f1'(A), A).
'~programs.typeSymbolInType.p2'('metaDefs.bType.f1'(A), A).
'programs.typeSymbolInType.p2'('metaDefs.type.f2'(A,B), C) :-
        (   A=C
        ;   'programs.typeSymbolInTypeList.p2'(B, C)
        ).
'~programs.typeSymbolInType.p2'('metaDefs.type.f2'(A,B), C) :-
        (   A=C
        ;   '~programs.typeSymbolInTypeList.p2'(B, C)
        ).
'programs.typeSymbolFreeInModule.p3'(A, B, 'progDefs.program.f4'(_,_,'progDefs.language.f1'(C),_)) :-
        'avlTrees':'avlTrees.avlSearch.p3'(C, A, 'progDefs.module.f3'(_,'progDefs.categories.f2'(_,D),_)),
        user:goedel_freeze(ground([B,D]), user:goedel_not(user:goedel_freeze(ground([F,B,D]),user:goedel_not(((user:goedel_freeze(ground([E,D]),user:goedel_not('avlTrees':'~avlTrees.avlMember.p3'(D,_,E)));user:goedel_freeze(ground([F,E]),user:goedel_not('lists':'~lists.member.p2'('progDefs.symbol.f2'(_,F),E))));user:goedel_freeze(ground([F,B]),user:goedel_not('programs':'~programs.typeSymbolInDeclaration.p2'(F,B)))))))).
'~programs.typeSymbolFreeInModule.p3'(A, B, 'progDefs.program.f4'(_,_,'progDefs.language.f1'(C),_)) :-
        'avlTrees':'~avlTrees.avlSearch.p3'(C, A, 'progDefs.module.f3'(_,'progDefs.categories.f2'(_,D),_)),
        user:goedel_freeze(ground([B,D]), user:goedel_not(user:goedel_freeze(ground([F,B,D]),user:goedel_not(((user:goedel_freeze(ground([E,D]),user:goedel_not('avlTrees':'~avlTrees.avlMember.p3'(D,_,E)));user:goedel_freeze(ground([F,E]),user:goedel_not('lists':'~lists.member.p2'('progDefs.symbol.f2'(_,F),E))));user:goedel_freeze(ground([F,B]),user:goedel_not('programs':'~programs.typeSymbolInDeclaration.p2'(F,B)))))))).
'programs.typeInProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'programs':'programs.typeInProgram.p2.0'(A,B)).
'~programs.typeInProgram.p2'(A, B) :-
        user:goedel_freeze(ground([A,B]), 'programs':'~programs.typeInProgram.p2.0'(A,B)).
'programs.typeInProgram.p2.0'('progDefs.cachedProgram.f1'(A), B) :-
        'programCache':'programCache.getCachedProgram.p2'(A, C),
        'programs.typeInProgram.p2'(C, B).
'~programs.typeInProgram.p2.0'('progDefs.cachedProgram.f1'(A), B) :-
        'programCache':'~programCache.getCachedProgram.p2'(A, C),
        '~programs.typeInProgram.p2'(C, B).
'programs.typeInProgram.p2.0'('progDefs.program.f4'(_,_,A,_), B) :-
        'sharedPrograms':'sharedPrograms.typeInLanguage.p2'(B, A).
'~programs.typeInProgram.p2.0'('progDefs.program.f4'(_,_,A,_), B) :-
        'sharedPrograms':'~sharedPrograms.typeInLanguage.p2'(B, A).
'programs.typeSymbolInDeclaration.p2'('progDefs.constantDecl.f1'(A), B) :-
        'programs.typeSymbolInType.p2'(A, B).
'~programs.typeSymbolInDeclaration.p2'('progDefs.constantDecl.f1'(A), B) :-
        '~programs.typeSymbolInType.p2'(A, B).
'programs.typeSymbolInDeclaration.p2'('progDefs.functionDecl.f4'(_,_,A,B), C) :-
        (   'programs.typeSymbolInTypeList.p2'(A, C)
        ;   'programs.typeSymbolInType.p2'(B, C)
        ).
'~programs.typeSymbolInDeclaration.p2'('progDefs.functionDecl.f4'(_,_,A,B), C) :-
        (   '~programs.typeSymbolInTypeList.p2'(A, C)
        ;   '~programs.typeSymbolInType.p2'(B, C)
        ).
'programs.typeSymbolInDeclaration.p2'('progDefs.predicateDecl.f3'(_,_,A), B) :-
        'programs.typeSymbolInTypeList.p2'(A, B).
'~programs.typeSymbolInDeclaration.p2'('progDefs.predicateDecl.f3'(_,_,A), B) :-
        '~programs.typeSymbolInTypeList.p2'(A, B).
'programs.unreferencedModule.p2'(A, B) :-
        user:goedel_freeze(ground([E,A,B]), user:goedel_not(('avlTrees':'~avlTrees.avlMember.p3'(B,_,'progDefs.modDef.f4'(_,C,D,E)),('lists':'~lists.member.p2'(A,D);'lists':'~lists.member.p2'(A,C);'lists':'~lists.member.p2'(A,E))))).
'~programs.unreferencedModule.p2'(A, B) :-
        user:goedel_freeze(ground([E,A,B]), user:goedel_not(('avlTrees':'~avlTrees.avlMember.p3'(B,_,'progDefs.modDef.f4'(_,C,D,E)),('lists':'~lists.member.p2'(A,D);'lists':'~lists.member.p2'(A,C);'lists':'~lists.member.p2'(A,E))))).
'programs.typeSymbolInTypeList.p2'([A|B], C) :-
        (   'programs.typeSymbolInType.p2'(A, C)
        ;   'programs.typeSymbolInTypeList.p2'(B, C)
        ).
'~programs.typeSymbolInTypeList.p2'([A|B], C) :-
        (   '~programs.typeSymbolInType.p2'(A, C)
        ;   '~programs.typeSymbolInTypeList.p2'(B, C)
        ).
'programs.validDeclaration.p4'('progDefs.baseDecl.c0', _, _, _).
'~programs.validDeclaration.p4'('progDefs.baseDecl.c0', _, _, _).
'programs.validDeclaration.p4'('progDefs.constructorDecl.f1'(_), _, _, _).
'~programs.validDeclaration.p4'('progDefs.constructorDecl.f1'(_), _, _, _).
'programs.validDeclaration.p4'('progDefs.constantDecl.f1'(A), B, C, D) :-
        'programs.typeInModule.p4'(B, C, D, A),
        'programs.rightHandType.p4'(A, B, C, D).
'~programs.validDeclaration.p4'('progDefs.constantDecl.f1'(A), B, C, D) :-
        '~programs.typeInModule.p4'(B, C, D, A),
        '~programs.rightHandType.p4'(A, B, C, D).
'programs.validDeclaration.p4'('progDefs.functionDecl.f4'(_,_,A,B), C, D, E) :-
        'programs.listTypesInModule.p4'(C, D, E, [B|A]),
        'programs.rightHandType.p4'(B, C, D, E),
        'programs.transparent.p2'(A, B).
'~programs.validDeclaration.p4'('progDefs.functionDecl.f4'(_,_,A,B), C, D, E) :-
        '~programs.listTypesInModule.p4'(C, D, E, [B|A]),
        '~programs.rightHandType.p4'(B, C, D, E),
        '~programs.transparent.p2'(A, B).
'programs.validDeclaration.p4'('progDefs.propositionDecl.c0', _, _, _).
'~programs.validDeclaration.p4'('progDefs.propositionDecl.c0', _, _, _).
'programs.validDeclaration.p4'('progDefs.predicateDecl.f3'(_,_,A), B, C, D) :-
        'programs.listTypesInModule.p4'(B, C, D, A).
'~programs.validDeclaration.p4'('progDefs.predicateDecl.f3'(_,_,A), B, C, D) :-
        '~programs.listTypesInModule.p4'(B, C, D, A).
%------------------------------------------------------------------------------
% Supplementary Prolog routines for system module Program
%------------------------------------------------------------------------------
%------------------------------------------------------------------------------
% String to Ground Representation conversion
%------------------------------------------------------------------------------

'programs.stringToProgramTypeAux.p4'(Program, Module, String, [Type]) :-
   name(String, [34|Chars]),   % 34 for "
   user:append(Chars, [39], Chars1),   % 39 for '
   user:get_one_item_2nd_aux(Chars1, Remains, Tokens),
   Remains = [],
   user:'parserprograms.localSymbolTable.p3'(Program, Module, SymbolTable),
   user:declared_type(Tokens, RestTokens, [], Type, _ModuleName, 0, 0,
			SymbolTable, donot_print),
   Type \== null,
   RestTokens = [].

'~programs.stringToProgramTypeAux.p4'(Program, Module, String, Types) :-
   'programs.stringToProgramTypeAux.p4'(Program, Module, String, Types).

%------------------------------------------------------------------------------
 
'programs.stringToProgramTermAux.p4'(Program, Module, String, Terms) :-
   name(String, [34|Chars]),   % 34 for "
   user:append(Chars, [46], Chars1),  % 46 for .
   user:get_one_item_2nd_aux(Chars1, Remains, Tokens),
   Remains = [],
   user:'parserprograms.localSymbolTable.p3'(Program, Module, SymbolTable),
   user:term(Tokens, Return, SymbolTable),
   ( user:select_return(Return, null, Terms2, Remains, _ErrorReturn)
     -> Remains = []
     ;  format(user_error, 'Internal error No 29.~n', [])
   ),
   Terms2 = [_|_],
   user:'sharedPrograms.programLanguage.p2'(Program, Language),
   user:'parserprograms.checkTermAux.p6'(Terms2, Language, 0, [], Terms, []).

'~programs.stringToProgramTermAux.p4'(Program, Module, String, Terms) :-
   'programs.stringToProgramTermAux.p4'(Program, Module, String, Terms).

%------------------------------------------------------------------------------
 
% OFormula ::= Statement | Body | Goal
% NB: the colon notation for Goal is not accepted

'programs.stringToProgramFormulaAux.p4'(Program, Module, String, Formulae) :-
   name(String, [34|Chars]),   % 34 for "
   user:append(Chars, [46], Chars1),  % 46 for .
   user:get_one_item_2nd_aux(Chars1, Rest, Tokens),
   Rest= [],
   user:'parserprograms.localSymbolTable.p3'(Program, Module, SymbolTable),
   ( Tokens = [graphic_name('<-')|Tokens2]
     -> ( Tokens2 = []
	  -> CFormulae = ['metaDefs.<-''.f2'('metaDefs.empty.c0','metaDefs.empty.c0')]
	  ;  user:body(Tokens2, CFormulae2, _ErrorReturn1, SymbolTable),
             CFormulae2 = [_|_],
	     user:create_formula('metaDefs.<-''.f2',
			[['metaDefs.empty.c0'], CFormulae2], CFormulae)
	)
     ;  user:headatom(Tokens, Remains, Module, HeadAtoms, _ErrorReturn2,
			SymbolTable),
	( ( HeadAtoms = [];
	    \+ Remains = [graphic_name('<-')|_] % this covers the case of atom
	  )
	  -> user:body(Tokens, CFormulae, _ErrorReturn3, SymbolTable),
             CFormulae = [_|_]
	  ;  Remains = [graphic_name('<-')|Remains2],
	     ( Remains2 = []
	       -> user:create_formula('metaDefs.<-''.f2',
				[HeadAtoms, ['metaDefs.empty.c0']], CFormulae)
	       ;  user:body(Remains2, BodyFormulae, _ErrorReturn4, SymbolTable),
                  BodyFormulae = [_|_],
		  user:create_formula('metaDefs.<-''.f2',
				[HeadAtoms, BodyFormulae], CFormulae)
	     )
	)
   ),
   user:'sharedPrograms.programLanguage.p2'(Program, Language),
   user:'parserprograms.checkFormulaAux.p6'(CFormulae, Language, 0, []
      , Formulae, _),
   Formulae = [_|_]. % Fail if no parses are well-typed

'~programs.stringToProgramFormulaAux.p4'(Program, Module, String, Formulae) :-
   'programs.stringToProgramFormulaAux.p4'(Program, Module, String, Formulae).

%------------------------------------------------------------------------------
% New Program
%------------------------------------------------------------------------------

% problem: avlTrees is taken as a system module and loaded automatically

'programs.newProgramAux.p2'(Program, MainModule) :-
   ( user:system_module_name(MainModule) -> 
     user:gstring2string(MainModule, Str),
     user:load_system_module(Str, Program)
   ; user:'sharedPrograms.nextModuleVersion.p2'(MainModule, Version),
     user:'sharedPrograms.programSkeleton.p4'(MainModule
        , 'progDefs.normalKind.c0', Version, Program)
   ).

'~programs.newProgramAux.p2'(Program, MainModule) :-
   'programs.newProgramAux.p2'(Program, MainModule).

%------------------------------------------------------------------------------
% Transparency check
%------------------------------------------------------------------------------

'programs.transparent.p2'(DomainType, RangeType) :-
   user:transparency_check(DomainType, RangeType).

'~programs.transparent.p2'(DomainType, RangeType) :-
   user:transparency_check(DomainType, RangeType).

%------------------------------------------------------------------------------
% Module manipulation
%------------------------------------------------------------------------------

'programs.moduleInProgramAux.p2'(Modules, Module) :-
   ( var(Module) ->
     (user:'avlTrees.avlMember.p3'(Modules, Module, _); Module = '"')
   ; ( Module == '"' ->
       true
     ; user:'avlTrees.avlSearch.p3'(Modules, Module, _)
     )
   ).

'~programs.moduleInProgramAux.p2'(Modules, Module) :-
   'programs.moduleInProgramAux.p2'(Modules, Module).

%------------------------------------------------------------------------------
% Support for Succeed (primitive version)
%------------------------------------------------------------------------------

:- dynamic compiled_module_version/2.

'programs.ensureCompiled.p3'(Module, Version, Code) :-
   ( compiled_module_version(Module, Version) ->
     true
   ; user:compile_object_module(Module, Code),
     retractall(compiled_module_version(Module, _)),
     assert(compiled_module_version(Module, Version))
   ).   

'~programs.ensureCompiled.p3'(Module, Version, Code) :-
   'programs.ensureCompiled.p3'(Module, Version, Code).


% 'programs.ensureLoaded.p1'(GModule) :-
%    ( user:loaded(GModule) ->
%      true
%    ; user:gstring2string(GModule, Module),
%      user:file_finder(Module, _, PrologFile, _),
%      nofileerrors,
%      ( load(PrologFile) ->
%        assert(user:loaded(GModule))
%      ; format(user_error, 'Succeed: can''t find file ~a~n', [PrologFile])
%      ),
%      fileerrors
%    ).
% 
% '~programs.ensureLoaded.p1'(GModule) :-
%    'programs.ensureLoaded.p1'(GModule).

'programs.ensureLoaded.p1'(M) :-
   user:system_module_name(M).

'~programs.ensureLoaded.p1'(M) :-
   'programs.ensureLoaded.p1'(M).


'programs.runAllGoal.p6'(Goal, FirstFree, InputSubst, Answers, LastFree
      , Residues
      ) :-
   user:compile_object_goal(Goal, ReflectedGoal, FreeVars, VarDict, []),
   findall( (VarDict, Suspended), 
            execute_goal(ReflectedGoal, Suspended),
            Results
          ),
   make_results(Results, FreeVars, FirstFree, InputSubst, FirstFree, Answers
      , Residues, LastFree).

'~programs.runAllGoal.p6'(Goal, FirstFree, InputSubst, Answers, LastFree
      , Residues
      ) :-
   'programs.runAllGoal.p6'(Goal, FirstFree, InputSubst, Answers, LastFree
      , Residues).


make_results([], _, _, _, MaxFree, [], [], MaxFree).

make_results([(VarDict, Unsolved)|Results], FreeVars, FirstFree, InputSubst
      , MaxFreeSoFar, [Answer|Answers], [Residue|Residues], MaxFree
      ) :-
   make_answer_subst(FreeVars, VarDict, FirstFree, InputSubst, Answer
      , Free1),
   make_residue(Unsolved, Free1, Residue, NextFree),
   ( NextFree > MaxFreeSoFar ->
     NewMaxSoFar = NextFree
   ; NewMaxSoFar = MaxFreeSoFar
   ),
   make_results(Results, FreeVars, FirstFree, InputSubst, NewMaxSoFar
      , Answers, Residues, MaxFree).


'programs.runGoal.p6'(Goal, FirstFree, InputSubst, Answer, LastFree
      , Residue
      ) :-
   user:compile_object_goal(Goal, ReflectedGoal, FreeVars, VarDict, []),
   execute_goal(ReflectedGoal, Unsolved),
   make_answer_subst(FreeVars, VarDict, FirstFree, InputSubst, Answer
      , Free1),
   make_residue(Unsolved, Free1, Residue, LastFree).

'~programs.runGoal.p6'(Goal, FirstFree, InputSubst, Answer, LastFree
      , Residue
      ) :-
   'programs.runGoal.p6'(Goal, FirstFree, InputSubst, Answer, LastFree
      , Residue).


'programs.failedGoal.p1'(Goal) :-
   user:compile_object_goal(Goal, ReflectedGoal, _, _, [126]),  % 126 for ~
   execute_goal(\+ ReflectedGoal, []).

'~programs.failedGoal.p1'(Goal) :-
   'programs.failedGoal.p1'(Goal).


execute_goal(ReflectedGoal, Suspended) :-
   on_exception(catch_in_query, 
      call_residue(ReflectedGoal, Suspended),
      fail).                               % fail if an exception occurs


make_answer_subst([], _, Free, Answer, Answer, Free).

make_answer_subst([Var|Vars], VarDict, VarNumber, SubstSoFar, Answer
      , NewVarNumber
      ) :-
   user:member(Var/Value, VarDict), !,
   user:pobj_to_ground(Value, VarNumber, VarNumber1, GroundTerm),
   'substs':'substs.bindVariable.p4'(Var, GroundTerm, SubstSoFar, SubstSoFar1),
   make_answer_subst(Vars, VarDict, VarNumber1, SubstSoFar1, Answer
      , NewVarNumber).


make_residue(Unsolved, FirstFree, Residue, LastFree) :-
   clean_unsolved_goals(Unsolved, CleanUnsolved),
   make_residue1(CleanUnsolved, FirstFree, Residue, LastFree).


make_residue1([], LastFree, 'metaDefs.empty.c0', LastFree).

make_residue1([Goal|Goals], FirstFree, Residue, LastFree) :-
   patom_to_ground(Goal, FirstFree, Ground, Free1),
   make_residue2(Goals, Free1, Ground, Residue, LastFree).


make_residue2([], LastFree, Residue, Residue, LastFree).

make_residue2([Goal|Goals], FirstFree, SoFar, Residue, LastFree) :-
   patom_to_ground(Goal, FirstFree, Ground, Free1),
   make_residue2(Goals, Free1, 'metaDefs.&''.f2'(SoFar, Ground), Residue
      , LastFree).


patom_to_ground(Atom, VarNo, Ground, NewVarNo) :-
   ( Atom = not_equal(_, Term1, Term2) ->
     user:list_pobj_to_ground([Term1, Term2], VarNo, NewVarNo, GArgs),
     Ground = 'metaDefs.atom.f2'('metaDefs.name.f4'('"', '"~='
        , 'metaDefs.predicate.c0', 2), GArgs)
   ; Atom = Module:RealAtom ->   % deals with constraints
     RealAtom =.. [Predicate|ExtendedArgs],
     remove_last(ExtendedArgs, Args, Last),
     constraint_goal_conversion(Module, Predicate, GSymbol, Arity),
     user:string2Gstring(Module, GModule),
     Name = 'metaDefs.name.f4'(GModule, GSymbol, 'metaDefs.function.c0', Arity),
     Ground = 'metaDefs.atom.f2'('metaDefs.name.f4'('"','"=',
                                         'metaDefs.predicate.c0',2),
                          [Left, 'metaDefs.term.f2'(Name, GArgs)]),
     user:pobj_to_ground(Last, VarNo, VarNo2, Left),
     user:list_pobj_to_ground(Args, VarNo2, NewVarNo, GArgs)      
   ; Atom =.. [Predicate|Args],
     user:string2Gstring(Predicate, PredString),
     user:symbol_name(Name, PredString),
     ( Args = [] ->
       Ground = 'metaDefs.pAtom.f1'(Name),
       NewVarNo = VarNo
     ; Ground = 'metaDefs.atom.f2'(Name, GArgs),
       user:list_pobj_to_ground(Args, VarNo, NewVarNo, GArgs)
     )
   ).

remove_last([X], [], X) :- !.
remove_last([X|Xs], [X|Ys], Z) :-
   remove_last(Xs, Ys, Z).

clean_unsolved_goals([], []).

clean_unsolved_goals([_-Goal|Goals], NewGoals) :-
   clean_unsolved_goals_aux(Goal, NewGoal),
   ( NewGoal = null
     -> NewGoals = NewGoals2
     ;  NewGoals = [NewGoal|NewGoals2]
   ),
   clean_unsolved_goals(Goals, NewGoals2).


clean_unsolved_goals_aux(freeze_on_vlist(_, _, _, _), null) :- !.
clean_unsolved_goals_aux(_:freeze_on_vlist(_, _, _, _), null) :- !.

clean_unsolved_goals_aux(freeze_nonvar_and(_, _, _), null) :- !.
clean_unsolved_goals_aux(_:freeze_nonvar_and(_, _, _), null) :- !.

clean_unsolved_goals_aux(evaluate_delay_aux(_, _), null) :- !.
clean_unsolved_goals_aux(_:evaluate_delay_aux(_, _), null) :- !.

clean_unsolved_goals_aux(my_freeze(_, _:Goal, _), NewGoal) :- !,
   clean_unsolved_goals_aux(Goal, NewGoal).
clean_unsolved_goals_aux(_:my_freeze(_, _:Goal, _), NewGoal) :- !,
   clean_unsolved_goals_aux(Goal, NewGoal).

clean_unsolved_goals_aux(call(Goal), NewGoal) :- !,
   clean_unsolved_goals_aux(Goal, NewGoal).
clean_unsolved_goals_aux(_:call(Goal), NewGoal) :- !,
   clean_unsolved_goals_aux(Goal, NewGoal).

clean_unsolved_goals_aux(Module:Goal, NewGoal) :- !,
   ( constraint_goal(Module, Goal) ->
     NewGoal = Module:Goal
   ; clean_unsolved_goals_aux(Goal, NewGoal)
   ).

clean_unsolved_goals_aux(Goal, Goal) :- !.


constraint_goal(Module, Goal) :-
   module_with_constraints(Module),
   Goal =.. [Predicate|_],
   constraint_goal_conversion(Module, Predicate, _, _).


module_with_constraints('integers').
module_with_constraints('rationals').
module_with_constraints('strings').
module_with_constraints('sets').

constraint_goal_conversion('integers', negative, '"-', 1):- !.
constraint_goal_conversion('integers', minus, '"-', 2):- !.
constraint_goal_conversion('integers', plus, '"+', 2):- !.
constraint_goal_conversion('integers', times, '"*', 2):- !.
constraint_goal_conversion('integers', divides, '"Div', 2):- !.
constraint_goal_conversion('integers', power, '"^', 2):- !.
constraint_goal_conversion('integers', mod, '"Mod', 2):- !.
constraint_goal_conversion('integers', maximum, '"Max', 2):- !.
constraint_goal_conversion('integers', minimum, '"Min', 2):- !.
constraint_goal_conversion('integers', absolute, '"Abs', 1):- !.

constraint_goal_conversion('rationals', negative, '"-', 1):- !.
constraint_goal_conversion('rationals', minus, '"-', 2):- !.
constraint_goal_conversion('rationals', plus, '"+', 2):- !.
constraint_goal_conversion('rationals', times, '"*', 2):- !.
constraint_goal_conversion('rationals', divides, '"/', 2):- !.
constraint_goal_conversion('rationals', power, '"^', 2):- !.
constraint_goal_conversion('rationals', mod, '"Mod', 2):- !.
constraint_goal_conversion('rationals', maximum, '"Max', 2):- !.
constraint_goal_conversion('rationals', minimum, '"Min', 2):- !.
constraint_goal_conversion('rationals', absolute, '"Abs', 1):- !.
constraint_goal_conversion('rationals', rational, '"//', 2):- !.

constraint_goal_conversion('sets', normalise, '"Inc', 2):- !. % Wrong!
constraint_goal_conversion('sets', diff, '"\\', 2):- !.   % added \ djd          
constraint_goal_conversion('sets', set_of, '"SuchThat', 3):- !.

constraint_goal_conversion('strings', concat, '"++', 2):- !.
