:: SQUARE_1 semantic presentation

registration
cluster -> complex Element of COMPLEX ;
coherence
for b1 being Element of COMPLEX holds b1 is complex
by XCMPLX_0:def 2;
end;

theorem Th1: :: SQUARE_1:1
canceled;

theorem Th2: :: SQUARE_1:2
for b1 being real number st 1 < b1 holds
1 / b1 < 1
proof end;

Lemma1: for b1, b2 being real number st b1 < b2 holds
0 < b2 - b1
by XREAL_1:52;

Lemma2: for b1, b2 being real number st b1 <= b2 holds
0 <= b2 - b1
by XREAL_1:50;

Lemma3: for b1, b2 being real number st 0 <= b1 & 0 <= b2 holds
0 <= b1 * b2
by XREAL_1:129;

Lemma4: for b1, b2 being real number st 0 < b1 & 0 < b2 holds
0 < b1 * b2
by XREAL_1:131;

Lemma5: for b1, b2 being real number st 0 < b1 & b2 < 0 holds
b1 * b2 < 0
by XREAL_1:134;

theorem Th3: :: SQUARE_1:3
canceled;

theorem Th4: :: SQUARE_1:4
canceled;

theorem Th5: :: SQUARE_1:5
canceled;

theorem Th6: :: SQUARE_1:6
canceled;

theorem Th7: :: SQUARE_1:7
canceled;

theorem Th8: :: SQUARE_1:8
canceled;

theorem Th9: :: SQUARE_1:9
canceled;

theorem Th10: :: SQUARE_1:10
canceled;

theorem Th11: :: SQUARE_1:11
canceled;

theorem Th12: :: SQUARE_1:12
canceled;

theorem Th13: :: SQUARE_1:13
canceled;

theorem Th14: :: SQUARE_1:14
canceled;

theorem Th15: :: SQUARE_1:15
canceled;

theorem Th16: :: SQUARE_1:16
canceled;

theorem Th17: :: SQUARE_1:17
canceled;

theorem Th18: :: SQUARE_1:18
canceled;

theorem Th19: :: SQUARE_1:19
canceled;

theorem Th20: :: SQUARE_1:20
canceled;

theorem Th21: :: SQUARE_1:21
canceled;

theorem Th22: :: SQUARE_1:22
canceled;

theorem Th23: :: SQUARE_1:23
canceled;

theorem Th24: :: SQUARE_1:24
canceled;

theorem Th25: :: SQUARE_1:25
for b1, b2 being real number holds
( not 0 <= b1 * b2 or ( 0 <= b1 & 0 <= b2 ) or ( b1 <= 0 & b2 <= 0 ) ) by Lemma5;

Lemma6: for b1, b2 being real number st 0 <= b1 & 0 <= b2 holds
0 <= b1 / b2
by XREAL_1:138;

Lemma7: for b1, b2 being real number st 0 < b1 holds
b2 - b1 < b2
by XREAL_1:46;

scheme :: SQUARE_1:sch 1
s1{ P1[ set ], P2[ set ] } :
ex b1 being real number st
for b2, b3 being real number st P1[b2] & P2[b3] holds
( b2 <= b1 & b1 <= b3 )
provided
E8: for b1, b2 being real number st P1[b1] & P2[b2] holds
b1 <= b2
proof end;

definition
let c1, c2 be real number ;
func min c1,c2 -> real number equals :Def1: :: SQUARE_1:def 1
a1 if a1 <= a2
otherwise a2;
correctness
coherence
( ( c1 <= c2 implies c1 is real number ) & ( not c1 <= c2 implies c2 is real number ) )
;
consistency
for b1 being real number holds verum
;
;
commutativity
for b1, b2, b3 being real number st ( b2 <= b3 implies b1 = b2 ) & ( not b2 <= b3 implies b1 = b3 ) holds
( ( b3 <= b2 implies b1 = b3 ) & ( not b3 <= b2 implies b1 = b2 ) )
by XREAL_1:1;
idempotence
for b1 being real number holds
( ( b1 <= b1 implies b1 = b1 ) & ( not b1 <= b1 implies b1 = b1 ) )
;
func max c1,c2 -> real number equals :Def2: :: SQUARE_1:def 2
a1 if a2 <= a1
otherwise a2;
correctness
coherence
( ( c2 <= c1 implies c1 is real number ) & ( not c2 <= c1 implies c2 is real number ) )
;
consistency
for b1 being real number holds verum
;
;
commutativity
for b1, b2, b3 being real number st ( b3 <= b2 implies b1 = b2 ) & ( not b3 <= b2 implies b1 = b3 ) holds
( ( b2 <= b3 implies b1 = b3 ) & ( not b2 <= b3 implies b1 = b2 ) )
by XREAL_1:1;
idempotence
for b1 being real number holds
( ( b1 <= b1 implies b1 = b1 ) & ( not b1 <= b1 implies b1 = b1 ) )
;
end;

:: deftheorem Def1 defines min SQUARE_1:def 1 :
for b1, b2 being real number holds
( ( b1 <= b2 implies min b1,b2 = b1 ) & ( not b1 <= b2 implies min b1,b2 = b2 ) );

:: deftheorem Def2 defines max SQUARE_1:def 2 :
for b1, b2 being real number holds
( ( b2 <= b1 implies max b1,b2 = b1 ) & ( not b2 <= b1 implies max b1,b2 = b2 ) );

definition
let c1, c2 be Element of REAL ;
redefine func min as min c1,c2 -> Element of REAL ;
coherence
min c1,c2 is Element of REAL
by XREAL_0:def 1;
redefine func max as max c1,c2 -> Element of REAL ;
coherence
max c1,c2 is Element of REAL
by XREAL_0:def 1;
end;

theorem Th26: :: SQUARE_1:26
canceled;

theorem Th27: :: SQUARE_1:27
canceled;

theorem Th28: :: SQUARE_1:28
canceled;

theorem Th29: :: SQUARE_1:29
canceled;

theorem Th30: :: SQUARE_1:30
canceled;

theorem Th31: :: SQUARE_1:31
canceled;

theorem Th32: :: SQUARE_1:32
canceled;

theorem Th33: :: SQUARE_1:33
canceled;

theorem Th34: :: SQUARE_1:34
canceled;

theorem Th35: :: SQUARE_1:35
for b1, b2 being real number holds min b1,b2 <= b1
proof end;

theorem Th36: :: SQUARE_1:36
canceled;

theorem Th37: :: SQUARE_1:37
canceled;

theorem Th38: :: SQUARE_1:38
for b1, b2 being real number holds
( min b1,b2 = b1 or min b1,b2 = b2 )
proof end;

theorem Th39: :: SQUARE_1:39
for b1, b2, b3 being real number holds
( ( b1 <= b2 & b1 <= b3 ) iff b1 <= min b2,b3 )
proof end;

theorem Th40: :: SQUARE_1:40
for b1, b2, b3 being real number holds min b1,(min b2,b3) = min (min b1,b2),b3
proof end;

theorem Th41: :: SQUARE_1:41
canceled;

theorem Th42: :: SQUARE_1:42
canceled;

theorem Th43: :: SQUARE_1:43
canceled;

theorem Th44: :: SQUARE_1:44
canceled;

theorem Th45: :: SQUARE_1:45
canceled;

theorem Th46: :: SQUARE_1:46
for b1, b2 being real number holds b1 <= max b1,b2
proof end;

theorem Th47: :: SQUARE_1:47
canceled;

theorem Th48: :: SQUARE_1:48
canceled;

theorem Th49: :: SQUARE_1:49
for b1, b2 being real number holds
( max b1,b2 = b1 or max b1,b2 = b2 )
proof end;

theorem Th50: :: SQUARE_1:50
for b1, b2, b3 being real number holds
( ( b1 <= b2 & b3 <= b2 ) iff max b1,b3 <= b2 )
proof end;

theorem Th51: :: SQUARE_1:51
for b1, b2, b3 being real number holds max b1,(max b2,b3) = max (max b1,b2),b3
proof end;

theorem Th52: :: SQUARE_1:52
canceled;

theorem Th53: :: SQUARE_1:53
for b1, b2 being real number holds (min b1,b2) + (max b1,b2) = b1 + b2
proof end;

theorem Th54: :: SQUARE_1:54
for b1, b2 being real number holds max b1,(min b1,b2) = b1
proof end;

theorem Th55: :: SQUARE_1:55
for b1, b2 being real number holds min b1,(max b1,b2) = b1
proof end;

theorem Th56: :: SQUARE_1:56
for b1, b2, b3 being real number holds min b1,(max b2,b3) = max (min b1,b2),(min b1,b3)
proof end;

theorem Th57: :: SQUARE_1:57
for b1, b2, b3 being real number holds max b1,(min b2,b3) = min (max b1,b2),(max b1,b3)
proof end;

definition
let c1 be complex number ;
func c1 ^2 -> set equals :: SQUARE_1:def 3
a1 * a1;
correctness
coherence
c1 * c1 is set
;
;
end;

:: deftheorem Def3 defines ^2 SQUARE_1:def 3 :
for b1 being complex number holds b1 ^2 = b1 * b1;

registration
let c1 be complex number ;
cluster a1 ^2 -> complex ;
correctness
coherence
c1 ^2 is complex
;
;
end;

registration
let c1 be real number ;
cluster a1 ^2 -> complex real ;
correctness
coherence
c1 ^2 is real
;
;
end;

definition
let c1 be Element of COMPLEX ;
redefine func ^2 as c1 ^2 -> Element of COMPLEX ;
correctness
coherence
c1 ^2 is Element of COMPLEX
;
by XCMPLX_0:def 2;
end;

definition
let c1 be Element of REAL ;
redefine func ^2 as c1 ^2 -> Element of REAL ;
correctness
coherence
c1 ^2 is Element of REAL
;
by XREAL_0:def 1;
end;

theorem Th58: :: SQUARE_1:58
canceled;

theorem Th59: :: SQUARE_1:59
1 ^2 = 1 ;

theorem Th60: :: SQUARE_1:60
0 ^2 = 0 ;

theorem Th61: :: SQUARE_1:61
for b1 being complex number holds b1 ^2 = (- b1) ^2 ;

theorem Th62: :: SQUARE_1:62
canceled;

theorem Th63: :: SQUARE_1:63
for b1, b2 being complex number holds (b1 + b2) ^2 = ((b1 ^2 ) + ((2 * b1) * b2)) + (b2 ^2 ) ;

theorem Th64: :: SQUARE_1:64
for b1, b2 being complex number holds (b1 - b2) ^2 = ((b1 ^2 ) - ((2 * b1) * b2)) + (b2 ^2 ) ;

theorem Th65: :: SQUARE_1:65
for b1 being complex number holds (b1 + 1) ^2 = ((b1 ^2 ) + (2 * b1)) + 1 ;

theorem Th66: :: SQUARE_1:66
for b1 being complex number holds (b1 - 1) ^2 = ((b1 ^2 ) - (2 * b1)) + 1 ;

theorem Th67: :: SQUARE_1:67
for b1, b2 being complex number holds (b1 - b2) * (b1 + b2) = (b1 ^2 ) - (b2 ^2 ) ;

theorem Th68: :: SQUARE_1:68
for b1, b2 being complex number holds (b1 * b2) ^2 = (b1 ^2 ) * (b2 ^2 ) ;

theorem Th69: :: SQUARE_1:69
for b1, b2 being complex number holds (b1 / b2) ^2 = (b1 ^2 ) / (b2 ^2 ) by XCMPLX_1:77;

theorem Th70: :: SQUARE_1:70
for b1, b2 being complex number st (b1 ^2 ) - (b2 ^2 ) <> 0 holds
1 / (b1 + b2) = (b1 - b2) / ((b1 ^2 ) - (b2 ^2 ))
proof end;

theorem Th71: :: SQUARE_1:71
for b1, b2 being complex number st (b1 ^2 ) - (b2 ^2 ) <> 0 holds
1 / (b1 - b2) = (b1 + b2) / ((b1 ^2 ) - (b2 ^2 ))
proof end;

theorem Th72: :: SQUARE_1:72
for b1 being real number holds 0 <= b1 ^2 by XREAL_1:65;

theorem Th73: :: SQUARE_1:73
for b1 being complex number st b1 ^2 = 0 holds
b1 = 0 by XCMPLX_1:6;

theorem Th74: :: SQUARE_1:74
for b1 being real number st 0 <> b1 holds
0 < b1 ^2
proof end;

theorem Th75: :: SQUARE_1:75
for b1 being real number st 0 < b1 & b1 < 1 holds
b1 ^2 < b1
proof end;

theorem Th76: :: SQUARE_1:76
for b1 being real number st 1 < b1 holds
b1 < b1 ^2
proof end;

Lemma25: for b1 being real number st 0 < b1 holds
ex b2 being real number st
( 0 < b2 & b2 ^2 < b1 )
proof end;

theorem Th77: :: SQUARE_1:77
for b1, b2 being real number st 0 <= b1 & b1 <= b2 holds
b1 ^2 <= b2 ^2
proof end;

theorem Th78: :: SQUARE_1:78
for b1, b2 being real number st 0 <= b1 & b1 < b2 holds
b1 ^2 < b2 ^2
proof end;

Lemma28: for b1, b2 being real number st 0 <= b1 & 0 <= b2 & b1 ^2 = b2 ^2 holds
b1 = b2
proof end;

definition
let c1 be real number ;
assume E29: 0 <= c1 ;
func sqrt c1 -> real number means :Def4: :: SQUARE_1:def 4
( 0 <= a2 & a2 ^2 = a1 );
existence
ex b1 being real number st
( 0 <= b1 & b1 ^2 = c1 )
proof end;
uniqueness
for b1, b2 being real number st 0 <= b1 & b1 ^2 = c1 & 0 <= b2 & b2 ^2 = c1 holds
b1 = b2
by Lemma28;
end;

:: deftheorem Def4 defines sqrt SQUARE_1:def 4 :
for b1 being real number st 0 <= b1 holds
for b2 being real number holds
( b2 = sqrt b1 iff ( 0 <= b2 & b2 ^2 = b1 ) );

definition
let c1 be Element of REAL ;
redefine func sqrt as sqrt c1 -> Element of REAL ;
coherence
sqrt c1 is Element of REAL
by XREAL_0:def 1;
end;

theorem Th79: :: SQUARE_1:79
canceled;

theorem Th80: :: SQUARE_1:80
canceled;

theorem Th81: :: SQUARE_1:81
canceled;

theorem Th82: :: SQUARE_1:82
sqrt 0 = 0 by Def4, Th60;

theorem Th83: :: SQUARE_1:83
sqrt 1 = 1 by Def4, Th59;

Lemma31: for b1 being real number st 0 <= b1 holds
sqrt (b1 ^2 ) = b1
proof end;

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

theorem Th84: :: SQUARE_1:84
1 < sqrt 2 by Lemma32, Th83;

Lemma33: 2 ^2 = 2 * 2
;

theorem Th85: :: SQUARE_1:85
sqrt 4 = 2 by Def4, Lemma33;

theorem Th86: :: SQUARE_1:86
sqrt 2 < 2 by Lemma32, Th85;

theorem Th87: :: SQUARE_1:87
canceled;

theorem Th88: :: SQUARE_1:88
canceled;

theorem Th89: :: SQUARE_1:89
for b1 being real number st 0 <= b1 holds
sqrt (b1 ^2 ) = b1 by Lemma31;

theorem Th90: :: SQUARE_1:90
for b1 being real number st b1 <= 0 holds
sqrt (b1 ^2 ) = - b1
proof end;

theorem Th91: :: SQUARE_1:91
canceled;

theorem Th92: :: SQUARE_1:92
for b1 being real number st 0 <= b1 & sqrt b1 = 0 holds
b1 = 0 by Def4, Th60;

theorem Th93: :: SQUARE_1:93
for b1 being real number st 0 < b1 holds
0 < sqrt b1
proof end;

theorem Th94: :: SQUARE_1:94
for b1, b2 being real number st 0 <= b1 & b1 <= b2 holds
sqrt b1 <= sqrt b2
proof end;

theorem Th95: :: SQUARE_1:95
for b1, b2 being real number st 0 <= b1 & b1 < b2 holds
sqrt b1 < sqrt b2 by Lemma32;

theorem Th96: :: SQUARE_1:96
for b1, b2 being real number st 0 <= b1 & 0 <= b2 & sqrt b1 = sqrt b2 holds
b1 = b2
proof end;

theorem Th97: :: SQUARE_1:97
for b1, b2 being real number st 0 <= b1 & 0 <= b2 holds
sqrt (b1 * b2) = (sqrt b1) * (sqrt b2)
proof end;

theorem Th98: :: SQUARE_1:98
canceled;

theorem Th99: :: SQUARE_1:99
for b1, b2 being real number st 0 <= b1 & 0 <= b2 holds
sqrt (b1 / b2) = (sqrt b1) / (sqrt b2)
proof end;

theorem Th100: :: SQUARE_1:100
canceled;

theorem Th101: :: SQUARE_1:101
for b1 being real number st 0 < b1 holds
sqrt (1 / b1) = 1 / (sqrt b1) by Th83, Th99;

theorem Th102: :: SQUARE_1:102
for b1 being real number st 0 < b1 holds
(sqrt b1) / b1 = 1 / (sqrt b1)
proof end;

theorem Th103: :: SQUARE_1:103
for b1 being real number st 0 < b1 holds
b1 / (sqrt b1) = sqrt b1
proof end;

theorem Th104: :: SQUARE_1:104
for b1, b2 being real number st 0 <= b1 & 0 <= b2 holds
((sqrt b1) - (sqrt b2)) * ((sqrt b1) + (sqrt b2)) = b1 - b2
proof end;

Lemma37: for b1, b2 being real number st 0 <= b1 & 0 <= b2 & b1 <> b2 holds
((sqrt b1) ^2 ) - ((sqrt b2) ^2 ) <> 0
proof end;

theorem Th105: :: SQUARE_1:105
for b1, b2 being real number st 0 <= b1 & 0 <= b2 & b1 <> b2 holds
1 / ((sqrt b1) + (sqrt b2)) = ((sqrt b1) - (sqrt b2)) / (b1 - b2)
proof end;

theorem Th106: :: SQUARE_1:106
for b1, b2 being real number st 0 <= b1 & b1 < b2 holds
1 / ((sqrt b2) + (sqrt b1)) = ((sqrt b2) - (sqrt b1)) / (b2 - b1)
proof end;

theorem Th107: :: SQUARE_1:107
for b1, b2 being real number st 0 <= b1 & 0 <= b2 holds
1 / ((sqrt b1) - (sqrt b2)) = ((sqrt b1) + (sqrt b2)) / (b1 - b2)
proof end;

theorem Th108: :: SQUARE_1:108
for b1, b2 being real number st 0 <= b1 & b1 < b2 holds
1 / ((sqrt b2) - (sqrt b1)) = ((sqrt b2) + (sqrt b1)) / (b2 - b1)
proof end;