algebra-4.3: Constructive abstract algebra

Numeric.Field.Fraction

Synopsis

# Documentation

data Fraction d Source #

Fraction field k(D) of GCDDomain domain D.

Instances

 Source # Methods(*.) :: Fraction d -> Integer -> Fraction d Source # Source # Methods(*.) :: Fraction d -> Natural -> Fraction d Source # Source # Methods(.*) :: Integer -> Fraction d -> Fraction d Source # Source # Methods(.*) :: Natural -> Fraction d -> Fraction d Source # (Eq d, GCDDomain d) => Eq (Fraction d) Source # Methods(==) :: Fraction d -> Fraction d -> Bool #(/=) :: Fraction d -> Fraction d -> Bool # (Ord d, GCDDomain d) => Ord (Fraction d) Source # Methodscompare :: Fraction d -> Fraction d -> Ordering #(<) :: Fraction d -> Fraction d -> Bool #(<=) :: Fraction d -> Fraction d -> Bool #(>) :: Fraction d -> Fraction d -> Bool #(>=) :: Fraction d -> Fraction d -> Bool #max :: Fraction d -> Fraction d -> Fraction d #min :: Fraction d -> Fraction d -> Fraction d # (Eq d, Show d, Unital d) => Show (Fraction d) Source # MethodsshowsPrec :: Int -> Fraction d -> ShowS #show :: Fraction d -> String #showList :: [Fraction d] -> ShowS # GCDDomain d => Abelian (Fraction d) Source # GCDDomain d => Additive (Fraction d) Source # Methods(+) :: Fraction d -> Fraction d -> Fraction d Source #sumWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d Source # GCDDomain d => Monoidal (Fraction d) Source # Methodssinnum :: Natural -> Fraction d -> Fraction d Source #sumWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d Source # GCDDomain d => Semiring (Fraction d) Source # Source # Methods(*) :: Fraction d -> Fraction d -> Fraction d Source #pow1p :: Fraction d -> Natural -> Fraction d Source #productWith1 :: Foldable1 f => (a -> Fraction d) -> f a -> Fraction d Source # GCDDomain d => Group (Fraction d) Source # Methods(-) :: Fraction d -> Fraction d -> Fraction d Source #subtract :: Fraction d -> Fraction d -> Fraction d Source #times :: Integral n => n -> Fraction d -> Fraction d Source # GCDDomain d => Unital (Fraction d) Source # Methodspow :: Fraction d -> Natural -> Fraction d Source #productWith :: Foldable f => (a -> Fraction d) -> f a -> Fraction d Source # GCDDomain d => Division (Fraction d) Source # Methodsrecip :: Fraction d -> Fraction d Source #(/) :: Fraction d -> Fraction d -> Fraction d Source #(\\) :: Fraction d -> Fraction d -> Fraction d Source #(^) :: Integral n => Fraction d -> n -> Fraction d Source # Source # MethodsisAssociate :: Fraction d -> Fraction d -> Bool Source # Source # Methods(^?) :: Integral n => Fraction d -> n -> Maybe (Fraction d) Source # Source # Methods GCDDomain d => Rig (Fraction d) Source # Methods Source # Methodschar :: proxy (Fraction d) -> Natural Source # GCDDomain d => Ring (Fraction d) Source # Methods Source # Source # MethodssplitUnit :: Fraction d -> (Fraction d, Fraction d) Source # GCDDomain d => Commutative (Fraction d) Source # GCDDomain d => Euclidean (Fraction d) Source # Methodsdivide :: Fraction d -> Fraction d -> (Fraction d, Fraction d) Source #quot :: Fraction d -> Fraction d -> Fraction d Source #rem :: Fraction d -> Fraction d -> Fraction d Source # GCDDomain d => PID (Fraction d) Source # Methodsegcd :: Fraction d -> Fraction d -> (Fraction d, Fraction d, Fraction d) Source # GCDDomain d => UFD (Fraction d) Source # GCDDomain d => GCDDomain (Fraction d) Source # Methodsgcd :: Fraction d -> Fraction d -> Fraction d Source #reduceFraction :: Fraction d -> Fraction d -> (Fraction d, Fraction d) Source #lcm :: Fraction d -> Fraction d -> Fraction d Source # Source # Methodsdivides :: Fraction d -> Fraction d -> Bool Source #maybeQuot :: Fraction d -> Fraction d -> Maybe (Fraction d) Source #

type Ratio = Fraction Source #

Convenient synonym for Fraction.

(%) :: GCDDomain d => d -> d -> Fraction d infixl 7 Source #