:: MATRIX14 semantic presentation
begin
definition
let K be non empty ZeroStr ;
let n be Element of NAT ;
func 0* (K,n) -> FinSequence of K equals :: MATRIX14:def 1
n |-> (0. K);
coherence
n |-> (0. K) is FinSequence of K ;
end;
:: deftheorem defines 0* MATRIX14:def_1_:_
for K being non empty ZeroStr
for n being Element of NAT holds 0* (K,n) = n |-> (0. K);
definition
let K be non empty ZeroStr ;
let n be Element of NAT ;
:: original: 0*
redefine func 0* (K,n) -> Element of n -tuples_on the carrier of K;
coherence
0* (K,n) is Element of n -tuples_on the carrier of K ;
end;
theorem Th1: :: MATRIX14:1
for L being non empty addLoopStr
for x being FinSequence of L holds x is Element of (len x) -tuples_on the carrier of L
proof
let L be non empty addLoopStr ; ::_thesis: for x being FinSequence of L holds x is Element of (len x) -tuples_on the carrier of L
let x be FinSequence of L; ::_thesis: x is Element of (len x) -tuples_on the carrier of L
x is Element of the carrier of L * by FINSEQ_1:def_11;
then x in { s where s is Element of the carrier of L * : len s = len x } ;
hence x is Element of (len x) -tuples_on the carrier of L by FINSEQ_2:def_4; ::_thesis: verum
end;
theorem Th2: :: MATRIX14:2
for L being non empty addLoopStr
for x1, x2 being FinSequence of L st len x1 = len x2 holds
len (x1 + x2) = len x1
proof
let L be non empty addLoopStr ; ::_thesis: for x1, x2 being FinSequence of L st len x1 = len x2 holds
len (x1 + x2) = len x1
let x1, x2 be FinSequence of L; ::_thesis: ( len x1 = len x2 implies len (x1 + x2) = len x1 )
set n = len x1;
reconsider z1 = x1 as Element of (len x1) -tuples_on the carrier of L by FINSEQ_2:92;
assume len x1 = len x2 ; ::_thesis: len (x1 + x2) = len x1
then reconsider z2 = x2 as Element of (len x1) -tuples_on the carrier of L by FINSEQ_2:92;
dom (z1 + z2) = Seg (len x1) by FINSEQ_2:124;
hence len (x1 + x2) = len x1 by FINSEQ_1:def_3; ::_thesis: verum
end;
theorem Th3: :: MATRIX14:3
for L being non empty addLoopStr
for x1, x2 being FinSequence of L st len x1 = len x2 holds
len (x1 - x2) = len x1
proof
let L be non empty addLoopStr ; ::_thesis: for x1, x2 being FinSequence of L st len x1 = len x2 holds
len (x1 - x2) = len x1
let x1, x2 be FinSequence of L; ::_thesis: ( len x1 = len x2 implies len (x1 - x2) = len x1 )
set n = len x1;
reconsider z1 = x1 as Element of (len x1) -tuples_on the carrier of L by FINSEQ_2:92;
assume len x1 = len x2 ; ::_thesis: len (x1 - x2) = len x1
then reconsider z2 = x2 as Element of (len x1) -tuples_on the carrier of L by FINSEQ_2:92;
dom (z1 - z2) = Seg (len x1) by FINSEQ_2:124;
hence len (x1 - x2) = len x1 by FINSEQ_1:def_3; ::_thesis: verum
end;
theorem Th4: :: MATRIX14:4
for G being non empty multLoopStr
for x1, x2 being FinSequence of G
for i being Element of NAT st i in dom (mlt (x1,x2)) holds
( (mlt (x1,x2)) . i = (x1 /. i) * (x2 /. i) & (mlt (x1,x2)) /. i = (x1 /. i) * (x2 /. i) )
proof
let G be non empty multLoopStr ; ::_thesis: for x1, x2 being FinSequence of G
for i being Element of NAT st i in dom (mlt (x1,x2)) holds
( (mlt (x1,x2)) . i = (x1 /. i) * (x2 /. i) & (mlt (x1,x2)) /. i = (x1 /. i) * (x2 /. i) )
let x1, x2 be FinSequence of G; ::_thesis: for i being Element of NAT st i in dom (mlt (x1,x2)) holds
( (mlt (x1,x2)) . i = (x1 /. i) * (x2 /. i) & (mlt (x1,x2)) /. i = (x1 /. i) * (x2 /. i) )
let i be Element of NAT ; ::_thesis: ( i in dom (mlt (x1,x2)) implies ( (mlt (x1,x2)) . i = (x1 /. i) * (x2 /. i) & (mlt (x1,x2)) /. i = (x1 /. i) * (x2 /. i) ) )
assume A1: i in dom (mlt (x1,x2)) ; ::_thesis: ( (mlt (x1,x2)) . i = (x1 /. i) * (x2 /. i) & (mlt (x1,x2)) /. i = (x1 /. i) * (x2 /. i) )
A2: mlt (x1,x2) = the multF of G .: (x1,x2) by FVSUM_1:def_7;
A3: rng x2 c= the carrier of G by FINSEQ_1:def_4;
( dom the multF of G = [: the carrier of G, the carrier of G:] & rng x1 c= the carrier of G ) by FINSEQ_1:def_4, FUNCT_2:def_1;
then [:(rng x1),(rng x2):] c= dom the multF of G by A3, ZFMISC_1:96;
then A4: dom (mlt (x1,x2)) = (dom x1) /\ (dom x2) by A2, FUNCOP_1:69;
then i in dom x2 by A1, XBOOLE_0:def_4;
then A5: x2 /. i = x2 . i by PARTFUN1:def_6;
i in dom x1 by A1, A4, XBOOLE_0:def_4;
then x1 /. i = x1 . i by PARTFUN1:def_6;
hence (mlt (x1,x2)) . i = (x1 /. i) * (x2 /. i) by A1, A5, FVSUM_1:60; ::_thesis: (mlt (x1,x2)) /. i = (x1 /. i) * (x2 /. i)
hence (mlt (x1,x2)) /. i = (x1 /. i) * (x2 /. i) by A1, PARTFUN1:def_6; ::_thesis: verum
end;
theorem Th5: :: MATRIX14:5
for L being non empty addLoopStr
for x1, x2 being FinSequence of L
for i being Nat st len x1 = len x2 & 1 <= i & i <= len x1 holds
( (x1 + x2) . i = (x1 /. i) + (x2 /. i) & (x1 - x2) . i = (x1 /. i) - (x2 /. i) )
proof
let L be non empty addLoopStr ; ::_thesis: for x1, x2 being FinSequence of L
for i being Nat st len x1 = len x2 & 1 <= i & i <= len x1 holds
( (x1 + x2) . i = (x1 /. i) + (x2 /. i) & (x1 - x2) . i = (x1 /. i) - (x2 /. i) )
let x1, x2 be FinSequence of L; ::_thesis: for i being Nat st len x1 = len x2 & 1 <= i & i <= len x1 holds
( (x1 + x2) . i = (x1 /. i) + (x2 /. i) & (x1 - x2) . i = (x1 /. i) - (x2 /. i) )
let i be Nat; ::_thesis: ( len x1 = len x2 & 1 <= i & i <= len x1 implies ( (x1 + x2) . i = (x1 /. i) + (x2 /. i) & (x1 - x2) . i = (x1 /. i) - (x2 /. i) ) )
assume that
A1: len x1 = len x2 and
A2: ( 1 <= i & i <= len x1 ) ; ::_thesis: ( (x1 + x2) . i = (x1 /. i) + (x2 /. i) & (x1 - x2) . i = (x1 /. i) - (x2 /. i) )
reconsider x10 = x1, x20 = x2 as Element of (len x1) -tuples_on the carrier of L by A1, Th1;
A3: ( x10 /. i = x10 . i & x20 /. i = x20 . i ) by A1, A2, FINSEQ_4:15;
i in Seg (len x1) by A2, FINSEQ_1:1;
then i in Seg (len (x1 + x2)) by A1, Th2;
then i in dom (x1 + x2) by FINSEQ_1:def_3;
hence (x1 + x2) . i = (x1 /. i) + (x2 /. i) by A3, FVSUM_1:17; ::_thesis: (x1 - x2) . i = (x1 /. i) - (x2 /. i)
i in Seg (len x1) by A2, FINSEQ_1:1;
then i in Seg (len (x1 - x2)) by A1, Th3;
then i in dom (x1 - x2) by FINSEQ_1:def_3;
hence (x1 - x2) . i = (x1 /. i) - (x2 /. i) by A3, FVSUM_1:32; ::_thesis: verum
end;
theorem Th6: :: MATRIX14:6
for K being Field
for a being Element of K
for x being FinSequence of K holds
( - (a * x) = (- a) * x & - (a * x) = a * (- x) )
proof
let K be Field; ::_thesis: for a being Element of K
for x being FinSequence of K holds
( - (a * x) = (- a) * x & - (a * x) = a * (- x) )
let a be Element of K; ::_thesis: for x being FinSequence of K holds
( - (a * x) = (- a) * x & - (a * x) = a * (- x) )
let x be FinSequence of K; ::_thesis: ( - (a * x) = (- a) * x & - (a * x) = a * (- x) )
set n = len x;
reconsider x0 = x as Element of (len x) -tuples_on the carrier of K by Th1;
reconsider y = a * x0 as Element of (len x) -tuples_on the carrier of K ;
thus - (a * x) = (- (1_ K)) * y by FVSUM_1:59
.= ((- (1_ K)) * a) * x0 by FVSUM_1:54
.= (- ((1_ K) * a)) * x0 by VECTSP_1:8
.= (- a) * x by VECTSP_1:def_8 ; ::_thesis: - (a * x) = a * (- x)
thus - (a * x) = (- (1_ K)) * y by FVSUM_1:59
.= ((- (1_ K)) * a) * x0 by FVSUM_1:54
.= a * ((- (1_ K)) * x0) by FVSUM_1:54
.= a * (- x) by FVSUM_1:59 ; ::_thesis: verum
end;
theorem Th7: :: MATRIX14:7
for G being non empty multLoopStr
for x1, x2, y1, y2 being FinSequence of G st len x1 = len x2 & len y1 = len y2 holds
mlt ((x1 ^ y1),(x2 ^ y2)) = (mlt (x1,x2)) ^ (mlt (y1,y2))
proof
let G be non empty multLoopStr ; ::_thesis: for x1, x2, y1, y2 being FinSequence of G st len x1 = len x2 & len y1 = len y2 holds
mlt ((x1 ^ y1),(x2 ^ y2)) = (mlt (x1,x2)) ^ (mlt (y1,y2))
let x1, x2, y1, y2 be FinSequence of G; ::_thesis: ( len x1 = len x2 & len y1 = len y2 implies mlt ((x1 ^ y1),(x2 ^ y2)) = (mlt (x1,x2)) ^ (mlt (y1,y2)) )
assume that
A1: len x1 = len x2 and
A2: len y1 = len y2 ; ::_thesis: mlt ((x1 ^ y1),(x2 ^ y2)) = (mlt (x1,x2)) ^ (mlt (y1,y2))
A3: the multF of G .: ((x1 ^ y1),(x2 ^ y2)) = the multF of G * <:(x1 ^ y1),(x2 ^ y2):> by FUNCOP_1:def_3;
A4: dom (x1 ^ y1) = Seg (len (x1 ^ y1)) by FINSEQ_1:def_3;
A5: rng (x2 ^ y2) c= the carrier of G by FINSEQ_1:def_4;
( dom the multF of G = [: the carrier of G, the carrier of G:] & rng (x1 ^ y1) c= the carrier of G ) by FINSEQ_1:def_4, FUNCT_2:def_1;
then [:(rng (x1 ^ y1)),(rng (x2 ^ y2)):] c= dom the multF of G by A5, ZFMISC_1:96;
then A6: dom ( the multF of G * <:(x1 ^ y1),(x2 ^ y2):>) = (dom (x1 ^ y1)) /\ (dom (x2 ^ y2)) by A3, FUNCOP_1:69;
A7: len (x2 ^ y2) = (len x2) + (len y2) by FINSEQ_1:22;
dom (x2 ^ y2) = Seg (len (x2 ^ y2)) by FINSEQ_1:def_3;
then dom (x1 ^ y1) = dom (x2 ^ y2) by A1, A2, A7, A4, FINSEQ_1:22;
then A8: dom (mlt ((x1 ^ y1),(x2 ^ y2))) = dom (x1 ^ y1) by A3, A6, FVSUM_1:def_7;
A9: the multF of G .: (y1,y2) = the multF of G * <:y1,y2:> by FUNCOP_1:def_3;
A10: dom the multF of G = [: the carrier of G, the carrier of G:] by FUNCT_2:def_1;
( rng y1 c= the carrier of G & rng y2 c= the carrier of G ) by FINSEQ_1:def_4;
then [:(rng y1),(rng y2):] c= dom the multF of G by A10, ZFMISC_1:96;
then A11: dom ( the multF of G * <:y1,y2:>) = (dom y1) /\ (dom y2) by A9, FUNCOP_1:69;
dom y2 = Seg (len y1) by A2, FINSEQ_1:def_3
.= dom y1 by FINSEQ_1:def_3 ;
then A12: dom (mlt (y1,y2)) = dom y1 by A9, A11, FVSUM_1:def_7;
then dom (mlt (y1,y2)) = Seg (len y1) by FINSEQ_1:def_3;
then A13: len (mlt (y1,y2)) = len y1 by FINSEQ_1:def_3;
A14: the multF of G .: (x1,x2) = the multF of G * <:x1,x2:> by FUNCOP_1:def_3;
( rng x1 c= the carrier of G & rng x2 c= the carrier of G ) by FINSEQ_1:def_4;
then [:(rng x1),(rng x2):] c= dom the multF of G by A10, ZFMISC_1:96;
then A15: dom ( the multF of G * <:x1,x2:>) = (dom x1) /\ (dom x2) by A14, FUNCOP_1:69;
A16: len (x1 ^ y1) = (len x1) + (len y1) by FINSEQ_1:22;
dom x2 = Seg (len x1) by A1, FINSEQ_1:def_3
.= dom x1 by FINSEQ_1:def_3 ;
then A17: dom (mlt (x1,x2)) = dom x1 by A14, A15, FVSUM_1:def_7;
then A18: dom (mlt (x1,x2)) = Seg (len x1) by FINSEQ_1:def_3;
A19: for i being Nat st 1 <= i & i <= len (mlt ((x1 ^ y1),(x2 ^ y2))) holds
(mlt ((x1 ^ y1),(x2 ^ y2))) . i = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i
proof
let i be Nat; ::_thesis: ( 1 <= i & i <= len (mlt ((x1 ^ y1),(x2 ^ y2))) implies (mlt ((x1 ^ y1),(x2 ^ y2))) . i = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i )
assume that
A20: 1 <= i and
A21: i <= len (mlt ((x1 ^ y1),(x2 ^ y2))) ; ::_thesis: (mlt ((x1 ^ y1),(x2 ^ y2))) . i = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i
i in Seg (len (mlt ((x1 ^ y1),(x2 ^ y2)))) by A20, A21, FINSEQ_1:1;
then A22: i in dom (mlt ((x1 ^ y1),(x2 ^ y2))) by FINSEQ_1:def_3;
then i <= len (x1 ^ y1) by A4, A8, FINSEQ_1:1;
then A23: (x1 ^ y1) /. i = (x1 ^ y1) . i by A20, FINSEQ_4:15;
i <= len (x2 ^ y2) by A1, A2, A16, A7, A4, A8, A22, FINSEQ_1:1;
then A24: (x2 ^ y2) /. i = (x2 ^ y2) . i by A20, FINSEQ_4:15;
A25: i <= (len x1) + (len y1) by A16, A4, A8, A22, FINSEQ_1:1;
now__::_thesis:_((x1_^_y1)_/._i)_*_((x2_^_y2)_/._i)_=_((mlt_(x1,x2))_^_(mlt_(y1,y2)))_._i
percases ( i <= len x1 or i > len x1 ) ;
supposeA26: i <= len x1 ; ::_thesis: ((x1 ^ y1) /. i) * ((x2 ^ y2) /. i) = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i
then A27: i in Seg (len x1) by A20, FINSEQ_1:1;
then A28: i in dom x1 by FINSEQ_1:def_3;
i in dom x2 by A1, A27, FINSEQ_1:def_3;
then A29: (x2 ^ y2) . i = x2 . i by FINSEQ_1:def_7;
A30: i in dom (mlt (x1,x2)) by A17, A27, FINSEQ_1:def_3;
then A31: ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i = (mlt (x1,x2)) . i by FINSEQ_1:def_7
.= (x1 /. i) * (x2 /. i) by A30, Th4 ;
( x1 /. i = x1 . i & x2 /. i = x2 . i ) by A1, A20, A26, FINSEQ_4:15;
hence ((x1 ^ y1) /. i) * ((x2 ^ y2) /. i) = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i by A23, A24, A28, A29, A31, FINSEQ_1:def_7; ::_thesis: verum
end;
supposeA32: i > len x1 ; ::_thesis: ((x1 ^ y1) /. i) * ((x2 ^ y2) /. i) = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i
i <= len (x2 ^ y2) by A1, A2, A16, A7, A4, A8, A22, FINSEQ_1:1;
then A33: (x2 ^ y2) /. i = (x2 ^ y2) . i by A20, FINSEQ_4:15;
i <= len (x1 ^ y1) by A4, A8, A22, FINSEQ_1:1;
then A34: (x1 ^ y1) /. i = (x1 ^ y1) . i by A20, FINSEQ_4:15;
set k = i -' (len x1);
A35: i -' (len x1) = i - (len x1) by A32, XREAL_1:233;
then A36: i = (len x1) + (i -' (len x1)) ;
i - (len x1) <= ((len x1) + (len y1)) - (len x1) by A25, XREAL_1:13;
then A37: i -' (len x1) <= len y1 by A32, XREAL_1:233;
i -' (len x1) > 0 by A32, A35, XREAL_1:50;
then A38: 0 + 1 <= i -' (len x1) by NAT_1:13;
then A39: i -' (len x1) in Seg (len y1) by A37, FINSEQ_1:1;
then A40: i -' (len x1) in dom (mlt (y1,y2)) by A12, FINSEQ_1:def_3;
i = (len (mlt (x1,x2))) + (i -' (len x1)) by A18, A36, FINSEQ_1:def_3;
then A41: ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i = (mlt (y1,y2)) . (i -' (len x1)) by A40, FINSEQ_1:def_7
.= (y1 /. (i -' (len x1))) * (y2 /. (i -' (len x1))) by A40, Th4 ;
i -' (len x1) in dom y1 by A39, FINSEQ_1:def_3;
then A42: (x1 ^ y1) . i = y1 . (i -' (len x1)) by A36, FINSEQ_1:def_7;
i -' (len x1) in Seg (len y1) by A38, A37, FINSEQ_1:1;
then A43: i -' (len x1) in dom y2 by A2, FINSEQ_1:def_3;
( y1 /. (i -' (len x1)) = y1 . (i -' (len x1)) & y2 /. (i -' (len x1)) = y2 . (i -' (len x1)) ) by A2, A38, A37, FINSEQ_4:15;
hence ((x1 ^ y1) /. i) * ((x2 ^ y2) /. i) = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i by A1, A36, A43, A42, A34, A33, A41, FINSEQ_1:def_7; ::_thesis: verum
end;
end;
end;
hence (mlt ((x1 ^ y1),(x2 ^ y2))) . i = ((mlt (x1,x2)) ^ (mlt (y1,y2))) . i by A22, Th4; ::_thesis: verum
end;
len (mlt ((x1 ^ y1),(x2 ^ y2))) = len (x1 ^ y1) by A4, A8, FINSEQ_1:def_3
.= (len x1) + (len y1) by FINSEQ_1:22 ;
then len (mlt ((x1 ^ y1),(x2 ^ y2))) = (len (mlt (x1,x2))) + (len (mlt (y1,y2))) by A18, A13, FINSEQ_1:def_3;
then len (mlt ((x1 ^ y1),(x2 ^ y2))) = len ((mlt (x1,x2)) ^ (mlt (y1,y2))) by FINSEQ_1:22;
hence mlt ((x1 ^ y1),(x2 ^ y2)) = (mlt (x1,x2)) ^ (mlt (y1,y2)) by A19, FINSEQ_1:14; ::_thesis: verum
end;
notation
let K be Field;
let e1, e2 be FinSequence of K;
synonym |(e1,e2)| for e1 "*" e2;
end;
theorem Th8: :: MATRIX14:8
for K being Field
for x, y being FinSequence of K
for a being Element of K st len x = len y holds
( mlt ((a * x),y) = a * (mlt (x,y)) & mlt (x,(a * y)) = a * (mlt (x,y)) )
proof
let K be Field; ::_thesis: for x, y being FinSequence of K
for a being Element of K st len x = len y holds
( mlt ((a * x),y) = a * (mlt (x,y)) & mlt (x,(a * y)) = a * (mlt (x,y)) )
let x, y be FinSequence of K; ::_thesis: for a being Element of K st len x = len y holds
( mlt ((a * x),y) = a * (mlt (x,y)) & mlt (x,(a * y)) = a * (mlt (x,y)) )
let a be Element of K; ::_thesis: ( len x = len y implies ( mlt ((a * x),y) = a * (mlt (x,y)) & mlt (x,(a * y)) = a * (mlt (x,y)) ) )
assume len x = len y ; ::_thesis: ( mlt ((a * x),y) = a * (mlt (x,y)) & mlt (x,(a * y)) = a * (mlt (x,y)) )
then reconsider y0 = y as Element of (len x) -tuples_on the carrier of K by Th1;
reconsider x0 = x as Element of (len x) -tuples_on the carrier of K by Th1;
thus mlt ((a * x),y) = a * (mlt (x0,y0)) by FVSUM_1:69
.= a * (mlt (x,y)) ; ::_thesis: mlt (x,(a * y)) = a * (mlt (x,y))
thus mlt (x,(a * y)) = a * (mlt (x0,y0)) by FVSUM_1:69
.= a * (mlt (x,y)) ; ::_thesis: verum
end;
theorem :: MATRIX14:9
for K being Field
for x, y being FinSequence of K
for a being Element of K st len x = len y holds
|((a * x),y)| = a * |(x,y)|
proof
let K be Field; ::_thesis: for x, y being FinSequence of K
for a being Element of K st len x = len y holds
|((a * x),y)| = a * |(x,y)|
let x, y be FinSequence of K; ::_thesis: for a being Element of K st len x = len y holds
|((a * x),y)| = a * |(x,y)|
let a be Element of K; ::_thesis: ( len x = len y implies |((a * x),y)| = a * |(x,y)| )
assume len x = len y ; ::_thesis: |((a * x),y)| = a * |(x,y)|
then Sum (mlt ((a * x),y)) = Sum (a * (mlt (x,y))) by Th8;
then Sum (mlt ((a * x),y)) = a * (Sum (mlt (x,y))) by FVSUM_1:73;
then Sum (mlt ((a * x),y)) = a * |(x,y)| by FVSUM_1:def_9;
hence |((a * x),y)| = a * |(x,y)| by FVSUM_1:def_9; ::_thesis: verum
end;
theorem Th10: :: MATRIX14:10
for K being Field
for x, y being FinSequence of K
for a being Element of K st len x = len y holds
|(x,(a * y))| = a * |(x,y)|
proof
let K be Field; ::_thesis: for x, y being FinSequence of K
for a being Element of K st len x = len y holds
|(x,(a * y))| = a * |(x,y)|
let x, y be FinSequence of K; ::_thesis: for a being Element of K st len x = len y holds
|(x,(a * y))| = a * |(x,y)|
let a be Element of K; ::_thesis: ( len x = len y implies |(x,(a * y))| = a * |(x,y)| )
assume len x = len y ; ::_thesis: |(x,(a * y))| = a * |(x,y)|
then Sum (mlt (x,(a * y))) = Sum (a * (mlt (x,y))) by Th8;
then Sum (mlt (x,(a * y))) = a * (Sum (mlt (x,y))) by FVSUM_1:73;
then Sum (mlt (x,(a * y))) = a * |(x,y)| by FVSUM_1:def_9;
hence |(x,(a * y))| = a * |(x,y)| by FVSUM_1:def_9; ::_thesis: verum
end;
theorem Th11: :: MATRIX14:11
for K being Field
for x, y1, y2 being FinSequence of K
for a being Element of K st len x = len y1 & len x = len y2 holds
|(x,(y1 + y2))| = |(x,y1)| + |(x,y2)|
proof
let K be Field; ::_thesis: for x, y1, y2 being FinSequence of K
for a being Element of K st len x = len y1 & len x = len y2 holds
|(x,(y1 + y2))| = |(x,y1)| + |(x,y2)|
let x, y1, y2 be FinSequence of K; ::_thesis: for a being Element of K st len x = len y1 & len x = len y2 holds
|(x,(y1 + y2))| = |(x,y1)| + |(x,y2)|
let a be Element of K; ::_thesis: ( len x = len y1 & len x = len y2 implies |(x,(y1 + y2))| = |(x,y1)| + |(x,y2)| )
reconsider x0 = x as Element of (len x) -tuples_on the carrier of K by Th1;
assume A1: ( len x = len y1 & len x = len y2 ) ; ::_thesis: |(x,(y1 + y2))| = |(x,y1)| + |(x,y2)|
then reconsider y10 = y1, y20 = y2 as Element of (len x) -tuples_on the carrier of K by Th1;
Sum (mlt (x,(y1 + y2))) = Sum ((mlt (x0,y10)) + (mlt (x0,y20))) by A1, MATRIX_4:57;
then Sum (mlt (x,(y1 + y2))) = (Sum (mlt (x0,y10))) + (Sum (mlt (x0,y20))) by FVSUM_1:76;
then Sum (mlt (x,(y1 + y2))) = (Sum (mlt (x,y1))) + |(x,y2)| by FVSUM_1:def_9;
then Sum (mlt (x,(y1 + y2))) = |(x,y1)| + |(x,y2)| by FVSUM_1:def_9;
hence |(x,(y1 + y2))| = |(x,y1)| + |(x,y2)| by FVSUM_1:def_9; ::_thesis: verum
end;
theorem Th12: :: MATRIX14:12
for K being Field
for x1, x2, y1, y2 being FinSequence of K st len x1 = len x2 & len y1 = len y2 holds
|((x1 ^ y1),(x2 ^ y2))| = |(x1,x2)| + |(y1,y2)|
proof
let K be Field; ::_thesis: for x1, x2, y1, y2 being FinSequence of K st len x1 = len x2 & len y1 = len y2 holds
|((x1 ^ y1),(x2 ^ y2))| = |(x1,x2)| + |(y1,y2)|
let x1, x2, y1, y2 be FinSequence of K; ::_thesis: ( len x1 = len x2 & len y1 = len y2 implies |((x1 ^ y1),(x2 ^ y2))| = |(x1,x2)| + |(y1,y2)| )
A1: Sum ((mlt (x1,x2)) ^ (mlt (y1,y2))) = (Sum (mlt (x1,x2))) + (Sum (mlt (y1,y2))) by RLVECT_1:41;
assume ( len x1 = len x2 & len y1 = len y2 ) ; ::_thesis: |((x1 ^ y1),(x2 ^ y2))| = |(x1,x2)| + |(y1,y2)|
then Sum (mlt ((x1 ^ y1),(x2 ^ y2))) = (Sum (mlt (x1,x2))) + (Sum (mlt (y1,y2))) by A1, Th7;
then |((x1 ^ y1),(x2 ^ y2))| = (Sum (mlt (x1,x2))) + (Sum (mlt (y1,y2))) by FVSUM_1:def_9;
then |((x1 ^ y1),(x2 ^ y2))| = (Sum (mlt (x1,x2))) + |(y1,y2)| by FVSUM_1:def_9;
hence |((x1 ^ y1),(x2 ^ y2))| = |(x1,x2)| + |(y1,y2)| by FVSUM_1:def_9; ::_thesis: verum
end;
theorem Th13: :: MATRIX14:13
for n being Element of NAT
for K being Field
for p1 being Element of n -tuples_on the carrier of K holds mlt (p1,(n |-> (0. K))) = n |-> (0. K)
proof
let n be Element of NAT ; ::_thesis: for K being Field
for p1 being Element of n -tuples_on the carrier of K holds mlt (p1,(n |-> (0. K))) = n |-> (0. K)
let K be Field; ::_thesis: for p1 being Element of n -tuples_on the carrier of K holds mlt (p1,(n |-> (0. K))) = n |-> (0. K)
let p1 be Element of n -tuples_on the carrier of K; ::_thesis: mlt (p1,(n |-> (0. K))) = n |-> (0. K)
thus mlt (p1,(n |-> (0. K))) = mlt (p1,((0. K) * (0* (K,n)))) by FVSUM_1:58
.= (0. K) * (mlt (p1,(0* (K,n)))) by FVSUM_1:69
.= n |-> (0. K) by FVSUM_1:58 ; ::_thesis: verum
end;
notation
let n be Element of NAT ;
let K be Field;
let A be Matrix of n,K;
synonym Inv A for A ~ ;
end;
begin
theorem Th14: :: MATRIX14:14
for K being Field holds
( 1. (K,0) = 0. (K,0) & 1. (K,0) = {} )
proof
let K be Field; ::_thesis: ( 1. (K,0) = 0. (K,0) & 1. (K,0) = {} )
A1: len (1. (K,0)) = 0 by MATRIX_1:24;
hence 1. (K,0) = 0. (K,0) ; ::_thesis: 1. (K,0) = {}
thus 1. (K,0) = {} by A1; ::_thesis: verum
end;
theorem Th15: :: MATRIX14:15
for K being Field
for A being Matrix of 0 ,K holds
( A = {} & A = 1. (K,0) & A = 0. (K,0) )
proof
let K be Field; ::_thesis: for A being Matrix of 0 ,K holds
( A = {} & A = 1. (K,0) & A = 0. (K,0) )
let A be Matrix of 0 ,K; ::_thesis: ( A = {} & A = 1. (K,0) & A = 0. (K,0) )
A1: len A = 0 by MATRIX_1:24;
hence A = {} ; ::_thesis: ( A = 1. (K,0) & A = 0. (K,0) )
hence A = 1. (K,0) by Th14; ::_thesis: A = 0. (K,0)
thus A = 0. (K,0) by A1; ::_thesis: verum
end;
theorem :: MATRIX14:16
for K being Field
for A being Matrix of 0 ,K holds A is invertible
proof
let K be Field; ::_thesis: for A being Matrix of 0 ,K holds A is invertible
let A be Matrix of 0 ,K; ::_thesis: A is invertible
A * A = 1. (K,0) by Th15;
then A is_reverse_of A by MATRIX_6:def_2;
hence A is invertible by MATRIX_6:def_3; ::_thesis: verum
end;
theorem Th17: :: MATRIX14:17
for n being Element of NAT
for K being Field
for A, B, C being Matrix of n,K holds (A * B) * C = A * (B * C)
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A, B, C being Matrix of n,K holds (A * B) * C = A * (B * C)
let K be Field; ::_thesis: for A, B, C being Matrix of n,K holds (A * B) * C = A * (B * C)
let A, B, C be Matrix of n,K; ::_thesis: (A * B) * C = A * (B * C)
A1: ( width B = n & len C = n ) by MATRIX_1:24;
( width A = n & len B = n ) by MATRIX_1:24;
hence (A * B) * C = A * (B * C) by A1, MATRIX_3:33; ::_thesis: verum
end;
theorem Th18: :: MATRIX14:18
for n being Element of NAT
for K being Field
for A, B being Matrix of n,K holds
( A is invertible & B = A ~ iff ( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A, B being Matrix of n,K holds
( A is invertible & B = A ~ iff ( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
let K be Field; ::_thesis: for A, B being Matrix of n,K holds
( A is invertible & B = A ~ iff ( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
let A, B be Matrix of n,K; ::_thesis: ( A is invertible & B = A ~ iff ( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
hereby ::_thesis: ( B * A = 1. (K,n) & A * B = 1. (K,n) implies ( A is invertible & B = A ~ ) )
assume ( A is invertible & B = A ~ ) ; ::_thesis: ( B * A = 1. (K,n) & A * B = 1. (K,n) )
then B is_reverse_of A by MATRIX_6:def_4;
hence ( B * A = 1. (K,n) & A * B = 1. (K,n) ) by MATRIX_6:def_2; ::_thesis: verum
end;
hereby ::_thesis: verum
assume ( B * A = 1. (K,n) & A * B = 1. (K,n) ) ; ::_thesis: ( A is invertible & B = A ~ )
then A1: B is_reverse_of A by MATRIX_6:def_2;
hence A is invertible by MATRIX_6:def_3; ::_thesis: B = A ~
hence B = A ~ by A1, MATRIX_6:def_4; ::_thesis: verum
end;
end;
theorem Th19: :: MATRIX14:19
for n being Element of NAT
for K being Field
for A being Matrix of n,K holds
( A is invertible iff ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K holds
( A is invertible iff ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
let K be Field; ::_thesis: for A being Matrix of n,K holds
( A is invertible iff ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
let A be Matrix of n,K; ::_thesis: ( A is invertible iff ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) )
thus ( A is invertible implies ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) ) ::_thesis: ( ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) implies A is invertible )
proof
assume A is invertible ; ::_thesis: ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) )
then ( (A ~) * A = 1. (K,n) & A * (A ~) = 1. (K,n) ) by Th18;
hence ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) ; ::_thesis: verum
end;
thus ( ex B being Matrix of n,K st
( B * A = 1. (K,n) & A * B = 1. (K,n) ) implies A is invertible ) by Th18; ::_thesis: verum
end;
theorem Th20: :: MATRIX14:20
for K being Field
for x being FinSequence of K holds |(x,(0* (K,(len x))))| = 0. K
proof
let K be Field; ::_thesis: for x being FinSequence of K holds |(x,(0* (K,(len x))))| = 0. K
let x be FinSequence of K; ::_thesis: |(x,(0* (K,(len x))))| = 0. K
set n = len x;
reconsider p1 = x as Element of (len x) -tuples_on the carrier of K by FINSEQ_2:92;
|(x,(0* (K,(len x))))| = Sum (mlt (p1,(0* (K,(len x))))) by FVSUM_1:def_9
.= Sum (0* (K,(len x))) by Th13
.= 0. K by MATRIX_3:11 ;
hence |(x,(0* (K,(len x))))| = 0. K ; ::_thesis: verum
end;
theorem Th21: :: MATRIX14:21
for K being Field
for x being FinSequence of K holds |((0* (K,(len x))),x)| = 0. K
proof
let K be Field; ::_thesis: for x being FinSequence of K holds |((0* (K,(len x))),x)| = 0. K
let x be FinSequence of K; ::_thesis: |((0* (K,(len x))),x)| = 0. K
thus |((0* (K,(len x))),x)| = |(x,(0* (K,(len x))))| by FVSUM_1:90
.= 0. K by Th20 ; ::_thesis: verum
end;
theorem Th22: :: MATRIX14:22
for K being Field
for a being Element of K holds |(<*(0. K)*>,<*a*>)| = 0. K
proof
let K be Field; ::_thesis: for a being Element of K holds |(<*(0. K)*>,<*a*>)| = 0. K
let a be Element of K; ::_thesis: |(<*(0. K)*>,<*a*>)| = 0. K
A1: len <*a*> = 1 by FINSEQ_1:39;
thus |(<*(0. K)*>,<*a*>)| = |((0* (K,1)),<*a*>)| by FINSEQ_2:59
.= 0. K by A1, Th21 ; ::_thesis: verum
end;
definition
let K be Field;
let n, i be Nat;
func Base_FinSeq (K,n,i) -> FinSequence of K equals :: MATRIX14:def 2
Replace ((n |-> (0. K)),i,(1. K));
coherence
Replace ((n |-> (0. K)),i,(1. K)) is FinSequence of K ;
end;
:: deftheorem defines Base_FinSeq MATRIX14:def_2_:_
for K being Field
for n, i being Nat holds Base_FinSeq (K,n,i) = Replace ((n |-> (0. K)),i,(1. K));
theorem Th23: :: MATRIX14:23
for K being Field
for n, i being Nat holds len (Base_FinSeq (K,n,i)) = n
proof
let K be Field; ::_thesis: for n, i being Nat holds len (Base_FinSeq (K,n,i)) = n
let n, i be Nat; ::_thesis: len (Base_FinSeq (K,n,i)) = n
len (Replace ((n |-> (0. K)),i,(1. K))) = len (n |-> (0. K)) by FINSEQ_7:5
.= n by CARD_1:def_7 ;
hence len (Base_FinSeq (K,n,i)) = n ; ::_thesis: verum
end;
theorem Th24: :: MATRIX14:24
for K being Field
for i, n being Nat st 1 <= i & i <= n holds
(Base_FinSeq (K,n,i)) . i = 1. K
proof
let K be Field; ::_thesis: for i, n being Nat st 1 <= i & i <= n holds
(Base_FinSeq (K,n,i)) . i = 1. K
let i, n be Nat; ::_thesis: ( 1 <= i & i <= n implies (Base_FinSeq (K,n,i)) . i = 1. K )
assume A1: ( 1 <= i & i <= n ) ; ::_thesis: (Base_FinSeq (K,n,i)) . i = 1. K
A2: len (n |-> (0. K)) = n by CARD_1:def_7;
len (Replace ((n |-> (0. K)),i,(1. K))) = len (n |-> (0. K)) by FINSEQ_7:5
.= n by CARD_1:def_7 ;
hence (Base_FinSeq (K,n,i)) . i = (Replace ((n |-> (0. K)),i,(1. K))) /. i by A1, FINSEQ_4:15
.= 1. K by A1, A2, FINSEQ_7:8 ;
::_thesis: verum
end;
theorem Th25: :: MATRIX14:25
for K being Field
for i, j, n being Nat st 1 <= j & j <= n & i <> j holds
(Base_FinSeq (K,n,i)) . j = 0. K
proof
let K be Field; ::_thesis: for i, j, n being Nat st 1 <= j & j <= n & i <> j holds
(Base_FinSeq (K,n,i)) . j = 0. K
let i, j, n be Nat; ::_thesis: ( 1 <= j & j <= n & i <> j implies (Base_FinSeq (K,n,i)) . j = 0. K )
assume that
A1: ( 1 <= j & j <= n ) and
A2: i <> j ; ::_thesis: (Base_FinSeq (K,n,i)) . j = 0. K
A3: j in Seg n by A1, FINSEQ_1:1;
A4: len (n |-> (0. K)) = n by CARD_1:def_7;
len (Replace ((n |-> (0. K)),i,(1. K))) = len (n |-> (0. K)) by FINSEQ_7:5
.= n by CARD_1:def_7 ;
hence (Base_FinSeq (K,n,i)) . j = (Replace ((n |-> (0. K)),i,(1. K))) /. j by A1, FINSEQ_4:15
.= (n |-> (0. K)) /. j by A1, A2, A4, FINSEQ_7:10
.= (n |-> (0. K)) . j by A1, A4, FINSEQ_4:15
.= 0. K by A3, FINSEQ_2:57 ;
::_thesis: verum
end;
theorem Th26: :: MATRIX14:26
for K being Field
for i, n being Nat st 1 <= i & i <= n holds
(1. (K,n)) . i = Base_FinSeq (K,n,i)
proof
let K be Field; ::_thesis: for i, n being Nat st 1 <= i & i <= n holds
(1. (K,n)) . i = Base_FinSeq (K,n,i)
let i, n be Nat; ::_thesis: ( 1 <= i & i <= n implies (1. (K,n)) . i = Base_FinSeq (K,n,i) )
assume A1: ( 1 <= i & i <= n ) ; ::_thesis: (1. (K,n)) . i = Base_FinSeq (K,n,i)
then 1 <= n by XXREAL_0:2;
then [i,1] in Indices (1. (K,n)) by A1, MATRIX_1:37;
then consider q being FinSequence of K such that
A2: q = (1. (K,n)) . i and
(1. (K,n)) * (i,1) = q . 1 by MATRIX_1:def_5;
len (1. (K,n)) = n by MATRIX_1:24;
then i in dom (1. (K,n)) by A1, FINSEQ_3:25;
then q in rng (1. (K,n)) by A2, FUNCT_1:def_3;
then A3: len q = n by MATRIX_1:def_2;
A4: for j being Nat st 1 <= j & j <= n holds
q . j = (Base_FinSeq (K,n,i)) . j
proof
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies q . j = (Base_FinSeq (K,n,i)) . j )
assume A5: ( 1 <= j & j <= n ) ; ::_thesis: q . j = (Base_FinSeq (K,n,i)) . j
then A6: [i,j] in Indices (1. (K,n)) by A1, MATRIX_1:37;
then A7: ex q0 being FinSequence of K st
( q0 = (1. (K,n)) . i & (1. (K,n)) * (i,j) = q0 . j ) by MATRIX_1:def_5;
percases ( i = j or i <> j ) ;
supposeA8: i = j ; ::_thesis: q . j = (Base_FinSeq (K,n,i)) . j
then (1. (K,n)) * (i,i) = 1_ K by A6, MATRIX_1:def_11;
hence q . j = (Base_FinSeq (K,n,i)) . j by A1, A2, A7, A8, Th24; ::_thesis: verum
end;
supposeA9: i <> j ; ::_thesis: q . j = (Base_FinSeq (K,n,i)) . j
then q . j = 0. K by A2, A6, A7, MATRIX_1:def_11;
hence q . j = (Base_FinSeq (K,n,i)) . j by A5, A9, Th25; ::_thesis: verum
end;
end;
end;
len (Base_FinSeq (K,n,i)) = n by Th23;
hence (1. (K,n)) . i = Base_FinSeq (K,n,i) by A2, A3, A4, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th27: :: MATRIX14:27
for n being Element of NAT
for K being Field
for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
(1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i)) . j
proof
let n be Element of NAT ; ::_thesis: for K being Field
for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
(1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i)) . j
let K be Field; ::_thesis: for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
(1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i)) . j
let i, j be Element of NAT ; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n implies (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i)) . j )
assume that
A1: ( 1 <= i & i <= n ) and
A2: ( 1 <= j & j <= n ) ; ::_thesis: (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i)) . j
[i,j] in Indices (1. (K,n)) by A1, A2, MATRIX_1:37;
then ex p3 being FinSequence of K st
( p3 = (1. (K,n)) . i & (1. (K,n)) * (i,j) = p3 . j ) by MATRIX_1:def_5;
hence (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i)) . j by A1, Th26; ::_thesis: verum
end;
theorem :: MATRIX14:28
for n being Element of NAT
for K being Field
for A being Matrix of n,K holds
( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K holds
( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
let K be Field; ::_thesis: for A being Matrix of n,K holds
( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
let A be Matrix of n,K; ::_thesis: ( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
thus ( A = 0. (K,n) implies for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K ) ::_thesis: ( ( for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K ) implies A = 0. (K,n) )
proof
set A2 = 0. (K,n);
set B2 = 0. (K,n);
set A3 = 0. (K,n,n);
assume A1: A = 0. (K,n) ; ::_thesis: for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K
let i, j be Element of NAT ; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n implies A * (i,j) = 0. K )
assume ( 1 <= i & i <= n & 1 <= j & j <= n ) ; ::_thesis: A * (i,j) = 0. K
then [i,j] in Indices (0. (K,n)) by MATRIX_1:37;
then ( 0. (K,n,n) = 0. (K,n) & ((0. (K,n)) + (0. (K,n))) * (i,j) = ((0. (K,n)) * (i,j)) + ((0. (K,n)) * (i,j)) ) by MATRIX_3:def_1, MATRIX_3:def_3;
then (0. (K,n)) * (i,j) = ((0. (K,n)) * (i,j)) + ((0. (K,n)) * (i,j)) by MATRIX_3:4;
then ((0. (K,n)) * (i,j)) - ((0. (K,n)) * (i,j)) = ((0. (K,n)) * (i,j)) + (((0. (K,n)) * (i,j)) - ((0. (K,n)) * (i,j))) by RLVECT_1:28
.= ((0. (K,n)) * (i,j)) + (0. K) by RLVECT_1:15
.= (0. (K,n)) * (i,j) by RLVECT_1:4 ;
hence A * (i,j) = 0. K by A1, RLVECT_1:15; ::_thesis: verum
end;
A2: len A = n by MATRIX_1:24;
A3: Indices A = [:(Seg n),(Seg n):] by MATRIX_1:24;
A4: width A = n by MATRIX_1:24;
assume A5: for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K ; ::_thesis: A = 0. (K,n)
for i, j being Nat st [i,j] in Indices A holds
A * (i,j) = (A * (i,j)) + (A * (i,j))
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices A implies A * (i,j) = (A * (i,j)) + (A * (i,j)) )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
assume A6: [i,j] in Indices A ; ::_thesis: A * (i,j) = (A * (i,j)) + (A * (i,j))
then j in Seg n by A4, ZFMISC_1:87;
then A7: ( 1 <= j & j <= n ) by FINSEQ_1:1;
i in Seg n by A3, A6, ZFMISC_1:87;
then ( 1 <= i & i <= n ) by FINSEQ_1:1;
then A * (i0,j0) = 0. K by A5, A7;
hence A * (i,j) = (A * (i,j)) + (A * (i,j)) by RLVECT_1:4; ::_thesis: verum
end;
then A = A + A by A2, MATRIX_3:def_3;
then A = 0. (K,(len A),(width A)) by MATRIX_4:6;
hence A = 0. (K,n) by A2, A4, MATRIX_3:def_1; ::_thesis: verum
end;
theorem Th29: :: MATRIX14:29
for n being Element of NAT
for K being Field
for A being Matrix of n,K holds
( A = 1. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K holds
( A = 1. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) )
let K be Field; ::_thesis: for A being Matrix of n,K holds
( A = 1. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) )
let A be Matrix of n,K; ::_thesis: ( A = 1. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) )
A1: Indices A = [:(Seg n),(Seg n):] by MATRIX_1:24;
thus ( A = 1. (K,n) implies for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) ) ::_thesis: ( ( for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) ) implies A = 1. (K,n) )
proof
assume A2: A = 1. (K,n) ; ::_thesis: for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K))
let i, j be Element of NAT ; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n implies A * (i,j) = IFEQ (i,j,(1. K),(0. K)) )
assume ( 1 <= i & i <= n & 1 <= j & j <= n ) ; ::_thesis: A * (i,j) = IFEQ (i,j,(1. K),(0. K))
then A3: [i,j] in Indices A by MATRIX_1:37;
percases ( i = j or i <> j ) ;
supposeA4: i = j ; ::_thesis: A * (i,j) = IFEQ (i,j,(1. K),(0. K))
then A * (i,j) = 1. K by A2, A3, MATRIX_1:def_11;
hence A * (i,j) = IFEQ (i,j,(1. K),(0. K)) by A4, FUNCOP_1:def_8; ::_thesis: verum
end;
supposeA5: i <> j ; ::_thesis: A * (i,j) = IFEQ (i,j,(1. K),(0. K))
then A * (i,j) = 0. K by A2, A3, MATRIX_1:def_11;
hence A * (i,j) = IFEQ (i,j,(1. K),(0. K)) by A5, FUNCOP_1:def_8; ::_thesis: verum
end;
end;
end;
A6: ( len (1. (K,n)) = n & width (1. (K,n)) = n ) by MATRIX_1:24;
A7: Indices (1. (K,n)) = [:(Seg n),(Seg n):] by MATRIX_1:24;
A8: width A = n by MATRIX_1:24;
thus ( ( for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) ) implies A = 1. (K,n) ) ::_thesis: verum
proof
assume A9: for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = IFEQ (i,j,(1. K),(0. K)) ; ::_thesis: A = 1. (K,n)
A10: for i, j being Nat st [i,j] in Indices A holds
A * (i,j) = (1. (K,n)) * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices A implies A * (i,j) = (1. (K,n)) * (i,j) )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
assume A11: [i,j] in Indices A ; ::_thesis: A * (i,j) = (1. (K,n)) * (i,j)
then j in Seg n by A8, ZFMISC_1:87;
then A12: ( 1 <= j & j <= n ) by FINSEQ_1:1;
i in Seg n by A1, A11, ZFMISC_1:87;
then ( 1 <= i & i <= n ) by FINSEQ_1:1;
then A13: A * (i0,j0) = IFEQ (i0,j0,(1. K),(0. K)) by A9, A12;
percases ( i0 = j0 or i0 <> j0 ) ;
supposeA14: i0 = j0 ; ::_thesis: A * (i,j) = (1. (K,n)) * (i,j)
then A * (i0,j0) = 1_ K by A13, FUNCOP_1:def_8;
hence A * (i,j) = (1. (K,n)) * (i,j) by A1, A7, A11, A14, MATRIX_1:def_11; ::_thesis: verum
end;
supposeA15: i0 <> j0 ; ::_thesis: A * (i,j) = (1. (K,n)) * (i,j)
then A * (i0,j0) = 0. K by A13, FUNCOP_1:def_8;
hence A * (i,j) = (1. (K,n)) * (i,j) by A1, A7, A11, A15, MATRIX_1:def_11; ::_thesis: verum
end;
end;
end;
( len A = len (1. (K,n)) & width A = width (1. (K,n)) ) by A6, MATRIX_1:24;
hence A = 1. (K,n) by A10, MATRIX_1:21; ::_thesis: verum
end;
end;
begin
theorem Th30: :: MATRIX14:30
for n being Element of NAT
for K being Field
for A, B being Matrix of n,K holds (A * B) @ = (B @) * (A @)
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A, B being Matrix of n,K holds (A * B) @ = (B @) * (A @)
let K be Field; ::_thesis: for A, B being Matrix of n,K holds (A * B) @ = (B @) * (A @)
let A, B be Matrix of n,K; ::_thesis: (A * B) @ = (B @) * (A @)
percases ( n <> 0 or n = 0 ) ;
supposeA1: n <> 0 ; ::_thesis: (A * B) @ = (B @) * (A @)
A2: width B = n by MATRIX_1:24;
( len B = n & width A = n ) by MATRIX_1:24;
hence (A * B) @ = (B @) * (A @) by A1, A2, MATRIX_3:22; ::_thesis: verum
end;
supposeA3: n = 0 ; ::_thesis: (A * B) @ = (B @) * (A @)
hence (A * B) @ = 1. (K,n) by Th15
.= (B @) * (A @) by A3, Th15 ;
::_thesis: verum
end;
end;
end;
theorem Th31: :: MATRIX14:31
for n being Element of NAT
for K being Field
for A being Matrix of n,K st A is invertible holds
( A @ is invertible & (A @) ~ = (A ~) @ )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K st A is invertible holds
( A @ is invertible & (A @) ~ = (A ~) @ )
let K be Field; ::_thesis: for A being Matrix of n,K st A is invertible holds
( A @ is invertible & (A @) ~ = (A ~) @ )
let A be Matrix of n,K; ::_thesis: ( A is invertible implies ( A @ is invertible & (A @) ~ = (A ~) @ ) )
assume A is invertible ; ::_thesis: ( A @ is invertible & (A @) ~ = (A ~) @ )
then consider B being Matrix of n,K such that
A1: B * A = 1. (K,n) and
A2: A * B = 1. (K,n) by Th19;
(A * B) @ = (B @) * (A @) by Th30;
then A3: (B @) * (A @) = 1. (K,n) by A2, MATRIX_6:10;
(B * A) @ = (A @) * (B @) by Th30;
then A4: (A @) * (B @) = 1. (K,n) by A1, MATRIX_6:10;
B = A ~ by A1, A2, Th18;
hence ( A @ is invertible & (A @) ~ = (A ~) @ ) by A3, A4, Th18; ::_thesis: verum
end;
theorem Th32: :: MATRIX14:32
for K being Field
for x being FinSequence of K
for a being Element of K st ex i being Element of NAT st
( 1 <= i & i <= len x & x . i = a & ( for j being Element of NAT st j <> i & 1 <= j & j <= len x holds
x . j = 0. K ) ) holds
Sum x = a
proof
let K be Field; ::_thesis: for x being FinSequence of K
for a being Element of K st ex i being Element of NAT st
( 1 <= i & i <= len x & x . i = a & ( for j being Element of NAT st j <> i & 1 <= j & j <= len x holds
x . j = 0. K ) ) holds
Sum x = a
let x be FinSequence of K; ::_thesis: for a being Element of K st ex i being Element of NAT st
( 1 <= i & i <= len x & x . i = a & ( for j being Element of NAT st j <> i & 1 <= j & j <= len x holds
x . j = 0. K ) ) holds
Sum x = a
let a be Element of K; ::_thesis: ( ex i being Element of NAT st
( 1 <= i & i <= len x & x . i = a & ( for j being Element of NAT st j <> i & 1 <= j & j <= len x holds
x . j = 0. K ) ) implies Sum x = a )
given i being Element of NAT such that A1: 1 <= i and
A2: i <= len x and
A3: x . i = a and
A4: for j being Element of NAT st j <> i & 1 <= j & j <= len x holds
x . j = 0. K ; ::_thesis: Sum x = a
1 <= len x by A1, A2, XXREAL_0:2;
then consider f being Function of NAT, the carrier of K such that
A5: f . 1 = x . 1 and
A6: for n being Element of NAT st 0 <> n & n < len x holds
f . (n + 1) = the addF of K . ((f . n),(x . (n + 1))) and
A7: the addF of K "**" x = f . (len x) by FINSOP_1:def_1;
A8: for j being Element of NAT st 1 <= j & j < i holds
f . j = 0. K
proof
defpred S1[ Nat] means ( 1 <= $1 & $1 < i implies f . $1 = 0. K );
let j be Element of NAT ; ::_thesis: ( 1 <= j & j < i implies f . j = 0. K )
assume A9: ( 1 <= j & j < i ) ; ::_thesis: f . j = 0. K
A10: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A11: S1[k] ; ::_thesis: S1[k + 1]
percases ( not 1 <= k or not k < i or ( 1 <= k & k < i ) ) ;
supposeA12: ( not 1 <= k or not k < i ) ; ::_thesis: S1[k + 1]
now__::_thesis:_S1[k_+_1]
percases ( 1 > k or k >= i ) by A12;
supposeA13: 1 > k ; ::_thesis: S1[k + 1]
A14: 1 <= 1 + k by NAT_1:12;
1 >= k + 1 by A13, NAT_1:13;
then A15: k + 1 = 1 by A14, XXREAL_0:1;
now__::_thesis:_S1[k_+_1]
percases ( k + 1 < i or k + 1 >= i ) ;
suppose k + 1 < i ; ::_thesis: S1[k + 1]
then k + 1 < len x by A2, XXREAL_0:2;
hence S1[k + 1] by A4, A5, A15; ::_thesis: verum
end;
suppose k + 1 >= i ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
suppose k >= i ; ::_thesis: S1[k + 1]
hence S1[k + 1] by NAT_1:12; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
supposeA16: ( 1 <= k & k < i ) ; ::_thesis: S1[k + 1]
then A17: k + 1 <= i by NAT_1:13;
A18: k < len x by A2, A16, XXREAL_0:2;
now__::_thesis:_S1[k_+_1]
percases ( k + 1 < i or k + 1 = i ) by A17, XXREAL_0:1;
supposeA19: k + 1 < i ; ::_thesis: S1[k + 1]
then A20: k + 1 < len x by A2, XXREAL_0:2;
f . (k + 1) = the addF of K . ((f . k),(x . (k + 1))) by A6, A16, A18
.= (0. K) + (0. K) by A4, A11, A16, A19, A20, NAT_1:12
.= 0. K by RLVECT_1:4 ;
hence S1[k + 1] ; ::_thesis: verum
end;
suppose k + 1 = i ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
A21: S1[ 0 ] ;
for l being Element of NAT holds S1[l] from NAT_1:sch_1(A21, A10);
hence f . j = 0. K by A9; ::_thesis: verum
end;
for j being Element of NAT st i <= j & j <= len x holds
f . j = a
proof
defpred S1[ Nat] means ( i <= $1 & $1 <= len x implies f . $1 = a );
let j be Element of NAT ; ::_thesis: ( i <= j & j <= len x implies f . j = a )
assume A22: ( i <= j & j <= len x ) ; ::_thesis: f . j = a
A23: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A24: S1[k] ; ::_thesis: S1[k + 1]
percases ( not i <= k + 1 or not k + 1 <= len x or ( i <= k + 1 & k + 1 <= len x ) ) ;
suppose ( not i <= k + 1 or not k + 1 <= len x ) ; ::_thesis: S1[k + 1]
hence S1[k + 1] ; ::_thesis: verum
end;
supposeA25: ( i <= k + 1 & k + 1 <= len x ) ; ::_thesis: S1[k + 1]
then A26: k < len x by NAT_1:13;
A27: 1 <= k + 1 by A1, A25, XXREAL_0:2;
now__::_thesis:_S1[k_+_1]
percases ( i < k + 1 or i = k + 1 ) by A25, XXREAL_0:1;
supposeA28: i < k + 1 ; ::_thesis: S1[k + 1]
A29: k < len x by A25, NAT_1:13;
i <= k by A28, NAT_1:13;
then f . (k + 1) = the addF of K . ((f . k),(x . (k + 1))) by A1, A6, A29
.= a + (0. K) by A4, A24, A25, A27, A28, NAT_1:13
.= a by RLVECT_1:4 ;
hence S1[k + 1] ; ::_thesis: verum
end;
supposeA30: i = k + 1 ; ::_thesis: S1[k + 1]
then A31: k < i by NAT_1:13;
now__::_thesis:_S1[k_+_1]
percases ( 1 <= k or k < 1 ) ;
supposeA32: 1 <= k ; ::_thesis: S1[k + 1]
then f . (k + 1) = the addF of K . ((f . k),(x . (k + 1))) by A6, A26
.= (0. K) + a by A3, A8, A30, A31, A32
.= a by RLVECT_1:4 ;
hence S1[k + 1] ; ::_thesis: verum
end;
suppose k < 1 ; ::_thesis: S1[k + 1]
then A33: k + 1 <= 1 by NAT_1:13;
1 <= 1 + k by NAT_1:12;
then i = 1 by A30, A33, XXREAL_0:1;
hence S1[k + 1] by A3, A5, A33, XXREAL_0:1; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
hence S1[k + 1] ; ::_thesis: verum
end;
end;
end;
A34: S1[ 0 ] by A1;
for l being Element of NAT holds S1[l] from NAT_1:sch_1(A34, A23);
hence f . j = a by A22; ::_thesis: verum
end;
then f . (len x) = a by A2;
hence Sum x = a by A7, FVSUM_1:def_8; ::_thesis: verum
end;
theorem :: MATRIX14:33
for K being Field
for f1, f2 being FinSequence of K holds
( dom (mlt (f1,f2)) = (dom f1) /\ (dom f2) & ( for i being Element of NAT st i in dom (mlt (f1,f2)) holds
(mlt (f1,f2)) . i = (f1 /. i) * (f2 /. i) ) )
proof
let K be Field; ::_thesis: for f1, f2 being FinSequence of K holds
( dom (mlt (f1,f2)) = (dom f1) /\ (dom f2) & ( for i being Element of NAT st i in dom (mlt (f1,f2)) holds
(mlt (f1,f2)) . i = (f1 /. i) * (f2 /. i) ) )
let f1, f2 be FinSequence of K; ::_thesis: ( dom (mlt (f1,f2)) = (dom f1) /\ (dom f2) & ( for i being Element of NAT st i in dom (mlt (f1,f2)) holds
(mlt (f1,f2)) . i = (f1 /. i) * (f2 /. i) ) )
A1: rng f2 c= the carrier of K by FINSEQ_1:def_4;
( dom the multF of K = [: the carrier of K, the carrier of K:] & rng f1 c= the carrier of K ) by FINSEQ_1:def_4, FUNCT_2:def_1;
then ( mlt (f1,f2) = the multF of K .: (f1,f2) & [:(rng f1),(rng f2):] c= dom the multF of K ) by A1, FVSUM_1:def_7, ZFMISC_1:96;
hence dom (mlt (f1,f2)) = (dom f1) /\ (dom f2) by FUNCOP_1:69; ::_thesis: for i being Element of NAT st i in dom (mlt (f1,f2)) holds
(mlt (f1,f2)) . i = (f1 /. i) * (f2 /. i)
thus for i being Element of NAT st i in dom (mlt (f1,f2)) holds
(mlt (f1,f2)) . i = (f1 /. i) * (f2 /. i) by Th4; ::_thesis: verum
end;
theorem Th34: :: MATRIX14:34
for m being Element of NAT
for K being Field
for x, y being FinSequence of K
for i being Element of NAT st len x = m & y = mlt (x,(Base_FinSeq (K,m,i))) & 1 <= i & i <= m holds
( y . i = x . i & ( for j being Element of NAT st j <> i & 1 <= j & j <= m holds
y . j = 0. K ) )
proof
let m be Element of NAT ; ::_thesis: for K being Field
for x, y being FinSequence of K
for i being Element of NAT st len x = m & y = mlt (x,(Base_FinSeq (K,m,i))) & 1 <= i & i <= m holds
( y . i = x . i & ( for j being Element of NAT st j <> i & 1 <= j & j <= m holds
y . j = 0. K ) )
let K be Field; ::_thesis: for x, y being FinSequence of K
for i being Element of NAT st len x = m & y = mlt (x,(Base_FinSeq (K,m,i))) & 1 <= i & i <= m holds
( y . i = x . i & ( for j being Element of NAT st j <> i & 1 <= j & j <= m holds
y . j = 0. K ) )
let x, y be FinSequence of K; ::_thesis: for i being Element of NAT st len x = m & y = mlt (x,(Base_FinSeq (K,m,i))) & 1 <= i & i <= m holds
( y . i = x . i & ( for j being Element of NAT st j <> i & 1 <= j & j <= m holds
y . j = 0. K ) )
let i be Element of NAT ; ::_thesis: ( len x = m & y = mlt (x,(Base_FinSeq (K,m,i))) & 1 <= i & i <= m implies ( y . i = x . i & ( for j being Element of NAT st j <> i & 1 <= j & j <= m holds
y . j = 0. K ) ) )
assume that
A1: len x = m and
A2: y = mlt (x,(Base_FinSeq (K,m,i))) and
A3: 1 <= i and
A4: i <= m ; ::_thesis: ( y . i = x . i & ( for j being Element of NAT st j <> i & 1 <= j & j <= m holds
y . j = 0. K ) )
A5: i in dom x by A1, A3, A4, FINSEQ_3:25;
i <= len (Base_FinSeq (K,m,i)) by A4, Th23;
then A6: (Base_FinSeq (K,m,i)) /. i = (Base_FinSeq (K,m,i)) . i by A3, FINSEQ_4:15;
A7: rng (Base_FinSeq (K,m,i)) c= the carrier of K by FINSEQ_1:def_4;
A8: len (Base_FinSeq (K,m,i)) = m by Th23;
( dom the multF of K = [: the carrier of K, the carrier of K:] & rng x c= the carrier of K ) by FINSEQ_1:def_4, FUNCT_2:def_1;
then [:(rng x),(rng (Base_FinSeq (K,m,i))):] c= dom the multF of K by A7, ZFMISC_1:96;
then dom ( the multF of K .: (x,(Base_FinSeq (K,m,i)))) = (dom x) /\ (dom (Base_FinSeq (K,m,i))) by FUNCOP_1:69;
then A9: dom (mlt (x,(Base_FinSeq (K,m,i)))) = (dom x) /\ (dom (Base_FinSeq (K,m,i))) by FVSUM_1:def_7
.= (Seg m) /\ (dom (Base_FinSeq (K,m,i))) by A1, FINSEQ_1:def_3
.= (Seg m) /\ (Seg m) by A8, FINSEQ_1:def_3
.= Seg m ;
then i in dom (mlt (x,(Base_FinSeq (K,m,i)))) by A3, A4, FINSEQ_1:1;
then (mlt (x,(Base_FinSeq (K,m,i)))) . i = (x /. i) * ((Base_FinSeq (K,m,i)) /. i) by Th4
.= (x /. i) * (1. K) by A3, A4, A6, Th24
.= x /. i by VECTSP_1:def_6
.= x . i by A5, PARTFUN1:def_6 ;
hence y . i = x . i by A2; ::_thesis: for j being Element of NAT st j <> i & 1 <= j & j <= m holds
y . j = 0. K
let j be Element of NAT ; ::_thesis: ( j <> i & 1 <= j & j <= m implies y . j = 0. K )
assume that
A10: j <> i and
A11: 1 <= j and
A12: j <= m ; ::_thesis: y . j = 0. K
j <= len (Base_FinSeq (K,m,i)) by A12, Th23;
then A13: (Base_FinSeq (K,m,i)) /. j = (Base_FinSeq (K,m,i)) . j by A11, FINSEQ_4:15
.= 0. K by A10, A11, A12, Th25 ;
j in dom (mlt (x,(Base_FinSeq (K,m,i)))) by A9, A11, A12, FINSEQ_1:1;
then (mlt (x,(Base_FinSeq (K,m,i)))) . j = (x /. j) * ((Base_FinSeq (K,m,i)) /. j) by Th4
.= 0. K by A13, VECTSP_1:6 ;
hence y . j = 0. K by A2; ::_thesis: verum
end;
theorem Th35: :: MATRIX14:35
for m, i being Element of NAT
for K being Field
for x being FinSequence of K st len x = m & 1 <= i & i <= m holds
( |(x,(Base_FinSeq (K,m,i)))| = x . i & |(x,(Base_FinSeq (K,m,i)))| = x /. i )
proof
let m, i be Element of NAT ; ::_thesis: for K being Field
for x being FinSequence of K st len x = m & 1 <= i & i <= m holds
( |(x,(Base_FinSeq (K,m,i)))| = x . i & |(x,(Base_FinSeq (K,m,i)))| = x /. i )
let K be Field; ::_thesis: for x being FinSequence of K st len x = m & 1 <= i & i <= m holds
( |(x,(Base_FinSeq (K,m,i)))| = x . i & |(x,(Base_FinSeq (K,m,i)))| = x /. i )
let x be FinSequence of K; ::_thesis: ( len x = m & 1 <= i & i <= m implies ( |(x,(Base_FinSeq (K,m,i)))| = x . i & |(x,(Base_FinSeq (K,m,i)))| = x /. i ) )
assume that
A1: len x = m and
A2: ( 1 <= i & i <= m ) ; ::_thesis: ( |(x,(Base_FinSeq (K,m,i)))| = x . i & |(x,(Base_FinSeq (K,m,i)))| = x /. i )
A3: for j being Element of NAT st j <> i & 1 <= j & j <= m holds
(mlt (x,(Base_FinSeq (K,m,i)))) . j = 0. K by A1, A2, Th34;
A4: len (Base_FinSeq (K,m,i)) = m by Th23;
A5: rng (Base_FinSeq (K,m,i)) c= the carrier of K by FINSEQ_1:def_4;
( dom the multF of K = [: the carrier of K, the carrier of K:] & rng x c= the carrier of K ) by FINSEQ_1:def_4, FUNCT_2:def_1;
then [:(rng x),(rng (Base_FinSeq (K,m,i))):] c= dom the multF of K by A5, ZFMISC_1:96;
then dom ( the multF of K .: (x,(Base_FinSeq (K,m,i)))) = (dom x) /\ (dom (Base_FinSeq (K,m,i))) by FUNCOP_1:69;
then dom (mlt (x,(Base_FinSeq (K,m,i)))) = (dom x) /\ (dom (Base_FinSeq (K,m,i))) by FVSUM_1:def_7
.= (Seg m) /\ (dom (Base_FinSeq (K,m,i))) by A1, FINSEQ_1:def_3
.= (Seg m) /\ (Seg m) by A4, FINSEQ_1:def_3
.= Seg m ;
then A6: len (mlt (x,(Base_FinSeq (K,m,i)))) = m by FINSEQ_1:def_3;
A7: x /. i = x . i by A1, A2, FINSEQ_4:15;
then (mlt (x,(Base_FinSeq (K,m,i)))) . i = x /. i by A1, A2, Th34;
then A8: Sum (mlt (x,(Base_FinSeq (K,m,i)))) = x . i by A2, A7, A6, A3, Th32;
hence |(x,(Base_FinSeq (K,m,i)))| = x . i by FVSUM_1:def_9; ::_thesis: |(x,(Base_FinSeq (K,m,i)))| = x /. i
x . i = x /. i by A1, A2, FINSEQ_4:15;
hence |(x,(Base_FinSeq (K,m,i)))| = x /. i by A8, FVSUM_1:def_9; ::_thesis: verum
end;
theorem Th36: :: MATRIX14:36
for K being Field
for m, i being Element of NAT st 1 <= i & i <= m holds
|((Base_FinSeq (K,m,i)),(Base_FinSeq (K,m,i)))| = 1. K
proof
let K be Field; ::_thesis: for m, i being Element of NAT st 1 <= i & i <= m holds
|((Base_FinSeq (K,m,i)),(Base_FinSeq (K,m,i)))| = 1. K
let m, i be Element of NAT ; ::_thesis: ( 1 <= i & i <= m implies |((Base_FinSeq (K,m,i)),(Base_FinSeq (K,m,i)))| = 1. K )
assume A1: ( 1 <= i & i <= m ) ; ::_thesis: |((Base_FinSeq (K,m,i)),(Base_FinSeq (K,m,i)))| = 1. K
len (Base_FinSeq (K,m,i)) = m by Th23;
hence |((Base_FinSeq (K,m,i)),(Base_FinSeq (K,m,i)))| = (Base_FinSeq (K,m,i)) . i by A1, Th35
.= 1. K by A1, Th24 ;
::_thesis: verum
end;
theorem Th37: :: MATRIX14:37
for n being Element of NAT
for K being Field
for a being Element of K
for P, Q being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) & Q * (1,1) = a & ( for j being Element of NAT st 1 < j & j <= n holds
Q * (1,j) = - (a * (P * (1,j))) ) & ( for i being Element of NAT st 1 < i & i <= n holds
Q . i = Base_FinSeq (K,n,i) ) holds
( P is invertible & Q = P ~ )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for a being Element of K
for P, Q being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) & Q * (1,1) = a & ( for j being Element of NAT st 1 < j & j <= n holds
Q * (1,j) = - (a * (P * (1,j))) ) & ( for i being Element of NAT st 1 < i & i <= n holds
Q . i = Base_FinSeq (K,n,i) ) holds
( P is invertible & Q = P ~ )
let K be Field; ::_thesis: for a being Element of K
for P, Q being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) & Q * (1,1) = a & ( for j being Element of NAT st 1 < j & j <= n holds
Q * (1,j) = - (a * (P * (1,j))) ) & ( for i being Element of NAT st 1 < i & i <= n holds
Q . i = Base_FinSeq (K,n,i) ) holds
( P is invertible & Q = P ~ )
let a be Element of K; ::_thesis: for P, Q being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) & Q * (1,1) = a & ( for j being Element of NAT st 1 < j & j <= n holds
Q * (1,j) = - (a * (P * (1,j))) ) & ( for i being Element of NAT st 1 < i & i <= n holds
Q . i = Base_FinSeq (K,n,i) ) holds
( P is invertible & Q = P ~ )
let P, Q be Matrix of n,K; ::_thesis: ( n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) & Q * (1,1) = a & ( for j being Element of NAT st 1 < j & j <= n holds
Q * (1,j) = - (a * (P * (1,j))) ) & ( for i being Element of NAT st 1 < i & i <= n holds
Q . i = Base_FinSeq (K,n,i) ) implies ( P is invertible & Q = P ~ ) )
assume that
A1: n > 0 and
A2: a <> 0. K and
A3: P * (1,1) = a " and
A4: for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) and
A5: Q * (1,1) = a and
A6: for j being Element of NAT st 1 < j & j <= n holds
Q * (1,j) = - (a * (P * (1,j))) and
A7: for i being Element of NAT st 1 < i & i <= n holds
Q . i = Base_FinSeq (K,n,i) ; ::_thesis: ( P is invertible & Q = P ~ )
A8: 0 + 1 <= n by A1, NAT_1:13;
A9: len (Base_FinSeq (K,n,1)) = n by Th23;
A10: len P = n by MATRIX_1:24;
A11: len ((a ") * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A12: for k being Nat st 1 <= k & k <= n holds
(Col (P,1)) . k = ((a ") * (Base_FinSeq (K,n,1))) . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies (Col (P,1)) . k = ((a ") * (Base_FinSeq (K,n,1))) . k )
A13: k in NAT by ORDINAL1:def_12;
assume that
A14: 1 <= k and
A15: k <= n ; ::_thesis: (Col (P,1)) . k = ((a ") * (Base_FinSeq (K,n,1))) . k
A16: k in Seg n by A14, A15, FINSEQ_1:1;
then A17: k in dom P by A10, FINSEQ_1:def_3;
A18: now__::_thesis:_(_k_<>_1_implies_(Col_(P,1))_._k_=_0._K_)
[k,1] in Indices P by A8, A14, A15, MATRIX_1:37;
then A19: ex p being FinSequence of K st
( p = P . k & P * (k,1) = p . 1 ) by MATRIX_1:def_5;
assume A20: k <> 1 ; ::_thesis: (Col (P,1)) . k = 0. K
then 1 < k by A14, XXREAL_0:1;
then P * (k,1) = (Base_FinSeq (K,n,k)) . 1 by A4, A13, A15, A19
.= 0. K by A8, A20, Th25 ;
hence (Col (P,1)) . k = 0. K by A17, MATRIX_1:def_8; ::_thesis: verum
end;
A21: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A9, A14, A15, FINSEQ_4:15;
A22: now__::_thesis:_(_k_=_1_implies_((a_")_*_(Base_FinSeq_(K,n,1)))_._k_=_a_"_)
assume A23: k = 1 ; ::_thesis: ((a ") * (Base_FinSeq (K,n,1))) . k = a "
k in dom ((a ") * (Base_FinSeq (K,n,1))) by A11, A16, FINSEQ_1:def_3;
hence ((a ") * (Base_FinSeq (K,n,1))) . k = (a ") * ((Base_FinSeq (K,n,1)) /. k) by A21, FVSUM_1:50
.= (a ") * (1. K) by A15, A21, A23, Th24
.= a " by VECTSP_1:def_6 ;
::_thesis: verum
end;
A24: k in dom ((a ") * (Base_FinSeq (K,n,1))) by A11, A14, A15, FINSEQ_3:25;
A25: now__::_thesis:_(_k_<>_1_implies_((a_")_*_(Base_FinSeq_(K,n,1)))_._k_=_0._K_)
assume A26: k <> 1 ; ::_thesis: ((a ") * (Base_FinSeq (K,n,1))) . k = 0. K
thus ((a ") * (Base_FinSeq (K,n,1))) . k = (a ") * ((Base_FinSeq (K,n,1)) /. k) by A24, A21, FVSUM_1:50
.= (a ") * (0. K) by A14, A15, A21, A26, Th25
.= 0. K by VECTSP_1:6 ; ::_thesis: verum
end;
1 <= n by A14, A15, XXREAL_0:2;
then 1 in dom P by A10, FINSEQ_3:25;
hence (Col (P,1)) . k = ((a ") * (Base_FinSeq (K,n,1))) . k by A3, A25, A22, A18, MATRIX_1:def_8; ::_thesis: verum
end;
A27: 0 + 1 <= n by A1, NAT_1:13;
A28: len Q = n by MATRIX_1:24;
then A29: 1 in Seg (len Q) by A27, FINSEQ_1:1;
then A30: 1 in dom Q by FINSEQ_1:def_3;
A31: width Q = n by MATRIX_1:24;
then A32: len (Line (Q,1)) = n by MATRIX_1:def_7;
then A33: 1 in dom (Line (Q,1)) by A28, A29, FINSEQ_1:def_3;
A34: for j being Element of NAT st 1 < j & j <= n holds
P * (1,j) = - ((a ") * (Q * (1,j)))
proof
let j be Element of NAT ; ::_thesis: ( 1 < j & j <= n implies P * (1,j) = - ((a ") * (Q * (1,j))) )
assume ( 1 < j & j <= n ) ; ::_thesis: P * (1,j) = - ((a ") * (Q * (1,j)))
then - ((a ") * (Q * (1,j))) = - ((a ") * (- (a * (P * (1,j))))) by A6;
then - ((a ") * (Q * (1,j))) = - ((a ") * ((- a) * (P * (1,j)))) by VECTSP_1:9;
then - ((a ") * (Q * (1,j))) = (- (a ")) * ((- a) * (P * (1,j))) by VECTSP_1:9;
then - ((a ") * (Q * (1,j))) = ((- (a ")) * (- a)) * (P * (1,j)) by GROUP_1:def_3;
then - ((a ") * (Q * (1,j))) = (a * (a ")) * (P * (1,j)) by VECTSP_1:10;
then - ((a ") * (Q * (1,j))) = (1. K) * (P * (1,j)) by A2, VECTSP_1:def_10;
hence P * (1,j) = - ((a ") * (Q * (1,j))) by VECTSP_1:def_6; ::_thesis: verum
end;
A35: for j being Element of NAT st 1 < j & j <= n holds
(Q * P) * (1,j) = 0. K
proof
let j be Element of NAT ; ::_thesis: ( 1 < j & j <= n implies (Q * P) * (1,j) = 0. K )
assume that
A36: 1 < j and
A37: j <= n ; ::_thesis: (Q * P) * (1,j) = 0. K
A38: len (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) = len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) by Th6
.= len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A39: j in Seg n by A36, A37, FINSEQ_1:1;
A40: 1 <= n by A36, A37, XXREAL_0:2;
then A41: 1 in Seg (width Q) by A31, FINSEQ_1:1;
len (Line (Q,1)) = n by A31, MATRIX_1:def_7;
then A42: (Line (Q,1)) /. j = (Line (Q,1)) . j by A36, A37, FINSEQ_4:15;
A43: (Line (Q,1)) /. 1 = (Line (Q,1)) . 1 by A32, A40, FINSEQ_4:15
.= a by A5, A41, MATRIX_1:def_7 ;
A44: len (Col (P,j)) = len P by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
reconsider p = Col (P,j), q = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) as FinSequence of K ;
A45: len (Base_FinSeq (K,n,j)) = n by Th23;
A46: len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A47: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
A48: len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A49: 1 <= k and
A50: k <= n ; ::_thesis: p . k = q . k
A51: k in dom ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) by A46, A49, A50, FINSEQ_3:25;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A52: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A49, A50, FINSEQ_4:15;
k in dom P by A10, A49, A50, FINSEQ_3:25;
then A53: p . k = P * (k,j) by MATRIX_1:def_8;
A54: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k = ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) . k by Th6
.= (- ((a ") * (Q * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A51, A52, FVSUM_1:50 ;
percases ( 1 = k or 1 < k ) by A49, XXREAL_0:1;
supposeA55: 1 = k ; ::_thesis: p . k = q . k
then 1 <= len (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) by A50, A48, Th6;
then A56: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. 1 = (- ((a ") * (Q * (1,j)))) * ((Base_FinSeq (K,n,1)) /. 1) by A54, A55, FINSEQ_4:15
.= (- ((a ") * (Q * (1,j)))) * (1. K) by A27, A52, A55, Th24
.= - ((a ") * (Q * (1,j))) by VECTSP_1:def_6 ;
A57: p . 1 = - ((a ") * (Q * (1,j))) by A34, A36, A37, A53, A55;
(Base_FinSeq (K,n,j)) /. 1 = (Base_FinSeq (K,n,j)) . 1 by A45, A50, A55, FINSEQ_4:15
.= 0. K by A36, A50, A55, Th25 ;
then q . 1 = (- ((a ") * (Q * (1,j)))) + (0. K) by A38, A45, A50, A55, A56, Th5;
hence p . k = q . k by A55, A57, RLVECT_1:4; ::_thesis: verum
end;
supposeA58: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices P by A36, A37, A49, A50, MATRIX_1:37;
then A59: ex p2 being FinSequence of K st
( p2 = P . k & P * (k,j) = p2 . j ) by MATRIX_1:def_5;
k in NAT by ORDINAL1:def_12;
then A60: p . k = (Base_FinSeq (K,n,k)) . j by A4, A50, A53, A58, A59;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA61: k <> j ; ::_thesis: p . k = q . k
len (Base_FinSeq (K,n,1)) = n by Th23;
then (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A49, A50, FINSEQ_4:15;
then A62: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- ((a ") * (Q * (1,j)))) * (0. K) by A50, A54, A58, Th25
.= 0. K by VECTSP_1:6 ;
A63: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A38, A49, A50, FINSEQ_4:15;
A64: p . k = 0. K by A36, A37, A60, A61, Th25;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A45, A49, A50, FINSEQ_4:15
.= 0. K by A49, A50, A61, Th25 ;
then q . k = (0. K) + (0. K) by A38, A45, A49, A50, A63, A62, Th5;
hence p . k = q . k by A64, RLVECT_1:4; ::_thesis: verum
end;
supposeA65: k = j ; ::_thesis: p . k = q . k
then A66: p . k = 1. K by A49, A50, A60, Th24;
A67: (- (((a ") * (Q * (1,k))) * (Base_FinSeq (K,n,1)))) /. k = (- (((a ") * (Q * (1,k))) * (Base_FinSeq (K,n,1)))) . k by A38, A49, A50, A65, FINSEQ_4:15;
len (Base_FinSeq (K,n,1)) = n by Th23;
then (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A49, A50, FINSEQ_4:15;
then A68: (- (((a ") * (Q * (1,k))) * (Base_FinSeq (K,n,1)))) . k = (- ((a ") * (Q * (1,k)))) * (0. K) by A50, A54, A58, A65, Th25
.= 0. K by VECTSP_1:6 ;
(Base_FinSeq (K,n,k)) /. k = (Base_FinSeq (K,n,k)) . k by A45, A49, A50, A65, FINSEQ_4:15
.= 1. K by A36, A37, A65, Th24 ;
then q . k = (0. K) + (1. K) by A38, A45, A49, A50, A65, A67, A68, Th5;
hence p . k = q . k by A66, RLVECT_1:4; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
len ((- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j))) = n by A38, A45, Th2;
then A69: Col (P,j) = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) by A44, A47, FINSEQ_1:14;
[1,j] in Indices (Q * P) by A27, A36, A37, MATRIX_1:37;
then (Q * P) * (1,j) = |((Line (Q,1)),(Col (P,j)))| by A10, A31, MATRIX_3:def_4
.= |((Line (Q,1)),(- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))))| + |((Line (Q,1)),(Base_FinSeq (K,n,j)))| by A32, A38, A45, A69, Th11
.= |((Line (Q,1)),((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))))| + |((Line (Q,1)),(Base_FinSeq (K,n,j)))| by Th6
.= ((- ((a ") * (Q * (1,j)))) * |((Line (Q,1)),(Base_FinSeq (K,n,1)))|) + |((Line (Q,1)),(Base_FinSeq (K,n,j)))| by A32, A9, Th10
.= ((- ((a ") * (Q * (1,j)))) * a) + |((Line (Q,1)),(Base_FinSeq (K,n,j)))| by A32, A27, A43, Th35
.= (- (((a ") * (Q * (1,j))) * a)) + |((Line (Q,1)),(Base_FinSeq (K,n,j)))| by VECTSP_1:9
.= (- ((Q * (1,j)) * ((a ") * a))) + |((Line (Q,1)),(Base_FinSeq (K,n,j)))| by GROUP_1:def_3
.= (- ((Q * (1,j)) * (1. K))) + |((Line (Q,1)),(Base_FinSeq (K,n,j)))| by A2, VECTSP_1:def_10
.= (- ((Q * (1,j)) * (1. K))) + ((Line (Q,1)) /. j) by A32, A36, A37, Th35
.= (- (Q * (1,j))) + ((Line (Q,1)) /. j) by VECTSP_1:def_6
.= (- (Q * (1,j))) + (Q * (1,j)) by A31, A39, A42, MATRIX_1:def_7
.= 0. K by RLVECT_1:5 ;
hence (Q * P) * (1,j) = 0. K ; ::_thesis: verum
end;
A70: 1 in Seg (width Q) by A31, A27, FINSEQ_1:1;
A71: for i, j being Element of NAT st 1 < i & i <= n & i = j holds
(Q * P) * (i,j) = 1. K
proof
let i, j be Element of NAT ; ::_thesis: ( 1 < i & i <= n & i = j implies (Q * P) * (i,j) = 1. K )
assume that
A72: 1 < i and
A73: i <= n and
A74: i = j ; ::_thesis: (Q * P) * (i,j) = 1. K
A75: len (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) = len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) by Th6
.= len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
[i,j] in Indices Q by A72, A73, A74, MATRIX_1:37;
then consider p1 being FinSequence of K such that
A76: p1 = Q . i and
A77: Q * (i,j) = p1 . j by MATRIX_1:def_5;
p1 = Base_FinSeq (K,n,i) by A7, A72, A73, A76;
then A78: p1 . j = 1. K by A72, A73, A74, Th24;
[i,1] in Indices Q by A8, A72, A73, MATRIX_1:37;
then consider p2 being FinSequence of K such that
A79: p2 = Q . i and
A80: Q * (i,1) = p2 . 1 by MATRIX_1:def_5;
A81: width Q = n by MATRIX_1:24;
A82: j in Seg n by A72, A73, A74, FINSEQ_1:1;
A83: len (Col (P,j)) = len P by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
reconsider p = Col (P,j), q = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) as FinSequence of K ;
A84: len (Base_FinSeq (K,n,j)) = n by Th23;
A85: len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A86: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
A87: len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A88: 1 <= k and
A89: k <= n ; ::_thesis: p . k = q . k
k in Seg n by A88, A89, FINSEQ_1:1;
then A90: k in dom ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) by A85, FINSEQ_1:def_3;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A91: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A88, A89, FINSEQ_4:15;
k in dom P by A10, A88, A89, FINSEQ_3:25;
then A92: p . k = P * (k,j) by MATRIX_1:def_8;
A93: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k = ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) . k by Th6
.= (- ((a ") * (Q * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A90, A91, FVSUM_1:50 ;
percases ( 1 = k or 1 < k ) by A88, XXREAL_0:1;
supposeA94: 1 = k ; ::_thesis: p . k = q . k
k <= len (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) by A89, A87, Th6;
then A95: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((a ") * (Q * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A88, A93, FINSEQ_4:15
.= (- ((a ") * (Q * (1,j)))) * (1. K) by A27, A91, A94, Th24
.= - ((a ") * (Q * (1,j))) by VECTSP_1:def_6 ;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A84, A88, A89, FINSEQ_4:15
.= 0. K by A72, A74, A89, A94, Th25 ;
then A96: q . k = (- ((a ") * (Q * (1,j)))) + (0. K) by A75, A84, A88, A89, A95, Th5;
p . k = - ((a ") * (Q * (1,j))) by A34, A72, A73, A74, A92, A94;
hence p . k = q . k by A96, RLVECT_1:4; ::_thesis: verum
end;
supposeA97: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices P by A72, A73, A74, A88, A89, MATRIX_1:37;
then A98: ex p2 being FinSequence of K st
( p2 = P . k & P * (k,j) = p2 . j ) by MATRIX_1:def_5;
k in NAT by ORDINAL1:def_12;
then A99: p . k = (Base_FinSeq (K,n,k)) . j by A4, A89, A92, A97, A98;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA100: k <> j ; ::_thesis: p . k = q . k
len (Base_FinSeq (K,n,1)) = n by Th23;
then (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A88, A89, FINSEQ_4:15;
then A101: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- ((a ") * (Q * (1,j)))) * (0. K) by A89, A93, A97, Th25
.= 0. K by VECTSP_1:6 ;
A102: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A75, A88, A89, FINSEQ_4:15;
A103: p . k = 0. K by A72, A73, A74, A99, A100, Th25;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A84, A88, A89, FINSEQ_4:15
.= 0. K by A88, A89, A100, Th25 ;
then q . k = (0. K) + (0. K) by A75, A84, A88, A89, A102, A101, Th5;
hence p . k = q . k by A103, RLVECT_1:4; ::_thesis: verum
end;
supposeA104: k = j ; ::_thesis: p . k = q . k
len (Base_FinSeq (K,n,1)) = n by Th23;
then (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A88, A89, FINSEQ_4:15;
then A105: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- ((a ") * (Q * (1,j)))) * (0. K) by A89, A93, A97, Th25
.= 0. K by VECTSP_1:6 ;
A106: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A75, A88, A89, FINSEQ_4:15;
A107: p . k = 1. K by A88, A89, A99, A104, Th24;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A84, A88, A89, FINSEQ_4:15
.= 1. K by A88, A89, A104, Th24 ;
then q . k = (0. K) + (1. K) by A75, A84, A88, A89, A106, A105, Th5;
hence p . k = q . k by A107, RLVECT_1:4; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
len ((- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j))) = n by A75, A84, Th2;
then A108: Col (P,j) = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) by A83, A86, FINSEQ_1:14;
A109: len (Line (Q,i)) = n by A31, MATRIX_1:def_7;
then A110: (Line (Q,i)) /. 1 = (Line (Q,i)) . 1 by A27, FINSEQ_4:15
.= Q * (i,1) by A70, MATRIX_1:def_7 ;
A111: (Line (Q,i)) /. j = (Line (Q,i)) . j by A72, A73, A74, A109, FINSEQ_4:15
.= Q * (i,j) by A82, A81, MATRIX_1:def_7 ;
[i,j] in Indices (Q * P) by A72, A73, A74, MATRIX_1:37;
then A112: (Q * P) * (i,j) = |((Line (Q,i)),(Col (P,j)))| by A10, A81, MATRIX_3:def_4
.= |((Line (Q,i)),(- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))))| + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by A75, A84, A108, A109, Th11
.= |((Line (Q,i)),((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))))| + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by Th6
.= ((- ((a ") * (Q * (1,j)))) * |((Line (Q,i)),(Base_FinSeq (K,n,1)))|) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by A9, A109, Th10
.= ((- ((a ") * (Q * (1,j)))) * (Q * (i,1))) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by A27, A109, A110, Th35
.= (- (((Q * (1,j)) * (a ")) * (Q * (i,1)))) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by VECTSP_1:9
.= (- ((Q * (1,j)) * ((a ") * (Q * (i,1))))) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by GROUP_1:def_3
.= (- ((Q * (1,j)) * ((a ") * (Q * (i,1))))) + (Q * (i,j)) by A72, A73, A74, A109, A111, Th35 ;
A113: 1 <= n by A72, A73, XXREAL_0:2;
p2 = Base_FinSeq (K,n,i) by A7, A72, A73, A79;
hence (Q * P) * (i,j) = (- ((Q * (1,j)) * ((a ") * (0. K)))) + (Q * (i,j)) by A72, A113, A112, A80, Th25
.= (- ((Q * (1,j)) * (0. K))) + (Q * (i,j)) by VECTSP_1:6
.= (- (0. K)) + (Q * (i,j)) by VECTSP_1:6
.= (0. K) + (1. K) by A77, A78, RLVECT_1:12
.= 1. K by RLVECT_1:4 ;
::_thesis: verum
end;
A114: Indices P = [:(Seg n),(Seg n):] by MATRIX_1:24;
A115: for i, j being Element of NAT st 1 < i & i <= n & 1 <= j & j <= n & i <> j holds
(Q * P) * (i,j) = 0. K
proof
A116: len ((a ") * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
let i, j be Element of NAT ; ::_thesis: ( 1 < i & i <= n & 1 <= j & j <= n & i <> j implies (Q * P) * (i,j) = 0. K )
assume that
A117: 1 < i and
A118: i <= n and
A119: 1 <= j and
A120: j <= n and
A121: i <> j ; ::_thesis: (Q * P) * (i,j) = 0. K
A122: [i,j] in Indices (Q * P) by A117, A118, A119, A120, MATRIX_1:37;
A123: j in Seg n by A119, A120, FINSEQ_1:1;
A124: len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A125: len (Col (P,j)) = len P by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
A126: [i,1] in Indices Q by A27, A117, A118, MATRIX_1:37;
A127: len (Base_FinSeq (K,n,j)) = n by Th23;
A128: len (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) = len ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) by Th6
.= len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
then A129: len ((- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j))) = n by A127, Th2;
A130: [i,j] in Indices Q by A117, A118, A119, A120, MATRIX_1:37;
now__::_thesis:_(Q_*_P)_*_(i,j)_=_0._K
percases ( j > 1 or j <= 1 ) ;
supposeA131: j > 1 ; ::_thesis: (Q * P) * (i,j) = 0. K
reconsider p = Col (P,j), q = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) as FinSequence of K ;
for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A132: 1 <= k and
A133: k <= n ; ::_thesis: p . k = q . k
k in Seg n by A132, A133, FINSEQ_1:1;
then A134: k in dom ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) by A124, FINSEQ_1:def_3;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A135: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A132, A133, FINSEQ_4:15;
k in dom P by A10, A132, A133, FINSEQ_3:25;
then A136: p . k = P * (k,j) by MATRIX_1:def_8;
A137: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k = ((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))) . k by Th6
.= (- ((a ") * (Q * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A134, A135, FVSUM_1:50 ;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A138: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A132, A133, FINSEQ_4:15;
percases ( 1 = k or 1 < k ) by A132, XXREAL_0:1;
supposeA139: 1 = k ; ::_thesis: p . k = q . k
then A140: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- ((a ") * (Q * (1,j)))) * (1. K) by A27, A135, A137, Th24;
A141: (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A128, A132, A133, FINSEQ_4:15;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A127, A132, A133, FINSEQ_4:15
.= 0. K by A131, A133, A139, Th25 ;
then q . k = ((- ((a ") * (Q * (1,j)))) * (1. K)) + (0. K) by A128, A127, A132, A133, A141, A140, Th5
.= (- ((a ") * (Q * (1,j)))) * (1. K) by RLVECT_1:4
.= - ((a ") * (Q * (1,j))) by VECTSP_1:def_6 ;
hence p . k = q . k by A34, A120, A131, A136, A139; ::_thesis: verum
end;
supposeA142: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices P by A119, A120, A132, A133, MATRIX_1:37;
then A143: ex p2 being FinSequence of K st
( p2 = P . k & P * (k,j) = p2 . j ) by MATRIX_1:def_5;
k in NAT by ORDINAL1:def_12;
then A144: p . k = (Base_FinSeq (K,n,k)) . j by A4, A133, A136, A142, A143;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA145: k <> j ; ::_thesis: p . k = q . k
(- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((a ") * (Q * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A128, A132, A133, A137, FINSEQ_4:15
.= (- ((a ") * (Q * (1,j)))) * (0. K) by A133, A138, A142, Th25
.= 0. K by VECTSP_1:6 ;
then q . k = (0. K) + ((Base_FinSeq (K,n,j)) /. k) by A128, A127, A132, A133, Th5
.= (Base_FinSeq (K,n,j)) /. k by RLVECT_1:4
.= (Base_FinSeq (K,n,j)) . k by A127, A132, A133, FINSEQ_4:15
.= 0. K by A132, A133, A145, Th25 ;
hence p . k = q . k by A119, A120, A144, A145, Th25; ::_thesis: verum
end;
supposeA146: k = j ; ::_thesis: p . k = q . k
(- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((a ") * (Q * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A128, A132, A133, A137, FINSEQ_4:15
.= (- ((a ") * (Q * (1,j)))) * (0. K) by A133, A138, A142, Th25
.= 0. K by VECTSP_1:6 ;
then q . k = (0. K) + ((Base_FinSeq (K,n,j)) /. k) by A128, A127, A132, A133, Th5
.= (Base_FinSeq (K,n,j)) /. k by RLVECT_1:4
.= (Base_FinSeq (K,n,j)) . k by A127, A132, A133, FINSEQ_4:15
.= 1. K by A119, A120, A146, Th24 ;
hence p . k = q . k by A132, A133, A144, A146, Th24; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
then A147: Col (P,j) = (- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) by A125, A129, FINSEQ_1:14;
A148: 1 <= n by A117, A118, XXREAL_0:2;
A149: width Q = n by MATRIX_1:24;
then A150: len (Line (Q,i)) = n by MATRIX_1:def_7;
then A151: (Line (Q,i)) /. j = (Line (Q,i)) . j by A119, A120, FINSEQ_4:15
.= Q * (i,j) by A123, A149, MATRIX_1:def_7 ;
A152: (Line (Q,i)) /. 1 = (Line (Q,i)) . 1 by A27, A150, FINSEQ_4:15
.= Q * (i,1) by A70, MATRIX_1:def_7 ;
A153: (Q * P) * (i,j) = |((Line (Q,i)),(Col (P,j)))| by A10, A122, A149, MATRIX_3:def_4
.= |((Line (Q,i)),(- (((a ") * (Q * (1,j))) * (Base_FinSeq (K,n,1)))))| + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by A128, A127, A147, A150, Th11
.= |((Line (Q,i)),((- ((a ") * (Q * (1,j)))) * (Base_FinSeq (K,n,1))))| + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by Th6
.= ((- ((a ") * (Q * (1,j)))) * |((Line (Q,i)),(Base_FinSeq (K,n,1)))|) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by A9, A150, Th10
.= ((- ((a ") * (Q * (1,j)))) * (Q * (i,1))) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by A27, A150, A152, Th35
.= (- (((Q * (1,j)) * (a ")) * (Q * (i,1)))) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by VECTSP_1:9
.= (- ((Q * (1,j)) * ((a ") * (Q * (i,1))))) + |((Line (Q,i)),(Base_FinSeq (K,n,j)))| by GROUP_1:def_3
.= (- ((Q * (1,j)) * ((a ") * (Q * (i,1))))) + (Q * (i,j)) by A119, A120, A150, A151, Th35 ;
consider p2 being FinSequence of K such that
A154: p2 = Q . i and
A155: Q * (i,1) = p2 . 1 by A126, MATRIX_1:def_5;
consider p1 being FinSequence of K such that
A156: p1 = Q . i and
A157: Q * (i,j) = p1 . j by A130, MATRIX_1:def_5;
p1 = Base_FinSeq (K,n,i) by A7, A117, A118, A156;
then A158: p1 . j = 0. K by A119, A120, A121, Th25;
p2 = Base_FinSeq (K,n,i) by A7, A117, A118, A154;
hence (Q * P) * (i,j) = (- ((Q * (1,j)) * ((a ") * (0. K)))) + (Q * (i,j)) by A117, A148, A153, A155, Th25
.= (- ((Q * (1,j)) * (0. K))) + (Q * (i,j)) by VECTSP_1:6
.= (- (0. K)) + (Q * (i,j)) by VECTSP_1:6
.= (0. K) + (0. K) by A157, A158, RLVECT_1:12
.= 0. K by RLVECT_1:4 ;
::_thesis: verum
end;
supposeA159: j <= 1 ; ::_thesis: (Q * P) * (i,j) = 0. K
reconsider p = Col (P,j), q = (a ") * (Base_FinSeq (K,n,1)) as FinSequence of K ;
A160: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A161: 1 <= k and
A162: k <= n ; ::_thesis: p . k = q . k
A163: len (Base_FinSeq (K,n,1)) = n by Th23;
then A164: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A161, A162, FINSEQ_4:15;
A165: k in Seg n by A161, A162, FINSEQ_1:1;
then k in dom ((a ") * (Base_FinSeq (K,n,1))) by A116, FINSEQ_1:def_3;
then A166: ((a ") * (Base_FinSeq (K,n,1))) . k = (a ") * ((Base_FinSeq (K,n,1)) /. k) by A164, FVSUM_1:50;
k in dom P by A10, A161, A162, FINSEQ_3:25;
then A167: p . k = P * (k,j) by MATRIX_1:def_8;
percases ( 1 = k or 1 < k ) by A161, XXREAL_0:1;
supposeA168: 1 = k ; ::_thesis: p . k = q . k
then q . k = (a ") * (1. K) by A162, A164, A166, Th24
.= a " by VECTSP_1:def_6 ;
hence p . k = q . k by A3, A119, A159, A167, A168, XXREAL_0:1; ::_thesis: verum
end;
supposeA169: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices P by A114, A123, A165, ZFMISC_1:87;
then A170: ex p2 being FinSequence of K st
( p2 = P . k & P * (k,j) = p2 . j ) by MATRIX_1:def_5;
k in NAT by ORDINAL1:def_12;
then A171: p . k = (Base_FinSeq (K,n,k)) . j by A4, A162, A167, A169, A170;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA172: k <> j ; ::_thesis: p . k = q . k
(Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A161, A162, A163, FINSEQ_4:15;
then (a ") * ((Base_FinSeq (K,n,1)) /. k) = (a ") * (0. K) by A162, A169, Th25
.= 0. K by VECTSP_1:6 ;
hence p . k = q . k by A119, A120, A166, A171, A172, Th25; ::_thesis: verum
end;
suppose k = j ; ::_thesis: p . k = q . k
hence p . k = q . k by A159, A169; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
A173: 1 <= n by A117, A118, XXREAL_0:2;
A174: width Q = n by MATRIX_1:24;
then A175: len (Line (Q,i)) = n by MATRIX_1:def_7;
then A176: (Line (Q,i)) /. 1 = (Line (Q,i)) . 1 by A27, FINSEQ_4:15
.= Q * (i,1) by A70, MATRIX_1:def_7 ;
A177: (Q * P) * (i,j) = |((Line (Q,i)),(Col (P,j)))| by A10, A122, A174, MATRIX_3:def_4
.= |((Line (Q,i)),((a ") * (Base_FinSeq (K,n,1))))| by A125, A116, A160, FINSEQ_1:14
.= (a ") * |((Line (Q,i)),(Base_FinSeq (K,n,1)))| by A9, A175, Th10
.= (a ") * (Q * (i,1)) by A27, A175, A176, Th35 ;
consider p2 being FinSequence of K such that
A178: p2 = Q . i and
A179: Q * (i,1) = p2 . 1 by A126, MATRIX_1:def_5;
p2 = Base_FinSeq (K,n,i) by A7, A117, A118, A178;
hence (Q * P) * (i,j) = (a ") * (0. K) by A117, A173, A177, A179, Th25
.= 0. K by VECTSP_1:6 ;
::_thesis: verum
end;
end;
end;
hence (Q * P) * (i,j) = 0. K ; ::_thesis: verum
end;
len (Col (P,1)) = len P by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
then A180: Col (P,1) = (a ") * (Base_FinSeq (K,n,1)) by A11, A12, FINSEQ_1:14;
A181: Indices (Q * P) = [:(Seg n),(Seg n):] by MATRIX_1:24;
A182: len ((a ") * (Line (Q,1))) = len (Line (Q,1)) by MATRIXR1:16
.= n by A31, MATRIX_1:def_7 ;
( Indices Q = [:(Seg n),(Seg n):] & [1,1] in Indices Q ) by A27, MATRIX_1:24, MATRIX_1:37;
then A183: (Q * P) * (1,1) = |((Line (Q,1)),(Col (P,1)))| by A10, A31, A181, MATRIX_3:def_4
.= (a ") * |((Line (Q,1)),(Base_FinSeq (K,n,1)))| by A32, A9, A180, Th10
.= (a ") * ((Line (Q,1)) /. 1) by A32, A27, Th35
.= ((a ") * (Line (Q,1))) /. 1 by A33, POLYNOM1:def_1
.= ((a ") * (Line (Q,1))) . 1 by A27, A182, FINSEQ_4:15
.= (a ") * (Q * (1,1)) by A70, A30, MATRIX12:3
.= 1. K by A2, A5, VECTSP_1:def_10 ;
for i, j being Nat st [i,j] in Indices (Q * P) holds
(Q * P) * (i,j) = (1. (K,n)) * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices (Q * P) implies (Q * P) * (i,j) = (1. (K,n)) * (i,j) )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
assume A184: [i,j] in Indices (Q * P) ; ::_thesis: (Q * P) * (i,j) = (1. (K,n)) * (i,j)
then A185: i in Seg n by A181, ZFMISC_1:87;
then A186: 1 <= i by FINSEQ_1:1;
A187: i <= n by A185, FINSEQ_1:1;
A188: j in Seg n by A181, A184, ZFMISC_1:87;
then A189: 1 <= j by FINSEQ_1:1;
A190: j <= n by A188, FINSEQ_1:1;
percases ( 1 < i or 1 = i ) by A186, XXREAL_0:1;
supposeA191: 1 < i ; ::_thesis: (Q * P) * (i,j) = (1. (K,n)) * (i,j)
now__::_thesis:_(Q_*_P)_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i <> j or i = j ) ;
supposeA192: i <> j ; ::_thesis: (Q * P) * (i,j) = (1. (K,n)) * (i,j)
A193: (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A186, A187, A189, A190, Th27
.= 0. K by A189, A190, A192, Th25 ;
thus (Q * P) * (i,j) = (Q * P) * (i0,j0)
.= (1. (K,n)) * (i,j) by A115, A187, A189, A190, A191, A192, A193 ; ::_thesis: verum
end;
supposeA194: i = j ; ::_thesis: (Q * P) * (i,j) = (1. (K,n)) * (i,j)
A195: (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A186, A187, A189, A190, Th27
.= 1. K by A189, A190, A194, Th24 ;
thus (Q * P) * (i,j) = (Q * P) * (i0,j0)
.= (1. (K,n)) * (i,j) by A71, A190, A191, A194, A195 ; ::_thesis: verum
end;
end;
end;
hence (Q * P) * (i,j) = (1. (K,n)) * (i,j) ; ::_thesis: verum
end;
supposeA196: 1 = i ; ::_thesis: (Q * P) * (i,j) = (1. (K,n)) * (i,j)
now__::_thesis:_(Q_*_P)_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i < j or i >= j ) ;
supposeA197: i < j ; ::_thesis: (Q * P) * (i,j) = (1. (K,n)) * (i,j)
A198: (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A186, A187, A189, A190, Th27
.= 0. K by A189, A190, A197, Th25 ;
thus (Q * P) * (i,j) = (Q * P) * (i0,j0)
.= (1. (K,n)) * (i,j) by A35, A190, A196, A197, A198 ; ::_thesis: verum
end;
supposeA199: i >= j ; ::_thesis: (Q * P) * (i,j) = (1. (K,n)) * (i,j)
then A200: i = j by A189, A196, XXREAL_0:1;
(1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A186, A187, A189, A190, Th27
.= 1. K by A189, A190, A200, Th24 ;
hence (Q * P) * (i,j) = (1. (K,n)) * (i,j) by A183, A189, A196, A199, XXREAL_0:1; ::_thesis: verum
end;
end;
end;
hence (Q * P) * (i,j) = (1. (K,n)) * (i,j) ; ::_thesis: verum
end;
end;
end;
then A201: Q * P = 1. (K,n) by MATRIX_1:27;
A202: len Q = n by MATRIX_1:24;
A203: len (Base_FinSeq (K,n,1)) = n by Th23;
A204: len (a * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A205: for k being Nat st 1 <= k & k <= n holds
(Col (Q,1)) . k = (a * (Base_FinSeq (K,n,1))) . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies (Col (Q,1)) . k = (a * (Base_FinSeq (K,n,1))) . k )
assume that
A206: 1 <= k and
A207: k <= n ; ::_thesis: (Col (Q,1)) . k = (a * (Base_FinSeq (K,n,1))) . k
A208: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A203, A206, A207, FINSEQ_4:15;
A209: k in dom (a * (Base_FinSeq (K,n,1))) by A204, A206, A207, FINSEQ_3:25;
A210: now__::_thesis:_(_k_<>_1_implies_(a_*_(Base_FinSeq_(K,n,1)))_._k_=_0._K_)
assume A211: k <> 1 ; ::_thesis: (a * (Base_FinSeq (K,n,1))) . k = 0. K
thus (a * (Base_FinSeq (K,n,1))) . k = a * ((Base_FinSeq (K,n,1)) /. k) by A208, A209, FVSUM_1:50
.= a * (0. K) by A206, A207, A208, A211, Th25
.= 0. K by VECTSP_1:6 ; ::_thesis: verum
end;
A212: k in NAT by ORDINAL1:def_12;
k in Seg n by A206, A207, FINSEQ_1:1;
then A213: k in dom Q by A202, FINSEQ_1:def_3;
A214: now__::_thesis:_(_k_<>_1_implies_(Col_(Q,1))_._k_=_0._K_)
[k,1] in Indices Q by A8, A206, A207, MATRIX_1:37;
then A215: ex p being FinSequence of K st
( p = Q . k & Q * (k,1) = p . 1 ) by MATRIX_1:def_5;
assume A216: k <> 1 ; ::_thesis: (Col (Q,1)) . k = 0. K
then 1 < k by A206, XXREAL_0:1;
then Q * (k,1) = (Base_FinSeq (K,n,k)) . 1 by A7, A207, A212, A215
.= 0. K by A8, A216, Th25 ;
hence (Col (Q,1)) . k = 0. K by A213, MATRIX_1:def_8; ::_thesis: verum
end;
A217: now__::_thesis:_(_k_=_1_implies_(a_*_(Base_FinSeq_(K,n,1)))_._k_=_a_)
assume A218: k = 1 ; ::_thesis: (a * (Base_FinSeq (K,n,1))) . k = a
thus (a * (Base_FinSeq (K,n,1))) . k = a * ((Base_FinSeq (K,n,1)) /. k) by A208, A209, FVSUM_1:50
.= a * (1. K) by A207, A208, A218, Th24
.= a by VECTSP_1:def_6 ; ::_thesis: verum
end;
1 <= n by A206, A207, XXREAL_0:2;
then 1 in dom Q by A202, FINSEQ_3:25;
hence (Col (Q,1)) . k = (a * (Base_FinSeq (K,n,1))) . k by A5, A210, A217, A214, MATRIX_1:def_8; ::_thesis: verum
end;
A219: 0 + 1 <= n by A1, NAT_1:13;
A220: len P = n by MATRIX_1:24;
then A221: 1 in Seg (len P) by A219, FINSEQ_1:1;
then A222: 1 in dom P by FINSEQ_1:def_3;
A223: width P = n by MATRIX_1:24;
then A224: len (Line (P,1)) = n by MATRIX_1:def_7;
then A225: 1 in dom (Line (P,1)) by A220, A221, FINSEQ_1:def_3;
A226: 1 in Seg (width P) by A223, A219, FINSEQ_1:1;
A227: for j being Element of NAT st 1 < j & j <= n holds
(P * Q) * (1,j) = 0. K
proof
let j be Element of NAT ; ::_thesis: ( 1 < j & j <= n implies (P * Q) * (1,j) = 0. K )
assume that
A228: 1 < j and
A229: j <= n ; ::_thesis: (P * Q) * (1,j) = 0. K
A230: len (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) = len ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) by Th6
.= len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
reconsider p = Col (Q,j), q = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) as FinSequence of K ;
A231: len (Base_FinSeq (K,n,j)) = n by Th23;
A232: len ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A233: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A234: 1 <= k and
A235: k <= n ; ::_thesis: p . k = q . k
A236: k in dom Q by A202, A234, A235, FINSEQ_3:25;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A237: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A234, A235, FINSEQ_4:15;
A238: ( k in dom ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) & (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k ) by A203, A232, A234, A235, FINSEQ_3:25, FINSEQ_4:15;
A239: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) . k by Th6
.= (- (a * (P * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A238, FVSUM_1:50 ;
percases ( 1 = k or 1 < k ) by A234, XXREAL_0:1;
supposeA240: 1 = k ; ::_thesis: p . k = q . k
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A231, A234, A235, FINSEQ_4:15
.= 0. K by A228, A235, A240, Th25 ;
then q . k = ((- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k) + (0. K) by A230, A231, A234, A235, Th5;
then A241: q . k = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k by RLVECT_1:4;
A242: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- (a * (P * (1,j)))) * (1_ K) by A235, A239, A237, A240, Th24
.= - (a * (P * (1,j))) by GROUP_1:def_4 ;
p . k = Q * (1,j) by A236, A240, MATRIX_1:def_8
.= - (a * (P * (1,j))) by A6, A228, A229 ;
hence p . k = q . k by A230, A234, A235, A242, A241, FINSEQ_4:15; ::_thesis: verum
end;
supposeA243: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices Q by A228, A229, A234, A235, MATRIX_1:37;
then consider p2 being FinSequence of K such that
A244: p2 = Q . k and
A245: Q * (k,j) = p2 . j by MATRIX_1:def_5;
A246: k in NAT by ORDINAL1:def_12;
A247: p . k = p2 . j by A236, A245, MATRIX_1:def_8
.= (Base_FinSeq (K,n,k)) . j by A7, A235, A243, A244, A246 ;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA248: k <> j ; ::_thesis: p . k = q . k
(- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (a * (P * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A230, A234, A235, A239, FINSEQ_4:15
.= (- (a * (P * (1,j)))) * (0. K) by A235, A237, A243, Th25
.= 0. K by VECTSP_1:6 ;
then q . k = (0. K) + ((Base_FinSeq (K,n,j)) /. k) by A230, A231, A234, A235, Th5
.= (Base_FinSeq (K,n,j)) /. k by RLVECT_1:4
.= (Base_FinSeq (K,n,j)) . k by A231, A234, A235, FINSEQ_4:15
.= 0. K by A234, A235, A248, Th25 ;
hence p . k = q . k by A228, A229, A247, A248, Th25; ::_thesis: verum
end;
supposeA249: k = j ; ::_thesis: p . k = q . k
(- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (a * (P * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A230, A234, A235, A239, FINSEQ_4:15
.= (- (a * (P * (1,j)))) * (0. K) by A235, A237, A243, Th25
.= 0. K by VECTSP_1:6 ;
then q . k = (0. K) + ((Base_FinSeq (K,n,j)) /. k) by A230, A231, A234, A235, Th5
.= (Base_FinSeq (K,n,j)) /. k by RLVECT_1:4
.= (Base_FinSeq (K,n,j)) . k by A231, A234, A235, FINSEQ_4:15
.= 1. K by A234, A235, A249, Th24 ;
hence p . k = q . k by A234, A235, A247, A249, Th24; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
A250: width P = n by MATRIX_1:24;
then A251: len (Line (P,1)) = n by MATRIX_1:def_7;
then A252: (Line (P,1)) /. 1 = (Line (P,1)) . 1 by A219, FINSEQ_4:15
.= a " by A3, A226, MATRIX_1:def_7 ;
A253: j in Seg n by A228, A229, FINSEQ_1:1;
A254: len (Col (Q,j)) = len Q by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
len ((- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j))) = n by A230, A231, Th2;
then A255: Col (Q,j) = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) by A254, A233, FINSEQ_1:14;
A256: (Line (P,1)) /. j = (Line (P,1)) . j by A228, A229, A251, FINSEQ_4:15
.= P * (1,j) by A253, A250, MATRIX_1:def_7 ;
[1,j] in Indices (P * Q) by A219, A228, A229, MATRIX_1:37;
then (P * Q) * (1,j) = |((Line (P,1)),(Col (Q,j)))| by A202, A250, MATRIX_3:def_4
.= |((Line (P,1)),(- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))))| + |((Line (P,1)),(Base_FinSeq (K,n,j)))| by A224, A230, A231, A255, Th11
.= |((Line (P,1)),((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))))| + |((Line (P,1)),(Base_FinSeq (K,n,j)))| by Th6
.= ((- (a * (P * (1,j)))) * |((Line (P,1)),(Base_FinSeq (K,n,1)))|) + |((Line (P,1)),(Base_FinSeq (K,n,j)))| by A224, A203, Th10
.= ((- (a * (P * (1,j)))) * (a ")) + |((Line (P,1)),(Base_FinSeq (K,n,j)))| by A224, A219, A252, Th35
.= (- ((a * (P * (1,j))) * (a "))) + |((Line (P,1)),(Base_FinSeq (K,n,j)))| by VECTSP_1:9
.= (- ((P * (1,j)) * (a * (a ")))) + |((Line (P,1)),(Base_FinSeq (K,n,j)))| by GROUP_1:def_3
.= (- ((P * (1,j)) * (1_ K))) + |((Line (P,1)),(Base_FinSeq (K,n,j)))| by A2, VECTSP_1:def_10
.= (- ((P * (1,j)) * (1. K))) + ((Line (P,1)) /. j) by A224, A228, A229, Th35
.= (- (P * (1,j))) + (P * (1,j)) by A256, VECTSP_1:def_6
.= 0. K by RLVECT_1:5 ;
hence (P * Q) * (1,j) = 0. K ; ::_thesis: verum
end;
A257: Indices Q = [:(Seg n),(Seg n):] by MATRIX_1:24;
A258: for i, j being Element of NAT st 1 < i & i <= n & i = j holds
(P * Q) * (i,j) = 1. K
proof
let i, j be Element of NAT ; ::_thesis: ( 1 < i & i <= n & i = j implies (P * Q) * (i,j) = 1. K )
assume that
A259: 1 < i and
A260: i <= n and
A261: i = j ; ::_thesis: (P * Q) * (i,j) = 1. K
A262: len (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) = len ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) by Th6
.= len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
reconsider p = Col (Q,j), q = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) as FinSequence of K ;
A263: len (Base_FinSeq (K,n,j)) = n by Th23;
A264: j in Seg n by A259, A260, A261, FINSEQ_1:1;
A265: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
A266: len ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A267: 1 <= k and
A268: k <= n ; ::_thesis: p . k = q . k
A269: k in Seg n by A267, A268, FINSEQ_1:1;
len ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
then A270: k in dom ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) by A267, A268, FINSEQ_3:25;
A271: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A203, A267, A268, FINSEQ_4:15;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A272: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A267, A268, FINSEQ_4:15;
k in dom Q by A202, A267, A268, FINSEQ_3:25;
then A273: p . k = Q * (k,j) by MATRIX_1:def_8;
A274: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) . k by Th6
.= (- (a * (P * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A270, A271, FVSUM_1:50 ;
percases ( 1 = k or 1 < k ) by A267, XXREAL_0:1;
supposeA275: 1 = k ; ::_thesis: p . k = q . k
k <= len (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) by A268, A266, Th6;
then A276: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (a * (P * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A267, A274, FINSEQ_4:15
.= (- (a * (P * (1,j)))) * (1. K) by A219, A272, A275, Th24 ;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A263, A267, A268, FINSEQ_4:15
.= 0. K by A259, A261, A268, A275, Th25 ;
then q . k = ((- (a * (P * (1,j)))) * (1. K)) + (0. K) by A262, A263, A267, A268, A276, Th5
.= (- (a * (P * (1,j)))) * (1. K) by RLVECT_1:4
.= - (a * (P * (1,j))) by VECTSP_1:def_6 ;
hence p . k = q . k by A6, A259, A260, A261, A273, A275; ::_thesis: verum
end;
supposeA277: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices Q by A257, A264, A269, ZFMISC_1:87;
then A278: ex p2 being FinSequence of K st
( p2 = Q . k & Q * (k,j) = p2 . j ) by MATRIX_1:def_5;
k in NAT by ORDINAL1:def_12;
then A279: p . k = (Base_FinSeq (K,n,k)) . j by A7, A268, A273, A277, A278;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA280: k <> j ; ::_thesis: p . k = q . k
then A281: p . k = 0. K by A259, A260, A261, A279, Th25;
A282: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A262, A267, A268, FINSEQ_4:15;
A283: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- (a * (P * (1,j)))) * (0. K) by A268, A271, A274, A277, Th25
.= 0. K by VECTSP_1:6 ;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A263, A267, A268, FINSEQ_4:15
.= 0. K by A267, A268, A280, Th25 ;
then q . k = (0. K) + (0. K) by A262, A263, A267, A268, A282, A283, Th5;
hence p . k = q . k by A281, RLVECT_1:4; ::_thesis: verum
end;
supposeA284: k = j ; ::_thesis: p . k = q . k
then A285: p . k = 1. K by A267, A268, A279, Th24;
A286: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A262, A267, A268, FINSEQ_4:15;
A287: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- (a * (P * (1,j)))) * (0. K) by A268, A271, A274, A277, Th25
.= 0. K by VECTSP_1:6 ;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A263, A267, A268, FINSEQ_4:15
.= 1. K by A259, A260, A261, A284, Th24 ;
then q . k = (0. K) + (1. K) by A262, A263, A267, A268, A286, A287, Th5;
hence p . k = q . k by A285, RLVECT_1:4; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
[i,j] in Indices P by A259, A260, A261, MATRIX_1:37;
then consider p1 being FinSequence of K such that
A288: p1 = P . i and
A289: P * (i,j) = p1 . j by MATRIX_1:def_5;
p1 = Base_FinSeq (K,n,i) by A4, A259, A260, A288;
then A290: p1 . j = 1. K by A259, A260, A261, Th24;
A291: len (Col (Q,j)) = len Q by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
len ((- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j))) = n by A262, A263, Th2;
then A292: Col (Q,j) = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) by A291, A265, FINSEQ_1:14;
A293: width P = n by MATRIX_1:24;
then A294: len (Line (P,i)) = n by MATRIX_1:def_7;
then A295: (Line (P,i)) /. 1 = (Line (P,i)) . 1 by A219, FINSEQ_4:15
.= P * (i,1) by A226, MATRIX_1:def_7 ;
A296: (Line (P,i)) /. j = (Line (P,i)) . j by A259, A260, A261, A294, FINSEQ_4:15
.= P * (i,j) by A264, A293, MATRIX_1:def_7 ;
[i,j] in Indices (P * Q) by A259, A260, A261, MATRIX_1:37;
then A297: (P * Q) * (i,j) = |((Line (P,i)),(Col (Q,j)))| by A202, A293, MATRIX_3:def_4
.= |((Line (P,i)),(- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))))| + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by A262, A263, A292, A294, Th11
.= |((Line (P,i)),((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))))| + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by Th6
.= ((- (a * (P * (1,j)))) * |((Line (P,i)),(Base_FinSeq (K,n,1)))|) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by A203, A294, Th10
.= ((- (a * (P * (1,j)))) * (P * (i,1))) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by A219, A294, A295, Th35
.= (- ((a * (P * (1,j))) * (P * (i,1)))) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by VECTSP_1:9
.= (- ((P * (1,j)) * (a * (P * (i,1))))) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by GROUP_1:def_3
.= (- ((P * (1,j)) * (a * (P * (i,1))))) + (P * (i,j)) by A259, A260, A261, A294, A296, Th35 ;
A298: 1 <= n by A259, A260, XXREAL_0:2;
[i,1] in Indices P by A8, A259, A260, MATRIX_1:37;
then consider p2 being FinSequence of K such that
A299: p2 = P . i and
A300: P * (i,1) = p2 . 1 by MATRIX_1:def_5;
p2 = Base_FinSeq (K,n,i) by A4, A259, A260, A299;
hence (P * Q) * (i,j) = (- ((P * (1,j)) * (a * (0. K)))) + (P * (i,j)) by A259, A298, A297, A300, Th25
.= (- ((P * (1,j)) * (0. K))) + (P * (i,j)) by VECTSP_1:6
.= (- (0. K)) + (P * (i,j)) by VECTSP_1:6
.= (0. K) + (1. K) by A289, A290, RLVECT_1:12
.= 1. K by RLVECT_1:4 ;
::_thesis: verum
end;
len (Col (Q,1)) = len Q by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
then A301: Col (Q,1) = a * (Base_FinSeq (K,n,1)) by A204, A205, FINSEQ_1:14;
A302: Indices (P * Q) = [:(Seg n),(Seg n):] by MATRIX_1:24;
A303: for i, j being Element of NAT st 1 < i & i <= n & 1 <= j & j <= n & i <> j holds
(P * Q) * (i,j) = 0. K
proof
A304: len (a * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
let i, j be Element of NAT ; ::_thesis: ( 1 < i & i <= n & 1 <= j & j <= n & i <> j implies (P * Q) * (i,j) = 0. K )
assume that
A305: 1 < i and
A306: i <= n and
A307: 1 <= j and
A308: j <= n and
A309: i <> j ; ::_thesis: (P * Q) * (i,j) = 0. K
A310: [i,j] in Indices (P * Q) by A305, A306, A307, A308, MATRIX_1:37;
A311: j in Seg n by A307, A308, FINSEQ_1:1;
A312: len (Col (Q,j)) = len Q by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
A313: [i,1] in Indices P by A8, A305, A306, MATRIX_1:37;
A314: len (Base_FinSeq (K,n,j)) = n by Th23;
A315: len (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) = len ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) by Th6
.= len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
then A316: len ((- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j))) = n by A314, Th2;
A317: [i,j] in Indices P by A305, A306, A307, A308, MATRIX_1:37;
now__::_thesis:_(P_*_Q)_*_(i,j)_=_0._K
percases ( j > 1 or j <= 1 ) ;
supposeA318: j > 1 ; ::_thesis: (P * Q) * (i,j) = 0. K
reconsider p = Col (Q,j), q = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) as FinSequence of K ;
for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A319: 1 <= k and
A320: k <= n ; ::_thesis: p . k = q . k
A321: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A203, A319, A320, FINSEQ_4:15;
A322: len ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
then A323: k in dom ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) by A319, A320, FINSEQ_3:25;
A324: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = ((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))) . k by Th6
.= (- (a * (P * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A323, A321, FVSUM_1:50 ;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A325: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A319, A320, FINSEQ_4:15;
k in dom Q by A202, A319, A320, FINSEQ_3:25;
then A326: p . k = Q * (k,j) by MATRIX_1:def_8;
percases ( 1 = k or 1 < k ) by A319, XXREAL_0:1;
supposeA327: 1 = k ; ::_thesis: p . k = q . k
k <= len (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) by A320, A322, Th6;
then A328: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (a * (P * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A319, A324, FINSEQ_4:15
.= (- (a * (P * (1,j)))) * (1. K) by A219, A325, A327, Th24 ;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A314, A319, A320, FINSEQ_4:15
.= 0. K by A318, A320, A327, Th25 ;
then q . k = ((- (a * (P * (1,j)))) * (1. K)) + (0. K) by A315, A314, A319, A320, A328, Th5
.= (- (a * (P * (1,j)))) * (1_ K) by RLVECT_1:4
.= - (a * (P * (1,j))) by GROUP_1:def_4 ;
hence p . k = q . k by A6, A308, A318, A326, A327; ::_thesis: verum
end;
supposeA329: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices Q by A307, A308, A319, A320, MATRIX_1:37;
then A330: ex p2 being FinSequence of K st
( p2 = Q . k & Q * (k,j) = p2 . j ) by MATRIX_1:def_5;
k in NAT by ORDINAL1:def_12;
then A331: p . k = (Base_FinSeq (K,n,k)) . j by A7, A320, A326, A329, A330;
A332: k <= len (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) by A320, A322, Th6;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA333: k <> j ; ::_thesis: p . k = q . k
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A314, A319, A320, FINSEQ_4:15
.= 0. K by A319, A320, A333, Th25 ;
then q . k = ((- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k) + (0. K) by A315, A314, A319, A320, Th5;
then A334: q . k = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k by RLVECT_1:4
.= (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A319, A332, FINSEQ_4:15 ;
(- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- (a * (P * (1,j)))) * (0. K) by A320, A324, A325, A329, Th25
.= 0. K by VECTSP_1:6 ;
hence p . k = q . k by A307, A308, A331, A333, A334, Th25; ::_thesis: verum
end;
supposeA335: k = j ; ::_thesis: p . k = q . k
then A336: p . k = 1. K by A319, A320, A331, Th24;
A337: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A315, A319, A320, FINSEQ_4:15;
A338: (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- (a * (P * (1,j)))) * (0. K) by A320, A321, A324, A329, Th25
.= 0. K by VECTSP_1:6 ;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A314, A319, A320, FINSEQ_4:15
.= 1. K by A319, A320, A335, Th24 ;
then q . k = (0. K) + (1. K) by A315, A314, A319, A320, A337, A338, Th5;
hence p . k = q . k by A336, RLVECT_1:4; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
then A339: Col (Q,j) = (- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) by A312, A316, FINSEQ_1:14;
A340: 1 <= n by A305, A306, XXREAL_0:2;
A341: width P = n by MATRIX_1:24;
then A342: len (Line (P,i)) = n by MATRIX_1:def_7;
then A343: (Line (P,i)) /. j = (Line (P,i)) . j by A307, A308, FINSEQ_4:15
.= P * (i,j) by A311, A341, MATRIX_1:def_7 ;
A344: (Line (P,i)) /. 1 = (Line (P,i)) . 1 by A219, A342, FINSEQ_4:15
.= P * (i,1) by A226, MATRIX_1:def_7 ;
A345: (P * Q) * (i,j) = |((Line (P,i)),(Col (Q,j)))| by A202, A310, A341, MATRIX_3:def_4
.= |((Line (P,i)),(- ((a * (P * (1,j))) * (Base_FinSeq (K,n,1)))))| + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by A315, A314, A339, A342, Th11
.= |((Line (P,i)),((- (a * (P * (1,j)))) * (Base_FinSeq (K,n,1))))| + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by Th6
.= ((- (a * (P * (1,j)))) * |((Line (P,i)),(Base_FinSeq (K,n,1)))|) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by A203, A342, Th10
.= ((- (a * (P * (1,j)))) * (P * (i,1))) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by A219, A342, A344, Th35
.= (- ((a * (P * (1,j))) * (P * (i,1)))) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by VECTSP_1:9
.= (- ((P * (1,j)) * (a * (P * (i,1))))) + |((Line (P,i)),(Base_FinSeq (K,n,j)))| by GROUP_1:def_3
.= (- ((P * (1,j)) * (a * (P * (i,1))))) + (P * (i,j)) by A307, A308, A342, A343, Th35 ;
consider p2 being FinSequence of K such that
A346: p2 = P . i and
A347: P * (i,1) = p2 . 1 by A313, MATRIX_1:def_5;
consider p1 being FinSequence of K such that
A348: p1 = P . i and
A349: P * (i,j) = p1 . j by A317, MATRIX_1:def_5;
p1 = Base_FinSeq (K,n,i) by A4, A305, A306, A348;
then A350: p1 . j = 0. K by A307, A308, A309, Th25;
p2 = Base_FinSeq (K,n,i) by A4, A305, A306, A346;
then (P * Q) * (i,j) = (- ((P * (1,j)) * (a * (0. K)))) + (P * (i,j)) by A305, A340, A345, A347, Th25
.= (- ((P * (1,j)) * (0. K))) + (P * (i,j)) by VECTSP_1:6
.= (- (0. K)) + (P * (i,j)) by VECTSP_1:6
.= (0. K) + (0. K) by A349, A350, RLVECT_1:12
.= 0. K by RLVECT_1:4 ;
hence (P * Q) * (i,j) = 0. K ; ::_thesis: verum
end;
supposeA351: j <= 1 ; ::_thesis: (P * Q) * (i,j) = 0. K
reconsider p = Col (Q,j), q = a * (Base_FinSeq (K,n,1)) as FinSequence of K ;
A352: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A353: 1 <= k and
A354: k <= n ; ::_thesis: p . k = q . k
A355: k in dom Q by A202, A353, A354, FINSEQ_3:25;
A356: len (Base_FinSeq (K,n,1)) = n by Th23;
then A357: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A353, A354, FINSEQ_4:15;
k in dom (a * (Base_FinSeq (K,n,1))) by A204, A353, A354, FINSEQ_3:25;
then A358: (a * (Base_FinSeq (K,n,1))) . k = a * ((Base_FinSeq (K,n,1)) /. k) by A357, FVSUM_1:50;
percases ( 1 = k or 1 < k ) by A353, XXREAL_0:1;
supposeA359: 1 = k ; ::_thesis: p . k = q . k
then A360: q . k = a * (1. K) by A354, A357, A358, Th24
.= a by VECTSP_1:def_6 ;
p . k = Q * (1,j) by A355, A359, MATRIX_1:def_8
.= a by A5, A307, A351, XXREAL_0:1 ;
hence p . k = q . k by A360; ::_thesis: verum
end;
supposeA361: 1 < k ; ::_thesis: p . k = q . k
[k,j] in Indices Q by A307, A308, A353, A354, MATRIX_1:37;
then A362: ex p2 being FinSequence of K st
( p2 = Q . k & Q * (k,j) = p2 . j ) by MATRIX_1:def_5;
A363: k in NAT by ORDINAL1:def_12;
A364: p . k = Q * (k,j) by A355, MATRIX_1:def_8
.= (Base_FinSeq (K,n,k)) . j by A7, A354, A361, A362, A363 ;
now__::_thesis:_p_._k_=_q_._k
percases ( k <> j or k = j ) ;
supposeA365: k <> j ; ::_thesis: p . k = q . k
(Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A353, A354, A356, FINSEQ_4:15;
then a * ((Base_FinSeq (K,n,1)) /. k) = a * (0. K) by A354, A361, Th25
.= 0. K by VECTSP_1:6 ;
hence p . k = q . k by A307, A308, A358, A364, A365, Th25; ::_thesis: verum
end;
suppose k = j ; ::_thesis: p . k = q . k
hence p . k = q . k by A351, A361; ::_thesis: verum
end;
end;
end;
hence p . k = q . k ; ::_thesis: verum
end;
end;
end;
A366: 1 <= n by A305, A306, XXREAL_0:2;
A367: len (Line (P,i)) = n by A223, MATRIX_1:def_7;
then A368: (Line (P,i)) /. 1 = (Line (P,i)) . 1 by A219, FINSEQ_4:15
.= P * (i,1) by A226, MATRIX_1:def_7 ;
A369: (P * Q) * (i,j) = |((Line (P,i)),(Col (Q,j)))| by A202, A223, A310, MATRIX_3:def_4
.= |((Line (P,i)),(a * (Base_FinSeq (K,n,1))))| by A312, A304, A352, FINSEQ_1:14
.= a * |((Line (P,i)),(Base_FinSeq (K,n,1)))| by A203, A367, Th10
.= a * (P * (i,1)) by A219, A367, A368, Th35 ;
consider p2 being FinSequence of K such that
A370: p2 = P . i and
A371: P * (i,1) = p2 . 1 by A313, MATRIX_1:def_5;
p2 = Base_FinSeq (K,n,i) by A4, A305, A306, A370;
hence (P * Q) * (i,j) = a * (0. K) by A305, A366, A369, A371, Th25
.= 0. K by VECTSP_1:6 ;
::_thesis: verum
end;
end;
end;
hence (P * Q) * (i,j) = 0. K ; ::_thesis: verum
end;
A372: len (a * (Line (P,1))) = len (Line (P,1)) by MATRIXR1:16
.= n by A223, MATRIX_1:def_7 ;
( Indices P = [:(Seg n),(Seg n):] & [1,1] in Indices P ) by A219, MATRIX_1:24, MATRIX_1:37;
then A373: (P * Q) * (1,1) = |((Line (P,1)),(Col (Q,1)))| by A202, A223, A302, MATRIX_3:def_4
.= a * |((Line (P,1)),(Base_FinSeq (K,n,1)))| by A224, A203, A301, Th10
.= a * ((Line (P,1)) /. 1) by A224, A219, Th35
.= (a * (Line (P,1))) /. 1 by A225, POLYNOM1:def_1
.= (a * (Line (P,1))) . 1 by A219, A372, FINSEQ_4:15
.= a * (P * (1,1)) by A226, A222, MATRIX12:3
.= 1. K by A2, A3, VECTSP_1:def_10 ;
for i, j being Nat st [i,j] in Indices (P * Q) holds
(P * Q) * (i,j) = (1. (K,n)) * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices (P * Q) implies (P * Q) * (i,j) = (1. (K,n)) * (i,j) )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
assume A374: [i,j] in Indices (P * Q) ; ::_thesis: (P * Q) * (i,j) = (1. (K,n)) * (i,j)
then A375: i in Seg n by A302, ZFMISC_1:87;
then A376: 1 <= i by FINSEQ_1:1;
A377: i <= n by A375, FINSEQ_1:1;
A378: j in Seg n by A302, A374, ZFMISC_1:87;
then A379: 1 <= j by FINSEQ_1:1;
A380: j <= n by A378, FINSEQ_1:1;
percases ( 1 < i or 1 = i ) by A376, XXREAL_0:1;
supposeA381: 1 < i ; ::_thesis: (P * Q) * (i,j) = (1. (K,n)) * (i,j)
now__::_thesis:_(P_*_Q)_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i <> j or i = j ) ;
supposeA382: i <> j ; ::_thesis: (P * Q) * (i,j) = (1. (K,n)) * (i,j)
A383: (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A376, A377, A379, A380, Th27
.= 0. K by A379, A380, A382, Th25 ;
thus (P * Q) * (i,j) = (P * Q) * (i0,j0)
.= (1. (K,n)) * (i,j) by A303, A377, A379, A380, A381, A382, A383 ; ::_thesis: verum
end;
supposeA384: i = j ; ::_thesis: (P * Q) * (i,j) = (1. (K,n)) * (i,j)
A385: (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A376, A377, A379, A380, Th27
.= 1. K by A379, A380, A384, Th24 ;
thus (P * Q) * (i,j) = (P * Q) * (i0,j0)
.= (1. (K,n)) * (i,j) by A258, A380, A381, A384, A385 ; ::_thesis: verum
end;
end;
end;
hence (P * Q) * (i,j) = (1. (K,n)) * (i,j) ; ::_thesis: verum
end;
supposeA386: 1 = i ; ::_thesis: (P * Q) * (i,j) = (1. (K,n)) * (i,j)
now__::_thesis:_(P_*_Q)_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i < j or i >= j ) ;
supposeA387: i < j ; ::_thesis: (P * Q) * (i,j) = (1. (K,n)) * (i,j)
A388: (1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A376, A377, A379, A380, Th27
.= 0. K by A379, A380, A387, Th25 ;
thus (P * Q) * (i,j) = (P * Q) * (i0,j0)
.= (1. (K,n)) * (i,j) by A227, A380, A386, A387, A388 ; ::_thesis: verum
end;
supposeA389: i >= j ; ::_thesis: (P * Q) * (i,j) = (1. (K,n)) * (i,j)
then A390: i = j by A379, A386, XXREAL_0:1;
(1. (K,n)) * (i,j) = (Base_FinSeq (K,n,i0)) . j0 by A376, A377, A379, A380, Th27
.= 1. K by A379, A380, A390, Th24 ;
hence (P * Q) * (i,j) = (1. (K,n)) * (i,j) by A373, A379, A386, A389, XXREAL_0:1; ::_thesis: verum
end;
end;
end;
hence (P * Q) * (i,j) = (1. (K,n)) * (i,j) ; ::_thesis: verum
end;
end;
end;
then A391: P * Q = 1. (K,n) by MATRIX_1:27;
hence P is invertible by A201, Th19; ::_thesis: Q = P ~
thus Q = P ~ by A391, A201, Th18; ::_thesis: verum
end;
theorem Th38: :: MATRIX14:38
for n being Element of NAT
for K being Field
for a being Element of K
for P being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) holds
P is invertible
proof
let n be Element of NAT ; ::_thesis: for K being Field
for a being Element of K
for P being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) holds
P is invertible
let K be Field; ::_thesis: for a being Element of K
for P being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) holds
P is invertible
let a be Element of K; ::_thesis: for P being Matrix of n,K st n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) holds
P is invertible
let P be Matrix of n,K; ::_thesis: ( n > 0 & a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) implies P is invertible )
assume that
A1: n > 0 and
A2: ( a <> 0. K & P * (1,1) = a " & ( for i being Element of NAT st 1 < i & i <= n holds
P . i = Base_FinSeq (K,n,i) ) ) ; ::_thesis: P is invertible
defpred S1[ Nat, Nat, Element of K] means ( ( $1 = 1 implies ( ( $2 = 1 implies $3 = a ) & ( $2 <> 1 implies $3 = - (a * (P * (1,$2))) ) ) ) & ( $1 <> 1 implies for i0 being Element of NAT st i0 = $1 holds
$3 = (Base_FinSeq (K,n,i0)) . $2 ) );
A3: for i, j being Nat st [i,j] in [:(Seg n),(Seg n):] holds
ex x being Element of K st S1[i,j,x]
proof
let i, j be Nat; ::_thesis: ( [i,j] in [:(Seg n),(Seg n):] implies ex x being Element of K st S1[i,j,x] )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
assume [i,j] in [:(Seg n),(Seg n):] ; ::_thesis: ex x being Element of K st S1[i,j,x]
then j0 in Seg n by ZFMISC_1:87;
then A4: ( 1 <= j0 & j0 <= n ) by FINSEQ_1:1;
percases ( i = 1 or i <> 1 ) ;
supposeA5: i = 1 ; ::_thesis: ex x being Element of K st S1[i,j,x]
now__::_thesis:_(_(_j_=_1_&_(_i_=_1_implies_(_(_j_=_1_implies_a_=_a_)_&_(_j_<>_1_implies_a_=_-_(a_*_(P_*_(1,j)))_)_)_)_&_(_i_<>_1_implies_for_i1_being_Element_of_NAT_st_i1_=_i_holds_
a_=_(Base_FinSeq_(K,n,i1))_._j_)_)_or_(_j_<>_1_&_(_i_=_1_implies_(_(_j_=_1_implies_-_(a_*_(P_*_(1,j)))_=_a_)_&_(_j_<>_1_implies_-_(a_*_(P_*_(1,j)))_=_-_(a_*_(P_*_(1,j)))_)_)_)_&_(_i_<>_1_implies_for_i1_being_Element_of_NAT_st_i1_=_i_holds_
-_(a_*_(P_*_(1,j)))_=_(Base_FinSeq_(K,n,i1))_._j_)_)_)
percases ( j = 1 or j <> 1 ) ;
caseA6: j = 1 ; ::_thesis: ( ( i = 1 implies ( ( j = 1 implies a = a ) & ( j <> 1 implies a = - (a * (P * (1,j))) ) ) ) & ( i <> 1 implies for i1 being Element of NAT st i1 = i holds
a = (Base_FinSeq (K,n,i1)) . j ) )
set x1 = a;
thus ( ( i = 1 implies ( ( j = 1 implies a = a ) & ( j <> 1 implies a = - (a * (P * (1,j))) ) ) ) & ( i <> 1 implies for i1 being Element of NAT st i1 = i holds
a = (Base_FinSeq (K,n,i1)) . j ) ) by A5, A6; ::_thesis: verum
end;
caseA7: j <> 1 ; ::_thesis: ( ( i = 1 implies ( ( j = 1 implies - (a * (P * (1,j))) = a ) & ( j <> 1 implies - (a * (P * (1,j))) = - (a * (P * (1,j))) ) ) ) & ( i <> 1 implies for i1 being Element of NAT st i1 = i holds
- (a * (P * (1,j))) = (Base_FinSeq (K,n,i1)) . j ) )
set x1 = - (a * (P * (1,j)));
thus ( ( i = 1 implies ( ( j = 1 implies - (a * (P * (1,j))) = a ) & ( j <> 1 implies - (a * (P * (1,j))) = - (a * (P * (1,j))) ) ) ) & ( i <> 1 implies for i1 being Element of NAT st i1 = i holds
- (a * (P * (1,j))) = (Base_FinSeq (K,n,i1)) . j ) ) by A5, A7; ::_thesis: verum
end;
end;
end;
hence ex x being Element of K st S1[i,j,x] ; ::_thesis: verum
end;
supposeA8: i <> 1 ; ::_thesis: ex x being Element of K st S1[i,j,x]
len (Base_FinSeq (K,n,i0)) = n by Th23;
then (Base_FinSeq (K,n,i0)) /. j0 = (Base_FinSeq (K,n,i0)) . j0 by A4, FINSEQ_4:15;
then reconsider x1 = (Base_FinSeq (K,n,i0)) . j0 as Element of K ;
( i <> 1 implies for i1 being Element of NAT st i1 = i holds
x1 = (Base_FinSeq (K,n,i1)) . j ) ;
hence ex x being Element of K st S1[i,j,x] by A8; ::_thesis: verum
end;
end;
end;
consider Q0 being Matrix of n,n,K such that
A9: for i, j being Nat st [i,j] in Indices Q0 holds
S1[i,j,Q0 * (i,j)] from MATRIX_1:sch_2(A3);
A10: 0 + 1 <= n by A1, NAT_1:13;
A11: for j being Element of NAT st 1 < j & j <= n holds
Q0 * (1,j) = - (a * (P * (1,j)))
proof
let j be Element of NAT ; ::_thesis: ( 1 < j & j <= n implies Q0 * (1,j) = - (a * (P * (1,j))) )
assume that
A12: 1 < j and
A13: j <= n ; ::_thesis: Q0 * (1,j) = - (a * (P * (1,j)))
[1,j] in Indices Q0 by A10, A12, A13, MATRIX_1:37;
hence Q0 * (1,j) = - (a * (P * (1,j))) by A9, A12; ::_thesis: verum
end;
A14: ( Indices Q0 = [:(Seg n),(Seg n):] & 1 in Seg n ) by A10, FINSEQ_1:1, MATRIX_1:24;
A15: for i being Element of NAT st 1 < i & i <= n holds
Q0 . i = Base_FinSeq (K,n,i)
proof
let i be Element of NAT ; ::_thesis: ( 1 < i & i <= n implies Q0 . i = Base_FinSeq (K,n,i) )
assume that
A16: 1 < i and
A17: i <= n ; ::_thesis: Q0 . i = Base_FinSeq (K,n,i)
i in Seg n by A16, A17, FINSEQ_1:1;
then [i,1] in Indices Q0 by A14, ZFMISC_1:87;
then consider p being FinSequence of K such that
A18: p = Q0 . i and
Q0 * (i,1) = p . 1 by MATRIX_1:def_5;
A19: for j being Nat st 1 <= j & j <= n holds
p . j = (Base_FinSeq (K,n,i)) . j
proof
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies p . j = (Base_FinSeq (K,n,i)) . j )
assume ( 1 <= j & j <= n ) ; ::_thesis: p . j = (Base_FinSeq (K,n,i)) . j
then A20: [i,j] in Indices Q0 by A16, A17, MATRIX_1:37;
then ex p2 being FinSequence of K st
( p2 = Q0 . i & Q0 * (i,j) = p2 . j ) by MATRIX_1:def_5;
hence p . j = (Base_FinSeq (K,n,i)) . j by A9, A16, A18, A20; ::_thesis: verum
end;
len Q0 = n by MATRIX_1:def_2;
then i in Seg (len Q0) by A16, A17, FINSEQ_1:1;
then i in dom Q0 by FINSEQ_1:def_3;
then p in rng Q0 by A18, FUNCT_1:def_3;
then A21: len p = n by MATRIX_1:def_2;
len (Base_FinSeq (K,n,i)) = n by Th23;
hence Q0 . i = Base_FinSeq (K,n,i) by A18, A21, A19, FINSEQ_1:14; ::_thesis: verum
end;
[1,1] in Indices Q0 by A10, MATRIX_1:37;
then Q0 * (1,1) = a by A9;
hence P is invertible by A1, A2, A11, A15, Th37; ::_thesis: verum
end;
theorem Th39: :: MATRIX14:39
for n being Element of NAT
for K being Field
for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P being Matrix of n,K st
( P is invertible & (A * P) * (1,1) = 1. K & ( for j being Element of NAT st 1 < j & j <= n holds
(A * P) * (1,j) = 0. K ) & ( for i being Element of NAT st 1 < i & i <= n & A * (i,1) = 0. K holds
(A * P) * (i,1) = 0. K ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P being Matrix of n,K st
( P is invertible & (A * P) * (1,1) = 1. K & ( for j being Element of NAT st 1 < j & j <= n holds
(A * P) * (1,j) = 0. K ) & ( for i being Element of NAT st 1 < i & i <= n & A * (i,1) = 0. K holds
(A * P) * (i,1) = 0. K ) )
let K be Field; ::_thesis: for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P being Matrix of n,K st
( P is invertible & (A * P) * (1,1) = 1. K & ( for j being Element of NAT st 1 < j & j <= n holds
(A * P) * (1,j) = 0. K ) & ( for i being Element of NAT st 1 < i & i <= n & A * (i,1) = 0. K holds
(A * P) * (i,1) = 0. K ) )
let A be Matrix of n,K; ::_thesis: ( n > 0 & A * (1,1) <> 0. K implies ex P being Matrix of n,K st
( P is invertible & (A * P) * (1,1) = 1. K & ( for j being Element of NAT st 1 < j & j <= n holds
(A * P) * (1,j) = 0. K ) & ( for i being Element of NAT st 1 < i & i <= n & A * (i,1) = 0. K holds
(A * P) * (i,1) = 0. K ) ) )
assume that
A1: n > 0 and
A2: A * (1,1) <> 0. K ; ::_thesis: ex P being Matrix of n,K st
( P is invertible & (A * P) * (1,1) = 1. K & ( for j being Element of NAT st 1 < j & j <= n holds
(A * P) * (1,j) = 0. K ) & ( for i being Element of NAT st 1 < i & i <= n & A * (i,1) = 0. K holds
(A * P) * (i,1) = 0. K ) )
A3: 0 + 1 <= n by A1, NAT_1:13;
set a = A * (1,1);
defpred S1[ Nat, Nat, Element of K] means ( ( $1 = 1 implies ( ( $2 = 1 implies $3 = (A * (1,1)) " ) & ( $2 <> 1 implies $3 = - (((A * (1,1)) ") * (A * (1,$2))) ) ) ) & ( $1 <> 1 implies for i0 being Element of NAT st i0 = $1 holds
$3 = (Base_FinSeq (K,n,i0)) . $2 ) );
A4: for i, j being Nat st [i,j] in [:(Seg n),(Seg n):] holds
ex x being Element of K st S1[i,j,x]
proof
let i, j be Nat; ::_thesis: ( [i,j] in [:(Seg n),(Seg n):] implies ex x being Element of K st S1[i,j,x] )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
assume [i,j] in [:(Seg n),(Seg n):] ; ::_thesis: ex x being Element of K st S1[i,j,x]
then j0 in Seg n by ZFMISC_1:87;
then A5: ( 1 <= j0 & j0 <= n ) by FINSEQ_1:1;
percases ( i = 1 or i <> 1 ) ;
supposeA6: i = 1 ; ::_thesis: ex x being Element of K st S1[i,j,x]
percases ( j = 1 or j <> 1 ) ;
suppose j = 1 ; ::_thesis: ex x being Element of K st S1[i,j,x]
hence ex x being Element of K st S1[i,j,x] by A6; ::_thesis: verum
end;
suppose j <> 1 ; ::_thesis: ex x being Element of K st S1[i,j,x]
hence ex x being Element of K st S1[i,j,x] by A6; ::_thesis: verum
end;
end;
end;
supposeA7: i <> 1 ; ::_thesis: ex x being Element of K st S1[i,j,x]
set x1 = (Base_FinSeq (K,n,i0)) /. j0;
len (Base_FinSeq (K,n,i0)) = n by Th23;
then for i1 being Element of NAT st i1 = i holds
(Base_FinSeq (K,n,i0)) /. j0 = (Base_FinSeq (K,n,i1)) . j by A5, FINSEQ_4:15;
hence ex x being Element of K st S1[i,j,x] by A7; ::_thesis: verum
end;
end;
end;
consider P0 being Matrix of n,n,K such that
A8: for i, j being Nat st [i,j] in Indices P0 holds
S1[i,j,P0 * (i,j)] from MATRIX_1:sch_2(A4);
A9: 0 + 1 <= n by A1, NAT_1:13;
A10: for i being Element of NAT st 1 < i & i <= n holds
P0 . i = Base_FinSeq (K,n,i)
proof
let i be Element of NAT ; ::_thesis: ( 1 < i & i <= n implies P0 . i = Base_FinSeq (K,n,i) )
assume that
A11: 1 < i and
A12: i <= n ; ::_thesis: P0 . i = Base_FinSeq (K,n,i)
[i,1] in Indices P0 by A9, A11, A12, MATRIX_1:37;
then consider p being FinSequence of K such that
A13: p = P0 . i and
P0 * (i,1) = p . 1 by MATRIX_1:def_5;
A14: for j being Nat st 1 <= j & j <= n holds
p . j = (Base_FinSeq (K,n,i)) . j
proof
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies p . j = (Base_FinSeq (K,n,i)) . j )
assume ( 1 <= j & j <= n ) ; ::_thesis: p . j = (Base_FinSeq (K,n,i)) . j
then A15: [i,j] in Indices P0 by A11, A12, MATRIX_1:37;
then ex p2 being FinSequence of K st
( p2 = P0 . i & P0 * (i,j) = p2 . j ) by MATRIX_1:def_5;
hence p . j = (Base_FinSeq (K,n,i)) . j by A8, A11, A13, A15; ::_thesis: verum
end;
len P0 = n by MATRIX_1:def_2;
then i in Seg (len P0) by A11, A12, FINSEQ_1:1;
then i in dom P0 by FINSEQ_1:def_3;
then p in rng P0 by A13, FUNCT_1:def_3;
then A16: len p = n by MATRIX_1:def_2;
len (Base_FinSeq (K,n,i)) = n by Th23;
hence P0 . i = Base_FinSeq (K,n,i) by A13, A16, A14, FINSEQ_1:14; ::_thesis: verum
end;
A17: len (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A18: Indices P0 = [:(Seg n),(Seg n):] by MATRIX_1:24;
A19: len (Base_FinSeq (K,n,1)) = n by Th23;
A20: [1,1] in Indices P0 by A9, MATRIX_1:37;
then A21: P0 * (1,1) = (A * (1,1)) " by A8;
then A22: P0 is invertible by A1, A2, A10, Th38;
A23: len P0 = n by MATRIX_1:24;
then A24: 1 in Seg (len P0) by A9, FINSEQ_1:1;
A25: for k being Nat st 1 <= k & k <= n holds
(Col (P0,1)) . k = (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies (Col (P0,1)) . k = (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k )
assume that
A26: 1 <= k and
A27: k <= n ; ::_thesis: (Col (P0,1)) . k = (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k
A28: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A19, A26, A27, FINSEQ_4:15;
k in Seg n by A26, A27, FINSEQ_1:1;
then A29: k in dom (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) by A17, FINSEQ_1:def_3;
A30: now__::_thesis:_(_k_<>_1_implies_(((A_*_(1,1))_")_*_(Base_FinSeq_(K,n,1)))_._k_=_0._K_)
assume A31: k <> 1 ; ::_thesis: (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k = 0. K
thus (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k = ((A * (1,1)) ") * ((Base_FinSeq (K,n,1)) /. k) by A29, A28, FVSUM_1:50
.= ((A * (1,1)) ") * (0. K) by A26, A27, A28, A31, Th25
.= 0. K by VECTSP_1:6 ; ::_thesis: verum
end;
k in Seg n by A26, A27, FINSEQ_1:1;
then A32: k in dom P0 by A23, FINSEQ_1:def_3;
A33: now__::_thesis:_(_k_<>_1_implies_(Col_(P0,1))_._k_=_0._K_)
k in Seg n by A26, A27, FINSEQ_1:1;
then [k,1] in Indices P0 by A23, A24, A18, ZFMISC_1:87;
then A34: ex p being FinSequence of K st
( p = P0 . k & P0 * (k,1) = p . 1 ) by MATRIX_1:def_5;
assume A35: k <> 1 ; ::_thesis: (Col (P0,1)) . k = 0. K
then ( k in NAT & 1 < k ) by A26, ORDINAL1:def_12, XXREAL_0:1;
then P0 * (k,1) = (Base_FinSeq (K,n,k)) . 1 by A10, A27, A34
.= 0. K by A9, A35, Th25 ;
hence (Col (P0,1)) . k = 0. K by A32, MATRIX_1:def_8; ::_thesis: verum
end;
A36: now__::_thesis:_(_k_=_1_implies_(((A_*_(1,1))_")_*_(Base_FinSeq_(K,n,1)))_._k_=_(A_*_(1,1))_"_)
assume A37: k = 1 ; ::_thesis: (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k = (A * (1,1)) "
hence (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k = ((A * (1,1)) ") * ((Base_FinSeq (K,n,1)) /. 1) by A29, A28, FVSUM_1:50
.= ((A * (1,1)) ") * (1. K) by A27, A28, A37, Th24
.= (A * (1,1)) " by VECTSP_1:def_6 ;
::_thesis: verum
end;
1 <= n by A26, A27, XXREAL_0:2;
then 1 in dom P0 by A23, FINSEQ_3:25;
hence (Col (P0,1)) . k = (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k by A21, A30, A36, A33, MATRIX_1:def_8; ::_thesis: verum
end;
A38: len A = n by MATRIX_1:24;
then A39: 1 in Seg (len A) by A3, FINSEQ_1:1;
then A40: 1 in dom A by FINSEQ_1:def_3;
A41: width A = n by MATRIX_1:24;
then A42: len (Line (A,1)) = n by MATRIX_1:def_7;
then A43: 1 in dom (Line (A,1)) by A38, A39, FINSEQ_1:def_3;
A44: 1 in Seg (width A) by A41, A3, FINSEQ_1:1;
A45: for i being Element of NAT st 1 < i & i <= n & A * (i,1) = 0. K holds
(A * P0) * (i,1) = 0. K
proof
set Q = A;
set P = P0;
let i be Element of NAT ; ::_thesis: ( 1 < i & i <= n & A * (i,1) = 0. K implies (A * P0) * (i,1) = 0. K )
assume that
A46: ( 1 < i & i <= n ) and
A47: A * (i,1) = 0. K ; ::_thesis: (A * P0) * (i,1) = 0. K
A48: 1 <= n by A46, XXREAL_0:2;
reconsider p = Col (P0,1), q = ((A * (1,1)) ") * (Base_FinSeq (K,n,1)) as FinSequence of K ;
A49: len (Col (P0,1)) = len P0 by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
A50: len (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A51: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A52: 1 <= k and
A53: k <= n ; ::_thesis: p . k = q . k
A54: len (Base_FinSeq (K,n,1)) = n by Th23;
then A55: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A52, A53, FINSEQ_4:15;
k in dom P0 by A23, A52, A53, FINSEQ_3:25;
then A56: p . k = P0 * (k,1) by MATRIX_1:def_8;
k in dom (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) by A50, A52, A53, FINSEQ_3:25;
then A57: (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) . k = ((A * (1,1)) ") * ((Base_FinSeq (K,n,1)) /. k) by A55, FVSUM_1:50;
percases ( 1 = k or 1 < k ) by A52, XXREAL_0:1;
supposeA58: 1 = k ; ::_thesis: p . k = q . k
then q . k = ((A * (1,1)) ") * (1. K) by A53, A55, A57, Th24
.= (A * (1,1)) " by VECTSP_1:def_6 ;
hence p . k = q . k by A8, A20, A56, A58; ::_thesis: verum
end;
supposeA59: 1 < k ; ::_thesis: p . k = q . k
(Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A52, A53, A54, FINSEQ_4:15;
then A60: ((A * (1,1)) ") * ((Base_FinSeq (K,n,1)) /. k) = ((A * (1,1)) ") * (0. K) by A53, A59, Th25
.= 0. K by VECTSP_1:6 ;
[k,1] in Indices P0 by A48, A52, A53, MATRIX_1:37;
then A61: ex p2 being FinSequence of K st
( p2 = P0 . k & P0 * (k,1) = p2 . 1 ) by MATRIX_1:def_5;
k in NAT by ORDINAL1:def_12;
then p . k = (Base_FinSeq (K,n,k)) . 1 by A10, A53, A56, A59, A61;
hence p . k = q . k by A48, A57, A59, A60, Th25; ::_thesis: verum
end;
end;
end;
A62: width A = n by MATRIX_1:24;
then A63: len (Line (A,i)) = n by MATRIX_1:def_7;
then A64: (Line (A,i)) /. 1 = (Line (A,i)) . 1 by A3, FINSEQ_4:15
.= A * (i,1) by A44, MATRIX_1:def_7 ;
[i,1] in Indices (A * P0) by A46, A48, MATRIX_1:37;
hence (A * P0) * (i,1) = |((Line (A,i)),(Col (P0,1)))| by A23, A62, MATRIX_3:def_4
.= |((Line (A,i)),(((A * (1,1)) ") * (Base_FinSeq (K,n,1))))| by A49, A50, A51, FINSEQ_1:14
.= ((A * (1,1)) ") * |((Line (A,i)),(Base_FinSeq (K,n,1)))| by A19, A63, Th10
.= ((A * (1,1)) ") * (A * (i,1)) by A3, A63, A64, Th35
.= 0. K by A47, VECTSP_1:6 ;
::_thesis: verum
end;
A65: for j being Element of NAT st 1 < j & j <= n holds
(A * P0) * (1,j) = 0. K
proof
let j be Element of NAT ; ::_thesis: ( 1 < j & j <= n implies (A * P0) * (1,j) = 0. K )
assume that
A66: 1 < j and
A67: j <= n ; ::_thesis: (A * P0) * (1,j) = 0. K
A68: len (Base_FinSeq (K,n,j)) = n by Th23;
reconsider p = Col (P0,j), q = (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) as FinSequence of K ;
A69: len ((- (((A * (1,1)) ") * (A * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A70: len (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) = len ((- (((A * (1,1)) ") * (A * (1,j)))) * (Base_FinSeq (K,n,1))) by Th6
.= len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
A71: [1,j] in Indices P0 by A9, A66, A67, MATRIX_1:37;
A72: for k being Nat st 1 <= k & k <= n holds
p . k = q . k
proof
A73: len ((- (((A * (1,1)) ") * (A * (1,j)))) * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
let k be Nat; ::_thesis: ( 1 <= k & k <= n implies p . k = q . k )
assume that
A74: 1 <= k and
A75: k <= n ; ::_thesis: p . k = q . k
k in Seg n by A74, A75, FINSEQ_1:1;
then A76: k in dom ((- (((A * (1,1)) ") * (A * (1,j)))) * (Base_FinSeq (K,n,1))) by A69, FINSEQ_1:def_3;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A77: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A74, A75, FINSEQ_4:15;
A78: (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) . k = ((- (((A * (1,1)) ") * (A * (1,j)))) * (Base_FinSeq (K,n,1))) . k by Th6
.= (- (((A * (1,1)) ") * (A * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A76, A77, FVSUM_1:50 ;
len (Base_FinSeq (K,n,1)) = n by Th23;
then A79: (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A74, A75, FINSEQ_4:15;
k in dom P0 by A23, A74, A75, FINSEQ_3:25;
then A80: p . k = P0 * (k,j) by MATRIX_1:def_8;
percases ( 1 = k or 1 < k ) by A74, XXREAL_0:1;
supposeA81: 1 = k ; ::_thesis: p . k = q . k
k <= len (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) by A75, A73, Th6;
then A82: (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- (((A * (1,1)) ") * (A * (1,j)))) * ((Base_FinSeq (K,n,1)) /. k) by A74, A78, FINSEQ_4:15
.= (- (((A * (1,1)) ") * (A * (1,j)))) * (1. K) by A75, A79, A81, Th24
.= - (((A * (1,1)) ") * (A * (1,j))) by VECTSP_1:def_6 ;
A83: p . k = - (((A * (1,1)) ") * (A * (1,j))) by A8, A66, A71, A80, A81;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A68, A74, A75, FINSEQ_4:15
.= 0. K by A66, A75, A81, Th25 ;
then q . k = (- (((A * (1,1)) ") * (A * (1,j)))) + (0. K) by A70, A68, A74, A75, A82, Th5;
hence p . k = q . k by A83, RLVECT_1:4; ::_thesis: verum
end;
supposeA84: 1 < k ; ::_thesis: p . k = q . k
( [k,j] in Indices P0 & k in NAT ) by A66, A67, A74, A75, MATRIX_1:37, ORDINAL1:def_12;
then A85: p . k = (Base_FinSeq (K,n,k)) . j by A8, A80, A84;
percases ( k <> j or k = j ) ;
supposeA86: k <> j ; ::_thesis: p . k = q . k
len (Base_FinSeq (K,n,1)) = n by Th23;
then (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A74, A75, FINSEQ_4:15;
then A87: (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- (((A * (1,1)) ") * (A * (1,j)))) * (0. K) by A75, A78, A84, Th25
.= 0. K by VECTSP_1:6 ;
A88: (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A70, A74, A75, FINSEQ_4:15;
A89: p . k = 0. K by A66, A67, A85, A86, Th25;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A68, A74, A75, FINSEQ_4:15
.= 0. K by A74, A75, A86, Th25 ;
then q . k = (0. K) + (0. K) by A70, A68, A74, A75, A88, A87, Th5;
hence p . k = q . k by A89, RLVECT_1:4; ::_thesis: verum
end;
supposeA90: k = j ; ::_thesis: p . k = q . k
len (Base_FinSeq (K,n,1)) = n by Th23;
then (Base_FinSeq (K,n,1)) /. k = (Base_FinSeq (K,n,1)) . k by A74, A75, FINSEQ_4:15;
then A91: (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) . k = (- (((A * (1,1)) ") * (A * (1,j)))) * (0. K) by A75, A78, A84, Th25
.= 0. K by VECTSP_1:6 ;
A92: (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) /. k = (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) . k by A70, A74, A75, FINSEQ_4:15;
A93: p . k = 1. K by A74, A75, A85, A90, Th24;
(Base_FinSeq (K,n,j)) /. k = (Base_FinSeq (K,n,j)) . k by A68, A74, A75, FINSEQ_4:15
.= 1. K by A74, A75, A90, Th24 ;
then q . k = (0. K) + (1. K) by A70, A68, A74, A75, A92, A91, Th5;
hence p . k = q . k by A93, RLVECT_1:4; ::_thesis: verum
end;
end;
end;
end;
end;
A94: width A = n by MATRIX_1:24;
then A95: len (Line (A,1)) = n by MATRIX_1:def_7;
then A96: (Line (A,1)) /. 1 = (Line (A,1)) . 1 by A3, FINSEQ_4:15
.= A * (1,1) by A44, MATRIX_1:def_7 ;
A97: j in Seg n by A66, A67, FINSEQ_1:1;
A98: len (Col (P0,j)) = len P0 by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
len ((- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j))) = n by A70, A68, Th2;
then A99: Col (P0,j) = (- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))) + (Base_FinSeq (K,n,j)) by A98, A72, FINSEQ_1:14;
A100: (Line (A,1)) /. j = (Line (A,1)) . j by A66, A67, A95, FINSEQ_4:15
.= A * (1,j) by A97, A94, MATRIX_1:def_7 ;
[1,j] in Indices (A * P0) by A9, A66, A67, MATRIX_1:37;
then (A * P0) * (1,j) = |((Line (A,1)),(Col (P0,j)))| by A23, A94, MATRIX_3:def_4
.= |((Line (A,1)),(- ((((A * (1,1)) ") * (A * (1,j))) * (Base_FinSeq (K,n,1)))))| + |((Line (A,1)),(Base_FinSeq (K,n,j)))| by A42, A70, A68, A99, Th11
.= |((Line (A,1)),((- (((A * (1,1)) ") * (A * (1,j)))) * (Base_FinSeq (K,n,1))))| + |((Line (A,1)),(Base_FinSeq (K,n,j)))| by Th6
.= ((- (((A * (1,1)) ") * (A * (1,j)))) * |((Line (A,1)),(Base_FinSeq (K,n,1)))|) + |((Line (A,1)),(Base_FinSeq (K,n,j)))| by A42, A19, Th10
.= ((- (((A * (1,1)) ") * (A * (1,j)))) * (A * (1,1))) + |((Line (A,1)),(Base_FinSeq (K,n,j)))| by A42, A3, A96, Th35
.= (- ((((A * (1,1)) ") * (A * (1,j))) * (A * (1,1)))) + |((Line (A,1)),(Base_FinSeq (K,n,j)))| by VECTSP_1:9
.= (- ((A * (1,j)) * (((A * (1,1)) ") * (A * (1,1))))) + |((Line (A,1)),(Base_FinSeq (K,n,j)))| by GROUP_1:def_3
.= (- ((A * (1,j)) * (1. K))) + |((Line (A,1)),(Base_FinSeq (K,n,j)))| by A2, VECTSP_1:def_10
.= (- ((A * (1,j)) * (1. K))) + ((Line (A,1)) /. j) by A42, A66, A67, Th35
.= (- (A * (1,j))) + (A * (1,j)) by A100, VECTSP_1:def_6
.= 0. K by RLVECT_1:5 ;
hence (A * P0) * (1,j) = 0. K ; ::_thesis: verum
end;
A101: ( Indices A = [:(Seg n),(Seg n):] & Indices (A * P0) = [:(Seg n),(Seg n):] ) by MATRIX_1:24;
A102: len (Col (P0,1)) = len P0 by MATRIX_1:def_8
.= n by MATRIX_1:24 ;
len (((A * (1,1)) ") * (Base_FinSeq (K,n,1))) = len (Base_FinSeq (K,n,1)) by MATRIXR1:16
.= n by Th23 ;
then A103: Col (P0,1) = ((A * (1,1)) ") * (Base_FinSeq (K,n,1)) by A102, A25, FINSEQ_1:14;
A104: len (((A * (1,1)) ") * (Line (A,1))) = len (Line (A,1)) by MATRIXR1:16
.= n by A41, MATRIX_1:def_7 ;
[1,1] in Indices A by A3, MATRIX_1:37;
then (A * P0) * (1,1) = |((Line (A,1)),(Col (P0,1)))| by A23, A41, A101, MATRIX_3:def_4
.= ((A * (1,1)) ") * |((Line (A,1)),(Base_FinSeq (K,n,1)))| by A42, A19, A103, Th10
.= ((A * (1,1)) ") * ((Line (A,1)) /. 1) by A42, A3, Th35
.= (((A * (1,1)) ") * (Line (A,1))) /. 1 by A43, POLYNOM1:def_1
.= (((A * (1,1)) ") * (Line (A,1))) . 1 by A3, A104, FINSEQ_4:15
.= ((A * (1,1)) ") * (A * (1,1)) by A44, A40, MATRIX12:3
.= 1. K by A2, VECTSP_1:def_10 ;
hence ex P being Matrix of n,K st
( P is invertible & (A * P) * (1,1) = 1. K & ( for j being Element of NAT st 1 < j & j <= n holds
(A * P) * (1,j) = 0. K ) & ( for i being Element of NAT st 1 < i & i <= n & A * (i,1) = 0. K holds
(A * P) * (i,1) = 0. K ) ) by A22, A65, A45; ::_thesis: verum
end;
theorem Th40: :: MATRIX14:40
for n being Element of NAT
for K being Field
for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P being Matrix of n,K st
( P is invertible & (P * A) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
(P * A) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
(P * A) * (1,j) = 0. K ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P being Matrix of n,K st
( P is invertible & (P * A) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
(P * A) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
(P * A) * (1,j) = 0. K ) )
let K be Field; ::_thesis: for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P being Matrix of n,K st
( P is invertible & (P * A) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
(P * A) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
(P * A) * (1,j) = 0. K ) )
let A be Matrix of n,K; ::_thesis: ( n > 0 & A * (1,1) <> 0. K implies ex P being Matrix of n,K st
( P is invertible & (P * A) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
(P * A) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
(P * A) * (1,j) = 0. K ) ) )
assume that
A1: n > 0 and
A2: A * (1,1) <> 0. K ; ::_thesis: ex P being Matrix of n,K st
( P is invertible & (P * A) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
(P * A) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
(P * A) * (1,j) = 0. K ) )
set B = A @ ;
A3: 0 + 1 <= n by A1, NAT_1:13;
then [1,1] in Indices A by MATRIX_1:37;
then (A @) * (1,1) = A * (1,1) by MATRIX_1:def_6;
then consider P0 being Matrix of n,K such that
A4: P0 is invertible and
A5: ((A @) * P0) * (1,1) = 1. K and
A6: for i being Element of NAT st 1 < i & i <= n holds
((A @) * P0) * (1,i) = 0. K and
A7: for j being Element of NAT st 1 < j & j <= n & (A @) * (j,1) = 0. K holds
((A @) * P0) * (j,1) = 0. K by A1, A2, Th39;
A8: [1,1] in Indices ((A @) * P0) by A3, MATRIX_1:37;
A9: for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
((P0 @) * A) * (1,j) = 0. K
proof
let j be Element of NAT ; ::_thesis: ( 1 < j & j <= n & A * (1,j) = 0. K implies ((P0 @) * A) * (1,j) = 0. K )
assume that
A10: ( 1 < j & j <= n ) and
A11: A * (1,j) = 0. K ; ::_thesis: ((P0 @) * A) * (1,j) = 0. K
[1,j] in Indices A by A3, A10, MATRIX_1:37;
then (A @) * (j,1) = A * (1,j) by MATRIX_1:def_6;
then A12: ((A @) * P0) * (j,1) = 0. K by A7, A10, A11;
[j,1] in Indices ((A @) * P0) by A3, A10, MATRIX_1:37;
then (((A @) * P0) @) * (1,j) = 0. K by A12, MATRIX_1:def_6;
then ((P0 @) * ((A @) @)) * (1,j) = 0. K by Th30;
hence ((P0 @) * A) * (1,j) = 0. K by MATRIXR2:29; ::_thesis: verum
end;
A13: for i being Element of NAT st 1 < i & i <= n holds
((P0 @) * A) * (i,1) = 0. K
proof
let i be Element of NAT ; ::_thesis: ( 1 < i & i <= n implies ((P0 @) * A) * (i,1) = 0. K )
assume ( 1 < i & i <= n ) ; ::_thesis: ((P0 @) * A) * (i,1) = 0. K
then A14: ( [1,i] in Indices ((A @) * P0) & ((A @) * P0) * (1,i) = 0. K ) by A3, A6, MATRIX_1:37;
((A @) * P0) @ = (P0 @) * ((A @) @) by Th30
.= (P0 @) * A by MATRIXR2:29 ;
hence ((P0 @) * A) * (i,1) = 0. K by A14, MATRIX_1:def_6; ::_thesis: verum
end;
A15: P0 @ is invertible by A4, Th31;
((P0 @) * A) * (1,1) = ((P0 @) * ((A @) @)) * (1,1) by MATRIXR2:29
.= (((A @) * P0) @) * (1,1) by Th30
.= 1. K by A5, A8, MATRIX_1:def_6 ;
hence ex P being Matrix of n,K st
( P is invertible & (P * A) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
(P * A) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
(P * A) * (1,j) = 0. K ) ) by A13, A15, A9; ::_thesis: verum
end;
theorem Th41: :: MATRIX14:41
for n being Element of NAT
for K being Field
for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P, Q being Matrix of n,K st
( P is invertible & Q is invertible & ((P * A) * Q) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((P * A) * Q) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((P * A) * Q) * (1,j) = 0. K ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P, Q being Matrix of n,K st
( P is invertible & Q is invertible & ((P * A) * Q) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((P * A) * Q) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((P * A) * Q) * (1,j) = 0. K ) )
let K be Field; ::_thesis: for A being Matrix of n,K st n > 0 & A * (1,1) <> 0. K holds
ex P, Q being Matrix of n,K st
( P is invertible & Q is invertible & ((P * A) * Q) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((P * A) * Q) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((P * A) * Q) * (1,j) = 0. K ) )
let A be Matrix of n,K; ::_thesis: ( n > 0 & A * (1,1) <> 0. K implies ex P, Q being Matrix of n,K st
( P is invertible & Q is invertible & ((P * A) * Q) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((P * A) * Q) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((P * A) * Q) * (1,j) = 0. K ) ) )
assume that
A1: n > 0 and
A2: A * (1,1) <> 0. K ; ::_thesis: ex P, Q being Matrix of n,K st
( P is invertible & Q is invertible & ((P * A) * Q) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((P * A) * Q) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((P * A) * Q) * (1,j) = 0. K ) )
consider P being Matrix of n,K such that
A3: P is invertible and
A4: (P * A) * (1,1) = 1. K and
A5: for i being Element of NAT st 1 < i & i <= n holds
(P * A) * (i,1) = 0. K and
for j being Element of NAT st 1 < j & j <= n & A * (1,j) = 0. K holds
(P * A) * (1,j) = 0. K by A1, A2, Th40;
consider Q being Matrix of n,K such that
A6: ( Q is invertible & ((P * A) * Q) * (1,1) = 1. K & ( for j being Element of NAT st 1 < j & j <= n holds
((P * A) * Q) * (1,j) = 0. K ) ) and
A7: for i being Element of NAT st 1 < i & i <= n & (P * A) * (i,1) = 0. K holds
((P * A) * Q) * (i,1) = 0. K by A1, A4, Th39;
for i being Element of NAT st 1 < i & i <= n holds
((P * A) * Q) * (i,1) = 0. K
proof
let i be Element of NAT ; ::_thesis: ( 1 < i & i <= n implies ((P * A) * Q) * (i,1) = 0. K )
assume A8: ( 1 < i & i <= n ) ; ::_thesis: ((P * A) * Q) * (i,1) = 0. K
then (P * A) * (i,1) = 0. K by A5;
hence ((P * A) * Q) * (i,1) = 0. K by A7, A8; ::_thesis: verum
end;
hence ex P, Q being Matrix of n,K st
( P is invertible & Q is invertible & ((P * A) * Q) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((P * A) * Q) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((P * A) * Q) * (1,j) = 0. K ) ) by A3, A6; ::_thesis: verum
end;
begin
theorem Th42: :: MATRIX14:42
for D being non empty set
for m, n, i, j being Element of NAT
for A being Matrix of m,n,D holds Swap (A,i,j) is Matrix of m,n,D
proof
let D be non empty set ; ::_thesis: for m, n, i, j being Element of NAT
for A being Matrix of m,n,D holds Swap (A,i,j) is Matrix of m,n,D
let m, n, i, j be Element of NAT ; ::_thesis: for A being Matrix of m,n,D holds Swap (A,i,j) is Matrix of m,n,D
let A be Matrix of m,n,D; ::_thesis: Swap (A,i,j) is Matrix of m,n,D
A1: for p being FinSequence of D st p in rng (Swap (A,i,j)) holds
len p = n
proof
let p be FinSequence of D; ::_thesis: ( p in rng (Swap (A,i,j)) implies len p = n )
A2: rng (Swap (A,i,j)) = rng A by FINSEQ_7:22;
assume p in rng (Swap (A,i,j)) ; ::_thesis: len p = n
hence len p = n by A2, MATRIX_1:def_2; ::_thesis: verum
end;
rng (Swap (A,i,j)) = rng A by FINSEQ_7:22;
then ex n3 being Nat st
for x being set st x in rng (Swap (A,i,j)) holds
ex p being FinSequence of D st
( x = p & len p = n3 ) by MATRIX_1:9;
then A3: Swap (A,i,j) is Matrix of D by MATRIX_1:9;
( len A = m & len (Swap (A,i,j)) = len A ) by FINSEQ_7:18, MATRIX_1:def_2;
hence Swap (A,i,j) is Matrix of m,n,D by A3, A1, MATRIX_1:def_2; ::_thesis: verum
end;
definition
let K be Field;
let n be Element of NAT ;
let i0 be Nat;
func SwapDiagonal (K,n,i0) -> Matrix of n,K equals :: MATRIX14:def 3
Swap ((1. (K,n)),1,i0);
correctness
coherence
Swap ((1. (K,n)),1,i0) is Matrix of n,K;
proof
i0 in NAT by ORDINAL1:def_12;
hence Swap ((1. (K,n)),1,i0) is Matrix of n,K by Th42; ::_thesis: verum
end;
end;
:: deftheorem defines SwapDiagonal MATRIX14:def_3_:_
for K being Field
for n being Element of NAT
for i0 being Nat holds SwapDiagonal (K,n,i0) = Swap ((1. (K,n)),1,i0);
theorem Th43: :: MATRIX14:43
for K being Field
for n being Element of NAT
for i0 being Nat
for A being Matrix of n,K st 1 <= i0 & i0 <= n & A = SwapDiagonal (K,n,i0) holds
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
proof
let K be Field; ::_thesis: for n being Element of NAT
for i0 being Nat
for A being Matrix of n,K st 1 <= i0 & i0 <= n & A = SwapDiagonal (K,n,i0) holds
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
let n be Element of NAT ; ::_thesis: for i0 being Nat
for A being Matrix of n,K st 1 <= i0 & i0 <= n & A = SwapDiagonal (K,n,i0) holds
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
let i0 be Nat; ::_thesis: for A being Matrix of n,K st 1 <= i0 & i0 <= n & A = SwapDiagonal (K,n,i0) holds
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
let A be Matrix of n,K; ::_thesis: ( 1 <= i0 & i0 <= n & A = SwapDiagonal (K,n,i0) implies for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) )
assume A1: ( 1 <= i0 & i0 <= n ) ; ::_thesis: ( not A = SwapDiagonal (K,n,i0) or for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) )
assume A2: A = SwapDiagonal (K,n,i0) ; ::_thesis: for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
let i, j be Nat; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n & i0 <> 1 implies ( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) )
assume that
A3: 1 <= i and
A4: i <= n and
A5: 1 <= j and
A6: j <= n ; ::_thesis: ( not i0 <> 1 or ( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) )
A7: [i,j] in Indices A by A3, A4, A5, A6, MATRIX_1:37;
assume A8: i0 <> 1 ; ::_thesis: ( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
thus ( i = 1 & j = i0 implies A * (i,j) = 1. K ) ::_thesis: ( ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
proof
reconsider j0 = i0 -' 2 as Element of NAT ;
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
assume that
A9: i = 1 and
A10: j = i0 ; ::_thesis: A * (i,j) = 1. K
reconsider qq = f /. i0 as FinSequence of the carrier of K by FINSEQ_1:def_11;
i0 <= len f by A6, A10, MATRIX_1:def_2;
then f /. i0 = f . i0 by A5, A10, FINSEQ_4:15
.= Base_FinSeq (K,n,i0) by A5, A6, A10, Th26 ;
then A11: qq . j = 1. K by A5, A6, A10, Th24;
reconsider g = f /^ 1 as FinSequence of the carrier of K * ;
A12: len f = n by MATRIX_1:def_2;
reconsider h = g | j0 as FinSequence of the carrier of K * ;
len (<*(f /. i0)*> ^ h) = (len <*(f /. i0)*>) + (len h) by FINSEQ_1:22
.= 1 + (len h) by FINSEQ_1:39 ;
then A13: 1 <= len (<*(f /. i0)*> ^ h) by NAT_1:11;
A14: 1 = len <*(f /. i0)*> by FINSEQ_1:39;
1 < i0 by A5, A8, A10, XXREAL_0:1;
then A . i = (((<*(f /. i0)*> ^ h) ^ <*(f /. 1)*>) ^ (f /^ i0)) . i by A2, A6, A10, A12, FINSEQ_7:28
.= ((<*(f /. i0)*> ^ h) ^ (<*(f /. 1)*> ^ (f /^ i0))) . i by FINSEQ_1:32
.= (<*(f /. i0)*> ^ h) . 1 by A9, A13, FINSEQ_1:64
.= <*(f /. i0)*> . 1 by A14, FINSEQ_1:64
.= f /. i0 by FINSEQ_1:def_8 ;
hence A * (i,j) = 1. K by A7, A11, MATRIX_1:def_5; ::_thesis: verum
end;
A15: len A = n by MATRIX_1:24;
A16: 1 <= n by A3, A4, XXREAL_0:2;
thus ( i = i0 & j = 1 implies A * (i,j) = 1. K ) ::_thesis: ( ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
proof
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
assume that
A17: i = i0 and
A18: j = 1 ; ::_thesis: A * (i,j) = 1. K
reconsider qq = f /. 1 as FinSequence of the carrier of K by FINSEQ_1:def_11;
A19: len f = n by MATRIX_1:def_2;
then f /. 1 = f . 1 by A16, FINSEQ_4:15
.= Base_FinSeq (K,n,1) by A16, Th26 ;
then A20: qq . j = 1. K by A6, A18, Th24;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. 1 by A2, A3, A4, A6, A17, A18, A19, FINSEQ_7:31 ;
hence A * (i,j) = 1. K by A7, A20, MATRIX_1:def_5; ::_thesis: verum
end;
thus ( i = 1 & j = 1 implies A * (i,j) = 0. K ) ::_thesis: ( ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) )
proof
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
assume that
A21: i = 1 and
A22: j = 1 ; ::_thesis: A * (i,j) = 0. K
reconsider qq = f /. i0 as FinSequence of the carrier of K by FINSEQ_1:def_11;
A23: len f = n by MATRIX_1:def_2;
then f /. i0 = f . i0 by A1, FINSEQ_4:15
.= Base_FinSeq (K,n,i0) by A1, Th26 ;
then A24: qq . j = 0. K by A4, A8, A21, A22, Th25;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. i0 by A1, A2, A4, A21, A23, FINSEQ_7:31 ;
hence A * (i,j) = 0. K by A7, A24, MATRIX_1:def_5; ::_thesis: verum
end;
thus ( i = i0 & j = i0 implies A * (i,j) = 0. K ) ::_thesis: ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) )
proof
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
assume that
A25: i = i0 and
A26: j = i0 ; ::_thesis: A * (i,j) = 0. K
reconsider qq = f /. 1 as FinSequence of the carrier of K by FINSEQ_1:def_11;
A27: len f = n by MATRIX_1:def_2;
then f /. 1 = f . 1 by A16, FINSEQ_4:15
.= Base_FinSeq (K,n,1) by A16, Th26 ;
then A28: qq . j = 0. K by A1, A8, A26, Th25;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. 1 by A2, A3, A4, A16, A25, A27, FINSEQ_7:31 ;
hence A * (i,j) = 0. K by A7, A28, MATRIX_1:def_5; ::_thesis: verum
end;
assume A29: ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) ; ::_thesis: ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) )
percases ( ( i <> 1 & i <> i0 ) or ( j <> 1 & j <> i0 ) ) by A29;
supposeA30: ( i <> 1 & i <> i0 ) ; ::_thesis: ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) )
thus ( i = j implies A * (i,j) = 1. K ) ::_thesis: ( i <> j implies A * (i,j) = 0. K )
proof
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
assume A31: i = j ; ::_thesis: A * (i,j) = 1. K
reconsider qq = f /. i as FinSequence of the carrier of K by FINSEQ_1:def_11;
j <= len f by A6, MATRIX_1:def_2;
then f /. i = f . i by A5, A31, FINSEQ_4:15
.= Base_FinSeq (K,n,i) by A3, A4, Th26 ;
then A32: qq . j = 1. K by A3, A4, A31, Th24;
A33: len f = n by MATRIX_1:def_2;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. i by A2, A3, A4, A30, A33, FINSEQ_7:30 ;
hence A * (i,j) = 1. K by A7, A32, MATRIX_1:def_5; ::_thesis: verum
end;
thus ( i <> j implies A * (i,j) = 0. K ) ::_thesis: verum
proof
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
assume A34: i <> j ; ::_thesis: A * (i,j) = 0. K
reconsider qq = f /. i as FinSequence of the carrier of K by FINSEQ_1:def_11;
A35: len f = n by MATRIX_1:def_2;
then f /. i = f . i by A3, A4, FINSEQ_4:15
.= Base_FinSeq (K,n,i) by A3, A4, Th26 ;
then A36: qq . j = 0. K by A5, A6, A34, Th25;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. i by A2, A3, A4, A30, A35, FINSEQ_7:30 ;
hence A * (i,j) = 0. K by A7, A36, MATRIX_1:def_5; ::_thesis: verum
end;
end;
supposeA37: ( j <> 1 & j <> i0 ) ; ::_thesis: ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) )
thus ( i = j implies A * (i,j) = 1. K ) ::_thesis: ( i <> j implies A * (i,j) = 0. K )
proof
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
assume A38: i = j ; ::_thesis: A * (i,j) = 1. K
reconsider qq = f /. i as FinSequence of the carrier of K by FINSEQ_1:def_11;
j <= len f by A6, MATRIX_1:def_2;
then f /. i = f . i by A5, A38, FINSEQ_4:15
.= Base_FinSeq (K,n,i) by A3, A4, Th26 ;
then A39: qq . j = 1. K by A3, A4, A38, Th24;
A40: len f = n by MATRIX_1:def_2;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. i by A2, A3, A4, A37, A38, A40, FINSEQ_7:30 ;
hence A * (i,j) = 1. K by A7, A39, MATRIX_1:def_5; ::_thesis: verum
end;
thus ( i <> j implies A * (i,j) = 0. K ) ::_thesis: verum
proof
assume A41: i <> j ; ::_thesis: A * (i,j) = 0. K
percases ( ( not i = 1 & not i = i0 ) or i = 1 or i = i0 ) ;
supposeA42: ( not i = 1 & not i = i0 ) ; ::_thesis: A * (i,j) = 0. K
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
reconsider qq = f /. i as FinSequence of the carrier of K by FINSEQ_1:def_11;
A43: len f = n by MATRIX_1:def_2;
then f /. i = f . i by A3, A4, FINSEQ_4:15
.= Base_FinSeq (K,n,i) by A3, A4, Th26 ;
then A44: qq . j = 0. K by A5, A6, A41, Th25;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. i by A2, A3, A4, A42, A43, FINSEQ_7:30 ;
hence A * (i,j) = 0. K by A7, A44, MATRIX_1:def_5; ::_thesis: verum
end;
supposeA45: ( i = 1 or i = i0 ) ; ::_thesis: A * (i,j) = 0. K
percases ( i = 1 or i = i0 ) by A45;
supposeA46: i = 1 ; ::_thesis: A * (i,j) = 0. K
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
reconsider qq = f /. i0 as FinSequence of the carrier of K by FINSEQ_1:def_11;
A47: len f = n by MATRIX_1:def_2;
then f /. i0 = f . i0 by A1, FINSEQ_4:15
.= Base_FinSeq (K,n,i0) by A1, Th26 ;
then A48: qq . j = 0. K by A5, A6, A37, Th25;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. i0 by A1, A2, A4, A46, A47, FINSEQ_7:31 ;
hence A * (i,j) = 0. K by A7, A48, MATRIX_1:def_5; ::_thesis: verum
end;
supposeA49: i = i0 ; ::_thesis: A * (i,j) = 0. K
reconsider f = 1. (K,n) as FinSequence of the carrier of K * ;
reconsider qq = f /. 1 as FinSequence of the carrier of K by FINSEQ_1:def_11;
A50: len f = n by MATRIX_1:def_2;
then f /. 1 = f . 1 by A16, FINSEQ_4:15
.= Base_FinSeq (K,n,1) by A16, Th26 ;
then A51: qq . j = 0. K by A5, A6, A37, Th25;
A . i = A /. i by A15, A3, A4, FINSEQ_4:15
.= f /. 1 by A2, A3, A4, A16, A49, A50, FINSEQ_7:31 ;
hence A * (i,j) = 0. K by A7, A51, MATRIX_1:def_5; ::_thesis: verum
end;
end;
end;
end;
end;
end;
end;
end;
theorem Th44: :: MATRIX14:44
for K being Field
for n being Element of NAT
for A being Matrix of n,K
for i being Nat st 1 <= i & i <= n holds
(SwapDiagonal (K,n,1)) * (i,i) = 1. K
proof
let K be Field; ::_thesis: for n being Element of NAT
for A being Matrix of n,K
for i being Nat st 1 <= i & i <= n holds
(SwapDiagonal (K,n,1)) * (i,i) = 1. K
let n be Element of NAT ; ::_thesis: for A being Matrix of n,K
for i being Nat st 1 <= i & i <= n holds
(SwapDiagonal (K,n,1)) * (i,i) = 1. K
let A be Matrix of n,K; ::_thesis: for i being Nat st 1 <= i & i <= n holds
(SwapDiagonal (K,n,1)) * (i,i) = 1. K
set A = SwapDiagonal (K,n,1);
let i be Nat; ::_thesis: ( 1 <= i & i <= n implies (SwapDiagonal (K,n,1)) * (i,i) = 1. K )
assume ( 1 <= i & i <= n ) ; ::_thesis: (SwapDiagonal (K,n,1)) * (i,i) = 1. K
then ( SwapDiagonal (K,n,1) = 1. (K,n) & [i,i] in Indices (SwapDiagonal (K,n,1)) ) by FINSEQ_7:19, MATRIX_1:37;
hence (SwapDiagonal (K,n,1)) * (i,i) = 1. K by MATRIX_1:def_11; ::_thesis: verum
end;
theorem Th45: :: MATRIX14:45
for K being Field
for n being Element of NAT
for A being Matrix of n,K
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i <> j holds
(SwapDiagonal (K,n,1)) * (i,j) = 0. K
proof
let K be Field; ::_thesis: for n being Element of NAT
for A being Matrix of n,K
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i <> j holds
(SwapDiagonal (K,n,1)) * (i,j) = 0. K
let n be Element of NAT ; ::_thesis: for A being Matrix of n,K
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i <> j holds
(SwapDiagonal (K,n,1)) * (i,j) = 0. K
let A be Matrix of n,K; ::_thesis: for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n & i <> j holds
(SwapDiagonal (K,n,1)) * (i,j) = 0. K
set A = SwapDiagonal (K,n,1);
let i, j be Nat; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n & i <> j implies (SwapDiagonal (K,n,1)) * (i,j) = 0. K )
assume ( 1 <= i & i <= n & 1 <= j & j <= n ) ; ::_thesis: ( not i <> j or (SwapDiagonal (K,n,1)) * (i,j) = 0. K )
then A1: [i,j] in Indices (SwapDiagonal (K,n,1)) by MATRIX_1:37;
SwapDiagonal (K,n,1) = 1. (K,n) by FINSEQ_7:19;
hence ( not i <> j or (SwapDiagonal (K,n,1)) * (i,j) = 0. K ) by A1, MATRIX_1:def_11; ::_thesis: verum
end;
theorem Th46: :: MATRIX14:46
for K being Field
for n, i0 being Element of NAT
for A being Matrix of n,K st i0 = 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) holds
A = SwapDiagonal (K,n,i0)
proof
let K be Field; ::_thesis: for n, i0 being Element of NAT
for A being Matrix of n,K st i0 = 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) holds
A = SwapDiagonal (K,n,i0)
let n, i0 be Element of NAT ; ::_thesis: for A being Matrix of n,K st i0 = 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) holds
A = SwapDiagonal (K,n,i0)
let A be Matrix of n,K; ::_thesis: ( i0 = 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) implies A = SwapDiagonal (K,n,i0) )
assume A1: i0 = 1 ; ::_thesis: ( ex i, j being Nat st
( 1 <= i & i <= n & 1 <= j & j <= n & not ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) or A = SwapDiagonal (K,n,i0) )
assume A2: for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ; ::_thesis: A = SwapDiagonal (K,n,i0)
for i, j being Nat st [i,j] in Indices A holds
A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices A implies A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j) )
assume A3: [i,j] in Indices A ; ::_thesis: A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j)
Indices A = [:(Seg n),(Seg n):] by MATRIX_1:24;
then i in Seg n by A3, ZFMISC_1:87;
then A4: ( 1 <= i & i <= n ) by FINSEQ_1:1;
then A5: ( i = j implies A * (i,j) = 1. K ) by A2;
width A = n by MATRIX_1:24;
then j in Seg n by A3, ZFMISC_1:87;
then A6: ( 1 <= j & j <= n ) by FINSEQ_1:1;
then ( i <> j implies A * (i,j) = 0. K ) by A2, A4;
hence A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j) by A1, A4, A6, A5, Th44, Th45; ::_thesis: verum
end;
hence A = SwapDiagonal (K,n,i0) by MATRIX_1:27; ::_thesis: verum
end;
theorem Th47: :: MATRIX14:47
for K being Field
for n, i0 being Element of NAT
for A being Matrix of n,K st 1 <= i0 & i0 <= n & i0 <> 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) ) holds
A = SwapDiagonal (K,n,i0)
proof
let K be Field; ::_thesis: for n, i0 being Element of NAT
for A being Matrix of n,K st 1 <= i0 & i0 <= n & i0 <> 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) ) holds
A = SwapDiagonal (K,n,i0)
let n, i0 be Element of NAT ; ::_thesis: for A being Matrix of n,K st 1 <= i0 & i0 <= n & i0 <> 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) ) holds
A = SwapDiagonal (K,n,i0)
let A be Matrix of n,K; ::_thesis: ( 1 <= i0 & i0 <= n & i0 <> 1 & ( for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) ) implies A = SwapDiagonal (K,n,i0) )
assume A1: ( 1 <= i0 & i0 <= n & i0 <> 1 ) ; ::_thesis: ( ex i, j being Nat st
( 1 <= i & i <= n & 1 <= j & j <= n & not ( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) ) or A = SwapDiagonal (K,n,i0) )
assume A2: for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = 1 & j = i0 implies A * (i,j) = 1. K ) & ( i = i0 & j = 1 implies A * (i,j) = 1. K ) & ( i = 1 & j = 1 implies A * (i,j) = 0. K ) & ( i = i0 & j = i0 implies A * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) ) ; ::_thesis: A = SwapDiagonal (K,n,i0)
for i, j being Nat st [i,j] in Indices A holds
A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices A implies A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j) )
assume A3: [i,j] in Indices A ; ::_thesis: A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j)
Indices A = [:(Seg n),(Seg n):] by MATRIX_1:24;
then A4: i in Seg n by A3, ZFMISC_1:87;
then A5: 1 <= i by FINSEQ_1:1;
A6: ( i = i0 & j = i0 implies (SwapDiagonal (K,n,i0)) * (i,j) = 0. K ) by A1, Th43;
width A = n by MATRIX_1:24;
then A7: j in Seg n by A3, ZFMISC_1:87;
then A8: 1 <= j by FINSEQ_1:1;
A9: i <= n by A4, FINSEQ_1:1;
then A10: ( i = i0 & j = i0 implies A * (i,j) = 0. K ) by A2, A5;
A11: j <= n by A7, FINSEQ_1:1;
then A12: ( i = 1 & j = i0 implies A * (i,j) = 1. K ) by A2, A9, A8;
A13: ( i = 1 & j = 1 implies (SwapDiagonal (K,n,i0)) * (i,j) = 0. K ) by A1, A9, Th43;
A14: ( i = 1 & j = 1 implies A * (i,j) = 0. K ) by A2, A9;
A15: ( i = i0 & j = 1 implies A * (i,j) = 1. K ) by A2, A5, A9, A11;
( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies A * (i,j) = 1. K ) & ( i <> j implies A * (i,j) = 0. K ) ) ) by A2, A5, A9, A8, A11;
hence A * (i,j) = (SwapDiagonal (K,n,i0)) * (i,j) by A1, A5, A9, A8, A11, A12, A15, A14, A10, A13, A6, Th43; ::_thesis: verum
end;
hence A = SwapDiagonal (K,n,i0) by MATRIX_1:27; ::_thesis: verum
end;
theorem Th48: :: MATRIX14:48
for n being Element of NAT
for K being Field
for A being Matrix of n,K
for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
( ( for j being Element of NAT st 1 <= j & j <= n holds
( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) ) & ( for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K
for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
( ( for j being Element of NAT st 1 <= j & j <= n holds
( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) ) & ( for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) ) )
let K be Field; ::_thesis: for A being Matrix of n,K
for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
( ( for j being Element of NAT st 1 <= j & j <= n holds
( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) ) & ( for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) ) )
let A be Matrix of n,K; ::_thesis: for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
( ( for j being Element of NAT st 1 <= j & j <= n holds
( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) ) & ( for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) ) )
let i0 be Element of NAT ; ::_thesis: ( 1 <= i0 & i0 <= n implies ( ( for j being Element of NAT st 1 <= j & j <= n holds
( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) ) & ( for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) ) ) )
assume that
A1: 1 <= i0 and
A2: i0 <= n ; ::_thesis: ( ( for j being Element of NAT st 1 <= j & j <= n holds
( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) ) & ( for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) ) )
thus for j being Element of NAT st 1 <= j & j <= n holds
( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) ::_thesis: for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j)
proof
set Q = SwapDiagonal (K,n,i0);
set P = A;
let j be Element of NAT ; ::_thesis: ( 1 <= j & j <= n implies ( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) ) )
A3: width (SwapDiagonal (K,n,i0)) = n by MATRIX_1:24;
A4: 1 <= n by A1, A2, XXREAL_0:2;
A5: for j2 being Nat st j2 in Seg (width (SwapDiagonal (K,n,i0))) holds
(Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
proof
let j2 be Nat; ::_thesis: ( j2 in Seg (width (SwapDiagonal (K,n,i0))) implies (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) )
reconsider j3 = j2 as Element of NAT by ORDINAL1:def_12;
assume A6: j2 in Seg (width (SwapDiagonal (K,n,i0))) ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
then A7: 1 <= j2 by FINSEQ_1:1;
A8: j2 <= n by A3, A6, FINSEQ_1:1;
now__::_thesis:_(Base_FinSeq_(K,n,i0))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(1,j2)
percases ( i0 <> 1 or i0 = 1 ) ;
supposeA9: i0 <> 1 ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
now__::_thesis:_(Base_FinSeq_(K,n,i0))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(1,j2)
percases ( ( i0 = 1 & j2 = i0 ) or ( i0 = i0 & j2 = 1 ) or ( i0 = 1 & j2 = 1 ) or ( i0 = i0 & j2 = i0 ) or ( not i0 = 1 & not i0 = i0 ) or ( not j2 = 1 & not j2 = i0 ) ) ;
suppose ( i0 = 1 & j2 = i0 ) ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A9; ::_thesis: verum
end;
supposeA10: ( i0 = i0 & j2 = 1 ) ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
then (SwapDiagonal (K,n,i0)) * (1,j3) = 0. K by A1, A2, A8, A9, Th43;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A4, A9, A10, Th25; ::_thesis: verum
end;
suppose ( i0 = 1 & j2 = 1 ) ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A9; ::_thesis: verum
end;
supposeA11: ( i0 = i0 & j2 = i0 ) ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
then (SwapDiagonal (K,n,i0)) * (1,j3) = 1. K by A1, A2, A4, A9, Th43;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A7, A8, A11, Th24; ::_thesis: verum
end;
supposeA12: ( ( not i0 = 1 & not i0 = i0 ) or ( not j2 = 1 & not j2 = i0 ) ) ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
now__::_thesis:_(Base_FinSeq_(K,n,i0))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(1,j2)
percases ( i0 = j2 or i0 <> j2 ) ;
suppose i0 = j2 ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A12; ::_thesis: verum
end;
supposeA13: i0 <> j2 ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
(SwapDiagonal (K,n,i0)) * (1,j3) = 0. K by A1, A2, A4, A7, A8, A9, A12, Th43;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A7, A8, A13, Th25; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) ; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) ; ::_thesis: verum
end;
supposeA14: i0 = 1 ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
now__::_thesis:_(Base_FinSeq_(K,n,i0))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(1,j2)
percases ( i0 = j2 or i0 <> j2 ) ;
supposeA15: i0 = j2 ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
then (SwapDiagonal (K,n,i0)) * (1,j3) = 1. K by A8, A14, Th44;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A7, A8, A15, Th24; ::_thesis: verum
end;
supposeA16: i0 <> j2 ; ::_thesis: (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2)
then (SwapDiagonal (K,n,i0)) * (1,j3) = 0. K by A2, A7, A8, A14, Th45;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) by A7, A8, A16, Th25; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) ; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i0)) . j2 = (SwapDiagonal (K,n,i0)) * (1,j2) ; ::_thesis: verum
end;
assume A17: ( 1 <= j & j <= n ) ; ::_thesis: ( ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = A * (1,j) & ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j) )
then 1 <= n by XXREAL_0:2;
then A18: ( Indices ((SwapDiagonal (K,n,i0)) * A) = [:(Seg n),(Seg n):] & 1 in Seg n ) by FINSEQ_1:1, MATRIX_1:24;
A19: 1 <= n by A1, A2, XXREAL_0:2;
A20: for j2 being Nat st j2 in Seg (width (SwapDiagonal (K,n,i0))) holds
(Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
proof
let j2 be Nat; ::_thesis: ( j2 in Seg (width (SwapDiagonal (K,n,i0))) implies (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) )
reconsider j3 = j2 as Element of NAT by ORDINAL1:def_12;
assume A21: j2 in Seg (width (SwapDiagonal (K,n,i0))) ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
then A22: 1 <= j2 by FINSEQ_1:1;
A23: j2 <= n by A3, A21, FINSEQ_1:1;
now__::_thesis:_(Base_FinSeq_(K,n,1))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i0,j2)
percases ( i0 <> 1 or i0 = 1 ) ;
supposeA24: i0 <> 1 ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
now__::_thesis:_(Base_FinSeq_(K,n,1))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i0,j2)
percases ( ( i0 = 1 & j2 = i0 ) or ( i0 = i0 & j2 = 1 ) or ( i0 = 1 & j2 = 1 ) or ( i0 = i0 & j2 = i0 ) or ( not i0 = 1 & not i0 = i0 ) or ( not j2 = 1 & not j2 = i0 ) ) ;
suppose ( i0 = 1 & j2 = i0 ) ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) by A24; ::_thesis: verum
end;
supposeA25: ( i0 = i0 & j2 = 1 ) ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
then (SwapDiagonal (K,n,i0)) * (i0,j3) = 1. K by A1, A2, A19, A24, Th43;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) by A23, A25, Th24; ::_thesis: verum
end;
suppose ( i0 = 1 & j2 = 1 ) ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) by A24; ::_thesis: verum
end;
supposeA26: ( i0 = i0 & j2 = i0 ) ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
then (SwapDiagonal (K,n,i0)) * (i0,j3) = 0. K by A22, A23, A24, Th43;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) by A1, A2, A24, A26, Th25; ::_thesis: verum
end;
supposeA27: ( ( not i0 = 1 & not i0 = i0 ) or ( not j2 = 1 & not j2 = i0 ) ) ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
now__::_thesis:_(Base_FinSeq_(K,n,1))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i0,j2)
(SwapDiagonal (K,n,i0)) * (i0,j3) = 0. K by A1, A2, A22, A23, A24, A27, Th43;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) by A22, A23, A27, Th25; ::_thesis: verum
end;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) ; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) ; ::_thesis: verum
end;
supposeA28: i0 = 1 ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
now__::_thesis:_(Base_FinSeq_(K,n,1))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i0,j2)
percases ( i0 = j2 or i0 <> j2 ) ;
supposeA29: i0 = j2 ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
then (SwapDiagonal (K,n,i0)) * (i0,j3) = 1. K by A23, A28, Th44;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) by A23, A28, A29, Th24; ::_thesis: verum
end;
supposeA30: i0 <> j2 ; ::_thesis: (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2)
then (SwapDiagonal (K,n,1)) * (i0,j3) = 0. K by A1, A2, A22, A23, Th45;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) by A22, A23, A28, A30, Th25; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) ; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,1)) . j2 = (SwapDiagonal (K,n,i0)) * (i0,j2) ; ::_thesis: verum
end;
len (Base_FinSeq (K,n,1)) = n by Th23
.= width (SwapDiagonal (K,n,i0)) by MATRIX_1:24 ;
then A31: Line ((SwapDiagonal (K,n,i0)),i0) = Base_FinSeq (K,n,1) by A20, MATRIX_1:def_7;
A32: len A = n by MATRIX_1:24;
then A33: len (Col (A,j)) = n by MATRIX_1:def_8;
A34: 1 <= n by A17, XXREAL_0:2;
then 1 in Seg n by FINSEQ_1:1;
then A35: 1 in dom A by A32, FINSEQ_1:def_3;
j in Seg n by A17, FINSEQ_1:1;
then A36: [1,j] in Indices ((SwapDiagonal (K,n,i0)) * A) by A18, ZFMISC_1:87;
[i0,j] in Indices ((SwapDiagonal (K,n,i0)) * A) by A1, A2, A17, MATRIX_1:37;
hence ((SwapDiagonal (K,n,i0)) * A) * (i0,j) = |((Base_FinSeq (K,n,1)),(Col (A,j)))| by A3, A32, A31, MATRIX_3:def_4
.= |((Col (A,j)),(Base_FinSeq (K,n,1)))| by FVSUM_1:90
.= (Col (A,j)) . 1 by A34, A33, Th35
.= A * (1,j) by A35, MATRIX_1:def_8 ;
::_thesis: ((SwapDiagonal (K,n,i0)) * A) * (1,j) = A * (i0,j)
i0 in Seg n by A1, A2, FINSEQ_1:1;
then A37: i0 in dom A by A32, FINSEQ_1:def_3;
len (Base_FinSeq (K,n,i0)) = n by Th23
.= width (SwapDiagonal (K,n,i0)) by MATRIX_1:24 ;
then Line ((SwapDiagonal (K,n,i0)),1) = Base_FinSeq (K,n,i0) by A5, MATRIX_1:def_7;
hence ((SwapDiagonal (K,n,i0)) * A) * (1,j) = |((Base_FinSeq (K,n,i0)),(Col (A,j)))| by A3, A32, A36, MATRIX_3:def_4
.= |((Col (A,j)),(Base_FinSeq (K,n,i0)))| by FVSUM_1:90
.= (Col (A,j)) . i0 by A1, A2, A33, Th35
.= A * (i0,j) by A37, MATRIX_1:def_8 ;
::_thesis: verum
end;
thus for i, j being Element of NAT st i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n holds
((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) ::_thesis: verum
proof
set Q = SwapDiagonal (K,n,i0);
set P = A;
let i, j be Element of NAT ; ::_thesis: ( i <> 1 & i <> i0 & 1 <= i & i <= n & 1 <= j & j <= n implies ((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j) )
assume that
A38: i <> 1 and
A39: i <> i0 and
A40: ( 1 <= i & i <= n ) and
A41: ( 1 <= j & j <= n ) ; ::_thesis: ((SwapDiagonal (K,n,i0)) * A) * (i,j) = A * (i,j)
A42: len A = n by MATRIX_1:24;
then A43: len (Col (A,j)) = n by MATRIX_1:def_8;
A44: width (SwapDiagonal (K,n,i0)) = n by MATRIX_1:24;
A45: for j2 being Nat st j2 in Seg (width (SwapDiagonal (K,n,i0))) holds
(Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
proof
let j2 be Nat; ::_thesis: ( j2 in Seg (width (SwapDiagonal (K,n,i0))) implies (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) )
reconsider j3 = j2 as Element of NAT by ORDINAL1:def_12;
assume j2 in Seg (width (SwapDiagonal (K,n,i0))) ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
then A46: ( 1 <= j2 & j2 <= n ) by A44, FINSEQ_1:1;
now__::_thesis:_(Base_FinSeq_(K,n,i))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i,j2)
percases ( i0 <> 1 or i0 = 1 ) ;
supposeA47: i0 <> 1 ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
now__::_thesis:_(Base_FinSeq_(K,n,i))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i,j2)
percases ( ( i = 1 & j2 = i0 ) or ( i = i0 & j2 = 1 ) or ( i = 1 & j2 = 1 ) or ( i = i0 & j2 = i0 ) or ( not i = 1 & not i = i0 ) or ( not j2 = 1 & not j2 = i0 ) ) ;
suppose ( i = 1 & j2 = i0 ) ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A38; ::_thesis: verum
end;
suppose ( i = i0 & j2 = 1 ) ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A39; ::_thesis: verum
end;
suppose ( i = 1 & j2 = 1 ) ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A38; ::_thesis: verum
end;
suppose ( i = i0 & j2 = i0 ) ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A39; ::_thesis: verum
end;
supposeA48: ( ( not i = 1 & not i = i0 ) or ( not j2 = 1 & not j2 = i0 ) ) ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
now__::_thesis:_(Base_FinSeq_(K,n,i))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i,j2)
percases ( i = j2 or i <> j2 ) ;
supposeA49: i = j2 ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
then (SwapDiagonal (K,n,i0)) * (i,j3) = 1. K by A1, A2, A46, A47, A48, Th43;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A40, A49, Th24; ::_thesis: verum
end;
supposeA50: i <> j2 ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
then (SwapDiagonal (K,n,i0)) * (i,j3) = 0. K by A1, A2, A38, A39, A40, A46, A47, Th43;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A46, A50, Th25; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) ; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) ; ::_thesis: verum
end;
supposeA51: i0 = 1 ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
now__::_thesis:_(Base_FinSeq_(K,n,i))_._j2_=_(SwapDiagonal_(K,n,i0))_*_(i,j2)
percases ( i = j2 or i <> j2 ) ;
supposeA52: i = j2 ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
then (SwapDiagonal (K,n,i0)) * (i,j3) = 1. K by A46, A51, Th44;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A46, A52, Th24; ::_thesis: verum
end;
supposeA53: i <> j2 ; ::_thesis: (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2)
then (SwapDiagonal (K,n,i0)) * (i,j3) = 0. K by A40, A46, A51, Th45;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) by A46, A53, Th25; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) ; ::_thesis: verum
end;
end;
end;
hence (Base_FinSeq (K,n,i)) . j2 = (SwapDiagonal (K,n,i0)) * (i,j2) ; ::_thesis: verum
end;
i in Seg n by A40, FINSEQ_1:1;
then A54: i in dom A by A42, FINSEQ_1:def_3;
len (Base_FinSeq (K,n,i)) = n by Th23
.= width (SwapDiagonal (K,n,i0)) by MATRIX_1:24 ;
then A55: Line ((SwapDiagonal (K,n,i0)),i) = Base_FinSeq (K,n,i) by A45, MATRIX_1:def_7;
[i,j] in Indices ((SwapDiagonal (K,n,i0)) * A) by A40, A41, MATRIX_1:37;
hence ((SwapDiagonal (K,n,i0)) * A) * (i,j) = |((Base_FinSeq (K,n,i)),(Col (A,j)))| by A44, A42, A55, MATRIX_3:def_4
.= |((Col (A,j)),(Base_FinSeq (K,n,i)))| by FVSUM_1:90
.= (Col (A,j)) . i by A40, A43, Th35
.= A * (i,j) by A54, MATRIX_1:def_8 ;
::_thesis: verum
end;
end;
theorem Th49: :: MATRIX14:49
for n being Element of NAT
for K being Field
for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
( SwapDiagonal (K,n,i0) is invertible & (SwapDiagonal (K,n,i0)) ~ = SwapDiagonal (K,n,i0) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
( SwapDiagonal (K,n,i0) is invertible & (SwapDiagonal (K,n,i0)) ~ = SwapDiagonal (K,n,i0) )
let K be Field; ::_thesis: for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
( SwapDiagonal (K,n,i0) is invertible & (SwapDiagonal (K,n,i0)) ~ = SwapDiagonal (K,n,i0) )
let i0 be Element of NAT ; ::_thesis: ( 1 <= i0 & i0 <= n implies ( SwapDiagonal (K,n,i0) is invertible & (SwapDiagonal (K,n,i0)) ~ = SwapDiagonal (K,n,i0) ) )
assume that
A1: 1 <= i0 and
A2: i0 <= n ; ::_thesis: ( SwapDiagonal (K,n,i0) is invertible & (SwapDiagonal (K,n,i0)) ~ = SwapDiagonal (K,n,i0) )
A3: 1 <= n by A1, A2, XXREAL_0:2;
set R = (SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0));
A4: Indices ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) = [:(Seg n),(Seg n):] by MATRIX_1:24;
A5: width ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) = n by MATRIX_1:24;
A6: for i4, j4 being Nat st [i4,j4] in Indices ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) holds
((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i4,j4) = (1. (K,n)) * (i4,j4)
proof
let i4, j4 be Nat; ::_thesis: ( [i4,j4] in Indices ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) implies ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i4,j4) = (1. (K,n)) * (i4,j4) )
reconsider i = i4, j = j4 as Element of NAT by ORDINAL1:def_12;
assume A7: [i4,j4] in Indices ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i4,j4) = (1. (K,n)) * (i4,j4)
then A8: [i,j] in Indices (1. (K,n)) by A4, MATRIX_1:24;
j in Seg n by A5, A7, ZFMISC_1:87;
then A9: ( 1 <= j & j <= n ) by FINSEQ_1:1;
A10: i in Seg n by A4, A7, ZFMISC_1:87;
then A11: 1 <= i by FINSEQ_1:1;
A12: i <= n by A10, FINSEQ_1:1;
percases ( 1 < i or 1 = i ) by A11, XXREAL_0:1;
supposeA13: 1 < i ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i4,j4) = (1. (K,n)) * (i4,j4)
now__::_thesis:_((SwapDiagonal_(K,n,i0))_*_(SwapDiagonal_(K,n,i0)))_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i <> i0 or i = i0 ) ;
supposeA14: i <> i0 ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
now__::_thesis:_((SwapDiagonal_(K,n,i0))_*_(SwapDiagonal_(K,n,i0)))_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i = j or i <> j ) ;
supposeA15: i = j ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
A16: now__::_thesis:_(SwapDiagonal_(K,n,i0))_*_(i,j)_=_1._K
percases ( i0 <> 1 or i0 = 1 ) ;
suppose i0 <> 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (i,j) = 1. K
hence (SwapDiagonal (K,n,i0)) * (i,j) = 1. K by A1, A2, A12, A13, A14, A15, Th43; ::_thesis: verum
end;
suppose i0 = 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (i,j) = 1. K
hence (SwapDiagonal (K,n,i0)) * (i,j) = 1. K by A11, A12, A15, Th44; ::_thesis: verum
end;
end;
end;
(1. (K,n)) * (i,j) = 1. K by A8, A15, MATRIX_1:def_11;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A1, A2, A12, A9, A13, A14, A16, Th48; ::_thesis: verum
end;
supposeA17: i <> j ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
A18: now__::_thesis:_(SwapDiagonal_(K,n,i0))_*_(i,j)_=_0._K
percases ( i0 = 1 or i0 <> 1 ) ;
suppose i0 = 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (i,j) = 0. K
hence (SwapDiagonal (K,n,i0)) * (i,j) = 0. K by A11, A12, A9, A17, Th45; ::_thesis: verum
end;
suppose i0 <> 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (i,j) = 0. K
hence (SwapDiagonal (K,n,i0)) * (i,j) = 0. K by A1, A2, A12, A9, A13, A14, A17, Th43; ::_thesis: verum
end;
end;
end;
(1. (K,n)) * (i,j) = 0. K by A8, A17, MATRIX_1:def_11;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A1, A2, A12, A9, A13, A14, A18, Th48; ::_thesis: verum
end;
end;
end;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) ; ::_thesis: verum
end;
supposeA19: i = i0 ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
now__::_thesis:_((SwapDiagonal_(K,n,i0))_*_(SwapDiagonal_(K,n,i0)))_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i = j or i <> j ) ;
supposeA20: i = j ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
A21: now__::_thesis:_(SwapDiagonal_(K,n,i0))_*_(1,i0)_=_1._K
percases ( i0 = 1 or i0 <> 1 ) ;
suppose i0 = 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (1,i0) = 1. K
hence (SwapDiagonal (K,n,i0)) * (1,i0) = 1. K by A13, A19; ::_thesis: verum
end;
suppose i0 <> 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (1,i0) = 1. K
hence (SwapDiagonal (K,n,i0)) * (1,i0) = 1. K by A1, A2, A3, Th43; ::_thesis: verum
end;
end;
end;
(1. (K,n)) * (i,j) = 1. K by A8, A20, MATRIX_1:def_11;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A1, A2, A19, A20, A21, Th48; ::_thesis: verum
end;
supposeA22: i <> j ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
A23: now__::_thesis:_(SwapDiagonal_(K,n,i0))_*_(1,j)_=_0._K
now__::_thesis:_(SwapDiagonal_(K,n,i0))_*_(1,j)_=_0._K
percases ( j = 1 or j <> 1 ) ;
suppose j = 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (1,j) = 0. K
hence (SwapDiagonal (K,n,i0)) * (1,j) = 0. K by A2, A3, A13, A19, Th43; ::_thesis: verum
end;
suppose j <> 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (1,j) = 0. K
hence (SwapDiagonal (K,n,i0)) * (1,j) = 0. K by A3, A12, A9, A13, A19, A22, Th43; ::_thesis: verum
end;
end;
end;
hence (SwapDiagonal (K,n,i0)) * (1,j) = 0. K ; ::_thesis: verum
end;
(1. (K,n)) * (i,j) = 0. K by A8, A22, MATRIX_1:def_11;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A11, A12, A9, A19, A23, Th48; ::_thesis: verum
end;
end;
end;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) ; ::_thesis: verum
end;
end;
end;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i4,j4) = (1. (K,n)) * (i4,j4) ; ::_thesis: verum
end;
supposeA24: 1 = i ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i4,j4) = (1. (K,n)) * (i4,j4)
now__::_thesis:_((SwapDiagonal_(K,n,i0))_*_(SwapDiagonal_(K,n,i0)))_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i0 <> 1 or i0 = 1 ) ;
supposeA25: i0 <> 1 ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
percases ( j <> 1 or j = 1 ) ;
supposeA26: j <> 1 ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
A27: now__::_thesis:_(SwapDiagonal_(K,n,i0))_*_(i0,j)_=_0._K
percases ( j = i0 or j <> i0 ) ;
suppose j = i0 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (i0,j) = 0. K
hence (SwapDiagonal (K,n,i0)) * (i0,j) = 0. K by A9, A26, Th43; ::_thesis: verum
end;
suppose j <> i0 ; ::_thesis: (SwapDiagonal (K,n,i0)) * (i0,j) = 0. K
hence (SwapDiagonal (K,n,i0)) * (i0,j) = 0. K by A1, A2, A9, A25, A26, Th43; ::_thesis: verum
end;
end;
end;
(1. (K,n)) * (i,j) = 0. K by A8, A24, A26, MATRIX_1:def_11;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A1, A2, A9, A24, A27, Th48; ::_thesis: verum
end;
suppose j = 1 ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
then ( (1. (K,n)) * (i,j) = 1. K & (SwapDiagonal (K,n,i0)) * (i0,j) = 1. K ) by A1, A2, A3, A8, A24, A25, Th43, MATRIX_1:def_11;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A1, A2, A9, A24, Th48; ::_thesis: verum
end;
end;
end;
supposeA28: i0 = 1 ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
now__::_thesis:_((SwapDiagonal_(K,n,i0))_*_(SwapDiagonal_(K,n,i0)))_*_(i,j)_=_(1._(K,n))_*_(i,j)
percases ( i <> j or i = j ) ;
suppose i <> j ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
then ( (1. (K,n)) * (i,j) = 0. K & (SwapDiagonal (K,n,1)) * (1,j) = 0. K ) by A12, A9, A8, A24, Th45, MATRIX_1:def_11;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A12, A9, A24, A28, Th48; ::_thesis: verum
end;
supposeA29: i = j ; ::_thesis: ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j)
then A30: (1. (K,n)) * (j,j) = 1. K by A8, MATRIX_1:def_11;
((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (1,j) = (SwapDiagonal (K,n,i0)) * (i0,j) by A1, A2, A9, Th48;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) by A2, A24, A28, A29, A30, Th44; ::_thesis: verum
end;
end;
end;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i,j) = (1. (K,n)) * (i,j) ; ::_thesis: verum
end;
end;
end;
hence ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) * (i4,j4) = (1. (K,n)) * (i4,j4) ; ::_thesis: verum
end;
end;
end;
width (1. (K,n)) = n by MATRIX_1:24;
then A31: width ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) = width (1. (K,n)) by MATRIX_1:24;
len (1. (K,n)) = n by MATRIX_1:24;
then len ((SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0))) = len (1. (K,n)) by MATRIX_1:24;
then A32: (SwapDiagonal (K,n,i0)) * (SwapDiagonal (K,n,i0)) = 1. (K,n) by A31, A6, MATRIX_1:21;
hence SwapDiagonal (K,n,i0) is invertible by Th19; ::_thesis: (SwapDiagonal (K,n,i0)) ~ = SwapDiagonal (K,n,i0)
thus (SwapDiagonal (K,n,i0)) ~ = SwapDiagonal (K,n,i0) by A32, Th18; ::_thesis: verum
end;
theorem Th50: :: MATRIX14:50
for n being Element of NAT
for K being Field
for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
(SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0)
proof
let n be Element of NAT ; ::_thesis: for K being Field
for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
(SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0)
let K be Field; ::_thesis: for i0 being Element of NAT st 1 <= i0 & i0 <= n holds
(SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0)
let i0 be Element of NAT ; ::_thesis: ( 1 <= i0 & i0 <= n implies (SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0) )
assume A1: ( 1 <= i0 & i0 <= n ) ; ::_thesis: (SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0)
percases ( i0 <> 1 or i0 = 1 ) ;
supposeA2: i0 <> 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0)
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = 1 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i = i0 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i = 1 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( i = i0 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) ) )
proof
A3: Indices (SwapDiagonal (K,n,i0)) = [:(Seg n),(Seg n):] by MATRIX_1:24;
let i, j be Nat; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n implies ( ( i = 1 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i = i0 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i = 1 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( i = i0 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) ) ) )
assume that
A4: 1 <= i and
A5: i <= n and
A6: 1 <= j and
A7: j <= n ; ::_thesis: ( ( i = 1 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i = i0 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i = 1 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( i = i0 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) ) )
A8: ( i in Seg n & j in Seg n ) by A4, A5, A6, A7, FINSEQ_1:1;
hereby ::_thesis: ( ( i = i0 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i = 1 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( i = i0 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) ) )
assume A9: ( i = 1 & j = i0 ) ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K
[j,i] in Indices (SwapDiagonal (K,n,i0)) by A8, A3, ZFMISC_1:87;
hence ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by MATRIX_1:def_6
.= 1. K by A2, A5, A6, A7, A9, Th43 ;
::_thesis: verum
end;
hereby ::_thesis: ( ( i = 1 & j = 1 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( i = i0 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) ) )
assume A10: ( i = i0 & j = 1 ) ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K
[j,i] in Indices (SwapDiagonal (K,n,i0)) by A8, A3, ZFMISC_1:87;
hence ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by MATRIX_1:def_6
.= 1. K by A2, A4, A5, A7, A10, Th43 ;
::_thesis: verum
end;
hereby ::_thesis: ( ( i = i0 & j = i0 implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) & ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) ) )
assume A11: ( i = 1 & j = 1 ) ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K
[j,i] in Indices (SwapDiagonal (K,n,i0)) by A8, A3, ZFMISC_1:87;
hence ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by MATRIX_1:def_6
.= 0. K by A1, A2, A5, A11, Th43 ;
::_thesis: verum
end;
hereby ::_thesis: ( ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) )
assume A12: ( i = i0 & j = i0 ) ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K
[j,i] in Indices (SwapDiagonal (K,n,i0)) by A8, A3, ZFMISC_1:87;
hence ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by MATRIX_1:def_6
.= 0. K by A2, A4, A5, A12, Th43 ;
::_thesis: verum
end;
hereby ::_thesis: verum
assume A13: ( ( not i = 1 & not i = i0 ) or ( not j = 1 & not j = i0 ) ) ; ::_thesis: ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) )
A14: [j,i] in Indices (SwapDiagonal (K,n,i0)) by A8, A3, ZFMISC_1:87;
A15: now__::_thesis:_(_i_=_j_implies_((SwapDiagonal_(K,n,i0))_@)_*_(i,j)_=_1._K_)
assume A16: i = j ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K
thus ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by A14, MATRIX_1:def_6
.= 1. K by A1, A2, A4, A5, A13, A16, Th43 ; ::_thesis: verum
end;
now__::_thesis:_(_i_<>_j_implies_((SwapDiagonal_(K,n,i0))_@)_*_(i,j)_=_0._K_)
assume A17: i <> j ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K
thus ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by A14, MATRIX_1:def_6
.= 0. K by A1, A2, A4, A5, A6, A7, A13, A17, Th43 ; ::_thesis: verum
end;
hence ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) by A15; ::_thesis: verum
end;
end;
hence (SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0) by A1, A2, Th47; ::_thesis: verum
end;
supposeA18: i0 = 1 ; ::_thesis: (SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0)
for i, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) )
proof
A19: Indices (SwapDiagonal (K,n,i0)) = [:(Seg n),(Seg n):] by MATRIX_1:24;
let i, j be Nat; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n implies ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) ) )
assume that
A20: ( 1 <= i & i <= n ) and
A21: ( 1 <= j & j <= n ) ; ::_thesis: ( ( i = j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K ) & ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K ) )
( i in Seg n & j in Seg n ) by A20, A21, FINSEQ_1:1;
then A22: [j,i] in Indices (SwapDiagonal (K,n,i0)) by A19, ZFMISC_1:87;
hereby ::_thesis: ( i <> j implies ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K )
assume A23: i = j ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 1. K
thus ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by A22, MATRIX_1:def_6
.= 1. K by A18, A20, A23, Th44 ; ::_thesis: verum
end;
hereby ::_thesis: verum
assume A24: i <> j ; ::_thesis: ((SwapDiagonal (K,n,i0)) @) * (i,j) = 0. K
thus ((SwapDiagonal (K,n,i0)) @) * (i,j) = (SwapDiagonal (K,n,i0)) * (j,i) by A22, MATRIX_1:def_6
.= 0. K by A18, A20, A21, A24, Th45 ; ::_thesis: verum
end;
end;
hence (SwapDiagonal (K,n,i0)) @ = SwapDiagonal (K,n,i0) by A18, Th46; ::_thesis: verum
end;
end;
end;
theorem Th51: :: MATRIX14:51
for n being Element of NAT
for K being Field
for A being Matrix of n,K
for j0 being Element of NAT st 1 <= j0 & j0 <= n holds
( ( for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) ) & ( for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K
for j0 being Element of NAT st 1 <= j0 & j0 <= n holds
( ( for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) ) & ( for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) ) )
let K be Field; ::_thesis: for A being Matrix of n,K
for j0 being Element of NAT st 1 <= j0 & j0 <= n holds
( ( for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) ) & ( for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) ) )
let A be Matrix of n,K; ::_thesis: for j0 being Element of NAT st 1 <= j0 & j0 <= n holds
( ( for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) ) & ( for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) ) )
let j0 be Element of NAT ; ::_thesis: ( 1 <= j0 & j0 <= n implies ( ( for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) ) & ( for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) ) ) )
assume A1: ( 1 <= j0 & j0 <= n ) ; ::_thesis: ( ( for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) ) & ( for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) ) )
A2: ((SwapDiagonal (K,n,j0)) * (A @)) @ = ((A @) @) * ((SwapDiagonal (K,n,j0)) @) by Th30
.= A * ((SwapDiagonal (K,n,j0)) @) by MATRIXR2:29
.= A * (SwapDiagonal (K,n,j0)) by A1, Th50 ;
A3: for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) )
proof
let i be Element of NAT ; ::_thesis: ( 1 <= i & i <= n implies ( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) )
assume A4: ( 1 <= i & i <= n ) ; ::_thesis: ( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) )
then A5: 1 <= n by XXREAL_0:2;
then A6: [i,1] in Indices A by A4, MATRIX_1:37;
[j0,i] in Indices ((SwapDiagonal (K,n,j0)) * (A @)) by A1, A4, MATRIX_1:37;
hence (A * (SwapDiagonal (K,n,j0))) * (i,j0) = ((SwapDiagonal (K,n,j0)) * (A @)) * (j0,i) by A2, MATRIX_1:def_6
.= (A @) * (1,i) by A1, A4, Th48
.= A * (i,1) by A6, MATRIX_1:def_6 ;
::_thesis: (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0)
A7: [i,j0] in Indices A by A1, A4, MATRIX_1:37;
[1,i] in Indices ((SwapDiagonal (K,n,j0)) * (A @)) by A4, A5, MATRIX_1:37;
hence (A * (SwapDiagonal (K,n,j0))) * (i,1) = ((SwapDiagonal (K,n,j0)) * (A @)) * (1,i) by A2, MATRIX_1:def_6
.= (A @) * (j0,i) by A1, A4, Th48
.= A * (i,j0) by A7, MATRIX_1:def_6 ;
::_thesis: verum
end;
for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j)
proof
let i, j be Element of NAT ; ::_thesis: ( j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n implies (A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) )
assume that
A8: ( j <> 1 & j <> j0 ) and
A9: ( 1 <= i & i <= n & 1 <= j & j <= n ) ; ::_thesis: (A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j)
A10: [i,j] in Indices A by A9, MATRIX_1:37;
[j,i] in Indices ((SwapDiagonal (K,n,j0)) * (A @)) by A9, MATRIX_1:37;
hence (A * (SwapDiagonal (K,n,j0))) * (i,j) = ((SwapDiagonal (K,n,j0)) * (A @)) * (j,i) by A2, MATRIX_1:def_6
.= (A @) * (j,i) by A1, A8, A9, Th48
.= A * (i,j) by A10, MATRIX_1:def_6 ;
::_thesis: verum
end;
hence ( ( for i being Element of NAT st 1 <= i & i <= n holds
( (A * (SwapDiagonal (K,n,j0))) * (i,j0) = A * (i,1) & (A * (SwapDiagonal (K,n,j0))) * (i,1) = A * (i,j0) ) ) & ( for i, j being Element of NAT st j <> 1 & j <> j0 & 1 <= i & i <= n & 1 <= j & j <= n holds
(A * (SwapDiagonal (K,n,j0))) * (i,j) = A * (i,j) ) ) by A3; ::_thesis: verum
end;
theorem Th52: :: MATRIX14:52
for n being Element of NAT
for K being Field
for A being Matrix of n,K holds
( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K holds
( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
let K be Field; ::_thesis: for A being Matrix of n,K holds
( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
let A be Matrix of n,K; ::_thesis: ( A = 0. (K,n) iff for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K )
A1: width A = n by MATRIX_1:24;
thus ( A = 0. (K,n) implies for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K ) ::_thesis: ( ( for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K ) implies A = 0. (K,n) )
proof
assume A = 0. (K,n) ; ::_thesis: for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K
then A2: A = 0. (K,n,n) by MATRIX_3:def_1;
thus for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K ::_thesis: verum
proof
let i, j be Element of NAT ; ::_thesis: ( 1 <= i & i <= n & 1 <= j & j <= n implies A * (i,j) = 0. K )
assume ( 1 <= i & i <= n & 1 <= j & j <= n ) ; ::_thesis: A * (i,j) = 0. K
then [i,j] in Indices A by MATRIX_1:37;
hence A * (i,j) = 0. K by A2, MATRIX_3:1; ::_thesis: verum
end;
end;
assume A3: for i, j being Element of NAT st 1 <= i & i <= n & 1 <= j & j <= n holds
A * (i,j) = 0. K ; ::_thesis: A = 0. (K,n)
A4: Indices A = [:(Seg n),(Seg n):] by MATRIX_1:24;
A5: for i, j being Nat st [i,j] in Indices A holds
A * (i,j) = (A + A) * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices A implies A * (i,j) = (A + A) * (i,j) )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
assume A6: [i,j] in Indices A ; ::_thesis: A * (i,j) = (A + A) * (i,j)
then j in Seg n by A1, ZFMISC_1:87;
then A7: ( 1 <= j & j <= n ) by FINSEQ_1:1;
i in Seg n by A4, A6, ZFMISC_1:87;
then ( 1 <= i & i <= n ) by FINSEQ_1:1;
then A * (i0,j0) = 0. K by A3, A7;
then (A + A) * (i,j) = (0. K) + (A * (i,j)) by A6, MATRIX_3:def_3
.= A * (i,j) by RLVECT_1:4 ;
hence A * (i,j) = (A + A) * (i,j) ; ::_thesis: verum
end;
len A = n by MATRIX_1:24;
then A = 0. (K,n,n) by A1, A5, MATRIX_1:27, MATRIX_4:6;
hence A = 0. (K,n) by MATRIX_3:def_1; ::_thesis: verum
end;
begin
theorem Th53: :: MATRIX14:53
for n being Element of NAT
for K being Field
for A being Matrix of n,K st A <> 0. (K,n) holds
ex B, C being Matrix of n,K st
( B is invertible & C is invertible & ((B * A) * C) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((B * A) * C) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((B * A) * C) * (1,j) = 0. K ) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K st A <> 0. (K,n) holds
ex B, C being Matrix of n,K st
( B is invertible & C is invertible & ((B * A) * C) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((B * A) * C) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((B * A) * C) * (1,j) = 0. K ) )
let K be Field; ::_thesis: for A being Matrix of n,K st A <> 0. (K,n) holds
ex B, C being Matrix of n,K st
( B is invertible & C is invertible & ((B * A) * C) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((B * A) * C) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((B * A) * C) * (1,j) = 0. K ) )
let A be Matrix of n,K; ::_thesis: ( A <> 0. (K,n) implies ex B, C being Matrix of n,K st
( B is invertible & C is invertible & ((B * A) * C) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((B * A) * C) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((B * A) * C) * (1,j) = 0. K ) ) )
assume A <> 0. (K,n) ; ::_thesis: ex B, C being Matrix of n,K st
( B is invertible & C is invertible & ((B * A) * C) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((B * A) * C) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((B * A) * C) * (1,j) = 0. K ) )
then consider i0, j0 being Element of NAT such that
A1: ( 1 <= i0 & i0 <= n ) and
A2: ( 1 <= j0 & j0 <= n ) and
A3: A * (i0,j0) <> 0. K by Th52;
set A3 = ((SwapDiagonal (K,n,i0)) * A) * (SwapDiagonal (K,n,j0));
set A2 = (SwapDiagonal (K,n,i0)) * A;
1 <= n by A1, XXREAL_0:2;
then (((SwapDiagonal (K,n,i0)) * A) * (SwapDiagonal (K,n,j0))) * (1,1) = ((SwapDiagonal (K,n,i0)) * A) * (1,j0) by A2, Th51
.= A * (i0,j0) by A1, A2, Th48 ;
then consider P, Q being Matrix of n,K such that
A4: P is invertible and
A5: Q is invertible and
A6: ( ((P * (((SwapDiagonal (K,n,i0)) * A) * (SwapDiagonal (K,n,j0)))) * Q) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((P * (((SwapDiagonal (K,n,i0)) * A) * (SwapDiagonal (K,n,j0)))) * Q) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((P * (((SwapDiagonal (K,n,i0)) * A) * (SwapDiagonal (K,n,j0)))) * Q) * (1,j) = 0. K ) ) by A1, A3, Th41;
set B0 = P * (SwapDiagonal (K,n,i0));
set C0 = (SwapDiagonal (K,n,j0)) * Q;
SwapDiagonal (K,n,i0) is invertible by A1, Th49;
then A7: P * (SwapDiagonal (K,n,i0)) is invertible by A4, MATRIX_6:36;
SwapDiagonal (K,n,j0) is invertible by A2, Th49;
then A8: (SwapDiagonal (K,n,j0)) * Q is invertible by A5, MATRIX_6:36;
((P * (SwapDiagonal (K,n,i0))) * A) * ((SwapDiagonal (K,n,j0)) * Q) = (P * ((SwapDiagonal (K,n,i0)) * A)) * ((SwapDiagonal (K,n,j0)) * Q) by Th17
.= ((P * ((SwapDiagonal (K,n,i0)) * A)) * (SwapDiagonal (K,n,j0))) * Q by Th17
.= (P * (((SwapDiagonal (K,n,i0)) * A) * (SwapDiagonal (K,n,j0)))) * Q by Th17 ;
hence ex B, C being Matrix of n,K st
( B is invertible & C is invertible & ((B * A) * C) * (1,1) = 1. K & ( for i being Element of NAT st 1 < i & i <= n holds
((B * A) * C) * (i,1) = 0. K ) & ( for j being Element of NAT st 1 < j & j <= n holds
((B * A) * C) * (1,j) = 0. K ) ) by A6, A7, A8; ::_thesis: verum
end;
theorem Th54: :: MATRIX14:54
for n being Element of NAT
for K being Field
for A, B being Matrix of n,K st B * A = 1. (K,n) holds
ex B2 being Matrix of n,K st A * B2 = 1. (K,n)
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A, B being Matrix of n,K st B * A = 1. (K,n) holds
ex B2 being Matrix of n,K st A * B2 = 1. (K,n)
let K be Field; ::_thesis: for A, B being Matrix of n,K st B * A = 1. (K,n) holds
ex B2 being Matrix of n,K st A * B2 = 1. (K,n)
let A, B be Matrix of n,K; ::_thesis: ( B * A = 1. (K,n) implies ex B2 being Matrix of n,K st A * B2 = 1. (K,n) )
thus ( B * A = 1. (K,n) implies ex B2 being Matrix of n,K st A * B2 = 1. (K,n) ) ::_thesis: verum
proof
defpred S1[ Element of NAT ] means for D, B3 being Matrix of $1,K st B3 * D = 1. (K,$1) holds
ex B4 being Matrix of $1,K st D * B4 = 1. (K,$1);
assume A1: B * A = 1. (K,n) ; ::_thesis: ex B2 being Matrix of n,K st A * B2 = 1. (K,n)
A2: for k being Element of NAT st S1[k] holds
S1[k + 1]
proof
let k be Element of NAT ; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A3: S1[k] ; ::_thesis: S1[k + 1]
for A2, B3 being Matrix of k + 1,K st B3 * A2 = 1. (K,(k + 1)) holds
ex B4 being Matrix of k + 1,K st A2 * B4 = 1. (K,(k + 1))
proof
let A2, B2 be Matrix of k + 1,K; ::_thesis: ( B2 * A2 = 1. (K,(k + 1)) implies ex B4 being Matrix of k + 1,K st A2 * B4 = 1. (K,(k + 1)) )
A4: Indices (1. (K,(k + 1))) = [:(Seg (k + 1)),(Seg (k + 1)):] by MATRIX_1:24;
assume A5: B2 * A2 = 1. (K,(k + 1)) ; ::_thesis: ex B4 being Matrix of k + 1,K st A2 * B4 = 1. (K,(k + 1))
then A6: (Det B2) * (Det A2) = Det (1. (K,(k + 1))) by MATRIXR2:45;
now__::_thesis:_not_A2_=_0._(K,(k_+_1))
assume A2 = 0. (K,(k + 1)) ; ::_thesis: contradiction
then A2 = 0. (K,(k + 1),(k + 1)) by MATRIX_3:def_1;
then Det A2 = 0. K by MATRIX_7:15, NAT_1:12;
then A7: (Det B2) * (Det A2) = 0. K by VECTSP_1:6;
not 0. K = 1_ K ;
hence contradiction by A6, A7, MATRIX_7:16, NAT_1:12; ::_thesis: verum
end;
then consider B, C being Matrix of k + 1,K such that
A8: B is invertible and
A9: C is invertible and
A10: ((B * A2) * C) * (1,1) = 1. K and
A11: for i being Element of NAT st 1 < i & i <= k + 1 holds
((B * A2) * C) * (i,1) = 0. K and
A12: for j being Element of NAT st 1 < j & j <= k + 1 holds
((B * A2) * C) * (1,j) = 0. K by Th53;
set A3 = (B * A2) * C;
set B3 = ((C ~) * B2) * (B ~);
A13: width (((C ~) * B2) * (B ~)) = k + 1 by MATRIX_1:24;
A14: width ((B * A2) * C) = k + 1 by MATRIX_1:24;
A15: for j being Nat st 1 <= j & j <= len (Line (((B * A2) * C),1)) holds
(Line (((B * A2) * C),1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
proof
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Line (((B * A2) * C),1)) implies (Line (((B * A2) * C),1)) . j = (Base_FinSeq (K,(k + 1),1)) . j )
assume that
A16: 1 <= j and
A17: j <= len (Line (((B * A2) * C),1)) ; ::_thesis: (Line (((B * A2) * C),1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
A18: j <= k + 1 by A14, A17, MATRIX_1:def_7;
len (Line (((B * A2) * C),1)) = width ((B * A2) * C) by MATRIX_1:def_7;
then A19: j in Seg (width ((B * A2) * C)) by A16, A17, FINSEQ_1:1;
percases ( 1 = j or 1 < j ) by A16, XXREAL_0:1;
supposeA20: 1 = j ; ::_thesis: (Line (((B * A2) * C),1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
then (Line (((B * A2) * C),1)) . j = 1. K by A10, A19, MATRIX_1:def_7;
hence (Line (((B * A2) * C),1)) . j = (Base_FinSeq (K,(k + 1),1)) . j by A18, A20, Th24; ::_thesis: verum
end;
supposeA21: 1 < j ; ::_thesis: (Line (((B * A2) * C),1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
A22: j in NAT by ORDINAL1:def_12;
(Line (((B * A2) * C),1)) . j = ((B * A2) * C) * (1,j) by A19, MATRIX_1:def_7
.= 0. K by A12, A18, A21, A22 ;
hence (Line (((B * A2) * C),1)) . j = (Base_FinSeq (K,(k + 1),1)) . j by A18, A21, Th25; ::_thesis: verum
end;
end;
end;
A23: len <*(0. K)*> = 1 by FINSEQ_1:40;
deffunc H1( Nat, Nat) -> Element of the carrier of K = ((B * A2) * C) * (($1 + 1),($2 + 1));
A24: len (A2 * C) = k + 1 by MATRIX_1:24;
consider F being Matrix of k,k,K such that
A25: for i, j being Nat st [i,j] in Indices F holds
F * (i,j) = H1(i,j) from MATRIX_1:sch_1();
A26: len F = k by MATRIX_1:24;
deffunc H2( Nat, Nat) -> Element of the carrier of K = (((C ~) * B2) * (B ~)) * (($1 + 1),($2 + 1));
A27: len C = k + 1 by MATRIX_1:24;
consider G being Matrix of k,k,K such that
A28: for i, j being Nat st [i,j] in Indices G holds
G * (i,j) = H2(i,j) from MATRIX_1:sch_1();
A29: len ((B * A2) * C) = k + 1 by MATRIX_1:24;
A30: (((C ~) * B2) * (B ~)) * ((B * A2) * C) = (((C ~) * B2) * (B ~)) * (B * (A2 * C)) by Th17
.= ((((Inv C) * B2) * (Inv B)) * B) * (A2 * C) by Th17
.= (((Inv C) * B2) * ((Inv B) * B)) * (A2 * C) by Th17
.= (((Inv C) * B2) * (1. (K,(k + 1)))) * (A2 * C) by A8, Th18
.= ((Inv C) * B2) * ((1. (K,(k + 1))) * (A2 * C)) by Th17
.= ((Inv C) * B2) * (A2 * C) by A24, MATRIXR2:68
.= (((Inv C) * B2) * A2) * C by Th17
.= ((Inv C) * (1. (K,(k + 1)))) * C by A5, Th17
.= (Inv C) * ((1. (K,(k + 1))) * C) by Th17
.= (Inv C) * C by A27, MATRIXR2:68
.= 1. (K,(k + 1)) by A9, Th18 ;
A31: for i being Nat st 1 < i & i <= k + 1 holds
(((C ~) * B2) * (B ~)) * (i,1) = (1. (K,(k + 1))) * (i,1)
proof
A32: len (Base_FinSeq (K,(k + 1),1)) = k + 1 by Th23;
let i be Nat; ::_thesis: ( 1 < i & i <= k + 1 implies (((C ~) * B2) * (B ~)) * (i,1) = (1. (K,(k + 1))) * (i,1) )
A33: len (Col (((B * A2) * C),1)) = len ((B * A2) * C) by MATRIX_1:def_8
.= k + 1 by MATRIX_1:24 ;
A34: len ((B * A2) * C) = k + 1 by MATRIX_1:24;
A35: for k2 being Nat st 1 <= k2 & k2 <= len (Col (((B * A2) * C),1)) holds
(Col (((B * A2) * C),1)) . k2 = (Base_FinSeq (K,(k + 1),1)) . k2
proof
let k2 be Nat; ::_thesis: ( 1 <= k2 & k2 <= len (Col (((B * A2) * C),1)) implies (Col (((B * A2) * C),1)) . k2 = (Base_FinSeq (K,(k + 1),1)) . k2 )
assume that
A36: 1 <= k2 and
A37: k2 <= len (Col (((B * A2) * C),1)) ; ::_thesis: (Col (((B * A2) * C),1)) . k2 = (Base_FinSeq (K,(k + 1),1)) . k2
A38: k2 in NAT by ORDINAL1:def_12;
A39: now__::_thesis:_((B_*_A2)_*_C)_*_(k2,1)_=_(Base_FinSeq_(K,(k_+_1),1))_._k2
percases ( k2 = 1 or 1 < k2 ) by A36, XXREAL_0:1;
suppose k2 = 1 ; ::_thesis: ((B * A2) * C) * (k2,1) = (Base_FinSeq (K,(k + 1),1)) . k2
hence ((B * A2) * C) * (k2,1) = (Base_FinSeq (K,(k + 1),1)) . k2 by A10, A33, A37, Th24; ::_thesis: verum
end;
supposeA40: 1 < k2 ; ::_thesis: ((B * A2) * C) * (k2,1) = (Base_FinSeq (K,(k + 1),1)) . k2
hence ((B * A2) * C) * (k2,1) = 0. K by A11, A33, A38, A37
.= (Base_FinSeq (K,(k + 1),1)) . k2 by A33, A37, A40, Th25 ;
::_thesis: verum
end;
end;
end;
k2 in Seg (len ((B * A2) * C)) by A34, A33, A36, A37, FINSEQ_1:1;
then k2 in dom ((B * A2) * C) by FINSEQ_1:def_3;
hence (Col (((B * A2) * C),1)) . k2 = (Base_FinSeq (K,(k + 1),1)) . k2 by A39, MATRIX_1:def_8; ::_thesis: verum
end;
A41: len (Line ((((C ~) * B2) * (B ~)),i)) = width (((C ~) * B2) * (B ~)) by MATRIX_1:def_7
.= k + 1 by MATRIX_1:24 ;
assume A42: ( 1 < i & i <= k + 1 ) ; ::_thesis: (((C ~) * B2) * (B ~)) * (i,1) = (1. (K,(k + 1))) * (i,1)
then A43: 1 <= k + 1 by XXREAL_0:2;
A44: width (((C ~) * B2) * (B ~)) = k + 1 by MATRIX_1:24;
then A45: 1 in Seg (width (((C ~) * B2) * (B ~))) by A43, FINSEQ_1:1;
[i,1] in Indices ((((C ~) * B2) * (B ~)) * ((B * A2) * C)) by A42, A43, MATRIX_1:37;
then ((((C ~) * B2) * (B ~)) * ((B * A2) * C)) * (i,1) = |((Line ((((C ~) * B2) * (B ~)),i)),(Col (((B * A2) * C),1)))| by A44, A34, MATRIX_3:def_4
.= |((Line ((((C ~) * B2) * (B ~)),i)),(Base_FinSeq (K,(k + 1),1)))| by A33, A32, A35, FINSEQ_1:14
.= (Line ((((C ~) * B2) * (B ~)),i)) . 1 by A43, A41, Th35
.= (((C ~) * B2) * (B ~)) * (i,1) by A45, MATRIX_1:def_7 ;
hence (((C ~) * B2) * (B ~)) * (i,1) = (1. (K,(k + 1))) * (i,1) by A30; ::_thesis: verum
end;
for i, j being Element of NAT st 1 <= i & i <= k & 1 <= j & j <= k holds
(G * F) * (i,j) = IFEQ (i,j,(1. K),(0. K))
proof
let i, j be Element of NAT ; ::_thesis: ( 1 <= i & i <= k & 1 <= j & j <= k implies (G * F) * (i,j) = IFEQ (i,j,(1. K),(0. K)) )
assume that
A46: 1 <= i and
A47: i <= k and
A48: 1 <= j and
A49: j <= k ; ::_thesis: (G * F) * (i,j) = IFEQ (i,j,(1. K),(0. K))
A50: [i,j] in Indices (G * F) by A46, A47, A48, A49, MATRIX_1:37;
A51: for k2 being Nat st k2 in dom <*(0. K)*> holds
(Col (((B * A2) * C),(j + 1))) . k2 = <*(0. K)*> . k2
proof
( j + 1 <= k + 1 & 1 < j + 1 ) by A48, A49, NAT_1:13, XREAL_1:7;
then A52: ((B * A2) * C) * (1,(j + 1)) = 0. K by A12;
let k2 be Nat; ::_thesis: ( k2 in dom <*(0. K)*> implies (Col (((B * A2) * C),(j + 1))) . k2 = <*(0. K)*> . k2 )
assume k2 in dom <*(0. K)*> ; ::_thesis: (Col (((B * A2) * C),(j + 1))) . k2 = <*(0. K)*> . k2
then k2 in Seg (len <*(0. K)*>) by FINSEQ_1:def_3;
then k2 in {1} by FINSEQ_1:2, FINSEQ_1:40;
then A53: k2 = 1 by TARSKI:def_1;
1 <= k + 1 by NAT_1:11;
then k2 in Seg (len ((B * A2) * C)) by A29, A53, FINSEQ_1:1;
then k2 in dom ((B * A2) * C) by FINSEQ_1:def_3;
then (Col (((B * A2) * C),(j + 1))) . k2 = 0. K by A53, A52, MATRIX_1:def_8;
hence (Col (((B * A2) * C),(j + 1))) . k2 = <*(0. K)*> . k2 by A53, FINSEQ_1:40; ::_thesis: verum
end;
A54: len (Col (F,j)) = len F by MATRIX_1:def_8
.= k by MATRIX_1:24 ;
A55: i + 1 <= k + 1 by A47, XREAL_1:7;
A56: for k2 being Nat st k2 in dom <*(0. K)*> holds
(Line ((((C ~) * B2) * (B ~)),(i + 1))) . k2 = <*(0. K)*> . k2
proof
let k2 be Nat; ::_thesis: ( k2 in dom <*(0. K)*> implies (Line ((((C ~) * B2) * (B ~)),(i + 1))) . k2 = <*(0. K)*> . k2 )
A57: 1 < i + 1 by A46, NAT_1:13;
1 <= 1 + k by NAT_1:11;
then A58: [(i + 1),1] in Indices (1. (K,(k + 1))) by A55, A57, MATRIX_1:37;
A59: (((C ~) * B2) * (B ~)) * ((i + 1),1) = (1. (K,(k + 1))) * ((i + 1),1) by A31, A55, A57
.= 0. K by A57, A58, MATRIX_1:def_11 ;
assume k2 in dom <*(0. K)*> ; ::_thesis: (Line ((((C ~) * B2) * (B ~)),(i + 1))) . k2 = <*(0. K)*> . k2
then k2 in Seg (len <*(0. K)*>) by FINSEQ_1:def_3;
then k2 in {1} by FINSEQ_1:2, FINSEQ_1:40;
then A60: k2 = 1 by TARSKI:def_1;
1 <= k + 1 by NAT_1:11;
then k2 in Seg (width (((C ~) * B2) * (B ~))) by A13, A60, FINSEQ_1:1;
then (Line ((((C ~) * B2) * (B ~)),(i + 1))) . k2 = 0. K by A60, A59, MATRIX_1:def_7;
hence (Line ((((C ~) * B2) * (B ~)),(i + 1))) . k2 = <*(0. K)*> . k2 by A60, FINSEQ_1:40; ::_thesis: verum
end;
A61: for k2 being Nat st k2 in dom (Col (F,j)) holds
(Col (((B * A2) * C),(j + 1))) . ((len <*(0. K)*>) + k2) = (Col (F,j)) . k2
proof
reconsider j0 = j + 1 as Element of NAT ;
let k2 be Nat; ::_thesis: ( k2 in dom (Col (F,j)) implies (Col (((B * A2) * C),(j + 1))) . ((len <*(0. K)*>) + k2) = (Col (F,j)) . k2 )
A62: len (Col (F,(j0 -' 1))) = len F by MATRIX_1:def_8;
A63: j0 -' 1 = j by NAT_D:34;
assume A64: k2 in dom (Col (F,j)) ; ::_thesis: (Col (((B * A2) * C),(j + 1))) . ((len <*(0. K)*>) + k2) = (Col (F,j)) . k2
then A65: k2 in Seg (len (Col (F,(j0 -' 1)))) by A63, FINSEQ_1:def_3;
then A66: k2 <= k by A26, A62, FINSEQ_1:1;
then ( 1 <= k2 + 1 & k2 + 1 <= k + 1 ) by NAT_1:11, XREAL_1:7;
then A67: k2 + 1 in dom ((B * A2) * C) by A29, FINSEQ_3:25;
1 <= k2 by A65, FINSEQ_1:1;
then [k2,j] in Indices F by A48, A49, A66, MATRIX_1:37;
then [k2,(j0 -' 1)] in Indices F by NAT_D:34;
then A68: ((B * A2) * C) * ((k2 + 1),((j0 -' 1) + 1)) = F * (k2,(j0 -' 1)) by A25;
k2 in Seg k by A26, A64, A62, A63, FINSEQ_1:def_3;
then k2 in dom F by A26, FINSEQ_1:def_3;
then ((B * A2) * C) * ((k2 + 1),((j0 -' 1) + 1)) = (Col (F,(j0 -' 1))) . k2 by A68, MATRIX_1:def_8;
hence (Col (((B * A2) * C),(j + 1))) . ((len <*(0. K)*>) + k2) = (Col (F,j)) . k2 by A23, A63, A67, MATRIX_1:def_8; ::_thesis: verum
end;
A69: len (Line (G,i)) = width G by MATRIX_1:def_7
.= k by MATRIX_1:24 ;
A70: k + 1 = (len <*(0. K)*>) + k by FINSEQ_1:39;
A71: for k2 being Nat st k2 in dom (Line (G,i)) holds
(Line ((((C ~) * B2) * (B ~)),(i + 1))) . ((len <*(0. K)*>) + k2) = (Line (G,i)) . k2
proof
let k2 be Nat; ::_thesis: ( k2 in dom (Line (G,i)) implies (Line ((((C ~) * B2) * (B ~)),(i + 1))) . ((len <*(0. K)*>) + k2) = (Line (G,i)) . k2 )
A72: ( width (((C ~) * B2) * (B ~)) = k + 1 & 1 <= k2 + 1 ) by MATRIX_1:24, NAT_1:11;
assume A73: k2 in dom (Line (G,i)) ; ::_thesis: (Line ((((C ~) * B2) * (B ~)),(i + 1))) . ((len <*(0. K)*>) + k2) = (Line (G,i)) . k2
then A74: k2 in Seg (len (Line (G,i))) by FINSEQ_1:def_3;
A75: len (Line (G,i)) = width G by MATRIX_1:def_7
.= k by MATRIX_1:24 ;
then A76: k2 <= k by A74, FINSEQ_1:1;
1 <= k2 by A74, FINSEQ_1:1;
then [i,k2] in Indices G by A46, A47, A76, MATRIX_1:37;
then A77: (((C ~) * B2) * (B ~)) * ((i + 1),(k2 + 1)) = G * (i,k2) by A28;
k2 in Seg k by A73, A75, FINSEQ_1:def_3;
then k2 in Seg (width G) by MATRIX_1:24;
then A78: (((C ~) * B2) * (B ~)) * ((i + 1),(k2 + 1)) = (Line (G,i)) . k2 by A77, MATRIX_1:def_7;
k2 + 1 <= k + 1 by A76, XREAL_1:7;
then k2 + 1 in Seg (width (((C ~) * B2) * (B ~))) by A72, FINSEQ_1:1;
then (Line ((((C ~) * B2) * (B ~)),(i + 1))) . (k2 + 1) = (Line (G,i)) . k2 by A78, MATRIX_1:def_7;
hence (Line ((((C ~) * B2) * (B ~)),(i + 1))) . ((len <*(0. K)*>) + k2) = (Line (G,i)) . k2 by FINSEQ_1:40; ::_thesis: verum
end;
A79: width G = k by MATRIX_1:24;
( len (Line ((((C ~) * B2) * (B ~)),(i + 1))) = width (((C ~) * B2) * (B ~)) & len (Line (G,i)) = width G ) by MATRIX_1:def_7;
then dom (Line ((((C ~) * B2) * (B ~)),(i + 1))) = Seg ((len <*(0. K)*>) + (len (Line (G,i)))) by A13, A79, A70, FINSEQ_1:def_3;
then A80: <*(0. K)*> ^ (Line (G,i)) = Line ((((C ~) * B2) * (B ~)),(i + 1)) by A56, A71, FINSEQ_1:def_7;
A81: ( 1 <= i + 1 & 1 <= j + 1 ) by NAT_1:11;
A82: j + 1 <= k + 1 by A49, XREAL_1:7;
A83: now__::_thesis:_(1._(K,(k_+_1)))_*_((i_+_1),(j_+_1))_=_IFEQ_(i,j,(1._K),(0._K))
percases ( i = j or i <> j ) ;
supposeA84: i = j ; ::_thesis: (1. (K,(k + 1))) * ((i + 1),(j + 1)) = IFEQ (i,j,(1. K),(0. K))
[(i + 1),(j + 1)] in Indices (1. (K,(k + 1))) by A81, A55, A82, MATRIX_1:37;
then (1. (K,(k + 1))) * ((i + 1),(j + 1)) = 1. K by A84, MATRIX_1:def_11;
hence (1. (K,(k + 1))) * ((i + 1),(j + 1)) = IFEQ (i,j,(1. K),(0. K)) by A84, FUNCOP_1:def_8; ::_thesis: verum
end;
supposeA85: i <> j ; ::_thesis: (1. (K,(k + 1))) * ((i + 1),(j + 1)) = IFEQ (i,j,(1. K),(0. K))
[(i + 1),(j + 1)] in Indices (1. (K,(k + 1))) by A81, A55, A82, MATRIX_1:37;
then ( i + 1 <> j + 1 implies (1. (K,(k + 1))) * ((i + 1),(j + 1)) = 0. K ) by MATRIX_1:def_11;
hence (1. (K,(k + 1))) * ((i + 1),(j + 1)) = IFEQ (i,j,(1. K),(0. K)) by A85, FUNCOP_1:def_8; ::_thesis: verum
end;
end;
end;
( len (Col (((B * A2) * C),(j + 1))) = len ((B * A2) * C) & len (Col (F,j)) = len F ) by MATRIX_1:def_8;
then dom (Col (((B * A2) * C),(j + 1))) = Seg ((len <*(0. K)*>) + (len (Col (F,j)))) by A29, A26, A70, FINSEQ_1:def_3;
then A86: <*(0. K)*> ^ (Col (F,j)) = Col (((B * A2) * C),(j + 1)) by A51, A61, FINSEQ_1:def_7;
[(i + 1),(j + 1)] in Indices ((((C ~) * B2) * (B ~)) * ((B * A2) * C)) by A81, A55, A82, MATRIX_1:37;
then ((((C ~) * B2) * (B ~)) * ((B * A2) * C)) * ((i + 1),(j + 1)) = |((Line ((((C ~) * B2) * (B ~)),(i + 1))),(Col (((B * A2) * C),(j + 1))))| by A13, A29, MATRIX_3:def_4
.= |(<*(0. K)*>,<*(0. K)*>)| + |((Line (G,i)),(Col (F,j)))| by A23, A80, A86, A69, A54, Th12
.= (0. K) + |((Line (G,i)),(Col (F,j)))| by Th22
.= |((Line (G,i)),(Col (F,j)))| by RLVECT_1:4 ;
hence (G * F) * (i,j) = IFEQ (i,j,(1. K),(0. K)) by A30, A26, A50, A79, A83, MATRIX_3:def_4; ::_thesis: verum
end;
then G * F = 1. (K,k) by Th29;
then consider G2 being Matrix of k,K such that
A87: F * G2 = 1. (K,k) by A3;
deffunc H3( Nat, Nat) -> Element of the carrier of K = IFEQ ($1,1,(IFEQ ($2,1,(1. K),(0. K))),(IFEQ ($2,1,(0. K),(G2 * (($1 -' 1),($2 -' 1))))));
A88: len G2 = k by MATRIX_1:24;
consider B4 being Matrix of k + 1,k + 1,K such that
A89: for i, j being Nat st [i,j] in Indices B4 holds
B4 * (i,j) = H3(i,j) from MATRIX_1:sch_1();
A90: len B4 = k + 1 by MATRIX_1:24;
A91: width B4 = k + 1 by MATRIX_1:24;
A92: for j being Nat st 1 <= j & j <= len (Col (B4,1)) holds
(Col (B4,1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
proof
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Col (B4,1)) implies (Col (B4,1)) . j = (Base_FinSeq (K,(k + 1),1)) . j )
assume that
A93: 1 <= j and
A94: j <= len (Col (B4,1)) ; ::_thesis: (Col (B4,1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
A95: j <= k + 1 by A90, A94, MATRIX_1:def_8;
then 1 <= k + 1 by A93, XXREAL_0:2;
then A96: [j,1] in Indices B4 by A93, A95, MATRIX_1:37;
len (Col (B4,1)) = len B4 by MATRIX_1:def_8;
then j in Seg (width B4) by A90, A91, A93, A94, FINSEQ_1:1;
then A97: j in dom B4 by A90, A91, FINSEQ_1:def_3;
percases ( 1 = j or 1 < j ) by A93, XXREAL_0:1;
supposeA98: 1 = j ; ::_thesis: (Col (B4,1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
(Col (B4,1)) . j = B4 * (j,1) by A97, MATRIX_1:def_8
.= IFEQ (j,1,(IFEQ (1,1,(1. K),(0. K))),(IFEQ (1,1,(0. K),(G2 * ((j -' 1),(1 -' 1)))))) by A89, A96
.= IFEQ (1,1,(1. K),(0. K)) by A98, FUNCOP_1:def_8
.= 1. K by FUNCOP_1:def_8 ;
hence (Col (B4,1)) . j = (Base_FinSeq (K,(k + 1),1)) . j by A95, A98, Th24; ::_thesis: verum
end;
supposeA99: 1 < j ; ::_thesis: (Col (B4,1)) . j = (Base_FinSeq (K,(k + 1),1)) . j
(Col (B4,1)) . j = B4 * (j,1) by A97, MATRIX_1:def_8
.= IFEQ (j,1,(IFEQ (1,1,(1. K),(0. K))),(IFEQ (1,1,(0. K),(G2 * ((j -' 1),(1 -' 1)))))) by A89, A96
.= IFEQ (1,1,(0. K),(G2 * ((j -' 1),(1 -' 1)))) by A99, FUNCOP_1:def_8
.= 0. K by FUNCOP_1:def_8 ;
hence (Col (B4,1)) . j = (Base_FinSeq (K,(k + 1),1)) . j by A95, A99, Th25; ::_thesis: verum
end;
end;
end;
A100: width (((B * A2) * C) * B4) = k + 1 by MATRIX_1:24;
A101: Indices (((B * A2) * C) * B4) = [:(Seg (k + 1)),(Seg (k + 1)):] by MATRIX_1:24;
len (Line (((B * A2) * C),1)) = width ((B * A2) * C) by MATRIX_1:def_7
.= k + 1 by MATRIX_1:24 ;
then A102: len (Line (((B * A2) * C),1)) = len (Base_FinSeq (K,(k + 1),1)) by Th23;
then A103: Line (((B * A2) * C),1) = Base_FinSeq (K,(k + 1),1) by A15, FINSEQ_1:14;
A104: width F = k by MATRIX_1:24;
A105: 1 <= k + 1 by NAT_1:11;
len (Col (B4,1)) = len B4 by MATRIX_1:def_8
.= k + 1 by MATRIX_1:24 ;
then A106: len (Col (B4,1)) = len (Base_FinSeq (K,(k + 1),1)) by Th23;
then A107: Col (B4,1) = Base_FinSeq (K,(k + 1),1) by A92, FINSEQ_1:14;
for i, j being Nat st [i,j] in Indices (((B * A2) * C) * B4) holds
(((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
proof
let i, j be Nat; ::_thesis: ( [i,j] in Indices (((B * A2) * C) * B4) implies (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) )
reconsider i0 = i, j0 = j as Element of NAT by ORDINAL1:def_12;
A108: len (Line (F,(i -' 1))) = width F by MATRIX_1:def_7
.= k by MATRIX_1:24 ;
A109: len (Col (G2,(j -' 1))) = len G2 by MATRIX_1:def_8
.= k by MATRIX_1:24 ;
A110: len (Line (((B * A2) * C),i)) = width ((B * A2) * C) by MATRIX_1:def_7
.= k + 1 by MATRIX_1:24 ;
A111: len (Col (B4,j)) = len B4 by MATRIX_1:def_8
.= k + 1 by MATRIX_1:24 ;
assume A112: [i,j] in Indices (((B * A2) * C) * B4) ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
then A113: [i,j] in [:(Seg (k + 1)),(Seg (k + 1)):] by MATRIX_1:24;
then A114: [i,j] in Indices (1. (K,(k + 1))) by MATRIX_1:24;
A115: i in Seg (k + 1) by A101, A112, ZFMISC_1:87;
then A116: 1 <= i by FINSEQ_1:1;
A117: i <= k + 1 by A115, FINSEQ_1:1;
A118: j in Seg (k + 1) by A100, A112, ZFMISC_1:87;
then A119: 1 <= j by FINSEQ_1:1;
A120: len B4 = k + 1 by MATRIX_1:24;
A121: width ((B * A2) * C) = k + 1 by MATRIX_1:24;
A122: j <= k + 1 by A118, FINSEQ_1:1;
A123: [i,j] in Indices B4 by A101, A112, MATRIX_1:24;
now__::_thesis:_(((B_*_A2)_*_C)_*_B4)_*_(i,j)_=_(1._(K,(k_+_1)))_*_(i,j)
percases ( i = 1 or 1 < i ) by A116, XXREAL_0:1;
supposeA124: i = 1 ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
now__::_thesis:_(((B_*_A2)_*_C)_*_B4)_*_(i,j)_=_(1._(K,(k_+_1)))_*_(i,j)
percases ( j = 1 or j > 1 ) by A119, XXREAL_0:1;
supposeA125: j = 1 ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
(((B * A2) * C) * B4) * (i,j) = |((Line (((B * A2) * C),i0)),(Col (B4,j0)))| by A112, A120, A121, MATRIX_3:def_4
.= 1. K by A103, A107, A105, A124, A125, Th36 ;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) by A114, A124, A125, MATRIX_1:def_11; ::_thesis: verum
end;
supposeA126: j > 1 ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
1 <= len B4 by A105, MATRIX_1:24;
then A127: 1 in dom B4 by FINSEQ_3:25;
(((B * A2) * C) * B4) * (i,j) = |((Line (((B * A2) * C),i0)),(Col (B4,j0)))| by A112, A120, A121, MATRIX_3:def_4
.= |((Base_FinSeq (K,(k + 1),1)),(Col (B4,j0)))| by A102, A15, A124, FINSEQ_1:14
.= |((Col (B4,j0)),(Base_FinSeq (K,(k + 1),1)))| by FVSUM_1:90
.= (Col (B4,j0)) . 1 by A105, A111, Th35
.= B4 * (1,j) by A127, MATRIX_1:def_8
.= IFEQ (i,1,(IFEQ (j,1,(1. K),(0. K))),(IFEQ (j,1,(0. K),(G2 * ((i -' 1),(j -' 1)))))) by A89, A123, A124
.= IFEQ (j,1,(1. K),(0. K)) by A124, FUNCOP_1:def_8
.= 0. K by A126, FUNCOP_1:def_8 ;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) by A4, A113, A124, A126, MATRIX_1:def_11; ::_thesis: verum
end;
end;
end;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) ; ::_thesis: verum
end;
supposeA128: 1 < i ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
then A129: 1 + 1 <= i by NAT_1:13;
now__::_thesis:_(((B_*_A2)_*_C)_*_B4)_*_(i,j)_=_(1._(K,(k_+_1)))_*_(i,j)
percases ( j = 1 or j > 1 ) by A119, XXREAL_0:1;
supposeA130: j = 1 ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
A131: 1 in Seg (width ((B * A2) * C)) by A14, A105, FINSEQ_1:1;
A132: len (Line (((B * A2) * C),i)) = width ((B * A2) * C) by MATRIX_1:def_7
.= k + 1 by MATRIX_1:24 ;
(((B * A2) * C) * B4) * (i,j) = |((Line (((B * A2) * C),i0)),(Col (B4,j0)))| by A112, A120, A121, MATRIX_3:def_4
.= |((Line (((B * A2) * C),i)),(Base_FinSeq (K,(k + 1),1)))| by A106, A92, A130, FINSEQ_1:14
.= (Line (((B * A2) * C),i)) . 1 by A105, A132, Th35
.= ((B * A2) * C) * (i0,1) by A131, MATRIX_1:def_7
.= 0. K by A11, A117, A128 ;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) by A114, A128, A130, MATRIX_1:def_11; ::_thesis: verum
end;
supposeA133: j > 1 ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
then 1 + 1 <= j by NAT_1:13;
then A134: 1 <= j - 1 by XREAL_1:19;
A135: i -' 1 = i - 1 by A128, XREAL_1:233;
then A136: i -' 1 <= k by A117, XREAL_1:20;
A137: 1 <= i - 1 by A129, XREAL_1:19;
then A138: i -' 1 in Seg k by A135, A136, FINSEQ_1:1;
A139: len (Line (F,(i -' 1))) = width F by MATRIX_1:def_7
.= k by MATRIX_1:24 ;
A140: for k2 being Nat st k2 in dom (Line (F,(i -' 1))) holds
(Line (((B * A2) * C),((i -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Line (F,(i -' 1))) . k2
proof
let k2 be Nat; ::_thesis: ( k2 in dom (Line (F,(i -' 1))) implies (Line (((B * A2) * C),((i -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Line (F,(i -' 1))) . k2 )
assume A141: k2 in dom (Line (F,(i -' 1))) ; ::_thesis: (Line (((B * A2) * C),((i -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Line (F,(i -' 1))) . k2
then A142: k2 in Seg (len (Line (F,(i -' 1)))) by FINSEQ_1:def_3;
then A143: k2 <= k by A139, FINSEQ_1:1;
then ( 1 <= k2 + 1 & k2 + 1 <= k + 1 ) by NAT_1:11, XREAL_1:7;
then A144: k2 + 1 in Seg (width ((B * A2) * C)) by A121, FINSEQ_1:1;
1 <= k2 by A142, FINSEQ_1:1;
then [(i -' 1),k2] in Indices F by A135, A137, A136, A143, MATRIX_1:37;
then A145: ((B * A2) * C) * (((i -' 1) + 1),(k2 + 1)) = F * ((i -' 1),k2) by A25;
k2 in Seg (width F) by A104, A139, A141, FINSEQ_1:def_3;
then ((B * A2) * C) * (((i -' 1) + 1),(k2 + 1)) = (Line (F,(i -' 1))) . k2 by A145, MATRIX_1:def_7;
then (Line (((B * A2) * C),((i -' 1) + 1))) . (k2 + 1) = (Line (F,(i -' 1))) . k2 by A144, MATRIX_1:def_7;
hence (Line (((B * A2) * C),((i -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Line (F,(i -' 1))) . k2 by FINSEQ_1:40; ::_thesis: verum
end;
A146: for k2 being Nat st k2 in dom <*(0. K)*> holds
(Line (((B * A2) * C),((i -' 1) + 1))) . k2 = <*(0. K)*> . k2
proof
let k2 be Nat; ::_thesis: ( k2 in dom <*(0. K)*> implies (Line (((B * A2) * C),((i -' 1) + 1))) . k2 = <*(0. K)*> . k2 )
assume k2 in dom <*(0. K)*> ; ::_thesis: (Line (((B * A2) * C),((i -' 1) + 1))) . k2 = <*(0. K)*> . k2
then k2 in Seg (len <*(0. K)*>) by FINSEQ_1:def_3;
then k2 in {1} by FINSEQ_1:2, FINSEQ_1:40;
then A147: k2 = 1 by TARSKI:def_1;
A148: ((B * A2) * C) * (i0,1) = 0. K by A11, A117, A128;
1 <= k + 1 by NAT_1:11;
then k2 in Seg (width ((B * A2) * C)) by A121, A147, FINSEQ_1:1;
then (Line (((B * A2) * C),i)) . k2 = 0. K by A147, A148, MATRIX_1:def_7;
hence (Line (((B * A2) * C),((i -' 1) + 1))) . k2 = <*(0. K)*> . k2 by A135, A147, FINSEQ_1:40; ::_thesis: verum
end;
dom (Line (((B * A2) * C),((i -' 1) + 1))) = Seg (k + 1) by A110, A135, FINSEQ_1:def_3
.= Seg ((len <*(0. K)*>) + (len (Line (F,(i -' 1))))) by A139, FINSEQ_1:39 ;
then A149: <*(0. K)*> ^ (Line (F,(i -' 1))) = Line (((B * A2) * C),((i -' 1) + 1)) by A146, A140, FINSEQ_1:def_7;
A150: (j -' 1) + 1 = (j - 1) + 1 by A133, XREAL_1:233
.= j ;
A151: j -' 1 = j - 1 by A133, XREAL_1:233;
then j -' 1 <= k by A122, XREAL_1:20;
then j -' 1 in Seg k by A151, A134, FINSEQ_1:1;
then A152: [(i -' 1),(j -' 1)] in [:(Seg k),(Seg k):] by A138, ZFMISC_1:87;
then A153: [(i -' 1),(j -' 1)] in Indices (F * G2) by MATRIX_1:24;
A154: for k2 being Nat st k2 in dom <*(0. K)*> holds
(Col (B4,((j -' 1) + 1))) . k2 = <*(0. K)*> . k2
proof
1 <= 1 + k by NAT_1:11;
then [1,j] in Indices B4 by A119, A122, MATRIX_1:37;
then B4 * (1,j) = IFEQ (1,1,(IFEQ (j,1,(1. K),(0. K))),(IFEQ (j,1,(0. K),(G2 * ((1 -' 1),(j -' 1)))))) by A89;
then A155: B4 * (1,j) = IFEQ (j,1,(1. K),(0. K)) by FUNCOP_1:def_8
.= 0. K by A133, FUNCOP_1:def_8 ;
let k2 be Nat; ::_thesis: ( k2 in dom <*(0. K)*> implies (Col (B4,((j -' 1) + 1))) . k2 = <*(0. K)*> . k2 )
assume k2 in dom <*(0. K)*> ; ::_thesis: (Col (B4,((j -' 1) + 1))) . k2 = <*(0. K)*> . k2
then k2 in Seg (len <*(0. K)*>) by FINSEQ_1:def_3;
then k2 in {1} by FINSEQ_1:2, FINSEQ_1:40;
then A156: k2 = 1 by TARSKI:def_1;
1 <= k + 1 by NAT_1:11;
then k2 in Seg (len B4) by A120, A156, FINSEQ_1:1;
then k2 in dom B4 by FINSEQ_1:def_3;
then (Col (B4,j)) . k2 = 0. K by A156, A155, MATRIX_1:def_8;
hence (Col (B4,((j -' 1) + 1))) . k2 = <*(0. K)*> . k2 by A151, A156, FINSEQ_1:40; ::_thesis: verum
end;
A157: len (Col (G2,(j -' 1))) = len G2 by MATRIX_1:def_8
.= k by MATRIX_1:24 ;
A158: for k2 being Nat st k2 in dom (Col (G2,(j -' 1))) holds
(Col (B4,((j -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Col (G2,(j -' 1))) . k2
proof
let k2 be Nat; ::_thesis: ( k2 in dom (Col (G2,(j -' 1))) implies (Col (B4,((j -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Col (G2,(j -' 1))) . k2 )
assume A159: k2 in dom (Col (G2,(j -' 1))) ; ::_thesis: (Col (B4,((j -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Col (G2,(j -' 1))) . k2
then 1 <= k2 by FINSEQ_3:25;
then A160: 1 < k2 + 1 by NAT_1:13;
k2 in Seg k by A157, A159, FINSEQ_1:def_3;
then A161: k2 in dom G2 by A88, FINSEQ_1:def_3;
k2 <= k by A157, A159, FINSEQ_3:25;
then A162: ( 1 <= k2 + 1 & k2 + 1 <= k + 1 ) by NAT_1:11, XREAL_1:7;
then [(k2 + 1),j] in Indices B4 by A119, A122, MATRIX_1:37;
then B4 * ((k2 + 1),j) = IFEQ ((k2 + 1),1,(IFEQ (j,1,(1. K),(0. K))),(IFEQ (j,1,(0. K),(G2 * (((k2 + 1) -' 1),(j -' 1)))))) by A89;
then B4 * ((k2 + 1),j) = IFEQ (j,1,(0. K),(G2 * (((k2 + 1) -' 1),(j -' 1)))) by A160, FUNCOP_1:def_8
.= G2 * (((k2 + 1) -' 1),(j -' 1)) by A133, FUNCOP_1:def_8
.= G2 * (k2,(j -' 1)) by NAT_D:34 ;
then A163: B4 * ((k2 + 1),((j -' 1) + 1)) = (Col (G2,(j -' 1))) . k2 by A151, A161, MATRIX_1:def_8;
k2 + 1 in dom B4 by A120, A162, FINSEQ_3:25;
then (Col (B4,((j -' 1) + 1))) . (k2 + 1) = (Col (G2,(j -' 1))) . k2 by A163, MATRIX_1:def_8;
hence (Col (B4,((j -' 1) + 1))) . ((len <*(0. K)*>) + k2) = (Col (G2,(j -' 1))) . k2 by FINSEQ_1:40; ::_thesis: verum
end;
dom (Col (B4,((j -' 1) + 1))) = Seg (len (Col (B4,((j -' 1) + 1)))) by FINSEQ_1:def_3
.= Seg ((len <*(0. K)*>) + (len (Col (G2,(j -' 1))))) by A111, A151, A157, FINSEQ_1:39 ;
then A164: <*(0. K)*> ^ (Col (G2,(j -' 1))) = Col (B4,((j -' 1) + 1)) by A154, A158, FINSEQ_1:def_7;
(i -' 1) + 1 = (i - 1) + 1 by A128, XREAL_1:233
.= i ;
then A165: (((B * A2) * C) * B4) * (i,j) = |((Line (((B * A2) * C),((i -' 1) + 1))),(Col (B4,((j -' 1) + 1))))| by A112, A120, A121, A150, MATRIX_3:def_4
.= |(<*(0. K)*>,<*(0. K)*>)| + |((Line (F,(i -' 1))),(Col (G2,(j -' 1))))| by A23, A108, A109, A149, A164, Th12
.= (0. K) + |((Line (F,(i -' 1))),(Col (G2,(j -' 1))))| by Th22
.= (0. K) + ((F * G2) * ((i -' 1),(j -' 1))) by A104, A88, A153, MATRIX_3:def_4
.= (1. (K,k)) * ((i -' 1),(j -' 1)) by A87, RLVECT_1:4 ;
A166: [(i -' 1),(j -' 1)] in Indices (1. (K,k)) by A152, MATRIX_1:24;
now__::_thesis:_(((B_*_A2)_*_C)_*_B4)_*_(i,j)_=_(1._(K,(k_+_1)))_*_(i,j)
percases ( i = j or i <> j ) ;
supposeA167: i = j ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
then (1. (K,(k + 1))) * (i0,j0) = 1. K by A114, MATRIX_1:def_11;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) by A166, A165, A167, MATRIX_1:def_11; ::_thesis: verum
end;
supposeA168: i <> j ; ::_thesis: (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j)
then i - 1 <> j - 1 ;
then i0 -' 1 <> j0 -' 1 by A128, A151, XREAL_1:233;
then (1. (K,k)) * ((i0 -' 1),(j0 -' 1)) = 0. K by A166, MATRIX_1:def_11;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) by A114, A165, A168, MATRIX_1:def_11; ::_thesis: verum
end;
end;
end;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) ; ::_thesis: verum
end;
end;
end;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) ; ::_thesis: verum
end;
end;
end;
hence (((B * A2) * C) * B4) * (i,j) = (1. (K,(k + 1))) * (i,j) ; ::_thesis: verum
end;
then ( width (Inv B) = k + 1 & ((B * A2) * C) * B4 = 1. (K,(k + 1)) ) by MATRIX_1:24, MATRIX_1:27;
then (Inv B) * (((B * A2) * C) * B4) = Inv B by MATRIXR2:67;
then ((Inv B) * (((B * A2) * C) * B4)) * B = 1. (K,(k + 1)) by A8, Th18;
then ((Inv B) * ((B * A2) * (C * B4))) * B = 1. (K,(k + 1)) by Th17;
then ((Inv B) * (B * (A2 * (C * B4)))) * B = 1. (K,(k + 1)) by Th17;
then (((Inv B) * B) * (A2 * (C * B4))) * B = 1. (K,(k + 1)) by Th17;
then ( len (A2 * (C * B4)) = k + 1 & ((1. (K,(k + 1))) * (A2 * (C * B4))) * B = 1. (K,(k + 1)) ) by A8, Th18, MATRIX_1:24;
then (A2 * (C * B4)) * B = 1. (K,(k + 1)) by MATRIXR2:68;
then A2 * ((C * B4) * B) = 1. (K,(k + 1)) by Th17;
hence ex B4 being Matrix of k + 1,K st A2 * B4 = 1. (K,(k + 1)) ; ::_thesis: verum
end;
hence S1[k + 1] ; ::_thesis: verum
end;
for D, B0 being Matrix of 0 ,K st B0 * D = 1. (K,0) holds
ex B1 being Matrix of 0 ,K st D * B1 = 1. (K,0)
proof
let D, B0 be Matrix of 0 ,K; ::_thesis: ( B0 * D = 1. (K,0) implies ex B1 being Matrix of 0 ,K st D * B1 = 1. (K,0) )
assume B0 * D = 1. (K,0) ; ::_thesis: ex B1 being Matrix of 0 ,K st D * B1 = 1. (K,0)
D * (0. (K,0)) = 1. (K,0) by Th15;
hence ex B1 being Matrix of 0 ,K st D * B1 = 1. (K,0) ; ::_thesis: verum
end;
then A169: S1[ 0 ] ;
for k being Element of NAT holds S1[k] from NAT_1:sch_1(A169, A2);
hence ex B2 being Matrix of n,K st A * B2 = 1. (K,n) by A1; ::_thesis: verum
end;
end;
theorem Th55: :: MATRIX14:55
for n being Element of NAT
for K being Field
for A being Matrix of n,K holds
( ex B1 being Matrix of n,K st B1 * A = 1. (K,n) iff ex B2 being Matrix of n,K st A * B2 = 1. (K,n) )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A being Matrix of n,K holds
( ex B1 being Matrix of n,K st B1 * A = 1. (K,n) iff ex B2 being Matrix of n,K st A * B2 = 1. (K,n) )
let K be Field; ::_thesis: for A being Matrix of n,K holds
( ex B1 being Matrix of n,K st B1 * A = 1. (K,n) iff ex B2 being Matrix of n,K st A * B2 = 1. (K,n) )
let A be Matrix of n,K; ::_thesis: ( ex B1 being Matrix of n,K st B1 * A = 1. (K,n) iff ex B2 being Matrix of n,K st A * B2 = 1. (K,n) )
percases ( n > 0 or n = 0 ) ;
supposeA1: n > 0 ; ::_thesis: ( ex B1 being Matrix of n,K st B1 * A = 1. (K,n) iff ex B2 being Matrix of n,K st A * B2 = 1. (K,n) )
thus ( ex B being Matrix of n,K st B * A = 1. (K,n) implies ex B2 being Matrix of n,K st A * B2 = 1. (K,n) ) by Th54; ::_thesis: ( ex B2 being Matrix of n,K st A * B2 = 1. (K,n) implies ex B1 being Matrix of n,K st B1 * A = 1. (K,n) )
thus ( ex B being Matrix of n,K st A * B = 1. (K,n) implies ex B2 being Matrix of n,K st B2 * A = 1. (K,n) ) ::_thesis: verum
proof
assume ex B being Matrix of n,K st A * B = 1. (K,n) ; ::_thesis: ex B2 being Matrix of n,K st B2 * A = 1. (K,n)
then consider B being Matrix of n,K such that
A2: A * B = 1. (K,n) ;
A3: ( width A = n & len B = n ) by MATRIX_1:24;
( width B = n & (A * B) @ = 1. (K,n) ) by A2, MATRIX_1:24, MATRIX_6:10;
then (B @) * (A @) = 1. (K,n) by A1, A3, MATRIX_3:22;
then consider B2 being Matrix of n,K such that
A4: (A @) * B2 = 1. (K,n) by Th54;
A5: ( width (A @) = n & len B2 = n ) by MATRIX_1:24;
( width B2 = n & ((A @) * B2) @ = 1. (K,n) ) by A4, MATRIX_1:24, MATRIX_6:10;
then (B2 @) * ((A @) @) = 1. (K,n) by A1, A5, MATRIX_3:22;
then (B2 @) * A = 1. (K,n) by MATRIXR2:29;
hence ex B2 being Matrix of n,K st B2 * A = 1. (K,n) ; ::_thesis: verum
end;
end;
supposeA6: n = 0 ; ::_thesis: ( ex B1 being Matrix of n,K st B1 * A = 1. (K,n) iff ex B2 being Matrix of n,K st A * B2 = 1. (K,n) )
then A * A = 1. (K,0) by Th15;
hence ( ex B1 being Matrix of n,K st B1 * A = 1. (K,n) iff ex B2 being Matrix of n,K st A * B2 = 1. (K,n) ) by A6; ::_thesis: verum
end;
end;
end;
theorem :: MATRIX14:56
for n being Element of NAT
for K being Field
for A, B being Matrix of n,K st A * B = 1. (K,n) holds
( A is invertible & B is invertible )
proof
let n be Element of NAT ; ::_thesis: for K being Field
for A, B being Matrix of n,K st A * B = 1. (K,n) holds
( A is invertible & B is invertible )
let K be Field; ::_thesis: for A, B being Matrix of n,K st A * B = 1. (K,n) holds
( A is invertible & B is invertible )
let A, B be Matrix of n,K; ::_thesis: ( A * B = 1. (K,n) implies ( A is invertible & B is invertible ) )
assume A1: A * B = 1. (K,n) ; ::_thesis: ( A is invertible & B is invertible )
then consider B2 being Matrix of n,K such that
A2: B2 * A = 1. (K,n) by Th55;
B2 = B2 * (1. (K,n)) by MATRIX_3:19
.= (B2 * A) * B by A1, Th17
.= B by A2, MATRIX_3:18 ;
then A is_reverse_of B by A1, A2, MATRIX_6:def_2;
hence A is invertible by MATRIX_6:def_3; ::_thesis: B is invertible
consider B3 being Matrix of n,K such that
A3: B * B3 = 1. (K,n) by A1, Th54;
B3 = (1. (K,n)) * B3 by MATRIX_3:18
.= A * (B * B3) by A1, Th17
.= A by A3, MATRIX_3:19 ;
then B is_reverse_of A by A1, A3, MATRIX_6:def_2;
hence B is invertible by MATRIX_6:def_3; ::_thesis: verum
end;