Skip to content

Magma/Group confusion #2400

@hulpke

Description

@hulpke

This is something that came up in the context of #2387, but really is an earlier problem that has nothing to do with these changes:

Start the master branch (from scratch and with -A to minimize complications) and add the following function (which makes some basic deductions from an objects order):

InstallOtherMethod(SetSize,true,[IsObject and IsAttributeStoringRep,IsObject],
  100, # override system setter
function(obj,sz)
  SetIsEmpty(obj,sz=0);
  SetIsTrivial(obj,sz=1);
  SetIsNonTrivial(obj,sz<>1);
  SetIsFinite(obj,sz<>infinity);
  TryNextMethod(); # to enforce size setting
end);

Now call (this is tested in one of the test files...)

AsGroup([(1,2)]);

and get an error message:

Error, Value property is already set the other way

The reason is that the calculation defines the empty submagma of the magma defined by [(1,2)].
Properties and implication make this submagma a group and thus it contains the trivial permutation, so is not empty (and has Size 1) but GAP has set before that it is empty. The new setter method just makes this visible.

What is at issue here? Code for Magmas? The implication that they could be groups? Or is it the test for AsGroup?

An easy fix would be to take the test out, but there might be some bug being hidden in the current master branch already.

Puzzled...

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugIssues describing general bugs, and PRs fixing themkind: bug: wrong resultIssues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions