h$jSV      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Nat helper methods(c) Grant Weyburne, 2022BSD-3None'(-./<>?%cybusmatrix dimension of degree 10cybusmatrix dimension of degree 9cybusmatrix dimension of degree 8cybusmatrix dimension of degree 7cybusmatrix dimension of degree 6 cybusmatrix dimension of degree 5 cybusmatrix dimension of degree 4 cybusmatrix dimension of degree 3 cybusmatrix dimension of degree 2 cybusmatrix dimension of degree 1cybusgenerates a list of indices using the individual digits of the given cybus:generates a list of indices using each digit of the given cybus4translates a type of size "n" to a tuple of size "n"cybus%methods for working with nested listscybus/convert a nested list to a nested nonempty listcybus/convert a nested nonempty list to a nested listcybus(convert a matrix index into nested listscybus(convert a matrix index into nested listscybusconvert Peano to Natcybusconvert Nat to Peanocybus%peano numbers for converting between  and peanocybusextracts the dimensions of a nested list: doesnt allow empty dimensionscybusextracts the dimensions of a nested nonempty list: doesnt allow empty dimensions cybus1extracts the dimensions of a nested nonempty list!cybus(extracts the dimensions of a nested list"cybus"product of a type level list as a #cybusreverse a type level list$cybusfind the number of N between "i" and "j" while ensuring i<=j and j<=n%cybus/constraint for DiffC with better error messages&cybus'constraint for ensuring that "i" <= "n"'cybusconstraint for ensuring that "i" <= "n" with a custom error message(cybus'constraint for ensuring that "i" <= "n")cybusget the factorial of a *cybusvalidate that the nested nonempty list is consistent in size along all dimensions+cybusvalidate that the nested list is consistent in size along all dimensions,cybus1convert a nested nonempty list into a nested list-cybus1convert a nested list into a nested nonempty list*  !"#$%&'()*+,-*$%)(&' "#+*! ,-finite numbers(c) Grant Weyburne, 2022BSD-3None'(-./8:<>?";cybusclass for constraining "i" to positive numbers less than or equal to "n" with a custom error message<cybusclass for constraining "i" to positive numbers less than or equal to "n">cybusdefinition of the Finite type?cybuspattern synonym for validating the fin before construction with a PosC constraint for validating at the typelevel@cybus readonly pattern synonym for finAcybus)accessor for the index position within a >Bcybus'accessor for the maximum size within a >Ccybus create a > value level "i" and "n" values and validate that "i" is in rangeDcybus create a > value level "i" and "n" values and validate against expected "n"Ecybus)convenience function for conversion from  to >Fcybus)convenience function for conversion from  to >Gcybus pretty print >Hcybus reader for >Icybus reader for GJcybustype synonym for index 1Kcybustype synonym for index 2Lcybustype synonym for index 3Mcybustype synonym for index 4Ncybustype synonym for index 5Ocybustype synonym for index 6Pcybustype synonym for index 7Qcybustype synonym for index 8Rcybustype synonym for index 9Scybustype synonym for index 10Tcybustype synonym for index 11Ucybustype synonym for index 12Vcybustype synonym for index 13Wcybustype synonym for index 14Xcybustype synonym for index 15Ycybustype synonym for index 16Zcybustype synonym for index 17[cybustype synonym for index 18\cybustype synonym for index 19]cybustype synonym for index 20#;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]#>AB@?<=;GIHDCEFJKLMNOPQRSTUVWXYZ[\] fixed-sized indices for a matrix(c) Grant Weyburne, 2022BSD-3None'(-./8:<>? !mcybusconstrain i within the size of the indices ie "i >= 1 && i <= LengthT ns"ncybus(convert type level indices into a FinMatpcybus%definition of the indices of a matrixqcybuspattern synonym for validating the finmatrix before construction but uses an extra  constraint to check "ns"rcybus&readonly pattern synonym for finmatrixscybus2accessor for the relative position within a matrixtcybus$accessor for the indices of a matrixucybuscreate a FinMat value level "i" and "ns" values and validate that "i" is in rangevcybuscreate a FinMat value level "i" and "ns" values and validate against expected "ns"wcybus1create a FinMat using a relative type level indexxcybus)convenience function for conversion from  to pycybus'convert a FinMat into a list of indiceszcybus.try to convert a list of indices into a FinMat{cybus.try to convert a list of indices into a FinMat|cybus,find the relative position in a matrix index}cybus reader for p~cybus reader for Gcybuspretty print FinMatcybus!more detailed pretty print FinMatcybusiso that conses out the > from pcybus9a lens for accessing the "i" index in a indices of FinMatcybusset the > at index "i" for the FinMatcybusget the > at index "i" from FinMat must rely on FinMat to get "n at index i "which saves us pulling "n" from the typelevel ie we can omit PosC ncybuslens for index 1cybuslens for index 2cybuslens for index 3cybuslens for index 4cybuslens for index 5cybuslens for index 6cybuslens for index 7cybuslens for index 8cybuslens for index 9cybuslens for index 10&mnopqrstuvwxyz{|}~&pstrqnouvxwyz{~}m|+type level indexed multi-dimensional matrix(c) Grant Weyburne, 2022BSD-3None"&'(-./5678:<>?Mcybus!iso and lenses to unsnoc a matrixcybus!iso and lenses to uncons a matrixcybusmarker representing the last value in a 1d matrix ie singletoncybuslens into row 10cybuslens into row 9cybuslens into row 8cybuslens into row 7cybuslens into row 6cybuslens into row 5cybuslens into row 4cybuslens into row 3cybuslens into row 2cybuslens into row 1cybusclass with methods to convert to and from Mat using nested structurescybus show a matrixcybusshow options for cybusfirst indentationcybusevery subsequent indentationcybussplit out into  and  otherwise lump everything into cybus%inline vector: large impact to outputcybus9newline after each inlined vector: large impact to outputcybus;newline after each except if inlined:large impact to outputcybus5type synonym for the result of nesting a matrix: see cybus(converts mat dimensions to a nested listcybusclass with methods to convert to and from Mat using nested structurescybus convert a  to nested cybusconvert a nested  to a cybus convert a  to a nested listcybusconvert a nested list to a cybus convert a  to a nested nonempty listcybus$convert a nested nonempty list to a cybus conversions between n-tuple and cybus convert a  to a tuplecybusconvert a tuple of type "a" to cybustraversal over a tuplecybus-convert a between a matrix and a nested tuplecybus"convert a matrix to a nested tuplecybusgeneralised dot productcybus,allows viewing and updating a slice of a matcybus;describes the resulting type of taking a slice from the matcybus>describes the resulting type of taking a slice from the matrixcybusallows viewing and updating a slice of a mat using concrete indices inference is better with n ~ n' but since we have committed to a instance we are missing nice errors when the indices dont match: eg sliceC' '[1] ('[7] (FinMat 0 (_7P :| [])) (mm @(NN 7))cybusdescribes the resulting type of taking a slice from the mat but the indices must match pointwise unlike SliceT so we can use the concrete FinMat to specify the indicescybusmethods for accessing all the leaf rows of a matrix: restricted to 2d hence this classcybusconvenient type synonym for specifying the dimensions of a matrix using each digit as a dimensioncybus'convenient type synonym for a 6d matrixcybus'convenient type synonym for a 5d matrixcybus'convenient type synonym for a 4d matrixcybus'convenient type synonym for a 3d matrixcybus'convenient type synonym for a 2d matrixcybus'convenient type synonym for a 1d matrixcybusdefinition of a matrixcybusbidirectional pattern synonym for validating a matrix before construction with / constraint for additional typelevel validationcybus%readonly pattern synonym for a matrixcybus2accessor for the relative position within a matrixcybus$accessor for the indices of a matrixcybus generate a  using a listcybus generate a  using a listcybusused by  so dont call pure from herecybuscreates a matrix of first dimension "n" by replicating the input matrix "n" timescybus+zip two matrices using a combining functioncybus-zip three matrices using a combining functioncybuszip two matricescybus with an Applicative or use  but that needs a  constraintcybus with an index or use cybus with an index or use  if "f" is cybusindex into a matrixcybus7create a matrix of matrix indices for a given size "ns"cybus$fill an existing matrix with indicescybus!validate before creating a matrixcybus-validate before creating a matrix with extra # constraint to check that "ns" and  matchcybusgenerate a matrix passing the indices at that element to a user callback functioncybusgenerate a matrix passing a relative position of the element to a user callback functioncybus9generate a matrix using relative position starting at onecybuslens that accesses a value inside a mat given a concrete mat indexcybuslens that accesses a value inside a mat using a type level indexcybussets a value in a matrixcybusupdates a value in a matrixcybuscons a value with a 1d matrixcybus0cons a matrix with a one-higher dimension matrixcybus*combine two values together into 1d matrixcybuscombine two matricescybuslast element in a 1d matrixcybus&last element in a 2d or greater matrixcybus(create a 1d matrix from a list of valuescybuscreate a 1d matrix from a list of values with the exact number of elementscybus(create a 2d matrix from a list of valuescybuscreate a 2d matrix from a list of values with the exact number of elementscybusmap each columncybusmap each column with user statecybus?traverse over a nested leaf matrix only allowing changes to "a"cybus:map over a nested leaf matrix only allowing changes to "a"cybus!foldmap over a nested leaf matrixcybus!foldmap over a nested leaf matrixcybusmap over a nested leaf matrixcybus(map over a nested leaf matrix with statecybusmap over a nested leaf matrix only allowing changes to "a" and access to user statecybusfold over a nested leaf matrixcybus'convert to nested matrix with 1d leavescybus)get the start index for each row in a matcybusreverse each row in a matrixcybus(sort each row of a mat using underlying cybusvisit each leaf row with a function from a nonempty to a nonempty listcybus"reverse the dimensions of a matrixcybus resize a matcybus)converts a typelevel slice to a concrete pcybusget a slice by converting a typelevel slice to a concrete FinMat based slicecybusupdate a slice by converting a typelevel slice to a concrete FinMat based slicecybus#a lens indexing the outermost slicecybusa lens for acccessing a columncybus%a lens for accessing a slice of a matcybus-a lens indexing a row using a concrete index >cybusa lens for acccessing a columncybus%a lens for accessing a slice of a matcybusbreak up into rowscybusunbust from rows see cybussplit up a matrix into matrix chunks of dimension "ps" and fill a container "tz"cybussplit up a vector into chunks of size "n" and fill a container "tz"cybusmultiply two matrices togethercybus delete a rowcybus#delete a row using a concrete indexcybusdelete a row from a matrixcybussame as , but using a typelevel witness for the indexcybus,delete a column from a matrix (2d or higher)cybussame as , but using a typelevel witness for the indexcybus)insert a column into a mat (2d and above)cybussame as  but using a typelevel witness >cybusswaps mat rows (1d or more)cybusswaps mat rows (1d or more)cybusswaps mat rows (2d or more)cybusswaps mat rows (2d or more)cybusswaps a single value "a" from any location to any other location using type level indexescybussame as  but using typelevel witnesses pcybusappend two matrices verticallycybus append two matrices horizontallycybusreturn a mat as a permutation of a list (1d only) todo: extend to multidimensionscybus3find all elements in a mat that match the predicatecybus generate a ; with the given past and future rep values and a user statecybus;cartesian product of two matrices with a combining functioncybus&lens for bulk updates/gets on a matrixcybusbulk updates on a matcybusbulk gets from a mat: replaces the container of indices with the corresponding valuescybusbulk updates on a matcybusan iso for transposing a matrixcybustranspose a 2d or larger matrixcybus3validate and convert from a nested list to a matrixcybus?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]mnopqrstuvwxyz{|}~  Safe-InferredV     !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNMOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~                                                       $cybus-0.3.0.0-2tgktn1zjvk47vpww9PCqf Cybus.FinMatCybus.NatHelper Cybus.Fin Cybus.Mat Data.Listscanrscanl' Data.Vector postscanr' postscanl'Cybus Paths_cybus"pos-0.3.0.0-A0f8DhErqNx2Uewo28WEMDData.Pos nsLengthP fromNSTotalPfromNSPNSD10D9D8D7D6D5D4D3D2D1NN'NN ListTupleT NestedListCnestedListToNonEmptyCnestedNonEmptyToListCflattenNestedListC NonEmptyNSTListNST PeanoToNatT NatToPeanoTPeanoZSValidateNestedListCvalidateNestedListCValidateNestedNonEmptyCvalidateNestedNonEmptyCValidateNestedNonEmptyTValidateNestedListTProductTReverseTDiffTDiffTC