:: MATRIX_8 semantic presentation

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
attr a3 is Idempotent means :Def1: :: MATRIX_8:def 1
a3 * a3 = a3;
attr a3 is Nilpotent means :Def2: :: MATRIX_8:def 2
a3 * a3 = 0. a2,a1;
attr a3 is Involutory means :Def3: :: MATRIX_8:def 3
a3 * a3 = 1. a2,a1;
attr a3 is Self_Reversible means :Def4: :: MATRIX_8:def 4
( a3 is Reversible & a3 ~ = a3 );
end;

:: deftheorem Def1 defines Idempotent MATRIX_8:def 1 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Idempotent iff b3 * b3 = b3 );

:: deftheorem Def2 defines Nilpotent MATRIX_8:def 2 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Nilpotent iff b3 * b3 = 0. b2,b1 );

:: deftheorem Def3 defines Involutory MATRIX_8:def 3 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Involutory iff b3 * b3 = 1. b2,b1 );

:: deftheorem Def4 defines Self_Reversible MATRIX_8:def 4 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Self_Reversible iff ( b3 is Reversible & b3 ~ = b3 ) );

theorem Th1: :: MATRIX_8:1
for b1 being Nat
for b2 being Field holds
( 1. b2,b1 is Idempotent & 1. b2,b1 is Involutory )
proof end;

theorem Th2: :: MATRIX_8:2
for b1 being Nat
for b2 being Field st b1 > 0 holds
( 0. b2,b1 is Idempotent & 0. b2,b1 is Nilpotent )
proof end;

theorem Th3: :: MATRIX_8:3
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 = b4 @ holds
( b4 is Idempotent iff b3 is Idempotent )
proof end;

theorem Th4: :: MATRIX_8:4
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b3 is Involutory holds
b3 is Reversible
proof end;

theorem Th5: :: MATRIX_8:5
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Idempotent & b4 is Idempotent & b3 is_permutable_with b4 holds
b3 * b3 is_permutable_with b4 * b4
proof end;

theorem Th6: :: MATRIX_8:6
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 is Idempotent & b4 is Idempotent & b3 is_permutable_with b4 & b3 * b4 = 0. b2,b1 holds
b3 + b4 is Idempotent
proof end;

theorem Th7: :: MATRIX_8:7
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 is Idempotent & b4 is Idempotent & b3 * b4 = - (b4 * b3) holds
b3 + b4 is Idempotent
proof end;

theorem Th8: :: MATRIX_8:8
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Idempotent & b4 is Reversible holds
((b4 ~ ) * b3) * b4 is Idempotent
proof end;

theorem Th9: :: MATRIX_8:9
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b1 > 0 & b3 is Reversible & b3 is Idempotent holds
b3 ~ is Idempotent
proof end;

theorem Th10: :: MATRIX_8:10
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b3 is Reversible & b3 is Idempotent holds
b3 = 1. b2,b1
proof end;

theorem Th11: :: MATRIX_8:11
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Idempotent & b4 is Idempotent & b3 is_permutable_with b4 holds
b3 * b4 is Idempotent
proof end;

theorem Th12: :: MATRIX_8:12
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b1 > 0 & b3 is Idempotent & b4 is Idempotent & b3 is_permutable_with b4 & b5 = (b3 @ ) * (b4 @ ) holds
b5 is Idempotent
proof end;

theorem Th13: :: MATRIX_8:13
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Idempotent & b4 is Idempotent & b3 is Reversible holds
b3 * b4 is Idempotent
proof end;

theorem Th14: :: MATRIX_8:14
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b1 > 0 & b3 is Idempotent & b3 is Orthogonal holds
b3 is symmetrical
proof end;

theorem Th15: :: MATRIX_8:15
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Idempotent & b4 is Idempotent & b4 * b3 = 1. b2,b1 holds
b3 * b4 is Idempotent
proof end;

theorem Th16: :: MATRIX_8:16
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b3 is Idempotent & b3 is Orthogonal holds
b3 = 1. b2,b1
proof end;

theorem Th17: :: MATRIX_8:17
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 is symmetrical & b4 = b3 @ holds
b3 * b4 is symmetrical
proof end;

theorem Th18: :: MATRIX_8:18
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 is symmetrical & b4 = b3 @ holds
b4 * b3 is symmetrical
proof end;

theorem Th19: :: MATRIX_8:19
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b3 is Reversible & b3 * b4 = b3 * b5 holds
b4 = b5
proof end;

theorem Th20: :: MATRIX_8:20
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b3 is Reversible & b4 * b3 = b5 * b3 holds
b4 = b5
proof end;

theorem Th21: :: MATRIX_8:21
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 is Reversible & b4 * b3 = 0. b2,b1 holds
b4 = 0. b2,b1
proof end;

theorem Th22: :: MATRIX_8:22
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 is Reversible & b4 * b3 = 0. b2,b1 holds
b4 = 0. b2,b1
proof end;

theorem Th23: :: MATRIX_8:23
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Nilpotent & b3 is_permutable_with b4 & b1 > 0 holds
b3 * b4 is Nilpotent
proof end;

theorem Th24: :: MATRIX_8:24
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 & b3 is Nilpotent & b4 is Nilpotent & b3 is_permutable_with b4 & b3 * b4 = 0. b2,b1 holds
b3 + b4 is Nilpotent
proof end;

theorem Th25: :: MATRIX_8:25
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Nilpotent & b4 is Nilpotent & b3 * b4 = - (b4 * b3) & b1 > 0 holds
b3 + b4 is Nilpotent
proof end;

theorem Th26: :: MATRIX_8:26
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Nilpotent & b4 = b3 @ & b1 > 0 holds
b4 is Nilpotent
proof end;

theorem Th27: :: MATRIX_8:27
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b3 is Nilpotent & b3 is Idempotent holds
b3 = 0. b2,b1
proof end;

theorem Th28: :: MATRIX_8:28
for b1 being Nat
for b2 being Field st b1 > 0 holds
0. b2,b1 <> 1. b2,b1
proof end;

theorem Th29: :: MATRIX_8:29
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b1 > 0 & b3 is Nilpotent holds
not b3 is Reversible
proof end;

theorem Th30: :: MATRIX_8:30
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b3 is Self_Reversible holds
b3 is Involutory
proof end;

theorem Th31: :: MATRIX_8:31
for b1 being Nat
for b2 being Field holds 1. b2,b1 is Self_Reversible
proof end;

theorem Th32: :: MATRIX_8:32
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b3 is Self_Reversible & b3 is Idempotent holds
b3 = 1. b2,b1
proof end;

theorem Th33: :: MATRIX_8:33
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b3 is Self_Reversible & b3 is symmetrical holds
b3 is Orthogonal
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3, c4 be Matrix of c1,c2;
pred c3 is_similar_Matrix_of c4 means :Def5: :: MATRIX_8:def 5
ex b1 being Matrix of a1,a2 st
( b1 is Reversible & a3 = ((b1 ~ ) * a4) * b1 );
reflexivity
for b1 being Matrix of c1,c2ex b2 being Matrix of c1,c2 st
( b2 is Reversible & b1 = ((b2 ~ ) * b1) * b2 )
proof end;
symmetry
for b1, b2 being Matrix of c1,c2 st ex b3 being Matrix of c1,c2 st
( b3 is Reversible & b1 = ((b3 ~ ) * b2) * b3 ) holds
ex b3 being Matrix of c1,c2 st
( b3 is Reversible & b2 = ((b3 ~ ) * b1) * b3 )
proof end;
end;

:: deftheorem Def5 defines is_similar_Matrix_of MATRIX_8:def 5 :
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b3 is_similar_Matrix_of b4 iff ex b5 being Matrix of b1,b2 st
( b5 is Reversible & b3 = ((b5 ~ ) * b4) * b5 ) );

theorem Th34: :: MATRIX_8:34
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b3 is_similar_Matrix_of b4 & b4 is_similar_Matrix_of b5 & b1 > 0 holds
b3 is_similar_Matrix_of b5
proof end;

theorem Th35: :: MATRIX_8:35
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_similar_Matrix_of b4 & b4 is Idempotent holds
b3 is Idempotent
proof end;

theorem Th36: :: MATRIX_8:36
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_similar_Matrix_of b4 & b4 is Nilpotent & b1 > 0 holds
b3 is Nilpotent
proof end;

theorem Th37: :: MATRIX_8:37
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_similar_Matrix_of b4 & b4 is Involutory holds
b3 is Involutory
proof end;

theorem Th38: :: MATRIX_8:38
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_similar_Matrix_of b4 & b1 > 0 holds
b3 + (1. b2,b1) is_similar_Matrix_of b4 + (1. b2,b1)
proof end;

theorem Th39: :: MATRIX_8:39
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_similar_Matrix_of b4 & b1 > 0 holds
b3 + b3 is_similar_Matrix_of b4 + b4
proof end;

theorem Th40: :: MATRIX_8:40
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_similar_Matrix_of b4 & b1 > 0 holds
(b3 + b3) + b3 is_similar_Matrix_of (b4 + b4) + b4
proof end;

theorem Th41: :: MATRIX_8:41
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Reversible holds
b4 * b3 is_similar_Matrix_of b3 * b4
proof end;

theorem Th42: :: MATRIX_8:42
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Reversible & b4 is_similar_Matrix_of b3 & b1 > 0 holds
b4 is Reversible
proof end;

theorem Th43: :: MATRIX_8:43
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Reversible & b4 is_similar_Matrix_of b3 & b1 > 0 holds
b4 ~ is_similar_Matrix_of b3 ~
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3, c4 be Matrix of c1,c2;
pred c3 is_congruent_Matrix_of c4 means :Def6: :: MATRIX_8:def 6
ex b1 being Matrix of a1,a2 st
( b1 is Reversible & a3 = ((b1 @ ) * a4) * b1 );
end;

:: deftheorem Def6 defines is_congruent_Matrix_of MATRIX_8:def 6 :
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b3 is_congruent_Matrix_of b4 iff ex b5 being Matrix of b1,b2 st
( b5 is Reversible & b3 = ((b5 @ ) * b4) * b5 ) );

theorem Th44: :: MATRIX_8:44
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b1 > 0 holds
b3 is_congruent_Matrix_of b3
proof end;

theorem Th45: :: MATRIX_8:45
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_congruent_Matrix_of b4 & b1 > 0 holds
b4 is_congruent_Matrix_of b3
proof end;

theorem Th46: :: MATRIX_8:46
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b3 is_congruent_Matrix_of b4 & b4 is_congruent_Matrix_of b5 & b1 > 0 holds
b3 is_congruent_Matrix_of b5
proof end;

theorem Th47: :: MATRIX_8:47
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_congruent_Matrix_of b4 & b1 > 0 holds
b3 + b3 is_congruent_Matrix_of b4 + b4
proof end;

theorem Th48: :: MATRIX_8:48
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is_congruent_Matrix_of b4 & b1 > 0 holds
(b3 + b3) + b3 is_congruent_Matrix_of (b4 + b4) + b4
proof end;

theorem Th49: :: MATRIX_8:49
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Orthogonal holds
b4 * b3 is_congruent_Matrix_of b3 * b4
proof end;

theorem Th50: :: MATRIX_8:50
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 is Reversible & b4 is_congruent_Matrix_of b3 & b1 > 0 holds
b4 is Reversible
proof end;

theorem Th51: :: MATRIX_8:51
for b1 being Nat
for b2 being Field
for b3, b4, b5, b6 being Matrix of b1,b2 st b3 is Reversible & b4 is_congruent_Matrix_of b3 & b1 > 0 & b5 = b4 @ & b6 = b3 @ holds
b5 is_congruent_Matrix_of b6
proof end;

theorem Th52: :: MATRIX_8:52
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b3 is Orthogonal & b4 = ((b3 @ ) * b5) * b3 holds
b4 is_similar_Matrix_of b5
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
func Trace c3 -> Element of a2 equals :: MATRIX_8:def 7
Sum (diagonal_of_Matrix a3);
coherence
Sum (diagonal_of_Matrix c3) is Element of c2
;
end;

:: deftheorem Def7 defines Trace MATRIX_8:def 7 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds Trace b3 = Sum (diagonal_of_Matrix b3);

theorem Th53: :: MATRIX_8:53
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b3 = b4 @ holds
Trace b4 = Trace b3
proof end;

theorem Th54: :: MATRIX_8:54
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds Trace (b3 + b4) = (Trace b3) + (Trace b4)
proof end;

theorem Th55: :: MATRIX_8:55
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds Trace ((b3 + b4) + b5) = ((Trace b3) + (Trace b4)) + (Trace b5)
proof end;

theorem Th56: :: MATRIX_8:56
for b1 being Nat
for b2 being Field holds Trace (0. b2,b1) = 0. b2
proof end;

theorem Th57: :: MATRIX_8:57
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b1 > 0 holds
Trace (- b3) = - (Trace b3)
proof end;

theorem Th58: :: MATRIX_8:58
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b1 > 0 holds
- (Trace (- b3)) = Trace b3
proof end;

theorem Th59: :: MATRIX_8:59
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 st b1 > 0 holds
Trace (b3 + (- b3)) = 0. b2
proof end;

theorem Th60: :: MATRIX_8:60
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 st b1 > 0 holds
Trace (b3 - b4) = (Trace b3) - (Trace b4)
proof end;

theorem Th61: :: MATRIX_8:61
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b1 > 0 holds
Trace ((b3 - b4) + b5) = ((Trace b3) - (Trace b4)) + (Trace b5)
proof end;

theorem Th62: :: MATRIX_8:62
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b1 > 0 holds
Trace ((b3 + b4) - b5) = ((Trace b3) + (Trace b4)) - (Trace b5)
proof end;

theorem Th63: :: MATRIX_8:63
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 st b1 > 0 holds
Trace ((b3 - b4) - b5) = ((Trace b3) - (Trace b4)) - (Trace b5)
proof end;