defpred S1[ object , object ] means for s being Element of S st s = $1 holds
$2 = NHReverse (s,X);
set I = the carrier of S;
set FG = OSFreeGen X;
A1: for i being object st i in the carrier of S holds
ex u being object st S1[i,u]
proof
let i be object ; :: thesis: ( i in the carrier of S implies ex u being object st S1[i,u] )
assume i in the carrier of S ; :: thesis: ex u being object st S1[i,u]
then reconsider s = i as SortSymbol of S ;
take NHReverse (s,X) ; :: thesis: S1[i, NHReverse (s,X)]
let s1 be Element of S; :: thesis: ( s1 = i implies NHReverse (s,X) = NHReverse (s1,X) )
assume s1 = i ; :: thesis: NHReverse (s,X) = NHReverse (s1,X)
hence NHReverse (s,X) = NHReverse (s1,X) ; :: thesis: verum
end;
consider H being Function such that
A2: ( dom H = the carrier of S & ( for i being object st i in the carrier of S holds
S1[i,H . i] ) ) from CLASSES1:sch 1(A1);
reconsider H = H as ManySortedSet of the carrier of S by A2, PARTFUN1:def 2, RELAT_1:def 18;
for x being object st x in dom H holds
H . x is Function
proof
let i be object ; :: thesis: ( i in dom H implies H . i is Function )
assume i in dom H ; :: thesis: H . i is Function
then reconsider s = i as SortSymbol of S ;
H . s = NHReverse (s,X) by A2;
hence H . i is Function ; :: thesis: verum
end;
then reconsider H = H as ManySortedFunction of the carrier of S by FUNCOP_1:def 6;
for i being object st i in the carrier of S holds
H . i is Function of ((OSFreeGen X) . i),((PTVars X) . i)
proof
let i be object ; :: thesis: ( i in the carrier of S implies H . i is Function of ((OSFreeGen X) . i),((PTVars X) . i) )
assume i in the carrier of S ; :: thesis: H . i is Function of ((OSFreeGen X) . i),((PTVars X) . i)
then reconsider s = i as SortSymbol of S ;
A3: (PTVars X) . s = PTVars (s,X) by Def24;
A4: H . i = NHReverse (s,X) by A2;
(OSFreeGen X) . s = OSFreeGen (s,X) by Def26;
hence H . i is Function of ((OSFreeGen X) . i),((PTVars X) . i) by A3, A4; :: thesis: verum
end;
then reconsider H = H as ManySortedFunction of OSFreeGen X, PTVars X by PBOOLE:def 15;
take H ; :: thesis: for s being Element of S holds H . s = NHReverse (s,X)
let s be Element of S; :: thesis: H . s = NHReverse (s,X)
thus H . s = NHReverse (s,X) by A2; :: thesis: verum