module Algebra.FieldOfRationalFunctions
( FieldOfRationalFunctions(..)
, QX, toQX, toQx
) where
import Test.QuickCheck
import Algebra.Structures.Field
import Algebra.Structures.FieldOfFractions
import Algebra.UPoly
import Algebra.Q
import Algebra.TypeChar.Char (X_)
type FieldOfRationalFunctions k x = FieldOfFractions (UPoly k x)
type QX = FieldOfRationalFunctions Q X_
toQX :: Qx -> QX
toQX = toFieldOfFractions
toQx :: QX -> Qx
toQx = fromFieldOfFractions
propFieldQX :: QX -> QX -> QX -> Property
propFieldQX = propField
instance (Show k, Field k, Num k, Show x) => Num (FieldOfRationalFunctions k x) where
(+) = (<+>)
() = (<->)
(*) = (<*>)
fromInteger x = toFieldOfFractions $ UP [fromInteger x]
signum = undefined
abs = undefined