11.07.2015 Views

Advanced Programming Guide

Advanced Programming Guide

Advanced Programming Guide

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

124 • Chapter 3: <strong>Programming</strong> with Modules⎡ ⎤0 1 1⎣ 0 0 1 ⎦0 0 0> AdjacencyMatrix( g2 );⎡ ⎤0 1 1⎣ 0 0 1 ⎦0 0 0Quotient FieldsAs an example of generic programming, a generic quotient field (or fieldof fractions) construction algorithm is discussed.Mathematical Description Given an integral domain D, its quotientfield is (up to isomorphism) the unique field k, paired with a nonzero ringhomomorphism η : D −→ k, with the property that, for any nonzero ringhomomorphism ϕ : D −→ F , in which F is a field, there is a unique ringhomomorphism σ for which the diagramkσηFDϕcommutes. Because a nonzero ring homomorphism into a field must beinjective, this says that every field F that contains D as a subring mustalso contain an isomorphic copy of k.Concretely, the quotient field of an integral domain D can be thoughtof as the set of “reduced fractions” n/d, with n, d ∈ D. A formal constructioncan be produced by defining an equivalence relation on the setD × (D \ {0}), according to which two pairs (n1, d1) and (n2, d2) areequivalent only if,n1 · d2 = n2 · d1.A representative from each equivalence class is chosen to represent thefield element defined by that class. This understanding guides the computerrepresentation of the quotient field.

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

Saved successfully!

Ooh no, something went wrong!