\@      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM N O P Q R S T U VWXYZ[\ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y!z!{!|!}!~!"""""""##############$$$$$%%&&&''''''''''''((((())))*++++++++,,--------------...////000001111111111111111111111111111222222333333 3 3 3 3 3333333333333344444 4!4"4#4$4%5&5'5(5)5*5+6,6-6.6/606162636465666768696:6;6<6=6>6?66Sebastian FischerBSD3/Sebastian Fischer (sebf@informatik.uni-kiel.de) experimentalportable Safe-Inferred 7Conjunctive normalforms are lists of lists of literals. BLiterals are variables that occur either positively or negatively.3Boolean formulas are represented as values of type Boolean.$and disjunction of boolean formulas."and finally we provide conjunctionNot constructs negated formulas,No represents false,Yes represents true,Variables are labeled with an Int,<This function returns the name of the variable in a literal. This function negates a literal.<This predicate checks whether the given literal is positive.We convert boolean formulas to conjunctive normal form by pushing negations down to variables and repeatedly applying the distributive laws. @ABCDE      @ABCDESebastian FischerBSD3/Sebastian Fischer (sebf@informatik.uni-kiel.de) experimentalportable Safe-Inferred A  SatSolver' can be used to solve boolean formulas.,A new SAT solver without stored constraints.8This predicate tells whether all constraints are solved.We can lookup the binding of a variable according to the currently stored constraints. If the variable is unbound, the result is Nothing.+We can assert boolean formulas to update a  SatSolverI. The assertion may fail if the resulting constraints are unsatisfiable. This function guesses a value for the given variable, if it is currently unbound. As this is a non-deterministic operation, the resulting solvers are returned in an instance of  MonadPlus.!OWe select a variable from the shortest clause hoping to produce a unit clause."This function guesses values for variables such that the stored constraints are satisfied. The result may be non-deterministic and is, hence, returned in an instance of  MonadPlus.#This predicate tells whether the stored constraints are solvable. Use with care! This might be an inefficient operation. It tries to find a solution using backtracking and returns True if and only if that fails.FGH !"#IJKLMNOPQR  !"#    !"#FGH !"#IJKLMNOPQRNone*+$S$$$SNone*+HM#%&'()TUV*+,W-./0123456789:X;<Y=>?@Z%&'()*+,-./0123456789:;<=>?@&'(-.>?@=;*<+,7132465)89:/0%#%&'()TUV*+,W-./0123456789:X;<Y=>?@Z Safe-InferredAThe class of formulas that can be negated. There are some types that can be negated but do not support the other Boolean Logic operators, such as the Literal class.BRNegate a formula in a naive fashion, the operators below prevent double negation.C+Test whether a formula is negated or normalD)Is this formula negated at the top level?E,Negate the formula, avoiding double negationABCcalled for normal formulascalled for negated formulasDEFGHABCDEFGHABCDEFGHABCDEFGHEF Safe-Inferred68IA class to represent formulas in CNF, which is the conjunction of a set of disjuncted literals each which may or may not be negated.IJKLIJKLIJKLIJKL  Safe-Inferred68=KR>Very similar to unify, not quite sure if there is a difference MNOPQRSTU MNOPQRSTU MNOPQRSTUMNOPQRSTUNone24VA class used to do proper parenthesization of formulas. If we nest a higher precedence formula inside a lower one parentheses can be omitted. Because | has lower precedence than &, the formula  a | (b & c) appears as  a | b & c, while  (a | b) & cH appears unchanged. (Name Precedence chosen because Fixity was taken.)xThe second field of Fixity is the FixityDirection, which can be left, right, or non. A left associative operator like /> is grouped left to right, so parenthese can be omitted from (a  b)  c but not from a  (b  c)X. It is a syntax error to omit parentheses when formatting a non-associative operator.^The Haskell FixityDirection type is concerned with how to interpret a formula formatted in a certain way, but here we are concerned with how to format a formula given its interpretation. As such, one case the Haskell type does not capture is whether the operator follows the associative law, so we can omit parentheses in an expression such as  a & b & c.XaThe intent of this class is to be similar to Show, but only one way, with no corresponding Read class. It doesn't really belong here in logic-classes. To put something in a pretty printing class implies that there is only one way to pretty print it, which is not an assumption made by Text.PrettyPrint. But in practice this is often good enough.Z8This is used as the initial value for the parent fixity.[fThis is used as the fixity for things that never need parenthesization, such as function application.VWXYZ[[  VWXYZ[ XYVW Z[VWXYZ[[ None+\TRepresents the boolean logic binary operations, used in the Combination type above.]OR^AND_ Implication` Equivalenceaa1 is a helper type used in the signatures of the foldPropositional and foldFirstOrder methods so can represent all the ways that formulas can be combined using boolean logic - negation, logical And, and so forth.d=A type class for logical formulas. Minimal implementation:  (.|.) eDisjunction/ORfoDerived formula combinators. These could (and should!) be overridden with expressions native to the instance.| Conjunction/ANDg Formula combinators: Equivalenceh ImplicationiReverse implication:j Exclusive orkNorlNandm'A helper function for building folds: & foldPropositional combine atomic  is a no-op.q6! can't be a function when -XUnicodeSyntax is enabled.\]^_`abcdefghijklmnopqrstu\\]^_`abcdefghijklmnopqrstudefghijklacbm\`_^]nopqrstu \`_^]acbdefghijklmnopqrstu\ efghjopqrst NonewReturn a variable based on v but different from any set element. The result may be v itself if v is not a member of the set.xModify a variable by adding a prefix. This unfortunately assumes that v is "string-like" but at least one algorithm in Harrison currently requires this.yPretty print a variablez*Return an infinite list of variations on vvwxyz{vwxyz{vwxyz{vwxyz{ None68| This class shows how to convert between atomic Skolem functions and Ints. We include a variable type as a parameter because we create skolem functions to replace an existentially quantified variable, and it can be helpful to retain a reference to the variable.}tBuilt a Skolem function from the given variable and number. The number is generally obtained from the skolem monad.|}~|}~|}~|}~ None68HM+Build a term which is a variable reference.7Build a term by applying terms to an atomic function. fq (atomic function) is one of the type parameters, this package is mostly indifferent to its internal structure.A fold for the term data type, which understands terms built from a variable and a term built from the application of a primitive function to other terms.   None]]None24 Safe-Inferred68NoneNSome types in the Logic class heirarchy need to have True and False elements. ^ ^None +23468HM  A type class for propositional logic. If the type we are writing an instance for is a zero-order (aka propositional) logic type there will generally by a type or a type parameter corresponding to atom. For first order or predicate logic types, it is generally easiest to just use the formula type itself as the atom type, and raise errors in the implementation if a non-atomic formula somehow appears where an atomic formula is expected (i.e. as an argument to atomic or to the third argument of foldPropositional.)The Ord superclass is required so we can put formulas in sets during the normal form computations. Negatable and Combinable are also considered basic operations that we can't build this package without. It is less obvious whether Constants is always required, but the implementation of functions like simplify would be more elaborate if we didn't have it, so we will require it. Build an atomic formula from the atom type. | A fold function that distributes different sorts of formula to its parameter functions, one to handle binary operators, one for negations, and one for atomic formulas. See examples of its use to implement the polymorphic functions below.1Show a formula in a format that can be evaluated -Show a formula in a visually pleasing format.sConvert any instance of a propositional logic expression to any other using the supplied atom conversion function.#Simplify and recursively apply nnf._Eliminate => and  = and move negations inwards: 0Formula Rewrites to P => Q ~P | Q P  =v Q (P & Q) | (~P & ~Q) ~"X P "X ~P ~"X P "X ~P ~(P & Q) (~P | ~Q) ~(P | Q) (~P & ~Q) ~~P P `=Do a bottom-up recursion to simplify a propositional formula.aDo one step of simplify for propositional formulas: Perform the following transformations everywhere, plus any commuted versions for &, |, and  =.  ~False -> True ~True -> False True & P -> P False & P -> False True | P -> True False | P -> P True => P -> P False => P -> True P => True -> P P => False -> True True  = P -> P False  = P -> ~P QI'm not sure of the clauseNormalForm functions above are wrong or just different.b<Harrison page 59. Look for complementary pairs in a clause.Use this to implement foldAtomsDeprecated - use foldAtoms.}The fixity of the parent formula. If the operator being formatted here has a lower precedence it needs to be parenthesized._cd`aebfghijmm_cd`aebfghijNone2468HMLiterals are the building blocks of the clause and implicative normal |forms. They support negation and must include True and False elements.kkNone +23468HMThe  and  InfixPred types, like the BinOp type in 78s, could be additional parameters to the type class, but it would add additional complexity with unclear benefits.The ' type class. Minimal implementation: Hfor_all, exists, foldFirstOrder, foldTerm, (.=.), pApp0-pApp7, fApp, var. The functional dependencies are necessary here so we can write functions that don't fix all of the type parameters. For example, without them the univquant_free_vars function gives the error 3No instance for (FirstOrderFormula Formula atom V)5 because the function doesn't mention the Term type.0Universal quantification - for all x (formula x)AExistential quantification - there exists x such that (formula x)&A fold function similar to the one in PropositionalFormulaX but extended to cover both the existing formula types and the ones introduced here. /foldFirstOrder (.~.) quant binOp infixPred pApp; is a no op. The argument order is taken from Logic-TPTP.>for_all with a list of variables, for backwards compatibility.=exists with a list of variables, for backwards compatibility.NNames for for_all and exists inspired by the conventions of the TPTP project.6" can't be a function when -XUnicodeSyntax is enabled.#Helper function for building folds.Legacy version of quant from when we supported lists of quantified variables. It also has the virtue of eliding quantifications with empty variable lists (by calling for_all' and exists'.)Try to convert a first order logic formula to propositional. This will return Nothing if there are any quantifiers, or if it runs into an atom that it is unable to convert.DDisplay a formula in a format that can be read into the interpreter.Examine the formula to find the list of outermost universally quantified variables, and call a function with that list and the formula after the quantifiers are removed.Deprecated - use mapAtomsDeprecated - use foldAtomsJust like Logic.FirstOrder.convertFOF except it rejects anything with a construct unsupported in a normal logic formula, i.e. quantifiers and formula combinators other than negation.ll    None +2346=HKMNone +2346=KNone +2346=KM$ Combine function for result typeThe substitution function2The default valuation function for atoms not in psThe variables to varymnop $mnopNone+2346FThe range of a formula is {True, False} when it has no free variables.   None*234HM!q   rstuvwxyz{|}~         q   rstuvwxyz{|}~ None2346M    None +2346=HKM !"#$%&'()*  !"#$%&'()*  *)('&%$#"! *)('&%$#"!None +2346=K+,-./0123 +,-./0123 +3210/.-, +3210/.-,None +2346=KM 456456456456 Safe-Inferred75A class that characterizes how many arguments a predicate or function takes. Depending on the context, a result of Nothing may mean that the arity is undetermined or unknown. However, even if this returns Nothing, the same number of arguments must be passed to all uses of a given predicate or function.78787878None 23468=HKM==apply' with an arity check - clients should always call this.I8Return the variables that occur in an instance of Apply.L;Versions of pApp specialized for different argument counts.9:;<=>?@ABCDEFGHIJKLMNOPQRS9:;<=>?@ABCDEFGHIJKLMNOPQRS9:;<=>?@ABCDEFGHIJKLMNOPQRS9:;<=>?@ABCDEFGHIJKLMNOPQRS None 23468=HKMTA way to represent any predicate's name. Frequently the equality predicate has no standalone representation in the p type, it is just a constructor in the atom type, or even the formula type.WiIts not safe to make Atom a superclass of AtomEq, because the Atom methods will fail on AtomEq instances.[?applyEq' with an arity check - clients should always call this.f;Versions of pApp specialized for different argument counts.v9Return the variables that occur in an instance of AtomEq.'TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx%TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwx%WXYZ[TVU\]^_`abcdefghijklmnoqprstuvwx"TVUWXYZ[\]^_`abcdefghijklmnopqrstuvwxopqr!None2346HMyz{|}~yz{|}~yz{|}~yz{|}~"None 2346=HKM,Return all variables occurring in a formula.2Return the variables that occur free in a formula.0Return the variables in a propositional formula.  #None=HKMThe Skolem monadThe Skolem monad transformerHarrison's code generated skolem functions by adding a prefix to the variable name they are based on. Here we have a more general and type safe solution: we require that variables be instances of class Skolem which creates Skolem functions based on an integer. This state value exists in the SkolemT monad during skolemization and tracks the next available number and the current list of universally quantified variables.!The next available Skolem number.The variables which are universally quantified in the current scope, in the order they were encountered. During Skolemization these are the parameters passed to the Skolem function.6Just looks for double negatives and negated constants.Helper function to rename variables when we want to enclose a formula containing a free occurrence of that variable a quantifier that quantifies it.IRecursivly apply pullQuants anywhere a quantifier might not be leftmost.@Convert to Prenex normal form, with all quantifiers at the left.+The state associated with the Skolem monad.&Run a computation in the Skolem monad.>Run a computation in a stacked invocation of the Skolem monad.Skolemize the formula by removing the existential quantifiers and replacing the variables they quantify with skolem functions (and constants, which are functions of zero variables.) The Skolem functions are new functions (obtained from the SkolemT monad) which are applied to the list of variables which are universally quantified in the context where the existential quantifier appeared.qI need to consult the Harrison book for the reasons why we don't |just Skolemize the result of prenexNormalForm.Remove the leading universal quantifiers. After a call to pnf this will be all the universal quantifiers, and the skolemization will have already turned all the existential quantifiers into skolem functions.Skolemize and then specialize. Because we know all quantifiers are gone we can convert to any instance of PropositionalFormula.We get Skolem Normal Form by skolemizing and then converting to Prenex Normal Form, and finally eliminating the remaining quantifiers.$NoneHMCNF: (a | b | c) & (d | e | f)  %NoneHMYConvert to Skolem Normal Form and then distribute the disjunctions over the conjunctions: WFormula Rewrites to P | (Q & R) (P | Q) & (P | R) (Q & R) | P (Q | P) & (R | P) &None2346HM  'None+HLMXA type to represent a formula in Implicative Normal Form. Such a formula has the form a & b & c .=>. d | e | f, where a thru f are literals. One more restriction that is not implied by the type is that no literal can appear in both the pos set and the neg set.0Combination of Normal monad and LiteralMap monadlA version of MakeINF that takes lists instead of sets, used for implementing a more attractive show method.Take the clause normal form, and turn it into implicative form, where each clauses becomes an (LHS, RHS) pair with the negated literals on the LHS and the non-negated literals on the RHS: x (a | ~b | c | ~d) becomes (b & d) => (a | c) (~b | ~d) | (a | c) ~~(~b | ~d) | (a | c) ~(b & d) | (a | c) U If there are skolem functions on the RHS, split the formula using this identity:  (a | b | c) => (d & e & f)  becomes ; a | b | c => d a | b | c => e a | b | c => f gFind a# will extract any elements of type b from a's structure in accordance with the MonadPlus instance, e.g. Maybe Foo will return the first Foo found while [Foo] will return the list of Foos found.   (None*+246MRConvert a [[formula]] to CNF, which means building a map from formula to Literal.)None3HM!Is there any variable assignment that makes the formula true? satisfiable :: forall formula atom term v f m. (Monad m, FirstOrderFormula formula atom v, Formula atom term v, Term term v f, Ord formula, Literal formula atom v, Ord atom) => formula -> SkolemT v term m Bool0Is the formula always false? (Not satisfiable.),Is the negation of the formula inconsistant?AA formula is invalid if it is neither a theorem nor inconsistent.*None3M+None +2346=HKM~The Harrison book uses String for atomic function, but we need something a little more type safe because of our Skolem class.This is probably dangerous.None6HMpHUnit Test type with an added phantom type parameter. To run such a test you use the convert function below: x :load Data.Logic.Tests.Harrison.Meson :m +Data.Logic.Tests.HUnit :m +Test.HUnit runTestTT (convert tests)   ,None234M-NoneHM.NoneHMiTry f with higher and higher values of n until it succeeds, or optional maximum depth limit is exceeded./None3=HKM0NoneM1None+2346HM5           2None3=HKM+Convert the "question" to a set of support.ATry to unify the second argument using the equality in the first.#Unification: unifies two sentences.Recursion limit. We continue recursing until this becomes zero. If it is negative it may recurse until it overflows the stack. !"#$%&'()*+,-./01234 !"#$%&'()*+,-./012343None +2346HLM Both are satisfiable'The negated conjecture is unsatisfiableThe conjecture is unsatisfiable'A monad for running the knowledge base.4Remove a particular sentence from the knowledge base)Return the contents of the knowledgebase.PReturn a flag indicating whether sentence was disproved, along with a disproof.JReturn a flag indicating whether sentence was proved, along with a proof.Try to prove a sentence, return the result and the proof. askKB should be in KnowledgeBase module. However, since resolution is here functions are here, it is also placed in this module.ZSee whether the sentence is true, false or invalid. Return proofs for truth and falsity.Validate a sentence and insert it into the knowledgebase. Returns the INF sentences derived from the new sentence, or Nothing if the new sentence is inconsistant with the current knowledgebase.Delete an entry from the KB.?Return a text description of the contents of the knowledgebase.&56789:;   <=> ? @AB          56789:;   <=> ? @AB4None +23468=BK+The range of a term is an element of a set.aFunction application. Constants are encoded as nullary functions. The result is another term.=A variable, either free or bound by an enclosing quantifier.A temporary type used in the fold method to represent the combination of a predicate and its arguments. This reduces the number of arguments to foldFirstOrder and makes it easier to manage the mapping of the different instances to the class methods.!FThe range of a formula is {True, False} when it has no free variables.# !"#$CDEFGHIJKLMNOPQRSTUVWXYZ[  !"#$ !$#"  !$#"CDEFGHIJKLMNOPQRSTXWVUYZ[5None +23468BHM%The new Formula type is just a wrapper around the Native instance (which eventually should be renamed the Internal instance.) No derived Eq or Ord instances.(8Convert between the public and internal representations.\'Here are the magic Ord and Eq instances%&'()*]^_\`abcdefgh%&'()*%&'()*%&'()*]^_\`abcdefgh6None +2346HM7Using PredName for the predicate type is not quite appropriate here, but we need to implement this instance so we can use it as a superclass of AtomEq below.+,-./0123456789:;<=>?+,-./0.0/+-,?>=<;:987654321+-,.0/123456789:;<=>?i9:;<=><=?<=@ABCABCABDABEABFABGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                `Jh        !"#$%&'()*+,-./01234d567894:;<=>?@ABCDEFGHIJKP)(HIJKP)(L4MNOPQRSyTUVWXYZ[\]^_`abcdefghi j k l m n o p q r U V W X Y Z [ \ a b c d e f g h i s t u v w x y z { | }!~!!!!!" """"""##############$!$"$$%$%%&&&''''''''''''((((())))*++++++++S,d,--------------...////00000111111111I11111J1K11111111S1P1111222222333333333333333333333333444S4S4P4444*4S555 5 5 5 6 6l66666666+66666666666 !"#$X%&'()*+,-./01234567 89:;!<=>? @ABCD;EF?(3GHIJKLMNOPQRSTUVWXYZ[\]^_,`a102+,.-/102bcdef g h"i""j"#k#l#m#n#o#p#k#q#r#s#t#u$@$j$ $v$?&w&x&&y&z&{&|&}&~&''+++++++++++++,,,,,,,,,,,,3,,,,Q,,,,,,,,,,,,],G...000000000000000000111111111111111111111111122222222222222222222222223333333333333344,4+444444444144042444444 4 4 4 4 55,5+5555515052555logic-classes-1.5.1Data.Logic.HUnitData.Logic.FailingData.Logic.Classes.Pretty Data.BooleanData.Boolean.SatSolverData.Logic.Harrison.LibData.Logic.Classes.Negate#Data.Logic.Classes.ClauseNormalFormData.Logic.Classes.AtomData.Logic.Classes.CombineData.Logic.Classes.VariableData.Logic.Classes.SkolemData.Logic.Classes.TermData.Logic.Harrison.UnifData.Logic.Types.CommonData.Logic.Classes.FormulaData.Logic.Classes.Constants Data.Logic.Classes.PropositionalData.Logic.Classes.LiteralData.Logic.Classes.FirstOrder'Data.Logic.Harrison.Formulas.FirstOrder*Data.Logic.Harrison.Formulas.PropositionalData.Logic.Harrison.PropData.Logic.Types.Propositional Data.Logic.Harrison.PropExamplesData.Logic.Harrison.DefCNF-Data.Logic.Types.Harrison.Formulas.FirstOrder0Data.Logic.Types.Harrison.Formulas.PropositionalData.Logic.Types.Harrison.PropData.Logic.Classes.ArityData.Logic.Classes.ApplyData.Logic.Classes.EqualsData.Logic.Harrison.EqualData.Logic.Harrison.FOLData.Logic.Harrison.SkolemData.Logic.Harrison.NormalData.Logic.Normal.ClauseData.Logic.Instances.PropLogicData.Logic.Normal.ImplicativeData.Logic.Instances.SatSolverData.Logic.SatisfiableData.Logic.Harrison.PrologData.Logic.Types.Harrison.FOLData.Logic.Harrison.DPData.Logic.Harrison.HerbrandData.Logic.Harrison.TableauxData.Logic.Harrison.MesonData.Logic.Harrison.ResolutionData.Logic.Instances.ChiouData.Logic.ResolutionData.Logic.KnowledgeBaseData.Logic.Types.FirstOrder!Data.Logic.Types.FirstOrderPublicData.Logic.Types.Harrison.Equal Data.Logic Propositional HUnit-1.2.5.2Test.HUnit.Base assertEqualapplicative-extras-0.1.8Control.Applicative.ErrorSuccessFailureFailingtemplate-haskellLanguage.Haskell.TH.SyntaxFixityInfixLInfixRInfixNFixityDirectionClauseCNFLiteralNegPosBoolean:||::&&:NotNoYesVar literalVar invLiteralisPositiveLiteral booleanToCNF SatSolver newSatSolverisSolved lookupVar assertTrue assertTrue' branchOnVarselectBranchVarsolve isSolvablefailing∅testssetAnysetAllcanexistsallpairsdistrib'tryfind settryfind mapfilter setmapfilteroptimizemaximizeminimize optimize' maximize' minimize'imageallsets allsubsetsallnonemptysubsetsapply tryApplyDdefined|=>|->fpf Negatable negatePrivate foldNegationnegated.~.¬negativepositiveClauseNormalFormulaclausesmakeCNF satisfiableAtom substitute allVariables freeVariablesunifymatch foldTermsisRenamegetSubst HasFixityfixityPrettypretty topFixity botFixityBinOp:|::&::=>::<=>: Combination:~: Combinable.|..&..<=>..=>..<=..<~>..~|..~&.combinebinop∧∨⇒⇔==><=> prettyBinOpVariablevariantprefixprettyVariablevariants showVariableSkolemtoSkolemisSkolemTermvtfAppfoldTermzipTermsFunction convertTermshowTerm prettyTermfvttsubstfuncs fullUnify unifyAndApply $fVariable[]Formulaatomic foldAtomsmapAtoms ConstantsasBoolfromBooltruefalseifElse⊨⊭ prettyBoolPropositionalFormulafoldPropositionalshowPropositionalprettyPropositionalfixityPropositional convertPropnegationNormalFormclauseNormalForm'clauseNormalFormclauseNormalFormAlt'clauseNormalFormAltdisjunctiveNormalFormdisjunctiveNormalForm'foldAtomsPropositional overatomsmapAtomsPropositional foldLiteral zipLiteralstoPropositional prettyLitfoldAtomsLiteralQuantExistsForallFirstOrderFormulafor_allfoldFirstOrder zipFirstOrderfor_all'exists'!?∀∃quantquant' convertFOFshowFirstOrderprettyFirstOrderfixityFirstOrderwithUnivQuantsmapAtomsFirstOrderonatomsfoldAtomsFirstOrder atom_unionfromFirstOrder fromLiteral antecedent consequenton_atoms over_atoms TruthTable TruthTableRowevalatomsonAllValuations truthTable tautology unsatisfiablepSubstdual psimplifynegatennfnenf list_conj list_disjmkLitsallSatValuationsdnf0distribrawdnfpurednftrivialsimpdnfdnfdnf'simpcnfcnfcnf'FTCombine$fHasFixityFormula$fPrettyFormula!$fPropositionalFormulaFormulaatom$fLiteralFormulaatom$fFormulaFormulaatom$fConstantsFormula$fCombinableFormula$fNegatableFormulaNPramseyprimeNumAtommaaimkpropmaincnfdefstep max_varindex mk_defcnfdefcnf1subcnforcnfandcnfdefcnfsdefcnf2andcnf3defcnf3 $fNumAtomAtomIffImpOrAndProppnameArityarityApply foldApplyapply' Predicate zipApplysapply0apply1apply2apply3apply4apply5apply6apply7 showApply prettyApplyvarApply substApplypApppApp0pApp1pApp2pApp3pApp4pApp5pApp6pApp7 PredicateNameEqualsNamedAtomEq foldAtomEqequalsapplyEq'applyEq zipAtomsEqshowFirstOrderFormulaEq.=..!=.≡≢ fromAtomEq showAtomEq prettyAtomEq varAtomEq substAtomEq funcsAtomEq predicatesfunction_congruencepredicate_congruenceequivalence_axioms equalitize functions'varfv generalizesubstSkolemTsimplify lsimplifypnf functions runSkolem runSkolemTskolem askolemize specialize skolemizeskolemNormalFormsimpdnf'simpcnf'cnfTraceflattenplSat0plSatImplicativeFormINFnegpos LiteralMapTNormalT runNormalT runNormalmakeINF' prettyINF prettyProofimplicativeNormalFormtoCNF toLiteral$fClauseNormalFormula[]Literal$fNegatableLiteral $fOrdLiteral inconsistanttheoreminvalid renameruleFNameFOLRTermTypeFn TestFormulaEq TestFormulaTestTest0 TestLabelTestListTestCase Assertionconvertdpllpholdsherbfuns groundterms groundtuplesherbloopsubst' gilmore_loopgilmoredp_mfndp_loop davisputnam dp_refinedp_refine_loop davisputnam'unify_literals unifyAtomsEqdeepencontrapositivesmexpand puremesonmeson resolution1 matchAtomsEq resolution2 presolution resolution3 NormalTermNormalVariableNormalFunctionNormalSentenceNFEqual NFPredicateNFNotConjunctiveNormalForm QuantifierExistsChForAll ConnectiveEquivImplyCTermSentenceEqual toSentence fromSentence Unification SetOfSupportprovegetSetOfSupportgetSubstAtomEqisRenameOfAtomEq ProofResultInvalidProved DisprovedProverTWithIdwiItemwiIdent runProverT' runProver'Proof proofResultproofunloadKBgetKBinconsistantKB theoremKBaskKBvalidKBtellKBloadKBshowKBPTermFunApp unFormula BijectionpublicinternPredName:=:FOLEQEQUALS$fAtomFOLEQTermType[]$fAtomEqFOLEQPredNameTermType$fLiteralFormulaFOLEQ $fPrettyFOLEQ"$fPropositionalFormulaFormulaFOLEQ$fApplyFOLEQPredNameTermType$fPrettyPredName$fPredicatePredName$fConstantsFOLEQ$fConstantsPredName$fIsStringPredName$fHasFixityFOLEQ $fShowFormula$fArityPredName simpleClause conjunction disjunctionasLongAsPossible everywhere atChildrenbindings addClause addUnbound updateSolver insertBindingsimplifyClauses propagatebranchOnUnboundguessshorter$fMonadFailingitlist end_itlistitlist2test01applyD tryApplyLchoose $fPretty[] $fPrettyBinOp isTrivial $fPrettyBool psimplify1 nnfCombine nnfNotCombinesimppurecnfpurecnf'$fSafeCopyBinOp$fSafeCopyCombination fixityLiteral$fSafeCopyQuantnnf'nenf'halfsum halfcarryhacarrysumfaconjoin ripplecarrymk_index mk_index2test02 ripplecarry0 ripplecarry1muxoffset carryselect mk_adder_test rippleshift multiplier bitlengthbit congruent_totest03$fHasFixityAtom $fPrettyAtom$fFirstOrderFormulaFormulaa[]$fFormulaFormulaa$fShowFormula0$fHasFixityProp $fHasFixity[] $fPrettyProp $fShowProp arityError$fPrettyPredicateNamefv' on_formula SkolemState skolemCount univQuantpullqprenexnewSkolemState simplify1 simplifyBinop lsimplify1 pullQuantsskolem2purednf'pairsclauses0$fHasFixityPropForm$fPrettyPropForm$fConstantsPropForm$fPropositionalFormulaPropForma$fFormulaPropForma$fCombinablePropForm$fNegatablePropFormgFindrunLiteralMapM $fConstants[]$fHasFixityFOL$fTermTermType[]Function$fSkolemFunction[]$fFunctionFunction[]$fPrettyFunction $fArity[] $fPrettyFOL $fPredicate[]$fConstantsFOL$fApplyFOL[]TermType$fPrettyTermType$fShowTermType$fIsStringFunctionTrailMixDeducedGuessedone_literal_ruleaffirmative_negative_rule resolve_onresolution_blowupresolution_ruledpdpsatdptaut posneg_countdpllsatdplltaut unassignedunit_subpropagateunit_propagate backtrackdplidplisatdplitautbackjumpdplbdplbsatdplbtautunify_complements unify_refute prawitz_loopmgu unifiablerename resolventsresolve_clausesresloop1pure_resolution1 term_matchmatch_literalssubsumes_clausereplace incorporateresloop2pure_resolution2presolve_clausespreslooppure_presolutionpure_resolution3AtomicFunctionAtomicSkolemFunctiontoTermfromTerm$fTermNormalTermvf$fHasFixityNormalSentence0$fFirstOrderFormulaNormalSentenceNormalSentencev%$fFormulaNormalSentenceNormalSentence$fPrettyNormalSentence$fNegatableNormalSentence$fConstantsNormalSentence $fTermCTermvf$$fFirstOrderFormulaSentenceSentencev$fHasFixitySentence$fPrettySentence$fAtomEqSentencepCTerm$fApplySentencepCTerm$fSkolemAtomicFunctionv$fIsStringAtomicFunction&$fPropositionalFormulaSentenceSentence$fFormulaSentenceSentence$fCombinableSentence$fConstantsSentence$fNegatableSentence demodulateprove' getResult getSubstsgetSubstSentencesgetSubstSentencegetSubstsTerms getSubstsTerm isRenameOfisRenameOfSentencesisRenameOfSentenceisRenameOfTermisRenameOfTerms resolutionunify' unify2AtomsEq unifyTerm unifyTerms findUnify replaceTerm substTerm substTerms updateSubstProverT' ProverStaterecursionLimit knowledgeBase sentenceCount KnowledgeBase SentenceCountwithIdzeroKB runProverTreportKB $fShowProof$fSafeCopyProofResult$fHasFixityPredicate$fPrettyPredicate$fAtomPredicatePTermv$fLiteralFormulaPredicate$$fFirstOrderFormulaFormulaPredicatev$fAtomEqPredicatepPTerm $fTermPTermvf&$fPropositionalFormulaFormulaPredicate$fFormulaFormulaPredicate$fConstantsPredicate$fSafeCopyPTerm$fSafeCopyFormula Predicate_v1Apply_v1 Constant_v1 NotEqual_v1Equal_v1$fSafeCopyPredicate$fMigratePredicate$fSafeCopyPredicate_v1 $fOrdFormula $fEqFormula!$fBijectionCombinationCombination$fBijectionFormulaFormula