theorem Th1:
for
X,
Y,
Z,
T being
set for
x,
y,
z being
object for
f being
Function of
[:X,Y,Z:],
T st
x in X &
y in Y &
z in Z &
T <> {} holds
f . (
x,
y,
z)
in T
definition
let A,
B,
C be
set ;
func PFcompos (
A,
B,
C)
-> Function of
[:(PFuncs (A,B)),(PFuncs (B,C)):],
(PFuncs (A,C)) means :
D1:
for
f being
PartFunc of
A,
B for
g being
PartFunc of
B,
C holds
it . (
f,
g)
= g * f;
existence
ex b1 being Function of [:(PFuncs (A,B)),(PFuncs (B,C)):],(PFuncs (A,C)) st
for f being PartFunc of A,B
for g being PartFunc of B,C holds b1 . (f,g) = g * f
uniqueness
for b1, b2 being Function of [:(PFuncs (A,B)),(PFuncs (B,C)):],(PFuncs (A,C)) st ( for f being PartFunc of A,B
for g being PartFunc of B,C holds b1 . (f,g) = g * f ) & ( for f being PartFunc of A,B
for g being PartFunc of B,C holds b2 . (f,g) = g * f ) holds
b1 = b2
end;
::
deftheorem D1 defines
PFcompos PARTPR_2:def 1 :
for A, B, C being set
for b4 being Function of [:(PFuncs (A,B)),(PFuncs (B,C)):],(PFuncs (A,C)) holds
( b4 = PFcompos (A,B,C) iff for f being PartFunc of A,B
for g being PartFunc of B,C holds b4 . (f,g) = g * f );
registration
let D be
set ;
let p be
PartialPredicate of
D;
let f,
g be
BinominativeFunction of
D;
let F be
Function of
[:(Pr D),(FPrg D),(FPrg D):],
(FPrg D);
coherence
( F . (p,f,g) is Function-like & F . (p,f,g) is Relation-like )
;
coherence
( F . [p,f,g] is Function-like & F . [p,f,g] is Relation-like )
;
end;
registration
let D be
set ;
let p,
q be
PartialPredicate of
D;
let f be
BinominativeFunction of
D;
let F be
Function of
[:(Pr D),(FPrg D),(Pr D):],
(Pr D);
coherence
( F . (p,f,q) is Function-like & F . (p,f,q) is Relation-like )
;
coherence
( F . [p,f,q] is Function-like & F . [p,f,q] is Relation-like )
;
end;
definition
let D be non
empty set ;
defpred S1[
object ,
Function,
Function]
means ( $1
in dom $2 & $2
. $1
= TRUE & $1
in dom $3 );
defpred S2[
object ,
Function,
Function]
means ( $1
in dom $2 & $2
. $1
= FALSE & $1
in dom $3 );
deffunc H1(
Function,
Function,
Function)
-> set =
{ d where d is Element of D : ( S1[d,$1,$2] or S2[d,$1,$3] ) } ;
func PPIF D -> Function of
[:(Pr D),(FPrg D),(FPrg D):],
(FPrg D) means :
Def13:
for
p being
PartialPredicate of
D for
f,
g being
BinominativeFunction of
D holds
(
dom (it . (p,f,g)) = { d where d is Element of D : ( ( d in dom p & p . d = TRUE & d in dom f ) or ( d in dom p & p . d = FALSE & d in dom g ) ) } & ( for
d being
object holds
( (
d in dom p &
p . d = TRUE &
d in dom f implies
(it . (p,f,g)) . d = f . d ) & (
d in dom p &
p . d = FALSE &
d in dom g implies
(it . (p,f,g)) . d = g . d ) ) ) );
existence
ex b1 being Function of [:(Pr D),(FPrg D),(FPrg D):],(FPrg D) st
for p being PartialPredicate of D
for f, g being BinominativeFunction of D holds
( dom (b1 . (p,f,g)) = { d where d is Element of D : ( ( d in dom p & p . d = TRUE & d in dom f ) or ( d in dom p & p . d = FALSE & d in dom g ) ) } & ( for d being object holds
( ( d in dom p & p . d = TRUE & d in dom f implies (b1 . (p,f,g)) . d = f . d ) & ( d in dom p & p . d = FALSE & d in dom g implies (b1 . (p,f,g)) . d = g . d ) ) ) )
uniqueness
for b1, b2 being Function of [:(Pr D),(FPrg D),(FPrg D):],(FPrg D) st ( for p being PartialPredicate of D
for f, g being BinominativeFunction of D holds
( dom (b1 . (p,f,g)) = { d where d is Element of D : ( ( d in dom p & p . d = TRUE & d in dom f ) or ( d in dom p & p . d = FALSE & d in dom g ) ) } & ( for d being object holds
( ( d in dom p & p . d = TRUE & d in dom f implies (b1 . (p,f,g)) . d = f . d ) & ( d in dom p & p . d = FALSE & d in dom g implies (b1 . (p,f,g)) . d = g . d ) ) ) ) ) & ( for p being PartialPredicate of D
for f, g being BinominativeFunction of D holds
( dom (b2 . (p,f,g)) = { d where d is Element of D : ( ( d in dom p & p . d = TRUE & d in dom f ) or ( d in dom p & p . d = FALSE & d in dom g ) ) } & ( for d being object holds
( ( d in dom p & p . d = TRUE & d in dom f implies (b2 . (p,f,g)) . d = f . d ) & ( d in dom p & p . d = FALSE & d in dom g implies (b2 . (p,f,g)) . d = g . d ) ) ) ) ) holds
b1 = b2
end;
::
deftheorem Def13 defines
PPIF PARTPR_2:def 11 :
for D being non empty set
for b2 being Function of [:(Pr D),(FPrg D),(FPrg D):],(FPrg D) holds
( b2 = PPIF D iff for p being PartialPredicate of D
for f, g being BinominativeFunction of D holds
( dom (b2 . (p,f,g)) = { d where d is Element of D : ( ( d in dom p & p . d = TRUE & d in dom f ) or ( d in dom p & p . d = FALSE & d in dom g ) ) } & ( for d being object holds
( ( d in dom p & p . d = TRUE & d in dom f implies (b2 . (p,f,g)) . d = f . d ) & ( d in dom p & p . d = FALSE & d in dom g implies (b2 . (p,f,g)) . d = g . d ) ) ) ) );
definition
let D be non
empty set ;
defpred S1[
object ,
Function,
Function,
Function]
means ( ( $1
in dom $2 & $2
. $1
= FALSE ) or ( $1
in dom ($4 * $3) &
($4 * $3) . $1
= TRUE ) );
defpred S2[
object ,
Function,
Function,
Function]
means ( $1
in dom $2 & $2
. $1
= TRUE & $1
in dom ($4 * $3) &
($4 * $3) . $1
= FALSE );
deffunc H1(
Function,
Function,
Function)
-> set =
{ d where d is Element of D : ( S1[d,$1,$2,$3] or S2[d,$1,$2,$3] ) } ;
func PPFH D -> Function of
[:(Pr D),(FPrg D),(Pr D):],
(Pr D) means :
Def15:
for
p,
q being
PartialPredicate of
D for
f being
BinominativeFunction of
D holds
(
dom (it . (p,f,q)) = { d where d is Element of D : ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) or ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE ) ) } & ( for
d being
object holds
( ( ( (
d in dom p &
p . d = FALSE ) or (
d in dom (q * f) &
(q * f) . d = TRUE ) ) implies
(it . (p,f,q)) . d = TRUE ) & (
d in dom p &
p . d = TRUE &
d in dom (q * f) &
(q * f) . d = FALSE implies
(it . (p,f,q)) . d = FALSE ) ) ) );
existence
ex b1 being Function of [:(Pr D),(FPrg D),(Pr D):],(Pr D) st
for p, q being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b1 . (p,f,q)) = { d where d is Element of D : ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) or ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE ) ) } & ( for d being object holds
( ( ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) ) implies (b1 . (p,f,q)) . d = TRUE ) & ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE implies (b1 . (p,f,q)) . d = FALSE ) ) ) )
uniqueness
for b1, b2 being Function of [:(Pr D),(FPrg D),(Pr D):],(Pr D) st ( for p, q being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b1 . (p,f,q)) = { d where d is Element of D : ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) or ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE ) ) } & ( for d being object holds
( ( ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) ) implies (b1 . (p,f,q)) . d = TRUE ) & ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE implies (b1 . (p,f,q)) . d = FALSE ) ) ) ) ) & ( for p, q being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b2 . (p,f,q)) = { d where d is Element of D : ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) or ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE ) ) } & ( for d being object holds
( ( ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) ) implies (b2 . (p,f,q)) . d = TRUE ) & ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE implies (b2 . (p,f,q)) . d = FALSE ) ) ) ) ) holds
b1 = b2
end;
::
deftheorem Def15 defines
PPFH PARTPR_2:def 13 :
for D being non empty set
for b2 being Function of [:(Pr D),(FPrg D),(Pr D):],(Pr D) holds
( b2 = PPFH D iff for p, q being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b2 . (p,f,q)) = { d where d is Element of D : ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) or ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE ) ) } & ( for d being object holds
( ( ( ( d in dom p & p . d = FALSE ) or ( d in dom (q * f) & (q * f) . d = TRUE ) ) implies (b2 . (p,f,q)) . d = TRUE ) & ( d in dom p & p . d = TRUE & d in dom (q * f) & (q * f) . d = FALSE implies (b2 . (p,f,q)) . d = FALSE ) ) ) ) );
definition
let D be non
empty set ;
defpred S1[
object ,
Function,
Function,
Nat]
means ( ( for
i being
Nat st
i <= $4
- 1 holds
( $1
in dom ($2 * (iter ($3,i))) &
($2 * (iter ($3,i))) . $1
= TRUE ) ) & $1
in dom ($2 * (iter ($3,$4))) &
($2 * (iter ($3,$4))) . $1
= FALSE );
deffunc H1(
Function,
Function)
-> set =
{ d where d is Element of D : ex n being Nat st S1[d,$1,$2,n] } ;
func PPwhile D -> Function of
[:(Pr D),(FPrg D):],
(FPrg D) means
for
p being
PartialPredicate of
D for
f being
BinominativeFunction of
D holds
(
dom (it . (p,f)) = { d where d is Element of D : ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE ) } & ( for
d being
object st
d in dom (it . (p,f)) holds
ex
n being
Nat st
( ( for
i being
Nat st
i <= n - 1 holds
(
d in dom (p * (iter (f,i))) &
(p * (iter (f,i))) . d = TRUE ) ) &
d in dom (p * (iter (f,n))) &
(p * (iter (f,n))) . d = FALSE &
(it . (p,f)) . d = (iter (f,n)) . d ) ) );
existence
ex b1 being Function of [:(Pr D),(FPrg D):],(FPrg D) st
for p being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b1 . (p,f)) = { d where d is Element of D : ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE ) } & ( for d being object st d in dom (b1 . (p,f)) holds
ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE & (b1 . (p,f)) . d = (iter (f,n)) . d ) ) )
uniqueness
for b1, b2 being Function of [:(Pr D),(FPrg D):],(FPrg D) st ( for p being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b1 . (p,f)) = { d where d is Element of D : ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE ) } & ( for d being object st d in dom (b1 . (p,f)) holds
ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE & (b1 . (p,f)) . d = (iter (f,n)) . d ) ) ) ) & ( for p being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b2 . (p,f)) = { d where d is Element of D : ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE ) } & ( for d being object st d in dom (b2 . (p,f)) holds
ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE & (b2 . (p,f)) . d = (iter (f,n)) . d ) ) ) ) holds
b1 = b2
end;
::
deftheorem defines
PPwhile PARTPR_2:def 15 :
for D being non empty set
for b2 being Function of [:(Pr D),(FPrg D):],(FPrg D) holds
( b2 = PPwhile D iff for p being PartialPredicate of D
for f being BinominativeFunction of D holds
( dom (b2 . (p,f)) = { d where d is Element of D : ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE ) } & ( for d being object st d in dom (b2 . (p,f)) holds
ex n being Nat st
( ( for i being Nat st i <= n - 1 holds
( d in dom (p * (iter (f,i))) & (p * (iter (f,i))) . d = TRUE ) ) & d in dom (p * (iter (f,n))) & (p * (iter (f,n))) . d = FALSE & (b2 . (p,f)) . d = (iter (f,n)) . d ) ) ) );