1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
module Numeric.Band.Rectangular
( Rect(..)
) where
import Numeric.Algebra.Class
import Numeric.Algebra.Idempotent
import Data.Semigroupoid
-- | a rectangular band is a nowhere commutative semigroup.
-- That is to say, if ab = ba then a = b. From this it follows
-- classically that aa = a and that such a band is isomorphic
-- to the following structure
data Rect i j = Rect i j deriving (Eq,Ord,Show,Read)
instance Semigroupoid Rect where
Rect _ i `o` Rect j _ = Rect j i
instance Multiplicative (Rect i j) where
Rect i _ * Rect _ j = Rect i j
instance Band (Rect i j)
|