reserve p, q, x, y for Real,
  n for Nat;
reserve X for non empty TopSpace,
  a, b, c, d, e, f for Point of X,
  T for non empty pathwise_connected TopSpace,
  a1, b1, c1, d1, e1, f1 for Point of T;

theorem Th39:
  a,b are_connected & a,c are_connected & c,d are_connected
implies for A being Path of a,b, B being Path of c,d, C being Path of a,c holds
  A+-A+C+B+-B, C are_homotopic
proof
  assume that
A1: a,b are_connected and
A2: a,c are_connected and
A3: c,d are_connected;
  let A be Path of a,b, B be Path of c,d, C be Path of a,c;
  B+-B, B+-B are_homotopic & A+-A+C, C are_homotopic by A1,A2,Th25,BORSUK_2:12;
  then
A4: A+-A+C+(B+-B), C+(B+-B) are_homotopic by A2,BORSUK_6:75;
  C, C+B+-B are_homotopic & C+B+-B, C+(B+-B) are_homotopic by A2,A3,Th19,
BORSUK_2:12,BORSUK_6:73;
  then
A5: C, C+(B+-B) are_homotopic by BORSUK_6:79;
  A+-A+C+B+-B, A+-A+C+(B+-B) are_homotopic by A2,A3,BORSUK_6:73;
  then A+-A+C+B+-B, C+(B+-B) are_homotopic by A4,BORSUK_6:79;
  hence thesis by A5,BORSUK_6:79;
end;
