!      !"#$%&'()*+,-./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 O P Q R S T 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 { | } ~            !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneM' ideas-math-types5Minimal complete definition: inverse or appendInverse !"#$ !"#$#6bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneM) 23457689;:<=>?@ABCDFEGIHJMPLKNOQ JMPLKNOGIHDFEABC>?@=Q89;:<576234F7I6K6N7bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneM,0   xyz{|}~   ~{|}xyzbastiaan.heeren@ou.nl  provisional portable (depends on ghc) None=?@ACEX.y1bastiaan.heeren@ou.nl  provisional portable (depends on ghc) None1 ideas-math-types3Not all monoids are idempotent (see: idempotentFor)bastiaan.heeren@ou.nl  provisional portable (depends on ghc) None3 bastiaan.heeren@ou.nl  provisional portable (depends on ghc) None4 bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneM6V667754 bastiaan.heeren@ou.nl  provisional portable (depends on ghc) None2L %ideas-math-typesWThe type LogicAlg is the algebra for the data type Logic | Used in the fold for Logic.&ideas-math-types5For simple use, we assume the variables to be strings'ideas-math-typesRThe data type Logic is the abstract syntax for the domain | of logic expressions.0ideas-math-types)foldLogic is the standard fold for Logic.1ideas-math-typesPretty-printer for propositions3ideas-math-typesThe monadic join for logic4ideas-math-typesevalLogic takes a function that gives a logic value to a variable, | and a Logic expression, and evaluates the boolean expression.5ideas-math-typeseqLogic determines whether or not two Logic expression are logically | equal, by evaluating the logic expressions on all valuations.8ideas-math-typesMA Logic expression is atomic if it is a variable or a constant True or False.9ideas-math-typesFunctions isDNF, and isCNF determine whether or not a Logix expression | is in disjunctive normal form, or conjunctive normal form, respectively.:ideas-math-typesFunctions isDNF, and isCNF determine whether or not a Logix expression | is in disjunctive normal form, or conjunctive normal form, respectively.;ideas-math-types Count the number of equivalences<ideas-math-typesKFunction varsLogic returns the variables that appear in a Logic expression.<   xyz{|}~%&'(-.,/*)+0123456789:;<=>?@ABC%&'(-.,/*)+0123456789:;<=>?@ABC)3*2+5,4 bastiaan.heeren@ou.nl  provisional portable (depends on ghc) None=?RRideas-math-types*Equality modulo associativity of operatorsTideas-math-typesEquality modulo associativity commutativity?idempotency of operators, and there units/absorbing elementsRSTUVUVRTS bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneT YZ[\]^_ YZ[]\^_Y2Z3 bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneU `abcdefghijklmnopqrstud`abcefghijklmno qrsptubastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneMYideas-math-typesAlways positiveideas-math-typesAlways positiveideas-math-typesAlways positiveideas-math-typesAlways positivebastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneM[ideas-math-typesRemove duplicates  bastiaan.heeren@ou.nl  provisional portable (depends on ghc) Safeaideas-math-types#All prime numbers smaller than 1000!An infinite list of prime numbersideas-math-typesAll prime factors of a numberideas-math-typesTesting for primalityideas-math-types;Two numbers are coprime if they do not share a prime factorideas-math-types"All factors of a (positive) numberbastiaan.heeren@ou.nl  provisional portable (depends on ghc) SafecObastiaan.heeren@ou.nl  provisional portable (depends on ghc) Noned%% 111111111111bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneMg    bastiaan.heeren@ou.nl  provisional portable (depends on ghc) Nonei1 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFG1. "#$*-+,/!%&012'()3456789:;<>=?@ABCDEFGE8bastiaan.heeren@ou.nl  provisional portable (depends on ghc) None2kHQMIJPRNKLOSTUHQMIJPRNKLOTUSbastiaan.heeren@ou.nl  provisional portable (depends on ghc) None>m jklmnopqrst lmjknopqrstbastiaan.heeren@ou.nl  provisional portable (depends on ghc) None2o wxyz{|wxzy{|bastiaan.heeren@ou.nl  provisional portable (depends on ghc) Nonepe8bastiaan.heeren@ou.nl  provisional portable (depends on ghc) Noner^ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHQMIJPRNKLOSTUjklmnopqrstwxyz{|bastiaan.heeren@ou.nl  provisional portable (depends on ghc) Safetbastiaan.heeren@ou.nl  provisional portable (depends on ghc) Safev  bastiaan.heeren@ou.nl  provisional portable (depends on ghc) Safexideas-math-types>Raise all powers by a constant (discarding negative exponents)bastiaan.heeren@ou.nl  provisional portable (depends on ghc) NoneMwideas-math-typesData type for decimal fractionsideas-math-types7Approximation of a double, with a precision of 8 digitsideas-math-typesTests whether it is safe to divide by this fraction: it is safe to divide if its numerator(!) is a product of two's and five's.ideas-math-typesnumber of decimal digitsbastiaan.heeren@ou.nl  provisional portable (depends on ghc) None,ideas-math-types8Non-negative numbers only, also for intermediate resultsideas-math-types|like the original defintion, except that this view now also converts floating point numbers (using an exact approximation) !"#$%&'(&')&'*&'+&',&'-&'.&'/&'0&'1&'2&'3&'4&'56789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_``abbcdefghijklmnopqrstuvwxyz{|}~                                ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 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 [ \ ] ^ _ ` 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:;<=>?@ABCDEFGHIJKLMNOPQ[]YRXSTUVWXYZ[\]^_`abcdeBfghijklmnopqrstuvwxyz{|}~Tgideas-math-types-1.1-inplaceDomain.Algebra.GroupDomain.Math.Data.WithBoolDomain.Algebra.BooleanDomain.Algebra.FieldDomain.Algebra.LawDomain.Algebra.GroupLawsDomain.Algebra.FieldLawsDomain.Algebra.BooleanLawsDomain.Algebra.SmartGroupDomain.Logic.FormulaDomain.Logic.GeneratorDomain.Logic.ViewsDomain.Math.Data.IntervalDomain.Math.Data.MixedFractionDomain.Math.Data.OrListDomain.Math.Data.PrimesDomain.Math.Data.PrimeFactorsDomain.Math.Data.RelationDomain.Math.Expr.SymbolsDomain.Math.Expr.DataDomain.Math.Expr.ParserDomain.Math.Expr.ClipboardDomain.Math.Expr.ViewsDomain.Math.SafeDomain.Math.Data.SquareRootDomain.Math.Data.Polynomial Domain.Math.Data.DecimalFractionDomain.Math.Numeric.ViewsDomain.Math.ExprbaseGHC.Base<>memptymappendmconcatjoinMonoidds-1.8-37923bcdIdeas.Common.Classes equivalentimpliesorsandsisFalseisTruefromBoolfalsetrue BoolValue complement<||><&&>Boolean CoMonoidZero isMonoidZeroCoGroup isInverse isAppendInvCoMonoidisEmptyisAppendWithZero fromWithZero MonoidZeromzeroGroupinverse appendInv<>-associativeList$fTraversableWithZero$fMonoidZeroWithZero$fMonoidWithZero$fSemigroupWithZero$fCoMonoidWithZero $fCoMonoidSet $fCoMonoid[]$fCoMonoidZeroWithZero $fEqWithZero $fOrdWithZero$fFunctorWithZero$fFoldableWithZero$fApplicativeWithZeroCoFieldisRecip isDivisionCoRingisNegateisMinus CoSemiRingisPlusisZeroisTimesisOneSafeNumMultiplicativefromMultiplicativeAdditive fromAdditiveField timesInverse|/|Ring plusInverse|-|SemiRing|+|zerosum|*|oneproductsafeNum$fGroupAdditive$fMonoidAdditive$fSemigroupAdditive$fApplicativeAdditive$fFunctorAdditive$fMonoidZeroMultiplicative$fGroupMultiplicative$fMonoidMultiplicative$fSemigroupMultiplicative$fApplicativeMultiplicative$fFunctorMultiplicative$fFieldSafeNum $fRingSafeNum$fSemiRingSafeNum$fFractionalSafeNum $fNumSafeNum$fMonadSafeNum$fApplicativeSafeNum$fFunctorSafeNum $fShowSafeNum $fOrdSafeNum $fEqSafeNum$fArbitrarySafeNum$fCoMonoidZeroMultiplicative$fCoMonoidMultiplicative$fCoMonoidAdditive$fCoGroupAdditive$fCoGroupMultiplicative$fShowAdditive $fEqAdditive $fOrdAdditive$fArbitraryAdditive$fCoArbitraryAdditive$fShowMultiplicative$fEqMultiplicative$fOrdMultiplicative$fArbitraryMultiplicative$fCoArbitraryMultiplicativeOrfromOrAndfromAnd DualMonoid>< dualCompl CoBooleanisAndisOr isComplement conjunctions disjunctions$fDualMonoidAnd$fMonoidZeroAnd $fMonoidAnd$fSemigroupAnd$fApplicativeAnd $fFunctorAnd$fCoMonoidZeroAnd $fCoMonoidAnd$fDualMonoidOr$fMonoidZeroOr $fMonoidOr $fSemigroupOr$fApplicativeOr $fFunctorOr$fCoMonoidZeroOr $fCoMonoidOr $fShowAnd$fEqAnd$fOrdAnd$fArbitraryAnd$fCoArbitraryAnd$fShowOr$fEqOr$fOrdOr $fArbitraryOr$fCoArbitraryOrLawSpec:==:LawlawlawAbsmapLaw propertyLaw rewriteLaw$fRuleBuilderLawSpeca $fTestableLaw $fShowLaw$fLawBuilder->a$fLawBuilderLawa$fLawBuilderLawSpeca associative leftIdentity rightIdentity identityLaws monoidLawscommutativeMonoidLaws idempotent leftInverse rightInverse doubleInverseinverseIdentityinverseDistrFlipped inverseLaws groupLawsappendInverseLaws commutative inverseDistrabelianGroupLawsleftZero rightZerozeroLawsmonoidZeroLawsassociativeForcommutativeFor idempotentForleftDistributiveForrightDistributiveForleftDistributiverightDistributivedistributiveLaws semiRingLawsleftNegateTimesrightNegateTimesnegateTimesLawsringLawscommutativeRingLawsdistributiveSubtractionLawsexchangeInverses fieldLawsfromAdditiveLawfromMultiplicativeLaw propsField andOverOrLaws orOverAndLawscomplementAndLawscomplementOrLawsabsorptionAndLawsabsorptionOrLaws deMorganAnd deMorganOrdoubleComplementcomplementTruecomplementFalse booleanLaws fromAndLaw fromOrLaw propsBoolean SmartFieldfromSmartField SmartGroupfromSmartGroup SmartZero fromSmartZeroSmart fromSmart.+..-.neg.*../..&&..||.$fBoolValueSmart $fMonoidSmart$fSemigroupSmart$fApplicativeSmart$fFunctorSmart$fBooleanSmart$fMonoidSmartZero$fSemigroupSmartZero$fApplicativeSmartZero$fFunctorSmartZero$fGroupSmartGroup$fMonoidSmartGroup$fSemigroupSmartGroup$fApplicativeSmartGroup$fFunctorSmartGroup$fFieldSmartField$fRingSmartField$fSemiRingSmartField$fApplicativeSmartField$fFunctorSmartField $fShowSmart $fEqSmart $fOrdSmart$fCoMonoidSmart$fMonoidZeroSmart$fCoMonoidZeroSmart$fShowSmartZero $fEqSmartZero$fOrdSmartZero$fMonoidZeroSmartZero$fCoMonoidSmartZero$fCoMonoidZeroSmartZero$fShowSmartGroup$fEqSmartGroup$fOrdSmartGroup$fCoMonoidSmartGroup$fCoGroupSmartGroup$fCoMonoidZeroSmartGroup$fMonoidZeroSmartGroup$fCoSemiRingSmartField$fCoRingSmartField$fCoFieldSmartFieldLogicAlgSLogicLogicVar:->::<->::&&::||:NotTF foldLogicppLogic ppLogicPriocatLogic evalLogiceqLogic tautologyisNotisAtomicisDNFisCNFcountEquivalences varsLogic trueSymbol falseSymbol notSymbol impliesSymbolequivalentSymbol andSymbolorSymbol $fIsTermLogic$fDifferentLogic$fUniplateLogic$fToLatexLogic$fContainerLogic$fCoBooleanLogic$fBooleanLogic$fBoolValueLogic$fTraversableLogic$fFoldableLogic$fFunctorLogic $fShowLogic $fEqLogic $fOrdLogic equalLogicAnormalizeLogicA equalLogicACI generateLogic generateLevel$fCoArbitraryLogic$fArbitraryLogic.<->..->.simplify pushNotWithpushNotorViewandViewEndpoint Excluding Including UnboundedIntervalemptypoint unboundedopenclosedleftOpen rightOpen greaterThangreaterThanOrEqualTolessThanlessThanOrEqualTosegmentsexceptunion intersectisIntestMe$fCoArbitraryEndpoint$fArbitraryEndpoint$fFunctorEndpoint$fCoArbitrarySegment $fShowSegment$fCoArbitraryInterval$fArbitraryInterval$fShowInterval$fBooleanInterval$fBoolValueInterval $fEqEndpoint$fShowEndpoint $fEqSegment $fEqInterval MixedFraction wholeNumber fractionPart numerator denominator$fShowMixedFraction$fEqMixedFraction$fOrdMixedFraction$fNumMixedFraction$fFractionalMixedFraction$fRealMixedFraction$fRealFracMixedFractionOrSetOrList noDuplicates oneDisjuncttoOrList orListView orSetView catOrList $fShowOrList$fArbitraryOrList$fIsTermOrList$fContainerOrList$fBoolValueOrList$fTraversableOrList$fFoldableOrList$fFunctorOrList$fContainerOrSet$fBoolValueOrSet $fShowOrSet $fEqOrList $fOrdOrList$fSemigroupOrList$fMonoidOrList$fMonoidZeroOrList$fCoMonoidOrList$fCoMonoidZeroOrList $fEqOrSet $fOrdOrSet$fSemigroupOrSet $fMonoidOrSet$fMonoidZeroOrSet$fCoMonoidOrSet$fCoMonoidZeroOrSetprimes primeFactorsisPrimecoprimefactors testPrimes PrimeFactors greatestPower allPowers splitPower$fIntegralPrimeFactors$fRealPrimeFactors$fEnumPrimeFactors$fNumPrimeFactors$fOrdPrimeFactors$fEqPrimeFactors$fShowPrimeFactors Inequality:<::>::<=::>=:Equation Equations RelationTypeEqualTo NotEqualToLessThan GreaterThanLessThanOrEqualToGreaterThanOrEqualTo ApproximatelyRelation relationType Relational leftHandSide rightHandSide flipSides constructor isSymmetricrelationSymbols notRelationeval.==../=..<..>..<=..>=..~=.makeType equationViewinequalityView$fCoArbitraryRelationType$fArbitraryRelationType$fCoArbitraryRelation$fArbitraryRelation$fIsTermRelation$fRelationalRelation$fTraversableRelation$fFoldableRelation$fFunctorRelation$fShowRelation$fIsTermEquation$fCoArbitraryEquation$fArbitraryEquation$fRelationalEquation$fTraversableEquation$fFoldableEquation$fFunctorEquation$fShowEquation$fIsTermInequality$fCoArbitraryInequality$fArbitraryInequality$fRelationalInequality$fTraversableInequality$fFoldableInequality$fFunctorInequality$fShowInequality$fShowRelationType$fEqRelationType$fOrdRelationType$fEnumRelationType $fEqRelation $fOrdRelation $fEqEquation $fOrdEquationWithBool fromWithBool$fIsTermWithBool$fTraversableWithBool$fFoldableWithBool$fMonadWithBool$fApplicativeWithBool$fContainerWithBool$fBoolValueWithBool$fShowWithBool $fEqWithBool $fOrdWithBool$fFunctorWithBool$fArbitraryWithBool plusSymbol timesSymbol minusSymbol divideSymbol rootSymbol powerSymbol negateSymbol absSymbol gcdSymbol lcmSymbol logSymbol sinSymbol cosSymbollnSymbol expSymbol tanSymbol sinhSymbol tanhSymbol coshSymbol diffSymbol lambdaSymbol listSymbolpiSymbolrationalSymbol signumSymbol asinSymbol atanSymbol acosSymbol asinhSymbol atanhSymbol acoshSymbol bottomSymbol fcompSymbolmixedFractionSymbolisDivideisPowerisRoot isPowerSymbol isRootSymbol isLogSymbolisDivideSymbolisMixedFractionSymbol^rootmixedExpr:+::*::-:NegateNat:/:SqrtNumberSym fromDoubletoExprfromExpr $fIsTermExpr$fDifferentExpr $fCoFieldExpr $fCoRingExpr$fCoSemiRingExpr $fFieldExpr $fRingExpr$fSemiRingExpr $fShowExpr$fArbitraryExpr$fUniplateExpr$fWithVarsExpr$fWithFunctionsExpr$fFloatingExpr$fFractionalExpr $fNumExpr$fEqExpr $fOrdExpr$fShowAssociativity$fEqAssociativitypExprpRelExpr parseExpr parseExprM parseEqExprparseBoolEqExpr parseRelExprparseOrsEqExprparseOrsRelExprparseLogicRelExprparseExprTuple$fReferenceExpr $fReadExpr ClipboardaddToClipboardlookupClipboardremoveClipboardaddToClipboardGlookupClipboardG$fReferenceClipboard$fIsTermClipboard$fReadClipboard$fShowClipboard.^.plusView timesViewdivViewsumView simpleSumView productViewsimpleProductView selectVar SafePower safePowersafeSqrtsafeRootSafeDivsafeDiv safeRecipsafeDivFractional$fSafeDivRatio$fSafeDivDouble$fSafeDivInteger$fSafePowerDouble$fSafePowerRatio$fSafePowerInteger SquareRoot imaginary imaginaryUnittoListfromSquareRootconsqrtscaleisqrt sqrtRational$fArbitrarySquareRoot$fFractionalSquareRoot$fSafeDivSquareRoot$fNumSquareRoot$fFunctorSquareRoot$fShowSquareRoot$fEqSquareRoot$fOrdSquareRoot Polynomial toPolynomialfromPolynomialvarraisedegree lowestDegree coefficient positiveRoots negativeRoots derivative polynomialGCD factorizetestPolynomials$fArbitraryPolynomial$fNumPolynomial$fTraversablePolynomial$fFoldablePolynomial$fFunctorPolynomial$fSafeDivPolynomial$fShowPolynomial$fEqPolynomialDecimalFractionDF validDivisordigits$fSafePowerDecimalFraction$fSafeDivDecimalFraction$fFractionalDecimalFraction$fShowDecimalFraction$fEqDecimalFraction$fOrdDecimalFraction$fNumDecimalFraction$fRealDecimalFraction$fArbitraryDecimalFraction naturalView naturalNF integerView integerNFdecimalFractionView rationalViewrationalApproxView rationalNF fractionFormrationalRelaxedFormmixedFractionViewmixedFractionNF doubleViewdoubleNF