FunctionMap
(
any domain,
any codomain,
func phi,
func psi
)
->
map()
Description
Create a map with domain 'domain' and codomain 'codomain' from the function 'phi'. The function 'psi' is used for the computation of preimages.
Examples
x_add_with_inv := function(a)
# this function returns a map that adds 'a'
local phi, psi;
phi := function(b) return b+a; end;
psi := function(c) return c-a; end;
return Map(Z,Z,phi,psi);
end;
x_f := x_add_with_inv(5);
x_f(2);
Image(3,x_f);
Preimage(8,x_f);
Preimage(x_f(900),x_f);
|