theorem
for
D being non
empty set for
f1,
f2,
f3 being
BinominativeFunction of
D for
p,
q,
r,
w being
PartialPredicate of
D st
<*p,f1,q*> is
SFHT of
D &
<*q,f2,r*> is
SFHT of
D &
<*r,f3,w*> is
SFHT of
D &
<*(PP_inversion q),f2,r*> is
SFHT of
D &
<*(PP_inversion r),f3,w*> is
SFHT of
D holds
<*p,(PP_composition (f1,f2,f3)),w*> is
SFHT of
D
theorem Th2:
for
D being non
empty set for
f1,
f2,
f3,
f4 being
BinominativeFunction of
D for
p,
q,
r,
t,
w being
PartialPredicate of
D st
<*p,f1,q*> is
SFHT of
D &
<*q,f2,r*> is
SFHT of
D &
<*r,f3,w*> is
SFHT of
D &
<*w,f4,t*> is
SFHT of
D &
<*(PP_inversion q),f2,r*> is
SFHT of
D &
<*(PP_inversion r),f3,w*> is
SFHT of
D &
<*(PP_inversion w),f4,t*> is
SFHT of
D holds
<*p,(PP_composition (f1,f2,f3,f4)),t*> is
SFHT of
D
definition
let x,
y be
object ;
assume A1:
(
x is
Complex &
y is
Complex )
;
existence
ex b1, x1, y1 being Complex st
( x1 = x & y1 = y & b1 = x1 + y1 )
uniqueness
for b1, b2 being Complex st ex x1, y1 being Complex st
( x1 = x & y1 = y & b1 = x1 + y1 ) & ex x1, y1 being Complex st
( x1 = x & y1 = y & b2 = x1 + y1 ) holds
b1 = b2
;
existence
ex b1, x1, y1 being Complex st
( x1 = x & y1 = y & b1 = x1 * y1 )
uniqueness
for b1, b2 being Complex st ex x1, y1 being Complex st
( x1 = x & y1 = y & b1 = x1 * y1 ) & ex x1, y1 being Complex st
( x1 = x & y1 = y & b2 = x1 * y1 ) holds
b1 = b2
;
end;
definition
let A be
set ;
assume A1:
A is
complex-containing
;
deffunc H1(
object ,
object )
-> Complex =
addition ($1,$2);
existence
ex b1 being Function of [:A,A:],A st
for x, y being object st x in A & y in A holds
b1 . (x,y) = addition (x,y)
uniqueness
for b1, b2 being Function of [:A,A:],A st ( for x, y being object st x in A & y in A holds
b1 . (x,y) = addition (x,y) ) & ( for x, y being object st x in A & y in A holds
b2 . (x,y) = addition (x,y) ) holds
b1 = b2
deffunc H2(
object ,
object )
-> Complex =
multiplication ($1,$2);
existence
ex b1 being Function of [:A,A:],A st
for x, y being object st x in A & y in A holds
b1 . (x,y) = multiplication (x,y)
uniqueness
for b1, b2 being Function of [:A,A:],A st ( for x, y being object st x in A & y in A holds
b1 . (x,y) = multiplication (x,y) ) & ( for x, y being object st x in A & y in A holds
b2 . (x,y) = multiplication (x,y) ) holds
b1 = b2
end;
definition
let V,
A be
set ;
let loc be
V -valued Function;
let val be
Function;
func factorial_var_init (
A,
loc,
val)
-> SCBinominativeFunction of
V,
A equals
PP_composition (
(SC_assignment ((denaming (V,A,(val . 1))),(loc /. 1))),
(SC_assignment ((denaming (V,A,(val . 2))),(loc /. 2))),
(SC_assignment ((denaming (V,A,(val . 3))),(loc /. 3))),
(SC_assignment ((denaming (V,A,(val . 4))),(loc /. 4))));
coherence
PP_composition ((SC_assignment ((denaming (V,A,(val . 1))),(loc /. 1))),(SC_assignment ((denaming (V,A,(val . 2))),(loc /. 2))),(SC_assignment ((denaming (V,A,(val . 3))),(loc /. 3))),(SC_assignment ((denaming (V,A,(val . 4))),(loc /. 4)))) is SCBinominativeFunction of V,A
;
end;
::
deftheorem defines
factorial_var_init NOMIN_5:def 11 :
for V, A being set
for loc being b1 -valued Function
for val being Function holds factorial_var_init (A,loc,val) = PP_composition ((SC_assignment ((denaming (V,A,(val . 1))),(loc /. 1))),(SC_assignment ((denaming (V,A,(val . 2))),(loc /. 2))),(SC_assignment ((denaming (V,A,(val . 3))),(loc /. 3))),(SC_assignment ((denaming (V,A,(val . 4))),(loc /. 4))));
definition
let V,
A be
set ;
let loc be
V -valued Function;
let val be
Function;
let z be
Element of
V;
func factorial_program (
A,
loc,
val,
z)
-> SCBinominativeFunction of
V,
A equals
PP_composition (
(factorial_main_part (A,loc,val)),
(SC_assignment ((denaming (V,A,(loc /. 4))),z)));
coherence
PP_composition ((factorial_main_part (A,loc,val)),(SC_assignment ((denaming (V,A,(loc /. 4))),z))) is SCBinominativeFunction of V,A
;
end;
::
deftheorem defines
factorial_program NOMIN_5:def 13 :
for V, A being set
for loc being b1 -valued Function
for val being Function
for z being Element of V holds factorial_program (A,loc,val,z) = PP_composition ((factorial_main_part (A,loc,val)),(SC_assignment ((denaming (V,A,(loc /. 4))),z)));
definition
let V,
A be
set ;
let val be
Function;
let n0 be
Nat;
defpred S1[
object ]
means valid_factorial_input_pred V,
A,
val,
n0,$1;
func valid_factorial_input (
V,
A,
val,
n0)
-> SCPartialNominativePredicate of
V,
A means :
Def15:
(
dom it = ND (
V,
A) & ( for
d being
object st
d in dom it holds
( (
valid_factorial_input_pred V,
A,
val,
n0,
d implies
it . d = TRUE ) & ( not
valid_factorial_input_pred V,
A,
val,
n0,
d implies
it . d = FALSE ) ) ) );
existence
ex b1 being SCPartialNominativePredicate of V,A st
( dom b1 = ND (V,A) & ( for d being object st d in dom b1 holds
( ( valid_factorial_input_pred V,A,val,n0,d implies b1 . d = TRUE ) & ( not valid_factorial_input_pred V,A,val,n0,d implies b1 . d = FALSE ) ) ) )
uniqueness
for b1, b2 being SCPartialNominativePredicate of V,A st dom b1 = ND (V,A) & ( for d being object st d in dom b1 holds
( ( valid_factorial_input_pred V,A,val,n0,d implies b1 . d = TRUE ) & ( not valid_factorial_input_pred V,A,val,n0,d implies b1 . d = FALSE ) ) ) & dom b2 = ND (V,A) & ( for d being object st d in dom b2 holds
( ( valid_factorial_input_pred V,A,val,n0,d implies b2 . d = TRUE ) & ( not valid_factorial_input_pred V,A,val,n0,d implies b2 . d = FALSE ) ) ) holds
b1 = b2
end;
::
deftheorem Def15 defines
valid_factorial_input NOMIN_5:def 15 :
for V, A being set
for val being Function
for n0 being Nat
for b5 being SCPartialNominativePredicate of V,A holds
( b5 = valid_factorial_input (V,A,val,n0) iff ( dom b5 = ND (V,A) & ( for d being object st d in dom b5 holds
( ( valid_factorial_input_pred V,A,val,n0,d implies b5 . d = TRUE ) & ( not valid_factorial_input_pred V,A,val,n0,d implies b5 . d = FALSE ) ) ) ) );
definition
let V,
A be
set ;
let z be
Element of
V;
let n0 be
Nat;
set D =
{ d where d is TypeSCNominativeData of V,A : d in dom (denaming (V,A,z)) } ;
defpred S1[
object ]
means valid_factorial_output_pred A,
z,
n0,$1;
func valid_factorial_output (
A,
z,
n0)
-> SCPartialNominativePredicate of
V,
A means :
Def17:
(
dom it = { d where d is TypeSCNominativeData of V,A : d in dom (denaming (V,A,z)) } & ( for
d being
object st
d in dom it holds
( (
valid_factorial_output_pred A,
z,
n0,
d implies
it . d = TRUE ) & ( not
valid_factorial_output_pred A,
z,
n0,
d implies
it . d = FALSE ) ) ) );
existence
ex b1 being SCPartialNominativePredicate of V,A st
( dom b1 = { d where d is TypeSCNominativeData of V,A : d in dom (denaming (V,A,z)) } & ( for d being object st d in dom b1 holds
( ( valid_factorial_output_pred A,z,n0,d implies b1 . d = TRUE ) & ( not valid_factorial_output_pred A,z,n0,d implies b1 . d = FALSE ) ) ) )
uniqueness
for b1, b2 being SCPartialNominativePredicate of V,A st dom b1 = { d where d is TypeSCNominativeData of V,A : d in dom (denaming (V,A,z)) } & ( for d being object st d in dom b1 holds
( ( valid_factorial_output_pred A,z,n0,d implies b1 . d = TRUE ) & ( not valid_factorial_output_pred A,z,n0,d implies b1 . d = FALSE ) ) ) & dom b2 = { d where d is TypeSCNominativeData of V,A : d in dom (denaming (V,A,z)) } & ( for d being object st d in dom b2 holds
( ( valid_factorial_output_pred A,z,n0,d implies b2 . d = TRUE ) & ( not valid_factorial_output_pred A,z,n0,d implies b2 . d = FALSE ) ) ) holds
b1 = b2
end;
::
deftheorem Def17 defines
valid_factorial_output NOMIN_5:def 17 :
for V, A being set
for z being Element of V
for n0 being Nat
for b5 being SCPartialNominativePredicate of V,A holds
( b5 = valid_factorial_output (A,z,n0) iff ( dom b5 = { d where d is TypeSCNominativeData of V,A : d in dom (denaming (V,A,z)) } & ( for d being object st d in dom b5 holds
( ( valid_factorial_output_pred A,z,n0,d implies b5 . d = TRUE ) & ( not valid_factorial_output_pred A,z,n0,d implies b5 . d = FALSE ) ) ) ) );
definition
let V,
A be
set ;
let loc be
V -valued Function;
let n0 be
Nat;
defpred S1[
object ]
means factorial_inv_pred A,
loc,
n0,$1;
func factorial_inv (
A,
loc,
n0)
-> SCPartialNominativePredicate of
V,
A means :
Def19:
(
dom it = ND (
V,
A) & ( for
d being
object st
d in dom it holds
( (
factorial_inv_pred A,
loc,
n0,
d implies
it . d = TRUE ) & ( not
factorial_inv_pred A,
loc,
n0,
d implies
it . d = FALSE ) ) ) );
existence
ex b1 being SCPartialNominativePredicate of V,A st
( dom b1 = ND (V,A) & ( for d being object st d in dom b1 holds
( ( factorial_inv_pred A,loc,n0,d implies b1 . d = TRUE ) & ( not factorial_inv_pred A,loc,n0,d implies b1 . d = FALSE ) ) ) )
uniqueness
for b1, b2 being SCPartialNominativePredicate of V,A st dom b1 = ND (V,A) & ( for d being object st d in dom b1 holds
( ( factorial_inv_pred A,loc,n0,d implies b1 . d = TRUE ) & ( not factorial_inv_pred A,loc,n0,d implies b1 . d = FALSE ) ) ) & dom b2 = ND (V,A) & ( for d being object st d in dom b2 holds
( ( factorial_inv_pred A,loc,n0,d implies b2 . d = TRUE ) & ( not factorial_inv_pred A,loc,n0,d implies b2 . d = FALSE ) ) ) holds
b1 = b2
end;
::
deftheorem Def19 defines
factorial_inv NOMIN_5:def 19 :
for V, A being set
for loc being b1 -valued Function
for n0 being Nat
for b5 being SCPartialNominativePredicate of V,A holds
( b5 = factorial_inv (A,loc,n0) iff ( dom b5 = ND (V,A) & ( for d being object st d in dom b5 holds
( ( factorial_inv_pred A,loc,n0,d implies b5 . d = TRUE ) & ( not factorial_inv_pred A,loc,n0,d implies b5 . d = FALSE ) ) ) ) );
theorem Th6:
for
V,
A being
set for
loc being
b1 -valued Function for
val being
Function for
n0 being
Nat st not
V is
empty &
A is_without_nonatomicND_wrt V &
loc /. 1,
loc /. 2,
loc /. 3,
loc /. 4
are_mutually_distinct &
loc,
val are_compatible_wrt_4_locs holds
<*(valid_factorial_input (V,A,val,n0)),(factorial_var_init (A,loc,val)),(factorial_inv (A,loc,n0))*> is
SFHT of
(ND (V,A))
theorem Th7:
for
V,
A being
set for
loc being
b1 -valued Function for
n0 being
Nat st not
V is
empty &
A is
complex-containing &
A is_without_nonatomicND_wrt V &
loc /. 1,
loc /. 2,
loc /. 3,
loc /. 4
are_mutually_distinct holds
<*(factorial_inv (A,loc,n0)),(factorial_loop_body (A,loc)),(factorial_inv (A,loc,n0))*> is
SFHT of
(ND (V,A))
theorem Th9:
for
V,
A being
set for
loc being
b1 -valued Function for
n0 being
Nat st not
V is
empty &
A is
complex-containing &
A is_without_nonatomicND_wrt V &
loc /. 1,
loc /. 2,
loc /. 3,
loc /. 4
are_mutually_distinct holds
<*(factorial_inv (A,loc,n0)),(factorial_main_loop (A,loc)),(PP_and ((Equality (A,(loc /. 1),(loc /. 3))),(factorial_inv (A,loc,n0))))*> is
SFHT of
(ND (V,A))
theorem Th10:
for
V,
A being
set for
loc being
b1 -valued Function for
val being
Function for
n0 being
Nat st not
V is
empty &
A is
complex-containing &
A is_without_nonatomicND_wrt V &
loc /. 1,
loc /. 2,
loc /. 3,
loc /. 4
are_mutually_distinct &
loc,
val are_compatible_wrt_4_locs holds
<*(valid_factorial_input (V,A,val,n0)),(factorial_main_part (A,loc,val)),(PP_and ((Equality (A,(loc /. 1),(loc /. 3))),(factorial_inv (A,loc,n0))))*> is
SFHT of
(ND (V,A))
theorem Th11:
for
V,
A being
set for
z being
Element of
V for
loc being
b1 -valued Function for
n0 being
Nat st not
V is
empty &
A is_without_nonatomicND_wrt V & ( for
T being
TypeSCNominativeData of
V,
A holds
(
loc /. 1
is_a_value_on T &
loc /. 3
is_a_value_on T ) ) holds
PP_and (
(Equality (A,(loc /. 1),(loc /. 3))),
(factorial_inv (A,loc,n0)))
||= SC_Psuperpos (
(valid_factorial_output (A,z,n0)),
(denaming (V,A,(loc /. 4))),
z)
theorem Th12:
for
V,
A being
set for
z being
Element of
V for
loc being
b1 -valued Function for
n0 being
Nat st not
V is
empty &
A is_without_nonatomicND_wrt V & ( for
T being
TypeSCNominativeData of
V,
A holds
(
loc /. 1
is_a_value_on T &
loc /. 3
is_a_value_on T ) ) holds
<*(PP_and ((Equality (A,(loc /. 1),(loc /. 3))),(factorial_inv (A,loc,n0)))),(SC_assignment ((denaming (V,A,(loc /. 4))),z)),(valid_factorial_output (A,z,n0))*> is
SFHT of
(ND (V,A))
theorem Th13:
for
V,
A being
set for
z being
Element of
V for
loc being
b1 -valued Function for
n0 being
Nat st ( for
T being
TypeSCNominativeData of
V,
A holds
(
loc /. 1
is_a_value_on T &
loc /. 3
is_a_value_on T ) ) holds
<*(PP_inversion (PP_and ((Equality (A,(loc /. 1),(loc /. 3))),(factorial_inv (A,loc,n0))))),(SC_assignment ((denaming (V,A,(loc /. 4))),z)),(valid_factorial_output (A,z,n0))*> is
SFHT of
(ND (V,A))
theorem
for
V,
A being
set for
z being
Element of
V for
loc being
b1 -valued Function for
val being
Function for
n0 being
Nat st not
V is
empty &
A is
complex-containing &
A is_without_nonatomicND_wrt V &
loc /. 1,
loc /. 2,
loc /. 3,
loc /. 4
are_mutually_distinct &
loc,
val are_compatible_wrt_4_locs & ( for
T being
TypeSCNominativeData of
V,
A holds
(
loc /. 1
is_a_value_on T &
loc /. 3
is_a_value_on T ) ) holds
<*(valid_factorial_input (V,A,val,n0)),(factorial_program (A,loc,val,z)),(valid_factorial_output (A,z,n0))*> is
SFHT of
(ND (V,A))