úÎ"<Ú(      !"#$%&' experimentalgershomb@gmail.comNone;We can wrap any underying atom dype in an Ion to give it a polarity and add handling of not to our simplification tools. smart constructors for QueryRep ^QueryReps can be queried for clauses within them, and clauses within them can be extracted. pretty printer class 0A formula is either an atom (of some type, e.g. String). IA non-atomic formula (which is either a disjunction or a conjunction) is  n-ary and consists of a Set1 of atoms and a set of non-atomic subformulas of M dual connective, i.e. the non-atomic subformulas of a disjunction must all D be conjunctions. The type system enforces this since there is no QFlipTyp  instance for QAtomTyp. 6disjunction is the dual of conjunction and vice-versa We'Mll start with three types of formulas: disjunctions, conjunctions, and atoms 1convenience constructors, not particularly smart smart constructor for QOp " does following optimization: a \ (a \ b)  - a, or dually: a / (a / b)  - a convenience functions (a \ b) \ (a \ c) \ d  - (a \ (b \ c)) / d  (and also the dual) ˜Given a set of QueryReps, extracts a common clause if possible, returning the clause, the terms from which the clause has been extracted, and the rest. "xTakes any given simplifier and repeatedly applies it until it ceases to reduce the size of the query reprepresentation. &a \ (b \ ~b) \ (c \ d)  - a \ (c \ d)  a \ ~a   (b / c)  - False  (a / ~a) \ (b \ ~b)  - True (*)  and duals  N.B. 0-ary / is False and 0-ary / is True B  !"#$%&'()*+,-./0123456789:;<=>?@A(  !"#$%&'(   !"#$%&'6   !"#$%&'()*+,-./0123456789:;<=>?@AB      !"#$%&'()*+,-./0123456789:;<=>?@ABCDboolsimplifier-0.1.6Data.BoolSimplifierQNotQNegqNot PPConstQR ppConstQRIonPosNegCombineQandqorq HasClause hasClause stripClause PPQueryRep ppQueryRepQueryRepQOpQAtomQFlipTypQAtomTypQAndTypQOrTyp extractAs extractCsqOrqAndqop extractAtomCsandqsorqssimplifyQueryRepgetCommonClauseAsgetCommonClauseCsfixSimplifyQueryRepqAtom isEmptyQR isConstQR simplifyIons maximumByNote $fQNotQAndTyp $fQNotQOrTyp$fQNotQAtomTyp $fPPConstQRa$fPPConstQRQOrTyp$fPPConstQRQAndTyp$fPPQueryRepQueryRep$fPPQueryRepQueryRep0$fPPQueryRepQueryRep1$fCombineQaQAtomTypQAtomTyp$fCombineQaQAtomTypQOrTyp$fCombineQaQAtomTypQAndTyp$fCombineQaQOrTypQAtomTyp$fCombineQaQOrTypQOrTyp$fCombineQaQOrTypQAndTyp$fCombineQaQAndTypQAtomTyp$fCombineQaQAndTypQOrTyp$fCombineQaQAndTypQAndTyp$fHasClausefifeqtyp$fHasClausefifeQAtomTyp$fPPQueryRepQueryRep2$fShowQueryRep $fOrdQueryRep $fEqQueryRep $fShowQAndTyp $fShowQOrTyp