Skip to content

Commit

Permalink
Trac #27640: Shi arrangement for other types
Browse files Browse the repository at this point in the history
m-extended Shi arrangement defined for any finite crystallograpic root
system

URL: https://trac.sagemath.org/27640
Reported by: etzanaki
Ticket author(s): Eleni Tzanaki, Viviane Pons
Reviewer(s): Frédéric Chapoton, Travis Scrimshaw
  • Loading branch information
Release Manager authored and vbraun committed Apr 14, 2019
2 parents 665ca6a + b176a2a commit cc5a0f2
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 19 deletions.
4 changes: 4 additions & 0 deletions src/doc/en/reference/references/index.rst
Expand Up @@ -225,6 +225,10 @@ REFERENCES:
by F. Morain.
http://citeseer.ist.psu.edu/atkin92probabilistic.html
.. [Ath1996] \C. A. Athanasiadis,
*Characteristic polynomials of subspace arrangements and finite fields*.
Advances in Mathematics, 122(2):193-233, 1996.
.. [Av2000] \D. Avis, *A revised implementation of the reverse search
vertex enumeration algorithm.* Polytopes-combinatorics and
computation. Birkhauser Basel, 2000.
Expand Down
113 changes: 94 additions & 19 deletions src/sage/geometry/hyperplane_arrangement/library.py
Expand Up @@ -14,10 +14,12 @@

from sage.graphs.all import graphs
from sage.matrix.constructor import matrix, random_matrix
from sage.rings.all import QQ, ZZ
from sage.rings.all import QQ, ZZ, NN
from sage.misc.misc_c import prod

from sage.combinat.combinat import stirling_number2
from sage.combinat.root_system.cartan_type import CartanType
from sage.combinat.root_system.root_system import RootSystem
from sage.arith.all import binomial
from sage.rings.polynomial.polynomial_ring import polygen

Expand All @@ -27,7 +29,7 @@
def make_parent(base_ring, dimension, names=None):
"""
Construct the parent for the hyperplane arrangements.
For internal use only.
INPUT:
Expand Down Expand Up @@ -375,8 +377,8 @@ def Ish(self, n, K=QQ, names=None):
.. MATH::
\{ x_i - x_j = 0 : 1 \leq i \leq j \leq n \}
\cup
\{ x_i - x_j = 0 : 1 \leq i \leq j \leq n \}
\cup
\{ x_1 - x_j = i : 1 \leq i \leq j \leq n \}.
EXAMPLES::
Expand Down Expand Up @@ -488,7 +490,7 @@ def semiorder(self, n, K=QQ, names=None):
sage: h.characteristic_polynomial()
x^5 - 20*x^4 + 180*x^3 - 790*x^2 + 1380*x
sage: h.characteristic_polynomial.clear_cache() # long time
sage: h.characteristic_polynomial() # long time
sage: h.characteristic_polynomial() # long time
x^5 - 20*x^4 + 180*x^3 - 790*x^2 + 1380*x
"""
H = make_parent(K, n, names)
Expand All @@ -500,33 +502,86 @@ def semiorder(self, n, K=QQ, names=None):
hyperplanes.append(x[i] - x[j] - k)
A = H(*hyperplanes)
x = polygen(QQ, 'x')
charpoly = x * sum([stirling_number2(n, k) * prod([x - k - i for i in range(1, k)])
charpoly = x * sum([stirling_number2(n, k) * prod([x - k - i for i in range(1, k)])
for k in range(1, n+1)])
A.characteristic_polynomial.set_cache(charpoly)
return A

def Shi(self, n, K=QQ, names=None):
def Shi(self, data, K=QQ, names=None, m=1):
r"""
Return the Shi arrangement.
INPUT:
- ``n`` -- integer
- ``data`` -- either an integer or a Cartan type (or coercible
into; see "CartanType")
- ``K`` -- field (default:``QQ``)
- ``names`` -- tuple of strings or ``None`` (default); the
variable names for the ambient space
- ``m`` -- integer (default: 1)
OUTPUT:
The Shi arrangement is the set of `n(n-1)` hyperplanes: `\{ x_i - x_j
= 0,1 : 1 \leq i \leq j \leq n \}`.
- If ``data`` is an integer `n`, return the Shi arrangement in
dimension `n`, i.e. the set of `n(n-1)` hyperplanes:
`\{ x_i - x_j = 0,1 : 1 \leq i \leq j \leq n \}`. This corresponds
to the Shi arrangement of Cartan type `A_{n-1}`.
- If ``data`` is a Cartan type, return the Shi arrangement of given
type.
- If `m > 1`, return the `m`-extended Shi arrangement of given type.
The `m`-extended Shi arrangement of a given crystallographic
Cartan type is defined by the inner product
`\langle a,x \rangle = k` for `-m < k \leq m` and
`a \in \Phi^+` is a positive root of the root system `\Phi`.
EXAMPLES::
sage: hyperplane_arrangements.Shi(4)
Arrangement of 12 hyperplanes of dimension 4 and rank 3
sage: hyperplane_arrangements.Shi("A3")
Arrangement of 12 hyperplanes of dimension 4 and rank 3
sage: hyperplane_arrangements.Shi("A3",m=2)
Arrangement of 24 hyperplanes of dimension 4 and rank 3
sage: hyperplane_arrangements.Shi("B4")
Arrangement of 32 hyperplanes of dimension 4 and rank 4
sage: hyperplane_arrangements.Shi("B4",m=3)
Arrangement of 96 hyperplanes of dimension 4 and rank 4
sage: hyperplane_arrangements.Shi("C3")
Arrangement of 18 hyperplanes of dimension 3 and rank 3
sage: hyperplane_arrangements.Shi("D4",m=3)
Arrangement of 72 hyperplanes of dimension 4 and rank 4
sage: hyperplane_arrangements.Shi("E6")
Arrangement of 72 hyperplanes of dimension 8 and rank 6
sage: hyperplane_arrangements.Shi("E6",m=2)
Arrangement of 144 hyperplanes of dimension 8 and rank 6
If the Cartan type is not crystallographic, the Shi arrangement
is not defined::
sage: hyperplane_arrangements.Shi("H4")
Traceback (most recent call last):
...
NotImplementedError: Shi arrangements are not defined for non crystallographic Cartan types
The characteristic polynomial is pre-computed using the results
of [Ath1996]_::
sage: hyperplane_arrangements.Shi("A3").characteristic_polynomial()
x^4 - 12*x^3 + 48*x^2 - 64*x
sage: hyperplane_arrangements.Shi("A3",m=2).characteristic_polynomial()
x^4 - 24*x^3 + 192*x^2 - 512*x
sage: hyperplane_arrangements.Shi("C3").characteristic_polynomial()
x^3 - 18*x^2 + 108*x - 216
sage: hyperplane_arrangements.Shi("E6").characteristic_polynomial()
x^8 - 72*x^7 + 2160*x^6 - 34560*x^5 + 311040*x^4 - 1492992*x^3 + 2985984*x^2
sage: hyperplane_arrangements.Shi("B4",m=3).characteristic_polynomial()
x^4 - 96*x^3 + 3456*x^2 - 55296*x + 331776
TESTS::
Expand All @@ -536,21 +591,41 @@ def Shi(self, n, K=QQ, names=None):
sage: h.characteristic_polynomial.clear_cache() # long time
sage: h.characteristic_polynomial() # long time
x^4 - 12*x^3 + 48*x^2 - 64*x
sage: h = hyperplane_arrangements.Shi("A3",m=2)
sage: h.characteristic_polynomial()
x^4 - 24*x^3 + 192*x^2 - 512*x
sage: h.characteristic_polynomial.clear_cache()
sage: h.characteristic_polynomial()
x^4 - 24*x^3 + 192*x^2 - 512*x
sage: h = hyperplane_arrangements.Shi("B3",m=3)
sage: h.characteristic_polynomial()
x^3 - 54*x^2 + 972*x - 5832
sage: h.characteristic_polynomial.clear_cache()
sage: h.characteristic_polynomial()
x^3 - 54*x^2 + 972*x - 5832
"""
H = make_parent(K, n, names)
if data in NN:
cartan_type = CartanType(["A",data-1])
else:
cartan_type = CartanType(data)
if not cartan_type.is_crystallographic():
raise NotImplementedError("Shi arrangements are not defined for non crystallographic Cartan types")
n = cartan_type.rank()
h = cartan_type.coxeter_number()
Ra = RootSystem(cartan_type).ambient_space()
PR = Ra.positive_roots()
d = Ra.dimension()
H = make_parent(K, d, names)
x = H.gens()
hyperplanes = []
for i in range(n):
for j in range(i+1, n):
for const in [0, 1]:
hyperplanes.append(x[i] - x[j] - const)

for a in PR:
for const in range(-m+1,m+1):
hyperplanes.append(sum(a[j]*x[j] for j in range(d))-const)
A = H(*hyperplanes)
x = polygen(QQ, 'x')
charpoly = x * sum([(-1)**k * stirling_number2(n, n-k) *
prod([(x - 1 - j) for j in range(k, n-1)]) for k in range(0, n)])
charpoly = x**(d-n) * (x-m*h)**n
A.characteristic_polynomial.set_cache(charpoly)
return A


hyperplane_arrangements = HyperplaneArrangementLibrary()

0 comments on commit cc5a0f2

Please sign in to comment.