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

Matrix groups over ZZ (and possibly other rings) weirdness #4160

Open
lgoettgens opened this issue Sep 27, 2024 · 0 comments
Open

Matrix groups over ZZ (and possibly other rings) weirdness #4160

lgoettgens opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working topic: groups

Comments

@lgoettgens
Copy link
Member

Describe the bug
The trivial matrix group of dim 1x1 behaves differently depending on the base ring.

To Reproduce

julia> GQQ = matrix_group([matrix(QQ, 1, 1, [1])])
Matrix group of degree 1
  over rational field

julia> GZZ = matrix_group([matrix(ZZ, 1, 1, [1])])
Matrix group of degree 1
  over integer ring

julia> describe(GQQ)
"1"

julia> describe(GZZ)
ERROR: MethodError: no method matching isfinite(::ZZRing)

Closest candidates are:
  isfinite(::DecFP.Dec128)
   @ DecFP ~/.julia/packages/DecFP/Cud5F/src/DecFP.jl:540
  isfinite(::RealFieldElem)
   @ Nemo ~/.julia/packages/Nemo/tzyHK/src/arb/Real.jl:476
  isfinite(::Missing)
   @ Base missing.jl:101
  ...

Stacktrace:
 [1] is_infinite(x::ZZRing)
   @ Nemo ~/.julia/packages/Nemo/tzyHK/src/Infinity.jl:105
 [2] describe(G::MatrixGroup{ZZRingElem, ZZMatrix})
   @ Oscar ~/code/julia/Oscar.jl/src/Groups/GAPGroups.jl:2443
 [3] top-level scope
   @ REPL[45]:1

julia> small_generating_set(GQQ)
1-element Vector{MatrixGroupElem{QQFieldElem, QQMatrix}}:
 [1]

julia> small_generating_set(GZZ)
ERROR: MethodError: no method matching isfinite(::ZZRing)

Closest candidates are:
  isfinite(::DecFP.Dec128)
   @ DecFP ~/.julia/packages/DecFP/Cud5F/src/DecFP.jl:540
  isfinite(::RealFieldElem)
   @ Nemo ~/.julia/packages/Nemo/tzyHK/src/arb/Real.jl:476
  isfinite(::Missing)
   @ Base missing.jl:101
  ...

Stacktrace:
 [1] is_infinite(x::ZZRing)
   @ Nemo ~/.julia/packages/Nemo/tzyHK/src/Infinity.jl:105
 [2] small_generating_set(G::MatrixGroup{ZZRingElem, ZZMatrix})
   @ Oscar ~/code/julia/Oscar.jl/src/Groups/GAPGroups.jl:641
 [3] top-level scope
   @ REPL[47]:1

This boils down to is_finite(::ZZRing) not being implemented. But I think adding this just fixes the symptom here, not the underlying issue. Instead,

if G isa MatrixGroup && is_infinite(base_ring(G))

and
if G isa MatrixGroup && is_infinite(base_ring(G))
and other similar places should have a workaround for is_finite not being available for base_ring(G).

Thanks to @flyingapfopenguin for making me aware of this issue.

@lgoettgens lgoettgens added bug Something isn't working topic: groups labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic: groups
Projects
None yet
Development

No branches or pull requests

1 participant