Built-in Functions
All built-in operators and functions provided by the Atlas software, grouped by type.
Functions from the standard script files (loaded via <all.at) are documented
in the Script Reference.
Arithmetic
Integer
Standard integer arithmetic.
Unary minus.
Subtraction from \(-1\): ~n = \(-1-n\). Also bitwise complementation.
Integer exponentiation (when the result is integral).
Integer (floor) quotient of Euclidean division.
Integer remainder of Euclidean division. Result has the same sign as the divisor.
Returns both the quotient and remainder as a pair (q, r).
Rational
Standard rational arithmetic. Also available as (rat, int → rat).
Decompose a rational into its (numerator, denominator) pair.
Largest integer \(\leq r\). Same as r\1.
Smallest integer \(\geq r\).
Fractional part of a rational: r - floor(r).
Vector
Componentwise addition/subtraction of equal-length vectors.
Scalar multiplication. The scalar comes second.
Dot (scalar) product.
Scalar division, producing a rational vector.
Variants of + and - that add/remove trailing zeros to match lengths.
Convolution product, removing trailing zeros.
Rational vector
Componentwise addition/subtraction.
Scalar multiplication/division.
Decompose into (numerator vector, common denominator).
Left and right multiplication of a rational vector by an integer matrix.
Matrix
Componentwise matrix addition/subtraction.
Add/subtract a multiple of the identity matrix.
Matrix-vector, matrix-matrix, and vector-matrix products.
Unary ^: matrix transpose, or convert a vector to a single-row matrix.
Comparison
>=n means n ≥ 0 — the operator is on the “wrong” side.Test integer for (in)equality with 0.
Test integer for non-negativity / strict positivity.
Standard relational operators.
Test vector for being/not being the zero vector.
Test whether all entries are non-negative / positive (dominance conditions).
Test matrix for being the zero matrix.
Test rational for being zero.
Bitwise Operations and Integer Utilities
Bitwise AND, OR, XOR.
AND_NOT(n,m) = AND of n with the complement of m.
Fast test whether the bitset of a is a subset of the bitset of b.
nth_set_bit(n,k): position of the \(n\)-th set bit of k. Returns \(-1\) if there is no such bit.
For \(n \ge 0\): least \(k \ge 0\) with \(n < 2^k\).
Bitset with bit \(i\) set iff \(i\) appears in the vector.
Greatest common divisor of all entries of a vector.
GCD and an invertible matrix recording the column operations transforming the vector to \((d,0,0,\ldots)\). The first column gives the Bézout coefficients.
Strings and I/O
String concatenation. Also ([string] → string) to concatenate a list.
Length of a string.
String representation of arguments, concatenated.
Print value followed by newline; return the same value unchanged.
Print values without quotes or commas, followed by newline.
Print values and abort with a runtime error.
ASCII code of the first character, or a one-character string for a given code.
Milliseconds elapsed since program startup.
Display a prompt and return the user's response.
Execute a shell command; return exit code and stdout, or void on severe failure.
Vector and Matrix Construction
Zero vector of given length, or zero matrix of given dimensions.
Identity matrix of given size.
Square diagonal matrix with given diagonal entries.
Dimensions (rows, columns) of a matrix.
List of rows or columns of a matrix.
Select the i-th row or column.
Assemble vectors into a matrix, zero-extending short rows.
Combine column vectors of specified height into a matrix. Height must be provided explicitly in case the list is empty.
Combine row vectors of specified width into a matrix.
General matrix slicing and transformation. The first integer encodes 8 option bits: row/column reversal, tilde-indexing for each bound, transposition, and entry negation. The basic call swiss_matrix_knife(0,A,i,k,j,l) returns A[i:k,j:l].
Linear Algebra
Column echelon form. Returns (M,C,s,eps): echelon form, unimodular column-operation matrix with \(A \cdot C = M\) extended by zero columns (whose last columns are a kernel basis), pivot row list, and sign of \(\det(C)\).
Complete rational solution to \(Ax = b\). Returns empty_set or (v,n,M) where \(v/n\) is a particular solution and columns of \(M\) span the kernel.
Partial Smith reduction to diagonal form. Returns nonzero diagonal entries and the two unimodular matrices applied left and right.
Returns an invertible matrix \(B\) and positive integer list \(c\) such that \(c_j B_j\) span the image lattice.
Columns spanning the kernel (null space).
Kernel of \(M - \lambda I\) for integer eigenvalue \(\lambda\).
Transform the row system to have the same kernel but with the row-span forming a saturated sublattice.
Smith normal form. Returns invertible basis matrix and invariant factors; each factor divides the next.
Matrix inverse over \(\mathbb{Q}\): returns integer numerator matrix and minimal denominator \(d\) with \(M \cdot \text{inv} = d \cdot I\).
Find a section of a binary matrix over \(\mathbb{Z}/2\mathbb{Z}\).
Given binary column vectors, find a reduced echelon basis for their span, the combination matrix, a basis for the relations, and the pivot positions.
Lie Types
Parse a string like "A4.T1.D4" as a Lie type. Factors are one of A,B,C,D,E,F,G,T followed by a rank. Total rank ≤ 32.
Lie type of a root datum.
Add a single (type, rank) factor to a Lie type.
List of simple factors as (letter, rank) pairs. Central torus factors are ignored.
Total rank including both simple factors and any central torus.
Cartan matrix of the semisimple part in standard Bourbaki diagram ordering.
Determine the Lie type whose Cartan matrix matches (up to a permutation). Returns the type and the permutation.
Smith basis for the weight lattice modulo the root sublattice, with invariant factors.
Involution matrix for a simply-connected datum of the given type, described symbolically by the inner class string ('e'/'c' = compact, 's' = split, 'u' = unequal rank, 'C' = complex).
Interpret rational vectors as kernel generators (Fokko convention) and return the sublattice basis. Used in constructing root data.
Root Data
Construct a root datum from simple roots and simple coroots as columns. The boolean flag indicates whether coroots should be used for the generating order.
Root datum from a Lie type and sublattice basis. The columns give a basis for a sublattice of the character lattice of the simply-connected group, which must contain the root lattice.
Simply-connected root datum for a Lie type.
Adjoint root datum: sublattice for the semisimple factor is the root lattice. Dual to simply_connected.
Dual root datum, swapping roots and coroots.
Rank of the weight lattice; rank of the root lattice.
Number of positive roots.
\(2\rho\) = sum of positive roots; \(2\check\rho\) = sum of positive coroots.
Simple roots / coroots as columns.
All positive roots / coroots as columns.
Root or coroot at given index. Indices run from -nr_of_posroots to nr_of_posroots-1; simple roots are at 0, 1, …
Index of a given root or coroot. Returns nr_of_posroots if the vector is not a root.
Cartan matrix with entries \(\langle \alpha_i, \alpha_j^\vee \rangle\). Square, of size the semisimple rank.
\(i\)-th fundamental weight \(\omega_i\) (dual to simple coroots) or coweight.
Sub-root-datum whose coroots take integral values on \(\gamma\) (the integrality subsystem).
Semisimple rank of the integrality datum.
Whether \(\gamma\) is dominant for all integral coroots.
Weyl group orbit of a weight as columns; first column is the dominant weight.
Root datum of the derived group and the matrix mapping weights from original to derived.
Increasing list of positive fractions \(f \le 1\) for which \(f \cdot \lambda\) has more integrality than generically.
Weyl Group
Weyl group element from a word in the simple reflections (0-indexed).
Simple reflection at a root index.
A reduced word as a list of simple reflection indices.
Length of a Weyl group element.
Composition of Weyl group elements.
Inverse of a Weyl group element.
Left action on a weight; right action on a coweight.
The permutation of the full root system induced by the Weyl group element.
Find the dominant weight \(v\) in the orbit of \(\lambda\), and the minimal \(w\) with \(\lambda = w \cdot v\). Returns \((w,v)\).
Inner Classes
InnerClass is a root datum together with an involution \(\theta\) of \(X^*\), classifying a family of real forms.Construct from a root datum and involution matrix. If the matrix is not a based root datum involution, it is replaced by \(w \cdot \theta\) for suitable \(w \in W\).
The distinguished involution defining the inner class.
Dual inner class for the dual complex group.
Number of real forms / dual real forms.
Total number of Cartan classes.
Matrix of block sizes (rows = real forms, columns = dual real forms).
Names of real forms / dual real forms.
Real form × Cartan class incidence matrix (1 if the Cartan class occurs for that real form).
Real Forms
Select a real form by index.
The quasisplit real form / dual real form.
The inner class containing the real form.
Index of this real form in its inner class.
Size of \(K \backslash G/B\).
Hasse diagram of the Bruhat order on \(K \backslash G/B\).
Partial order on Cartan classes as a matrix.
Rank of \(\pi_0(G(\mathbb{R}))\). Number of connected components is \(2^{\text{components\_rank}}\).
Dominant rational coweight \(c\) for which \(\exp(\pi i c)\) equals the special torus element \(t_0\) used for torus_bits.
Cartan Classes
Select a Cartan class by index from an inner class or a real form.
Most split Cartan class for a real form.
Detailed information: (compact, complex, split) torus ranks; canonical twisted involution; (orbit size, fiber size); types of (imaginary, real, complex) root subsystems.
Weight lattice involution \(\theta\) for this Cartan class.
Real forms for which this Cartan class occurs.
Identifying part of the fiber group for the real form at this Cartan class.
Print gradings of imaginary roots, equivalent to the gradings command in Fokko.
KGB Elements
Select a KGB element by index.
Recover real form and index. Inverse of KGB.
The involution \(\theta\) of \(X^*\).
Length within the KGB set (dimension of the \(K\)-orbit).
Status of a simple root at a KGB element. Encoding: 0 = C− (complex descent), 1 = ic (imaginary compact), 2 = r (real), 3 = nc (imaginary noncompact), 4 = C+ (complex ascent).
Cross action of a simple reflection on a KGB element.
Cayley or inverse Cayley transform through a root, whichever is defined.
The \(\theta^t\)-stable rational coweight \(v\). For imaginary \(\alpha\), parity of \(\langle v + \check\rho_i, \alpha \rangle\) determines compactness.
Binary vector distinguishing KGB elements at the same involution.
Twist by the distinguished involution \(\delta\), or by a given external involution.
Blocks
Construct a block for a compatible pair of real form and dual real form.
Recover real form and dual real form. Inverse of block.
Number of elements in the block.
KGB and dual KGB elements for a block element at given index.
Status of simple reflection s at block element i. Codes: 0=C−, 1=ic, 2=r1, 3=r2, 4=C+, 5=rn, 6=i1, 7=i2.
Raw KL data: polynomial-index matrix, list of KL polynomials as coefficient vectors, and length-boundary vector stops.
Dual KL polynomials (\(Q\)-polynomials) in the same format.
W-graph data: for each block element its \(\tau\)-invariant and list of outgoing edges as (destination, μ) pairs.
W-cell decomposition: for each cell, the list of block element numbers and the restricted W-graph.
Split Integers
Arithmetic in \(\mathbb{Z}[s]/(s^2-1)\).
Decompose into (a,b) components: the value is \(a + b \cdot s\).
K-types
KType represents a standard \(K\)-representation or its irreducible quotient, parametrized by a pair \((x, \lambda - \rho)\).Form a K-type from \((x, \lambda - \rho)\).
Recover \((x, \lambda - \rho)\).
Height: sum of \(|\langle (1+\theta)\lambda, \alpha^\vee \rangle|\) over positive coroots.
\(\lambda\) is dominant for all imaginary roots.
\(\lambda\) is singular on a compact imaginary root.
Standard, nonzero, and semifinal. Required for terms in a KTypePol.
Irreducible \(K\)-representation as a combination of standards, with height limit (-1 = no limit).
The zero K-module for a real form.
Decompose standard K-representations into irreducibles, up to given height.
Deform all the way to \(\nu = 0\), yielding the K-type decomposition.
Module Parameters
Param represents a standard module or irreducible, parametrized by \((x, \lambda-\rho, \nu)\).Form a parameter from \((x, \lambda-\rho, \nu)\).
Recover \((x, \lambda-\rho, \gamma)\) where \(\gamma\) is the infinitesimal character.
The infinitesimal character \(\gamma\).
Standard: \(\gamma\) dominant for imaginary roots. Zero: \(\gamma\) singular on a compact imaginary root. Final: standard, nonzero, semifinal, with dominant \(\gamma\) — required for terms in ParamPol.
Make the infinitesimal character dominant.
Cross action of a simple reflection (by index in the integrality datum, or by root vector).
Cayley or inverse Cayley transform through a reflection.
Orientation number, used in computing Hermitian forms.
Fractions \(0 < t \le 1\) for which \(I(x,\lambda,t\nu)\) is reducible.
Scale the \(\nu\) component by a rational factor.
Block as a list of final parameters and index of the original.
Block plus KL table: parameters, index of original, polynomial-index matrix, polynomial list.
Length within its block.
Root datum whose coroots are integral on the infinitesimal character.
Virtual Modules
ParamPol is a formal \(\mathbb{Z}[s]\)-linear combination of final parameters.The zero virtual module.
Add or subtract a parameter with coefficient 1.
Add a parameter with a split integer coefficient.
Scale a virtual module by a split integer.
Lowest and highest terms by height.
Drop terms with height above the given limit.
Scale \(\nu\) in each term and renormalize.
Deformation and Kazhdan-Lusztig
Deformation terms when \(\nu\) decreases, using KL polynomials.
Deform recursively to \(\nu = 0\), producing the K-type decomposition.
Time-limited version: returns void if time limit (in ms) is exceeded.
Like full_deform but uses twisted KL polynomials. Parameter must be fixed under the twist.
The signed sum \(\sum_{x \le y} (-1)^{\ell(y)-\ell(x)} P_{x,y}[q:=s] \cdot x\).
Nonzero KL polynomials \(P(x,y)\) with the given parameter as \(y\): list of (n, x, P(x,y)).
Extended block for a parameter and external involution \(\delta\). Returns \(\delta\)-fixed parameters and matrices encoding types and neighbor relations for extended generators.
Extended KL data in raw format. Negative matrix entries indicate the polynomial should be negated.
Deform all terms of a virtual module block-by-block, with height cutoff.
Printing Functions
Print the KGB set.
Print a block in Fokko format.
Print Kazhdan-Lusztig data in various formats.
Print W-cell and W-graph data.
Print strong real form data for a Cartan class.
All identifier completions of a given prefix. Useful for interactive exploration.