com.perisic.ring
Class UniversalCyclotomicField

java.lang.Object
  extended by com.perisic.ring.Ring
      extended by com.perisic.ring.UniversalRing
          extended by com.perisic.ring.UniversalCyclotomicField

public class UniversalCyclotomicField
extends UniversalRing

The infinite algebraic extension of Q which contains all unit roots.

Version:
0.2
Author:
Marc Conrad

Field Summary
 
Fields inherited from class com.perisic.ring.Ring
C, F2, Q, R, Z
 
Constructor Summary
UniversalCyclotomicField(java.lang.String unitRootPrefix)
          Construct the universal cyclotomic field by the prefix for the variable.
 
Method Summary
 Ring findRing()
          A suitable ring able to map 0 (and 1).
 Ring findRing(RingElt a)
          Returns the ring of the argument a if this a Cyclotomic field or Q.
 Ring findRing(RingElt a, RingElt b)
          Returns cyaclotomic field which contains both a and b.
 boolean isField()
          returns true, as this is a field.
static void main(java.lang.String[] args)
          This is for testing this class only.
 RingElt map(int n, java.lang.String str)
          maps the string str into the n-th cyclotomic field
 RingElt map(RingElt r)
          The following Rings are mapped: Cyclotomic fields, where the variable is of the form z* where z ist the preifx of the variable and * is a number; Polynomial rings and Quotient fields over Polynomial rings where the variables are of the form z*; the usual suspects (Z, Q).
 RingElt map(java.lang.String str)
          Strings denoting Rational functions (elements of Quotient fields of Polynomial rings) over variables of the form z* where z ist the preifx of the variable and * is a number; are mapped.
 java.lang.String toString()
           
 
Methods inherited from class com.perisic.ring.UniversalRing
add, ediv, equalZero, gcd, inv, mod, mult, neg, one, tdiv, zero
 
Methods inherited from class com.perisic.ring.Ring
div, eltToString, equal, evaluatePolynomial, isEuclidian, isUFD, map, map, map, pow, pow, sub
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UniversalCyclotomicField

public UniversalCyclotomicField(java.lang.String unitRootPrefix)
Construct the universal cyclotomic field by the prefix for the variable. That means, when the parameter is "z" the unit roots are denoted as z3, z5, z15, z24, etc. meaning a primitive third, fifth, 15th, 24th, etc. unit root. The relationship between the unitroots is znn/d=zd.

Method Detail

isField

public boolean isField()
returns true, as this is a field.

Overrides:
isField in class Ring

toString

public java.lang.String toString()
Overrides:
toString in class UniversalRing
Returns:
"CYC(z*)" where R is the coefficient ring and z the prefix of the variable.

map

public RingElt map(int n,
                   java.lang.String str)
maps the string str into the n-th cyclotomic field


map

public RingElt map(RingElt r)
The following Rings are mapped: Cyclotomic fields, where the variable is of the form z* where z ist the preifx of the variable and * is a number; Polynomial rings and Quotient fields over Polynomial rings where the variables are of the form z*; the usual suspects (Z, Q).

Overrides:
map in class UniversalRing

map

public RingElt map(java.lang.String str)
Strings denoting Rational functions (elements of Quotient fields of Polynomial rings) over variables of the form z* where z ist the preifx of the variable and * is a number; are mapped.

Overrides:
map in class UniversalRing

findRing

public Ring findRing()
Description copied from class: UniversalRing
A suitable ring able to map 0 (and 1).

Specified by:
findRing in class UniversalRing
Returns:
the rational numbers.

findRing

public Ring findRing(RingElt a)
Returns the ring of the argument a if this a Cyclotomic field or Q. Otherwise a RingException is thrown.

Specified by:
findRing in class UniversalRing
Throws:
RingException

findRing

public Ring findRing(RingElt a,
                     RingElt b)
Returns cyaclotomic field which contains both a and b. If a is a ring of the n-th cyclotomic field and b of the m-th cyclotomic field, then the k-th cyclotomic field with k = lcm(n,m) (least common multiple) is returned.

Specified by:
findRing in class UniversalRing

main

public static void main(java.lang.String[] args)
This is for testing this class only.