!"a +      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                             ! " # $ % & ' ( ) * Safe,-478=>?@AHUVXk*ringsHyphenation operator.  177Safe,-478=>?@AHUVXk,^ringsA commutative + under .66 Safe =>?@AUVXk-JSafe,-478=>?@AHUVXk_ HringsRings.A ring R9 is a commutative group with a second monoidal operation  that distributes over .BThe basic properties of a ring follow immediately from the axioms:  r   ==  ==   r  ^   r == ^ rYFurthermore, the binomial formula holds for any commuting pair of elements (that is, any a and b such that  a * b = b * a).If  zero = one in a ring R, then R has only one element, and is called the zero ring. Otherwise the additive identity, the additive inverse of each element, and the multiplicative identity are unique.See  0https://en.wikipedia.org/wiki/Ring_(mathematics).If the ring is  *https://en.wikipedia.org/wiki/Ordered_ringordered (i.e. has an ,? instance), then the following additional properties must hold:  a - b ==> a  c - b  c   - a .  - b ==>  - a  bCSee the properties module for a detailed specification of the laws.JringsRight semirings.GA right semiring is a pre-semiring with two distinct neutral elements,  and  , such that  is right-neutral wrt addition, + is right-neutral wrt multiplication, and + is right-annihilative wrt multiplication.  Neutrality   r == r   r == r  Absorbtion   a ==  MringsARight pre-semirings. and (non-unital and unital) right semirings.HA right pre-semiring (sometimes referred to as a bisemigroup) is a type RD endowed with two associative binary (i.e. semigroup) operations:  and ?, along with a right-distributivity property connecting them:Distributivity (a  b)  c == (a  c)  (b  c) =Note that addition and multiplication needn't be commutative.CSee the properties module for a detailed specification of the laws.SringsWFold over a non-empty collection using the additive operation of an arbitrary semiring.<sumWith1 First $ (1 :| [2..5 :: Int]) * (1 :| [2..5 :: Int])First {getFirst = 1}?sumWith1 First $ Nothing :| [Just (5 :: Int), Just 6, Nothing]First {getFirst = Nothing}"sumWith1 Just $ 1 :| [2..5 :: Int]Just 15UringsFThe product of at a list of semiring elements (of length at least one)VringsSFold over a collection using the multiplicative operation of an arbitrary semiring. T f ==   ((*) . f)  productWith Just [1..5 :: Int]Just 120WringsRFold over a non-empty collection using the multiplicative operation of a semiring.TAs the collection is non-empty this does not require a distinct multiplicative unit:&productWith1 Just $ 1 :| [2..5 :: Int]Just 120)productWith1 First $ 1 :| [2..(5 :: Int)]First {getFirst = 15}CproductWith1 First $ Nothing :| [Just (5 :: Int), Just 6, Nothing]First {getFirst = Just 11}XringsCross-multiply two collections.cross (V3 1 2 3) (V3 1 2 3)14cross [1,2,3 :: Int] [1,2,3]36cross [1,2,3 :: Int] []0Yrings)Cross-multiply two non-empty collections.Mcross1 (Right 2 :| [Left "oops"]) (Right 2 :| [Right 3]) :: Either [Char] IntRight 4ZringsEvaluate a semiring expression. * (a11 * .. * a1m) + (a21 * .. * a2n) + ...-eval [[1, 2], [3, 4 :: Int]] -- 1 * 2 + 3 * 4148eval $ sequence [[1, 2], [3, 4 :: Int]] -- 1 + 2 * 3 + 421_ringsAbsolute value of an element.  _ r == mul r (` r) 4https://en.wikipedia.org/wiki/Linearly_ordered_group1  HIJKLMNOPQRSTUVWXYZ[\]^_`1NOPQRSTUVWXYZ[\]^_`MLKJIH  O8Safe,-478=>?@AHUVXklringsHA semifield, near-field, division ring, or associative division algebra.GInstances needn't have commutative multiplication or additive inverses.&See also the wikipedia definitions of  'https://en.wikipedia.org/wiki/Semifield semifield,  6https://en.wikipedia.org/wiki/Near-field_(mathematics) near-field,  +https://en.wikipedia.org/wiki/Division_ring division ring, and  .https://en.wikipedia.org/wiki/Division_algebradivision algebra.rings6Take the reciprocal of a multiplicative group element."recip (3 :+ 4) :: Complex Rational3 % 25 :+ (-4) % 25 recip (3 :+ 4) :: Complex Double0.12 :+ (-0.16)recip (3 :+ 4) :: Complex Pico!0.120000000000 :+ -0.160000000000  8Safe+,-478=>?@AHUVXk- rings (https://en.wikipedia.org/wiki/Semimodule Semimodule over a commutative semiring.4All instances must satisfy the following identities:  r  (x / y) 0 r  x / r  y  (r  s)  x 0 r  x / s  x  (r  s)  x 0 r  (s  x)When the ring of coefficients r% is unital we must additionally have:    x 0 xCSee the properties module for a detailed specification of the laws.ringsLeft-multiply by a scalar.ringsRight-multiply by a scalar.rings/Default definition of '(*.)' for a free module.rings/Default definition of '(.*)' for a free module.ringsDefault definition of   for a commutative group.rings)Linearly interpolate between two vectors.0u = V3 (1 :% 1) (2 :% 1) (3 :% 1) :: V3 Rational0v = V3 (2 :% 1) (4 :% 1) (6 :% 1) :: V3 Rationalr = 1 :% 2 :: Rational lerp r u vV3 (6 % 4) (12 % 4) (18 % 4)rings Dot product.V3 1 2 3 .*. V3 1 2 314ringsSquared l2 norm of a vector.ringsSquared l2, norm of the difference between two vectors.ringsDirac delta function.rings!Create a unit vector at an index.idx I21 :: V2 IntV2 1 0idx I42 :: V4 Int V4 0 1 0 0776Safe+,-478=>?@AHSUVXk rings'An endomorphism over a free semimodule.ringsLA general linear transformation between free semimodules indexed with bases b and c.rings,A binary relation between two basis indices.  b c d relations correspond to (compositions of) permutation, projection, and embedding transformations. See also  ,https://en.wikipedia.org/wiki/Logical_matrix.rings Tran a b c is an invariant functor on a. See also  .http://comonad.com/reader/2008/rotten-bananas/.rings!Obtain a matrix by stacking rows.rows (V2 1 2) :: M22 IntV2 (V2 1 2) (V2 1 2)rings$Obtain a matrix by stacking columns.cols (V2 1 2) :: M22 IntV2 (V2 1 1) (V2 2 2)rings5Left (post) composition with a linear transformation.rings5Right (pre) composition with a linear transformation.rings8Left and right composition with a linear transformation. % 'complr f g' = 'compl f' . 'compr g'When  f . g = id* this induces a similarity transformation:perm1 = arr (+ I32)perm2 = arr (+ I33)$m = m33 1 2 3 4 5 6 7 8 9 :: M33 Int"conjugate perm1 perm2 m :: M33 Int#V3 (V3 5 6 4) (V3 8 9 7) (V3 2 3 1) See also  /https://en.wikipedia.org/wiki/Matrix_similarity &  -https://en.wikipedia.org/wiki/Conjugacy_class.ringsTranspose a matrix.)transpose (V3 (V2 1 2) (V2 3 4) (V2 5 6))V2 (V3 1 3 5) (V3 2 4 6)&transpose $ m23 1 2 3 4 5 6 :: M32 IntV3 (V2 1 4) (V2 2 5) (V2 3 6)% !"#$%&'()*+,-./0123% !"#$%&'()*+,-./0123)3*2+3,2-0Safe+,-478=>?@AHUVXk 7rings A (not necessarily associative)  .https://en.wikipedia.org/wiki/Division_algebradivision algebra.;rings 1https://en.wikipedia.org/wiki/Composition_algebraComposition algebra over a free semimodule.>rings Vhttps://en.wikipedia.org/wiki/Algebra_over_a_field#Generalization:_algebra_over_a_ringAlgebra over a semiring.!Needn't be associative or unital.@rings*Multiplication operator on a free algebra.+In particular this is cross product on the I3 basis in R^3:*V3 1 0 0 >< V3 0 1 0 >< V3 0 1 0 :: V3 Int V3 (-1) 0 0,V3 1 0 0 >< (V3 0 1 0 >< V3 0 1 0) :: V3 IntV3 0 0 0Caution> in general (><) needn't be commutative, nor even associative.CThe cross product in particular satisfies the following properties: a @ a = 1 a @ b = ^ ( b @ a ) , a @ ( b <> c ) = ( a @ b ) <> ( a @ c ) , ( r a ) @ b = a @ ( r b ) = r ( a @ b ) . a @ ( b @ c ) <> b @ ( c @ a ) <> c @ ( a @ b ) = 1 . See  -https://en.wikipedia.org/wiki/Jacobi_identityJacobi identity.6For associative algebras, use (*) instead for clarity:#(1 :+ 2) >< (3 :+ 4) :: Complex Int (-5) :+ 10"(1 :+ 2) * (3 :+ 4) :: Complex Int (-5) :+ 10qi >< qj :: QuatM3Quaternion 0.000000 (V3 0.000000 0.000000 1.000000)qi * qj :: QuatM3Quaternion 0.000000 (V3 0.000000 0.000000 1.000000)AringsScalar triple product. A x y z = A z x y = A y z x A x y z = ^ 2 A x z y = ^ 2 A y x z A x x y = A x y y = A x y x =  (A x y z)  x = (x @ y) @ (x @ z) 1triple (V3 0 0 1) (V3 1 0 0) (V3 0 1 0) :: Double1.0CringsNorm of a composition algebra. C x  C y = C (x >< y) C . norm' $ x = C x  C x DringsUnit of a unital algebra.unit :: Complex Int1 :+ 0 unit :: QuatDQuaternion 1.0 (V3 0.0 0.0 0.0)Erings  E x = (/  x) 3 B xFrings-Division operator on a free division algebra.(1 :+ 0) // (0 :+ 1) 0.0 :+ (-1.0)Grings,Bilinear form on a free composition algebra.V2 1 2 .@. V2 1 25.0V2 1 2 .@. V2 2 (-1)0.0V3 1 1 1 .@. V3 1 1 (-2)0.0"(1 :+ 2) .@. (2 :+ (-1)) :: Double0.0qi .@. qj :: Double0.0qj .@. qk :: Double0.0qk .@. qi :: Double0.0qk .@. qk :: Double1.0HringsTensor algebramultiplyWith (<>) [1..3 :: Int][1,2,3,1,2,3,1,2,3,1,2,3]2multiplyWith (\f g -> fold (f ++ g)) [1..3] :: Int24789:;<=>?@ABCDEFG@FGDCBAE>?;<=9:78@7F7G6Safe+,-478=>?@AHSUVXk yringsMatrix subtraction.-m23 1 2 3 4 5 6 << m23 7 8 9 1 2 3 :: M23 Int!V2 (V3 (-6) (-6) (-6)) (V3 3 3 3)zringsVector subtraction.V2 1 2 << V2 3 4 V2 (-2) (-2)}ringsMatrix addition.-m23 1 2 3 4 5 6 <> m23 7 8 9 1 2 3 :: M23 IntV2 (V3 8 10 12) (V3 5 7 9)~ringsVector addition.V2 1 2 <> V2 3 4V2 4 6ringsMatrix subtraction.JV3 (V3 1 2 3) (V3 4 5 6) (V3 7 8 9) << V3 (V3 7 8 9) (V3 7 8 9) (V3 7 8 9)5V3 (V3 (-6) (-6) (-6)) (V3 (-3) (-3) (-3)) (V3 0 0 0)ringsVector subtraction.V3 1 2 3 << V3 4 5 6V3 (-3) (-3) (-3)ringsMatrix addition.4V2 (V3 1 2 3) (V3 4 5 6) <> V2 (V3 7 8 9) (V3 1 2 3)V2 (V3 8 10 12) (V3 5 7 9)ringsVector addition.V3 1 2 3 <> V3 4 5 6V3 5 7 9ringsMatrix subtraction.JV4 (V4 1 2 3) (V4 4 5 6) (V4 7 8 9) << V4 (V4 7 8 9) (V4 7 8 9) (V4 7 8 9)5V4 (V4 (-6) (-6) (-6)) (V4 (-3) (-3) (-3)) (V4 0 0 0)ringsVector subtraction.V4 1 2 3 << V4 4 5 6V4 (-3) (-3) (-3)ringsMatrix addition.5m24 1 2 3 4 5 6 7 8 <> m24 1 2 3 4 5 6 7 8 :: M24 Int V2 (V4 2 4 6 8) (V4 10 12 14 16)ringsVector addition.V4 1 2 3 4 <> V4 5 6 7 8 V4 6 8 10 12 #@ATUVWXYZ[\]^_`abcdefghijkl#@ATUVWXYZ[\]^_`abcdefghijkl Safe+,-478=>?@AHSUVXkB%rings A 4x4 matrix.rings A 4x3 matrix.rings A 4x2 matrix.rings A 3x4 matrix.rings A 3x3 matrix.rings A 3x2 matrix.rings A 2x4 matrix.rings A 2x3 matrix.rings A 2x2 matrix.rings@Retrieve a row of a row-major matrix or element of a row vector.row I21 (V2 1 2)1rings(Retrieve a column of a row-major matrix.,row I22 . col I31 $ V2 (V3 1 2 3) (V3 4 5 6)4ringsOuter product of two vectors.V2 1 1 `outer` V2 1 1V2 (V2 1 1) (V2 1 1)rings.Multiply a matrix on the left by a row vector.V2 1 2 #. m23 3 4 5 6 7 8 V3 15 18 21,V2 1 2 #. m23 3 4 5 6 7 8 #. m32 1 0 0 0 0 0V2 15 0rings2Multiply a matrix on the right by a column vector.  () =  .  fromMatrixm23 1 2 3 4 5 6 .# V3 7 8 9 V2 50 122*m22 1 0 0 0 .# m23 1 2 3 4 5 6 .# V3 7 8 9V2 50 0ringsMultiply two matrices.&m22 1 2 3 4 .#. m22 1 2 3 4 :: M22 IntV2 (V2 7 10) (V2 15 22).m23 1 2 3 4 5 6 .#. m32 1 2 3 4 4 5 :: M22 IntV2 (V2 19 25) (V2 43 58)rings'Obtain a diagonal matrix from a vector.scale (V2 2 3)V2 (V2 2 0) (V2 0 3)ringsIdentity matrix.identity :: M44 Int6V4 (V4 1 0 0 0) (V4 0 1 0 0) (V4 0 0 1 0) (V4 0 0 0 1)identity :: V3 (V3 Int)#V3 (V3 1 0 0) (V3 0 1 0) (V3 0 0 1)ringsCompute the trace of a matrix.trace (V2 (V2 a b) (V2 c d))a <> drings,Obtain the diagonal of a matrix as a vector.diagonal (V2 (V2 a b) (V2 c d))V2 a drings42x2 matrix bdeterminant over a commutative semiring.bdet2 $ m22 1 2 3 4(4,6)rings/2x2 matrix determinant over a commutative ring.  0 4 () .  det2 $ m22 1 2 3 4 :: Double-2.0rings 2x2 matrix inverse over a field. inv2 $ m22 1 2 3 4 :: M22 Double"V2 (V2 (-2.0) 1.0) (V2 1.5 (-0.5))rings43x3 matrix bdeterminant over a commutative semiring.+bdet3 (V3 (V3 1 2 3) (V3 4 5 6) (V3 7 8 9)) (225, 225)rings(3x3 double-precision matrix determinant.  0 4 () .  DImplementation uses a cofactor expansion to avoid loss of precision.*det3 (V3 (V3 1 2 3) (V3 4 5 6) (V3 7 8 9))0rings3x3 matrix inverse.*inv3 $ m33 1 2 4 4 2 2 1 1 1 :: M33 DoubleCV3 (V3 0.0 0.5 (-1.0)) (V3 (-0.5) (-0.75) 3.5) (V3 0.5 0.25 (-1.5))rings44x4 matrix bdeterminant over a commutative semiring.Ebdet4 (V4 (V4 1 2 3 4) (V4 5 6 7 8) (V4 9 10 11 12) (V4 13 14 15 16)) (27728,27728)rings/4x4 matrix determinant over a commutative ring.  0 4 () .  IThis implementation uses a cofactor expansion to avoid loss of precision.:det4 (m44 1 0 3 2 2 0 2 1 0 0 0 1 0 3 4 0 :: M44 Rational) (-12) % 1rings4x4 matrix inverse.Drow I41 $ inv4 (m44 1 0 3 2 2 0 2 1 0 0 0 1 0 3 4 0 :: M44 Rational)8V4 (6 % (-12)) ((-9) % (-12)) ((-3) % (-12)) (0 % (-12))ringsConstruct a 2x2 matrix.!Arguments are in row-major order.m22 1 2 3 4 :: M22 IntV2 (V2 1 2) (V2 3 4)   :: a -> a -> a -> a ->  aringsConstruct a 2x3 matrix.!Arguments are in row-major order.  " :: a -> a -> a -> a -> a -> a ->  aringsConstruct a 2x4 matrix.!Arguments are in row-major order.ringsConstruct a 3x2 matrix.!Arguments are in row-major order.ringsConstruct a 3x3 matrix.!Arguments are in row-major order.ringsConstruct a 3x4 matrix.!Arguments are in row-major order.ringsConstruct a 4x2 matrix.!Arguments are in row-major order.ringsConstruct a 4x3 matrix.!Arguments are in row-major order.ringsConstruct a 4x4 matrix.!Arguments are in row-major order.//777 Safe,-478=>?@AHUVXkrings Obtain a  from 4 base field elements.rings$Real or scalar part of a quaternion.rings$Use a quaternion to rotate a vector.*rotate qk . rotate qj $ V3 1 1 0 :: V3 Int V3 1 (-1) 0ringsScale a  to unit length.,normalize $ normalize $ quat 2.0 2.0 2.0 2.0Quaternion 0.5 (V3 0.5 0.5 0.5)ringsThe real quaternion.Represents no rotation. = DringsThe i quaternion. Represents a  \pi  radian rotation about the x axis.rotate (qi :: QuatM) $ V3 1 0 0V3 1.000000 0.000000 0.000000rotate (qi :: QuatM) $ V3 0 1 0V3 0.000000 -1.000000 0.000000rotate (qi :: QuatM) $ V3 0 0 1V3 0.000000 0.000000 -1.000000qi * qjQuaternion 0 (V3 0 0 1)ringsThe j quaternion. Represents a  \pi  radian rotation about the y axis.rotate (qj :: QuatM) $ V3 1 0 0V3 -1.000000 0.000000 0.000000rotate (qj :: QuatM) $ V3 0 1 0V3 0.000000 1.000000 0.000000rotate (qj :: QuatM) $ V3 0 0 1V3 0.000000 0.000000 -1.000000qj * qkQuaternion 0 (V3 1 0 0)ringsThe k quaternion. Represents a  \pi  radian rotation about the z axis.rotate (qk :: QuatM) $ V3 1 0 0V3 -1.000000 0.000000 0.000000rotate (qk :: QuatM) $ V3 0 1 0V3 0.000000 -1.000000 0.000000rotate (qk :: QuatM) $ V3 0 0 1V3 0.000000 0.000000 1.000000qk * qiQuaternion 0 (V3 0 1 0) qi * qj * qkQuaternion (-1) (V3 0 0 0) Safe =>?@AUVXk`vrings* \forall a, b \in R: a * b \sim a * b + b If R is non-unital (i.e. one is not distinct from zero>) then it will instead satisfy a right-absorbtion property. <This follows from right-neutrality and right-distributivity.Compare codistributive and  closed_stable.When R# is also left-distributive we get: + \forall a, b \in R: a * b = a + a * b + b  See also   and  ;https://blogs.ncl.ac.uk/andreymokhov/united-monoids/#whatif.rings;Presemiring morphisms are distributive semigroup morphisms.6This is a required property for presemiring morphisms.rings5 \forall a, b, c \in R: (a + b) + c \sim a + (b + c) -All semigroups must right-associate addition.This is a required property.rings5 \forall a, b, c \in R: (a * b) * c \sim a * (b * c) 3All semigroups must right-associate multiplication.This is a required property.rings& \forall a, b \in R: a + b \sim b + a  This is a an optional property for semigroups, and a required property for semirings.rings; \forall a, b, c \in R: (a + b) * c \sim (a * c) + (b * c) R& must right-distribute multiplication.When R9 is a functor and the semiring structure is derived from  Alternative, this translates to:  (a <|> b) 5 c = (a 5 c) <|> (b 5 c) See  ?https://en.wikibooks.org/wiki/Haskell/Alternative_and_MonadPlus.This is a required property.rings\ \forall M \geq 1; a_1 \dots a_M, b \in R: (\sum_{i=1}^M a_i) * b \sim \sum_{i=1}^M a_i * b RC must right-distribute multiplication over finite (non-empty) sums.2For types with exact arithmetic this follows from  distributive and the universality of fold1. ringsC \forall a, b, c \in R: f ((a + b) * c) \sim f (a * c) + f (b * c) APresemiring morphisms must be compatible with right-distribution.!rings6Semiring morphisms are monoidal presemiring morphisms.3This is a required property for semiring morphisms."rings! \forall a \in R: (z + a) \sim a @A semigroup with a right-neutral additive identity must satisfy: neutral_addition  ~~ const True Or, equivalently:   r ~~ r 1This is a required property for additive monoids.#rings! \forall a \in R: (o * a) \sim a FA semigroup with a right-neutral multiplicative identity must satisfy: neutral_multiplication  ~~ const True Or, equivalently:   r ~~ r 6This is a required propert for multiplicative monoids.$rings! \forall a \in R: (z * a) \sim u A RF is semiring then its addititive one must be right-annihilative, i.e.:   a ~~  For  Alternative' instances this property translates to: empty 5 a ~~ empty fAll right semirings must have a right-absorbative addititive one, however note that depending on the PrdF instance this does not preclude IEEE754-mandated behavior such as:    NaN ~~ NaN This is a required property.%rings\ \forall M \geq 0; a_1 \dots a_M, b \in R: (\sum_{i=1}^M a_i) * b \sim \sum_{i=1}^M a_i * b R: must right-distribute multiplication between finite sums.2For types with exact arithmetic this follows from  distributive & neutral_multiplication.&rings \forall M,N \geq 0; a_1 \dots a_M, b_1 \dots b_N \in R: (\sum_{i=1}^M a_i) * (\sum_{j=1}^N b_j) \sim \sum_{i=1 j=1}^{i=M j=N} a_i * b_j If RA is also left-distributive then it supports cross-multiplication.'rings \forall M,N \geq 1; a_1 \dots a_M, b_1 \dots b_N \in R: (\sum_{i=1}^M a_i) * (\sum_{j=1}^N b_j) = \sum_{i=1 j=1}^{i=M j=N} a_i * b_j If RM is also left-distributive then it supports (non-empty) cross-multiplication.(rings& \forall a, b \in R: a * b \sim b * a  This is a an optional property for semigroups, and a optional" property for semirings. It is a required property for rings.)rings; \forall a, b, c \in R: b + a \sim c + a \Rightarrow b = c If R1 is right-cancellative wrt addition then for all a the section (a +) is injective.See 3https://en.wikipedia.org/wiki/Cancellation_property*rings; \forall a, b, c \in R: b * a \sim c * a \Rightarrow b = c If R7 is right-cancellative wrt multiplication then for all a the section (a *) is injective.6rings-Idempotency property for additive semigroups.  idempotent_addition = absorbative_addition See  0https://en.wikipedia.org/wiki/Band_(mathematics).)This is a required property for lattices.7rings$Idempotency property for semigroups.  idempotent_multiplication = absorbative_multiplication See  0https://en.wikipedia.org/wiki/Band_(mathematics). This is a an optional property for semigroups, and a optional property for semirings. This is a required property for lattices. !"#$%&'()* !"#$%&'()*8 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~!&()'*:;<=-+      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abbcdeffghijklmnopqrstuvwxyz{|}~                                                                  & (                                             "rings-0.0.3-21Z3wlGnIMkBc1cJ09ZojY Data.SemiringData.Semigroup.MultiplicativeData.Semigroup.AdditiveData.SemifieldData.SemimoduleData.Semimodule.Transform Data.AlgebraData.Semimodule.VectorData.Semimodule.MatrixData.Algebra.QuaternionData.Semiring.PropertyData.Semigroup.PropertyDatafoldr'Warning#magmas-0.0.1-FzolCgkBAHFLOlVBR8HROg Data.Group mreplicate greplicateinvGroup lreplicatelemptyLoop\\// Quasigroup Data.Magma<<MagmaMultiplicativeunMultiplicative-*/onediv$fMonoidMultiplicative$fMonoidMultiplicative0$fSemigroupMultiplicative$fSemigroupMultiplicative0$fSemigroupMultiplicative1$fSemigroupMultiplicative2$fSemigroupMultiplicative3$fMonoidMultiplicative1$fSemigroupMultiplicative4$fMonoidMultiplicative2$fSemigroupMultiplicative5$fSemigroupMultiplicative6$fMonoidMultiplicative3$fSemigroupMultiplicative7$fMonoidMultiplicative4$fSemigroupMultiplicative8$fMonoidMultiplicative5$fSemigroupMultiplicative9$fMonoidMultiplicative6$fSemigroupMultiplicative10$fGroupMultiplicative$fLoopMultiplicative$fQuasigroupMultiplicative$fMagmaMultiplicative$fMonoidMultiplicative7$fSemigroupMultiplicative11$fGroupMultiplicative0$fLoopMultiplicative0$fQuasigroupMultiplicative0$fMagmaMultiplicative0$fMonoidMultiplicative8$fSemigroupMultiplicative12$fGroupMultiplicative1$fGroupMultiplicative2$fGroupMultiplicative3$fGroupMultiplicative4$fGroupMultiplicative5$fGroupMultiplicative6$fGroupMultiplicative7$fGroupMultiplicative8$fGroupMultiplicative9$fGroupMultiplicative10$fGroupMultiplicative11$fLoopMultiplicative1$fLoopMultiplicative2$fLoopMultiplicative3$fLoopMultiplicative4$fLoopMultiplicative5$fLoopMultiplicative6$fLoopMultiplicative7$fLoopMultiplicative8$fLoopMultiplicative9$fLoopMultiplicative10$fLoopMultiplicative11$fQuasigroupMultiplicative1$fQuasigroupMultiplicative2$fQuasigroupMultiplicative3$fQuasigroupMultiplicative4$fQuasigroupMultiplicative5$fQuasigroupMultiplicative6$fQuasigroupMultiplicative7$fQuasigroupMultiplicative8$fQuasigroupMultiplicative9$fQuasigroupMultiplicative10$fQuasigroupMultiplicative11$fMagmaMultiplicative1$fMagmaMultiplicative2$fMagmaMultiplicative3$fMagmaMultiplicative4$fMagmaMultiplicative5$fMagmaMultiplicative6$fMagmaMultiplicative7$fMagmaMultiplicative8$fMagmaMultiplicative9$fMagmaMultiplicative10$fMagmaMultiplicative11$fMonoidMultiplicative9$fMonoidMultiplicative10$fMonoidMultiplicative11$fMonoidMultiplicative12$fMonoidMultiplicative13$fMonoidMultiplicative14$fMonoidMultiplicative15$fMonoidMultiplicative16$fMonoidMultiplicative17$fMonoidMultiplicative18$fMonoidMultiplicative19$fMonoidMultiplicative20$fMonoidMultiplicative21$fMonoidMultiplicative22$fMonoidMultiplicative23$fMonoidMultiplicative24$fMonoidMultiplicative25$fMonoidMultiplicative26$fMonoidMultiplicative27$fMonoidMultiplicative28$fMonoidMultiplicative29$fMonoidMultiplicative30$fMonoidMultiplicative31$fSemigroupMultiplicative13$fSemigroupMultiplicative14$fSemigroupMultiplicative15$fSemigroupMultiplicative16$fSemigroupMultiplicative17$fSemigroupMultiplicative18$fSemigroupMultiplicative19$fSemigroupMultiplicative20$fSemigroupMultiplicative21$fSemigroupMultiplicative22$fSemigroupMultiplicative23$fSemigroupMultiplicative24$fSemigroupMultiplicative25$fSemigroupMultiplicative26$fSemigroupMultiplicative27$fSemigroupMultiplicative28$fSemigroupMultiplicative29$fSemigroupMultiplicative30$fSemigroupMultiplicative31$fSemigroupMultiplicative32$fSemigroupMultiplicative33$fSemigroupMultiplicative34$fSemigroupMultiplicative35$fRepresentableMultiplicative$fDistributiveMultiplicative$fApplicativeMultiplicative$fEqMultiplicative$fGenericMultiplicative$fOrdMultiplicative$fShowMultiplicative$fFunctorMultiplicativeAdditive unAdditive+zero$fMonoidAdditive$fMonoidAdditive0$fMonoidAdditive1$fMonoidAdditive2$fSemigroupAdditive$fSemigroupAdditive0$fSemigroupAdditive1$fSemigroupAdditive2$fMonoidAdditive3$fSemigroupAdditive3$fSemigroupAdditive4$fSemigroupAdditive5$fMonoidAdditive4$fSemigroupAdditive6$fGroupAdditive$fLoopAdditive$fQuasigroupAdditive$fMagmaAdditive$fMonoidAdditive5$fSemigroupAdditive7$fMonoidAdditive6$fSemigroupAdditive8$fSemigroupAdditive9$fMonoidAdditive7$fSemigroupAdditive10$fMonoidAdditive8$fSemigroupAdditive11$fGroupAdditive0$fLoopAdditive0$fQuasigroupAdditive0$fMagmaAdditive0$fMonoidAdditive9$fSemigroupAdditive12$fGroupAdditive1$fLoopAdditive1$fQuasigroupAdditive1$fMagmaAdditive1$fMonoidAdditive10$fSemigroupAdditive13$fGroupAdditive2$fGroupAdditive3$fGroupAdditive4$fGroupAdditive5$fGroupAdditive6$fGroupAdditive7$fGroupAdditive8$fGroupAdditive9$fGroupAdditive10$fGroupAdditive11$fGroupAdditive12$fGroupAdditive13$fGroupAdditive14$fGroupAdditive15$fGroupAdditive16$fGroupAdditive17$fGroupAdditive18$fLoopAdditive2$fLoopAdditive3$fLoopAdditive4$fLoopAdditive5$fLoopAdditive6$fLoopAdditive7$fLoopAdditive8$fLoopAdditive9$fLoopAdditive10$fLoopAdditive11$fLoopAdditive12$fLoopAdditive13$fLoopAdditive14$fLoopAdditive15$fLoopAdditive16$fLoopAdditive17$fLoopAdditive18$fQuasigroupAdditive2$fQuasigroupAdditive3$fQuasigroupAdditive4$fQuasigroupAdditive5$fQuasigroupAdditive6$fQuasigroupAdditive7$fQuasigroupAdditive8$fQuasigroupAdditive9$fQuasigroupAdditive10$fQuasigroupAdditive11$fQuasigroupAdditive12$fQuasigroupAdditive13$fQuasigroupAdditive14$fQuasigroupAdditive15$fQuasigroupAdditive16$fQuasigroupAdditive17$fQuasigroupAdditive18$fMagmaAdditive2$fMagmaAdditive3$fMagmaAdditive4$fMagmaAdditive5$fMagmaAdditive6$fMagmaAdditive7$fMagmaAdditive8$fMagmaAdditive9$fMagmaAdditive10$fMagmaAdditive11$fMagmaAdditive12$fMagmaAdditive13$fMagmaAdditive14$fMagmaAdditive15$fMagmaAdditive16$fMagmaAdditive17$fMagmaAdditive18$fMonoidAdditive11$fMonoidAdditive12$fMonoidAdditive13$fMonoidAdditive14$fMonoidAdditive15$fMonoidAdditive16$fMonoidAdditive17$fMonoidAdditive18$fMonoidAdditive19$fMonoidAdditive20$fMonoidAdditive21$fMonoidAdditive22$fMonoidAdditive23$fMonoidAdditive24$fMonoidAdditive25$fMonoidAdditive26$fMonoidAdditive27$fMonoidAdditive28$fMonoidAdditive29$fMonoidAdditive30$fMonoidAdditive31$fMonoidAdditive32$fMonoidAdditive33$fSemigroupAdditive14$fSemigroupAdditive15$fSemigroupAdditive16$fSemigroupAdditive17$fSemigroupAdditive18$fSemigroupAdditive19$fSemigroupAdditive20$fSemigroupAdditive21$fSemigroupAdditive22$fSemigroupAdditive23$fSemigroupAdditive24$fSemigroupAdditive25$fSemigroupAdditive26$fSemigroupAdditive27$fSemigroupAdditive28$fSemigroupAdditive29$fSemigroupAdditive30$fSemigroupAdditive31$fSemigroupAdditive32$fSemigroupAdditive33$fSemigroupAdditive34$fSemigroupAdditive35$fSemigroupAdditive36$fRepresentableAdditive$fDistributiveAdditive$fApplicativeAdditive $fEqAdditive$fGenericAdditive $fOrdAdditive$fShowAdditive$fFunctorAdditiveRingRingLawSemiring SemiringLaw PresemiringPresemiringLawtwo^sumsum1sumWithsumWith1productproduct1 productWith productWith1crosscross1evalevalWitheval1 evalWith1negateabssignum$fPresemiringMap$fPresemiringIntMap$fPresemiringSet$fPresemiringIntSet$fPresemiringNonEmpty$fPresemiring[]$fPresemiringMaybe$fPresemiringEither$fPresemiring->$fPresemiringCDouble$fPresemiringCFloat$fPresemiringDouble$fPresemiringFloat$fPresemiringFixed$fPresemiringFixed0$fPresemiringFixed1$fPresemiringFixed2$fPresemiringFixed3$fPresemiringFixed4$fPresemiringFixed5$fPresemiringRatio$fPresemiringInteger$fPresemiringInt64$fPresemiringInt32$fPresemiringInt16$fPresemiringInt8$fPresemiringInt$fPresemiringRatio0$fPresemiringNatural$fPresemiringWord64$fPresemiringWord32$fPresemiringWord16$fPresemiringWord8$fPresemiringWord$fPresemiringBool$fPresemiring() $fSemiringMap$fSemiringIntMap $fSemiring[]$fSemiringMaybe $fSemiring->$fSemiringCDouble$fSemiringCFloat$fSemiringDouble$fSemiringFloat$fSemiringFixed$fSemiringFixed0$fSemiringFixed1$fSemiringFixed2$fSemiringFixed3$fSemiringFixed4$fSemiringFixed5$fSemiringRatio$fSemiringInteger$fSemiringInt64$fSemiringInt32$fSemiringInt16$fSemiringInt8 $fSemiringInt$fSemiringRatio0$fSemiringNatural$fSemiringWord64$fSemiringWord32$fSemiringWord16$fSemiringWord8$fSemiringWord$fSemiringBool $fSemiring() $fRingComplex $fRingCDouble $fRingCFloat $fRingDouble $fRingFloat $fRingFixed $fRingFixed0 $fRingFixed1 $fRingFixed2 $fRingFixed3 $fRingFixed4 $fRingFixed5 $fRingRatio $fRingInteger $fRingInt64 $fRingInt32 $fRingInt16 $fRingInt8 $fRingInt$fRing()$fSemiringComplex$fPresemiringComplexFieldFieldLaw Semifield SemifieldLaw^^recipananpinfninf$fSemifieldCDouble$fSemifieldCFloat$fSemifieldDouble$fSemifieldFloat$fSemifieldFixed$fSemifieldFixed0$fSemifieldFixed1$fSemifieldFixed2$fSemifieldFixed3$fSemifieldFixed4$fSemifieldFixed5$fSemifieldRatio$fSemifieldRatio0 $fSemifield()$fFieldComplex$fFieldCDouble $fFieldCFloat $fFieldDouble $fFieldFloat $fFieldFixed $fFieldFixed0 $fFieldFixed1 $fFieldFixed2 $fFieldFixed3 $fFieldFixed4 $fFieldFixed5 $fFieldRatio $fField()$fSemifieldComplex Semimodule*..*ModuleBasisFreemultlmultr negateDeflerp.*. quadranceqddiracidx$fSemimoduleCDoubleAdditive$fSemimoduleCFloatAdditive$fSemimoduleDoubleAdditive$fSemimoduleFloatAdditive$fSemimoduleFixedAdditive$fSemimoduleFixedAdditive0$fSemimoduleFixedAdditive1$fSemimoduleFixedAdditive2$fSemimoduleFixedAdditive3$fSemimoduleFixedAdditive4$fSemimoduleFixedAdditive5$fSemimoduleWord64Additive$fSemimoduleWord32Additive$fSemimoduleWord16Additive$fSemimoduleWord8Additive$fSemimoduleWordAdditive$fSemimoduleInt64Additive$fSemimoduleInt32Additive$fSemimoduleInt16Additive$fSemimoduleInt8Additive$fSemimoduleIntAdditive$fSemimoduleBoolAdditive$fSemimodulerAdditive$fSemimodulerAdditive0$fSemimoduler(,,)$fSemimoduler(,)$fSemimoduler->$fSemimoduleIntegera$fSemimoduleNaturala$fSemimodule()a$fSemimoduler()EndoTranrunTranIndexappinvmaprowscolsprojlprojrcomplcomprcomplr transposearrin1in2exlexrbraidebraidfirstsecondleftright***+++&&&|||$$$adivideadivide'adividedaselectaselect' aselected$fProfunctorTran$fCategoryTYPETran $fFunctorTranDivisionreciprocalWithUnitalunitWith Composition conjugateWithnormWithAlgebra multiplyWith><tripleconjnormunit reciprocal.@. $fAlgebrar[]$fAlgebrar(,,) $fAlgebrar(,) $fAlgebrar() $fUnitalr[] $fUnitalr(,,) $fUnitalr(,) $fUnitalr()$fDivisionrBool $fUnitalrBool$fCompositionrBool$fAlgebrarBoolI4I41I42I43I44V4QuaternionBasisI3I31I32I33V3I2I21I22V2i2fillI2i3fillI3i4fillI4$fDistributiveV2 $fFoldable1V2 $fFoldableV2$fApplicativeV2 $fFunctorV2$fSemimoduleaV2 $fGroupV2$fLoopV2$fQuasigroupV2 $fMagmaV2 $fMonoidV2 $fSemigroupV2$fCompositionrI2 $fAlgebrarI2$fRepresentableV2$fDistributiveV3 $fFoldable1V3 $fFoldableV3$fApplicativeV3 $fFunctorV3$fSemimoduleaV3 $fGroupV3$fLoopV3$fQuasigroupV3 $fMagmaV3 $fMonoidV3 $fSemigroupV3$fCompositionrI3 $fAlgebrarI3$fRepresentableV3$fDivisionrMaybe$fCompositionrMaybe$fUnitalrMaybe$fAlgebrarMaybe$fDistributiveV4 $fFoldable1V4 $fFoldableV4$fApplicativeV4 $fFunctorV4$fSemimoduleaV4 $fGroupV4$fLoopV4$fQuasigroupV4 $fMagmaV4 $fMonoidV4 $fSemigroupV4$fRepresentableV4$fEqV2$fOrdV2$fShowV2$fEqI2$fOrdI2$fShowI2$fEqV3$fOrdV3$fShowV3$fEqI3$fOrdI3$fShowI3$fEqV4$fOrdV4$fShowV4$fEqI4$fOrdI4$fShowI4M44M43M42M34M33M32M24M23M22lensRepgrateReptranrowcolouter#..#.#.scaleidentitytracediagonalbdet2det2inv2bdet3det3inv3bdet4det4inv4m22m23m24m32m33m34m42m43m44 QuaternionQuatPQuatNQuatMQuatRQuatDQuatFquatscalvectrotate normalizeqeqiqjqk$fRepresentableQuaternion$fDistributiveQuaternion$fFoldable1Quaternion$fFoldableQuaternion$fFunctorQuaternion$fRingQuaternion$fSemiringQuaternion$fPresemiringQuaternion$fSemimoduleaQuaternion$fGroupQuaternion$fLoopQuaternion$fQuasigroupQuaternion$fMagmaQuaternion$fMonoidQuaternion$fSemigroupQuaternion$fEqQuaternion$fOrdQuaternion$fShowQuaternion$fGenericQuaternion$fGeneric1Quaternion nonunital_onmorphism_presemiringassociative_addition_onassociative_multiplication_oncommutative_addition_ondistributive_ondistributive_finite1_onmorphism_distribitive_onmorphism_semiringneutral_addition_onneutral_multiplication_onannihilative_multiplication_ondistributive_finite_ondistributive_cross_ondistributive_cross1_oncommutative_multiplication_oncancellative_addition_oncancellative_multiplication_onbaseGHC.Base Semigroupghc-prim GHC.ClassesOrd<=&&<>==mempty$ Data.Functor<$> Data.Tupleuncurry*>idempotent_addition_onidempotent_multiplication_on