The class PPMonoidHom
is used for representing homomorphisms between
PPMonoid
s. Each indeterminate in the domain monoid maps into an
element of the codomain (i.e. a power product).
There are (currently) just two ways to create a PPMonoidHom
:
PPMonoid PPM1 = ...; PPMonoid PPM2 = ...; PPMonoidHom phi = IdentityHom(PPM1); vector<PPMonoidElem> images; ... fill images with elements of PPM2 ... PPMonoidHom psi = NewGeneralHom(PPM1, images);
The PPMonoidHom
object may be applied to a value by using normal
function call syntax: for instance
PPMonoidElem t = ...; PPMonoidHom phi = ...; cout << "phi applied to t gives " <, phi(t) << endl;
Given a PPMonoidHom
you can find out its domain and codomain:
domain(phi) |
the domain of phi as a PPMonoid |
codomain(phi) |
the codomain of phi as a PPMonoid |
Add some more special cases: e.g. permutations of the indets, and the "identity" between PPMonoids which differ on in their orderings.
Should we allow partial homs? e.g. one which maps x^2
to y
(so odd powers of x
have no image).