Article COMPUT_1, MML version 4.99.1005

:: COMPUT_1:funcnot 1 => COMPUT_1:func 1
definition
  let a1 be non empty set;
  let a2 be Element of NAT;
  let a3 be Element of a2 -tuples_on a1;
  let a4 be Element of NAT;
  let a5 be Element of a1;
  redefine func a3 +*(a4,a5) -> Element of a2 -tuples_on a1;
end;

:: COMPUT_1:th 3
theorem
for b1, b2, b3 being set holds
<*b1,b2*> +*(1,b3) = <*b3,b2*> &
 <*b1,b2*> +*(2,b3) = <*b1,b3*>;

:: COMPUT_1:th 5
theorem
for b1, b2, b3, b4 being set
for b5, b6 being Relation-like Function-like set
      st b5 +*(b1,b2) = b6 +*(b1,b3)
   holds b5 +*(b1,b4) = b6 +*(b1,b4);

:: COMPUT_1:th 6
theorem
for b1 being Element of NAT
for b2 being set
for b3 being Relation-like Function-like FinSequence-like set holds
   Del(b3 +*(b1,b2),b1) = Del(b3,b1);

:: COMPUT_1:th 7
theorem
for b1 being Element of NAT
for b2 being set
for b3, b4 being Relation-like Function-like FinSequence-like set
      st b3 +*(b1,b2) = b4 +*(b1,b2)
   holds Del(b3,b1) = Del(b4,b1);

:: COMPUT_1:th 8
theorem
for b1 being set holds
   0 -tuples_on b1 = {{}};

:: COMPUT_1:th 9
theorem
for b1 being Element of NAT
      st b1 <> 0
   holds b1 -tuples_on {} = {};

:: COMPUT_1:th 10
theorem
for b1 being Relation-like Function-like set
      st {} in proj2 b1
   holds <:b1:> = {};

:: COMPUT_1:th 11
theorem
for b1 being non empty set
for b2 being Relation-like Function-like set
      st proj2 b2 = b1
   holds proj2 <:<*b2*>:> = 1 -tuples_on b1;

:: COMPUT_1:th 12
theorem
for b1, b2 being Element of NAT
for b3 being non empty set
   st 1 <= b1 & b1 <= b2 + 1
for b4 being Element of (b2 + 1) -tuples_on b3 holds
   Del(b4,b1) in b2 -tuples_on b3;

:: COMPUT_1:th 13
theorem
for b1 being set
for b2 being FinSequenceSet of b1 holds
   b2 c= b1 *;

:: COMPUT_1:attrnot 1 => COMPUT_1:attr 1
definition
  let a1 be set;
  attr a1 is compatible means
    for b1, b2 being Relation-like Function-like set
          st b1 in a1 & b2 in a1
       holds b1 tolerates b2;
end;

:: COMPUT_1:dfs 1
definiens
  let a1 be set;
To prove
     a1 is compatible
it is sufficient to prove
  thus for b1, b2 being Relation-like Function-like set
          st b1 in a1 & b2 in a1
       holds b1 tolerates b2;

:: COMPUT_1:def 1
theorem
for b1 being set holds
      b1 is compatible
   iff
      for b2, b3 being Relation-like Function-like set
            st b2 in b1 & b3 in b1
         holds b2 tolerates b3;

:: COMPUT_1:exreg 1
registration
  cluster non empty functional compatible set;
end;

:: COMPUT_1:funcreg 1
registration
  let a1 be functional compatible set;
  cluster union a1 -> Relation-like Function-like;
end;

:: COMPUT_1:th 14
theorem
for b1 being set holds
      b1 is functional & b1 is compatible
   iff
      union b1 is Relation-like Function-like set;

:: COMPUT_1:exreg 2
registration
  let a1, a2 be set;
  cluster non empty compatible PartFunc-set of a1,a2;
end;

:: COMPUT_1:th 15
theorem
for b1 being non empty functional compatible set holds
   proj1 union b1 = union {proj1 b2 where b2 is Element of b1: TRUE};

:: COMPUT_1:th 16
theorem
for b1 being functional compatible set
for b2 being Relation-like Function-like set
      st b2 in b1
   holds proj1 b2 c= proj1 union b1 &
    (for b3 being set
          st b3 in proj1 b2
       holds (union b1) . b3 = b2 . b3);

:: COMPUT_1:th 17
theorem
for b1 being non empty functional compatible set holds
   proj2 union b1 = union {proj2 b2 where b2 is Element of b1: TRUE};

:: COMPUT_1:condreg 1
registration
  let a1, a2 be set;
  cluster non empty -> functional (PartFunc-set of a1,a2);
end;

:: COMPUT_1:th 18
theorem
for b1, b2 being set
for b3 being non empty compatible PartFunc-set of b1,b2 holds
   union b3 is Function-like Relation of b1,b2;

:: COMPUT_1:attrnot 2 => VALUED_0:attr 6
notation
  let a1 be Relation-like set;
  synonym to-naturals for natural-valued;
end;

:: COMPUT_1:attrnot 3 => COMPUT_1:attr 2
definition
  let a1 be Relation-like set;
  attr a1 is from-natural-fseqs means
    proj1 a1 c= NAT *;
end;

:: COMPUT_1:dfs 2
definiens
  let a1 be Relation-like set;
To prove
     a1 is from-natural-fseqs
it is sufficient to prove
  thus proj1 a1 c= NAT *;

:: COMPUT_1:def 2
theorem
for b1 being Relation-like set holds
      b1 is from-natural-fseqs
   iff
      proj1 b1 c= NAT *;

:: COMPUT_1:exreg 3
registration
  cluster Relation-like Function-like natural-valued from-natural-fseqs set;
end;

:: COMPUT_1:attrnot 4 => COMPUT_1:attr 3
definition
  let a1 be Relation-like from-natural-fseqs set;
  attr a1 is len-total means
    for b1, b2 being FinSequence of NAT
          st len b1 = len b2 & b1 in proj1 a1
       holds b2 in proj1 a1;
end;

:: COMPUT_1:dfs 3
definiens
  let a1 be Relation-like from-natural-fseqs set;
To prove
     a1 is len-total
it is sufficient to prove
  thus for b1, b2 being FinSequence of NAT
          st len b1 = len b2 & b1 in proj1 a1
       holds b2 in proj1 a1;

:: COMPUT_1:def 3
theorem
for b1 being Relation-like from-natural-fseqs set holds
      b1 is len-total
   iff
      for b2, b3 being FinSequence of NAT
            st len b2 = len b3 & b2 in proj1 b1
         holds b3 in proj1 b1;

:: COMPUT_1:th 19
theorem
for b1 being Element of NAT
for b2 being non empty set
for b3 being Relation-like set
      st proj1 b3 c= b1 -tuples_on b2
   holds b3 is homogeneous;

:: COMPUT_1:funcreg 2
registration
  cluster {} -> homogeneous;
end;

:: COMPUT_1:funcreg 3
registration
  let a1 be Relation-like Function-like FinSequence-like set;
  let a2 be set;
  cluster {a1} --> a2 -> non empty homogeneous;
end;

:: COMPUT_1:exreg 4
registration
  cluster non empty Relation-like Function-like homogeneous set;
end;

:: COMPUT_1:funcreg 4
registration
  let a1 be Relation-like Function-like homogeneous set;
  let a2 be Relation-like Function-like set;
  cluster a1 * a2 -> Relation-like homogeneous;
end;

:: COMPUT_1:exreg 5
registration
  let a1, a2 be set;
  cluster Relation-like Function-like homogeneous Relation of a1 *,a2;
end;

:: COMPUT_1:exreg 6
registration
  let a1, a2 be non empty set;
  cluster non empty Relation-like Function-like homogeneous Relation of a1 *,a2;
end;

:: COMPUT_1:exreg 7
registration
  let a1 be non empty set;
  cluster non empty Relation-like Function-like homogeneous quasi_total Relation of a1 *,a1;
end;

:: COMPUT_1:exreg 8
registration
  cluster non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total set;
end;

:: COMPUT_1:condreg 2
registration
  cluster Function-like -> natural-valued from-natural-fseqs (Relation of NAT *,NAT);
end;

:: COMPUT_1:condreg 3
registration
  cluster Function-like quasi_total -> len-total (Relation of NAT *,NAT);
end;

:: COMPUT_1:th 20
theorem
for b1 being Relation-like Function-like natural-valued from-natural-fseqs len-total set holds
   b1 is Function-like quasi_total Relation of NAT *,NAT;

:: COMPUT_1:th 21
theorem
arity {} = 0;

:: COMPUT_1:th 22
theorem
for b1 being Relation-like homogeneous set
      st proj1 b1 = {{}}
   holds arity b1 = 0;

:: COMPUT_1:th 23
theorem
for b1, b2 being set
for b3 being Function-like homogeneous Relation of b1 *,b2 holds
   dom b3 c= (arity b3) -tuples_on b1;

:: COMPUT_1:th 24
theorem
for b1 being Relation-like Function-like homogeneous from-natural-fseqs set holds
   proj1 b1 c= (arity b1) -tuples_on NAT;

:: COMPUT_1:th 25
theorem
for b1 being set
for b2 being Function-like homogeneous Relation of b1 *,b1 holds
      b2 is quasi_total(b1) & b2 is not empty
   iff
      dom b2 = (arity b2) -tuples_on b1;

:: COMPUT_1:th 26
theorem
for b1 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set holds
      b1 is len-total & b1 is not empty
   iff
      proj1 b1 = (arity b1) -tuples_on NAT;

:: COMPUT_1:th 27
theorem
for b1 being non empty set
for b2 being non empty Function-like homogeneous Relation of b1 *,b1
for b3 being Element of NAT
      st dom b2 c= b3 -tuples_on b1
   holds arity b2 = b3;

:: COMPUT_1:th 28
theorem
for b1 being non empty set
for b2 being Function-like homogeneous Relation of b1 *,b1
for b3 being Element of NAT
      st dom b2 = b3 -tuples_on b1
   holds arity b2 = b3;

:: COMPUT_1:attrnot 5 => COMPUT_1:attr 4
definition
  let a1 be Relation-like set;
  attr a1 is with_the_same_arity means
    for b1, b2 being Relation-like Function-like set
          st b1 in proj2 a1 & b2 in proj2 a1
       holds (b1 is empty & b2 is not empty implies proj1 b2 = {{}}) &
        (b1 is not empty & b2 is not empty implies ex b3 being Element of NAT st
           ex b4 being non empty set st
              proj1 b1 c= b3 -tuples_on b4 & proj1 b2 c= b3 -tuples_on b4);
end;

:: COMPUT_1:dfs 4
definiens
  let a1 be Relation-like set;
To prove
     a1 is with_the_same_arity
it is sufficient to prove
  thus for b1, b2 being Relation-like Function-like set
          st b1 in proj2 a1 & b2 in proj2 a1
       holds (b1 is empty & b2 is not empty implies proj1 b2 = {{}}) &
        (b1 is not empty & b2 is not empty implies ex b3 being Element of NAT st
           ex b4 being non empty set st
              proj1 b1 c= b3 -tuples_on b4 & proj1 b2 c= b3 -tuples_on b4);

:: COMPUT_1:def 6
theorem
for b1 being Relation-like set holds
      b1 is with_the_same_arity
   iff
      for b2, b3 being Relation-like Function-like set
            st b2 in proj2 b1 & b3 in proj2 b1
         holds (b2 is empty & b3 is not empty implies proj1 b3 = {{}}) &
          (b2 is not empty & b3 is not empty implies ex b4 being Element of NAT st
             ex b5 being non empty set st
                proj1 b2 c= b4 -tuples_on b5 & proj1 b3 c= b4 -tuples_on b5);

:: COMPUT_1:funcreg 5
registration
  cluster {} -> with_the_same_arity;
end;

:: COMPUT_1:exreg 9
registration
  cluster Relation-like Function-like finite FinSequence-like with_the_same_arity set;
end;

:: COMPUT_1:exreg 10
registration
  let a1 be set;
  cluster Relation-like Function-like finite FinSequence-like with_the_same_arity FinSequence of a1;
end;

:: COMPUT_1:exreg 11
registration
  let a1 be set;
  cluster Relation-like Function-like finite FinSequence-like with_the_same_arity Element of a1 *;
end;

:: COMPUT_1:funcnot 2 => COMPUT_1:func 2
definition
  let a1 be Relation-like with_the_same_arity set;
  func arity A1 -> Element of NAT means
    for b1 being Relation-like Function-like homogeneous set
          st b1 in proj2 a1
       holds it = arity b1
    if ex b1 being Relation-like Function-like homogeneous set st
       b1 in proj2 a1
    otherwise it = 0;
end;

:: COMPUT_1:def 7
theorem
for b1 being Relation-like with_the_same_arity set
for b2 being Element of NAT holds
   (for b3 being Relation-like Function-like homogeneous set holds
       not b3 in proj2 b1 or    (b2 = arity b1
    iff
       for b3 being Relation-like Function-like homogeneous set
             st b3 in proj2 b1
          holds b2 = arity b3)) &
    (for b3 being Relation-like Function-like homogeneous set holds
       not b3 in proj2 b1 implies    (b2 = arity b1
    iff
       b2 = 0));

:: COMPUT_1:th 29
theorem
for b1 being Relation-like Function-like FinSequence-like with_the_same_arity set
      st len b1 = 0
   holds arity b1 = 0;

:: COMPUT_1:funcnot 3 => COMPUT_1:func 3
definition
  let a1 be set;
  func HFuncs A1 -> non empty PartFunc-set of a1 *,a1 equals
    {b1 where b1 is Element of PFuncs(a1 *,a1): b1 is homogeneous};
end;

:: COMPUT_1:def 8
theorem
for b1 being set holds
   HFuncs b1 = {b2 where b2 is Element of PFuncs(b1 *,b1): b2 is homogeneous};

:: COMPUT_1:th 30
theorem
for b1 being set holds
   {} in HFuncs b1;

:: COMPUT_1:exreg 12
registration
  let a1 be non empty set;
  cluster non empty Relation-like Function-like homogeneous quasi_total Element of HFuncs a1;
end;

:: COMPUT_1:condreg 4
registration
  let a1 be set;
  cluster -> homogeneous (Element of HFuncs a1);
end;

:: COMPUT_1:condreg 5
registration
  let a1 be non empty set;
  let a2 be non empty Element of bool HFuncs a1;
  cluster -> homogeneous (Element of a2);
end;

:: COMPUT_1:th 31
theorem
for b1 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set holds
   b1 is Element of HFuncs NAT;

:: COMPUT_1:th 32
theorem
for b1 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total set holds
   b1 is quasi_total Element of HFuncs NAT;

:: COMPUT_1:th 33
theorem
for b1 being non empty set
for b2 being Relation-like set
      st proj2 b2 c= HFuncs b1 &
         (for b3, b4 being Relation-like Function-like homogeneous set
               st b3 in proj2 b2 & b4 in proj2 b2
            holds arity b3 = arity b4)
   holds b2 is with_the_same_arity;

:: COMPUT_1:funcnot 4 => COMPUT_1:func 4
definition
  let a1, a2 be Element of NAT;
  func A1 const A2 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs set equals
    (a1 -tuples_on NAT) --> a2;
end;

:: COMPUT_1:def 9
theorem
for b1, b2 being Element of NAT holds
b1 const b2 = (b1 -tuples_on NAT) --> b2;

:: COMPUT_1:th 34
theorem
for b1, b2 being Element of NAT holds
b1 const b2 in HFuncs NAT;

:: COMPUT_1:funcreg 6
registration
  let a1, a2 be Element of NAT;
  cluster a1 const a2 -> non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total;
end;

:: COMPUT_1:th 35
theorem
for b1, b2 being Element of NAT holds
arity (b1 const b2) = b1;

:: COMPUT_1:funcnot 5 => COMPUT_1:func 5
definition
  let a1, a2 be Element of NAT;
  func A1 succ A2 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs set means
    proj1 it = a1 -tuples_on NAT &
     (for b1 being Element of a1 -tuples_on NAT holds
        it . b1 = (b1 /. a2) + 1);
end;

:: COMPUT_1:def 10
theorem
for b1, b2 being Element of NAT
for b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set holds
      b3 = b1 succ b2
   iff
      proj1 b3 = b1 -tuples_on NAT &
       (for b4 being Element of b1 -tuples_on NAT holds
          b3 . b4 = (b4 /. b2) + 1);

:: COMPUT_1:th 37
theorem
for b1, b2 being Element of NAT holds
b1 succ b2 in HFuncs NAT;

:: COMPUT_1:funcreg 7
registration
  let a1, a2 be Element of NAT;
  cluster a1 succ a2 -> non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total;
end;

:: COMPUT_1:th 38
theorem
for b1, b2 being Element of NAT holds
arity (b1 succ b2) = b1;

:: COMPUT_1:funcnot 6 => COMPUT_1:func 6
definition
  let a1, a2 be Element of NAT;
  func A1 proj A2 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs set equals
    proj(a1 |-> NAT,a2);
end;

:: COMPUT_1:def 11
theorem
for b1, b2 being Element of NAT holds
b1 proj b2 = proj(b1 |-> NAT,b2);

:: COMPUT_1:th 39
theorem
for b1, b2 being Element of NAT holds
b1 proj b2 in HFuncs NAT;

:: COMPUT_1:th 40
theorem
for b1, b2 being Element of NAT holds
proj1 (b1 proj b2) = b1 -tuples_on NAT &
 (1 <= b2 & b2 <= b1 implies proj2 (b1 proj b2) = NAT);

:: COMPUT_1:funcreg 8
registration
  let a1, a2 be Element of NAT;
  cluster a1 proj a2 -> non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total;
end;

:: COMPUT_1:th 41
theorem
for b1, b2 being Element of NAT holds
arity (b1 proj b2) = b1;

:: COMPUT_1:th 42
theorem
for b1, b2 being Element of NAT
for b3 being Element of b1 -tuples_on NAT holds
   (b1 proj b2) . b3 = b3 . b2;

:: COMPUT_1:funcreg 9
registration
  let a1 be set;
  cluster HFuncs a1 -> non empty functional;
end;

:: COMPUT_1:th 43
theorem
for b1 being Element of NAT
for b2, b3 being non empty set
for b4 being Function-like quasi_total Relation of b2,HFuncs b3
      st proj2 b4 is compatible &
         (for b5 being Element of b2 holds
            proj1 (b4 . b5) c= b1 -tuples_on b3)
   holds ex b5 being Element of HFuncs b3 st
      b5 = Union b4 & dom b5 c= b1 -tuples_on b3;

:: COMPUT_1:th 44
theorem
for b1 being non empty set
for b2 being Function-like quasi_total Relation of NAT,HFuncs b1
      st for b3 being Element of NAT holds
           b2 . b3 c= b2 . (b3 + 1)
   holds Union b2 in HFuncs b1;

:: COMPUT_1:th 45
theorem
for b1 being non empty set
for b2 being with_the_same_arity FinSequence of HFuncs b1 holds
   proj1 <:b2:> c= (arity b2) -tuples_on b1;

:: COMPUT_1:funcreg 10
registration
  let a1 be non empty set;
  let a2 be with_the_same_arity FinSequence of HFuncs a1;
  cluster <:a2:> -> Relation-like Function-like homogeneous;
end;

:: COMPUT_1:th 46
theorem
for b1 being non empty set
for b2 being Element of HFuncs b1
for b3 being with_the_same_arity FinSequence of HFuncs b1 holds
   proj1 (<:b3:> * b2) c= (arity b3) -tuples_on b1 &
    proj2 (<:b3:> * b2) c= b1 &
    <:b3:> * b2 in HFuncs b1;

:: COMPUT_1:modenot 1 => COMPUT_1:mode 1
definition
  let a1, a2 be non empty set;
  let a3 be non empty PartFunc-set of a1,a2;
  let a4 be non empty Element of bool a3;
  redefine mode Element of a4 -> Element of a3;
end;

:: COMPUT_1:funcreg 11
registration
  let a1 be Relation-like Function-like homogeneous from-natural-fseqs set;
  cluster <*a1*> -> with_the_same_arity;
end;

:: COMPUT_1:th 47
theorem
for b1 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set holds
   arity <*b1*> = arity b1;

:: COMPUT_1:th 48
theorem
for b1, b2 being non empty Element of HFuncs NAT
for b3 being with_the_same_arity FinSequence of HFuncs NAT
      st b2 = <:b3:> * b1
   holds arity b2 = arity b3;

:: COMPUT_1:th 49
theorem
for b1 being non empty set
for b2 being non empty quasi_total Element of HFuncs b1
for b3 being with_the_same_arity FinSequence of HFuncs b1
      st arity b2 = len b3 &
         b3 is not empty &
         (for b4 being Element of HFuncs b1
               st b4 in proj2 b3
            holds b4 is quasi_total(b1) & b4 is not empty)
   holds <:b3:> * b2 is non empty quasi_total Element of HFuncs b1 &
    proj1 (<:b3:> * b2) = (arity b3) -tuples_on b1;

:: COMPUT_1:th 50
theorem
for b1 being non empty set
for b2 being quasi_total Element of HFuncs b1
for b3 being with_the_same_arity FinSequence of HFuncs b1
      st arity b2 = len b3 &
         (for b4 being Element of HFuncs b1
               st b4 in proj2 b3
            holds b4 is quasi_total(b1))
   holds <:b3:> * b2 is quasi_total Element of HFuncs b1;

:: COMPUT_1:th 51
theorem
for b1 being non empty set
for b2, b3 being non empty quasi_total Element of HFuncs b1
      st arity b2 = 0 & arity b3 = 0 & b2 . {} = b3 . {}
   holds b2 = b3;

:: COMPUT_1:th 52
theorem
for b1, b2 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total set
      st arity b1 = 0 & arity b2 = 0 & b1 . {} = b2 . {}
   holds b1 = b2;

:: COMPUT_1:prednot 1 => COMPUT_1:pred 1
definition
  let a1, a2, a3 be Relation-like Function-like natural-valued homogeneous from-natural-fseqs set;
  let a4 be Element of NAT;
  pred A1 is_primitive-recursively_expressed_by A2,A3,A4 means
    ex b1 being Element of NAT st
       proj1 a1 c= b1 -tuples_on NAT &
        1 <= a4 &
        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 proj1 a1 implies Del(b2,a4) in proj1 a2) &
            (Del(b2,a4) in proj1 a2 implies b2 +*(a4,0) in proj1 a1) &
            (b2 +*(a4,0) in proj1 a1 implies a1 . (b2 +*(a4,0)) = a2 . Del(b2,a4)) &
            (for b3 being Element of NAT holds
               (b2 +*(a4,b3 + 1) in proj1 a1 implies b2 +*(a4,b3) in proj1 a1 &
                 (b2 +*(a4,b3)) ^ <*a1 . (b2 +*(a4,b3))*> in proj1 a3) &
                (b2 +*(a4,b3) in proj1 a1 &
                 (b2 +*(a4,b3)) ^ <*a1 . (b2 +*(a4,b3))*> in proj1 a3 implies b2 +*(a4,b3 + 1) in proj1 a1) &
                (b2 +*(a4,b3 + 1) in proj1 a1 implies a1 . (b2 +*(a4,b3 + 1)) = a3 . ((b2 +*(a4,b3)) ^ <*a1 . (b2 +*(a4,b3))*>))));
end;

:: COMPUT_1:dfs 10
definiens
  let a1, a2, a3 be Relation-like Function-like natural-valued homogeneous from-natural-fseqs set;
  let a4 be Element of NAT;
To prove
     a1 is_primitive-recursively_expressed_by a2,a3,a4
it is sufficient to prove
  thus ex b1 being Element of NAT st
       proj1 a1 c= b1 -tuples_on NAT &
        1 <= a4 &
        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 proj1 a1 implies Del(b2,a4) in proj1 a2) &
            (Del(b2,a4) in proj1 a2 implies b2 +*(a4,0) in proj1 a1) &
            (b2 +*(a4,0) in proj1 a1 implies a1 . (b2 +*(a4,0)) = a2 . Del(b2,a4)) &
            (for b3 being Element of NAT holds
               (b2 +*(a4,b3 + 1) in proj1 a1 implies b2 +*(a4,b3) in proj1 a1 &
                 (b2 +*(a4,b3)) ^ <*a1 . (b2 +*(a4,b3))*> in proj1 a3) &
                (b2 +*(a4,b3) in proj1 a1 &
                 (b2 +*(a4,b3)) ^ <*a1 . (b2 +*(a4,b3))*> in proj1 a3 implies b2 +*(a4,b3 + 1) in proj1 a1) &
                (b2 +*(a4,b3 + 1) in proj1 a1 implies a1 . (b2 +*(a4,b3 + 1)) = a3 . ((b2 +*(a4,b3)) ^ <*a1 . (b2 +*(a4,b3))*>))));

:: COMPUT_1:def 12
theorem
for b1, b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being Element of NAT holds
      b1 is_primitive-recursively_expressed_by b2,b3,b4
   iff
      ex b5 being Element of NAT st
         proj1 b1 c= b5 -tuples_on NAT &
          1 <= b4 &
          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 proj1 b1 implies Del(b6,b4) in proj1 b2) &
              (Del(b6,b4) in proj1 b2 implies b6 +*(b4,0) in proj1 b1) &
              (b6 +*(b4,0) in proj1 b1 implies b1 . (b6 +*(b4,0)) = b2 . Del(b6,b4)) &
              (for b7 being Element of NAT holds
                 (b6 +*(b4,b7 + 1) in proj1 b1 implies b6 +*(b4,b7) in proj1 b1 &
                   (b6 +*(b4,b7)) ^ <*b1 . (b6 +*(b4,b7))*> in proj1 b3) &
                  (b6 +*(b4,b7) in proj1 b1 &
                   (b6 +*(b4,b7)) ^ <*b1 . (b6 +*(b4,b7))*> in proj1 b3 implies b6 +*(b4,b7 + 1) in proj1 b1) &
                  (b6 +*(b4,b7 + 1) in proj1 b1 implies b1 . (b6 +*(b4,b7 + 1)) = b3 . ((b6 +*(b4,b7)) ^ <*b1 . (b6 +*(b4,b7))*>))));

:: COMPUT_1:funcnot 7 => COMPUT_1:func 7
definition
  let a1, a2 be Relation-like Function-like natural-valued homogeneous from-natural-fseqs set;
  let a3 be Element of NAT;
  let a4 be FinSequence of NAT;
  func primrec(A1,A2,A3,A4) -> Element of HFuncs NAT means
    ex b1 being Function-like quasi_total Relation of NAT,HFuncs NAT st
       it = b1 . (a4 /. a3) &
        (a3 in dom a4 & Del(a4,a3) in proj1 a1 implies b1 . 0 = {a4 +*(a3,0)} --> (a1 . Del(a4,a3))) &
        (a3 in dom a4 & Del(a4,a3) in proj1 a1 or b1 . 0 = {}) &
        (for b2 being Element of NAT holds
           (a3 in dom a4 &
             a4 +*(a3,b2) in proj1 (b1 . b2) &
             (a4 +*(a3,b2)) ^ <*(b1 . b2) . (a4 +*(a3,b2))*> in proj1 a2 implies b1 . (b2 + 1) = (b1 . b2) +* ({a4 +*(a3,b2 + 1)} --> (a2 . ((a4 +*(a3,b2)) ^ <*(b1 . b2) . (a4 +*(a3,b2))*>)))) &
            (a3 in dom a4 &
             a4 +*(a3,b2) in proj1 (b1 . b2) &
             (a4 +*(a3,b2)) ^ <*(b1 . b2) . (a4 +*(a3,b2))*> in proj1 a2 or b1 . (b2 + 1) = b1 . b2));
end;

:: COMPUT_1:def 13
theorem
for b1, b2 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b3 being Element of 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-like quasi_total Relation of NAT,HFuncs NAT st
         b5 = b6 . (b4 /. b3) &
          (b3 in dom b4 & Del(b4,b3) in proj1 b1 implies b6 . 0 = {b4 +*(b3,0)} --> (b1 . Del(b4,b3))) &
          (b3 in dom b4 & Del(b4,b3) in proj1 b1 or b6 . 0 = {}) &
          (for b7 being Element of NAT holds
             (b3 in dom b4 &
               b4 +*(b3,b7) in proj1 (b6 . b7) &
               (b4 +*(b3,b7)) ^ <*(b6 . b7) . (b4 +*(b3,b7))*> in proj1 b2 implies b6 . (b7 + 1) = (b6 . b7) +* ({b4 +*(b3,b7 + 1)} --> (b2 . ((b4 +*(b3,b7)) ^ <*(b6 . b7) . (b4 +*(b3,b7))*>)))) &
              (b3 in dom b4 &
               b4 +*(b3,b7) in proj1 (b6 . b7) &
               (b4 +*(b3,b7)) ^ <*(b6 . b7) . (b4 +*(b3,b7))*> in proj1 b2 or b6 . (b7 + 1) = b6 . b7));

:: COMPUT_1:th 53
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4, b5 being FinSequence of NAT
      st b5 in dom primrec(b2,b3,b1,b4)
   holds ex b6 being Element of NAT st
      b5 = b4 +*(b1,b6);

:: COMPUT_1:th 54
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being FinSequence of NAT
      st not b1 in dom b4
   holds primrec(b2,b3,b1,b4) = {};

:: COMPUT_1:th 55
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4, b5 being FinSequence of NAT holds
primrec(b2,b3,b1,b4) tolerates primrec(b2,b3,b1,b5);

:: COMPUT_1:th 56
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being FinSequence of NAT holds
   dom primrec(b2,b3,b1,b4) c= (1 + arity b2) -tuples_on NAT;

:: COMPUT_1:th 57
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being FinSequence of NAT
      st b2 is empty
   holds primrec(b2,b3,b1,b4) is empty;

:: COMPUT_1:th 58
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being Element of ((arity b2) + 1) -tuples_on NAT
      st b2 is len-total & b3 is len-total & (arity b2) + 2 = arity b3 & 1 <= b1 & b1 <= 1 + arity b2
   holds b4 in dom primrec(b2,b3,b1,b4);

:: COMPUT_1:funcnot 8 => COMPUT_1:func 8
definition
  let a1, a2 be Relation-like Function-like natural-valued homogeneous from-natural-fseqs set;
  let a3 be Element of NAT;
  func primrec(A1,A2,A3) -> Element of HFuncs NAT means
    ex b1 being Function-like quasi_total Relation of ((arity a1) + 1) -tuples_on NAT,HFuncs NAT st
       it = Union b1 &
        (for b2 being Element of ((arity a1) + 1) -tuples_on NAT holds
           b1 . b2 = primrec(a1,a2,a3,b2));
end;

:: COMPUT_1:def 14
theorem
for b1, b2 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b3 being Element of NAT
for b4 being Element of HFuncs NAT holds
      b4 = primrec(b1,b2,b3)
   iff
      ex b5 being Function-like quasi_total Relation of ((arity b1) + 1) -tuples_on NAT,HFuncs NAT st
         b4 = Union b5 &
          (for b6 being Element of ((arity b1) + 1) -tuples_on NAT holds
             b5 . b6 = primrec(b1,b2,b3,b6));

:: COMPUT_1:th 59
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
      st b2 is empty
   holds primrec(b2,b3,b1) is empty;

:: COMPUT_1:th 60
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set holds
dom primrec(b2,b3,b1) c= ((arity b2) + 1) -tuples_on NAT;

:: COMPUT_1:th 61
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
      st b2 is len-total & b3 is len-total & (arity b2) + 2 = arity b3 & 1 <= b1 & b1 <= 1 + arity b2
   holds dom primrec(b2,b3,b1) = ((arity b2) + 1) -tuples_on NAT &
    arity primrec(b2,b3,b1) = (arity b2) + 1;

:: COMPUT_1:th 62
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being Element of ((arity b2) + 1) -tuples_on NAT
      st b1 in dom b4
   holds    b4 +*(b1,0) in dom primrec(b2,b3,b1)
   iff
      Del(b4,b1) in proj1 b2;

:: COMPUT_1:th 63
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being Element of ((arity b2) + 1) -tuples_on NAT
      st b1 in dom b4 &
         b4 +*(b1,0) in dom primrec(b2,b3,b1)
   holds (primrec(b2,b3,b1)) . (b4 +*(b1,0)) = b2 . Del(b4,b1);

:: COMPUT_1:th 64
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being Element of ((arity b2) + 1) -tuples_on NAT
      st b1 in dom b4 & b2 is len-total
   holds (primrec(b2,b3,b1)) . (b4 +*(b1,0)) = b2 . Del(b4,b1);

:: COMPUT_1:th 65
theorem
for b1, b2 being Element of NAT
for b3, b4 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
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 proj1 b4;

:: COMPUT_1:th 66
theorem
for b1, b2 being Element of NAT
for b3, b4 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
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))*>);

:: COMPUT_1:th 67
theorem
for b1, b2 being Element of NAT
for b3, b4 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b5 being Element of ((arity b3) + 1) -tuples_on NAT
      st b3 is len-total & b4 is len-total & (arity b3) + 2 = arity b4 & 1 <= b1 & b1 <= 1 + arity b3
   holds (primrec(b3,b4,b1)) . (b5 +*(b1,b2 + 1)) = b4 . ((b5 +*(b1,b2)) ^ <*(primrec(b3,b4,b1)) . (b5 +*(b1,b2))*>);

:: COMPUT_1:th 68
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
      st (arity b2) + 2 = arity b3 & 1 <= b1 & b1 <= (arity b2) + 1
   holds primrec(b2,b3,b1) is_primitive-recursively_expressed_by b2,b3,b1;

:: COMPUT_1:th 69
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
   st 1 <= b1 & b1 <= (arity b2) + 1
for b4 being Element of HFuncs NAT
      st b4 is_primitive-recursively_expressed_by b2,b3,b1
   holds b4 = primrec(b2,b3,b1);

:: COMPUT_1:attrnot 6 => COMPUT_1:attr 5
definition
  let a1 be set;
  attr a1 is composition_closed means
    for b1 being Element of HFuncs NAT
    for b2 being with_the_same_arity FinSequence of HFuncs NAT
          st b1 in a1 & arity b1 = len b2 & proj2 b2 c= a1
       holds <:b2:> * b1 in a1;
end;

:: COMPUT_1:dfs 13
definiens
  let a1 be set;
To prove
     a1 is composition_closed
it is sufficient to prove
  thus for b1 being Element of HFuncs NAT
    for b2 being with_the_same_arity FinSequence of HFuncs NAT
          st b1 in a1 & arity b1 = len b2 & proj2 b2 c= a1
       holds <:b2:> * b1 in a1;

:: COMPUT_1:def 15
theorem
for b1 being set holds
      b1 is composition_closed
   iff
      for b2 being Element of HFuncs NAT
      for b3 being with_the_same_arity FinSequence of HFuncs NAT
            st b2 in b1 & arity b2 = len b3 & proj2 b3 c= b1
         holds <:b3:> * b2 in b1;

:: COMPUT_1:attrnot 7 => COMPUT_1:attr 6
definition
  let a1 be set;
  attr a1 is primitive-recursion_closed means
    for b1, b2, b3 being Element of HFuncs NAT
    for b4 being Element of NAT
          st b1 is_primitive-recursively_expressed_by b2,b3,b4 & b2 in a1 & b3 in a1
       holds b1 in a1;
end;

:: COMPUT_1:dfs 14
definiens
  let a1 be set;
To prove
     a1 is primitive-recursion_closed
it is sufficient to prove
  thus for b1, b2, b3 being Element of HFuncs NAT
    for b4 being Element of NAT
          st b1 is_primitive-recursively_expressed_by b2,b3,b4 & b2 in a1 & b3 in a1
       holds b1 in a1;

:: COMPUT_1:def 16
theorem
for b1 being set holds
      b1 is primitive-recursion_closed
   iff
      for b2, b3, b4 being Element of HFuncs NAT
      for b5 being Element of NAT
            st b2 is_primitive-recursively_expressed_by b3,b4,b5 & b3 in b1 & b4 in b1
         holds b2 in b1;

:: COMPUT_1:attrnot 8 => COMPUT_1:attr 7
definition
  let a1 be set;
  attr a1 is primitive-recursively_closed means
    0 const 0 in a1 &
     1 succ 1 in a1 &
     (for b1, b2 being Element of NAT
           st 1 <= b2 & b2 <= b1
        holds b1 proj b2 in a1) &
     a1 is composition_closed &
     a1 is primitive-recursion_closed;
end;

:: COMPUT_1:dfs 15
definiens
  let a1 be set;
To prove
     a1 is primitive-recursively_closed
it is sufficient to prove
  thus 0 const 0 in a1 &
     1 succ 1 in a1 &
     (for b1, b2 being Element of NAT
           st 1 <= b2 & b2 <= b1
        holds b1 proj b2 in a1) &
     a1 is composition_closed &
     a1 is primitive-recursion_closed;

:: COMPUT_1:def 17
theorem
for b1 being set holds
      b1 is primitive-recursively_closed
   iff
      0 const 0 in b1 &
       1 succ 1 in b1 &
       (for b2, b3 being Element of NAT
             st 1 <= b3 & b3 <= b2
          holds b2 proj b3 in b1) &
       b1 is composition_closed &
       b1 is primitive-recursion_closed;

:: COMPUT_1:th 70
theorem
HFuncs NAT is primitive-recursively_closed;

:: COMPUT_1:exreg 13
registration
  cluster non empty functional primitive-recursively_closed Element of bool HFuncs NAT;
end;

:: COMPUT_1:th 71
theorem
for b1 being Element of NAT
for b2, b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
for b4 being Element of HFuncs NAT
      st b2 = {} & b4 is_primitive-recursively_expressed_by b2,b3,b1
   holds b4 = {};

:: COMPUT_1:th 72
theorem
for b1 being Element of HFuncs NAT
for b2, b3 being quasi_total Element of HFuncs NAT
for b4 being Element of NAT
      st b1 is_primitive-recursively_expressed_by b2,b3,b4
   holds b1 is quasi_total(NAT) & (b2 is not empty implies b1 is not empty);

:: COMPUT_1:th 73
theorem
for b1, b2 being Element of NAT
for b3 being non empty primitive-recursively_closed Element of bool HFuncs NAT holds
   b1 const b2 in b3;

:: COMPUT_1:th 74
theorem
for b1, b2 being Element of NAT
for b3 being non empty primitive-recursively_closed Element of bool HFuncs NAT
      st 1 <= b1 & b1 <= b2
   holds b2 succ b1 in b3;

:: COMPUT_1:th 75
theorem
for b1 being non empty primitive-recursively_closed Element of bool HFuncs NAT holds
   {} in b1;

:: COMPUT_1:th 76
theorem
for b1 being non empty primitive-recursively_closed Element of bool HFuncs NAT
for b2 being Element of b1
for b3 being with_the_same_arity FinSequence of b1
      st arity b2 = len b3
   holds <:b3:> * b2 in b1;

:: COMPUT_1:th 77
theorem
for b1 being non empty primitive-recursively_closed Element of bool HFuncs NAT
for b2, b3 being Element of b1
   st (arity b2) + 2 = arity b3
for b4 being Element of NAT
      st 1 <= b4 & b4 <= (arity b2) + 1
   holds primrec(b2,b3,b4) in b1;

:: COMPUT_1:funcnot 9 => COMPUT_1:func 9
definition
  func PrimRec -> Element of bool HFuncs NAT equals
    meet {b1 where b1 is Element of bool HFuncs NAT: b1 is primitive-recursively_closed};
end;

:: COMPUT_1:def 18
theorem
PrimRec = meet {b1 where b1 is Element of bool HFuncs NAT: b1 is primitive-recursively_closed};

:: COMPUT_1:th 78
theorem
for b1 being Element of bool HFuncs NAT
      st b1 is primitive-recursively_closed
   holds PrimRec c= b1;

:: COMPUT_1:funcreg 12
registration
  cluster PrimRec -> non empty primitive-recursively_closed;
end;

:: COMPUT_1:condreg 6
registration
  cluster -> homogeneous (Element of PrimRec);
end;

:: COMPUT_1:attrnot 9 => COMPUT_1:attr 8
definition
  let a1 be set;
  attr a1 is primitive-recursive means
    a1 in PrimRec;
end;

:: COMPUT_1:dfs 17
definiens
  let a1 be set;
To prove
     a1 is primitive-recursive
it is sufficient to prove
  thus a1 in PrimRec;

:: COMPUT_1:def 19
theorem
for b1 being set holds
      b1 is primitive-recursive
   iff
      b1 in PrimRec;

:: COMPUT_1:condreg 7
registration
  cluster primitive-recursive -> Relation-like Function-like (set);
end;

:: COMPUT_1:condreg 8
registration
  cluster Relation-like primitive-recursive -> natural-valued homogeneous from-natural-fseqs (set);
end;

:: COMPUT_1:condreg 9
registration
  cluster -> primitive-recursive (Element of PrimRec);
end;

:: COMPUT_1:exreg 14
registration
  cluster Relation-like Function-like primitive-recursive set;
end;

:: COMPUT_1:exreg 15
registration
  cluster Relation-like Function-like complex-valued ext-real-valued real-valued rational-valued integer-valued natural-valued homogeneous from-natural-fseqs primitive-recursive Element of HFuncs NAT;
end;

:: COMPUT_1:funcnot 10 => COMPUT_1:func 10
definition
  func initial-funcs -> Element of bool HFuncs NAT equals
    {0 const 0,1 succ 1} \/ {b1 proj b2 where b1 is Element of NAT, b2 is Element of NAT: 1 <= b2 & b2 <= b1};
end;

:: COMPUT_1:def 20
theorem
initial-funcs = {0 const 0,1 succ 1} \/ {b1 proj b2 where b1 is Element of NAT, b2 is Element of NAT: 1 <= b2 & b2 <= b1};

:: COMPUT_1:funcnot 11 => COMPUT_1:func 11
definition
  let a1 be Element of bool HFuncs NAT;
  func PR-closure A1 -> Element of bool HFuncs NAT equals
    a1 \/ {b1 where b1 is Element of HFuncs NAT: ex b2, b3 being Element of HFuncs NAT st
       ex b4 being Element of NAT st
          b2 in a1 & b3 in a1 & b1 is_primitive-recursively_expressed_by b2,b3,b4};
end;

:: COMPUT_1:def 21
theorem
for b1 being Element of bool HFuncs NAT holds
   PR-closure b1 = b1 \/ {b2 where b2 is Element of HFuncs NAT: ex b3, b4 being Element of HFuncs NAT st
      ex b5 being Element of NAT st
         b3 in b1 & b4 in b1 & b2 is_primitive-recursively_expressed_by b3,b4,b5};

:: COMPUT_1:funcnot 12 => COMPUT_1:func 12
definition
  let a1 be Element of bool HFuncs NAT;
  func composition-closure A1 -> Element of bool HFuncs NAT equals
    a1 \/ {<:b2:> * b1 where b1 is Element of HFuncs NAT, b2 is with_the_same_arity Element of (HFuncs NAT) *: b1 in a1 & arity b1 = len b2 & proj2 b2 c= a1};
end;

:: COMPUT_1:def 22
theorem
for b1 being Element of bool HFuncs NAT holds
   composition-closure b1 = b1 \/ {<:b3:> * b2 where b2 is Element of HFuncs NAT, b3 is with_the_same_arity Element of (HFuncs NAT) *: b2 in b1 & arity b2 = len b3 & proj2 b3 c= b1};

:: COMPUT_1:funcnot 13 => COMPUT_1:func 13
definition
  func PrimRec-Approximation -> Function-like quasi_total Relation of NAT,bool HFuncs NAT means
    it . 0 = initial-funcs &
     (for b1 being natural set holds
        it . (b1 + 1) = (PR-closure (it . b1)) \/ composition-closure (it . b1));
end;

:: COMPUT_1:def 23
theorem
for b1 being Function-like quasi_total Relation of NAT,bool HFuncs NAT holds
      b1 = PrimRec-Approximation
   iff
      b1 . 0 = initial-funcs &
       (for b2 being natural set holds
          b1 . (b2 + 1) = (PR-closure (b1 . b2)) \/ composition-closure (b1 . b2));

:: COMPUT_1:th 79
theorem
for b1, b2 being Element of NAT
      st b1 <= b2
   holds PrimRec-Approximation . b1 c= PrimRec-Approximation . b2;

:: COMPUT_1:th 80
theorem
Union PrimRec-Approximation is primitive-recursively_closed;

:: COMPUT_1:th 81
theorem
PrimRec = Union PrimRec-Approximation;

:: COMPUT_1:th 82
theorem
for b1 being Element of NAT
for b2 being Element of HFuncs NAT
      st b2 in PrimRec-Approximation . b1
   holds b2 is quasi_total(NAT);

:: COMPUT_1:condreg 10
registration
  cluster -> homogeneous quasi_total (Element of PrimRec);
end;

:: COMPUT_1:condreg 11
registration
  cluster primitive-recursive -> quasi_total (Element of HFuncs NAT);
end;

:: COMPUT_1:condreg 12
registration
  cluster Relation-like Function-like from-natural-fseqs primitive-recursive -> len-total (set);
end;

:: COMPUT_1:exreg 16
registration
  cluster non empty Relation-like Function-like complex-valued ext-real-valued real-valued rational-valued integer-valued natural-valued homogeneous quasi_total from-natural-fseqs len-total primitive-recursive Element of PrimRec;
end;

:: COMPUT_1:attrnot 10 => COMPUT_1:attr 9
definition
  let a1 be Relation-like homogeneous set;
  attr a1 is nullary means
    arity a1 = 0;
end;

:: COMPUT_1:dfs 22
definiens
  let a1 be Relation-like homogeneous set;
To prove
     a1 is nullary
it is sufficient to prove
  thus arity a1 = 0;

:: COMPUT_1:def 24
theorem
for b1 being Relation-like homogeneous set holds
      b1 is nullary
   iff
      arity b1 = 0;

:: COMPUT_1:attrnot 11 => COMPUT_1:attr 10
definition
  let a1 be Relation-like homogeneous set;
  attr a1 is unary means
    arity a1 = 1;
end;

:: COMPUT_1:dfs 23
definiens
  let a1 be Relation-like homogeneous set;
To prove
     a1 is unary
it is sufficient to prove
  thus arity a1 = 1;

:: COMPUT_1:def 25
theorem
for b1 being Relation-like homogeneous set holds
      b1 is unary
   iff
      arity b1 = 1;

:: COMPUT_1:attrnot 12 => COMPUT_1:attr 11
definition
  let a1 be Relation-like homogeneous set;
  attr a1 is binary means
    arity a1 = 2;
end;

:: COMPUT_1:dfs 24
definiens
  let a1 be Relation-like homogeneous set;
To prove
     a1 is binary
it is sufficient to prove
  thus arity a1 = 2;

:: COMPUT_1:def 26
theorem
for b1 being Relation-like homogeneous set holds
      b1 is binary
   iff
      arity b1 = 2;

:: COMPUT_1:attrnot 13 => COMPUT_1:attr 12
definition
  let a1 be Relation-like homogeneous set;
  attr a1 is ternary means
    arity a1 = 3;
end;

:: COMPUT_1:dfs 25
definiens
  let a1 be Relation-like homogeneous set;
To prove
     a1 is ternary
it is sufficient to prove
  thus arity a1 = 3;

:: COMPUT_1:def 27
theorem
for b1 being Relation-like homogeneous set holds
      b1 is ternary
   iff
      arity b1 = 3;

:: COMPUT_1:condreg 13
registration
  cluster Relation-like Function-like homogeneous unary -> non empty (set);
end;

:: COMPUT_1:condreg 14
registration
  cluster Relation-like Function-like homogeneous binary -> non empty (set);
end;

:: COMPUT_1:condreg 15
registration
  cluster Relation-like Function-like homogeneous ternary -> non empty (set);
end;

:: COMPUT_1:funcreg 13
registration
  cluster 1 proj 1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs primitive-recursive;
end;

:: COMPUT_1:funcreg 14
registration
  cluster 2 proj 1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs primitive-recursive;
end;

:: COMPUT_1:funcreg 15
registration
  cluster 2 proj 2 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs primitive-recursive;
end;

:: COMPUT_1:funcreg 16
registration
  cluster 1 succ 1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs primitive-recursive;
end;

:: COMPUT_1:funcreg 17
registration
  cluster 3 succ 3 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs primitive-recursive;
end;

:: COMPUT_1:funcreg 18
registration
  let a1 be Element of NAT;
  cluster 0 const a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs nullary;
end;

:: COMPUT_1:funcreg 19
registration
  let a1 be Element of NAT;
  cluster 1 const a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs unary;
end;

:: COMPUT_1:funcreg 20
registration
  let a1 be Element of NAT;
  cluster 2 const a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs binary;
end;

:: COMPUT_1:funcreg 21
registration
  let a1 be Element of NAT;
  cluster 3 const a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs ternary;
end;

:: COMPUT_1:funcreg 22
registration
  let a1 be Element of NAT;
  cluster 1 proj a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs unary;
end;

:: COMPUT_1:funcreg 23
registration
  let a1 be Element of NAT;
  cluster 2 proj a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs binary;
end;

:: COMPUT_1:funcreg 24
registration
  let a1 be Element of NAT;
  cluster 3 proj a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs ternary;
end;

:: COMPUT_1:funcreg 25
registration
  let a1 be Element of NAT;
  cluster 1 succ a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs unary;
end;

:: COMPUT_1:funcreg 26
registration
  let a1 be Element of NAT;
  cluster 2 succ a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs binary;
end;

:: COMPUT_1:funcreg 27
registration
  let a1 be Element of NAT;
  cluster 3 succ a1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs ternary;
end;

:: COMPUT_1:funcreg 28
registration
  let a1, a2 be Element of NAT;
  cluster a1 const a2 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs primitive-recursive;
end;

:: COMPUT_1:exreg 17
registration
  cluster non empty Relation-like Function-like homogeneous primitive-recursive nullary set;
end;

:: COMPUT_1:exreg 18
registration
  cluster Relation-like Function-like homogeneous primitive-recursive unary set;
end;

:: COMPUT_1:exreg 19
registration
  cluster Relation-like Function-like homogeneous primitive-recursive binary set;
end;

:: COMPUT_1:exreg 20
registration
  cluster Relation-like Function-like homogeneous primitive-recursive ternary set;
end;

:: COMPUT_1:exreg 21
registration
  cluster non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total nullary set;
end;

:: COMPUT_1:exreg 22
registration
  cluster non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total unary set;
end;

:: COMPUT_1:exreg 23
registration
  cluster non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total binary set;
end;

:: COMPUT_1:exreg 24
registration
  cluster non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total ternary set;
end;

:: COMPUT_1:funcreg 29
registration
  let a1 be non empty Relation-like Function-like primitive-recursive nullary set;
  let a2 be Relation-like Function-like primitive-recursive binary set;
  cluster primrec(a1,a2,1) -> primitive-recursive unary;
end;

:: COMPUT_1:funcreg 30
registration
  let a1 be Relation-like Function-like primitive-recursive unary set;
  let a2 be Relation-like Function-like primitive-recursive ternary set;
  cluster primrec(a1,a2,1) -> primitive-recursive binary;
end;

:: COMPUT_1:funcreg 31
registration
  let a1 be Relation-like Function-like primitive-recursive unary set;
  let a2 be Relation-like Function-like primitive-recursive ternary set;
  cluster primrec(a1,a2,2) -> primitive-recursive binary;
end;

:: COMPUT_1:th 83
theorem
for b1 being Element of NAT
for b2 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total unary set
for b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set holds
   (primrec(b2,b3,2)) . <*b1,0*> = b2 . <*b1*>;

:: COMPUT_1:th 84
theorem
for b1, b2 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
      st b1 is len-total & arity b1 = 0
   holds (primrec(b1,b2,1)) . <*0*> = b1 . {};

:: COMPUT_1:th 85
theorem
for b1, b2 being Element of NAT
for b3 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total unary set
for b4 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total ternary set holds
   (primrec(b3,b4,2)) . <*b1,b2 + 1*> = b4 . <*b1,b2,(primrec(b3,b4,2)) . <*b1,b2*>*>;

:: COMPUT_1:th 86
theorem
for b1 being Element of NAT
for b2, b3 being non empty Relation-like Function-like natural-valued homogeneous from-natural-fseqs set
      st b2 is len-total & b3 is len-total & arity b2 = 0 & arity b3 = 2
   holds (primrec(b2,b3,1)) . <*b1 + 1*> = b3 . <*b1,(primrec(b2,b3,1)) . <*b1*>*>;

:: COMPUT_1:funcnot 14 => COMPUT_1:func 14
definition
  let a1 be Relation-like Function-like set;
  func (1,2)->(1,?,2) A1 -> Relation-like Function-like set equals
    <:<*3 proj 1,3 proj 3*>:> * a1;
end;

:: COMPUT_1:def 28
theorem
for b1 being Relation-like Function-like set holds
   (1,2)->(1,?,2) b1 = <:<*3 proj 1,3 proj 3*>:> * b1;

:: COMPUT_1:funcreg 32
registration
  let a1 be Relation-like Function-like natural-valued from-natural-fseqs set;
  cluster (1,2)->(1,?,2) a1 -> Relation-like Function-like natural-valued from-natural-fseqs;
end;

:: COMPUT_1:funcreg 33
registration
  let a1 be Relation-like Function-like homogeneous set;
  cluster (1,2)->(1,?,2) a1 -> Relation-like Function-like homogeneous;
end;

:: COMPUT_1:funcreg 34
registration
  let a1 be Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total binary set;
  cluster (1,2)->(1,?,2) a1 -> non empty Relation-like Function-like len-total ternary;
end;

:: COMPUT_1:th 87
theorem
for b1, b2, b3 being Element of NAT
for b4 being Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total binary set holds
   ((1,2)->(1,?,2) b4) . <*b1,b2,b3*> = b4 . <*b1,b3*>;

:: COMPUT_1:th 88
theorem
for b1 being Relation-like Function-like primitive-recursive binary set holds
   (1,2)->(1,?,2) b1 in PrimRec;

:: COMPUT_1:funcreg 35
registration
  let a1 be Relation-like Function-like homogeneous primitive-recursive binary set;
  cluster (1,2)->(1,?,2) a1 -> Relation-like Function-like primitive-recursive ternary;
end;

:: COMPUT_1:funcnot 15 => COMPUT_1:func 15
definition
  func [+] -> Relation-like Function-like primitive-recursive binary set equals
    primrec(1 proj 1,3 succ 3,2);
end;

:: COMPUT_1:def 29
theorem
[+] = primrec(1 proj 1,3 succ 3,2);

:: COMPUT_1:th 89
theorem
for b1, b2 being Element of NAT holds
[+] . <*b1,b2*> = b1 + b2;

:: COMPUT_1:funcnot 16 => COMPUT_1:func 16
definition
  func [*] -> Relation-like Function-like primitive-recursive binary set equals
    primrec(1 const 0,(1,2)->(1,?,2) [+],2);
end;

:: COMPUT_1:def 30
theorem
[*] = primrec(1 const 0,(1,2)->(1,?,2) [+],2);

:: COMPUT_1:th 90
theorem
for b1, b2 being Element of NAT holds
[*] . <*b1,b2*> = b1 * b2;

:: COMPUT_1:funcreg 36
registration
  let a1, a2 be Relation-like Function-like homogeneous primitive-recursive binary set;
  cluster <*a1,a2*> -> with_the_same_arity;
end;

:: COMPUT_1:funcreg 37
registration
  let a1, a2, a3 be Relation-like Function-like primitive-recursive binary set;
  cluster <:<*a2,a3*>:> * a1 -> Relation-like primitive-recursive;
end;

:: COMPUT_1:funcreg 38
registration
  let a1, a2, a3 be Relation-like Function-like primitive-recursive binary set;
  cluster <:<*a2,a3*>:> * a1 -> Relation-like binary;
end;

:: COMPUT_1:funcreg 39
registration
  let a1 be Relation-like Function-like primitive-recursive unary set;
  let a2 be Relation-like Function-like primitive-recursive set;
  cluster <:<*a2*>:> * a1 -> Relation-like primitive-recursive;
end;

:: COMPUT_1:funcreg 40
registration
  let a1 be Relation-like Function-like primitive-recursive unary set;
  let a2 be Relation-like Function-like primitive-recursive binary set;
  cluster <:<*a2*>:> * a1 -> Relation-like binary;
end;

:: COMPUT_1:funcnot 17 => COMPUT_1:func 17
definition
  func [!] -> Relation-like Function-like primitive-recursive unary set equals
    primrec(0 const 1,<:<*<:<*2 proj 1*>:> * (1 succ 1),2 proj 2*>:> * [*],1);
end;

:: COMPUT_1:def 31
theorem
[!] = primrec(0 const 1,<:<*<:<*2 proj 1*>:> * (1 succ 1),2 proj 2*>:> * [*],1);

:: COMPUT_1:sch 1
scheme COMPUT_1:sch 1
{F1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total unary set,
  F2 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total binary set,
  F3 -> Element of NAT,
  F4 -> Element of NAT}:
for b1, b2 being Element of NAT holds
(<:<*F2()*>:> * F1()) . <*b1,b2*> = F3(F4(b1, b2))
provided
   for b1 being Element of NAT holds
      F1() . <*b1*> = F3(b1)
and
   for b1, b2 being Element of NAT holds
   F2() . <*b1,b2*> = F4(b1, b2);


:: COMPUT_1:sch 2
scheme COMPUT_1:sch 2
{F1 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total binary set,
  F2 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total binary set,
  F3 -> Relation-like Function-like natural-valued homogeneous from-natural-fseqs len-total binary set,
  F4 -> Element of NAT,
  F5 -> Element of NAT,
  F6 -> Element of NAT}:
for b1, b2 being Element of NAT holds
(<:<*F2(),F3()*>:> * F1()) . <*b1,b2*> = F4(F5(b1, b2), F6(b1, b2))
provided
   for b1, b2 being Element of NAT holds
   F1() . <*b1,b2*> = F4(b1, b2)
and
   for b1, b2 being Element of NAT holds
   F2() . <*b1,b2*> = F5(b1, b2)
and
   for b1, b2 being Element of NAT holds
   F3() . <*b1,b2*> = F6(b1, b2);


:: COMPUT_1:th 91
theorem
for b1 being Element of NAT holds
   [!] . <*b1*> = b1 !;

:: COMPUT_1:funcnot 18 => COMPUT_1:func 18
definition
  func [^] -> Relation-like Function-like primitive-recursive binary set equals
    primrec(1 const 1,(1,2)->(1,?,2) [*],2);
end;

:: COMPUT_1:def 32
theorem
[^] = primrec(1 const 1,(1,2)->(1,?,2) [*],2);

:: COMPUT_1:th 92
theorem
for b1, b2 being Element of NAT holds
[^] . <*b1,b2*> = b1 |^ b2;

:: COMPUT_1:funcnot 19 => COMPUT_1:func 19
definition
  func [pred] -> Relation-like Function-like primitive-recursive unary set equals
    primrec(0 const 0,2 proj 1,1);
end;

:: COMPUT_1:def 33
theorem
[pred] = primrec(0 const 0,2 proj 1,1);

:: COMPUT_1:th 93
theorem
for b1 being Element of NAT holds
   [pred] . <*0*> = 0 &
    [pred] . <*b1 + 1*> = b1;

:: COMPUT_1:funcnot 20 => COMPUT_1:func 20
definition
  func [-] -> Relation-like Function-like primitive-recursive binary set equals
    primrec(1 proj 1,(1,2)->(1,?,2) (<:<*2 proj 2*>:> * [pred]),2);
end;

:: COMPUT_1:def 34
theorem
[-] = primrec(1 proj 1,(1,2)->(1,?,2) (<:<*2 proj 2*>:> * [pred]),2);

:: COMPUT_1:th 94
theorem
for b1, b2 being Element of NAT holds
[-] . <*b1,b2*> = b1 -' b2;