:: COMPUT_1 semantic presentation
theorem Th1: :: COMPUT_1:1
canceled;
theorem Th2: :: COMPUT_1:2
canceled;
theorem Th3: :: COMPUT_1:3
theorem Th4: :: COMPUT_1:4
canceled;
theorem Th5: :: COMPUT_1:5
for b
1, b
2, b
3, b
4 being
set for b
5, b
6 being
Function holds
( b
5 +* b
1,b
2 = b
6 +* b
1,b
3 implies b
5 +* b
1,b
4 = b
6 +* b
1,b
4 )
theorem Th6: :: COMPUT_1:6
theorem Th7: :: COMPUT_1:7
theorem Th8: :: COMPUT_1:8
theorem Th9: :: COMPUT_1:9
theorem Th10: :: COMPUT_1:10
theorem Th11: :: COMPUT_1:11
theorem Th12: :: COMPUT_1:12
theorem Th13: :: COMPUT_1:13
:: deftheorem Def1 defines compatible COMPUT_1:def 1 :
theorem Th14: :: COMPUT_1:14
theorem Th15: :: COMPUT_1:15
theorem Th16: :: COMPUT_1:16
theorem Th17: :: COMPUT_1:17
theorem Th18: :: COMPUT_1:18
:: deftheorem Def2 defines from-natural-fseqs COMPUT_1:def 2 :
:: deftheorem Def3 defines len-total COMPUT_1:def 3 :
:: deftheorem Def4 defines homogeneous COMPUT_1:def 4 :
theorem Th19: :: COMPUT_1:19
theorem Th20: :: COMPUT_1:20
:: deftheorem Def5 defines arity COMPUT_1:def 5 :
theorem Th21: :: COMPUT_1:21
theorem Th22: :: COMPUT_1:22
theorem Th23: :: COMPUT_1:23
theorem Th24: :: COMPUT_1:24
Lemma26:
for b1 being non empty set
for b2 being homogeneous PartFunc of b1 * ,b1 holds
( ( b2 is quasi_total & not b2 is empty ) iff dom b2 = (arity b2) -tuples_on b1 )
theorem Th25: :: COMPUT_1:25
theorem Th26: :: COMPUT_1:26
theorem Th27: :: COMPUT_1:27
theorem Th28: :: COMPUT_1:28
:: deftheorem Def6 defines with_the_same_arity COMPUT_1:def 6 :
:: deftheorem Def7 defines arity COMPUT_1:def 7 :
theorem Th29: :: COMPUT_1:29
:: deftheorem Def8 defines HFuncs COMPUT_1:def 8 :
theorem Th30: :: COMPUT_1:30
theorem Th31: :: COMPUT_1:31
theorem Th32: :: COMPUT_1:32
theorem Th33: :: COMPUT_1:33
:: deftheorem Def9 defines const COMPUT_1:def 9 :
theorem Th34: :: COMPUT_1:34
theorem Th35: :: COMPUT_1:35
theorem Th36: :: COMPUT_1:36
:: deftheorem Def10 defines succ COMPUT_1:def 10 :
theorem Th37: :: COMPUT_1:37
theorem Th38: :: COMPUT_1:38
:: deftheorem Def11 defines proj COMPUT_1:def 11 :
theorem Th39: :: COMPUT_1:39
theorem Th40: :: COMPUT_1:40
theorem Th41: :: COMPUT_1:41
theorem Th42: :: COMPUT_1:42
theorem Th43: :: COMPUT_1:43
theorem Th44: :: COMPUT_1:44
theorem Th45: :: COMPUT_1:45
theorem Th46: :: COMPUT_1:46
theorem Th47: :: COMPUT_1:47
theorem Th48: :: COMPUT_1:48
theorem Th49: :: COMPUT_1:49
theorem Th50: :: COMPUT_1:50
theorem Th51: :: COMPUT_1:51
theorem Th52: :: COMPUT_1:52
definition
let c
1, c
2, c
3 be
to-naturals from-natural-fseqs homogeneous Function;
let c
4 be
Nat;
pred c
1 is_primitive-recursively_expressed_by c
2,c
3,c
4 means :
Def12:
:: COMPUT_1:def 12
ex b
1 being
Nat st
(
dom a
1 c= b
1 -tuples_on NAT & a
4 >= 1 & a
4 <= b
1 &
(arity a2) + 1
= b
1 & b
1 + 1
= arity a
3 & ( for b
2 being
FinSequence of
NAT holds
(
len b
2 = b
1 implies ( ( b
2 +* a
4,0
in dom a
1 implies
Del b
2,a
4 in dom a
2 ) & (
Del b
2,a
4 in dom a
2 implies b
2 +* a
4,0
in dom a
1 ) & ( b
2 +* a
4,0
in dom a
1 implies a
1 . (b2 +* a4,0) = a
2 . (Del b2,a4) ) & ( for b
3 being
Nat holds
( ( b
2 +* a
4,
(b3 + 1) in dom a
1 implies ( b
2 +* a
4,b
3 in dom a
1 &
(b2 +* a4,b3) ^ <*(a1 . (b2 +* a4,b3))*> in dom a
3 ) ) & ( b
2 +* a
4,b
3 in dom a
1 &
(b2 +* a4,b3) ^ <*(a1 . (b2 +* a4,b3))*> in dom a
3 implies b
2 +* a
4,
(b3 + 1) in dom a
1 ) & ( b
2 +* a
4,
(b3 + 1) in dom a
1 implies a
1 . (b2 +* a4,(b3 + 1)) = a
3 . ((b2 +* a4,b3) ^ <*(a1 . (b2 +* a4,b3))*>) ) ) ) ) ) ) );
end;
:: deftheorem Def12 defines is_primitive-recursively_expressed_by COMPUT_1:def 12 :
for b
1, b
2, b
3 being
to-naturals from-natural-fseqs homogeneous Functionfor b
4 being
Nat holds
( b
1 is_primitive-recursively_expressed_by b
2,b
3,b
4 iff ex b
5 being
Nat st
(
dom b
1 c= b
5 -tuples_on NAT & b
4 >= 1 & b
4 <= b
5 &
(arity b2) + 1
= b
5 & b
5 + 1
= arity b
3 & ( for b
6 being
FinSequence of
NAT holds
(
len b
6 = b
5 implies ( ( b
6 +* b
4,0
in dom b
1 implies
Del b
6,b
4 in dom b
2 ) & (
Del b
6,b
4 in dom b
2 implies b
6 +* b
4,0
in dom b
1 ) & ( b
6 +* b
4,0
in dom b
1 implies b
1 . (b6 +* b4,0) = b
2 . (Del b6,b4) ) & ( for b
7 being
Nat holds
( ( b
6 +* b
4,
(b7 + 1) in dom b
1 implies ( b
6 +* b
4,b
7 in dom b
1 &
(b6 +* b4,b7) ^ <*(b1 . (b6 +* b4,b7))*> in dom b
3 ) ) & ( b
6 +* b
4,b
7 in dom b
1 &
(b6 +* b4,b7) ^ <*(b1 . (b6 +* b4,b7))*> in dom b
3 implies b
6 +* b
4,
(b7 + 1) in dom b
1 ) & ( b
6 +* b
4,
(b7 + 1) in dom b
1 implies b
1 . (b6 +* b4,(b7 + 1)) = b
3 . ((b6 +* b4,b7) ^ <*(b1 . (b6 +* b4,b7))*>) ) ) ) ) ) ) ) );
defpred S1[ Nat, Element of HFuncs NAT , Element of HFuncs NAT , FinSequence of NAT , Nat, homogeneous Function] means ( ( a5 in dom a4 & a4 +* a5,a1 in dom a2 & (a4 +* a5,a1) ^ <*(a2 . (a4 +* a5,a1))*> in dom a6 implies a3 = a2 +* ({(a4 +* a5,(a1 + 1))} --> (a6 . ((a4 +* a5,a1) ^ <*(a2 . (a4 +* a5,a1))*>))) ) & ( not ( a5 in dom a4 & a4 +* a5,a1 in dom a2 & (a4 +* a5,a1) ^ <*(a2 . (a4 +* a5,a1))*> in dom a6 ) implies a3 = a2 ) );
definition
let c
1, c
2 be
to-naturals from-natural-fseqs homogeneous Function;
let c
3 be
Nat;
let c
4 be
FinSequence of
NAT ;
func primrec c
1,c
2,c
3,c
4 -> Element of
HFuncs NAT means :
Def13:
:: COMPUT_1:def 13
ex b
1 being
Function of
NAT ,
HFuncs NAT st
( a
5 = b
1 . (a4 /. a3) & ( a
3 in dom a
4 &
Del a
4,a
3 in dom a
1 implies b
1 . 0
= {(a4 +* a3,0)} --> (a1 . (Del a4,a3)) ) & ( not ( a
3 in dom a
4 &
Del a
4,a
3 in dom a
1 ) implies b
1 . 0
= {} ) & ( for b
2 being
Nat holds
( ( a
3 in dom a
4 & a
4 +* a
3,b
2 in dom (b1 . b2) &
(a4 +* a3,b2) ^ <*((b1 . b2) . (a4 +* a3,b2))*> in dom a
2 implies b
1 . (b2 + 1) = (b1 . b2) +* ({(a4 +* a3,(b2 + 1))} --> (a2 . ((a4 +* a3,b2) ^ <*((b1 . b2) . (a4 +* a3,b2))*>))) ) & ( not ( a
3 in dom a
4 & a
4 +* a
3,b
2 in dom (b1 . b2) &
(a4 +* a3,b2) ^ <*((b1 . b2) . (a4 +* a3,b2))*> in dom a
2 ) implies b
1 . (b2 + 1) = b
1 . b
2 ) ) ) );
existence
ex b1 being Element of HFuncs NAT ex b2 being Function of NAT , HFuncs NAT st
( b1 = b2 . (c4 /. c3) & ( c3 in dom c4 & Del c4,c3 in dom c1 implies b2 . 0 = {(c4 +* c3,0)} --> (c1 . (Del c4,c3)) ) & ( not ( c3 in dom c4 & Del c4,c3 in dom c1 ) implies b2 . 0 = {} ) & ( for b3 being Nat holds
( ( c3 in dom c4 & c4 +* c3,b3 in dom (b2 . b3) & (c4 +* c3,b3) ^ <*((b2 . b3) . (c4 +* c3,b3))*> in dom c2 implies b2 . (b3 + 1) = (b2 . b3) +* ({(c4 +* c3,(b3 + 1))} --> (c2 . ((c4 +* c3,b3) ^ <*((b2 . b3) . (c4 +* c3,b3))*>))) ) & ( not ( c3 in dom c4 & c4 +* c3,b3 in dom (b2 . b3) & (c4 +* c3,b3) ^ <*((b2 . b3) . (c4 +* c3,b3))*> in dom c2 ) implies b2 . (b3 + 1) = b2 . b3 ) ) ) )
uniqueness
for b1, b2 being Element of HFuncs NAT holds
( ex b3 being Function of NAT , HFuncs NAT st
( b1 = b3 . (c4 /. c3) & ( c3 in dom c4 & Del c4,c3 in dom c1 implies b3 . 0 = {(c4 +* c3,0)} --> (c1 . (Del c4,c3)) ) & ( not ( c3 in dom c4 & Del c4,c3 in dom c1 ) implies b3 . 0 = {} ) & ( for b4 being Nat holds
( ( c3 in dom c4 & c4 +* c3,b4 in dom (b3 . b4) & (c4 +* c3,b4) ^ <*((b3 . b4) . (c4 +* c3,b4))*> in dom c2 implies b3 . (b4 + 1) = (b3 . b4) +* ({(c4 +* c3,(b4 + 1))} --> (c2 . ((c4 +* c3,b4) ^ <*((b3 . b4) . (c4 +* c3,b4))*>))) ) & ( not ( c3 in dom c4 & c4 +* c3,b4 in dom (b3 . b4) & (c4 +* c3,b4) ^ <*((b3 . b4) . (c4 +* c3,b4))*> in dom c2 ) implies b3 . (b4 + 1) = b3 . b4 ) ) ) ) & ex b3 being Function of NAT , HFuncs NAT st
( b2 = b3 . (c4 /. c3) & ( c3 in dom c4 & Del c4,c3 in dom c1 implies b3 . 0 = {(c4 +* c3,0)} --> (c1 . (Del c4,c3)) ) & ( not ( c3 in dom c4 & Del c4,c3 in dom c1 ) implies b3 . 0 = {} ) & ( for b4 being Nat holds
( ( c3 in dom c4 & c4 +* c3,b4 in dom (b3 . b4) & (c4 +* c3,b4) ^ <*((b3 . b4) . (c4 +* c3,b4))*> in dom c2 implies b3 . (b4 + 1) = (b3 . b4) +* ({(c4 +* c3,(b4 + 1))} --> (c2 . ((c4 +* c3,b4) ^ <*((b3 . b4) . (c4 +* c3,b4))*>))) ) & ( not ( c3 in dom c4 & c4 +* c3,b4 in dom (b3 . b4) & (c4 +* c3,b4) ^ <*((b3 . b4) . (c4 +* c3,b4))*> in dom c2 ) implies b3 . (b4 + 1) = b3 . b4 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def13 defines primrec COMPUT_1:def 13 :
for b
1, b
2 being
to-naturals from-natural-fseqs homogeneous Functionfor b
3 being
Natfor b
4 being
FinSequence of
NAT for b
5 being
Element of
HFuncs NAT holds
( b
5 = primrec b
1,b
2,b
3,b
4 iff ex b
6 being
Function of
NAT ,
HFuncs NAT st
( b
5 = b
6 . (b4 /. b3) & ( b
3 in dom b
4 &
Del b
4,b
3 in dom b
1 implies b
6 . 0
= {(b4 +* b3,0)} --> (b1 . (Del b4,b3)) ) & ( not ( b
3 in dom b
4 &
Del b
4,b
3 in dom b
1 ) implies b
6 . 0
= {} ) & ( for b
7 being
Nat holds
( ( b
3 in dom b
4 & b
4 +* b
3,b
7 in dom (b6 . b7) &
(b4 +* b3,b7) ^ <*((b6 . b7) . (b4 +* b3,b7))*> in dom b
2 implies b
6 . (b7 + 1) = (b6 . b7) +* ({(b4 +* b3,(b7 + 1))} --> (b2 . ((b4 +* b3,b7) ^ <*((b6 . b7) . (b4 +* b3,b7))*>))) ) & ( not ( b
3 in dom b
4 & b
4 +* b
3,b
7 in dom (b6 . b7) &
(b4 +* b3,b7) ^ <*((b6 . b7) . (b4 +* b3,b7))*> in dom b
2 ) implies b
6 . (b7 + 1) = b
6 . b
7 ) ) ) ) );
theorem Th53: :: COMPUT_1:53
theorem Th54: :: COMPUT_1:54
theorem Th55: :: COMPUT_1:55
theorem Th56: :: COMPUT_1:56
theorem Th57: :: COMPUT_1:57
theorem Th58: :: COMPUT_1:58
definition
let c
1, c
2 be
to-naturals from-natural-fseqs homogeneous Function;
let c
3 be
Nat;
func primrec c
1,c
2,c
3 -> Element of
HFuncs NAT means :
Def14:
:: COMPUT_1:def 14
ex b
1 being
Function of
((arity a1) + 1) -tuples_on NAT ,
HFuncs NAT st
( a
4 = Union b
1 & ( for b
2 being
Element of
((arity a1) + 1) -tuples_on NAT holds b
1 . b
2 = primrec a
1,a
2,a
3,b
2 ) );
existence
ex b1 being Element of HFuncs NAT ex b2 being Function of ((arity c1) + 1) -tuples_on NAT , HFuncs NAT st
( b1 = Union b2 & ( for b3 being Element of ((arity c1) + 1) -tuples_on NAT holds b2 . b3 = primrec c1,c2,c3,b3 ) )
uniqueness
for b1, b2 being Element of HFuncs NAT holds
( ex b3 being Function of ((arity c1) + 1) -tuples_on NAT , HFuncs NAT st
( b1 = Union b3 & ( for b4 being Element of ((arity c1) + 1) -tuples_on NAT holds b3 . b4 = primrec c1,c2,c3,b4 ) ) & ex b3 being Function of ((arity c1) + 1) -tuples_on NAT , HFuncs NAT st
( b2 = Union b3 & ( for b4 being Element of ((arity c1) + 1) -tuples_on NAT holds b3 . b4 = primrec c1,c2,c3,b4 ) ) implies b1 = b2 )
end;
:: deftheorem Def14 defines primrec COMPUT_1:def 14 :
theorem Th59: :: COMPUT_1:59
theorem Th60: :: COMPUT_1:60
theorem Th61: :: COMPUT_1:61
E66:
now
let c
1, c
2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c
3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c
4, c
5 be
Nat;
set c
6 = c
3 +* c
4,
(c5 + 1);
set c
7 = c
3 +* c
4,c
5;
let c
8, c
9 be
Function of
NAT ,
HFuncs NAT ;
assume that E67:
( ( c
4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),c
4 in dom c
1 implies c
8 . 0
= {((c3 +* c4,(c5 + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c5 + 1)),c4)) ) & ( not ( c
4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),c
4 in dom c
1 ) implies c
8 . 0
= {} ) )
and E68:
for b
1 being
Nat holds
S
1[b
1,c
8 . b
1,c
8 . (b1 + 1),c
3 +* c
4,
(c5 + 1),c
4,c
2]
and E69:
( ( c
4 in dom (c3 +* c4,c5) &
Del (c3 +* c4,c5),c
4 in dom c
1 implies c
9 . 0
= {((c3 +* c4,c5) +* c4,0)} --> (c1 . (Del (c3 +* c4,c5),c4)) ) & ( not ( c
4 in dom (c3 +* c4,c5) &
Del (c3 +* c4,c5),c
4 in dom c
1 ) implies c
9 . 0
= {} ) )
and E70:
for b
1 being
Nat holds
S
1[b
1,c
9 . b
1,c
9 . (b1 + 1),c
3 +* c
4,c
5,c
4,c
2]
;
E71:
(
dom c
3 = dom (c3 +* c4,c5) &
dom c
3 = dom (c3 +* c4,(c5 + 1)) )
by FUNCT_7:32;
E72:
(c3 +* c4,c5) +* c
4,0 =
c
3 +* c
4,0
by FUNCT_7:36
.=
(c3 +* c4,(c5 + 1)) +* c
4,0
by FUNCT_7:36
;
E73:
Del (c3 +* c4,c5),c
4 =
Del c
3,c
4
by Th6
.=
Del (c3 +* c4,(c5 + 1)),c
4
by Th6
;
for b
1 being
set holds
( b
1 in NAT implies c
9 . b
1 = c
8 . b
1 )
proof
defpred S
2[
Nat] means c
9 . a
1 = c
8 . a
1;
E74:
S
2[0]
by E67, E69, E71, E72, E73;
E75:
for b
1 being
Nat holds
( S
2[b
1] implies S
2[b
1 + 1] )
proof
let c
10 be
Nat;
assume E76:
S
2[c
10]
;
E77:
(c3 +* c4,c5) +* c
4,c
10 =
c
3 +* c
4,c
10
by FUNCT_7:36
.=
(c3 +* c4,(c5 + 1)) +* c
4,c
10
by FUNCT_7:36
;
E78:
(c3 +* c4,c5) +* c
4,
(c10 + 1) =
c
3 +* c
4,
(c10 + 1)
by FUNCT_7:36
.=
(c3 +* c4,(c5 + 1)) +* c
4,
(c10 + 1)
by FUNCT_7:36
;
per cases
not ( not ( c4 in dom (c3 +* c4,c5) & (c3 +* c4,c5) +* c4,c10 in dom (c9 . c10) & ((c3 +* c4,c5) +* c4,c10) ^ <*((c9 . c10) . ((c3 +* c4,c5) +* c4,c10))*> in dom c2 ) & c4 in dom (c3 +* c4,c5) & (c3 +* c4,c5) +* c4,c10 in dom (c9 . c10) & ((c3 +* c4,c5) +* c4,c10) ^ <*((c9 . c10) . ((c3 +* c4,c5) +* c4,c10))*> in dom c2 )
;
suppose E79:
( c
4 in dom (c3 +* c4,c5) &
(c3 +* c4,c5) +* c
4,c
10 in dom (c9 . c10) &
((c3 +* c4,c5) +* c4,c10) ^ <*((c9 . c10) . ((c3 +* c4,c5) +* c4,c10))*> in dom c
2 )
;
hence c
9 . (c10 + 1) =
(c9 . c10) +* ({((c3 +* c4,c5) +* c4,(c10 + 1))} --> (c2 . (((c3 +* c4,c5) +* c4,c10) ^ <*((c9 . c10) . ((c3 +* c4,c5) +* c4,c10))*>)))
by E70
.=
c
8 . (c10 + 1)
by E68, E71, E76, E77, E78, E79
;
end;
end;
end;
E76:
for b
1 being
Nat holds
S
2[b
1]
from NAT_1:sch 1(E74, E75);
let c
10 be
set ;
assume
c
10 in NAT
;
hence
c
9 . c
10 = c
8 . c
10
by E76;
end;
hence
c
8 = c
9
by FUNCT_2:18;
end;
E67:
now
let c
1, c
2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c
3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c
4, c
5 be
Nat;
assume E68:
c
4 in dom c
3
;
set c
6 = c
3 +* c
4,c
5;
set c
7 = c
3 +* c
4,
(c5 + 1);
let c
8 be
Function of
NAT ,
HFuncs NAT ;
assume that E69:
( ( c
4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),c
4 in dom c
1 implies c
8 . 0
= {((c3 +* c4,(c5 + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c5 + 1)),c4)) ) & ( not ( c
4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),c
4 in dom c
1 ) implies c
8 . 0
= {} ) )
and E70:
for b
1 being
Nat holds
S
1[b
1,c
8 . b
1,c
8 . (b1 + 1),c
3 +* c
4,
(c5 + 1),c
4,c
2]
;
thus
(c8 . (c5 + 1)) . (c3 +* c4,c5) = (c8 . c5) . (c3 +* c4,c5)
proof
per cases
not ( not ( c4 in dom (c3 +* c4,(c5 + 1)) & (c3 +* c4,(c5 + 1)) +* c4,c5 in dom (c8 . c5) & ((c3 +* c4,(c5 + 1)) +* c4,c5) ^ <*((c8 . c5) . ((c3 +* c4,(c5 + 1)) +* c4,c5))*> in dom c2 ) & c4 in dom (c3 +* c4,(c5 + 1)) & (c3 +* c4,(c5 + 1)) +* c4,c5 in dom (c8 . c5) & ((c3 +* c4,(c5 + 1)) +* c4,c5) ^ <*((c8 . c5) . ((c3 +* c4,(c5 + 1)) +* c4,c5))*> in dom c2 )
;
suppose
( c
4 in dom (c3 +* c4,(c5 + 1)) &
(c3 +* c4,(c5 + 1)) +* c
4,c
5 in dom (c8 . c5) &
((c3 +* c4,(c5 + 1)) +* c4,c5) ^ <*((c8 . c5) . ((c3 +* c4,(c5 + 1)) +* c4,c5))*> in dom c
2 )
;
then E71:
c
8 . (c5 + 1) = (c8 . c5) +* ({((c3 +* c4,(c5 + 1)) +* c4,(c5 + 1))} --> (c2 . (((c3 +* c4,(c5 + 1)) +* c4,c5) ^ <*((c8 . c5) . ((c3 +* c4,(c5 + 1)) +* c4,c5))*>)))
by E70;
(
(c3 +* c4,c5) . c
4 = c
5 &
(c3 +* c4,(c5 + 1)) . c
4 = c
5 + 1 )
by E68, FUNCT_7:33;
then
( c
3 +* c
4,c
5 <> c
3 +* c
4,
(c5 + 1) & c
3 +* c
4,
(c5 + 1) = (c3 +* c4,(c5 + 1)) +* c
4,
(c5 + 1) )
by FUNCT_7:36;
then
not c
3 +* c
4,c
5 in {((c3 +* c4,(c5 + 1)) +* c4,(c5 + 1))}
by TARSKI:def 1;
then
not c
3 +* c
4,c
5 in dom ({((c3 +* c4,(c5 + 1)) +* c4,(c5 + 1))} --> (c2 . (((c3 +* c4,(c5 + 1)) +* c4,c5) ^ <*((c8 . c5) . ((c3 +* c4,(c5 + 1)) +* c4,c5))*>)))
by FUNCOP_1:19;
hence
(c8 . (c5 + 1)) . (c3 +* c4,c5) = (c8 . c5) . (c3 +* c4,c5)
by E71, FUNCT_4:12;
end;
end;
end;
E71:
for b
1, b
2 being
Nat holds
( c
3 +* c
4,b
2 in dom (c8 . b1) implies b
2 <= b
1 )
proof
defpred S
2[
Nat] means for b
1 being
Nat holds
( c
3 +* c
4,b
1 in dom (c8 . a1) implies b
1 <= a
1 );
E72:
S
2[0]
proof
let c
9 be
Nat;
assume E73:
c
3 +* c
4,c
9 in dom (c8 . 0)
;
per cases
not ( not ( c4 in dom (c3 +* c4,(c5 + 1)) & Del (c3 +* c4,(c5 + 1)),c4 in dom c1 ) & c4 in dom (c3 +* c4,(c5 + 1)) & Del (c3 +* c4,(c5 + 1)),c4 in dom c1 )
;
suppose
( c
4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),c
4 in dom c
1 )
;
then
dom (c8 . 0) = {((c3 +* c4,(c5 + 1)) +* c4,0)}
by E69, FUNCOP_1:19;
then E74: c
3 +* c
4,c
9 =
(c3 +* c4,(c5 + 1)) +* c
4,0
by E73, TARSKI:def 1
.=
c
3 +* c
4,0
by FUNCT_7:36
;
c
9 =
(c3 +* c4,c9) . c
4
by E68, FUNCT_7:33
.=
0
by E68, E74, FUNCT_7:33
;
hence
c
9 <= 0
;
end;
end;
end;
E73:
for b
1 being
Nat holds
( S
2[b
1] implies S
2[b
1 + 1] )
proof
let c
9 be
Nat;
assume E74:
S
2[c
9]
;
let c
10 be
Nat;
assume E75:
c
3 +* c
4,c
10 in dom (c8 . (c9 + 1))
;
per cases
not ( not ( c4 in dom (c3 +* c4,(c5 + 1)) & (c3 +* c4,(c5 + 1)) +* c4,c9 in dom (c8 . c9) & ((c3 +* c4,(c5 + 1)) +* c4,c9) ^ <*((c8 . c9) . ((c3 +* c4,(c5 + 1)) +* c4,c9))*> in dom c2 ) & c4 in dom (c3 +* c4,(c5 + 1)) & (c3 +* c4,(c5 + 1)) +* c4,c9 in dom (c8 . c9) & ((c3 +* c4,(c5 + 1)) +* c4,c9) ^ <*((c8 . c9) . ((c3 +* c4,(c5 + 1)) +* c4,c9))*> in dom c2 )
;
suppose
( c
4 in dom (c3 +* c4,(c5 + 1)) &
(c3 +* c4,(c5 + 1)) +* c
4,c
9 in dom (c8 . c9) &
((c3 +* c4,(c5 + 1)) +* c4,c9) ^ <*((c8 . c9) . ((c3 +* c4,(c5 + 1)) +* c4,c9))*> in dom c
2 )
;
then
c
8 . (c9 + 1) = (c8 . c9) +* ({((c3 +* c4,(c5 + 1)) +* c4,(c9 + 1))} --> (c2 . (((c3 +* c4,(c5 + 1)) +* c4,c9) ^ <*((c8 . c9) . ((c3 +* c4,(c5 + 1)) +* c4,c9))*>)))
by E70;
then
dom (c8 . (c9 + 1)) = (dom (c8 . c9)) \/ (dom ({((c3 +* c4,(c5 + 1)) +* c4,(c9 + 1))} --> (c2 . (((c3 +* c4,(c5 + 1)) +* c4,c9) ^ <*((c8 . c9) . ((c3 +* c4,(c5 + 1)) +* c4,c9))*>))))
by FUNCT_4:def 1;
then E76:
dom (c8 . (c9 + 1)) = (dom (c8 . c9)) \/ {((c3 +* c4,(c5 + 1)) +* c4,(c9 + 1))}
by FUNCOP_1:19;
thus
c
10 <= c
9 + 1
end;
end;
end;
thus
for b
1 being
Nat holds
S
2[b
1]
from NAT_1:sch 1(E72, E73);
end;
thus
not c
3 +* c
4,
(c5 + 1) in dom (c8 . c5)
end;
E68:
now
let c
1, c
2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c
3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c
4, c
5 be
Nat;
assume E69:
c
4 in dom c
3
;
let c
6 be
Function of
((arity c1) + 1) -tuples_on NAT ,
HFuncs NAT ;
assume E70:
for b
1 being
Element of
((arity c1) + 1) -tuples_on NAT holds c
6 . b
1 = primrec c
1,c
2,c
4,b
1
;
thus
for b
1, b
2 being
Nat holds
dom (c6 . (c3 +* c4,b1)) c= dom (c6 . (c3 +* c4,(b1 + b2)))
proof
let c
7 be
Nat;
set c
8 = c
3 +* c
4,c
7;
defpred S
2[
Nat] means
dom (c6 . (c3 +* c4,c7)) c= dom (c6 . (c3 +* c4,(c7 + a1)));
E71:
S
2[0]
;
E72:
now
let c
9 be
Nat;
assume E73:
S
2[c
9]
;
set c
10 = c
3 +* c
4,
(c7 + c9);
set c
11 = c
3 +* c
4,
((c7 + c9) + 1);
set c
12 = c
7 + c
9;
consider c
13 being
Function of
NAT ,
HFuncs NAT such that E74:
primrec c
1,c
2,c
4,
(c3 +* c4,(c7 + c9)) = c
13 . ((c3 +* c4,(c7 + c9)) /. c4)
and E75:
( ( c
4 in dom (c3 +* c4,(c7 + c9)) &
Del (c3 +* c4,(c7 + c9)),c
4 in dom c
1 implies c
13 . 0
= {((c3 +* c4,(c7 + c9)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c7 + c9)),c4)) ) & ( not ( c
4 in dom (c3 +* c4,(c7 + c9)) &
Del (c3 +* c4,(c7 + c9)),c
4 in dom c
1 ) implies c
13 . 0
= {} ) )
and E76:
for b
1 being
Nat holds
S
1[b
1,c
13 . b
1,c
13 . (b1 + 1),c
3 +* c
4,
(c7 + c9),c
4,c
2]
by Def13;
consider c
14 being
Function of
NAT ,
HFuncs NAT such that E77:
primrec c
1,c
2,c
4,
(c3 +* c4,((c7 + c9) + 1)) = c
14 . ((c3 +* c4,((c7 + c9) + 1)) /. c4)
and E78:
( ( c
4 in dom (c3 +* c4,((c7 + c9) + 1)) &
Del (c3 +* c4,((c7 + c9) + 1)),c
4 in dom c
1 implies c
14 . 0
= {((c3 +* c4,((c7 + c9) + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,((c7 + c9) + 1)),c4)) ) & ( not ( c
4 in dom (c3 +* c4,((c7 + c9) + 1)) &
Del (c3 +* c4,((c7 + c9) + 1)),c
4 in dom c
1 ) implies c
14 . 0
= {} ) )
and E79:
for b
1 being
Nat holds
S
1[b
1,c
14 . b
1,c
14 . (b1 + 1),c
3 +* c
4,
((c7 + c9) + 1),c
4,c
2]
by Def13;
E80:
c
14 = c
13
by E75, E76, E78, E79, Lemma66;
E81:
(
dom c
3 = dom (c3 +* c4,c7) &
dom c
3 = dom (c3 +* c4,((c7 + c9) + 1)) &
dom c
3 = dom (c3 +* c4,(c7 + c9)) )
by FUNCT_7:32;
then E82:
(c3 +* c4,((c7 + c9) + 1)) /. c
4 =
(c3 +* c4,((c7 + c9) + 1)) . c
4
by E69, FINSEQ_4:def 4
.=
(c7 + c9) + 1
by E69, FUNCT_7:33
;
E83:
(c3 +* c4,(c7 + c9)) /. c
4 =
(c3 +* c4,(c7 + c9)) . c
4
by E69, E81, FINSEQ_4:def 4
.=
c
7 + c
9
by E69, FUNCT_7:33
;
E84:
c
6 . (c3 +* c4,(c7 + (c9 + 1))) = c
13 . ((c7 + c9) + 1)
by E70, E77, E80, E82;
E85:
c
6 . (c3 +* c4,(c7 + c9)) = c
13 . (c7 + c9)
by E70, E74, E83;
per cases
not ( not ( c4 in dom (c3 +* c4,(c7 + c9)) & (c3 +* c4,(c7 + c9)) +* c4,(c7 + c9) in dom (c13 . (c7 + c9)) & ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c2 ) & c4 in dom (c3 +* c4,(c7 + c9)) & (c3 +* c4,(c7 + c9)) +* c4,(c7 + c9) in dom (c13 . (c7 + c9)) & ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c2 )
;
suppose
( c
4 in dom (c3 +* c4,(c7 + c9)) &
(c3 +* c4,(c7 + c9)) +* c
4,
(c7 + c9) in dom (c13 . (c7 + c9)) &
((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c
2 )
;
then
c
13 . ((c7 + c9) + 1) = (c13 . (c7 + c9)) +* ({((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1))} --> (c2 . (((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*>)))
by E76;
then
dom (c13 . ((c7 + c9) + 1)) = (dom (c13 . (c7 + c9))) \/ (dom ({((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1))} --> (c2 . (((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*>))))
by FUNCT_4:def 1;
then
dom (c13 . (c7 + c9)) c= dom (c13 . ((c7 + c9) + 1))
by XBOOLE_1:7;
hence
S
2[c
9 + 1]
by E73, E84, E85, XBOOLE_1:1;
end;
end;
end;
thus
for b
1 being
Nat holds
S
2[b
1]
from NAT_1:sch 1(E71, E72);
end;
end;
E69:
now
let c
1, c
2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c
3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c
4, c
5 be
Nat;
assume E70:
c
4 in dom c
3
;
let c
6 be
Function of
((arity c1) + 1) -tuples_on NAT ,
HFuncs NAT ;
assume E71:
for b
1 being
Element of
((arity c1) + 1) -tuples_on NAT holds c
6 . b
1 = primrec c
1,c
2,c
4,b
1
;
thus
for b
1, b
2 being
Nat holds
not ( not c
3 +* c
4,b
1 in dom (c6 . (c3 +* c4,b1)) & c
3 +* c
4,b
1 in dom (c6 . (c3 +* c4,(b1 + b2))) )
proof
let c
7 be
Nat;
set c
8 = c
3 +* c
4,c
7;
defpred S
2[
Nat] means not ( not c
3 +* c
4,c
7 in dom (c6 . (c3 +* c4,c7)) & c
3 +* c
4,c
7 in dom (c6 . (c3 +* c4,(c7 + a1))) );
E72:
S
2[0]
;
E73:
for b
1 being
Nat holds
( S
2[b
1] implies S
2[b
1 + 1] )
proof
let c
9 be
Nat;
assume that E74:
S
2[c
9]
and E75:
not c
3 +* c
4,c
7 in dom (c6 . (c3 +* c4,c7))
;
set c
10 = c
3 +* c
4,
(c7 + c9);
set c
11 = c
3 +* c
4,
((c7 + c9) + 1);
set c
12 = c
7 + c
9;
consider c
13 being
Function of
NAT ,
HFuncs NAT such that E76:
primrec c
1,c
2,c
4,
(c3 +* c4,(c7 + c9)) = c
13 . ((c3 +* c4,(c7 + c9)) /. c4)
and E77:
( ( c
4 in dom (c3 +* c4,(c7 + c9)) &
Del (c3 +* c4,(c7 + c9)),c
4 in dom c
1 implies c
13 . 0
= {((c3 +* c4,(c7 + c9)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c7 + c9)),c4)) ) & ( not ( c
4 in dom (c3 +* c4,(c7 + c9)) &
Del (c3 +* c4,(c7 + c9)),c
4 in dom c
1 ) implies c
13 . 0
= {} ) )
and E78:
for b
1 being
Nat holds
S
1[b
1,c
13 . b
1,c
13 . (b1 + 1),c
3 +* c
4,
(c7 + c9),c
4,c
2]
by Def13;
consider c
14 being
Function of
NAT ,
HFuncs NAT such that E79:
primrec c
1,c
2,c
4,
(c3 +* c4,((c7 + c9) + 1)) = c
14 . ((c3 +* c4,((c7 + c9) + 1)) /. c4)
and E80:
( ( c
4 in dom (c3 +* c4,((c7 + c9) + 1)) &
Del (c3 +* c4,((c7 + c9) + 1)),c
4 in dom c
1 implies c
14 . 0
= {((c3 +* c4,((c7 + c9) + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,((c7 + c9) + 1)),c4)) ) & ( not ( c
4 in dom (c3 +* c4,((c7 + c9) + 1)) &
Del (c3 +* c4,((c7 + c9) + 1)),c
4 in dom c
1 ) implies c
14 . 0
= {} ) )
and E81:
for b
1 being
Nat holds
S
1[b
1,c
14 . b
1,c
14 . (b1 + 1),c
3 +* c
4,
((c7 + c9) + 1),c
4,c
2]
by Def13;
E82:
c
14 = c
13
by E77, E78, E80, E81, Lemma66;
E83:
(
dom c
3 = dom (c3 +* c4,c7) &
dom c
3 = dom (c3 +* c4,((c7 + c9) + 1)) &
dom c
3 = dom (c3 +* c4,(c7 + c9)) )
by FUNCT_7:32;
then E84:
(c3 +* c4,((c7 + c9) + 1)) /. c
4 =
(c3 +* c4,((c7 + c9) + 1)) . c
4
by E70, FINSEQ_4:def 4
.=
(c7 + c9) + 1
by E70, FUNCT_7:33
;
(c3 +* c4,(c7 + c9)) /. c
4 =
(c3 +* c4,(c7 + c9)) . c
4
by E70, E83, FINSEQ_4:def 4
.=
c
7 + c
9
by E70, FUNCT_7:33
;
then E85:
not c
3 +* c
4,c
7 in dom (c13 . (c7 + c9))
by E71, E74, E75, E76;
E86:
c
6 . (c3 +* c4,(c7 + (c9 + 1))) = c
13 . ((c7 + c9) + 1)
by E71, E79, E82, E84;
per cases
not ( not ( c4 in dom (c3 +* c4,(c7 + c9)) & (c3 +* c4,(c7 + c9)) +* c4,(c7 + c9) in dom (c13 . (c7 + c9)) & ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c2 ) & c4 in dom (c3 +* c4,(c7 + c9)) & (c3 +* c4,(c7 + c9)) +* c4,(c7 + c9) in dom (c13 . (c7 + c9)) & ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c2 )
;
suppose
( c
4 in dom (c3 +* c4,(c7 + c9)) &
(c3 +* c4,(c7 + c9)) +* c
4,
(c7 + c9) in dom (c13 . (c7 + c9)) &
((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c
2 )
;
then
c
13 . ((c7 + c9) + 1) = (c13 . (c7 + c9)) +* ({((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1))} --> (c2 . (((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*>)))
by E78;
then
dom (c13 . ((c7 + c9) + 1)) = (dom (c13 . (c7 + c9))) \/ (dom ({((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1))} --> (c2 . (((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*>))))
by FUNCT_4:def 1;
then E87:
dom (c13 . ((c7 + c9) + 1)) = (dom (c13 . (c7 + c9))) \/ {((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1))}
by FUNCOP_1:19;
c
7 <= c
7 + c
9
by NAT_1:29;
then E88:
c
7 <> (c7 + c9) + 1
by NAT_1:38;
(
(c3 +* c4,c7) . c
4 = c
7 &
((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1)) . c
4 = (c7 + c9) + 1 )
by E70, E83, FUNCT_7:33;
then
not c
3 +* c
4,c
7 in {((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1))}
by E88, TARSKI:def 1;
hence
not c
3 +* c
4,c
7 in dom (c6 . (c3 +* c4,(c7 + (c9 + 1))))
by E85, E86, E87, XBOOLE_0:def 2;
end;
end;
end;
thus
for b
1 being
Nat holds
S
2[b
1]
from NAT_1:sch 1(E72, E73);
end;
end;
Lemma70:
for b1, b2 being Nat
for b3, b4 being non empty to-naturals from-natural-fseqs homogeneous Function
for b5 being Element of ((arity b3) + 1) -tuples_on NAT holds
( b1 in dom b5 implies ( ( b5 +* b1,0 in dom (primrec b3,b4,b1) implies Del b5,b1 in dom b3 ) & ( Del b5,b1 in dom b3 implies b5 +* b1,0 in dom (primrec b3,b4,b1) ) & ( b5 +* b1,0 in dom (primrec b3,b4,b1) implies (primrec b3,b4,b1) . (b5 +* b1,0) = b3 . (Del b5,b1) ) & ( b5 +* b1,(b2 + 1) in dom (primrec b3,b4,b1) implies ( b5 +* b1,b2 in dom (primrec b3,b4,b1) & (b5 +* b1,b2) ^ <*((primrec b3,b4,b1) . (b5 +* b1,b2))*> in dom b4 ) ) & ( b5 +* b1,b2 in dom (primrec b3,b4,b1) & (b5 +* b1,b2) ^ <*((primrec b3,b4,b1) . (b5 +* b1,b2))*> in dom b4 implies b5 +* b1,(b2 + 1) in dom (primrec b3,b4,b1) ) & ( b5 +* b1,(b2 + 1) in dom (primrec b3,b4,b1) implies (primrec b3,b4,b1) . (b5 +* b1,(b2 + 1)) = b4 . ((b5 +* b1,b2) ^ <*((primrec b3,b4,b1) . (b5 +* b1,b2))*>) ) ) )
theorem Th62: :: COMPUT_1:62
theorem Th63: :: COMPUT_1:63
theorem Th64: :: COMPUT_1:64
theorem Th65: :: COMPUT_1:65
for b
1, b
2 being
Natfor b
3, b
4 being non
empty to-naturals from-natural-fseqs homogeneous Functionfor b
5 being
Element of
((arity b3) + 1) -tuples_on NAT holds
( b
1 in dom b
5 implies ( b
5 +* b
1,
(b2 + 1) in dom (primrec b3,b4,b1) iff ( b
5 +* b
1,b
2 in dom (primrec b3,b4,b1) &
(b5 +* b1,b2) ^ <*((primrec b3,b4,b1) . (b5 +* b1,b2))*> in dom b
4 ) ) )
by Lemma70;
theorem Th66: :: COMPUT_1:66
for b
1, b
2 being
Natfor b
3, b
4 being non
empty to-naturals from-natural-fseqs homogeneous Functionfor b
5 being
Element of
((arity b3) + 1) -tuples_on NAT holds
( b
1 in dom b
5 & b
5 +* b
1,
(b2 + 1) in dom (primrec b3,b4,b1) implies
(primrec b3,b4,b1) . (b5 +* b1,(b2 + 1)) = b
4 . ((b5 +* b1,b2) ^ <*((primrec b3,b4,b1) . (b5 +* b1,b2))*>) )
by Lemma70;
theorem Th67: :: COMPUT_1:67
theorem Th68: :: COMPUT_1:68
theorem Th69: :: COMPUT_1:69
:: deftheorem Def15 defines composition_closed COMPUT_1:def 15 :
:: deftheorem Def16 defines primitive-recursion_closed COMPUT_1:def 16 :
:: deftheorem Def17 defines primitive-recursively_closed COMPUT_1:def 17 :
theorem Th70: :: COMPUT_1:70
Lemma78:
for b1 being non empty set
for b2, b3 being Nat holds
( 1 <= b3 & b3 <= b2 implies for b4 being Element of b1
for b5 being Element of b2 -tuples_on b1 holds b5 +* b3,b4 in b2 -tuples_on b1 )
;
theorem Th71: :: COMPUT_1:71
theorem Th72: :: COMPUT_1:72
theorem Th73: :: COMPUT_1:73
theorem Th74: :: COMPUT_1:74
theorem Th75: :: COMPUT_1:75
theorem Th76: :: COMPUT_1:76
theorem Th77: :: COMPUT_1:77
:: deftheorem Def18 defines PrimRec COMPUT_1:def 18 :
theorem Th78: :: COMPUT_1:78
:: deftheorem Def19 defines primitive-recursive COMPUT_1:def 19 :
definition
func initial-funcs -> Subset of
(HFuncs NAT ) equals :: COMPUT_1:def 20
{(0 const 0),(1 succ 1)} \/ { (b1 proj b2) where B is Nat, B is Nat : ( 1 <= b2 & b2 <= b1 ) } ;
coherence
{(0 const 0),(1 succ 1)} \/ { (b1 proj b2) where B is Nat, B is Nat : ( 1 <= b2 & b2 <= b1 ) } is Subset of (HFuncs NAT )
let c
1 be
Subset of
(HFuncs NAT );
func PR-closure c
1 -> Subset of
(HFuncs NAT ) equals :: COMPUT_1:def 21
a
1 \/ { b1 where B is Element of HFuncs NAT : ex b1, b2 being Element of HFuncs NAT ex b3 being Nat st
( b2 in a1 & b3 in a1 & b1 is_primitive-recursively_expressed_by b2,b3,b4 ) } ;
coherence
c1 \/ { b1 where B is Element of HFuncs NAT : ex b1, b2 being Element of HFuncs NAT ex b3 being Nat st
( b2 in c1 & b3 in c1 & b1 is_primitive-recursively_expressed_by b2,b3,b4 ) } is Subset of (HFuncs NAT )
func composition-closure c
1 -> Subset of
(HFuncs NAT ) equals :: COMPUT_1:def 22
a
1 \/ { (b1 * <:b2:>) where B is Element of HFuncs NAT , B is with_the_same_arity Element of (HFuncs NAT ) * : ( b1 in a1 & arity b1 = len b2 & rng b2 c= a1 ) } ;
coherence
c1 \/ { (b1 * <:b2:>) where B is Element of HFuncs NAT , B is with_the_same_arity Element of (HFuncs NAT ) * : ( b1 in c1 & arity b1 = len b2 & rng b2 c= c1 ) } is Subset of (HFuncs NAT )
end;
:: deftheorem Def20 defines initial-funcs COMPUT_1:def 20 :
:: deftheorem Def21 defines PR-closure COMPUT_1:def 21 :
:: deftheorem Def22 defines composition-closure COMPUT_1:def 22 :
:: deftheorem Def23 defines PrimRec-Approximation COMPUT_1:def 23 :
theorem Th79: :: COMPUT_1:79
theorem Th80: :: COMPUT_1:80
theorem Th81: :: COMPUT_1:81
theorem Th82: :: COMPUT_1:82
:: deftheorem Def24 defines nullary COMPUT_1:def 24 :
:: deftheorem Def25 defines unary COMPUT_1:def 25 :
:: deftheorem Def26 defines binary COMPUT_1:def 26 :
:: deftheorem Def27 defines 3-ary COMPUT_1:def 27 :
registration
let c
1 be
primitive-recursive unary Function;
let c
2 be
primitive-recursive 3-ary Function;
cluster primrec a
1,a
2,1
-> non
empty to-naturals quasi_total from-natural-fseqs len-total homogeneous primitive-recursive binary ;
coherence
( primrec c1,c2,1 is primitive-recursive & primrec c1,c2,1 is binary )
cluster primrec a
1,a
2,2
-> non
empty to-naturals quasi_total from-natural-fseqs len-total homogeneous primitive-recursive binary ;
coherence
( primrec c1,c2,2 is primitive-recursive & primrec c1,c2,2 is binary )
end;
theorem Th83: :: COMPUT_1:83
theorem Th84: :: COMPUT_1:84
theorem Th85: :: COMPUT_1:85
theorem Th86: :: COMPUT_1:86
E101:
now
let c
1 be non
empty quasi_total homogeneous PartFunc of
NAT * ,
NAT ;
assume E102:
arity c
1 = 2
;
thus E103:
dom <:<*(3 proj 1),(3 proj 3)*>:> = (dom (3 proj 1)) /\ (dom (3 proj 3))
by FUNCT_6:62;
hence E104:
dom <:<*(3 proj 1),(3 proj 3)*>:> =
(3 -tuples_on NAT ) /\ (dom (3 proj 3))
by Th40
.=
(3 -tuples_on NAT ) /\ (3 -tuples_on NAT )
by Th40
.=
3
-tuples_on NAT
;
reconsider c
2 =
<*0,0,0*> as
FinSequence of
NAT ;
len c
2 = 3
by FINSEQ_1:62;
then E105:
c
2 is
Element of 3
-tuples_on NAT
by FINSEQ_2:110;
E106:
dom c
1 = 2
-tuples_on NAT
by E102, Th25;
set c
3 = c
1 * <:<*(3 proj 1),(3 proj 3)*>:>;
now
let c
4 be
set ;
set c
5 =
<*(3 proj 1),(3 proj 3)*>;
set c
6 =
<:<*(3 proj 1),(3 proj 3)*>:>;
E107:
product (rngs <*(3 proj 1),(3 proj 3)*>) =
product <*(rng (3 proj 1)),(rng (3 proj 3))*>
by FUNCT_6:34
.=
product <*NAT ,(rng (3 proj 3))*>
by Th40
.=
product <*NAT ,NAT *>
by Th40
.=
2
-tuples_on NAT
by FUNCT_6:6
;
assume
c
4 in dom c
1
;
then consider c
7, c
8 being
Nat such that E108:
c
4 = <*c7,c8*>
by E106, FINSEQ_2:120;
reconsider c
9 =
<*c7,0,c8*> as
Element of 3
-tuples_on NAT by FINSEQ_2:124;
<:<*(3 proj 1),(3 proj 3)*>:> . c
9 =
<*((3 proj 1) . c9),((3 proj 3) . c9)*>
by E103, E104, FUNCT_6:62
.=
<*(c9 . 1),((3 proj 3) . c9)*>
by Th42
.=
<*(c9 . 1),(c9 . 3)*>
by Th42
.=
<*c7,(c9 . 3)*>
by FINSEQ_1:62
.=
c
4
by E108, FINSEQ_1:62
;
hence
c
4 in rng <:<*(3 proj 1),(3 proj 3)*>:>
by E104, FUNCT_1:def 5;
end;
then E107:
rng <:<*(3 proj 1),(3 proj 3)*>:> = dom c
1
by TARSKI:2;
hence E108:
dom (c1 * <:<*(3 proj 1),(3 proj 3)*>:>) = 3
-tuples_on NAT
by E104, RELAT_1:46;
then E109:
dom (c1 * <:<*(3 proj 1),(3 proj 3)*>:>) c= NAT *
by MSUALG_1:12;
rng c
1 c= NAT
by RELSET_1:12;
then
rng (c1 * <:<*(3 proj 1),(3 proj 3)*>:>) c= NAT
by E107, RELAT_1:47;
then reconsider c
4 = c
1 * <:<*(3 proj 1),(3 proj 3)*>:> as
PartFunc of
NAT * ,
NAT by E109, RELSET_1:11;
then reconsider c
5 = c
4 as
homogeneous PartFunc of
NAT * ,
NAT by Def4;
take c
6 = c
5;
thus
c
6 = c
1 * <:<*(3 proj 1),(3 proj 3)*>:>
;
c
6 is
Element of
PFuncs (NAT * ),
NAT
by PARTFUN1:119;
then
c
6 in HFuncs NAT
;
hence
c
6 is
Element of
HFuncs NAT
;
for b
1 being
FinSequence holds
( b
1 in dom c
6 implies 3
= len b
1 )
by E108, FINSEQ_2:109;
hence
arity c
6 = 3
by E105, E108, Def5;
hence
( c
6 is
quasi_total & not c
6 is
empty )
by E108, Th25;
end;
:: deftheorem Def28 defines (1,2)->(1,?,2) COMPUT_1:def 28 :
registration
let c
1 be
to-naturals from-natural-fseqs len-total homogeneous binary Function;
cluster (1,2)->(1,?,2) a
1 -> non
empty to-naturals from-natural-fseqs len-total homogeneous 3-ary ;
coherence
( not (1,2)->(1,?,2) c1 is empty & (1,2)->(1,?,2) c1 is 3-ary & (1,2)->(1,?,2) c1 is len-total )
end;
theorem Th87: :: COMPUT_1:87
theorem Th88: :: COMPUT_1:88
:: deftheorem Def29 defines [+] COMPUT_1:def 29 :
theorem Th89: :: COMPUT_1:89
definition
func [*] -> primitive-recursive binary Function equals :: COMPUT_1:def 30
primrec (1 const 0),
((1,2)->(1,?,2) [+] ),2;
coherence
primrec (1 const 0),((1,2)->(1,?,2) [+] ),2 is primitive-recursive binary Function
;
end;
:: deftheorem Def30 defines [*] COMPUT_1:def 30 :
theorem Th90: :: COMPUT_1:90
:: deftheorem Def31 defines [!] COMPUT_1:def 31 :
scheme :: COMPUT_1:sch 2
s2{ F
1()
-> to-naturals from-natural-fseqs len-total homogeneous binary Function, F
2()
-> to-naturals from-natural-fseqs len-total homogeneous binary Function, F
3()
-> to-naturals from-natural-fseqs len-total homogeneous binary Function, F
4(
set ,
set )
-> Nat, F
5(
set ,
set )
-> Nat, F
6(
set ,
set )
-> Nat } :
for b
1, b
2 being
Nat holds
(F1() * <:<*F2(),F3()*>:>) . <*b1,b2*> = F
4(F
5(b
1,b
2),F
6(b
1,b
2))
provided
E106:
for b
1, b
2 being
Nat holds F
1()
. <*b1,b2*> = F
4(b
1,b
2)
and
E107:
for b
1, b
2 being
Nat holds F
2()
. <*b1,b2*> = F
5(b
1,b
2)
and
E108:
for b
1, b
2 being
Nat holds F
3()
. <*b1,b2*> = F
6(b
1,b
2)
theorem Th91: :: COMPUT_1:91
definition
func [^] -> primitive-recursive binary Function equals :: COMPUT_1:def 32
primrec (1 const 1),
((1,2)->(1,?,2) [*] ),2;
coherence
primrec (1 const 1),((1,2)->(1,?,2) [*] ),2 is primitive-recursive binary Function
;
end;
:: deftheorem Def32 defines [^] COMPUT_1:def 32 :
theorem Th92: :: COMPUT_1:92
:: deftheorem Def33 defines [pred] COMPUT_1:def 33 :
theorem Th93: :: COMPUT_1:93
definition
func [-] -> primitive-recursive binary Function equals :: COMPUT_1:def 34
primrec (1 proj 1),
((1,2)->(1,?,2) ([pred] * <:<*(2 proj 2)*>:>)),2;
coherence
primrec (1 proj 1),((1,2)->(1,?,2) ([pred] * <:<*(2 proj 2)*>:>)),2 is primitive-recursive binary Function
;
end;
:: deftheorem Def34 defines [-] COMPUT_1:def 34 :
theorem Th94: :: COMPUT_1:94