11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.6 Interfaces and Implementations • 127expression sequence of length two, whose first member is a unit, and whosesecond member is the unit normal form of its argument. The product ofthe output values yields the input ring element. The other methods onlyinvoke the corresponding built-in Maple operations.> type( MapleIntegers, ’Ring’ );true> type( MapleIntegers, ’GcdRing’ );trueAn Interface for Fields The quotient field constructor produces a field.An interface that describes fields differs from the one for integral domainsby the absence of a gcd method (since they are trivial) and the addition ofthe (unary) / operator that computes inverses. The methods rem and quoare also not included in the signature for fields, because they are trivialin a field. Two new methods are included:• make for constructing field elements from their numerators and denominators• embed, the natural embedding of the integral domain D into its fieldk of fractions.Additionally, the two methods numer and denom allow the user to extractthe components of a fraction.> ‘type/Field‘ := ’‘module‘(> ‘+‘::procedure,> ‘*‘::procedure,> ‘-‘::procedure,> ‘/‘::procedure,> normal::procedure,> iszero::procedure,> isone::procedure,> zero, one,> make::procedure,> embed::procedure,> numer::procedure,> denom::procedure> )’:Naturally, the ring Z of integers is not a field.> type( MapleIntegers, ’Field’ );

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!