Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relabelled DynkinDiagram can has weird index set #24385

Closed
vit-tucek mannequin opened this issue Dec 16, 2017 · 5 comments
Closed

relabelled DynkinDiagram can has weird index set #24385

vit-tucek mannequin opened this issue Dec 16, 2017 · 5 comments

Comments

@vit-tucek
Copy link
Mannequin

vit-tucek mannequin commented Dec 16, 2017

Usually relabeling works nice but when one wants to relabel with symbolic variables the index set is in wrong order. The index set of the associated CartanType is however correct.

D = DynkinDiagram("A3")
print(D)
print(D.index_set())
var('a', 'b', 'c')
rsD = D.relabel({1:'a', 2:'b', 3:'c'})
print(rsD)
print(rsD.index_set())
rD = D.relabel({1:a, 2:b, 3:c})
print(rD)
print(rD.index_set())
print(rD.cartan_type().index_set())

Component: combinatorics

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/24385

@vit-tucek vit-tucek mannequin added this to the sage-8.2 milestone Dec 16, 2017
@tscrim
Copy link
Collaborator

tscrim commented Dec 16, 2017

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Dec 16, 2017

comment:1

This is not a bug as the ordering of the index set (which the ordering does not matter because it is a set) is determined by the vertices of the Dynkin diagram.

@tscrim tscrim removed this from the sage-8.2 milestone Dec 16, 2017
@vit-tucek
Copy link
Mannequin Author

vit-tucek mannequin commented Dec 16, 2017

comment:2

I guess my problem stems from the fact that index_set returns a tuple which is implicitly ordered. I think either it should return a set as its name suggest or the ordering should be consistent.

@tscrim
Copy link
Collaborator

tscrim commented Dec 16, 2017

comment:3

One needs an implicit ordering for the Cartan matrix. Also, anyone who does stuff with Lie/Coxeter types that I know would want this to be called index_set. Also, working with (frozen)sets is slower (and can be more difficult to work with) for common operations with the index set such as iteration.

There is no loss of generality for fixing an order, but why should one order be preferred over another? You are also getting different relabelings because the types are different too, so there is not really an inconsistency.

@vit-tucek
Copy link
Mannequin Author

vit-tucek mannequin commented Feb 20, 2018

comment:4

If you view Dynkin diagram as a directed graph then there are basically two orderings, right? But the thing is that there is a fixed ordering hidden in DynkinDiagram._cartan_type._index_set (or in DynkinDiagram.cartan_type().index_set(). So I think the question is if we want to admit it explicitly and just return this for DynkinDiagram.index_set(). I was actually bitten by this fact that DynkinDiagram.index_set() is NOT the index set of the Cartan type the Dynkin diagram encodes. If there is a good reason to keep it in this current form and (imho misleadingly) return just a tuple of vertices of the underlying directed graph, then I am fine with that. Otherwise I don't see any harm in making this simple change.

@mkoeppe mkoeppe closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants