# BasicDivisor -- the Types of divisors

## Description

The BasicDivisor is the class of divisors whose coefficients are unspecified, a base class. Not typically for use. All subtypes have the same essential structure.

RWeilDivisor is a subclass which has real coefficients.

QWeilDivisor is a further subclass with rational coefficients.

WeilDivisor is a subclass with integer coefficients.

The basic structure is a HashTable. There is one key which has a value which specifies the ambient ring. Another key is cache which points to a CacheTable. The remaining keys are a Groebner basis $L$ for each prime ideal $P$ in the support with corresponding value a list with one entry {$n$} where $n$ is the coefficient of the height one prime.

 i1 : R = QQ[x,y,z]; i2 : D = divisor(x*y^2*z^3) o2 = Div(x) + 2*Div(y) + 3*Div(z) o2 : WeilDivisor on R i3 : H = new HashTable from D o3 = HashTable{{x} => {1} } {y} => {2} {z} => {3} cache => CacheTable{...1...} ring => R o3 : HashTable i4 : (2/3)*D o4 = 2/3*Div(x) + 2*Div(z) + 4/3*Div(y) o4 : QWeilDivisor on R i5 : 0.6*D o5 = .6*Div(x) + 1.8*Div(z) + 1.2*Div(y) o5 : RWeilDivisor on R

## Types of BasicDivisor :

• "RWeilDivisor"

## Functions and methods returning an object of class BasicDivisor :

• "applyToCoefficients(BasicDivisor,Function)" -- see applyToCoefficients -- apply a function to the coefficients of a divisor
• "- BasicDivisor" -- see BasicDivisor + BasicDivisor -- add or subtract two divisors, or negate a divisor
• BasicDivisor + BasicDivisor -- add or subtract two divisors, or negate a divisor
• "BasicDivisor - BasicDivisor" -- see BasicDivisor + BasicDivisor -- add or subtract two divisors, or negate a divisor
• "cleanSupport(BasicDivisor)" -- see cleanSupport -- removes primes with coefficient zero from a divisor
• "clearCache(BasicDivisor)" -- see clearCache -- creates a new divisor with most entries from the cache removed
• "divisor(BasicList)" -- see divisor -- constructor for (Weil/Q/R)-divisors
• "divisor(BasicList,BasicList)" -- see divisor -- constructor for (Weil/Q/R)-divisors
• Number * BasicDivisor -- multiply a divisor by a number
• "pullback(RingMap,RWeilDivisor)" -- see pullback -- pullback a divisor under a ring map
• trim(BasicDivisor) -- trims the ideals displayed to the user and removes primes with coefficient zero
• "zeroDivisor(Ring)" -- see zeroDivisor -- constructs the zero Weil divisor for the ring

## Methods that use an object of class BasicDivisor :

• coefficient(BasicList,BasicDivisor) -- get the coefficient of an ideal for a fixed divisor
• coefficient(Ideal,BasicDivisor) -- get the coefficient of an ideal for a fixed divisor
• coefficients(BasicDivisor) -- get the list of coefficients of a divisor
• "gbs(BasicDivisor)" -- see gbs -- get the list of Groebner bases corresponding to the height-one primes in the support of a divisor
• "getPrimeCount(BasicDivisor)" -- see getPrimeCount -- get the number of height-one primes in the support of the divisor
• "getPrimeDivisors(BasicDivisor)" -- see getPrimeDivisors -- get the list of prime divisors of a given divisor
• "isEffective(BasicDivisor)" -- see isEffective -- whether a divisor is effective
• isHomogeneous(BasicDivisor) -- whether the divisor is graded (homogeneous)
• isPrime(BasicDivisor) -- whether a divisor is prime
• "isReduced(BasicDivisor)" -- see isReduced -- whether a divisor is reduced
• "isSNC(BasicDivisor)" -- see isSNC -- whether the divisor is simple normal crossings
• isWellDefined(BasicDivisor) -- whether a divisor is valid
• "isZeroDivisor(BasicDivisor)" -- see isZeroDivisor -- whether the divisor is the zero divisor
• net(BasicDivisor) (missing documentation)
• "primes(BasicDivisor)" -- see primes -- get the list of height-one primes in the support of a divisor
• ring(BasicDivisor) -- get the ambient ring of a divisor

## For the programmer

The object BasicDivisor is a type, with ancestor classes HashTable < Thing.