:- 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):- !.
