reserve A for non empty closed_interval Subset of REAL;

theorem
for a,b,c,p,q be Real st a < b & b < c holds
AffineMap(p,q) | [.a,b.] +* AffineMap(p,q) | [.b,c.] = AffineMap(p,q) | [.a,c.]
proof
 let a,b,c,p,q be Real;
 assume A1: a < b & b < c;
 set f = AffineMap(p,q);
 A2: dom(AffineMap(p,q) | [.a,b.] +* AffineMap(p,q) | [.b,c.])
  = dom(AffineMap(p,q) | [.a,b.] ) \/ dom(AffineMap(p,q) | [.b,c.])
    by FUNCT_4:def 1
  .= [.a,b.] \/ dom(AffineMap(p,q) | [.b,c.]) by FUNCT_2:def 1
  .= [.a,b.] \/ [.b,c.] by FUNCT_2:def 1
  .= [.a,c.] by XXREAL_1:165,A1
  .= dom (f | [.a,c.]) by FUNCT_2:def 1;
 for x being object st x in dom (f | [.a,c.]) holds
 (f | [.a,c.]).x = (f | [.a,b.] +* f | [.b,c.]).x
 proof
  let x be object;
  assume A3:x in dom (f | [.a,c.]); then
  reconsider x as Real;
  AA6: a <= x & x <= c by XXREAL_1:1,A3;
  per cases;
   suppose b <= x; then
    A8: x in [.b,c.] by AA6; then
    A7: x in dom(f | [.b,c.]) by FUNCT_2:def 1;
    ( f | [.a,b.] +* f | [.b,c.] ).x = (f | [.b,c.] ).x by FUNCT_4:13,A7
    .= f.x  by FUNCT_1:49,A8;
    hence thesis by FUNCT_1:49,A3;
   end;
   suppose A5: b > x; then
    A9: x in [.a,b.] by AA6;
    not x in dom(f | [.b,c.] ) by XXREAL_1:1,A5; then
    ( f | [.a,b.] +* f | [.b,c.] ).x = (f | [.a,b.]).x by FUNCT_4:11
    .= f.x by FUNCT_1:49,A9;
    hence thesis by FUNCT_1:49,A3;
   end;
 end;
 hence thesis by A2,FUNCT_1:2;
end;
