:: by Wenpai Chang, Yatsuka Nakamura and Piotr Rudnicki

::

:: Received May 29, 2003

:: Copyright (c) 2003-2012 Association of Mizar Users

begin

theorem Th1: :: COMPLEX2:1

for a, b being real number st b > 0 holds

ex r being real number st

( r = (b * (- [\(a / b)/])) + a & 0 <= r & r < b )

ex r being real number st

( r = (b * (- [\(a / b)/])) + a & 0 <= r & r < b )

proof end;

theorem Th2: :: COMPLEX2:2

for a, b, c being real number st a > 0 & b >= 0 & c >= 0 & b < a & c < a holds

for i being Integer st b = c + (a * i) holds

b = c

for i being Integer st b = c + (a * i) holds

b = c

proof end;

theorem Th3: :: COMPLEX2:3

for a, b being real number holds

( sin (a - b) = ((sin a) * (cos b)) - ((cos a) * (sin b)) & cos (a - b) = ((cos a) * (cos b)) + ((sin a) * (sin b)) )

( sin (a - b) = ((sin a) * (cos b)) - ((cos a) * (sin b)) & cos (a - b) = ((cos a) * (cos b)) + ((sin a) * (sin b)) )

proof end;

theorem Th6: :: COMPLEX2:6

for a, b being real number st a in ].0,(PI / 2).[ & b in ].0,(PI / 2).[ holds

( a < b iff sin a < sin b )

( a < b iff sin a < sin b )

proof end;

theorem Th7: :: COMPLEX2:7

for a, b being real number st a in ].(PI / 2),PI.[ & b in ].(PI / 2),PI.[ holds

( a < b iff sin a > sin b )

( a < b iff sin a > sin b )

proof end;

theorem Th11: :: COMPLEX2:11

for a, b being real number st 0 <= a & a < 2 * PI & 0 <= b & b < 2 * PI & sin a = sin b & cos a = cos b holds

a = b

a = b

proof end;

begin

:: ALL these to be changed (mainly deleted) after the change in COMPTRIG

Lm1: Arg 0 = 0

by COMPTRIG:35;

theorem Th13: :: COMPLEX2:13

for z being complex number st z <> 0 holds

( ( Arg z < PI implies Arg (- z) = (Arg z) + PI ) & ( Arg z >= PI implies Arg (- z) = (Arg z) - PI ) )

( ( Arg z < PI implies Arg (- z) = (Arg z) + PI ) & ( Arg z >= PI implies Arg (- z) = (Arg z) - PI ) )

proof end;

theorem Th17: :: COMPLEX2:17

for x, y being complex number st ( x <> y or x - y <> 0 ) holds

( Arg (x - y) < PI iff Arg (y - x) >= PI )

( Arg (x - y) < PI iff Arg (y - x) >= PI )

proof end;

theorem Th25: :: COMPLEX2:25

for z being Element of COMPLEX st z <> 0 holds

( cos (Arg (- z)) = - (cos (Arg z)) & sin (Arg (- z)) = - (sin (Arg z)) )

( cos (Arg (- z)) = - (cos (Arg z)) & sin (Arg (- z)) = - (sin (Arg z)) )

proof end;

theorem Th26: :: COMPLEX2:26

for a being complex number st a <> 0 holds

( cos (Arg a) = (Re a) / |.a.| & sin (Arg a) = (Im a) / |.a.| )

( cos (Arg a) = (Re a) / |.a.| & sin (Arg a) = (Im a) / |.a.| )

proof end;

begin

definition

let x, y be complex number ;

correctness

coherence

x * (y *') is Element of COMPLEX ;

by XCMPLX_0:def 2;

end;
correctness

coherence

x * (y *') is Element of COMPLEX ;

by XCMPLX_0:def 2;

:: deftheorem defines .|. COMPLEX2:def 1 :

for x, y being complex number holds x .|. y = x * (y *');

for x, y being complex number holds x .|. y = x * (y *');

theorem Th29: :: COMPLEX2:29

for x, y being Element of COMPLEX holds x .|. y = (((Re x) * (Re y)) + ((Im x) * (Im y))) + (((- ((Re x) * (Im y))) + ((Im x) * (Re y))) * <i>)

proof end;

theorem Th30: :: COMPLEX2:30

for z being Element of COMPLEX holds

( z .|. z = ((Re z) * (Re z)) + ((Im z) * (Im z)) & z .|. z = ((Re z) ^2) + ((Im z) ^2) )

( z .|. z = ((Re z) * (Re z)) + ((Im z) * (Im z)) & z .|. z = ((Re z) ^2) + ((Im z) ^2) )

proof end;

theorem :: COMPLEX2:35

theorem :: COMPLEX2:40

theorem :: COMPLEX2:41

for x, a, y, b, z being Element of COMPLEX holds x .|. ((a * y) + (b * z)) = ((a *') * (x .|. y)) + ((b *') * (x .|. z))

proof end;

theorem :: COMPLEX2:46

theorem :: COMPLEX2:48

for x, y being Element of COMPLEX holds (x + y) .|. (x + y) = (((x .|. x) + (x .|. y)) + (y .|. x)) + (y .|. y)

proof end;

theorem Th49: :: COMPLEX2:49

for x, y being Element of COMPLEX holds (x - y) .|. (x - y) = (((x .|. x) - (x .|. y)) - (y .|. x)) + (y .|. y)

proof end;

Lm2: for z being Element of COMPLEX holds |.z.| ^2 = ((Re z) ^2) + ((Im z) ^2)

proof end;

theorem Th50: :: COMPLEX2:50

for x, y being Element of COMPLEX holds

( Re (x .|. y) = 0 iff ( Im (x .|. y) = |.x.| * |.y.| or Im (x .|. y) = - (|.x.| * |.y.|) ) )

( Re (x .|. y) = 0 iff ( Im (x .|. y) = |.x.| * |.y.| or Im (x .|. y) = - (|.x.| * |.y.|) ) )

proof end;

begin

definition

let a be complex number ;

let r be Real;

coherence

(|.a.| * (cos (r + (Arg a)))) + ((|.a.| * (sin (r + (Arg a)))) * <i>) is Element of COMPLEX ;

by XCMPLX_0:def 2;

end;
let r be Real;

func Rotate (a,r) -> Element of COMPLEX equals :: COMPLEX2:def 2

(|.a.| * (cos (r + (Arg a)))) + ((|.a.| * (sin (r + (Arg a)))) * <i>);

correctness (|.a.| * (cos (r + (Arg a)))) + ((|.a.| * (sin (r + (Arg a)))) * <i>);

coherence

(|.a.| * (cos (r + (Arg a)))) + ((|.a.| * (sin (r + (Arg a)))) * <i>) is Element of COMPLEX ;

by XCMPLX_0:def 2;

:: deftheorem defines Rotate COMPLEX2:def 2 :

for a being complex number

for r being Real holds Rotate (a,r) = (|.a.| * (cos (r + (Arg a)))) + ((|.a.| * (sin (r + (Arg a)))) * <i>);

for a being complex number

for r being Real holds Rotate (a,r) = (|.a.| * (cos (r + (Arg a)))) + ((|.a.| * (sin (r + (Arg a)))) * <i>);

theorem Th54: :: COMPLEX2:54

for r being Real

for a being complex number st a <> 0 holds

ex i being Integer st Arg (Rotate (a,r)) = ((2 * PI) * i) + (r + (Arg a))

for a being complex number st a <> 0 holds

ex i being Integer st Arg (Rotate (a,r)) = ((2 * PI) * i) + (r + (Arg a))

proof end;

theorem :: COMPLEX2:55

theorem Th56: :: COMPLEX2:56

for a being Element of COMPLEX

for r being Real holds

( Re (Rotate (a,r)) = ((Re a) * (cos r)) - ((Im a) * (sin r)) & Im (Rotate (a,r)) = ((Re a) * (sin r)) + ((Im a) * (cos r)) )

for r being Real holds

( Re (Rotate (a,r)) = ((Re a) * (cos r)) - ((Im a) * (sin r)) & Im (Rotate (a,r)) = ((Re a) * (sin r)) + ((Im a) * (cos r)) )

proof end;

theorem Th57: :: COMPLEX2:57

for a, b being Element of COMPLEX

for r being Real holds Rotate ((a + b),r) = (Rotate (a,r)) + (Rotate (b,r))

for r being Real holds Rotate ((a + b),r) = (Rotate (a,r)) + (Rotate (b,r))

proof end;

theorem Th59: :: COMPLEX2:59

for a, b being Element of COMPLEX

for r being Real holds Rotate ((a - b),r) = (Rotate (a,r)) - (Rotate (b,r))

for r being Real holds Rotate ((a - b),r) = (Rotate (a,r)) - (Rotate (b,r))

proof end;

begin

definition

let a, b be complex number ;

coherence

( ( ( Arg a = 0 or b <> 0 ) implies Arg (Rotate (b,(- (Arg a)))) is Real ) & ( Arg a = 0 or b <> 0 or (2 * PI) - (Arg a) is Real ) );

consistency

for b_{1} being Real holds verum;

;

end;
func angle (a,b) -> Real equals :Def3: :: COMPLEX2:def 3

Arg (Rotate (b,(- (Arg a)))) if ( Arg a = 0 or b <> 0 )

otherwise (2 * PI) - (Arg a);

correctness Arg (Rotate (b,(- (Arg a)))) if ( Arg a = 0 or b <> 0 )

otherwise (2 * PI) - (Arg a);

coherence

( ( ( Arg a = 0 or b <> 0 ) implies Arg (Rotate (b,(- (Arg a)))) is Real ) & ( Arg a = 0 or b <> 0 or (2 * PI) - (Arg a) is Real ) );

consistency

for b

;

:: deftheorem Def3 defines angle COMPLEX2:def 3 :

for a, b being complex number holds

( ( ( Arg a = 0 or b <> 0 ) implies angle (a,b) = Arg (Rotate (b,(- (Arg a)))) ) & ( Arg a = 0 or b <> 0 or angle (a,b) = (2 * PI) - (Arg a) ) );

for a, b being complex number holds

( ( ( Arg a = 0 or b <> 0 ) implies angle (a,b) = Arg (Rotate (b,(- (Arg a)))) ) & ( Arg a = 0 or b <> 0 or angle (a,b) = (2 * PI) - (Arg a) ) );

theorem Th62: :: COMPLEX2:62

for r being Real

for a, b being complex number st Arg a = Arg b & a <> 0 & b <> 0 holds

Arg (Rotate (a,r)) = Arg (Rotate (b,r))

for a, b being complex number st Arg a = Arg b & a <> 0 & b <> 0 holds

Arg (Rotate (a,r)) = Arg (Rotate (b,r))

proof end;

theorem Th63: :: COMPLEX2:63

for a, b being Element of COMPLEX

for r being Real st r > 0 holds

angle (a,b) = angle ((a * r),(b * r))

for r being Real st r > 0 holds

angle (a,b) = angle ((a * r),(b * r))

proof end;

theorem Th65: :: COMPLEX2:65

for a, b being Element of COMPLEX

for r being Real st a <> 0 & b <> 0 holds

angle (a,b) = angle ((Rotate (a,r)),(Rotate (b,r)))

for r being Real st a <> 0 & b <> 0 holds

angle (a,b) = angle ((Rotate (a,r)),(Rotate (b,r)))

proof end;

theorem :: COMPLEX2:66

for a, b being Element of COMPLEX

for r being Real st r < 0 & a <> 0 & b <> 0 holds

angle (a,b) = angle ((a * r),(b * r))

for r being Real st r < 0 & a <> 0 & b <> 0 holds

angle (a,b) = angle ((a * r),(b * r))

proof end;

theorem Th69: :: COMPLEX2:69

for a, b being Element of COMPLEX st a <> 0 & b <> 0 holds

( cos (angle (a,b)) = (Re (a .|. b)) / (|.a.| * |.b.|) & sin (angle (a,b)) = - ((Im (a .|. b)) / (|.a.| * |.b.|)) )

( cos (angle (a,b)) = (Re (a .|. b)) / (|.a.| * |.b.|) & sin (angle (a,b)) = - ((Im (a .|. b)) / (|.a.| * |.b.|)) )

proof end;

definition

let x, y, z be complex number ;

coherence

( ( (Arg (z - y)) - (Arg (x - y)) >= 0 implies (Arg (z - y)) - (Arg (x - y)) is real number ) & ( not (Arg (z - y)) - (Arg (x - y)) >= 0 implies (2 * PI) + ((Arg (z - y)) - (Arg (x - y))) is real number ) );

consistency

for b_{1} being real number holds verum;

;

end;
func angle (x,y,z) -> real number equals :Def4: :: COMPLEX2:def 4

(Arg (z - y)) - (Arg (x - y)) if (Arg (z - y)) - (Arg (x - y)) >= 0

otherwise (2 * PI) + ((Arg (z - y)) - (Arg (x - y)));

correctness (Arg (z - y)) - (Arg (x - y)) if (Arg (z - y)) - (Arg (x - y)) >= 0

otherwise (2 * PI) + ((Arg (z - y)) - (Arg (x - y)));

coherence

( ( (Arg (z - y)) - (Arg (x - y)) >= 0 implies (Arg (z - y)) - (Arg (x - y)) is real number ) & ( not (Arg (z - y)) - (Arg (x - y)) >= 0 implies (2 * PI) + ((Arg (z - y)) - (Arg (x - y))) is real number ) );

consistency

for b

;

:: deftheorem Def4 defines angle COMPLEX2:def 4 :

for x, y, z being complex number holds

( ( (Arg (z - y)) - (Arg (x - y)) >= 0 implies angle (x,y,z) = (Arg (z - y)) - (Arg (x - y)) ) & ( not (Arg (z - y)) - (Arg (x - y)) >= 0 implies angle (x,y,z) = (2 * PI) + ((Arg (z - y)) - (Arg (x - y))) ) );

for x, y, z being complex number holds

( ( (Arg (z - y)) - (Arg (x - y)) >= 0 implies angle (x,y,z) = (Arg (z - y)) - (Arg (x - y)) ) & ( not (Arg (z - y)) - (Arg (x - y)) >= 0 implies angle (x,y,z) = (2 * PI) + ((Arg (z - y)) - (Arg (x - y))) ) );

theorem Th74: :: COMPLEX2:74

for x, y, z being Element of COMPLEX st angle (x,y,z) = 0 holds

( Arg (x - y) = Arg (z - y) & angle (z,y,x) = 0 )

( Arg (x - y) = Arg (z - y) & angle (z,y,x) = 0 )

proof end;

theorem Th75: :: COMPLEX2:75

for a, b being Element of COMPLEX st a <> 0 & b <> 0 holds

( Re (a .|. b) = 0 iff ( angle (a,0,b) = PI / 2 or angle (a,0,b) = (3 / 2) * PI ) )

( Re (a .|. b) = 0 iff ( angle (a,0,b) = PI / 2 or angle (a,0,b) = (3 / 2) * PI ) )

proof end;

theorem :: COMPLEX2:76

for a, b being Element of COMPLEX st a <> 0 & b <> 0 holds

( ( ( not Im (a .|. b) = |.a.| * |.b.| & not Im (a .|. b) = - (|.a.| * |.b.|) ) or angle (a,0,b) = PI / 2 or angle (a,0,b) = (3 / 2) * PI ) & ( ( not angle (a,0,b) = PI / 2 & not angle (a,0,b) = (3 / 2) * PI ) or Im (a .|. b) = |.a.| * |.b.| or Im (a .|. b) = - (|.a.| * |.b.|) ) )

( ( ( not Im (a .|. b) = |.a.| * |.b.| & not Im (a .|. b) = - (|.a.| * |.b.|) ) or angle (a,0,b) = PI / 2 or angle (a,0,b) = (3 / 2) * PI ) & ( ( not angle (a,0,b) = PI / 2 & not angle (a,0,b) = (3 / 2) * PI ) or Im (a .|. b) = |.a.| * |.b.| or Im (a .|. b) = - (|.a.| * |.b.|) ) )

proof end;

Lm3: for a, b, c being Element of COMPLEX st a <> b & c <> b holds

( Re ((a - b) .|. (c - b)) = 0 iff ( angle (a,b,c) = PI / 2 or angle (a,b,c) = (3 / 2) * PI ) )

proof end;

theorem :: COMPLEX2:77

for x, y, z being Element of COMPLEX st x <> y & z <> y & ( angle (x,y,z) = PI / 2 or angle (x,y,z) = (3 / 2) * PI ) holds

(|.(x - y).| ^2) + (|.(z - y).| ^2) = |.(x - z).| ^2

(|.(x - y).| ^2) + (|.(z - y).| ^2) = |.(x - z).| ^2

proof end;

theorem Th78: :: COMPLEX2:78

for a, b, c being Element of COMPLEX

for r being Real st a <> b & b <> c holds

angle (a,b,c) = angle ((Rotate (a,r)),(Rotate (b,r)),(Rotate (c,r)))

for r being Real st a <> b & b <> c holds

angle (a,b,c) = angle ((Rotate (a,r)),(Rotate (b,r)),(Rotate (c,r)))

proof end;

Lm4: for x, y, z being Element of COMPLEX st angle (x,y,z) <> 0 holds

angle (z,y,x) = (2 * PI) - (angle (x,y,z))

proof end;

theorem Th80: :: COMPLEX2:80

for a, b, c being Element of COMPLEX holds

( angle (a,b,c) <> 0 iff (angle (a,b,c)) + (angle (c,b,a)) = 2 * PI )

( angle (a,b,c) <> 0 iff (angle (a,b,c)) + (angle (c,b,a)) = 2 * PI )

proof end;

theorem Th83: :: COMPLEX2:83

for a, b, c being Element of COMPLEX st a <> b & a <> c & b <> c & not angle (a,b,c) <> 0 & not angle (b,c,a) <> 0 holds

angle (c,a,b) <> 0

angle (c,a,b) <> 0

proof end;

Lm5: for a, b being Element of COMPLEX st Im a = 0 & Re a > 0 & 0 < Arg b & Arg b < PI holds

( ((angle (a,0c,b)) + (angle (0c,b,a))) + (angle (b,a,0c)) = PI & 0 < angle (0c,b,a) & 0 < angle (b,a,0c) )

proof end;

theorem Th84: :: COMPLEX2:84

for a, b, c being Element of COMPLEX st a <> b & b <> c & 0 < angle (a,b,c) & angle (a,b,c) < PI holds

( ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = PI & 0 < angle (b,c,a) & 0 < angle (c,a,b) )

( ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = PI & 0 < angle (b,c,a) & 0 < angle (c,a,b) )

proof end;

theorem Th85: :: COMPLEX2:85

for a, b, c being Element of COMPLEX st a <> b & b <> c & angle (a,b,c) > PI holds

( ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = 5 * PI & angle (b,c,a) > PI & angle (c,a,b) > PI )

( ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = 5 * PI & angle (b,c,a) > PI & angle (c,a,b) > PI )

proof end;

Lm6: for a, b being Element of COMPLEX st Im a = 0 & Re a > 0 & Arg b = PI holds

( ((angle (a,0,b)) + (angle (0,b,a))) + (angle (b,a,0)) = PI & 0 = angle (0,b,a) & 0 = angle (b,a,0) )

proof end;

theorem Th86: :: COMPLEX2:86

for a, b, c being Element of COMPLEX st a <> b & b <> c & angle (a,b,c) = PI holds

( angle (b,c,a) = 0 & angle (c,a,b) = 0 )

( angle (b,c,a) = 0 & angle (c,a,b) = 0 )

proof end;

theorem Th87: :: COMPLEX2:87

for a, b, c being Element of COMPLEX st a <> b & a <> c & b <> c & angle (a,b,c) = 0 & not ( angle (b,c,a) = 0 & angle (c,a,b) = PI ) holds

( angle (b,c,a) = PI & angle (c,a,b) = 0 )

( angle (b,c,a) = PI & angle (c,a,b) = 0 )

proof end;

theorem :: COMPLEX2:88

for a, b, c being Element of COMPLEX holds

( ( ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = PI or ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = 5 * PI ) iff ( a <> b & a <> c & b <> c ) )

( ( ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = PI or ((angle (a,b,c)) + (angle (b,c,a))) + (angle (c,a,b)) = 5 * PI ) iff ( a <> b & a <> c & b <> c ) )

proof end;