Opened 14 years ago
Closed 14 years ago
#2367 closed enhancement (invalid)
[with patch, positive review] Extend invariant_generators to the case of Matrix Groups over number fields
Reported by: | SimonKing | Owned by: | joyner |
---|---|---|---|
Priority: | major | Milestone: | sage-2.10.3 |
Component: | group theory | Keywords: | invariant ring, matrix group |
Cc: | wdj | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This ticket is strongly related with ticket #2348. I fix here a doc test failure that is introduced by the patch from #2348, and the new functionality that i introduce here relies on the patch from #2348.
Problem: Let G be a finite matrix group. So far, G.invariant_generators() worked only if G was defined over the rationals or over GF(prime). Solution: Singular also provides simple algebraic extensions over these fields, so, it just requires a more careful definition of a singular ring inside the function.
After first applying the patch from #2348 and then applying the new patch, the doc tests of matrix_group.py should pass, and the following should work:
sage: F=CyclotomicField(8) sage: z=F.gen() sage: a=z+1/z sage: b=z^2 sage: MS=MatrixSpace(F,2,2) sage: g1=MS([[1/a,1/a],[1/a,-1/a]]) sage: g2=MS([[1,0],[0,b]]) sage: g3=MS([[b,0],[0,1]]) sage: G=MatrixGroup([g1,g2,g3]) sage: G.invariant_generators() [x1^8 + 14*x1^4*x2^4 + x2^8, x1^24 + 10626/1025*x1^20*x2^4 + 735471/1025*x1^16*x2^8 + 2704156/1025*x1^12*x2^12 + 735471/1025*x1^8*x2^16 + 10626/1025*x1^4*x2^20 + x2^24]
Attachments (1)
Change History (8)
comment:1 Changed 14 years ago by
- Type changed from defect to enhancement
comment:2 follow-ups: ↓ 3 ↓ 5 Changed 14 years ago by
- Summary changed from [with patch, needs review] Extend invariant_generators to the case of Matrix Groups over number fields to [with patch, positive review pending] Extend invariant_generators to the case of Matrix Groups over number fields
comment:3 in reply to: ↑ 2 Changed 14 years ago by
Replying to wdj:
The patches (first 2348 then this one) applied cleanly and the above code ran. However, sage -testall failed. Here is one failure: ...
Clearly the doctest failure in matrix_group_element.py has a trivial fix: The doctest expects output that is incorrect as soon as one switches to an algebraic extension of the rationals:
Expected:
'[[Z(7)^0,0*Z(7)],[0*Z(7),Z(7)^2]]'
Got:
'[[Z(7)^0,0*Z(7)],[0*Z(7),Z(7)^2]]*One(GF(7))'
In gap:
gap> x:=Indeterminate(Rationals,"x");; gap> p:=x^4+3*x^2+1;; gap> e:=AlgebraicExtension(Rationals,p); <algebraic extension over the Rationals of degree 4> gap> M:=[[1,GeneratorsOfField(e)[1]^2]]; [ [ 1, (a^2) ] ] gap> IsMatrix(M); false gap> IsMatrix(M*One(e)); true
Hence, in general the modified output is needed.
There were other failures,
sage -t devel/sage-matgp3/sage/rings/polynomial/groebner_fan.py sage -t devel/sage-matgp3/sage/rings/number_field/totallyreal.py sage -t devel/sage-matgp3/sage/plot/plot.pybut they may be unrelated since they were already reported by Jaap Spies on sage-devel for a clean install.
I think so, too. I am about to provide new patches for this ticket and for #2348.
comment:4 Changed 14 years ago by
- Milestone changed from sage-3.0 to sage-2.10.3
Changed 14 years ago by
First apply the patches from #2348, then apply this patch. It extends the method invariant_generators to the case of finite matrix groups over number fields
comment:5 in reply to: ↑ 2 Changed 14 years ago by
Replying to wdj:
The patches (first 2348 then this one) applied cleanly and the above code ran.
Now i changed the patches of #2348 and of this ticket. So, a re-check is needed.
However, sage -testall failed. Here is one failure:
...
The following tests failed: ...
sage -t devel/sage-matgp3/sage/rings/polynomial/groebner_fan.py sage -t devel/sage-matgp3/sage/rings/number_field/totallyreal.py sage -t devel/sage-matgp3/sage/plot/plot.py
These three tests fail on my system as well - with and without the patches. So, it doesn't seem to be related.
But with the patches (that partially add further doc tests), the following clearly related tests pass:
- matrix_group.py
- matrix_group_element.py
- number_field.py
- number_field_element.pyx
- matrix1.pyx
comment:6 Changed 14 years ago by
- Summary changed from [with patch, positive review pending] Extend invariant_generators to the case of Matrix Groups over number fields to [with patch, positive review] Extend invariant_generators to the case of Matrix Groups over number fields
This applies cleanly (first 2348 then this one) to 2.10.3.rc0. It also passes sage -testall (except for the usual 3 that fail, as reported first by Jaap). Excellent patch. Recommend acceptance.
comment:7 Changed 14 years ago by
- Resolution set to invalid
- Status changed from new to closed
This ticket, together with #2348, is now ticket #2395. First reason is that we got a new sage pre-release. Second reason is that my suggestions for fixing the gap interface (#2348) changed. Third reason is that #2348 and this ticket belong closely together, hence, they should be worked on in one ticket.
The patches (first 2348 then this one) applied cleanly and the above code ran. However, sage -testall failed. Here is one failure:
This would be easy to fix of course but, for the failure I cannot recommend acceptance at this time.
There were other failures,
but they may be unrelated since they were already reported by Jaap Spies on sage-devel for a clean install.