theorem Th31:
  for P be consistent complete PNPair,T be pnptree of P st
  A 'U' B in rng P`1 & (for Q be Element of rngr T holds not B in rng Q`1)
  holds for Q be Element of rngr T holds B in rng Q`2 & A 'U' B in rng Q`1
  proof
    set aub = A 'U' B;
    let P be consistent complete PNPair,T be pnptree of P;
    assume that
A1: aub in rng P`1 and
A2: for Q be Element of rngr T holds not B in rng Q`1;
    defpred P[set] means for t be Element of dom T st t = $1 & t <> 0
    holds B in rng (T.t)`2 & aub in rng (T.t)`1;
A3: now
      let t be Element of dom T,n be Nat;
      assume that
A4:   P[t] and t^<*n*> in dom T;
      thus P[t^<*n*>]
      proof
        let u be Element of dom T;
        assume that
A5:     u = t^<*n*> and u <> 0;
A6:     T.u in rngr T by A5;
        per cases;
        suppose t = 0;
          then T.t = P by Def11;
          then reconsider Tu = T.u as Element of compn P by Th26,A5;
          untn(A,B) in rng Tu`1 & rng Tu`1 c= rng Tu by Th22,A1, XBOOLE_1:7;
          then A7: B in rng Tu by Th8;
          not B in rng Tu`1 by A2,A6;
          hence B in rng (T.u)`2 & aub in rng (T.u)`1
          by Th25,A1,A7,XBOOLE_0: def 3;
        end;
        suppose
A8:       not t = 0;
          reconsider Tu = T.u as Element of compn T.t by Th26,A5;
          rng Tu`1 c= rng Tu & untn(A,B) in rng Tu`1 by XBOOLE_1:7,A8,A4,Th22;
          then A9: B in rng Tu by Th8;
A10:      aub in rng (T.t)`1 by A8,A4;
          not B in rng Tu`1 by A2,A6;
          hence B in rng (T.u)`2 & aub in rng (T.u)`1
          by A10,A9,Th25,XBOOLE_0:def 3;
        end;
      end;
    end;
    let Q be Element of rngr T;
    Q in rngr T;
    then A11: ex t be Element of dom T st Q = T.t & t <> 0;
A12: P[{}];
     for t be Element of dom T holds P[t] from TREES_2:sch 1(A12,A3 );
     hence B in rng Q`2 & A 'U' B in rng Q`1 by A11;
   end;
