úÎy¥t]K      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJMissing instnaces for HaskellForMaths's (c) Wanja Chresta, 2018GPL-3!wanja dot hs at chrummibei dot ch experimentalPOSIXNoneV5Some 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 .  "Linear codes over arbitrary fields(c) Wanja Chresta, 2018GPL-3!wanja dot hs at chrummibei dot ch experimentalPOSIXNone -<FSTVhqè13A 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.KFPairs 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 operationsWCheck matrix which can be automatically calculated from the standard form generator.;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.A map of all possible syndromes to their error vector. It is used to use syndrome decoding, a very slow decoding algorithm.+For convenience, Vector is a one-row MatrixA # or parity matrix is the dual of a S. 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.A O is the generator matrix of a linear code, not necessarily in standard form.L!Extract an Int from a type level M.A random permutation matrixN©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.Uses Gaussian eleminiation via rref from , to find the standard form of generators.3The standard from generator of a linear code. Uses + to calculate a standard form generator.+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 O 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 fP(List all lists given length over field f&@List all vectors of length n with non-zero elements over field fQDList all vectors of given length with non-zero elements over field f'+List of all words with given hamming weight(QList of all words with (non-zero) hamming weight smaller than a given boundary)A list of all codewords*^Give the syndrome of a word for the given code. This is 0 if the word is a valid code word.+QUses the exponential-time syndrome decoding algorithm for general codes. c.f: @https://en.wikipedia.org/wiki/Decoding_methods#Syndrome_decoding,cSynonym for syndromeDecoding, an inefficient decoding algorithm that works for all linear codes.-YReturn a syndrome table for the given linear code. If the distance is not known (i.e. minDist c% = Nothing) this is very inefficient.. Replace the ´ 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./yCheck if the given candidate code word is a valid code word for the given linear code. If not, the party check failed.0€Check if the given candidate code word has errors, i.e. if some element changed during transmission. This is equivalent with not /17The dual code is the code generated by the check matrix-This drops already calculated syndromeTables.28The dual code is the code generated by the check matrix.-This drops already calculated syndromeTables.3ÿ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.R¤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.4Extend 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.5IThe trivial code is the identity code where the parity bits are all zero.6qA simplex code is a code generated by all possible codewords consisting of 0's and 1's except the zero vector.7The  Hamming(7,4)-code. It is a [7,4,3]_2 code8The _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.9GStandard base vector [0..0,1,0..0] for any field. Parameter must be >=1:First base vector [1,0..0];Second base vector [0,1,0..0]SdReduced row echelon form. Taken from rosettacode. This is not the implementation provided by the T package. =https://rosettacode.org/wiki/Reduced_row_echelon_form#Haskell">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)22The distance of the new code (if known) or Nothing= !"#$%&'()*+,-./0123456789:;<=>?@ABC="#$/0!)%&'(*,+-.12345678 9:;<=>?@ABCUVW Safet6XYZ[\]^_`           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefggh i j k l m n o pqlinear-code-0.2.0-inplaceMath.Algebra.Code.LinearMath.Algebra.Field.InstancesMath.Algebra.Field.Static Math.AlgebraFieldMath.Algebra.Field ExtensionMatrixPaths_linear_codeVHaskellForMaths-0.4.8-73c612d8258eadc1f7a895ccf5eecc8f224bca9730b1726a1b19b86d695725ccMath.Algebra.Field.BaseF7F5F3F2F11Math.Algebra.Field.ExtensionF9F8F4F16$fBoundedExtensionField $fBoundedFp$fRandomExtensionField $fRandomFpSize PolyDegreeCharacteristicchar BinaryCode SyndromeTable LinearCodegeneratorMatrix checkMatrixdistance syndromeTableVector CheckMatrix GeneratorrandomPermMatrix standardFormstandardFormGenerator codeLengthrankweight codeFromA codeFromADencode allVectors fullVectors hammingWords lighterWords codewordssyndromesyndromeDecodedecodecalcSyndromeTablerecalcSyndromeTable isCodewordhasErrordualCode dualCodeD permuteCode extendCode trivialCodesimplexhamminggolayeVece1e2e3e4e5e6e7e8e9e10 $fRandomRMat$fRandomLinearCode$fBoundedLinearCode$fShowLinearCode$fEqLinearCode$fEqRMat $fOrdRMatSyndromenatToIntbase GHC.TypeNatsKnownNatrandomStandardFormCodeghc-prim GHC.TypesInt allVectorsI fullVectorsI shuffleCode rrefFixedRmatrix-static-0.1-cd7b0880059d1e98a610ac4dd13ed89abbe13d8ebdb91aaed4c08487a9e570d5Data.Matrix.StaticmatrixRMatgetRMatversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName