úΓűŽb      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`aMissing instnaces for HaskellForMaths's (c) Wanja Chresta, 2018GPL-3!wanja dot hs at chrummibei dot ch experimentalPOSIXNoneV=5Some type families extracting finite field parameters(c) Wanja Chresta, 2018GPL-3!wanja dit hs at chrummibei dot ch experimentalPOSIXNone -FSTVhń ^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-3!wanja dot hs at chrummibei dot 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 ))Horizontally join two matrices. Visually: G ( A ) ( A ) <-> ( B ) = ( - ) ( 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-3!wanja dot hs at chrummibei dot ch experimentalPOSIXNone -<FSTVh‹$/,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.bFPairs 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.01Generator matrix, used for most of the operations1WCheck matrix which can be automatically calculated from the standard form generator.2;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.3A map of all possible syndromes to their error vector. It is used to use syndrome decoding, a very slow decoding algorithm.4A 4# or parity matrix is the dual of a 5S. 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.5A 5O is the generator matrix of a linear code, not necessarily in standard form.c!Extract an Int from a type level d.6A random permutation matrixe©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.7Uses Gaussian eleminiation via ! from  , to find the standard form of generators.83The standard from generator of a linear code. Uses 7+ to calculate a standard form generator.9+Convenience function to extract the length n from the type level:)Convenience function to extract the rank k from the type level.;%The hamming weight of a Vector is an f between 0 and n<Generate a linear  [n,k]_q -Code over the field f( with the generator in standard form (I|A),, where the given function generates the  k \times (n-k) l-matrix A. The distance is unknown for this code and thus decoding algorithms may be very inefficient.=Generate a linear  [n,k,d]_q -Code over the field f( with the generator in standard form (I|A),, where the given function generates the  k \times (n-k)  -matrix A.>7Get the codeword generated by the given k-sized vector.?)List all vectors of length n over field fg(List all lists given length over field f@@List all vectors of length n with non-zero elements over field fhDList all vectors of given length with non-zero elements over field fA+List of all words with given hamming weightBQList of all words with (non-zero) hamming weight smaller than a given boundaryCA list of all codewordsD^Give the syndrome of a word for the given code. This is 0 if the word is a valid code word.EQUses the exponential-time syndrome decoding algorithm for general codes. c.f: @https://en.wikipedia.org/wiki/Decoding_methods#Syndrome_decodingFcSynonym for syndromeDecoding, an inefficient decoding algorithm that works for all linear codes.GYReturn a syndrome table for the given linear code. If the distance is not known (i.e. minDist c% = Nothing) this is very inefficient.H Replace the 3Ž 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.IyCheck if the given candidate code word is a valid code word for the given linear code. If not, the party check failed.J€Check if the given candidate code word has errors, i.e. if some element changed during transmission. This is equivalent with not IK7The dual code is the code generated by the check matrix-This drops already calculated syndromeTables.L8The dual code is the code generated by the check matrix.-This drops already calculated syndromeTables.Mÿ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 right. Te distance of the resulting code stays the same.-This drops already calculated syndromeTables.i€Randomly permute the elements of the code. This is a shuffle of the positions of elements of all codewords. The distance of the resulting code stays the same.-This drops already calculated syndromeTables.NExtend the given code  c  by zero-columns. Vectors  v_{ext} \in c_{ext}  have the form % v = (v_1, \dots , v_n, 0, \dots, 0) ž . The distance of the extended code stays the same. This drops a calculated syndromeTable and makes it necessary to recalculate it if it's accessed.OIThe trivial code is the identity code where the parity bits are all zero.PqA simplex code is a code generated by all possible codewords consisting of 0's and 1's except the zero vector.QThe  Hamming(7,4)-code. It is a [7,4,3]_2 codeRThe _Golay_-code is a perfect [24,12,7]-code. It is the only other non-trivial perfect code and the only perfect code that is able to correct 3 errors.<Syndrome decoding on this code takes a very, very long time.SGStandard base vector [0..0,1,0..0] for any field. Parameter must be >=1TFirst base vector [1,0..0]USecond base vector [0,1,0..0]<>Elements of A where top-left is (1,1) and bottom right (k,n-k)=3Distance of the code. Give Nothing if it is unknown>Elements of A where top-left is (1,1) and bottom right (k,n-k)L2The distance of the new code (if known) or NothingB,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]B./012354<=78>IJ;C?@ABDFEGH-KLMNOPQR,69:STUVWXYZ[\]./0123 Safejklmnopqr            !"#$%&'()*+,-./0123456789:;;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy z { | } ~  € ‚linear-code-0.1.1-inplaceMath.Algebra.Code.LinearMath.Algebra.Field.InstancesMath.Algebra.Field.StaticMath.Algebra.Matrix Math.AlgebraFieldMath.Algebra.Field Extension Data.MatrixMatrixPaths_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 codeFromA codeFromADencode allVectors fullVectors hammingWords lighterWords codewordssyndromesyndromeDecodedecodecalcSyndromeTablerecalcSyndromeTable isCodewordhasErrordualCode dualCodeD permuteCode extendCode trivialCodesimplexhamminggolayeVece1e2e3e4e5e6e7e8e9e10$fRandomLinearCode$fBoundedLinearCode$fShowLinearCode$fEqLinearCodeSyndromenatToIntbase GHC.TypeNatsKnownNatrandomStandardFormCodeghc-prim GHC.TypesInt allVectorsI fullVectorsI shuffleCodeversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName