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

Prepare for GAP 4.12 #1671

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Prepare for GAP 4.12 #1671

merged 1 commit into from
Nov 10, 2022

Conversation

fingolfin
Copy link
Member

No description provided.

@fingolfin
Copy link
Member Author

Tests fail in the invariant code:

julia> K, a = CyclotomicField(9, "a")
(Cyclotomic field of order 9, a)

julia> M = matrix(K, 2, 2, [ a, 0, 0, -a^3 ])
[a      0]
[0   -a^3]

julia> RG = invariant_ring(M)
Invariant ring of
Matrix group of degree 2 over K
with generators
AbstractAlgebra.Generic.MatSpaceElem{nf_elem}[[a 0; 0 -a^3]]

julia> invars = primary_invariants(RG)
ERROR: Error thrown by GAP: Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `Enumerator' on 1 arguments at /Users/mhorn/.julia/artifacts/277259a1ec06cd0e4f6f209ea1a0608cc52e2a1a/share/gap/lib/methsel2.g:249 called from
Enumerator( C ) at /Users/mhorn/.julia/artifacts/277259a1ec06cd0e4f6f209ea1a0608cc52e2a1a/share/gap/lib/coll.gi:831 called from
for x in v do
p := Position( f, x );
sy := n * sy + (p - 1);
od; at /Users/mhorn/.julia/artifacts/277259a1ec06cd0e4f6f209ea1a0608cc52e2a1a/share/gap/lib/dicthf.gi:125 called from
hash!.intKeyFun( key ) at /Users/mhorn/.julia/artifacts/277259a1ec06cd0e4f6f209ea1a0608cc52e2a1a/share/gap/lib/dict.gi:759 called from
AddDictionary( dict, img, Length( orb ) ); at /Users/mhorn/.julia/artifacts/277259a1ec06cd0e4f6f209ea1a0608cc52e2a1a/share/gap/lib/grpmat.gi:307 called from
DoSparseLinearActionOnFaithfulSubset( grp, OnRight, sort ) at /Users/mhorn/.julia/artifacts/277259a1ec06cd0e4f6f209ea1a0608cc52e2a1a/share/gap/lib/grpmat.gi:502 called from
...  at *defin*:0

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] ThrowObserver(depth::Int32)
   @ GAP ~/Projekte/OSCAR/GAP.jl/src/GAP.jl:67

I'll look into what causes this regression. But I'll also see if we can't improve this backtrace at least a bit, as right now it gives zero indication as to which Julia code lead to it ...

@fingolfin
Copy link
Member Author

@ThomasBreuer is working on a fix in gap-system/gap#5188 I think

@fingolfin
Copy link
Member Author

The updated GAP_lib_jll with the fix by @ThomasBreuer seems to work fine. Just pushed another minor fix for a docstring, hopefully this is complete now.

@fingolfin fingolfin marked this pull request as ready for review November 9, 2022 22:58
@thofma thofma enabled auto-merge (squash) November 10, 2022 05:24
@thofma thofma disabled auto-merge November 10, 2022 05:26
@thofma
Copy link
Collaborator

thofma commented Nov 10, 2022

Out of curiosity, was the transitivity function giving wrong results?

@thofma thofma requested a review from ThomasBreuer November 10, 2022 05:26
@fingolfin
Copy link
Member Author

Yes and no... one could call it buggy, but strictly speaking, it just behaved weirdly in edge cases that were not covered explicitly by the documentation. Specifically, if you gave an action "domain" that was not actually orbit-closed under the action, it gave strange results... Like if you ask for the transitivity of Sym(5) acting on {1,2,3}... well, it doesn't really act on it, does it? But it still gave "3" as answer... Wwhy? dunno what good answer to give... one could certainly come up with a justification, but in the end most people I talked to agreed this is more confusing and source of potential bugs than helpful. So we changed it in GAP. Right now it returns 0 because it does not act transitively -- it doesn't act at all on that set. So perhaps instead of 0 we should raise an error, I am open to that, too. But the old behavior IMHO was just bad and confusing.

@thofma
Copy link
Collaborator

thofma commented Nov 10, 2022

Ah thanks for the explanation. I did not check too carefully. FWIW, I would opt for error.

@fingolfin
Copy link
Member Author

Yeah... I now actually wonder why we didn't go for an error on the GAP side, too -- @ThomasBreuer do you remember?

BTW this affects other things, e.g. the primitivity check.

@fingolfin
Copy link
Member Author

(On the GAP side, I'd return fail instead of an error, as that makes it easier to handle there... on the Julia/OSCAR said, we could then turn that into an exception)

@ThomasBreuer
Copy link
Member

ThomasBreuer commented Nov 10, 2022

Concerning the definition of transitivity:
Yes, this question should have been raised in the discussion about gap-system/gap/pull/4907 or gap-system/gap/issues/4904 because the same arguments hold for Transitivity that are valid for IsTransitive.

I will create a pull request for GAP to change Transitivity, and will also create a pull request for Oscar that changes transitivity independent of the underlying GAP code.

@thofma thofma merged commit 06a9667 into master Nov 10, 2022
@thofma thofma deleted the mh/gap-4.12 branch November 10, 2022 10:58
fingolfin pushed a commit that referenced this pull request Nov 17, 2022
* changed `transitivity`

`transitivity` now throws an exception if the group does not act
on the given set.

The problem was observed and discussed in pull request  #1671.

* adjusted the transitivity tests

adjusted the tests to the changed definition

* adjusted one more test

* follow the advices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants