reserve k,m,n for Nat,
  a, b, c for object,
  x, y, X, Y, Z for set,
  D for non empty set;
reserve p, q, r, s, t, u, v for FinSequence;
reserve P, Q, R, P1, P2, Q1, Q2, R1, R2 for FinSequence-membered set;
reserve S, T for non empty FinSequence-membered set;
reserve A for Function of P, NAT;
reserve U, V, W for Subset of P*;

theorem Th35:
  for P, A, Q, n st Q is A-closed holds
      Polish-expression-hierarchy(P, A, n) c= Q
proof
  let P, A, Q, n;
  assume A1: Q is A-closed;
  defpred X[ Nat ] means
    Polish-expression-hierarchy(P, A, $1) c= Q;
  A2: X[ 0 ]
    proof
    Polish-expression-hierarchy(P, A, 0) = Polish-atoms(P, A) by Def9;
    hence thesis by A1, Th34;
    end;
  A3: for k holds X[ k ] implies X[ k+1 ]
    proof
    let k;
    set V = Polish-expression-hierarchy(P, A, k);
    assume A4: V c= Q;
    for a st a in Polish-expression-hierarchy(P, A, k+1) holds a in Q
      proof
      let a;
      assume a in Polish-expression-hierarchy(P, A, k+1);
      then a in Polish-expression-layer(P, A, V) by Th23;
      then consider p, q, n such that
      A5: a = p^q and
      A6: p in P and
      A7: n = A.p and
      A8: q in V^^n by Def6;
      A9: dom A = P by FUNCT_2:def 1;
      q in Q^^n by A4, A8, Th17, TARSKI:def 3;
      hence thesis by A1, A5, A6, A7, A9;
      end;
    hence thesis by TARSKI:def 3;
    end;
  for k holds X[ k ] from NAT_1:sch 2(A2, A3);
  hence thesis;
end;
