'      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone&*34579:>FIKLNZA bilinear function is a linear function mapping to a linear function, or equivalently a 2-argument function that's linear in each argument independently. Note that this can note be uncurried to a linear function with a tuple argument (this would not be linear but quadratic).Infix synonym of ., without explicit mention of the scalar type.sA linear map, represented simply as a Haskell function tagged with the type of scalar with respect to which it is linear. Many (sparse) linear mappings can actually be calculated much more efficiently if you don't represent them with any kind of matrix, but just as a function (which is after all, mathematically speaking, what a linear map foremostly is).However, if you sum up many (s  which you can simply do with the  instance  they will become ever slower to calculate, because the summand-functions are actually computed individually and only the results summed. That's where _ is generally preferrable. You can always convert between these equivalent categories using .elacs "a    .   (c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone !"&*134579:>FIKLNZ]The workhorse of this package: most functions here work on vector spaces that fulfill the  v constraint.In summary, this is a  with an implementation for . v w, for any other space w , and with a  space. This fulfills  ( v) ~ v( (this constraint is encapsulated in +). To make a new space of yours an ", you must define instances of - and  . In fact,  is equivalent to a, but makes the condition explicit that the scalar and dual vectors also form a linear space. # only stores that constraint in $ (to avoid UndecidableSuperclasses).Infix synonym for ., without explicit mention of the scalar type.Infix synonym for ., without explicit mention of the scalar type.Tensor products are most interesting because they can be used to implement linear mappings, but they also form a useful vector space on their own right.{The tensor product between one space's dual space and another space is the space spanned by vector dual-vector pairs, in  7https://en.wikipedia.org/wiki/Bra%E2%80%93ket_notationabra-ket notation written as  m = " |w''v| JAny linear mapping can be written as such a (possibly infinite) sum. The .w data structure only stores the linear independent parts though; for simple finite-dimensional spaces this means e.g.  ! ! !X effectively boils down to an ordinary matrix type, namely an array of column-vectors |w'.(The 'v|H dual-vectors are then simply assumed to come from the canonical basis.){For bigger spaces, the tensor product may be implemented in a more efficient sparse structure; this can be defined in the - instance.The class of vector spaces v for which  s v w is well-implemented.7Suitable representation of a linear map from the space v to its field.4For the usual euclidean spaces, you can just define  v = vQ. (In this case, a dual vector will be just a row vector  if you consider v-vectors as column vectors . 0 will then effectively have a matrix layout.).!The internal representation of a  product.FFor euclidean spaces, this is generally constructed by replacing each s scalar field in the v vector with an entire w7 vector. I.e., you have then a nested vector  or, if v is a  DualVector / row vector , a matrix.>k Sanity-check  a vector. This typically amounts to detecting any NaN components, which should trigger a Nothing) result. Otherwise, the result should be Just` the input, but may also be optimised / memoised if applicable (i.e. for function spaces).HInfix version of 8.IAThe dual operation to the tuple constructor, or rather to the  fanout operation: evaluate two (linear) functions in parallel and sum up the results. The typical use is to concatenate row vectors  in a matrix definition.JASCII version of '"'@((v'"w)+>x) -> ((v+>w)+>x) ((v+>w)+>x) -> ((v'"w)+>x) (u+>(v"w)) -> (u+>v)"w (u+>v)"w -> u+>(v"w) ((u+>v)+>w) -> u"(v+>w) (u"(v+>w)) -> (u+>v)+>w ((u"v)+>w) -> (u+>(v+>w)) (u+>(v+>w)) -> ((u"v)+>w)KJUse a function as a linear map. This is only well-defined if the function is+ linear (this condition is not checked).  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKW  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKR  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKHIJ(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone&*345:>FKLN3LMNOPQRS      !"#$%&' LMNOPQRS1LMNOPQRS      !"#$%&'P(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone&*345:>FIKLNUYYWhereas (4-values refer to a single basis vector, a single Y} value represents a collection of such basis vectors, which can be used to associate a vector with a list of coefficients.*For spaces with a canonical finite basis, Y does not actually need to contain any information, it can simply have the full finite basis as its only value. Even for large sparse spaces, it should only have a very coarse structure that can be shared by many vectors.]BSplit up a linear map in column vectors  WRT some suitable basis.^cExpand in the given basis, if possible. Else yield a superbasis of the given one, in which this is) possible, and the decomposition therein._RAssemble a vector from coefficients in some basis. Return any excess coefficients.bGiven a function that interprets a coefficient-container as a vector representation, build a linear function mapping to that space.dThe existance of a finite basis gives us an isomorphism between a space and its dual space. Note that this isomorphism is not natural (i.e. it depends on the actual choice of basis, unlike everything else in this library).ff is the class of vector spaces with finite subspaces in which you can define a basis that can be used to project from the whole space into the subspace. The usual application is for using a kind of  -https://en.wikipedia.org/wiki/Galerkin_methodGalerkin method) to give an approximate solution (see mC) to a linear equation in a possibly infinite-dimensional space.VOf course, this also works for spaces which are already finite-dimensional themselves.gLazily enumerate choices of a basis of functionals that can be made dual to the given vectors, in order of preference (which roughly means, large in the normal direction.) I.e., if the vector c) is assigned early to the dual vector c', then (c' $ c)@ should be large and all the other products comparably small.The purpose is that we should be able to make this basis orthonormal with a ~Gaussian-elimination approach, in a way that stays numerically stable. This is otherwise known as the choice of a pivot element.XFor simple finite-dimensional array-vectors, you can easily define this method using k.m=Inverse function application, aka solving of a linear system: f m f ) v "a v f ) f m u "a u If f does not have full rank, the behaviour is undefined. However, it does not need to be a proper isomorphism: the first of the above equations is still fulfilled if only f is  injective2 (overdetermined system) and the second if it is  surjective.pIf you want to solve for multiple RHS vectors, be sure to partially apply this operator to the linear map, like map (f m) [v , v , ...] fSince most of the work is actually done in triangularising the operator, this may be much faster than [f m v , f m v , ...] *If f is injective, then unsafeLeftInverse f . f "a id +If f is surjective, then  f . unsafeRightInverse f "a id ,FInvert an isomorphism. For other linear maps, the result is undefined.oThe  :https://en.wikipedia.org/wiki/Riesz_representation_theoremRiesz representation theoremT provides an isomorphism between a Hilbert space and its (continuous) dual space.qtFunctions are generally a pain to display, but since linear functionals in a Hilbert space can be represented by vectors7 in that space, this can be used for implementing a - instance.rOuter product of a general v!-vector and a basis element from w~. Note that this operation is in general pretty inefficient; it is provided mostly to lay out matrix definitions neatly.t&For real matrices, this boils down to .@. For free complex spaces it also incurs complex conjugation.'The signature can also be understood as 6adjoint :: (v +> w) -> (DualVector w +> DualVector v) Or 6adjoint :: (DualVector v +> DualVector w) -> (w +> v) But not (v+>w) -> (w+>v)F, in general (though in a Hilbert space, this too is equivalent, via o isomorphism).TUVW/0123XYZ[\]^_`abcde4fghij56789:;<=>?k#Set of canonical basis functionals.Decompose a vector in absolute valueV components. the list indices should correspond to those in the functional list.Suitable definition of g.@ABlCDEFmn*+,oGpqrHsIJtKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ATUVW/0123XYZ[\]^_`abcde4fghij56789:;<=>?k@ABlCDEFmn*+,oGpqrHsIJtK_TUVW/0123X YZ[\]^_`abcde4fghijk@ABlCDEFmn*+,oGpqrHsIJtKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrts5vu6xw7zy8|{9~}:;<=>?Cmrs(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone !"&*134579:>FIKLNZuvwuvwuvwuvwuvw(c) Justus Sagemller 2016GPL v3"(@) sagemueller $ geo.uni-koeln.de experimentalportableNone&*345:>FKLN#{The estimated eigenvalue .|Normalised vector v( that gets mapped to a multiple, namely:}f $ v "a  *^ v .~ Deviation of v to (f$v)^/). Ideally, this would of course be equal.Squared norm of the deviation.&A multidimensional variance of points ve with some distribution can be considered a norm on the dual space, quantifying for a dual vector dv the expectation value of (dv .^v)^2.1A norm  that may explicitly be degenerate, with  m|$|v *u 0 for some  v "` zeroV.KA positive (semi)definite symmetric bilinear form. This gives rise to a  0https://en.wikipedia.org/wiki/Norm_(mathematics)norm thus:   n  v = "(n v P v) `Strictly speaking, this type is neither strong enough nor general enough to deserve the name : it includes proper s (i.e.  m|$|v "a 0 does not guarantee  v == zeroV), but not actual norms such as the ! -norm on !  (Taxcab norm) or the supremum norm. However, ? -like norms are the only ones that can really be formulated without any basis reference; and guaranteeing positive definiteness through the type system is scarcely practical.8A linear map that simply projects from a dual vector in u to a vector in v. (du  v) u "a v  (du P u) A seminorm defined by  v  = "("b 'db|v') for some dual vectors dbH. If given a complete basis of the dual space, this generates a proper .If the db0 are a complete orthonormal system, you get the  (in an inefficient form).UModify a norm in such a way that the given vectors lie within its unit ball. (Not  optimally/  the unit ball may be bigger than necessary.)AScale the result of a norm with the absolute of the given number. &scaleNorm  n |$| v = abs  * (n|$|v) PEquivalently, this scales the norm's unit ball by the reciprocal of that factor.GThe canonical standard norm (2-norm) on inner-product / Hilbert spaces.|The norm induced from the (arbitrary) choice of basis in a finite space. Only use this in contexts where you merely need someE norm, but don't care if it might be biased in some unnatural way.A proper norm induces a norm on the dual space  the reciprocal norm . (The orthonormal systems of the norm and its dual are mutually conjugate.) The dual norm of a seminorm is undefined.D in the opposite direction. This is actually self-inverse; with / you can replace each with the other direction.NThe unique positive number whose norm is 1 (if the norm is not constant zero).Unsafe version of C, only works reliable if the norm is actually positive definite. Partially apply  a norm, yielding a dual vector (i.e. a linear form that accepts the second argument of the scalar product). (  v) P w "a v  w  See also .&The squared norm. More efficient than / because that needs to take the square root.Use a * to measure the length / norm of a vector.  |$| v "a "(v  v) Flipped, ket  version of . v P (w |&> ) "a v  w  /  are inefficient if the number of vectors is similar to the dimension of the space, or even larger than it. Use this function to optimise the underlying operator to a dense matrix representation.Like C, but also perform a sanity check  to eliminate NaN etc. problems.Lazily compute the eigenbasis of a linear map. The algorithm is essentially a hybrid of Lanczos/Arnoldi style Krylov-spanning and QR-diagonalisation, which we don't do separately but  interleave at each step.The size of the eigen-subbasis increases with each step until the space's dimension is reached. (But the algorithm can also be used for infinite-dimensional spaces.)Find a system of vectors that approximate the eigensytem, in the sense that: each true eigenvalue is represented by an approximate one, and that is closer to the true value than all the other approximate EVs.iThis function does not make any guarantees as to how well a single eigenvalue is approximated, though.qSimple automatic finding of the eigenvalues and -vectors of a Hermitian operator, in reasonable approximation.9This works by spanning a QR-stabilised Krylov basis with  until it is complete (3), and then properly decoupling the system with 7 (based on two iterations of shifted Givens rotations).=This function is a tradeoff in performance vs. accuracy. Use  and j directly for more quickly computing a (perhaps incomplete) approximation, or for more precise results.!Approximation of the determinant. Inverse of . Equivalent to  on the dual space.bFor any two norms, one can find a system of co-vectors that, with suitable coefficients, spans either of them: if &shSys = sharedNormSpanningSystem n n  , then n =  $ fst $shSys and n =  [dv^* | (dv,)<-shSys] A rather crude approximation (^) is used in this function, so do not expect the above equations to hold with great accuracy.2Like 'sharedNormSpanningSystem n n ', but allows either of the norms to be singular. n =  [dv | (dv, Just _)<-shSys] and n = Q $ [dv^* | (dv, Just )<-shSys] ++ [ dv | (dv, Nothing)<-shSys] You may also interpret a NothingQ here as an infinite eigenvalue , i.e. it is so small as an spanning vector of n > that you would need to scale it by " to use it for spanning n .rA system of vectors which are orthogonal with respect to both of the given seminorms. (In general they are not  orthonormal to either of them.)cInterpret a variance as a covariance between two subspaces, and normalise it by the variance on u. The result is effectively the linear regression coefficient of a simple regression of the vectors spanning the variance. mempty|$|v "a 0 $(m<>n|$|v)^2 *u (m|$|v)^2 + (n|$|v)^2?xyz{|}~The notion of orthonormality.+Error bound for deviations from eigen-ness.uOperator to calculate the eigensystem of. Must be Hermitian WRT the scalar product defined by the given metric.(Starting vector(s) for the power method.]Infinite sequence of ever more accurate approximations to the eigensystem of the operator.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstxyz{|}~KIJtPHMNOQRLSmnyz{|}~-./0123456789:;<=>? !"#$%&'()*fghijklXYZ[\]^_`abcde s opqrWTDE VUxFGBC+,@A4xyz{|}~     !"#$%&'()*+,-./01223456789:;<=>?@ABCDEFFGGHIJJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{{|}~      !"#$%&'()*+,-./01234256789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~linea_3ZD48rFUtUTJYnxc7RLZFv Math.VectorSpace.ZeroDimensionalMath.LinearMap.Category#Math.LinearMap.Category.DerivativesMath.LinearMap.Asserted LinearMapMath.LinearMap.Category.Class!Math.LinearMap.Category.InstancesMath.VectorSpace.Docilemanif_3Jkgn7WUV06A5tugzGzLQM)Math.Manifold.VectorSpace.ZeroDimensionalOriginZeroDimBilinear-+>LinearFunctiongetLinearFunctionaddVbilinearFunction flipBilinscaleinner Fractional' DualSpaceLSpace⊗+>TensorgetTensorProduct getLinearMap LinearSpace DualVectordualSpaceWitnesslinearIdidTensorsampleLinearFunction toLinearFormfromLinearFormcoerceDoubleDualtracecontractTensorMapcontractMapTensorcontractTensorFncontractLinearMapAgainstapplyDualVector applyLinear composeLineartensorIdapplyTensorFunctionalapplyTensorLinMapDualSpaceWitness TensorSpace TensorProductscalarSpaceWitnesslinearManifoldWitness zeroTensor toFlatTensorfromFlatTensor addTensorssubtractTensors scaleTensor negateTensor tensorProducttensorProductstransposeTensor fmapTensorfzipTensorWithcoerceFmapTensorProductwellDefinedVectorwellDefinedTensorLinearManifoldWitnessScalarSpaceWitnessNum'closedScalarWitnessClosedScalarWitness⊕>+<lfun⊗〃+>SymmetricTensor SymTensorgetSymmetricTensor<.>^squareVsquareVs currySymBilin SimpleSpace RealFloat' RealFrac' HilbertSpaceFiniteDimensionalSubBasis entireBasisenumerateSubBasissubbasisDimensiondecomposeLinMapdecomposeLinMapWithin recomposeSBrecomposeSBTensorrecomposeLinMaprecomposeContraLinMaprecomposeContraLinMapTensoruncanonicallyFromDualuncanonicallyToDual SemiInnerdualBasisCandidatestensorDualBasisCandidatessymTensorDualBasisCandidates"symTensorTensorDualBasisCandidatescartesianDualBasisCandidatesembedFreeSubspace\$ pseudoInverserieszcoRieszshowsPrecAsRiesz.<.⊗adjoint/∂*∂.∂LinearShowable Eigenvector ev_Eigenvalueev_Eigenvectorev_FunctionApplied ev_Deviation ev_BadnessVarianceSeminormNorm applyNorm-+|>spanNorm spanVariance relaxNorm scaleNorm euclideanNormdualNorm dualNorm' transformNormtransformVariancefindNormalLength normalLength<$|normSq|$||&> densifyNormwellDefinedNormconstructEigenSystemfinishEigenSystemroughEigenSystemeigenroughDetnormSpanningSystemnormSpanningSystem'varianceSpanningSystemsharedNormSpanningSystemsharedSeminormSpanningSystemsharedSeminormSpanningSystem' dependencesummandSpaceNormssumSubspaceNormsconvexPolytopeHullconvexPolytopeRepresentativeslinearRegressionWlinearRegressionWVarvecto_B7ERKFLj74s9E6QjxzRZ7QData.VectorSpace VectorSpaceconst_JlnGQ9MtL15FsXZE3KrcUiControl.Arrow.ConstrainedarrelacslinearFunction scaleWithscaleVconst0lNegateV fmapScalelCoFstlCoSndbiConst0lApply-+$>'$fFunctorLinearFunctionCoercionCoercion$fPseudoAffineLinearFunction$fSemimanifoldLinearFunction$fVectorSpaceLinearFunction$fAdditiveGroupLinearFunction&&& argFromTensor argAsTensordeferLinearMaphasteLinearMapcoCurryLinearMapcoUncurryLinearMapcurryLinearMapuncurryLinearMap fmapLinearMapasTensor fromTensor asLinearMap fromLinearMap<⊕ lfstBlock lsndBlock lassocTensor rassocTensoruncurryLinearFnsampleLinearFunctionFn fromLinearFn asLinearFnexposeLinearFn$fAffineSpaceLinearFunction$fAffineSpaceLinearMap$fAffineSpaceTensor$fLinearSpaceLinearFunction$fTensorSpaceLinearFunction3$fFunctorLinearFunctionLinearFunctionLinearFunction#$fEnhancedCatLinearFunctionCoercion$fEnhancedCat(->)LinearFunction$fPreArrowLinearFunction$fMorphismLinearFunction$fCartesianLinearFunction$fCategoryLinearFunction"$fFunctorLinearMapCoercionCoercion$fFunctorTensorCoercionCoercion/$fMonoidalLinearMapLinearFunctionLinearFunction.$fFunctorLinearMapLinearFunctionLinearFunction,$fMonoidalTensorLinearFunctionLinearFunction+$fFunctorTensorLinearFunctionLinearFunction$fLinearSpaceTensor$fTensorSpaceTensor$fLinearSpaceLinearMap$fTensorSpaceLinearMap$fLinearSpace(,)$fTensorSpace(,)$$fEnhancedCatLinearMapLinearFunction$$fEnhancedCatLinearFunctionLinearMap$fEnhancedCat(->)LinearMap$fPreArrowLinearMap$fMorphismLinearMap$fCartesianLinearMap$fCategoryLinearMap$fPseudoAffineTensor$fSemimanifoldTensor$fVectorSpaceTensor$fAdditiveGroupTensor$fPseudoAffineLinearMap$fSemimanifoldLinearMap$fVectorSpaceLinearMap$fAdditiveGroupLinearMap$fLinearSpaceZeroDim$fTensorSpaceZeroDimℝ$fLinearSpaceSymmetricTensor$fTensorSpaceSymmetricTensor$fPseudoAffineSymmetricTensor$fSemimanifoldSymmetricTensor$fVectorSpaceSymmetricTensor$fAdditiveGroupSymmetricTensor$fAffineSpaceSymmetricTensor$fIsListTensor$fIsListTensor0$fLinearSpaceFinSuppSeq$fLinearSpaceGSequence$fTensorSpaceGSequence$fPseudoAffineGSequence$fSemimanifoldGSequence$fTensorSpaceFinSuppSeq$fPseudoAffineFinSuppSeq$fSemimanifoldFinSuppSeq$fFractionalLinearMap$fNumLinearMap$fLinearSpaceV4$fTensorSpaceV4$fPseudoAffineV4$fSemimanifoldV4$fLinearSpaceV3$fTensorSpaceV3$fPseudoAffineV3$fSemimanifoldV3$fLinearSpaceV2$fTensorSpaceV2$fPseudoAffineV2$fSemimanifoldV2$fLinearSpaceV1$fTensorSpaceV1$fPseudoAffineV1$fSemimanifoldV1$fLinearSpaceV0$fTensorSpaceV0$fPseudoAffineV0$fSemimanifoldV0$fLinearSpaceDouble$fTensorSpaceDouble $fNum'Double Data.BasisBasis$unsafeLeftInverseunsafeRightInverse unsafeInversebaseGHC.ShowShow Data.OldList transposeTensorDecomposabletensorDecompositionshowsPrecBasisRieszDecomposablerieszDecompositionDList LinMapBasis SymTensBasis TensorBasis TupleBasisV4BasisV3BasisV2BasisV1Basis RealsBasisV0Basis ZeroBasisorthonormaliseDuals dualBasis zipTravWith⊗<$>^/^recomposeMultiple tensorLinmapDecompositionhelperssRieszrieszDecomposeShowsPrectensorDecomposeShowsPrec^ multiSplit$fFiniteFreeSpaceLinearFunction$fFiniteFreeSpaceTensor$fFiniteFreeSpaceLinearMap $fShowTensor $fShowTensor0 $fShowTensor1 $fShowTensor2 $fShowTensor3 $fShowTensor4$fTensorDecomposableV4$fTensorDecomposableV3$fTensorDecomposableV2$fTensorDecomposableV1$fTensorDecomposableV0$fTensorDecomposableZeroDim$fTensorDecomposable(,)$fTensorDecomposableDouble$fShowLinearMap$fShowLinearMap0$fShowLinearMap1$fShowLinearMap2$fShowLinearMap3$fShowLinearMap4$fShowLinearMap5$fRieszDecomposableV4$fRieszDecomposableV3$fRieszDecomposableV2$fRieszDecomposableV1$fRieszDecomposableV0$fRieszDecomposableZeroDim$fRieszDecomposable(,)$fRieszDecomposableDouble$fShowLinearMap6$fShowLinearMap7$fShowLinearMap8$fShowLinearMap9$fShowLinearMap10$fShowLinearMap11$fShowLinearMap12TFCo:R:SubBasisLinearMap$fFiniteDimensionalLinearMapTFCo:R:SubBasisSymmetricTensor"$fFiniteDimensionalSymmetricTensorTFCo:R:SubBasisTensor$fFiniteDimensionalTensorTFCo:R:SubBasis(,)$fFiniteDimensional(,)TFCo:R:SubBasisV4$fFiniteDimensionalV4TFCo:R:SubBasisV3$fFiniteDimensionalV3TFCo:R:SubBasisV2$fFiniteDimensionalV2TFCo:R:SubBasisV1$fFiniteDimensionalV1TFCo:R:SubBasisDouble$fFiniteDimensionalDoubleTFCo:R:SubBasisV0$fFiniteDimensionalV0TFCo:R:SubBasisZeroDim$fFiniteDimensionalZeroDim$fSemiInnerLinearMap$fSemiInnerSymmetricTensor$fSemiInnerTensor$fSemiInner(,) $fSemiInnerV4 $fSemiInnerV3 $fSemiInnerV2 $fSemiInnerV1$fSemiInnerDouble $fSemiInnerV0$fSemiInnerZeroDim^* adhocNorm<.> $fMonoidNorm$fSemigroupNormOrthonormalSystemorthonormalityNormorthonormalVectors^%orthonormaliseFussilyorthogonalComplementProj'orthogonalComplementProjorthonormalityErrorsharedNormSpanningSystem' $fShowNorm