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.
Definitions in source order
CyclotomicField type
set_type CyclotomicField = (int order, [int] Phi)
Fields: order, Phi
represent cyclotomic field by order and minpoly of generating root of 1L18
CyclotomicFieldElement type
set_type CyclotomicFieldElement = ([rat] v,CyclotomicField F)
Fields: v, F
using [rat] (not ratvec) for elements in a cyclotomic field avoids overflowL21
to_denominator
to_denominator (rat p, int N) = intto_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 elementsL33
cyclotomic_field
cyclotomic_field (int n) = CyclotomicFieldconstruct a cyclotomic field.
CF
CF = cyclotomic_field@intabbreviation
degree
degree (CyclotomicField F) = intalso defined in polynomial.at, character_tables.at, laurentPolynomial.at
=
= (CyclotomicField E,CyclotomicField F) = boolalso 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
reduce_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
element (CyclotomicField F) = ([rat]->CyclotomicFieldElement)make constructor function for cyclotomic field elements, ensures reduction
cyclotomic_field_element
cyclotomic_field_element ([rat] v, CyclotomicField F) = CyclotomicFieldElementsame constructor, but used with field as second argument
embed
embed (rat r,CyclotomicField F) = CyclotomicFieldElementembed 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
one (CyclotomicField F) = CyclotomicFieldElementzero
zero (CyclotomicField F) = CyclotomicFieldElement=
= (CyclotomicFieldElement(v,F),CyclotomicFieldElement(w,G)) = boolalso 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
!=
!= (CyclotomicFieldElement x,CyclotomicFieldElement y) = boolalso in this file at line 76; also defined in basic.at, combinatorics.at, synthetic.at, hash.at, tits.at, polynomial.at, cyclotomicMat.at
=
= (CyclotomicFieldElement(v,F)) = boolalso 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
!=
!= (CyclotomicFieldElement x) = boolalso 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
primitive_root (CyclotomicField F)operations on elements of cyclotomic fieldsL80
+
+ (CyclotomicFieldElement (v,F),CyclotomicFieldElement (w,G)) = CyclotomicFieldElementadditive 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
- (CyclotomicFieldElement (v,F),CyclotomicFieldElement (w,G)) = CyclotomicFieldElement- (CyclotomicFieldElement (v,F)) = CyclotomicFieldElementnegation 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
* (rat r, CyclotomicFieldElement (v,F)) = CyclotomicFieldElement* (CyclotomicFieldElement (v,F),CyclotomicFieldElement (w,G)) = CyclotomicFieldElementcyclotomic 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
is_rational (CyclotomicFieldElement(v,)) = boolalso defined in cyclotomicMat.at
to_rational
to_rational (CyclotomicFieldElement z) = ratalso defined in cyclotomicMat.at
is_integer
is_integer(CyclotomicFieldElement z) = boolalso defined in basic.at
to_integer
to_integer(CyclotomicFieldElement z) = intexp_1
exp_1 (rat r,CyclotomicField F) = CyclotomicFieldElementembed $\Q$ as roots of unity in F via $t\mapsto\exp(2\pi i t)$
zeta_power
zeta_power (int k, CyclotomicField F) = CyclotomicFieldElementequivalent to |F.element([rat]:id_mat(F.order)[k%F.order]| if you preferL116
Galois_matrix
Galois_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
Galois_matrices(CyclotomicField F) = [[[rat]]]Galois_action
Galois_action (int k, CyclotomicFieldElement(v,F)) = CyclotomicFieldElementmatrix_of_multiplication
matrix_of_multiplication (CyclotomicFieldElement (,F):z) = [[rat]]norm
norm (CyclotomicFieldElement z) = ratthree 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 systemL137
inverse_by_norm
inverse_by_norm (CyclotomicFieldElement(v,F):z) = CyclotomicFieldElementinverse of z=products of nontrivial Galois conjugates/norm.
better solutions based on linear system solving from Gaussian-elim.atL148
inverse_by_matrix
inverse_by_matrix (CyclotomicFieldElement(,F):z) = CyclotomicFieldElementinverse of z = inverse of (matrix of multiplication by z) applied to F.one.
inverse_by_solve
inverse_by_solve (CyclotomicFieldElement(,F):z) = CyclotomicFieldElementthe last one is the most straightforward and seems best to use:L157
inverse
inverse = inverse_by_solve@CyclotomicFieldElementinverse 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
/ = inverse@CyclotomicFieldElementunary division is inverse
/ (CyclotomicFieldElement(v,F), CyclotomicFieldElement z) = CyclotomicFieldElementalso defined in basic.at, ratmat.at, polynomial.at, lazy_lists.at
^
^ (CyclotomicFieldElement z,int k) = CyclotomicFieldElementalso defined in basic.at, ratmat.at, tits.at, polynomial.at, sparse.at, lazy_lists.at
order
order(CyclotomicFieldElement x) = intorder 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
power_of_primitive_root(CyclotomicFieldElement z) = intif z\in CF(n) is an n^th root of unity, write z=zeta_n^k
root_of_unity
root_of_unity(rat r,CyclotomicField F) = CyclotomicFieldElementin CF(n): if r=a/b and b divides n then return zeta_n^a
format
format (CyclotomicFieldElement(v,F)) = stringconvert cyclotomic field element to a string for output.
also defined in polynomial.at, extended_misc.at, cyclotomicMat.at, bracket.at
show
show (CyclotomicFieldElement z) = voiddisplay 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
complex_conjugate(CyclotomicFieldElement(v,F)) = CyclotomicFieldElementbar
bar = complex_conjugate@CyclotomicFieldElementalso defined in cyclotomicMat.at
is_real
is_real (CyclotomicFieldElement z) = boolalso defined in basic.at, cyclotomicMat.at
absolute_value_squared
absolute_value_squared (CyclotomicFieldElement z) = CyclotomicFieldElementcyclotomic_factors
cyclotomic_factors (int_poly P) = [int]all cyclotomic factors of polynomial P, as list of positive integers
product_of_cyclotomic
product_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).