:: MATRIX_3 semantic presentation

Lemma1: for b1, b2 being Nat holds
( b1 = b1 + b2 implies b2 = 0 )
by XCMPLX_1:3;

definition
let c1 be Field;
let c2, c3 be Nat;
func 0. c1,c2,c3 -> Matrix of a2,a3,a1 equals :: MATRIX_3:def 1
a2 |-> (a3 |-> (0. a1));
coherence
c2 |-> (c3 |-> (0. c1)) is Matrix of c2,c3,c1
by MATRIX_1:10;
end;

:: deftheorem Def1 defines 0. MATRIX_3:def 1 :
for b1 being Field
for b2, b3 being Nat holds 0. b1,b2,b3 = b2 |-> (b3 |-> (0. b1));

definition
let c1 be Field;
let c2 be Matrix of c1;
func - c2 -> Matrix of a1 means :Def2: :: MATRIX_3:def 2
( len a3 = len a2 & width a3 = width a2 & ( for b1, b2 being Nat holds
( [b1,b2] in Indices a2 implies a3 * b1,b2 = - (a2 * b1,b2) ) ) );
existence
ex b1 being Matrix of c1 st
( len b1 = len c2 & width b1 = width c2 & ( for b2, b3 being Nat holds
( [b2,b3] in Indices c2 implies b1 * b2,b3 = - (c2 * b2,b3) ) ) )
proof end;
uniqueness
for b1, b2 being Matrix of c1 holds
( len b1 = len c2 & width b1 = width c2 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices c2 implies b1 * b3,b4 = - (c2 * b3,b4) ) ) & len b2 = len c2 & width b2 = width c2 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices c2 implies b2 * b3,b4 = - (c2 * b3,b4) ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def2 defines - MATRIX_3:def 2 :
for b1 being Field
for b2, b3 being Matrix of b1 holds
( b3 = - b2 iff ( len b3 = len b2 & width b3 = width b2 & ( for b4, b5 being Nat holds
( [b4,b5] in Indices b2 implies b3 * b4,b5 = - (b2 * b4,b5) ) ) ) );

definition
let c1 be Field;
let c2, c3 be Matrix of c1;
func c2 + c3 -> Matrix of a1 means :Def3: :: MATRIX_3:def 3
( len a4 = len a2 & width a4 = width a2 & ( for b1, b2 being Nat holds
( [b1,b2] in Indices a2 implies a4 * b1,b2 = (a2 * b1,b2) + (a3 * b1,b2) ) ) );
existence
ex b1 being Matrix of c1 st
( len b1 = len c2 & width b1 = width c2 & ( for b2, b3 being Nat holds
( [b2,b3] in Indices c2 implies b1 * b2,b3 = (c2 * b2,b3) + (c3 * b2,b3) ) ) )
proof end;
uniqueness
for b1, b2 being Matrix of c1 holds
( len b1 = len c2 & width b1 = width c2 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices c2 implies b1 * b3,b4 = (c2 * b3,b4) + (c3 * b3,b4) ) ) & len b2 = len c2 & width b2 = width c2 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices c2 implies b2 * b3,b4 = (c2 * b3,b4) + (c3 * b3,b4) ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def3 defines + MATRIX_3:def 3 :
for b1 being Field
for b2, b3, b4 being Matrix of b1 holds
( b4 = b2 + b3 iff ( len b4 = len b2 & width b4 = width b2 & ( for b5, b6 being Nat holds
( [b5,b6] in Indices b2 implies b4 * b5,b6 = (b2 * b5,b6) + (b3 * b5,b6) ) ) ) );

theorem Th1: :: MATRIX_3:1
canceled;

theorem Th2: :: MATRIX_3:2
canceled;

theorem Th3: :: MATRIX_3:3
for b1, b2 being Nat
for b3 being Field
for b4, b5 being Nat holds
( [b4,b5] in Indices (0. b3,b1,b2) implies (0. b3,b1,b2) * b4,b5 = 0. b3 )
proof end;

theorem Th4: :: MATRIX_3:4
for b1 being Field
for b2, b3 being Matrix of b1 holds
( len b2 = len b3 & width b2 = width b3 implies b2 + b3 = b3 + b2 )
proof end;

theorem Th5: :: MATRIX_3:5
for b1 being Field
for b2, b3, b4 being Matrix of b1 holds
( len b2 = len b3 & len b2 = len b4 & width b2 = width b3 & width b2 = width b4 implies (b2 + b3) + b4 = b2 + (b3 + b4) )
proof end;

theorem Th6: :: MATRIX_3:6
for b1, b2 being Nat
for b3 being Field
for b4 being Matrix of b1,b2,b3 holds b4 + (0. b3,b1,b2) = b4
proof end;

theorem Th7: :: MATRIX_3:7
for b1, b2 being Nat
for b3 being Field
for b4 being Matrix of b1,b2,b3 holds b4 + (- b4) = 0. b3,b1,b2
proof end;

definition
let c1 be Field;
let c2, c3 be Matrix of c1;
assume E5: width c2 = len c3 ;
func c2 * c3 -> Matrix of a1 means :Def4: :: MATRIX_3:def 4
( len a4 = len a2 & width a4 = width a3 & ( for b1, b2 being Nat holds
( [b1,b2] in Indices a4 implies a4 * b1,b2 = (Line a2,b1) "*" (Col a3,b2) ) ) );
existence
ex b1 being Matrix of c1 st
( len b1 = len c2 & width b1 = width c3 & ( for b2, b3 being Nat holds
( [b2,b3] in Indices b1 implies b1 * b2,b3 = (Line c2,b2) "*" (Col c3,b3) ) ) )
proof end;
uniqueness
for b1, b2 being Matrix of c1 holds
( len b1 = len c2 & width b1 = width c3 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices b1 implies b1 * b3,b4 = (Line c2,b3) "*" (Col c3,b4) ) ) & len b2 = len c2 & width b2 = width c3 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices b2 implies b2 * b3,b4 = (Line c2,b3) "*" (Col c3,b4) ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def4 defines * MATRIX_3:def 4 :
for b1 being Field
for b2, b3 being Matrix of b1 holds
( width b2 = len b3 implies for b4 being Matrix of b1 holds
( b4 = b2 * b3 iff ( len b4 = len b2 & width b4 = width b3 & ( for b5, b6 being Nat holds
( [b5,b6] in Indices b4 implies b4 * b5,b6 = (Line b2,b5) "*" (Col b3,b6) ) ) ) ) );

definition
let c1, c2, c3 be Nat;
let c4 be Field;
let c5 be Matrix of c1,c2,c4;
let c6 be Matrix of width c5,c3,c4;
redefine func * as c5 * c6 -> Matrix of len a5, width a6,a4;
coherence
c5 * c6 is Matrix of len c5, width c6,c4
proof end;
end;

definition
let c1 be Field;
let c2 be Matrix of c1;
let c3 be Element of c1;
func c3 * c2 -> Matrix of a1 means :: MATRIX_3:def 5
( len a4 = len a2 & width a4 = width a2 & ( for b1, b2 being Nat holds
( [b1,b2] in Indices a2 implies a4 * b1,b2 = a3 * (a2 * b1,b2) ) ) );
existence
ex b1 being Matrix of c1 st
( len b1 = len c2 & width b1 = width c2 & ( for b2, b3 being Nat holds
( [b2,b3] in Indices c2 implies b1 * b2,b3 = c3 * (c2 * b2,b3) ) ) )
proof end;
uniqueness
for b1, b2 being Matrix of c1 holds
( len b1 = len c2 & width b1 = width c2 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices c2 implies b1 * b3,b4 = c3 * (c2 * b3,b4) ) ) & len b2 = len c2 & width b2 = width c2 & ( for b3, b4 being Nat holds
( [b3,b4] in Indices c2 implies b2 * b3,b4 = c3 * (c2 * b3,b4) ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def5 defines * MATRIX_3:def 5 :
for b1 being Field
for b2 being Matrix of b1
for b3 being Element of b1
for b4 being Matrix of b1 holds
( b4 = b3 * b2 iff ( len b4 = len b2 & width b4 = width b2 & ( for b5, b6 being Nat holds
( [b5,b6] in Indices b2 implies b4 * b5,b6 = b3 * (b2 * b5,b6) ) ) ) );

definition
let c1 be Field;
let c2 be Matrix of c1;
let c3 be Element of c1;
func c2 * c3 -> Matrix of a1 equals :: MATRIX_3:def 6
a3 * a2;
coherence
c3 * c2 is Matrix of c1
;
end;

:: deftheorem Def6 defines * MATRIX_3:def 6 :
for b1 being Field
for b2 being Matrix of b1
for b3 being Element of b1 holds b2 * b3 = b3 * b2;

theorem Th8: :: MATRIX_3:8
for b1 being Field
for b2, b3 being FinSequence of b1 holds
( len b2 = len b3 implies ( len (mlt b2,b3) = len b2 & len (mlt b2,b3) = len b3 ) )
proof end;

theorem Th9: :: MATRIX_3:9
for b1 being Nat
for b2 being Field
for b3, b4 being Nat holds
( [b3,b4] in Indices (1. b2,b1) & b4 = b3 implies (Line (1. b2,b1),b3) . b4 = 1. b2 )
proof end;

theorem Th10: :: MATRIX_3:10
for b1 being Nat
for b2 being Field
for b3, b4 being Nat holds
( [b3,b4] in Indices (1. b2,b1) & b4 <> b3 implies (Line (1. b2,b1),b3) . b4 = 0. b2 )
proof end;

theorem Th11: :: MATRIX_3:11
for b1 being Nat
for b2 being Field
for b3, b4 being Nat holds
( [b3,b4] in Indices (1. b2,b1) & b3 = b4 implies (Col (1. b2,b1),b4) . b3 = 1. b2 )
proof end;

theorem Th12: :: MATRIX_3:12
for b1 being Nat
for b2 being Field
for b3, b4 being Nat holds
( [b3,b4] in Indices (1. b2,b1) & b3 <> b4 implies (Col (1. b2,b1),b4) . b3 = 0. b2 )
proof end;

Lemma6: for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being FinSequence of b1 holds
( ( for b3 being Nat holds
( b3 in dom b2 implies b2 . b3 = 0. b1 ) ) implies Sum b2 = 0. b1 )
proof end;

theorem Th13: :: MATRIX_3:13
for b1 being Nat
for b2 being non empty add-associative right_zeroed right_complementable LoopStr holds Sum (b1 |-> (0. b2)) = 0. b2
proof end;

theorem Th14: :: MATRIX_3:14
for b1 being non empty add-associative right_zeroed right_complementable LoopStr
for b2 being FinSequence of b1
for b3 being Nat holds
( b3 in dom b2 & ( for b4 being Nat holds
( b4 in dom b2 & b4 <> b3 implies b2 . b4 = 0. b1 ) ) implies Sum b2 = b2 . b3 )
proof end;

theorem Th15: :: MATRIX_3:15
for b1 being Field
for b2, b3 being FinSequence of b1 holds len (mlt b2,b3) = min (len b2),(len b3)
proof end;

theorem Th16: :: MATRIX_3:16
for b1 being Field
for b2, b3 being FinSequence of b1
for b4 being Nat holds
( b4 in dom b2 & b2 . b4 = 1. b1 & ( for b5 being Nat holds
( b5 in dom b2 & b5 <> b4 implies b2 . b5 = 0. b1 ) ) implies for b5 being Nat holds
( b5 in dom (mlt b2,b3) implies ( ( b4 = b5 implies (mlt b2,b3) . b5 = b3 . b4 ) & ( b4 <> b5 implies (mlt b2,b3) . b5 = 0. b1 ) ) ) )
proof end;

theorem Th17: :: MATRIX_3:17
for b1 being Nat
for b2 being Field
for b3, b4 being Nat holds
( [b3,b4] in Indices (1. b2,b1) implies ( ( b3 = b4 implies (Line (1. b2,b1),b3) . b4 = 1. b2 ) & ( b3 <> b4 implies (Line (1. b2,b1),b3) . b4 = 0. b2 ) ) )
proof end;

theorem Th18: :: MATRIX_3:18
for b1 being Nat
for b2 being Field
for b3, b4 being Nat holds
( [b3,b4] in Indices (1. b2,b1) implies ( ( b3 = b4 implies (Col (1. b2,b1),b4) . b3 = 1. b2 ) & ( b3 <> b4 implies (Col (1. b2,b1),b4) . b3 = 0. b2 ) ) )
proof end;

theorem Th19: :: MATRIX_3:19
for b1 being Field
for b2, b3 being FinSequence of b1
for b4 being Nat holds
( b4 in dom b2 & b4 in dom b3 & b2 . b4 = 1. b1 & ( for b5 being Nat holds
( b5 in dom b2 & b5 <> b4 implies b2 . b5 = 0. b1 ) ) implies Sum (mlt b2,b3) = b3 . b4 )
proof end;

theorem Th20: :: MATRIX_3:20
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds (1. b2,b1) * b3 = b3
proof end;

theorem Th21: :: MATRIX_3:21
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds b3 * (1. b2,b1) = b3
proof end;

theorem Th22: :: MATRIX_3:22
for b1 being Field
for b2, b3 being Element of b1 holds <*<*b2*>*> * <*<*b3*>*> = <*<*(b2 * b3)*>*>
proof end;

theorem Th23: :: MATRIX_3:23
for b1 being Field
for b2, b3, b4, b5, b6, b7, b8, b9 being Element of b1 holds (b2,b4 ][ b6,b8) * (b3,b5 ][ b7,b9) = ((b2 * b3) + (b4 * b7)),((b2 * b5) + (b4 * b9)) ][ ((b6 * b3) + (b8 * b7)),((b6 * b5) + (b8 * b9))
proof end;

theorem Th24: :: MATRIX_3:24
for b1 being Field
for b2, b3 being Matrix of b1 holds
( width b2 = len b3 & width b3 <> 0 implies (b2 * b3) @ = (b3 @ ) * (b2 @ ) )
proof end;

definition
let c1, c2 be non empty set ;
let c3 be Element of Fin c1;
let c4 be Element of Fin c2;
redefine func [: as [:c3,c4:] -> Element of Fin [:a1,a2:];
coherence
[:c3,c4:] is Element of Fin [:c1,c2:]
proof end;
end;

definition
let c1, c2, c3 be non empty set ;
let c4 be BinOp of c3;
let c5 be Function of c1,c3;
let c6 be Function of c2,c3;
redefine func * as c4 * c5,c6 -> Function of [:a1,a2:],a3;
coherence
c4 * c5,c6 is Function of [:c1,c2:],c3
by FINSEQOP:84;
end;

theorem Th25: :: MATRIX_3:25
for b1, b2, b3 being non empty set
for b4, b5 being BinOp of b3
for b6 being Function of b1,b3
for b7 being Function of b2,b3
for b8 being Element of Fin b1
for b9 being Element of Fin b2 holds
( b4 is commutative & b4 is associative & not ( not [:b9,b8:] <> {} & not b4 has_a_unity ) & b5 is commutative implies b4 $$ [:b8,b9:],(b5 * b6,b7) = b4 $$ [:b9,b8:],(b5 * b7,b6) )
proof end;

theorem Th26: :: MATRIX_3:26
for b1, b2, b3 being non empty set
for b4, b5 being BinOp of b1
for b6 being Function of b2,b1
for b7 being Function of b3,b1 holds
( b4 is commutative & b4 is associative & b4 has_a_unity implies for b8 being Element of b2
for b9 being Element of b3 holds b4 $$ [:{.b8.},{.b9.}:],(b5 * b6,b7) = b4 $$ {.b8.},(b5 [:] b6,(b4 $$ {.b9.},b7)) )
proof end;

theorem Th27: :: MATRIX_3:27
for b1, b2, b3 being non empty set
for b4, b5 being BinOp of b1
for b6 being Function of b2,b1
for b7 being Function of b3,b1
for b8 being Element of Fin b2
for b9 being Element of Fin b3 holds
( b4 is commutative & b4 is associative & b4 has_a_unity & b4 has_an_inverseOp & b5 is_distributive_wrt b4 implies for b10 being Element of b2 holds b4 $$ [:{.b10.},b9:],(b5 * b6,b7) = b4 $$ {.b10.},(b5 [:] b6,(b4 $$ b9,b7)) )
proof end;

theorem Th28: :: MATRIX_3:28
for b1, b2, b3 being non empty set
for b4, b5 being BinOp of b1
for b6 being Function of b2,b1
for b7 being Function of b3,b1
for b8 being Element of Fin b2
for b9 being Element of Fin b3 holds
( b4 has_a_unity & b4 is commutative & b4 is associative & b4 has_an_inverseOp & b5 is_distributive_wrt b4 implies b4 $$ [:b8,b9:],(b5 * b6,b7) = b4 $$ b8,(b5 [:] b6,(b4 $$ b9,b7)) )
proof end;

theorem Th29: :: MATRIX_3:29
for b1, b2, b3 being non empty set
for b4, b5 being BinOp of b1
for b6 being Function of b2,b1
for b7 being Function of b3,b1 holds
( b4 is commutative & b4 is associative & b4 has_a_unity & b5 is commutative implies for b8 being Element of b2
for b9 being Element of b3 holds b4 $$ [:{.b8.},{.b9.}:],(b5 * b6,b7) = b4 $$ {.b9.},(b5 [;] (b4 $$ {.b8.},b6),b7) )
proof end;

theorem Th30: :: MATRIX_3:30
for b1, b2, b3 being non empty set
for b4, b5 being BinOp of b1
for b6 being Function of b2,b1
for b7 being Function of b3,b1
for b8 being Element of Fin b2
for b9 being Element of Fin b3 holds
( b4 has_a_unity & b4 is commutative & b4 is associative & b4 has_an_inverseOp & b5 is_distributive_wrt b4 & b5 is commutative implies b4 $$ [:b8,b9:],(b5 * b6,b7) = b4 $$ b9,(b5 [;] (b4 $$ b8,b6),b7) )
proof end;

theorem Th31: :: MATRIX_3:31
for b1, b2, b3 being non empty set
for b4 being BinOp of b1
for b5 being Function of [:b2,b3:],b1
for b6 being Function of b2,b1
for b7 being Element of Fin b3 holds
( b4 has_a_unity & b4 is commutative & b4 is associative & b4 has_an_inverseOp implies for b8 being Element of b2 holds
( ( for b9 being Element of b2 holds b6 . b9 = b4 $$ b7,((curry b5) . b9) ) implies b4 $$ [:{.b8.},b7:],b5 = b4 $$ {.b8.},b6 ) )
proof end;

theorem Th32: :: MATRIX_3:32
for b1, b2, b3 being non empty set
for b4 being BinOp of b1
for b5 being Function of [:b2,b3:],b1
for b6 being Function of b2,b1
for b7 being Element of Fin b2
for b8 being Element of Fin b3 holds
( ( for b9 being Element of b2 holds b6 . b9 = b4 $$ b8,((curry b5) . b9) ) & b4 has_a_unity & b4 is commutative & b4 is associative & b4 has_an_inverseOp implies b4 $$ [:b7,b8:],b5 = b4 $$ b7,b6 )
proof end;

theorem Th33: :: MATRIX_3:33
for b1, b2, b3 being non empty set
for b4 being BinOp of b1
for b5 being Function of [:b2,b3:],b1
for b6 being Function of b3,b1
for b7 being Element of Fin b2 holds
( b4 has_a_unity & b4 is commutative & b4 is associative & b4 has_an_inverseOp implies for b8 being Element of b3 holds
( ( for b9 being Element of b3 holds b6 . b9 = b4 $$ b7,((curry' b5) . b9) ) implies b4 $$ [:b7,{.b8.}:],b5 = b4 $$ {.b8.},b6 ) )
proof end;

theorem Th34: :: MATRIX_3:34
for b1, b2, b3 being non empty set
for b4 being BinOp of b1
for b5 being Function of [:b2,b3:],b1
for b6 being Function of b3,b1
for b7 being Element of Fin b2
for b8 being Element of Fin b3 holds
( ( for b9 being Element of b3 holds b6 . b9 = b4 $$ b7,((curry' b5) . b9) ) & b4 has_a_unity & b4 is commutative & b4 is associative & b4 has_an_inverseOp implies b4 $$ [:b7,b8:],b5 = b4 $$ b8,b6 )
proof end;

theorem Th35: :: MATRIX_3:35
for b1 being Field
for b2, b3, b4 being Matrix of b1 holds
( width b2 = len b3 & width b3 = len b4 implies (b2 * b3) * b4 = b2 * (b3 * b4) )
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
let c4 be Element of Permutations c1;
func Path_matrix c4,c3 -> FinSequence of a2 means :Def7: :: MATRIX_3:def 7
( len a5 = a1 & ( for b1, b2 being Nat holds
( b1 in dom a5 & b2 = a4 . b1 implies a5 . b1 = a3 * b1,b2 ) ) );
existence
ex b1 being FinSequence of c2 st
( len b1 = c1 & ( for b2, b3 being Nat holds
( b2 in dom b1 & b3 = c4 . b2 implies b1 . b2 = c3 * b2,b3 ) ) )
proof end;
uniqueness
for b1, b2 being FinSequence of c2 holds
( len b1 = c1 & ( for b3, b4 being Nat holds
( b3 in dom b1 & b4 = c4 . b3 implies b1 . b3 = c3 * b3,b4 ) ) & len b2 = c1 & ( for b3, b4 being Nat holds
( b3 in dom b2 & b4 = c4 . b3 implies b2 . b3 = c3 * b3,b4 ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def7 defines Path_matrix MATRIX_3:def 7 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2
for b4 being Element of Permutations b1
for b5 being FinSequence of b2 holds
( b5 = Path_matrix b4,b3 iff ( len b5 = b1 & ( for b6, b7 being Nat holds
( b6 in dom b5 & b7 = b4 . b6 implies b5 . b6 = b3 * b6,b7 ) ) ) );

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
func Path_product c3 -> Function of Permutations a1,the carrier of a2 means :Def8: :: MATRIX_3:def 8
for b1 being Element of Permutations a1 holds a4 . b1 = - (the mult of a2 $$ (Path_matrix b1,a3)),b1;
existence
ex b1 being Function of Permutations c1,the carrier of c2 st
for b2 being Element of Permutations c1 holds b1 . b2 = - (the mult of c2 $$ (Path_matrix b2,c3)),b2
proof end;
uniqueness
for b1, b2 being Function of Permutations c1,the carrier of c2 holds
( ( for b3 being Element of Permutations c1 holds b1 . b3 = - (the mult of c2 $$ (Path_matrix b3,c3)),b3 ) & ( for b3 being Element of Permutations c1 holds b2 . b3 = - (the mult of c2 $$ (Path_matrix b3,c3)),b3 ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def8 defines Path_product MATRIX_3:def 8 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2
for b4 being Function of Permutations b1,the carrier of b2 holds
( b4 = Path_product b3 iff for b5 being Element of Permutations b1 holds b4 . b5 = - (the mult of b2 $$ (Path_matrix b5,b3)),b5 );

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
func Det c3 -> Element of a2 equals :: MATRIX_3:def 9
the add of a2 $$ (FinOmega (Permutations a1)),(Path_product a3);
coherence
the add of c2 $$ (FinOmega (Permutations c1)),(Path_product c3) is Element of c2
;
end;

:: deftheorem Def9 defines Det MATRIX_3:def 9 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2 holds Det b3 = the add of b2 $$ (FinOmega (Permutations b1)),(Path_product b3);

theorem Th36: :: MATRIX_3:36
for b1 being Field
for b2 being Element of b1 holds Det <*<*b2*>*> = b2
proof end;

definition
let c1 be Nat;
let c2 be Field;
let c3 be Matrix of c1,c2;
func diagonal_of_Matrix c3 -> FinSequence of a2 means :: MATRIX_3:def 10
( len a4 = a1 & ( for b1 being Nat holds
( b1 in Seg a1 implies a4 . b1 = a3 * b1,b1 ) ) );
existence
ex b1 being FinSequence of c2 st
( len b1 = c1 & ( for b2 being Nat holds
( b2 in Seg c1 implies b1 . b2 = c3 * b2,b2 ) ) )
proof end;
uniqueness
for b1, b2 being FinSequence of c2 holds
( len b1 = c1 & ( for b3 being Nat holds
( b3 in Seg c1 implies b1 . b3 = c3 * b3,b3 ) ) & len b2 = c1 & ( for b3 being Nat holds
( b3 in Seg c1 implies b2 . b3 = c3 * b3,b3 ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def10 defines diagonal_of_Matrix MATRIX_3:def 10 :
for b1 being Nat
for b2 being Field
for b3 being Matrix of b1,b2
for b4 being FinSequence of b2 holds
( b4 = diagonal_of_Matrix b3 iff ( len b4 = b1 & ( for b5 being Nat holds
( b5 in Seg b1 implies b4 . b5 = b3 * b5,b5 ) ) ) );