:: COMPLSP2 semantic presentation

definition
let c1 be FinSequence of COMPLEX ;
func c1 *' -> FinSequence of COMPLEX means :Def1: :: COMPLSP2:def 1
( len a2 = len a1 & ( for b1 being Nat st 1 <= b1 & b1 <= len a1 holds
a2 . b1 = (a1 . b1) *' ) );
existence
ex b1 being FinSequence of COMPLEX st
( len b1 = len c1 & ( for b2 being Nat st 1 <= b2 & b2 <= len c1 holds
b1 . b2 = (c1 . b2) *' ) )
proof end;
uniqueness
for b1, b2 being FinSequence of COMPLEX st len b1 = len c1 & ( for b3 being Nat st 1 <= b3 & b3 <= len c1 holds
b1 . b3 = (c1 . b3) *' ) & len b2 = len c1 & ( for b3 being Nat st 1 <= b3 & b3 <= len c1 holds
b2 . b3 = (c1 . b3) *' ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines *' COMPLSP2:def 1 :
for b1, b2 being FinSequence of COMPLEX holds
( b2 = b1 *' iff ( len b2 = len b1 & ( for b3 being Nat st 1 <= b3 & b3 <= len b1 holds
b2 . b3 = (b1 . b3) *' ) ) );

Lemma2: for b1 being FinSequence of COMPLEX
for b2 being Element of COMPLEX holds b2 * b1 = (multcomplex [;] b2,(id COMPLEX )) * b1
proof end;

theorem Th1: :: COMPLSP2:1
for b1 being Nat
for b2, b3 being FinSequence of COMPLEX st b1 in dom (b2 + b3) holds
(b2 + b3) . b1 = (b2 . b1) + (b3 . b1)
proof end;

theorem Th2: :: COMPLSP2:2
for b1 being Nat
for b2, b3 being FinSequence of COMPLEX st b1 in dom (b2 - b3) holds
(b2 - b3) . b1 = (b2 . b1) - (b3 . b1)
proof end;

definition
let c1 be Nat;
let c2, c3 be Element of c1 -tuples_on COMPLEX ;
redefine func - as c2 - c3 -> Element of a1 -tuples_on COMPLEX ;
coherence
c2 - c3 is Element of c1 -tuples_on COMPLEX
proof end;
end;

definition
let c1 be Nat;
let c2, c3 be Element of c1 -tuples_on COMPLEX ;
redefine func + as c2 + c3 -> Element of a1 -tuples_on COMPLEX ;
coherence
c2 + c3 is Element of c1 -tuples_on COMPLEX
proof end;
end;

definition
let c1 be Nat;
let c2 be complex number ;
let c3 be Element of c1 -tuples_on COMPLEX ;
redefine func * as c2 * c3 -> Element of a1 -tuples_on COMPLEX ;
coherence
c2 * c3 is Element of c1 -tuples_on COMPLEX
proof end;
end;

theorem Th3: :: COMPLSP2:3
for b1 being complex number
for b2 being FinSequence of COMPLEX holds len (b1 * b2) = len b2
proof end;

theorem Th4: :: COMPLSP2:4
for b1 being FinSequence of COMPLEX holds dom b1 = dom (- b1)
proof end;

theorem Th5: :: COMPLSP2:5
for b1 being FinSequence of COMPLEX holds len (- b1) = len b1
proof end;

theorem Th6: :: COMPLSP2:6
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
len (b1 + b2) = len b1
proof end;

theorem Th7: :: COMPLSP2:7
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
len (b1 - b2) = len b1
proof end;

theorem Th8: :: COMPLSP2:8
for b1 being FinSequence of COMPLEX holds b1 is Element of COMPLEX (len b1)
proof end;

theorem Th9: :: COMPLSP2:9
for b1 being Nat
for b2, b3 being Element of b1 -tuples_on COMPLEX holds b2 - b3 = b2 + (- b3)
proof end;

theorem Th10: :: COMPLSP2:10
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
b1 - b2 = b1 + (- b2)
proof end;

theorem Th11: :: COMPLSP2:11
for b1 being Nat
for b2 being Element of b1 -tuples_on COMPLEX holds (- 1) * b2 = - b2
proof end;

theorem Th12: :: COMPLSP2:12
for b1 being FinSequence of COMPLEX holds (- 1) * b1 = - b1
proof end;

theorem Th13: :: COMPLSP2:13
for b1 being Nat
for b2 being FinSequence of COMPLEX holds (- b2) . b1 = - (b2 . b1)
proof end;

definition
let c1 be Nat;
let c2 be Element of c1 -tuples_on COMPLEX ;
redefine func - as - c2 -> Element of a1 -tuples_on COMPLEX ;
coherence
- c2 is Element of c1 -tuples_on COMPLEX
proof end;
end;

theorem Th14: :: COMPLSP2:14
for b1, b2 being Nat
for b3 being Element of COMPLEX
for b4 being Element of b1 -tuples_on COMPLEX st b3 = b4 . b2 holds
(- b4) . b2 = - b3 by Th13;

theorem Th15: :: COMPLSP2:15
for b1 being FinSequence of COMPLEX
for b2 being complex number holds dom (b2 * b1) = dom b1
proof end;

theorem Th16: :: COMPLSP2:16
for b1 being Nat
for b2 being FinSequence of COMPLEX
for b3 being complex number holds (b3 * b2) . b1 = b3 * (b2 . b1)
proof end;

theorem Th17: :: COMPLSP2:17
for b1 being FinSequence of COMPLEX
for b2 being complex number holds (b2 * b1) *' = (b2 *' ) * (b1 *' )
proof end;

theorem Th18: :: COMPLSP2:18
for b1, b2 being Nat
for b3, b4 being Element of b1 -tuples_on COMPLEX holds (b3 + b4) . b2 = (b3 . b2) + (b4 . b2)
proof end;

theorem Th19: :: COMPLSP2:19
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
(b1 + b2) *' = (b1 *' ) + (b2 *' )
proof end;

theorem Th20: :: COMPLSP2:20
for b1, b2 being Nat
for b3, b4 being Element of b1 -tuples_on COMPLEX holds (b3 - b4) . b2 = (b3 . b2) - (b4 . b2)
proof end;

theorem Th21: :: COMPLSP2:21
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
(b1 - b2) *' = (b1 *' ) - (b2 *' )
proof end;

theorem Th22: :: COMPLSP2:22
for b1 being FinSequence of COMPLEX holds (b1 *' ) *' = b1
proof end;

theorem Th23: :: COMPLSP2:23
for b1 being FinSequence of COMPLEX holds (- b1) *' = - (b1 *' )
proof end;

theorem Th24: :: COMPLSP2:24
for b1 being complex number holds b1 + (b1 *' ) = 2 * (Re b1)
proof end;

theorem Th25: :: COMPLSP2:25
for b1 being Nat
for b2, b3 being FinSequence of COMPLEX st len b2 = len b3 holds
(b2 - b3) . b1 = (b2 . b1) - (b3 . b1)
proof end;

theorem Th26: :: COMPLSP2:26
for b1 being Nat
for b2, b3 being FinSequence of COMPLEX st len b2 = len b3 holds
(b2 + b3) . b1 = (b2 . b1) + (b3 . b1)
proof end;

definition
let c1 be FinSequence of COMPLEX ;
func Re c1 -> FinSequence of REAL equals :: COMPLSP2:def 2
(1 / 2) * (a1 + (a1 *' ));
coherence
(1 / 2) * (c1 + (c1 *' )) is FinSequence of REAL
proof end;
end;

:: deftheorem Def2 defines Re COMPLSP2:def 2 :
for b1 being FinSequence of COMPLEX holds Re b1 = (1 / 2) * (b1 + (b1 *' ));

theorem Th27: :: COMPLSP2:27
for b1 being complex number holds b1 - (b1 *' ) = (2 * (Im b1)) * <i>
proof end;

definition
let c1 be FinSequence of COMPLEX ;
func Im c1 -> FinSequence of REAL equals :: COMPLSP2:def 3
(- ((1 / 2) * <i> )) * (a1 - (a1 *' ));
coherence
(- ((1 / 2) * <i> )) * (c1 - (c1 *' )) is FinSequence of REAL
proof end;
end;

:: deftheorem Def3 defines Im COMPLSP2:def 3 :
for b1 being FinSequence of COMPLEX holds Im b1 = (- ((1 / 2) * <i> )) * (b1 - (b1 *' ));

definition
let c1, c2 be FinSequence of COMPLEX ;
func |(c1,c2)| -> Element of COMPLEX equals :: COMPLSP2:def 4
((|((Re a1),(Re a2))| - (<i> * |((Re a1),(Im a2))|)) + (<i> * |((Im a1),(Re a2))|)) + |((Im a1),(Im a2))|;
coherence
((|((Re c1),(Re c2))| - (<i> * |((Re c1),(Im c2))|)) + (<i> * |((Im c1),(Re c2))|)) + |((Im c1),(Im c2))| is Element of COMPLEX
by XCMPLX_0:def 2;
end;

:: deftheorem Def4 defines |( COMPLSP2:def 4 :
for b1, b2 being FinSequence of COMPLEX holds |(b1,b2)| = ((|((Re b1),(Re b2))| - (<i> * |((Re b1),(Im b2))|)) + (<i> * |((Im b1),(Re b2))|)) + |((Im b1),(Im b2))|;

theorem Th28: :: COMPLSP2:28
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
b1 + (b2 + b3) = (b1 + b2) + b3
proof end;

theorem Th29: :: COMPLSP2:29
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
b1 + b2 = b2 + b1
proof end;

theorem Th30: :: COMPLSP2:30
for b1 being complex number
for b2, b3 being FinSequence of COMPLEX st len b2 = len b3 holds
b1 * (b2 + b3) = (b1 * b2) + (b1 * b3)
proof end;

theorem Th31: :: COMPLSP2:31
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
b1 - b2 = b1 + (- b2)
proof end;

definition
let c1 be Nat;
let c2 be Element of COMPLEX ;
redefine func |-> as c1 |-> c2 -> Element of a1 -tuples_on COMPLEX ;
coherence
c1 |-> c2 is Element of c1 -tuples_on COMPLEX
by FINSEQ_2:132;
end;

theorem Th32: :: COMPLSP2:32
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 & b1 + b2 = 0c (len b1) holds
( b1 = - b2 & b2 = - b1 )
proof end;

theorem Th33: :: COMPLSP2:33
for b1 being FinSequence of COMPLEX holds b1 + (0c (len b1)) = b1
proof end;

theorem Th34: :: COMPLSP2:34
for b1 being FinSequence of COMPLEX holds b1 + (- b1) = 0c (len b1)
proof end;

theorem Th35: :: COMPLSP2:35
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
- (b1 + b2) = (- b1) + (- b2)
proof end;

theorem Th36: :: COMPLSP2:36
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
(b1 - b2) - b3 = b1 - (b2 + b3)
proof end;

theorem Th37: :: COMPLSP2:37
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
b1 + (b2 - b3) = (b1 + b2) - b3
proof end;

theorem Th38: :: COMPLSP2:38
for b1 being FinSequence of COMPLEX holds - (- b1) = b1
proof end;

theorem Th39: :: COMPLSP2:39
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
- (b1 - b2) = (- b1) + b2
proof end;

theorem Th40: :: COMPLSP2:40
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
b1 - (b2 - b3) = (b1 - b2) + b3
proof end;

theorem Th41: :: COMPLSP2:41
for b1 being FinSequence of COMPLEX
for b2 being complex number holds b2 * (0c (len b1)) = 0c (len b1)
proof end;

theorem Th42: :: COMPLSP2:42
for b1 being FinSequence of COMPLEX
for b2 being complex number holds - (b2 * b1) = b2 * (- b1)
proof end;

theorem Th43: :: COMPLSP2:43
for b1 being complex number
for b2, b3 being FinSequence of COMPLEX st len b2 = len b3 holds
b1 * (b2 - b3) = (b1 * b2) - (b1 * b3)
proof end;

theorem Th44: :: COMPLSP2:44
for b1, b2 being Element of COMPLEX
for b3, b4 being Real st b1 = b3 & b2 = b4 holds
addcomplex . b1,b2 = addreal . b3,b4
proof end;

theorem Th45: :: COMPLSP2:45
for b1 being Function of [:COMPLEX ,COMPLEX :], COMPLEX
for b2 being Function of [:REAL ,REAL :], REAL
for b3, b4 being FinSequence of COMPLEX
for b5, b6 being FinSequence of REAL st b3 = b5 & b4 = b6 & len b3 = len b6 & ( for b7 being Nat st b7 in dom b3 holds
b1 . (b3 . b7),(b4 . b7) = b2 . (b5 . b7),(b6 . b7) ) holds
b1 .: b3,b4 = b2 .: b5,b6
proof end;

Lemma44: 0 = 0c
;

definition
let c1 be FinSequence of REAL ;
let c2 be set ;
redefine func . as c1 . c2 -> Element of REAL ;
coherence
c1 . c2 is Element of REAL
proof end;
end;

theorem Th46: :: COMPLSP2:46
for b1, b2 being FinSequence of COMPLEX
for b3, b4 being FinSequence of REAL st b1 = b3 & b2 = b4 & len b1 = len b4 holds
addcomplex .: b1,b2 = addreal .: b3,b4
proof end;

theorem Th47: :: COMPLSP2:47
for b1, b2 being FinSequence of COMPLEX
for b3, b4 being FinSequence of REAL st b1 = b3 & b2 = b4 & len b1 = len b4 holds
b1 + b2 = b3 + b4
proof end;

theorem Th48: :: COMPLSP2:48
for b1 being FinSequence of COMPLEX holds
( len (Re b1) = len b1 & len (Im b1) = len b1 )
proof end;

theorem Th49: :: COMPLSP2:49
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
( Re (b1 + b2) = (Re b1) + (Re b2) & Im (b1 + b2) = (Im b1) + (Im b2) )
proof end;

theorem Th50: :: COMPLSP2:50
for b1, b2 being FinSequence of COMPLEX
for b3, b4 being FinSequence of REAL st b1 = b3 & b2 = b4 & len b1 = len b4 holds
diffcomplex .: b1,b2 = diffreal .: b3,b4
proof end;

theorem Th51: :: COMPLSP2:51
for b1, b2 being FinSequence of COMPLEX
for b3, b4 being FinSequence of REAL st b1 = b3 & b2 = b4 & len b1 = len b4 holds
b1 - b2 = b3 - b4
proof end;

theorem Th52: :: COMPLSP2:52
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
( Re (b1 - b2) = (Re b1) - (Re b2) & Im (b1 - b2) = (Im b1) - (Im b2) )
proof end;

theorem Th53: :: COMPLSP2:53
for b1 being FinSequence of COMPLEX
for b2, b3 being complex number holds b2 * (b3 * b1) = (b2 * b3) * b1
proof end;

Lemma53: for b1 being FinSequence of COMPLEX holds - (0c (len b1)) = 0c (len b1)
proof end;

theorem Th54: :: COMPLSP2:54
for b1 being FinSequence of COMPLEX
for b2 being complex number holds (- b2) * b1 = - (b2 * b1)
proof end;

theorem Th55: :: COMPLSP2:55
for b1 being Function of COMPLEX , COMPLEX
for b2 being Function of REAL , REAL
for b3 being FinSequence of COMPLEX
for b4 being FinSequence of REAL st len b3 = len b4 & ( for b5 being Nat st b5 in dom b3 holds
b1 . (b3 . b5) = b2 . (b4 . b5) ) holds
b1 * b3 = b2 * b4
proof end;

theorem Th56: :: COMPLSP2:56
for b1 being FinSequence of COMPLEX
for b2 being FinSequence of REAL st b1 = b2 & len b1 = len b2 holds
compcomplex * b1 = compreal * b2
proof end;

theorem Th57: :: COMPLSP2:57
for b1 being FinSequence of COMPLEX
for b2 being FinSequence of REAL st b1 = b2 & len b1 = len b2 holds
- b1 = - b2
proof end;

theorem Th58: :: COMPLSP2:58
for b1 being FinSequence of COMPLEX holds
( Re (<i> * b1) = - (Im b1) & Im (<i> * b1) = Re b1 )
proof end;

theorem Th59: :: COMPLSP2:59
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|((<i> * b1),b2)| = <i> * |(b1,b2)|
proof end;

theorem Th60: :: COMPLSP2:60
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|(b1,(<i> * b2))| = - (<i> * |(b1,b2)|)
proof end;

theorem Th61: :: COMPLSP2:61
for b1 being Element of COMPLEX
for b2 being FinSequence of COMPLEX
for b3 being Element of REAL
for b4 being FinSequence of REAL st b1 = b3 & b2 = b4 & len b2 = len b4 holds
(b1 multcomplex ) * b2 = (b3 multreal ) * b4
proof end;

theorem Th62: :: COMPLSP2:62
for b1 being complex number
for b2 being FinSequence of COMPLEX
for b3 being Element of REAL
for b4 being FinSequence of REAL st b1 = b3 & b2 = b4 & len b2 = len b4 holds
b1 * b2 = b3 * b4
proof end;

theorem Th63: :: COMPLSP2:63
for b1 being FinSequence of COMPLEX
for b2, b3 being complex number holds (b2 + b3) * b1 = (b2 * b1) + (b3 * b1)
proof end;

theorem Th64: :: COMPLSP2:64
for b1 being FinSequence of COMPLEX
for b2, b3 being complex number holds (b2 - b3) * b1 = (b2 * b1) - (b3 * b1)
proof end;

theorem Th65: :: COMPLSP2:65
for b1 being Element of COMPLEX
for b2 being FinSequence of COMPLEX holds
( Re (b1 * b2) = ((Re b1) * (Re b2)) - ((Im b1) * (Im b2)) & Im (b1 * b2) = ((Im b1) * (Re b2)) + ((Re b1) * (Im b2)) )
proof end;

theorem Th66: :: COMPLSP2:66
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
|((b1 + b2),b3)| = |(b1,b3)| + |(b2,b3)|
proof end;

theorem Th67: :: COMPLSP2:67
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|((- b1),b2)| = - |(b1,b2)|
proof end;

theorem Th68: :: COMPLSP2:68
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|(b1,(- b2))| = - |(b1,b2)|
proof end;

theorem Th69: :: COMPLSP2:69
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|((- b1),(- b2))| = |(b1,b2)|
proof end;

theorem Th70: :: COMPLSP2:70
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
|((b1 - b2),b3)| = |(b1,b3)| - |(b2,b3)|
proof end;

theorem Th71: :: COMPLSP2:71
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
|(b1,(b2 + b3))| = |(b1,b2)| + |(b1,b3)|
proof end;

theorem Th72: :: COMPLSP2:72
for b1, b2, b3 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 holds
|(b1,(b2 - b3))| = |(b1,b2)| - |(b1,b3)|
proof end;

theorem Th73: :: COMPLSP2:73
for b1, b2, b3, b4 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 & len b3 = len b4 holds
|((b1 + b2),(b3 + b4))| = ((|(b1,b3)| + |(b1,b4)|) + |(b2,b3)|) + |(b2,b4)|
proof end;

theorem Th74: :: COMPLSP2:74
for b1, b2, b3, b4 being FinSequence of COMPLEX st len b1 = len b2 & len b2 = len b3 & len b3 = len b4 holds
|((b1 - b2),(b3 - b4))| = ((|(b1,b3)| - |(b1,b4)|) - |(b2,b3)|) + |(b2,b4)|
proof end;

theorem Th75: :: COMPLSP2:75
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|(b1,b2)| = |(b2,b1)| *'
proof end;

theorem Th76: :: COMPLSP2:76
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|((b1 + b2),(b1 + b2))| = (|(b1,b1)| + (2 * (Re |(b1,b2)|))) + |(b2,b2)|
proof end;

theorem Th77: :: COMPLSP2:77
for b1, b2 being FinSequence of COMPLEX st len b1 = len b2 holds
|((b1 - b2),(b1 - b2))| = (|(b1,b1)| - (2 * (Re |(b1,b2)|))) + |(b2,b2)|
proof end;

theorem Th78: :: COMPLSP2:78
for b1 being Element of COMPLEX
for b2, b3 being FinSequence of COMPLEX st len b2 = len b3 holds
|((b1 * b2),b3)| = b1 * |(b2,b3)|
proof end;

theorem Th79: :: COMPLSP2:79
for b1 being Element of COMPLEX
for b2, b3 being FinSequence of COMPLEX st len b2 = len b3 holds
|(b2,(b1 * b3))| = (b1 *' ) * |(b2,b3)|
proof end;

theorem Th80: :: COMPLSP2:80
for b1, b2 being Element of COMPLEX
for b3, b4, b5 being FinSequence of COMPLEX st len b3 = len b4 & len b4 = len b5 holds
|(((b1 * b3) + (b2 * b4)),b5)| = (b1 * |(b3,b5)|) + (b2 * |(b4,b5)|)
proof end;

theorem Th81: :: COMPLSP2:81
for b1, b2 being Element of COMPLEX
for b3, b4, b5 being FinSequence of COMPLEX st len b3 = len b4 & len b4 = len b5 holds
|(b3,((b1 * b4) + (b2 * b5)))| = ((b1 *' ) * |(b3,b4)|) + ((b2 *' ) * |(b3,b5)|)
proof end;