gap icon indicating copy to clipboard operation
gap copied to clipboard

Improve documentation of `InverseGeneralMapping`

Open TWiedemann opened this issue 1 month ago • 1 comments

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

TWiedemann avatar Dec 10 '25 13:12 TWiedemann

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);

limakzi avatar Dec 10 '25 17:12 limakzi

@limakzi I don't understand what you mean by

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

fingolfin avatar Dec 15 '25 13:12 fingolfin