úÎppl1J      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI!(c) Matti A. Eskelinen, 2016-2017MITmatti.a.eskelinen@gmail.com experimentalPOSIXSafe59;<= 9Data type for Lorentzian (mixed signature) basis vectors.Timelike basis vector (-1)Spacelike basis vector (+1)cData type for constructing Euclidean basis vectors (metric is 1 for matching vectors, 0 otherwise).KA typeclass for specifying a metric space The default implementation uses  2; Replace it if you require a non-diagonal metric. ^Free multiplication of scaled blades (concatenation of vectors and multiplication of scalars). iMultiplies together two blades of orthogonal vectors and simplifies the results to canonical order using  . tMultiplies two blades of (possibly non-orthogonal) basis vectors and simplifies the result to canonical order using K. Note that this generally results in a direct sum of blades, i.e. a list. ÙCanonical (ordered) form of a scaled basis blade of orthogonal vectors Uses a gnome sort to commute the basis vectors to order and keeps track of the commutations w.r.t. the blade multiplier, applying the equation ba = -abfor each consecutive pair ba in wrong order. Note that this relation holds only for a basis with a diagonal bilinear form, for others use the more general (albeit slower) .JÙCanonical (ordered) form of a scaled basis blade of orthogonal vectors Uses a gnome sort to commute the basis vectors to order and keeps track of the commutations w.r.t. the blade multiplier, applying the equation ba = -abfor each consecutive pair ba in wrong order. Note that this relation holds only for a basis with a diagonal bilinear form, for others use the more general (albeit slower) .±Canonical (ordered) form of a scaled basis blade of vectors Uses a gnome sort to commute the basis vectors to order and keeps track of the commutations applying the equation ab = 2 B(a,b) - barfor any given bilinear form B between the basis vectors and the number ring. Note that this is slower than using  $ if your bilinear form is diagonal ( B(a,b) = 0 for a != b)K±Canonical (ordered) form of a scaled basis blade of vectors Uses a gnome sort to commute the basis vectors to order and keeps track of the commutations applying the equation ab = 2 B(a,b) - barfor any given bilinear form B between the basis vectors and the number ring. Note that this is slower than using  $ if your bilinear form is diagonal ( B(a,b) = 0 for a != b) JKL    JKL(c) Matti A. Eskelinen, 2016MITmatti.a.eskelinen@gmail.com experimentalPOSIXNoneIUA data type representing a Clif (multivector) composed of direct sum of scaled blades Constructs a ? from a list of blades and their multipliers in canonical form.$fromList [([], 42), ([E 1, E 2], 1)]42 *: [] + 1 *: [E 1,E 2]Constructor for a blade Infix synonym for M 1Constructor for basis vector values. Note that  a s is equivalent to  [a] s. $The Clifford (geometric) product on s.!The Clifford product on N3s of blades and multipliers. Filter out zero values" Addition of  values (direct sum).#%Direct sum of matching keys from two Ns. Filter out zero values.$ Reverse of a /, i.e. the reverse of all its component blades.%Reverses each blade (key)& Returns the canonical form of a '*Returns the canonical representation of a + (blades simplified and in canonical order)(GGrade projection on the given grade. For negative values, returns zero.SNote that this always calculates the canonical form of a Clif before projecting it.)%Filter blades (keys) by their length.*YGeneral product or contraction of Clifs using a given grade function. Given a function f :: O -> O -> OX and p, q-grade Clifs A and B, contractWith returns the f(p,q)-grade projection of the  A times B.+List of nonzero grades. bNote that this always calculates the canonical form of a Clif before recovering the filled grades.,List of nonzero gradesbNote that this always calculates the canonical form of a Clif before recovering the filled grades.-=Returns a list containing each non-zero grade component of a  and it's grade as an O.\Note that this always calculates the canonical form of a Clif before testing any operations.. True if the 7 contains no nonzero blades of grade greater than zero.bNote that this always calculates the canonical form of a Clif before testing whether it is scalar./True for a zero multivector.`Note that this always calculates the canonical form of a Clif before testing whether it is zero.0-The highest nonempty nonzero grade of a Clif.bNote that this always calculates the canonical form of a Clif before recovering the highest grade.1™Composition of unary and binary functions, highly useful since two-parameter constructors are ubiquitous here. Redefined here to skip extra dependencies.(f .: g) x y = f (g x y)2lInverse elements only exist for Clifs c for which c times c is scalar. For others, recip does not terminate.3hNote that abs and signum are only well-defined on the scalar component of each Clif, and zero otherwise.4WThe Eq instance calculates the canonical forms of the compared Clifs before comparison.5P$ instance just shows the underlying N for now !"#$%&'()*+,-./012345 !"#$%&'()*+,-./015432 !"#$%&'()*+,-./01 !"#$%&'()*+,-./0123459 18!(c) Matti A. Eskelinen, 2016-2017MITmatti.a.eskelinen@gmail.com experimentalPOSIXNone7QD with only unique elements. Useful for generating blades with e.g.  R 7 8s An ascending list split into two at a random point. Useful for generating a pair of blades without common vectors.9+Given k, returns a generator for k-blades (-s containing only a single blade of grade k).;Arbitrary Instance for <Arbitrary instance for 789:;<789789789:;<!(c) Matti A. Eskelinen, 2016-2017MITmatti.a.eskelinen@gmail.com experimentalPOSIXNone9;<= =Infix synonym for B>Infix synonym for C?Infix synonym for D@Infix synonym for EAInfix synonym for GBLeft contractionCRight contractionD9Scalar product (0-grade components of the blade products)E Dot productFHestenes dot productG Wedge productHHodge dual of a J in a Clifford algebra specified by a given pseudoscalar (volume element):=hodge (E <$> "abc") $ blade [E 'b'] 1 == blade (E <$> "ac") 1I;Projection of Clif x in the direction of Clif y, defined asproj x y == (x <\ recip y) <\ y =>?@ABCDEFGHI$(=>?@ABCDEFGHI($GA=>?@BCDEFHI =>?@ABCDEFGHI=8>8?8@8A8 (c) Matti A. Eskelinen 2016-2017MITmatti.a.eskelinen@gmail.com  experimentalPOSIXNone# $(=>?@ABCDEFGHI!(c) Matti A. Eskelinen, 2016-2017 OtherLicenseNoneS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZR[\]^_R`ab#clif-0.1.0.0-H0KqGNtDxY8DPUhAB26yxH Clif.Basis Clif.InternalClif.Arbitrary Clif.AlgebraClif Clif.Tutorial LorentzianTS EuclideanEgetEBasismetric canonicalbasisMulfreeMulorthoMul nonOrthoMulorderOrthoBasis orderBasis$fBasisLorentziana$fShowLorentzian$fBasisEuclideana$fShowEuclidean $fEqEuclidean$fOrdEuclidean$fGenericEuclidean$fEqLorentzian$fOrdLorentzian$fGenericLorentzianunCliffromListblade*:vecgMulgMul'gPlusgPlus'revrev'canoncanon'gradegrade' contractWith filledGrades filledGrades'gradesisScalarisZeromaxGrade.:$fFractionalClif $fNumClif$fEqClif $fShowClif $fFunctorClifascListascListskBlade$fArbitraryClif$fArbitraryLorentzian$fArbitraryEuclidean<\/>.|.<.>/\ lContract rContract scalarProddothesteneswedgehodgeprojbackOrderOrtho backOrder selectionsbaseGHC.Baseflipcontainers-0.5.7.1 Data.Map.BaseMapghc-prim GHC.TypesIntGHC.ShowShow'QuickCheck-2.8.2-FAg8rAKOyBEH07jaBqakkITest.QuickCheck.Arbitrary orderedList Data.Functor<$>