reserve Al for QC-alphabet;
reserve a,a1,a2,b,c,d for set,
  X,Y,Z for Subset of CQC-WFF(Al),
  i,k,m,n for Nat,
  p,q for Element of CQC-WFF(Al),
  P for QC-pred_symbol of k,Al,
  ll for CQC-variable_list of k,Al,
  f,f1,f2,g for FinSequence of CQC-WFF(Al);
reserve A for non empty finite Subset of NAT;

theorem Th1:
  for f being Function of n,A st ((ex m st succ m = n) & rng f = A
& for n,m st m in dom f & n in dom f & n < m holds f.n in f.m) holds f.(union n
  ) = union rng f
proof
  let f be Function of n,A such that
A1: ex m st succ m = n and
A2: rng f = A and
A3: for n,m st m in dom f & n in dom f & n < m holds f.n in f.m;
  thus f.(union n) c= union rng f
  proof
    let a be object;
    consider m such that
A4: n = succ m by A1;
    dom f = n by FUNCT_2:def 1;
    then
A5: f.m in rng f by A4,FUNCT_1:3,ORDINAL1:6;
    assume a in f.(union n);
    then a in f.m by A4,ORDINAL2:2;
    hence thesis by A5,TARSKI:def 4;
  end;
  thus union rng f c= f.(union n)
  proof
    let a be object;
    assume a in union rng f;
    then consider b such that
A6: a in b and
A7: b in rng f by TARSKI:def 4;
    consider c being object such that
A8: c in dom f and
A9: f.c = b by A7,FUNCT_1:def 3;
    dom f = n by PARTFUN1:def 2;
    then
A10: dom f in NAT by ORDINAL1:def 12;
    reconsider i = c as Ordinal by A8;
    reconsider i as Element of NAT by A8,ORDINAL1:10,A10;
    consider m such that
A11: n = succ m by A1;
    i c= m by A8,A11,ORDINAL1:22;
    then i c< m or i = m;
    then
A12: i in m or i = m by ORDINAL1:11;
A13: dom f = n by FUNCT_2:def 1;
    then
A14: m in dom f by A11,ORDINAL1:6;
A15: now
      i in dom f by A12,A13,A14,ORDINAL1:10;
      then f.i in rng f by FUNCT_1:3;
      then reconsider i1 = f.i as Nat by A2;
      f.m in rng f by A11,A13,FUNCT_1:3,ORDINAL1:6;
      then reconsider i2 = f.m as Nat by A2;
      assume f.i in f.m;
      then i1 c= i2 by ORDINAL1:def 2;
      then a in i2 by A6,A9;
      hence thesis by A11,ORDINAL2:2;
    end;
    i in {k where k is Nat : k < m} or i = m by A12,AXIOMS:4;
    then (ex k being Nat st k = i & k < m) or i = m;
    hence thesis by A3,A6,A8,A9,A11,A14,A15,ORDINAL2:2;
  end;
end;
