reserve i, j, k, l, m, n for Nat,
  a, b, c, t, u for object,
  X, Y, Z for set,
  D, D1, D2, Fml for non empty set;
reserve p, q, r, s for FinSequence;
 reserve R, R1, R2 for Rule;
 reserve A, A1, A2 for non empty set;
 reserve B, B1, B2 for set;
 reserve P, P1, P2 for Formula-sequence;
 reserve S, S1, S2 for Formula-finset;
 reserve C for Extension of B;
 reserve E for Extension of R;

theorem Th47:
  for B, R, S st for a st a in S holds B, R |- a
      ex S1 st S c= S1 & S1 is (B, R)-derivable
proof
  let B, R, S;
  assume A1: for a st a in S holds B, R |- a;
  defpred X[ set ] means ex S1 st $1 c= S1 & S1 is (B, R)-derivable;
  A2: S is finite;
  A10: X[ {} ]
  proof
    set P = <*>{};
    take rng P;
    P is (B, R)-correct;
    hence thesis;
  end;
  A20: for x, B1 being set st x in S & B1 c= S & X[ B1 ] holds X[ B1 \/ {x} ]
  proof
    let x, B1 be set;
    assume that
      A21: x in S and
           B1 c= S and
      A23: X[ B1 ];
    reconsider t = x as Formula;
    consider S1 such that
      A24: t in S1 and
      A25: S1 is (B, R)-derivable by A1, A21, Th45;
    consider S2 such that
      A26: B1 c= S2 and
      A27: S2 is (B, R)-derivable by A23;
    take S1 \/ S2;
    {x} c= S1 by A24, TARSKI:def 1;
    hence B1 \/ {x} c= S1 \/ S2 by A26, XBOOLE_1:13;
    thus S1 \/ S2 is (B, R)-derivable by A25, A27, Th43;
  end;
  thus X[ S ] from FINSET_1:sch 2(A2, A10, A20);
end;
