Skip to main content

A simple wrapper around coxeter 3 by Fokko Ducloux which supports arbitrary Coxeter groups.

Project description

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

  • W is a coxeter group (required);
  • q is the indeterminent of the Kazhdan–Lusztig polynomials (required);
  • command is the path to the executable for coxeter 3 (optional; defaults to 'coxeter'); and
  • timeout is a timeout, in seconds, to wait for responces from coxeter 3, None if no timeout (optional; defaults to None).

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coxeter3-sage-0.0.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

coxeter3_sage-0.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file coxeter3-sage-0.0.1.tar.gz.

File metadata

  • Download URL: coxeter3-sage-0.0.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for coxeter3-sage-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2c31d68050c5a7e73d69aaff3170138ae5c3ee030f4af5264dbfb23e8bfc7f02
MD5 0f7ec5602b9f615e2748714a3b6ef4e5
BLAKE2b-256 61644c3bada0a5600d21dab8d6d8ce903a0201cf9d5fe31b736a983336a88446

See more details on using hashes here.

File details

Details for the file coxeter3_sage-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: coxeter3_sage-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for coxeter3_sage-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb7ce8ef47054e3d0655b09c1b195d83a58f3d83a541c17b15047f5c951a7e56
MD5 33e7f60f5a05a329ac9e86dcf136bf21
BLAKE2b-256 57e0313ad9c1b87eb630c024410e6d197945a21a5447d122da3461d11f733b5b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page