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;
reserve P for primitive-recursively_closed non empty Subset of HFuncs NAT;

theorem Th77:
  for f being Element of HFuncs(NAT) st
   f in PrimRec-Approximation.m holds f is quasi_total
proof
  defpred p[Nat] means for f being Element of HFuncs(NAT) st f in
  PrimRec-Approximation.$1 holds f is quasi_total;
  set prd = PrimRec-Approximation;
A1: for m be Nat st p[m] holds p[m+1]
  proof
    let m be Nat;
    assume
A2: p[m];
    let f be Element of HFuncs(NAT);
    assume f in prd.(m+1);
    then
A3: f in (PR-closure (prd.m)) \/ (composition-closure (prd.m)) by Def20;
    per cases by A3,XBOOLE_0:def 3;
    suppose
A4:   f in (PR-closure (prd.m));
      thus f is quasi_total
      proof
        per cases by A4,XBOOLE_0:def 3;
        suppose
          f in prd.m;
          hence thesis by A2;
        end;
        suppose
          f in {g where g is Element of HFuncs NAT: ex f1,f2 being
Element of HFuncs NAT, i being Element of NAT st f1 in prd.m & f2 in prd.m & g
          is_primitive-recursively_expressed_by f1,f2,i};
          then consider g being Element of HFuncs NAT such that
A5:       f = g and
A6:       ex f1,f2 being Element of HFuncs NAT, i being Element of
NAT st f1 in prd.m & f2 in prd.m & g is_primitive-recursively_expressed_by f1,
          f2,i;
          consider f1, f2 being Element of HFuncs NAT, i being Element of NAT
          such that
A7:       f1 in prd.m and
A8:       f2 in prd.m and
A9:       g is_primitive-recursively_expressed_by f1,f2,i by A6;
A10:      f2 is quasi_total by A2,A8;
          f1 is quasi_total by A2,A7;
          hence thesis by A5,A9,A10,Th67;
        end;
      end;
    end;
    suppose
A11:  f in (composition-closure (prd.m));
      thus f is quasi_total
      proof
        per cases by A11,XBOOLE_0:def 3;
        suppose
          f in prd.m;
          hence thesis by A2;
        end;
        suppose
          f in {h*<:F:> where h is Element of HFuncs NAT, F is
with_the_same_arity Element of (HFuncs NAT)*: h in prd.m & arity h = len F &
          rng F c= prd.m};
          then consider
          h being Element of HFuncs NAT, F being with_the_same_arity
          Element of (HFuncs NAT)* such that
A12:      f = h*<:F:> and
A13:      h in prd.m and
A14:      arity h = len F and
A15:      rng F c= prd.m;
A16:      for h being Element of HFuncs NAT st h in rng F holds h is
          quasi_total by A2,A15;
          h is quasi_total by A2,A13;
          hence thesis by A12,A14,A16,Th45;
        end;
      end;
    end;
  end;
A17: p[0]
  proof
    let f be Element of HFuncs(NAT);
    assume f in prd.0;
    then f in initial-funcs by Def20;
    then
A18: f in {0 const 0, 1 succ 1} or f in {n proj i where n,i is Element of
    NAT: 1 <= i & i <= n} by XBOOLE_0:def 3;
    per cases by A18,TARSKI:def 2;
    suppose
      f = 0 const 0;
      hence thesis by Th28;
    end;
    suppose
      f = 1 succ 1;
      hence thesis by Th28;
    end;
    suppose
      f in {n proj i where n,i is Element of NAT: 1 <= i & i <= n};
      then ex n, i being Element of NAT st f = n proj i & 1 <= i & i <= n;
      hence thesis by Th28;
    end;
  end;
  for m being Nat holds p[m] from NAT_1:sch 2(A17, A1);
  hence thesis;
end;
