:: MATRIX_7 semantic presentation

Lemma1: for b1, b2 being set holds
( b1 <> b2 implies ( {b1,b2} \ {b2} = {b1} & {b1,b2} \ {b1} = {b2} ) )
by ZFMISC_1:23;

theorem Th1: :: MATRIX_7:1
for b1 being Permutation of Seg 2 holds
( b1 = <*1,2*> or b1 = <*2,1*> )
proof end;

theorem Th2: :: MATRIX_7:2
for b1 being FinSequence holds
( ( b1 = <*1,2*> or b1 = <*2,1*> ) implies b1 is Permutation of Seg 2 )
proof end;

Lemma4: idseq 2 = <*1,2*>
by FINSEQ_2:61;

theorem Th3: :: MATRIX_7:3
Permutations 2 = {<*1,2*>,<*2,1*>}
proof end;

theorem Th4: :: MATRIX_7:4
for b1 being Permutation of Seg 2 holds
( b1 is_transposition implies b1 = <*2,1*> )
proof end;

theorem Th5: :: MATRIX_7:5
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat holds
( 1 <= b3 & b3 < len b2 implies b2 = (mid b2,1,b3) ^ (mid b2,(b3 + 1),(len b2)) )
proof end;

theorem Th6: :: MATRIX_7:6
for b1 being non empty set
for b2 being FinSequence of b1 holds
( 2 <= len b2 implies b2 = (b2 | ((len b2) -' 2)) ^ (mid b2,((len b2) -' 1),(len b2)) )
proof end;

theorem Th7: :: MATRIX_7:7
for b1 being non empty set
for b2 being FinSequence of b1 holds
( 1 <= len b2 implies b2 = (b2 | ((len b2) -' 1)) ^ (mid b2,(len b2),(len b2)) )
proof end;

Lemma10: <*1,2*> <> <*2,1*>
by GROUP_7:2;

theorem Th8: :: MATRIX_7:8
for b1 being Element of (Group_of_Perm 2) holds
( ex b2 being Element of Permutations 2 st
( b2 = b1 & b2 is_transposition ) implies b1 = <*2,1*> )
proof end;

theorem Th9: :: MATRIX_7:9
for b1 being Nat
for b2, b3 being Element of (Group_of_Perm b1)
for b4, b5 being Element of Permutations b1 holds
( b2 = b4 & b3 = b5 implies b2 * b3 = b5 * b4 )
proof end;

theorem Th10: :: MATRIX_7:10
for b1, b2 being Element of (Group_of_Perm 2) holds
( ex b3 being Element of Permutations 2 st
( b3 = b1 & b3 is_transposition ) & ex b3 being Element of Permutations 2 st
( b3 = b2 & b3 is_transposition ) implies b1 * b2 = <*1,2*> )
proof end;

theorem Th11: :: MATRIX_7:11
for b1 being FinSequence of (Group_of_Perm 2) holds
( (len b1) mod 2 = 0 & ( for b2 being Nat holds
not ( b2 in dom b1 & ( for b3 being Element of Permutations 2 holds
not ( b1 . b2 = b3 & b3 is_transposition ) ) ) ) implies Product b1 = <*1,2*> )
proof end;

theorem Th12: :: MATRIX_7:12
for b1 being Field
for b2 being Matrix of 2,b1 holds Det b2 = ((b2 * 1,1) * (b2 * 2,2)) - ((b2 * 1,2) * (b2 * 2,1))
proof end;

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

theorem Th13: :: MATRIX_7:13
for b1 being Field
for b2, b3 being Nat holds
( len (0. b1,b2,b3) = b2 & dom (0. b1,b2,b3) = Seg b2 )
proof end;

theorem Th14: :: MATRIX_7:14
for b1 being Field
for b2 being Nat
for b3 being Element of Permutations b2
for b4 being Nat holds
( b4 in Seg b2 implies b3 . b4 in Seg b2 )
proof end;

theorem Th15: :: MATRIX_7:15
for b1 being Field
for b2 being Nat holds
( b2 >= 1 implies Det (0. b1,b2,b2) = 0. b1 )
proof end;

definition
let c1, c2, c3, c4 be set ;
func IFIN c1,c2,c3,c4 -> set equals :Def1: :: MATRIX_7:def 1
a3 if a1 in a2
otherwise a4;
correctness
coherence
( ( c1 in c2 implies c3 is set ) & ( not c1 in c2 implies c4 is set ) )
;
consistency
for b1 being set holds
verum
;
;
end;

:: deftheorem Def1 defines IFIN MATRIX_7:def 1 :
for b1, b2, b3, b4 being set holds
( ( b1 in b2 implies IFIN b1,b2,b3,b4 = b3 ) & ( not b1 in b2 implies IFIN b1,b2,b3,b4 = b4 ) );

theorem Th16: :: MATRIX_7:16
for b1 being Field
for b2 being Nat holds
( b2 >= 1 implies Det (1. b1,b2) = 1. b1 )
proof end;

definition
let c1 be Field;
let c2 be Nat;
let c3 be Matrix of c2,c1;
redefine attr a3 is diagonal means :Def2: :: MATRIX_7:def 2
for b1, b2 being Nat holds
( b1 in Seg a2 & b2 in Seg a2 & b1 <> b2 implies a3 * b1,b2 = 0. a1 );
compatibility
( c3 is diagonal iff for b1, b2 being Nat holds
( b1 in Seg c2 & b2 in Seg c2 & b1 <> b2 implies c3 * b1,b2 = 0. c1 ) )
proof end;
end;

:: deftheorem Def2 defines diagonal MATRIX_7:def 2 :
for b1 being Field
for b2 being Nat
for b3 being Matrix of b2,b1 holds
( b3 is diagonal iff for b4, b5 being Nat holds
( b4 in Seg b2 & b5 in Seg b2 & b4 <> b5 implies b3 * b4,b5 = 0. b1 ) );

theorem Th17: :: MATRIX_7:17
for b1 being Field
for b2 being Nat
for b3 being Matrix of b2,b1 holds
( b2 >= 1 & b3 is diagonal implies Det b3 = the mult of b1 $$ (diagonal_of_Matrix b3) )
proof end;

theorem Th18: :: MATRIX_7:18
for b1 being Nat
for b2 being Element of Permutations b1 holds
b2 " is Element of Permutations b1
proof end;

definition
let c1 be Nat;
let c2 be Element of Permutations c1;
redefine func " as c2 " -> Element of Permutations a1;
coherence
c2 " is Element of Permutations c1
by Th18;
end;

theorem Th19: :: MATRIX_7:19
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
b3 @ is Matrix of b1,b2
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
func c3 @ -> Matrix of a1,a2 equals :: MATRIX_7:def 3
a3 @ ;
coherence
c3 @ is Matrix of c1,c2
by Th19;
end;

:: deftheorem Def3 defines @ MATRIX_7:def 3 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds b3 @ = b3 @ ;

theorem Th20: :: MATRIX_7:20
for b1 being Group
for b2, b3 being FinSequence of b1 holds (Product (b2 ^ b3)) " = ((Product b3) " ) * ((Product b2) " )
proof end;

definition
let c1 be Group;
let c2 be FinSequence of c1;
func c2 " -> FinSequence of a1 means :Def4: :: MATRIX_7:def 4
( len a3 = len a2 & ( for b1 being Nat holds
( b1 in dom a2 implies a3 /. b1 = (a2 /. b1) " ) ) );
existence
ex b1 being FinSequence of c1 st
( len b1 = len c2 & ( for b2 being Nat holds
( b2 in dom c2 implies b1 /. b2 = (c2 /. b2) " ) ) )
proof end;
uniqueness
for b1, b2 being FinSequence of c1 holds
( len b1 = len c2 & ( for b3 being Nat holds
( b3 in dom c2 implies b1 /. b3 = (c2 /. b3) " ) ) & len b2 = len c2 & ( for b3 being Nat holds
( b3 in dom c2 implies b2 /. b3 = (c2 /. b3) " ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def4 defines " MATRIX_7:def 4 :
for b1 being Group
for b2, b3 being FinSequence of b1 holds
( b3 = b2 " iff ( len b3 = len b2 & ( for b4 being Nat holds
( b4 in dom b2 implies b3 /. b4 = (b2 /. b4) " ) ) ) );

theorem Th21: :: MATRIX_7:21
for b1 being Group holds (<*> the carrier of b1) " = <*> the carrier of b1
proof end;

theorem Th22: :: MATRIX_7:22
for b1 being Group
for b2, b3 being FinSequence of b1 holds (b2 ^ b3) " = (b2 " ) ^ (b3 " )
proof end;

theorem Th23: :: MATRIX_7:23
for b1 being Group
for b2 being Element of b1 holds <*b2*> " = <*(b2 " )*>
proof end;

theorem Th24: :: MATRIX_7:24
for b1 being Group
for b2 being FinSequence of b1 holds Product (b2 ^ ((Rev b2) " )) = 1. b1
proof end;

theorem Th25: :: MATRIX_7:25
for b1 being Group
for b2 being FinSequence of b1 holds Product (((Rev b2) " ) ^ b2) = 1. b1
proof end;

theorem Th26: :: MATRIX_7:26
for b1 being Group
for b2 being FinSequence of b1 holds (Product b2) " = Product ((Rev b2) " )
proof end;

theorem Th27: :: MATRIX_7:27
for b1 being Nat
for b2 being Element of Permutations b1
for b3 being Element of (Group_of_Perm b1) holds
( b3 = b2 & b1 >= 1 implies b2 " = b3 " )
proof end;

Lemma29: for b1 being Nat
for b2 being Element of Permutations b1 holds
( b2 is even & b1 >= 1 implies b2 " is even )
proof end;

Lemma30: for b1 being Nat
for b2 being Permutation of Seg b1 holds (b2 " ) " = b2
by FUNCT_1:65;

theorem Th28: :: MATRIX_7:28
for b1 being Nat
for b2 being Element of Permutations b1 holds
( b1 >= 1 implies ( b2 is even iff b2 " is even ) )
proof end;

theorem Th29: :: MATRIX_7:29
for b1 being Nat
for b2 being Field
for b3 being Element of Permutations b1
for b4 being Element of b2 holds
( b1 >= 1 implies - b4,b3 = - b4,(b3 " ) )
proof end;

theorem Th30: :: MATRIX_7:30
for b1 being Field
for b2, b3 being FinSequence of b1 holds the mult of b1 $$ (b2 ^ b3) = (the mult of b1 $$ b2) * (the mult of b1 $$ b3)
proof end;

theorem Th31: :: MATRIX_7:31
for b1 being Field
for b2, b3 being FinSequence of b1 holds
( b2,b3 are_fiberwise_equipotent implies the mult of b1 $$ b2 = the mult of b1 $$ b3 )
proof end;

theorem Th32: :: MATRIX_7:32
for b1 being Nat
for b2 being Field
for b3 being Element of Permutations b1
for b4, b5 being FinSequence of b2 holds
( b1 >= 1 & len b4 = b1 & b5 = b4 * b3 implies b4,b5 are_fiberwise_equipotent )
proof end;

theorem Th33: :: MATRIX_7:33
for b1 being Nat
for b2 being Field
for b3 being Element of Permutations b1
for b4, b5 being FinSequence of b2 holds
( b1 >= 1 & len b4 = b1 & b5 = b4 * b3 implies the mult of b2 $$ b4 = the mult of b2 $$ b5 )
proof end;

theorem Th34: :: MATRIX_7:34
for b1 being Nat
for b2 being Field
for b3 being Element of Permutations b1
for b4 being FinSequence of b2 holds
( b1 >= 1 & len b4 = b1 implies b4 * b3 is FinSequence of b2 )
proof end;

theorem Th35: :: MATRIX_7:35
for b1 being Nat
for b2 being Field
for b3 being Element of Permutations b1
for b4 being Matrix of b1,b2 holds
( b1 >= 1 implies Path_matrix (b3 " ),(b4 @ ) = (Path_matrix b3,b4) * (b3 " ) )
proof end;

theorem Th36: :: MATRIX_7:36
for b1 being Nat
for b2 being Field
for b3 being Element of Permutations b1
for b4 being Matrix of b1,b2 holds
( b1 >= 1 implies (Path_product (b4 @ )) . (b3 " ) = (Path_product b4) . b3 )
proof end;

theorem Th37: :: MATRIX_7:37
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds
( b1 >= 1 implies Det b3 = Det (b3 @ ) )
proof end;