reserve k,m,n for Element of NAT,
  i, j for Nat,
  a, b, c for object,
  X, Y, Z for set,
  D, D1, D2 for non empty set;
reserve p, q, r, s for FinSequence;
reserve t, u, v, w for GRZ-formula;
reserve R, R1, R2 for GRZ-rule;
reserve A, A1, A2 for non empty Subset of GRZ-formula-set;
reserve B, B1, B2 for Subset of GRZ-formula-set;
reserve P, P1, P2 for GRZ-formula-sequence;
reserve S, S1, S2 for GRZ-formula-finset;

theorem
  for A, R, t st A, R |- t holds t in A or ex S st [S, t] in R & A, R |- S
proof
  let A, R, t;
  assume that
    A1: A, R |- t and
    A2: not t in A;
  consider P such that
    A3: t in rng P and
    A4: P is (A, R)-correct by A1;
  consider a such that
    A5: a in dom P and
    A6: P.a = t by A3, FUNCT_1:def 3;
  reconsider n = a as Element of NAT by A5;
  P, n is_a_correct_step_wrt A, R by A4, A5;
  then consider Q being GRZ-formula-finset such that
    A10: [Q, P.n] in R and
    A11: for q st q in Q ex k
            st k in dom P & k < n & P.k = q by A2, A6;
  take Q;
  thus [Q, t] in R by A6, A10;
  let u;
  assume u in Q;
  then consider k such that
    A15: k in dom P and
         k < n and
    A17: P.k = u by A11;
  u in rng P by A15, A17, FUNCT_1:3;
  hence A, R |- u by A4;
end;
