h]{      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz  Safe-Infered{=Transform the position indicated by an index array inside an D array of given dimensions into the position inside a linear array, B starting at 0. For example, in an array of 3 rows and 4 columns,  the position [2,2]/ becomes 5. The indices in the dimension array > must be >= 1, the index array must have the same size of the E dimension array, and each index in the index array must be >= 1 and  <7= then the corresponding index in the dimension array. | Inverse of {: ({ ds) . (| ds)  == }, (| ds) . ({ ds) == }. {Dimension array  Index array |Dimension array &Linearized position (starting from 0) {|{|  Safe-Infered Safe-Infered A   is a map from an   type (which should be a   MultiIndex) to an   ent type.   returns the dimensions of the   . In any  instance of     should be independent of its  argument and work on ~.  Returns the  ent of t corresponding to   t.  Generates a  " according to the given function.  Generates a   consisting of the same  ent  repeated.        Safe-InferedProduct of types. The product of an element of a and an element of b is an  element in the type a  b. Sum of types. The sum of an element of a and an element of b is an  element in the type a  b.  Safe-Infered,The cardinality of a type is defined by its  type   a. 4Cardinal number as a type. The associated data type  a - provides the next cardinal type. The method  E provides a numeric representation of the cardinal number; it should , be independent on the argument and work on ~. "#The numeric cardinality of a type. " is independent on its  argument.  !" !" ! " !" Safe-Infered#AClass of ordered sets with n elements. The methods in this class A provide a convenient way to convert to and from a numeric type. *If n is a set with n elements, * n is a set with n+1 elements. + The last n elements. ,The first element of the type. -A set with one element. #$%&'()*+,-.#$%&'()*+,-. -.*,+)('&#$%#$%&'()*,+-. Safe-Infered/Join together As l and l' where the last n types  of l coincide with the first n types of l'. The result has a  the common n types eliminated. 2 Reverse the A l , and get 3 l. 5Reverse l and append it in front of l'. 8This is does for ; what   does for  ordinary lists. ;This is does for ; what  does for  ordinary lists. >A class for appending two As. The result of appending  l and l' has type l ? l'. AEvery A has a B. The B is actually a  type, and should be a  (see  Data.Cardinal). /0123456789:;<=>?@ABC/0123456789:;<=>?@ABCABC>?@;<=89:567234/01/0123456789:;<=>?@ABC Safe-InferedJ?This is the constructor for heterogeneous lists, equivalent to  : for standard lists. L is used to end the lists, just  like '[]'. %DEFGHIJKLMN /0123456789:;<=>?@ABCDEFGHIJKLMN LMJKFGHINDEDEFGHIJKLMN Safe-InferedPIndentity matrix. Q0Inverts, if the matrix is invertible, otherwise . RTrace of the matrix. S:Computes the coefficient of the polynomial p(z)=det(A+zI)  using the method of closed ordered walks (clow) illustrated  in the paper of G. Rote   Hhttp://page.mi.fu-berlin.de/rote/Papers/pdf/Division-free+algorithms.pdf. A The number of operations for the whole process is O(n^4), where A n is the number of rows of the matrix. The first coefficient is ? the known term and equals the determinant, while the last one 9 is the coefficient of z^(n-1) and equals the trace. The 8 coefficient of z^n equals 1 and is not included in the 8 resulting list. The k-th coefficient is the sum of all " principal minors of order n-k+1. TDeterminant of the matrix. USolves linear systems AX=B; t1 is the type of A, t2 is  the type of B, and V t1 t2 is the type of the solution  X. W6Performs row operations on the augmented matrix [t1,t2] until ; t1 is in reduced row echelon form, then slits the result. XReturns  if the system AX=B has no solution, A otherwise returns a solution for the system and a list of basis  vectors for the kernel of A. YA matrix with i rows and j columns. ZSwitch two rows. [Multiply a row by a number. \\ i1 a i2 t adds a times the row i2 to the  row i1 ot t. ]Switch two columns. ^Multiply a column by a number. __ j1 a j2 t adds a times the column j2 to  the column j1 ot t. `(Reduced row echelon form of the matrix. cTensor product of t1 and t2. f+It is the product of the last dimension of t1 with the first  dimension of t2. In the case where t1 and t2 are matrices this , coincide with the ordinary matrix product. iAA general form of product between two tensors, in which the last  n dimensions of t1 are contracted with the first n dimensions  of t2,. The resulting tensor belongs to the space j n  t1 t2. f and c below are  particular cases where n# is equal to 1 and 0 respectively. !OPQRSTUVWXYZ[\]^_`abcdefghijklmno!OPQRSTUVWXYZ[\]^_`abcdefghijklmno!lmnoijkfghcdeabYZ[\]^_`UVWXOPQRSTOPQRSTUVWXYZ[\]^_`abcdefghijklmno  Safe-Infered'pqrstuvwxyzpqrstuvwxyz#pqrstuvwxyz Safe-Infered pqrstuvwxyz vutswxryzpq Safe-Infered OPQRSTUVWXZ[\]^_`abcdefghijklmno  !"#$%&'()*+,-./012345678))9::;<=>?@ABCDE FGHIJKLMNOPQRSTUUVVWXYZ[\]^_`abcdefghijklmnopqrstuvwx y z { | b }  ~  H   tensor-0.1.1 Data.TensorData.TypeAlgebra Data.Cardinal Data.Ordinal Data.TypeListData.TypeList.MultiIndexData.Tensor.LinearAlgebraData.Tensor.Vector!Data.TypeList.MultiIndex.InternalData.Tensor.ExamplesPreludedropData.Tensor.Vector.Internal Data.Tensor.LinearAlgebra.VectorZipzipWith TransposeTransposeSpace transpose DirectSumSumSpace directSumFromListfromListTensorIndexElemdims!generate replicateProd:*:<*>Sum:+:<+> CardinalityCardCardinalSucc fromCardinalC4C3C2C1C0ZerocardOrdinal fromOrdinal toOrdinalFiveFourThreeTwoFirstOneJoinListJoinjoin ReverseListReversereverse TailRevListTailRevrevDropListDropTakeListTaketake AppendList:++:<++>TypeListLengthlengthMultiIndexConcatConcat MultiIndexfromMultiIndex toMultiIndex dimensions:|:NilmultiIndex2Linear SquareMatrixunitinversetrcharPolydet LinearSystemSolSpacetriangularSolveparametricSolveMatrix rowSwitchrowMultrowAdd colSwitchcolMultcolAddrowEchelonForm DotProductdot TensorProduct:⊗:⊗ MatrixProductMatrixProductSpace.*.Product ProdSpaceprod VectorSpacezero*..+. FromVector fromVector RowVector ColumnVectorVectorvector2ColumnVectorcolumnVector2Vectorvector2RowVectorrowVector2Vector linearize unlinearizebaseGHC.BaseidGHC.Err undefined $fProdaSucc $fProdaZero $fSumaSucc $fSumaZero $fShowSucc $fShowZero$fCardinalSucc$fCardinalZero $fProdmSucc $fProdmOne $fSummSucc $fSummOne$fCardinalitySucc$fCardinalityOne $fMonadSucc $fFunctorSucc $fEnumSucc $fOrdinalSucc $fOrdSucc $fBoundedSucc $fShowOne $fEnumOne $fOrdinalOne$fOrdOne $fBoundedOneGHC.List$fJoinListnll' $fBounded:|: $fBoundedNil$fOrd:|:$fOrdNil$fMultiIndexConcatSucc:|::|:$fMultiIndexConcatZero:|::|: $fShow:|:$fMultiIndex:|: $fShowNil$fMultiIndexNil$fReverseList:|:$fReverseListNil$fTailRevList:|:l'$fTailRevListNill$fDropListSucc:|:$fDropListZero:|:$fDropListZeroNil$fTakeListSucc:|:$fTakeListZero:|:$fTakeListZeroNil$fAppendList:|:l'$fAppendListNill $fTypeList:|: $fTypeListNil$fCardinality:|:$fCardinalityNil Data.MaybeNothingformcontentunsafeTensorGetunsafeTensorGenunsafeVectorGetunsafeVectorGenunsafeMatrixGetunsafeMatrixGenunsafeMatrixGetRowunsafeMatrixRowSwitchunsafeMatrixColSwitchunsafeMatrixRowMultunsafeMatrixColMultunsafeMatrixRowDivunsafeMatrixColDivunsafeMatrixRowAddunsafeMatrixColAddunsafeMatrixRowSubunsafeMatrixColSub$fTransposeTensor$fDirectSumnTensorTensor$fTensorTensor$fFromListTensor$fFromVectorTensor $fZipTensor$fFunctorTensor $fShowTensor$fLinearSystemTensorTensor$fLinearSystemTensorTensor0$fSquareMatrixTensor$fMatrixijTensor$fDotProductTensor$fTensorProductt1t2$fMatrixProductt1t2$fProductnTensorTensor$fVectorSpaceTensor