Coxeter 3: Sage
This package provides a wrapper for Coxeter 3, written by Fokko Ducloux, which supports arbitrary coxeter groups. In particular, this package allows the user to generate intervals in Bruhat order and Kazhdan-Lusztig polynomials using coxeter.
This is a package that is intended for use with SageMath on top of Python 3.
Why this package
Although SageMath supports coxeter 3, this feature only seems to be available for the finite and affine irreducible Coxeter groups.
This package offers a small wrapper around Coxeter, in fact, this it only provides one small class with 3 methods.
How to Install
Requirements:
- this package requires SageMath to be installed with Python 3; and
- a compiled (not necesarily installed) copy of Coxeter 3.
To install this simply run
pip3 install coxeter3-sage
Documentation
Creating an instance
Creating an instance of Coxeter3 has the following signature.
Coxeter3(W, q, command, timeout)
where
Wis a coxeter group (required);qis the indeterminent of the Kazhdan–Lusztig polynomials (required);commandis the path to the executable for coxeter 3 (optional; defaults to 'coxeter'); andtimeoutis a timeout, in seconds, to wait for responces from coxeter 3,Noneif no timeout (optional; defaults toNone).
The returned object with handle an instance of coxeter using pexpect.
Notice here that command can be the path to a file, for example "./coxeter3/bin/coxeter".
Methods
For the documentation of the methods, please see the examples below.
Example Usage
We now give some basic usage examples as follows.
Starting an instance
We can create an instance of Coxeter3 as follows.
# create an aribtrary Coxeter group `W`
M = CoxeterMatrix([
[1, 4, 4],
[4, 1, 4],
[4, 4, 1]])
W = CoxeterGroup(M)
s1,s2,s3 = W.gens()
# import the `Coxeter3` class
from coxeter3_sage import Coxeter3
# create an instance of `Coxeter3`
R.<q> = LaurentPolynomialRing(ZZ)
cox = Coxeter3(W, q)
# the object `cox` is now managing a connection with an instance of `coxeter`
Bruhat intervals
We can use this instance of Coxeter3 to produce bruhat intervals as follows.
# compute and returns the closed interval `[s1*s2, s1*s3*s2*s1*s3]` as a list
interval1 = cox.bruhat_interval(s1*s2, s1*s3*s2*s1*s3)
# alternatively, you can input these as a list of integers as in `Coxeter3`
interval2 = cox.bruhat_interval([1,2], [1,3,2,1,3])
# we can compute the compute the interval `[1, s1*s3*s2*s1*s3]` as follows
interval3 = cox.bruhat_interval([1,3,2,1,3])
Kazhdan–Lusztig polynomials
Further, we can use cox to to compute Kazhdan–Lusztig polynomials as follows.
# these are some elements which we will use in this example
x, y = (s1*s2, s1*s3*s2*s1*s3)
# compute all of the Kazhdan–Lusztig polynomials `P_{z,y}`
# where `z \leq x` in Bruhat order
kl_polynomials = cox.klbasis(y)
# the variable `kl_polynomials` is a map
# for example, the following retrieves the `P_{x,y}`
poly = kl_polynomials[x]
# we can iterate through it as follows
for z, P in kl_polynomials.items():
print("P_{"+str(z.reduced_word())+",y} =", str(P))
# Alternatively we can retrieve an individual polynomial as follows
poly = cox.P(x,y)
Metadata
Release files for coxeter3-sage 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coxeter3-sage-0.0.1.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| coxeter3_sage-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / coxeter3-sage-0.0.1.tar.gz
| Download URL | coxeter3-sage-0.0.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c31d68050c5a7e73d69aaff3170138ae5c3ee030f4af5264dbfb23e8bfc7f02
|
|
BLAKE2b-256 checksum How to use checksums |
61644c3bada0a5600d21dab8d6d8ce903a0201cf9d5fe31b736a983336a88446
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|
Release files / coxeter3_sage-0.0.1-py3-none-any.whl
| Download URL | coxeter3_sage-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb7ce8ef47054e3d0655b09c1b195d83a58f3d83a541c17b15047f5c951a7e56
|
|
BLAKE2b-256 checksum How to use checksums |
57e0313ad9c1b87eb630c024410e6d197945a21a5447d122da3461d11f733b5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|