úÎ}õw÷]      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\Missing instnaces for HaskellForMaths's (c) Wanja Chresta, 2018GPL-3wanja.hs@chrummibei.ch experimentalPOSIXNoneVÐ5Some type families extracting finite field parameters(c) Wanja Chresta, 2018GPL-3wanja.hs@chrummibei.ch experimentalPOSIXNone -FSTVhX ^Type family which gives the size of a field, i.e. the number of elements of a finite field.pType family which gives the degree of a polynomial type. This is used to extract type level information from bThe characteristic of a finite field on the type level. The characteristic is: For any element x in the field f with characteristic c, we have: $c * x = x + x + .. + x (c times) = 0êCharacteristic of a field. It takes a finite field type in the proxy value and gives the characteristic. This is done using type families To support new finite field types, you need to add a type instance for the type family .  0Type safe matrix wrapper over the matrix library(c) Wanja Chresta, 2018GPL-3wanja.hs@chrummibei.ch experimentalPOSIXNone-345>?FKSTVh,“%A row vector (a matrix with one row).A matrix over the type f with m rows and n! columns. This just wraps the   2 constructor and adds size information to the typeType safe matrix multiplicationType safe scalar multiplication O(rows*cols)g. Generate a matrix from a generator function. | The elements are 1-indexed, i.e. top-left element is (1,1). O(rows*cols). The transpose of a matrix.)Horizontally join two matrices. Visually: ( A ) <|> ( B ) = ( A | B ) O(rows*cols). Identity matrix O(rows*cols). The zero matrixNCreate a matrix from a list of elements. The list must have exactly length n*m5. This is checked or else an exception is thrown.@Create a matrix from a list of rows. The list must have exactly m lists of length n#. An exception is thrown otherwise..Get the elements of a matrix stored in a list.qGet the elements of a matrix stored in a list of lists, where each list contains the elements of a single row.O(1)ÿ. Extract a submatrix from the given position. The size of the extract is determined by the types, i.e. the parameters define which element is the top-left element of the extract. CAUTION: It is not checked if an extract is possible. Wrong parameters will cause an exception. dReduced row echelon form. Taken from rosettacode. This is not the implementation provided by the  package. =https://rosettacode.org/wiki/Reduced_row_echelon_form#Haskell  "Linear codes over arbitrary fields(c) Wanja Chresta, 2018GPL-3wanja.hs@chrummibei.ch experimentalPOSIXNone -<FSTVhu‡++3A binary code is a linear code over the field GF(2),aA syndrome table is a map from syndromes to their minimal weight representative. Every vector v has a syndrome  S(v) /. This table reverses the syndrome function S} and chooses the vector with the smallest hamming weight from it's image. This is a lookup table for syndrome decoding.]FPairs of (e,S(e)) where e is an error vector and S(e) is its syndrome.-A [n,k]-Linear code over the field f. The code parameters f,n and k? are carried on the type level. A linear code is a subspace C of f^n# generated by the generator matrix./1Generator matrix, used for most of the operations0WCheck matrix which can be automatically calculated from the standard form generator.1;The minimal distance of the code. This is the parameter d in  [n,k,d]_qx notation of code parameters. The problem of finding the minimal distance is NP-Hard, thus might not be available.2A map of all possible syndromes to their error vector. It is used to use syndrome decoding, a very slow decoding algorithm.3A 3# or parity matrix is the dual of a 4S. It can be used to check if a word is a valid code word for the code. Also, ( \forall v \in f^k: cG \cdot H^\top = 0 ? i.e. the code is generated by the kernel of a check matrix.4A 4O is the generator matrix of a linear code, not necessarily in standard form.^!Extract an Int from a type level _.5A random permutation matrix`©A random code with a generator in standard form. This does not generate all possible codes but only one representant of the equivalence class modulo similar codes.6Uses Gaussian eleminiation via   from   • to find the standard form of generators. This might fail since not all codes can be converted to standard form without permutation of columns.73The standard from generator of a linear code. Uses 6@ to try to create a standard form generator which might fail.8+Convenience function to extract the length n from the type level9)Convenience function to extract the rank k from the type level.:%The hamming weight of a Vector is an a between 0 and n;™Generate a linear [n,k]_q-Code over the field a with the generator in standard form (I|A), where the given function generates the k×(n-k)-matrix A.<7Get the codeword generated by the given k-sized vector.=)List all vectors of length n over field fb(List all lists given length over field f>@List all vectors of length n with non-zero elements over field fcDList all vectors of given length with non-zero elements over field f?+List of all words with given hamming weight@RList of all words with (non-zero) hamming weight smaller than a given boundaryAA list of all codewordsB^Give the syndrome of a word for the given code. This is 0 if the word is a valid code word.CQUses the exponential-time syndrome decoding algorithm for general codes. c.f: @https://en.wikipedia.org/wiki/Decoding_methods#Syndrome_decodingDcSynonym for syndromeDecoding, an inefficient decoding algorithm that works for all linear codes.EYReturn a syndrome table for the given linear code. If the distance is not known (i.e. minDist c% = Nothing) this is very inefficient.F Replace the 2´ of a code with a newly calculated syndrome table for the (current) generator. Useful to get a syndrome table for transformed codes when the table cannot be transformed, too.GyCheck if the given candidate code word is a valid code word for the given linear code. If not, the party check failed.H€Check if the given candidate code word has errors, i.e. if some element changed during transmission. This is equivalent with not GI7The dual code is the code generated by the check matrixJÛPermute the rows of a code with a permutation matrix. The given permutation matrix must be a valid permutation matrix; this is not checked. This effectively multiplies the generator and check matrix from the rightdmRandomly permute the elements of the code. This is a shuffle of the positions of elements of all codewordsKIThe trivial code is the identity code where the parity bits are all zero.LqA simplex code is a code generated by all possible codewords consisting of 0's and 1's except the zero vector.MThe  Hamming(7,4)-code. It is a [7,4,3]_2 codeNGStandard base vector [0..0,1,0..0] for any field. Parameter must be >=1OFirst base vector [1,0..0]PSecond base vector [0,1,0..0];>Elements of A where top-left is (1,1) and bottom right (k,n-k)>+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWX>-./01243;67<GH:A=>?@BDCEF,IJKLM+589NOPQRSTUVWX-./012 SafewÐefghijklm          !  "#$%&'()*+,-./0123456789:;;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstu v w x y z { | }~linear-code-0.1.0-inplaceMath.Algebra.Code.LinearMath.Algebra.Field.InstancesMath.Algebra.Field.StaticMath.Algebra.Matrix Math.AlgebraFieldMath.Algebra.Field Extension Data.MatrixMatrixSafePaths_linear_codeVHaskellForMaths-0.4.8-73c612d8258eadc1f7a895ccf5eecc8f224bca9730b1726a1b19b86d695725ccMath.Algebra.Field.BaseF7F5F3F2F11Math.Algebra.Field.ExtensionF9F8F4F16$fBoundedExtensionField $fBoundedFp$fRandomExtensionField $fRandomFpSize PolyDegreeCharacteristiccharVector.*^*matrix transpose<|>identityzerofromList fromListstoListtoLists submatrixrref$fRandomMatrix $fNumMatrix $fOrdMatrix $fShowMatrix $fEqMatrix$fFunctorMatrix$fApplicativeMatrix$fFoldableMatrix$fTraversableMatrix$fMonoidMatrix BinaryCode SyndromeTable LinearCodegeneratorMatrix checkMatrixdistance syndromeTable CheckMatrix GeneratorrandomPermMatrix standardFormstandardFormGenerator codeLengthrankweight codeFromAencode allVectors fullVectors hammingWords lighterWords codewordssyndromesyndromeDecodedecodecalcSyndromeTablerecalcSyndromeTable isCodewordhasErrordualCode permuteCode trivialCodesimplexhammingeVece1e2e3e4e5e6e7e8e9e10$fRandomLinearCode$fBoundedLinearCode$fShowLinearCode$fEqLinearCodeSyndromenatToIntbase GHC.TypeNatsKnownNatrandomStandardFormCodeghc-prim GHC.TypesInt allVectorsI fullVectorsI shuffleCodeversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName