:: ARYTM_1 semantic presentation

theorem Th1: :: ARYTM_1:1
for b1, b2 being Element of REAL+ st b1 + b2 = b2 holds
b1 = {}
proof end;

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

Lemma2: for b1, b2, b3 being Element of REAL+ st b1 *' b2 = b1 *' b3 & b1 <> {} holds
b2 = b3
proof end;

theorem Th2: :: ARYTM_1:2
for b1, b2 being Element of REAL+ holds
( not b1 *' b2 = {} or b1 = {} or b2 = {} )
proof end;

theorem Th3: :: ARYTM_1:3
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & b2 <=' b3 holds
b1 <=' b3
proof end;

theorem Th4: :: ARYTM_1:4
for b1, b2 being Element of REAL+ st b1 <=' b2 & b2 <=' b1 holds
b1 = b2
proof end;

theorem Th5: :: ARYTM_1:5
for b1, b2 being Element of REAL+ st b1 <=' b2 & b2 = {} holds
b1 = {}
proof end;

theorem Th6: :: ARYTM_1:6
for b1, b2 being Element of REAL+ st b1 = {} holds
b1 <=' b2
proof end;

theorem Th7: :: ARYTM_1:7
for b1, b2, b3 being Element of REAL+ holds
( b1 <=' b2 iff b1 + b3 <=' b2 + b3 )
proof end;

theorem Th8: :: ARYTM_1:8
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b1 *' b3 <=' b2 *' b3
proof end;

Lemma9: for b1, b2, b3 being Element of REAL+ st b1 *' b2 <=' b1 *' b3 & b1 <> {} holds
b2 <=' b3
proof end;

definition
let c2, c3 be Element of REAL+ ;
func c1 -' c2 -> Element of REAL+ means :Def1: :: ARYTM_1:def 1
a3 + a2 = a1 if a2 <=' a1
otherwise a3 = {} ;
existence
( ( c3 <=' c2 implies ex b1 being Element of REAL+ st b1 + c3 = c2 ) & ( not c3 <=' c2 implies ex b1 being Element of REAL+ st b1 = {} ) )
proof end;
correctness
consistency
for b1 being Element of REAL+ holds verum
;
uniqueness
for b1, b2 being Element of REAL+ holds
( ( c3 <=' c2 & b1 + c3 = c2 & b2 + c3 = c2 implies b1 = b2 ) & ( not c3 <=' c2 & b1 = {} & b2 = {} implies b1 = b2 ) )
;
by ARYTM_2:12;
end;

:: deftheorem Def1 defines -' ARYTM_1:def 1 :
for b1, b2, b3 being Element of REAL+ holds
( ( b2 <=' b1 implies ( b3 = b1 -' b2 iff b3 + b2 = b1 ) ) & ( not b2 <=' b1 implies ( b3 = b1 -' b2 iff b3 = {} ) ) );

Lemma11: for b1 being Element of REAL+ holds b1 -' b1 = {}
proof end;

theorem Th9: :: ARYTM_1:9
for b1, b2 being Element of REAL+ holds
( b1 <=' b2 or b1 -' b2 <> {} )
proof end;

theorem Th10: :: ARYTM_1:10
for b1, b2 being Element of REAL+ st b1 <=' b2 & b2 -' b1 = {} holds
b1 = b2
proof end;

theorem Th11: :: ARYTM_1:11
for b1, b2 being Element of REAL+ holds b1 -' b2 <=' b1
proof end;

Lemma14: for b1, b2 being Element of REAL+ st b1 = {} holds
b2 -' b1 = b2
proof end;

Lemma15: for b1, b2 being Element of REAL+ holds (b1 + b2) -' b2 = b1
proof end;

Lemma16: for b1, b2 being Element of REAL+ st b1 <=' b2 holds
b2 -' (b2 -' b1) = b1
proof end;

Lemma17: for b1, b2, b3 being Element of REAL+ holds
( b1 -' b2 <=' b3 iff b1 <=' b3 + b2 )
proof end;

Lemma18: for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
( b3 + b1 <=' b2 iff b3 <=' b2 -' b1 )
proof end;

Lemma19: for b1, b2, b3 being Element of REAL+ holds (b1 -' b2) -' b3 = b1 -' (b3 + b2)
proof end;

Lemma20: for b1, b2, b3 being Element of REAL+ holds (b1 -' b2) -' b3 = (b1 -' b3) -' b2
proof end;

theorem Th12: :: ARYTM_1:12
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & b1 <=' b3 holds
b2 + (b3 -' b1) = (b2 -' b1) + b3
proof end;

theorem Th13: :: ARYTM_1:13
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b3 + (b2 -' b1) = (b3 + b2) -' b1
proof end;

Lemma22: for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b3 -' (b2 -' b1) = (b3 + b1) -' b2
proof end;

Lemma23: for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & b3 <=' b1 holds
b2 -' (b1 -' b3) = (b2 -' b1) + b3
proof end;

Lemma24: for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & b3 <=' b2 holds
b1 -' (b2 -' b3) = b3 -' (b2 -' b1)
proof end;

theorem Th14: :: ARYTM_1:14
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & b3 <=' b1 holds
(b2 -' b1) + b3 = b2 -' (b1 -' b3)
proof end;

theorem Th15: :: ARYTM_1:15
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & b1 <=' b3 holds
(b3 -' b1) + b2 = (b2 -' b1) + b3
proof end;

theorem Th16: :: ARYTM_1:16
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b3 -' b2 <=' b3 -' b1
proof end;

theorem Th17: :: ARYTM_1:17
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b1 -' b3 <=' b2 -' b3
proof end;

Lemma25: for b1, b2, b3 being Element of REAL+ holds b1 *' (b2 -' b3) = (b1 *' b2) -' (b1 *' b3)
proof end;

definition
let c2, c3 be Element of REAL+ ;
func c1 - c2 -> set equals :Def2: :: ARYTM_1:def 2
a1 -' a2 if a2 <=' a1
otherwise [{} ,(a2 -' a1)];
correctness
coherence
( ( c3 <=' c2 implies c2 -' c3 is set ) & ( not c3 <=' c2 implies [{} ,(c3 -' c2)] is set ) )
;
consistency
for b1 being set holds verum
;
;
end;

:: deftheorem Def2 defines - ARYTM_1:def 2 :
for b1, b2 being Element of REAL+ holds
( ( b2 <=' b1 implies b1 - b2 = b1 -' b2 ) & ( not b2 <=' b1 implies b1 - b2 = [{} ,(b2 -' b1)] ) );

theorem Th18: :: ARYTM_1:18
for b1 being Element of REAL+ holds b1 - b1 = {}
proof end;

theorem Th19: :: ARYTM_1:19
for b1, b2 being Element of REAL+ st b1 = {} & b2 <> {} holds
b1 - b2 = [{} ,b2]
proof end;

theorem Th20: :: ARYTM_1:20
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b3 + (b2 -' b1) = (b3 + b2) - b1
proof end;

theorem Th21: :: ARYTM_1:21
for b1, b2, b3 being Element of REAL+ st not b1 <=' b2 holds
b3 - (b1 -' b2) = (b3 + b2) - b1
proof end;

theorem Th22: :: ARYTM_1:22
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & not b1 <=' b3 holds
b2 - (b1 -' b3) = (b2 -' b1) + b3
proof end;

theorem Th23: :: ARYTM_1:23
for b1, b2, b3 being Element of REAL+ st not b1 <=' b2 & not b1 <=' b3 holds
b2 - (b1 -' b3) = b3 - (b1 -' b2)
proof end;

theorem Th24: :: ARYTM_1:24
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b2 - (b1 + b3) = (b2 -' b1) - b3
proof end;

theorem Th25: :: ARYTM_1:25
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 & b3 <=' b2 holds
(b2 -' b3) - b1 = (b2 -' b1) - b3
proof end;

theorem Th26: :: ARYTM_1:26
for b1, b2, b3 being Element of REAL+ st b1 <=' b2 holds
b3 *' (b2 -' b1) = (b3 *' b2) - (b3 *' b1)
proof end;

theorem Th27: :: ARYTM_1:27
for b1, b2, b3 being Element of REAL+ st not b1 <=' b2 & b3 <> {} holds
[{} ,(b3 *' (b1 -' b2))] = (b3 *' b2) - (b3 *' b1)
proof end;

theorem Th28: :: ARYTM_1:28
for b1, b2, b3 being Element of REAL+ st b1 -' b2 <> {} & b2 <=' b1 & b3 <> {} holds
(b3 *' b2) - (b3 *' b1) = [{} ,(b3 *' (b1 -' b2))]
proof end;