... one-to-one?
d) Is the function onto?
11. Let f : A → B and g : B → C be functions. Prove each of the following:
a) If f and g are one-to-one, then g ◦ f is one-to-one.
b) If g ◦ f is one-to-one, ... one-to-one.
c) If f is onto and g ◦ f is one-to-one, then g is one-to-one.
d) If f and g are onto, then g ◦ f is onto.
e) If g ◦ f is onto, then g is onto.
f) If g ◦ f is onto and g is one-to-one,...
... spy-point,
type the nospy goal
| ?- nospy p.
To remove p, q, and r as spy-points type the goal
| ?- nospy [p, q, r].
To remove all spy-points type the goal
| ?- nospyall.
120 Prolog Experiments ... string.
moore(In, Out) :- start(I), execute(I, In, Out).
execute(S, [ ], [ ]) :- t(S, [ ], Y, Z).
execute(S, [ ], [X]) :- t(S, X, Y, Z).
execute(S, [H|T], Y) :-...
... corresponding subset.
A correspondence with these properties is called a one-to-one correspondence (or bijec-
tion). If we can make a one-to-one correspondence b etween the elements of two sets, then
they ... fields: the first, containing an 8-character abbreviation of an employee’s
name; the second, M or F for sex; the third, the birthday of the employee, in the format
mm-dd-yy (disregarding t...
... prove that the functions f and g ◦ f are one-one but g is not one-one.
Solution: By definiton, it is clear that f is indeed one-one and g is not one-one. But
g ◦f(x) = g(f (x)) = g(2x) =
2x
2
= ... Then (h ◦ g) ◦f = h ◦ (g ◦f) (associativity holds).
2. If f and g are one-to-one then the function g ◦ f is also one-to-one.
3. If f and g are onto then the function g ◦ f is also onto.
Proof. ... m...