:: COMPLEX1 semantic presentation

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

E2: 2 = succ 1
.= (succ 0) \/ {1} by ORDINAL1:def 1
.= ({} \/ {0}) \/ {1} by ORDINAL1:def 1
.= {0,one } by Lemma1, ENUMSET1:41 ;

theorem Th1: :: COMPLEX1:1
canceled;

theorem Th2: :: COMPLEX1:2
for b1, b2 being real number holds
( (b1 ^2 ) + (b2 ^2 ) = 0 iff ( b1 = 0 & b2 = 0 ) )
proof end;

Lemma4: for b1, b2 being Element of REAL holds 0 <= (b1 ^2 ) + (b2 ^2 )
proof end;

registration
cluster -> complex Element of COMPLEX ;
coherence
for b1 being Element of COMPLEX holds b1 is complex
;
end;

definition
let c1 be complex number ;
canceled;
func Re c1 -> set means :Def2: :: COMPLEX1:def 2
a2 = a1 if a1 in REAL
otherwise ex b1 being Function of 2, REAL st
( a1 = b1 & a2 = b1 . 0 );
existence
( ( c1 in REAL implies ex b1 being set st b1 = c1 ) & ( not c1 in REAL implies ex b1 being set ex b2 being Function of 2, REAL st
( c1 = b2 & b1 = b2 . 0 ) ) )
proof end;
uniqueness
for b1, b2 being set holds
( ( c1 in REAL & b1 = c1 & b2 = c1 implies b1 = b2 ) & ( not c1 in REAL & ex b3 being Function of 2, REAL st
( c1 = b3 & b1 = b3 . 0 ) & ex b3 being Function of 2, REAL st
( c1 = b3 & b2 = b3 . 0 ) implies b1 = b2 ) )
;
consistency
for b1 being set holds verum
;
func Im c1 -> set means :Def3: :: COMPLEX1:def 3
a2 = 0 if a1 in REAL
otherwise ex b1 being Function of 2, REAL st
( a1 = b1 & a2 = b1 . 1 );
existence
( ( c1 in REAL implies ex b1 being set st b1 = 0 ) & ( not c1 in REAL implies ex b1 being set ex b2 being Function of 2, REAL st
( c1 = b2 & b1 = b2 . 1 ) ) )
proof end;
uniqueness
for b1, b2 being set holds
( ( c1 in REAL & b1 = 0 & b2 = 0 implies b1 = b2 ) & ( not c1 in REAL & ex b3 being Function of 2, REAL st
( c1 = b3 & b1 = b3 . 1 ) & ex b3 being Function of 2, REAL st
( c1 = b3 & b2 = b3 . 1 ) implies b1 = b2 ) )
;
consistency
for b1 being set holds verum
;
end;

:: deftheorem Def1 COMPLEX1:def 1 :
canceled;

:: deftheorem Def2 defines Re COMPLEX1:def 2 :
for b1 being complex number
for b2 being set holds
( ( b1 in REAL implies ( b2 = Re b1 iff b2 = b1 ) ) & ( not b1 in REAL implies ( b2 = Re b1 iff ex b3 being Function of 2, REAL st
( b1 = b3 & b2 = b3 . 0 ) ) ) );

:: deftheorem Def3 defines Im COMPLEX1:def 3 :
for b1 being complex number
for b2 being set holds
( ( b1 in REAL implies ( b2 = Im b1 iff b2 = 0 ) ) & ( not b1 in REAL implies ( b2 = Im b1 iff ex b3 being Function of 2, REAL st
( b1 = b3 & b2 = b3 . 1 ) ) ) );

registration
let c1 be complex number ;
cluster Re a1 -> real ;
coherence
Re c1 is real
proof end;
cluster Im a1 -> real ;
coherence
Im c1 is real
proof end;
end;

definition
let c1 be complex number ;
redefine func Re as Re c1 -> Real;
coherence
Re c1 is Real
by XREAL_0:def 1;
redefine func Im as Im c1 -> Real;
coherence
Im c1 is Real
by XREAL_0:def 1;
end;

theorem Th3: :: COMPLEX1:3
canceled;

theorem Th4: :: COMPLEX1:4
canceled;

theorem Th5: :: COMPLEX1:5
for b1 being Function of 2, REAL ex b2, b3 being Element of REAL st b1 = 0,1 --> b2,b3
proof end;

Lemma8: for b1, b2 being Element of REAL holds
( Re [*b1,b2*] = b1 & Im [*b1,b2*] = b2 )
proof end;

Lemma9: for b1 being complex number holds [*(Re b1),(Im b1)*] = b1
proof end;

theorem Th6: :: COMPLEX1:6
canceled;

theorem Th7: :: COMPLEX1:7
canceled;

theorem Th8: :: COMPLEX1:8
canceled;

theorem Th9: :: COMPLEX1:9
for b1, b2 being complex number st Re b1 = Re b2 & Im b1 = Im b2 holds
b1 = b2
proof end;

definition
let c1, c2 be complex number ;
canceled;
redefine pred c1 = c2 means :: COMPLEX1:def 5
( Re a1 = Re a2 & Im a1 = Im a2 );
compatibility
( c1 = c2 iff ( Re c1 = Re c2 & Im c1 = Im c2 ) )
by Th9;
end;

:: deftheorem Def4 COMPLEX1:def 4 :
canceled;

:: deftheorem Def5 defines = COMPLEX1:def 5 :
for b1, b2 being complex number holds
( b1 = b2 iff ( Re b1 = Re b2 & Im b1 = Im b2 ) );

definition
func 0c -> Element of COMPLEX equals :: COMPLEX1:def 6
0;
correctness
coherence
0 is Element of COMPLEX
;
by XCMPLX_0:def 2;
func 1r -> Element of COMPLEX equals :: COMPLEX1:def 7
1;
correctness
coherence
1 is Element of COMPLEX
;
by XCMPLX_0:def 2;
redefine func <i> as <i> -> Element of COMPLEX equals :: COMPLEX1:def 8
[*0,1*];
coherence
<i> is Element of COMPLEX
by XCMPLX_0:def 2;
compatibility
for b1 being Element of COMPLEX holds
( b1 = <i> iff b1 = [*0,1*] )
by Lemma1, ARYTM_0:def 7, XCMPLX_0:def 1;
end;

:: deftheorem Def6 defines 0c COMPLEX1:def 6 :
0c = 0;

:: deftheorem Def7 defines 1r COMPLEX1:def 7 :
1r = 1;

:: deftheorem Def8 defines <i> COMPLEX1:def 8 :
<i> = [*0,1*];

Lemma11: 0 = [*0,0*]
by ARYTM_0:def 7;

Lemma12: 1r = [*1,0*]
by ARYTM_0:def 7;

registration
cluster 0c -> zero complex ;
coherence
0c is empty
;
end;

theorem Th10: :: COMPLEX1:10
canceled;

theorem Th11: :: COMPLEX1:11
canceled;

theorem Th12: :: COMPLEX1:12
( Re 0 = 0 & Im 0 = 0 ) by Lemma11, Lemma8;

theorem Th13: :: COMPLEX1:13
for b1 being complex number holds
( b1 = 0 iff ((Re b1) ^2 ) + ((Im b1) ^2 ) = 0 )
proof end;

theorem Th14: :: COMPLEX1:14
canceled;

theorem Th15: :: COMPLEX1:15
( Re 1r = 1 & Im 1r = 0 ) by Lemma12, Lemma8;

theorem Th16: :: COMPLEX1:16
canceled;

theorem Th17: :: COMPLEX1:17
( Re <i> = 0 & Im <i> = 1 ) by Lemma8;

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

Lemma18: for b1, b2 being Element of REAL
for b3, b4 being real number st b1 = b3 & b2 = b4 holds
+ b1,b2 = b3 + b4
proof end;

Lemma19: for b1 being Element of REAL holds opp b1 = - b1
proof end;

Lemma20: for b1, b2 being Element of REAL
for b3, b4 being real number st b1 = b3 & b2 = b4 holds
* b1,b2 = b3 * b4
proof end;

Lemma21: for b1, b2, b3 being Element of COMPLEX st b3 = b1 + b2 holds
Re b3 = (Re b1) + (Re b2)
proof end;

Lemma22: for b1, b2, b3 being Element of COMPLEX st b3 = b1 + b2 holds
Im b3 = (Im b1) + (Im b2)
proof end;

Lemma23: for b1, b2, b3 being Element of COMPLEX st b3 = b1 * b2 holds
Re b3 = ((Re b1) * (Re b2)) - ((Im b1) * (Im b2))
proof end;

Lemma24: for b1, b2, b3 being Element of COMPLEX st b3 = b1 * b2 holds
Im b3 = ((Re b1) * (Im b2)) + ((Im b1) * (Re b2))
proof end;

Lemma25: for b1, b2 being Element of COMPLEX holds b1 + b2 = [*((Re b1) + (Re b2)),((Im b1) + (Im b2))*]
proof end;

Lemma26: for b1, b2 being Element of COMPLEX holds b1 * b2 = [*(((Re b1) * (Re b2)) - ((Im b1) * (Im b2))),(((Re b1) * (Im b2)) + ((Re b2) * (Im b1)))*]
proof end;

Lemma27: for b1, b2 being complex number holds
( Re (b1 * b2) = ((Re b1) * (Re b2)) - ((Im b1) * (Im b2)) & Im (b1 * b2) = ((Re b1) * (Im b2)) + ((Re b2) * (Im b1)) )
proof end;

Lemma28: for b1, b2 being complex number holds
( Re (b1 + b2) = (Re b1) + (Re b2) & Im (b1 + b2) = (Im b1) + (Im b2) )
proof end;

Lemma29: for b1 being Real holds Re (b1 * <i> ) = 0
proof end;

Lemma30: for b1 being Real holds Im (b1 * <i> ) = b1
proof end;

Lemma31: for b1, b2 being Real holds [*b1,b2*] = b1 + (b2 * <i> )
proof end;

definition
let c1, c2 be Element of COMPLEX ;
redefine func + as c1 + c2 -> Element of COMPLEX equals :: COMPLEX1:def 9
((Re a1) + (Re a2)) + (((Im a1) + (Im a2)) * <i> );
coherence
c1 + c2 is Element of COMPLEX
by XCMPLX_0:def 2;
compatibility
for b1 being Element of COMPLEX holds
( b1 = c1 + c2 iff b1 = ((Re c1) + (Re c2)) + (((Im c1) + (Im c2)) * <i> ) )
proof end;
end;

:: deftheorem Def9 defines + COMPLEX1:def 9 :
for b1, b2 being Element of COMPLEX holds b1 + b2 = ((Re b1) + (Re b2)) + (((Im b1) + (Im b2)) * <i> );

theorem Th18: :: COMPLEX1:18
canceled;

theorem Th19: :: COMPLEX1:19
for b1, b2 being complex number holds
( Re (b1 + b2) = (Re b1) + (Re b2) & Im (b1 + b2) = (Im b1) + (Im b2) )
proof end;

definition
let c1, c2 be Element of COMPLEX ;
redefine func * as c1 * c2 -> Element of COMPLEX equals :: COMPLEX1:def 10
(((Re a1) * (Re a2)) - ((Im a1) * (Im a2))) + ((((Re a1) * (Im a2)) + ((Re a2) * (Im a1))) * <i> );
coherence
c1 * c2 is Element of COMPLEX
by XCMPLX_0:def 2;
compatibility
for b1 being Element of COMPLEX holds
( b1 = c1 * c2 iff b1 = (((Re c1) * (Re c2)) - ((Im c1) * (Im c2))) + ((((Re c1) * (Im c2)) + ((Re c2) * (Im c1))) * <i> ) )
proof end;
end;

:: deftheorem Def10 defines * COMPLEX1:def 10 :
for b1, b2 being Element of COMPLEX holds b1 * b2 = (((Re b1) * (Re b2)) - ((Im b1) * (Im b2))) + ((((Re b1) * (Im b2)) + ((Re b2) * (Im b1))) * <i> );

theorem Th20: :: COMPLEX1:20
canceled;

theorem Th21: :: COMPLEX1:21
canceled;

theorem Th22: :: COMPLEX1:22
canceled;

theorem Th23: :: COMPLEX1:23
canceled;

theorem Th24: :: COMPLEX1:24
for b1, b2 being complex number holds
( Re (b1 * b2) = ((Re b1) * (Re b2)) - ((Im b1) * (Im b2)) & Im (b1 * b2) = ((Re b1) * (Im b2)) + ((Re b2) * (Im b1)) )
proof end;

theorem Th25: :: COMPLEX1:25
for b1 being Real holds Re (b1 * <i> ) = 0
proof end;

theorem Th26: :: COMPLEX1:26
for b1 being Real holds Im (b1 * <i> ) = b1
proof end;

theorem Th27: :: COMPLEX1:27
for b1, b2 being Real holds [*b1,b2*] = b1 + (b2 * <i> )
proof end;

theorem Th28: :: COMPLEX1:28
for b1, b2 being Element of REAL holds
( Re (b1 + (b2 * <i> )) = b1 & Im (b1 + (b2 * <i> )) = b2 )
proof end;

theorem Th29: :: COMPLEX1:29
for b1 being complex number holds (Re b1) + ((Im b1) * <i> ) = b1
proof end;

theorem Th30: :: COMPLEX1:30
for b1, b2 being complex number st Im b1 = 0 & Im b2 = 0 holds
( Re (b1 * b2) = (Re b1) * (Re b2) & Im (b1 * b2) = 0 )
proof end;

theorem Th31: :: COMPLEX1:31
for b1, b2 being complex number st Re b1 = 0 & Re b2 = 0 holds
( Re (b1 * b2) = - ((Im b1) * (Im b2)) & Im (b1 * b2) = 0 )
proof end;

theorem Th32: :: COMPLEX1:32
for b1 being Element of COMPLEX holds
( Re (b1 * b1) = ((Re b1) ^2 ) - ((Im b1) ^2 ) & Im (b1 * b1) = 2 * ((Re b1) * (Im b1)) ) by Th24;

definition
let c1 be Element of COMPLEX ;
redefine func - as - c1 -> Element of COMPLEX equals :Def11: :: COMPLEX1:def 11
(- (Re a1)) + ((- (Im a1)) * <i> );
coherence
- c1 is Element of COMPLEX
by XCMPLX_0:def 2;
compatibility
for b1 being Element of COMPLEX holds
( b1 = - c1 iff b1 = (- (Re c1)) + ((- (Im c1)) * <i> ) )
proof end;
end;

:: deftheorem Def11 defines - COMPLEX1:def 11 :
for b1 being Element of COMPLEX holds - b1 = (- (Re b1)) + ((- (Im b1)) * <i> );

theorem Th33: :: COMPLEX1:33
canceled;

theorem Th34: :: COMPLEX1:34
for b1 being complex number holds
( Re (- b1) = - (Re b1) & Im (- b1) = - (Im b1) )
proof end;

- <i> = 0 + ((- 1) * <i> )
;

then Lemma42: ( Re (- <i> ) = 0 & Im (- <i> ) = - 1 )
by Th28;

theorem Th35: :: COMPLEX1:35
canceled;

theorem Th36: :: COMPLEX1:36
canceled;

theorem Th37: :: COMPLEX1:37
<i> * <i> = - 1r ;

definition
let c1, c2 be Element of COMPLEX ;
redefine func - as c1 - c2 -> Element of COMPLEX equals :: COMPLEX1:def 12
((Re a1) - (Re a2)) + (((Im a1) - (Im a2)) * <i> );
coherence
c1 - c2 is Element of COMPLEX
by XCMPLX_0:def 2;
compatibility
for b1 being Element of COMPLEX holds
( b1 = c1 - c2 iff b1 = ((Re c1) - (Re c2)) + (((Im c1) - (Im c2)) * <i> ) )
proof end;
end;

:: deftheorem Def12 defines - COMPLEX1:def 12 :
for b1, b2 being Element of COMPLEX holds b1 - b2 = ((Re b1) - (Re b2)) + (((Im b1) - (Im b2)) * <i> );

theorem Th38: :: COMPLEX1:38
canceled;

theorem Th39: :: COMPLEX1:39
canceled;

theorem Th40: :: COMPLEX1:40
canceled;

theorem Th41: :: COMPLEX1:41
canceled;

theorem Th42: :: COMPLEX1:42
canceled;

theorem Th43: :: COMPLEX1:43
canceled;

theorem Th44: :: COMPLEX1:44
canceled;

theorem Th45: :: COMPLEX1:45
canceled;

theorem Th46: :: COMPLEX1:46
canceled;

theorem Th47: :: COMPLEX1:47
canceled;

theorem Th48: :: COMPLEX1:48
for b1, b2 being Element of COMPLEX holds
( Re (b1 - b2) = (Re b1) - (Re b2) & Im (b1 - b2) = (Im b1) - (Im b2) ) by Th28;

definition
let c1 be Element of COMPLEX ;
redefine func " as c1 " -> Element of COMPLEX equals :Def13: :: COMPLEX1:def 13
((Re a1) / (((Re a1) ^2 ) + ((Im a1) ^2 ))) + (((- (Im a1)) / (((Re a1) ^2 ) + ((Im a1) ^2 ))) * <i> );
coherence
c1 " is Element of COMPLEX
by XCMPLX_0:def 2;
compatibility
for b1 being Element of COMPLEX holds
( b1 = c1 " iff b1 = ((Re c1) / (((Re c1) ^2 ) + ((Im c1) ^2 ))) + (((- (Im c1)) / (((Re c1) ^2 ) + ((Im c1) ^2 ))) * <i> ) )
proof end;
end;

:: deftheorem Def13 defines " COMPLEX1:def 13 :
for b1 being Element of COMPLEX holds b1 " = ((Re b1) / (((Re b1) ^2 ) + ((Im b1) ^2 ))) + (((- (Im b1)) / (((Re b1) ^2 ) + ((Im b1) ^2 ))) * <i> );

theorem Th49: :: COMPLEX1:49
canceled;

theorem Th50: :: COMPLEX1:50
canceled;

theorem Th51: :: COMPLEX1:51
canceled;

theorem Th52: :: COMPLEX1:52
canceled;

theorem Th53: :: COMPLEX1:53
canceled;

theorem Th54: :: COMPLEX1:54
canceled;

theorem Th55: :: COMPLEX1:55
canceled;

theorem Th56: :: COMPLEX1:56
canceled;

theorem Th57: :: COMPLEX1:57
canceled;

theorem Th58: :: COMPLEX1:58
canceled;

theorem Th59: :: COMPLEX1:59
canceled;

theorem Th60: :: COMPLEX1:60
canceled;

theorem Th61: :: COMPLEX1:61
canceled;

theorem Th62: :: COMPLEX1:62
canceled;

theorem Th63: :: COMPLEX1:63
canceled;

theorem Th64: :: COMPLEX1:64
for b1 being complex number holds
( Re (b1 " ) = (Re b1) / (((Re b1) ^2 ) + ((Im b1) ^2 )) & Im (b1 " ) = (- (Im b1)) / (((Re b1) ^2 ) + ((Im b1) ^2 )) )
proof end;

theorem Th65: :: COMPLEX1:65
canceled;

theorem Th66: :: COMPLEX1:66
canceled;

theorem Th67: :: COMPLEX1:67
canceled;

theorem Th68: :: COMPLEX1:68
canceled;

theorem Th69: :: COMPLEX1:69
canceled;

theorem Th70: :: COMPLEX1:70
canceled;

theorem Th71: :: COMPLEX1:71
canceled;

theorem Th72: :: COMPLEX1:72
<i> " = - <i> ;

theorem Th73: :: COMPLEX1:73
canceled;

theorem Th74: :: COMPLEX1:74
canceled;

theorem Th75: :: COMPLEX1:75
canceled;

theorem Th76: :: COMPLEX1:76
canceled;

theorem Th77: :: COMPLEX1:77
canceled;

theorem Th78: :: COMPLEX1:78
canceled;

theorem Th79: :: COMPLEX1:79
for b1 being Element of COMPLEX st Re b1 <> 0 & Im b1 = 0 holds
( Re (b1 " ) = (Re b1) " & Im (b1 " ) = 0 )
proof end;

theorem Th80: :: COMPLEX1:80
for b1 being Element of COMPLEX st Re b1 = 0 & Im b1 <> 0 holds
( Re (b1 " ) = 0 & Im (b1 " ) = - ((Im b1) " ) )
proof end;

definition
let c1, c2 be Element of COMPLEX ;
redefine func / as c1 / c2 -> Element of COMPLEX equals :: COMPLEX1:def 14
((((Re a1) * (Re a2)) + ((Im a1) * (Im a2))) / (((Re a2) ^2 ) + ((Im a2) ^2 ))) + (((((Re a2) * (Im a1)) - ((Re a1) * (Im a2))) / (((Re a2) ^2 ) + ((Im a2) ^2 ))) * <i> );
coherence
c1 / c2 is Element of COMPLEX
by XCMPLX_0:def 2;
compatibility
for b1 being Element of COMPLEX holds
( b1 = c1 / c2 iff b1 = ((((Re c1) * (Re c2)) + ((Im c1) * (Im c2))) / (((Re c2) ^2 ) + ((Im c2) ^2 ))) + (((((Re c2) * (Im c1)) - ((Re c1) * (Im c2))) / (((Re c2) ^2 ) + ((Im c2) ^2 ))) * <i> ) )
proof end;
end;

:: deftheorem Def14 defines / COMPLEX1:def 14 :
for b1, b2 being Element of COMPLEX holds b1 / b2 = ((((Re b1) * (Re b2)) + ((Im b1) * (Im b2))) / (((Re b2) ^2 ) + ((Im b2) ^2 ))) + (((((Re b2) * (Im b1)) - ((Re b1) * (Im b2))) / (((Re b2) ^2 ) + ((Im b2) ^2 ))) * <i> );

theorem Th81: :: COMPLEX1:81
canceled;

theorem Th82: :: COMPLEX1:82
for b1, b2 being Element of COMPLEX holds
( Re (b1 / b2) = (((Re b1) * (Re b2)) + ((Im b1) * (Im b2))) / (((Re b2) ^2 ) + ((Im b2) ^2 )) & Im (b1 / b2) = (((Re b2) * (Im b1)) - ((Re b1) * (Im b2))) / (((Re b2) ^2 ) + ((Im b2) ^2 )) ) by Th28;

theorem Th83: :: COMPLEX1:83
canceled;

theorem Th84: :: COMPLEX1:84
canceled;

theorem Th85: :: COMPLEX1:85
canceled;

theorem Th86: :: COMPLEX1:86
canceled;

theorem Th87: :: COMPLEX1:87
canceled;

theorem Th88: :: COMPLEX1:88
canceled;

theorem Th89: :: COMPLEX1:89
canceled;

theorem Th90: :: COMPLEX1:90
canceled;

theorem Th91: :: COMPLEX1:91
canceled;

theorem Th92: :: COMPLEX1:92
canceled;

theorem Th93: :: COMPLEX1:93
canceled;

theorem Th94: :: COMPLEX1:94
canceled;

theorem Th95: :: COMPLEX1:95
canceled;

theorem Th96: :: COMPLEX1:96
canceled;

theorem Th97: :: COMPLEX1:97
canceled;

theorem Th98: :: COMPLEX1:98
canceled;

theorem Th99: :: COMPLEX1:99
canceled;

theorem Th100: :: COMPLEX1:100
canceled;

theorem Th101: :: COMPLEX1:101
canceled;

theorem Th102: :: COMPLEX1:102
canceled;

theorem Th103: :: COMPLEX1:103
canceled;

theorem Th104: :: COMPLEX1:104
canceled;

theorem Th105: :: COMPLEX1:105
canceled;

theorem Th106: :: COMPLEX1:106
canceled;

theorem Th107: :: COMPLEX1:107
canceled;

theorem Th108: :: COMPLEX1:108
canceled;

theorem Th109: :: COMPLEX1:109
for b1, b2 being Element of COMPLEX st Im b1 = 0 & Im b2 = 0 & Re b2 <> 0 holds
( Re (b1 / b2) = (Re b1) / (Re b2) & Im (b1 / b2) = 0 )
proof end;

theorem Th110: :: COMPLEX1:110
for b1, b2 being Element of COMPLEX st Re b1 = 0 & Re b2 = 0 & Im b2 <> 0 holds
( Re (b1 / b2) = (Im b1) / (Im b2) & Im (b1 / b2) = 0 )
proof end;

definition
let c1 be complex number ;
func c1 *' -> complex number equals :: COMPLEX1:def 15
(Re a1) - ((Im a1) * <i> );
correctness
coherence
(Re c1) - ((Im c1) * <i> ) is complex number
;
;
involutiveness
for b1, b2 being complex number st b1 = (Re b2) - ((Im b2) * <i> ) holds
b2 = (Re b1) - ((Im b1) * <i> )
proof end;
end;

:: deftheorem Def15 defines *' COMPLEX1:def 15 :
for b1 being complex number holds b1 *' = (Re b1) - ((Im b1) * <i> );

definition
let c1 be complex number ;
redefine func *' as c1 *' -> Element of COMPLEX ;
coherence
c1 *' is Element of COMPLEX
by XCMPLX_0:def 2;
end;

theorem Th111: :: COMPLEX1:111
canceled;

theorem Th112: :: COMPLEX1:112
for b1 being complex number holds
( Re (b1 *' ) = Re b1 & Im (b1 *' ) = - (Im b1) )
proof end;

theorem Th113: :: COMPLEX1:113
0 *' = 0 by Th12;

theorem Th114: :: COMPLEX1:114
for b1 being complex number st b1 *' = 0 holds
b1 = 0
proof end;

theorem Th115: :: COMPLEX1:115
1r *' = 1r by Th15;

Lemma49: ( Re (<i> *' ) = 0 & Im (<i> *' ) = - 1 )
by Th17, Th112;

theorem Th116: :: COMPLEX1:116
<i> *' = - <i> by Lemma42, Lemma49, Th9;

theorem Th117: :: COMPLEX1:117
canceled;

theorem Th118: :: COMPLEX1:118
for b1, b2 being complex number holds (b1 + b2) *' = (b1 *' ) + (b2 *' )
proof end;

theorem Th119: :: COMPLEX1:119
for b1 being Element of COMPLEX holds (- b1) *' = - (b1 *' )
proof end;

theorem Th120: :: COMPLEX1:120
for b1, b2 being Element of COMPLEX holds (b1 - b2) *' = (b1 *' ) - (b2 *' )
proof end;

theorem Th121: :: COMPLEX1:121
for b1, b2 being Element of COMPLEX holds (b1 * b2) *' = (b1 *' ) * (b2 *' )
proof end;

theorem Th122: :: COMPLEX1:122
for b1 being Element of COMPLEX holds (b1 " ) *' = (b1 *' ) "
proof end;

theorem Th123: :: COMPLEX1:123
for b1, b2 being Element of COMPLEX holds (b1 / b2) *' = (b1 *' ) / (b2 *' )
proof end;

theorem Th124: :: COMPLEX1:124
for b1 being Element of COMPLEX st Im b1 = 0 holds
b1 *' = b1
proof end;

theorem Th125: :: COMPLEX1:125
for b1 being Element of COMPLEX st Re b1 = 0 holds
b1 *' = - b1 ;

theorem Th126: :: COMPLEX1:126
for b1 being Element of COMPLEX holds
( Re (b1 * (b1 *' )) = ((Re b1) ^2 ) + ((Im b1) ^2 ) & Im (b1 * (b1 *' )) = 0 )
proof end;

theorem Th127: :: COMPLEX1:127
for b1 being Element of COMPLEX holds
( Re (b1 + (b1 *' )) = 2 * (Re b1) & Im (b1 + (b1 *' )) = 0 )
proof end;

theorem Th128: :: COMPLEX1:128
for b1 being Element of COMPLEX holds
( Re (b1 - (b1 *' )) = 0 & Im (b1 - (b1 *' )) = 2 * (Im b1) )
proof end;

definition
let c1 be complex number ;
func |.c1.| -> complex number equals :: COMPLEX1:def 16
sqrt (((Re a1) ^2 ) + ((Im a1) ^2 ));
coherence
sqrt (((Re c1) ^2 ) + ((Im c1) ^2 )) is complex number
;
projectivity
for b1, b2 being complex number st b1 = sqrt (((Re b2) ^2 ) + ((Im b2) ^2 )) holds
b1 = sqrt (((Re b1) ^2 ) + ((Im b1) ^2 ))
proof end;
end;

:: deftheorem Def16 defines |. COMPLEX1:def 16 :
for b1 being complex number holds |.b1.| = sqrt (((Re b1) ^2 ) + ((Im b1) ^2 ));

registration
let c1 be complex number ;
cluster |.a1.| -> complex real ;
coherence
|.c1.| is real
;
end;

definition
let c1 be complex number ;
redefine func |. as |.c1.| -> Real;
coherence
|.c1.| is Real
;
end;

Lemma54: sqrt ((0 ^2 ) + (0 ^2 )) = 0
by SQUARE_1:82;

theorem Th129: :: COMPLEX1:129
for b1 being real number st b1 >= 0 holds
|.b1.| = b1
proof end;

theorem Th130: :: COMPLEX1:130
|.0.| = 0 by Lemma54, Th12;

theorem Th131: :: COMPLEX1:131
for b1 being complex number st |.b1.| = 0 holds
b1 = 0
proof end;

theorem Th132: :: COMPLEX1:132
for b1 being complex number holds 0 <= |.b1.|
proof end;

theorem Th133: :: COMPLEX1:133
for b1 being complex number holds
( b1 <> 0 iff 0 < |.b1.| )
proof end;

Lemma59: sqrt ((1 ^2 ) + (0 ^2 )) = 1
by SQUARE_1:83;

theorem Th134: :: COMPLEX1:134
|.1r .| = 1 by Lemma59, Th15;

Lemma60: sqrt ((0 ^2 ) + (1 ^2 )) = 1
by SQUARE_1:83;

theorem Th135: :: COMPLEX1:135
|.<i> .| = 1 by Lemma60, Th17;

Lemma61: for b1 being complex number holds |.(- b1).| = |.b1.|
proof end;

Lemma62: for b1 being real number st b1 <= 0 holds
|.b1.| = - b1
proof end;

Lemma63: for b1 being real number holds sqrt (b1 ^2 ) = |.b1.|
proof end;

theorem Th136: :: COMPLEX1:136
for b1 being complex number st Im b1 = 0 holds
|.b1.| = |.(Re b1).| by Lemma63;

theorem Th137: :: COMPLEX1:137
for b1 being complex number st Re b1 = 0 holds
|.b1.| = |.(Im b1).| by Lemma63;

theorem Th138: :: COMPLEX1:138
for b1 being complex number holds |.(- b1).| = |.b1.| by Lemma61;

theorem Th139: :: COMPLEX1:139
for b1 being complex number holds |.(b1 *' ).| = |.b1.|
proof end;

Lemma65: for b1 being real number holds
( - |.b1.| <= b1 & b1 <= |.b1.| )
proof end;

theorem Th140: :: COMPLEX1:140
for b1 being complex number holds Re b1 <= |.b1.|
proof end;

theorem Th141: :: COMPLEX1:141
for b1 being complex number holds Im b1 <= |.b1.|
proof end;

theorem Th142: :: COMPLEX1:142
for b1, b2 being complex number holds |.(b1 + b2).| <= |.b1.| + |.b2.|
proof end;

theorem Th143: :: COMPLEX1:143
for b1, b2 being complex number holds |.(b1 - b2).| <= |.b1.| + |.b2.|
proof end;

theorem Th144: :: COMPLEX1:144
for b1, b2 being complex number holds |.b1.| - |.b2.| <= |.(b1 + b2).|
proof end;

theorem Th145: :: COMPLEX1:145
for b1, b2 being complex number holds |.b1.| - |.b2.| <= |.(b1 - b2).|
proof end;

theorem Th146: :: COMPLEX1:146
for b1, b2 being complex number holds |.(b1 - b2).| = |.(b2 - b1).|
proof end;

theorem Th147: :: COMPLEX1:147
for b1, b2 being complex number holds
( |.(b1 - b2).| = 0 iff b1 = b2 )
proof end;

theorem Th148: :: COMPLEX1:148
for b1, b2 being complex number holds
( b1 <> b2 iff 0 < |.(b1 - b2).| )
proof end;

theorem Th149: :: COMPLEX1:149
for b1, b2, b3 being complex number holds |.(b2 - b3).| <= |.(b2 - b1).| + |.(b1 - b3).|
proof end;

Lemma71: for b1, b2 being real number holds
( ( - b2 <= b1 & b1 <= b2 ) iff |.b1.| <= b2 )
proof end;

theorem Th150: :: COMPLEX1:150
for b1, b2 being complex number holds |.(|.b1.| - |.b2.|).| <= |.(b1 - b2).|
proof end;

theorem Th151: :: COMPLEX1:151
for b1, b2 being complex number holds |.(b1 * b2).| = |.b1.| * |.b2.|
proof end;

theorem Th152: :: COMPLEX1:152
for b1 being complex number holds |.(b1 " ).| = |.b1.| "
proof end;

theorem Th153: :: COMPLEX1:153
for b1, b2 being complex number holds |.b1.| / |.b2.| = |.(b1 / b2).|
proof end;

theorem Th154: :: COMPLEX1:154
for b1 being complex number holds |.(b1 * b1).| = ((Re b1) ^2 ) + ((Im b1) ^2 )
proof end;

theorem Th155: :: COMPLEX1:155
for b1 being complex number holds |.(b1 * b1).| = |.(b1 * (b1 *' )).|
proof end;

theorem Th156: :: COMPLEX1:156
for b1 being real number st b1 <= 0 holds
|.b1.| = - b1 by Lemma62;

theorem Th157: :: COMPLEX1:157
for b1 being real number holds
( |.b1.| = b1 or |.b1.| = - b1 )
proof end;

theorem Th158: :: COMPLEX1:158
for b1 being real number holds sqrt (b1 ^2 ) = |.b1.| by Lemma63;

theorem Th159: :: COMPLEX1:159
for b1, b2 being real number holds min b1,b2 = ((b1 + b2) - |.(b1 - b2).|) / 2
proof end;

theorem Th160: :: COMPLEX1:160
for b1, b2 being real number holds max b1,b2 = ((b1 + b2) + |.(b1 - b2).|) / 2
proof end;

theorem Th161: :: COMPLEX1:161
for b1 being real number holds |.b1.| ^2 = b1 ^2
proof end;

theorem Th162: :: COMPLEX1:162
for b1 being real number holds
( - |.b1.| <= b1 & b1 <= |.b1.| ) by Lemma65;

notation
let c1 be complex number ;
synonym absc1.| for |.c1.|;
end;

definition
let c1 be complex number ;
redefine func |. as abs c1 -> Real;
coherence
|.c1.| is Real
;
end;

theorem Th163: :: COMPLEX1:163
for b1, b2, b3, b4 being Element of REAL st b1 + (b2 * <i> ) = b3 + (b4 * <i> ) holds
( b1 = b3 & b2 = b4 )
proof end;