
theorem Th31:
  for S be non empty finite set,
  A,B be set,
  f,g be Function of S,BOOLEAN
  st A c= S & B c= S & f = chi(A,S) & g = chi(B,S)
  holds chi((A\/ B),S) = f 'or' g
  proof
    let S be non empty finite set,
    A,B be set,
    f,g be Function of S,BOOLEAN;
    assume A1:
    A c= S & B c= S & f = chi(A,S) & g = chi(B,S);
    A2: dom chi((A\/ B),S) = S by FUNCT_3:def 3;
    A3: dom chi(A,S) = S by FUNCT_3:def 3;
    A4: dom chi(B,S) = S by FUNCT_3:def 3;
    A5: dom (f 'or' g)= dom f /\ dom g by BVFUNC_1:def 2
    .= S by A1,A3,A4;
    now let x be object;
      assume A6: x in dom (f 'or' g);
      A7: x in dom f /\ dom g by A6,BVFUNC_1:def 2;
      per cases;
        suppose A8: (f 'or' g).x = TRUE;
          then chi(A,S).x =1 or chi(B,S).x =1 by A1,Lm2,A7;
          then x in A or x in B by FUNCT_3:36;
          then x in A\/ B by XBOOLE_0:def 3;
          hence chi((A\/ B),S).x = (f 'or' g).x by A8,A6,FUNCT_3:def 3;
        end;
        suppose A9: (f 'or' g).x <> TRUE;
          A10: (f 'or' g).x = FALSE by A9,XBOOLEAN:def 3;
          not (chi(A,S).x =1) & not (chi(B,S).x =1) by A1,A9,Lm2,A7;
          then not (x in A) & not ( x in B) by A6,FUNCT_3:def 3;
          then not x in A\/ B by XBOOLE_0:def 3;
          hence chi((A\/ B),S).x = (f 'or' g).x by A10,A6,FUNCT_3:def 3;
        end;
    end;
    hence thesis by A2,A5,FUNCT_1:2;
  end;
