reserve x,y,z,w for ExtReal,
  r for Real;
reserve f,g for ExtReal;

theorem Th29:
  not (x = +infty & y = -infty) & not (x = -infty & y = +infty) &
  not ( y = +infty & z = -infty or y = -infty & z = +infty ) &
  not ( x = +infty & z = -infty or x = -infty & z = +infty ) implies
  x + y + z = x + (y + z)
proof
  assume
A1: ( not (x = +infty & y = -infty or x = -infty & y = +infty))& not ( y
  = +infty & z = -infty or y = -infty & z = +infty ) & not ( x = +infty & z =
  -infty or x = -infty & z = +infty );
  per cases by A1,XXREAL_0:14;
  suppose
    x in REAL & y in REAL & z in REAL;
    then reconsider A = x, B = y, C = z as Real;
    A + B + C = x + y + z & A + (B + C) = x + (y + z);
    hence thesis;
  end;
  suppose
A2: x in REAL & y = +infty & z in REAL;
    then x + y = +infty & y + z = +infty by Def2;
    hence thesis by A2;
  end;
  suppose
A3: x in REAL & y = -infty & z in REAL;
    then x + y = -infty & y + z = -infty by Def2;
    hence thesis by A3;
  end;
  suppose
A4: x = -infty & y in REAL & z in REAL;
    then x + y = -infty by Def2;
    then x + y + z = -infty by A4,Def2;
    hence thesis by A4,Def2;
  end;
  suppose
A5: x = +infty & y in REAL & z in REAL;
    then x + y = +infty by Def2;
    then x + y + z = +infty by A5,Def2;
    hence thesis by A5,Def2;
  end;
  suppose
A6: x in REAL & y in REAL & z = +infty;
    then y + z = +infty by Def2;
    then x + (y + z) = +infty by A6,Def2;
    hence thesis by A6,Def2;
  end;
  suppose
A7: x in REAL & y in REAL & z = -infty;
    then y + z = -infty by Def2;
    then x + (y + z) = -infty by A7,Def2;
    hence thesis by A7,Def2;
  end;
  suppose
A8: x = +infty & y = +infty & z in REAL;
    then x + y = +infty by Def2;
    then
A9: x + y + z = +infty by A8,Def2;
    y + z <> -infty by A8,Def2;
    hence thesis by A8,A9,Def2;
  end;
  suppose
A10: x in REAL & y = -infty & z = -infty;
    then
A11: x + y = -infty by Def2;
    then x + y + z = -infty by A10,Def2;
    hence thesis by A10,A11;
  end;
  suppose
A12: x = -infty & y = -infty & z in REAL;
    then
A13: x + y = -infty by Def2;
    then x + y + z = -infty by A12,Def2;
    hence thesis by A12,A13;
  end;
  suppose
    x = -infty & y in REAL & z = -infty or x = -infty & y = -infty &
z = -infty or x = +infty & y in REAL & z = +infty or x = +infty & y = +infty &
    z = +infty;
    hence thesis;
  end;
  suppose
A14: x in REAL & y = +infty & z = +infty;
    then x + y = +infty & y + z = +infty by Def2;
    hence thesis by A14;
  end;
end;
