reserve i for Integer,
  a, b, r, s for Real;

theorem
  for f, f1, f2 being PartFunc of REAL,REAL st dom f = dom f1 \/ dom f2
  & dom f1 is open & dom f2 is open & f1|dom f1 is continuous & f2|dom f2 is
  continuous & (for z being set st z in dom f1 holds f.z = f1.z) & (for z being
  set st z in dom f2 holds f.z = f2.z) holds f|dom f is continuous
proof
  let f, f1, f2 be PartFunc of REAL,REAL;
  set X1 = dom f1, X2 = dom f2;
  assume that
A1: dom f = X1 \/ X2 and
A2: X1 is open and
A3: X2 is open and
A4: f1|X1 is continuous and
A5: f2|X2 is continuous and
A6: for z being set st z in X1 holds f.z = f1.z and
A7: for z being set st z in X2 holds f.z = f2.z;
A8: dom f /\ X1 = X1 by A1,XBOOLE_1:7,28;
A9: dom (f|X2) = dom f /\ X2 by RELAT_1:61;
  let x be Real;
  assume x in dom(f|dom f);
  then
A10: x in dom f;
A11: (f|(X1 \/ X2)).x = f.x by A1;
A12: dom f /\ X2 = X2 by A1,XBOOLE_1:7,28;
A13: dom (f|X1) = dom f /\ X1 by RELAT_1:61;
  per cases by A1,A10,XBOOLE_0:def 3;
  suppose
A14: x in X1;
    then
A15: (f|(X1 \/ X2)).x = f1.x by A6,A11
      .= (f1|X1).x;
    for N1 being Neighbourhood of (f|(X1 \/ X2)).x ex N being
Neighbourhood of x st for x1 being Real st x1 in dom (f|(X1 \/ X2)) & x1
    in N holds (f|(X1 \/ X2)).x1 in N1
    proof
      let N1 be Neighbourhood of (f|(X1 \/ X2)).x;
      consider N2 being Neighbourhood of x such that
A16:  N2 c= X1 by A2,A14,RCOMP_1:18;
      x in dom(f1|X1) by A14;
      then f1|X1 is_continuous_in x by A4;
      then consider N being Neighbourhood of x such that
A17:  for x1 being Real st x1 in dom (f1|X1) & x1 in N holds (
      f1|X1).x1 in N1 by A15,FCONT_1:4;
      consider N3 being Neighbourhood of x such that
A18:  N3 c= N and
A19:  N3 c= N2 by RCOMP_1:17;
      take N3;
      let x1 be Real such that
A20:  x1 in dom (f|(X1 \/ X2)) and
A21:  x1 in N3;
      per cases;
      suppose
A22:    x1 in dom (f|X1);
A23:    dom (f|X1) = X1 /\ X1 by A1,A13,XBOOLE_1:7,28
          .= dom (f1|X1);
A24:    x1 in X1 by A13,A22,XBOOLE_0:def 4;
        (f|(X1 \/ X2)).x1 = f.x1 by A20,FUNCT_1:47
          .= f1.x1 by A6,A24
          .= (f1|X1).x1;
        hence thesis by A17,A18,A21,A22,A23;
      end;
      suppose
A25:    not x1 in dom (f|X1);
        x1 in N2 by A19,A21;
        hence thesis by A13,A8,A16,A25;
      end;
    end;
    hence thesis by A1,FCONT_1:4;
  end;
  suppose
A26: x in X2;
    then
A27: (f|(X1 \/ X2)).x = f2.x by A7,A11
      .= (f2|X2).x;
    for N1 being Neighbourhood of (f|(X1 \/ X2)).x ex N being
Neighbourhood of x st for x1 being Real st x1 in dom (f|(X1 \/ X2)) & x1
    in N holds (f|(X1 \/ X2)).x1 in N1
    proof
      let N1 be Neighbourhood of (f|(X1 \/ X2)).x;
      consider N2 being Neighbourhood of x such that
A28:  N2 c= X2 by A3,A26,RCOMP_1:18;
      x in dom(f2|X2) by A26;
      then f2|X2 is_continuous_in x by A5;
      then consider N being Neighbourhood of x such that
A29:  for x1 being Real st x1 in dom (f2|X2) & x1 in N holds (
      f2|X2).x1 in N1 by A27,FCONT_1:4;
      consider N3 being Neighbourhood of x such that
A30:  N3 c= N and
A31:  N3 c= N2 by RCOMP_1:17;
      take N3;
      let x1 be Real such that
A32:  x1 in dom (f|(X1 \/ X2)) and
A33:  x1 in N3;
      per cases;
      suppose
A34:    x1 in dom (f|X2);
A35:    dom (f|X2) = X2 /\ X2 by A1,A9,XBOOLE_1:7,28
          .= dom (f2|X2);
A36:    x1 in X2 by A9,A34,XBOOLE_0:def 4;
        (f|(X1 \/ X2)).x1 = f.x1 by A32,FUNCT_1:47
          .= f2.x1 by A7,A36
          .= (f2|X2).x1;
        hence thesis by A29,A30,A33,A34,A35;
      end;
      suppose
A37:    not x1 in dom (f|X2);
        x1 in N2 by A31,A33;
        hence thesis by A9,A12,A28,A37;
      end;
    end;
    hence thesis by A1,FCONT_1:4;
  end;
end;
