u      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None *+345=IN1What side of the parent formula are we rendering?2Use the same precedence type as the pretty packageRA class to extract the fixity of a formula so they can be properly parenthesized.^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. Hopefully, we can generate formulas so that an associative operator with left associative fixity direction appears as (a+b)+c rather than a+(b+c).Decide whether to parenthesize based on which side of the parent binary operator we are rendering, the parent operator's precedence, and the precedence and associativity of the operator we are rendering. testParen :: Side -> Precedence -> Precedence -> Associativity -> BoolDVersion of assertEqual that uses the pretty printer instead of show. The message prefixThe expected valueThe actual value !")  !"    !"   !"None +34579>L #EClass associating a formula type with its atom (atomic formula) type.$VAtomOf is a function that maps the formula type to the associated atomic formula type%The true element&The false element';If the arugment is true or false return the corresponding , otherwise return .(Build a formula from an atom.)Formula analog of iterator .*DApply a function to the atoms, otherwise keeping structure (new sig)+%Basic properties of an atomic formula0DSpecial case of a union of the results of a function over the atoms.#$%&'()*+,-./0#$%&'()*+,-./0+#$%&'()*-,./0#$%&'()*+,-./0None*+3457=>ILN4 Example of a 9 type.99Class that indicates that a formula type *only* contains :, features - no combinations or quantifiers.:The class of formulas that can be negated. Literals are the building blocks of the clause and implicative normal forms. They support negation and must include true and false elements.;RNegate a formula in a naive fashion, the operators below prevent double negation.<'Test whether a lit is negated or normal=(This is the internal fold for literals, DI below should normally be used, but its argument must be an instance of 9.>)Is this formula negated at the top level??,Negate the formula, avoiding double negation@,Negate the formula, avoiding double negationA,Negate the formula, avoiding double negationB%Some operations on IsLiteral formulasE(Combine two literals (internal version).FCombine two literals.G Convert a 9 instance to any : instance.HvConvert any formula to a literal, passing non-IsLiteral structures to the first argument (typically a call to error.)KImplementation of  for -- 9 types.MImplementation of * for 9 types.Nimplementation of ) for 9 types.#123456789:;<called for normal formulascalled for negated formulas=.Called for higher order formulas (non-literal)Called for negated formulas"Called for true and false formulasCalled for atomic formulas>?@ABCDEFGHIJKLMN123456789:;<=>?@ABCDEFGHIJKLMN:;<=?@A>BCD9MNEFGHIJKL45678123123456789:;<=>?@ABCDEFGHIJKLMN?@None!"+34579>ILNO$A term type with no Skolem functionsSA term is an expression representing a domain element, either as a variable reference or a function applied to a list of terms.TThe associated variable typeUThe associated function typeV+Build a term which is a variable reference.W6Build a term by applying terms to an atomic function (U term).XA fold over instances of S.YA simple type to use as the function parameter of Term. The only reason to use this instead of String is to get nicer pretty printing.`Return 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.aModify a variable by adding a prefix. This unfortunately assumes that v is "string-like" but at least one algorithm in Harrison currently requires this.b*Return an infinite list of variations on vGBecause IsString is a superclass we can just output a string expressioncYCombine two terms if they are similar (i.e. two variables or two function applications.)d'Convert between two instances of IsTermg%Implementation of pPrint for any termh%Format a function application: F(x,y)i#Implementation of show for any termj?Build an expression for a function application: fApp (F) [x, y].OPQRSTUVWX'Variable references are dispatched here)Function applications are dispatched hereYZ[\]^_`abcCombine two variables!Combine two function applicationsResult for dissimilar terms is .dconvert a variableconvert a functionefghijk l    OPQRSTUVWXYZ[\]^_`abcdefghijkl_`ab]^\[YZSTUVWXcdefghijkPQROl#OPQRSTUVWXYZ[\]^_`abcdefghijk l    None!"+34579>ILNm'An atom type with no equality predicaten+A predicate type with no distinct equality.o$First order logic formula atom type.q/Atoms that have apply but do not support equaterdThe result of applying a predicate to some terms is an atomic formula whose type is an instance of r.y/A predicate is the thing we apply to a list of Ss to make an +.z The set of functions in an atom.{"The set of functions in a formula.}.Pretty print prefix application of a predicate~Implementation of w for r types.Implementation of x for r types.!Zip two atoms if they are similarImplementation of  for q types!Convert between two instances of r:Special case of applying a subfunction to the top *terms*.5Build a formula from a predicate and a list of terms.$mnopqrstuvwxyz{|}~ !"#$mnopqrstuvwxyz{|}~yrstuvwxz{q|}~opnmmnopqrstuvwxyz{|}~ !"#$None!"+34579>ILN $An atom type with equality predicate<Instance of an atom type with a distinct equality predicate.<Atoms that support equality must be an instance of HasEquateCreate an equate predicate<Analyze whether a predicate is an equate or a regular apply.Combine  and (# to build a formula from two terms.#Zip two atoms that support equality%Convert between HasEquate atom types.Implementation of w for  types.Implementation of x for  types.Implementation of Show for  types9Format the infix equality predicate applied to two terms.%&'()*%&'()*None4>LNWrapper type to make an IsLiteral value that happens to also be JustLiteral. The JL constructor is not exported, JL values can be built using H.+HUnsafe local version of overatomsLiteral - assumes lit is a JustLiteral. ,+-./01,+-./01None*+357IN 28Polymorphic finite partial functions via Patricia trees.The point of this strange representation is that it is canonical (equal functions have the same encoding) yet reasonably efficient on average.:Idea due to Diego Olivier Fernandez Pons (OCaml list, 20031110).A simple class, slightly more powerful than Foldable, so we can write functions that operate on the elements of a set or a list.3NAn error idiom. Rather like the error monad, but collect all errors togetherJPerform an IO operation and return the elapsed time along with the result.DPerform an IO operation and output a message about how long it took.Output elapsed time:Allow a computation to proceed for a given amount of time.nRun several IO operations in parallel, return the result of the first one that completes and kill the others.4Undefined function. Undefinition.iTry f with higher and higher values of n until it succeeds, or optional maximum depth limit is exceeded.K2567389:;<=4>?@ABCDEFGHIJKLMN11B2567389:;<=4>?@ABCDEFGHIJKLMN None*+3457=>FILN1uClass that indicates a formula type *only* supports Propositional features - it has no way to represent quantifiers.An instance of IsPropositional.An instance of IsPredicate.5This type is used to construct the first argument of . 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.)Disjunction/ORConjunction/AND. %x .&. y = (.~.) ((.~.) x .|. (.~.) y)Equivalence. x . =. y = (x .=>. y) .&. (y .=>. x)Implication. x .=>. y = ((.~.) x .|. y)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.@An alternative fold function for binary combinations of formulasImplication synonyms. Note that if the -XUnicodeSyntax option is turned on the operator ! can not be declared/used as a function - it becomes a reserved special character used in type signatures.Implication synonyms. Note that if the -XUnicodeSyntax option is turned on the operator ! can not be declared/used as a function - it becomes a reserved special character used in type signatures.Implication synonyms. Note that if the -XUnicodeSyntax option is turned on the operator ! can not be declared/used as a function - it becomes a reserved special character used in type signatures.Implication synonyms. Note that if the -XUnicodeSyntax option is turned on the operator ! can not be declared/used as a function - it becomes a reserved special character used in type signatures.If-and-only-if synonymsIf-and-only-if synonymsIf-and-only-if synonymsIf-and-only-if synonymsAnd/conjunction synonymsAnd/conjunction synonymsOr/disjunction synonymsDeconstruct a  formula.Combine formulas with a *, for use building the first argument of . Combine two  formulas if they are similar.Convert any instance of  to any  formula.Convert any instance of  to a l formula. Typically the ho (higher order) argument calls error if it encounters something it can't handle.Implementation of  for any JustPropostional type.Implementation of  for any JustPropostional type.Implementation of O for any 4 type. For clarity, show methods fully parenthesizeImplementation of * for any  type.Implementation of ) for any  type.Interpretation of formulas.Recognizing tautologies.Related concepts.7Return the set of propositional variables in a formula.Code to print out truth tables.PHMake sure the precedence and associativity implied by the Haskell infixinfixl#infixr declarations matches the precedence and associativity implied by the HasFixity instances. It would be nice to define one in terms of the other, but I don't know how to query the precedence and associativity of an operator, and I don't know how to (successfully) generate an infixinfixlJinfixr declaration using template haskell (the obvious thing didn't work:2$(pure [InfixD (Fixity quantPrec TH.InfixR) '(")])Tests precedence handling in pretty printer. 1. Need to test: associativity of like operators 2. precedence of every pair of adjacent operators 3. Stuff about infix operatorsSubstitution operation. Dualization.Routine simplification.Negation normal form.QFSimple negation-pushing when we don't care to distinguish occurrences./Disjunctive normal form (DNF) via truth tables.RDNF via distribution. ?Filtering out trivial disjuncts (in this guise, contradictory). 9With subsumption checking, done very naively (quadratic). Mapping back to a formula.CConjunctive normal form (CNF) by essentially the same code. (p. 60)S!fold on some higher order formulaVfold on a binary operation formula. Functions of this type can be constructed using .fold on a negated formulafold on a boolean formulafold on an atomic formula"fold on a binary operation formulafold on a negated formulafold on a boolean formulafold on an atomic formula%Combine two binary operation formulasCombine two negated formulasCombine two boolean formulasCombine two atomic formulas-Result is Nothing if the formulas don't unifyConvert an atomic formulaConvert a higher order formulaConvert an atomic formulaTPUVWXYZ[\]^_`abcdefghijklmnQopqrsR t u v  wxyz{|}~M     M     nSTPUVWXYZ[\]^_`abcdefghijklmnQopqrsR t u v  wxyz{|}~ None3457NExample (p. 74).Make a stylized variable and update the index. Core definitional CNF procedure.@Make n large enough that "v_m" won't clash with s for any m >= nOverall definitional CNF.-Version tweaked to exploit initial structure.Version that guarantees 3-CNF.   None!"+34579>ILN (Class of quantified formulas.,The two types of quantification-for_all.exists16" can't be a function when -XUnicodeSyntax is enabled.5Implementation of  for ( types.6Implementation of  for ( types.7)Combine two formulas if they are similar.8QConvert any instance of IsQuantified to any other by specifying the result type.% !"#$%&'()*+,-./0123456789: !"#$%&'()*+,-./0123456789:,-.()*+/1023456789: !"#$%&'  !"#$%&'()*+,-./0123456789:12 None 3457>ILN =IGenerate assertion equivalent to R(s,t) <= n for the Ramsey number R(s,t)Half adder. (p. 66) Full adder. Useful idiom.Mn-bit ripple carry adder with carry c(0) propagated in and c(n) out. (p. 67)$Special case with 0 instead of c(0).Carry-select adderEEquivalence problems for carry-select vs ripple carry adders. (p. 69)@Ripple carry stage that separates off the final result. (p. 70):UUUUUUUUUUUUUUUUUUUU (u) + VVVVVVVVVVVVVVVVVVVV (v)WWWWWWWWWWWWWWWWWWWW (w)+ Z (z)0Naive multiplier based on repeated ripple carry.Primality examples. (p. 71)For large examples, should use  instead of  in these functions.!;<=>?@A;<=>?@A;<>?@=A ;<=>?@A None 345>LNBThe DP procedure.C#Davis-Putnam satisfiability tester.DDavis-Putnam tautology checker.E3The same thing but with the DPLL procedure. (p. 84)HBIterative implementation with explicit trail instead of recursion.K7With simple non-chronological backjumping and learning. Examples.BCDEFGHIJKLMN BCDEFGHIJKLMN BCDHIJEFGKLMNBCDEFGHIJKLMNNone!"+34579>ILNGThe holds function computes the value of a formula for a finite domain.PcSpecify the domain of a formula interpretation, and how to interpret its functions and predicates.Q&A formula type with equality predicateR)A formula type with no equality predicateSoCombine IsQuantified, HasApply, IsTerm, and make sure the term is using the same variable type as the formula.T2Implementation of holds for IsQuantified formulas.U9Implementation of holds for atoms with equate predicates.W'Examples of particular interpretations.Y%Find the free variables in a formula.ZjFind all the variables in a formula. var :: (IsFirstOrder formula, v ~ VarOf formula) => formula -> Set v[Find the variables in an atom\Find the variables in a term]Universal closure of a formula.^1Substitution in formulas, with variable renaming._Substitution within terms.`Substitution within a LiteralaSubstitution within atoms.bSubstitution within quantifiers*OPQRSTUVWXYZ[\]^_`abcOPQRSTUVWXYZ[\]^_`abcSPOTUVZY[\]^ba_`WXRQc$OPQRSTUVWXYZ[\]^_`abcNone!"4NdefgdefgdefgdefgNone!"+34579>LNjQA first order logic formula type with an equality predicate and skolem functions.k0A function type that is an instance of HasSkolem+The state associated with the Skolem monad.%The set of allocated skolem functionsThe 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.o:State monad for generating Skolem functions and constants.p9Class of functions that include embedded Skolem functions~A Skolem function is created to eliminate an an existentially quantified variable. The idea is that if we have a predicate P[x,y,z], and z# is existentially quantified, then P5 is only satisfiable if there *exists* at least one z that causes P1 to be true. Therefore, we envision a function sKz[x,y]+ whose value is one of the z's that cause P to be satisfied (if there are any; if the formula is satisfiable there must be.) Because we are trying to determine if there is a satisfying triple x, y, z, the Skolem function sKz will have to be a function of x and y), so we make these parameters. Now, if P[x,y,z]V is satisfiable, there will be a function sKz which can be substituted in such that P[x,y,sKz[x,y]] is also satisfiable. Thus, using this mechanism we can eliminate all the formula's existential quantifiers and some of its variables.r]Create a skolem function with a variant number that differs from all the members of the set.tReturn a function based on f but different from any set element. The result may be f itself if f is not a member of the set.w>Run a computation in a stacked invocation of the Skolem monad.x+Run a pure computation in the Skolem monad.yERoutine simplification. Like "psimplify" but with quantifier clauses.z-Negation normal form for first order formulas{Prenex normal form.|,Extract the skolem functions from a formula.Core Skolemization function.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.}Overall Skolemization function.~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. For this reason we can safely convert to any instance of IsPropositional.|Skolemize and then specialize. Because we know all quantifiers are gone we can convert to any instance of IsPropositional.FVersions of the normal form functions that leave quantifiers in place.4hijklmnopqrstuvwxyz{|}~hijklmnopqrstuvwxyz{|}~pqrstuvnxowyz{|}~klmjhi+hijklmnopqrstuvwxyz{|}~None 345>LNQuasiQuote for a first order formula. Loading this symbol into the interpreter and setting -XQuasiQuotes lets you type expressions like [fof| " x. p(x) |]NQuasiQuote for a propositional formula. Exactly like fof, but no quantifiers.NQuasiQuote for a propositional formula. Exactly like fof, but no quantifiers.NQuasiQuote for a propositional formula. Exactly like fof, but no quantifiers.<:<<NoneINNone !"3457IN Propositional valuation.EGet the constants for Herbrand base, adding nullary one if necessary.?Enumeration of ground terms and m-tuples, ordered by total fns.:Iterate modifier "mfn" over ground terms till "tfn" fails.&Hence a simple Gilmore-type procedure.#First example and a little tracing.-Slightly less easy example. Expected output:10 ground instances tried; 1 items in list 0 ground instances tried; 1 items in list 1 ground instances tried; 13 items in list 1 ground instances tried; 13 items in list 2 ground instances tried; 57 items in list 3 ground instances tried; 84 items in list 4 ground instances tried; 405 items in list1The Davis-Putnam procedure for first order logic.@Show how few of the instances we really need. Hence unification!6Try to cut out useless instantiations in final result.None 3457>LN\Main unification procedure. The result of unification is a mapping of variables to terms, so although we can unify two dissimilar types, they must at least have the same term type (which means the variable type will also match.) The result of unifying the two arguments is added to the state, while failure is signalled in the Failing monad.One might think that Unify should take two type parameters, the types of two values to be unified, but there are instances where a single type contains both - for example, in template-haskell we want to unify a and b in a predicate such as this: (AppT (AppT EqualityT a) b).'Solve to obtain a single instantiation.CUnification reaching a final solved form (often this isn't needed). Examples.qUnify literals, perhaps of different types, but sharing term and variable type. Note that only one needs to be 9U, if the unification succeeds the other must have been too, if it fails, who cares.  None !"3457FINUnify complementary literals.$Unify and refute a set of disjuncts.:Hence a Prawitz-like procedure (using unification on DNF).OMore standard tableau procedure, effectively doing DNF incrementally. (p. 177)          None !"3457N8Barber's paradox is an example of why we need factoring.MGU of a set of literals.Simple example that works well.>With deletion of tautologies and bi-subsumption with "unused".Test for subsumptionPositive (P1) resolution.'Introduce a set-of-support restriction.The (in)famous Los problem.# !"#$%&'()" !"#$%&'()None 4>ILN*+,-./012345678*+,-./012345678None 3457>ILN9The set of predicates in a formula. predicates :: (IsQuantified formula atom v, IsAtomWithEquate atom p term, Ord atom, Ord p) => formula -> Set atom-Code to generate equate axioms for functions.:And for predicates.;AHence implement logic with equate just by adding equate "axioms".IWishnu Prasetya's example (even nicer with an "exists unique" primitive). 9:;<=>?@ 9:;<=>?@None`ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  !"#$%&'()*+,-./012349:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$"#%"#&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyyz{||}~     U V W X                                              ! " # $ % & ' ( ) * W + , - . / 0 1 2 3 4 U V W X     5 6 7 8 9 : ; < = > ? @ 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 [ \ ]^_`abcdefghijklmnopqrstuvwxyz{|}~KK"#""""" " " "   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJK?LMNOPQRSTUVWXYZ[\])^  _ ` a b  L c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                           L      c    )                   U      L      c    c           L      _LcdefghijxLcdLcdL    c cdeL !"#$%&'%&(%&)%&*%&+%&,%&-%&-%./%.0%.1%.2%.3%.4%.5%.6%.7%.8%.9%.:%.;%.<%.=%.>%.?%.@%.A%.B%.C%.D%.E%.F%.G%.H%.I%.J%.K%.L%.M%.M%.N%.O%.P%.P%.Q%.R%.S%.T%.U%.V%WX%WY%WZ%W[%W\%W]%W]"#^"#_"#`"#`"#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"{"|"}"~""""""""""""""""""""""""""""""atpha_0Az3KW3O3EtGfQ1t2c6dhOData.Logic.ATP.LibData.Logic.ATP.PrettyData.Logic.ATP.FormulasData.Logic.ATP.LitData.Logic.ATP.TermData.Logic.ATP.ApplyData.Logic.ATP.EquateData.Logic.ATP.LitWrapperData.Logic.ATP.PropData.Logic.ATP.DefCNFData.Logic.ATP.QuantifiedData.Logic.ATP.PropExamplesData.Logic.ATP.DPData.Logic.ATP.FOLData.Logic.ATP.PrologData.Logic.ATP.SkolemData.Logic.ATP.ParserData.Logic.ATP.ParserTestsData.Logic.ATP.HerbrandData.Logic.ATP.UnifData.Logic.ATP.TableauxData.Logic.ATP.ResolutionData.Logic.ATP.MesonData.Logic.ATP.EqualData.Logic.ATPappli_6L6MwYwhWpQ6P8LRd5u1oKControl.Applicative.ErrorFailureSuccessFailingbase Data.Monoid<>prett_JItwetRppk1H5Uq3xbjDGCText.PrettyPrint.HughesPJClasspPrint pPrintPrecPrettySideTopLHSRHSUnary AssociativityInfixLInfixRInfixNInfixA Precedence HasFixity precedence associativity testParen assertEqual' testEqualsleafPrecatomPrecnotPrecandPrecorPrecimpPreciffPrecboolPrec quantPreceqPrecpAppPrec IsFormulaAtomOftruefalseasBoolatomic overatomsonatomsIsAtom⊤⊥fromBool prettyBool atom_unionLitLlnameLFormulaFTAtomNot JustLiteral IsLiteral naiveNegate foldNegation foldLiteral'negated.~.¬negatenegativepositive foldLiteral zipLiterals' zipLiteralsconvertLiteralconvertToLiteralprecedenceLiteralassociativityLiteral prettyLiteral showLiteralonatomsLiteraloveratomsLiteralFTermTermVarFApplyIsTermTVarOfFunOfvtfAppfoldTermFNameArity IsFunctionV IsVariablevariantprefixvariantszipTerms convertTermprecedenceTermassociativityTerm prettyTermprettyFunctionApplyshowTermshowFunctionApplyfuncstestTermApAtom PredicateFOLAPAP JustApplyHasApplyPredOfTermOfapplyPredicate foldApply' overtermsonterms IsPredicate atomFuncs functions foldApply prettyApplyovertermsApply ontermsApply zipApplys showApply convertApply onformulapAppEqAtomFOLREquals HasEquateequate foldEquate.=. zipEquates convertEquate overtermsEq ontermsEqshowApplyAndEquate showEquate prettyEquateprecedenceEquateassociativityEquateJLunJLDepthSetLikeslViewslMapslUnionslEmpty slSingletonfailingslInsertprettyFoldable∅setAnysetAllflattencanallpairsdistribtryfindtryfindMevalRSrunRS settryfind mapfilter setmapfilteroptimizemaximizeminimizeimageallsets allsubsetsallnonemptysubsetstimeComputation timeMessagetimetimeoutcompeteapply tryApplyDdefinedundefine|=>|->fpfdeepentestLib TruthTableJustPropositionalPFormulaAndOrImpIffPropPpnameBinOp:<=>::=>::&::|:IsPropositional.|..&..<=>..=>.foldPropositional'foldCombination⇒⊃==>→<=><==>⇔↔∧·∨foldPropositionalbinopzipPropositionalconvertPropositionalconvertToPropositionalprecedencePropositionalassociativityPropositionalprettyPropositionalshowPropositionalonatomsPropositionaloveratomsPropositionaleval tautology unsatisfiable satisfiableonallvaluationsatoms truthTablepsubstdual psimplify psimplify1nnfnenfdnfSetmk_litsallsatvaluations list_conj list_disjrawdnfpurednftrivialsimpdnfdnfpurecnfsimpcnfcnf_cnf'testPropNNumAtommaaidefcnf1defcnf2defcnfsdefcnf3 testDefCNFQFormulaForallExists IsQuantifiedVarOfquantfoldQuantifiedQuant:!::?:for_allexists∀∃precedenceQuantifiedassociativityQuantifiedprettyQuantifiedshowQuantified zipQuantifiedconvertQuantifiedonatomsQuantifiedoveratomsQuantifiedKnowsKramseymk_knows mk_knows2primetestPropExamplesdpdpsatdptautdplldpllsatdplltautdplidplisatdplitautdplbdplbsatdplbtauttestDPholdsInterp EqFormula ApFormula IsFirstOrderholdsQuantified holdsAtomtermval bool_interp mod_interpfvvarfvafvt generalizesubsttsubstlsubstasubstsubstqtestFOL PrologRuleProlog renamerule testPrologSkTermSkAtomFormulaFunctionFnSkolemSkolemMSkolemT HasSkolemSVarOftoSkolem foldSkolem variantSkolem showSkolem prettySkolem runSkolemT runSkolemsimplifypnfskolems askolemize specialize skolemizesimpdnf'simpcnf' testSkolemfofpflittermparseFOLparsePLparseLit parseFOLTermdefm_parensm_anglesm_symbol m_integer m_identifier m_reservedOp m_reserved m_whiteSpace litparser propparser folparser litexprparserpropexprparserlittermproptermfoltermexistentialQuantifierforallQuantifier quantifierId quantifierOpfolpredicate_infix folpredicate folfunctionfolconstant_numericfolconstant_reserved folconstant folsubtermfolsubterm_prefixfolfunction_infixallOpsallIdspredicate_infix_symbols constants equateOps provesOps entailsOpsnotOpstrueOpstrueIdsfalseOpsfalseIdsandOpsorOpsimpOpsiffOps forallIds forallOps existsIds existsOps$fPrettyMessage$fPrettyParseErrort parseFOL' testParserpholdsherbfuns groundterms groundtuplesherbloop gilmore_loopgilmoretest01p24p45fmp45dp_mfndp_loop davisputnam davisputnam'dp_refine_loop dp_refine testHerbrandUnifyUTermOfunify'unify unify_termssolve fullunifyunify_and_applyunify_literals unify_atomsunify_atoms_eqtestUnifprawitztab testTableaux resolution1davis_putnam_example_formula match_atomsmatch_atoms_eq resolution2 presolution resolution3testResolutionmeson1meson2meson testMesonfunction_congruence equalitizewishnu testEqual $fPrettyMap $fPrettySet prettyShowText.PrettyPrint.HughesPJfsep punctuatenesthcatbracketscommatextDocghc-prim GHC.TypesBoolGHC.BaseNothing Data.Foldablefoldr$fPrettyLFormula$fHasFixityLFormula$fJustLiteralLFormula$fIsLiteralLFormula$fIsFormulaLFormula showVariabletest00 $fPrettyTerm $fIsTermTerm$fHasFixityTerm $fShowTerm$fIsStringTerm $fPrettyFName $fShowFName$fIsStringFName$fIsFunctionFName $fPrettyV$fShowV $fIsStringV $fIsVariableV$fIsVariable[]GHC.ShowShow NamedPred$fJustApplyFOLAP$fIsPredicatePredicate$fPrettyPredicate$fShowPredicate$fIsStringPredicate$fHasFixityFOLAP $fShowFOLAP$fHasApplyFOLAP $fPrettyFOLAP $fIsAtomFOLAP$fJustApplyFOLAP0$fHasFixityFOL $fShowFOL $fHasApplyFOL $fPrettyFOL $fIsAtomFOL$fHasEquateFOLoveratomsLiteral' $fIsLiteralJL$fJustLiteralJL $fIsFormulaJL $fHasFixityJL $fPrettyJLFuncErrorMsgundefinedFunctionEmptyLeafBranchitlist end_itlistitlist2test02 isUndefinedmapffoldlFnfoldrFngraphdomranapplyD tryApplyLchoose $fPrettyDepth $fEnumDepth $fSetLikeSeq $fSetLike[] $fSetLikeSet$fPrettyFailing$fMonadFailingshownenf'distrib1 TruthTableRow transposetest03test04test06test07test08test09test10test11test12test13test14test15test16test17test18test19test20test21test22test23test24nnf1test25test26test27test28dnfListtest29test30test31test32test33test34test35$fPrettyTruthTable$fJustPropositionalPFormula$fPrettyPFormula$fIsLiteralPFormula$fIsPropositionalPFormula$fIsFormulaPFormula$fHasFixityPFormula$fShowPFormula$fHasFixityProp $fPrettyProp$fIsStringProp $fIsAtomProp $fShowPropmkpropmaincnf max_varindexdefstep mk_defcnftestfmstringsandcnforcnfsubcnfandcnf3 $fIsAtomAtom$fHasFixityAtom $fNumAtomAtom $fPrettyAtom showsPrec$fIsLiteralQFormula$fHasFixityQFormula$fShowQFormula$fIsQuantifiedQFormula$fIsPropositionalQFormula$fIsFormulaQFormula$fPrettyQFormulahalfsumcarryconjoin ripplecarry ripplecarry0 ripplecarry1 mk_adder_test rippleshift multiplier bitlength integer-gmpGHC.Integer.TypeIntegerInt halfcarryhasumfamuxoffset carryselectbit congruent_to $fIsAtomKnows$fHasFixityKnows $fPrettyKnowsTrailMixGuessedDeducedone_literal_ruleaffirmative_negative_rule resolve_onresolution_blowupresolution_rule posneg_count unassignedunit_subpropagateunit_propagate backtrackbackjump$fNumAtomKnowsFiniteInterpretationdomain funcApply predApplyeqApplytest05+$fFiniteInterpretationFOLFNamePredicateVdom0$fFiniteInterpretationQFormulaFNamePredicateVdom$fIsFirstOrderQFormula$fIsFirstOrderQFormula0 SkolemState skolemSet univQuantskolem simplify1prenex pullquantspullq newSkolemskolem2purednf'purecnf'$fHasSkolemFunction$fPrettyFunction$fShowFunction$fIsStringFunction$fIsFunctionFunctionunify_term_pairistriv $fUnify(,)unify_complements unify_refute prawitz_looptableaup20comparep19 tabrefutep38splittab $fPrettyK$fEnumKmgusubsumes_clauselosMatchmatch unifiablerename resolventsresolve_clausesresloop1pure_resolution1 match_termsmatch_literalspure_resolution2resloop2 incorporatereplacepure_presolutionpreslooppresolve_clausespure_resolution3 gilmore_1p1$fMatch(,)VTermcontrapositivesmexpand1 puremeson1equalexpand2mexpand2mexpands setSplitAt puremeson2 predicatespredicate_congruenceequivalence_axioms testEqual01ewd testEqual02 testEqual03 testEqual04HUnit_7IPmJa5HmrxHl6ny5upchmTest.HUnit.Text runTestTTshowPath showCounts runTestTextputTextToShowSputTextToHandlePutTextTest.HUnit.Base performTest testCaseCount testCasePaths~:~?=~=?~?@?=@=?@? assertEqual assertString assertBoolassert Assertable listAssertListAssertableAssertionPredicateassertionPredicateAssertionPredicable TestLabelTestListTestCaseTesttestTestablefailureserrorstriedcasesCountscountspathState ReportStart ReportProblemPathLabelListItemNodeTest.HUnit.Lang assertFailure AssertionlocationColumn locationLine locationFileLocation prettyParen prettyNormal PrettyLevel pPrintList fullRender renderStylerenderstylefirstfcatcatsep<+>$+$$$hangvcathsep reduceDocmaybeDoubleQuotes maybeQuotes maybeBraces maybeBrackets maybeParensbracesparens doubleQuotesquotesrationaldoublefloatintegerintrbracelbracerbracklbrackrparenlparenequalsspacecolonsemiisEmptyempty zeroWidthText sizedTextptextcharPStrStrChr TextDetailsribbonsPerLine lineLengthmodeStyle OneLineModeLeftMode ZigZagModePageModeMode