qKlK      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ!(c) Matti A. Eskelinen, 2016-2017MITmatti.a.eskelinen@gmail.com experimentalPOSIXSafe6;=>?) 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) .KCanonical (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)LCanonical (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)    (c) Matti A. Eskelinen, 2016MITmatti.a.eskelinen@gmail.com experimentalPOSIXSafe3W3UA 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. BReturn a list of the blades and coefficients of a Clif. Note that   is not an inverse of ; due to nonuniquess of zeros in the current implementation.!$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.0True for a zero multivector.`Note that this always calculates the canonical form of a Clif before testing whether it is zero.1-The highest nonempty nonzero grade of a Clif.bNote that this always calculates the canonical form of a Clif before recovering the highest grade.2Composition 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)3lInverse elements only exist for Clifs c for which c times c is scalar. For others, recip does not terminate.4hNote that abs and signum are only well-defined on the scalar component of each Clif, and zero otherwise.5WThe Eq instance calculates the canonical forms of the compared Clifs before comparison.6P$ instance just shows the underlying N for now !"#$%&'()*+,-./0126543 !"#$%&'()*+,-./0129 28!(c) Matti A. Eskelinen, 2016-2017MITmatti.a.eskelinen@gmail.com experimentalPOSIXSafe_#8QD with only unique elements. Useful for generating blades with e.g.  R 8 9sAn ascending list split into two at a random point. Useful for generating a pair of blades without common vectors.:+Given k, returns a generator for k-blades (-s containing only a single blade of grade k).<Arbitrary Instance for =Arbitrary instance for 89:89:!(c) Matti A. Eskelinen, 2016-2017MITmatti.a.eskelinen@gmail.com experimentalPOSIXSafe;=>?h >Infix synonym for C?Infix synonym for D@Infix synonym for EAInfix synonym for FBInfix synonym for HCLeft contractionDRight contractionE9Scalar product (0-grade components of the blade products)F Dot productGHestenes dot productH Wedge productIHodge 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") 1J;Projection of Clif x in the direction of Clif y, defined asproj x y == (x <\ recip y) <\ y %)>?@ABCDEFGHIJ )%HB>?@ACDEFGIJ>8?8@8A8B8 (c) Matti A. Eskelinen 2016-2017MITmatti.a.eskelinen@gmail.com  experimentalPOSIXSafek5$  %)>?@ABCDEFGHIJ!(c) Matti A. Eskelinen, 2016-2017 OtherLicenseSafelS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZR[\]^_R`ab#clif-0.1.1.0-J52Flxh9ZsUFmLCbVUwBKK Clif.Basis Clif.Algebra Clif.InternalClif.ArbitraryClif Clif.Tutorial LorentzianTS EuclideanEgetEBasismetric canonicalbasisMulfreeMulorthoMul nonOrthoMulorderOrthoBasis orderBasis$fBasisEuclideana$fShowEuclidean$fBasisLorentziana$fShowLorentzian $fEqEuclidean$fOrdEuclidean$fGenericEuclidean$fEqLorentzian$fOrdLorentzian$fGenericLorentzianunCliffromListblade*:vectoListgMulgMul'gPlusgPlus'revrev'canoncanon'gradegrade' contractWith filledGrades filledGrades'gradesisScalarisZeromaxGrade.:$fFractionalClif $fNumClif$fEqClif $fShowClif $fFunctorClifascListascListskBlade$fArbitraryClif$fArbitraryLorentzian$fArbitraryEuclidean<\/>.|.<.>/\ lContract rContract scalarProddothesteneswedgehodgeprojbackOrderOrtho backOrderbaseGHC.Baseflipcontainers-0.5.10.2Data.Map.InternalMapghc-prim GHC.TypesIntGHC.ShowShow(QuickCheck-2.10.1-BUFYQzp5Pjm7JbQeTzW89lTest.QuickCheck.Arbitrary orderedList Data.Functor<$>