Open DennisJahn opened 3 years ago
Branch pushed to git repo; I updated commit sha1. New commits:
f3b834e | re-added brick_polytope() as deprecated method. Examples for brick_polehedron() fixed |
Commit: f3b834e
Branch pushed to git repo; I updated commit sha1. New commits:
e658d9b | Replaced brick polytope by brick polyhedron in documentaion. Methods to be changed/rewritten: kappa_preimage() of facets, is_vertex() of facets, brick_fan of subword complex, minkowski_summand of subword complex. |
Branch pushed to git repo; I updated commit sha1. New commits:
996a180 | method is_vertex() for facets rewritten |
Branch pushed to git repo; I updated commit sha1. New commits:
f625039 | Doc for minkowski_summand() of subword complex and kappa_preimage() of facets |
Branch pushed to git repo; I updated commit sha1. New commits:
24ae7de | rewritten brick_fan() for subword comlexes. Now correct and generalized to coincide with the normal fan of brick_polyhedron() |
Branch pushed to git repo; I updated commit sha1. New commits:
167f102 | more details in the doc of upper_root_configuration |
+ from warnings import warn
+ warn("brick_polytope() is deprecated; brick_polyhedron() is used instead; results are different for non-spherical subword complexes", DeprecationWarning)
better to use deprecation
from sage.misc.superseded
for this
if you install the optional package pynormaliz
, you can also do exact computations over number fields, this should probably be a user option
Branch pushed to git repo; I updated commit sha1. New commits:
12cb089 | updated files from 32669 |
Replying to @mkoeppe:
if you install the optional package
pynormaliz
, you can also do exact computations over number fields, this should probably be a user option
I did install it but keep getting problems with vertices over the universal cyclotomic field:
1.618033988749895? of type <class 'sage.rings.qqbar.AlgebraicReal'> not valid to initialize an element of the universal cyclotomic field
Is there a way to work around this?
Branch pushed to git repo; I updated commit sha1. New commits:
e011ef5 | used deprecated_function_alias for brick_polytope instead of warn |
Branch pushed to git repo; I updated commit sha1. New commits:
3a5fca1 | corrected the deprecation number |
Branch pushed to git repo; I updated commit sha1. New commits:
6e6864c | added missing 'optional - gap 3' flags |
diff --git a/src/sage/combinat/root_system/reflection_group_real.py b/src/sage/combinat/root_system/reflection_group_real.py
index 91333f0ca5..1fbf87496e 100644
--- a/src/sage/combinat/root_system/reflection_group_real.py
+++ b/src/sage/combinat/root_system/reflection_group_real.py
@@ -706,8 +706,8 @@ class RealReflectionGroup(ComplexReflectionGroup):
[0, 1, 2]
"""
return self._index_set_inverse[i]
-
- def bruhat_cone(self, x, y, side = 'upper'):
+
+ def bruhat_cone(self, x, y, side='upper', backend='cdd'):
r"""
Return the polyhedral cone generated by the set of positive roots ``beta`` where ``s_beta`` is the reflection corresponding to ``beta`` and:
@@ -744,12 +744,16 @@ class RealReflectionGroup(ComplexReflectionGroup):
raise ValueError("side must be either 'upper' or 'lower'")
from sage.geometry.polyhedron.constructor import Polyhedron
if self.is_crystallographic():
- return Polyhedron(vertices = [[0]*self.rank()], rays = roots, ambient_dim = self.rank())
+ return Polyhedron(vertices = [[0]*self.rank()], rays=roots, ambient_dim=self.rank(), backend=backend)
else:
- from warnings import warn
- warn("Using floating point numbers for roots of unity. This might cause numerical errors!")
- from sage.rings.real_double import RDF
- return Polyhedron(vertices = [[0]*self.rank()], rays = roots, ambient_dim = self.rank(), base_ring = RDF)
+ if backend == 'cdd':
+ from warnings import warn
+ warn("Using floating point numbers for roots of unity. This might cause numerical errors!")
+ from sage.rings.real_double import RDF as base_ring
+ backend = 'cdd'
+ else:
+ from sage.rings.qqbar import AA as base_ring
+ return Polyhedron(vertices = [[0]*self.rank()], rays=roots, ambient_dim=self.rank(), base_ring=base_ring, backend=backend)
class Element(RealReflectionGroupElement, ComplexReflectionGroup.Element):
diff --git a/src/sage/combinat/subword_complex.py b/src/sage/combinat/subword_complex.py
index bbf750b56d..dc64b5882c 100644
--- a/src/sage/combinat/subword_complex.py
+++ b/src/sage/combinat/subword_complex.py
@@ -638,9 +638,9 @@ class SubwordComplexFacet(Simplex, Element):
- ``coefficients`` -- (optional) a list of coefficients used to
scale the fundamental weights
-
+
- ``sign`` -- (default: ``'positive'``) must be one of the following:
-
+
* ``'positive'`` - entries of the extended weight configuration are summed up as they are
* ``'negative'`` - entries of the extended weight configuration are summed up with a negative sign
@@ -1660,9 +1660,9 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
- coefficients -- (optional) a list of coefficients used to
scale the fundamental weights
-
+
- ``sign`` -- (default: ``'positive'``) must be one of the following:
-
+
* ``'positive'`` - for brick vectors, entries of the extended weight configuration are summed up as they are
* ``'negative'`` - for brick vectors, entries of the extended weight configuration are summed up with a negative sign
@@ -1690,7 +1690,7 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
def minkowski_summand(self, i):
r"""
- Return the `i` th Minkowski summand of ``self``. The brick polyhedron of ``self`` is the
+ Return the `i` th Minkowski summand of ``self``. The brick polyhedron of ``self`` is the
Minkowski sum of its associated Bruhat cone and all Minkowski summands.
INPUT:
@@ -1720,7 +1720,7 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
min_sum = [[QQ(CC(v)) for v in F.extended_weight_configuration()[i]] for F in self]
return Polyhedron(min_sum)
- def brick_polyhedron(self, coefficients=None, sign='positive'):
+ def brick_polyhedron(self, coefficients=None, sign='positive', backend='cdd'):
r"""
Return the brick polyhedron of ``self``.
@@ -1731,9 +1731,9 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
- coefficients -- (optional) a list of coefficients used to
scale the fundamental weights
-
+
- ``sign`` -- (default: ``'positive'``) must be one of the following:
-
+
* ``'positive'`` - entries of the extended weight configuration are summed up as they are.
The Bruhat cone is taken with a negative sign.
* ``'negative'`` - entries of the extended weight configuration are summed up with a negative sign.
@@ -1762,29 +1762,32 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
sage: SC = SubwordComplex(Q,W.w0) # optional - gap3
sage: SC.brick_polyhedron() # optional - gap3
A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 32 vertices
-
+
sage: W = ReflectionGroup(['B',2]) # optional - gap3
sage: Q = W.w0.reduced_word() # optional - gap3
sage: SC = SubwordComplex(Q, W.from_reduced_word([1])) # optional - gap3
sage: SC.brick_polyhedron() # optional - gap3
A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 2 vertices and 2 rays
-
+
REFERENCES: [JahStu]_
"""
BV = self.brick_vectors(coefficients=coefficients, sign=sign)
G = self.group()
if sign == 'positive':
- BC = -G.bruhat_cone(self.pi(), G.demazure_product(self.word()))
+ BC = -G.bruhat_cone(self.pi(), G.demazure_product(self.word()), backend=backend)
elif sign == 'negative':
- BC = G.bruhat_cone(self.pi(), G.demazure_product(self.word()))
+ BC = G.bruhat_cone(self.pi(), G.demazure_product(self.word()), backend=backend)
else:
raise ValueError("sign must be either 'positive' or 'negative'")
if G.coxeter_matrix().is_crystallographic():
- return Polyhedron(BV, ambient_dim = G.rank()) + BC
+ return Polyhedron(BV, ambient_dim=G.rank(), backend=backend) + BC
else:
- from sage.rings.real_double import RDF
- return Polyhedron(BV, ambient_dim = G.rank(), base_ring = RDF) + BC
-
+ if backend == 'cdd':
+ from sage.rings.real_double import RDF as base_ring
+ else:
+ from sage.rings.qqbar import AA as base_ring
+ return Polyhedron(BV, ambient_dim=G.rank(), base_ring=base_ring, backend=backend) + BC
+
from sage.misc.superseded import deprecated_function_alias
brick_polytope = deprecated_function_alias(32681, brick_polyhedron)
The backend
keyword is missing anyway and should be added.
In can be documented similar to what is done in src/sage/geometry/polyhedron/library.py
.
A general remark: A keyword assignment should not have spaces guarding =
: Polyhedron(backend='cdd')
.
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
fb266bc | re-added brick_polytope() as deprecated method. Examples for brick_polehedron() fixed |
77e4e6e | Replaced brick polytope by brick polyhedron in documentaion. Methods to be changed/rewritten: kappa_preimage() of facets, is_vertex() of facets, brick_fan of subword complex, minkowski_summand of subword complex. |
5339265 | method is_vertex() for facets rewritten |
93177de | Doc for minkowski_summand() of subword complex and kappa_preimage() of facets |
9425104 | rewritten brick_fan() for subword comlexes. Now correct and generalized to coincide with the normal fan of brick_polyhedron() |
01bf6b8 | more details in the doc of upper_root_configuration |
0ad8eb4 | used deprecated_function_alias for brick_polytope instead of warn |
e918cce | corrected the deprecation number |
2407df9 | added missing 'optional - gap 3' flags |
5191ab7 | Merge branch 'u/gh-DennisJahn/changing_brick_polytopes_of_subword_complexes_to_brick_polyhedra' of trac.sagemath.org:sage into t/32681/changing_brick_polytopes_of_subword_complexes_to_brick_polyhedra |
Branch pushed to git repo; I updated commit sha1. New commits:
c52f434 | style changes of 32669 as mentioned by gh-kliem |
Branch pushed to git repo; I updated commit sha1. New commits:
39b0d6b | part 2 of style changes as mentioned by gh-kliem |
- - ``backend`` -- string (default: ``'ccd'``) -- The backend to use to create the polyhedron.
+ - ``backend`` -- string (default: ``'cdd'``); the backend to use to create the polyhedron
and
- - ``backend`` -- string (default: ``'cdd'``) The backend to use to create the polyhedron.
+ - ``backend`` -- string (default: ``'cdd'``); the backend to use to create the polyhedron
The above comment was edited to also remove the trailing period.
Branch pushed to git repo; I updated commit sha1. New commits:
9a9421b | double d's are doubly confusing |
Branch pushed to git repo; I updated commit sha1. New commits:
f127591 | lazy import for better startup time |
Branch pushed to git repo; I updated commit sha1. New commits:
e46af36 | LazyImport didn't work, corrected real_double to qqbar for import of AA, backend normaliz does work now |
Stalled in needs_review
or needs_info
; likely won't make it into Sage 9.5.
merge conflict (red branch) => needs work
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
Branch pushed to git repo; I updated commit sha1. New commits:
9ca2b2f | added Knutson Miller 2004 and Pilaud Stump 2015 to master reference file |
8164229 | replacing brick polytopes by brick polyhedra, marked brick polytope as deprecated function, extended brick vectors with a sign for choice of convention, generalized brick fan for brick polyhedra, switched references for master reference file |
Branch pushed to git repo; I updated commit sha1. New commits:
679d177 | minor doc change |
Branch pushed to git repo; I updated commit sha1. New commits:
620abf6 | doc intro rewritten for brick polyhedra |
generalize the method brick_polytope() of sage.combinat.subword_complex.py to brick_polyhedron() as done in
https://arxiv.org/abs/2103.03715
Depends on #32669
CC: @stumpc5 @jplab @kliem
Component: combinatorics
Keywords: subword complex, brick vector, brick polyhedron, brick polytope
Author: Dennis Jahn
Branch/Commit: u/gh-DennisJahn/changing_brick_polytopes_of_subword_complexes_to_brick_polyhedra @
b3abcc9
Issue created by migration from https://trac.sagemath.org/ticket/32681