
theorem
for X,Y be set, F,G be Function of NAT,bool X
 st (for i be Nat holds G.i = F.i /\ Y) & Union F = Y
holds Union G = Union F
proof
   let X,Y be set, F,G be Function of NAT,bool X;
   assume that
A1: for i be Nat holds G.i = F.i /\ Y and
A2: Union F = Y;

   now let x be object;
    assume x in Union G; then
    x in union rng G by CARD_3:def 4; then
    consider A be set such that
A3:  x in A & A in rng G by TARSKI:def 4;
    consider i be Element of NAT such that
A4:  A = G.i by A3,FUNCT_2:113;
    dom F = NAT by FUNCT_2:def 1; then
    A = F.i /\ Y & i in dom F by A1,A4; then
    x in F.i & F.i in rng F by A3,XBOOLE_0:def 4,FUNCT_1:3; then
    x in union rng F by TARSKI:def 4;
    hence x in Union F by CARD_3:def 4;
   end; then
A5:Union G c= Union F by TARSKI:def 3;

   now let x be object;
    assume A6: x in Union F; then
    x in union rng F by CARD_3:def 4; then
    consider A be set such that
A7:  x in A & A in rng F by TARSKI:def 4;
    consider i be Element of NAT such that
A8:  A = F.i by A7,FUNCT_2:113;
    dom G = NAT by FUNCT_2:def 1; then
    x in F.i /\ Y & i in dom G by A2,A6,A7,A8,XBOOLE_0:def 4; then
    x in G.i & G.i in rng G by A1,FUNCT_1:3; then
    x in union rng G by TARSKI:def 4;
    hence x in Union G by CARD_3:def 4;
   end; then
   Union F c= Union G by TARSKI:def 3;
   hence thesis by A5,XBOOLE_0:def 10;
end;
