:: XREAL_0 semantic presentation

definition
let c1 be number ;
attr a1 is real means :Def1: :: XREAL_0:def 1
a1 in REAL ;
end;

:: deftheorem Def1 defines real XREAL_0:def 1 :
for b1 being number holds
( b1 is real iff b1 in REAL );

registration
cluster natural -> real set ;
coherence
for b1 being number st b1 is natural holds
b1 is real
proof end;
cluster real -> complex set ;
coherence
for b1 being number st b1 is real holds
b1 is complex
proof end;
end;

registration
cluster complex real set ;
existence
ex b1 being number st b1 is real
proof end;
end;

definition
let c1, c2 be real number ;
pred c1 <= c2 means :Def2: :: XREAL_0:def 2
ex b1, b2 being Element of REAL+ st
( a1 = b1 & a2 = b2 & b1 <=' b2 ) if ( a1 in REAL+ & a2 in REAL+ )
ex b1, b2 being Element of REAL+ st
( a1 = [0,b1] & a2 = [0,b2] & b2 <=' b1 ) if ( a1 in [:{0},REAL+ :] & a2 in [:{0},REAL+ :] )
otherwise ( a2 in REAL+ & a1 in [:{0},REAL+ :] );
consistency
( c1 in REAL+ & c2 in REAL+ & c1 in [:{0},REAL+ :] & c2 in [:{0},REAL+ :] implies ( ex b1, b2 being Element of REAL+ st
( c1 = b1 & c2 = b2 & b1 <=' b2 ) iff ex b1, b2 being Element of REAL+ st
( c1 = [0,b1] & c2 = [0,b2] & b2 <=' b1 ) ) )
by ARYTM_0:5, XBOOLE_0:3;
reflexivity
for b1 being real number holds
( ( b1 in REAL+ & b1 in REAL+ implies ex b2, b3 being Element of REAL+ st
( b1 = b2 & b1 = b3 & b2 <=' b3 ) ) & ( b1 in [:{0},REAL+ :] & b1 in [:{0},REAL+ :] implies ex b2, b3 being Element of REAL+ st
( b1 = [0,b2] & b1 = [0,b3] & b3 <=' b2 ) ) & ( ( not b1 in REAL+ or not b1 in REAL+ ) & ( not b1 in [:{0},REAL+ :] or not b1 in [:{0},REAL+ :] ) implies ( b1 in REAL+ & b1 in [:{0},REAL+ :] ) ) )
proof end;
connectedness
for b1, b2 being real number st ( ( b1 in REAL+ & b2 in REAL+ & ( for b3, b4 being Element of REAL+ holds
( not b1 = b3 or not b2 = b4 or not b3 <=' b4 ) ) ) or ( b1 in [:{0},REAL+ :] & b2 in [:{0},REAL+ :] & ( for b3, b4 being Element of REAL+ holds
( not b1 = [0,b3] or not b2 = [0,b4] or not b4 <=' b3 ) ) ) or ( ( not b1 in REAL+ or not b2 in REAL+ ) & ( not b1 in [:{0},REAL+ :] or not b2 in [:{0},REAL+ :] ) & not ( b2 in REAL+ & b1 in [:{0},REAL+ :] ) ) ) holds
( ( b2 in REAL+ & b1 in REAL+ implies ex b3, b4 being Element of REAL+ st
( b2 = b3 & b1 = b4 & b3 <=' b4 ) ) & ( b2 in [:{0},REAL+ :] & b1 in [:{0},REAL+ :] implies ex b3, b4 being Element of REAL+ st
( b2 = [0,b3] & b1 = [0,b4] & b4 <=' b3 ) ) & ( ( not b2 in REAL+ or not b1 in REAL+ ) & ( not b2 in [:{0},REAL+ :] or not b1 in [:{0},REAL+ :] ) implies ( b1 in REAL+ & b2 in [:{0},REAL+ :] ) ) )
proof end;
end;

:: deftheorem Def2 defines <= XREAL_0:def 2 :
for b1, b2 being real number holds
( ( b1 in REAL+ & b2 in REAL+ implies ( b1 <= b2 iff ex b3, b4 being Element of REAL+ st
( b1 = b3 & b2 = b4 & b3 <=' b4 ) ) ) & ( b1 in [:{0},REAL+ :] & b2 in [:{0},REAL+ :] implies ( b1 <= b2 iff ex b3, b4 being Element of REAL+ st
( b1 = [0,b3] & b2 = [0,b4] & b4 <=' b3 ) ) ) & ( ( not b1 in REAL+ or not b2 in REAL+ ) & ( not b1 in [:{0},REAL+ :] or not b2 in [:{0},REAL+ :] ) implies ( b1 <= b2 iff ( b2 in REAL+ & b1 in [:{0},REAL+ :] ) ) ) );

notation
let c1, c2 be real number ;
synonym c2 >= c1 for c1 <= c2;
antonym c2 < c1 for c1 <= c2;
antonym c1 > c2 for c1 <= c2;
end;

definition
let c1 be real number ;
attr a1 is positive means :Def3: :: XREAL_0:def 3
a1 > 0;
attr a1 is negative means :Def4: :: XREAL_0:def 4
a1 < 0;
end;

:: deftheorem Def3 defines positive XREAL_0:def 3 :
for b1 being real number holds
( b1 is positive iff b1 > 0 );

:: deftheorem Def4 defines negative XREAL_0:def 4 :
for b1 being real number holds
( b1 is negative iff b1 < 0 );

Lemma5: for b1 being real number
for b2, b3 being Element of REAL st b1 = [*b2,b3*] holds
( b3 = 0 & b1 = b2 )
proof end;

registration
let c1 be real number ;
cluster - a1 -> real ;
coherence
- c1 is real
proof end;
cluster a1 " -> real ;
coherence
c1 " is real
proof end;
let c2 be real number ;
cluster a1 + a2 -> real ;
coherence
c1 + c2 is real
proof end;
cluster a1 * a2 -> real ;
coherence
c1 * c2 is real
proof end;
end;

registration
let c1, c2 be real number ;
cluster a1 - a2 -> real ;
coherence
c1 - c2 is real
;
cluster a1 / a2 -> real ;
coherence
c1 / c2 is real
;
end;

E6: one = succ 0 by ORDINAL2:def 4
.= 1 ;

Lemma7: {} in {{} }
by TARSKI:def 1;

Lemma8: for b1, b2 being real number st b1 <= b2 & b2 <= b1 holds
b1 = b2
proof end;

Lemma9: for b1, b2, b3 being real number st b1 <= b2 holds
b1 + b3 <= b2 + b3
proof end;

Lemma10: for b1, b2, b3 being real number st b1 <= b2 & b2 <= b3 holds
b1 <= b3
proof end;

reconsider c1 = 0 as Element of REAL+ by ARYTM_2:21;

Lemma11: not 0 in [:{0},REAL+ :]
by ARYTM_0:5, ARYTM_2:21, XBOOLE_0:3;

reconsider c2 = 1 as Element of REAL+ by Lemma6, ARYTM_2:21;

c1 <=' c2
by ARYTM_1:6;

then Lemma12: 0 <= 1
by Def2;

1 + (- 1) = 0
;

then consider c3, c4, c5, c6 being Element of REAL such that
Lemma13: 1 = [*c3,c4*] and
Lemma14: - 1 = [*c5,c6*] and
Lemma15: 0 = [*(+ c3,c5),(+ c4,c6)*] by XCMPLX_0:def 4;

Lemma16: c3 = 1
by Lemma5, Lemma13;

Lemma17: c5 = - 1
by Lemma5, Lemma14;

Lemma18: + c3,c5 = 0
by Lemma5, Lemma15;

E19: now
assume - 1 in REAL+ ;
then ex b1, b2 being Element of REAL+ st
( c3 = b1 & c5 = b2 & c1 = b1 + b2 ) by Lemma6, Lemma16, Lemma17, Lemma18, ARYTM_0:def 2, ARYTM_2:21;
hence contradiction by Lemma16, ARYTM_2:6;
end;

Lemma20: for b1, b2 being real number st b1 >= 0 & b2 > 0 holds
b1 + b2 > 0
proof end;

Lemma21: for b1, b2 being real number st b1 <= 0 & b2 < 0 holds
b1 + b2 < 0
proof end;

reconsider c7 = 0 as Element of REAL+ by ARYTM_2:21;

Lemma22: for b1, b2, b3 being real number st b1 <= b2 & 0 <= b3 holds
b1 * b3 <= b2 * b3
proof end;

Lemma23: for b1, b2, b3 being real number holds (b1 * b2) * b3 = b1 * (b2 * b3)
;

Lemma24: for b1, b2 being real number holds
( not b1 * b2 = 0 or b1 = 0 or b2 = 0 )
proof end;

Lemma25: for b1, b2 being real number st b1 > 0 & b2 > 0 holds
b1 * b2 > 0
proof end;

Lemma26: for b1, b2 being real number st b1 > 0 & b2 < 0 holds
b1 * b2 < 0
proof end;

Lemma27: for b1, b2, b3 being real number st b1 <= b2 holds
b1 - b3 <= b2 - b3
by Lemma9;

Lemma28: for b1, b2 being real number st b1 <= b2 holds
- b2 <= - b1
proof end;

Lemma29: for b1, b2 being real number st b1 <= 0 & b2 >= 0 holds
b1 * b2 <= 0
proof end;

registration
cluster real positive -> non zero complex real non negative set ;
coherence
for b1 being real number st b1 is positive holds
( not b1 is negative & not b1 is empty )
proof end;
cluster non zero real non negative -> complex real positive set ;
coherence
for b1 being real number st not b1 is negative & not b1 is empty holds
b1 is positive
proof end;
cluster real negative -> non zero complex real non positive set ;
coherence
for b1 being real number st b1 is negative holds
( not b1 is positive & not b1 is empty )
proof end;
cluster non zero real non positive -> complex real negative set ;
coherence
for b1 being real number st not b1 is positive & not b1 is empty holds
b1 is negative
proof end;
cluster zero real -> complex real non positive non negative set ;
coherence
for b1 being real number st b1 is empty holds
( not b1 is negative & not b1 is positive )
proof end;
cluster real non positive non negative -> zero complex real set ;
coherence
for b1 being real number st not b1 is negative & not b1 is positive holds
b1 is empty
proof end;
end;

registration
cluster non zero complex real positive non negative set ;
existence
ex b1 being real number st b1 is positive
proof end;
cluster non zero complex real non positive negative set ;
existence
ex b1 being real number st b1 is negative
proof end;
cluster zero complex real non positive non negative set ;
existence
ex b1 being real number st b1 is empty
proof end;
end;

registration
let c8, c9 be real non negative number ;
cluster a1 + a2 -> real non negative ;
coherence
not c8 + c9 is negative
proof end;
end;

registration
let c8, c9 be real non positive number ;
cluster a1 + a2 -> real non positive ;
coherence
not c8 + c9 is positive
proof end;
end;

registration
let c8 be real positive number ;
let c9 be real non negative number ;
cluster a1 + a2 -> non zero real positive non negative ;
coherence
c8 + c9 is positive
proof end;
cluster a2 + a1 -> non zero real positive non negative ;
coherence
c9 + c8 is positive
;
end;

registration
let c8 be real negative number ;
let c9 be real non positive number ;
cluster a1 + a2 -> non zero real non positive negative ;
coherence
c8 + c9 is negative
proof end;
cluster a2 + a1 -> non zero real non positive negative ;
coherence
c9 + c8 is negative
;
end;

registration
let c8 be real non positive number ;
cluster - a1 -> real non negative ;
coherence
not - c8 is negative
proof end;
end;

registration
let c8 be real non negative number ;
cluster - a1 -> real non positive ;
coherence
not - c8 is positive
proof end;
end;

registration
let c8 be real non negative number ;
let c9 be real non positive number ;
cluster a1 - a2 -> real non negative ;
coherence
not c8 - c9 is negative
;
cluster a2 - a1 -> real non positive ;
coherence
not c9 - c8 is positive
;
end;

registration
let c8 be real positive number ;
let c9 be real non positive number ;
cluster a1 - a2 -> non zero real positive non negative ;
coherence
c8 - c9 is positive
;
cluster a2 - a1 -> non zero real non positive negative ;
coherence
c9 - c8 is negative
;
end;

registration
let c8 be real negative number ;
let c9 be real non negative number ;
cluster a1 - a2 -> non zero real non positive negative ;
coherence
c8 - c9 is negative
;
cluster a2 - a1 -> non zero real positive non negative ;
coherence
c9 - c8 is positive
;
end;

registration
let c8 be real non positive number ;
let c9 be real non negative number ;
cluster a1 * a2 -> real non positive ;
coherence
not c8 * c9 is positive
proof end;
cluster a2 * a1 -> real non positive ;
coherence
not c9 * c8 is positive
;
end;

registration
let c8, c9 be real non positive number ;
cluster a1 * a2 -> real non negative ;
coherence
not c8 * c9 is negative
proof end;
end;

registration
let c8, c9 be real non negative number ;
cluster a1 * a2 -> real non negative ;
coherence
not c8 * c9 is negative
proof end;
end;

Lemma30: for b1 being real number st b1 " = 0 holds
b1 = 0
proof end;

registration
let c8 be real non positive number ;
cluster a1 " -> real non positive ;
coherence
not c8 " is positive
proof end;
end;

registration
let c8 be real non negative number ;
cluster a1 " -> real non negative ;
coherence
not c8 " is negative
proof end;
end;

registration
let c8 be real non negative number ;
let c9 be real non positive number ;
cluster a1 / a2 -> real non positive ;
coherence
not c8 / c9 is positive
;
cluster a2 / a1 -> real non positive ;
coherence
not c9 / c8 is positive
;
end;

registration
let c8, c9 be real non negative number ;
cluster a1 / a2 -> real non negative ;
coherence
not c8 / c9 is negative
;
end;

registration
let c8, c9 be real non positive number ;
cluster a1 / a2 -> real non negative ;
coherence
not c8 / c9 is negative
;
end;