algebra-4.3: Constructive abstract algebra

Numeric.Algebra.Quaternion

Synopsis

Documentation

class Distinguished t where Source #

Minimal complete definition

e

Methods

e :: t Source #

Instances

 Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Source # Methods Rig r => Distinguished (Complex r) Source # Methods Rig r => Distinguished (Dual r) Source # Methodse :: Dual r Source # Rig r => Distinguished (Quaternion r) Source # Methods Rig r => Distinguished (Dual' r) Source # Methods Rig r => Distinguished (Quaternion' r) Source # Methods Rig r => Distinguished (Trig r) Source # Methodse :: Trig r Source # Rig r => Distinguished (ComplexBasis -> r) Source # Methodse :: ComplexBasis -> r Source # Rig r => Distinguished (DualBasis -> r) Source # Methodse :: DualBasis -> r Source # Rig r => Distinguished (QuaternionBasis -> r) Source # Methodse :: QuaternionBasis -> r Source # Rig r => Distinguished (DualBasis' -> r) Source # Methodse :: DualBasis' -> r Source # Rig r => Distinguished (QuaternionBasis' -> r) Source # Methodse :: QuaternionBasis' -> r Source # Rig r => Distinguished (TrigBasis -> r) Source # Methodse :: TrigBasis -> r Source # Distinguished a => Distinguished (Covector r a) Source # Methodse :: Covector r a Source #

class Distinguished r => Complicated r where Source #

Minimal complete definition

i

Methods

i :: r Source #

Instances

 Source # Methods Source # Methods Source # Methods Source # Methods Rig r => Complicated (Complex r) Source # Methods Rig r => Complicated (Quaternion r) Source # Methods Rig r => Complicated (Quaternion' r) Source # Methods Rig r => Complicated (Trig r) Source # Methodsi :: Trig r Source # Rig r => Complicated (ComplexBasis -> r) Source # Methodsi :: ComplexBasis -> r Source # Rig r => Complicated (QuaternionBasis -> r) Source # Methodsi :: QuaternionBasis -> r Source # Rig r => Complicated (QuaternionBasis' -> r) Source # Methodsi :: QuaternionBasis' -> r Source # Rig r => Complicated (TrigBasis -> r) Source # Methodsi :: TrigBasis -> r Source # Complicated a => Complicated (Covector r a) Source # Methodsi :: Covector r a Source #

class Complicated t => Hamiltonian t where Source #

Minimal complete definition

j, k

Methods

j :: t Source #

k :: t Source #

Instances

 Source # Methods Source # Methods Rig r => Hamiltonian (Quaternion r) Source # Methods Rig r => Hamiltonian (Quaternion' r) Source # Methods Rig r => Hamiltonian (QuaternionBasis -> r) Source # Methodsj :: QuaternionBasis -> r Source #k :: QuaternionBasis -> r Source # Rig r => Hamiltonian (QuaternionBasis' -> r) Source # Methodsj :: QuaternionBasis' -> r Source #k :: QuaternionBasis' -> r Source # Hamiltonian a => Hamiltonian (Covector r a) Source # Methodsj :: Covector r a Source #k :: Covector r a Source #

Constructors

 E I J K

Instances

 Source # Methods Source # Methods Source # Methods Source # Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QuaternionBasis -> c QuaternionBasis #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c QuaternionBasis #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c QuaternionBasis) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c QuaternionBasis) #gmapT :: (forall b. Data b => b -> b) -> QuaternionBasis -> QuaternionBasis #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QuaternionBasis -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QuaternionBasis -> r #gmapQ :: (forall d. Data d => d -> u) -> QuaternionBasis -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> QuaternionBasis -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> QuaternionBasis -> m QuaternionBasis #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QuaternionBasis -> m QuaternionBasis #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QuaternionBasis -> m QuaternionBasis # Source # Methods Source # Methods Source # MethodsshowList :: [QuaternionBasis] -> ShowS # Source # Methods Source # Methods Source # Methods Source # Methods Source # Methodslocal :: (QuaternionBasis -> QuaternionBasis) -> Quaternion a -> Quaternion a #reader :: (QuaternionBasis -> a) -> Quaternion a # Source # the trivial diagonal coalgebra Methodscomult :: (QuaternionBasis -> r) -> QuaternionBasis -> QuaternionBasis -> r Source # Source # the quaternion algebra Methodsmult :: (QuaternionBasis -> QuaternionBasis -> r) -> QuaternionBasis -> r Source # Source # Source # Methodscounit :: (QuaternionBasis -> r) -> r Source # Source # Methodsunit :: r -> QuaternionBasis -> r Source # Source # Methodsantipode :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source # Source # Methodscoinv :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source # Source # Methodsinv :: (QuaternionBasis -> r) -> QuaternionBasis -> r Source # Rig r => Distinguished (QuaternionBasis -> r) Source # Methodse :: QuaternionBasis -> r Source # Rig r => Complicated (QuaternionBasis -> r) Source # Methodsi :: QuaternionBasis -> r Source # Rig r => Hamiltonian (QuaternionBasis -> r) Source # Methodsj :: QuaternionBasis -> r Source #k :: QuaternionBasis -> r Source #

data Quaternion a Source #

Constructors

 Quaternion a a a a

Instances

 Source # Methods(>>=) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #(>>) :: Quaternion a -> Quaternion b -> Quaternion b #return :: a -> Quaternion a # Source # Methodsfmap :: (a -> b) -> Quaternion a -> Quaternion b #(<\$) :: a -> Quaternion b -> Quaternion a # Source # Methodspure :: a -> Quaternion a #(<*>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #(*>) :: Quaternion a -> Quaternion b -> Quaternion b #(<*) :: Quaternion a -> Quaternion b -> Quaternion a # Source # Methodsfold :: Monoid m => Quaternion m -> m #foldMap :: Monoid m => (a -> m) -> Quaternion a -> m #foldr :: (a -> b -> b) -> b -> Quaternion a -> b #foldr' :: (a -> b -> b) -> b -> Quaternion a -> b #foldl :: (b -> a -> b) -> b -> Quaternion a -> b #foldl' :: (b -> a -> b) -> b -> Quaternion a -> b #foldr1 :: (a -> a -> a) -> Quaternion a -> a #foldl1 :: (a -> a -> a) -> Quaternion a -> a #toList :: Quaternion a -> [a] #null :: Quaternion a -> Bool #length :: Quaternion a -> Int #elem :: Eq a => a -> Quaternion a -> Bool #maximum :: Ord a => Quaternion a -> a #minimum :: Ord a => Quaternion a -> a #sum :: Num a => Quaternion a -> a #product :: Num a => Quaternion a -> a # Source # Methodstraverse :: Applicative f => (a -> f b) -> Quaternion a -> f (Quaternion b) #sequenceA :: Applicative f => Quaternion (f a) -> f (Quaternion a) #mapM :: Monad m => (a -> m b) -> Quaternion a -> m (Quaternion b) #sequence :: Monad m => Quaternion (m a) -> m (Quaternion a) # Source # Methodsdistribute :: Functor f => f (Quaternion a) -> Quaternion (f a) #collect :: Functor f => (a -> Quaternion b) -> f a -> Quaternion (f b) #distributeM :: Monad m => m (Quaternion a) -> Quaternion (m a) #collectM :: Monad m => (a -> Quaternion b) -> m a -> Quaternion (m b) # Source # Associated Typestype Rep (Quaternion :: * -> *) :: * # Methodstabulate :: (Rep Quaternion -> a) -> Quaternion a #index :: Quaternion a -> Rep Quaternion -> a # Source # Methodstraverse1 :: Apply f => (a -> f b) -> Quaternion a -> f (Quaternion b) #sequence1 :: Apply f => Quaternion (f b) -> f (Quaternion b) # Source # Methods(<.>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #(.>) :: Quaternion a -> Quaternion b -> Quaternion b #(<.) :: Quaternion a -> Quaternion b -> Quaternion a # Source # Methods(>>-) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #join :: Quaternion (Quaternion a) -> Quaternion a # Source # Methodsfold1 :: Semigroup m => Quaternion m -> m #foldMap1 :: Semigroup m => (a -> m) -> Quaternion a -> m # Source # Methodslocal :: (QuaternionBasis -> QuaternionBasis) -> Quaternion a -> Quaternion a #reader :: (QuaternionBasis -> a) -> Quaternion a # RightModule r s => RightModule r (Quaternion s) Source # Methods(*.) :: Quaternion s -> r -> Quaternion s Source # LeftModule r s => LeftModule r (Quaternion s) Source # Methods(.*) :: r -> Quaternion s -> Quaternion s Source # (TriviallyInvolutive r, Rng r) => Quadrance r (Quaternion r) Source # Methodsquadrance :: Quaternion r -> r Source # Eq a => Eq (Quaternion a) Source # Methods(==) :: Quaternion a -> Quaternion a -> Bool #(/=) :: Quaternion a -> Quaternion a -> Bool # Data a => Data (Quaternion a) Source # Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Quaternion a -> c (Quaternion a) #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Quaternion a) #dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Quaternion a)) #dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Quaternion a)) #gmapT :: (forall b. Data b => b -> b) -> Quaternion a -> Quaternion a #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #gmapQ :: (forall d. Data d => d -> u) -> Quaternion a -> [u] #gmapQi :: Int -> (forall d. Data d => d -> u) -> Quaternion a -> u #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) # Read a => Read (Quaternion a) Source # MethodsreadsPrec :: Int -> ReadS (Quaternion a) # Show a => Show (Quaternion a) Source # MethodsshowsPrec :: Int -> Quaternion a -> ShowS #show :: Quaternion a -> String #showList :: [Quaternion a] -> ShowS # Source # Abelian r => Abelian (Quaternion r) Source # Source # MethodspartitionWith :: (Quaternion r -> Quaternion r -> r) -> Quaternion r -> NonEmpty r Source # Additive r => Additive (Quaternion r) Source # Methods(+) :: Quaternion r -> Quaternion r -> Quaternion r Source #sumWith1 :: Foldable1 f => (a -> Quaternion r) -> f a -> Quaternion r Source # Monoidal r => Monoidal (Quaternion r) Source # MethodssumWith :: Foldable f => (a -> Quaternion r) -> f a -> Quaternion r Source # (TriviallyInvolutive r, Rng r) => Semiring (Quaternion r) Source # Source # Methods(*) :: Quaternion r -> Quaternion r -> Quaternion r Source #productWith1 :: Foldable1 f => (a -> Quaternion r) -> f a -> Quaternion r Source # Group r => Group (Quaternion r) Source # Methods(-) :: Quaternion r -> Quaternion r -> Quaternion r Source #times :: Integral n => n -> Quaternion r -> Quaternion r Source # (TriviallyInvolutive r, Ring r) => Unital (Quaternion r) Source # MethodsproductWith :: Foldable f => (a -> Quaternion r) -> f a -> Quaternion r Source # (TriviallyInvolutive r, Ring r, Division r) => Division (Quaternion r) Source # Methods(/) :: Quaternion r -> Quaternion r -> Quaternion r Source #(\\) :: Quaternion r -> Quaternion r -> Quaternion r Source #(^) :: Integral n => Quaternion r -> n -> Quaternion r Source # (TriviallyInvolutive r, Ring r) => Rig (Quaternion r) Source # Methods (TriviallyInvolutive r, Ring r) => Ring (Quaternion r) Source # Methods Source # Methods Rig r => Distinguished (Quaternion r) Source # Methods Rig r => Complicated (Quaternion r) Source # Methods Rig r => Hamiltonian (Quaternion r) Source # Methods (TriviallyInvolutive r, Rng r) => RightModule (Quaternion r) (Quaternion r) Source # Methods(*.) :: Quaternion r -> Quaternion r -> Quaternion r Source # (TriviallyInvolutive r, Rng r) => LeftModule (Quaternion r) (Quaternion r) Source # Methods(.*) :: Quaternion r -> Quaternion r -> Quaternion r Source # type Rep Quaternion Source #

complicate :: Complicated c => QuaternionBasis -> (c, c) Source #

Cayley-Dickson quaternion isomorphism (one way)

vectorPart :: (Representable f, Rep f ~ QuaternionBasis) => f r -> (r, r, r) Source #