Safe Haskell | None |
---|---|
Language | Haskell2010 |
Exterior monomials where the variable set
looks like {x_1, x_2, ... , x_N}
The internal representation is a bit vector
Synopsis
- newtype Ext (var :: Symbol) (n :: Nat) = Ext Integer
- data SgnExt (var :: Symbol) (n :: Nat) = SgnExt !Sign !(Ext var n)
- unExt :: Ext v n -> Integer
- extVar :: KnownSymbol var => Ext var n -> String
- nOfExt :: KnownNat n => Ext var n -> Int
- nOfMbExt :: KnownNat n => Maybe (Ext var n) -> Int
- nOfSgnExt :: KnownNat n => SgnExt var n -> Int
- nOfMbSgnExt :: KnownNat n => Maybe (SgnExt var n) -> Int
- emptyExt :: KnownNat n => Ext v n
- emptySgnExt :: KnownNat n => SgnExt v n
- isEmptyExt :: Ext v n -> Bool
- isNormalExt :: KnownNat n => Ext v n -> Bool
- extFromList :: KnownNat n => [Index] -> Maybe (SgnExt v n)
- extToList :: Ext v n -> [Index]
- extFromSet :: KnownNat n => Set Index -> Maybe (Ext v n)
- extToSet :: Ext v n -> Set Index
- variableExt :: KnownNat n => Index -> Ext v n
- mulExt :: KnownNat n => Ext v n -> Ext v n -> Maybe (SgnExt v n)
- mulExtCoeff :: (Num c, KnownNat n) => Ext v n -> Ext v n -> Maybe (Ext v n, c)
- mulSgnExt :: KnownNat n => SgnExt v n -> SgnExt v n -> Maybe (SgnExt v n)
- productExt :: (KnownNat n, Foldable f) => f (Ext v n) -> Maybe (SgnExt v n)
- v1 :: Ext "a" 7
- a :: SgnExt "a" 7
- b :: SgnExt "a" 7
- prop_graded_anticomm :: KnownNat n => Ext v n -> Ext v n -> Bool
- prop_graded_anticomm_sgn :: KnownNat n => SgnExt v n -> SgnExt v n -> Bool
- degreeExt :: Ext v n -> Int
- degreeSgnExt :: SgnExt v n -> Int
- newtype Permutation = Permutation (UArray Int Int)
- toPermutationUnsafe :: [Int] -> Permutation
- sortingPermutationAsc :: Ord a => [a] -> Permutation
- isEvenPermutation :: Permutation -> Bool
- numberOfInversionsMerge :: Permutation -> Int
Exterior monomials
newtype Ext (var :: Symbol) (n :: Nat) Source #
Exterior monomials of the variables x1,x2,...,xn
. The internal representation is
a bit vector encoded as an Integer
data SgnExt (var :: Symbol) (n :: Nat) Source #
Signed exterior monomial
Instances
Eq (SgnExt var n) Source # | |
Ord (SgnExt var n) Source # | |
Defined in Math.Algebra.Polynomial.Monomial.Exterior.Indexed | |
Show (SgnExt var n) Source # | |
KnownNat n => PartialMonoid (SgnExt var n) Source # | |
KnownSymbol var => Pretty (SgnExt var n) Source # | |
emptyness
emptySgnExt :: KnownNat n => SgnExt v n Source #
isEmptyExt :: Ext v n -> Bool Source #
normalization
conversion
creation
multiplication
degree
degreeSgnExt :: SgnExt v n -> Int Source #
Permutations
newtype Permutation Source #
Instances
Eq Permutation Source # | |
Defined in Math.Algebra.Polynomial.Monomial.Exterior.Indexed (==) :: Permutation -> Permutation -> Bool # (/=) :: Permutation -> Permutation -> Bool # | |
Ord Permutation Source # | |
Defined in Math.Algebra.Polynomial.Monomial.Exterior.Indexed compare :: Permutation -> Permutation -> Ordering # (<) :: Permutation -> Permutation -> Bool # (<=) :: Permutation -> Permutation -> Bool # (>) :: Permutation -> Permutation -> Bool # (>=) :: Permutation -> Permutation -> Bool # max :: Permutation -> Permutation -> Permutation # min :: Permutation -> Permutation -> Permutation # |
toPermutationUnsafe :: [Int] -> Permutation Source #
sortingPermutationAsc :: Ord a => [a] -> Permutation Source #
isEvenPermutation :: Permutation -> Bool Source #
numberOfInversionsMerge :: Permutation -> Int Source #
Returns the number of inversions, using the merge-sort algorithm.
This should be O(n*log(n))