Opened 8 years ago

Closed 7 years ago

#4608 closed defect (fixed)

roots method broken for root system lattices

Reported by: saliola Owned by: hivert
Priority: major Milestone: sage-4.4.1
Component: combinatorics Keywords:
Cc: sage-combinat Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

This works:

sage: R = RootSystem(['A',2])
sage: R.ambient_lattice()
Ambient lattice of the Root system of type ['A', 2]
sage: R.ambient_lattice().roots()
[(1, -1, 0), (1, 0, -1), (0, 1, -1), (-1, 1, 0), (-1, 0, 1), (0, -1, 1)]
sage: 

But this method does not work for any of the other associated lattices.

sage: R = RootSystem(['A',2])
sage: R.coroot_lattice().roots()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...
AttributeError: 'RootSpace' object has no attribute 'positive_roots'
sage: R.coweight_lattice().roots()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...
AttributeError: 'WeightSpace' object has no attribute 'positive_roots'
sage: R.root_lattice().roots()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...
AttributeError: 'RootSpace' object has no attribute 'positive_roots'
sage: R.weight_lattice().roots()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
...
AttributeError: 'WeightSpace' object has no attribute 'positive_roots'

Change History (4)

comment:1 Changed 8 years ago by nthiery

  • Cc sage-combinat added

comment:2 Changed 7 years ago by hivert

  • Owner changed from mhansen to hivert
  • Report Upstream set to N/A

This ticket should be closed. The issues is now fixed:

----------------------------------------------------------------------
| Sage Version 4.3.4, Release Date: 2010-03-19                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
Loading Sage library. Current Mercurial branch is: combinat
sage: R = RootSystem(['A',2])
sage: R.coroot_lattice().roots()
[alphacheck[1], alphacheck[2], alphacheck[1] + alphacheck[2], -alphacheck[1], -alphacheck[2], -alphacheck[1] - alphacheck[2]]
sage: R.coweight_lattice().roots()
[-Lambdacheck[1] + 2*Lambdacheck[2], Lambdacheck[1] + Lambdacheck[2], 2*Lambdacheck[1] - Lambdacheck[2], Lambdacheck[1] - 2*Lambdacheck[2], -Lambdacheck[1] - Lambdacheck[2], -2*Lambdacheck[1] + Lambdacheck[2]]
sage: R.root_lattice().roots()
[alpha[2], alpha[1], alpha[1] + alpha[2], -alpha[2], -alpha[1], -alpha[1] - alpha[2]]
sage: R.weight_lattice().roots()
[-Lambda[1] + 2*Lambda[2], Lambda[1] + Lambda[2], 2*Lambda[1] - Lambda[2], Lambda[1] - 2*Lambda[2], -Lambda[1] - Lambda[2], -2*Lambda[1] + Lambda[2]]

Florent

comment:3 Changed 7 years ago by mvngu

It works now:

[mvngu@sage graphs]$ sage
----------------------------------------------------------------------
| Sage Version 4.4, Release Date: 2010-04-24                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: R = RootSystem(['A',2])
sage: R.ambient_lattice()
Ambient lattice of the Root system of type ['A', 2]
sage: R.ambient_lattice().roots()
[(1, -1, 0), (1, 0, -1), (0, 1, -1), (-1, 1, 0), (-1, 0, 1), (0, -1, 1)]
sage: R = RootSystem(['A',2])
sage: R.coroot_lattice().roots()
[alphacheck[1], alphacheck[2], alphacheck[1] + alphacheck[2], -alphacheck[1], -alphacheck[2], -alphacheck[1] - alphacheck[2]]
sage: R.coweight_lattice().roots()
[-Lambdacheck[1] + 2*Lambdacheck[2], Lambdacheck[1] + Lambdacheck[2], 2*Lambdacheck[1] - Lambdacheck[2], Lambdacheck[1] - 2*Lambdacheck[2], -Lambdacheck[1] - Lambdacheck[2], -2*Lambdacheck[1] + Lambdacheck[2]]
sage: R.root_lattice().roots()
[alpha[2], alpha[1], alpha[1] + alpha[2], -alpha[2], -alpha[1], -alpha[1] - alpha[2]]
sage: 
sage: R.weight_lattice().roots()
[-Lambda[1] + 2*Lambda[2], Lambda[1] + Lambda[2], 2*Lambda[1] - Lambda[2], Lambda[1] - 2*Lambda[2], -Lambda[1] - Lambda[2], -2*Lambda[1] + Lambda[2]]

comment:4 Changed 7 years ago by mvngu

  • Resolution set to fixed
  • Status changed from new to closed

Close as fixed by #4326:

09:22 < hivert> mvngu: this was fixed by #4326: Root systems: refactoring and 
                improvements
09:23 < hivert> And some similar doctests are performed. So I don't think more 
                work is need on this one. 
09:24 < hivert> I should have guessed ! #4326 is a huge patch with no less than 
                6 authors :-)
09:24 < hivert> Please close the ticket.
Note: See TracTickets for help on using tickets.