diff --git a/gap/quasigroups.gi b/gap/quasigroups.gi index 54df1f6..5d9ea35 100644 --- a/gap/quasigroups.gi +++ b/gap/quasigroups.gi @@ -254,6 +254,30 @@ function( Q, name ) F := FamilyObj( Representative( Q ) ); F!.elmNamePrefix := name; end); +############################################################################# +## +#O BindElmNames( M ) +## +## For each element e of the magma , binds the identifier named String(e) +## to e. +## collection . For quasigroups, loops, and possibly related structures +## this changes the prefix with which the elements of that family are printed. + +InstallMethod( BindElmNames, "for a magma", + [ IsMagma ], + function( M ) + local e, nm; + for e in Elements(M) do + nm := String(e); + BindGlobal(nm, e); + MakeReadWriteGlobal(nm); + od; + return; +end); + + F := FamilyObj( Representative( Q ) ); + F!.elmNamePrefix := name; +end); ############################################################################# ##