let n be Nat; for K being commutative Ring
for A, B being Matrix of n,K st 0 < n holds
ex P being Function of (Permutations n), the carrier of K st
( Det (A * B) = the addF of K $$ ((In ((Permutations n),(Fin (Permutations n)))),P) & ( for perm being Element of Permutations n holds P . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm)) ) )
let K be commutative Ring; for A, B being Matrix of n,K st 0 < n holds
ex P being Function of (Permutations n), the carrier of K st
( Det (A * B) = the addF of K $$ ((In ((Permutations n),(Fin (Permutations n)))),P) & ( for perm being Element of Permutations n holds P . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm)) ) )
let A, B be Matrix of n,K; ( 0 < n implies ex P being Function of (Permutations n), the carrier of K st
( Det (A * B) = the addF of K $$ ((In ((Permutations n),(Fin (Permutations n)))),P) & ( for perm being Element of Permutations n holds P . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm)) ) ) )
assume A1:
0 < n
; ex P being Function of (Permutations n), the carrier of K st
( Det (A * B) = the addF of K $$ ((In ((Permutations n),(Fin (Permutations n)))),P) & ( for perm being Element of Permutations n holds P . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm)) ) )
set P = Permutations n;
A2:
dom (id (Permutations n)) = Permutations n
;
set KK = the carrier of K;
set mm = the multF of K;
set aa = the addF of K;
set AB = A * B;
set X = Seg n;
set F = Funcs ((Seg n),(Seg n));
consider SUM1 being Function of (Funcs ((Seg n),(Seg n))), the carrier of K such that
A3:
for F being Function of (Seg n),(Seg n) ex Path being FinSequence of K st
( len Path = n & ( for Fj, j being Nat st j in Seg n & Fj = F . j holds
Path . j = A * (j,Fj) ) & SUM1 . F = ( the multF of K $$ Path) * (Det (B * F)) )
and
A4:
Det (A * B) = the addF of K $$ ((In ((Funcs ((Seg n),(Seg n))),(Fin (Funcs ((Seg n),(Seg n)))))),SUM1)
by A1, Th60;
reconsider FP = (Funcs ((Seg n),(Seg n))) \ (Permutations n) as Element of Fin (Funcs ((Seg n),(Seg n))) by FINSUB_1:def 5;
A6:
Permutations n c= Funcs ((Seg n),(Seg n))
then reconsider P9 = Permutations n as Element of Fin (Funcs ((Seg n),(Seg n))) by FINSUB_1:def 5;
Permutations n in Fin (Permutations n)
by FINSUB_1:def 5;
then A7:
Permutations n = In ((Permutations n),(Fin (Permutations n)))
by SUBSET_1:def 8;
Funcs ((Seg n),(Seg n)) in Fin (Funcs ((Seg n),(Seg n)))
by FINSUB_1:def 5;
then A8:
In ((Funcs ((Seg n),(Seg n))),(Fin (Funcs ((Seg n),(Seg n))))) = Funcs ((Seg n),(Seg n))
by SUBSET_1:def 8;
A9:
now Det (A * B) = the addF of K $$ (P9,SUM1)per cases
( FP = {} or FP <> {} )
;
suppose A10:
FP <> {}
;
Det (A * B) = the addF of K $$ (P9,SUM1)A11:
0. K = the_unity_wrt the
addF of
K
by FVSUM_1:7;
A12:
SUM1 .: FP c= {(0. K)}
dom SUM1 = Funcs (
(Seg n),
(Seg n))
by FUNCT_2:def 1;
then
SUM1 .: FP = {(0. K)}
by A10, A12, ZFMISC_1:33;
then A16:
the
addF of
K $$ (
FP,
SUM1)
= 0. K
by A11, FVSUM_1:8, SETWOP_2:8;
A17:
FP misses Permutations n
by XBOOLE_1:79;
A18:
FP \/ (Permutations n) = (Funcs ((Seg n),(Seg n))) \/ (Permutations n)
by XBOOLE_1:39;
(Funcs ((Seg n),(Seg n))) \/ (Permutations n) = Funcs (
(Seg n),
(Seg n))
by A6, XBOOLE_1:12;
hence Det (A * B) =
( the addF of K $$ (P9,SUM1)) + (0. K)
by A4, A8, A16, A17, A18, FVSUM_1:8, SETWOP_2:4
.=
the
addF of
K $$ (
P9,
SUM1)
by RLVECT_1:4
;
verum end; end; end;
dom SUM1 = Funcs ((Seg n),(Seg n))
by FUNCT_2:def 1;
then A19:
dom (SUM1 | (Permutations n)) = Permutations n
by A6, RELAT_1:62;
rng (SUM1 | (Permutations n)) c= the carrier of K
by RELAT_1:def 19;
then reconsider SP = SUM1 | (Permutations n) as Function of (Permutations n), the carrier of K by A19, FUNCT_2:2;
take
SP
; ( Det (A * B) = the addF of K $$ ((In ((Permutations n),(Fin (Permutations n)))),SP) & ( for perm being Element of Permutations n holds SP . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm)) ) )
A20:
rng (id (Permutations n)) = Permutations n
;
SP * (id (Permutations n)) = SP
by A19, RELAT_1:52;
hence
Det (A * B) = the addF of K $$ ((In ((Permutations n),(Fin (Permutations n)))),SP)
by A9, A2, A20, A7, SETWOP_2:5; for perm being Element of Permutations n holds SP . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm))
let perm be Element of Permutations n; SP . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm))
reconsider Perm = perm as Permutation of (Seg n) by MATRIX_1:def 12;
SUM1 . Perm = SP . Perm
by A19, FUNCT_1:47;
then consider Path being FinSequence of K such that
A21:
len Path = n
and
A22:
for Fj, j being Nat st j in Seg n & Fj = Perm . j holds
Path . j = A * (j,Fj)
and
A23:
SP . Perm = ( the multF of K $$ Path) * (Det (B * Perm))
by A3;
set PM = Path_matrix (perm,A);
A24:
len (Path_matrix (perm,A)) = n
by MATRIX_3:def 7;
now for i being Nat st 1 <= i & i <= len Path holds
Path . i = (Path_matrix (perm,A)) . iA25:
Seg n = dom Perm
by FUNCT_2:52;
let i be
Nat;
( 1 <= i & i <= len Path implies Path . i = (Path_matrix (perm,A)) . i )assume that A26:
1
<= i
and A27:
i <= len Path
;
Path . i = (Path_matrix (perm,A)) . iA28:
i in Seg n
by A21, A26, A27;
i in Seg n
by A21, A26, A27;
then A29:
Perm . i in rng Perm
by A25, FUNCT_1:def 3;
rng Perm c= Seg n
by RELAT_1:def 19;
then
Perm . i in Seg n
by A29;
then reconsider Pi =
Perm . i as
Element of
NAT ;
dom (Path_matrix (perm,A)) = Seg n
by A24, FINSEQ_1:def 3;
then
(Path_matrix (perm,A)) . i = A * (
i,
Pi)
by A28, MATRIX_3:def 7;
hence
Path . i = (Path_matrix (perm,A)) . i
by A22, A28;
verum end;
then
Path = Path_matrix (perm,A)
by A21, A24;
hence
SP . perm = ( the multF of K $$ (Path_matrix (perm,A))) * (- ((Det B),perm))
by A23, Th46; verum