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

theorem Th1:
  for a,b being ExtReal holds a <= b & b <= a implies a = b
proof
  let a,b be ExtReal;
  assume that
A1: a <= b and
A2: b <= a;
  per cases;
  suppose
    a in REAL+ & b in REAL+;
    then
    (ex a9,b9 being Element of REAL+ st a = a9 & b = b9 & a9 <=' b9 )& ex
b99, a99 being Element of REAL+ st b = b99 & a = a99 & b99 <=' a99 by A1,A2
,Def5;
    hence thesis by ARYTM_1:4;
  end;
  suppose
A3: a in REAL+ & b in [:{0},REAL+:];
    then ( not b in REAL+)& not a in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3;
    hence thesis by A1,A3,Def5,Lm4,Lm5;
  end;
  suppose
A4: b in REAL+ & a in [:{0},REAL+:];
    then ( not a in REAL+)& not b in [:{0},REAL+:] by ARYTM_0:5,XBOOLE_0:3;
    hence thesis by A2,A4,Def5,Lm4,Lm5;
  end;
  suppose that
A5: a in [:{0},REAL+:] & b in [:{0},REAL+:];
    consider a9,b9 being Element of REAL+ such that
A6: a = [0,a9] & b = [0,b9] and
A7: b9 <=' a9 by A1,A5,Def5;
    consider b99,a99 being Element of REAL+ such that
A8: b = [0,b99] & a = [0,a99] and
A9: a99 <=' b99 by A2,A5,Def5;
    a9 = a99 & b9 = b99 by A6,A8,XTUPLE_0:1;
    hence thesis by A7,A8,A9,ARYTM_1:4;
  end;
  suppose
    (a = -infty or a = +infty) & (b = -infty or b = +infty);
    hence thesis by A1,A2,Lm7;
  end;
  suppose that
A10: ( not(a in REAL+ & b in REAL+))& not(a in [:{0},REAL+:] & b in [:
    {0},REAL+:]) and
A11: not(b in REAL+ & a in [:{0},REAL+:]) and
A12: not(a in REAL+ & b in [:{0},REAL+:]);
    a = -infty or b = +infty by A1,A10,A11,Def5;
    hence thesis by A2,A10,A12,Def5,Lm7;
  end;
end;
