| 1 | initial version |
What ended up working: once I have the list of symbols, as in
sage: lst=tuple(f'a{j}' for j in range(5,10))
the free group can be constructed by passing the list via the key word argument names rather than directly:
sage: Frgp=Groups().free(names=lst)
Then:
sage: Frgp([1,2])
a5*a6
tuple() isn't crucial in the definition of lst: list() works just as well.
The point is there's a difference between Groups().free(names=lst) and Groups().free(lst) that I don't quite fully grok at the moment, but the former will do what I want whereas the latter wasn't:
sage: Groups().free([var('a')])
Free group indexed by {a}
sage: Groups().free(names=[var('a')])
Free Group on generators {a}
As you can see, sage reports slightly different output depending on whether the list is passed via names= or directly.
| 2 | No.2 Revision |
What ended up working: once I have the list of symbols, as in
sage: lst=tuple(f'a{j}' for j in range(5,10))
the free group can be constructed by passing the list via the key word argument names rather than directly:
sage: Frgp=Groups().free(names=lst)
Then:
sage: Frgp([1,2])
a5*a6
tuple() isn't crucial in the definition of lst: list() works just as well.
The point is there's a difference between Groups().free(names=lst) and Groups().free(lst) that I don't quite fully grok at the moment, but the former will do what I want whereas the latter wasn't:
sage: Groups().free([var('a')])
Free group indexed by {a}
sage: Groups().free(names=[var('a')])
Free Group on generators {a}
As you can see, sage reports slightly different output depending on whether the list is passed via names= or directly. directly.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.