fY      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,(c) Conal Elliott and Justus Sagemller 2017BSD3,conal@conal.net, (@) jsagemue $ uni-koeln.de experimentalSafe &(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalSafe 7;<=STV 1Monoid under group addition. Alternative to the Sum in  Data.Monoid , which uses  instead of .Additive group v.&The zero element: identity for '(^+^)' Add vectorsAdditive inverseGroup subtractionSum over several vectors &Application a unary function inside a  'Application a binary function inside a    66&(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalSafe7;<=>?FSTV -Adds inner (dot) products..Inner/dot product/ Vector space v.1Scale a vector2Vector divided by scalar3Vector multiplied by scalar4Linear interpolation between a (when t==0) and b (when t==1).5Linear combination of vectors6NSquare of the length of a vector. Sometimes useful for efficiency. See also 7.7Length of a vector. See also 6.8iVector in same direction as given one but with length of one. If given the zero vector, then return it.9 project u v computes the projection of v onto u. -./0123456789/01123-..456789-../011.7172737(c) Conal Elliott 2008BSD3conal@conal.net experimentalSafe7;<=>?FSTV%Gh*Representation of the canonical basis for viInterpret basis rep as a vectorjExtract coordinateskeExperimental version. More elegant definitions, and friendly to infinite-dimensional vector spaces.5ghijkl ghiijjkk5lghiijjkk&(c) Conal Elliott and Andy J Gill 2008BSD3 conal@conal.net, andygill@ku.edu experimentalSafe67;<=>?FSTV3xAssociated vector spaceySubtract pointszPoint plus vector{Point minus vector|XSquare of the distance between two points. Sometimes useful for efficiency. See also }.}'Distance between two points. See also |.~*Affine linear interpolation. Varies from p to p' as s varies from 0 to 1. See also 4 (on vector spaces).Compute an affine combination (weighted average) of points. The first element is used as origin and is weighted such that all coefficients sum to 1. For example,  affineCombo a [(0.3,b), (0.2,c)] is equal to -a .+^ (0.3 *^ (b .-. a) ^+^ 0.2 *^ (c .-. a))and if a, b, and c. were in a vector space would also be equal to "0.5 *^ a ^+^ 0.3 *^ b ^+^ 0.2 *^ c See also 5 (on vector spaces). wxzy{|}~ wxyyzz{|}~wxyyzzy6z6{6(c) Conal Elliott 2008-2016BSD3conal@conal.net experimentalNone 0<FKNST? NLinear map, represented as an optional memo-trie from basis to values, where & means the zero map (an optimization).An optional additive value(Function (assumed linear) as linear map.Apply a linear map to a vector.)Evaluate a linear map on a basis element. Handy for  and '(*.*)'.Identity linear mapCompose linear maps:Apply a linear function to each element of a linear map. liftL f l == linear f *.* l, but works more efficiently.nApply a linear binary function (not to be confused with a bilinear function) to each element of a linear map.pApply a linear ternary function (not to be confused with a trilinear function) to each element of a linear map.19 (c) Conal Elliott 2008BSD3conal@conal.net experimentalNone;<=>?FSTVQ#Infinitely differentiable functionsTower of derivatives.Constant derivative tower.Map a linear" function over a derivative tower.Map a linear" function over a derivative tower.Apply a linear( binary function over derivative towers.Apply a linear) ternary function over derivative towers.zDifferentiable identity function. Sometimes called "the derivation variable" or similar, but it's not really a variable.`Every linear function has a constant derivative equal to the function itself (as a linear map).Differentiable version of Differentiable version of Derivative tower for applying a binary function that distributes over addition, such as multiplication. A bit weaker assumption than bilinearity. Is bilinearity necessary for correctness here?(Specialized chain rule. See also '(@.)'vSample the derivative at a basis element. Optimized for partial application to save work for non-scalar derivatives.9 40 (c) Conal Elliott 2008BSD3conal@conal.net experimentalNoneS(c) Conal Elliott 2008BSD3conal@conal.net experimentalNone;<=FSTX,Cross product of various forms of 3D vectors,Cross product of various forms of 2D vectorsHomogeneous tripleHomogeneous pair Singleton8Thing with a normal vector (not necessarily normalized).$Normalized normal vector. See also cross.       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(vector-space-0.13-D85Kc1BOImmI9EVDFHlbgZData.AdditiveGroupData.VectorSpace Data.BasisData.AffineSpaceData.LinearMapData.Maclaurin Data.CrossData.VectorSpace.GenericData.DerivativeSumgetSum AdditiveGroupzeroV^+^negateV^-^sumVinSuminSum2$fAdditiveGroup:*:$fAdditiveGroupM1$fAdditiveGroupK1$fAdditiveGroup:->:$fAdditiveGroupMaybe$fAdditiveGroup(->)$fAdditiveGroup(,,,)$fAdditiveGroup(,,)$fAdditiveGroup(,)$fAdditiveGroupComplex$fAdditiveGroupRatio$fAdditiveGroupCDouble$fAdditiveGroupCFloat$fAdditiveGroupCIntMax$fAdditiveGroupCLLong$fAdditiveGroupCLong$fAdditiveGroupCShort$fAdditiveGroupCInt$fAdditiveGroupCSChar$fAdditiveGroupDouble$fAdditiveGroupFloat$fAdditiveGroupInteger$fAdditiveGroupInt$fAdditiveGroup()$fAdditiveGroupSum $fMonoidSum$fSemigroupSum$fApplicativeSum $fFunctorSum$fEqSum$fOrdSum $fReadSum $fShowSum $fBoundedSum InnerSpace<.> VectorSpaceScalar*^^/^*lerp linearCombo magnitudeSq magnitude normalizedproject$fVectorSpace:*:$fVectorSpaceM1$fVectorSpaceK1$fVectorSpace:->:$fVectorSpace(->)$fVectorSpaceMaybe$fVectorSpace(,,,)$fVectorSpace(,,)$fVectorSpace(,)$fVectorSpaceComplex$fVectorSpaceRatio$fVectorSpaceCFloat$fVectorSpaceCDouble$fVectorSpaceCIntMax$fVectorSpaceCLLong$fVectorSpaceCLong$fVectorSpaceCShort$fVectorSpaceCInt$fVectorSpaceCSChar$fVectorSpaceFloat$fVectorSpaceDouble$fVectorSpaceInteger$fVectorSpaceInt$fInnerSpace:*:$fInnerSpaceM1$fInnerSpaceK1$fInnerSpaceMaybe$fInnerSpace(->)$fInnerSpace(,,,)$fInnerSpace(,,)$fInnerSpace(,)$fInnerSpaceComplex$fInnerSpaceRatio$fInnerSpaceCFloat$fInnerSpaceCDouble$fInnerSpaceCIntMax$fInnerSpaceCLLong$fInnerSpaceCLong$fInnerSpaceCShort$fInnerSpaceCInt$fInnerSpaceCSChar$fInnerSpaceFloat$fInnerSpaceDouble$fInnerSpaceInteger$fInnerSpaceIntHasBasisBasis basisValue decompose decompose' recompose $fHasBasis:*: $fHasBasisM1 $fHasBasisK1$fHasBasis(,,) $fHasBasis(,)$fHasBasisRatio$fHasBasisCDouble$fHasBasisDouble$fHasBasisCFloat$fHasBasisFloat AffineSpaceDiff.-..+^.-^ distanceSqdistancealerp affineCombo$fAffineSpaceM1$fAffineSpaceK1$fHasBasisGenericDiff$fInnerSpaceGenericDiff$fVectorSpaceGenericDiff$fAdditiveGroupGenericDiff$fAffineSpace(->)$fAffineSpace(,,)$fAffineSpace(,)$fAffineSpaceRatio$fAffineSpaceCFloat$fAffineSpaceCDouble$fAffineSpaceCIntMax$fAffineSpaceCLLong$fAffineSpaceCLong$fAffineSpaceCShort$fAffineSpaceCInt$fAffineSpaceCSChar$fAffineSpaceFloat$fAffineSpaceDouble$fAffineSpaceInteger$fAffineSpaceInt$fAffineSpace:*: $fHasBasisAffineDiffProductSpace#$fAffineSpaceAffineDiffProductSpace"$fInnerSpaceAffineDiffProductSpace#$fVectorSpaceAffineDiffProductSpace%$fAdditiveGroupAffineDiffProductSpace$fGenericGenericDiff$fGenericAffineDiffProductSpace:-*exlLexrLforkLfirstLsecondLinlLinrLjoinLlinearinLMapinLMap2inLMap3lapplyatBasisidL*.*liftMSliftMS2liftMS3liftLliftL2liftL3$fVectorSpace:-*$fAdditiveGroup:-*:~>:>DpowVal derivativepureDfmapD<$>>liftD2liftD3idDlinearDfstDsndDdistrib>-< derivAtBasispairDunpairDtripleD untripleD $fFloating:>$fFractional:>$fNum:>$fInnerSpace:>$fVectorSpace:>$fAdditiveGroup:>$fOrd:>$fOrdB:>$fIfB:>$fEq:>$fShow:> HasCross3cross3 HasCross2cross2ThreeTwoOne HasNormal normalVecnormal$fHasNormal(,)$fHasNormal(,,) $fHasNormal:> $fHasCross2:>$fHasCross2(,)$fHasNormal:>0 $fHasCross3:>$fHasCross3(,,)VRepbaseGHC.NumNumAffineDiffProductSpace GenericDiffGHC.BaseNothingMSumlapply'LMapunLMap Data.Tuplefstsnd