:: LAPLACE semantic presentation
begin
theorem Th1: :: LAPLACE:1
for f being FinSequence
for i being Nat st i in dom f holds
len (Del (f,i)) = (len f) -' 1
proof
let f be FinSequence; ::_thesis: for i being Nat st i in dom f holds
len (Del (f,i)) = (len f) -' 1
let i be Nat; ::_thesis: ( i in dom f implies len (Del (f,i)) = (len f) -' 1 )
assume i in dom f ; ::_thesis: len (Del (f,i)) = (len f) -' 1
then ex m being Nat st
( len f = m + 1 & len (Del (f,i)) = m ) by FINSEQ_3:104;
hence len (Del (f,i)) = (len f) -' 1 by NAT_D:34; ::_thesis: verum
end;
theorem Th2: :: LAPLACE:2
for K being Field
for i, j, n being Nat
for M being Matrix of n,K st i in dom M holds
len (Deleting (M,i,j)) = n -' 1
proof
let K be Field; ::_thesis: for i, j, n being Nat
for M being Matrix of n,K st i in dom M holds
len (Deleting (M,i,j)) = n -' 1
let i, j, n be Nat; ::_thesis: for M being Matrix of n,K st i in dom M holds
len (Deleting (M,i,j)) = n -' 1
let M be Matrix of n,K; ::_thesis: ( i in dom M implies len (Deleting (M,i,j)) = n -' 1 )
assume A1: i in dom M ; ::_thesis: len (Deleting (M,i,j)) = n -' 1
A2: len M = n by MATRIX_1:def_2;
thus len (Deleting (M,i,j)) = len (DelLine (M,i)) by MATRIX_2:def_5
.= n -' 1 by A1, A2, Th1 ; ::_thesis: verum
end;
theorem Th3: :: LAPLACE:3
for j being Nat
for K being Field
for A being Matrix of K st j in Seg (width A) holds
width (DelCol (A,j)) = (width A) -' 1
proof
let j be Nat; ::_thesis: for K being Field
for A being Matrix of K st j in Seg (width A) holds
width (DelCol (A,j)) = (width A) -' 1
let K be Field; ::_thesis: for A being Matrix of K st j in Seg (width A) holds
width (DelCol (A,j)) = (width A) -' 1
let A be Matrix of K; ::_thesis: ( j in Seg (width A) implies width (DelCol (A,j)) = (width A) -' 1 )
set DC = DelCol (A,j);
A1: len (DelCol (A,j)) = len A by MATRIX_2:def_5;
assume A2: j in Seg (width A) ; ::_thesis: width (DelCol (A,j)) = (width A) -' 1
then Seg (width A) <> {} ;
then width A <> 0 ;
then len A > 0 by MATRIX_1:def_3;
then consider t being FinSequence such that
A3: t in rng (DelCol (A,j)) and
A4: len t = width (DelCol (A,j)) by A1, MATRIX_1:def_3;
consider k9 being set such that
A5: k9 in dom (DelCol (A,j)) and
A6: (DelCol (A,j)) . k9 = t by A3, FUNCT_1:def_3;
k9 in Seg (len (DelCol (A,j))) by A5, FINSEQ_1:def_3;
then consider k being Element of NAT such that
A7: k9 = k and
1 <= k and
k <= len (DelCol (A,j)) ;
k in dom A by A1, A5, A7, FINSEQ_3:29;
then A8: t = Del ((Line (A,k)),j) by A6, A7, MATRIX_2:def_5;
A9: len (Line (A,k)) = width A by MATRIX_1:def_7;
then dom (Line (A,k)) = Seg (width A) by FINSEQ_1:def_3;
hence width (DelCol (A,j)) = (width A) -' 1 by A2, A4, A9, A8, Th1; ::_thesis: verum
end;
theorem Th4: :: LAPLACE:4
for K being Field
for A being Matrix of K
for i being Nat st len A > 1 holds
width A = width (DelLine (A,i))
proof
let K be Field; ::_thesis: for A being Matrix of K
for i being Nat st len A > 1 holds
width A = width (DelLine (A,i))
let A be Matrix of K; ::_thesis: for i being Nat st len A > 1 holds
width A = width (DelLine (A,i))
let i be Nat; ::_thesis: ( len A > 1 implies width A = width (DelLine (A,i)) )
assume A1: len A > 1 ; ::_thesis: width A = width (DelLine (A,i))
percases ( i in dom A or not i in dom A ) ;
suppose i in dom A ; ::_thesis: width A = width (DelLine (A,i))
then consider m being Nat such that
A2: len A = m + 1 and
A3: len (Del (A,i)) = m by FINSEQ_3:104;
A4: m >= 1 by A1, A2, NAT_1:13;
then A5: m in dom (Del (A,i)) by A3, FINSEQ_3:25;
then A6: (DelLine (A,i)) . m in rng (Del (A,i)) by FUNCT_1:def_3;
A7: rng (Del (A,i)) c= rng A by FINSEQ_3:106;
A8: (DelLine (A,i)) . m = Line ((DelLine (A,i)),m) by A5, MATRIX_2:16;
A is Matrix of len A, width A,K by A1, MATRIX_1:20;
then len (Line ((DelLine (A,i)),m)) = width A by A6, A8, A7, MATRIX_1:def_2;
hence width A = width (DelLine (A,i)) by A3, A4, A6, A8, MATRIX_1:def_3; ::_thesis: verum
end;
suppose not i in dom A ; ::_thesis: width A = width (DelLine (A,i))
hence width A = width (DelLine (A,i)) by FINSEQ_3:104; ::_thesis: verum
end;
end;
end;
theorem Th5: :: LAPLACE:5
for j, n being Nat
for K being Field
for M being Matrix of n,K
for i being Nat st j in Seg (width M) holds
width (Deleting (M,i,j)) = n -' 1
proof
let j, n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K
for i being Nat st j in Seg (width M) holds
width (Deleting (M,i,j)) = n -' 1
let K be Field; ::_thesis: for M being Matrix of n,K
for i being Nat st j in Seg (width M) holds
width (Deleting (M,i,j)) = n -' 1
let M be Matrix of n,K; ::_thesis: for i being Nat st j in Seg (width M) holds
width (Deleting (M,i,j)) = n -' 1
let i be Nat; ::_thesis: ( j in Seg (width M) implies width (Deleting (M,i,j)) = n -' 1 )
assume A1: j in Seg (width M) ; ::_thesis: width (Deleting (M,i,j)) = n -' 1
percases ( ( len M <= 1 & i in dom M ) or len M > 1 or not i in dom M ) ;
supposeA2: ( len M <= 1 & i in dom M ) ; ::_thesis: width (Deleting (M,i,j)) = n -' 1
Seg (width M) <> {} by A1;
then width M <> {} ;
then len M > 0 by MATRIX_1:def_3;
then A3: len M = 1 by A2, NAT_1:25;
A4: len (Deleting (M,i,j)) = n -' 1 by A2, Th2;
len M = n by MATRIX_1:24;
then len (Deleting (M,i,j)) = 0 by A3, A4, XREAL_1:232;
hence width (Deleting (M,i,j)) = n -' 1 by A4, MATRIX_1:def_3; ::_thesis: verum
end;
supposeA5: len M > 1 ; ::_thesis: width (Deleting (M,i,j)) = n -' 1
A6: width M = n by MATRIX_1:24;
width M = width (DelLine (M,i)) by A5, Th4;
hence width (Deleting (M,i,j)) = n -' 1 by A1, A6, Th3; ::_thesis: verum
end;
supposeA7: not i in dom M ; ::_thesis: width (Deleting (M,i,j)) = n -' 1
A8: width M = n by MATRIX_1:24;
DelLine (M,i) = M by A7, FINSEQ_3:104;
hence width (Deleting (M,i,j)) = n -' 1 by A1, A8, Th3; ::_thesis: verum
end;
end;
end;
definition
let G be non empty multMagma ;
let B be Function of [: the carrier of G,NAT:], the carrier of G;
let g be Element of G;
let i be Nat;
:: original: .
redefine funcB . (g,i) -> Element of G;
coherence
B . (g,i) is Element of G
proof
reconsider i = i as Element of NAT by ORDINAL1:def_12;
B . (g,i) is Element of G ;
hence B . (g,i) is Element of G ; ::_thesis: verum
end;
end;
theorem Th6: :: LAPLACE:6
for n being Nat holds card (Permutations n) = n !
proof
let n be Nat; ::_thesis: card (Permutations n) = n !
set P = Permutations n;
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set X = finSeg N;
set PER = { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) } ;
A1: Permutations n c= { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) }
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Permutations n or x in { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) } )
assume x in Permutations n ; ::_thesis: x in { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) }
then x is Permutation of (finSeg N) by MATRIX_2:def_9;
hence x in { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) } ; ::_thesis: verum
end;
{ F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) } c= Permutations n
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) } or x in Permutations n )
assume x in { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) } ; ::_thesis: x in Permutations n
then ex F being Function of (finSeg N),(finSeg N) st
( x = F & F is Permutation of (finSeg N) ) ;
hence x in Permutations n by MATRIX_2:def_9; ::_thesis: verum
end;
then Permutations n = { F where F is Function of (finSeg N),(finSeg N) : F is Permutation of (finSeg N) } by A1, XBOOLE_0:def_10;
hence card (Permutations n) = (card (finSeg N)) ! by CARD_FIN:8
.= n ! by FINSEQ_1:57 ;
::_thesis: verum
end;
theorem Th7: :: LAPLACE:7
for n, i, j being Nat st i in Seg (n + 1) & j in Seg (n + 1) holds
card { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } = n !
proof
let n, i, j be Nat; ::_thesis: ( i in Seg (n + 1) & j in Seg (n + 1) implies card { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } = n ! )
assume that
A1: i in Seg (n + 1) and
A2: j in Seg (n + 1) ; ::_thesis: card { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } = n !
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set n1 = N + 1;
set X = finSeg (N + 1);
set Y = (finSeg (N + 1)) \ {j};
A3: ((finSeg (N + 1)) \ {j}) \/ {j} = finSeg (N + 1) by A2, ZFMISC_1:116;
set X9 = (finSeg (N + 1)) \ {i};
set P1 = Permutations (N + 1);
set F = { p where p is Element of Permutations (N + 1) : p . i = j } ;
set F9 = { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) } ;
A4: ((finSeg (N + 1)) \ {i}) \/ {i} = finSeg (N + 1) by A1, ZFMISC_1:116;
A5: { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) } c= { p where p is Element of Permutations (N + 1) : p . i = j }
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) } or x in { p where p is Element of Permutations (N + 1) : p . i = j } )
assume x in { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) } ; ::_thesis: x in { p where p is Element of Permutations (N + 1) : p . i = j }
then consider f being Function of (finSeg (N + 1)),(finSeg (N + 1)) such that
A6: f = x and
A7: f is one-to-one and
A8: f . i = j by A4, A3;
card (finSeg (N + 1)) = card (finSeg (N + 1)) ;
then f is onto by A7, STIRL2_1:60;
then f in Permutations (N + 1) by A7, MATRIX_2:def_9;
hence x in { p where p is Element of Permutations (N + 1) : p . i = j } by A6, A8; ::_thesis: verum
end;
{ p where p is Element of Permutations (N + 1) : p . i = j } c= { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) }
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { p where p is Element of Permutations (N + 1) : p . i = j } or x in { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) } )
assume x in { p where p is Element of Permutations (N + 1) : p . i = j } ; ::_thesis: x in { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) }
then consider p being Element of Permutations (N + 1) such that
A9: x = p and
A10: p . i = j ;
reconsider p = p as Permutation of (finSeg (N + 1)) by MATRIX_2:def_9;
p . i = j by A10;
hence x in { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) } by A4, A3, A9; ::_thesis: verum
end;
then A11: { p where p is Element of Permutations (N + 1) : p . i = j } = { f where f is Function of (((finSeg (N + 1)) \ {i}) \/ {i}),(((finSeg (N + 1)) \ {j}) \/ {j}) : ( f is one-to-one & f . i = j ) } by A5, XBOOLE_0:def_10;
A12: card (finSeg (N + 1)) = N + 1 by FINSEQ_1:57;
A13: not j in (finSeg (N + 1)) \ {j} by ZFMISC_1:56;
then A14: card (finSeg (N + 1)) = (card ((finSeg (N + 1)) \ {j})) + 1 by A3, CARD_2:41;
A15: not i in (finSeg (N + 1)) \ {i} by ZFMISC_1:56;
then A16: card (finSeg (N + 1)) = (card ((finSeg (N + 1)) \ {i})) + 1 by A4, CARD_2:41;
then ( (finSeg (N + 1)) \ {j} is empty implies (finSeg (N + 1)) \ {i} is empty ) by A14;
hence card { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } = card { f where f is Function of ((finSeg (N + 1)) \ {i}),((finSeg (N + 1)) \ {j}) : f is one-to-one } by A15, A13, A11, CARD_FIN:5
.= ((card ((finSeg (N + 1)) \ {j})) !) / (((card ((finSeg (N + 1)) \ {j})) -' (card ((finSeg (N + 1)) \ {i}))) !) by A16, A14, CARD_FIN:7
.= ((card ((finSeg (N + 1)) \ {j})) !) / 1 by A16, A14, NEWTON:12, XREAL_1:232
.= n ! by A14, A12 ;
::_thesis: verum
end;
theorem Th8: :: LAPLACE:8
for n being Nat
for K being Fanoian Field
for p2 being Element of Permutations (n + 2)
for X, Y being Element of Fin (2Set (Seg (n + 2))) st Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } holds
the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y))
proof
let n be Nat; ::_thesis: for K being Fanoian Field
for p2 being Element of Permutations (n + 2)
for X, Y being Element of Fin (2Set (Seg (n + 2))) st Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } holds
the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y))
let K be Fanoian Field; ::_thesis: for p2 being Element of Permutations (n + 2)
for X, Y being Element of Fin (2Set (Seg (n + 2))) st Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } holds
the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y))
let p2 be Element of Permutations (n + 2); ::_thesis: for X, Y being Element of Fin (2Set (Seg (n + 2))) st Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } holds
the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y))
set n2 = n + 2;
let X, Y be Element of Fin (2Set (Seg (n + 2))); ::_thesis: ( Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } implies the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y)) )
assume A1: Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } ; ::_thesis: the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y))
reconsider ID = id (Seg (n + 2)) as Element of Permutations (n + 2) by MATRIX_2:def_9;
set Y9 = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) } ;
A2: for x being set st x in X holds
(Part_sgn (ID,K)) . x = 1_ K
proof
A3: X c= 2Set (Seg (n + 2)) by FINSUB_1:def_5;
let x be set ; ::_thesis: ( x in X implies (Part_sgn (ID,K)) . x = 1_ K )
assume x in X ; ::_thesis: (Part_sgn (ID,K)) . x = 1_ K
then consider i, j being Nat such that
A4: i in Seg (n + 2) and
A5: j in Seg (n + 2) and
A6: i < j and
A7: x = {i,j} by A3, MATRIX11:1;
A8: ID . j = j by A5, FUNCT_1:17;
ID . i = i by A4, FUNCT_1:17;
hence (Part_sgn (ID,K)) . x = 1_ K by A4, A5, A6, A7, A8, MATRIX11:def_1; ::_thesis: verum
end;
A9: { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) } c= Y
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) } or y in Y )
assume y in { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) } ; ::_thesis: y in Y
then consider s being Element of 2Set (Seg (n + 2)) such that
A10: y = s and
A11: s in X and
A12: (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ;
(Part_sgn (ID,K)) . s = 1_ K by A2, A11;
then (Part_sgn (p2,K)) . s = - (1_ K) by A12, MATRIX11:5;
hence y in Y by A1, A10, A11; ::_thesis: verum
end;
Y c= { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) }
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in Y or y in { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) } )
A13: 1_ K <> - (1_ K) by MATRIX11:22;
assume y in Y ; ::_thesis: y in { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) }
then consider s being Element of 2Set (Seg (n + 2)) such that
A14: s = y and
A15: s in X and
A16: (Part_sgn (p2,K)) . s = - (1_ K) by A1;
(Part_sgn (ID,K)) . s = 1_ K by A2, A15;
hence y in { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) } by A14, A15, A16, A13; ::_thesis: verum
end;
then A17: Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s <> (Part_sgn (ID,K)) . s ) } by A9, XBOOLE_0:def_10;
percases ( (card Y) mod 2 = 0 or (card Y) mod 2 = 1 ) by NAT_D:12;
supposeA18: (card Y) mod 2 = 0 ; ::_thesis: the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y))
then consider t being Nat such that
A19: card Y = (2 * t) + 0 and
0 < 2 by NAT_D:def_2;
t is Element of NAT by ORDINAL1:def_12;
hence (power K) . ((- (1_ K)),(card Y)) = 1_ K by A19, HURWITZ:4
.= the multF of K $$ (X,(Part_sgn (ID,K))) by A2, MATRIX11:4
.= the multF of K $$ (X,(Part_sgn (p2,K))) by A17, A18, MATRIX11:7 ;
::_thesis: verum
end;
supposeA20: (card Y) mod 2 = 1 ; ::_thesis: the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(card Y))
then consider t being Nat such that
A21: card Y = (2 * t) + 1 and
1 < 2 by NAT_D:def_2;
t is Element of NAT by ORDINAL1:def_12;
hence (power K) . ((- (1_ K)),(card Y)) = - (1_ K) by A21, HURWITZ:4
.= - ( the multF of K $$ (X,(Part_sgn (ID,K)))) by A2, MATRIX11:4
.= the multF of K $$ (X,(Part_sgn (p2,K))) by A17, A20, MATRIX11:7 ;
::_thesis: verum
end;
end;
end;
theorem Th9: :: LAPLACE:9
for n being Nat
for K being Fanoian Field
for p2 being Element of Permutations (n + 2)
for i, j being Nat st i in Seg (n + 2) & p2 . i = j holds
ex X being Element of Fin (2Set (Seg (n + 2))) st
( X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 2)) } & the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j)) )
proof
let n be Nat; ::_thesis: for K being Fanoian Field
for p2 being Element of Permutations (n + 2)
for i, j being Nat st i in Seg (n + 2) & p2 . i = j holds
ex X being Element of Fin (2Set (Seg (n + 2))) st
( X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 2)) } & the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j)) )
let K be Fanoian Field; ::_thesis: for p2 being Element of Permutations (n + 2)
for i, j being Nat st i in Seg (n + 2) & p2 . i = j holds
ex X being Element of Fin (2Set (Seg (n + 2))) st
( X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 2)) } & the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j)) )
let p2 be Element of Permutations (n + 2); ::_thesis: for i, j being Nat st i in Seg (n + 2) & p2 . i = j holds
ex X being Element of Fin (2Set (Seg (n + 2))) st
( X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 2)) } & the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j)) )
let i, j be Nat; ::_thesis: ( i in Seg (n + 2) & p2 . i = j implies ex X being Element of Fin (2Set (Seg (n + 2))) st
( X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 2)) } & the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j)) ) )
assume that
A1: i in Seg (n + 2) and
A2: p2 . i = j ; ::_thesis: ex X being Element of Fin (2Set (Seg (n + 2))) st
( X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 2)) } & the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j)) )
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set n2 = N + 2;
reconsider p29 = p2 as Permutation of (finSeg (N + 2)) by MATRIX_2:def_9;
A3: rng p29 = Seg (N + 2) by FUNCT_2:def_3;
1 <= i by A1, FINSEQ_1:1;
then reconsider i1 = i - 1 as Element of NAT by NAT_1:21;
deffunc H1( set ) -> set = {$1,i};
set Ui = (finSeg (N + 2)) \ (Seg i);
set Li = finSeg i1;
set SS = 2Set (Seg (n + 2));
set X = { {k,i} where k is Element of NAT : {k,i} in 2Set (Seg (n + 2)) } ;
A4: { {k,i} where k is Element of NAT : {k,i} in 2Set (Seg (n + 2)) } c= 2Set (Seg (n + 2))
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { {k,i} where k is Element of NAT : {k,i} in 2Set (Seg (n + 2)) } or x in 2Set (Seg (n + 2)) )
assume x in { {k,i} where k is Element of NAT : {k,i} in 2Set (Seg (n + 2)) } ; ::_thesis: x in 2Set (Seg (n + 2))
then ex k being Element of NAT st
( x = {k,i} & {k,i} in 2Set (Seg (N + 2)) ) ;
hence x in 2Set (Seg (n + 2)) ; ::_thesis: verum
end;
then reconsider X = { {k,i} where k is Element of NAT : {k,i} in 2Set (Seg (n + 2)) } as Element of Fin (2Set (Seg (n + 2))) by FINSUB_1:def_5;
set Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } ;
A5: { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } c= X
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } or x in X )
assume x in { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } ; ::_thesis: x in X
then ex s being Element of 2Set (Seg (n + 2)) st
( s = x & s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) ;
hence x in X ; ::_thesis: verum
end;
then A6: { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } c= 2Set (Seg (n + 2)) by A4, XBOOLE_1:1;
dom p29 = Seg (N + 2) by FUNCT_2:52;
then A7: p2 . i in rng p2 by A1, FUNCT_1:def_3;
then 1 <= j by A2, A3, FINSEQ_1:1;
then reconsider j1 = j - 1 as Element of NAT by NAT_1:21;
reconsider Y = { s where s is Element of 2Set (Seg (n + 2)) : ( s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) } as Element of Fin (2Set (Seg (n + 2))) by A6, FINSUB_1:def_5;
consider f being Function such that
A8: ( dom f = (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) & ( for x being set st x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) holds
f . x = H1(x) ) ) from FUNCT_1:sch_3();
A9: f " Y c= dom f by RELAT_1:132;
then reconsider fY = f " Y as finite set by A8;
A10: (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) c= (Seg (N + 2)) \ {i}
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) or x in (Seg (N + 2)) \ {i} )
assume A11: x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) ; ::_thesis: x in (Seg (N + 2)) \ {i}
percases ( x in finSeg i1 or x in (finSeg (N + 2)) \ (Seg i) ) by A11, XBOOLE_0:def_3;
supposeA12: x in finSeg i1 ; ::_thesis: x in (Seg (N + 2)) \ {i}
A13: i <= N + 2 by A1, FINSEQ_1:1;
consider k being Element of NAT such that
A14: x = k and
A15: 1 <= k and
A16: k <= i1 by A12;
A17: i1 < i1 + 1 by NAT_1:13;
then k < i by A16, XXREAL_0:2;
then k <= N + 2 by A13, XXREAL_0:2;
then A18: k in Seg (N + 2) by A15;
not k in {i} by A16, A17, TARSKI:def_1;
hence x in (Seg (N + 2)) \ {i} by A14, A18, XBOOLE_0:def_5; ::_thesis: verum
end;
supposeA19: x in (finSeg (N + 2)) \ (Seg i) ; ::_thesis: x in (Seg (N + 2)) \ {i}
A20: i1 + 1 in Seg i by FINSEQ_1:4;
not x in Seg i by A19, XBOOLE_0:def_5;
then not x in {i} by A20, TARSKI:def_1;
hence x in (Seg (N + 2)) \ {i} by A19, XBOOLE_0:def_5; ::_thesis: verum
end;
end;
end;
for x1, x2 being set st x1 in dom f & x2 in dom f & f . x1 = f . x2 holds
x1 = x2
proof
let x1, x2 be set ; ::_thesis: ( x1 in dom f & x2 in dom f & f . x1 = f . x2 implies x1 = x2 )
assume that
A21: x1 in dom f and
A22: x2 in dom f and
A23: f . x1 = f . x2 ; ::_thesis: x1 = x2
A24: f . x2 = H1(x2) by A8, A22;
not x1 in {i} by A10, A8, A21, XBOOLE_0:def_5;
then A25: x1 <> i by TARSKI:def_1;
f . x1 = H1(x1) by A8, A21;
then x1 in {i,x2} by A23, A24, TARSKI:def_2;
hence x1 = x2 by A25, TARSKI:def_2; ::_thesis: verum
end;
then f is one-to-one by FUNCT_1:def_4;
then f .: fY,fY are_equipotent by A9, CARD_1:33;
then A26: card (f .: fY) = card fY by CARD_1:5;
(finSeg (N + 2)) \ {i} c= (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i))
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in (finSeg (N + 2)) \ {i} or x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) )
assume A27: x in (finSeg (N + 2)) \ {i} ; ::_thesis: x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i))
x in finSeg (N + 2) by A27;
then consider k being Element of NAT such that
A28: x = k and
A29: 1 <= k and
A30: k <= N + 2 ;
not k in {i} by A27, A28, XBOOLE_0:def_5;
then A31: k <> i by TARSKI:def_1;
percases ( k < i1 + 1 or k > i1 + 1 ) by A31, XXREAL_0:1;
suppose k < i1 + 1 ; ::_thesis: x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i))
then k <= i1 by NAT_1:13;
then x in finSeg i1 by A28, A29;
hence x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) by XBOOLE_0:def_3; ::_thesis: verum
end;
suppose k > i1 + 1 ; ::_thesis: x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i))
then A32: not x in Seg i by A28, FINSEQ_1:1;
x in Seg (N + 2) by A28, A29, A30;
then x in (finSeg (N + 2)) \ (Seg i) by A32, XBOOLE_0:def_5;
hence x in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) by XBOOLE_0:def_3; ::_thesis: verum
end;
end;
end;
then A33: (finSeg (N + 2)) \ {i} = (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) by A10, XBOOLE_0:def_10;
A34: rng f c= X
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in rng f or x in X )
assume x in rng f ; ::_thesis: x in X
then consider y being set such that
A35: y in dom f and
A36: f . y = x by FUNCT_1:def_3;
y in finSeg (N + 2) by A33, A8, A35;
then consider k being Element of NAT such that
A37: k = y and
A38: 1 <= k and
A39: k <= N + 2 ;
A40: f . k = {i,k} by A8, A35, A37;
not y in {i} by A10, A8, A35, XBOOLE_0:def_5;
then i <> k by A37, TARSKI:def_1;
then A41: ( k < i or i < k ) by XXREAL_0:1;
k in Seg (N + 2) by A38, A39;
then {i,k} in 2Set (Seg (n + 2)) by A1, A41, MATRIX11:1;
hence x in X by A36, A37, A40; ::_thesis: verum
end;
A42: p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) c= Seg j1
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) or y in Seg j1 )
assume y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) ; ::_thesis: y in Seg j1
then consider x being set such that
A43: x in dom p29 and
A44: x in ((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)) and
A45: p29 . x = y by FUNCT_1:def_6;
dom p29 = Seg (N + 2) by FUNCT_2:52;
then consider k being Element of NAT such that
A46: x = k and
A47: 1 <= k and
A48: k <= N + 2 by A43;
percases ( k in (finSeg i1) \ (f " Y) or k in ((finSeg (N + 2)) \ (Seg i)) /\ (f " Y) ) by A44, A46, XBOOLE_0:def_3;
supposeA49: k in (finSeg i1) \ (f " Y) ; ::_thesis: y in Seg j1
then k <= i1 by FINSEQ_1:1;
then A50: k < i1 + 1 by NAT_1:13;
A51: finSeg i1 c= dom f by A8, XBOOLE_1:7;
A52: k in finSeg i1 by A49;
then A53: f . k in rng f by A51, FUNCT_1:def_3;
not k in f " Y by A49, XBOOLE_0:def_5;
then A54: not f . k in Y by A52, A51, FUNCT_1:def_7;
A55: k in Seg (N + 2) by A47, A48;
dom p29 = Seg (N + 2) by FUNCT_2:52;
then A56: p2 . i <> p2 . k by A1, A50, A55, FUNCT_1:def_4;
A57: f . k = H1(k) by A8, A52, A51;
then H1(k) in X by A34, A53;
then ex m being Element of NAT st
( H1(k) = {m,i} & {m,i} in 2Set (Seg (n + 2)) ) ;
then (Part_sgn (p2,K)) . {k,i} <> - (1_ K) by A34, A54, A53, A57;
then p2 . k <= p2 . i by A1, A50, A55, MATRIX11:def_1;
then p2 . k < j1 + 1 by A2, A56, XXREAL_0:1;
then A58: p2 . k <= j1 by NAT_1:13;
A59: rng p29 = Seg (N + 2) by FUNCT_2:def_3;
p2 . k in rng p29 by A43, A46, FUNCT_1:def_3;
then 1 <= p2 . k by A59, FINSEQ_1:1;
hence y in Seg j1 by A45, A46, A58, FINSEQ_1:1; ::_thesis: verum
end;
supposeA60: k in ((finSeg (N + 2)) \ (Seg i)) /\ (f " Y) ; ::_thesis: y in Seg j1
then k in (finSeg (N + 2)) \ (Seg i) by XBOOLE_0:def_4;
then A61: not k in Seg i by XBOOLE_0:def_5;
1 <= k by A60, FINSEQ_1:1;
then A62: i < k by A61;
A63: k in f " Y by A60, XBOOLE_0:def_4;
then f . k in Y by FUNCT_1:def_7;
then consider s being Element of 2Set (Seg (n + 2)) such that
A64: s = f . k and
s in X and
A65: (Part_sgn (p2,K)) . s = - (1_ K) ;
k in dom f by A63, FUNCT_1:def_7;
then A66: s = {i,k} by A8, A64;
dom p29 = finSeg (N + 2) by FUNCT_2:52;
then A67: p29 . i <> p2 . k by A1, A60, A62, FUNCT_1:def_4;
1_ K <> - (1_ K) by MATRIX11:22;
then p2 . i >= p2 . k by A1, A60, A65, A66, A62, MATRIX11:def_1;
then p2 . k < j1 + 1 by A2, A67, XXREAL_0:1;
then A68: p2 . k <= j1 by NAT_1:13;
A69: rng p29 = Seg (N + 2) by FUNCT_2:def_3;
p2 . k in rng p29 by A43, A46, FUNCT_1:def_3;
then 1 <= p2 . k by A69, FINSEQ_1:1;
hence y in Seg j1 by A45, A46, A68, FINSEQ_1:1; ::_thesis: verum
end;
end;
end;
take X ; ::_thesis: ( X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 2)) } & the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j)) )
reconsider I = i, J = j as Element of NAT by ORDINAL1:def_12;
set P = power K;
thus X = { {e,i} where e is Element of NAT : {e,i} in 2Set (Seg (n + 2)) } ; ::_thesis: the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j))
A70: (finSeg i1) /\ (f " Y) c= finSeg i1 by XBOOLE_1:17;
Seg j1 c= p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)))
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in Seg j1 or y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) )
assume A71: y in Seg j1 ; ::_thesis: y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)))
consider k being Element of NAT such that
A72: y = k and
1 <= k and
A73: k <= j1 by A71;
A74: j1 < j1 + 1 by NAT_1:13;
then A75: k < j by A73, XXREAL_0:2;
j <= N + 2 by A2, A7, A3, FINSEQ_1:1;
then j1 <= N + 2 by A74, XXREAL_0:2;
then Seg j1 c= Seg (N + 2) by FINSEQ_1:5;
then consider x being set such that
A76: x in dom p29 and
A77: y = p29 . x by A3, A71, FUNCT_1:def_3;
A78: not x in {i} by A2, A72, A73, A74, A77, TARSKI:def_1;
then A79: x in dom f by A33, A8, A76, XBOOLE_0:def_5;
then A80: f . x = H1(x) by A8;
A81: f . x in rng f by A79, FUNCT_1:def_3;
then H1(x) in X by A34, A80;
then consider m being Element of NAT such that
A82: H1(x) = {m,i} and
A83: {m,i} in 2Set (Seg (N + 2)) ;
A84: m <> i by A83, SGRAPH1:10;
A85: m in Seg (N + 2) by A83, SGRAPH1:10;
m in {x,i} by A82, TARSKI:def_2;
then A86: m = x by A84, TARSKI:def_2;
percases ( m < i or m > i ) by A83, SGRAPH1:10, XXREAL_0:1;
supposeA87: m < i ; ::_thesis: y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)))
A88: not m in f " Y
proof
assume m in f " Y ; ::_thesis: contradiction
then {m,i} in Y by A80, A86, FUNCT_1:def_7;
then A89: ex s being Element of 2Set (Seg (n + 2)) st
( s = {m,i} & s in X & (Part_sgn (p2,K)) . s = - (1_ K) ) ;
(Part_sgn (p2,K)) . {m,i} = 1_ K by A1, A2, A72, A75, A76, A77, A86, A87, MATRIX11:def_1;
hence contradiction by A89, MATRIX11:22; ::_thesis: verum
end;
m < i1 + 1 by A87;
then A90: m <= i1 by NAT_1:13;
1 <= m by A85, FINSEQ_1:1;
then m in finSeg i1 by A90;
then x in (finSeg i1) \ (f " Y) by A86, A88, XBOOLE_0:def_5;
then x in ((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)) by XBOOLE_0:def_3;
hence y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) by A76, A77, FUNCT_1:def_6; ::_thesis: verum
end;
supposeA91: m > i ; ::_thesis: y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)))
then not m in Seg i by FINSEQ_1:1;
then A92: x in (finSeg (N + 2)) \ (Seg i) by A86, A85, XBOOLE_0:def_5;
(Part_sgn (p2,K)) . {m,i} = - (1_ K) by A1, A2, A72, A75, A76, A77, A86, A91, MATRIX11:def_1;
then A93: f . x in Y by A34, A80, A81, A82, A83;
x in dom f by A33, A8, A76, A78, XBOOLE_0:def_5;
then x in f " Y by A93, FUNCT_1:def_7;
then x in ((finSeg (N + 2)) \ (Seg i)) /\ (f " Y) by A92, XBOOLE_0:def_4;
then x in ((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)) by XBOOLE_0:def_3;
hence y in p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) by A76, A77, FUNCT_1:def_6; ::_thesis: verum
end;
end;
end;
then A94: Seg j1 = p29 .: (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) by A42, XBOOLE_0:def_10;
A95: Seg (N + 2) = dom p29 by FUNCT_2:52;
A96: (finSeg i1) \ (f " Y) = (finSeg i1) \ ((f " Y) /\ (finSeg i1)) by XBOOLE_1:47;
i1 < i1 + 1 by NAT_1:13;
then finSeg i1 c= Seg i by FINSEQ_1:5;
then A97: finSeg i1 misses (finSeg (N + 2)) \ (Seg i) by XBOOLE_1:64, XBOOLE_1:79;
X c= rng f
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in X or x in rng f )
assume x in X ; ::_thesis: x in rng f
then consider k being Element of NAT such that
A98: x = {k,i} and
A99: {k,i} in 2Set (Seg (n + 2)) ;
k <> i by A99, SGRAPH1:10;
then A100: not k in {i} by TARSKI:def_1;
k in Seg (N + 2) by A99, SGRAPH1:10;
then A101: k in (finSeg i1) \/ ((finSeg (N + 2)) \ (Seg i)) by A33, A100, XBOOLE_0:def_5;
then f . k = H1(k) by A8;
hence x in rng f by A8, A98, A101, FUNCT_1:def_3; ::_thesis: verum
end;
then X = rng f by A34, XBOOLE_0:def_10;
then A102: f .: fY = Y by A5, FUNCT_1:77;
((finSeg i1) /\ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)) = (dom f) /\ (f " Y) by A8, XBOOLE_1:23;
then A103: ((finSeg i1) /\ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)) = f " Y by RELAT_1:132, XBOOLE_1:28;
A104: ((finSeg (N + 2)) \ (Seg i)) /\ (f " Y) c= (finSeg (N + 2)) \ (Seg i) by XBOOLE_1:17;
then ((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)) c= (finSeg (N + 2)) \ {i} by A33, XBOOLE_1:13;
then finSeg j1,((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y)) are_equipotent by A95, A94, CARD_1:33, XBOOLE_1:1;
then A105: card (finSeg j1) = card (((finSeg i1) \ (f " Y)) \/ (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) by CARD_1:5
.= (card ((finSeg i1) \ ((f " Y) /\ (finSeg i1)))) + (card (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) by A97, A104, A96, CARD_2:40, XBOOLE_1:64
.= ((card (finSeg i1)) - (card ((f " Y) /\ (finSeg i1)))) + (card (((finSeg (N + 2)) \ (Seg i)) /\ (f " Y))) by CARD_2:44, XBOOLE_1:17 ;
percases ( j > i or j <= i ) ;
suppose j > i ; ::_thesis: the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j))
then reconsider ji = j - i as Element of NAT by NAT_1:21;
card Y = (((card ((finSeg i1) /\ fY)) + (card (finSeg j1))) - (card (finSeg i1))) + (card (fY /\ (finSeg i1))) by A97, A70, A104, A103, A26, A102, A105, CARD_2:40, XBOOLE_1:64
.= ((2 * (card ((finSeg i1) /\ fY))) + (card (finSeg j1))) - (card (finSeg i1))
.= ((2 * (card ((finSeg i1) /\ fY))) + j1) - (card (finSeg i1)) by FINSEQ_1:57
.= ((2 * (card ((finSeg i1) /\ fY))) + j1) - i1 by FINSEQ_1:57
.= (2 * (card ((finSeg i1) /\ fY))) + ji ;
hence the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),((2 * (card ((finSeg i1) /\ fY))) + ji)) by Th8
.= ((power K) . ((- (1_ K)),(2 * (card ((finSeg i1) /\ fY))))) * ((power K) . ((- (1_ K)),ji)) by HURWITZ:3
.= (1_ K) * ((power K) . ((- (1_ K)),ji)) by HURWITZ:4
.= ((power K) . ((- (1_ K)),(2 * I))) * ((power K) . ((- (1_ K)),ji)) by HURWITZ:4
.= (power K) . ((- (1_ K)),((2 * i) + ji)) by HURWITZ:3
.= (power K) . ((- (1_ K)),(i + j)) ;
::_thesis: verum
end;
suppose j <= i ; ::_thesis: the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),(i + j))
then reconsider ij = i - j as Element of NAT by NAT_1:21;
card Y = (((card (finSeg i1)) + (card (((finSeg (N + 2)) \ (Seg i)) /\ fY))) - (card (finSeg j1))) + (card (((finSeg (N + 2)) \ (Seg i)) /\ fY)) by A97, A70, A104, A103, A26, A102, A105, CARD_2:40, XBOOLE_1:64
.= ((2 * (card (((finSeg (N + 2)) \ (Seg i)) /\ fY))) - (card (finSeg j1))) + (card (finSeg i1))
.= ((2 * (card (((finSeg (N + 2)) \ (Seg i)) /\ fY))) - j1) + (card (finSeg i1)) by FINSEQ_1:57
.= ((2 * (card (((finSeg (N + 2)) \ (Seg i)) /\ fY))) - j1) + i1 by FINSEQ_1:57
.= (2 * (card (((finSeg (N + 2)) \ (Seg i)) /\ fY))) + ij ;
hence the multF of K $$ (X,(Part_sgn (p2,K))) = (power K) . ((- (1_ K)),((2 * (card (((finSeg (N + 2)) \ (Seg i)) /\ fY))) + ij)) by Th8
.= ((power K) . ((- (1_ K)),(2 * (card (((finSeg (N + 2)) \ (Seg i)) /\ fY))))) * ((power K) . ((- (1_ K)),ij)) by HURWITZ:3
.= (1_ K) * ((power K) . ((- (1_ K)),ij)) by HURWITZ:4
.= ((power K) . ((- (1_ K)),(2 * J))) * ((power K) . ((- (1_ K)),ij)) by HURWITZ:4
.= (power K) . ((- (1_ K)),((2 * j) + ij)) by HURWITZ:3
.= (power K) . ((- (1_ K)),(i + j)) ;
::_thesis: verum
end;
end;
end;
theorem Th10: :: LAPLACE:10
for n, i, j being Nat st i in Seg (n + 1) & n >= 2 holds
ex Proj being Function of (2Set (Seg n)),(2Set (Seg (n + 1))) st
( rng Proj = (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & Proj is one-to-one & ( for k, m being Nat st k < m & {k,m} in 2Set (Seg n) holds
( ( m < i & k < i implies Proj . {k,m} = {k,m} ) & ( m >= i & k < i implies Proj . {k,m} = {k,(m + 1)} ) & ( m >= i & k >= i implies Proj . {k,m} = {(k + 1),(m + 1)} ) ) ) )
proof
let n be Nat; ::_thesis: for i, j being Nat st i in Seg (n + 1) & n >= 2 holds
ex Proj being Function of (2Set (Seg n)),(2Set (Seg (n + 1))) st
( rng Proj = (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & Proj is one-to-one & ( for k, m being Nat st k < m & {k,m} in 2Set (Seg n) holds
( ( m < i & k < i implies Proj . {k,m} = {k,m} ) & ( m >= i & k < i implies Proj . {k,m} = {k,(m + 1)} ) & ( m >= i & k >= i implies Proj . {k,m} = {(k + 1),(m + 1)} ) ) ) )
let i, j be Nat; ::_thesis: ( i in Seg (n + 1) & n >= 2 implies ex Proj being Function of (2Set (Seg n)),(2Set (Seg (n + 1))) st
( rng Proj = (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & Proj is one-to-one & ( for k, m being Nat st k < m & {k,m} in 2Set (Seg n) holds
( ( m < i & k < i implies Proj . {k,m} = {k,m} ) & ( m >= i & k < i implies Proj . {k,m} = {k,(m + 1)} ) & ( m >= i & k >= i implies Proj . {k,m} = {(k + 1),(m + 1)} ) ) ) ) )
assume that
A1: i in Seg (n + 1) and
A2: n >= 2 ; ::_thesis: ex Proj being Function of (2Set (Seg n)),(2Set (Seg (n + 1))) st
( rng Proj = (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & Proj is one-to-one & ( for k, m being Nat st k < m & {k,m} in 2Set (Seg n) holds
( ( m < i & k < i implies Proj . {k,m} = {k,m} ) & ( m >= i & k < i implies Proj . {k,m} = {k,(m + 1)} ) & ( m >= i & k >= i implies Proj . {k,m} = {(k + 1),(m + 1)} ) ) ) )
defpred S1[ set , set ] means for k, m being Nat st {k,m} = $1 & k < m holds
( ( m < i & k < i implies $2 = {k,m} ) & ( m >= i & k < i implies $2 = {k,(m + 1)} ) & ( m >= i & k >= i implies $2 = {(k + 1),(m + 1)} ) );
set X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } ;
set SS = 2Set (Seg n);
set n1 = n + 1;
set SS1 = 2Set (Seg (n + 1));
A3: for k, m being Nat holds
( not {k,m} in { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } or k = i or m = i )
proof
let k, m be Nat; ::_thesis: ( not {k,m} in { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } or k = i or m = i )
assume {k,m} in { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } ; ::_thesis: ( k = i or m = i )
then consider m1 being Element of NAT such that
A4: {k,m} = {m1,i} and
{m1,i} in 2Set (Seg (n + 1)) ;
i in {i,m1} by TARSKI:def_2;
hence ( k = i or m = i ) by A4, TARSKI:def_2; ::_thesis: verum
end;
A5: for x being set st x in 2Set (Seg n) holds
ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] )
proof
n <= n + 1 by NAT_1:11;
then A6: Seg n c= Seg (n + 1) by FINSEQ_1:5;
reconsider N = n as Element of NAT by ORDINAL1:def_12;
let x be set ; ::_thesis: ( x in 2Set (Seg n) implies ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] ) )
assume x in 2Set (Seg n) ; ::_thesis: ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] )
then consider k, m being Nat such that
A7: k in Seg n and
A8: m in Seg n and
A9: k < m and
A10: x = {k,m} by MATRIX11:1;
A11: m + 1 in Seg (N + 1) by A8, FINSEQ_1:60;
reconsider e = k as Element of NAT by ORDINAL1:def_12;
A12: e + 1 in Seg (N + 1) by A7, FINSEQ_1:60;
percases ( ( m < i & k < i ) or ( m >= i & k < i ) or ( m < i & k >= i ) or ( m >= i & k >= i ) ) ;
supposeA13: ( m < i & k < i ) ; ::_thesis: ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] )
then A14: not {k,m} in { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } by A3;
{k,m} in 2Set (Seg (n + 1)) by A7, A8, A9, A6, MATRIX11:1;
then A15: {k,m} in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } by A14, XBOOLE_0:def_5;
S1[{k,m},{k,m}] by A13, ZFMISC_1:6;
hence ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] ) by A10, A15; ::_thesis: verum
end;
supposeA16: ( m >= i & k < i ) ; ::_thesis: ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] )
A17: S1[{k,m},{k,(m + 1)}]
proof
let k9, m9 be Nat; ::_thesis: ( {k9,m9} = {k,m} & k9 < m9 implies ( ( m9 < i & k9 < i implies {k,(m + 1)} = {k9,m9} ) & ( m9 >= i & k9 < i implies {k,(m + 1)} = {k9,(m9 + 1)} ) & ( m9 >= i & k9 >= i implies {k,(m + 1)} = {(k9 + 1),(m9 + 1)} ) ) )
assume that
A18: {k9,m9} = {k,m} and
k9 < m9 ; ::_thesis: ( ( m9 < i & k9 < i implies {k,(m + 1)} = {k9,m9} ) & ( m9 >= i & k9 < i implies {k,(m + 1)} = {k9,(m9 + 1)} ) & ( m9 >= i & k9 >= i implies {k,(m + 1)} = {(k9 + 1),(m9 + 1)} ) )
( k9 = k or k9 = m ) by A18, ZFMISC_1:6;
hence ( ( m9 < i & k9 < i implies {k,(m + 1)} = {k9,m9} ) & ( m9 >= i & k9 < i implies {k,(m + 1)} = {k9,(m9 + 1)} ) & ( m9 >= i & k9 >= i implies {k,(m + 1)} = {(k9 + 1),(m9 + 1)} ) ) by A16, A18, ZFMISC_1:6; ::_thesis: verum
end;
m + 1 > i by A16, NAT_1:13;
then A19: not {k,(m + 1)} in { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } by A3, A16;
m + 1 > k by A9, NAT_1:13;
then {k,(m + 1)} in 2Set (Seg (n + 1)) by A7, A6, A11, MATRIX11:1;
then {k,(m + 1)} in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } by A19, XBOOLE_0:def_5;
hence ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] ) by A10, A17; ::_thesis: verum
end;
suppose ( m < i & k >= i ) ; ::_thesis: ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] )
hence ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] ) by A9, XXREAL_0:2; ::_thesis: verum
end;
supposeA20: ( m >= i & k >= i ) ; ::_thesis: ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] )
A21: S1[{k,m},{(k + 1),(m + 1)}]
proof
let k9, m9 be Nat; ::_thesis: ( {k9,m9} = {k,m} & k9 < m9 implies ( ( m9 < i & k9 < i implies {(k + 1),(m + 1)} = {k9,m9} ) & ( m9 >= i & k9 < i implies {(k + 1),(m + 1)} = {k9,(m9 + 1)} ) & ( m9 >= i & k9 >= i implies {(k + 1),(m + 1)} = {(k9 + 1),(m9 + 1)} ) ) )
assume that
A22: {k9,m9} = {k,m} and
A23: k9 < m9 ; ::_thesis: ( ( m9 < i & k9 < i implies {(k + 1),(m + 1)} = {k9,m9} ) & ( m9 >= i & k9 < i implies {(k + 1),(m + 1)} = {k9,(m9 + 1)} ) & ( m9 >= i & k9 >= i implies {(k + 1),(m + 1)} = {(k9 + 1),(m9 + 1)} ) )
( k9 = k or k9 = m ) by A22, ZFMISC_1:6;
hence ( ( m9 < i & k9 < i implies {(k + 1),(m + 1)} = {k9,m9} ) & ( m9 >= i & k9 < i implies {(k + 1),(m + 1)} = {k9,(m9 + 1)} ) & ( m9 >= i & k9 >= i implies {(k + 1),(m + 1)} = {(k9 + 1),(m9 + 1)} ) ) by A20, A22, A23, ZFMISC_1:6; ::_thesis: verum
end;
A24: k + 1 > i by A20, NAT_1:13;
m + 1 > k + 1 by A9, XREAL_1:8;
then A25: {(k + 1),(m + 1)} in 2Set (Seg (n + 1)) by A11, A12, MATRIX11:1;
m + 1 > i by A20, NAT_1:13;
then not {(k + 1),(m + 1)} in { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } by A3, A24;
then {(k + 1),(m + 1)} in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } by A25, XBOOLE_0:def_5;
hence ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[x,y] ) by A10, A21; ::_thesis: verum
end;
end;
end;
consider f being Function of (2Set (Seg n)),((2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } ) such that
A26: for x being set st x in 2Set (Seg n) holds
S1[x,f . x] from FUNCT_2:sch_1(A5);
ex y being set st
( y in (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & S1[{1,2},y] ) by A2, A5, MATRIX11:3;
then reconsider SSX = (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } as non empty set ;
reconsider f = f as Function of (2Set (Seg n)),SSX ;
A27: SSX c= rng f
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in SSX or x in rng f )
assume A28: x in SSX ; ::_thesis: x in rng f
consider k, m being Nat such that
A29: k in Seg (n + 1) and
A30: m in Seg (n + 1) and
A31: k < m and
A32: x = {k,m} by A28, MATRIX11:1;
A33: ( k <> i & m <> i )
proof
assume ( k = i or m = i ) ; ::_thesis: contradiction
then x in { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } by A28, A29, A30, A32;
hence contradiction by A28, XBOOLE_0:def_5; ::_thesis: verum
end;
A34: 1 <= m by A30, FINSEQ_1:1;
1 <= k by A29, FINSEQ_1:1;
then reconsider k1 = k - 1, m1 = m - 1 as Element of NAT by A34, NAT_1:21;
reconsider m9 = m, k9 = k as Element of NAT by ORDINAL1:def_12;
percases ( ( k < i & m < i ) or ( k > i & m < i ) or ( k < i & m > i ) or ( k > i & m > i ) ) by A33, XXREAL_0:1;
supposeA35: ( k < i & m < i ) ; ::_thesis: x in rng f
A36: i <= n + 1 by A1, FINSEQ_1:1;
then k < n + 1 by A35, XXREAL_0:2;
then A37: k <= n by NAT_1:13;
m < n + 1 by A35, A36, XXREAL_0:2;
then A38: m <= n by NAT_1:13;
1 <= m by A30, FINSEQ_1:1;
then A39: m in Seg n by A38, FINSEQ_1:1;
A40: dom f = 2Set (Seg n) by FUNCT_2:def_1;
1 <= k by A29, FINSEQ_1:1;
then k in Seg n by A37, FINSEQ_1:1;
then A41: {k9,m9} in 2Set (Seg n) by A31, A39, MATRIX11:1;
then x = f . x by A26, A31, A32, A35;
hence x in rng f by A32, A41, A40, FUNCT_1:def_3; ::_thesis: verum
end;
suppose ( k > i & m < i ) ; ::_thesis: x in rng f
hence x in rng f by A31, XXREAL_0:2; ::_thesis: verum
end;
supposeA42: ( k < i & m > i ) ; ::_thesis: x in rng f
1 <= i by A1, FINSEQ_1:1;
then A43: 1 < m1 + 1 by A42, XXREAL_0:2;
then A44: i <= m1 by A42, NAT_1:13;
then A45: k < m1 by A42, XXREAL_0:2;
i <= n + 1 by A1, FINSEQ_1:1;
then k < n + 1 by A42, XXREAL_0:2;
then A46: k <= n by NAT_1:13;
A47: dom f = 2Set (Seg n) by FUNCT_2:def_1;
m1 + 1 <= n + 1 by A30, FINSEQ_1:1;
then m1 < n + 1 by NAT_1:13;
then A48: m1 <= n by NAT_1:13;
1 <= m1 by A43, NAT_1:13;
then A49: m1 in Seg n by A48;
1 <= k by A29, FINSEQ_1:1;
then k in Seg n by A46, FINSEQ_1:1;
then A50: {k9,m1} in 2Set (Seg n) by A49, A45, MATRIX11:1;
then f . {k9,m1} = {k9,(m1 + 1)} by A26, A42, A44, A45;
hence x in rng f by A32, A50, A47, FUNCT_1:def_3; ::_thesis: verum
end;
supposeA51: ( k > i & m > i ) ; ::_thesis: x in rng f
k1 + 1 <= n + 1 by A29, FINSEQ_1:1;
then k1 < n + 1 by NAT_1:13;
then A52: k1 <= n by NAT_1:13;
A53: dom f = 2Set (Seg n) by FUNCT_2:def_1;
m1 + 1 <= n + 1 by A30, FINSEQ_1:1;
then m1 < n + 1 by NAT_1:13;
then A54: m1 <= n by NAT_1:13;
A55: k1 < m1 by A31, XREAL_1:9;
A56: 1 <= i by A1, FINSEQ_1:1;
then A57: 1 < m1 + 1 by A51, XXREAL_0:2;
A58: 1 < k1 + 1 by A51, A56, XXREAL_0:2;
then A59: i <= k1 by A51, NAT_1:13;
1 <= k1 by A58, NAT_1:13;
then A60: k1 in Seg n by A52;
1 <= m1 by A57, NAT_1:13;
then m1 in Seg n by A54;
then A61: {k1,m1} in 2Set (Seg n) by A60, A55, MATRIX11:1;
i <= m1 by A51, A57, NAT_1:13;
then f . {k1,m1} = {(k1 + 1),(m1 + 1)} by A26, A59, A55, A61;
hence x in rng f by A32, A61, A53, FUNCT_1:def_3; ::_thesis: verum
end;
end;
end;
A62: rng f c= SSX by RELAT_1:def_19;
then A63: SSX = rng f by A27, XBOOLE_0:def_10;
dom f = 2Set (Seg n) by FUNCT_2:def_1;
then reconsider f = f as Function of (2Set (Seg n)),(2Set (Seg (n + 1))) by A63, FUNCT_2:2;
take f ; ::_thesis: ( rng f = (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & f is one-to-one & ( for k, m being Nat st k < m & {k,m} in 2Set (Seg n) holds
( ( m < i & k < i implies f . {k,m} = {k,m} ) & ( m >= i & k < i implies f . {k,m} = {k,(m + 1)} ) & ( m >= i & k >= i implies f . {k,m} = {(k + 1),(m + 1)} ) ) ) )
for x1, x2 being set st x1 in 2Set (Seg n) & x2 in 2Set (Seg n) & f . x1 = f . x2 holds
x1 = x2
proof
let x1, x2 be set ; ::_thesis: ( x1 in 2Set (Seg n) & x2 in 2Set (Seg n) & f . x1 = f . x2 implies x1 = x2 )
assume that
A64: x1 in 2Set (Seg n) and
A65: x2 in 2Set (Seg n) and
A66: f . x1 = f . x2 ; ::_thesis: x1 = x2
consider k2, m2 being Nat such that
k2 in Seg n and
m2 in Seg n and
A67: k2 < m2 and
A68: x2 = {k2,m2} by A65, MATRIX11:1;
consider k1, m1 being Nat such that
k1 in Seg n and
m1 in Seg n and
A69: k1 < m1 and
A70: x1 = {k1,m1} by A64, MATRIX11:1;
reconsider m1 = m1, m2 = m2, k1 = k1, k2 = k2 as Element of NAT by ORDINAL1:def_12;
percases ( ( k1 < i & m1 < i & k2 < i & m2 < i ) or ( k1 < i & m1 < i & ( k2 < i or k2 >= i ) & m2 >= i ) or ( k1 < i & m1 >= i & k2 < i & m2 >= i ) or ( k1 < i & m1 >= i & ( ( k2 >= i & m2 >= i ) or ( k2 < i & m2 < i ) ) ) or ( k1 >= i & m1 < i ) or ( k2 >= i & m2 < i ) or ( k1 >= i & m1 >= i & k2 >= i & m2 >= i ) or ( k1 >= i & m1 >= i & ( ( k2 < i & m2 < i ) or ( k2 < i & m2 >= i ) ) ) ) ;
supposeA71: ( k1 < i & m1 < i & k2 < i & m2 < i ) ; ::_thesis: x1 = x2
then f . x1 = x1 by A26, A64, A69, A70;
hence x1 = x2 by A26, A65, A66, A67, A68, A71; ::_thesis: verum
end;
supposeA72: ( k1 < i & m1 < i & ( k2 < i or k2 >= i ) & m2 >= i ) ; ::_thesis: x1 = x2
then A73: ( f . x2 = {k2,(m2 + 1)} or f . x2 = {(k2 + 1),(m2 + 1)} ) by A26, A65, A67, A68;
f . x1 = {k1,m1} by A26, A64, A69, A70, A72;
then ( ( ( k1 = k2 or k1 = m2 + 1 ) & ( m1 = k2 or m1 = m2 + 1 ) ) or ( ( k1 = k2 + 1 or k1 = m2 + 1 ) & ( m1 = k2 + 1 or m1 = m2 + 1 ) ) ) by A66, A73, ZFMISC_1:6;
hence x1 = x2 by A69, A72, NAT_1:13; ::_thesis: verum
end;
supposeA74: ( k1 < i & m1 >= i & k2 < i & m2 >= i ) ; ::_thesis: x1 = x2
then A75: f . x2 = {k2,(m2 + 1)} by A26, A65, A67, A68;
A76: f . x1 = {k1,(m1 + 1)} by A26, A64, A69, A70, A74;
then A77: ( m1 + 1 = k2 or m1 + 1 = m2 + 1 ) by A66, A75, ZFMISC_1:6;
( k1 = k2 or k1 = m2 + 1 ) by A66, A76, A75, ZFMISC_1:6;
hence x1 = x2 by A70, A68, A74, A77, NAT_1:13; ::_thesis: verum
end;
supposeA78: ( k1 < i & m1 >= i & ( ( k2 >= i & m2 >= i ) or ( k2 < i & m2 < i ) ) ) ; ::_thesis: x1 = x2
then A79: ( f . x2 = {(k2 + 1),(m2 + 1)} or f . x2 = {k2,m2} ) by A26, A65, A67, A68;
f . x1 = {k1,(m1 + 1)} by A26, A64, A69, A70, A78;
then ( ( ( k1 = k2 + 1 or k1 = m2 + 1 ) & ( m1 + 1 = k2 + 1 or m1 + 1 = m2 + 1 ) ) or ( ( k1 = k2 or k1 = m2 ) & ( m1 + 1 = k2 or m1 + 1 = m2 ) ) ) by A66, A79, ZFMISC_1:6;
hence x1 = x2 by A78, NAT_1:13; ::_thesis: verum
end;
suppose ( ( k1 >= i & m1 < i ) or ( k2 >= i & m2 < i ) ) ; ::_thesis: x1 = x2
hence x1 = x2 by A69, A67, XXREAL_0:2; ::_thesis: verum
end;
supposeA80: ( k1 >= i & m1 >= i & k2 >= i & m2 >= i ) ; ::_thesis: x1 = x2
then A81: f . x2 = {(k2 + 1),(m2 + 1)} by A26, A65, A67, A68;
A82: f . x1 = {(k1 + 1),(m1 + 1)} by A26, A64, A69, A70, A80;
then A83: ( m1 + 1 = k2 + 1 or m1 + 1 = m2 + 1 ) by A66, A81, ZFMISC_1:6;
( k1 + 1 = k2 + 1 or k1 + 1 = m2 + 1 ) by A66, A82, A81, ZFMISC_1:6;
hence x1 = x2 by A69, A70, A68, A83; ::_thesis: verum
end;
supposeA84: ( k1 >= i & m1 >= i & ( ( k2 < i & m2 < i ) or ( k2 < i & m2 >= i ) ) ) ; ::_thesis: x1 = x2
then A85: ( f . x2 = {k2,m2} or f . x2 = {k2,(m2 + 1)} ) by A26, A65, A67, A68;
f . x1 = {(k1 + 1),(m1 + 1)} by A26, A64, A69, A70, A84;
then ( ( ( k1 + 1 = k2 or k1 + 1 = m2 ) & ( m1 + 1 = k2 or m1 + 1 = m2 ) ) or ( ( k1 + 1 = k2 or k1 + 1 = m2 + 1 ) & ( m1 + 1 = k2 or m1 + 1 = m2 + 1 ) ) ) by A66, A85, ZFMISC_1:6;
hence x1 = x2 by A69, A84, NAT_1:13; ::_thesis: verum
end;
end;
end;
hence ( rng f = (2Set (Seg (n + 1))) \ { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n + 1)) } & f is one-to-one & ( for k, m being Nat st k < m & {k,m} in 2Set (Seg n) holds
( ( m < i & k < i implies f . {k,m} = {k,m} ) & ( m >= i & k < i implies f . {k,m} = {k,(m + 1)} ) & ( m >= i & k >= i implies f . {k,m} = {(k + 1),(m + 1)} ) ) ) ) by A26, A27, A62, FUNCT_2:19, XBOOLE_0:def_10; ::_thesis: verum
end;
theorem Th11: :: LAPLACE:11
for n being Nat st n < 2 holds
for p being Element of Permutations n holds
( p is even & p = idseq n )
proof
let n be Nat; ::_thesis: ( n < 2 implies for p being Element of Permutations n holds
( p is even & p = idseq n ) )
assume A1: n < 2 ; ::_thesis: for p being Element of Permutations n holds
( p is even & p = idseq n )
let p be Element of Permutations n; ::_thesis: ( p is even & p = idseq n )
reconsider P = p as Permutation of (Seg n) by MATRIX_2:def_9;
now__::_thesis:_(_p_is_even_&_p_=_idseq_n_)
percases ( n = 0 or n = 1 ) by A1, NAT_1:23;
supposeA2: n = 0 ; ::_thesis: ( p is even & p = idseq n )
then A3: Seg n = {} ;
A4: len (Permutations n) = n by MATRIX_2:18;
P = {} by A2;
hence ( p is even & p = idseq n ) by A4, A3, MATRIX_2:25, RELAT_1:55; ::_thesis: verum
end;
supposeA5: n = 1 ; ::_thesis: ( p is even & p = idseq n )
A6: len (Permutations n) = n by MATRIX_2:18;
P = id (Seg n) by A5, MATRIX_2:19, TARSKI:def_1;
hence ( p is even & p = idseq n ) by A6, MATRIX_2:25; ::_thesis: verum
end;
end;
end;
hence ( p is even & p = idseq n ) ; ::_thesis: verum
end;
theorem Th12: :: LAPLACE:12
for X, Y, D being non empty set
for f being Function of X,(Fin Y)
for g being Function of (Fin Y),D
for F being BinOp of D st ( for A, B being Element of Fin Y st A misses B holds
F . ((g . A),(g . B)) = g . (A \/ B) ) & F is commutative & F is associative & F is having_a_unity & g . {} = the_unity_wrt F holds
for I being Element of Fin X st ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
proof
let X, Y, D be non empty set ; ::_thesis: for f being Function of X,(Fin Y)
for g being Function of (Fin Y),D
for F being BinOp of D st ( for A, B being Element of Fin Y st A misses B holds
F . ((g . A),(g . B)) = g . (A \/ B) ) & F is commutative & F is associative & F is having_a_unity & g . {} = the_unity_wrt F holds
for I being Element of Fin X st ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
let f be Function of X,(Fin Y); ::_thesis: for g being Function of (Fin Y),D
for F being BinOp of D st ( for A, B being Element of Fin Y st A misses B holds
F . ((g . A),(g . B)) = g . (A \/ B) ) & F is commutative & F is associative & F is having_a_unity & g . {} = the_unity_wrt F holds
for I being Element of Fin X st ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
let g be Function of (Fin Y),D; ::_thesis: for F being BinOp of D st ( for A, B being Element of Fin Y st A misses B holds
F . ((g . A),(g . B)) = g . (A \/ B) ) & F is commutative & F is associative & F is having_a_unity & g . {} = the_unity_wrt F holds
for I being Element of Fin X st ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
let F be BinOp of D; ::_thesis: ( ( for A, B being Element of Fin Y st A misses B holds
F . ((g . A),(g . B)) = g . (A \/ B) ) & F is commutative & F is associative & F is having_a_unity & g . {} = the_unity_wrt F implies for I being Element of Fin X st ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y ) )
assume that
A1: for A, B being Element of Fin Y st A misses B holds
F . ((g . A),(g . B)) = g . (A \/ B) and
A2: ( F is commutative & F is associative ) and
A3: F is having_a_unity and
A4: g . {} = the_unity_wrt F ; ::_thesis: for I being Element of Fin X st ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
defpred S1[ set ] means for I being Element of Fin X st I = $1 & ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y );
A5: for I being Element of Fin X
for i being Element of X st S1[I] & not i in I holds
S1[I \/ {i}]
proof
let A be Element of Fin X; ::_thesis: for i being Element of X st S1[A] & not i in A holds
S1[A \/ {i}]
let a be Element of X; ::_thesis: ( S1[A] & not a in A implies S1[A \/ {a}] )
assume that
A6: S1[A] and
A7: not a in A ; ::_thesis: S1[A \/ {a}]
let I be Element of Fin X; ::_thesis: ( I = A \/ {a} & ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) implies ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y ) )
assume that
A8: A \/ {a} = I and
A9: for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ; ::_thesis: ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
A10: for x, y being set st x in A & y in A & f . x meets f . y holds
x = y
proof
let x, y be set ; ::_thesis: ( x in A & y in A & f . x meets f . y implies x = y )
assume that
A11: x in A and
A12: y in A and
A13: f . x meets f . y ; ::_thesis: x = y
A c= I by A8, XBOOLE_1:7;
hence x = y by A9, A11, A12, A13; ::_thesis: verum
end;
then A14: F $$ (A,(g * f)) = F $$ ((f .: A),g) by A6;
A15: union (f .: A) is Element of Fin Y by A6, A10;
dom f = X by FUNCT_2:def_1;
then Im (f,a) = {(f . a)} by FUNCT_1:59;
then A16: f .: I = (f .: A) \/ {(f . a)} by A8, RELAT_1:120;
A17: F $$ ((f .: A),g) = g . (union (f .: A)) by A6, A10;
dom (g * f) = X by FUNCT_2:def_1;
then A18: g . (f . a) = (g * f) . a by FUNCT_1:12;
percases ( not f . a is empty or not f . a in f .: A or ( f . a is empty & f . a in f .: A ) ) ;
supposeA19: ( not f . a is empty or not f . a in f .: A ) ; ::_thesis: ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
not f . a in f .: A
proof
A20: A c= I by A8, XBOOLE_1:7;
A21: {a} c= I by A8, XBOOLE_1:7;
A22: a in {a} by TARSKI:def_1;
assume A23: f . a in f .: A ; ::_thesis: contradiction
then consider x being set such that
x in dom f and
A24: x in A and
A25: f . x = f . a by FUNCT_1:def_6;
f . x meets f . a by A19, A23, A25, XBOOLE_1:66;
hence contradiction by A7, A9, A24, A22, A21, A20; ::_thesis: verum
end;
then A26: F $$ ((f .: I),g) = F . ((F $$ ((f .: A),g)),((g * f) . a)) by A2, A3, A16, A18, SETWOP_2:2;
A27: f . a c= Y by FINSUB_1:def_5;
union (f .: A) c= Y by A15, FINSUB_1:def_5;
then A28: (union (f .: A)) \/ (f . a) c= Y by A27, XBOOLE_1:8;
now__::_thesis:_for_x_being_set_st_x_in_f_.:_A_holds_
not_x_meets_f_._a
let x be set ; ::_thesis: ( x in f .: A implies not x meets f . a )
assume x in f .: A ; ::_thesis: not x meets f . a
then A29: ex y being set st
( y in dom f & y in A & f . y = x ) by FUNCT_1:def_6;
A30: a in {a} by TARSKI:def_1;
A31: A c= I by A8, XBOOLE_1:7;
A32: {a} c= I by A8, XBOOLE_1:7;
assume x meets f . a ; ::_thesis: contradiction
hence contradiction by A7, A9, A29, A30, A32, A31; ::_thesis: verum
end;
then A33: union (f .: A) misses f . a by ZFMISC_1:80;
union (f .: I) = (union (f .: A)) \/ (union {(f . a)}) by A16, ZFMISC_1:78
.= (union (f .: A)) \/ (f . a) by ZFMISC_1:25 ;
hence ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y ) by A1, A2, A3, A7, A8, A14, A17, A15, A18, A26, A28, A33, FINSUB_1:def_5, SETWOP_2:2; ::_thesis: verum
end;
supposeA34: ( f . a is empty & f . a in f .: A ) ; ::_thesis: ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
then A35: (f .: A) \/ {(f . a)} = f .: A by ZFMISC_1:40;
F $$ (I,(g * f)) = F . ((F $$ ((f .: A),g)),(the_unity_wrt F)) by A2, A3, A4, A7, A8, A14, A18, A34, SETWOP_2:2
.= F $$ ((f .: I),g) by A3, A16, A35, SETWISEO:15 ;
hence ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y ) by A6, A10, A16, A35; ::_thesis: verum
end;
end;
end;
A36: S1[ {}. X]
proof
A37: {} c= Y by XBOOLE_1:2;
let I be Element of Fin X; ::_thesis: ( I = {}. X & ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) implies ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y ) )
assume that
A38: {}. X = I and
for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ; ::_thesis: ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y )
A39: f .: I = {}. (Fin Y) by A38;
F $$ (I,(g * f)) = g . {} by A2, A3, A4, A38, SETWISEO:31;
hence ( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y ) by A2, A3, A4, A39, A37, FINSUB_1:def_5, SETWISEO:31, ZFMISC_1:2; ::_thesis: verum
end;
for I being Element of Fin X holds S1[I] from SETWISEO:sch_2(A36, A5);
hence for I being Element of Fin X st ( for x, y being set st x in I & y in I & f . x meets f . y holds
x = y ) holds
( F $$ (I,(g * f)) = F $$ ((f .: I),g) & F $$ ((f .: I),g) = g . (union (f .: I)) & union (f .: I) is Element of Fin Y ) ; ::_thesis: verum
end;
begin
definition
let i, j, n be Nat;
let K be Field;
let M be Matrix of n,K;
assume that
A1: i in Seg n and
A2: j in Seg n ;
func Delete (M,i,j) -> Matrix of n -' 1,K equals :Def1: :: LAPLACE:def 1
Deleting (M,i,j);
coherence
Deleting (M,i,j) is Matrix of n -' 1,K
proof
set D = Deleting (M,i,j);
A3: width M = n by MATRIX_1:24;
len M = n by MATRIX_1:24;
then dom M = Seg n by FINSEQ_1:def_3;
then A4: len (Deleting (M,i,j)) = n -' 1 by A1, Th2;
percases ( n -' 1 = 0 or n -' 1 > 0 ) ;
suppose n -' 1 = 0 ; ::_thesis: Deleting (M,i,j) is Matrix of n -' 1,K
then dom (Deleting (M,i,j)) = Seg 0 by A4, FINSEQ_1:def_3;
then for f being FinSequence of K st f in rng (Deleting (M,i,j)) holds
len f = n -' 1 by RELAT_1:42;
hence Deleting (M,i,j) is Matrix of n -' 1,K by A4, MATRIX_1:def_2; ::_thesis: verum
end;
supposeA5: n -' 1 > 0 ; ::_thesis: Deleting (M,i,j) is Matrix of n -' 1,K
width (Deleting (M,i,j)) = n -' 1 by A2, A3, Th5;
hence Deleting (M,i,j) is Matrix of n -' 1,K by A4, A5, MATRIX_1:20; ::_thesis: verum
end;
end;
end;
end;
:: deftheorem Def1 defines Delete LAPLACE:def_1_:_
for i, j, n being Nat
for K being Field
for M being Matrix of n,K st i in Seg n & j in Seg n holds
Delete (M,i,j) = Deleting (M,i,j);
theorem Th13: :: LAPLACE:13
for n being Nat
for K being Field
for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
for k, m being Nat st k in Seg (n -' 1) & m in Seg (n -' 1) holds
( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) )
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
for k, m being Nat st k in Seg (n -' 1) & m in Seg (n -' 1) holds
( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) )
let K be Field; ::_thesis: for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
for k, m being Nat st k in Seg (n -' 1) & m in Seg (n -' 1) holds
( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) )
let M be Matrix of n,K; ::_thesis: for i, j being Nat st i in Seg n & j in Seg n holds
for k, m being Nat st k in Seg (n -' 1) & m in Seg (n -' 1) holds
( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) )
let i, j be Nat; ::_thesis: ( i in Seg n & j in Seg n implies for k, m being Nat st k in Seg (n -' 1) & m in Seg (n -' 1) holds
( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) ) )
assume that
A1: i in Seg n and
A2: j in Seg n ; ::_thesis: for k, m being Nat st k in Seg (n -' 1) & m in Seg (n -' 1) holds
( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) )
set DM = Delete (M,i,j);
A3: Deleting (M,i,j) = Delete (M,i,j) by A1, A2, Def1;
n > 0 by A1;
then reconsider n9 = n - 1 as Element of NAT by NAT_1:20;
set DL = DelLine (M,i);
let k, m be Nat; ::_thesis: ( k in Seg (n -' 1) & m in Seg (n -' 1) implies ( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) ) )
assume that
A4: k in Seg (n -' 1) and
A5: m in Seg (n -' 1) ; ::_thesis: ( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) )
A6: n -' 1 = n9 by XREAL_0:def_2;
then A7: k + 1 in Seg (n9 + 1) by A4, FINSEQ_1:60;
reconsider I = i, J = j, K = k, U = m as Element of NAT by ORDINAL1:def_12;
n9 <= n9 + 1 by NAT_1:11;
then A8: Seg n9 c= Seg n by FINSEQ_1:5;
A9: len M = n by MATRIX_1:24;
then A10: dom M = Seg n by FINSEQ_1:def_3;
then len (DelLine (M,i)) = n9 by A1, A6, A9, Th1;
then A11: dom (DelLine (M,i)) = Seg n9 by FINSEQ_1:def_3;
then A12: (Deleting (M,i,j)) . k = Del ((Line ((DelLine (M,i)),k)),j) by A4, A6, MATRIX_2:def_5;
len (Delete (M,i,j)) = n9 by A6, MATRIX_1:24;
then dom (Delete (M,i,j)) = Seg n9 by FINSEQ_1:def_3;
then A13: (Delete (M,i,j)) . k = Line ((Delete (M,i,j)),k) by A4, A6, MATRIX_2:16;
width (Delete (M,i,j)) = n9 by A6, MATRIX_1:24;
then A14: (Line ((Delete (M,i,j)),k)) . m = (Delete (M,i,j)) * (k,m) by A5, A6, MATRIX_1:def_7;
A15: Line ((DelLine (M,i)),k) = (DelLine (M,i)) . k by A4, A6, A11, MATRIX_2:16;
A16: m + 1 in Seg (n9 + 1) by A5, A6, FINSEQ_1:60;
A17: ( K >= I implies ( ( U < J implies (Delete (M,i,j)) * (K,U) = M * ((K + 1),U) ) & ( U >= J implies (Delete (M,i,j)) * (K,U) = M * ((K + 1),(U + 1)) ) ) )
proof
assume A18: K >= I ; ::_thesis: ( ( U < J implies (Delete (M,i,j)) * (K,U) = M * ((K + 1),U) ) & ( U >= J implies (Delete (M,i,j)) * (K,U) = M * ((K + 1),(U + 1)) ) )
K <= n9 by A4, A6, FINSEQ_1:1;
then A19: (DelLine (M,i)) . K = M . (K + 1) by A1, A9, A10, A7, A18, FINSEQ_3:111;
A20: M . (K + 1) = Line (M,(K + 1)) by A10, A7, MATRIX_2:16;
thus ( U < J implies (Delete (M,i,j)) * (K,U) = M * ((K + 1),U) ) ::_thesis: ( U >= J implies (Delete (M,i,j)) * (K,U) = M * ((K + 1),(U + 1)) )
proof
A21: width M = n by MATRIX_1:24;
assume U < J ; ::_thesis: (Delete (M,i,j)) * (K,U) = M * ((K + 1),U)
then (Delete (M,i,j)) * (K,U) = (Line (M,(K + 1))) . U by A12, A3, A13, A14, A15, A19, A20, FINSEQ_3:110;
hence (Delete (M,i,j)) * (K,U) = M * ((K + 1),U) by A5, A6, A8, A21, MATRIX_1:def_7; ::_thesis: verum
end;
assume A22: U >= J ; ::_thesis: (Delete (M,i,j)) * (K,U) = M * ((K + 1),(U + 1))
A23: U <= n9 by A5, A6, FINSEQ_1:1;
A24: width M = n by MATRIX_1:24;
A25: len (Line ((DelLine (M,i)),K)) = width M by A15, A19, A20, MATRIX_1:def_7;
then J in dom (Line ((DelLine (M,i)),K)) by A2, A24, FINSEQ_1:def_3;
then (Delete (M,i,j)) * (K,U) = (Line (M,(K + 1))) . (U + 1) by A12, A3, A13, A14, A15, A7, A19, A20, A22, A25, A23, FINSEQ_3:111, MATRIX_1:24;
hence (Delete (M,i,j)) * (K,U) = M * ((K + 1),(U + 1)) by A16, A24, MATRIX_1:def_7; ::_thesis: verum
end;
( K < I implies ( ( U < J implies (Delete (M,i,j)) * (K,U) = M * (K,U) ) & ( U >= J implies (Delete (M,i,j)) * (K,U) = M * (K,(U + 1)) ) ) )
proof
assume K < I ; ::_thesis: ( ( U < J implies (Delete (M,i,j)) * (K,U) = M * (K,U) ) & ( U >= J implies (Delete (M,i,j)) * (K,U) = M * (K,(U + 1)) ) )
then A26: (DelLine (M,i)) . K = M . K by FINSEQ_3:110;
A27: M . K = Line (M,K) by A4, A6, A10, A8, MATRIX_2:16;
thus ( U < J implies (Delete (M,i,j)) * (K,U) = M * (K,U) ) ::_thesis: ( U >= J implies (Delete (M,i,j)) * (K,U) = M * (K,(U + 1)) )
proof
assume A28: U < J ; ::_thesis: (Delete (M,i,j)) * (K,U) = M * (K,U)
A29: width M = n9 + 1 by MATRIX_1:24;
(Delete (M,i,j)) * (K,U) = (Line (M,K)) . U by A12, A3, A13, A14, A15, A26, A27, A28, FINSEQ_3:110;
hence (Delete (M,i,j)) * (K,U) = M * (K,U) by A5, A6, A8, A29, MATRIX_1:def_7; ::_thesis: verum
end;
assume A30: U >= J ; ::_thesis: (Delete (M,i,j)) * (K,U) = M * (K,(U + 1))
A31: U <= n9 by A5, A6, FINSEQ_1:1;
A32: width M = n by MATRIX_1:24;
A33: len (Line ((DelLine (M,i)),K)) = width M by A15, A26, A27, MATRIX_1:def_7;
then J in dom (Line ((DelLine (M,i)),K)) by A2, A32, FINSEQ_1:def_3;
then (Delete (M,i,j)) * (K,U) = (Line (M,K)) . (U + 1) by A12, A3, A13, A14, A15, A7, A26, A27, A30, A33, A31, FINSEQ_3:111, MATRIX_1:24;
hence (Delete (M,i,j)) * (K,U) = M * (K,(U + 1)) by A16, A32, MATRIX_1:def_7; ::_thesis: verum
end;
hence ( ( k < i & m < j implies (Delete (M,i,j)) * (k,m) = M * (k,m) ) & ( k < i & m >= j implies (Delete (M,i,j)) * (k,m) = M * (k,(m + 1)) ) & ( k >= i & m < j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),m) ) & ( k >= i & m >= j implies (Delete (M,i,j)) * (k,m) = M * ((k + 1),(m + 1)) ) ) by A17; ::_thesis: verum
end;
theorem Th14: :: LAPLACE:14
for n being Nat
for K being Field
for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
(Delete (M,i,j)) @ = Delete ((M @),j,i)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
(Delete (M,i,j)) @ = Delete ((M @),j,i)
let K be Field; ::_thesis: for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
(Delete (M,i,j)) @ = Delete ((M @),j,i)
let M be Matrix of n,K; ::_thesis: for i, j being Nat st i in Seg n & j in Seg n holds
(Delete (M,i,j)) @ = Delete ((M @),j,i)
let i, j be Nat; ::_thesis: ( i in Seg n & j in Seg n implies (Delete (M,i,j)) @ = Delete ((M @),j,i) )
assume that
A1: i in Seg n and
A2: j in Seg n ; ::_thesis: (Delete (M,i,j)) @ = Delete ((M @),j,i)
n > 0 by A1;
then reconsider n1 = n - 1 as Element of NAT by NAT_1:20;
set X1 = Seg n;
reconsider MT = M @ as Matrix of n,K ;
set D = Delete (M,i,j);
set n9 = n -' 1;
reconsider I = i as Element of NAT by ORDINAL1:def_12;
reconsider DT = (Delete (M,i,j)) @ as Matrix of n -' 1,K ;
set D9 = Delete (MT,j,i);
set X = Seg (n -' 1);
A3: (n1 + 1) -' 1 = n1 by NAT_D:34;
now__::_thesis:_for_k,_m_being_Nat_st_[k,m]_in_Indices_DT_holds_
DT_*_(k,m)_=_(Delete_(MT,j,i))_*_(k,m)
n -' 1 <= n by NAT_D:35;
then A4: Seg (n -' 1) c= Seg n by FINSEQ_1:5;
let k, m be Nat; ::_thesis: ( [k,m] in Indices DT implies DT * (b1,b2) = (Delete (MT,j,i)) * (b1,b2) )
assume A5: [k,m] in Indices DT ; ::_thesis: DT * (b1,b2) = (Delete (MT,j,i)) * (b1,b2)
[m,k] in Indices (Delete (M,i,j)) by A5, MATRIX_1:def_6;
then A6: DT * (k,m) = (Delete (M,i,j)) * (m,k) by MATRIX_1:def_6;
reconsider k9 = k, m9 = m as Element of NAT by ORDINAL1:def_12;
A7: Indices DT = [:(Seg (n -' 1)),(Seg (n -' 1)):] by MATRIX_1:24;
then A8: k in Seg (n -' 1) by A5, ZFMISC_1:87;
then A9: k + 1 in Seg n by A3, FINSEQ_1:60;
A10: Indices M = [:(Seg n),(Seg n):] by MATRIX_1:24;
A11: m in Seg (n -' 1) by A5, A7, ZFMISC_1:87;
then A12: m + 1 in Seg n by A3, FINSEQ_1:60;
percases ( ( m9 < I & k9 < j ) or ( m9 < I & k9 >= j ) or ( m9 >= I & k9 < j ) or ( m9 >= I & k9 >= j ) ) ;
supposeA13: ( m9 < I & k9 < j ) ; ::_thesis: DT * (b1,b2) = (Delete (MT,j,i)) * (b1,b2)
then A14: (Delete (MT,j,i)) * (k,m) = MT * (k,m) by A1, A2, A8, A11, Th13;
A15: [m,k] in Indices M by A8, A11, A4, A10, ZFMISC_1:87;
(Delete (M,i,j)) * (m,k) = M * (m,k) by A1, A2, A8, A11, A13, Th13;
hence DT * (k,m) = (Delete (MT,j,i)) * (k,m) by A6, A15, A14, MATRIX_1:def_6; ::_thesis: verum
end;
supposeA16: ( m9 < I & k9 >= j ) ; ::_thesis: DT * (b1,b2) = (Delete (MT,j,i)) * (b1,b2)
then A17: (Delete (MT,j,i)) * (k,m) = MT * ((k + 1),m) by A1, A2, A8, A11, Th13;
A18: [m,(k + 1)] in Indices M by A11, A4, A9, A10, ZFMISC_1:87;
(Delete (M,i,j)) * (m,k) = M * (m,(k + 1)) by A1, A2, A8, A11, A16, Th13;
hence DT * (k,m) = (Delete (MT,j,i)) * (k,m) by A6, A18, A17, MATRIX_1:def_6; ::_thesis: verum
end;
supposeA19: ( m9 >= I & k9 < j ) ; ::_thesis: DT * (b1,b2) = (Delete (MT,j,i)) * (b1,b2)
then A20: (Delete (MT,j,i)) * (k,m) = MT * (k,(m + 1)) by A1, A2, A8, A11, Th13;
A21: [(m + 1),k] in Indices M by A8, A4, A12, A10, ZFMISC_1:87;
(Delete (M,i,j)) * (m,k) = M * ((m + 1),k) by A1, A2, A8, A11, A19, Th13;
hence DT * (k,m) = (Delete (MT,j,i)) * (k,m) by A6, A21, A20, MATRIX_1:def_6; ::_thesis: verum
end;
supposeA22: ( m9 >= I & k9 >= j ) ; ::_thesis: DT * (b1,b2) = (Delete (MT,j,i)) * (b1,b2)
then A23: (Delete (MT,j,i)) * (k,m) = MT * ((k + 1),(m + 1)) by A1, A2, A8, A11, Th13;
A24: [(m + 1),(k + 1)] in Indices M by A9, A12, A10, ZFMISC_1:87;
(Delete (M,i,j)) * (m,k) = M * ((m + 1),(k + 1)) by A1, A2, A8, A11, A22, Th13;
hence DT * (k,m) = (Delete (MT,j,i)) * (k,m) by A6, A24, A23, MATRIX_1:def_6; ::_thesis: verum
end;
end;
end;
hence (Delete (M,i,j)) @ = Delete ((M @),j,i) by MATRIX_1:27; ::_thesis: verum
end;
theorem Th15: :: LAPLACE:15
for n being Nat
for K being Field
for M being Matrix of n,K
for f being FinSequence of K
for i, j being Nat st i in Seg n & j in Seg n holds
Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K
for f being FinSequence of K
for i, j being Nat st i in Seg n & j in Seg n holds
Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
let K be Field; ::_thesis: for M being Matrix of n,K
for f being FinSequence of K
for i, j being Nat st i in Seg n & j in Seg n holds
Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
let M be Matrix of n,K; ::_thesis: for f being FinSequence of K
for i, j being Nat st i in Seg n & j in Seg n holds
Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
let f be FinSequence of K; ::_thesis: for i, j being Nat st i in Seg n & j in Seg n holds
Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
let i, j be Nat; ::_thesis: ( i in Seg n & j in Seg n implies Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j) )
assume that
A1: i in Seg n and
A2: j in Seg n ; ::_thesis: Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
A3: Delete (M,i,j) = Deleting (M,i,j) by A1, A2, Def1;
A4: Delete ((RLine (M,i,f)),i,j) = Deleting ((RLine (M,i,f)),i,j) by A1, A2, Def1;
reconsider f9 = f as Element of the carrier of K * by FINSEQ_1:def_11;
reconsider I = i as Element of NAT by ORDINAL1:def_12;
percases ( len f = width M or len f <> width M ) ;
suppose len f = width M ; ::_thesis: Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
then RLine (M,I,f) = Replace (M,i,f9) by MATRIX11:29;
hence Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j) by A3, A4, COMPUT_1:3; ::_thesis: verum
end;
suppose len f <> width M ; ::_thesis: Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j)
hence Delete (M,i,j) = Delete ((RLine (M,i,f)),i,j) by MATRIX11:def_3; ::_thesis: verum
end;
end;
end;
definition
let c, n, m be Nat;
let D be non empty set ;
let M be Matrix of n,m,D;
let pD be FinSequence of D;
func ReplaceCol (M,c,pD) -> Matrix of n,m,D means :Def2: :: LAPLACE:def 2
( len it = len M & width it = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies it * (i,j) = M * (i,j) ) & ( j = c implies it * (i,c) = pD . i ) ) ) ) if len pD = len M
otherwise it = M;
consistency
for b1 being Matrix of n,m,D holds verum ;
existence
( ( len pD = len M implies ex b1 being Matrix of n,m,D st
( len b1 = len M & width b1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies b1 * (i,j) = M * (i,j) ) & ( j = c implies b1 * (i,c) = pD . i ) ) ) ) ) & ( not len pD = len M implies ex b1 being Matrix of n,m,D st b1 = M ) )
proof
thus ( len pD = len M implies ex M1 being Matrix of n,m,D st
( len M1 = len M & width M1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ) ) ) ::_thesis: ( not len pD = len M implies ex b1 being Matrix of n,m,D st b1 = M )
proof
reconsider M9 = M as Matrix of len M, width M,D by MATRIX_2:7;
reconsider V = n, U = m as Element of NAT by ORDINAL1:def_12;
defpred S1[ set , set , set ] means for i, j being Nat st i = $1 & j = $2 holds
( ( j <> c implies $3 = M * (i,j) ) & ( j = c implies $3 = pD . i ) );
assume A1: len pD = len M ; ::_thesis: ex M1 being Matrix of n,m,D st
( len M1 = len M & width M1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ) )
A2: for i, j being Nat st [i,j] in [:(Seg V),(Seg U):] holds
ex x being Element of D st S1[i,j,x]
proof
let i, j be Nat; ::_thesis: ( [i,j] in [:(Seg V),(Seg U):] implies ex x being Element of D st S1[i,j,x] )
assume A3: [i,j] in [:(Seg V),(Seg U):] ; ::_thesis: ex x being Element of D st S1[i,j,x]
now__::_thesis:_(_(_j_=_c_&_ex_x_being_Element_of_D_st_S1[i,j,x]_)_or_(_j_<>_c_&_ex_x_being_Element_of_D_st_S1[i,j,x]_)_)
percases ( j = c or j <> c ) ;
caseA4: j = c ; ::_thesis: ex x being Element of D st S1[i,j,x]
A5: rng pD c= D by FINSEQ_1:def_4;
len M = n by MATRIX_1:def_2;
then i in Seg (len pD) by A1, A3, ZFMISC_1:87;
then i in dom pD by FINSEQ_1:def_3;
then A6: pD . i in rng pD by FUNCT_1:def_3;
S1[i,j,pD . i] by A4;
hence ex x being Element of D st S1[i,j,x] by A6, A5; ::_thesis: verum
end;
case j <> c ; ::_thesis: ex x being Element of D st S1[i,j,x]
then S1[i,j,M * (i,j)] ;
hence ex x being Element of D st S1[i,j,x] ; ::_thesis: verum
end;
end;
end;
hence ex x being Element of D st S1[i,j,x] ; ::_thesis: verum
end;
consider M1 being Matrix of V,U,D such that
A7: for i, j being Nat st [i,j] in Indices M1 holds
S1[i,j,M1 * (i,j)] from MATRIX_1:sch_2(A2);
reconsider M1 = M1 as Matrix of n,m,D ;
take M1 ; ::_thesis: ( len M1 = len M & width M1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ) )
A8: now__::_thesis:_(_len_M_=_len_M1_&_width_M1_=_width_M_)
percases ( n = 0 or n > 0 ) ;
supposeA9: n = 0 ; ::_thesis: ( len M = len M1 & width M1 = width M )
then len M1 = 0 by MATRIX_1:def_2;
then A10: width M1 = 0 by MATRIX_1:def_3;
len M = 0 by A9, MATRIX_1:def_2;
hence ( len M = len M1 & width M1 = width M ) by A9, A10, MATRIX_1:def_2, MATRIX_1:def_3; ::_thesis: verum
end;
supposeA11: n > 0 ; ::_thesis: ( len M = len M1 & width M = width M1 )
then A12: width M = m by MATRIX_1:23;
len M = n by A11, MATRIX_1:23;
hence ( len M = len M1 & width M = width M1 ) by A11, A12, MATRIX_1:23; ::_thesis: verum
end;
end;
end;
Indices M9 = Indices M1 by MATRIX_1:26;
hence ( len M1 = len M & width M1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ) ) by A7, A8; ::_thesis: verum
end;
thus ( not len pD = len M implies ex b1 being Matrix of n,m,D st b1 = M ) ; ::_thesis: verum
end;
uniqueness
for b1, b2 being Matrix of n,m,D holds
( ( len pD = len M & len b1 = len M & width b1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies b1 * (i,j) = M * (i,j) ) & ( j = c implies b1 * (i,c) = pD . i ) ) ) & len b2 = len M & width b2 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies b2 * (i,j) = M * (i,j) ) & ( j = c implies b2 * (i,c) = pD . i ) ) ) implies b1 = b2 ) & ( not len pD = len M & b1 = M & b2 = M implies b1 = b2 ) )
proof
let M1, M2 be Matrix of n,m,D; ::_thesis: ( ( len pD = len M & len M1 = len M & width M1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ) & len M2 = len M & width M2 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M2 * (i,j) = M * (i,j) ) & ( j = c implies M2 * (i,c) = pD . i ) ) ) implies M1 = M2 ) & ( not len pD = len M & M1 = M & M2 = M implies M1 = M2 ) )
thus ( len pD = len M & len M1 = len M & width M1 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ) & len M2 = len M & width M2 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M2 * (i,j) = M * (i,j) ) & ( j = c implies M2 * (i,c) = pD . i ) ) ) implies M1 = M2 ) ::_thesis: ( not len pD = len M & M1 = M & M2 = M implies M1 = M2 )
proof
assume len pD = len M ; ::_thesis: ( not len M1 = len M or not width M1 = width M or ex i, j being Nat st
( [i,j] in Indices M & not ( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ) or not len M2 = len M or not width M2 = width M or ex i, j being Nat st
( [i,j] in Indices M & not ( ( j <> c implies M2 * (i,j) = M * (i,j) ) & ( j = c implies M2 * (i,c) = pD . i ) ) ) or M1 = M2 )
assume that
A13: len M1 = len M and
A14: width M1 = width M and
A15: for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M1 * (i,j) = M * (i,j) ) & ( j = c implies M1 * (i,c) = pD . i ) ) ; ::_thesis: ( not len M2 = len M or not width M2 = width M or ex i, j being Nat st
( [i,j] in Indices M & not ( ( j <> c implies M2 * (i,j) = M * (i,j) ) & ( j = c implies M2 * (i,c) = pD . i ) ) ) or M1 = M2 )
assume that
len M2 = len M and
width M2 = width M and
A16: for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies M2 * (i,j) = M * (i,j) ) & ( j = c implies M2 * (i,c) = pD . i ) ) ; ::_thesis: M1 = M2
for i, j being Nat st [i,j] in Indices M1 holds
M1 * (i,j) = M2 * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices M1 implies M1 * (i,j) = M2 * (i,j) )
assume [i,j] in Indices M1 ; ::_thesis: M1 * (i,j) = M2 * (i,j)
then A17: [i,j] in Indices M by A13, A14, MATRIX_4:55;
reconsider I = i, J = j as Element of NAT by ORDINAL1:def_12;
A18: ( J = c implies M1 * (I,c) = pD . I ) by A15, A17;
A19: ( J <> c implies M2 * (I,J) = M * (I,J) ) by A16, A17;
( J <> c implies M1 * (I,J) = M * (I,J) ) by A15, A17;
hence M1 * (i,j) = M2 * (i,j) by A16, A17, A18, A19; ::_thesis: verum
end;
hence M1 = M2 by MATRIX_1:27; ::_thesis: verum
end;
thus ( not len pD = len M & M1 = M & M2 = M implies M1 = M2 ) ; ::_thesis: verum
end;
end;
:: deftheorem Def2 defines ReplaceCol LAPLACE:def_2_:_
for c, n, m being Nat
for D being non empty set
for M being Matrix of n,m,D
for pD being FinSequence of D
for b7 being Matrix of n,m,D holds
( ( len pD = len M implies ( b7 = ReplaceCol (M,c,pD) iff ( len b7 = len M & width b7 = width M & ( for i, j being Nat st [i,j] in Indices M holds
( ( j <> c implies b7 * (i,j) = M * (i,j) ) & ( j = c implies b7 * (i,c) = pD . i ) ) ) ) ) ) & ( not len pD = len M implies ( b7 = ReplaceCol (M,c,pD) iff b7 = M ) ) );
notation
let c, n, m be Nat;
let D be non empty set ;
let M be Matrix of n,m,D;
let pD be FinSequence of D;
synonym RCol (M,c,pD) for ReplaceCol (M,c,pD);
end;
theorem :: LAPLACE:16
for n, m, c being Nat
for D being non empty set
for AD being Matrix of n,m,D
for pD being FinSequence of D
for i being Nat st i in Seg (width AD) holds
( ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) & ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) ) )
proof
let n, m, c be Nat; ::_thesis: for D being non empty set
for AD being Matrix of n,m,D
for pD being FinSequence of D
for i being Nat st i in Seg (width AD) holds
( ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) & ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) ) )
let D be non empty set ; ::_thesis: for AD being Matrix of n,m,D
for pD being FinSequence of D
for i being Nat st i in Seg (width AD) holds
( ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) & ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) ) )
let AD be Matrix of n,m,D; ::_thesis: for pD being FinSequence of D
for i being Nat st i in Seg (width AD) holds
( ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) & ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) ) )
let pD be FinSequence of D; ::_thesis: for i being Nat st i in Seg (width AD) holds
( ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) & ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) ) )
let i be Nat; ::_thesis: ( i in Seg (width AD) implies ( ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) & ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) ) ) )
assume A1: i in Seg (width AD) ; ::_thesis: ( ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) & ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) ) )
set R = RCol (AD,c,pD);
set CR = Col ((RCol (AD,c,pD)),i);
thus ( i = c & len pD = len AD implies Col ((RCol (AD,c,pD)),i) = pD ) ::_thesis: ( i <> c implies Col ((RCol (AD,c,pD)),i) = Col (AD,i) )
proof
assume that
A2: i = c and
A3: len pD = len AD ; ::_thesis: Col ((RCol (AD,c,pD)),i) = pD
A4: len (RCol (AD,c,pD)) = len pD by A3, Def2;
A5: now__::_thesis:_for_J_being_Nat_st_1_<=_J_&_J_<=_len_pD_holds_
(Col_((RCol_(AD,c,pD)),i))_._J_=_pD_._J
let J be Nat; ::_thesis: ( 1 <= J & J <= len pD implies (Col ((RCol (AD,c,pD)),i)) . J = pD . J )
assume that
A6: 1 <= J and
A7: J <= len pD ; ::_thesis: (Col ((RCol (AD,c,pD)),i)) . J = pD . J
J in NAT by ORDINAL1:def_12;
then J in Seg (len pD) by A6, A7;
then A8: J in dom (RCol (AD,c,pD)) by A4, FINSEQ_1:def_3;
i in Seg (width (RCol (AD,c,pD))) by A1, A3, Def2;
then A9: [J,c] in Indices (RCol (AD,c,pD)) by A2, A8, ZFMISC_1:87;
A10: Indices (RCol (AD,c,pD)) = Indices AD by MATRIX_1:26;
(Col ((RCol (AD,c,pD)),i)) . J = (RCol (AD,c,pD)) * (J,c) by A2, A8, MATRIX_1:def_8;
hence (Col ((RCol (AD,c,pD)),i)) . J = pD . J by A3, A9, A10, Def2; ::_thesis: verum
end;
len (Col ((RCol (AD,c,pD)),i)) = len pD by A4, MATRIX_1:def_8;
hence Col ((RCol (AD,c,pD)),i) = pD by A5, FINSEQ_1:14; ::_thesis: verum
end;
set CA = Col (AD,i);
A11: len AD = n by MATRIX_1:def_2;
A12: len (RCol (AD,c,pD)) = n by MATRIX_1:def_2;
A13: len AD = len (Col (AD,i)) by MATRIX_1:def_8;
assume A14: i <> c ; ::_thesis: Col ((RCol (AD,c,pD)),i) = Col (AD,i)
A15: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Col_(AD,i))_holds_
(Col_(AD,i))_._j_=_(Col_((RCol_(AD,c,pD)),i))_._j
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Col (AD,i)) implies (Col (AD,i)) . b1 = (Col ((RCol (AD,c,pD)),i)) . b1 )
assume that
A16: 1 <= j and
A17: j <= len (Col (AD,i)) ; ::_thesis: (Col (AD,i)) . b1 = (Col ((RCol (AD,c,pD)),i)) . b1
j in NAT by ORDINAL1:def_12;
then A18: j in Seg (len AD) by A13, A16, A17;
then A19: j in dom AD by FINSEQ_1:def_3;
then A20: (Col (AD,i)) . j = AD * (j,i) by MATRIX_1:def_8;
j in dom (RCol (AD,c,pD)) by A11, A12, A18, FINSEQ_1:def_3;
then A21: (Col ((RCol (AD,c,pD)),i)) . j = (RCol (AD,c,pD)) * (j,i) by MATRIX_1:def_8;
A22: [j,i] in Indices AD by A1, A19, ZFMISC_1:87;
percases ( len pD = len AD or len pD <> len AD ) ;
suppose len pD = len AD ; ::_thesis: (Col (AD,i)) . b1 = (Col ((RCol (AD,c,pD)),i)) . b1
hence (Col (AD,i)) . j = (Col ((RCol (AD,c,pD)),i)) . j by A14, A20, A21, A22, Def2; ::_thesis: verum
end;
suppose len pD <> len AD ; ::_thesis: (Col (AD,i)) . b1 = (Col ((RCol (AD,c,pD)),i)) . b1
hence (Col (AD,i)) . j = (Col ((RCol (AD,c,pD)),i)) . j by Def2; ::_thesis: verum
end;
end;
end;
len (Col ((RCol (AD,c,pD)),i)) = len (RCol (AD,c,pD)) by MATRIX_1:def_8;
hence Col ((RCol (AD,c,pD)),i) = Col (AD,i) by A11, A12, A13, A15, FINSEQ_1:14; ::_thesis: verum
end;
theorem :: LAPLACE:17
for n, m, c being Nat
for D being non empty set
for AD being Matrix of n,m,D
for pD being FinSequence of D st not c in Seg (width AD) holds
RCol (AD,c,pD) = AD
proof
let n, m, c be Nat; ::_thesis: for D being non empty set
for AD being Matrix of n,m,D
for pD being FinSequence of D st not c in Seg (width AD) holds
RCol (AD,c,pD) = AD
let D be non empty set ; ::_thesis: for AD being Matrix of n,m,D
for pD being FinSequence of D st not c in Seg (width AD) holds
RCol (AD,c,pD) = AD
let AD be Matrix of n,m,D; ::_thesis: for pD being FinSequence of D st not c in Seg (width AD) holds
RCol (AD,c,pD) = AD
let pD be FinSequence of D; ::_thesis: ( not c in Seg (width AD) implies RCol (AD,c,pD) = AD )
assume A1: not c in Seg (width AD) ; ::_thesis: RCol (AD,c,pD) = AD
set R = RCol (AD,c,pD);
percases ( len pD = len AD or len pD <> len AD ) ;
supposeA2: len pD = len AD ; ::_thesis: RCol (AD,c,pD) = AD
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_AD_holds_
(RCol_(AD,c,pD))_*_(i,j)_=_AD_*_(i,j)
let i, j be Nat; ::_thesis: ( [i,j] in Indices AD implies (RCol (AD,c,pD)) * (i,j) = AD * (i,j) )
assume A3: [i,j] in Indices AD ; ::_thesis: (RCol (AD,c,pD)) * (i,j) = AD * (i,j)
j in Seg (width AD) by A3, ZFMISC_1:87;
hence (RCol (AD,c,pD)) * (i,j) = AD * (i,j) by A1, A2, A3, Def2; ::_thesis: verum
end;
hence RCol (AD,c,pD) = AD by MATRIX_1:27; ::_thesis: verum
end;
suppose len pD <> len AD ; ::_thesis: RCol (AD,c,pD) = AD
hence RCol (AD,c,pD) = AD by Def2; ::_thesis: verum
end;
end;
end;
theorem :: LAPLACE:18
for n, m, c being Nat
for D being non empty set
for AD being Matrix of n,m,D holds RCol (AD,c,(Col (AD,c))) = AD
proof
let n, m, c be Nat; ::_thesis: for D being non empty set
for AD being Matrix of n,m,D holds RCol (AD,c,(Col (AD,c))) = AD
let D be non empty set ; ::_thesis: for AD being Matrix of n,m,D holds RCol (AD,c,(Col (AD,c))) = AD
let AD be Matrix of n,m,D; ::_thesis: RCol (AD,c,(Col (AD,c))) = AD
set C = Col (AD,c);
set R = RCol (AD,c,(Col (AD,c)));
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_AD_holds_
(RCol_(AD,c,(Col_(AD,c))))_*_(i,j)_=_AD_*_(i,j)
reconsider c = c as Element of NAT by ORDINAL1:def_12;
let i, j be Nat; ::_thesis: ( [i,j] in Indices AD implies (RCol (AD,c,(Col (AD,c)))) * (i,j) = AD * (i,j) )
assume A1: [i,j] in Indices AD ; ::_thesis: (RCol (AD,c,(Col (AD,c)))) * (i,j) = AD * (i,j)
A2: len (Col (AD,c)) = len AD by MATRIX_1:def_8;
reconsider I = i, J = j as Element of NAT by ORDINAL1:def_12;
A3: i in dom AD by A1, ZFMISC_1:87;
now__::_thesis:_(RCol_(AD,c,(Col_(AD,c))))_*_(i,j)_=_AD_*_(i,j)
percases ( c = j or c <> J ) ;
supposeA4: c = j ; ::_thesis: (RCol (AD,c,(Col (AD,c)))) * (i,j) = AD * (i,j)
hence (RCol (AD,c,(Col (AD,c)))) * (i,j) = (Col (AD,c)) . I by A1, A2, Def2
.= AD * (i,j) by A3, A4, MATRIX_1:def_8 ;
::_thesis: verum
end;
suppose c <> J ; ::_thesis: (RCol (AD,c,(Col (AD,c)))) * (i,j) = AD * (i,j)
hence (RCol (AD,c,(Col (AD,c)))) * (i,j) = AD * (i,j) by A1, A2, Def2; ::_thesis: verum
end;
end;
end;
hence (RCol (AD,c,(Col (AD,c)))) * (i,j) = AD * (i,j) ; ::_thesis: verum
end;
hence RCol (AD,c,(Col (AD,c))) = AD by MATRIX_1:27; ::_thesis: verum
end;
theorem Th19: :: LAPLACE:19
for n, m, c being Nat
for D being non empty set
for pD being FinSequence of D
for A being Matrix of n,m,D
for A9 being Matrix of m,n,D st A9 = A @ & ( m = 0 implies n = 0 ) holds
ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
proof
let n, m, c be Nat; ::_thesis: for D being non empty set
for pD being FinSequence of D
for A being Matrix of n,m,D
for A9 being Matrix of m,n,D st A9 = A @ & ( m = 0 implies n = 0 ) holds
ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
let D be non empty set ; ::_thesis: for pD being FinSequence of D
for A being Matrix of n,m,D
for A9 being Matrix of m,n,D st A9 = A @ & ( m = 0 implies n = 0 ) holds
ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
let pD be FinSequence of D; ::_thesis: for A being Matrix of n,m,D
for A9 being Matrix of m,n,D st A9 = A @ & ( m = 0 implies n = 0 ) holds
ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
let A be Matrix of n,m,D; ::_thesis: for A9 being Matrix of m,n,D st A9 = A @ & ( m = 0 implies n = 0 ) holds
ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
let A9 be Matrix of m,n,D; ::_thesis: ( A9 = A @ & ( m = 0 implies n = 0 ) implies ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @ )
assume that
A1: A9 = A @ and
A2: ( m = 0 implies n = 0 ) ; ::_thesis: ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
set RC = ReplaceCol (A,c,pD);
set RL = ReplaceLine (A9,c,pD);
now__::_thesis:_ReplaceCol_(A,c,pD)_=_(ReplaceLine_(A9,c,pD))_@
percases ( n = 0 or ( len pD <> len A & n > 0 ) or ( len pD = len A & n > 0 ) ) ;
supposeA3: n = 0 ; ::_thesis: ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
then 0 = len A by MATRIX_1:def_2;
then 0 = width A by MATRIX_1:def_3
.= len A9 by A1, MATRIX_1:def_6 ;
then m = 0 by MATRIX_1:def_2;
then len (ReplaceLine (A9,c,pD)) = 0 by MATRIX_1:def_2;
then width (ReplaceLine (A9,c,pD)) = 0 by MATRIX_1:def_3;
then len ((ReplaceLine (A9,c,pD)) @) = 0 by MATRIX_1:def_6;
then A4: (ReplaceLine (A9,c,pD)) @ = {} ;
len (ReplaceCol (A,c,pD)) = 0 by A3, MATRIX_1:def_2;
hence ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @ by A4; ::_thesis: verum
end;
supposeA5: ( len pD <> len A & n > 0 ) ; ::_thesis: ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
then A6: width A = m by MATRIX_1:23;
then A7: width A9 = len A by A1, A2, A5, MATRIX_2:10;
A8: len A = n by A5, MATRIX_1:23;
thus ReplaceCol (A,c,pD) = A by A5, Def2
.= (A @) @ by A2, A5, A8, A6, MATRIX_2:13
.= (ReplaceLine (A9,c,pD)) @ by A1, A5, A7, MATRIX11:def_3 ; ::_thesis: verum
end;
supposeA9: ( len pD = len A & n > 0 ) ; ::_thesis: ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @
then A10: width (ReplaceLine (A9,c,pD)) = n by A2, MATRIX_1:23;
then A11: len ((ReplaceLine (A9,c,pD)) @) = n by A9, MATRIX_2:10;
len (ReplaceLine (A9,c,pD)) = m by A2, A9, MATRIX_1:23;
then width ((ReplaceLine (A9,c,pD)) @) = m by A9, A10, MATRIX_2:10;
then reconsider RL9 = (ReplaceLine (A9,c,pD)) @ as Matrix of n,m,D by A11, MATRIX_2:7;
A12: len A = n by A9, MATRIX_1:23;
A13: width A9 = n by A2, A9, MATRIX_1:23;
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_(ReplaceCol_(A,c,pD))_holds_
(ReplaceCol_(A,c,pD))_*_(i,j)_=_RL9_*_(i,j)
A14: Indices (ReplaceCol (A,c,pD)) = Indices A by MATRIX_1:26;
A15: Indices (ReplaceLine (A9,c,pD)) = Indices A9 by MATRIX_1:26;
let i, j be Nat; ::_thesis: ( [i,j] in Indices (ReplaceCol (A,c,pD)) implies (ReplaceCol (A,c,pD)) * (b1,b2) = RL9 * (b1,b2) )
assume A16: [i,j] in Indices (ReplaceCol (A,c,pD)) ; ::_thesis: (ReplaceCol (A,c,pD)) * (b1,b2) = RL9 * (b1,b2)
reconsider I = i, J = j as Element of NAT by ORDINAL1:def_12;
Indices (ReplaceCol (A,c,pD)) = Indices RL9 by MATRIX_1:26;
then A17: [j,i] in Indices (ReplaceLine (A9,c,pD)) by A16, MATRIX_1:def_6;
percases ( J = c or J <> c ) ;
supposeA18: J = c ; ::_thesis: (ReplaceCol (A,c,pD)) * (b1,b2) = RL9 * (b1,b2)
hence (ReplaceCol (A,c,pD)) * (i,j) = pD . I by A9, A16, A14, Def2
.= (ReplaceLine (A9,c,pD)) * (J,I) by A9, A12, A13, A17, A15, A18, MATRIX11:def_3
.= RL9 * (i,j) by A17, MATRIX_1:def_6 ;
::_thesis: verum
end;
supposeA19: J <> c ; ::_thesis: (ReplaceCol (A,c,pD)) * (b1,b2) = RL9 * (b1,b2)
hence (ReplaceCol (A,c,pD)) * (i,j) = A * (I,J) by A9, A16, A14, Def2
.= A9 * (j,i) by A1, A16, A14, MATRIX_1:def_6
.= (ReplaceLine (A9,c,pD)) * (J,I) by A9, A12, A13, A17, A15, A19, MATRIX11:def_3
.= RL9 * (i,j) by A17, MATRIX_1:def_6 ;
::_thesis: verum
end;
end;
end;
hence ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @ by MATRIX_1:27; ::_thesis: verum
end;
end;
end;
hence ReplaceCol (A,c,pD) = (ReplaceLine (A9,c,pD)) @ ; ::_thesis: verum
end;
begin
definition
let i, n be Nat;
let perm be Element of Permutations (n + 1);
assume A1: i in Seg (n + 1) ;
func Rem (perm,i) -> Element of Permutations n means :Def3: :: LAPLACE:def 3
for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies it . k = perm . k ) & ( perm . k >= perm . i implies it . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies it . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies it . k = (perm . (k + 1)) - 1 ) ) ) );
existence
ex b1 being Element of Permutations n st
for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies b1 . k = perm . k ) & ( perm . k >= perm . i implies b1 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies b1 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies b1 . k = (perm . (k + 1)) - 1 ) ) ) )
proof
set j = perm . i;
set P = Permutations n;
set p = perm;
set n1 = n + 1;
reconsider N = n as Element of NAT by ORDINAL1:def_12;
reconsider p9 = perm as Permutation of (Seg (n + 1)) by MATRIX_2:def_9;
A2: dom p9 = Seg (n + 1) by FUNCT_2:52;
defpred S1[ set , set ] means for k being Nat st k in Seg n & $1 = k holds
( ( k < i implies ( ( perm . k < perm . i implies $2 = perm . k ) & ( perm . k >= perm . i implies $2 = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies $2 = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies $2 = (perm . (k + 1)) - 1 ) ) ) );
A3: rng p9 = Seg (n + 1) by FUNCT_2:def_3;
then A4: perm . i in Seg (n + 1) by A1, A2, FUNCT_1:def_3;
A5: for k9 being set st k9 in Seg n holds
ex y being set st
( y in Seg n & S1[k9,y] )
proof
let k9 be set ; ::_thesis: ( k9 in Seg n implies ex y being set st
( y in Seg n & S1[k9,y] ) )
assume k9 in Seg n ; ::_thesis: ex y being set st
( y in Seg n & S1[k9,y] )
then consider k being Element of NAT such that
A6: k9 = k and
A7: 1 <= k and
A8: k <= n ;
A9: k < n + 1 by A8, NAT_1:13;
then A10: k in Seg (n + 1) by A7;
then A11: perm . k in Seg (n + 1) by A2, A3, FUNCT_1:def_3;
set k1 = k + 1;
A12: 1 + 0 <= k + 1 by NAT_1:13;
k + 1 <= n + 1 by A9, NAT_1:13;
then A13: k + 1 in Seg (n + 1) by A12;
then A14: perm . (k + 1) in Seg (n + 1) by A2, A3, FUNCT_1:def_3;
percases ( ( k < i & perm . k < perm . i ) or ( k < i & perm . k >= perm . i ) or ( k >= i & perm . (k + 1) < perm . i ) or ( k >= i & perm . (k + 1) >= perm . i ) ) ;
supposeA15: ( k < i & perm . k < perm . i ) ; ::_thesis: ex y being set st
( y in Seg n & S1[k9,y] )
perm . i <= n + 1 by A4, FINSEQ_1:1;
then perm . k < n + 1 by A15, XXREAL_0:2;
then A16: perm . k <= n by NAT_1:13;
A17: S1[k9,perm . k] by A6, A15;
1 <= perm . k by A11, FINSEQ_1:1;
then perm . k in Seg n by A16, FINSEQ_1:1;
hence ex y being set st
( y in Seg n & S1[k9,y] ) by A17; ::_thesis: verum
end;
supposeA18: ( k < i & perm . k >= perm . i ) ; ::_thesis: ex y being set st
( y in Seg n & S1[k9,y] )
then p9 . k <> p9 . i by A1, A10, FUNCT_2:19;
then A19: perm . k > perm . i by A18, XXREAL_0:1;
then reconsider pk1 = (perm . k) - 1 as Element of NAT by NAT_1:20;
A20: S1[k9,pk1] by A6, A18;
A21: pk1 < pk1 + 1 by NAT_1:13;
perm . k <= n + 1 by A11, FINSEQ_1:1;
then pk1 < n + 1 by A21, XXREAL_0:2;
then A22: pk1 <= n by NAT_1:13;
perm . i >= 1 by A4, FINSEQ_1:1;
then pk1 + 1 > 1 by A19, XXREAL_0:2;
then pk1 >= 1 by NAT_1:13;
then pk1 in Seg n by A22;
hence ex y being set st
( y in Seg n & S1[k9,y] ) by A20; ::_thesis: verum
end;
supposeA23: ( k >= i & perm . (k + 1) < perm . i ) ; ::_thesis: ex y being set st
( y in Seg n & S1[k9,y] )
perm . i <= n + 1 by A4, FINSEQ_1:1;
then perm . (k + 1) < n + 1 by A23, XXREAL_0:2;
then A24: perm . (k + 1) <= n by NAT_1:13;
A25: S1[k9,perm . (k + 1)] by A6, A23;
1 <= perm . (k + 1) by A14, FINSEQ_1:1;
then perm . (k + 1) in Seg n by A24, FINSEQ_1:1;
hence ex y being set st
( y in Seg n & S1[k9,y] ) by A25; ::_thesis: verum
end;
supposeA26: ( k >= i & perm . (k + 1) >= perm . i ) ; ::_thesis: ex y being set st
( y in Seg n & S1[k9,y] )
then i < k + 1 by NAT_1:13;
then p9 . (k + 1) <> p9 . i by A1, A13, FUNCT_2:19;
then A27: perm . (k + 1) > perm . i by A26, XXREAL_0:1;
then reconsider pk1 = (perm . (k + 1)) - 1 as Element of NAT by NAT_1:20;
A28: S1[k9,pk1] by A6, A26;
A29: pk1 < pk1 + 1 by NAT_1:13;
perm . (k + 1) <= n + 1 by A14, FINSEQ_1:1;
then pk1 < n + 1 by A29, XXREAL_0:2;
then A30: pk1 <= n by NAT_1:13;
perm . i >= 1 by A4, FINSEQ_1:1;
then pk1 + 1 > 1 by A27, XXREAL_0:2;
then pk1 >= 1 by NAT_1:13;
then pk1 in Seg n by A30;
hence ex y being set st
( y in Seg n & S1[k9,y] ) by A28; ::_thesis: verum
end;
end;
end;
consider q being Function of (Seg n),(Seg n) such that
A31: for x being set st x in Seg n holds
S1[x,q . x] from FUNCT_2:sch_1(A5);
for x1, x2 being set st x1 in dom q & x2 in dom q & q . x1 = q . x2 holds
x1 = x2
proof
let x1, x2 be set ; ::_thesis: ( x1 in dom q & x2 in dom q & q . x1 = q . x2 implies x1 = x2 )
assume that
A32: x1 in dom q and
A33: x2 in dom q and
A34: q . x1 = q . x2 ; ::_thesis: x1 = x2
A35: dom q = Seg n by FUNCT_2:52;
then consider k1 being Element of NAT such that
A36: x1 = k1 and
A37: 1 <= k1 and
A38: k1 <= n by A32;
A39: 0 + 1 <= k1 + 1 by NAT_1:13;
A40: k1 < n + 1 by A38, NAT_1:13;
then A41: k1 in Seg (n + 1) by A37;
k1 + 1 <= n + 1 by A40, NAT_1:13;
then A42: k1 + 1 in Seg (n + 1) by A39;
consider k2 being Element of NAT such that
A43: x2 = k2 and
A44: 1 <= k2 and
A45: k2 <= n by A33, A35;
A46: k2 < n + 1 by A45, NAT_1:13;
then A47: k2 in Seg (n + 1) by A44;
A48: 0 + 1 <= k2 + 1 by NAT_1:13;
k2 + 1 <= n + 1 by A46, NAT_1:13;
then A49: k2 + 1 in Seg (n + 1) by A48;
percases ( ( k1 < i & perm . k1 < perm . i ) or ( k1 < i & perm . k1 >= perm . i ) or ( k1 >= i & perm . (k1 + 1) < perm . i ) or ( k1 >= i & perm . (k1 + 1) >= perm . i ) ) ;
supposeA50: ( k1 < i & perm . k1 < perm . i ) ; ::_thesis: x1 = x2
then A51: q . k1 = p9 . k1 by A31, A32, A36;
percases ( ( k2 < i & perm . k2 < perm . i ) or ( k2 < i & perm . k2 >= perm . i ) or ( k2 >= i & perm . (k2 + 1) < perm . i ) or ( k2 >= i & perm . (k2 + 1) >= perm . i ) ) ;
suppose ( k2 < i & perm . k2 < perm . i ) ; ::_thesis: x1 = x2
then p9 . k2 = p9 . k1 by A31, A33, A34, A36, A43, A51;
hence x1 = x2 by A2, A36, A43, A41, A47, FUNCT_1:def_4; ::_thesis: verum
end;
supposeA52: ( k2 < i & perm . k2 >= perm . i ) ; ::_thesis: x1 = x2
then q . k2 = (perm . k2) - 1 by A31, A33, A43;
then (perm . k1) + 1 = perm . k2 by A34, A36, A43, A51;
then perm . k2 <= perm . i by A50, NAT_1:13;
then p9 . k2 = p9 . i by A52, XXREAL_0:1;
hence x1 = x2 by A1, A2, A47, A52, FUNCT_1:def_4; ::_thesis: verum
end;
supposeA53: ( k2 >= i & perm . (k2 + 1) < perm . i ) ; ::_thesis: x1 = x2
then p9 . k1 = p9 . (k2 + 1) by A31, A33, A34, A36, A43, A51;
then k1 = k2 + 1 by A2, A41, A49, FUNCT_1:def_4;
hence x1 = x2 by A50, A53, NAT_1:13; ::_thesis: verum
end;
supposeA54: ( k2 >= i & perm . (k2 + 1) >= perm . i ) ; ::_thesis: x1 = x2
then perm . k1 = (perm . (k2 + 1)) - 1 by A31, A33, A34, A36, A43, A51;
then (perm . k1) + 1 = perm . (k2 + 1) ;
then perm . (k2 + 1) <= perm . i by A50, NAT_1:13;
then p9 . (k2 + 1) = perm . i by A54, XXREAL_0:1;
then k2 + 1 = i by A1, A2, A49, FUNCT_1:def_4;
hence x1 = x2 by A54, NAT_1:13; ::_thesis: verum
end;
end;
end;
supposeA55: ( k1 < i & perm . k1 >= perm . i ) ; ::_thesis: x1 = x2
then A56: q . k1 = (perm . k1) - 1 by A31, A32, A36;
percases ( ( k2 < i & perm . k2 < perm . i ) or ( k2 < i & perm . k2 >= perm . i ) or ( k2 >= i & perm . (k2 + 1) < perm . i ) or ( k2 >= i & perm . (k2 + 1) >= perm . i ) ) ;
supposeA57: ( k2 < i & perm . k2 < perm . i ) ; ::_thesis: x1 = x2
then q . k2 = p9 . k2 by A31, A33, A43;
then perm . k1 = (perm . k2) + 1 by A34, A36, A43, A56;
then perm . k1 <= perm . i by A57, NAT_1:13;
then perm . k1 = perm . i by A55, XXREAL_0:1;
hence x1 = x2 by A1, A2, A41, A55, FUNCT_1:def_4; ::_thesis: verum
end;
suppose ( k2 < i & perm . k2 >= perm . i ) ; ::_thesis: x1 = x2
then (perm . k1) - 1 = (perm . k2) - 1 by A31, A33, A34, A36, A43, A56;
hence x1 = x2 by A2, A36, A43, A41, A47, FUNCT_1:def_4; ::_thesis: verum
end;
supposeA58: ( k2 >= i & perm . (k2 + 1) < perm . i ) ; ::_thesis: x1 = x2
then (perm . k1) - 1 = perm . (k2 + 1) by A31, A33, A34, A36, A43, A56;
then (perm . (k2 + 1)) + 1 = perm . k1 ;
then perm . k1 <= perm . i by A58, NAT_1:13;
then p9 . k1 = p9 . i by A55, XXREAL_0:1;
hence x1 = x2 by A1, A2, A41, A55, FUNCT_1:def_4; ::_thesis: verum
end;
supposeA59: ( k2 >= i & perm . (k2 + 1) >= perm . i ) ; ::_thesis: x1 = x2
then (perm . k1) - 1 = (perm . (k2 + 1)) - 1 by A31, A33, A34, A36, A43, A56;
then k1 = k2 + 1 by A2, A41, A49, FUNCT_1:def_4;
hence x1 = x2 by A55, A59, NAT_1:13; ::_thesis: verum
end;
end;
end;
supposeA60: ( k1 >= i & perm . (k1 + 1) < perm . i ) ; ::_thesis: x1 = x2
then A61: q . k1 = perm . (k1 + 1) by A31, A32, A36;
percases ( ( k2 < i & perm . k2 < perm . i ) or ( k2 < i & perm . k2 >= perm . i ) or ( k2 >= i & perm . (k2 + 1) < perm . i ) or ( k2 >= i & perm . (k2 + 1) >= perm . i ) ) ;
supposeA62: ( k2 < i & perm . k2 < perm . i ) ; ::_thesis: x1 = x2
then p9 . (k1 + 1) = p9 . k2 by A31, A33, A34, A36, A43, A61;
then k1 + 1 = k2 by A2, A47, A42, FUNCT_1:def_4;
hence x1 = x2 by A60, A62, NAT_1:13; ::_thesis: verum
end;
supposeA63: ( k2 < i & perm . k2 >= perm . i ) ; ::_thesis: x1 = x2
then perm . (k1 + 1) = (perm . k2) - 1 by A31, A33, A34, A36, A43, A61;
then perm . k2 = (perm . (k1 + 1)) + 1 ;
then perm . k2 <= perm . i by A60, NAT_1:13;
then p9 . k2 = p9 . i by A63, XXREAL_0:1;
hence x1 = x2 by A1, A2, A47, A63, FUNCT_1:def_4; ::_thesis: verum
end;
suppose ( k2 >= i & perm . (k2 + 1) < perm . i ) ; ::_thesis: x1 = x2
then q . k2 = perm . (k2 + 1) by A31, A33, A43;
then k1 + 1 = k2 + 1 by A2, A34, A36, A43, A42, A49, A61, FUNCT_1:def_4;
hence x1 = x2 by A36, A43; ::_thesis: verum
end;
supposeA64: ( k2 >= i & perm . (k2 + 1) >= perm . i ) ; ::_thesis: x1 = x2
then perm . (k1 + 1) = (perm . (k2 + 1)) - 1 by A31, A33, A34, A36, A43, A61;
then perm . (k2 + 1) = (perm . (k1 + 1)) + 1 ;
then perm . (k2 + 1) <= perm . i by A60, NAT_1:13;
then p9 . (k2 + 1) = p9 . i by A64, XXREAL_0:1;
then k2 + 1 = i by A1, A2, A49, FUNCT_1:def_4;
hence x1 = x2 by A64, NAT_1:13; ::_thesis: verum
end;
end;
end;
supposeA65: ( k1 >= i & perm . (k1 + 1) >= perm . i ) ; ::_thesis: x1 = x2
then A66: q . k1 = (perm . (k1 + 1)) - 1 by A31, A32, A36;
percases ( ( k2 < i & perm . k2 < perm . i ) or ( k2 < i & perm . k2 >= perm . i ) or ( k2 >= i & perm . (k2 + 1) < perm . i ) or ( k2 >= i & perm . (k2 + 1) >= perm . i ) ) ;
supposeA67: ( k2 < i & perm . k2 < perm . i ) ; ::_thesis: x1 = x2
then (perm . (k1 + 1)) - 1 = perm . k2 by A31, A33, A34, A36, A43, A66;
then perm . (k1 + 1) = (perm . k2) + 1 ;
then perm . (k1 + 1) <= perm . i by A67, NAT_1:13;
then p9 . (k1 + 1) = p9 . i by A65, XXREAL_0:1;
then k1 + 1 = i by A1, A2, A42, FUNCT_1:def_4;
hence x1 = x2 by A65, NAT_1:13; ::_thesis: verum
end;
supposeA68: ( k2 < i & perm . k2 >= perm . i ) ; ::_thesis: x1 = x2
then (perm . (k1 + 1)) - 1 = (perm . k2) - 1 by A31, A33, A34, A36, A43, A66;
then k1 + 1 = k2 by A2, A47, A42, FUNCT_1:def_4;
hence x1 = x2 by A65, A68, NAT_1:13; ::_thesis: verum
end;
supposeA69: ( k2 >= i & perm . (k2 + 1) < perm . i ) ; ::_thesis: x1 = x2
then (perm . (k1 + 1)) - 1 = perm . (k2 + 1) by A31, A33, A34, A36, A43, A66;
then perm . (k1 + 1) = (perm . (k2 + 1)) + 1 ;
then perm . (k1 + 1) <= perm . i by A69, NAT_1:13;
then p9 . (k1 + 1) = p9 . i by A65, XXREAL_0:1;
then k1 + 1 = i by A1, A2, A42, FUNCT_1:def_4;
hence x1 = x2 by A65, NAT_1:13; ::_thesis: verum
end;
suppose ( k2 >= i & perm . (k2 + 1) >= perm . i ) ; ::_thesis: x1 = x2
then (perm . (k1 + 1)) - 1 = (perm . (k2 + 1)) - 1 by A31, A33, A34, A36, A43, A66;
then k1 + 1 = k2 + 1 by A2, A42, A49, FUNCT_1:def_4;
hence x1 = x2 by A36, A43; ::_thesis: verum
end;
end;
end;
end;
end;
then A70: q is one-to-one by FUNCT_1:def_4;
card (finSeg N) = card (finSeg N) ;
then ( q is one-to-one & q is onto ) by A70, STIRL2_1:60;
then reconsider q = q as Element of Permutations n by MATRIX_2:def_9;
take q ; ::_thesis: for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies q . k = perm . k ) & ( perm . k >= perm . i implies q . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies q . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies q . k = (perm . (k + 1)) - 1 ) ) ) )
thus for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies q . k = perm . k ) & ( perm . k >= perm . i implies q . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies q . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies q . k = (perm . (k + 1)) - 1 ) ) ) ) by A31; ::_thesis: verum
end;
uniqueness
for b1, b2 being Element of Permutations n st ( for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies b1 . k = perm . k ) & ( perm . k >= perm . i implies b1 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies b1 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies b1 . k = (perm . (k + 1)) - 1 ) ) ) ) ) & ( for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies b2 . k = perm . k ) & ( perm . k >= perm . i implies b2 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies b2 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies b2 . k = (perm . (k + 1)) - 1 ) ) ) ) ) holds
b1 = b2
proof
set p = perm;
let q1, q2 be Element of Permutations n; ::_thesis: ( ( for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies q1 . k = perm . k ) & ( perm . k >= perm . i implies q1 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies q1 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies q1 . k = (perm . (k + 1)) - 1 ) ) ) ) ) & ( for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies q2 . k = perm . k ) & ( perm . k >= perm . i implies q2 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies q2 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies q2 . k = (perm . (k + 1)) - 1 ) ) ) ) ) implies q1 = q2 )
assume that
A71: for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies q1 . k = perm . k ) & ( perm . k >= perm . i implies q1 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies q1 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies q1 . k = (perm . (k + 1)) - 1 ) ) ) ) and
A72: for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies q2 . k = perm . k ) & ( perm . k >= perm . i implies q2 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies q2 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies q2 . k = (perm . (k + 1)) - 1 ) ) ) ) ; ::_thesis: q1 = q2
A73: q1 is Permutation of (Seg n) by MATRIX_2:def_9;
then A74: dom q1 = Seg n by FUNCT_2:52;
A75: now__::_thesis:_for_x_being_set_st_x_in_dom_q1_holds_
q1_._x_=_q2_._x
let x be set ; ::_thesis: ( x in dom q1 implies q1 . x = q2 . x )
assume A76: x in dom q1 ; ::_thesis: q1 . x = q2 . x
consider k being Element of NAT such that
A77: x = k and
1 <= k and
k <= n by A74, A76;
set k1 = k + 1;
A78: ( perm . k < perm . i or perm . k >= perm . i ) ;
A79: ( perm . (k + 1) < perm . i or perm . (k + 1) >= perm . i ) ;
( k < i or k >= i ) ;
then ( ( perm . k < perm . i & q1 . k = perm . k & q2 . k = perm . k ) or ( perm . k >= perm . i & q1 . k = (perm . k) - 1 & q2 . k = (perm . k) - 1 ) or ( perm . (k + 1) < perm . i & q1 . k = perm . (k + 1) & q2 . k = perm . (k + 1) ) or ( perm . (k + 1) >= perm . i & q1 . k = (perm . (k + 1)) - 1 & q2 . k = (perm . (k + 1)) - 1 ) ) by A71, A72, A74, A76, A77, A78, A79;
hence q1 . x = q2 . x by A77; ::_thesis: verum
end;
q2 is Permutation of (Seg n) by MATRIX_2:def_9;
then dom q2 = Seg n by FUNCT_2:52;
hence q1 = q2 by A73, A75, FUNCT_1:2, FUNCT_2:52; ::_thesis: verum
end;
end;
:: deftheorem Def3 defines Rem LAPLACE:def_3_:_
for i, n being Nat
for perm being Element of Permutations (n + 1) st i in Seg (n + 1) holds
for b4 being Element of Permutations n holds
( b4 = Rem (perm,i) iff for k being Nat st k in Seg n holds
( ( k < i implies ( ( perm . k < perm . i implies b4 . k = perm . k ) & ( perm . k >= perm . i implies b4 . k = (perm . k) - 1 ) ) ) & ( k >= i implies ( ( perm . (k + 1) < perm . i implies b4 . k = perm . (k + 1) ) & ( perm . (k + 1) >= perm . i implies b4 . k = (perm . (k + 1)) - 1 ) ) ) ) );
theorem Th20: :: LAPLACE:20
for n, i, j being Nat st i in Seg (n + 1) & j in Seg (n + 1) holds
for P being set st P = { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } holds
ex Proj being Function of P,(Permutations n) st
( Proj is bijective & ( for q1 being Element of Permutations (n + 1) st q1 . i = j holds
Proj . q1 = Rem (q1,i) ) )
proof
let n, i, j be Nat; ::_thesis: ( i in Seg (n + 1) & j in Seg (n + 1) implies for P being set st P = { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } holds
ex Proj being Function of P,(Permutations n) st
( Proj is bijective & ( for q1 being Element of Permutations (n + 1) st q1 . i = j holds
Proj . q1 = Rem (q1,i) ) ) )
assume that
A1: i in Seg (n + 1) and
A2: j in Seg (n + 1) ; ::_thesis: for P being set st P = { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } holds
ex Proj being Function of P,(Permutations n) st
( Proj is bijective & ( for q1 being Element of Permutations (n + 1) st q1 . i = j holds
Proj . q1 = Rem (q1,i) ) )
set n1 = n + 1;
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set P1 = Permutations (N + 1);
defpred S1[ set , set ] means for p being Element of Permutations (N + 1) st $1 = p & p . i = j holds
$2 = Rem (p,i);
let X be set ; ::_thesis: ( X = { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } implies ex Proj being Function of X,(Permutations n) st
( Proj is bijective & ( for q1 being Element of Permutations (n + 1) st q1 . i = j holds
Proj . q1 = Rem (q1,i) ) ) )
assume A3: X = { p1 where p1 is Element of Permutations (n + 1) : p1 . i = j } ; ::_thesis: ex Proj being Function of X,(Permutations n) st
( Proj is bijective & ( for q1 being Element of Permutations (n + 1) st q1 . i = j holds
Proj . q1 = Rem (q1,i) ) )
A4: for x being set st x in X holds
ex y being set st
( y in Permutations n & S1[x,y] )
proof
let x be set ; ::_thesis: ( x in X implies ex y being set st
( y in Permutations n & S1[x,y] ) )
assume x in X ; ::_thesis: ex y being set st
( y in Permutations n & S1[x,y] )
then consider p being Element of Permutations (N + 1) such that
A5: p = x and
p . i = j by A3;
take Rem (p,i) ; ::_thesis: ( Rem (p,i) in Permutations n & S1[x, Rem (p,i)] )
thus ( Rem (p,i) in Permutations n & S1[x, Rem (p,i)] ) by A5; ::_thesis: verum
end;
consider f being Function of X,(Permutations n) such that
A6: for x being set st x in X holds
S1[x,f . x] from FUNCT_2:sch_1(A4);
for x1, x2 being set st x1 in X & x2 in X & f . x1 = f . x2 holds
x1 = x2
proof
let x1, x2 be set ; ::_thesis: ( x1 in X & x2 in X & f . x1 = f . x2 implies x1 = x2 )
assume that
A7: x1 in X and
A8: x2 in X and
A9: f . x1 = f . x2 ; ::_thesis: x1 = x2
consider p1 being Element of Permutations (N + 1) such that
A10: p1 = x1 and
A11: p1 . i = j by A3, A7;
set R1 = Rem (p1,i);
A12: f . x1 = Rem (p1,i) by A6, A7, A10, A11;
consider p2 being Element of Permutations (N + 1) such that
A13: p2 = x2 and
A14: p2 . i = j by A3, A8;
set R2 = Rem (p2,i);
A15: f . x2 = Rem (p2,i) by A6, A8, A13, A14;
reconsider p19 = p1, p29 = p2 as Permutation of (Seg (n + 1)) by MATRIX_2:def_9;
A16: dom p29 = Seg (n + 1) by FUNCT_2:52;
A17: dom p19 = Seg (n + 1) by FUNCT_2:52;
now__::_thesis:_for_x_being_set_st_x_in_Seg_(n_+_1)_holds_
p1_._x_=_p2_._x
let x be set ; ::_thesis: ( x in Seg (n + 1) implies p1 . b1 = p2 . b1 )
assume A18: x in Seg (n + 1) ; ::_thesis: p1 . b1 = p2 . b1
consider k being Element of NAT such that
A19: x = k and
A20: 1 <= k and
A21: k <= n + 1 by A18;
percases ( k < i or k = i or k > i ) by XXREAL_0:1;
supposeA22: k < i ; ::_thesis: p1 . b1 = p2 . b1
i <= n + 1 by A1, FINSEQ_1:1;
then k < n + 1 by A22, XXREAL_0:2;
then k <= n by NAT_1:13;
then A23: k in Seg n by A20;
percases ( ( p1 . k < j & p2 . k < j ) or ( p1 . k >= j & p2 . k >= j ) or ( p1 . k < j & p2 . k >= j ) or ( p1 . k >= j & p2 . k < j ) ) ;
suppose ( ( p1 . k < j & p2 . k < j ) or ( p1 . k >= j & p2 . k >= j ) ) ; ::_thesis: p1 . b1 = p2 . b1
then ( ( (Rem (p1,i)) . k = p1 . k & (Rem (p2,i)) . k = p2 . k ) or ( (Rem (p1,i)) . k = (p1 . k) - 1 & (Rem (p2,i)) . k = (p2 . k) - 1 ) ) by A1, A11, A14, A22, A23, Def3;
hence p1 . x = p2 . x by A9, A12, A15, A19; ::_thesis: verum
end;
suppose ( ( p1 . k < j & p2 . k >= j ) or ( p1 . k >= j & p2 . k < j ) ) ; ::_thesis: p1 . b1 = p2 . b1
then ( ( (Rem (p1,i)) . k = p1 . k & (Rem (p2,i)) . k = (p2 . k) - 1 & p1 . k < j & p2 . k >= j ) or ( (Rem (p1,i)) . k = (p1 . k) - 1 & (Rem (p2,i)) . k = p2 . k & p1 . k >= j & p2 . k < j ) ) by A1, A11, A14, A22, A23, Def3;
then ( ( (p1 . k) + 1 = p2 . k & p1 . k < j & p2 . k >= j ) or ( p1 . k = (p2 . k) + 1 & p1 . k >= j & p2 . k < j ) ) by A9, A12, A15;
then ( ( p2 . k <= j & p2 . k >= j ) or ( p1 . k >= j & p1 . k <= j ) ) by NAT_1:13;
then ( p29 . k = p29 . i or p19 . k = p19 . i ) by A11, A14, XXREAL_0:1;
hence p1 . x = p2 . x by A1, A17, A16, A18, A19, A22, FUNCT_1:def_4; ::_thesis: verum
end;
end;
end;
suppose k = i ; ::_thesis: p1 . b1 = p2 . b1
hence p1 . x = p2 . x by A11, A14, A19; ::_thesis: verum
end;
supposeA24: k > i ; ::_thesis: p1 . b1 = p2 . b1
then reconsider k1 = k - 1 as Element of NAT by NAT_1:20;
k1 + 1 > i by A24;
then A25: k1 >= i by NAT_1:13;
k1 + 1 <= n + 1 by A21;
then k1 < n + 1 by NAT_1:13;
then A26: k1 <= n by NAT_1:13;
1 <= i by A1, FINSEQ_1:1;
then 1 < k1 + 1 by A24, XXREAL_0:2;
then 1 <= k1 by NAT_1:13;
then A27: k1 in Seg n by A26;
percases ( ( p1 . (k1 + 1) < j & p2 . (k1 + 1) < j ) or ( p1 . (k1 + 1) >= j & p2 . (k1 + 1) >= j ) or ( p1 . (k1 + 1) < j & p2 . (k1 + 1) >= j ) or ( p1 . (k1 + 1) >= j & p2 . (k1 + 1) < j ) ) ;
suppose ( ( p1 . (k1 + 1) < j & p2 . (k1 + 1) < j ) or ( p1 . (k1 + 1) >= j & p2 . (k1 + 1) >= j ) ) ; ::_thesis: p1 . b1 = p2 . b1
then ( ( (Rem (p1,i)) . k1 = p1 . k & (Rem (p2,i)) . k1 = p2 . k ) or ( (Rem (p1,i)) . k1 = (p1 . k) - 1 & (Rem (p2,i)) . k1 = (p2 . k) - 1 ) ) by A1, A11, A14, A27, A25, Def3;
hence p1 . x = p2 . x by A9, A12, A15, A19; ::_thesis: verum
end;
suppose ( ( p1 . (k1 + 1) < j & p2 . (k1 + 1) >= j ) or ( p1 . (k1 + 1) >= j & p2 . (k1 + 1) < j ) ) ; ::_thesis: p1 . b1 = p2 . b1
then ( ( (Rem (p1,i)) . k1 = p1 . k & (Rem (p2,i)) . k1 = (p2 . k) - 1 & p1 . k < j & p2 . k >= j ) or ( (Rem (p1,i)) . k1 = (p1 . k) - 1 & (Rem (p2,i)) . k1 = p2 . k & p1 . k >= j & p2 . k < j ) ) by A1, A11, A14, A27, A25, Def3;
then ( ( (p1 . k) + 1 = p2 . k & p1 . k < j & p2 . k >= j ) or ( p1 . k = (p2 . k) + 1 & p1 . k >= j & p2 . k < j ) ) by A9, A12, A15;
then ( ( p2 . k <= j & p2 . k >= j ) or ( p1 . k >= j & p1 . k <= j ) ) by NAT_1:13;
then ( p29 . k = p29 . i or p19 . k = p19 . i ) by A11, A14, XXREAL_0:1;
hence p1 . x = p2 . x by A1, A17, A16, A18, A19, A24, FUNCT_1:def_4; ::_thesis: verum
end;
end;
end;
end;
end;
hence x1 = x2 by A10, A13, A17, A16, FUNCT_1:2; ::_thesis: verum
end;
then A28: f is one-to-one by FUNCT_2:19;
set P = Permutations N;
A29: card (Permutations N) = N ! by Th6;
card X = N ! by A1, A2, A3, Th7;
then reconsider P9 = Permutations N, X9 = X as finite set by A29;
take f ; ::_thesis: ( f is bijective & ( for q1 being Element of Permutations (n + 1) st q1 . i = j holds
f . q1 = Rem (q1,i) ) )
A30: card P9 = n ! by Th6;
card X9 = n ! by A1, A2, A3, Th7;
then ( f is onto & f is one-to-one ) by A28, A30, STIRL2_1:60;
hence f is bijective ; ::_thesis: for q1 being Element of Permutations (n + 1) st q1 . i = j holds
f . q1 = Rem (q1,i)
let p be Element of Permutations (n + 1); ::_thesis: ( p . i = j implies f . p = Rem (p,i) )
assume A31: p . i = j ; ::_thesis: f . p = Rem (p,i)
p in X by A3, A31;
hence f . p = Rem (p,i) by A6, A31; ::_thesis: verum
end;
theorem Th21: :: LAPLACE:21
for n being Nat
for p1 being Element of Permutations (n + 1)
for K being Field
for a being Element of K
for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
- (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
proof
let n be Nat; ::_thesis: for p1 being Element of Permutations (n + 1)
for K being Field
for a being Element of K
for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
- (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
let p1 be Element of Permutations (n + 1); ::_thesis: for K being Field
for a being Element of K
for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
- (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
let K be Field; ::_thesis: for a being Element of K
for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
- (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
let a be Element of K; ::_thesis: for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
- (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
set n1 = n + 1;
let i, j be Nat; ::_thesis: ( i in Seg (n + 1) & p1 . i = j implies - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i)))) )
assume that
A1: i in Seg (n + 1) and
A2: p1 . i = j ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
A3: p1 is Permutation of (Seg (n + 1)) by MATRIX_2:def_9;
then A4: rng p1 = Seg (n + 1) by FUNCT_2:def_3;
dom p1 = Seg (n + 1) by A3, FUNCT_2:52;
then A5: j in Seg (n + 1) by A1, A2, A4, FUNCT_1:def_3;
set R = Rem (p1,i);
percases ( n = 0 or n = 1 or n >= 2 ) by NAT_1:23;
supposeA6: n = 0 ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
then Rem (p1,i) is even by Th11;
then A7: - (a,(Rem (p1,i))) = a by MATRIX_2:def_13;
A8: 1 + 1 = 2 * 1 ;
p1 is even by A6, Th11;
then A9: - (a,p1) = a by MATRIX_2:def_13;
A10: j = 1 by A5, A6, FINSEQ_1:2, TARSKI:def_1;
i = 1 by A1, A6, FINSEQ_1:2, TARSKI:def_1;
then (power K) . ((- (1_ K)),(i + j)) = 1_ K by A10, A8, HURWITZ:4;
hence - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i)))) by A9, A7, VECTSP_1:def_4; ::_thesis: verum
end;
supposeA11: n = 1 ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
then A12: p1 is Permutation of (Seg 2) by MATRIX_2:def_9;
percases ( p1 = <*1,2*> or p1 = <*2,1*> ) by A12, MATRIX_7:1;
supposeA13: p1 = <*1,2*> ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
( i = 1 or i = 2 ) by A1, A11, FINSEQ_1:2, TARSKI:def_2;
then ( ( i = 1 & p1 . i = 1 ) or ( i = 2 & p1 . i = 2 ) ) by A13, FINSEQ_1:44;
then ( i + j = 2 * 1 or i + j = 2 * 2 ) by A2;
then A14: (power K) . ((- (1_ K)),(i + j)) = 1_ K by HURWITZ:4;
A15: len (Permutations 2) = 2 by MATRIX_2:18;
Rem (p1,i) is even by A11, Th11;
then A16: - (a,(Rem (p1,i))) = a by MATRIX_2:def_13;
id (Seg 2) is even by MATRIX_2:25;
then - (a,p1) = a by A11, A13, A15, FINSEQ_2:52, MATRIX_2:def_13;
hence - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i)))) by A14, A16, VECTSP_1:def_4; ::_thesis: verum
end;
supposeA17: p1 = <*2,1*> ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
len (Permutations 2) = 2 by MATRIX_2:18;
then - (a,p1) = - a by A11, A17, MATRIX_2:def_13, MATRIX_9:12;
then A18: - (a,p1) = - ((1_ K) * a) by VECTSP_1:def_4;
( i = 1 or i = 2 ) by A1, A11, FINSEQ_1:2, TARSKI:def_2;
then i + j = (2 * 1) + 1 by A2, A17, FINSEQ_1:44;
then A19: (power K) . ((- (1_ K)),(i + j)) = - (1_ K) by HURWITZ:4;
Rem (p1,i) is even by A11, Th11;
then - (a,(Rem (p1,i))) = a by MATRIX_2:def_13;
hence - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i)))) by A19, A18, VECTSP_1:8; ::_thesis: verum
end;
end;
end;
supposeA20: n >= 2 ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
then reconsider n2 = n - 2 as Element of NAT by NAT_1:21;
percases ( not K is Fanoian or K is Fanoian ) ;
supposeA21: not K is Fanoian ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
A22: now__::_thesis:_(power_K)_._((-_(1__K)),(i_+_j))_=_1__K
percases ( (i + j) mod 2 = 0 or (i + j) mod 2 = 1 ) by NAT_D:12;
suppose (i + j) mod 2 = 0 ; ::_thesis: (power K) . ((- (1_ K)),(i + j)) = 1_ K
then consider t being Nat such that
A23: i + j = (2 * t) + 0 and
0 < 2 by NAT_D:def_2;
t is Element of NAT by ORDINAL1:def_12;
hence (power K) . ((- (1_ K)),(i + j)) = 1_ K by A23, HURWITZ:4; ::_thesis: verum
end;
suppose (i + j) mod 2 = 1 ; ::_thesis: (power K) . ((- (1_ K)),(i + j)) = 1_ K
then consider t being Nat such that
A24: i + j = (2 * t) + 1 and
1 < 2 by NAT_D:def_2;
A25: 1_ K = - (1_ K) by A21, MATRIX11:22;
t is Element of NAT by ORDINAL1:def_12;
hence (power K) . ((- (1_ K)),(i + j)) = 1_ K by A24, A25, HURWITZ:4; ::_thesis: verum
end;
end;
end;
A26: ( - (a,p1) = a or - (a,p1) = - a ) by MATRIX_2:def_13;
- (1_ K) = 1_ K by A21, MATRIX11:22;
then A27: - (a * (1_ K)) = a * (1_ K) by VECTSP_1:9;
A28: - a = - (a * (1_ K)) by VECTSP_1:def_4;
( - (a,(Rem (p1,i))) = a or - (a,(Rem (p1,i))) = - a ) by MATRIX_2:def_13;
then - (a,(Rem (p1,i))) = a by A28, A27, VECTSP_1:def_4;
hence - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i)))) by A22, A26, A27, VECTSP_1:def_4; ::_thesis: verum
end;
supposeA29: K is Fanoian ; ::_thesis: - (a,p1) = ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i))))
set mm = the multF of K;
reconsider n1 = n2 + 1 as Element of NAT ;
set P1 = Permutations (n1 + 2);
reconsider Q1 = p1 as Element of Permutations (n1 + 2) ;
set SS1 = 2Set (Seg (n1 + 2));
consider X being Element of Fin (2Set (Seg (n1 + 2))) such that
A30: X = { {N,i} where N is Element of NAT : {N,i} in 2Set (Seg (n1 + 2)) } and
A31: the multF of K $$ (X,(Part_sgn (Q1,K))) = (power K) . ((- (1_ K)),(i + j)) by A1, A2, A29, Th9;
set PQ1 = Part_sgn (Q1,K);
set SS2 = 2Set (Seg (n2 + 2));
reconsider Q19 = Q1 as Permutation of (Seg (n1 + 2)) by MATRIX_2:def_9;
set P2 = Permutations (n2 + 2);
reconsider Q = Rem (p1,i) as Element of Permutations (n2 + 2) ;
reconsider Q9 = Q as Permutation of (Seg (n2 + 2)) by MATRIX_2:def_9;
set PQ = Part_sgn (Q,K);
A32: FinOmega (2Set (Seg (n1 + 2))) = 2Set (Seg (n1 + 2)) by MATRIX_2:def_14;
reconsider SSX = (2Set (Seg (n1 + 2))) \ X as Element of Fin (2Set (Seg (n1 + 2))) by FINSUB_1:def_5;
A33: X \/ SSX = (2Set (Seg (n1 + 2))) \/ X by XBOOLE_1:39;
X c= 2Set (Seg (n1 + 2)) by FINSUB_1:def_5;
then A34: X \/ SSX = 2Set (Seg (n1 + 2)) by A33, XBOOLE_1:12;
consider f being Function of (2Set (Seg (n2 + 2))),(2Set (Seg (n1 + 2))) such that
A35: rng f = (2Set (Seg (n1 + 2))) \ X and
A36: f is one-to-one and
A37: for k, m being Nat st k < m & {k,m} in 2Set (Seg (n2 + 2)) holds
( ( m < i & k < i implies f . {k,m} = {k,m} ) & ( m >= i & k < i implies f . {k,m} = {k,(m + 1)} ) & ( m >= i & k >= i implies f . {k,m} = {(k + 1),(m + 1)} ) ) by A1, A20, A30, Th10;
set Pf = (Part_sgn (Q1,K)) * f;
A38: dom ((Part_sgn (Q1,K)) * f) = 2Set (Seg (n2 + 2)) by FUNCT_2:def_1;
A39: dom Q19 = Seg (n1 + 2) by FUNCT_2:52;
A40: now__::_thesis:_for_x_being_set_st_x_in_2Set_(Seg_(n2_+_2))_holds_
((Part_sgn_(Q1,K))_*_f)_._x_=_(Part_sgn_(Q,K))_._x
n <= n + 1 by NAT_1:11;
then A41: Seg (n2 + 2) c= Seg (n1 + 2) by FINSEQ_1:5;
let x be set ; ::_thesis: ( x in 2Set (Seg (n2 + 2)) implies ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1 )
assume A42: x in 2Set (Seg (n2 + 2)) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
consider k, m being Nat such that
A43: k in Seg (n2 + 2) and
A44: m in Seg (n2 + 2) and
A45: k < m and
A46: x = {k,m} by A42, MATRIX11:1;
reconsider k = k, m = m as Element of NAT by ORDINAL1:def_12;
dom Q9 = Seg (n2 + 2) by FUNCT_2:52;
then Q9 . k <> Q . m by A43, A44, A45, FUNCT_1:def_4;
then A47: ( Q . k > Q . m or Q . k < Q . m ) by XXREAL_0:1;
set m1 = m + 1;
set k1 = k + 1;
A48: (n2 + 2) + 1 = n1 + 2 ;
then A49: k + 1 in Seg (n1 + 2) by A43, FINSEQ_1:60;
A50: m + 1 in Seg (n1 + 2) by A44, A48, FINSEQ_1:60;
percases ( ( k < i & m < i ) or ( k >= i & m < i ) or ( k < i & m >= i ) or ( k >= i & m >= i ) ) ;
supposeA51: ( k < i & m < i ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
A52: ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q1,K)) . (f . x) by A38, A42, FUNCT_1:12;
A53: f . x = x by A37, A42, A45, A46, A51;
percases ( ( Q1 . k < j & Q1 . m < j ) or ( Q1 . k >= j & Q1 . m >= j ) or ( Q1 . k < j & Q1 . m >= j ) or ( Q1 . k >= j & Q1 . m < j ) ) ;
suppose ( ( Q1 . k < j & Q1 . m < j ) or ( Q1 . k >= j & Q1 . m >= j ) ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
then ( ( Q . k = Q1 . k & Q . m = Q1 . m ) or ( Q . k = (Q1 . k) - 1 & Q . m = (Q1 . m) - 1 ) ) by A1, A2, A43, A44, A51, Def3;
then ( ( Q . k < Q . m & Q1 . k < Q1 . m ) or ( Q . k > Q . m & Q1 . k > Q1 . m ) ) by A47, XREAL_1:9;
then ( ( (Part_sgn (Q1,K)) . x = 1_ K & (Part_sgn (Q,K)) . x = 1_ K ) or ( (Part_sgn (Q1,K)) . x = - (1_ K) & (Part_sgn (Q,K)) . x = - (1_ K) ) ) by A43, A44, A45, A46, A41, MATRIX11:def_1;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A38, A42, A53, FUNCT_1:12; ::_thesis: verum
end;
supposeA54: ( Q1 . k < j & Q1 . m >= j ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
then Q . m = (Q1 . m) - 1 by A1, A2, A44, A51, Def3;
then A55: Q1 . m = (Q . m) + 1 ;
Q19 . m <> j by A1, A2, A39, A44, A41, A51, FUNCT_1:def_4;
then Q1 . m > j by A54, XXREAL_0:1;
then A56: Q . m >= j by A55, NAT_1:13;
Q1 . k < Q1 . m by A54, XXREAL_0:2;
then A57: (Part_sgn (Q1,K)) . x = 1_ K by A43, A44, A45, A46, A41, MATRIX11:def_1;
Q1 . k = Q . k by A1, A2, A43, A51, A54, Def3;
then Q . k < Q . m by A54, A56, XXREAL_0:2;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A43, A44, A45, A46, A53, A52, A57, MATRIX11:def_1; ::_thesis: verum
end;
supposeA58: ( Q1 . k >= j & Q1 . m < j ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
then Q . k = (Q1 . k) - 1 by A1, A2, A43, A51, Def3;
then A59: Q1 . k = (Q . k) + 1 ;
Q19 . k <> j by A1, A2, A39, A43, A41, A51, FUNCT_1:def_4;
then Q1 . k > j by A58, XXREAL_0:1;
then A60: Q . k >= j by A59, NAT_1:13;
Q1 . k > Q1 . m by A58, XXREAL_0:2;
then A61: (Part_sgn (Q1,K)) . x = - (1_ K) by A43, A44, A45, A46, A41, MATRIX11:def_1;
Q1 . m = Q . m by A1, A2, A44, A51, A58, Def3;
then Q . k > Q . m by A58, A60, XXREAL_0:2;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A43, A44, A45, A46, A53, A52, A61, MATRIX11:def_1; ::_thesis: verum
end;
end;
end;
suppose ( k >= i & m < i ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A45, XXREAL_0:2; ::_thesis: verum
end;
supposeA62: ( k < i & m >= i ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
A63: ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q1,K)) . (f . {k,m}) by A38, A42, A46, FUNCT_1:12;
A64: f . {k,m} = {k,(m + 1)} by A37, A42, A45, A46, A62;
percases ( ( Q1 . k < j & Q1 . (m + 1) < j ) or ( Q1 . k >= j & Q1 . (m + 1) >= j ) or ( Q1 . k < j & Q1 . (m + 1) >= j ) or ( Q1 . k >= j & Q1 . (m + 1) < j ) ) ;
suppose ( ( Q1 . k < j & Q1 . (m + 1) < j ) or ( Q1 . k >= j & Q1 . (m + 1) >= j ) ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
then ( ( Q . k = Q1 . k & Q . m = Q1 . (m + 1) ) or ( Q . k = (Q1 . k) - 1 & Q . m = (Q1 . (m + 1)) - 1 ) ) by A1, A2, A43, A44, A62, Def3;
then A65: ( ( Q . k < Q . m & Q1 . k < Q1 . (m + 1) ) or ( Q . k > Q . m & Q1 . k > Q1 . (m + 1) ) ) by A47, XREAL_1:9;
k < m + 1 by A45, NAT_1:13;
then ( ( (Part_sgn (Q1,K)) . {k,(m + 1)} = 1_ K & (Part_sgn (Q,K)) . x = 1_ K ) or ( (Part_sgn (Q1,K)) . {k,(m + 1)} = - (1_ K) & (Part_sgn (Q,K)) . x = - (1_ K) ) ) by A43, A44, A45, A46, A41, A50, A65, MATRIX11:def_1;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A38, A42, A46, A64, FUNCT_1:12; ::_thesis: verum
end;
supposeA66: ( Q1 . k < j & Q1 . (m + 1) >= j ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
m + 1 > i by A62, NAT_1:13;
then Q19 . (m + 1) <> j by A1, A2, A39, A50, FUNCT_1:def_4;
then A67: Q1 . (m + 1) > j by A66, XXREAL_0:1;
Q . m = (Q1 . (m + 1)) - 1 by A1, A2, A44, A62, A66, Def3;
then Q1 . (m + 1) = (Q . m) + 1 ;
then A68: Q . m >= j by A67, NAT_1:13;
Q1 . k = Q . k by A1, A2, A43, A62, A66, Def3;
then A69: Q . k < Q . m by A66, A68, XXREAL_0:2;
A70: k < m + 1 by A45, NAT_1:13;
Q1 . k < Q1 . (m + 1) by A66, XXREAL_0:2;
then (Part_sgn (Q1,K)) . {k,(m + 1)} = 1_ K by A43, A41, A50, A70, MATRIX11:def_1;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A43, A44, A45, A46, A64, A63, A69, MATRIX11:def_1; ::_thesis: verum
end;
supposeA71: ( Q1 . k >= j & Q1 . (m + 1) < j ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
then Q . k = (Q1 . k) - 1 by A1, A2, A43, A62, Def3;
then A72: Q1 . k = (Q . k) + 1 ;
Q19 . k <> j by A1, A2, A39, A43, A41, A62, FUNCT_1:def_4;
then Q1 . k > j by A71, XXREAL_0:1;
then A73: Q . k >= j by A72, NAT_1:13;
Q1 . (m + 1) = Q . m by A1, A2, A44, A62, A71, Def3;
then A74: Q . m < Q . k by A71, A73, XXREAL_0:2;
A75: k < m + 1 by A45, NAT_1:13;
Q1 . k > Q1 . (m + 1) by A71, XXREAL_0:2;
then (Part_sgn (Q1,K)) . {k,(m + 1)} = - (1_ K) by A43, A41, A50, A75, MATRIX11:def_1;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A43, A44, A45, A46, A64, A63, A74, MATRIX11:def_1; ::_thesis: verum
end;
end;
end;
supposeA76: ( k >= i & m >= i ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
A77: ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q1,K)) . (f . {k,m}) by A38, A42, A46, FUNCT_1:12;
A78: k + 1 < m + 1 by A45, XREAL_1:6;
A79: f . {k,m} = {(k + 1),(m + 1)} by A37, A42, A45, A46, A76;
percases ( ( Q1 . (k + 1) < j & Q1 . (m + 1) < j ) or ( Q1 . (k + 1) >= j & Q1 . (m + 1) >= j ) or ( Q1 . (k + 1) < j & Q1 . (m + 1) >= j ) or ( Q1 . (k + 1) >= j & Q1 . (m + 1) < j ) ) ;
suppose ( ( Q1 . (k + 1) < j & Q1 . (m + 1) < j ) or ( Q1 . (k + 1) >= j & Q1 . (m + 1) >= j ) ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
then ( ( Q . k = Q1 . (k + 1) & Q . m = Q1 . (m + 1) ) or ( Q . k = (Q1 . (k + 1)) - 1 & Q . m = (Q1 . (m + 1)) - 1 ) ) by A1, A2, A43, A44, A76, Def3;
then ( ( Q . k < Q . m & Q1 . (k + 1) < Q1 . (m + 1) ) or ( Q . k > Q . m & Q1 . (k + 1) > Q1 . (m + 1) ) ) by A47, XREAL_1:9;
then ( ( (Part_sgn (Q1,K)) . {(k + 1),(m + 1)} = 1_ K & (Part_sgn (Q,K)) . x = 1_ K ) or ( (Part_sgn (Q1,K)) . {(m + 1),(k + 1)} = - (1_ K) & (Part_sgn (Q,K)) . x = - (1_ K) ) ) by A43, A44, A45, A46, A49, A50, A78, MATRIX11:def_1;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A38, A42, A46, A79, FUNCT_1:12; ::_thesis: verum
end;
supposeA80: ( Q1 . (k + 1) < j & Q1 . (m + 1) >= j ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
m + 1 > i by A76, NAT_1:13;
then Q19 . (m + 1) <> j by A1, A2, A39, A50, FUNCT_1:def_4;
then A81: Q1 . (m + 1) > j by A80, XXREAL_0:1;
Q . m = (Q1 . (m + 1)) - 1 by A1, A2, A44, A76, A80, Def3;
then Q1 . (m + 1) = (Q . m) + 1 ;
then A82: Q . m >= j by A81, NAT_1:13;
Q1 . (k + 1) < Q1 . (m + 1) by A80, XXREAL_0:2;
then A83: (Part_sgn (Q1,K)) . {(k + 1),(m + 1)} = 1_ K by A49, A50, A78, MATRIX11:def_1;
Q1 . (k + 1) = Q . k by A1, A2, A43, A76, A80, Def3;
then Q . k < Q . m by A80, A82, XXREAL_0:2;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A43, A44, A45, A46, A79, A77, A83, MATRIX11:def_1; ::_thesis: verum
end;
supposeA84: ( Q1 . (k + 1) >= j & Q1 . (m + 1) < j ) ; ::_thesis: ((Part_sgn (Q1,K)) * f) . b1 = (Part_sgn (Q,K)) . b1
k + 1 > i by A76, NAT_1:13;
then Q19 . (k + 1) <> j by A1, A2, A39, A49, FUNCT_1:def_4;
then A85: Q1 . (k + 1) > j by A84, XXREAL_0:1;
Q . k = (Q1 . (k + 1)) - 1 by A1, A2, A43, A76, A84, Def3;
then Q1 . (k + 1) = (Q . k) + 1 ;
then A86: Q . k >= j by A85, NAT_1:13;
Q1 . (k + 1) > Q1 . (m + 1) by A84, XXREAL_0:2;
then A87: (Part_sgn (Q1,K)) . {(k + 1),(m + 1)} = - (1_ K) by A49, A50, A78, MATRIX11:def_1;
Q1 . (m + 1) = Q . m by A1, A2, A44, A76, A84, Def3;
then Q . k > Q . m by A84, A86, XXREAL_0:2;
hence ((Part_sgn (Q1,K)) * f) . x = (Part_sgn (Q,K)) . x by A43, A44, A45, A46, A79, A77, A87, MATRIX11:def_1; ::_thesis: verum
end;
end;
end;
end;
end;
reconsider domf = dom f as Element of Fin (2Set (Seg (n2 + 2))) by FINSUB_1:def_5;
A88: f .: domf = rng f by RELAT_1:113;
dom f = 2Set (Seg (n2 + 2)) by FUNCT_2:def_1;
then A89: domf = FinOmega (2Set (Seg (n2 + 2))) by MATRIX_2:def_14;
dom (Part_sgn (Q,K)) = 2Set (Seg (n2 + 2)) by FUNCT_2:def_1;
then Part_sgn (Q,K) = (Part_sgn (Q1,K)) * f by A38, A40, FUNCT_1:2;
then A90: the multF of K $$ (SSX,(Part_sgn (Q1,K))) = sgn (Q,K) by A35, A36, A89, A88, SETWOP_2:6;
X misses SSX by XBOOLE_1:79;
then sgn (Q1,K) = ((power K) . ((- (1_ K)),(i + j))) * (sgn (Q,K)) by A31, A90, A34, A32, SETWOP_2:4;
hence - (a,p1) = (((power K) . ((- (1_ K)),(i + j))) * (sgn (Q,K))) * a by MATRIX11:26
.= ((power K) . ((- (1_ K)),(i + j))) * ((sgn (Q,K)) * a) by GROUP_1:def_3
.= ((power K) . ((- (1_ K)),(i + j))) * (- (a,(Rem (p1,i)))) by MATRIX11:26 ;
::_thesis: verum
end;
end;
end;
end;
end;
theorem Th22: :: LAPLACE:22
for n being Nat
for p1 being Element of Permutations (n + 1)
for K being Field
for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
for M being Matrix of n + 1,K
for DM being Matrix of n,K st DM = Delete (M,i,j) holds
(Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
proof
let n be Nat; ::_thesis: for p1 being Element of Permutations (n + 1)
for K being Field
for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
for M being Matrix of n + 1,K
for DM being Matrix of n,K st DM = Delete (M,i,j) holds
(Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
let p1 be Element of Permutations (n + 1); ::_thesis: for K being Field
for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
for M being Matrix of n + 1,K
for DM being Matrix of n,K st DM = Delete (M,i,j) holds
(Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
let K be Field; ::_thesis: for i, j being Nat st i in Seg (n + 1) & p1 . i = j holds
for M being Matrix of n + 1,K
for DM being Matrix of n,K st DM = Delete (M,i,j) holds
(Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set n1 = N + 1;
let i, j be Nat; ::_thesis: ( i in Seg (n + 1) & p1 . i = j implies for M being Matrix of n + 1,K
for DM being Matrix of n,K st DM = Delete (M,i,j) holds
(Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i))) )
assume that
A1: i in Seg (n + 1) and
A2: p1 . i = j ; ::_thesis: for M being Matrix of n + 1,K
for DM being Matrix of n,K st DM = Delete (M,i,j) holds
(Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
set mm = the multF of K;
set R = Rem (p1,i);
let M be Matrix of n + 1,K; ::_thesis: for DM being Matrix of n,K st DM = Delete (M,i,j) holds
(Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
let DM be Matrix of n,K; ::_thesis: ( DM = Delete (M,i,j) implies (Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i))) )
assume A3: DM = Delete (M,i,j) ; ::_thesis: (Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
set PR = Path_matrix ((Rem (p1,i)),DM);
set Pp1 = Path_matrix (p1,M);
len (Path_matrix (p1,M)) = N + 1 by MATRIX_3:def_7;
then dom (Path_matrix (p1,M)) = Seg (N + 1) by FINSEQ_1:def_3;
then A4: (Path_matrix (p1,M)) . i = M * (i,j) by A1, A2, MATRIX_3:def_7;
A5: now__::_thesis:_the_multF_of_K_$$_(Path_matrix_(p1,M))_=_(M_*_(i,j))_*_(_the_multF_of_K_$$_(Path_matrix_((Rem_(p1,i)),DM)))
percases ( N = 0 or N > 0 ) ;
supposeA6: N = 0 ; ::_thesis: the multF of K $$ (Path_matrix (p1,M)) = (M * (i,j)) * ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM)))
then A7: len (Path_matrix (p1,M)) = 1 by MATRIX_3:def_7;
(Path_matrix (p1,M)) . 1 = M * (i,j) by A1, A4, A6, FINSEQ_1:2, TARSKI:def_1;
then Path_matrix (p1,M) = <*(M * (i,j))*> by A7, FINSEQ_1:40;
then A8: the multF of K $$ (Path_matrix (p1,M)) = M * (i,j) by FINSOP_1:11;
len (Path_matrix ((Rem (p1,i)),DM)) = 0 by A6, MATRIX_3:def_7;
then Path_matrix ((Rem (p1,i)),DM) = <*> the carrier of K ;
then A9: the multF of K $$ (Path_matrix ((Rem (p1,i)),DM)) = the_unity_wrt the multF of K by FINSOP_1:10;
the_unity_wrt the multF of K = 1_ K by FVSUM_1:5;
hence the multF of K $$ (Path_matrix (p1,M)) = (M * (i,j)) * ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM))) by A8, A9, VECTSP_1:def_4; ::_thesis: verum
end;
supposeA10: N > 0 ; ::_thesis: the multF of K $$ (Path_matrix (p1,M)) = (M * (i,j)) * ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM)))
len (Path_matrix ((Rem (p1,i)),DM)) = n by MATRIX_3:def_7;
then consider f being Function of NAT, the carrier of K such that
A11: f . 1 = (Path_matrix ((Rem (p1,i)),DM)) . 1 and
A12: for k being Element of NAT st 0 <> k & k < n holds
f . (k + 1) = the multF of K . ((f . k),((Path_matrix ((Rem (p1,i)),DM)) . (k + 1))) and
A13: the multF of K $$ (Path_matrix ((Rem (p1,i)),DM)) = f . n by A10, FINSOP_1:def_1;
len (Path_matrix (p1,M)) = N + 1 by MATRIX_3:def_7;
then consider F being Function of NAT, the carrier of K such that
A14: F . 1 = (Path_matrix (p1,M)) . 1 and
A15: for k being Element of NAT st 0 <> k & k < N + 1 holds
F . (k + 1) = the multF of K . ((F . k),((Path_matrix (p1,M)) . (k + 1))) and
A16: the multF of K $$ (Path_matrix (p1,M)) = F . (N + 1) by FINSOP_1:def_1;
defpred S1[ Nat] means ( 1 <= $1 & $1 < i implies f . $1 = F . $1 );
A17: for k being Nat st k in Seg n holds
( ( k < i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . k ) & ( k >= i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . (k + 1) ) )
proof
len (Path_matrix (p1,M)) = N + 1 by MATRIX_3:def_7;
then A18: dom (Path_matrix (p1,M)) = Seg (N + 1) by FINSEQ_1:def_3;
len (Path_matrix ((Rem (p1,i)),DM)) = n by MATRIX_3:def_7;
then A19: dom (Path_matrix ((Rem (p1,i)),DM)) = Seg n by FINSEQ_1:def_3;
reconsider p19 = p1 as Permutation of (Seg (N + 1)) by MATRIX_2:def_9;
reconsider R9 = Rem (p1,i) as Permutation of (Seg n) by MATRIX_2:def_9;
let k be Nat; ::_thesis: ( k in Seg n implies ( ( k < i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . k ) & ( k >= i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . (k + 1) ) ) )
assume A20: k in Seg n ; ::_thesis: ( ( k < i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . k ) & ( k >= i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . (k + 1) ) )
reconsider k1 = k + 1 as Element of NAT ;
A21: k1 in Seg (N + 1) by A20, FINSEQ_1:60;
A22: rng p19 = Seg (N + 1) by FUNCT_2:def_3;
dom p19 = Seg (N + 1) by FUNCT_2:52;
then A23: j in Seg (N + 1) by A1, A2, A22, FUNCT_1:def_3;
A24: rng R9 = Seg n by FUNCT_2:def_3;
dom R9 = Seg n by FUNCT_2:52;
then A25: (Rem (p1,i)) . k in Seg n by A20, A24, FUNCT_1:def_3;
then consider Rk being Element of NAT such that
A26: Rk = (Rem (p1,i)) . k and
1 <= Rk and
Rk <= n ;
A27: (N + 1) -' 1 = (N + 1) - 1 by XREAL_0:def_2;
n <= N + 1 by NAT_1:11;
then A28: Seg n c= Seg (N + 1) by FINSEQ_1:5;
thus ( k < i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . k ) ::_thesis: ( k >= i implies (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . (k + 1) )
proof
assume A29: k < i ; ::_thesis: (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . k
dom p19 = Seg (N + 1) by FUNCT_2:52;
then p19 . k <> p19 . i by A1, A20, A28, A29, FUNCT_1:def_4;
then ( p1 . k < j or p1 . k > j ) by A2, XXREAL_0:1;
then ( ( Rk = p1 . k & p1 . k < j ) or ( p1 . k > j & Rk = (p1 . k) - 1 ) ) by A1, A2, A20, A26, A29, Def3;
then ( ( Rk = p1 . k & p1 . k < j ) or ( p1 . k > j & p1 . k = Rk + 1 ) ) ;
then ( ( Rk = p1 . k & p1 . k < j ) or ( p1 . k > j & Rk >= j & p1 . k = Rk + 1 ) ) by NAT_1:13;
then ( ( DM * (k,Rk) = M * (k,Rk) & (Path_matrix ((Rem (p1,i)),DM)) . k = DM * (k,Rk) & (Path_matrix (p1,M)) . k = M * (k,Rk) ) or ( (Path_matrix ((Rem (p1,i)),DM)) . k = DM * (k,Rk) & DM * (k,Rk) = M * (k,(Rk + 1)) & (Path_matrix (p1,M)) . k = M * (k,(Rk + 1)) ) ) by A1, A3, A20, A25, A23, A26, A28, A27, A19, A18, A29, Th13, MATRIX_3:def_7;
hence (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . k ; ::_thesis: verum
end;
A30: dom p19 = Seg (N + 1) by FUNCT_2:52;
assume A31: k >= i ; ::_thesis: (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . (k + 1)
then k1 > i by NAT_1:13;
then p19 . k1 <> p19 . i by A1, A21, A30, FUNCT_1:def_4;
then ( p1 . k1 < j or p1 . k1 > j ) by A2, XXREAL_0:1;
then ( ( Rk = p1 . k1 & p1 . k1 < j ) or ( p1 . k1 > j & Rk = (p1 . k1) - 1 ) ) by A1, A2, A20, A26, A31, Def3;
then ( ( Rk = p1 . k1 & p1 . k1 < j ) or ( p1 . k1 > j & p1 . k1 = Rk + 1 ) ) ;
then ( ( Rk = p1 . k1 & p1 . k1 < j ) or ( p1 . k1 > j & Rk >= j & p1 . k1 = Rk + 1 ) ) by NAT_1:13;
then ( ( DM * (k,Rk) = M * ((k + 1),Rk) & (Path_matrix ((Rem (p1,i)),DM)) . k = DM * (k,Rk) & (Path_matrix (p1,M)) . k1 = M * ((k + 1),Rk) ) or ( (Path_matrix ((Rem (p1,i)),DM)) . k = DM * (k,Rk) & DM * (k,Rk) = M * ((k + 1),(Rk + 1)) & (Path_matrix (p1,M)) . k1 = M * (k1,(Rk + 1)) ) ) by A1, A3, A20, A25, A23, A26, A27, A21, A19, A18, A31, Th13, MATRIX_3:def_7;
hence (Path_matrix ((Rem (p1,i)),DM)) . k = (Path_matrix (p1,M)) . (k + 1) ; ::_thesis: verum
end;
A32: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A33: S1[k] ; ::_thesis: S1[k + 1]
reconsider e = k as Element of NAT by ORDINAL1:def_12;
assume that
A34: 1 <= k + 1 and
A35: k + 1 < i ; ::_thesis: f . (k + 1) = F . (k + 1)
set k1 = e + 1;
i <= N + 1 by A1, FINSEQ_1:1;
then e + 1 < N + 1 by A35, XXREAL_0:2;
then e + 1 <= n by NAT_1:13;
then A36: e + 1 in Seg N by A34;
percases ( k = 0 or k >= 1 ) by NAT_1:14;
suppose k = 0 ; ::_thesis: f . (k + 1) = F . (k + 1)
hence f . (k + 1) = F . (k + 1) by A14, A11, A17, A35, A36; ::_thesis: verum
end;
supposeA37: k >= 1 ; ::_thesis: f . (k + 1) = F . (k + 1)
i <= N + 1 by A1, FINSEQ_1:1;
then A38: e + 1 < N + 1 by A35, XXREAL_0:2;
then k < N + 1 by NAT_1:13;
then A39: F . (e + 1) = the multF of K . ((F . k),((Path_matrix (p1,M)) . (e + 1))) by A15, A37;
e + 1 <= n by A38, NAT_1:13;
then A40: e + 1 in Seg N by A34;
k < n by A38, XREAL_1:6;
then f . (e + 1) = the multF of K . ((f . k),((Path_matrix ((Rem (p1,i)),DM)) . (e + 1))) by A12, A37;
hence f . (k + 1) = F . (k + 1) by A17, A33, A35, A37, A39, A40, NAT_1:13; ::_thesis: verum
end;
end;
end;
defpred S2[ Nat] means ( i <= $1 & $1 <= N + 1 implies ( ( $1 = 1 implies F . $1 = M * (i,j) ) & ( $1 > 1 implies for a being Element of K st a = f . ($1 - 1) holds
F . $1 = (M * (i,j)) * a ) ) );
A41: S1[ 0 ] ;
A42: for k being Nat holds S1[k] from NAT_1:sch_2(A41, A32);
A43: for k being Nat st S2[k] holds
S2[k + 1]
proof
let k be Nat; ::_thesis: ( S2[k] implies S2[k + 1] )
assume A44: S2[k] ; ::_thesis: S2[k + 1]
set k1 = k + 1;
assume that
A45: i <= k + 1 and
A46: k + 1 <= N + 1 ; ::_thesis: ( ( k + 1 = 1 implies F . (k + 1) = M * (i,j) ) & ( k + 1 > 1 implies for a being Element of K st a = f . ((k + 1) - 1) holds
F . (k + 1) = (M * (i,j)) * a ) )
percases ( k = 0 or k > 0 ) ;
supposeA47: k = 0 ; ::_thesis: ( ( k + 1 = 1 implies F . (k + 1) = M * (i,j) ) & ( k + 1 > 1 implies for a being Element of K st a = f . ((k + 1) - 1) holds
F . (k + 1) = (M * (i,j)) * a ) )
1 <= i by A1, FINSEQ_1:1;
hence ( ( k + 1 = 1 implies F . (k + 1) = M * (i,j) ) & ( k + 1 > 1 implies for a being Element of K st a = f . ((k + 1) - 1) holds
F . (k + 1) = (M * (i,j)) * a ) ) by A4, A14, A45, A47, XXREAL_0:1; ::_thesis: verum
end;
supposeA48: k > 0 ; ::_thesis: ( ( k + 1 = 1 implies F . (k + 1) = M * (i,j) ) & ( k + 1 > 1 implies for a being Element of K st a = f . ((k + 1) - 1) holds
F . (k + 1) = (M * (i,j)) * a ) )
hence ( k + 1 = 1 implies F . (k + 1) = M * (i,j) ) ; ::_thesis: ( k + 1 > 1 implies for a being Element of K st a = f . ((k + 1) - 1) holds
F . (k + 1) = (M * (i,j)) * a )
assume k + 1 > 1 ; ::_thesis: for a being Element of K st a = f . ((k + 1) - 1) holds
F . (k + 1) = (M * (i,j)) * a
let a be Element of K; ::_thesis: ( a = f . ((k + 1) - 1) implies F . (k + 1) = (M * (i,j)) * a )
assume A49: a = f . ((k + 1) - 1) ; ::_thesis: F . (k + 1) = (M * (i,j)) * a
A50: k <= n by A46, XREAL_1:6;
k >= 1 by A48, NAT_1:14;
then A51: k in Seg n by A50, FINSEQ_1:1;
len (Path_matrix ((Rem (p1,i)),DM)) = n by MATRIX_3:def_7;
then A52: dom (Path_matrix ((Rem (p1,i)),DM)) = Seg n by FINSEQ_1:def_3;
then A53: (Path_matrix ((Rem (p1,i)),DM)) . k = DM * (k,((Rem (p1,i)) . k)) by A51, MATRIX_3:def_7;
k < N + 1 by A46, NAT_1:13;
then A54: F . (k + 1) = the multF of K . ((F . k),((Path_matrix (p1,M)) . (k + 1))) by A15, A48, A51;
percases ( k + 1 = i or k + 1 > i ) by A45, XXREAL_0:1;
supposeA55: k + 1 = i ; ::_thesis: F . (k + 1) = (M * (i,j)) * a
then k < i by NAT_1:13;
then F . (k + 1) = a * (M * (i,j)) by A4, A42, A48, A49, A54, A55, NAT_1:14;
hence F . (k + 1) = (M * (i,j)) * a ; ::_thesis: verum
end;
supposeA56: k + 1 > i ; ::_thesis: F . (k + 1) = (M * (i,j)) * a
A57: k < N + 1 by A46, NAT_1:13;
A58: k >= i by A56, NAT_1:13;
i >= 1 by A1, FINSEQ_1:1;
then A59: k >= 1 by A58, XXREAL_0:2;
percases ( k = 1 or k > 1 ) by A59, XXREAL_0:1;
suppose k = 1 ; ::_thesis: F . (k + 1) = (M * (i,j)) * a
hence F . (k + 1) = (M * (i,j)) * a by A11, A17, A44, A46, A49, A51, A54, A58, NAT_1:13; ::_thesis: verum
end;
supposeA60: k > 1 ; ::_thesis: F . (k + 1) = (M * (i,j)) * a
reconsider k9 = k - 1 as Element of NAT by A48, NAT_1:20;
reconsider fk9 = f . k9 as Element of K ;
k9 + 1 <= n by A57, NAT_1:13;
then A61: k9 < n by NAT_1:13;
k9 + 1 > 0 + 1 by A60;
then A62: a = the multF of K . (fk9,((Path_matrix ((Rem (p1,i)),DM)) . (k9 + 1))) by A12, A49, A61;
F . k = (M * (i,j)) * fk9 by A44, A46, A56, A60, NAT_1:13;
hence F . (k + 1) = ((M * (i,j)) * fk9) * (DM * (k,((Rem (p1,i)) . k))) by A17, A51, A54, A53, A58
.= (M * (i,j)) * (fk9 * (DM * (k,((Rem (p1,i)) . k)))) by GROUP_1:def_3
.= (M * (i,j)) * a by A51, A52, A62, MATRIX_3:def_7 ;
::_thesis: verum
end;
end;
end;
end;
end;
end;
end;
A63: S2[ 0 ] ;
A64: for k being Nat holds S2[k] from NAT_1:sch_2(A63, A43);
A65: i <= N + 1 by A1, FINSEQ_1:1;
A66: (N + 1) - 1 = n ;
N + 1 > 0 + 1 by A10, XREAL_1:6;
hence the multF of K $$ (Path_matrix (p1,M)) = (M * (i,j)) * ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM))) by A16, A13, A64, A65, A66; ::_thesis: verum
end;
end;
end;
percases ( Rem (p1,i) is even or Rem (p1,i) is odd ) ;
supposeA67: Rem (p1,i) is even ; ::_thesis: (Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
thus (Path_product M) . p1 = - (( the multF of K $$ (Path_matrix (p1,M))),p1) by MATRIX_3:def_8
.= ((power K) . ((- (1_ K)),(i + j))) * (- (( the multF of K $$ (Path_matrix (p1,M))),(Rem (p1,i)))) by A1, A2, Th21
.= ((power K) . ((- (1_ K)),(i + j))) * ((M * (i,j)) * ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM)))) by A5, A67, MATRIX_2:def_13
.= (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM))) by GROUP_1:def_3
.= (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * (- (( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM))),(Rem (p1,i)))) by A67, MATRIX_2:def_13
.= (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i))) by MATRIX_3:def_8 ; ::_thesis: verum
end;
supposeA68: Rem (p1,i) is odd ; ::_thesis: (Path_product M) . p1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i)))
thus (Path_product M) . p1 = - (( the multF of K $$ (Path_matrix (p1,M))),p1) by MATRIX_3:def_8
.= ((power K) . ((- (1_ K)),(i + j))) * (- (( the multF of K $$ (Path_matrix (p1,M))),(Rem (p1,i)))) by A1, A2, Th21
.= ((power K) . ((- (1_ K)),(i + j))) * (- ((M * (i,j)) * ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM))))) by A5, A68, MATRIX_2:def_13
.= ((power K) . ((- (1_ K)),(i + j))) * ((M * (i,j)) * (- ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM))))) by VECTSP_1:8
.= (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * (- ( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM)))) by GROUP_1:def_3
.= (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * (- (( the multF of K $$ (Path_matrix ((Rem (p1,i)),DM))),(Rem (p1,i)))) by A68, MATRIX_2:def_13
.= (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product DM) . (Rem (p1,i))) by MATRIX_3:def_8 ; ::_thesis: verum
end;
end;
end;
begin
definition
let i, j, n be Nat;
let K be Field;
let M be Matrix of n,K;
func Minor (M,i,j) -> Element of K equals :: LAPLACE:def 4
Det (Delete (M,i,j));
coherence
Det (Delete (M,i,j)) is Element of K ;
end;
:: deftheorem defines Minor LAPLACE:def_4_:_
for i, j, n being Nat
for K being Field
for M being Matrix of n,K holds Minor (M,i,j) = Det (Delete (M,i,j));
definition
let i, j, n be Nat;
let K be Field;
let M be Matrix of n,K;
func Cofactor (M,i,j) -> Element of K equals :: LAPLACE:def 5
((power K) . ((- (1_ K)),(i + j))) * (Minor (M,i,j));
coherence
((power K) . ((- (1_ K)),(i + j))) * (Minor (M,i,j)) is Element of K ;
end;
:: deftheorem defines Cofactor LAPLACE:def_5_:_
for i, j, n being Nat
for K being Field
for M being Matrix of n,K holds Cofactor (M,i,j) = ((power K) . ((- (1_ K)),(i + j))) * (Minor (M,i,j));
theorem Th23: :: LAPLACE:23
for n being Nat
for K being Field
for i, j being Nat st i in Seg n & j in Seg n holds
for P being Element of Fin (Permutations n) st P = { p where p is Element of Permutations n : p . i = j } holds
for M being Matrix of n,K holds the addF of K $$ (P,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j))
proof
let n be Nat; ::_thesis: for K being Field
for i, j being Nat st i in Seg n & j in Seg n holds
for P being Element of Fin (Permutations n) st P = { p where p is Element of Permutations n : p . i = j } holds
for M being Matrix of n,K holds the addF of K $$ (P,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j))
let K be Field; ::_thesis: for i, j being Nat st i in Seg n & j in Seg n holds
for P being Element of Fin (Permutations n) st P = { p where p is Element of Permutations n : p . i = j } holds
for M being Matrix of n,K holds the addF of K $$ (P,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j))
let i, j be Nat; ::_thesis: ( i in Seg n & j in Seg n implies for P being Element of Fin (Permutations n) st P = { p where p is Element of Permutations n : p . i = j } holds
for M being Matrix of n,K holds the addF of K $$ (P,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j)) )
assume that
A1: i in Seg n and
A2: j in Seg n ; ::_thesis: for P being Element of Fin (Permutations n) st P = { p where p is Element of Permutations n : p . i = j } holds
for M being Matrix of n,K holds the addF of K $$ (P,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j))
n > 0 by A1;
then reconsider n9 = n - 1 as Element of NAT by NAT_1:20;
set P = Permutations (n -' 1);
set n91 = n9 + 1;
set P1 = Permutations n;
A3: (n9 + 1) -' 1 = (n9 + 1) - 1 by XREAL_0:def_2;
set aa = the addF of K;
A4: FinOmega (Permutations (n -' 1)) = Permutations (n -' 1) by MATRIX_2:26, MATRIX_2:def_14;
let PP be Element of Fin (Permutations n); ::_thesis: ( PP = { p where p is Element of Permutations n : p . i = j } implies for M being Matrix of n,K holds the addF of K $$ (PP,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j)) )
assume A5: PP = { p where p is Element of Permutations n : p . i = j } ; ::_thesis: for M being Matrix of n,K holds the addF of K $$ (PP,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j))
consider Proj being Function of PP,(Permutations (n -' 1)) such that
A6: Proj is bijective and
A7: for q being Element of Permutations (n9 + 1) st q . i = j holds
Proj . q = Rem (q,i) by A1, A2, A5, A3, Th20;
let M be Matrix of n,K; ::_thesis: the addF of K $$ (PP,(Path_product M)) = (M * (i,j)) * (Cofactor (M,i,j))
set DM = Delete (M,i,j);
set PathM = Path_product M;
set PathDM = Path_product (Delete (M,i,j));
set pm = ((power K) . ((- (1_ K)),(i + j))) * (M * (i,j));
defpred S1[ set ] means for D being Element of Fin (Permutations n)
for ProjD being Element of Fin (Permutations (n -' 1)) st D = $1 & ProjD = Proj .: D & D c= PP holds
the addF of K $$ (D,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j)))));
A8: for B9 being Element of Fin (Permutations n)
for b being Element of Permutations n st S1[B9] & not b in B9 holds
S1[B9 \/ {b}]
proof
let B9 be Element of Fin (Permutations n); ::_thesis: for b being Element of Permutations n st S1[B9] & not b in B9 holds
S1[B9 \/ {b}]
let b be Element of Permutations n; ::_thesis: ( S1[B9] & not b in B9 implies S1[B9 \/ {b}] )
assume that
A9: S1[B9] and
A10: not b in B9 ; ::_thesis: S1[B9 \/ {b}]
A11: b in {b} by TARSKI:def_1;
A12: rng Proj = Permutations (n -' 1) by A6, FUNCT_2:def_3;
then Proj .: B9 c= Permutations (n -' 1) by RELAT_1:111;
then reconsider ProjB9 = Proj .: B9 as Element of Fin (Permutations (n -' 1)) by FINSUB_1:def_5;
let D be Element of Fin (Permutations n); ::_thesis: for ProjD being Element of Fin (Permutations (n -' 1)) st D = B9 \/ {b} & ProjD = Proj .: D & D c= PP holds
the addF of K $$ (D,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j)))))
let ProjD be Element of Fin (Permutations (n -' 1)); ::_thesis: ( D = B9 \/ {b} & ProjD = Proj .: D & D c= PP implies the addF of K $$ (D,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j))))) )
assume that
A13: D = B9 \/ {b} and
A14: ProjD = Proj .: D and
A15: D c= PP ; ::_thesis: the addF of K $$ (D,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j)))))
A16: B9 c= D by A13, XBOOLE_1:7;
B9 c= D by A13, XBOOLE_1:7;
then A17: B9 c= PP by A15, XBOOLE_1:1;
{b} c= D by A13, XBOOLE_1:7;
then A18: b in PP by A15, A11, TARSKI:def_3;
then consider Q1 being Element of Permutations n such that
A19: Q1 = b and
A20: Q1 . i = j by A5;
A21: dom Proj = PP by FUNCT_2:def_1;
then A22: Im (Proj,b) = {(Proj . b)} by A18, FUNCT_1:59;
reconsider Q = Proj . b as Element of Permutations (n -' 1) by A18, A21, A12, FUNCT_1:def_3;
A23: Proj . b in rng Proj by A18, A21, FUNCT_1:def_3;
reconsider Q19 = Q1 as Element of Permutations (n9 + 1) ;
A24: Rem (Q19,i) = Q by A7, A19, A20;
then A25: (Path_product M) . Q1 = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product (Delete (M,i,j))) . Q) by A1, A3, A20, Th22;
A26: not Q in ProjB9
proof
assume Q in ProjB9 ; ::_thesis: contradiction
then ex x being set st
( x in dom Proj & x in B9 & Proj . x = Q ) by FUNCT_1:def_6;
hence contradiction by A6, A10, A18, A21, FUNCT_1:def_4; ::_thesis: verum
end;
percases ( B9 = {} or B9 <> {} ) ;
supposeA27: B9 = {} ; ::_thesis: the addF of K $$ (D,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j)))))
then A28: the addF of K $$ (D,(Path_product M)) = (Path_product M) . b by A13, SETWISEO:17;
the addF of K $$ (ProjD,(Path_product (Delete (M,i,j)))) = (Path_product (Delete (M,i,j))) . (Proj . b) by A13, A14, A22, A23, A12, A27, SETWISEO:17;
hence the addF of K $$ (D,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j))))) by A1, A3, A19, A20, A24, A28, Th22; ::_thesis: verum
end;
supposeA29: B9 <> {} ; ::_thesis: the addF of K $$ (D,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j)))))
ProjD = ProjB9 \/ {Q} by A13, A14, A22, RELAT_1:120;
hence (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j))))) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * (( the addF of K $$ (ProjB9,(Path_product (Delete (M,i,j))))) + ((Path_product (Delete (M,i,j))) . Q)) by A18, A17, A21, A26, A29, SETWOP_2:2
.= ((((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjB9,(Path_product (Delete (M,i,j)))))) + ((((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ((Path_product (Delete (M,i,j))) . Q)) by VECTSP_1:def_2
.= the addF of K . (( the addF of K $$ (B9,(Path_product M))),((Path_product M) . b)) by A9, A15, A19, A16, A25, XBOOLE_1:1
.= the addF of K $$ (D,(Path_product M)) by A10, A13, A29, SETWOP_2:2 ;
::_thesis: verum
end;
end;
end;
A30: S1[ {}. (Permutations n)]
proof
let B be Element of Fin (Permutations n); ::_thesis: for ProjD being Element of Fin (Permutations (n -' 1)) st B = {}. (Permutations n) & ProjD = Proj .: B & B c= PP holds
the addF of K $$ (B,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjD,(Path_product (Delete (M,i,j)))))
let ProjB be Element of Fin (Permutations (n -' 1)); ::_thesis: ( B = {}. (Permutations n) & ProjB = Proj .: B & B c= PP implies the addF of K $$ (B,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjB,(Path_product (Delete (M,i,j))))) )
assume that
A31: B = {}. (Permutations n) and
A32: ProjB = Proj .: B and
B c= PP ; ::_thesis: the addF of K $$ (B,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjB,(Path_product (Delete (M,i,j)))))
ProjB = {}. (Permutations (n -' 1)) by A31, A32;
then A33: the addF of K $$ (ProjB,(Path_product (Delete (M,i,j)))) = the_unity_wrt the addF of K by FVSUM_1:8, SETWISEO:31;
A34: the_unity_wrt the addF of K = 0. K by FVSUM_1:7;
the addF of K $$ (B,(Path_product M)) = the_unity_wrt the addF of K by A31, FVSUM_1:8, SETWISEO:31;
hence the addF of K $$ (B,(Path_product M)) = (((power K) . ((- (1_ K)),(i + j))) * (M * (i,j))) * ( the addF of K $$ (ProjB,(Path_product (Delete (M,i,j))))) by A33, A34, VECTSP_1:6; ::_thesis: verum
end;
A35: for B being Element of Fin (Permutations n) holds S1[B] from SETWISEO:sch_2(A30, A8);
A36: dom Proj = PP by FUNCT_2:def_1;
rng Proj = Permutations (n -' 1) by A6, FUNCT_2:def_3;
then Proj .: PP = FinOmega (Permutations (n -' 1)) by A4, A36, RELAT_1:113;
hence the addF of K $$ (PP,(Path_product M)) = ((M * (i,j)) * ((power K) . ((- (1_ K)),(i + j)))) * (Det (Delete (M,i,j))) by A35
.= (M * (i,j)) * (Cofactor (M,i,j)) by GROUP_1:def_3 ;
::_thesis: verum
end;
theorem Th24: :: LAPLACE:24
for n being Nat
for K being Field
for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
Minor (M,i,j) = Minor ((M @),j,i)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
Minor (M,i,j) = Minor ((M @),j,i)
let K be Field; ::_thesis: for M being Matrix of n,K
for i, j being Nat st i in Seg n & j in Seg n holds
Minor (M,i,j) = Minor ((M @),j,i)
let M be Matrix of n,K; ::_thesis: for i, j being Nat st i in Seg n & j in Seg n holds
Minor (M,i,j) = Minor ((M @),j,i)
let i, j be Nat; ::_thesis: ( i in Seg n & j in Seg n implies Minor (M,i,j) = Minor ((M @),j,i) )
assume that
A1: i in Seg n and
A2: j in Seg n ; ::_thesis: Minor (M,i,j) = Minor ((M @),j,i)
thus Minor (M,i,j) = Det ((Delete (M,i,j)) @) by MATRIXR2:43
.= Minor ((M @),j,i) by A1, A2, Th14 ; ::_thesis: verum
end;
definition
let n be Nat;
let K be Field;
let M be Matrix of n,K;
func Matrix_of_Cofactor M -> Matrix of n,K means :Def6: :: LAPLACE:def 6
for i, j being Nat st [i,j] in Indices it holds
it * (i,j) = Cofactor (M,i,j);
existence
ex b1 being Matrix of n,K st
for i, j being Nat st [i,j] in Indices b1 holds
b1 * (i,j) = Cofactor (M,i,j)
proof
reconsider N = n as Element of NAT by ORDINAL1:def_12;
deffunc H1( Nat, Nat) -> Element of K = Cofactor (M,$1,$2);
ex M being Matrix of N,N,K st
for i, j being Nat st [i,j] in Indices M holds
M * (i,j) = H1(i,j) from MATRIX_1:sch_1();
hence ex b1 being Matrix of n,K st
for i, j being Nat st [i,j] in Indices b1 holds
b1 * (i,j) = Cofactor (M,i,j) ; ::_thesis: verum
end;
uniqueness
for b1, b2 being Matrix of n,K st ( for i, j being Nat st [i,j] in Indices b1 holds
b1 * (i,j) = Cofactor (M,i,j) ) & ( for i, j being Nat st [i,j] in Indices b2 holds
b2 * (i,j) = Cofactor (M,i,j) ) holds
b1 = b2
proof
let C1, C2 be Matrix of n,K; ::_thesis: ( ( for i, j being Nat st [i,j] in Indices C1 holds
C1 * (i,j) = Cofactor (M,i,j) ) & ( for i, j being Nat st [i,j] in Indices C2 holds
C2 * (i,j) = Cofactor (M,i,j) ) implies C1 = C2 )
assume that
A1: for i, j being Nat st [i,j] in Indices C1 holds
C1 * (i,j) = Cofactor (M,i,j) and
A2: for i, j being Nat st [i,j] in Indices C2 holds
C2 * (i,j) = Cofactor (M,i,j) ; ::_thesis: C1 = C2
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_C1_holds_
C1_*_(i,j)_=_C2_*_(i,j)
A3: Indices C1 = Indices C2 by MATRIX_1:26;
let i, j be Nat; ::_thesis: ( [i,j] in Indices C1 implies C1 * (i,j) = C2 * (i,j) )
assume A4: [i,j] in Indices C1 ; ::_thesis: C1 * (i,j) = C2 * (i,j)
reconsider i9 = i, j9 = j as Element of NAT by ORDINAL1:def_12;
C1 * (i,j) = Cofactor (M,i9,j9) by A1, A4;
hence C1 * (i,j) = C2 * (i,j) by A2, A4, A3; ::_thesis: verum
end;
hence C1 = C2 by MATRIX_1:27; ::_thesis: verum
end;
end;
:: deftheorem Def6 defines Matrix_of_Cofactor LAPLACE:def_6_:_
for n being Nat
for K being Field
for M, b4 being Matrix of n,K holds
( b4 = Matrix_of_Cofactor M iff for i, j being Nat st [i,j] in Indices b4 holds
b4 * (i,j) = Cofactor (M,i,j) );
begin
definition
let n, i be Nat;
let K be Field;
let M be Matrix of n,K;
func LaplaceExpL (M,i) -> FinSequence of K means :Def7: :: LAPLACE:def 7
( len it = n & ( for j being Nat st j in dom it holds
it . j = (M * (i,j)) * (Cofactor (M,i,j)) ) );
existence
ex b1 being FinSequence of K st
( len b1 = n & ( for j being Nat st j in dom b1 holds
b1 . j = (M * (i,j)) * (Cofactor (M,i,j)) ) )
proof
reconsider N = n as Element of NAT by ORDINAL1:def_12;
deffunc H1( Nat) -> Element of the carrier of K = (M * (i,$1)) * (Cofactor (M,i,$1));
consider LL being FinSequence such that
A1: ( len LL = N & ( for k being Nat st k in dom LL holds
LL . k = H1(k) ) ) from FINSEQ_1:sch_2();
rng LL c= the carrier of K
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in rng LL or x in the carrier of K )
assume x in rng LL ; ::_thesis: x in the carrier of K
then consider y being set such that
A2: y in dom LL and
A3: LL . y = x by FUNCT_1:def_3;
dom LL = Seg n by A1, FINSEQ_1:def_3;
then consider k being Element of NAT such that
A4: k = y and
1 <= k and
k <= n by A2;
H1(k) is Element of K ;
then LL . k is Element of K by A1, A2, A4;
hence x in the carrier of K by A3, A4; ::_thesis: verum
end;
then reconsider LL = LL as FinSequence of K by FINSEQ_1:def_4;
take LL ; ::_thesis: ( len LL = n & ( for j being Nat st j in dom LL holds
LL . j = (M * (i,j)) * (Cofactor (M,i,j)) ) )
thus len LL = n by A1; ::_thesis: for j being Nat st j in dom LL holds
LL . j = (M * (i,j)) * (Cofactor (M,i,j))
thus for j being Nat st j in dom LL holds
LL . j = (M * (i,j)) * (Cofactor (M,i,j)) by A1; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence of K st len b1 = n & ( for j being Nat st j in dom b1 holds
b1 . j = (M * (i,j)) * (Cofactor (M,i,j)) ) & len b2 = n & ( for j being Nat st j in dom b2 holds
b2 . j = (M * (i,j)) * (Cofactor (M,i,j)) ) holds
b1 = b2
proof
let L1, L2 be FinSequence of K; ::_thesis: ( len L1 = n & ( for j being Nat st j in dom L1 holds
L1 . j = (M * (i,j)) * (Cofactor (M,i,j)) ) & len L2 = n & ( for j being Nat st j in dom L2 holds
L2 . j = (M * (i,j)) * (Cofactor (M,i,j)) ) implies L1 = L2 )
assume that
A5: len L1 = n and
A6: for j being Nat st j in dom L1 holds
L1 . j = (M * (i,j)) * (Cofactor (M,i,j)) and
A7: len L2 = n and
A8: for j being Nat st j in dom L2 holds
L2 . j = (M * (i,j)) * (Cofactor (M,i,j)) ; ::_thesis: L1 = L2
A9: dom L2 = Seg n by A7, FINSEQ_1:def_3;
A10: dom L1 = Seg n by A5, FINSEQ_1:def_3;
now__::_thesis:_for_k_being_Nat_st_k_in_dom_L1_holds_
L1_._k_=_L2_._k
let k be Nat; ::_thesis: ( k in dom L1 implies L1 . k = L2 . k )
assume A11: k in dom L1 ; ::_thesis: L1 . k = L2 . k
L1 . k = (M * (i,k)) * (Cofactor (M,i,k)) by A6, A11;
hence L1 . k = L2 . k by A8, A10, A9, A11; ::_thesis: verum
end;
hence L1 = L2 by A10, A9, FINSEQ_1:13; ::_thesis: verum
end;
end;
:: deftheorem Def7 defines LaplaceExpL LAPLACE:def_7_:_
for n, i being Nat
for K being Field
for M being Matrix of n,K
for b5 being FinSequence of K holds
( b5 = LaplaceExpL (M,i) iff ( len b5 = n & ( for j being Nat st j in dom b5 holds
b5 . j = (M * (i,j)) * (Cofactor (M,i,j)) ) ) );
definition
let n, j be Nat;
let K be Field;
let M be Matrix of n,K;
func LaplaceExpC (M,j) -> FinSequence of K means :Def8: :: LAPLACE:def 8
( len it = n & ( for i being Nat st i in dom it holds
it . i = (M * (i,j)) * (Cofactor (M,i,j)) ) );
existence
ex b1 being FinSequence of K st
( len b1 = n & ( for i being Nat st i in dom b1 holds
b1 . i = (M * (i,j)) * (Cofactor (M,i,j)) ) )
proof
reconsider N = n as Element of NAT by ORDINAL1:def_12;
deffunc H1( Nat) -> Element of the carrier of K = (M * ($1,j)) * (Cofactor (M,$1,j));
consider LL being FinSequence such that
A1: ( len LL = N & ( for k being Nat st k in dom LL holds
LL . k = H1(k) ) ) from FINSEQ_1:sch_2();
rng LL c= the carrier of K
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in rng LL or x in the carrier of K )
assume x in rng LL ; ::_thesis: x in the carrier of K
then consider y being set such that
A2: y in dom LL and
A3: LL . y = x by FUNCT_1:def_3;
dom LL = Seg n by A1, FINSEQ_1:def_3;
then consider k being Element of NAT such that
A4: k = y and
1 <= k and
k <= n by A2;
H1(k) is Element of K ;
then LL . k is Element of K by A1, A2, A4;
hence x in the carrier of K by A3, A4; ::_thesis: verum
end;
then reconsider LL = LL as FinSequence of K by FINSEQ_1:def_4;
take LL ; ::_thesis: ( len LL = n & ( for i being Nat st i in dom LL holds
LL . i = (M * (i,j)) * (Cofactor (M,i,j)) ) )
thus len LL = n by A1; ::_thesis: for i being Nat st i in dom LL holds
LL . i = (M * (i,j)) * (Cofactor (M,i,j))
let i be Nat; ::_thesis: ( i in dom LL implies LL . i = (M * (i,j)) * (Cofactor (M,i,j)) )
assume i in dom LL ; ::_thesis: LL . i = (M * (i,j)) * (Cofactor (M,i,j))
hence LL . i = (M * (i,j)) * (Cofactor (M,i,j)) by A1; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence of K st len b1 = n & ( for i being Nat st i in dom b1 holds
b1 . i = (M * (i,j)) * (Cofactor (M,i,j)) ) & len b2 = n & ( for i being Nat st i in dom b2 holds
b2 . i = (M * (i,j)) * (Cofactor (M,i,j)) ) holds
b1 = b2
proof
let L1, L2 be FinSequence of K; ::_thesis: ( len L1 = n & ( for i being Nat st i in dom L1 holds
L1 . i = (M * (i,j)) * (Cofactor (M,i,j)) ) & len L2 = n & ( for i being Nat st i in dom L2 holds
L2 . i = (M * (i,j)) * (Cofactor (M,i,j)) ) implies L1 = L2 )
assume that
A5: len L1 = n and
A6: for i being Nat st i in dom L1 holds
L1 . i = (M * (i,j)) * (Cofactor (M,i,j)) and
A7: len L2 = n and
A8: for i being Nat st i in dom L2 holds
L2 . i = (M * (i,j)) * (Cofactor (M,i,j)) ; ::_thesis: L1 = L2
A9: dom L2 = Seg n by A7, FINSEQ_1:def_3;
A10: dom L1 = Seg n by A5, FINSEQ_1:def_3;
now__::_thesis:_for_k_being_Nat_st_k_in_dom_L1_holds_
L1_._k_=_L2_._k
let k be Nat; ::_thesis: ( k in dom L1 implies L1 . k = L2 . k )
assume A11: k in dom L1 ; ::_thesis: L1 . k = L2 . k
L1 . k = (M * (k,j)) * (Cofactor (M,k,j)) by A6, A11;
hence L1 . k = L2 . k by A8, A10, A9, A11; ::_thesis: verum
end;
hence L1 = L2 by A10, A9, FINSEQ_1:13; ::_thesis: verum
end;
end;
:: deftheorem Def8 defines LaplaceExpC LAPLACE:def_8_:_
for n, j being Nat
for K being Field
for M being Matrix of n,K
for b5 being FinSequence of K holds
( b5 = LaplaceExpC (M,j) iff ( len b5 = n & ( for i being Nat st i in dom b5 holds
b5 . i = (M * (i,j)) * (Cofactor (M,i,j)) ) ) );
theorem Th25: :: LAPLACE:25
for n being Nat
for K being Field
for i being Nat
for M being Matrix of n,K st i in Seg n holds
Det M = Sum (LaplaceExpL (M,i))
proof
let n be Nat; ::_thesis: for K being Field
for i being Nat
for M being Matrix of n,K st i in Seg n holds
Det M = Sum (LaplaceExpL (M,i))
let K be Field; ::_thesis: for i being Nat
for M being Matrix of n,K st i in Seg n holds
Det M = Sum (LaplaceExpL (M,i))
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set P = Permutations n;
set KK = the carrier of K;
set aa = the addF of K;
A1: the addF of K is having_a_unity by FVSUM_1:8;
let i be Nat; ::_thesis: for M being Matrix of n,K st i in Seg n holds
Det M = Sum (LaplaceExpL (M,i))
let M be Matrix of n,K; ::_thesis: ( i in Seg n implies Det M = Sum (LaplaceExpL (M,i)) )
assume A2: i in Seg n ; ::_thesis: Det M = Sum (LaplaceExpL (M,i))
reconsider X = finSeg N as non empty set by A2;
set Path = Path_product M;
deffunc H1( Element of Fin (Permutations n)) -> Element of the carrier of K = the addF of K $$ ($1,(Path_product M));
consider g being Function of (Fin (Permutations n)), the carrier of K such that
A3: for x being Element of Fin (Permutations n) holds g . x = H1(x) from FUNCT_2:sch_4();
A4: for A, B being Element of Fin (Permutations n) st A misses B holds
the addF of K . ((g . A),(g . B)) = g . (A \/ B)
proof
let A, B be Element of Fin (Permutations n); ::_thesis: ( A misses B implies the addF of K . ((g . A),(g . B)) = g . (A \/ B) )
assume A5: A misses B ; ::_thesis: the addF of K . ((g . A),(g . B)) = g . (A \/ B)
A6: g . A = H1(A) by A3;
A7: g . B = H1(B) by A3;
g . (A \/ B) = H1(A \/ B) by A3;
hence the addF of K . ((g . A),(g . B)) = g . (A \/ B) by A5, A6, A7, FVSUM_1:8, SETWOP_2:4; ::_thesis: verum
end;
deffunc H2( set ) -> set = { p where p is Element of Permutations n : p . i = $1 } ;
consider f being Function such that
A8: ( dom f = X & ( for x being set st x in X holds
f . x = H2(x) ) ) from FUNCT_1:sch_3();
rng f c= Fin (Permutations n)
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in rng f or x in Fin (Permutations n) )
assume x in rng f ; ::_thesis: x in Fin (Permutations n)
then consider y being set such that
A9: y in dom f and
A10: f . y = x by FUNCT_1:def_3;
A11: H2(y) c= Permutations n
proof
let z be set ; :: according to TARSKI:def_3 ::_thesis: ( not z in H2(y) or z in Permutations n )
assume z in H2(y) ; ::_thesis: z in Permutations n
then ex p being Element of Permutations n st
( p = z & p . i = y ) ;
hence z in Permutations n ; ::_thesis: verum
end;
Permutations n is finite by MATRIX_2:26;
then H2(y) in Fin (Permutations n) by A11, FINSUB_1:def_5;
hence x in Fin (Permutations n) by A8, A9, A10; ::_thesis: verum
end;
then reconsider f = f as Function of X,(Fin (Permutations n)) by A8, FUNCT_2:2;
A12: g . (FinOmega (Permutations n)) = Det M by A3;
set gf = g * f;
A13: dom (g * f) = X by FUNCT_2:def_1;
then A14: (g * f) * (id X) = g * f by RELAT_1:52;
A15: Permutations n c= union (f .: X)
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Permutations n or x in union (f .: X) )
assume A16: x in Permutations n ; ::_thesis: x in union (f .: X)
then reconsider p = x as Permutation of X by MATRIX_2:def_9;
A17: x in H2(p . i) by A16;
A18: rng p = X by FUNCT_2:def_3;
dom p = X by FUNCT_2:52;
then A19: p . i in X by A2, A18, FUNCT_1:def_3;
then A20: f . (p . i) in f .: X by A8, FUNCT_1:def_6;
f . (p . i) = H2(p . i) by A8, A19;
hence x in union (f .: X) by A17, A20, TARSKI:def_4; ::_thesis: verum
end;
set L = LaplaceExpL (M,i);
len (LaplaceExpL (M,i)) = n by Def7;
then A21: dom (LaplaceExpL (M,i)) = Seg n by FINSEQ_1:def_3;
then A22: dom (id X) = dom (LaplaceExpL (M,i)) ;
reconsider X9 = X as Element of Fin X by FINSUB_1:def_5;
A23: FinOmega (Permutations n) = Permutations n by MATRIX_2:26, MATRIX_2:def_14;
g . ({}. (Fin (Permutations n))) = the addF of K $$ (({}. (Permutations n)),(Path_product M)) by A3;
then A24: g . {} = the_unity_wrt the addF of K by FVSUM_1:8, SETWISEO:31;
A25: now__::_thesis:_for_x,_y_being_set_st_x_in_X9_&_y_in_X9_&_f_._x_meets_f_._y_holds_
x_=_y
let x, y be set ; ::_thesis: ( x in X9 & y in X9 & f . x meets f . y implies x = y )
assume that
A26: x in X9 and
A27: y in X9 and
A28: f . x meets f . y ; ::_thesis: x = y
consider z being set such that
A29: z in f . x and
A30: z in f . y by A28, XBOOLE_0:3;
f . y = H2(y) by A8, A27;
then A31: ex p being Element of Permutations n st
( p = z & p . i = y ) by A30;
f . x = H2(x) by A8, A26;
then ex p being Element of Permutations n st
( p = z & p . i = x ) by A29;
hence x = y by A31; ::_thesis: verum
end;
now__::_thesis:_for_x_being_set_st_x_in_dom_(g_*_f)_holds_
(LaplaceExpL_(M,i))_._x_=_(g_*_f)_._x
A32: rng f c= Fin (Permutations n) by RELAT_1:def_19;
let x be set ; ::_thesis: ( x in dom (g * f) implies (LaplaceExpL (M,i)) . x = (g * f) . x )
assume A33: x in dom (g * f) ; ::_thesis: (LaplaceExpL (M,i)) . x = (g * f) . x
consider k being Element of NAT such that
A34: k = x and
1 <= k and
k <= n by A13, A33;
f . k in rng f by A8, A33, A34, FUNCT_1:def_3;
then reconsider Fk = H2(k) as Element of Fin (Permutations n) by A8, A33, A34, A32;
A35: f . k = Fk by A8, A33, A34;
(g * f) . k = g . (f . k) by A8, A33, A34, FUNCT_1:13;
then A36: (g * f) . k = H1(Fk) by A3, A35;
H1(Fk) = (M * (i,k)) * (Cofactor (M,i,k)) by A2, A33, A34, Th23;
hence (LaplaceExpL (M,i)) . x = (g * f) . x by A21, A33, A34, A36, Def7; ::_thesis: verum
end;
then A37: LaplaceExpL (M,i) = g * f by A21, A13, FUNCT_1:2;
set Laa = [#] ((LaplaceExpL (M,i)),(the_unity_wrt the addF of K));
A38: rng (id X) = X9 ;
A39: ([#] ((LaplaceExpL (M,i)),(the_unity_wrt the addF of K))) | (dom (LaplaceExpL (M,i))) = LaplaceExpL (M,i) by SETWOP_2:21;
union (f .: X) c= Permutations n
proof
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in union (f .: X) or x in Permutations n )
assume x in union (f .: X) ; ::_thesis: x in Permutations n
then consider y being set such that
A40: x in y and
A41: y in f .: X by TARSKI:def_4;
consider z being set such that
A42: z in dom f and
z in X and
A43: f . z = y by A41, FUNCT_1:def_6;
y = H2(z) by A8, A42, A43;
then ex p being Element of Permutations n st
( x = p & p . i = z ) by A40;
hence x in Permutations n ; ::_thesis: verum
end;
then Permutations n = union (f .: X) by A15, XBOOLE_0:def_10;
then A44: the addF of K $$ ((f .: X9),g) = g . (FinOmega (Permutations n)) by A25, A4, A1, A24, A23, Th12;
the addF of K $$ (X9,(g * f)) = the addF of K $$ ((f .: X9),g) by A25, A4, A1, A24, Th12;
hence Det M = the addF of K $$ ((findom (LaplaceExpL (M,i))),([#] ((LaplaceExpL (M,i)),(the_unity_wrt the addF of K)))) by A22, A38, A39, A14, A37, A44, A12, SETWOP_2:5
.= Sum (LaplaceExpL (M,i)) by FVSUM_1:8, SETWOP_2:def_2 ;
::_thesis: verum
end;
theorem Th26: :: LAPLACE:26
for n being Nat
for K being Field
for M being Matrix of n,K
for i being Nat st i in Seg n holds
LaplaceExpC (M,i) = LaplaceExpL ((M @),i)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K
for i being Nat st i in Seg n holds
LaplaceExpC (M,i) = LaplaceExpL ((M @),i)
let K be Field; ::_thesis: for M being Matrix of n,K
for i being Nat st i in Seg n holds
LaplaceExpC (M,i) = LaplaceExpL ((M @),i)
let M be Matrix of n,K; ::_thesis: for i being Nat st i in Seg n holds
LaplaceExpC (M,i) = LaplaceExpL ((M @),i)
let i be Nat; ::_thesis: ( i in Seg n implies LaplaceExpC (M,i) = LaplaceExpL ((M @),i) )
assume A1: i in Seg n ; ::_thesis: LaplaceExpC (M,i) = LaplaceExpL ((M @),i)
set LL = LaplaceExpL ((M @),i);
set LC = LaplaceExpC (M,i);
reconsider I = i as Element of NAT by ORDINAL1:def_12;
A2: len (LaplaceExpL ((M @),i)) = n by Def7;
A3: len (LaplaceExpC (M,i)) = n by Def8;
now__::_thesis:_for_k_being_Nat_st_1_<=_k_&_k_<=_n_holds_
(LaplaceExpC_(M,i))_._k_=_(LaplaceExpL_((M_@),i))_._k
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies (LaplaceExpC (M,i)) . k = (LaplaceExpL ((M @),i)) . k )
assume that
A4: 1 <= k and
A5: k <= n ; ::_thesis: (LaplaceExpC (M,i)) . k = (LaplaceExpL ((M @),i)) . k
k in NAT by ORDINAL1:def_12;
then A6: k in Seg n by A4, A5;
dom (LaplaceExpC (M,i)) = Seg n by A3, FINSEQ_1:def_3;
then A7: (LaplaceExpC (M,i)) . k = (M * (k,I)) * (Cofactor (M,k,I)) by A6, Def8;
Indices M = [:(Seg n),(Seg n):] by MATRIX_1:24;
then A8: [k,i] in Indices M by A1, A6, ZFMISC_1:87;
dom (LaplaceExpL ((M @),i)) = Seg n by A2, FINSEQ_1:def_3;
then A9: (LaplaceExpL ((M @),i)) . k = ((M @) * (I,k)) * (Cofactor ((M @),I,k)) by A6, Def7;
Cofactor (M,k,I) = Cofactor ((M @),I,k) by A1, A6, Th24;
hence (LaplaceExpC (M,i)) . k = (LaplaceExpL ((M @),i)) . k by A8, A7, A9, MATRIX_1:def_6; ::_thesis: verum
end;
hence LaplaceExpC (M,i) = LaplaceExpL ((M @),i) by A3, A2, FINSEQ_1:14; ::_thesis: verum
end;
theorem :: LAPLACE:27
for n being Nat
for K being Field
for j being Nat
for M being Matrix of n,K st j in Seg n holds
Det M = Sum (LaplaceExpC (M,j))
proof
let n be Nat; ::_thesis: for K being Field
for j being Nat
for M being Matrix of n,K st j in Seg n holds
Det M = Sum (LaplaceExpC (M,j))
let K be Field; ::_thesis: for j being Nat
for M being Matrix of n,K st j in Seg n holds
Det M = Sum (LaplaceExpC (M,j))
let j be Nat; ::_thesis: for M being Matrix of n,K st j in Seg n holds
Det M = Sum (LaplaceExpC (M,j))
let M be Matrix of n,K; ::_thesis: ( j in Seg n implies Det M = Sum (LaplaceExpC (M,j)) )
assume A1: j in Seg n ; ::_thesis: Det M = Sum (LaplaceExpC (M,j))
thus Det M = Det (M @) by MATRIXR2:43
.= Sum (LaplaceExpL ((M @),j)) by A1, Th25
.= Sum (LaplaceExpC (M,j)) by A1, Th26 ; ::_thesis: verum
end;
theorem Th28: :: LAPLACE:28
for n being Nat
for K being Field
for f being FinSequence of K
for M being Matrix of n,K
for p being Element of Permutations n
for i being Nat st len f = n & i in Seg n holds
mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i)
proof
let n be Nat; ::_thesis: for K being Field
for f being FinSequence of K
for M being Matrix of n,K
for p being Element of Permutations n
for i being Nat st len f = n & i in Seg n holds
mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i)
let K be Field; ::_thesis: for f being FinSequence of K
for M being Matrix of n,K
for p being Element of Permutations n
for i being Nat st len f = n & i in Seg n holds
mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i)
let f be FinSequence of K; ::_thesis: for M being Matrix of n,K
for p being Element of Permutations n
for i being Nat st len f = n & i in Seg n holds
mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i)
let M be Matrix of n,K; ::_thesis: for p being Element of Permutations n
for i being Nat st len f = n & i in Seg n holds
mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i)
let p be Element of Permutations n; ::_thesis: for i being Nat st len f = n & i in Seg n holds
mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i)
let i be Nat; ::_thesis: ( len f = n & i in Seg n implies mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i) )
assume that
A1: len f = n and
A2: i in Seg n ; ::_thesis: mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i)
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set KK = the carrier of K;
set C = Matrix_of_Cofactor M;
reconsider Tp = f, TL = Line ((Matrix_of_Cofactor M),i) as Element of N -tuples_on the carrier of K by A1, FINSEQ_2:92, MATRIX_1:24;
set R = RLine (M,i,f);
set LL = LaplaceExpL ((RLine (M,i,f)),i);
set MLT = mlt (TL,Tp);
A3: len (LaplaceExpL ((RLine (M,i,f)),i)) = n by Def7;
A4: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_n_holds_
(mlt_(TL,Tp))_._j_=_(LaplaceExpL_((RLine_(M,i,f)),i))_._j
A5: dom (LaplaceExpL ((RLine (M,i,f)),i)) = Seg n by A3, FINSEQ_1:def_3;
A6: n = width M by MATRIX_1:24;
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies (mlt (TL,Tp)) . j = (LaplaceExpL ((RLine (M,i,f)),i)) . j )
assume that
A7: 1 <= j and
A8: j <= n ; ::_thesis: (mlt (TL,Tp)) . j = (LaplaceExpL ((RLine (M,i,f)),i)) . j
j in NAT by ORDINAL1:def_12;
then A9: j in Seg n by A7, A8;
n = width (Matrix_of_Cofactor M) by MATRIX_1:24;
then A10: (Line ((Matrix_of_Cofactor M),i)) . j = (Matrix_of_Cofactor M) * (i,j) by A9, MATRIX_1:def_7;
Indices M = [:(Seg n),(Seg n):] by MATRIX_1:24;
then [i,j] in Indices M by A2, A9, ZFMISC_1:87;
then A11: (RLine (M,i,f)) * (i,j) = f . j by A1, A6, MATRIX11:def_3;
Indices (Matrix_of_Cofactor M) = [:(Seg n),(Seg n):] by MATRIX_1:24;
then [i,j] in Indices (Matrix_of_Cofactor M) by A2, A9, ZFMISC_1:87;
then (Line ((Matrix_of_Cofactor M),i)) . j = Cofactor (M,i,j) by A10, Def6;
then A12: (mlt (TL,Tp)) . j = (Cofactor (M,i,j)) * ((RLine (M,i,f)) * (i,j)) by A9, A11, FVSUM_1:61;
Cofactor (M,i,j) = Cofactor ((RLine (M,i,f)),i,j) by A2, A9, Th15;
hence (mlt (TL,Tp)) . j = (LaplaceExpL ((RLine (M,i,f)),i)) . j by A9, A5, A12, Def7; ::_thesis: verum
end;
len (mlt (TL,Tp)) = n by CARD_1:def_7;
hence mlt ((Line ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine (M,i,f)),i) by A3, A4, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th29: :: LAPLACE:29
for i, n, j being Nat
for K being Field
for M being Matrix of n,K st i in Seg n holds
(Line (M,j)) "*" (Col (((Matrix_of_Cofactor M) @),i)) = Det (RLine (M,i,(Line (M,j))))
proof
let i, n, j be Nat; ::_thesis: for K being Field
for M being Matrix of n,K st i in Seg n holds
(Line (M,j)) "*" (Col (((Matrix_of_Cofactor M) @),i)) = Det (RLine (M,i,(Line (M,j))))
let K be Field; ::_thesis: for M being Matrix of n,K st i in Seg n holds
(Line (M,j)) "*" (Col (((Matrix_of_Cofactor M) @),i)) = Det (RLine (M,i,(Line (M,j))))
let M be Matrix of n,K; ::_thesis: ( i in Seg n implies (Line (M,j)) "*" (Col (((Matrix_of_Cofactor M) @),i)) = Det (RLine (M,i,(Line (M,j)))) )
assume A1: i in Seg n ; ::_thesis: (Line (M,j)) "*" (Col (((Matrix_of_Cofactor M) @),i)) = Det (RLine (M,i,(Line (M,j))))
set C = Matrix_of_Cofactor M;
len (Matrix_of_Cofactor M) = n by MATRIX_1:24;
then dom (Matrix_of_Cofactor M) = Seg n by FINSEQ_1:def_3;
then A2: Line ((Matrix_of_Cofactor M),i) = Col (((Matrix_of_Cofactor M) @),i) by A1, MATRIX_2:14;
width M = n by MATRIX_1:24;
then A3: len (Line (M,j)) = n by MATRIX_1:def_7;
thus Det (RLine (M,i,(Line (M,j)))) = Sum (LaplaceExpL ((RLine (M,i,(Line (M,j)))),i)) by A1, Th25
.= Sum (mlt ((Col (((Matrix_of_Cofactor M) @),i)),(Line (M,j)))) by A1, A2, A3, Th28
.= (Line (M,j)) "*" (Col (((Matrix_of_Cofactor M) @),i)) by FVSUM_1:64 ; ::_thesis: verum
end;
theorem Th30: :: LAPLACE:30
for n being Nat
for K being Field
for M being Matrix of n,K st Det M <> 0. K holds
M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K st Det M <> 0. K holds
M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n)
let K be Field; ::_thesis: for M being Matrix of n,K st Det M <> 0. K holds
M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n)
let M be Matrix of n,K; ::_thesis: ( Det M <> 0. K implies M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n) )
set D = Det M;
set D9 = (Det M) " ;
set C = Matrix_of_Cofactor M;
set DC = ((Det M) ") * ((Matrix_of_Cofactor M) @);
set MC = M * (((Det M) ") * ((Matrix_of_Cofactor M) @));
set ID = 1. (K,n);
assume A1: Det M <> 0. K ; ::_thesis: M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n)
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_(M_*_(((Det_M)_")_*_((Matrix_of_Cofactor_M)_@)))_holds_
(1._(K,n))_*_(i,j)_=_(M_*_(((Det_M)_")_*_((Matrix_of_Cofactor_M)_@)))_*_(i,j)
A2: Indices (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) = Indices (1. (K,n)) by MATRIX_1:26;
reconsider N = n as Element of NAT by ORDINAL1:def_12;
let i, j be Nat; ::_thesis: ( [i,j] in Indices (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) implies (1. (K,n)) * (b1,b2) = (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) * (b1,b2) )
assume A3: [i,j] in Indices (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) ; ::_thesis: (1. (K,n)) * (b1,b2) = (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) * (b1,b2)
reconsider COL = Col (((Matrix_of_Cofactor M) @),j), L = Line (M,i) as Element of N -tuples_on the carrier of K by MATRIX_1:24;
reconsider i9 = i, j9 = j as Element of NAT by ORDINAL1:def_12;
A4: len (((Det M) ") * ((Matrix_of_Cofactor M) @)) = n by MATRIX_1:24;
A5: Indices (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) = [:(Seg n),(Seg n):] by MATRIX_1:24;
then A6: i in Seg n by A3, ZFMISC_1:87;
A7: j in Seg n by A3, A5, ZFMISC_1:87;
then A8: 1 <= j by FINSEQ_1:1;
width ((Matrix_of_Cofactor M) @) = n by MATRIX_1:24;
then j <= width ((Matrix_of_Cofactor M) @) by A7, FINSEQ_1:1;
then Col ((((Det M) ") * ((Matrix_of_Cofactor M) @)),j) = ((Det M) ") * COL by A8, MATRIXR1:19;
then mlt ((Line (M,i)),(Col ((((Det M) ") * ((Matrix_of_Cofactor M) @)),j))) = ((Det M) ") * (mlt (L,COL)) by FVSUM_1:69;
then A9: (Line (M,i)) "*" (Col ((((Det M) ") * ((Matrix_of_Cofactor M) @)),j)) = ((Det M) ") * ((Line (M,i)) "*" (Col (((Matrix_of_Cofactor M) @),j))) by FVSUM_1:73
.= ((Det M) ") * (Det (RLine (M,j9,(Line (M,i9))))) by A7, Th29 ;
A10: width M = n by MATRIX_1:24;
then A11: (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) * (i,j) = ((Det M) ") * (Det (RLine (M,j,(Line (M,i))))) by A3, A4, A9, MATRIX_3:def_4;
percases ( i = j or i <> j ) ;
supposeA12: i = j ; ::_thesis: (1. (K,n)) * (b1,b2) = (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) * (b1,b2)
then A13: RLine (M,j,(Line (M,i))) = M by MATRIX11:30;
A14: (Det M) * ((Det M) ") = 1_ K by A1, VECTSP_1:def_10;
(1. (K,n)) * (i,j) = 1_ K by A3, A2, A12, MATRIX_1:def_11;
hence (1. (K,n)) * (i,j) = (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) * (i,j) by A3, A10, A4, A9, A13, A14, MATRIX_3:def_4; ::_thesis: verum
end;
supposeA15: i <> j ; ::_thesis: (1. (K,n)) * (b1,b2) = (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) * (b1,b2)
then A16: (1. (K,n)) * (i,j) = 0. K by A3, A2, MATRIX_1:def_11;
Det (RLine (M,j9,(Line (M,i9)))) = 0. K by A6, A7, A15, MATRIX11:51;
hence (1. (K,n)) * (i,j) = (M * (((Det M) ") * ((Matrix_of_Cofactor M) @))) * (i,j) by A11, A16, VECTSP_1:6; ::_thesis: verum
end;
end;
end;
hence M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n) by MATRIX_1:27; ::_thesis: verum
end;
theorem Th31: :: LAPLACE:31
for n being Nat
for K being Field
for M being Matrix of n,K
for f being FinSequence of K
for i being Nat st len f = n & i in Seg n holds
mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K
for f being FinSequence of K
for i being Nat st len f = n & i in Seg n holds
mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i)
let K be Field; ::_thesis: for M being Matrix of n,K
for f being FinSequence of K
for i being Nat st len f = n & i in Seg n holds
mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i)
let M be Matrix of n,K; ::_thesis: for f being FinSequence of K
for i being Nat st len f = n & i in Seg n holds
mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i)
let f be FinSequence of K; ::_thesis: for i being Nat st len f = n & i in Seg n holds
mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i)
let i be Nat; ::_thesis: ( len f = n & i in Seg n implies mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i) )
assume that
A1: len f = n and
A2: i in Seg n ; ::_thesis: mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i)
reconsider N = n as Element of NAT by ORDINAL1:def_12;
set KK = the carrier of K;
set C = Matrix_of_Cofactor M;
reconsider Tp = f, TC = Col ((Matrix_of_Cofactor M),i) as Element of N -tuples_on the carrier of K by A1, FINSEQ_2:92, MATRIX_1:24;
set R = RLine ((M @),i,f);
set LL = LaplaceExpL ((RLine ((M @),i,f)),i);
set MCT = mlt (TC,Tp);
A3: len (LaplaceExpL ((RLine ((M @),i,f)),i)) = n by Def7;
A4: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_n_holds_
(mlt_(TC,Tp))_._j_=_(LaplaceExpL_((RLine_((M_@),i,f)),i))_._j
A5: Indices (M @) = [:(Seg n),(Seg n):] by MATRIX_1:24;
A6: dom (LaplaceExpL ((RLine ((M @),i,f)),i)) = Seg n by A3, FINSEQ_1:def_3;
A7: width (M @) = n by MATRIX_1:24;
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies (mlt (TC,Tp)) . j = (LaplaceExpL ((RLine ((M @),i,f)),i)) . j )
assume that
A8: 1 <= j and
A9: j <= n ; ::_thesis: (mlt (TC,Tp)) . j = (LaplaceExpL ((RLine ((M @),i,f)),i)) . j
j in NAT by ORDINAL1:def_12;
then A10: j in Seg n by A8, A9;
then Delete ((M @),i,j) = (Delete (M,j,i)) @ by A2, Th14;
then A11: Cofactor ((M @),i,j) = Cofactor (M,j,i) by MATRIXR2:43;
Indices (Matrix_of_Cofactor M) = [:(Seg n),(Seg n):] by MATRIX_1:24;
then [j,i] in Indices (Matrix_of_Cofactor M) by A2, A10, ZFMISC_1:87;
then A12: (Matrix_of_Cofactor M) * (j,i) = Cofactor (M,j,i) by Def6;
n = len (Matrix_of_Cofactor M) by MATRIX_1:24;
then dom (Matrix_of_Cofactor M) = Seg n by FINSEQ_1:def_3;
then A13: (Col ((Matrix_of_Cofactor M),i)) . j = (Matrix_of_Cofactor M) * (j,i) by A10, MATRIX_1:def_8;
A14: Indices M = [:(Seg n),(Seg n):] by MATRIX_1:24;
then [i,j] in Indices M by A2, A10, ZFMISC_1:87;
then (RLine ((M @),i,f)) * (i,j) = f . j by A1, A7, A14, A5, MATRIX11:def_3;
then A15: (mlt (TC,Tp)) . j = (Cofactor (M,j,i)) * ((RLine ((M @),i,f)) * (i,j)) by A10, A13, A12, FVSUM_1:61;
Cofactor ((RLine ((M @),i,f)),i,j) = Cofactor ((M @),i,j) by A2, A10, Th15;
hence (mlt (TC,Tp)) . j = (LaplaceExpL ((RLine ((M @),i,f)),i)) . j by A10, A11, A6, A15, Def7; ::_thesis: verum
end;
len (mlt (TC,Tp)) = n by CARD_1:def_7;
hence mlt ((Col ((Matrix_of_Cofactor M),i)),f) = LaplaceExpL ((RLine ((M @),i,f)),i) by A3, A4, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th32: :: LAPLACE:32
for i, n, j being Nat
for K being Field
for M being Matrix of n,K st i in Seg n & j in Seg n holds
(Line (((Matrix_of_Cofactor M) @),i)) "*" (Col (M,j)) = Det (RLine ((M @),i,(Line ((M @),j))))
proof
let i, n, j be Nat; ::_thesis: for K being Field
for M being Matrix of n,K st i in Seg n & j in Seg n holds
(Line (((Matrix_of_Cofactor M) @),i)) "*" (Col (M,j)) = Det (RLine ((M @),i,(Line ((M @),j))))
let K be Field; ::_thesis: for M being Matrix of n,K st i in Seg n & j in Seg n holds
(Line (((Matrix_of_Cofactor M) @),i)) "*" (Col (M,j)) = Det (RLine ((M @),i,(Line ((M @),j))))
let M be Matrix of n,K; ::_thesis: ( i in Seg n & j in Seg n implies (Line (((Matrix_of_Cofactor M) @),i)) "*" (Col (M,j)) = Det (RLine ((M @),i,(Line ((M @),j)))) )
assume that
A1: i in Seg n and
A2: j in Seg n ; ::_thesis: (Line (((Matrix_of_Cofactor M) @),i)) "*" (Col (M,j)) = Det (RLine ((M @),i,(Line ((M @),j))))
set C = Matrix_of_Cofactor M;
set L = Line ((M @),j);
A3: width (Matrix_of_Cofactor M) = n by MATRIX_1:24;
width (M @) = n by MATRIX_1:24;
then A4: len (Line ((M @),j)) = n by MATRIX_1:def_7;
A5: width M = n by MATRIX_1:24;
thus Det (RLine ((M @),i,(Line ((M @),j)))) = Sum (LaplaceExpL ((RLine ((M @),i,(Line ((M @),j)))),i)) by A1, Th25
.= Sum (mlt ((Col ((Matrix_of_Cofactor M),i)),(Line ((M @),j)))) by A1, A4, Th31
.= (Line (((Matrix_of_Cofactor M) @),i)) "*" (Line ((M @),j)) by A1, A3, MATRIX_2:15
.= (Line (((Matrix_of_Cofactor M) @),i)) "*" (Col (M,j)) by A2, A5, MATRIX_2:15 ; ::_thesis: verum
end;
theorem Th33: :: LAPLACE:33
for n being Nat
for K being Field
for M being Matrix of n,K st Det M <> 0. K holds
(((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K st Det M <> 0. K holds
(((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n)
let K be Field; ::_thesis: for M being Matrix of n,K st Det M <> 0. K holds
(((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n)
let M be Matrix of n,K; ::_thesis: ( Det M <> 0. K implies (((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n) )
set D = Det M;
set D9 = (Det M) " ;
set C = Matrix_of_Cofactor M;
set DC = ((Det M) ") * ((Matrix_of_Cofactor M) @);
set CM = (((Det M) ") * ((Matrix_of_Cofactor M) @)) * M;
set ID = 1. (K,n);
assume A1: Det M <> 0. K ; ::_thesis: (((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n)
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_((((Det_M)_")_*_((Matrix_of_Cofactor_M)_@))_*_M)_holds_
(1._(K,n))_*_(i,j)_=_((((Det_M)_")_*_((Matrix_of_Cofactor_M)_@))_*_M)_*_(i,j)
A2: Indices ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) = Indices (1. (K,n)) by MATRIX_1:26;
reconsider N = n as Element of NAT by ORDINAL1:def_12;
let i, j be Nat; ::_thesis: ( [i,j] in Indices ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) implies (1. (K,n)) * (b1,b2) = ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) * (b1,b2) )
assume A3: [i,j] in Indices ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) ; ::_thesis: (1. (K,n)) * (b1,b2) = ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) * (b1,b2)
reconsider COL = Col (M,j), L = Line (((Matrix_of_Cofactor M) @),i) as Element of N -tuples_on the carrier of K by MATRIX_1:24;
reconsider i9 = i, j9 = j as Element of NAT by ORDINAL1:def_12;
A4: len M = n by MATRIX_1:24;
A5: Indices ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) = [:(Seg n),(Seg n):] by MATRIX_1:24;
then A6: i in Seg n by A3, ZFMISC_1:87;
then A7: 1 <= i by FINSEQ_1:1;
A8: j in Seg n by A3, A5, ZFMISC_1:87;
len ((Matrix_of_Cofactor M) @) = n by MATRIX_1:24;
then i <= len ((Matrix_of_Cofactor M) @) by A6, FINSEQ_1:1;
then Line ((((Det M) ") * ((Matrix_of_Cofactor M) @)),i) = ((Det M) ") * L by A7, MATRIXR1:20;
then mlt ((Line ((((Det M) ") * ((Matrix_of_Cofactor M) @)),i)),(Col (M,j))) = ((Det M) ") * (mlt (L,COL)) by FVSUM_1:69;
then A9: (Line ((((Det M) ") * ((Matrix_of_Cofactor M) @)),i)) "*" (Col (M,j)) = ((Det M) ") * ((Line (((Matrix_of_Cofactor M) @),i)) "*" (Col (M,j))) by FVSUM_1:73
.= ((Det M) ") * (Det (RLine ((M @),i9,(Line ((M @),j9))))) by A6, A8, Th32 ;
A10: width (((Det M) ") * ((Matrix_of_Cofactor M) @)) = n by MATRIX_1:24;
then A11: ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) * (i,j) = ((Det M) ") * (Det (RLine ((M @),i,(Line ((M @),j))))) by A3, A4, A9, MATRIX_3:def_4;
percases ( i = j or i <> j ) ;
supposeA12: i = j ; ::_thesis: (1. (K,n)) * (b1,b2) = ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) * (b1,b2)
then A13: RLine ((M @),i,(Line ((M @),j))) = M @ by MATRIX11:30;
A14: Det M = Det (M @) by MATRIXR2:43;
A15: ((Det M) ") * (Det M) = 1_ K by A1, VECTSP_1:def_10;
(1. (K,n)) * (i,j) = 1_ K by A3, A2, A12, MATRIX_1:def_11;
hence (1. (K,n)) * (i,j) = ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) * (i,j) by A3, A10, A4, A9, A13, A15, A14, MATRIX_3:def_4; ::_thesis: verum
end;
supposeA16: i <> j ; ::_thesis: (1. (K,n)) * (b1,b2) = ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) * (b1,b2)
then A17: (1. (K,n)) * (i,j) = 0. K by A3, A2, MATRIX_1:def_11;
Det (RLine ((M @),i9,(Line ((M @),j9)))) = 0. K by A6, A8, A16, MATRIX11:51;
hence (1. (K,n)) * (i,j) = ((((Det M) ") * ((Matrix_of_Cofactor M) @)) * M) * (i,j) by A11, A17, VECTSP_1:6; ::_thesis: verum
end;
end;
end;
hence (((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n) by MATRIX_1:27; ::_thesis: verum
end;
theorem Th34: :: LAPLACE:34
for n being Nat
for K being Field
for M being Matrix of n,K holds
( M is invertible iff Det M <> 0. K )
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K holds
( M is invertible iff Det M <> 0. K )
let K be Field; ::_thesis: for M being Matrix of n,K holds
( M is invertible iff Det M <> 0. K )
let M be Matrix of n,K; ::_thesis: ( M is invertible iff Det M <> 0. K )
thus ( M is invertible implies Det M <> 0. K ) ::_thesis: ( Det M <> 0. K implies M is invertible )
proof
reconsider N = n as Element of NAT by ORDINAL1:def_12;
assume M is invertible ; ::_thesis: Det M <> 0. K
then consider M1 being Matrix of n,K such that
A1: M is_reverse_of M1 by MATRIX_6:def_3;
percases ( N = 0 or N >= 1 ) by NAT_1:14;
suppose N = 0 ; ::_thesis: Det M <> 0. K
then Det M = 1_ K by MATRIXR2:41;
hence Det M <> 0. K ; ::_thesis: verum
end;
supposeA2: N >= 1 ; ::_thesis: Det M <> 0. K
A3: M * M1 = 1. (K,n) by A1, MATRIX_6:def_2;
Det (1. (K,n)) = 1_ K by A2, MATRIX_7:16;
then (Det M) * (Det M1) = 1_ K by A2, A3, MATRIX11:62;
hence Det M <> 0. K by VECTSP_1:12; ::_thesis: verum
end;
end;
end;
set C = ((Det M) ") * ((Matrix_of_Cofactor M) @);
assume A4: Det M <> 0. K ; ::_thesis: M is invertible
then A5: M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n) by Th30;
(((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n) by A4, Th33;
then M is_reverse_of ((Det M) ") * ((Matrix_of_Cofactor M) @) by A5, MATRIX_6:def_2;
hence M is invertible by MATRIX_6:def_3; ::_thesis: verum
end;
theorem Th35: :: LAPLACE:35
for n being Nat
for K being Field
for M being Matrix of n,K st Det M <> 0. K holds
M ~ = ((Det M) ") * ((Matrix_of_Cofactor M) @)
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K st Det M <> 0. K holds
M ~ = ((Det M) ") * ((Matrix_of_Cofactor M) @)
let K be Field; ::_thesis: for M being Matrix of n,K st Det M <> 0. K holds
M ~ = ((Det M) ") * ((Matrix_of_Cofactor M) @)
let M be Matrix of n,K; ::_thesis: ( Det M <> 0. K implies M ~ = ((Det M) ") * ((Matrix_of_Cofactor M) @) )
set C = ((Det M) ") * ((Matrix_of_Cofactor M) @);
assume A1: Det M <> 0. K ; ::_thesis: M ~ = ((Det M) ") * ((Matrix_of_Cofactor M) @)
then A2: M * (((Det M) ") * ((Matrix_of_Cofactor M) @)) = 1. (K,n) by Th30;
(((Det M) ") * ((Matrix_of_Cofactor M) @)) * M = 1. (K,n) by A1, Th33;
then A3: M is_reverse_of ((Det M) ") * ((Matrix_of_Cofactor M) @) by A2, MATRIX_6:def_2;
M is invertible by A1, Th34;
hence M ~ = ((Det M) ") * ((Matrix_of_Cofactor M) @) by A3, MATRIX_6:def_4; ::_thesis: verum
end;
theorem :: LAPLACE:36
for n being Nat
for K being Field
for M being Matrix of n,K st M is invertible holds
for i, j being Nat st [i,j] in Indices (M ~) holds
(M ~) * (i,j) = (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i))
proof
let n be Nat; ::_thesis: for K being Field
for M being Matrix of n,K st M is invertible holds
for i, j being Nat st [i,j] in Indices (M ~) holds
(M ~) * (i,j) = (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i))
let K be Field; ::_thesis: for M being Matrix of n,K st M is invertible holds
for i, j being Nat st [i,j] in Indices (M ~) holds
(M ~) * (i,j) = (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i))
let M be Matrix of n,K; ::_thesis: ( M is invertible implies for i, j being Nat st [i,j] in Indices (M ~) holds
(M ~) * (i,j) = (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i)) )
assume M is invertible ; ::_thesis: for i, j being Nat st [i,j] in Indices (M ~) holds
(M ~) * (i,j) = (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i))
then A1: Det M <> 0. K by Th34;
set D = Det M;
set COF = Matrix_of_Cofactor M;
let i, j be Nat; ::_thesis: ( [i,j] in Indices (M ~) implies (M ~) * (i,j) = (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i)) )
assume [i,j] in Indices (M ~) ; ::_thesis: (M ~) * (i,j) = (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i))
then A2: [i,j] in Indices ((Matrix_of_Cofactor M) @) by MATRIX_1:26;
then A3: [j,i] in Indices (Matrix_of_Cofactor M) by MATRIX_1:def_6;
thus (M ~) * (i,j) = (((Det M) ") * ((Matrix_of_Cofactor M) @)) * (i,j) by A1, Th35
.= ((Det M) ") * (((Matrix_of_Cofactor M) @) * (i,j)) by A2, MATRIX_3:def_5
.= ((Det M) ") * ((Matrix_of_Cofactor M) * (j,i)) by A3, MATRIX_1:def_6
.= ((Det M) ") * (Cofactor (M,j,i)) by A3, Def6
.= (((Det M) ") * ((power K) . ((- (1_ K)),(i + j)))) * (Minor (M,j,i)) by GROUP_1:def_3 ; ::_thesis: verum
end;
theorem Th37: :: LAPLACE:37
for n being Nat
for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being Matrix of K st len x = n & A * x = b holds
( x = (A ~) * b & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) ) )
proof
let n be Nat; ::_thesis: for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being Matrix of K st len x = n & A * x = b holds
( x = (A ~) * b & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) ) )
let K be Field; ::_thesis: for A being Matrix of n,K st Det A <> 0. K holds
for x, b being Matrix of K st len x = n & A * x = b holds
( x = (A ~) * b & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) ) )
let A be Matrix of n,K; ::_thesis: ( Det A <> 0. K implies for x, b being Matrix of K st len x = n & A * x = b holds
( x = (A ~) * b & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) ) ) )
assume A1: Det A <> 0. K ; ::_thesis: for x, b being Matrix of K st len x = n & A * x = b holds
( x = (A ~) * b & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) ) )
A is invertible by A1, Th34;
then A ~ is_reverse_of A by MATRIX_6:def_4;
then A2: (A ~) * A = 1. (K,n) by MATRIX_6:def_2;
set MC = Matrix_of_Cofactor A;
set D = Det A;
A3: width (Matrix_of_Cofactor A) = n by MATRIX_1:24;
A4: len ((Matrix_of_Cofactor A) @) = n by MATRIX_1:24;
A5: width ((Matrix_of_Cofactor A) @) = n by MATRIX_1:24;
A6: width (A ~) = n by MATRIX_1:24;
A7: width A = n by MATRIX_1:24;
let x, b be Matrix of K; ::_thesis: ( len x = n & A * x = b implies ( x = (A ~) * b & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) ) ) )
assume that
A8: len x = n and
A9: A * x = b ; ::_thesis: ( x = (A ~) * b & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) ) )
A10: len A = n by MATRIX_1:24;
then A11: len b = n by A8, A9, A7, MATRIX_3:def_4;
x = (1. (K,n)) * x by A8, MATRIXR2:68;
hence A12: x = (A ~) * b by A8, A9, A6, A10, A7, A2, MATRIX_3:33; ::_thesis: for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j)))))
let i, j be Nat; ::_thesis: ( [i,j] in Indices x implies x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j))))) )
assume A13: [i,j] in Indices x ; ::_thesis: x * (i,j) = ((Det A) ") * (Det (ReplaceCol (A,i,(Col (b,j)))))
A14: len (Col (b,j)) = n by A11, MATRIX_1:def_8;
Indices x = [:(Seg n),(Seg (width x)):] by A8, FINSEQ_1:def_3;
then A15: i in Seg n by A13, ZFMISC_1:87;
then A16: 1 <= i by FINSEQ_1:1;
A17: i <= n by A15, FINSEQ_1:1;
thus x * (i,j) = (Line ((A ~),i)) "*" (Col (b,j)) by A6, A12, A13, A11, MATRIX_3:def_4
.= (Line ((((Det A) ") * ((Matrix_of_Cofactor A) @)),i)) "*" (Col (b,j)) by A1, Th35
.= (((Det A) ") * (Line (((Matrix_of_Cofactor A) @),i))) "*" (Col (b,j)) by A4, A16, A17, MATRIXR1:20
.= Sum (((Det A) ") * (mlt ((Line (((Matrix_of_Cofactor A) @),i)),(Col (b,j))))) by A5, A11, FVSUM_1:68
.= ((Det A) ") * ((Line (((Matrix_of_Cofactor A) @),i)) "*" (Col (b,j))) by FVSUM_1:73
.= ((Det A) ") * ((Col ((Matrix_of_Cofactor A),i)) "*" (Col (b,j))) by A3, A15, MATRIX_2:15
.= ((Det A) ") * (Sum (LaplaceExpL ((RLine ((A @),i,(Col (b,j)))),i))) by A15, A14, Th31
.= ((Det A) ") * (Det (RLine ((A @),i,(Col (b,j))))) by A15, Th25
.= ((Det A) ") * (Det ((RLine ((A @),i,(Col (b,j)))) @)) by MATRIXR2:43
.= ((Det A) ") * (Det (RCol (A,i,(Col (b,j))))) by Th19 ; ::_thesis: verum
end;
theorem Th38: :: LAPLACE:38
for n being Nat
for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being Matrix of K st width x = n & x * A = b holds
( x = b * (A ~) & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) ) )
proof
let n be Nat; ::_thesis: for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being Matrix of K st width x = n & x * A = b holds
( x = b * (A ~) & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) ) )
let K be Field; ::_thesis: for A being Matrix of n,K st Det A <> 0. K holds
for x, b being Matrix of K st width x = n & x * A = b holds
( x = b * (A ~) & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) ) )
let A be Matrix of n,K; ::_thesis: ( Det A <> 0. K implies for x, b being Matrix of K st width x = n & x * A = b holds
( x = b * (A ~) & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) ) ) )
assume A1: Det A <> 0. K ; ::_thesis: for x, b being Matrix of K st width x = n & x * A = b holds
( x = b * (A ~) & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) ) )
A is invertible by A1, Th34;
then A ~ is_reverse_of A by MATRIX_6:def_4;
then A2: A * (A ~) = 1. (K,n) by MATRIX_6:def_2;
A3: width A = n by MATRIX_1:24;
let x, b be Matrix of K; ::_thesis: ( width x = n & x * A = b implies ( x = b * (A ~) & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) ) ) )
assume that
A4: width x = n and
A5: x * A = b ; ::_thesis: ( x = b * (A ~) & ( for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) ) )
A6: len A = n by MATRIX_1:24;
then A7: width b = n by A4, A5, A3, MATRIX_3:def_4;
set MC = Matrix_of_Cofactor A;
set D = Det A;
A8: len ((Matrix_of_Cofactor A) @) = n by MATRIX_1:24;
A9: width ((Matrix_of_Cofactor A) @) = n by MATRIX_1:24;
len (Matrix_of_Cofactor A) = n by MATRIX_1:24;
then A10: Seg n = dom (Matrix_of_Cofactor A) by FINSEQ_1:def_3;
A11: len (A ~) = n by MATRIX_1:24;
x = x * (1. (K,n)) by A4, MATRIXR2:67;
hence A12: x = b * (A ~) by A4, A5, A11, A6, A3, A2, MATRIX_3:33; ::_thesis: for i, j being Nat st [i,j] in Indices x holds
x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i)))))
let i, j be Nat; ::_thesis: ( [i,j] in Indices x implies x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i))))) )
assume A13: [i,j] in Indices x ; ::_thesis: x * (i,j) = ((Det A) ") * (Det (ReplaceLine (A,j,(Line (b,i)))))
A14: j in Seg n by A4, A13, ZFMISC_1:87;
then A15: 1 <= j by FINSEQ_1:1;
A16: len (Line (b,i)) = n by A7, MATRIX_1:def_7;
A17: j <= n by A14, FINSEQ_1:1;
thus x * (i,j) = (Line (b,i)) "*" (Col ((A ~),j)) by A11, A12, A13, A7, MATRIX_3:def_4
.= (Line (b,i)) "*" (Col ((((Det A) ") * ((Matrix_of_Cofactor A) @)),j)) by A1, Th35
.= (Line (b,i)) "*" (((Det A) ") * (Col (((Matrix_of_Cofactor A) @),j))) by A9, A15, A17, MATRIXR1:19
.= (((Det A) ") * (Col (((Matrix_of_Cofactor A) @),j))) "*" (Line (b,i)) by FVSUM_1:90
.= Sum (((Det A) ") * (mlt ((Col (((Matrix_of_Cofactor A) @),j)),(Line (b,i))))) by A8, A7, FVSUM_1:69
.= ((Det A) ") * ((Col (((Matrix_of_Cofactor A) @),j)) "*" (Line (b,i))) by FVSUM_1:73
.= ((Det A) ") * ((Line ((Matrix_of_Cofactor A),j)) "*" (Line (b,i))) by A14, A10, MATRIX_2:14
.= ((Det A) ") * (Sum (LaplaceExpL ((RLine (A,j,(Line (b,i)))),j))) by A14, A16, Th28
.= ((Det A) ") * (Det (RLine (A,j,(Line (b,i))))) by A14, Th25 ; ::_thesis: verum
end;
begin
definition
let D be non empty set ;
let f be FinSequence of D;
:: original: <*
redefine func<*f*> -> Matrix of 1, len f,D;
coherence
<*f*> is Matrix of 1, len f,D by MATRIX_1:11;
end;
definition
let K be Field;
let M be Matrix of K;
let f be FinSequence of K;
funcM * f -> Matrix of K equals :: LAPLACE:def 9
M * (<*f*> @);
coherence
M * (<*f*> @) is Matrix of K ;
funcf * M -> Matrix of K equals :: LAPLACE:def 10
<*f*> * M;
coherence
<*f*> * M is Matrix of K ;
end;
:: deftheorem defines * LAPLACE:def_9_:_
for K being Field
for M being Matrix of K
for f being FinSequence of K holds M * f = M * (<*f*> @);
:: deftheorem defines * LAPLACE:def_10_:_
for K being Field
for M being Matrix of K
for f being FinSequence of K holds f * M = <*f*> * M;
theorem :: LAPLACE:39
for n being Nat
for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being FinSequence of K st len x = n & A * x = <*b*> @ holds
( <*x*> @ = (A ~) * b & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) ) )
proof
let n be Nat; ::_thesis: for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being FinSequence of K st len x = n & A * x = <*b*> @ holds
( <*x*> @ = (A ~) * b & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) ) )
let K be Field; ::_thesis: for A being Matrix of n,K st Det A <> 0. K holds
for x, b being FinSequence of K st len x = n & A * x = <*b*> @ holds
( <*x*> @ = (A ~) * b & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) ) )
let A be Matrix of n,K; ::_thesis: ( Det A <> 0. K implies for x, b being FinSequence of K st len x = n & A * x = <*b*> @ holds
( <*x*> @ = (A ~) * b & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) ) ) )
assume A1: Det A <> 0. K ; ::_thesis: for x, b being FinSequence of K st len x = n & A * x = <*b*> @ holds
( <*x*> @ = (A ~) * b & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) ) )
let x, b be FinSequence of K; ::_thesis: ( len x = n & A * x = <*b*> @ implies ( <*x*> @ = (A ~) * b & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) ) ) )
assume that
A2: len x = n and
A3: A * x = <*b*> @ ; ::_thesis: ( <*x*> @ = (A ~) * b & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) ) )
set X = <*x*>;
len <*x*> = 1 by MATRIX_1:def_2;
then A4: len x = width <*x*> by MATRIX_1:20;
then A5: len (<*x*> @) = len x by MATRIX_1:def_6;
hence <*x*> @ = (A ~) * b by A1, A2, A3, Th37; ::_thesis: for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b)))
set B = <*b*>;
A6: 1 in Seg 1 ;
then A7: Line (<*x*>,1) = <*x*> . 1 by MATRIX_2:8;
len <*b*> = 1 by MATRIX_1:def_2;
then A8: 1 in dom <*b*> by A6, FINSEQ_1:def_3;
A9: Line (<*b*>,1) = <*b*> . 1 by A6, MATRIX_2:8;
let i be Nat; ::_thesis: ( i in Seg n implies x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b))) )
assume A10: i in Seg n ; ::_thesis: x . i = ((Det A) ") * (Det (ReplaceCol (A,i,b)))
n > 0 by A10;
then width (<*x*> @) = len <*x*> by A2, A4, MATRIX_2:10
.= 1 by MATRIX_1:def_2 ;
then Indices (<*x*> @) = [:(Seg n),(Seg 1):] by A2, A5, FINSEQ_1:def_3;
then A11: [i,1] in Indices (<*x*> @) by A10, A6, ZFMISC_1:87;
then [1,i] in Indices <*x*> by MATRIX_1:def_6;
then (<*x*> @) * (i,1) = <*x*> * (1,i) by MATRIX_1:def_6
.= (Line (<*x*>,1)) . i by A2, A4, A10, MATRIX_1:def_7
.= x . i by A7, FINSEQ_1:40 ;
hence x . i = ((Det A) ") * (Det (ReplaceCol (A,i,(Col ((<*b*> @),1))))) by A1, A2, A3, A5, A11, Th37
.= ((Det A) ") * (Det (ReplaceCol (A,i,(Line (<*b*>,1))))) by A8, MATRIX_2:14
.= ((Det A) ") * (Det (ReplaceCol (A,i,b))) by A9, FINSEQ_1:40 ;
::_thesis: verum
end;
theorem :: LAPLACE:40
for n being Nat
for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being FinSequence of K st len x = n & x * A = <*b*> holds
( <*x*> = b * (A ~) & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) ) )
proof
let n be Nat; ::_thesis: for K being Field
for A being Matrix of n,K st Det A <> 0. K holds
for x, b being FinSequence of K st len x = n & x * A = <*b*> holds
( <*x*> = b * (A ~) & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) ) )
let K be Field; ::_thesis: for A being Matrix of n,K st Det A <> 0. K holds
for x, b being FinSequence of K st len x = n & x * A = <*b*> holds
( <*x*> = b * (A ~) & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) ) )
let A be Matrix of n,K; ::_thesis: ( Det A <> 0. K implies for x, b being FinSequence of K st len x = n & x * A = <*b*> holds
( <*x*> = b * (A ~) & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) ) ) )
assume A1: Det A <> 0. K ; ::_thesis: for x, b being FinSequence of K st len x = n & x * A = <*b*> holds
( <*x*> = b * (A ~) & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) ) )
let x, b be FinSequence of K; ::_thesis: ( len x = n & x * A = <*b*> implies ( <*x*> = b * (A ~) & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) ) ) )
assume that
A2: len x = n and
A3: x * A = <*b*> ; ::_thesis: ( <*x*> = b * (A ~) & ( for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) ) )
set X = <*x*>;
A4: width <*x*> = len x by MATRIX_1:23;
hence <*x*> = b * (A ~) by A1, A2, A3, Th38; ::_thesis: for i being Nat st i in Seg n holds
x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b)))
A5: [:(Seg 1),(Seg n):] = Indices <*x*> by A2, MATRIX_1:23;
set B = <*b*>;
A6: 1 in Seg 1 ;
then A7: Line (<*x*>,1) = <*x*> . 1 by MATRIX_2:8;
let i be Nat; ::_thesis: ( i in Seg n implies x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b))) )
assume A8: i in Seg n ; ::_thesis: x . i = ((Det A) ") * (Det (ReplaceLine (A,i,b)))
A9: [1,i] in [:(Seg 1),(Seg n):] by A8, A6, ZFMISC_1:87;
A10: Line (<*b*>,1) = <*b*> . 1 by A6, MATRIX_2:8;
<*x*> * (1,i) = (Line (<*x*>,1)) . i by A2, A4, A8, MATRIX_1:def_7
.= x . i by A7, FINSEQ_1:40 ;
hence x . i = ((Det A) ") * (Det (ReplaceLine (A,i,(Line (<*b*>,1))))) by A1, A2, A3, A4, A9, A5, Th38
.= ((Det A) ") * (Det (ReplaceLine (A,i,b))) by A10, FINSEQ_1:40 ;
::_thesis: verum
end;