This pacakge attempts to model the numeric hierachay found in abstract algebra.
These mathemtaical objects are defined as sets with accompanying closed binary operations that also, depending on the object, obey certain propetries such as assosiativity, commutivity, and distributative laws.
For example, the most elementary mathematical object is called a Magma and it is defined as a set with a closed binary operation. However, the binary operation associated with the Magma does Not have to conform to the assosiative property. Magma is the most elementary mathemtaical object and is used here only for illustrative purposes. It does not have much value in math or programming and so this library starts its hierarchy with the Semigroup.
+ A Set
+ Closed binary operation
+ Binary operation conforms to the associative property
+ Semigroup
+ Semigroup binary operation conforms to the commutative property
+ Semigroup
+ Identity value
+ Monoid
+ Monoid binary operation conforms to the commutative property
+ Monoid
+ Inverses
+ Group
+ Group binary operation conforms to the commutative property
+ Two Binary operations
+ Addition
+ CommutativeMonoid
+ Multiplication
+ Monoid
+ Two Binary operations
+ Addition
+ AbelianGroup
+ Multiplication
+ Monoid
+ Ring
+ Ring multiplication operation conforms to the commutative property
+ Ring
+ Ring multiplication is a Group
+ DivisionRing
+ Ring multiplication operation conforms to the commutative property
+ CommutativeDivisionRing
This library is used extensively in jonathanfishbein1/linear-algebra.
{-| Zero vector given a Field and dimension
-}
zeros : Monoid.Monoid a -> Int -> Vector a
zeros { identity } dim =
List.repeat dim identity
|> Vector