
theorem Th31:
  for f being Function, A, B, C, D being set, i, j being object
  st A c= C & B c= D
  holds product(f +* (i,j) --> (A,B)) c= product(f +* (i,j) --> (C,D))
proof
  let f be Function, A,B,C,D be set, i,j be object;
  assume A1: A c= C & B c= D;
  per cases;
  suppose i = j;
    then (i,j) --> (A,B) = i .--> B & (i,j) --> (C,D) = i .--> D by FUNCT_4:81;
    hence thesis by A1, Th27;
  end;
  suppose A2: i <> j;
    dom(f +* (i,j) --> (A,B)) = dom f \/ dom (i,j) --> (A,B) by FUNCT_4:def 1
      .= dom f \/ {i,j} by FUNCT_4:62;
    then A3: dom(f +* (i,j) --> (A,B))
       = dom f \/ dom (i,j) --> (C,D) by FUNCT_4:62
      .=  dom(f +* (i,j) --> (C,D)) by FUNCT_4:def 1;
    for x being object st x in dom(f +* (i,j) --> (A,B))
      holds (f +* (i,j) --> (A,B)).x c= (f +* (i,j) --> (C,D)).x
    proof
      let x be object;
      assume x in dom(f +* (i,j) --> (A,B));
      per cases;
      suppose A4: x in {i,j};
        then x in dom (i,j) --> (A,B) by FUNCT_4:62;
        then A5: (f +* (i,j) --> (A,B)).x = ((i,j) --> (A,B)).x by FUNCT_4:13;
        x in dom (i,j) --> (C,D) by A4, FUNCT_4:62;
        then A6: (f +* (i,j) --> (C,D)).x = ((i,j) --> (C,D)).x by FUNCT_4:13;
        per cases by A4, TARSKI:def 2;
        suppose A7: x = i;
          then (f +* (i,j) --> (A,B)).x = A by A2, A5, FUNCT_4:63;
          hence thesis by A1, A2, A6, A7, FUNCT_4:63;
        end;
        suppose A9: x = j;
          then (f +* (i,j) --> (A,B)).x = B by A5, FUNCT_4:63;
          hence thesis by A1, A6, A9, FUNCT_4:63;
        end;
      end;
      suppose A11: not x in {i,j};
        then not x in dom (i,j) --> (A,B) by FUNCT_4:62;
        then A12: (f +* (i,j) --> (A,B)).x = f.x by FUNCT_4:11;
        not x in dom (i,j) --> (C,D) by A11, FUNCT_4:62;
        hence thesis by A12, FUNCT_4:11;
      end;
    end;
    hence thesis by A3, CARD_3:27;
  end;
end;
