reserve i, j, k, c, m, n for Nat,
  a, x, y, z, X, Y for set,
  D, E for non empty set,
  R for Relation,
  f, g for Function,
  p, q for FinSequence;
reserve f1, f2 for non empty homogeneous to-naturals NAT*-defined Function,
  e1, e2 for homogeneous to-naturals NAT*-defined Function,
  p for Element of (arity f1+1)-tuples_on NAT;

theorem Th56:
  f1 is len-total & f2 is len-total & arity f1 +2 = arity f2 &
  1 <= i & i <= 1+arity f1 implies
  dom primrec(f1,f2,i) = (arity f1+1)-tuples_on NAT &
  arity primrec(f1,f2,i) = arity f1+1
proof
  assume that
A1: f1 is len-total and
A2: f2 is len-total and
A3: arity f1 +2 = arity f2 and
A4: 1 <= i and
A5: i <= 1+arity f1;
  set n = arity f1+1;
A6: n-tuples_on NAT c= dom primrec(f1,f2,i)
  proof
    let x be object;
    assume x in n-tuples_on NAT;
    then reconsider x9 = x as Element of n-tuples_on NAT;
    consider G being Function of n-tuples_on NAT, HFuncs NAT such that
A7: primrec(f1,f2,i) = Union G and
A8: for p being Element of n-tuples_on NAT holds G.p = primrec(f1,f2,
    i,p) by Def11;
    reconsider rngG = rng G as non empty functional compatible set by A7,Th10;
A9: dom union rngG = union the set of all dom f where f is Element of rngG
 by Th11;
    dom G = n-tuples_on NAT by FUNCT_2:def 1;
    then G.x9 in rng G by FUNCT_1:3;
    then
A10: dom (G.x9) in the set of all dom f where f is Element of rngG;
A11: x9 in dom primrec(f1,f2,i,x9) by A1,A2,A3,A4,A5,Th53;
    G.x9 = primrec(f1,f2,i,x9) by A8;
    hence thesis by A7,A11,A9,A10,TARSKI:def 4;
  end;
  dom primrec(f1,f2,i) c= (arity f1+1)-tuples_on NAT by Th55;
  hence dom primrec(f1,f2,i) = (arity f1+1)-tuples_on NAT by A6;
  hence thesis by Th24;
end;
