:: 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
b1,
b2,
b3,
b4 being
set for
b5,
b6 being
Function st
b5 +* b1,
b2 = b6 +* b1,
b3 holds
b5 +* b1,
b4 = b6 +* b1,
b4
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 c1,
c2,
c3 be
to-naturals from-natural-fseqs homogeneous Function;
let c4 be
Nat;
pred c1 is_primitive-recursively_expressed_by c2,
c3,
c4 means :
Def12:
:: COMPUT_1:def 12
ex
b1 being
Nat st
(
dom a1 c= b1 -tuples_on NAT &
a4 >= 1 &
a4 <= b1 &
(arity a2) + 1
= b1 &
b1 + 1
= arity a3 & ( for
b2 being
FinSequence of
NAT st
len b2 = b1 holds
( (
b2 +* a4,0
in dom a1 implies
Del b2,
a4 in dom a2 ) & (
Del b2,
a4 in dom a2 implies
b2 +* a4,0
in dom a1 ) & (
b2 +* a4,0
in dom a1 implies
a1 . (b2 +* a4,0) = a2 . (Del b2,a4) ) & ( for
b3 being
Nat holds
( (
b2 +* a4,
(b3 + 1) in dom a1 implies (
b2 +* a4,
b3 in dom a1 &
(b2 +* a4,b3) ^ <*(a1 . (b2 +* a4,b3))*> in dom a3 ) ) & (
b2 +* a4,
b3 in dom a1 &
(b2 +* a4,b3) ^ <*(a1 . (b2 +* a4,b3))*> in dom a3 implies
b2 +* a4,
(b3 + 1) in dom a1 ) & (
b2 +* a4,
(b3 + 1) in dom a1 implies
a1 . (b2 +* a4,(b3 + 1)) = a3 . ((b2 +* a4,b3) ^ <*(a1 . (b2 +* a4,b3))*>) ) ) ) ) ) );
end;
:: deftheorem Def12 defines is_primitive-recursively_expressed_by COMPUT_1:def 12 :
for
b1,
b2,
b3 being
to-naturals from-natural-fseqs homogeneous Function for
b4 being
Nat holds
(
b1 is_primitive-recursively_expressed_by b2,
b3,
b4 iff ex
b5 being
Nat st
(
dom b1 c= b5 -tuples_on NAT &
b4 >= 1 &
b4 <= b5 &
(arity b2) + 1
= b5 &
b5 + 1
= arity b3 & ( for
b6 being
FinSequence of
NAT st
len b6 = b5 holds
( (
b6 +* b4,0
in dom b1 implies
Del b6,
b4 in dom b2 ) & (
Del b6,
b4 in dom b2 implies
b6 +* b4,0
in dom b1 ) & (
b6 +* b4,0
in dom b1 implies
b1 . (b6 +* b4,0) = b2 . (Del b6,b4) ) & ( for
b7 being
Nat holds
( (
b6 +* b4,
(b7 + 1) in dom b1 implies (
b6 +* b4,
b7 in dom b1 &
(b6 +* b4,b7) ^ <*(b1 . (b6 +* b4,b7))*> in dom b3 ) ) & (
b6 +* b4,
b7 in dom b1 &
(b6 +* b4,b7) ^ <*(b1 . (b6 +* b4,b7))*> in dom b3 implies
b6 +* b4,
(b7 + 1) in dom b1 ) & (
b6 +* b4,
(b7 + 1) in dom b1 implies
b1 . (b6 +* b4,(b7 + 1)) = b3 . ((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 or not a4 +* a5,a1 in dom a2 or not (a4 +* a5,a1) ^ <*(a2 . (a4 +* a5,a1))*> in dom a6 ) implies a3 = a2 ) );
definition
let c1,
c2 be
to-naturals from-natural-fseqs homogeneous Function;
let c3 be
Nat;
let c4 be
FinSequence of
NAT ;
func primrec c1,
c2,
c3,
c4 -> Element of
HFuncs NAT means :
Def13:
:: COMPUT_1:def 13
ex
b1 being
Function of
NAT ,
HFuncs NAT st
(
a5 = b1 . (a4 /. a3) & (
a3 in dom a4 &
Del a4,
a3 in dom a1 implies
b1 . 0
= {(a4 +* a3,0)} --> (a1 . (Del a4,a3)) ) & ( ( not
a3 in dom a4 or not
Del a4,
a3 in dom a1 ) implies
b1 . 0
= {} ) & ( for
b2 being
Nat holds
( (
a3 in dom a4 &
a4 +* a3,
b2 in dom (b1 . b2) &
(a4 +* a3,b2) ^ <*((b1 . b2) . (a4 +* a3,b2))*> in dom a2 implies
b1 . (b2 + 1) = (b1 . b2) +* ({(a4 +* a3,(b2 + 1))} --> (a2 . ((a4 +* a3,b2) ^ <*((b1 . b2) . (a4 +* a3,b2))*>))) ) & ( ( not
a3 in dom a4 or not
a4 +* a3,
b2 in dom (b1 . b2) or not
(a4 +* a3,b2) ^ <*((b1 . b2) . (a4 +* a3,b2))*> in dom a2 ) implies
b1 . (b2 + 1) = b1 . b2 ) ) ) );
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 or not 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 or not c4 +* c3,b3 in dom (b2 . b3) or not (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 st 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 or not 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 or not c4 +* c3,b4 in dom (b3 . b4) or not (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 or not 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 or not c4 +* c3,b4 in dom (b3 . b4) or not (c4 +* c3,b4) ^ <*((b3 . b4) . (c4 +* c3,b4))*> in dom c2 ) implies b3 . (b4 + 1) = b3 . b4 ) ) ) ) holds
b1 = b2
end;
:: deftheorem Def13 defines primrec COMPUT_1:def 13 :
for
b1,
b2 being
to-naturals from-natural-fseqs homogeneous Function for
b3 being
Nat for
b4 being
FinSequence of
NAT for
b5 being
Element of
HFuncs NAT holds
(
b5 = primrec b1,
b2,
b3,
b4 iff ex
b6 being
Function of
NAT ,
HFuncs NAT st
(
b5 = b6 . (b4 /. b3) & (
b3 in dom b4 &
Del b4,
b3 in dom b1 implies
b6 . 0
= {(b4 +* b3,0)} --> (b1 . (Del b4,b3)) ) & ( ( not
b3 in dom b4 or not
Del b4,
b3 in dom b1 ) implies
b6 . 0
= {} ) & ( for
b7 being
Nat holds
( (
b3 in dom b4 &
b4 +* b3,
b7 in dom (b6 . b7) &
(b4 +* b3,b7) ^ <*((b6 . b7) . (b4 +* b3,b7))*> in dom b2 implies
b6 . (b7 + 1) = (b6 . b7) +* ({(b4 +* b3,(b7 + 1))} --> (b2 . ((b4 +* b3,b7) ^ <*((b6 . b7) . (b4 +* b3,b7))*>))) ) & ( ( not
b3 in dom b4 or not
b4 +* b3,
b7 in dom (b6 . b7) or not
(b4 +* b3,b7) ^ <*((b6 . b7) . (b4 +* b3,b7))*> in dom b2 ) implies
b6 . (b7 + 1) = b6 . b7 ) ) ) ) );
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 c1,
c2 be
to-naturals from-natural-fseqs homogeneous Function;
let c3 be
Nat;
func primrec c1,
c2,
c3 -> Element of
HFuncs NAT means :
Def14:
:: COMPUT_1:def 14
ex
b1 being
Function of
((arity a1) + 1) -tuples_on NAT ,
HFuncs NAT st
(
a4 = Union b1 & ( for
b2 being
Element of
((arity a1) + 1) -tuples_on NAT holds
b1 . b2 = primrec a1,
a2,
a3,
b2 ) );
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 st 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 ) ) holds
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 c1,
c2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c4,
c5 be
Nat;
set c6 =
c3 +* c4,
(c5 + 1);
set c7 =
c3 +* c4,
c5;
let c8,
c9 be
Function of
NAT ,
HFuncs NAT ;
assume that E67:
( (
c4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),
c4 in dom c1 implies
c8 . 0
= {((c3 +* c4,(c5 + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c5 + 1)),c4)) ) & ( ( not
c4 in dom (c3 +* c4,(c5 + 1)) or not
Del (c3 +* c4,(c5 + 1)),
c4 in dom c1 ) implies
c8 . 0
= {} ) )
and E68:
for
b1 being
Nat holds
S1[
b1,
c8 . b1,
c8 . (b1 + 1),
c3 +* c4,
(c5 + 1),
c4,
c2]
and E69:
( (
c4 in dom (c3 +* c4,c5) &
Del (c3 +* c4,c5),
c4 in dom c1 implies
c9 . 0
= {((c3 +* c4,c5) +* c4,0)} --> (c1 . (Del (c3 +* c4,c5),c4)) ) & ( ( not
c4 in dom (c3 +* c4,c5) or not
Del (c3 +* c4,c5),
c4 in dom c1 ) implies
c9 . 0
= {} ) )
and E70:
for
b1 being
Nat holds
S1[
b1,
c9 . b1,
c9 . (b1 + 1),
c3 +* c4,
c5,
c4,
c2]
;
E71:
(
dom c3 = dom (c3 +* c4,c5) &
dom c3 = dom (c3 +* c4,(c5 + 1)) )
by FUNCT_7:32;
E72:
(c3 +* c4,c5) +* c4,0 =
c3 +* c4,0
by FUNCT_7:36
.=
(c3 +* c4,(c5 + 1)) +* c4,0
by FUNCT_7:36
;
E73:
Del (c3 +* c4,c5),
c4 =
Del c3,
c4
by Th6
.=
Del (c3 +* c4,(c5 + 1)),
c4
by Th6
;
for
b1 being
set st
b1 in NAT holds
c9 . b1 = c8 . b1
proof
defpred S2[
Nat]
means c9 . a1 = c8 . a1;
E74:
S2[0]
by E67, E69, E71, E72, E73;
E75:
for
b1 being
Nat st
S2[
b1] holds
S2[
b1 + 1]
proof
let c10 be
Nat;
assume E76:
S2[
c10]
;
E77:
(c3 +* c4,c5) +* c4,
c10 =
c3 +* c4,
c10
by FUNCT_7:36
.=
(c3 +* c4,(c5 + 1)) +* c4,
c10
by FUNCT_7:36
;
E78:
(c3 +* c4,c5) +* c4,
(c10 + 1) =
c3 +* c4,
(c10 + 1)
by FUNCT_7:36
.=
(c3 +* c4,(c5 + 1)) +* c4,
(c10 + 1)
by FUNCT_7:36
;
per cases
( ( 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 ) or not c4 in dom (c3 +* c4,c5) or not (c3 +* c4,c5) +* c4,c10 in dom (c9 . c10) or not ((c3 +* c4,c5) +* c4,c10) ^ <*((c9 . c10) . ((c3 +* c4,c5) +* c4,c10))*> in dom c2 )
;
suppose E79:
(
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 )
;
hence c9 . (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
.=
c8 . (c10 + 1)
by E68, E71, E76, E77, E78, E79
;
end;
end;
end;
E76:
for
b1 being
Nat holds
S2[
b1]
from NAT_1:sch 1(E74, E75);
let c10 be
set ;
assume
c10 in NAT
;
hence
c9 . c10 = c8 . c10
by E76;
end;
hence
c8 = c9
by FUNCT_2:18;
end;
E67:
now
let c1,
c2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c4,
c5 be
Nat;
assume E68:
c4 in dom c3
;
set c6 =
c3 +* c4,
c5;
set c7 =
c3 +* c4,
(c5 + 1);
let c8 be
Function of
NAT ,
HFuncs NAT ;
assume that E69:
( (
c4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),
c4 in dom c1 implies
c8 . 0
= {((c3 +* c4,(c5 + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c5 + 1)),c4)) ) & ( ( not
c4 in dom (c3 +* c4,(c5 + 1)) or not
Del (c3 +* c4,(c5 + 1)),
c4 in dom c1 ) implies
c8 . 0
= {} ) )
and E70:
for
b1 being
Nat holds
S1[
b1,
c8 . b1,
c8 . (b1 + 1),
c3 +* c4,
(c5 + 1),
c4,
c2]
;
thus
(c8 . (c5 + 1)) . (c3 +* c4,c5) = (c8 . c5) . (c3 +* c4,c5)
proof
per cases
( ( 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 ) or not c4 in dom (c3 +* c4,(c5 + 1)) or not (c3 +* c4,(c5 + 1)) +* c4,c5 in dom (c8 . c5) or not ((c3 +* c4,(c5 + 1)) +* c4,c5) ^ <*((c8 . c5) . ((c3 +* c4,(c5 + 1)) +* c4,c5))*> in dom c2 )
;
suppose
(
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 )
;
then E71:
c8 . (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) . c4 = c5 &
(c3 +* c4,(c5 + 1)) . c4 = c5 + 1 )
by E68, FUNCT_7:33;
then
(
c3 +* c4,
c5 <> c3 +* c4,
(c5 + 1) &
c3 +* c4,
(c5 + 1) = (c3 +* c4,(c5 + 1)) +* c4,
(c5 + 1) )
by FUNCT_7:36;
then
not
c3 +* c4,
c5 in {((c3 +* c4,(c5 + 1)) +* c4,(c5 + 1))}
by TARSKI:def 1;
then
not
c3 +* c4,
c5 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
b1,
b2 being
Nat st
c3 +* c4,
b2 in dom (c8 . b1) holds
b2 <= b1
proof
defpred S2[
Nat]
means for
b1 being
Nat st
c3 +* c4,
b1 in dom (c8 . a1) holds
b1 <= a1;
E72:
S2[0]
proof
let c9 be
Nat;
assume E73:
c3 +* c4,
c9 in dom (c8 . 0)
;
per cases
( ( c4 in dom (c3 +* c4,(c5 + 1)) & Del (c3 +* c4,(c5 + 1)),c4 in dom c1 ) or not c4 in dom (c3 +* c4,(c5 + 1)) or not Del (c3 +* c4,(c5 + 1)),c4 in dom c1 )
;
suppose
(
c4 in dom (c3 +* c4,(c5 + 1)) &
Del (c3 +* c4,(c5 + 1)),
c4 in dom c1 )
;
then
dom (c8 . 0) = {((c3 +* c4,(c5 + 1)) +* c4,0)}
by E69, FUNCOP_1:19;
then E74:
c3 +* c4,
c9 =
(c3 +* c4,(c5 + 1)) +* c4,0
by E73, TARSKI:def 1
.=
c3 +* c4,0
by FUNCT_7:36
;
c9 =
(c3 +* c4,c9) . c4
by E68, FUNCT_7:33
.=
0
by E68, E74, FUNCT_7:33
;
hence
c9 <= 0
;
end;
end;
end;
E73:
for
b1 being
Nat st
S2[
b1] holds
S2[
b1 + 1]
proof
let c9 be
Nat;
assume E74:
S2[
c9]
;
let c10 be
Nat;
assume E75:
c3 +* c4,
c10 in dom (c8 . (c9 + 1))
;
per cases
( ( 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 ) or not c4 in dom (c3 +* c4,(c5 + 1)) or not (c3 +* c4,(c5 + 1)) +* c4,c9 in dom (c8 . c9) or not ((c3 +* c4,(c5 + 1)) +* c4,c9) ^ <*((c8 . c9) . ((c3 +* c4,(c5 + 1)) +* c4,c9))*> in dom c2 )
;
suppose
(
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 )
;
then
c8 . (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
c10 <= c9 + 1
end;
end;
end;
thus
for
b1 being
Nat holds
S2[
b1]
from NAT_1:sch 1(E72, E73);
end;
thus
not
c3 +* c4,
(c5 + 1) in dom (c8 . c5)
end;
E68:
now
let c1,
c2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c4,
c5 be
Nat;
assume E69:
c4 in dom c3
;
let c6 be
Function of
((arity c1) + 1) -tuples_on NAT ,
HFuncs NAT ;
assume E70:
for
b1 being
Element of
((arity c1) + 1) -tuples_on NAT holds
c6 . b1 = primrec c1,
c2,
c4,
b1
;
thus
for
b1,
b2 being
Nat holds
dom (c6 . (c3 +* c4,b1)) c= dom (c6 . (c3 +* c4,(b1 + b2)))
proof
let c7 be
Nat;
set c8 =
c3 +* c4,
c7;
defpred S2[
Nat]
means dom (c6 . (c3 +* c4,c7)) c= dom (c6 . (c3 +* c4,(c7 + a1)));
E71:
S2[0]
;
E72:
now
let c9 be
Nat;
assume E73:
S2[
c9]
;
set c10 =
c3 +* c4,
(c7 + c9);
set c11 =
c3 +* c4,
((c7 + c9) + 1);
set c12 =
c7 + c9;
consider c13 being
Function of
NAT ,
HFuncs NAT such that E74:
primrec c1,
c2,
c4,
(c3 +* c4,(c7 + c9)) = c13 . ((c3 +* c4,(c7 + c9)) /. c4)
and E75:
( (
c4 in dom (c3 +* c4,(c7 + c9)) &
Del (c3 +* c4,(c7 + c9)),
c4 in dom c1 implies
c13 . 0
= {((c3 +* c4,(c7 + c9)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c7 + c9)),c4)) ) & ( ( not
c4 in dom (c3 +* c4,(c7 + c9)) or not
Del (c3 +* c4,(c7 + c9)),
c4 in dom c1 ) implies
c13 . 0
= {} ) )
and E76:
for
b1 being
Nat holds
S1[
b1,
c13 . b1,
c13 . (b1 + 1),
c3 +* c4,
(c7 + c9),
c4,
c2]
by Def13;
consider c14 being
Function of
NAT ,
HFuncs NAT such that E77:
primrec c1,
c2,
c4,
(c3 +* c4,((c7 + c9) + 1)) = c14 . ((c3 +* c4,((c7 + c9) + 1)) /. c4)
and E78:
( (
c4 in dom (c3 +* c4,((c7 + c9) + 1)) &
Del (c3 +* c4,((c7 + c9) + 1)),
c4 in dom c1 implies
c14 . 0
= {((c3 +* c4,((c7 + c9) + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,((c7 + c9) + 1)),c4)) ) & ( ( not
c4 in dom (c3 +* c4,((c7 + c9) + 1)) or not
Del (c3 +* c4,((c7 + c9) + 1)),
c4 in dom c1 ) implies
c14 . 0
= {} ) )
and E79:
for
b1 being
Nat holds
S1[
b1,
c14 . b1,
c14 . (b1 + 1),
c3 +* c4,
((c7 + c9) + 1),
c4,
c2]
by Def13;
E80:
c14 = c13
by E75, E76, E78, E79, Lemma66;
E81:
(
dom c3 = dom (c3 +* c4,c7) &
dom c3 = dom (c3 +* c4,((c7 + c9) + 1)) &
dom c3 = dom (c3 +* c4,(c7 + c9)) )
by FUNCT_7:32;
then E82:
(c3 +* c4,((c7 + c9) + 1)) /. c4 =
(c3 +* c4,((c7 + c9) + 1)) . c4
by E69, FINSEQ_4:def 4
.=
(c7 + c9) + 1
by E69, FUNCT_7:33
;
E83:
(c3 +* c4,(c7 + c9)) /. c4 =
(c3 +* c4,(c7 + c9)) . c4
by E69, E81, FINSEQ_4:def 4
.=
c7 + c9
by E69, FUNCT_7:33
;
E84:
c6 . (c3 +* c4,(c7 + (c9 + 1))) = c13 . ((c7 + c9) + 1)
by E70, E77, E80, E82;
E85:
c6 . (c3 +* c4,(c7 + c9)) = c13 . (c7 + c9)
by E70, E74, E83;
per cases
( ( 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 ) or not c4 in dom (c3 +* c4,(c7 + c9)) or not (c3 +* c4,(c7 + c9)) +* c4,(c7 + c9) in dom (c13 . (c7 + c9)) or not ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c2 )
;
suppose
(
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 )
;
then
c13 . ((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
S2[
c9 + 1]
by E73, E84, E85, XBOOLE_1:1;
end;
end;
end;
thus
for
b1 being
Nat holds
S2[
b1]
from NAT_1:sch 1(E71, E72);
end;
end;
E69:
now
let c1,
c2 be non
empty to-naturals from-natural-fseqs homogeneous Function;
let c3 be
Element of
((arity c1) + 1) -tuples_on NAT ;
let c4,
c5 be
Nat;
assume E70:
c4 in dom c3
;
let c6 be
Function of
((arity c1) + 1) -tuples_on NAT ,
HFuncs NAT ;
assume E71:
for
b1 being
Element of
((arity c1) + 1) -tuples_on NAT holds
c6 . b1 = primrec c1,
c2,
c4,
b1
;
thus
for
b1,
b2 being
Nat st not
c3 +* c4,
b1 in dom (c6 . (c3 +* c4,b1)) holds
not
c3 +* c4,
b1 in dom (c6 . (c3 +* c4,(b1 + b2)))
proof
let c7 be
Nat;
set c8 =
c3 +* c4,
c7;
defpred S2[
Nat]
means ( not
c3 +* c4,
c7 in dom (c6 . (c3 +* c4,c7)) implies not
c3 +* c4,
c7 in dom (c6 . (c3 +* c4,(c7 + a1))) );
E72:
S2[0]
;
E73:
for
b1 being
Nat st
S2[
b1] holds
S2[
b1 + 1]
proof
let c9 be
Nat;
assume that E74:
S2[
c9]
and E75:
not
c3 +* c4,
c7 in dom (c6 . (c3 +* c4,c7))
;
set c10 =
c3 +* c4,
(c7 + c9);
set c11 =
c3 +* c4,
((c7 + c9) + 1);
set c12 =
c7 + c9;
consider c13 being
Function of
NAT ,
HFuncs NAT such that E76:
primrec c1,
c2,
c4,
(c3 +* c4,(c7 + c9)) = c13 . ((c3 +* c4,(c7 + c9)) /. c4)
and E77:
( (
c4 in dom (c3 +* c4,(c7 + c9)) &
Del (c3 +* c4,(c7 + c9)),
c4 in dom c1 implies
c13 . 0
= {((c3 +* c4,(c7 + c9)) +* c4,0)} --> (c1 . (Del (c3 +* c4,(c7 + c9)),c4)) ) & ( ( not
c4 in dom (c3 +* c4,(c7 + c9)) or not
Del (c3 +* c4,(c7 + c9)),
c4 in dom c1 ) implies
c13 . 0
= {} ) )
and E78:
for
b1 being
Nat holds
S1[
b1,
c13 . b1,
c13 . (b1 + 1),
c3 +* c4,
(c7 + c9),
c4,
c2]
by Def13;
consider c14 being
Function of
NAT ,
HFuncs NAT such that E79:
primrec c1,
c2,
c4,
(c3 +* c4,((c7 + c9) + 1)) = c14 . ((c3 +* c4,((c7 + c9) + 1)) /. c4)
and E80:
( (
c4 in dom (c3 +* c4,((c7 + c9) + 1)) &
Del (c3 +* c4,((c7 + c9) + 1)),
c4 in dom c1 implies
c14 . 0
= {((c3 +* c4,((c7 + c9) + 1)) +* c4,0)} --> (c1 . (Del (c3 +* c4,((c7 + c9) + 1)),c4)) ) & ( ( not
c4 in dom (c3 +* c4,((c7 + c9) + 1)) or not
Del (c3 +* c4,((c7 + c9) + 1)),
c4 in dom c1 ) implies
c14 . 0
= {} ) )
and E81:
for
b1 being
Nat holds
S1[
b1,
c14 . b1,
c14 . (b1 + 1),
c3 +* c4,
((c7 + c9) + 1),
c4,
c2]
by Def13;
E82:
c14 = c13
by E77, E78, E80, E81, Lemma66;
E83:
(
dom c3 = dom (c3 +* c4,c7) &
dom c3 = dom (c3 +* c4,((c7 + c9) + 1)) &
dom c3 = dom (c3 +* c4,(c7 + c9)) )
by FUNCT_7:32;
then E84:
(c3 +* c4,((c7 + c9) + 1)) /. c4 =
(c3 +* c4,((c7 + c9) + 1)) . c4
by E70, FINSEQ_4:def 4
.=
(c7 + c9) + 1
by E70, FUNCT_7:33
;
(c3 +* c4,(c7 + c9)) /. c4 =
(c3 +* c4,(c7 + c9)) . c4
by E70, E83, FINSEQ_4:def 4
.=
c7 + c9
by E70, FUNCT_7:33
;
then E85:
not
c3 +* c4,
c7 in dom (c13 . (c7 + c9))
by E71, E74, E75, E76;
E86:
c6 . (c3 +* c4,(c7 + (c9 + 1))) = c13 . ((c7 + c9) + 1)
by E71, E79, E82, E84;
per cases
( ( 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 ) or not c4 in dom (c3 +* c4,(c7 + c9)) or not (c3 +* c4,(c7 + c9)) +* c4,(c7 + c9) in dom (c13 . (c7 + c9)) or not ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)) ^ <*((c13 . (c7 + c9)) . ((c3 +* c4,(c7 + c9)) +* c4,(c7 + c9)))*> in dom c2 )
;
suppose
(
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 )
;
then
c13 . ((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;
c7 <= c7 + c9
by NAT_1:29;
then E88:
c7 <> (c7 + c9) + 1
by NAT_1:38;
(
(c3 +* c4,c7) . c4 = c7 &
((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1)) . c4 = (c7 + c9) + 1 )
by E70, E83, FUNCT_7:33;
then
not
c3 +* c4,
c7 in {((c3 +* c4,(c7 + c9)) +* c4,((c7 + c9) + 1))}
by E88, TARSKI:def 1;
hence
not
c3 +* c4,
c7 in dom (c6 . (c3 +* c4,(c7 + (c9 + 1))))
by E85, E86, E87, XBOOLE_0:def 2;
end;
end;
end;
thus
for
b1 being
Nat holds
S2[
b1]
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 st b1 in dom b5 holds
( ( 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
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 st
b1 in dom b5 holds
(
b5 +* b1,
(b2 + 1) in dom (primrec b3,b4,b1) iff (
b5 +* b1,
b2 in dom (primrec b3,b4,b1) &
(b5 +* b1,b2) ^ <*((primrec b3,b4,b1) . (b5 +* b1,b2))*> in dom b4 ) )
by Lemma70;
theorem Th66: :: COMPUT_1:66
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 st
b1 in dom b5 &
b5 +* b1,
(b2 + 1) in dom (primrec b3,b4,b1) holds
(primrec b3,b4,b1) . (b5 +* b1,(b2 + 1)) = b4 . ((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 st 1 <= b3 & b3 <= b2 holds
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 c1 be
Subset of
(HFuncs NAT );
func PR-closure c1 -> Subset of
(HFuncs NAT ) equals :: COMPUT_1:def 21
a1 \/ { 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 c1 -> Subset of
(HFuncs NAT ) equals :: COMPUT_1:def 22
a1 \/ { (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 c1 be
primitive-recursive unary Function;
let c2 be
primitive-recursive 3-ary Function;
cluster primrec a1,
a2,1
-> non
empty quasi_total to-naturals 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 a1,
a2,2
-> non
empty quasi_total to-naturals 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 c1 be non
empty quasi_total homogeneous PartFunc of
NAT * ,
NAT ;
assume E102:
arity c1 = 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 c2 =
<*0,0,0*> as
FinSequence of
NAT ;
len c2 = 3
by FINSEQ_1:62;
then E105:
c2 is
Element of 3
-tuples_on NAT
by FINSEQ_2:110;
E106:
dom c1 = 2
-tuples_on NAT
by E102, Th25;
set c3 =
c1 * <:<*(3 proj 1),(3 proj 3)*>:>;
now
let c4 be
set ;
set c5 =
<*(3 proj 1),(3 proj 3)*>;
set c6 =
<:<*(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
c4 in dom c1
;
then consider c7,
c8 being
Nat such that E108:
c4 = <*c7,c8*>
by E106, FINSEQ_2:120;
reconsider c9 =
<*c7,0,c8*> as
Element of 3
-tuples_on NAT by FINSEQ_2:124;
<:<*(3 proj 1),(3 proj 3)*>:> . c9 =
<*((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
.=
c4
by E108, FINSEQ_1:62
;
hence
c4 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 c1
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 c1 c= NAT
by RELSET_1:12;
then
rng (c1 * <:<*(3 proj 1),(3 proj 3)*>:>) c= NAT
by E107, RELAT_1:47;
then reconsider c4 =
c1 * <:<*(3 proj 1),(3 proj 3)*>:> as
PartFunc of
NAT * ,
NAT by E109, RELSET_1:11;
then reconsider c5 =
c4 as
homogeneous PartFunc of
NAT * ,
NAT by Def4;
take c6 =
c5;
thus
c6 = c1 * <:<*(3 proj 1),(3 proj 3)*>:>
;
c6 is
Element of
PFuncs (NAT * ),
NAT
by PARTFUN1:119;
then
c6 in HFuncs NAT
;
hence
c6 is
Element of
HFuncs NAT
;
for
b1 being
FinSequence st
b1 in dom c6 holds
3
= len b1
by E108, FINSEQ_2:109;
hence
arity c6 = 3
by E105, E108, Def5;
hence
(
c6 is
quasi_total & not
c6 is
empty )
by E108, Th25;
end;
:: deftheorem Def28 defines (1,2)->(1,?,2) COMPUT_1:def 28 :
registration
let c1 be
to-naturals from-natural-fseqs len-total homogeneous binary Function;
cluster (1,2)->(1,?,2) a1 -> 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{
F1()
-> to-naturals from-natural-fseqs len-total homogeneous binary Function,
F2()
-> to-naturals from-natural-fseqs len-total homogeneous binary Function,
F3()
-> to-naturals from-natural-fseqs len-total homogeneous binary Function,
F4(
set ,
set )
-> Nat,
F5(
set ,
set )
-> Nat,
F6(
set ,
set )
-> Nat } :
for
b1,
b2 being
Nat holds
(F1() * <:<*F2(),F3()*>:>) . <*b1,b2*> = F4(
F5(
b1,
b2),
F6(
b1,
b2))
provided
E106:
for
b1,
b2 being
Nat holds
F1()
. <*b1,b2*> = F4(
b1,
b2)
and E107:
for
b1,
b2 being
Nat holds
F2()
. <*b1,b2*> = F5(
b1,
b2)
and E108:
for
b1,
b2 being
Nat holds
F3()
. <*b1,b2*> = F6(
b1,
b2)
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