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;

theorem Th22:
  for f being homogeneous to-naturals NAT*-defined Function holds
  f is len-total non empty iff dom f = (arity f)-tuples_on NAT
proof
  let f being homogeneous to-naturals NAT*-defined Function;
A1: dom f c= (arity f)-tuples_on NAT by Th20;
  hereby
    assume f is len-total non empty;
    then reconsider
    f9 = f as quasi_total non empty homogeneous PartFunc of NAT*,
    NAT by Th16;
    consider x being object such that
A2: x in dom f9 by XBOOLE_0:def 1;
    reconsider x9 = x as FinSequence of NAT by A2,FINSEQ_1:def 11;
A3: len x9 = arity f by A2,MARGREL1:def 25;
    now
      let z be object;
      thus z in dom f implies z in (arity f)-tuples_on NAT by A1;
      assume z in (arity f)-tuples_on NAT;
      then reconsider z9 = z as Element of (arity f)-tuples_on NAT;
      len z9 = arity f by CARD_1:def 7;
      hence z in dom f by A2,A3,MARGREL1:def 22;
    end;
    hence dom f = (arity f)-tuples_on NAT;
  end;
  assume
A4: dom f = (arity f)-tuples_on NAT;
  thus f is len-total
  proof
    let x, y be FinSequence of NAT;
    assume that
A5: len x = len y and
A6: x in dom f;
    len x = arity f by A4,A6,CARD_1:def 7;
    then y is Element of (arity f)-tuples_on NAT by A5,FINSEQ_2:92;
    hence thesis by A4;
  end;
  thus thesis by A4;
end;
