let I be set ; for A, B being ManySortedSet of I st A is_transformable_to B holds
for f being ManySortedFunction of A,B st f is "onto" holds
ex g being ManySortedFunction of B,A st f ** g = id B
let A, B be ManySortedSet of I; ( A is_transformable_to B implies for f being ManySortedFunction of A,B st f is "onto" holds
ex g being ManySortedFunction of B,A st f ** g = id B )
assume A1:
A is_transformable_to B
; for f being ManySortedFunction of A,B st f is "onto" holds
ex g being ManySortedFunction of B,A st f ** g = id B
let f be ManySortedFunction of A,B; ( f is "onto" implies ex g being ManySortedFunction of B,A st f ** g = id B )
assume A2:
f is "onto"
; ex g being ManySortedFunction of B,A st f ** g = id B
deffunc H2( object ) -> rng-retract of f . $1 = the rng-retract of f . $1;
consider g being ManySortedSet of I such that
A3:
for i being object st i in I holds
g . i = H2(i)
from PBOOLE:sch 4();
g is Function-yielding
then reconsider g = g as ManySortedFunction of I ;
g is ManySortedFunction of B,A
proof
let x be
object ;
PBOOLE:def 15 ( not x in I or g . x is Element of bool [:(B . x),(A . x):] )
assume A4:
x in I
;
g . x is Element of bool [:(B . x),(A . x):]
then A5:
g . x = H2(
x)
by A3;
then A6:
(
dom (g . x) = rng (f . x) &
rng (f . x) = B . x )
by A2, A4, ALGSPEC1:def 2;
(
A . x <> {} implies
B . x <> {} )
by A4, A1, PZFMISC1:def 3;
then A7:
dom (f . x) = A . x
by FUNCT_2:def 1;
A8:
(
(f . x) * (g . x) = id (B . x) &
dom (id (B . x)) = B . x )
by A5, A6, ALGSPEC1:def 2;
rng (g . x) c= dom (f . x)
hence
g . x is
Element of
bool [:(B . x),(A . x):]
by A6, A7, FUNCT_2:2;
verum
end;
then reconsider g = g as ManySortedFunction of B,A ;
take
g
; f ** g = id B
hence
f ** g = id B
; verum