reserve X for set;
reserve S for Subset-Family of X;

theorem Thm1:
  for S be diff-finite-partition-closed Subset-Family of X,
  S1 be Element of S, T be finite Subset of S holds
  ex P be finite Subset of S st P is a_partition of S1 \ union T
  proof
    let S be diff-finite-partition-closed Subset-Family of X;
    let S1 be Element of S;
    let TT be finite Subset of S;
    consider T be FinSequence such that
A0: TT=rng T by FINSEQ_1:52;
    reconsider T as FinSequence of S by A0,FINSEQ_1:def 4;
    defpred P[FinSequence] means
    ex pa be finite Subset of S st pa is a_partition of S1\union(rng $1);
A1: for p be FinSequence of S,x be Element of S st P[p] holds P[p^<*x*>]
    proof
      let p be FinSequence of S;
      let x be Element of S;
      assume P[p];
      then consider pa be finite Subset of S such that
A2:   pa is a_partition of S1\union(rng p);
A3:   S1\union(rng (p^<*x*>))=S1\union(rng p \/ rng <*x*>) by FINSEQ_1:31
      .=S1\(union (rng p) \/ union(rng <*x*>)) by ZFMISC_1:78
      .=(S1\(union(rng p)))\(Union <*x*>) by XBOOLE_1:41
      .=(S1\(union(rng p)))\(union {x}) by FINSEQ_1:38
      .=(S1\(union(rng p)))\x;
      ex pb be finite Subset of S st
      pb is a_partition of S1\union(rng(p^<*x*>))
      proof
        defpred PP1[set] means
        $1 is Element of S & $1\x is non empty & $1 in pa;
        defpred G[object,object] means
        ex A1 being set st A1 = $1 & $1 is Element of S &
        $2 is finite Subset of S & A1\x is non empty &
        $1 in pa & $2 is a_partition of A1\x;
        set XX1={s where s is Element of S:PP1[s]};
        set YY1={s where s is finite Subset of S:
        ex y be Element of S st PP1[y] & s is a_partition of y\x};
A4:     for a being object st a in XX1
        ex y be object st y in YY1 & G[a,y]
        proof
          let a be object;
          assume a in XX1;
          then consider s be Element of S such that
A5:       a=s & PP1[s];
          reconsider a as set by TARSKI:1;
          consider aa be finite Subset of S such that
A6:       aa is a_partition of a\x by A5,Defdiff;
          aa in YY1 & G[a,aa] by A5,A6;
          hence thesis;
        end;
        consider gg be Function such that
A7:     dom gg=XX1 & rng gg c=YY1 and
A8:     for x being object st x in XX1 holds
        G[x,gg.x] from FUNCT_1:sch 6(A4);
A9:     XX1 is finite
        proof
          XX1 c= pa
          proof
            let u be object;
            assume u in XX1;
            then consider s be Element of S such that
A10:        u=s & PP1[s];
            thus thesis by A10;
         end;
         hence thesis;
        end;
        Union gg is finite Subset of S &
        Union gg is a_partition of (S1\union(rng(p)))\x
        proof
A11:      Union gg is finite
          proof
            Union gg is finite
            proof
              for zz be set st zz in rng gg holds zz is finite
              proof
                let zz be set;
                assume zz in rng gg;
                then consider z0 be object such that
A12:            z0 in XX1 & zz=gg.z0 by A7,FUNCT_1:def 3;
                ex A1 being set st A1 = z0 & z0 is Element of S &
                gg.z0 is finite Subset of S & A1\x is non empty &
                z0 in pa & gg.z0 is a_partition of A1\x by A8,A12;
                hence thesis by A12;
              end;
              hence thesis by A7,A9,FINSET_1:8,FINSET_1:7;
            end;
            hence thesis;
          end;
A13:      Union gg c= S
          proof
            let x be object;
            assume x in Union gg;
            then consider u be set such that
A14:        x in u and
A15:        u in rng gg by TARSKI:def 4;
            consider u0 be object such that
A16:        u0 in XX1 & u=gg.u0 by A7,A15,FUNCT_1:def 3;
            G[u0,gg.u0] by A8,A16;
            hence thesis by A14,A16;
          end;
          Union gg is a_partition of (S1\union(rng(p)))\x
          proof
A17:        Union gg c= bool ((S1\union(rng(p)))\x)
            proof
              let u be object;
              assume
A18:          u in Union gg;
              reconsider u as set by TARSKI:1;
              consider v be set such that
A19:          u in v & v in rng gg by A18,TARSKI:def 4;
              consider w be object such that
A20:          w in dom gg and
A21:          gg.w=v by A19,FUNCT_1:def 3;
              reconsider w as set by TARSKI:1;
A22:          G[w,gg.w] by A7,A8,A20;
              then
              w\x c= (S1\union(rng(p)))\x by A2,XBOOLE_1:33;
              then u c= ((S1\union(rng(p)))\x) by A19,A21,A22,XBOOLE_1:1;
              hence thesis;
            end;
A23:        union Union gg = ((S1\union(rng(p)))\x)
            proof
A24:          union Union gg c= union bool ((S1\union(rng(p)))\x)
              by A17,ZFMISC_1:77;
              (S1\Union p)\x c= union Union gg
              proof
                let a be object;
                assume
A25:            a in (S1\Union p)\x;
A26:            a in (union pa)\x by A2,A25,EQREL_1:def 4;
                then
A27:            a in union pa & not a in x by XBOOLE_0:def 5;
                consider p11 be set such that
A28:            a in p11 & p11 in pa by A26,TARSKI:def 4;
                p11\x is non empty & p11 is Element of S &
                x is Element of S by A27,A28,XBOOLE_0:def 5;
                then
A29:            p11 in XX1 by A28;
                then G[p11,gg.p11] by A8;
                then union (gg.p11) = p11\x by EQREL_1:def 4;
                then a in union (gg.p11) by A27,A28,XBOOLE_0:def 5;
                then consider d be set such that
A30:            a in d & d in gg.p11 by TARSKI:def 4;
                a in d & d in gg.p11 &
                gg.p11 in rng gg
                by A7,A29,A30,FUNCT_1:3;
                then a in d & d in union(rng gg) by TARSKI:def 4;
                hence thesis by TARSKI:def 4;
              end;
              hence thesis by A24,ZFMISC_1:81;
            end;
            for A be Subset of (S1\union(rng(p)))\x st
            A in Union gg holds A<>{} &
            for B be Subset of (S1\union(rng(p)))\x st
            B in Union gg holds A=B or (A misses B)
            proof
              let A be Subset of (S1\union(rng(p)))\x;
              assume
A31:          A in Union gg;
              consider a0 be set such that
A32:          A in a0 & a0 in rng gg by A31,TARSKI:def 4;
              consider a1 be object such that
A33:          a1 in XX1 & a0=gg.a1 by A7,A32,FUNCT_1:def 3;
              reconsider a1 as set by TARSKI:1;
              A<>{} & for B be Subset of (S1\union(rng(p)))\x st
              B in Union gg holds A=B or (A misses B)
              proof
                thus A<>{}
                proof
                  assume
A34:              A={};
                  G[a1,gg.a1] by A8,A33;
                  hence thesis by A32,A33,A34;
                end;
                thus for B be Subset of (S1\union(rng p))\x st
                B in Union gg holds A=B or (A misses B)
                proof
                  let B be Subset of (S1\union(rng p))\x;
                  assume B in Union gg;
                  then consider x0 be set such that
A35:              B in x0 & x0 in rng gg by TARSKI:def 4;
                  consider y0 be object such that
A36:              y0 in XX1 & gg.y0=x0 by A7,A35,FUNCT_1:def 3;
                  reconsider y0 as set by TARSKI:1;
                  A=B or A misses B
                  proof
                    per cases;
                    suppose
A37:                  a1=y0;
                      then G[a1,gg.a1] by A8,A36;
                      hence thesis by A32,A33,A35,A36,A37,EQREL_1:def 4;
                    end;
                    suppose
A38:                  not a1=y0;
                      consider sx be Element of S such that
A39:                  a1=sx & PP1[sx] by A33;
                      consider sd be Element of S such that
A40:                  y0=sd & PP1[sd] by A36;
A41:                  a1\x misses y0\x
                      by A2,A38,A39,A40,EQREL_1:def 4,XBOOLE_1:64;
A42:                  G[y0,gg.y0] by A8,A36;
                      G[a1,gg.a1] by A8,A33;
                      hence thesis by A32,A33,A35,A36,A41,A42,XBOOLE_1:64;
                    end;
                  end;
                  hence thesis;
                end;
              end;
              hence thesis;
            end;
            hence thesis by A17,A23,EQREL_1:def 4;
          end;
          hence thesis by A11,A13;
        end;
        hence thesis by A3;
      end;
      hence thesis;
    end;
A44: P[<*>S]
    proof
A45:  S1={} implies ex pa be finite Subset of S st
      pa is a_partition of S1\union (rng {})
      proof
        {} is Subset of S by SUBSET_1:1;
        hence thesis by EQREL_1:45;
      end;
      S1<>{} implies ex pa be finite Subset of S st
      pa is a_partition of S1\union(rng{})
      proof
        assume
A47:    S1<>{};
        per cases;
        suppose S is non empty;
          then
A48:      {S1} is Subset of S by SUBSET_1:41;
          {S1} is a_partition of S1 by A47,EQREL_1:39;
          hence thesis by A48,ZFMISC_1:2;
        end;
        suppose S is empty;
          hence thesis by A47,SUBSET_1:def 1;
        end;
      end;
      hence thesis by A45;
    end;
    for p be FinSequence of S holds P[p] from FINSEQ_2:sch 2(A44,A1);
    then ex P be finite Subset of S st
    P is a_partition of S1 \ Union T;
    hence thesis by A0;
  end;
