Skip to content

Conversation

@TWiedemann
Copy link
Contributor

The documentation of InverseGeneralMapping claims that Inverse also works for bijective general mappings; however, this is only true for bijective general mappings where source = range. This is correctly explained in the documentation of Inverse, which I have referenced.

I also removed the paragraph "See the introduction..." because it seems to be outdated. There is no such explanation in the introduction of the chapter.

Further, there was an incorrect section reference in the introduction of the chapter.

Text for release notes

none

@limakzi
Copy link
Member

limakzi commented Dec 10, 2025

I like it and I feel the difference.

Example.

gap> M := OneSmallAntimagma(4);;
gap> N := OneSmallAntimagma(4);;
gap> mns := List([1..4], i -> DirectProductElement([Elements(M)[i], Elements(N)[i]]));;
gap> kappa := GeneralMappingByElements(M, N, mns);;
gap> InverseGeneralMapping(kappa);
InverseGeneralMapping( <general mapping: Domain([ m1, m2, m3, m4 ]) -> Domain([ m1, m2, m3, m4 ]) > )
gap> Inverse(kappa);
#I  The mapping must be bijective and have source=range
#I  You might want to use `InverseGeneralMapping'
fail
gap> Inverse(InverseGeneralMapping(kappa));
#I  The mapping must be bijective and have source=range
#I  You might want to use `InverseGeneralMapping'
fail

If we fix this, I am wondering about the naming InverseGeneralMapping for such mappings:

## The whole domain is mapped to the first element.
gap> mns := List([1..4], i -> DirectProductElement([Elements(M)[i], Elements(N)[1]]));;
gap> kappa := GeneralMappingByElements(M, N, mns);;
gap> InverseGeneralMapping(kappa);

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fingolfin fingolfin added topic: documentation Issues and PRs related to documentation backport-to-4.15 labels Dec 15, 2025
@fingolfin
Copy link
Member

@limakzi I don't understand what you mean by

If we fix this, I am wondering about the naming InverseGeneralMapping for such mappings

@fingolfin fingolfin merged commit d213884 into gap-system:master Dec 15, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-4.15 topic: documentation Issues and PRs related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants