factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell98

Factory.Data.QuotientRing

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION

Synopsis

Type-classes

class Ring q => QuotientRing q where Source

Defines a sub-class of Ring, in which division is implemented.

Methods

quotRem' Source

Arguments

:: q 
-> q 
-> (q, q)

Divides the first operand by the second, to yield a pair composed from the quotient and the remainder.

Instances

(Eq c, Fractional c, Num e, Ord e) => QuotientRing (Polynomial c e)

Defines the ability to divide polynomials.

(Eq c, Num c, Num e, Ord e, Show c, Show e) => QuotientRing (MonicPolynomial c e) 

Functions

quot' Source

Arguments

:: QuotientRing q 
=> q

Numerator.

-> q

Denominator.

-> q 

Returns the quotient, after division of the two specified QuotientRings.

rem' Source

Arguments

:: QuotientRing q 
=> q

Numerator.

-> q

Denominator.

-> q 

Returns the remainder, after division of the two specified QuotientRings.

Predicates

areCongruentModulo Source

Arguments

:: (Eq q, QuotientRing q) 
=> q

LHS.

-> q

RHS.

-> q

Modulus.

-> Bool 

isDivisibleBy Source

Arguments

:: (Eq q, QuotientRing q) 
=> q

Numerator.

-> q

Denominator.

-> Bool 

True if the second operand divides the first.