Opened 5 years ago
Last modified 5 years ago
#18863 new defect
Subgroup doesn't work with number field unit group
Reported by: | katestange | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.8 |
Component: | group theory | Keywords: | unit group, number field, subgroup, gap |
Cc: | katestange | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
I think we would like the following code to work:
N.<a> = NumberField(x^3+2) G = N.unit_group() g = G.random_element() G.subgroup([g])
But at the moment the last line produces a runtime error
RuntimeError: Gap produced error output Error, Variable: 'u1' must have a value
This is currently reproducible on the single cell sage server and sage cloud. It does not seem to depend on the number field in question.
As far as I can tell, subgroup() is unable to recognise the input as elements of the group. I think the problem is that one cannot pass the argument 'names' when creating the unit group. For example, the following works:
H = AbelianGroup(5,[2],names=list("pqrst")) H.subgroup([H.random_element()])
but the following fails in exactly the same way as the unit group example
H = AbelianGroup(5,[2]) H.subgroup([H.random_element()])
Change History (7)
comment:1 Changed 5 years ago by
- Priority changed from minor to major
comment:2 Changed 5 years ago by
- Description modified (diff)
comment:3 Changed 5 years ago by
- Description modified (diff)
comment:4 Changed 5 years ago by
- Description modified (diff)
comment:5 Changed 5 years ago by
comment:6 Changed 5 years ago by
- Keywords gap added
comment:7 Changed 5 years ago by
I note that the same problem arises with class groups, which are also built using AbelianGroupWithValues
. However in the following case, it is possible to obtain a subgroup of a group with values:
sage: U = Zmod(30).unit_group() sage: type(U) <class 'sage.groups.abelian_gps.values.AbelianGroupWithValues_class_with_category'> sage: U.subgroup([U.random_element()]) Multiplicative Abelian subgroup isomorphic to C2 generated by {f0*f1^2}
I have tried, but failed, to see why the other cases lead to gap
errors.
I asked for a workaround here, and there is some more information from other users there: http://ask.sagemath.org/question/27274/subgroup-of-number-field-unit-group/