
<ManSection>
  <Filt Name="IsMagmaWithZeroAdjoined" Arg='M' Type="Category"/>
  <Returns><K>true</K> or <K>false</K>.</Returns>
  <Description>
  <C>IsMagmaWithZeroAdjoined</C> returns <K>true</K> if the magma <A>M</A> was
  created using <Ref Attr="InjectionZeroMagma"/> or
  <Ref Attr="MagmaWithZeroAdjoined"/> and returns <K>false</K> if it was not.
<Example><![CDATA[
gap> S:=Semigroup(Transformation([1,1,1]), Transformation([1,3,2]));;
gap> IsMagmaWithZeroAdjoined(S);
false
gap> M:=MagmaWithZeroAdjoined(S);
<<transformation semigroup of degree 3 with 2 generators>
  with 0 adjoined>
gap> IsMagmaWithZeroAdjoined(M);
true
]]></Example>
  </Description>
</ManSection>

<ManSection>
  <Attr Name="InjectionZeroMagma" Arg='M'/>
  <Attr Name="MagmaWithZeroAdjoined" Arg='M'/>
  <Description>
  <Ref Attr="InjectionZeroMagma"/> returns an embedding from the magma <A>M</A>
  into a new magma formed from <A>M</A> by adjoining a single new element
  which is the multiplicative zero of the resulting magma.
  The elements of the new magma form a family of elements in the
  category <Ref Filt="IsMultiplicativeElementWithZero"/> and the magma
  itself satisfies <Ref Filt="IsMagmaWithZeroAdjoined"/>.<P/>

  <C>MagmaWithZeroAdjoined</C> is just shorthand for
  <C>Range(InjectionZeroMagma(<A>M</A>)))</C>.<P/>

  If <C>N</C> is a magma with zero adjoined, then the embedding
  used to create <C>N</C> can be recovered using
  <Ref Attr="UnderlyingInjectionZeroMagma"/>.
<Example><![CDATA[
gap> S:=Monoid(Transformation( [ 7, 7, 5, 3, 1, 3, 7 ] ),
> Transformation( [ 5, 1, 4, 1, 4, 4, 7 ] ));;
gap> MultiplicativeZero(S);
Transformation( [ 7, 7, 7, 7, 7, 7, 7 ] )
gap> T:=MagmaWithZeroAdjoined(S);
<<transformation monoid of degree 7 with 2 generators>
  with 0 adjoined>
gap> map:=UnderlyingInjectionZeroMagma(T);;
gap> x:=Transformation( [ 7, 7, 7, 3, 7, 3, 7 ] );;
gap> x^map;
<monoid with 0 adjoined elt: Transformation( [ 7, 7, 7, 3, 7, 3, 7 ]
 )>
gap> PreImage(map, x^map)=x;
true
]]></Example>
  </Description>
</ManSection>

<ManSection>
  <Attr Name="UnderlyingInjectionZeroMagma" Arg='M'/>
  <Description>
  <C>UnderlyingInjectionZeroMagma</C>
  returns the embedding used to create the magma with zero adjoined
  <A>M</A>.
<Example><![CDATA[
gap> S:=Monoid(Transformation( [ 8, 7, 5, 3, 1, 3, 8, 8 ] ),
> Transformation( [ 5, 1, 4, 1, 4, 4, 7, 8 ] ));;
gap> MultiplicativeZero(S);
Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8 ] )
gap> T:=MagmaWithZeroAdjoined(S);
<<transformation monoid of degree 8 with 2 generators>
  with 0 adjoined>
gap> UnderlyingInjectionZeroMagma(T);
MappingByFunction( <transformation monoid of degree 8 with 2
 generators>, <<transformation monoid of degree 8 with 2 generators>
  with 0 adjoined>, function( elt ) ... end, function( x ) ... end )
]]></Example>
  </Description>
</ManSection>

