reserve x for set;
reserve a,b,c,d for ExtReal;

theorem
  max(max(a,b),c) = max(a,max(b,c))
proof
  per cases by Th2;
  suppose
A1: a <= b & a <= c;
A2: max(b,c) = b or max(b,c) = c by Def9;
    max(a,b) = b by A1,Def9;
    hence thesis by A1,A2,Def9;
  end;
  suppose
A3: b <= a & b <= c;
    then max(a,b) = a by Def9;
    hence thesis by A3,Def9;
  end;
  suppose
A4: c <= b & c <= a;
A5: max(a,b) = b or max(a,b) = a by Def9;
    max(b,c) = b by A4,Def9;
    hence thesis by A4,A5,Def9;
  end;
end;
