:: MATRIX_6 semantic presentation

definition
let c1 be Nat;
let c2 be Field;
let c3, c4 be Matrix of c1,c2;
pred c3 is_permutable_with c4 means :Def1: :: MATRIX_6:def 1
a3 * a4 = a4 * a3;
symmetry
for b1, b2 being Matrix of c1,c2 holds
( b1 * b2 = b2 * b1 implies b2 * b1 = b1 * b2 )
;
end;

:: deftheorem Def1 defines is_permutable_with MATRIX_6:def 1 :
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b3 is_permutable_with b4 iff b3 * b4 = b4 * b3 );

definition
let c1 be Nat;
let c2 be Field;
let c3, c4 be Matrix of c1,c2;
pred c3 is_reverse_of c4 means :Def2: :: MATRIX_6:def 2
( a3 * a4 = a4 * a3 & a3 * a4 = 1. a2,a1 );
symmetry
for b1, b2 being Matrix of c1,c2 holds
( b1 * b2 = b2 * b1 & b1 * b2 = 1. c2,c1 implies ( b2 * b1 = b1 * b2 & b2 * b1 = 1. c2,c1 ) )
;
end;

:: deftheorem Def2 defines is_reverse_of MATRIX_6:def 2 :
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b3 is_reverse_of b4 iff ( b3 * b4 = b4 * b3 & b3 * b4 = 1. b2,b1 ) );

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
attr a3 is Reversible means :Def3: :: MATRIX_6:def 3
ex b1 being Matrix of a1,a2 st a3 is_reverse_of b1;
end;

:: deftheorem Def3 defines Reversible MATRIX_6:def 3 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Reversible iff ex b4 being Matrix of b1,b2 st b3 is_reverse_of b4 );

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
redefine func - as - c3 -> Matrix of a1,a2;
coherence
- c3 is Matrix of c1,c2
proof end;
end;

definition
let c1 be Nat;
let c2 be Field;
let c3, c4 be Matrix of c1,c2;
redefine func + as c3 + c4 -> Matrix of a1,a2;
coherence
c3 + c4 is Matrix of c1,c2
proof end;
end;

definition
let c1 be Nat;
let c2 be Field;
let c3, c4 be Matrix of c1,c2;
redefine func - as c3 - c4 -> Matrix of a1,a2;
coherence
c3 - c4 is Matrix of c1,c2
proof end;
end;

definition
let c1 be Nat;
let c2 be Field;
let c3, c4 be Matrix of c1,c2;
redefine func * as c3 * c4 -> Matrix of a1,a2;
coherence
c3 * c4 is Matrix of c1,c2
proof end;
end;

theorem Th1: :: MATRIX_6:1
for b1 being Field
for b2 being Matrix of b1 holds
( len b2 > 0 & width b2 > 0 implies (0. b1,(len b2),(len b2)) * b2 = 0. b1,(len b2),(width b2) )
proof end;

theorem Th2: :: MATRIX_6:2
for b1 being Field
for b2 being Matrix of b1 holds
( len b2 > 0 & width b2 > 0 implies b2 * (0. b1,(width b2),(width b2)) = 0. b1,(len b2),(width b2) )
proof end;

theorem Th3: :: MATRIX_6:3
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b1 > 0 implies b3 is_permutable_with 0. b2,b1,b1 )
proof end;

theorem Th4: :: MATRIX_6:4
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b3 is_permutable_with b4 & b4 is_permutable_with b5 & b3 is_permutable_with b5 implies b3 is_permutable_with b4 * b5 )
proof end;

theorem Th5: :: MATRIX_6:5
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b3 is_permutable_with b4 & b3 is_permutable_with b5 & b1 > 0 implies b3 is_permutable_with b4 + b5 )
proof end;

theorem Th6: :: MATRIX_6:6
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds b3 is_permutable_with 1. b2,b1
proof end;

theorem Th7: :: MATRIX_6:7
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b3 is_reverse_of b4 & b5 is_reverse_of b4 implies b5 = b3 )
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
assume E9: c3 is Reversible ;
func c3 ~ -> Matrix of a1,a2 means :Def4: :: MATRIX_6:def 4
a4 is_reverse_of a3;
existence
ex b1 being Matrix of c1,c2 st b1 is_reverse_of c3
by E9, Def3;
uniqueness
for b1, b2 being Matrix of c1,c2 holds
( b1 is_reverse_of c3 & b2 is_reverse_of c3 implies b1 = b2 )
by Th7;
end;

:: deftheorem Def4 defines ~ MATRIX_6:def 4 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Reversible implies for b4 being Matrix of b1,b2 holds
( b4 = b3 ~ iff b4 is_reverse_of b3 ) );

theorem Th8: :: MATRIX_6:8
for b1 being Nat
for b2 being Field holds
( (1. b2,b1) ~ = 1. b2,b1 & 1. b2,b1 is Reversible )
proof end;

theorem Th9: :: MATRIX_6:9
for b1 being Nat
for b2 being Field holds ((1. b2,b1) ~ ) ~ = 1. b2,b1
proof end;

theorem Th10: :: MATRIX_6:10
for b1 being Nat
for b2 being Field holds
( b1 > 0 implies (1. b2,b1) @ = 1. b2,b1 )
proof end;

theorem Th11: :: MATRIX_6:11
for b1 being Field
for b2 being Nat
for b3 being Matrix of b2,b1 holds
( b3 = (1. b1,b2) @ & b2 > 0 implies b3 ~ = 1. b1,b2 )
proof end;

theorem Th12: :: MATRIX_6:12
for b1 being Nat
for b2 being Field
for b3, b4, b5, b6 being Matrix of b1,b2 holds
( b3 @ = b4 & b5 is_reverse_of b3 & b6 = b5 @ & b1 > 0 implies b4 is_reverse_of b6 )
proof end;

theorem Th13: :: MATRIX_6:13
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b3 is Reversible & b1 > 0 & b4 = b3 @ & b5 = (b3 ~ ) @ implies b4 ~ = b5 )
proof end;

theorem Th14: :: MATRIX_6:14
for b1 being Field
for b2 being Nat
for b3, b4, b5, b6 being Matrix of b2,b1 holds
( b5 is_reverse_of b3 & b6 is_reverse_of b4 implies b5 * b6 is_reverse_of b4 * b3 )
proof end;

theorem Th15: :: MATRIX_6:15
for b1 being Field
for b2 being Nat
for b3, b4 being Matrix of b2,b1 holds
( b4 is_reverse_of b3 implies b3 is_permutable_with b4 )
proof end;

theorem Th16: :: MATRIX_6:16
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Reversible implies ( b3 ~ is Reversible & (b3 ~ ) ~ = b3 ) )
proof end;

theorem Th17: :: MATRIX_6:17
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 * b4 = 0. b2,b1,b1 & b3 is Reversible implies b3 is_permutable_with b4 )
proof end;

theorem Th18: :: MATRIX_6:18
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 = b3 * b4 & b3 is Reversible implies b3 is_permutable_with b4 )
proof end;

theorem Th19: :: MATRIX_6:19
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 = b4 * b3 & b3 is Reversible implies b3 is_permutable_with b4 )
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
attr a3 is symmetrical means :Def5: :: MATRIX_6:def 5
a3 @ = a3;
end;

:: deftheorem Def5 defines symmetrical MATRIX_6:def 5 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is symmetrical iff b3 @ = b3 );

theorem Th20: :: MATRIX_6:20
for b1 being Nat
for b2 being Field holds
( b1 > 0 implies 1. b2,b1 is symmetrical )
proof end;

theorem Th21: :: MATRIX_6:21
for b1 being Nat
for b2 being Field
for b3 being Element of b2 holds
( b1 > 0 implies (b1,b1 --> b3) @ = b1,b1 --> b3 )
proof end;

theorem Th22: :: MATRIX_6:22
for b1 being Nat
for b2 being Field
for b3 being Element of b2 holds
( b1 > 0 implies b1,b1 --> b3 is symmetrical )
proof end;

theorem Th23: :: MATRIX_6:23
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is symmetrical & b4 is symmetrical implies ( b3 is_permutable_with b4 iff b3 * b4 is symmetrical ) )
proof end;

theorem Th24: :: MATRIX_6:24
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 implies (b3 + b4) @ = (b3 @ ) + (b4 @ ) )
proof end;

theorem Th25: :: MATRIX_6:25
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is symmetrical & b4 is symmetrical implies b3 + b4 is symmetrical )
proof end;

theorem Th26: :: MATRIX_6:26
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Upper_Triangular_Matrix of b1,b2 & b3 is Lower_Triangular_Matrix of b1,b2 & b1 > 0 implies b3 is symmetrical )
proof end;

theorem Th27: :: MATRIX_6:27
for b1 being Field
for b2 being Nat
for b3, b4 being Matrix of b2,b1 holds
( b2 > 0 implies (- b3) @ = - (b3 @ ) )
proof end;

theorem Th28: :: MATRIX_6:28
for b1 being Field
for b2 being Nat
for b3, b4 being Matrix of b2,b1 holds
( b3 is symmetrical & b2 > 0 implies - b3 is symmetrical )
proof end;

theorem Th29: :: MATRIX_6:29
for b1 being Field
for b2 being Nat
for b3, b4 being Matrix of b2,b1 holds
( b2 > 0 & b3 is symmetrical & b4 is symmetrical implies b3 - b4 is symmetrical )
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
attr a3 is antisymmetric means :Def6: :: MATRIX_6:def 6
a3 @ = - a3;
end;

:: deftheorem Def6 defines antisymmetric MATRIX_6:def 6 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is antisymmetric iff b3 @ = - b3 );

theorem Th30: :: MATRIX_6:30
for b1 being Fanoian Field
for b2 being Nat
for b3 being Matrix of b2,b1 holds
( b3 is symmetrical & b3 is antisymmetric & b2 > 0 implies b3 = 0. b1,b2,b2 )
proof end;

theorem Th31: :: MATRIX_6:31
for b1 being Fanoian Field
for b2, b3 being Nat
for b4 being Matrix of b2,b1 holds
( b4 is antisymmetric & b2 > 0 & b3 in Seg b2 implies b4 * b3,b3 = 0. b1 )
proof end;

theorem Th32: :: MATRIX_6:32
for b1 being Field
for b2 being Nat
for b3, b4 being Matrix of b2,b1 holds
( b2 > 0 & b3 is antisymmetric & b4 is antisymmetric implies b3 + b4 is antisymmetric )
proof end;

theorem Th33: :: MATRIX_6:33
for b1 being Field
for b2 being Nat
for b3, b4 being Matrix of b2,b1 holds
( b3 is antisymmetric & b2 > 0 implies - b3 is antisymmetric )
proof end;

theorem Th34: :: MATRIX_6:34
for b1 being Field
for b2 being Nat
for b3, b4 being Matrix of b2,b1 holds
( b2 > 0 & b3 is antisymmetric & b4 is antisymmetric implies b3 - b4 is antisymmetric )
proof end;

theorem Th35: :: MATRIX_6:35
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b3 = b4 - (b4 @ ) & b1 > 0 implies b3 is antisymmetric )
proof end;

theorem Th36: :: MATRIX_6:36
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 implies ( b3 is_permutable_with b4 iff (b3 + b4) * (b3 + b4) = (((b3 * b3) + (b3 * b4)) + (b3 * b4)) + (b4 * b4) ) )
proof end;

theorem Th37: :: MATRIX_6:37
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Reversible & b4 is Reversible implies ( b3 * b4 is Reversible & (b3 * b4) ~ = (b4 ~ ) * (b3 ~ ) ) )
proof end;

theorem Th38: :: MATRIX_6:38
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Reversible & b4 is Reversible & b3 is_permutable_with b4 implies ( b3 * b4 is Reversible & (b3 * b4) ~ = (b3 ~ ) * (b4 ~ ) ) )
proof end;

theorem Th39: :: MATRIX_6:39
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Reversible & b4 is Reversible & b3 * b4 = 1. b2,b1 implies b3 is_reverse_of b4 )
proof end;

theorem Th40: :: MATRIX_6:40
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Reversible & b4 is Reversible & b4 * b3 = 1. b2,b1 implies b3 is_reverse_of b4 )
proof end;

theorem Th41: :: MATRIX_6:41
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Reversible & b3 is_permutable_with b4 implies b3 ~ is_permutable_with b4 )
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
attr a3 is Orthogonal means :Def7: :: MATRIX_6:def 7
( a3 is Reversible & a3 @ = a3 ~ );
end;

:: deftheorem Def7 defines Orthogonal MATRIX_6:def 7 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b3 is Orthogonal iff ( b3 is Reversible & b3 @ = b3 ~ ) );

theorem Th42: :: MATRIX_6:42
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b1 > 0 implies ( ( b3 * (b3 @ ) = 1. b2,b1 & b3 is Reversible ) iff b3 is Orthogonal ) )
proof end;

theorem Th43: :: MATRIX_6:43
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b1 > 0 implies ( ( b3 is Reversible & (b3 @ ) * b3 = 1. b2,b1 ) iff b3 is Orthogonal ) )
proof end;

theorem Th44: :: MATRIX_6:44
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Orthogonal implies (b3 @ ) * b3 = b3 * (b3 @ ) )
proof end;

theorem Th45: :: MATRIX_6:45
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Orthogonal & b3 is_permutable_with b4 & b5 = b3 @ implies b5 is_permutable_with b4 )
proof end;

theorem Th46: :: MATRIX_6:46
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Reversible & b4 is Reversible implies ( b3 * b4 is Reversible & (b3 * b4) ~ = (b4 ~ ) * (b3 ~ ) ) )
proof end;

theorem Th47: :: MATRIX_6:47
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Orthogonal & b4 is Orthogonal implies b3 * b4 is Orthogonal )
proof end;

theorem Th48: :: MATRIX_6:48
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Orthogonal & b3 is_permutable_with b4 & b5 = b3 @ implies b5 is_permutable_with b4 )
proof end;

theorem Th49: :: MATRIX_6:49
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 + b3 is_permutable_with b4 )
proof end;

theorem Th50: :: MATRIX_6:50
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 + b4 is_permutable_with b4 )
proof end;

theorem Th51: :: MATRIX_6:51
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 + b3 is_permutable_with b4 + b4 )
proof end;

theorem Th52: :: MATRIX_6:52
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 + b4 is_permutable_with b4 + b4 )
proof end;

theorem Th53: :: MATRIX_6:53
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 + b4 is_permutable_with b3 + b4 )
proof end;

theorem Th54: :: MATRIX_6:54
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 * b4 is_permutable_with b4 )
proof end;

theorem Th55: :: MATRIX_6:55
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 * b3 is_permutable_with b4 )
proof end;

theorem Th56: :: MATRIX_6:56
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 implies b3 * b3 is_permutable_with b4 * b4 )
proof end;

theorem Th57: :: MATRIX_6:57
for b1 being Nat
for b2 being Field
for b3, b4, b5, b6 being Matrix of b1,b2 holds
( b1 > 0 & b3 is_permutable_with b4 & b5 = b3 @ & b6 = b4 @ implies b5 is_permutable_with b6 )
proof end;

theorem Th58: :: MATRIX_6:58
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Reversible & b4 is Reversible & b5 is Reversible implies ( (b3 * b4) * b5 is Reversible & ((b3 * b4) * b5) ~ = ((b5 ~ ) * (b4 ~ )) * (b3 ~ ) ) )
proof end;

theorem Th59: :: MATRIX_6:59
for b1 being Nat
for b2 being Field
for b3, b4, b5 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Orthogonal & b4 is Orthogonal & b5 is Orthogonal implies (b3 * b4) * b5 is Orthogonal )
proof end;

theorem Th60: :: MATRIX_6:60
for b1 being Nat
for b2 being Field holds
( b1 > 0 implies 1. b2,b1 is Orthogonal )
proof end;

theorem Th61: :: MATRIX_6:61
for b1 being Nat
for b2 being Field
for b3, b4 being Matrix of b1,b2 holds
( b1 > 0 & b3 is Orthogonal & b4 is Orthogonal implies (b3 ~ ) * b4 is Orthogonal )
proof end;