
theorem
for X,Y be non empty set, F be disjoint_valued FinSequence of bool [:X,Y:],
 p be set holds
  ( ex Fy be disjoint_valued FinSequence of bool X st
     ( dom F = dom Fy
     & for n be Nat st n in dom Fy holds Fy.n = Y-section(F.n,p) ) )
&
  ( ex Fx be disjoint_valued FinSequence of bool Y st
     ( dom F = dom Fx
     & for n be Nat st n in dom Fx holds Fx.n = X-section(F.n,p) ) )
proof
   let X,Y be non empty set, F be disjoint_valued
   FinSequence of bool [:X,Y:];
   let p be set;
   deffunc f1(Nat) = Y-section(F.$1,p);
   deffunc f2(Nat) = X-section(F.$1,p);
   thus ex Fy be disjoint_valued FinSequence of bool X st
     ( dom F = dom Fy
     & for n be Nat st n in dom Fy holds Fy.n = Y-section(F.n,p) )
   proof
    consider Fy be FinSequence of bool X such that
A3:  len Fy = len F &
     (for j being Nat st j in dom Fy holds Fy.j = f1(j))
       from FINSEQ_2:sch 1;
    reconsider Fy as FinSequence of bool X;
    now let n,m be object;
     assume n <> m; then
A4:  F.n misses F.m by PROB_2:def 2;
     per cases;
     suppose A5: n in dom Fy & m in dom Fy; then
      reconsider n1=n, m1=m as Nat;
      Fy.n = Y-section(F.n1,p) & Fy.m = Y-section(F.m1,p) by A3,A5;
      hence Fy.n misses Fy.m by A4,Th29;
     end;
     suppose not n in dom Fy or not m in dom Fy; then
      Fy.n = {} or Fy.m = {} by FUNCT_1:def 2;
      hence Fy.n misses Fy.m;
     end;
    end; then
    reconsider Fy as disjoint_valued FinSequence of bool X by PROB_2:def 2;
    take Fy;
    thus dom F = dom Fy
     & for n be Nat st n in dom Fy holds Fy.n = Y-section(F.n,p)
       by A3,FINSEQ_3:29;
   end;
   thus ex Fx be disjoint_valued FinSequence of bool Y st
     ( dom F = dom Fx
     & for n be Nat st n in dom Fx holds Fx.n = X-section(F.n,p) )
   proof
    consider Fx be FinSequence of bool Y such that
A3:  len Fx = len F &
     (for j being Nat st j in dom Fx holds Fx.j = f2(j))
       from FINSEQ_2:sch 1;
    reconsider Fx as FinSequence of bool Y;
    now let n,m be object;
     assume n <> m; then
A4:  F.n misses F.m by PROB_2:def 2;
     per cases;
     suppose A5: n in dom Fx & m in dom Fx; then
      reconsider n1=n, m1=m as Nat;
      Fx.n = X-section(F.n1,p) & Fx.m = X-section(F.m1,p) by A3,A5;
      hence Fx.n misses Fx.m by A4,Th29;
     end;
     suppose not n in dom Fx or not m in dom Fx; then
      Fx.n = {} or Fx.m = {} by FUNCT_1:def 2;
      hence Fx.n misses Fx.m;
     end;
    end; then
    reconsider Fx as disjoint_valued FinSequence of bool Y by PROB_2:def 2;
    take Fx;
    thus dom F = dom Fx
     & for n be Nat st n in dom Fx holds Fx.n = X-section(F.n,p)
       by A3,FINSEQ_3:29;
   end;
end;
