Documentation contents

atlas Library · Script File

cyclotomic.at

This file implements arithmetic in cyclotomic fields

While much of the computation (notably cyclotomic polynomials themselves) is
integer-based, the field elements will be represented as lists of rationals.

We avoid using |polynomial.at| as it implements its |poly| type as |vec|,
which has inherent overflow problems; coefficients of elements of a cyclotomic
field can get large rapidly when inverses are taken.
Source
atlas-scripts/cyclotomic.at (237 lines)
Definitions
52
Loads
Loaded by
W_classes.at cyclotomicMat.at weyl_character_formula.at

Definitions in source order

CyclotomicField type

L17
set_type CyclotomicField = (int order, [int] Phi)

Fields: order, Phi

represent cyclotomic field by order and minpoly of generating root of 1
L18

CyclotomicFieldElement type

L20
set_type CyclotomicFieldElement = ([rat] v,CyclotomicField F)

Fields: v, F

using [rat] (not ratvec) for elements in a cyclotomic field avoids overflow
L21

to_denominator

L28to_denominator (rat p, int N) = int
to_denominator(r,N): integer $a$ such that rational $r$ is congruent to
$a/N$ modulo 1; it is a precondition that |denom(r)| divides |N|.
The application is that $\exp(2\pi i r)=\zeta^a$ where $\zeta=\exp(2\pi i/N)$
cyclotomic Fields and their elements
L33

cyclotomic_field

L36cyclotomic_field (int n) = CyclotomicField
construct a cyclotomic field.

CF

L38CF = cyclotomic_field@int
abbreviation

degree

L40degree (CyclotomicField F) = int

also defined in polynomial.at, character_tables.at, laurentPolynomial.at

=

L42= (CyclotomicField E,CyclotomicField F) = bool

also in this file at line 69, line 74; also defined in basic.at, combinatorics.at, modules.at, parabolics.at, synthetic.at, hash.at, tits.at, K_highest_weights.at, nilpotent_orbits.at, polynomial.at, W_reps_type_BC.at, hodgeParamLaurentPol.at, hodgeParamPol.at, laurentPolynomial.at, extended.at, disconnected.at, cyclotomic_Lie_algebra.at, cyclotomicMat.at, bracket.at

reduce_mod

L47reduce_mod ([int] Phi) = ([rat]->[rat])
a utility function like |%@(rat_poly,rat_poly)|, but fixing dividend first,
reducing |rat_poly| mod |int_poly|, and returning a remainder of fixed length

element

L56element (CyclotomicField F) = ([rat]->CyclotomicFieldElement)
make constructor function for cyclotomic field elements, ensures reduction

cyclotomic_field_element

L60cyclotomic_field_element ([rat] v, CyclotomicField F) = CyclotomicFieldElement
same constructor, but used with field as second argument

embed

L64embed (rat r,CyclotomicField F) = CyclotomicFieldElement
embed Q in cyclotomic field as (images of) constant polynomials.

also defined in character_table_reps.at, cyclotomic_Lie_algebra.at, cyclotomicMat.at, bracket.at

one

L66one (CyclotomicField F) = CyclotomicFieldElement

zero

L67zero (CyclotomicField F) = CyclotomicFieldElement

=

L69= (CyclotomicFieldElement(v,F),CyclotomicFieldElement(w,G)) = bool

also in this file at line 42, line 74; also defined in basic.at, combinatorics.at, modules.at, parabolics.at, synthetic.at, hash.at, tits.at, K_highest_weights.at, nilpotent_orbits.at, polynomial.at, W_reps_type_BC.at, hodgeParamLaurentPol.at, hodgeParamPol.at, laurentPolynomial.at, extended.at, disconnected.at, cyclotomic_Lie_algebra.at, cyclotomicMat.at, bracket.at

compare as |[rat]| values; do not convert to |ratvec|
L72

!=

L73!= (CyclotomicFieldElement x,CyclotomicFieldElement y) = bool

also in this file at line 76; also defined in basic.at, combinatorics.at, synthetic.at, hash.at, tits.at, polynomial.at, cyclotomicMat.at

=

L74= (CyclotomicFieldElement(v,F)) = bool

also in this file at line 42, line 69; also defined in basic.at, combinatorics.at, modules.at, parabolics.at, synthetic.at, hash.at, tits.at, K_highest_weights.at, nilpotent_orbits.at, polynomial.at, W_reps_type_BC.at, hodgeParamLaurentPol.at, hodgeParamPol.at, laurentPolynomial.at, extended.at, disconnected.at, cyclotomic_Lie_algebra.at, cyclotomicMat.at, bracket.at

!=

L76!= (CyclotomicFieldElement x) = bool

also in this file at line 73; also defined in basic.at, combinatorics.at, synthetic.at, hash.at, tits.at, polynomial.at, cyclotomicMat.at

primitive_root

L78primitive_root (CyclotomicField F)
operations on elements of cyclotomic fields
L80

+

L83+ (CyclotomicFieldElement (v,F),CyclotomicFieldElement (w,G)) = CyclotomicFieldElement
additive operators do not need to call |reduce_by|

also defined in basic.at, extParamPol.at, modules.at, ratmat.at, polynomial.at, hodgeParamLaurentPol.at, hodgeParamPol.at, laurentPolynomial.at, cyclotomic_Lie_algebra.at, cyclotomicMat.at, bracket.at, hodge_functions.at, lazy_lists.at

- 2 overloads

L86- (CyclotomicFieldElement (v,F),CyclotomicFieldElement (w,G)) = CyclotomicFieldElement
L91- (CyclotomicFieldElement (v,F)) = CyclotomicFieldElement
negation and scalar multiplication need no reduction either

also defined in basic.at, extParamPol.at, modules.at, ratmat.at, polynomial.at, hodgeParamLaurentPol.at, hodgeParamPol.at, laurentPolynomial.at, cyclotomicMat.at, hodge_functions.at, lazy_lists.at

* 2 overloads

L93* (rat r, CyclotomicFieldElement (v,F)) = CyclotomicFieldElement
L97* (CyclotomicFieldElement (v,F),CyclotomicFieldElement (w,G)) = CyclotomicFieldElement
cyclotomic field multiplication.

also defined in basic.at, extParamPol.at, complex.at, modules.at, hodge_tensor.at, tits_centralizer.at, stable.at, synthetic.at, Weylgroup.at, group_operations.at, ratmat.at, tits.at, twisted_root_datum.at, polynomial.at, hodgeParamLaurentPol.at, hodgeParamPol.at, laurentPolynomial.at, cyclotomic_Lie_algebra.at, cyclotomicMat.at, bracket.at, hodge_functions.at, sparse.at, lazy_lists.at

is_rational

L101is_rational (CyclotomicFieldElement(v,)) = bool

also defined in cyclotomicMat.at

to_rational

L102to_rational (CyclotomicFieldElement z) = rat

also defined in cyclotomicMat.at

is_integer

L105is_integer(CyclotomicFieldElement z) = bool

also defined in basic.at

to_integer

L107to_integer(CyclotomicFieldElement z) = int

exp_1

L110exp_1 (rat r,CyclotomicField F) = CyclotomicFieldElement
embed $\Q$ as roots of unity in F via $t\mapsto\exp(2\pi i t)$

zeta_power

L113zeta_power (int k, CyclotomicField F) = CyclotomicFieldElement
equivalent to |F.element([rat]:id_mat(F.order)[k%F.order]| if you prefer
L116

Galois_matrix

L122Galois_matrix (int k,CyclotomicField F) = [[rat]]
the Galois group over $\Q$ of |F| is the multiplicative group mod |F.order|
the function |Galois_matrix| gives the matrix on the standard basis (the
initial powers of |zeta|) of the action of the Galois group element for |k|
|gcd(k,F.order)=1|

Galois_matrices

L125Galois_matrices(CyclotomicField F) = [[[rat]]]

Galois_action

L128Galois_action (int k, CyclotomicFieldElement(v,F)) = CyclotomicFieldElement

matrix_of_multiplication

L132matrix_of_multiplication (CyclotomicFieldElement (,F):z) = [[rat]]

norm

L135norm (CyclotomicFieldElement z) = rat
three ways of computing inverse of element of cyclotomic field: using
conjugates and norm in the cyclotomic field (may involve huge coefficients),
inverting by applying the inverse of the multiplication matrix, and (last
and best) inverting by solving the "multiplication gives 1" linear system
L137

inverse_by_norm

L144inverse_by_norm (CyclotomicFieldElement(v,F):z) = CyclotomicFieldElement
inverse of z=products of nontrivial Galois conjugates/norm.
better solutions based on linear system solving from Gaussian-elim.at
L148

inverse_by_matrix

L151inverse_by_matrix (CyclotomicFieldElement(,F):z) = CyclotomicFieldElement
inverse of z = inverse of (matrix of multiplication by z) applied to F.one.

inverse_by_solve

L154inverse_by_solve (CyclotomicFieldElement(,F):z) = CyclotomicFieldElement
the last one is the most straightforward and seems best to use:
L157

inverse

L160inverse = inverse_by_solve@CyclotomicFieldElement
inverse of element in cyclotomic field.

also defined in basic.at, combinatorics.at, ratmat.at, parameters.at, tits.at, affine.at, Gaussian_elim.at, cyclotomic_Gaussian_elim.at, lazy_lists.at

/ 2 overloads

L162/ = inverse@CyclotomicFieldElement
unary division is inverse
L164/ (CyclotomicFieldElement(v,F), CyclotomicFieldElement z) = CyclotomicFieldElement

also defined in basic.at, ratmat.at, polynomial.at, lazy_lists.at

^

L168^ (CyclotomicFieldElement z,int k) = CyclotomicFieldElement

also defined in basic.at, ratmat.at, tits.at, polynomial.at, sparse.at, lazy_lists.at

order

L178order(CyclotomicFieldElement x) = int
order of element of F, returns 0 if element not of finite order

also defined in basic.at, all_finite_order.at, tits.at, extended.at

power_of_primitive_root

L184power_of_primitive_root(CyclotomicFieldElement z) = int
if z\in CF(n) is an n^th root of unity, write z=zeta_n^k

root_of_unity

L189root_of_unity(rat r,CyclotomicField F) = CyclotomicFieldElement
in CF(n): if r=a/b and b divides n then return zeta_n^a

format

L194format (CyclotomicFieldElement(v,F)) = string
convert cyclotomic field element to a string for output.

also defined in polynomial.at, extended_misc.at, cyclotomicMat.at, bracket.at

show

L198show (CyclotomicFieldElement z) = void
display cyclotomic field element as polynomial in x.

also defined in modules.at, K_Nilpotent.at, good_W_representatives.at, arthur_parameters.at, sub_cells.at, associated_variety_annihilator.at, geck_generic.at, L_packet.at, ratmat.at, Levi_subgroups.at, nilpotent_orbits.at, subgroups.at, poset.at, polynomial.at, character_tables.at, springer_tables.at, hodgeParamLaurentPol.at, hodgeParamPol.at, laurentPolynomial.at, weak_packets.at, cyclotomic_Lie_algebra.at, cyclotomicMat.at, bracket.at, exceptional.at, nilpotent_posets.at, lazy_lists.at

complex_conjugate

L200complex_conjugate(CyclotomicFieldElement(v,F)) = CyclotomicFieldElement

bar

L203bar = complex_conjugate@CyclotomicFieldElement

also defined in cyclotomicMat.at

is_real

L204is_real (CyclotomicFieldElement z) = bool

also defined in basic.at, cyclotomicMat.at

absolute_value_squared

L206absolute_value_squared (CyclotomicFieldElement z) = CyclotomicFieldElement

cyclotomic_factors

L210cyclotomic_factors (int_poly P) = [int]
all cyclotomic factors of polynomial P, as list of positive integers

product_of_cyclotomic

L223product_of_cyclotomic (rat_poly(X,f,)) = [int]
write a rational polynomial as a product of cyclotomic polynomials, assumed to
be possible (if not we hang because it is hard to tell when to give up trying)
return value [a_1,...] means Phi_{a_1}*Phi_{a_2}*..

Generated from atlas-scripts at commit 648506c (2026-10-13).