sigma-ij-0.2.0.2: Thom polynomials of second order Thom-Boardman singularities

Math.FreeModule.Class

Description

Class interface to different free module implementations.

Free modules are like maps from a base type to a numeric type, with the additional invariant that the values are never zero.

Synopsis

# Documentation

baseMap :: (FreeModule x, FreeModule y, Coeff x ~ Coeff y) => (Base x -> Base y) -> x -> y Source #

generic baseMap implementation, converts to list and back.

coeffMap :: (FreeModule x, FreeModule y, Base x ~ Base y) => (Coeff x -> Coeff y) -> x -> y Source #

generic coeffMap implementation, converts to list and back.

class (Ord (Base a), Eq (Coeff a), Num (Coeff a)) => FreeModule a where Source #

Minimal complete definition

Associated Types

type Base a :: * Source #

type Coeff a :: * Source #

Methods

isZero :: a -> Bool Source #

zero :: a Source #

fromBase :: Base a -> a Source #

fromTerm :: Base a -> Coeff a -> a Source #

(^+^) :: a -> a -> a infixl 6 Source #

(^-^) :: a -> a -> a infixl 6 Source #

neg :: a -> a Source #

scalarMul :: Coeff a -> a -> a Source #

unionWith :: (Coeff a -> Coeff a -> Coeff a) -> a -> a -> a Source #

We should call the function even when the given base is present only in one of the arguments! So that unionWith (-) works correctly.

coeff :: Base a -> a -> Coeff a Source #

size :: a -> Int Source #

minTerm :: a -> (Base a, Coeff a) Source #

maxTerm :: a -> (Base a, Coeff a) Source #

split :: a -> (a, a) Source #

split into two approximately equal parts x and y, such that maxTerm x < minTerm y

unsafeJoin :: a -> a -> a Source #

we assume that maxTerm x < minTerm y

toList :: a -> [(Base a, Coeff a)] Source #

fromList :: [(Base a, Coeff a)] -> a Source #

fromAscendingList :: [(Base a, Coeff a)] -> a Source #

Instances

 (Ord b, Eq c, Num c) => FreeModule (FreeMod b c) Source # Associated Typestype Base (FreeMod b c) :: * Source #type Coeff (FreeMod b c) :: * Source # MethodsisZero :: FreeMod b c -> Bool Source #zero :: FreeMod b c Source #fromBase :: Base (FreeMod b c) -> FreeMod b c Source #fromTerm :: Base (FreeMod b c) -> Coeff (FreeMod b c) -> FreeMod b c Source #(^+^) :: FreeMod b c -> FreeMod b c -> FreeMod b c Source #(^-^) :: FreeMod b c -> FreeMod b c -> FreeMod b c Source #neg :: FreeMod b c -> FreeMod b c Source #scalarMul :: Coeff (FreeMod b c) -> FreeMod b c -> FreeMod b c Source #unionWith :: (Coeff (FreeMod b c) -> Coeff (FreeMod b c) -> Coeff (FreeMod b c)) -> FreeMod b c -> FreeMod b c -> FreeMod b c Source #coeff :: Base (FreeMod b c) -> FreeMod b c -> Coeff (FreeMod b c) Source #size :: FreeMod b c -> Int Source #minTerm :: FreeMod b c -> (Base (FreeMod b c), Coeff (FreeMod b c)) Source #maxTerm :: FreeMod b c -> (Base (FreeMod b c), Coeff (FreeMod b c)) Source #split :: FreeMod b c -> (FreeMod b c, FreeMod b c) Source #unsafeJoin :: FreeMod b c -> FreeMod b c -> FreeMod b c Source #toList :: FreeMod b c -> [(Base (FreeMod b c), Coeff (FreeMod b c))] Source #fromList :: [(Base (FreeMod b c), Coeff (FreeMod b c))] -> FreeMod b c Source #fromAscendingList :: [(Base (FreeMod b c), Coeff (FreeMod b c))] -> FreeMod b c Source #

(*^) :: FreeModule a => Coeff a -> a -> a infixl 7 Source #

(^*) :: FreeModule a => a -> Coeff a -> a infixl 7 Source #

lookupTerm :: FreeModule a => Base a -> a -> Maybe (Base a, Coeff a) Source #