Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions lib/liefam.gi
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ InstallOtherMethod( Embedding,
fi;

# Make the mapping object.
emb := Objectify( TypeOfDefaultGeneralMapping( Fam, LieFam,
emb := Objectify( NewType( GeneralMappingsFamily( Fam, LieFam ),
IsLieEmbeddingRep
and IsNonSPGeneralMapping
and IsMapping
Expand Down Expand Up @@ -455,18 +455,24 @@ InstallMethod( PreImagesElmNC,
return [ elm![1] ];
end );

# The embedding is a bijection of families, so every element of the
# range family has a preimage, and there is no range domain to test.
InstallMethod( PreImagesElm,
"for Lie embedding and Lie object in default representation",
FamRangeEqFamElm,
[ IsGeneralMapping and IsLieEmbeddingRep,
IsLieObject and IsPackedElementDefaultRep ], 0,
function( emb, elm )
if not ( elm in Range(emb) ) then
Error( "<elm> is not in the range of mapping <emb>" );
elif not ( elm in Image(emb) ) then
return [];
fi;
return PreImagesElmNC( emb, elm );
return [ elm![1] ];
end );

InstallMethod( PreImagesRepresentative,
"for Lie embedding and Lie object in default representation",
FamRangeEqFamElm,
[ IsGeneralMapping and IsLieEmbeddingRep,
IsLieObject and IsPackedElementDefaultRep ], 0,
function( emb, elm )
return elm![1];
end );

#############################################################################
Expand Down
15 changes: 15 additions & 0 deletions tst/testbugfix/2026-10-23-LieFamily-Embedding.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Embedding( Fam, LieFamily( Fam ) ) used to fail with a no method error
gap> F := FamilyObj( 1 );; L := LieFamily( F );;
gap> emb := Embedding( F, L );;
gap> 3 ^ emb = LieObject( 3 );
true
gap> PreImagesRepresentative( emb, LieObject( 3 ) );
3
gap> PreImagesElm( emb, LieObject( 3 ) );
[ 3 ]
gap> m := [ [ 1, 2 ], [ 3, 4 ] ];;
gap> F := FamilyObj( m );; emb := Embedding( F, LieFamily( F ) );;
gap> m ^ emb = LieObject( m );
true
gap> PreImagesRepresentative( emb, LieObject( m ) ) = m;
true
Loading