
theorem Th8:
  for J being set, F being finite set, i being Element of NAT,
      A being FinSequence of bool F st
    i in J & i in dom A holds union (A, J) = union (A, J \ {i}) \/ A.i
proof
  let J be set;
  let F be finite set;
  let i be Element of NAT;
  let A be FinSequence of bool F;
  assume i in J & i in dom A;
  then
A1: A.i c= union (A, J) by Th7;
  thus union (A, J) c= union (A, J \{i}) \/ A.i
  proof
    let x be object;
    assume x in union (A, J);
    then consider j be set such that
A2: j in J and
A3: j in dom A and
A4: x in A.j by Def1;
    per cases;
    suppose
      i = j;
      hence thesis by A4,XBOOLE_0:def 3;
    end;
    suppose
      i <> j;
      then not j in {i} by TARSKI:def 1;
      then j in J \ {i} by A2,XBOOLE_0:def 5;
      then x in union (A, J\{i}) by A3,A4,Def1;
      hence thesis by XBOOLE_0:def 3;
    end;
  end;
  thus union (A, J\{i}) \/ A.i c= union (A, J)
  proof
    let x be object;
    assume x in union (A, J\{i}) \/ A.i;
    then
A5: x in union (A, J\{i}) or x in A.i by XBOOLE_0:def 3;
    per cases by A1,A5;
    suppose
      x in union (A, J\{i});
      then ex j be set st j in J\{i} & j in dom A & x in A.j by Def1;
      hence thesis by Def1;
    end;
    suppose
      x in union (A, J);
      hence thesis;
    end;
  end;
end;
