set W = the IfWhileAlgebra;
set I = { the program-sort of S};
set p = the program-sort of S;
set f = the formula-sort of S;
( the program-sort of S in { the formula-sort of S, the program-sort of S} & { the formula-sort of S, the program-sort of S} misses the carrier of J )
by Def16, TARSKI:def 2;
then
the program-sort of S nin the carrier of J
by XBOOLE_0:3;
then
the program-sort of S in the carrier of S \ the carrier of J
by XBOOLE_0:def 5;
then consider Q being non-empty MSAlgebra over S such that
A1:
( Q is T -extension & the Sorts of Q | { the program-sort of S} = { the program-sort of S} --> the carrier of the IfWhileAlgebra )
by Th18, ZFMISC_1:31;
set U2 = the Sorts of Q;
set C = the Charact of Q;
deffunc H1( object , object , object ) -> set = {} ;
deffunc H2( object ) -> object = n `1 ;
consider g being Function such that
A2:
dom g = [:(Union the Sorts of Q),(Union [|Y, the Sorts of Q|]):]
and
A3:
for x being object st x in [:(Union the Sorts of Q),(Union [|Y, the Sorts of Q|]):] holds
g . x = H2(x)
from FUNCT_1:sch 3();
rng g c= Union the Sorts of Q
then reconsider g = g as Function of [:(Union the Sorts of Q),(Union [|Y, the Sorts of Q|]):],(Union the Sorts of Q) by A2, FUNCT_2:2;
g is sort-preserving
proof
let j be
SortSymbol of
S;
AOFA_L00:def 10 g .: [:( the Sorts of Q . j),(Union [|Y, the Sorts of Q|]):] c= the Sorts of Q . jlet x be
object ;
TARSKI:def 3 ( not x in g .: [:( the Sorts of Q . j),(Union [|Y, the Sorts of Q|]):] or x in the Sorts of Q . j )
assume
x in g .: [:( the Sorts of Q . j),(Union [|Y, the Sorts of Q|]):]
;
x in the Sorts of Q . j
then consider y being
object such that A6:
(
y in dom g &
y in [:( the Sorts of Q . j),(Union [|Y, the Sorts of Q|]):] &
x = g . y )
by FUNCT_1:def 6;
consider a,
b being
object such that A7:
(
a in the
Sorts of
Q . j &
b in Union [|Y, the Sorts of Q|] &
y = [a,b] )
by A6, ZFMISC_1:def 2;
x =
[a,b] `1
by A3, A6, A7
.=
a
;
hence
x in the
Sorts of
Q . j
by A7;
verum
end;
then reconsider g = g as sort-preserving Function of [:(Union the Sorts of Q),(Union [|Y, the Sorts of Q|]):],(Union the Sorts of Q) ;
set a = the Function of (Union [|X, the Sorts of T|]), the carrier of the IfWhileAlgebra;
set f = the ManySortedMSSet of the Sorts of Q, the Sorts of Q;
set eq = the Function of (Union [| the Sorts of T, the Sorts of T|]),( the Sorts of Q . the formula-sort of S);
set A = BialgebraStr(# the Sorts of Q, the Charact of Q, the ManySortedMSSet of the Sorts of Q, the Sorts of Q,g, the Function of (Union [| the Sorts of T, the Sorts of T|]),( the Sorts of Q . the formula-sort of S), the carrier of the IfWhileAlgebra, the charact of the IfWhileAlgebra, the Function of (Union [|X, the Sorts of T|]), the carrier of the IfWhileAlgebra #);
reconsider A = BialgebraStr(# the Sorts of Q, the Charact of Q, the ManySortedMSSet of the Sorts of Q, the Sorts of Q,g, the Function of (Union [| the Sorts of T, the Sorts of T|]),( the Sorts of Q . the formula-sort of S), the carrier of the IfWhileAlgebra, the charact of the IfWhileAlgebra, the Function of (Union [|X, the Sorts of T|]), the carrier of the IfWhileAlgebra #) as non 1s-empty strict BialgebraStr over S,Y ;
take
A
; ( A is non-empty & A is language & A is AL-correct & A is quasi_total & A is partial & A is ua-non-empty & A is with_empty-instruction & A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
the Sorts of A is non-empty
; MSUALG_1:def 3 ( A is language & A is AL-correct & A is quasi_total & A is partial & A is ua-non-empty & A is with_empty-instruction & A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
not the Sorts of A . the formula-sort of S is empty
; AOFA_L00:def 20 ( A is AL-correct & A is quasi_total & A is partial & A is ua-non-empty & A is with_empty-instruction & A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
A8:
the program-sort of S in { the program-sort of S}
by TARSKI:def 1;
hence the carrier of A =
({ the program-sort of S} --> the carrier of the IfWhileAlgebra) . the program-sort of S
by FUNCOP_1:7
.=
the Sorts of A . the program-sort of S
by A1, A8, FUNCT_1:49
;
AOFA_L00:def 38 ( A is quasi_total & A is partial & A is ua-non-empty & A is with_empty-instruction & A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
the charact of A is quasi_total
; UNIALG_1:def 2 ( A is partial & A is ua-non-empty & A is with_empty-instruction & A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
the charact of A is homogeneous
; UNIALG_1:def 1 ( A is ua-non-empty & A is with_empty-instruction & A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
( the charact of A <> {} & the charact of A is non-empty )
; UNIALG_1:def 3 ( A is with_empty-instruction & A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
( 1 in dom the charact of A & the charact of A . 1 is non empty homogeneous quasi_total 0 -ary PartFunc of ( the carrier of A *), the carrier of A )
by AOFA_000:def 10; AOFA_000:def 10 ( A is with_catenation & A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
( 2 in dom the charact of A & the charact of A . 2 is non empty homogeneous quasi_total 2 -ary PartFunc of ( the carrier of A *), the carrier of A )
by AOFA_000:def 11; AOFA_000:def 11 ( A is with_if-instruction & A is with_while-instruction & A is T -extension )
thus
( 3 in dom the charact of A & the charact of A . 3 is non empty homogeneous quasi_total 3 -ary PartFunc of ( the carrier of A *), the carrier of A )
by AOFA_000:def 12; AOFA_000:def 12 ( A is with_while-instruction & A is T -extension )
thus
( 4 in dom the charact of A & the charact of A . 4 is non empty homogeneous quasi_total 2 -ary PartFunc of ( the carrier of A *), the carrier of A )
by AOFA_000:def 13; AOFA_000:def 13 A is T -extension
MSAlgebra(# the Sorts of A, the Charact of A #) = MSAlgebra(# the Sorts of Q, the Charact of Q #)
;
hence
A is T -extension
by A1, Th15; verum