:: MATRIXJ1 semantic presentation
begin
Lm1: for K being non empty addLoopStr
for p1, p2 being FinSequence of K holds dom (p1 + p2) = (dom p1) /\ (dom p2)
proof
let K be non empty addLoopStr ; ::_thesis: for p1, p2 being FinSequence of K holds dom (p1 + p2) = (dom p1) /\ (dom p2)
let p1, p2 be FinSequence of K; ::_thesis: dom (p1 + p2) = (dom p1) /\ (dom p2)
A1: rng p2 c= the carrier of K by FINSEQ_1:def_4;
rng p1 c= the carrier of K by FINSEQ_1:def_4;
then [:(rng p1),(rng p2):] c= [: the carrier of K, the carrier of K:] by A1, ZFMISC_1:96;
then [:(rng p1),(rng p2):] c= dom the addF of K by FUNCT_2:def_1;
hence dom (p1 + p2) = (dom p1) /\ (dom p2) by FUNCOP_1:69; ::_thesis: verum
end;
theorem Th1: :: MATRIXJ1:1
for K being non empty addLoopStr
for f1, f2, g1, g2 being FinSequence of K st len f1 = len f2 holds
(f1 + f2) ^ (g1 + g2) = (f1 ^ g1) + (f2 ^ g2)
proof
let K be non empty addLoopStr ; ::_thesis: for f1, f2, g1, g2 being FinSequence of K st len f1 = len f2 holds
(f1 + f2) ^ (g1 + g2) = (f1 ^ g1) + (f2 ^ g2)
let f1, f2, g1, g2 be FinSequence of K; ::_thesis: ( len f1 = len f2 implies (f1 + f2) ^ (g1 + g2) = (f1 ^ g1) + (f2 ^ g2) )
assume A1: len f1 = len f2 ; ::_thesis: (f1 + f2) ^ (g1 + g2) = (f1 ^ g1) + (f2 ^ g2)
A2: dom f1 = dom f2 by A1, FINSEQ_3:29;
A3: dom g2 = Seg (len g2) by FINSEQ_1:def_3;
A4: dom g1 = Seg (len g1) by FINSEQ_1:def_3;
A5: dom (f1 ^ g1) = Seg ((len f1) + (len g1)) by FINSEQ_1:def_7;
A6: dom (f2 ^ g2) = Seg ((len f2) + (len g2)) by FINSEQ_1:def_7;
A7: dom (g1 + g2) = (dom g1) /\ (dom g2) by Lm1;
A8: dom (f1 + f2) = (dom f1) /\ (dom f2) by Lm1;
then A9: len (f1 + f2) = len f1 by A2, FINSEQ_3:29;
A10: dom ((f1 ^ g1) + (f2 ^ g2)) = (dom (f1 ^ g1)) /\ (dom (f2 ^ g2)) by Lm1;
A11: now__::_thesis:_dom_((f1_+_f2)_^_(g1_+_g2))_=_dom_((f1_^_g1)_+_(f2_^_g2))
percases ( len g1 <= len g2 or len g1 > len g2 ) ;
supposeA12: len g1 <= len g2 ; ::_thesis: dom ((f1 + f2) ^ (g1 + g2)) = dom ((f1 ^ g1) + (f2 ^ g2))
then Seg (len g1) c= Seg (len g2) by FINSEQ_1:5;
then dom (g1 + g2) = dom g1 by A7, A4, A3, XBOOLE_1:28;
then A13: len (g1 + g2) = len g1 by FINSEQ_3:29;
(len f1) + (len g1) <= (len f2) + (len g2) by A1, A12, XREAL_1:7;
then dom (f1 ^ g1) c= dom (f2 ^ g2) by A5, A6, FINSEQ_1:5;
then dom ((f1 ^ g1) + (f2 ^ g2)) = dom (f1 ^ g1) by A10, XBOOLE_1:28;
hence dom ((f1 + f2) ^ (g1 + g2)) = dom ((f1 ^ g1) + (f2 ^ g2)) by A9, A5, A13, FINSEQ_1:def_7; ::_thesis: verum
end;
supposeA14: len g1 > len g2 ; ::_thesis: dom ((f1 + f2) ^ (g1 + g2)) = dom ((f1 ^ g1) + (f2 ^ g2))
then Seg (len g2) c= Seg (len g1) by FINSEQ_1:5;
then dom (g1 + g2) = dom g2 by A7, A4, A3, XBOOLE_1:28;
then A15: len (g1 + g2) = len g2 by FINSEQ_3:29;
(len f1) + (len g1) > (len f2) + (len g2) by A1, A14, XREAL_1:8;
then dom (f2 ^ g2) c= dom (f1 ^ g1) by A5, A6, FINSEQ_1:5;
then dom ((f1 ^ g1) + (f2 ^ g2)) = dom (f2 ^ g2) by A10, XBOOLE_1:28;
hence dom ((f1 + f2) ^ (g1 + g2)) = dom ((f1 ^ g1) + (f2 ^ g2)) by A1, A9, A6, A15, FINSEQ_1:def_7; ::_thesis: verum
end;
end;
end;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_((f1_+_f2)_^_(g1_+_g2))_holds_
((f1_+_f2)_^_(g1_+_g2))_._i_=_((f1_^_g1)_+_(f2_^_g2))_._i
let i be Nat; ::_thesis: ( i in dom ((f1 + f2) ^ (g1 + g2)) implies ((f1 + f2) ^ (g1 + g2)) . i = ((f1 ^ g1) + (f2 ^ g2)) . i )
assume A16: i in dom ((f1 + f2) ^ (g1 + g2)) ; ::_thesis: ((f1 + f2) ^ (g1 + g2)) . i = ((f1 ^ g1) + (f2 ^ g2)) . i
now__::_thesis:_((f1_+_f2)_^_(g1_+_g2))_._i_=_((f1_^_g1)_+_(f2_^_g2))_._i
percases ( i in dom (f1 + f2) or ex n being Nat st
( n in dom (g1 + g2) & i = (len (f1 + f2)) + n ) ) by A16, FINSEQ_1:25;
supposeA17: i in dom (f1 + f2) ; ::_thesis: ((f1 + f2) ^ (g1 + g2)) . i = ((f1 ^ g1) + (f2 ^ g2)) . i
then A18: f2 . i = (f2 ^ g2) . i by A8, A2, FINSEQ_1:def_7;
A19: f2 /. i = f2 . i by A8, A2, A17, PARTFUN1:def_6;
A20: f1 . i = (f1 ^ g1) . i by A8, A2, A17, FINSEQ_1:def_7;
A21: f1 /. i = f1 . i by A8, A2, A17, PARTFUN1:def_6;
thus ((f1 + f2) ^ (g1 + g2)) . i = (f1 + f2) . i by A17, FINSEQ_1:def_7
.= (f1 /. i) + (f2 /. i) by A17, A21, A19, FVSUM_1:17
.= ((f1 ^ g1) + (f2 ^ g2)) . i by A11, A16, A21, A19, A20, A18, FVSUM_1:17 ; ::_thesis: verum
end;
suppose ex n being Nat st
( n in dom (g1 + g2) & i = (len (f1 + f2)) + n ) ; ::_thesis: ((f1 + f2) ^ (g1 + g2)) . i = ((f1 ^ g1) + (f2 ^ g2)) . i
then consider n being Nat such that
A22: n in dom (g1 + g2) and
A23: i = (len (f1 + f2)) + n ;
A24: n in dom g1 by A7, A22, XBOOLE_0:def_4;
then A25: (f1 ^ g1) . i = g1 . n by A9, A23, FINSEQ_1:def_7;
A26: g1 . n = g1 /. n by A24, PARTFUN1:def_6;
A27: n in dom g2 by A7, A22, XBOOLE_0:def_4;
then A28: (f2 ^ g2) . i = g2 . n by A1, A9, A23, FINSEQ_1:def_7;
A29: g2 . n = g2 /. n by A27, PARTFUN1:def_6;
thus ((f1 + f2) ^ (g1 + g2)) . i = (g1 + g2) . n by A22, A23, FINSEQ_1:def_7
.= (g1 /. n) + (g2 /. n) by A22, A26, A29, FVSUM_1:17
.= ((f1 ^ g1) + (f2 ^ g2)) . i by A11, A16, A26, A29, A25, A28, FVSUM_1:17 ; ::_thesis: verum
end;
end;
end;
hence ((f1 + f2) ^ (g1 + g2)) . i = ((f1 ^ g1) + (f2 ^ g2)) . i ; ::_thesis: verum
end;
hence (f1 + f2) ^ (g1 + g2) = (f1 ^ g1) + (f2 ^ g2) by A11, FINSEQ_1:13; ::_thesis: verum
end;
theorem Th2: :: MATRIXJ1:2
for i being Nat
for D being non empty set
for f, g being FinSequence of D st i in dom f holds
Del ((f ^ g),i) = (Del (f,i)) ^ g
proof
let i be Nat; ::_thesis: for D being non empty set
for f, g being FinSequence of D st i in dom f holds
Del ((f ^ g),i) = (Del (f,i)) ^ g
let D be non empty set ; ::_thesis: for f, g being FinSequence of D st i in dom f holds
Del ((f ^ g),i) = (Del (f,i)) ^ g
let f, g be FinSequence of D; ::_thesis: ( i in dom f implies Del ((f ^ g),i) = (Del (f,i)) ^ g )
assume A1: i in dom f ; ::_thesis: Del ((f ^ g),i) = (Del (f,i)) ^ g
set Df = Del (f,i);
consider m being Nat such that
A2: len f = m + 1 and
A3: len (Del (f,i)) = m by A1, FINSEQ_3:104;
set Dg = (Del (f,i)) ^ g;
set fg = f ^ g;
set Dfg = Del ((f ^ g),i);
A4: Seg (len (f ^ g)) = dom (f ^ g) by FINSEQ_1:def_3;
A5: len (f ^ g) = (len f) + (len g) by FINSEQ_1:22;
then len f <= len (f ^ g) by NAT_1:12;
then A6: Seg (len f) c= Seg (len (f ^ g)) by FINSEQ_1:5;
A7: len (f ^ g) = ((len g) + m) + 1 by A2, A5;
A8: Seg (len f) = dom f by FINSEQ_1:def_3;
A9: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_m_+_(len_g)_holds_
((Del_(f,i))_^_g)_._j_=_(Del_((f_^_g),i))_._j
let j be Nat; ::_thesis: ( 1 <= j & j <= m + (len g) implies ((Del (f,i)) ^ g) . j = (Del ((f ^ g),i)) . j )
assume that
A10: 1 <= j and
A11: j <= m + (len g) ; ::_thesis: ((Del (f,i)) ^ g) . j = (Del ((f ^ g),i)) . j
now__::_thesis:_(Del_((f_^_g),i))_._j_=_((Del_(f,i))_^_g)_._j
percases ( j < i or j >= i ) ;
supposeA12: j < i ; ::_thesis: (Del ((f ^ g),i)) . j = ((Del (f,i)) ^ g) . j
i <= len f by A1, FINSEQ_3:25;
then A13: j < len f by A12, XXREAL_0:2;
then A14: j in dom f by A10, FINSEQ_3:25;
j <= m by A2, A13, NAT_1:13;
then A15: j in dom (Del (f,i)) by A3, A10, FINSEQ_3:25;
thus (Del ((f ^ g),i)) . j = (f ^ g) . j by A12, FINSEQ_3:110
.= f . j by A14, FINSEQ_1:def_7
.= (Del (f,i)) . j by A12, FINSEQ_3:110
.= ((Del (f,i)) ^ g) . j by A15, FINSEQ_1:def_7 ; ::_thesis: verum
end;
supposeA16: j >= i ; ::_thesis: ((Del (f,i)) ^ g) . j = (Del ((f ^ g),i)) . j
now__::_thesis:_(Del_((f_^_g),i))_._j_=_((Del_(f,i))_^_g)_._j
percases ( j <= m or j > m ) ;
supposeA17: j <= m ; ::_thesis: (Del ((f ^ g),i)) . j = ((Del (f,i)) ^ g) . j
A18: 0 + 1 <= j + 1 by XREAL_1:7;
j + 1 <= len f by A2, A17, XREAL_1:7;
then A19: j + 1 in dom f by A18, FINSEQ_3:25;
A20: j in dom (Del (f,i)) by A3, A10, A17, FINSEQ_3:25;
thus (Del ((f ^ g),i)) . j = (f ^ g) . (j + 1) by A1, A6, A8, A4, A7, A11, A16, FINSEQ_3:111
.= f . (j + 1) by A19, FINSEQ_1:def_7
.= (Del (f,i)) . j by A1, A2, A16, A17, FINSEQ_3:111
.= ((Del (f,i)) ^ g) . j by A20, FINSEQ_1:def_7 ; ::_thesis: verum
end;
supposeA21: j > m ; ::_thesis: (Del ((f ^ g),i)) . j = ((Del (f,i)) ^ g) . j
then j >= len f by A2, NAT_1:13;
then j + 1 > len f by NAT_1:13;
then reconsider jL = (j + 1) - (len f) as Element of NAT by NAT_1:21;
j + 1 <= (m + (len g)) + 1 by A11, XREAL_1:7;
then jL + (len f) <= (len f) + (len g) by A2;
then A22: jL <= len g by XREAL_1:8;
jL <> 0 by A2, A21;
then jL >= 1 by NAT_1:14;
then A23: jL in dom g by A22, FINSEQ_3:25;
thus (Del ((f ^ g),i)) . j = (f ^ g) . (jL + (len f)) by A1, A6, A8, A4, A7, A11, A16, FINSEQ_3:111
.= g . jL by A23, FINSEQ_1:def_7
.= ((Del (f,i)) ^ g) . (m + jL) by A3, A23, FINSEQ_1:def_7
.= ((Del (f,i)) ^ g) . j by A2 ; ::_thesis: verum
end;
end;
end;
hence ((Del (f,i)) ^ g) . j = (Del ((f ^ g),i)) . j ; ::_thesis: verum
end;
end;
end;
hence ((Del (f,i)) ^ g) . j = (Del ((f ^ g),i)) . j ; ::_thesis: verum
end;
A24: len ((Del (f,i)) ^ g) = (len (Del (f,i))) + (len g) by FINSEQ_1:22;
len (Del ((f ^ g),i)) = m + (len g) by A1, A6, A8, A4, A7, FINSEQ_3:109;
hence Del ((f ^ g),i) = (Del (f,i)) ^ g by A3, A24, A9, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th3: :: MATRIXJ1:3
for i being Nat
for D being non empty set
for f, g being FinSequence of D st i in dom g holds
Del ((f ^ g),(i + (len f))) = f ^ (Del (g,i))
proof
let i be Nat; ::_thesis: for D being non empty set
for f, g being FinSequence of D st i in dom g holds
Del ((f ^ g),(i + (len f))) = f ^ (Del (g,i))
let D be non empty set ; ::_thesis: for f, g being FinSequence of D st i in dom g holds
Del ((f ^ g),(i + (len f))) = f ^ (Del (g,i))
let f, g be FinSequence of D; ::_thesis: ( i in dom g implies Del ((f ^ g),(i + (len f))) = f ^ (Del (g,i)) )
assume A1: i in dom g ; ::_thesis: Del ((f ^ g),(i + (len f))) = f ^ (Del (g,i))
set Dg = Del (g,i);
consider m being Nat such that
A2: len g = m + 1 and
A3: len (Del (g,i)) = m by A1, FINSEQ_3:104;
set fD = f ^ (Del (g,i));
set iL = i + (len f);
set fg = f ^ g;
set Dfg = Del ((f ^ g),(i + (len f)));
A4: dom (f ^ g) = Seg (len (f ^ g)) by FINSEQ_1:def_3;
A5: len (f ^ g) = (len f) + (len g) by FINSEQ_1:22;
then A6: len (f ^ g) = (m + (len f)) + 1 by A2;
A7: i in Seg (len g) by A1, FINSEQ_1:def_3;
then A8: i > 0 by FINSEQ_1:1;
A9: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_m_+_(len_f)_holds_
(f_^_(Del_(g,i)))_._j_=_(Del_((f_^_g),(i_+_(len_f))))_._j
let j be Nat; ::_thesis: ( 1 <= j & j <= m + (len f) implies (f ^ (Del (g,i))) . j = (Del ((f ^ g),(i + (len f)))) . j )
assume that
A10: 1 <= j and
A11: j <= m + (len f) ; ::_thesis: (f ^ (Del (g,i))) . j = (Del ((f ^ g),(i + (len f)))) . j
now__::_thesis:_(Del_((f_^_g),(i_+_(len_f))))_._j_=_(f_^_(Del_(g,i)))_._j
percases ( j <= len f or j > len f ) ;
supposeA12: j <= len f ; ::_thesis: (Del ((f ^ g),(i + (len f)))) . j = (f ^ (Del (g,i))) . j
then A13: j in dom f by A10, FINSEQ_3:25;
0 + (len f) < i + (len f) by A8, XREAL_1:8;
then j < i + (len f) by A12, XXREAL_0:2;
hence (Del ((f ^ g),(i + (len f)))) . j = (f ^ g) . j by FINSEQ_3:110
.= f . j by A13, FINSEQ_1:def_7
.= (f ^ (Del (g,i))) . j by A13, FINSEQ_1:def_7 ;
::_thesis: verum
end;
supposeA14: j > len f ; ::_thesis: (f ^ (Del (g,i))) . j = (Del ((f ^ g),(i + (len f)))) . j
then reconsider jL = j - (len f) as Element of NAT by NAT_1:21;
A15: 1 <= jL + 1 by NAT_1:14;
jL + (len f) <= m + (len f) by A11;
then A16: jL <= m by XREAL_1:6;
then jL + 1 <= len g by A2, XREAL_1:7;
then A17: jL + 1 in dom g by A15, FINSEQ_3:25;
jL <> 0 by A14;
then A18: jL >= 1 by NAT_1:14;
then A19: jL in dom (Del (g,i)) by A3, A16, FINSEQ_3:25;
jL <= len g by A2, A16, NAT_1:13;
then A20: jL in dom g by A18, FINSEQ_3:25;
now__::_thesis:_(Del_((f_^_g),(i_+_(len_f))))_._j_=_(f_^_(Del_(g,i)))_._j
percases ( jL < i or jL >= i ) ;
supposeA21: jL < i ; ::_thesis: (Del ((f ^ g),(i + (len f)))) . j = (f ^ (Del (g,i))) . j
then jL + (len f) < i + (len f) by XREAL_1:8;
hence (Del ((f ^ g),(i + (len f)))) . j = (f ^ g) . (jL + (len f)) by FINSEQ_3:110
.= g . jL by A20, FINSEQ_1:def_7
.= (Del (g,i)) . jL by A21, FINSEQ_3:110
.= (f ^ (Del (g,i))) . (jL + (len f)) by A19, FINSEQ_1:def_7
.= (f ^ (Del (g,i))) . j ;
::_thesis: verum
end;
supposeA22: jL >= i ; ::_thesis: (Del ((f ^ g),(i + (len f)))) . j = (f ^ (Del (g,i))) . j
then jL + (len f) >= i + (len f) by XREAL_1:7;
hence (Del ((f ^ g),(i + (len f)))) . j = (f ^ g) . ((jL + (len f)) + 1) by A5, A7, A4, A6, A11, FINSEQ_1:60, FINSEQ_3:111
.= (f ^ g) . ((jL + 1) + (len f))
.= g . (jL + 1) by A17, FINSEQ_1:def_7
.= (Del (g,i)) . jL by A1, A2, A16, A22, FINSEQ_3:111
.= (f ^ (Del (g,i))) . (jL + (len f)) by A19, FINSEQ_1:def_7
.= (f ^ (Del (g,i))) . j ;
::_thesis: verum
end;
end;
end;
hence (f ^ (Del (g,i))) . j = (Del ((f ^ g),(i + (len f)))) . j ; ::_thesis: verum
end;
end;
end;
hence (f ^ (Del (g,i))) . j = (Del ((f ^ g),(i + (len f)))) . j ; ::_thesis: verum
end;
A23: len (f ^ (Del (g,i))) = (len f) + (len (Del (g,i))) by FINSEQ_1:22;
len (Del ((f ^ g),(i + (len f)))) = m + (len f) by A5, A7, A4, A6, FINSEQ_1:60, FINSEQ_3:109;
hence Del ((f ^ g),(i + (len f))) = f ^ (Del (g,i)) by A3, A23, A9, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th4: :: MATRIXJ1:4
for i, n being Nat
for D being non empty set
for d being Element of D st i in Seg (n + 1) holds
Del (((n + 1) |-> d),i) = n |-> d
proof
let i, n be Nat; ::_thesis: for D being non empty set
for d being Element of D st i in Seg (n + 1) holds
Del (((n + 1) |-> d),i) = n |-> d
let D be non empty set ; ::_thesis: for d being Element of D st i in Seg (n + 1) holds
Del (((n + 1) |-> d),i) = n |-> d
let d be Element of D; ::_thesis: ( i in Seg (n + 1) implies Del (((n + 1) |-> d),i) = n |-> d )
set n1 = n + 1;
set n1d = (n + 1) |-> d;
set nd = n |-> d;
set Dn = Del (((n + 1) |-> d),i);
A1: len ((n + 1) |-> d) = n + 1 by CARD_1:def_7;
A2: dom ((n + 1) |-> d) = Seg (len ((n + 1) |-> d)) by FINSEQ_1:def_3;
A3: len (n |-> d) = n by CARD_1:def_7;
assume A4: i in Seg (n + 1) ; ::_thesis: Del (((n + 1) |-> d),i) = n |-> d
A5: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_n_holds_
(n_|->_d)_._j_=_(Del_(((n_+_1)_|->_d),i))_._j
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies (n |-> d) . j = (Del (((n + 1) |-> d),i)) . j )
assume that
A6: 1 <= j and
A7: j <= n ; ::_thesis: (n |-> d) . j = (Del (((n + 1) |-> d),i)) . j
j <= n + 1 by A7, NAT_1:13;
then A8: j in Seg (n + 1) by A6, FINSEQ_1:1;
A9: j in Seg n by A6, A7, FINSEQ_1:1;
then A10: j + 1 in Seg (n + 1) by FINSEQ_1:60;
now__::_thesis:_(Del_(((n_+_1)_|->_d),i))_._j_=_(n_|->_d)_._j
percases ( j < i or j >= i ) ;
suppose j < i ; ::_thesis: (Del (((n + 1) |-> d),i)) . j = (n |-> d) . j
hence (Del (((n + 1) |-> d),i)) . j = ((n + 1) |-> d) . j by FINSEQ_3:110
.= d by A8, FINSEQ_2:57
.= (n |-> d) . j by A9, FINSEQ_2:57 ;
::_thesis: verum
end;
suppose j >= i ; ::_thesis: (Del (((n + 1) |-> d),i)) . j = (n |-> d) . j
hence (Del (((n + 1) |-> d),i)) . j = ((n + 1) |-> d) . (j + 1) by A4, A1, A2, A7, FINSEQ_3:111
.= d by A10, FINSEQ_2:57
.= (n |-> d) . j by A9, FINSEQ_2:57 ;
::_thesis: verum
end;
end;
end;
hence (n |-> d) . j = (Del (((n + 1) |-> d),i)) . j ; ::_thesis: verum
end;
len (Del (((n + 1) |-> d),i)) = n by A4, A1, A2, FINSEQ_3:109;
hence Del (((n + 1) |-> d),i) = n |-> d by A3, A5, FINSEQ_1:14; ::_thesis: verum
end;
theorem :: MATRIXJ1:5
for n being Nat
for K being Field
for a being Element of K holds Product (n |-> a) = (power K) . (a,n)
proof
let n be Nat; ::_thesis: for K being Field
for a being Element of K holds Product (n |-> a) = (power K) . (a,n)
let K be Field; ::_thesis: for a being Element of K holds Product (n |-> a) = (power K) . (a,n)
let a be Element of K; ::_thesis: Product (n |-> a) = (power K) . (a,n)
defpred S1[ Nat] means Product ($1 |-> a) = (power K) . (a,$1);
A1: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A2: S1[k] ; ::_thesis: S1[k + 1]
A3: k in NAT by ORDINAL1:def_12;
hence Product ((k + 1) |-> a) = (Product (k |-> a)) * (Product (1 |-> a)) by FVSUM_1:83
.= (Product (k |-> a)) * (Product <*a*>) by FINSEQ_2:59
.= ((power K) . (a,k)) * a by A2, GROUP_4:9
.= (power K) . (a,(k + 1)) by A3, GROUP_1:def_7 ;
::_thesis: verum
end;
0 |-> a = <*> the carrier of K ;
then Product (0 |-> a) = 1_ K by GROUP_4:8
.= (power K) . (a,0) by GROUP_1:def_7 ;
then A4: S1[ 0 ] ;
for k being Nat holds S1[k] from NAT_1:sch_2(A4, A1);
hence Product (n |-> a) = (power K) . (a,n) ; ::_thesis: verum
end;
definition
let f be FinSequence of NAT ;
let i be Nat;
assume B1: i in Seg (Sum f) ;
func min (f,i) -> Element of NAT means :Def1: :: MATRIXJ1:def 1
( i <= Sum (f | it) & it in dom f & ( for j being Nat st i <= Sum (f | j) holds
it <= j ) );
existence
ex b1 being Element of NAT st
( i <= Sum (f | b1) & b1 in dom f & ( for j being Nat st i <= Sum (f | j) holds
b1 <= j ) )
proof
defpred S1[ Nat] means ( i <= Sum (f | $1) & $1 >= 1 );
A1: f | (len f) = f by FINSEQ_1:58;
A2: i <= Sum f by B1, FINSEQ_1:1;
Sum f <> 0 by B1;
then A3: len f >= 1 by FINSEQ_1:20, RVSUM_1:72;
then A4: ex k being Nat st S1[k] by A2, A1;
consider k being Nat such that
A5: S1[k] and
A6: for n being Nat st S1[n] holds
k <= n from NAT_1:sch_5(A4);
reconsider k = k as Element of NAT by ORDINAL1:def_12;
take k ; ::_thesis: ( i <= Sum (f | k) & k in dom f & ( for j being Nat st i <= Sum (f | j) holds
k <= j ) )
thus i <= Sum (f | k) by A5; ::_thesis: ( k in dom f & ( for j being Nat st i <= Sum (f | j) holds
k <= j ) )
k <= len f by A3, A2, A1, A6;
hence k in dom f by A5, FINSEQ_3:25; ::_thesis: for j being Nat st i <= Sum (f | j) holds
k <= j
let j be Nat; ::_thesis: ( i <= Sum (f | j) implies k <= j )
assume A7: i <= Sum (f | j) ; ::_thesis: k <= j
percases ( j = 0 or j > 0 ) ;
suppose j = 0 ; ::_thesis: k <= j
then f | j = <*> REAL ;
hence k <= j by B1, A7, FINSEQ_1:1, RVSUM_1:72; ::_thesis: verum
end;
suppose j > 0 ; ::_thesis: k <= j
hence k <= j by A6, A7, NAT_1:14; ::_thesis: verum
end;
end;
end;
uniqueness
for b1, b2 being Element of NAT st i <= Sum (f | b1) & b1 in dom f & ( for j being Nat st i <= Sum (f | j) holds
b1 <= j ) & i <= Sum (f | b2) & b2 in dom f & ( for j being Nat st i <= Sum (f | j) holds
b2 <= j ) holds
b1 = b2
proof
let n1, n2 be Element of NAT ; ::_thesis: ( i <= Sum (f | n1) & n1 in dom f & ( for j being Nat st i <= Sum (f | j) holds
n1 <= j ) & i <= Sum (f | n2) & n2 in dom f & ( for j being Nat st i <= Sum (f | j) holds
n2 <= j ) implies n1 = n2 )
assume that
A8: i <= Sum (f | n1) and
n1 in dom f and
A9: for j being Nat st i <= Sum (f | j) holds
n1 <= j and
A10: i <= Sum (f | n2) and
n2 in dom f and
A11: for j being Nat st i <= Sum (f | j) holds
n2 <= j ; ::_thesis: n1 = n2
A12: n2 <= n1 by A8, A11;
n1 <= n2 by A9, A10;
hence n1 = n2 by A12, XXREAL_0:1; ::_thesis: verum
end;
end;
:: deftheorem Def1 defines min MATRIXJ1:def_1_:_
for f being FinSequence of NAT
for i being Nat st i in Seg (Sum f) holds
for b3 being Element of NAT holds
( b3 = min (f,i) iff ( i <= Sum (f | b3) & b3 in dom f & ( for j being Nat st i <= Sum (f | j) holds
b3 <= j ) ) );
theorem :: MATRIXJ1:6
for i being Nat
for f being FinSequence of NAT st i in dom f & f . i <> 0 holds
min (f,(Sum (f | i))) = i
proof
let i be Nat; ::_thesis: for f being FinSequence of NAT st i in dom f & f . i <> 0 holds
min (f,(Sum (f | i))) = i
let f be FinSequence of NAT ; ::_thesis: ( i in dom f & f . i <> 0 implies min (f,(Sum (f | i))) = i )
assume that
A1: i in dom f and
A2: f . i <> 0 ; ::_thesis: min (f,(Sum (f | i))) = i
A3: i <= len f by A1, FINSEQ_3:25;
then A4: len (f | i) = i by FINSEQ_1:59;
1 <= i by A1, FINSEQ_3:25;
then A5: i in dom (f | i) by A4, FINSEQ_3:25;
then Sum (f | i) >= (f | i) . i by POLYNOM3:4;
then Sum (f | i) <> 0 by A2, A5, FUNCT_1:47;
then A6: Sum (f | i) >= 1 by NAT_1:14;
A7: f | (len f) = f by FINSEQ_1:58;
Sum (f | i) <= Sum (f | (len f)) by A3, A4, POLYNOM3:18;
then A8: Sum (f | i) in Seg (Sum f) by A7, A6;
then A9: min (f,(Sum (f | i))) <= i by Def1;
thus min (f,(Sum (f | i))) = i ::_thesis: verum
proof
assume A10: min (f,(Sum (f | i))) <> i ; ::_thesis: contradiction
then min (f,(Sum (f | i))) < i by A9, XXREAL_0:1;
then reconsider i1 = i - 1 as Element of NAT by NAT_1:20;
min (f,(Sum (f | i))) < i1 + 1 by A9, A10, XXREAL_0:1;
then min (f,(Sum (f | i))) <= i1 by NAT_1:13;
then A11: Sum (f | (min (f,(Sum (f | i))))) <= Sum (f | i1) by POLYNOM3:18;
Sum (f | i) <= Sum (f | (min (f,(Sum (f | i))))) by A8, Def1;
then A12: Sum (f | i) <= Sum (f | i1) by A11, XXREAL_0:2;
f | (i1 + 1) = (f | i1) ^ <*(f . i)*> by A1, FINSEQ_5:10;
then A13: Sum (f | i) = (Sum (f | i1)) + (f . i) by RVSUM_1:74;
then Sum (f | i) >= Sum (f | i1) by NAT_1:11;
then Sum (f | i) = Sum (f | i1) by A12, XXREAL_0:1;
hence contradiction by A2, A13; ::_thesis: verum
end;
end;
theorem Th7: :: MATRIXJ1:7
for i being Nat
for f being FinSequence of NAT st i in Seg (Sum f) holds
( (min (f,i)) -' 1 = (min (f,i)) - 1 & Sum (f | ((min (f,i)) -' 1)) < i )
proof
let i be Nat; ::_thesis: for f being FinSequence of NAT st i in Seg (Sum f) holds
( (min (f,i)) -' 1 = (min (f,i)) - 1 & Sum (f | ((min (f,i)) -' 1)) < i )
let f be FinSequence of NAT ; ::_thesis: ( i in Seg (Sum f) implies ( (min (f,i)) -' 1 = (min (f,i)) - 1 & Sum (f | ((min (f,i)) -' 1)) < i ) )
set F = min (f,i);
assume A1: i in Seg (Sum f) ; ::_thesis: ( (min (f,i)) -' 1 = (min (f,i)) - 1 & Sum (f | ((min (f,i)) -' 1)) < i )
then min (f,i) in dom f by Def1;
then 1 <= min (f,i) by FINSEQ_3:25;
hence A2: (min (f,i)) -' 1 = (min (f,i)) - 1 by XREAL_1:233; ::_thesis: Sum (f | ((min (f,i)) -' 1)) < i
assume Sum (f | ((min (f,i)) -' 1)) >= i ; ::_thesis: contradiction
then (min (f,i)) -' 1 >= (min (f,i)) - 0 by A1, Def1;
hence contradiction by A2, XREAL_1:10; ::_thesis: verum
end;
theorem Th8: :: MATRIXJ1:8
for i being Nat
for f, g being FinSequence of NAT st i in Seg (Sum f) holds
min ((f ^ g),i) = min (f,i)
proof
let i be Nat; ::_thesis: for f, g being FinSequence of NAT st i in Seg (Sum f) holds
min ((f ^ g),i) = min (f,i)
let f, g be FinSequence of NAT ; ::_thesis: ( i in Seg (Sum f) implies min ((f ^ g),i) = min (f,i) )
reconsider fg = f ^ g as FinSequence of NAT ;
assume A1: i in Seg (Sum f) ; ::_thesis: min ((f ^ g),i) = min (f,i)
then A2: i <= Sum (f | (min (f,i))) by Def1;
Sum fg = (Sum f) + (Sum g) by RVSUM_1:75;
then Sum fg >= (Sum f) + 0 by XREAL_1:6;
then A3: Seg (Sum f) c= Seg (Sum fg) by FINSEQ_1:5;
min (f,i) in dom f by A1, Def1;
then A4: min (f,i) <= len f by FINSEQ_3:25;
then fg | (min (f,i)) = f | (min (f,i)) by FINSEQ_5:22;
then A5: min (fg,i) <= min (f,i) by A1, A3, A2, Def1;
then fg | (min (fg,i)) = f | (min (fg,i)) by A4, FINSEQ_5:22, XXREAL_0:2;
then i <= Sum (f | (min (fg,i))) by A1, A3, Def1;
then min (f,i) <= min (fg,i) by A1, Def1;
hence min ((f ^ g),i) = min (f,i) by A5, XXREAL_0:1; ::_thesis: verum
end;
theorem Th9: :: MATRIXJ1:9
for i being Nat
for f, g being FinSequence of NAT st i in (Seg ((Sum f) + (Sum g))) \ (Seg (Sum f)) holds
( min ((f ^ g),i) = (min (g,(i -' (Sum f)))) + (len f) & i -' (Sum f) = i - (Sum f) )
proof
let i be Nat; ::_thesis: for f, g being FinSequence of NAT st i in (Seg ((Sum f) + (Sum g))) \ (Seg (Sum f)) holds
( min ((f ^ g),i) = (min (g,(i -' (Sum f)))) + (len f) & i -' (Sum f) = i - (Sum f) )
let f, g be FinSequence of NAT ; ::_thesis: ( i in (Seg ((Sum f) + (Sum g))) \ (Seg (Sum f)) implies ( min ((f ^ g),i) = (min (g,(i -' (Sum f)))) + (len f) & i -' (Sum f) = i - (Sum f) ) )
reconsider fg = f ^ g as FinSequence of NAT ;
assume A1: i in (Seg ((Sum f) + (Sum g))) \ (Seg (Sum f)) ; ::_thesis: ( min ((f ^ g),i) = (min (g,(i -' (Sum f)))) + (len f) & i -' (Sum f) = i - (Sum f) )
then not i in Seg (Sum f) by XBOOLE_0:def_5;
then A2: ( 1 > i or i > Sum f ) by A1;
A3: Sum fg = (Sum f) + (Sum g) by RVSUM_1:75;
then A4: i in Seg (Sum fg) by A1, XBOOLE_0:def_5;
then reconsider j = i - (Sum f) as Element of NAT by A2, FINSEQ_1:1, NAT_1:21;
A5: i = j + (Sum f) ;
fg | ((len f) + (min (g,j))) = f ^ (g | (min (g,j))) by FINSEQ_6:14;
then A6: Sum (fg | ((len f) + (min (g,j)))) = (Sum f) + (Sum (g | (min (g,j)))) by RVSUM_1:75;
j <> 0 by A4, A2, FINSEQ_1:1;
then A7: j in Seg (Sum g) by A3, A4, A5, FINSEQ_1:61;
then j <= Sum (g | (min (g,j))) by Def1;
then Sum (fg | ((len f) + (min (g,j)))) >= (Sum f) + j by A6, XREAL_1:7;
then A8: (len f) + (min (g,j)) >= min (fg,i) by A4, Def1;
A9: i <= Sum (fg | (min (fg,i))) by A4, Def1;
min (fg,i) > len f
proof
A10: f | (len f) = f by FINSEQ_1:58;
assume A11: min (fg,i) <= len f ; ::_thesis: contradiction
then A12: Sum (f | (min (fg,i))) <= Sum (f | (len f)) by POLYNOM3:18;
fg | (min (fg,i)) = f | (min (fg,i)) by A11, FINSEQ_5:22;
hence contradiction by A4, A9, A2, A12, A10, FINSEQ_1:1, XXREAL_0:2; ::_thesis: verum
end;
then reconsider m = (min (fg,i)) - (len f) as Element of NAT by NAT_1:21;
fg | ((len f) + m) = f ^ (g | m) by FINSEQ_6:14;
then i <= (Sum f) + (Sum (g | m)) by A9, RVSUM_1:75;
then j <= ((Sum f) + (Sum (g | m))) - (Sum f) by XREAL_1:9;
then m >= min (g,j) by A7, Def1;
then A13: m + (len f) >= (min (g,j)) + (len f) by XREAL_1:7;
j = i -' (Sum f) by A4, A2, FINSEQ_1:1, XREAL_1:233;
hence ( min ((f ^ g),i) = (min (g,(i -' (Sum f)))) + (len f) & i -' (Sum f) = i - (Sum f) ) by A13, A8, XXREAL_0:1; ::_thesis: verum
end;
Lm2: for i being Nat
for f being FinSequence of NAT st i in dom f holds
Sum (f | i) = (Sum (f | (i -' 1))) + (f . i)
proof
let i be Nat; ::_thesis: for f being FinSequence of NAT st i in dom f holds
Sum (f | i) = (Sum (f | (i -' 1))) + (f . i)
let f be FinSequence of NAT ; ::_thesis: ( i in dom f implies Sum (f | i) = (Sum (f | (i -' 1))) + (f . i) )
set g = <*(f /. i)*>;
set h = f | (i -' 1);
assume A1: i in dom f ; ::_thesis: Sum (f | i) = (Sum (f | (i -' 1))) + (f . i)
then i >= 1 by FINSEQ_3:25;
then i -' 1 = i - 1 by XREAL_1:233;
then A2: i = (i -' 1) + 1 ;
A3: f /. i = f . i by A1, PARTFUN1:def_6;
hence (Sum (f | (i -' 1))) + (f . i) = Sum ((f | (i -' 1)) ^ <*(f /. i)*>) by RVSUM_1:74
.= Sum (f | i) by A1, A2, A3, FINSEQ_5:10 ;
::_thesis: verum
end;
theorem Th10: :: MATRIXJ1:10
for i, j being Nat
for f being FinSequence of NAT st i in dom f & j in Seg (f /. i) holds
( j + (Sum (f | (i -' 1))) in Seg (Sum (f | i)) & min (f,(j + (Sum (f | (i -' 1))))) = i )
proof
let i, j be Nat; ::_thesis: for f being FinSequence of NAT st i in dom f & j in Seg (f /. i) holds
( j + (Sum (f | (i -' 1))) in Seg (Sum (f | i)) & min (f,(j + (Sum (f | (i -' 1))))) = i )
let f be FinSequence of NAT ; ::_thesis: ( i in dom f & j in Seg (f /. i) implies ( j + (Sum (f | (i -' 1))) in Seg (Sum (f | i)) & min (f,(j + (Sum (f | (i -' 1))))) = i ) )
assume that
A1: i in dom f and
A2: j in Seg (f /. i) ; ::_thesis: ( j + (Sum (f | (i -' 1))) in Seg (Sum (f | i)) & min (f,(j + (Sum (f | (i -' 1))))) = i )
set fi = f /. i;
f /. i = f . i by A1, PARTFUN1:def_6;
then A3: (f /. i) + (Sum (f | (i -' 1))) = Sum (f | i) by A1, Lm2;
A4: f | (len f) = f by FINSEQ_1:58;
A5: i in NAT by ORDINAL1:def_12;
i <= len f by A1, FINSEQ_3:25;
then Sum (f | i) <= Sum (f | (len f)) by A5, POLYNOM3:18;
then A6: Seg (Sum (f | i)) c= Seg (Sum f) by A4, FINSEQ_1:5;
set jj = j + (Sum (f | (i -' 1)));
j <= f /. i by A2, FINSEQ_1:1;
then A7: j + (Sum (f | (i -' 1))) <= (f /. i) + (Sum (f | (i -' 1))) by XREAL_1:7;
1 <= j by A2, FINSEQ_1:1;
then 1 + 0 <= j + (Sum (f | (i -' 1))) by XREAL_1:7;
hence A8: j + (Sum (f | (i -' 1))) in Seg (Sum (f | i)) by A3, A7; ::_thesis: min (f,(j + (Sum (f | (i -' 1))))) = i
i >= 1 by A1, FINSEQ_3:25;
then i -' 1 = i - 1 by XREAL_1:233;
then A9: i = (i -' 1) + 1 ;
A10: i <= min (f,(j + (Sum (f | (i -' 1)))))
proof
assume i > min (f,(j + (Sum (f | (i -' 1))))) ; ::_thesis: contradiction
then min (f,(j + (Sum (f | (i -' 1))))) <= i -' 1 by A9, NAT_1:13;
then A11: Sum (f | (min (f,(j + (Sum (f | (i -' 1))))))) <= Sum (f | (i -' 1)) by POLYNOM3:18;
0 < j by A2, FINSEQ_1:1;
then (Sum (f | (i -' 1))) + 0 < j + (Sum (f | (i -' 1))) by XREAL_1:8;
then Sum (f | (min (f,(j + (Sum (f | (i -' 1))))))) < j + (Sum (f | (i -' 1))) by A11, XXREAL_0:2;
hence contradiction by A8, A6, Def1; ::_thesis: verum
end;
min (f,(j + (Sum (f | (i -' 1))))) <= i by A3, A7, A8, A6, Def1;
hence min (f,(j + (Sum (f | (i -' 1))))) = i by A10, XXREAL_0:1; ::_thesis: verum
end;
theorem :: MATRIXJ1:11
for f being FinSequence of NAT
for i, j being Nat st i <= len f & j <= len f & Sum (f | i) = Sum (f | j) & ( i in dom f implies f . i <> 0 ) & ( j in dom f implies f . j <> 0 ) holds
i = j
proof
let f be FinSequence of NAT ; ::_thesis: for i, j being Nat st i <= len f & j <= len f & Sum (f | i) = Sum (f | j) & ( i in dom f implies f . i <> 0 ) & ( j in dom f implies f . j <> 0 ) holds
i = j
A1: now__::_thesis:_for_i,_j_being_Nat_st_i_<=_len_f_&_j_<=_len_f_&_Sum_(f_|_i)_=_Sum_(f_|_j)_&_(_i_in_dom_f_implies_f_._i_<>_0_)_&_(_j_in_dom_f_implies_f_._j_<>_0_)_holds_
not_i_>_j
let i, j be Nat; ::_thesis: ( i <= len f & j <= len f & Sum (f | i) = Sum (f | j) & ( i in dom f implies f . i <> 0 ) & ( j in dom f implies f . j <> 0 ) implies not i > j )
assume that
A2: i <= len f and
j <= len f and
A3: Sum (f | i) = Sum (f | j) and
A4: ( i in dom f implies f . i <> 0 ) and
( j in dom f implies f . j <> 0 ) ; ::_thesis: not i > j
assume A5: i > j ; ::_thesis: contradiction
then reconsider i1 = i - 1 as Element of NAT by NAT_1:20;
A6: j in NAT by ORDINAL1:def_12;
A7: i = i1 + 1 ;
then j <= i1 by A5, NAT_1:13;
then A8: Sum (f | j) <= Sum (f | i1) by A6, POLYNOM3:18;
A9: i >= 1 by A7, NAT_1:14;
then i in dom f by A2, FINSEQ_3:25;
then f | (i1 + 1) = (f | i1) ^ <*(f . i)*> by FINSEQ_5:10;
then A10: Sum (f | j) = (Sum (f | i1)) + (f . i) by A3, RVSUM_1:74;
then Sum (f | i1) <= Sum (f | j) by NAT_1:11;
then Sum (f | i1) = Sum (f | j) by A8, XXREAL_0:1;
hence contradiction by A2, A4, A9, A10, FINSEQ_3:25; ::_thesis: verum
end;
let i, j be Nat; ::_thesis: ( i <= len f & j <= len f & Sum (f | i) = Sum (f | j) & ( i in dom f implies f . i <> 0 ) & ( j in dom f implies f . j <> 0 ) implies i = j )
assume that
A11: i <= len f and
A12: j <= len f and
A13: Sum (f | i) = Sum (f | j) and
A14: ( i in dom f implies f . i <> 0 ) and
A15: ( j in dom f implies f . j <> 0 ) ; ::_thesis: i = j
A16: j <= i by A1, A11, A12, A13, A14, A15;
i <= j by A1, A11, A12, A13, A14, A15;
hence i = j by A16, XXREAL_0:1; ::_thesis: verum
end;
begin
definition
let D be non empty set ;
let F be FinSequence of (D *) * ;
attrF is Matrix-yielding means :Def2: :: MATRIXJ1:def 2
for i being Nat st i in dom F holds
F . i is Matrix of D;
end;
:: deftheorem Def2 defines Matrix-yielding MATRIXJ1:def_2_:_
for D being non empty set
for F being FinSequence of (D *) * holds
( F is Matrix-yielding iff for i being Nat st i in dom F holds
F . i is Matrix of D );
registration
let D be non empty set ;
cluster Relation-like NAT -defined (D *) * -valued Function-like V33() FinSequence-like FinSubsequence-like Matrix-yielding for FinSequence of (D *) * ;
existence
ex b1 being FinSequence of (D *) * st b1 is Matrix-yielding
proof
reconsider F = <*> ((D *) *) as FinSequence of (D *) * ;
take F ; ::_thesis: F is Matrix-yielding
for i being Nat st i in dom F holds
F . i is Matrix of D ;
hence F is Matrix-yielding by Def2; ::_thesis: verum
end;
end;
definition
let D be non empty set ;
mode FinSequence_of_Matrix of D is Matrix-yielding FinSequence of (D *) * ;
end;
definition
let K be Field;
mode FinSequence_of_Matrix of K is Matrix-yielding FinSequence of ( the carrier of K *) * ;
end;
theorem Th12: :: MATRIXJ1:12
for D being non empty set holds {} is FinSequence_of_Matrix of D
proof
let D be non empty set ; ::_thesis: {} is FinSequence_of_Matrix of D
set F = <*> ((D *) *);
for i being Nat st i in dom (<*> ((D *) *)) holds
(<*> ((D *) *)) . i is Matrix of D ;
hence {} is FinSequence_of_Matrix of D by Def2; ::_thesis: verum
end;
definition
let D be non empty set ;
let F be FinSequence_of_Matrix of D;
let x be set ;
:: original: .
redefine funcF . x -> Matrix of D;
coherence
F . x is Matrix of D
proof
percases ( x in dom F or not x in dom F ) ;
supposeA1: x in dom F ; ::_thesis: F . x is Matrix of D
thus F . x is Matrix of D by A1, Def2; ::_thesis: verum
end;
suppose not x in dom F ; ::_thesis: F . x is Matrix of D
then F . x = {} by FUNCT_1:def_2;
hence F . x is Matrix of D by MATRIX_1:13; ::_thesis: verum
end;
end;
end;
end;
definition
let D be non empty set ;
let F1, F2 be FinSequence_of_Matrix of D;
:: original: ^
redefine funcF1 ^ F2 -> FinSequence_of_Matrix of D;
coherence
F1 ^ F2 is FinSequence_of_Matrix of D
proof
F1 ^ F2 is Matrix-yielding
proof
let i be Nat; :: according to MATRIXJ1:def_2 ::_thesis: ( i in dom (F1 ^ F2) implies (F1 ^ F2) . i is Matrix of D )
assume A1: i in dom (F1 ^ F2) ; ::_thesis: (F1 ^ F2) . i is Matrix of D
percases ( i in dom F1 or ex n being Nat st
( n in dom F2 & i = (len F1) + n ) ) by A1, FINSEQ_1:25;
suppose i in dom F1 ; ::_thesis: (F1 ^ F2) . i is Matrix of D
then (F1 ^ F2) . i = F1 . i by FINSEQ_1:def_7;
hence (F1 ^ F2) . i is Matrix of D ; ::_thesis: verum
end;
suppose ex n being Nat st
( n in dom F2 & i = (len F1) + n ) ; ::_thesis: (F1 ^ F2) . i is Matrix of D
then consider n being Nat such that
A2: n in dom F2 and
A3: i = (len F1) + n ;
(F1 ^ F2) . i = F2 . n by A2, A3, FINSEQ_1:def_7;
hence (F1 ^ F2) . i is Matrix of D ; ::_thesis: verum
end;
end;
end;
hence F1 ^ F2 is FinSequence_of_Matrix of D ; ::_thesis: verum
end;
end;
Lm3: for D being non empty set
for M being Matrix of D holds <*M*> is Matrix-yielding
proof
let D be non empty set ; ::_thesis: for M being Matrix of D holds <*M*> is Matrix-yielding
let M be Matrix of D; ::_thesis: <*M*> is Matrix-yielding
now__::_thesis:_for_i_being_Nat_st_i_in_dom_<*M*>_holds_
<*M*>_._i_is_Matrix_of_D
A1: <*M*> . 1 = M by FINSEQ_1:def_8;
A2: dom <*M*> = {1} by FINSEQ_1:2, FINSEQ_1:def_8;
let i be Nat; ::_thesis: ( i in dom <*M*> implies <*M*> . i is Matrix of D )
assume i in dom <*M*> ; ::_thesis: <*M*> . i is Matrix of D
hence <*M*> . i is Matrix of D by A2, A1, TARSKI:def_1; ::_thesis: verum
end;
hence <*M*> is Matrix-yielding by Def2; ::_thesis: verum
end;
definition
let D be non empty set ;
let M1 be Matrix of D;
:: original: <*
redefine func<*M1*> -> FinSequence_of_Matrix of D;
coherence
<*M1*> is FinSequence_of_Matrix of D by Lm3;
let M2 be Matrix of D;
:: original: <*
redefine func<*M1,M2*> -> FinSequence_of_Matrix of D;
coherence
<*M1,M2*> is FinSequence_of_Matrix of D
proof
reconsider F1 = <*M1*>, F2 = <*M2*> as FinSequence_of_Matrix of D by Lm3;
<*M1,M2*> = F1 ^ F2 ;
hence <*M1,M2*> is FinSequence_of_Matrix of D ; ::_thesis: verum
end;
end;
definition
let D be non empty set ;
let n be Nat;
let F be FinSequence_of_Matrix of D;
:: original: |
redefine funcF | n -> FinSequence_of_Matrix of D;
coherence
F | n is FinSequence_of_Matrix of D
proof
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(F_|_n)_holds_
(F_|_n)_._i_is_Matrix_of_D
let i be Nat; ::_thesis: ( i in dom (F | n) implies (F | n) . i is Matrix of D )
assume i in dom (F | n) ; ::_thesis: (F | n) . i is Matrix of D
then (F | n) . i = F . i by FUNCT_1:47;
hence (F | n) . i is Matrix of D ; ::_thesis: verum
end;
hence F | n is FinSequence_of_Matrix of D by Def2; ::_thesis: verum
end;
:: original: /^
redefine funcF /^ n -> FinSequence_of_Matrix of D;
coherence
F /^ n is FinSequence_of_Matrix of D
proof
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(F_/^_n)_holds_
(F_/^_n)_._i_is_Matrix_of_D
let i be Nat; ::_thesis: ( i in dom (F /^ n) implies (F /^ n) . i is Matrix of D )
assume A1: i in dom (F /^ n) ; ::_thesis: (F /^ n) . i is Matrix of D
i + n in dom F by A1, FINSEQ_5:26;
then A2: F . (n + i) = F /. (n + i) by PARTFUN1:def_6;
(F /^ n) . i = (F /^ n) /. i by A1, PARTFUN1:def_6;
hence (F /^ n) . i is Matrix of D by A1, A2, FINSEQ_5:27; ::_thesis: verum
end;
hence F /^ n is FinSequence_of_Matrix of D by Def2; ::_thesis: verum
end;
end;
begin
definition
let D be non empty set ;
let F be FinSequence_of_Matrix of D;
func Len F -> FinSequence of NAT means :Def3: :: MATRIXJ1:def 3
( dom it = dom F & ( for i being Nat st i in dom it holds
it . i = len (F . i) ) );
existence
ex b1 being FinSequence of NAT st
( dom b1 = dom F & ( for i being Nat st i in dom b1 holds
b1 . i = len (F . i) ) )
proof
deffunc H1( Nat) -> Element of NAT = len (F . $1);
consider p being FinSequence of NAT such that
A1: len p = len F and
A2: for i being Nat st i in dom p holds
p . i = H1(i) from FINSEQ_2:sch_1();
take p ; ::_thesis: ( dom p = dom F & ( for i being Nat st i in dom p holds
p . i = len (F . i) ) )
thus ( dom p = dom F & ( for i being Nat st i in dom p holds
p . i = len (F . i) ) ) by A1, A2, FINSEQ_3:29; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence of NAT st dom b1 = dom F & ( for i being Nat st i in dom b1 holds
b1 . i = len (F . i) ) & dom b2 = dom F & ( for i being Nat st i in dom b2 holds
b2 . i = len (F . i) ) holds
b1 = b2
proof
let F1, F2 be FinSequence of NAT ; ::_thesis: ( dom F1 = dom F & ( for i being Nat st i in dom F1 holds
F1 . i = len (F . i) ) & dom F2 = dom F & ( for i being Nat st i in dom F2 holds
F2 . i = len (F . i) ) implies F1 = F2 )
assume that
A3: dom F1 = dom F and
A4: for i being Nat st i in dom F1 holds
F1 . i = len (F . i) and
A5: dom F2 = dom F and
A6: for i being Nat st i in dom F2 holds
F2 . i = len (F . i) ; ::_thesis: F1 = F2
now__::_thesis:_for_x_being_set_st_x_in_dom_F1_holds_
F1_._x_=_F2_._x
let x be set ; ::_thesis: ( x in dom F1 implies F1 . x = F2 . x )
assume A7: x in dom F1 ; ::_thesis: F1 . x = F2 . x
reconsider i = x as Element of NAT by A7;
thus F1 . x = len (F . i) by A4, A7
.= F2 . x by A3, A5, A6, A7 ; ::_thesis: verum
end;
hence F1 = F2 by A3, A5, FUNCT_1:2; ::_thesis: verum
end;
func Width F -> FinSequence of NAT means :Def4: :: MATRIXJ1:def 4
( dom it = dom F & ( for i being Nat st i in dom it holds
it . i = width (F . i) ) );
existence
ex b1 being FinSequence of NAT st
( dom b1 = dom F & ( for i being Nat st i in dom b1 holds
b1 . i = width (F . i) ) )
proof
deffunc H1( Nat) -> Element of NAT = width (F . $1);
consider p being FinSequence of NAT such that
A8: len p = len F and
A9: for i being Nat st i in dom p holds
p . i = H1(i) from FINSEQ_2:sch_1();
take p ; ::_thesis: ( dom p = dom F & ( for i being Nat st i in dom p holds
p . i = width (F . i) ) )
thus ( dom p = dom F & ( for i being Nat st i in dom p holds
p . i = width (F . i) ) ) by A8, A9, FINSEQ_3:29; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence of NAT st dom b1 = dom F & ( for i being Nat st i in dom b1 holds
b1 . i = width (F . i) ) & dom b2 = dom F & ( for i being Nat st i in dom b2 holds
b2 . i = width (F . i) ) holds
b1 = b2
proof
let F1, F2 be FinSequence of NAT ; ::_thesis: ( dom F1 = dom F & ( for i being Nat st i in dom F1 holds
F1 . i = width (F . i) ) & dom F2 = dom F & ( for i being Nat st i in dom F2 holds
F2 . i = width (F . i) ) implies F1 = F2 )
assume that
A10: dom F1 = dom F and
A11: for i being Nat st i in dom F1 holds
F1 . i = width (F . i) and
A12: dom F2 = dom F and
A13: for i being Nat st i in dom F2 holds
F2 . i = width (F . i) ; ::_thesis: F1 = F2
now__::_thesis:_for_x_being_set_st_x_in_dom_F1_holds_
F1_._x_=_F2_._x
let x be set ; ::_thesis: ( x in dom F1 implies F1 . x = F2 . x )
assume A14: x in dom F1 ; ::_thesis: F1 . x = F2 . x
reconsider i = x as Element of NAT by A14;
thus F1 . x = width (F . i) by A11, A14
.= F2 . x by A10, A12, A13, A14 ; ::_thesis: verum
end;
hence F1 = F2 by A10, A12, FUNCT_1:2; ::_thesis: verum
end;
end;
:: deftheorem Def3 defines Len MATRIXJ1:def_3_:_
for D being non empty set
for F being FinSequence_of_Matrix of D
for b3 being FinSequence of NAT holds
( b3 = Len F iff ( dom b3 = dom F & ( for i being Nat st i in dom b3 holds
b3 . i = len (F . i) ) ) );
:: deftheorem Def4 defines Width MATRIXJ1:def_4_:_
for D being non empty set
for F being FinSequence_of_Matrix of D
for b3 being FinSequence of NAT holds
( b3 = Width F iff ( dom b3 = dom F & ( for i being Nat st i in dom b3 holds
b3 . i = width (F . i) ) ) );
definition
let D be non empty set ;
let F be FinSequence_of_Matrix of D;
:: original: Len
redefine func Len F -> Element of (len F) -tuples_on NAT;
coherence
Len F is Element of (len F) -tuples_on NAT
proof
dom (Len F) = dom F by Def3;
then len (Len F) = len F by FINSEQ_3:29;
hence Len F is Element of (len F) -tuples_on NAT by FINSEQ_2:92; ::_thesis: verum
end;
:: original: Width
redefine func Width F -> Element of (len F) -tuples_on NAT;
coherence
Width F is Element of (len F) -tuples_on NAT
proof
dom (Width F) = dom F by Def4;
then len (Width F) = len F by FINSEQ_3:29;
hence Width F is Element of (len F) -tuples_on NAT by FINSEQ_2:92; ::_thesis: verum
end;
end;
theorem Th13: :: MATRIXJ1:13
for D being non empty set
for F being FinSequence_of_Matrix of D st Sum (Len F) = 0 holds
Sum (Width F) = 0
proof
let D be non empty set ; ::_thesis: for F being FinSequence_of_Matrix of D st Sum (Len F) = 0 holds
Sum (Width F) = 0
let F be FinSequence_of_Matrix of D; ::_thesis: ( Sum (Len F) = 0 implies Sum (Width F) = 0 )
set LF = Len F;
set WF = Width F;
assume A1: Sum (Len F) = 0 ; ::_thesis: Sum (Width F) = 0
percases ( ex i being Nat st
( i in dom (Len F) & 0 > (Len F) . i ) or for i being Nat st i in dom (Len F) holds
0 >= (Len F) . i ) by A1, RVSUM_1:85;
suppose ex i being Nat st
( i in dom (Len F) & 0 > (Len F) . i ) ; ::_thesis: Sum (Width F) = 0
hence Sum (Width F) = 0 ; ::_thesis: verum
end;
supposeA2: for i being Nat st i in dom (Len F) holds
0 >= (Len F) . i ; ::_thesis: Sum (Width F) = 0
set F0 = (len F) |-> 0;
A3: len (Width F) = len F by CARD_1:def_7;
A4: dom (Len F) = dom F by Def3;
A5: dom (Width F) = dom F by Def4;
A6: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Width_F)_holds_
(Width_F)_._j_=_((len_F)_|->_0)_._j
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Width F) implies (Width F) . j = ((len F) |-> 0) . j )
assume that
A7: 1 <= j and
A8: j <= len (Width F) ; ::_thesis: (Width F) . j = ((len F) |-> 0) . j
A9: j in dom (Width F) by A7, A8, FINSEQ_3:25;
then A10: (Width F) . j = width (F . j) by Def4;
j in Seg (len F) by A3, A7, A8, FINSEQ_1:1;
then A11: ((len F) |-> 0) . j = 0 by FINSEQ_2:57;
A12: 0 >= (Len F) . j by A2, A5, A4, A9;
(Len F) . j = len (F . j) by A5, A4, A9, Def3;
hence (Width F) . j = ((len F) |-> 0) . j by A10, A12, A11, MATRIX_1:def_3; ::_thesis: verum
end;
len ((len F) |-> 0) = len F by CARD_1:def_7;
then Width F = (len F) |-> 0 by A3, A6, FINSEQ_1:14;
hence Sum (Width F) = 0 by RVSUM_1:81; ::_thesis: verum
end;
end;
end;
theorem Th14: :: MATRIXJ1:14
for D being non empty set
for F1, F2 being FinSequence_of_Matrix of D holds Len (F1 ^ F2) = (Len F1) ^ (Len F2)
proof
let D be non empty set ; ::_thesis: for F1, F2 being FinSequence_of_Matrix of D holds Len (F1 ^ F2) = (Len F1) ^ (Len F2)
let F1, F2 be FinSequence_of_Matrix of D; ::_thesis: Len (F1 ^ F2) = (Len F1) ^ (Len F2)
set F12 = F1 ^ F2;
A1: len (F1 ^ F2) = (len F1) + (len F2) by FINSEQ_1:22;
len F2 = len (Len F2) by CARD_1:def_7;
then A2: dom (Len F2) = dom F2 by FINSEQ_3:29;
A3: len ((Len F1) ^ (Len F2)) = (len F1) + (len F2) by CARD_1:def_7;
A4: len (Len (F1 ^ F2)) = len (F1 ^ F2) by CARD_1:def_7;
then A5: dom ((Len F1) ^ (Len F2)) = dom (Len (F1 ^ F2)) by A1, A3, FINSEQ_3:29;
A6: len F1 = len (Len F1) by CARD_1:def_7;
then A7: dom (Len F1) = dom F1 by FINSEQ_3:29;
now__::_thesis:_for_k_being_Nat_st_1_<=_k_&_k_<=_(len_F1)_+_(len_F2)_holds_
(Len_(F1_^_F2))_._k_=_((Len_F1)_^_(Len_F2))_._k
let k be Nat; ::_thesis: ( 1 <= k & k <= (len F1) + (len F2) implies (Len (F1 ^ F2)) . k = ((Len F1) ^ (Len F2)) . k )
assume that
A8: 1 <= k and
A9: k <= (len F1) + (len F2) ; ::_thesis: (Len (F1 ^ F2)) . k = ((Len F1) ^ (Len F2)) . k
A10: k in dom ((Len F1) ^ (Len F2)) by A3, A8, A9, FINSEQ_3:25;
now__::_thesis:_((Len_F1)_^_(Len_F2))_._k_=_(Len_(F1_^_F2))_._k
percases ( k in dom (Len F1) or ex n being Nat st
( n in dom (Len F2) & k = (len (Len F1)) + n ) ) by A10, FINSEQ_1:25;
supposeA11: k in dom (Len F1) ; ::_thesis: ((Len F1) ^ (Len F2)) . k = (Len (F1 ^ F2)) . k
hence ((Len F1) ^ (Len F2)) . k = (Len F1) . k by FINSEQ_1:def_7
.= len (F1 . k) by A11, Def3
.= len ((F1 ^ F2) . k) by A7, A11, FINSEQ_1:def_7
.= (Len (F1 ^ F2)) . k by A5, A10, Def3 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom (Len F2) & k = (len (Len F1)) + n ) ; ::_thesis: ((Len F1) ^ (Len F2)) . k = (Len (F1 ^ F2)) . k
then consider n being Nat such that
A12: n in dom (Len F2) and
A13: k = (len F1) + n by A6;
thus ((Len F1) ^ (Len F2)) . k = (Len F2) . n by A6, A12, A13, FINSEQ_1:def_7
.= len (F2 . n) by A12, Def3
.= len ((F1 ^ F2) . k) by A2, A12, A13, FINSEQ_1:def_7
.= (Len (F1 ^ F2)) . k by A5, A10, Def3 ; ::_thesis: verum
end;
end;
end;
hence (Len (F1 ^ F2)) . k = ((Len F1) ^ (Len F2)) . k ; ::_thesis: verum
end;
hence Len (F1 ^ F2) = (Len F1) ^ (Len F2) by A4, A1, A3, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th15: :: MATRIXJ1:15
for D being non empty set
for M being Matrix of D holds Len <*M*> = <*(len M)*>
proof
let D be non empty set ; ::_thesis: for M being Matrix of D holds Len <*M*> = <*(len M)*>
let M be Matrix of D; ::_thesis: Len <*M*> = <*(len M)*>
set F = <*M*>;
A1: len <*M*> = 1 by FINSEQ_1:40;
A2: <*M*> . 1 = M by FINSEQ_1:40;
A3: len <*M*> = len (Len <*M*>) by CARD_1:def_7;
A4: dom (Len <*M*>) = Seg (len <*M*>) by FINSEQ_2:124;
1 in Seg 1 ;
then (Len <*M*>) . 1 = len (<*M*> . 1) by A1, A4, Def3;
hence Len <*M*> = <*(len M)*> by A1, A3, A2, FINSEQ_1:40; ::_thesis: verum
end;
Lm4: for D being non empty set
for M being Matrix of D holds Sum (Len <*M*>) = len M
proof
let D be non empty set ; ::_thesis: for M being Matrix of D holds Sum (Len <*M*>) = len M
let M be Matrix of D; ::_thesis: Sum (Len <*M*>) = len M
Len <*M*> = <*(len M)*> by Th15;
hence Sum (Len <*M*>) = len M by RVSUM_1:73; ::_thesis: verum
end;
theorem Th16: :: MATRIXJ1:16
for D being non empty set
for M1, M2 being Matrix of D holds Sum (Len <*M1,M2*>) = (len M1) + (len M2)
proof
let D be non empty set ; ::_thesis: for M1, M2 being Matrix of D holds Sum (Len <*M1,M2*>) = (len M1) + (len M2)
let M1, M2 be Matrix of D; ::_thesis: Sum (Len <*M1,M2*>) = (len M1) + (len M2)
thus Sum (Len <*M1,M2*>) = Sum ((Len <*M1*>) ^ (Len <*M2*>)) by Th14
.= (Sum (Len <*M1*>)) + (Sum (Len <*M2*>)) by RVSUM_1:75
.= (len M1) + (Sum (Len <*M2*>)) by Lm4
.= (len M1) + (len M2) by Lm4 ; ::_thesis: verum
end;
theorem Th17: :: MATRIXJ1:17
for n being Nat
for D being non empty set
for F1 being FinSequence_of_Matrix of D holds Len (F1 | n) = (Len F1) | n
proof
let n be Nat; ::_thesis: for D being non empty set
for F1 being FinSequence_of_Matrix of D holds Len (F1 | n) = (Len F1) | n
let D be non empty set ; ::_thesis: for F1 being FinSequence_of_Matrix of D holds Len (F1 | n) = (Len F1) | n
let F1 be FinSequence_of_Matrix of D; ::_thesis: Len (F1 | n) = (Len F1) | n
A1: len (Len F1) = len F1 by CARD_1:def_7;
percases ( n >= len F1 or n < len F1 ) ;
supposeA2: n >= len F1 ; ::_thesis: Len (F1 | n) = (Len F1) | n
then F1 | n = F1 by FINSEQ_1:58;
hence Len (F1 | n) = (Len F1) | n by A1, A2, FINSEQ_1:58; ::_thesis: verum
end;
supposeA3: n < len F1 ; ::_thesis: Len (F1 | n) = (Len F1) | n
F1 = (F1 | n) ^ (F1 /^ n) by RFINSEQ:8;
then A4: Len F1 = (Len (F1 | n)) ^ (Len (F1 /^ n)) by Th14;
len (F1 | n) = n by A3, FINSEQ_1:59;
then len (Len (F1 | n)) = n by CARD_1:def_7;
hence Len (F1 | n) = (Len F1) | n by A4, FINSEQ_5:23; ::_thesis: verum
end;
end;
end;
theorem Th18: :: MATRIXJ1:18
for D being non empty set
for F1, F2 being FinSequence_of_Matrix of D holds Width (F1 ^ F2) = (Width F1) ^ (Width F2)
proof
let D be non empty set ; ::_thesis: for F1, F2 being FinSequence_of_Matrix of D holds Width (F1 ^ F2) = (Width F1) ^ (Width F2)
let F1, F2 be FinSequence_of_Matrix of D; ::_thesis: Width (F1 ^ F2) = (Width F1) ^ (Width F2)
set F12 = F1 ^ F2;
A1: len (F1 ^ F2) = (len F1) + (len F2) by FINSEQ_1:22;
len F2 = len (Width F2) by CARD_1:def_7;
then A2: dom (Width F2) = dom F2 by FINSEQ_3:29;
A3: len ((Width F1) ^ (Width F2)) = (len F1) + (len F2) by CARD_1:def_7;
A4: len (Width (F1 ^ F2)) = len (F1 ^ F2) by CARD_1:def_7;
then A5: dom ((Width F1) ^ (Width F2)) = dom (Width (F1 ^ F2)) by A1, A3, FINSEQ_3:29;
A6: len F1 = len (Width F1) by CARD_1:def_7;
then A7: dom (Width F1) = dom F1 by FINSEQ_3:29;
now__::_thesis:_for_k_being_Nat_st_1_<=_k_&_k_<=_(len_F1)_+_(len_F2)_holds_
(Width_(F1_^_F2))_._k_=_((Width_F1)_^_(Width_F2))_._k
let k be Nat; ::_thesis: ( 1 <= k & k <= (len F1) + (len F2) implies (Width (F1 ^ F2)) . k = ((Width F1) ^ (Width F2)) . k )
assume that
A8: 1 <= k and
A9: k <= (len F1) + (len F2) ; ::_thesis: (Width (F1 ^ F2)) . k = ((Width F1) ^ (Width F2)) . k
A10: k in dom ((Width F1) ^ (Width F2)) by A3, A8, A9, FINSEQ_3:25;
now__::_thesis:_((Width_F1)_^_(Width_F2))_._k_=_(Width_(F1_^_F2))_._k
percases ( k in dom (Width F1) or ex n being Nat st
( n in dom (Width F2) & k = (len (Width F1)) + n ) ) by A10, FINSEQ_1:25;
supposeA11: k in dom (Width F1) ; ::_thesis: ((Width F1) ^ (Width F2)) . k = (Width (F1 ^ F2)) . k
hence ((Width F1) ^ (Width F2)) . k = (Width F1) . k by FINSEQ_1:def_7
.= width (F1 . k) by A11, Def4
.= width ((F1 ^ F2) . k) by A7, A11, FINSEQ_1:def_7
.= (Width (F1 ^ F2)) . k by A5, A10, Def4 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom (Width F2) & k = (len (Width F1)) + n ) ; ::_thesis: ((Width F1) ^ (Width F2)) . k = (Width (F1 ^ F2)) . k
then consider n being Nat such that
A12: n in dom (Width F2) and
A13: k = (len F1) + n by A6;
thus ((Width F1) ^ (Width F2)) . k = (Width F2) . n by A6, A12, A13, FINSEQ_1:def_7
.= width (F2 . n) by A12, Def4
.= width ((F1 ^ F2) . k) by A2, A12, A13, FINSEQ_1:def_7
.= (Width (F1 ^ F2)) . k by A5, A10, Def4 ; ::_thesis: verum
end;
end;
end;
hence (Width (F1 ^ F2)) . k = ((Width F1) ^ (Width F2)) . k ; ::_thesis: verum
end;
hence Width (F1 ^ F2) = (Width F1) ^ (Width F2) by A4, A1, A3, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th19: :: MATRIXJ1:19
for D being non empty set
for M being Matrix of D holds Width <*M*> = <*(width M)*>
proof
let D be non empty set ; ::_thesis: for M being Matrix of D holds Width <*M*> = <*(width M)*>
let M be Matrix of D; ::_thesis: Width <*M*> = <*(width M)*>
set F = <*M*>;
A1: len <*M*> = 1 by FINSEQ_1:40;
A2: <*M*> . 1 = M by FINSEQ_1:40;
A3: len <*M*> = len (Width <*M*>) by CARD_1:def_7;
A4: dom (Width <*M*>) = Seg (len <*M*>) by FINSEQ_2:124;
1 in Seg 1 ;
then (Width <*M*>) . 1 = width (<*M*> . 1) by A1, A4, Def4;
hence Width <*M*> = <*(width M)*> by A1, A3, A2, FINSEQ_1:40; ::_thesis: verum
end;
Lm5: for D being non empty set
for M being Matrix of D holds Sum (Width <*M*>) = width M
proof
let D be non empty set ; ::_thesis: for M being Matrix of D holds Sum (Width <*M*>) = width M
let M be Matrix of D; ::_thesis: Sum (Width <*M*>) = width M
Width <*M*> = <*(width M)*> by Th19;
hence Sum (Width <*M*>) = width M by RVSUM_1:73; ::_thesis: verum
end;
theorem Th20: :: MATRIXJ1:20
for D being non empty set
for M1, M2 being Matrix of D holds Sum (Width <*M1,M2*>) = (width M1) + (width M2)
proof
let D be non empty set ; ::_thesis: for M1, M2 being Matrix of D holds Sum (Width <*M1,M2*>) = (width M1) + (width M2)
let M1, M2 be Matrix of D; ::_thesis: Sum (Width <*M1,M2*>) = (width M1) + (width M2)
thus Sum (Width <*M1,M2*>) = Sum ((Width <*M1*>) ^ (Width <*M2*>)) by Th18
.= (Sum (Width <*M1*>)) + (Sum (Width <*M2*>)) by RVSUM_1:75
.= (width M1) + (Sum (Width <*M2*>)) by Lm5
.= (width M1) + (width M2) by Lm5 ; ::_thesis: verum
end;
theorem Th21: :: MATRIXJ1:21
for n being Nat
for D being non empty set
for F1 being FinSequence_of_Matrix of D holds Width (F1 | n) = (Width F1) | n
proof
let n be Nat; ::_thesis: for D being non empty set
for F1 being FinSequence_of_Matrix of D holds Width (F1 | n) = (Width F1) | n
let D be non empty set ; ::_thesis: for F1 being FinSequence_of_Matrix of D holds Width (F1 | n) = (Width F1) | n
let F1 be FinSequence_of_Matrix of D; ::_thesis: Width (F1 | n) = (Width F1) | n
A1: len (Width F1) = len F1 by CARD_1:def_7;
percases ( n >= len F1 or n < len F1 ) ;
supposeA2: n >= len F1 ; ::_thesis: Width (F1 | n) = (Width F1) | n
then F1 | n = F1 by FINSEQ_1:58;
hence Width (F1 | n) = (Width F1) | n by A1, A2, FINSEQ_1:58; ::_thesis: verum
end;
supposeA3: n < len F1 ; ::_thesis: Width (F1 | n) = (Width F1) | n
F1 = (F1 | n) ^ (F1 /^ n) by RFINSEQ:8;
then A4: Width F1 = (Width (F1 | n)) ^ (Width (F1 /^ n)) by Th18;
len (F1 | n) = n by A3, FINSEQ_1:59;
then len (Width (F1 | n)) = n by CARD_1:def_7;
hence Width (F1 | n) = (Width F1) | n by A4, FINSEQ_5:23; ::_thesis: verum
end;
end;
end;
begin
definition
let D be non empty set ;
let d be Element of D;
let F be FinSequence_of_Matrix of D;
func block_diagonal (F,d) -> Matrix of D means :Def5: :: MATRIXJ1:def 5
( len it = Sum (Len F) & width it = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices it holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies it * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies it * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) );
existence
ex b1 being Matrix of D st
( len b1 = Sum (Len F) & width b1 = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices b1 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies b1 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies b1 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) )
proof
set M = Sum (Width F);
set N = Sum (Len F);
set L = Len F;
set W = Width F;
defpred S1[ Nat, Nat, Element of D] means ( ( ( $2 <= Sum ((Width F) | ((min ((Len F),$1)) -' 1)) or $2 > Sum ((Width F) | (min ((Len F),$1))) ) implies $3 = d ) & ( Sum ((Width F) | ((min ((Len F),$1)) -' 1)) < $2 & $2 <= Sum ((Width F) | (min ((Len F),$1))) implies $3 = (F . (min ((Len F),$1))) * (($1 -' (Sum ((Len F) | ((min ((Len F),$1)) -' 1)))),($2 -' (Sum ((Width F) | ((min ((Len F),$1)) -' 1))))) ) );
A1: for i, j being Nat st [i,j] in [:(Seg (Sum (Len F))),(Seg (Sum (Width F))):] holds
ex x being Element of D st S1[i,j,x]
proof
let i, j be Nat; ::_thesis: ( [i,j] in [:(Seg (Sum (Len F))),(Seg (Sum (Width F))):] implies ex x being Element of D st S1[i,j,x] )
assume [i,j] in [:(Seg (Sum (Len F))),(Seg (Sum (Width F))):] ; ::_thesis: ex x being Element of D st S1[i,j,x]
percases ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) or ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) ) ) ;
supposeA2: ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) ; ::_thesis: ex x being Element of D st S1[i,j,x]
take d ; ::_thesis: S1[i,j,d]
thus S1[i,j,d] by A2; ::_thesis: verum
end;
supposeA3: ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) ) ; ::_thesis: ex x being Element of D st S1[i,j,x]
take (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ; ::_thesis: S1[i,j,(F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1)))))]
thus S1[i,j,(F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1)))))] by A3; ::_thesis: verum
end;
end;
end;
consider MM being Matrix of Sum (Len F), Sum (Width F),D such that
A4: for i, j being Nat st [i,j] in Indices MM holds
S1[i,j,MM * (i,j)] from MATRIX_1:sch_2(A1);
take MM ; ::_thesis: ( len MM = Sum (Len F) & width MM = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices MM holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies MM * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies MM * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) )
percases ( Sum (Len F) = 0 or Sum (Len F) > 0 ) ;
supposeA5: Sum (Len F) = 0 ; ::_thesis: ( len MM = Sum (Len F) & width MM = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices MM holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies MM * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies MM * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) )
then Sum (Width F) = 0 by Th13;
hence ( len MM = Sum (Len F) & width MM = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices MM holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies MM * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies MM * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) ) by A5, MATRIX_1:22; ::_thesis: verum
end;
suppose Sum (Len F) > 0 ; ::_thesis: ( len MM = Sum (Len F) & width MM = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices MM holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies MM * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies MM * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) )
hence ( len MM = Sum (Len F) & width MM = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices MM holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies MM * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies MM * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) ) by A4, MATRIX_1:23; ::_thesis: verum
end;
end;
end;
uniqueness
for b1, b2 being Matrix of D st len b1 = Sum (Len F) & width b1 = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices b1 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies b1 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies b1 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) & len b2 = Sum (Len F) & width b2 = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices b2 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies b2 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies b2 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) holds
b1 = b2
proof
set W = Width F;
set L = Len F;
let M1, M2 be Matrix of D; ::_thesis: ( len M1 = Sum (Len F) & width M1 = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices M1 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies M1 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies M1 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) & len M2 = Sum (Len F) & width M2 = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices M2 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies M2 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies M2 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) implies M1 = M2 )
assume that
A6: len M1 = Sum (Len F) and
A7: width M1 = Sum (Width F) and
A8: for i, j being Nat st [i,j] in Indices M1 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies M1 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies M1 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) and
A9: len M2 = Sum (Len F) and
A10: width M2 = Sum (Width F) and
A11: for i, j being Nat st [i,j] in Indices M2 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies M2 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies M2 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ; ::_thesis: M1 = M2
A12: Indices M1 = [:(Seg (len M1)),(Seg (width M1)):] by FINSEQ_1:def_3
.= Indices M2 by A6, A7, A9, A10, FINSEQ_1:def_3 ;
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_M1_holds_
M1_*_(i,j)_=_M2_*_(i,j)
let i, j be Nat; ::_thesis: ( [i,j] in Indices M1 implies M1 * (i,j) = M2 * (i,j) )
assume A13: [i,j] in Indices M1 ; ::_thesis: M1 * (i,j) = M2 * (i,j)
( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) or ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) ) ) ;
then ( ( M1 * (i,j) = d & M2 * (i,j) = d ) or ( M1 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) & M2 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) by A8, A11, A12, A13;
hence M1 * (i,j) = M2 * (i,j) ; ::_thesis: verum
end;
hence M1 = M2 by A6, A7, A9, A10, MATRIX_1:21; ::_thesis: verum
end;
end;
:: deftheorem Def5 defines block_diagonal MATRIXJ1:def_5_:_
for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D
for b4 being Matrix of D holds
( b4 = block_diagonal (F,d) iff ( len b4 = Sum (Len F) & width b4 = Sum (Width F) & ( for i, j being Nat st [i,j] in Indices b4 holds
( ( ( j <= Sum ((Width F) | ((min ((Len F),i)) -' 1)) or j > Sum ((Width F) | (min ((Len F),i))) ) implies b4 * (i,j) = d ) & ( Sum ((Width F) | ((min ((Len F),i)) -' 1)) < j & j <= Sum ((Width F) | (min ((Len F),i))) implies b4 * (i,j) = (F . (min ((Len F),i))) * ((i -' (Sum ((Len F) | ((min ((Len F),i)) -' 1)))),(j -' (Sum ((Width F) | ((min ((Len F),i)) -' 1))))) ) ) ) ) );
definition
let D be non empty set ;
let d be Element of D;
let F be FinSequence_of_Matrix of D;
:: original: block_diagonal
redefine func block_diagonal (F,d) -> Matrix of Sum (Len F), Sum (Width F),D;
coherence
block_diagonal (F,d) is Matrix of Sum (Len F), Sum (Width F),D
proof
A1: width (block_diagonal (F,d)) = Sum (Width F) by Def5;
len (block_diagonal (F,d)) = Sum (Len F) by Def5;
hence block_diagonal (F,d) is Matrix of Sum (Len F), Sum (Width F),D by A1, MATRIX_2:7; ::_thesis: verum
end;
end;
theorem :: MATRIXJ1:22
for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D st F = {} holds
block_diagonal (F,d) = {}
proof
let D be non empty set ; ::_thesis: for d being Element of D
for F being FinSequence_of_Matrix of D st F = {} holds
block_diagonal (F,d) = {}
let d be Element of D; ::_thesis: for F being FinSequence_of_Matrix of D st F = {} holds
block_diagonal (F,d) = {}
let F be FinSequence_of_Matrix of D; ::_thesis: ( F = {} implies block_diagonal (F,d) = {} )
assume F = {} ; ::_thesis: block_diagonal (F,d) = {}
then len (Len F) = 0 by CARD_1:def_7;
then Len F = <*> REAL ;
then 0 = len (block_diagonal (F,d)) by Def5, RVSUM_1:72;
hence block_diagonal (F,d) = {} ; ::_thesis: verum
end;
theorem Th23: :: MATRIXJ1:23
for D being non empty set
for d being Element of D
for M1, M2 being Matrix of D
for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ) )
proof
let D be non empty set ; ::_thesis: for d being Element of D
for M1, M2 being Matrix of D
for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ) )
let d be Element of D; ::_thesis: for M1, M2 being Matrix of D
for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ) )
let M1, M2 be Matrix of D; ::_thesis: for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ) )
let M be Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D; ::_thesis: ( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ) )
set F1 = <*M1*>;
set F2 = <*M2*>;
set F12 = <*M1,M2*>;
set B = block_diagonal (<*M1,M2*>,d);
set L1 = len M1;
set L2 = len M2;
set W1 = width M1;
set W2 = width M2;
A1: Sum <*(width M1)*> = width M1 by RVSUM_1:73;
len (block_diagonal (<*M1,M2*>,d)) = Sum (Len <*M1,M2*>) by Def5;
then A2: len (block_diagonal (<*M1,M2*>,d)) = (len M1) + (len M2) by Th16;
A3: len <*M1,M2*> = len (Len <*M1,M2*>) by CARD_1:def_7;
A4: (Len <*M1,M2*>) | 0 = <*> REAL ;
A5: (Width <*M1,M2*>) | 0 = <*> REAL ;
A6: 1 -' 1 = 0 by XREAL_1:232;
A7: width (block_diagonal (<*M1,M2*>,d)) = Sum (Width <*M1,M2*>) by Def5;
then A8: width (block_diagonal (<*M1,M2*>,d)) = (width M1) + (width M2) by Th20;
A9: len <*(width M1)*> = 1 by FINSEQ_1:40;
A10: len <*M1*> = 1 by FINSEQ_1:40;
A11: Len <*M1*> = <*(len M1)*> by Th15;
A12: Len <*M1,M2*> = (Len <*M1*>) ^ (Len <*M2*>) by Th14;
then A13: (Len <*M1,M2*>) . 1 = len M1 by A11, FINSEQ_1:41;
A14: len <*(len M1)*> = 1 by FINSEQ_1:40;
then A15: (Len <*M1,M2*>) | 1 = <*(len M1)*> by A12, A11, FINSEQ_5:23;
A16: Width <*M1*> = <*(width M1)*> by Th19;
A17: Sum <*(len M1)*> = len M1 by RVSUM_1:73;
Width <*M1,M2*> = (Width <*M1*>) ^ (Width <*M2*>) by Th18;
then A18: (Width <*M1,M2*>) | 1 = <*(width M1)*> by A16, A9, FINSEQ_5:23;
A19: Len <*M2*> = <*(len M2)*> by Th15;
then A20: len (Len <*M1,M2*>) = 1 + 1 by A12, A11, A14, FINSEQ_2:16;
A21: (Len <*M1,M2*>) . 2 = len M2 by A12, A11, A19, A14, FINSEQ_1:42;
len (Width <*M1,M2*>) = len <*M1,M2*> by CARD_1:def_7;
then A22: (Width <*M1,M2*>) | 2 = Width <*M1,M2*> by A20, A3, FINSEQ_1:58;
A23: dom (Len <*M1,M2*>) = {1,2} by A20, FINSEQ_1:2, FINSEQ_1:def_3;
then A24: 1 in dom (Len <*M1,M2*>) by TARSKI:def_2;
then A25: (Len <*M1,M2*>) /. 1 = (Len <*M1,M2*>) . 1 by PARTFUN1:def_6;
A26: 2 -' 1 = 2 - 1 by XREAL_1:233;
( Sum (Len <*M1,M2*>) = 0 implies Sum (Width <*M1,M2*>) = 0 ) by Th13;
then A27: width M = (width M1) + (width M2) by A7, A8, MATRIX13:1;
A28: 2 in dom (Len <*M1,M2*>) by A23, TARSKI:def_2;
then A29: (Len <*M1,M2*>) /. 2 = (Len <*M1,M2*>) . 2 by PARTFUN1:def_6;
hereby ::_thesis: ( ( for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ) ) implies M = block_diagonal (<*M1,M2*>,d) )
assume A30: M = block_diagonal (<*M1,M2*>,d) ; ::_thesis: for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) )
let i be Nat; ::_thesis: ( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) )
thus ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) ::_thesis: ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) )
proof
set W2d = (width M2) |-> d;
set LM1 = Line (M1,i);
set LM = Line (M,i);
A31: len M1 <= (len M1) + (len M2) by NAT_1:11;
A32: len (Line (M1,i)) = width M1 by CARD_1:def_7;
assume A33: i in dom M1 ; ::_thesis: Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d)
then A34: 1 <= i by FINSEQ_3:25;
i <= len M1 by A33, FINSEQ_3:25;
then i <= (len M1) + (len M2) by A31, XXREAL_0:2;
then A35: i in dom (block_diagonal (<*M1,M2*>,d)) by A2, A34, FINSEQ_3:25;
A36: len ((width M2) |-> d) = width M2 by CARD_1:def_7;
A37: len ((Line (M1,i)) ^ ((width M2) |-> d)) = (len (Line (M1,i))) + (len ((width M2) |-> d)) by FINSEQ_1:22;
A38: len (Line (M,i)) = (width M1) + (width M2) by A27, CARD_1:def_7;
A39: i in Seg (len M1) by A33, FINSEQ_1:def_3;
now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Line_(M,i))_holds_
(Line_(M,i))_._j_=_((Line_(M1,i))_^_((width_M2)_|->_d))_._j
A40: min ((Len <*M1,M2*>),(i + 0)) = 1 by A24, A6, A13, A25, A4, A39, Th10, RVSUM_1:72;
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Line (M,i)) implies (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j )
assume that
A41: 1 <= j and
A42: j <= len (Line (M,i)) ; ::_thesis: (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
A43: j in Seg (width (block_diagonal (<*M1,M2*>,d))) by A8, A38, A41, A42, FINSEQ_1:1;
then A44: [i,j] in Indices (block_diagonal (<*M1,M2*>,d)) by A35, ZFMISC_1:87;
A45: j in dom ((Line (M1,i)) ^ ((width M2) |-> d)) by A38, A32, A36, A37, A41, A42, FINSEQ_3:25;
now__::_thesis:_(Line_(M,i))_._j_=_((Line_(M1,i))_^_((width_M2)_|->_d))_._j
percases ( j <= width M1 or j > width M1 ) ;
supposeA46: j <= width M1 ; ::_thesis: (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
then A47: j in Seg (width M1) by A41, FINSEQ_1:1;
A48: j in dom (Line (M1,i)) by A32, A41, A46, FINSEQ_3:25;
thus (Line (M,i)) . j = M * (i,j) by A8, A27, A43, MATRIX_1:def_7
.= (<*M1,M2*> . 1) * ((i -' (Sum ((Len <*M1,M2*>) | 0))),(j -' (Sum ((Width <*M1,M2*>) | 0)))) by A1, A6, A18, A30, A41, A44, A40, A46, Def5, RVSUM_1:72
.= (<*M1,M2*> . 1) * (i,(j -' 0)) by NAT_D:40, RVSUM_1:72
.= (<*M1,M2*> . 1) * (i,j) by NAT_D:40
.= M1 * (i,j) by FINSEQ_1:41
.= (Line (M1,i)) . j by A47, MATRIX_1:def_7
.= ((Line (M1,i)) ^ ((width M2) |-> d)) . j by A48, FINSEQ_1:def_7 ; ::_thesis: verum
end;
supposeA49: j > width M1 ; ::_thesis: (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
A50: dom ((width M2) |-> d) = Seg (width M2) by A36, FINSEQ_1:def_3;
not j in dom (Line (M1,i)) by A32, A49, FINSEQ_3:25;
then consider k being Nat such that
A51: k in dom ((width M2) |-> d) and
A52: j = (len (Line (M1,i))) + k by A45, FINSEQ_1:25;
thus (Line (M,i)) . j = M * (i,j) by A8, A27, A43, MATRIX_1:def_7
.= d by A1, A18, A30, A44, A40, A49, Def5
.= ((width M2) |-> d) . k by A51, A50, FINSEQ_2:57
.= ((Line (M1,i)) ^ ((width M2) |-> d)) . j by A51, A52, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
hence (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j ; ::_thesis: verum
end;
hence Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) by A38, A32, A36, A37, FINSEQ_1:14; ::_thesis: verum
end;
thus ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ::_thesis: verum
proof
set LM2 = Line (M2,i);
set W1d = (width M1) |-> d;
set LM = Line (M,(i + (len M1)));
A53: len (Line (M2,i)) = width M2 by CARD_1:def_7;
A54: len (((width M1) |-> d) ^ (Line (M2,i))) = (len ((width M1) |-> d)) + (len (Line (M2,i))) by FINSEQ_1:22;
A55: len ((width M1) |-> d) = width M1 by CARD_1:def_7;
A56: len (Line (M,(i + (len M1)))) = (width M1) + (width M2) by A27, CARD_1:def_7;
assume i in dom M2 ; ::_thesis: Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i))
then A57: i in Seg (len M2) by FINSEQ_1:def_3;
then (len M1) + i in Seg ((len M1) + (len M2)) by FINSEQ_1:60;
then A58: (len M1) + i in dom (block_diagonal (<*M1,M2*>,d)) by A2, FINSEQ_1:def_3;
now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Line_(M,(i_+_(len_M1))))_holds_
(Line_(M,(i_+_(len_M1))))_._j_=_(((width_M1)_|->_d)_^_(Line_(M2,i)))_._j
A59: min ((Len <*M1,M2*>),(i + (len M1))) = 2 by A17, A28, A26, A21, A29, A15, A57, Th10;
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Line (M,(i + (len M1)))) implies (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j )
assume that
A60: 1 <= j and
A61: j <= len (Line (M,(i + (len M1)))) ; ::_thesis: (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j
A62: j in Seg (width (block_diagonal (<*M1,M2*>,d))) by A8, A56, A60, A61, FINSEQ_1:1;
then A63: [(i + (len M1)),j] in Indices (block_diagonal (<*M1,M2*>,d)) by A58, ZFMISC_1:87;
A64: j in dom (((width M1) |-> d) ^ (Line (M2,i))) by A56, A53, A55, A54, A60, A61, FINSEQ_3:25;
now__::_thesis:_(Line_(M,(i_+_(len_M1))))_._j_=_(((width_M1)_|->_d)_^_(Line_(M2,i)))_._j
percases ( j <= width M1 or j > width M1 ) ;
supposeA65: j <= width M1 ; ::_thesis: (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j
A66: dom ((width M1) |-> d) = Seg (width M1) by A55, FINSEQ_1:def_3;
A67: j in Seg (width M1) by A60, A65, FINSEQ_1:1;
thus (Line (M,(i + (len M1)))) . j = (block_diagonal (<*M1,M2*>,d)) * ((i + (len M1)),j) by A30, A62, MATRIX_1:def_7
.= d by A1, A26, A18, A63, A59, A65, Def5
.= ((width M1) |-> d) . j by A67, FINSEQ_2:57
.= (((width M1) |-> d) ^ (Line (M2,i))) . j by A67, A66, FINSEQ_1:def_7 ; ::_thesis: verum
end;
supposeA68: j > width M1 ; ::_thesis: (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j
A69: dom (Line (M2,i)) = Seg (width M2) by A53, FINSEQ_1:def_3;
not j in dom ((width M1) |-> d) by A55, A68, FINSEQ_3:25;
then consider k being Nat such that
A70: k in dom (Line (M2,i)) and
A71: j = (width M1) + k by A55, A64, FINSEQ_1:25;
thus (Line (M,(i + (len M1)))) . j = (block_diagonal (<*M1,M2*>,d)) * ((i + (len M1)),j) by A30, A62, MATRIX_1:def_7
.= (<*M1,M2*> . 2) * (((i + (len M1)) -' (len M1)),(j -' (width M1))) by A7, A8, A1, A17, A26, A15, A18, A22, A56, A61, A63, A59, A68, Def5
.= (<*M1,M2*> . 2) * (i,(j -' (width M1))) by NAT_D:34
.= (<*M1,M2*> . ((len <*M1*>) + 1)) * (i,k) by A10, A71, NAT_D:34
.= M2 * (i,k) by FINSEQ_1:42
.= (Line (M2,i)) . k by A70, A69, MATRIX_1:def_7
.= (((width M1) |-> d) ^ (Line (M2,i))) . j by A55, A70, A71, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
hence (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j ; ::_thesis: verum
end;
hence Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) by A56, A53, A55, A54, FINSEQ_1:14; ::_thesis: verum
end;
end;
assume A72: for i being Nat holds
( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ) ; ::_thesis: M = block_diagonal (<*M1,M2*>,d)
A73: Sum ((Width <*M1,M2*>) | 2) = (width M1) + (width M2) by A22, Th20;
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_M_holds_
M_*_(i,j)_=_(block_diagonal_(<*M1,M2*>,d))_*_(i,j)
set W1d = (width M1) |-> d;
set W2d = (width M2) |-> d;
A74: Indices M = Indices (block_diagonal (<*M1,M2*>,d)) by MATRIX_1:26;
let i, j be Nat; ::_thesis: ( [i,j] in Indices M implies M * (i,j) = (block_diagonal (<*M1,M2*>,d)) * (i,j) )
assume A75: [i,j] in Indices M ; ::_thesis: M * (i,j) = (block_diagonal (<*M1,M2*>,d)) * (i,j)
A76: i in dom (block_diagonal (<*M1,M2*>,d)) by A75, A74, ZFMISC_1:87;
then A77: 1 <= i by FINSEQ_3:25;
A78: j in Seg (width (block_diagonal (<*M1,M2*>,d))) by A75, A74, ZFMISC_1:87;
then A79: 1 <= j by FINSEQ_1:1;
A80: i in Seg ((len M1) + (len M2)) by A2, A76, FINSEQ_1:def_3;
set LM1 = Line (M1,i);
A81: len (Line (M1,i)) = width M1 by CARD_1:def_7;
A82: len ((width M1) |-> d) = width M1 by CARD_1:def_7;
A83: len ((width M2) |-> d) = width M2 by CARD_1:def_7;
A84: len ((Line (M1,i)) ^ ((width M2) |-> d)) = (len (Line (M1,i))) + (len ((width M2) |-> d)) by FINSEQ_1:22;
A85: j <= width (block_diagonal (<*M1,M2*>,d)) by A78, FINSEQ_1:1;
now__::_thesis:_M_*_(i,j)_=_(block_diagonal_(<*M1,M2*>,d))_*_(i,j)
percases ( i <= len M1 or i > len M1 ) ;
supposeA86: i <= len M1 ; ::_thesis: M * (i,j) = (block_diagonal (<*M1,M2*>,d)) * (i,j)
then i in Seg (len M1) by A76, A77;
then A87: min ((Len <*M1,M2*>),(i + 0)) = 1 by A24, A6, A13, A25, A4, Th10, RVSUM_1:72;
A88: now__::_thesis:_(block_diagonal_(<*M1,M2*>,d))_*_(i,j)_=_((Line_(M1,i))_^_((width_M2)_|->_d))_._j
percases ( j <= width M1 or j > width M1 ) ;
supposeA89: j <= width M1 ; ::_thesis: (block_diagonal (<*M1,M2*>,d)) * (i,j) = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
then A90: j in Seg (width M1) by A79, FINSEQ_1:1;
A91: j in dom (Line (M1,i)) by A79, A81, A89, FINSEQ_3:25;
thus (block_diagonal (<*M1,M2*>,d)) * (i,j) = (<*M1,M2*> . 1) * ((i -' 0),(j -' 0)) by A1, A6, A4, A5, A18, A75, A74, A79, A87, A89, Def5, RVSUM_1:72
.= (<*M1,M2*> . 1) * (i,(j -' 0)) by NAT_D:40
.= (<*M1,M2*> . 1) * (i,j) by NAT_D:40
.= M1 * (i,j) by FINSEQ_1:41
.= (Line (M1,i)) . j by A90, MATRIX_1:def_7
.= ((Line (M1,i)) ^ ((width M2) |-> d)) . j by A91, FINSEQ_1:def_7 ; ::_thesis: verum
end;
supposeA92: j > width M1 ; ::_thesis: (block_diagonal (<*M1,M2*>,d)) * (i,j) = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
then A93: not j in dom (Line (M1,i)) by A81, FINSEQ_3:25;
A94: dom ((width M2) |-> d) = Seg (width M2) by A83, FINSEQ_1:def_3;
dom ((Line (M1,i)) ^ ((width M2) |-> d)) = Seg (width (block_diagonal (<*M1,M2*>,d))) by A8, A81, A83, A84, FINSEQ_1:def_3;
then consider k being Nat such that
A95: k in dom ((width M2) |-> d) and
A96: j = (len (Line (M1,i))) + k by A78, A93, FINSEQ_1:25;
thus (block_diagonal (<*M1,M2*>,d)) * (i,j) = d by A1, A18, A75, A74, A87, A92, Def5
.= ((width M2) |-> d) . k by A95, A94, FINSEQ_2:57
.= ((Line (M1,i)) ^ ((width M2) |-> d)) . j by A95, A96, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
i in dom M1 by A77, A86, FINSEQ_3:25;
then Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) by A72;
hence M * (i,j) = (block_diagonal (<*M1,M2*>,d)) * (i,j) by A8, A27, A78, A88, MATRIX_1:def_7; ::_thesis: verum
end;
supposeA97: i > len M1 ; ::_thesis: M * (i,j) = (block_diagonal (<*M1,M2*>,d)) * (i,j)
then reconsider iL = i - (len M1) as Element of NAT by NAT_1:21;
A98: iL <> 0 by A97;
set LM2 = Line (M2,iL);
i = iL + (len M1) ;
then iL in Seg (len M2) by A80, A98, FINSEQ_1:61;
then A99: min ((Len <*M1,M2*>),(iL + (len M1))) = 2 by A17, A28, A26, A21, A29, A15, Th10;
A100: now__::_thesis:_(block_diagonal_(<*M1,M2*>,d))_*_(i,j)_=_(((width_M1)_|->_d)_^_(Line_(M2,iL)))_._j
percases ( j <= width M1 or j > width M1 ) ;
supposeA101: j <= width M1 ; ::_thesis: (block_diagonal (<*M1,M2*>,d)) * (i,j) = (((width M1) |-> d) ^ (Line (M2,iL))) . j
then A102: j in Seg (width M1) by A79, FINSEQ_1:1;
A103: j in dom ((width M1) |-> d) by A79, A82, A101, FINSEQ_3:25;
thus (block_diagonal (<*M1,M2*>,d)) * (i,j) = d by A1, A26, A18, A75, A74, A99, A101, Def5
.= ((width M1) |-> d) . j by A102, FINSEQ_2:57
.= (((width M1) |-> d) ^ (Line (M2,iL))) . j by A103, FINSEQ_1:def_7 ; ::_thesis: verum
end;
supposeA104: j > width M1 ; ::_thesis: (block_diagonal (<*M1,M2*>,d)) * (i,j) = (((width M1) |-> d) ^ (Line (M2,iL))) . j
len (Line (M2,iL)) = width M2 by MATRIX_1:def_7;
then A105: dom ((width M2) |-> d) = dom (Line (M2,iL)) by A83, FINSEQ_3:29;
A106: not j in dom (Line (M1,i)) by A81, A104, FINSEQ_3:25;
A107: dom ((width M2) |-> d) = Seg (width M2) by A83, FINSEQ_1:def_3;
dom ((Line (M1,i)) ^ ((width M2) |-> d)) = Seg (width (block_diagonal (<*M1,M2*>,d))) by A8, A81, A83, A84, FINSEQ_1:def_3;
then consider k being Nat such that
A108: k in dom ((width M2) |-> d) and
A109: j = (width M1) + k by A78, A81, A106, FINSEQ_1:25;
thus (block_diagonal (<*M1,M2*>,d)) * (i,j) = (<*M1,M2*> . 2) * (((iL + (len M1)) -' (len M1)),(j -' (width M1))) by A8, A1, A17, A26, A15, A18, A73, A75, A74, A85, A99, A104, Def5
.= (<*M1,M2*> . 2) * (iL,(j -' (width M1))) by NAT_D:34
.= (<*M1,M2*> . ((len <*M1*>) + 1)) * (iL,k) by A10, A109, NAT_D:34
.= M2 * (iL,k) by FINSEQ_1:42
.= (Line (M2,iL)) . k by A108, A107, MATRIX_1:def_7
.= (((width M1) |-> d) ^ (Line (M2,iL))) . j by A82, A108, A109, A105, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
Seg (len M2) = dom M2 by FINSEQ_1:def_3;
then Line (M,(iL + (len M1))) = ((width M1) |-> d) ^ (Line (M2,iL)) by A72, A80, A98, FINSEQ_1:61;
hence M * (i,j) = (block_diagonal (<*M1,M2*>,d)) * (i,j) by A8, A27, A78, A100, MATRIX_1:def_7; ::_thesis: verum
end;
end;
end;
hence M * (i,j) = (block_diagonal (<*M1,M2*>,d)) * (i,j) ; ::_thesis: verum
end;
hence M = block_diagonal (<*M1,M2*>,d) by MATRIX_1:27; ::_thesis: verum
end;
theorem Th24: :: MATRIXJ1:24
for D being non empty set
for d being Element of D
for M1, M2 being Matrix of D
for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) )
proof
let D be non empty set ; ::_thesis: for d being Element of D
for M1, M2 being Matrix of D
for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) )
let d be Element of D; ::_thesis: for M1, M2 being Matrix of D
for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) )
let M1, M2 be Matrix of D; ::_thesis: for M being Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D holds
( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) )
let M be Matrix of Sum (Len <*M1,M2*>), Sum (Width <*M1,M2*>),D; ::_thesis: ( M = block_diagonal (<*M1,M2*>,d) iff for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) )
set m12 = <*M1,M2*>;
set B = block_diagonal (<*M1,M2*>,d);
A1: Seg (len M) = dom M by FINSEQ_1:def_3;
A2: Seg (len M1) = dom M1 by FINSEQ_1:def_3;
A3: dom M2 = Seg (len M2) by FINSEQ_1:def_3;
A4: Sum (Len <*M1,M2*>) = (len M1) + (len M2) by Th16;
A5: ( Sum (Len <*M1,M2*>) = 0 implies Sum (Width <*M1,M2*>) = 0 ) by Th13;
then A6: len M = Sum (Len <*M1,M2*>) by MATRIX13:1;
A7: width M = Sum (Width <*M1,M2*>) by A5, MATRIX13:1;
A8: Sum (Width <*M1,M2*>) = (width M1) + (width M2) by Th20;
then width M1 <= width M by A7, NAT_1:12;
then A9: Seg (width M1) c= Seg (width M) by FINSEQ_1:5;
thus ( M = block_diagonal (<*M1,M2*>,d) implies for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) ) ::_thesis: ( ( for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) ) implies M = block_diagonal (<*M1,M2*>,d) )
proof
A10: dom ((width M2) |-> d) = Seg (width M2) by FINSEQ_2:124;
A11: dom ((width M1) |-> d) = Seg (width M1) by FINSEQ_2:124;
set L2 = (len M2) |-> d;
set L1 = (len M1) |-> d;
assume A12: M = block_diagonal (<*M1,M2*>,d) ; ::_thesis: for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) )
let i be Nat; ::_thesis: ( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) )
set CM = Col (M,i);
set CM1 = Col (M1,i);
A13: len (Col (M,i)) = len M by CARD_1:def_7;
A14: dom ((len M1) |-> d) = Seg (len M1) by FINSEQ_2:124;
A15: dom ((len M2) |-> d) = Seg (len M2) by FINSEQ_2:124;
A16: len (Col (M1,i)) = len M1 by CARD_1:def_7;
then A17: dom (Col (M1,i)) = dom M1 by FINSEQ_3:29;
A18: len ((len M2) |-> d) = len M2 by CARD_1:def_7;
then A19: dom ((len M2) |-> d) = dom M2 by FINSEQ_3:29;
thus ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) ::_thesis: ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) )
proof
assume A20: i in Seg (width M1) ; ::_thesis: Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d)
A21: len ((Col (M1,i)) ^ ((len M2) |-> d)) = (len (Col (M1,i))) + (len ((len M2) |-> d)) by FINSEQ_1:22;
now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Col_(M,i))_holds_
((Col_(M1,i))_^_((len_M2)_|->_d))_._j_=_(Col_(M,i))_._j
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Col (M,i)) implies ((Col (M1,i)) ^ ((len M2) |-> d)) . j = (Col (M,i)) . j )
assume that
A22: 1 <= j and
A23: j <= len (Col (M,i)) ; ::_thesis: ((Col (M1,i)) ^ ((len M2) |-> d)) . j = (Col (M,i)) . j
j in dom M by A13, A22, A23, FINSEQ_3:25;
then A24: (Col (M,i)) . j = (Line (M,j)) . i by A9, A20, GOBOARD1:2;
A25: dom (Line (M1,j)) = Seg (width M1) by FINSEQ_2:124;
A26: j in dom ((Col (M1,i)) ^ ((len M2) |-> d)) by A6, A4, A13, A16, A18, A21, A22, A23, FINSEQ_3:25;
now__::_thesis:_(Col_(M,i))_._j_=_((Col_(M1,i))_^_((len_M2)_|->_d))_._j
percases ( j in dom (Col (M1,i)) or ex k being Nat st
( k in dom ((len M2) |-> d) & j = (len (Col (M1,i))) + k ) ) by A26, FINSEQ_1:25;
supposeA27: j in dom (Col (M1,i)) ; ::_thesis: (Col (M,i)) . j = ((Col (M1,i)) ^ ((len M2) |-> d)) . j
hence (Col (M,i)) . j = ((Line (M1,j)) ^ ((width M2) |-> d)) . i by A12, A17, A24, Th23
.= (Line (M1,j)) . i by A20, A25, FINSEQ_1:def_7
.= (Col (M1,i)) . j by A17, A20, A27, GOBOARD1:2
.= ((Col (M1,i)) ^ ((len M2) |-> d)) . j by A27, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex k being Nat st
( k in dom ((len M2) |-> d) & j = (len (Col (M1,i))) + k ) ; ::_thesis: (Col (M,i)) . j = ((Col (M1,i)) ^ ((len M2) |-> d)) . j
then consider k being Nat such that
A28: k in dom ((len M2) |-> d) and
A29: j = (len (Col (M1,i))) + k ;
thus (Col (M,i)) . j = (((width M1) |-> d) ^ (Line (M2,k))) . i by A12, A16, A19, A24, A28, A29, Th23
.= ((width M1) |-> d) . i by A11, A20, FINSEQ_1:def_7
.= d by A20, FINSEQ_2:57
.= ((len M2) |-> d) . k by A15, A28, FINSEQ_2:57
.= ((Col (M1,i)) ^ ((len M2) |-> d)) . j by A28, A29, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
hence ((Col (M1,i)) ^ ((len M2) |-> d)) . j = (Col (M,i)) . j ; ::_thesis: verum
end;
hence Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) by A6, A13, A16, A18, A21, Th16, FINSEQ_1:14; ::_thesis: verum
end;
set CM2 = Col (M2,i);
set CMi = Col (M,(i + (width M1)));
A30: len (Col (M,(i + (width M1)))) = len M by CARD_1:def_7;
A31: len (Col (M2,i)) = len M2 by CARD_1:def_7;
then A32: dom (Col (M2,i)) = dom M2 by FINSEQ_3:29;
A33: len (((len M1) |-> d) ^ (Col (M2,i))) = (len ((len M1) |-> d)) + (len (Col (M2,i))) by FINSEQ_1:22;
assume A34: i in Seg (width M2) ; ::_thesis: Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i))
A35: len ((len M1) |-> d) = len M1 by CARD_1:def_7;
then A36: dom ((len M1) |-> d) = dom M1 by FINSEQ_3:29;
now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Col_(M,(i_+_(width_M1))))_holds_
(((len_M1)_|->_d)_^_(Col_(M2,i)))_._j_=_(Col_(M,(i_+_(width_M1))))_._j
A37: len ((width M1) |-> d) = width M1 by CARD_1:def_7;
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Col (M,(i + (width M1)))) implies (((len M1) |-> d) ^ (Col (M2,i))) . j = (Col (M,(i + (width M1)))) . j )
assume that
A38: 1 <= j and
A39: j <= len (Col (M,(i + (width M1)))) ; ::_thesis: (((len M1) |-> d) ^ (Col (M2,i))) . j = (Col (M,(i + (width M1)))) . j
A40: j in dom M by A30, A38, A39, FINSEQ_3:25;
i + (width M1) in Seg (width M) by A7, A8, A34, FINSEQ_1:60;
then A41: (Col (M,(i + (width M1)))) . j = (Line (M,j)) . (i + (width M1)) by A40, GOBOARD1:2;
A42: len (Line (M1,j)) = width M1 by CARD_1:def_7;
A43: j in dom (((len M1) |-> d) ^ (Col (M2,i))) by A6, A4, A30, A31, A35, A33, A38, A39, FINSEQ_3:25;
now__::_thesis:_(Col_(M,(i_+_(width_M1))))_._j_=_(((len_M1)_|->_d)_^_(Col_(M2,i)))_._j
percases ( j in dom ((len M1) |-> d) or ex k being Nat st
( k in dom (Col (M2,i)) & j = (len ((len M1) |-> d)) + k ) ) by A43, FINSEQ_1:25;
supposeA44: j in dom ((len M1) |-> d) ; ::_thesis: (Col (M,(i + (width M1)))) . j = (((len M1) |-> d) ^ (Col (M2,i))) . j
hence (Col (M,(i + (width M1)))) . j = ((Line (M1,j)) ^ ((width M2) |-> d)) . (i + (width M1)) by A12, A36, A41, Th23
.= ((width M2) |-> d) . i by A10, A34, A42, FINSEQ_1:def_7
.= d by A34, FINSEQ_2:57
.= ((len M1) |-> d) . j by A14, A44, FINSEQ_2:57
.= (((len M1) |-> d) ^ (Col (M2,i))) . j by A44, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex k being Nat st
( k in dom (Col (M2,i)) & j = (len ((len M1) |-> d)) + k ) ; ::_thesis: (Col (M,(i + (width M1)))) . j = (((len M1) |-> d) ^ (Col (M2,i))) . j
then consider k being Nat such that
A45: k in dom (Col (M2,i)) and
A46: j = (len ((len M1) |-> d)) + k ;
A47: dom (Line (M2,k)) = Seg (width M2) by FINSEQ_2:124;
thus (Col (M,(i + (width M1)))) . j = (((width M1) |-> d) ^ (Line (M2,k))) . (i + (width M1)) by A12, A35, A32, A41, A45, A46, Th23
.= (Line (M2,k)) . i by A34, A37, A47, FINSEQ_1:def_7
.= (Col (M2,i)) . k by A32, A34, A45, GOBOARD1:2
.= (((len M1) |-> d) ^ (Col (M2,i))) . j by A45, A46, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
hence (((len M1) |-> d) ^ (Col (M2,i))) . j = (Col (M,(i + (width M1)))) . j ; ::_thesis: verum
end;
hence Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) by A6, A30, A31, A35, A33, Th16, FINSEQ_1:14; ::_thesis: verum
end;
assume A48: for i being Nat holds
( ( i in Seg (width M1) implies Col (M,i) = (Col (M1,i)) ^ ((len M2) |-> d) ) & ( i in Seg (width M2) implies Col (M,(i + (width M1))) = ((len M1) |-> d) ^ (Col (M2,i)) ) ) ; ::_thesis: M = block_diagonal (<*M1,M2*>,d)
len M1 <= len M by A6, A4, NAT_1:12;
then A49: Seg (len M1) c= Seg (len M) by FINSEQ_1:5;
now__::_thesis:_for_i_being_Nat_holds_
(_(_i_in_dom_M1_implies_Line_(M,i)_=_(Line_(M1,i))_^_((width_M2)_|->_d)_)_&_(_i_in_dom_M2_implies_Line_(M,(i_+_(len_M1)))_=_((width_M1)_|->_d)_^_(Line_(M2,i))_)_)
set W2 = (width M2) |-> d;
set W1 = (width M1) |-> d;
let i be Nat; ::_thesis: ( ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) & ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) )
set LM = Line (M,i);
set LMi = Line (M,(i + (len M1)));
set LM1 = Line (M1,i);
set LM2 = Line (M2,i);
A50: len (Line (M,(i + (len M1)))) = width M by CARD_1:def_7;
A51: len ((width M2) |-> d) = width M2 by CARD_1:def_7;
then A52: dom ((width M2) |-> d) = Seg (width M2) by FINSEQ_1:def_3;
A53: len (Line (M,i)) = width M by CARD_1:def_7;
then A54: dom (Line (M,i)) = Seg (width M) by FINSEQ_1:def_3;
A55: len (Line (M1,i)) = width M1 by CARD_1:def_7;
then A56: dom (Line (M1,i)) = Seg (width M1) by FINSEQ_1:def_3;
thus ( i in dom M1 implies Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) ) ::_thesis: ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) )
proof
assume A57: i in dom M1 ; ::_thesis: Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d)
A58: len ((Line (M1,i)) ^ ((width M2) |-> d)) = (len (Line (M1,i))) + (len ((width M2) |-> d)) by FINSEQ_1:22;
now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Line_(M,i))_holds_
(Line_(M,i))_._j_=_((Line_(M1,i))_^_((width_M2)_|->_d))_._j
A59: dom ((len M1) |-> d) = Seg (len M1) by FINSEQ_2:124;
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Line (M,i)) implies (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j )
assume that
A60: 1 <= j and
A61: j <= len (Line (M,i)) ; ::_thesis: (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
j in Seg (width M) by A54, A60, A61, FINSEQ_3:25;
then A62: (Line (M,i)) . j = (Col (M,j)) . i by A49, A1, A2, A57, GOBOARD1:2;
A63: dom (Col (M1,j)) = Seg (len M1) by FINSEQ_2:124;
A64: j in dom ((Line (M1,i)) ^ ((width M2) |-> d)) by A7, A8, A53, A55, A51, A58, A60, A61, FINSEQ_3:25;
now__::_thesis:_(Line_(M,i))_._j_=_((Line_(M1,i))_^_((width_M2)_|->_d))_._j
percases ( j in dom (Line (M1,i)) or ex n being Nat st
( n in dom ((width M2) |-> d) & j = (len (Line (M1,i))) + n ) ) by A64, FINSEQ_1:25;
supposeA65: j in dom (Line (M1,i)) ; ::_thesis: (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
hence (Line (M,i)) . j = ((Col (M1,j)) ^ ((len M2) |-> d)) . i by A48, A56, A62
.= (Col (M1,j)) . i by A2, A57, A63, FINSEQ_1:def_7
.= (Line (M1,i)) . j by A56, A57, A65, GOBOARD1:2
.= ((Line (M1,i)) ^ ((width M2) |-> d)) . j by A65, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom ((width M2) |-> d) & j = (len (Line (M1,i))) + n ) ; ::_thesis: (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j
then consider n being Nat such that
A66: n in dom ((width M2) |-> d) and
A67: j = (len (Line (M1,i))) + n ;
thus (Line (M,i)) . j = (((len M1) |-> d) ^ (Col (M2,n))) . i by A48, A55, A52, A62, A66, A67
.= ((len M1) |-> d) . i by A2, A57, A59, FINSEQ_1:def_7
.= d by A2, A57, FINSEQ_2:57
.= ((width M2) |-> d) . n by A52, A66, FINSEQ_2:57
.= ((Line (M1,i)) ^ ((width M2) |-> d)) . j by A66, A67, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
hence (Line (M,i)) . j = ((Line (M1,i)) ^ ((width M2) |-> d)) . j ; ::_thesis: verum
end;
hence Line (M,i) = (Line (M1,i)) ^ ((width M2) |-> d) by A7, A53, A55, A51, A58, Th20, FINSEQ_1:14; ::_thesis: verum
end;
A68: len (Line (M2,i)) = width M2 by CARD_1:def_7;
then A69: dom (Line (M2,i)) = Seg (width M2) by FINSEQ_1:def_3;
A70: len ((width M1) |-> d) = width M1 by CARD_1:def_7;
then A71: dom ((width M1) |-> d) = Seg (width M1) by FINSEQ_1:def_3;
thus ( i in dom M2 implies Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) ) ::_thesis: verum
proof
assume A72: i in dom M2 ; ::_thesis: Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i))
A73: len (((width M1) |-> d) ^ (Line (M2,i))) = (len ((width M1) |-> d)) + (len (Line (M2,i))) by FINSEQ_1:22;
now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(Line_(M,(i_+_(len_M1))))_holds_
(Line_(M,(i_+_(len_M1))))_._j_=_(((width_M1)_|->_d)_^_(Line_(M2,i)))_._j
A74: len ((len M1) |-> d) = len M1 by CARD_1:def_7;
A75: dom ((len M2) |-> d) = Seg (len M2) by FINSEQ_2:124;
A76: dom M2 = Seg (len M2) by FINSEQ_1:def_3;
let j be Nat; ::_thesis: ( 1 <= j & j <= len (Line (M,(i + (len M1)))) implies (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j )
assume that
A77: 1 <= j and
A78: j <= len (Line (M,(i + (len M1)))) ; ::_thesis: (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j
j in Seg (width M) by A53, A50, A54, A77, A78, FINSEQ_3:25;
then A79: (Line (M,(i + (len M1)))) . j = (Col (M,j)) . (i + (len M1)) by A6, A4, A1, A72, A76, FINSEQ_1:60, GOBOARD1:2;
A80: len (Col (M1,j)) = len M1 by CARD_1:def_7;
A81: j in dom (((width M1) |-> d) ^ (Line (M2,i))) by A7, A8, A50, A68, A70, A73, A77, A78, FINSEQ_3:25;
now__::_thesis:_(Line_(M,(i_+_(len_M1))))_._j_=_(((width_M1)_|->_d)_^_(Line_(M2,i)))_._j
percases ( j in dom ((width M1) |-> d) or ex n being Nat st
( n in dom (Line (M2,i)) & j = (len ((width M1) |-> d)) + n ) ) by A81, FINSEQ_1:25;
supposeA82: j in dom ((width M1) |-> d) ; ::_thesis: (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j
hence (Line (M,(i + (len M1)))) . j = ((Col (M1,j)) ^ ((len M2) |-> d)) . (i + (len M1)) by A48, A71, A79
.= ((len M2) |-> d) . i by A3, A72, A80, A75, FINSEQ_1:def_7
.= d by A3, A72, FINSEQ_2:57
.= ((width M1) |-> d) . j by A71, A82, FINSEQ_2:57
.= (((width M1) |-> d) ^ (Line (M2,i))) . j by A82, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom (Line (M2,i)) & j = (len ((width M1) |-> d)) + n ) ; ::_thesis: (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j
then consider n being Nat such that
A83: n in dom (Line (M2,i)) and
A84: j = (len ((width M1) |-> d)) + n ;
A85: dom (Col (M2,n)) = Seg (len M2) by FINSEQ_2:124;
thus (Line (M,(i + (len M1)))) . j = (((len M1) |-> d) ^ (Col (M2,n))) . (i + (len M1)) by A48, A70, A69, A79, A83, A84
.= (Col (M2,n)) . i by A3, A72, A74, A85, FINSEQ_1:def_7
.= (Line (M2,i)) . n by A69, A72, A83, GOBOARD1:2
.= (((width M1) |-> d) ^ (Line (M2,i))) . j by A83, A84, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
hence (Line (M,(i + (len M1)))) . j = (((width M1) |-> d) ^ (Line (M2,i))) . j ; ::_thesis: verum
end;
hence Line (M,(i + (len M1))) = ((width M1) |-> d) ^ (Line (M2,i)) by A7, A50, A68, A70, A73, Th20, FINSEQ_1:14; ::_thesis: verum
end;
end;
hence M = block_diagonal (<*M1,M2*>,d) by Th23; ::_thesis: verum
end;
theorem Th25: :: MATRIXJ1:25
for D being non empty set
for d1, d2 being Element of D
for F1, F2 being FinSequence_of_Matrix of D holds Indices (block_diagonal (F1,d1)) is Subset of (Indices (block_diagonal ((F1 ^ F2),d2)))
proof
let D be non empty set ; ::_thesis: for d1, d2 being Element of D
for F1, F2 being FinSequence_of_Matrix of D holds Indices (block_diagonal (F1,d1)) is Subset of (Indices (block_diagonal ((F1 ^ F2),d2)))
let d1, d2 be Element of D; ::_thesis: for F1, F2 being FinSequence_of_Matrix of D holds Indices (block_diagonal (F1,d1)) is Subset of (Indices (block_diagonal ((F1 ^ F2),d2)))
let F1, F2 be FinSequence_of_Matrix of D; ::_thesis: Indices (block_diagonal (F1,d1)) is Subset of (Indices (block_diagonal ((F1 ^ F2),d2)))
set B1 = block_diagonal (F1,d1);
set B2 = block_diagonal ((F1 ^ F2),d2);
Indices (block_diagonal (F1,d1)) c= Indices (block_diagonal ((F1 ^ F2),d2))
proof
(Len F1) ^ (Len F2) = Len (F1 ^ F2) by Th14;
then (Sum (Len F1)) + (Sum (Len F2)) = Sum (Len (F1 ^ F2)) by RVSUM_1:75;
then 0 + (Sum (Len F1)) <= Sum (Len (F1 ^ F2)) by XREAL_1:6;
then A1: Seg (Sum (Len F1)) c= Seg (Sum (Len (F1 ^ F2))) by FINSEQ_1:5;
A2: dom (block_diagonal ((F1 ^ F2),d2)) = Seg (len (block_diagonal ((F1 ^ F2),d2))) by FINSEQ_1:def_3;
(Width F1) ^ (Width F2) = Width (F1 ^ F2) by Th18;
then (Sum (Width F1)) + (Sum (Width F2)) = Sum (Width (F1 ^ F2)) by RVSUM_1:75;
then 0 + (Sum (Width F1)) <= Sum (Width (F1 ^ F2)) by XREAL_1:6;
then A3: Seg (Sum (Width F1)) c= Seg (Sum (Width (F1 ^ F2))) by FINSEQ_1:5;
A4: len (block_diagonal (F1,d1)) = Sum (Len F1) by Def5;
let x be set ; :: according to TARSKI:def_3 ::_thesis: ( not x in Indices (block_diagonal (F1,d1)) or x in Indices (block_diagonal ((F1 ^ F2),d2)) )
assume x in Indices (block_diagonal (F1,d1)) ; ::_thesis: x in Indices (block_diagonal ((F1 ^ F2),d2))
then A5: ex i, j being set st
( i in dom (block_diagonal (F1,d1)) & j in Seg (width (block_diagonal (F1,d1))) & x = [i,j] ) by ZFMISC_1:def_2;
A6: dom (block_diagonal (F1,d1)) = Seg (len (block_diagonal (F1,d1))) by FINSEQ_1:def_3;
A7: width (block_diagonal (F1,d1)) = Sum (Width F1) by Def5;
A8: width (block_diagonal ((F1 ^ F2),d2)) = Sum (Width (F1 ^ F2)) by Def5;
len (block_diagonal ((F1 ^ F2),d2)) = Sum (Len (F1 ^ F2)) by Def5;
hence x in Indices (block_diagonal ((F1 ^ F2),d2)) by A5, A6, A2, A4, A8, A7, A1, A3, ZFMISC_1:87; ::_thesis: verum
end;
hence Indices (block_diagonal (F1,d1)) is Subset of (Indices (block_diagonal ((F1 ^ F2),d2))) ; ::_thesis: verum
end;
theorem Th26: :: MATRIXJ1:26
for i, j being Nat
for D being non empty set
for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F1,d)) holds
(block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j)
proof
let i, j be Nat; ::_thesis: for D being non empty set
for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F1,d)) holds
(block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j)
let D be non empty set ; ::_thesis: for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F1,d)) holds
(block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j)
let d be Element of D; ::_thesis: for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F1,d)) holds
(block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j)
let F1, F2 be FinSequence_of_Matrix of D; ::_thesis: ( [i,j] in Indices (block_diagonal (F1,d)) implies (block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j) )
set B1 = block_diagonal (F1,d);
set L1 = Len F1;
set W1 = Width F1;
set L2 = Len F2;
set W2 = Width F2;
set F12 = F1 ^ F2;
set L = Len (F1 ^ F2);
set W = Width (F1 ^ F2);
set B12 = block_diagonal ((F1 ^ F2),d);
A1: len F1 = len (Width F1) by CARD_1:def_7;
A2: len (block_diagonal (F1,d)) = Sum (Len F1) by Def5;
assume A3: [i,j] in Indices (block_diagonal (F1,d)) ; ::_thesis: (block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j)
then i in dom (block_diagonal (F1,d)) by ZFMISC_1:87;
then A4: i in Seg (len (block_diagonal (F1,d))) by FINSEQ_1:def_3;
then A5: min ((Len F1),i) in dom (Len F1) by A2, Def1;
then A6: min ((Len F1),i) <= len (Len F1) by FINSEQ_3:25;
(Len F1) ^ (Len F2) = Len (F1 ^ F2) by Th14;
then A7: min ((Len F1),i) = min ((Len (F1 ^ F2)),i) by A4, A2, Th8;
A8: dom (Len F1) = dom F1 by Def3;
A9: (Width F1) ^ (Width F2) = Width (F1 ^ F2) by Th18;
A10: (Len F1) ^ (Len F2) = Len (F1 ^ F2) by Th14;
A11: Indices (block_diagonal (F1,d)) is Subset of (Indices (block_diagonal ((F1 ^ F2),d))) by Th25;
A12: len (Len F1) = len F1 by CARD_1:def_7;
then A13: ((Width F1) ^ (Width F2)) | (min ((Len (F1 ^ F2)),i)) = (Width F1) | (min ((Len F1),i)) by A7, A6, A1, FINSEQ_5:22;
A14: (min ((Len F1),i)) -' 1 <= min ((Len F1),i) by NAT_D:35;
then A15: ((Len F1) ^ (Len F2)) | ((min ((Len (F1 ^ F2)),i)) -' 1) = (Len F1) | ((min ((Len F1),i)) -' 1) by A7, A6, FINSEQ_5:22, XXREAL_0:2;
A16: ((Width F1) ^ (Width F2)) | ((min ((Len (F1 ^ F2)),i)) -' 1) = (Width F1) | ((min ((Len F1),i)) -' 1) by A7, A6, A14, A12, A1, FINSEQ_5:22, XXREAL_0:2;
percases ( j <= Sum ((Width F1) | ((min ((Len F1),i)) -' 1)) or j > Sum ((Width F1) | (min ((Len F1),i))) or ( j > Sum ((Width F1) | ((min ((Len F1),i)) -' 1)) & j <= Sum ((Width F1) | (min ((Len F1),i))) ) ) ;
supposeA17: ( j <= Sum ((Width F1) | ((min ((Len F1),i)) -' 1)) or j > Sum ((Width F1) | (min ((Len F1),i))) ) ; ::_thesis: (block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j)
then (block_diagonal (F1,d)) * (i,j) = d by A3, Def5;
hence (block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j) by A3, A11, A13, A16, A9, A17, Def5; ::_thesis: verum
end;
supposeA18: ( j > Sum ((Width F1) | ((min ((Len F1),i)) -' 1)) & j <= Sum ((Width F1) | (min ((Len F1),i))) ) ; ::_thesis: (block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j)
then A19: (block_diagonal (F1,d)) * (i,j) = (F1 . (min ((Len F1),i))) * ((i -' (Sum ((Len F1) | ((min ((Len F1),i)) -' 1)))),(j -' (Sum ((Width F1) | ((min ((Len F1),i)) -' 1))))) by A3, Def5;
(block_diagonal ((F1 ^ F2),d)) * (i,j) = ((F1 ^ F2) . (min ((Len F1),i))) * ((i -' (Sum ((Len F1) | ((min ((Len F1),i)) -' 1)))),(j -' (Sum ((Width F1) | ((min ((Len F1),i)) -' 1))))) by A3, A11, A7, A13, A16, A15, A9, A10, A18, Def5;
hence (block_diagonal (F1,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * (i,j) by A5, A8, A19, FINSEQ_1:def_7; ::_thesis: verum
end;
end;
end;
theorem Th27: :: MATRIXJ1:27
for i, j being Nat
for D being non empty set
for d1, d2 being Element of D
for F2, F1 being FinSequence_of_Matrix of D holds
( [i,j] in Indices (block_diagonal (F2,d1)) iff ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) ) )
proof
let i, j be Nat; ::_thesis: for D being non empty set
for d1, d2 being Element of D
for F2, F1 being FinSequence_of_Matrix of D holds
( [i,j] in Indices (block_diagonal (F2,d1)) iff ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) ) )
let D be non empty set ; ::_thesis: for d1, d2 being Element of D
for F2, F1 being FinSequence_of_Matrix of D holds
( [i,j] in Indices (block_diagonal (F2,d1)) iff ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) ) )
let d1, d2 be Element of D; ::_thesis: for F2, F1 being FinSequence_of_Matrix of D holds
( [i,j] in Indices (block_diagonal (F2,d1)) iff ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) ) )
let F2, F1 be FinSequence_of_Matrix of D; ::_thesis: ( [i,j] in Indices (block_diagonal (F2,d1)) iff ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) ) )
set B2 = block_diagonal (F2,d1);
set B12 = block_diagonal ((F1 ^ F2),d2);
A1: dom (block_diagonal ((F1 ^ F2),d2)) = Seg (len (block_diagonal ((F1 ^ F2),d2))) by FINSEQ_1:def_3;
A2: len (block_diagonal ((F1 ^ F2),d2)) = Sum (Len (F1 ^ F2)) by Def5;
(Len F1) ^ (Len F2) = Len (F1 ^ F2) by Th14;
then A3: (Sum (Len F1)) + (Sum (Len F2)) = Sum (Len (F1 ^ F2)) by RVSUM_1:75;
A4: len (block_diagonal (F2,d1)) = Sum (Len F2) by Def5;
(Width F1) ^ (Width F2) = Width (F1 ^ F2) by Th18;
then A5: (Sum (Width F1)) + (Sum (Width F2)) = Sum (Width (F1 ^ F2)) by RVSUM_1:75;
A6: width (block_diagonal ((F1 ^ F2),d2)) = Sum (Width (F1 ^ F2)) by Def5;
A7: width (block_diagonal (F2,d1)) = Sum (Width F2) by Def5;
A8: dom (block_diagonal (F2,d1)) = Seg (len (block_diagonal (F2,d1))) by FINSEQ_1:def_3;
hereby ::_thesis: ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) implies [i,j] in Indices (block_diagonal (F2,d1)) )
assume A9: [i,j] in Indices (block_diagonal (F2,d1)) ; ::_thesis: ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) )
then A10: j in Seg (width (block_diagonal (F2,d1))) by ZFMISC_1:87;
then A11: j + (Sum (Width F1)) in Seg (width (block_diagonal ((F1 ^ F2),d2))) by A6, A7, A5, FINSEQ_1:60;
A12: i in Seg (len (block_diagonal (F2,d1))) by A8, A9, ZFMISC_1:87;
then i + (Sum (Len F1)) in Seg (len (block_diagonal ((F1 ^ F2),d2))) by A2, A4, A3, FINSEQ_1:60;
hence ( i > 0 & j > 0 & [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) ) by A1, A12, A10, A11, FINSEQ_1:1, ZFMISC_1:87; ::_thesis: verum
end;
assume that
A13: i > 0 and
A14: j > 0 and
A15: [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d2)) ; ::_thesis: [i,j] in Indices (block_diagonal (F2,d1))
i + (Sum (Len F1)) in Seg (len (block_diagonal ((F1 ^ F2),d2))) by A1, A15, ZFMISC_1:87;
then A16: i in Seg (len (block_diagonal (F2,d1))) by A2, A4, A3, A13, FINSEQ_1:61;
j + (Sum (Width F1)) in Seg (width (block_diagonal ((F1 ^ F2),d2))) by A15, ZFMISC_1:87;
then A17: j in Seg (width (block_diagonal (F2,d1))) by A6, A7, A5, A14, FINSEQ_1:61;
dom (block_diagonal (F2,d1)) = Seg (len (block_diagonal (F2,d1))) by FINSEQ_1:def_3;
hence [i,j] in Indices (block_diagonal (F2,d1)) by A16, A17, ZFMISC_1:87; ::_thesis: verum
end;
theorem Th28: :: MATRIXJ1:28
for i, j being Nat
for D being non empty set
for d being Element of D
for F2, F1 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F2,d)) holds
(block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1))))
proof
let i, j be Nat; ::_thesis: for D being non empty set
for d being Element of D
for F2, F1 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F2,d)) holds
(block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1))))
let D be non empty set ; ::_thesis: for d being Element of D
for F2, F1 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F2,d)) holds
(block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1))))
let d be Element of D; ::_thesis: for F2, F1 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal (F2,d)) holds
(block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1))))
let F2, F1 be FinSequence_of_Matrix of D; ::_thesis: ( [i,j] in Indices (block_diagonal (F2,d)) implies (block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1)))) )
set L1 = Len F1;
set W1 = Width F1;
set L2 = Len F2;
set W2 = Width F2;
set F12 = F1 ^ F2;
set L = Len (F1 ^ F2);
set W = Width (F1 ^ F2);
set B2 = block_diagonal (F2,d);
set B12 = block_diagonal ((F1 ^ F2),d);
A1: dom (block_diagonal ((F1 ^ F2),d)) = Seg (len (block_diagonal ((F1 ^ F2),d))) by FINSEQ_1:def_3;
A2: len (block_diagonal ((F1 ^ F2),d)) = Sum (Len (F1 ^ F2)) by Def5;
A3: (Len F1) ^ (Len F2) = Len (F1 ^ F2) by Th14;
then A4: Sum (Len (F1 ^ F2)) = (Sum (Len F1)) + (Sum (Len F2)) by RVSUM_1:75;
assume A5: [i,j] in Indices (block_diagonal (F2,d)) ; ::_thesis: (block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1))))
then i > 0 by Th27;
then i + (Sum (Len F1)) > 0 + (Sum (Len F1)) by XREAL_1:6;
then A6: not i + (Sum (Len F1)) in Seg (Sum (Len F1)) by FINSEQ_1:1;
A7: [(i + (Sum (Len F1))),(j + (Sum (Width F1)))] in Indices (block_diagonal ((F1 ^ F2),d)) by A5, Th27;
then i + (Sum (Len F1)) in dom (block_diagonal ((F1 ^ F2),d)) by ZFMISC_1:87;
then A8: i + (Sum (Len F1)) in (Seg ((Sum (Len F1)) + (Sum (Len F2)))) \ (Seg (Sum (Len F1))) by A4, A1, A2, A6, XBOOLE_0:def_5;
then A9: min ((Len (F1 ^ F2)),(i + (Sum (Len F1)))) = (min ((Len F2),((i + (Sum (Len F1))) -' (Sum (Len F1))))) + (len (Len F1)) by A3, Th9;
A10: len (block_diagonal (F2,d)) = Sum (Len F2) by Def5;
A11: len (Width F1) = len F1 by CARD_1:def_7;
i in dom (block_diagonal (F2,d)) by A5, ZFMISC_1:87;
then i in Seg (len (block_diagonal (F2,d))) by FINSEQ_1:def_3;
then A12: min ((Len F2),i) in dom (Len F2) by A10, Def1;
then A13: min ((Len F2),i) <= len (Len F2) by FINSEQ_3:25;
A14: (i + (Sum (Len F1))) -' (Sum (Len F1)) = (i + (Sum (Len F1))) - (Sum (Len F1)) by A8, Th9;
j in NAT by ORDINAL1:def_12;
then A15: (j + (Sum (Width F1))) -' ((Sum (Width F1)) + (Sum ((Width F2) | ((min ((Len F2),i)) -' 1)))) = j -' (Sum ((Width F2) | ((min ((Len F2),i)) -' 1))) by PRGCOR_1:1;
A16: len (Len F2) = len F2 by CARD_1:def_7;
i in NAT by ORDINAL1:def_12;
then A17: (i + (Sum (Len F1))) -' ((Sum (Len F1)) + (Sum ((Len F2) | ((min ((Len F2),i)) -' 1)))) = i -' (Sum ((Len F2) | ((min ((Len F2),i)) -' 1))) by PRGCOR_1:1;
A18: len F1 = len (Len F1) by CARD_1:def_7;
A19: (Width F1) ^ (Width F2) = Width (F1 ^ F2) by Th18;
then (Width F1) ^ ((Width F2) | (min ((Len F2),i))) = (Width (F1 ^ F2)) | (min ((Len (F1 ^ F2)),(i + (Sum (Len F1))))) by A11, A18, A9, A14, FINSEQ_6:14;
then A20: (Sum (Width F1)) + (Sum ((Width F2) | (min ((Len F2),i)))) = Sum ((Width (F1 ^ F2)) | (min ((Len (F1 ^ F2)),(i + (Sum (Len F1)))))) by RVSUM_1:75;
A21: min ((Len F2),i) >= 1 by A12, FINSEQ_3:25;
then A22: ((min ((Len F2),i)) + (len (Len F1))) -' 1 = ((min ((Len F2),i)) -' 1) + (len (Len F1)) by NAT_D:38;
then (Len F1) ^ ((Len F2) | ((min ((Len F2),i)) -' 1)) = (Len (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),(i + (Sum (Len F1))))) -' 1) by A3, A9, A14, FINSEQ_6:14;
then A23: (Sum (Len F1)) + (Sum ((Len F2) | ((min ((Len F2),i)) -' 1))) = Sum ((Len (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),(i + (Sum (Len F1))))) -' 1)) by RVSUM_1:75;
(Width F1) ^ ((Width F2) | ((min ((Len F2),i)) -' 1)) = (Width (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),(i + (Sum (Len F1))))) -' 1) by A19, A11, A18, A9, A14, A22, FINSEQ_6:14;
then A24: (Sum (Width F1)) + (Sum ((Width F2) | ((min ((Len F2),i)) -' 1))) = Sum ((Width (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),(i + (Sum (Len F1))))) -' 1)) by RVSUM_1:75;
percases ( j <= Sum ((Width F2) | ((min ((Len F2),i)) -' 1)) or j > Sum ((Width F2) | (min ((Len F2),i))) or ( j > Sum ((Width F2) | ((min ((Len F2),i)) -' 1)) & j <= Sum ((Width F2) | (min ((Len F2),i))) ) ) ;
supposeA25: ( j <= Sum ((Width F2) | ((min ((Len F2),i)) -' 1)) or j > Sum ((Width F2) | (min ((Len F2),i))) ) ; ::_thesis: (block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1))))
then ( j + (Sum (Width F1)) <= Sum ((Width (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),(i + (Sum (Len F1))))) -' 1)) or j + (Sum (Width F1)) > Sum ((Width (F1 ^ F2)) | (min ((Len (F1 ^ F2)),(i + (Sum (Len F1)))))) ) by A20, A24, XREAL_1:7, XREAL_1:8;
then (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1)))) = d by A7, Def5;
hence (block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1)))) by A5, A25, Def5; ::_thesis: verum
end;
supposeA26: ( j > Sum ((Width F2) | ((min ((Len F2),i)) -' 1)) & j <= Sum ((Width F2) | (min ((Len F2),i))) ) ; ::_thesis: (block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1))))
then A27: j + (Sum (Width F1)) <= Sum ((Width (F1 ^ F2)) | (min ((Len (F1 ^ F2)),(i + (Sum (Len F1)))))) by A20, XREAL_1:7;
A28: (block_diagonal (F2,d)) * (i,j) = (F2 . (min ((Len F2),i))) * ((i -' (Sum ((Len F2) | ((min ((Len F2),i)) -' 1)))),(j -' (Sum ((Width F2) | ((min ((Len F2),i)) -' 1))))) by A5, A26, Def5;
j + (Sum (Width F1)) > Sum ((Width (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),(i + (Sum (Len F1))))) -' 1)) by A24, A26, XREAL_1:8;
then (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1)))) = ((F1 ^ F2) . (min ((Len (F1 ^ F2)),(i + (Sum (Len F1)))))) * ((i -' (Sum ((Len F2) | ((min ((Len F2),i)) -' 1)))),(j -' (Sum ((Width F2) | ((min ((Len F2),i)) -' 1))))) by A7, A24, A23, A17, A15, A27, Def5;
hence (block_diagonal (F2,d)) * (i,j) = (block_diagonal ((F1 ^ F2),d)) * ((i + (Sum (Len F1))),(j + (Sum (Width F1)))) by A18, A16, A21, A13, A9, A14, A28, FINSEQ_1:65; ::_thesis: verum
end;
end;
end;
theorem Th29: :: MATRIXJ1:29
for i, j being Nat
for D being non empty set
for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) & ( ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) ) holds
(block_diagonal ((F1 ^ F2),d)) * (i,j) = d
proof
let i, j be Nat; ::_thesis: for D being non empty set
for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) & ( ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) ) holds
(block_diagonal ((F1 ^ F2),d)) * (i,j) = d
let D be non empty set ; ::_thesis: for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) & ( ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) ) holds
(block_diagonal ((F1 ^ F2),d)) * (i,j) = d
let d be Element of D; ::_thesis: for F1, F2 being FinSequence_of_Matrix of D st [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) & ( ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) ) holds
(block_diagonal ((F1 ^ F2),d)) * (i,j) = d
let F1, F2 be FinSequence_of_Matrix of D; ::_thesis: ( [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) & ( ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) ) implies (block_diagonal ((F1 ^ F2),d)) * (i,j) = d )
set L1 = Len F1;
set W1 = Width F1;
set L2 = Len F2;
set W2 = Width F2;
set F12 = F1 ^ F2;
set L = Len (F1 ^ F2);
set W = Width (F1 ^ F2);
set B12 = block_diagonal ((F1 ^ F2),d);
A1: dom (block_diagonal ((F1 ^ F2),d)) = Seg (len (block_diagonal ((F1 ^ F2),d))) by FINSEQ_1:def_3;
A2: len (Width F1) = len F1 by CARD_1:def_7;
A3: len (block_diagonal ((F1 ^ F2),d)) = Sum (Len (F1 ^ F2)) by Def5;
A4: len F1 = len (Len F1) by CARD_1:def_7;
assume that
A5: [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) and
A6: ( ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = d
i in dom (block_diagonal ((F1 ^ F2),d)) by A5, ZFMISC_1:87;
then A7: 1 <= i by FINSEQ_3:25;
A8: (Width F1) ^ (Width F2) = Width (F1 ^ F2) by Th18;
A9: (Len F1) ^ (Len F2) = Len (F1 ^ F2) by Th14;
then A10: Sum (Len (F1 ^ F2)) = (Sum (Len F1)) + (Sum (Len F2)) by RVSUM_1:75;
percases ( ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) ) by A6;
supposeA11: ( i <= Sum (Len F1) & j > Sum (Width F1) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = d
then A12: i in Seg (Sum (Len F1)) by A7, FINSEQ_1:1;
then min ((Len F1),i) in dom (Len F1) by Def1;
then min ((Len F1),i) <= len (Len F1) by FINSEQ_3:25;
then A13: Sum ((Width (F1 ^ F2)) | (min ((Len F1),i))) <= Sum ((Width (F1 ^ F2)) | (len (Len F1))) by POLYNOM3:18;
A14: (Width (F1 ^ F2)) | (len (Len F1)) = Width F1 by A8, A2, A4, FINSEQ_5:23;
min ((Len (F1 ^ F2)),i) = min ((Len F1),i) by A9, A12, Th8;
then Sum ((Width (F1 ^ F2)) | (min ((Len (F1 ^ F2)),i))) < j by A11, A14, A13, XXREAL_0:2;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = d by A5, Def5; ::_thesis: verum
end;
supposeA15: ( i > Sum (Len F1) & j <= Sum (Width F1) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = d
A16: i in Seg (Sum (Len (F1 ^ F2))) by A1, A3, A5, ZFMISC_1:87;
not i in Seg (Sum (Len F1)) by A15, FINSEQ_1:1;
then A17: i in (Seg ((Sum (Len F1)) + (Sum (Len F2)))) \ (Seg (Sum (Len F1))) by A10, A16, XBOOLE_0:def_5;
then A18: i -' (Sum (Len F1)) = i - (Sum (Len F1)) by Th9;
then A19: i = (i -' (Sum (Len F1))) + (Sum (Len F1)) ;
i -' (Sum (Len F1)) <> 0 by A15, A18;
then i -' (Sum (Len F1)) in Seg (Sum (Len F2)) by A10, A16, A19, FINSEQ_1:61;
then min ((Len F2),(i -' (Sum (Len F1)))) in dom (Len F2) by Def1;
then A20: min ((Len F2),(i -' (Sum (Len F1)))) >= 1 by FINSEQ_3:25;
min ((Len (F1 ^ F2)),i) = (min ((Len F2),(i -' (Sum (Len F1))))) + (len (Len F1)) by A9, A17, Th9;
then (min ((Len (F1 ^ F2)),i)) -' 1 = ((min ((Len F2),(i -' (Sum (Len F1))))) -' 1) + (len (Len F1)) by A20, NAT_D:38;
then (min ((Len (F1 ^ F2)),i)) -' 1 >= (len (Len F1)) + 0 by XREAL_1:7;
then A21: Sum ((Width (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),i)) -' 1)) >= Sum (((Width F1) ^ (Width F2)) | (len (Width F1))) by A8, A2, A4, POLYNOM3:18;
((Width F1) ^ (Width F2)) | (len (Width F1)) = Width F1 by FINSEQ_5:23;
then Sum ((Width (F1 ^ F2)) | ((min ((Len (F1 ^ F2)),i)) -' 1)) >= j by A15, A21, XXREAL_0:2;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = d by A5, Def5; ::_thesis: verum
end;
end;
end;
theorem Th30: :: MATRIXJ1:30
for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D
for i, j, k being Nat st i in dom F & [j,k] in Indices (F . i) holds
( [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in Indices (block_diagonal (F,d)) & (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) )
proof
let D be non empty set ; ::_thesis: for d being Element of D
for F being FinSequence_of_Matrix of D
for i, j, k being Nat st i in dom F & [j,k] in Indices (F . i) holds
( [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in Indices (block_diagonal (F,d)) & (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) )
let d be Element of D; ::_thesis: for F being FinSequence_of_Matrix of D
for i, j, k being Nat st i in dom F & [j,k] in Indices (F . i) holds
( [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in Indices (block_diagonal (F,d)) & (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) )
let F be FinSequence_of_Matrix of D; ::_thesis: for i, j, k being Nat st i in dom F & [j,k] in Indices (F . i) holds
( [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in Indices (block_diagonal (F,d)) & (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) )
let i, j, k be Nat; ::_thesis: ( i in dom F & [j,k] in Indices (F . i) implies ( [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in Indices (block_diagonal (F,d)) & (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) ) )
assume that
A1: i in dom F and
A2: [j,k] in Indices (F . i) ; ::_thesis: ( [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in Indices (block_diagonal (F,d)) & (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) )
set Fi = F . i;
A3: k in Seg (width (F . i)) by A2, ZFMISC_1:87;
set L = Len F;
A4: i in NAT by ORDINAL1:def_12;
len F = len (Len F) by CARD_1:def_7;
then A5: (Len F) | (len F) = Len F by FINSEQ_1:58;
A6: i <= len F by A1, FINSEQ_3:25;
then Sum ((Len F) | i) <= Sum ((Len F) | (len F)) by A4, POLYNOM3:18;
then A7: Seg (Sum ((Len F) | i)) c= Seg (Sum (Len F)) by A5, FINSEQ_1:5;
A8: dom F = dom (Len F) by Def3;
then A9: (Len F) . i = (Len F) /. i by A1, PARTFUN1:def_6;
set W = Width F;
A10: dom F = dom (Width F) by Def4;
then A11: (Width F) . i = (Width F) /. i by A1, PARTFUN1:def_6;
set kS = k + (Sum ((Width F) | (i -' 1)));
(Width F) . i = width (F . i) by A1, A10, Def4;
then A12: k + (Sum ((Width F) | (i -' 1))) in Seg (Sum ((Width F) | i)) by A1, A10, A3, A11, Th10;
then A13: k + (Sum ((Width F) | (i -' 1))) <= Sum ((Width F) | i) by FINSEQ_1:1;
len F = len (Width F) by CARD_1:def_7;
then A14: (Width F) | (len F) = Width F by FINSEQ_1:58;
set B = block_diagonal (F,d);
A15: len (block_diagonal (F,d)) = Sum (Len F) by Def5;
A16: width (block_diagonal (F,d)) = Sum (Width F) by Def5;
set jS = j + (Sum ((Len F) | (i -' 1)));
j in dom (F . i) by A2, ZFMISC_1:87;
then A17: j in Seg (len (F . i)) by FINSEQ_1:def_3;
Sum ((Width F) | i) <= Sum ((Width F) | (len F)) by A6, A4, POLYNOM3:18;
then A18: Seg (Sum ((Width F) | i)) c= Seg (Sum (Width F)) by A14, FINSEQ_1:5;
(Sum ((Len F) | (i -' 1))) + 0 <= j + (Sum ((Len F) | (i -' 1))) by XREAL_1:6;
then A19: (j + (Sum ((Len F) | (i -' 1)))) -' (Sum ((Len F) | (i -' 1))) = (j + (Sum ((Len F) | (i -' 1)))) - (Sum ((Len F) | (i -' 1))) by XREAL_1:233;
A20: (Len F) . i = len (F . i) by A1, A8, Def3;
then A21: min ((Len F),(j + (Sum ((Len F) | (i -' 1))))) = i by A1, A8, A17, A9, Th10;
j + (Sum ((Len F) | (i -' 1))) in Seg (Sum ((Len F) | i)) by A1, A8, A17, A9, A20, Th10;
then [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in [:(Seg (len (block_diagonal (F,d)))),(Seg (width (block_diagonal (F,d)))):] by A15, A16, A12, A7, A18, ZFMISC_1:87;
hence A22: [(j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))] in Indices (block_diagonal (F,d)) by FINSEQ_1:def_3; ::_thesis: (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1)))))
0 < k by A3, FINSEQ_1:1;
then A23: (Sum ((Width F) | (i -' 1))) + 0 < k + (Sum ((Width F) | (i -' 1))) by XREAL_1:6;
then (k + (Sum ((Width F) | (i -' 1)))) -' (Sum ((Width F) | (i -' 1))) = (k + (Sum ((Width F) | (i -' 1)))) - (Sum ((Width F) | (i -' 1))) by XREAL_1:233;
hence (F . i) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) by A21, A22, A23, A13, A19, Def5; ::_thesis: verum
end;
theorem Th31: :: MATRIXJ1:31
for i being Nat
for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D st i in dom F holds
F . i = Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))
proof
let i be Nat; ::_thesis: for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D st i in dom F holds
F . i = Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))
let D be non empty set ; ::_thesis: for d being Element of D
for F being FinSequence_of_Matrix of D st i in dom F holds
F . i = Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))
let d be Element of D; ::_thesis: for F being FinSequence_of_Matrix of D st i in dom F holds
F . i = Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))
let F be FinSequence_of_Matrix of D; ::_thesis: ( i in dom F implies F . i = Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1)))))) )
assume A1: i in dom F ; ::_thesis: F . i = Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))
set L = Len F;
set Fi = F . i;
A2: dom F = dom (Len F) by Def3;
then A3: len (F . i) = (Len F) . i by A1, Def3;
set SL = Sum ((Len F) | i);
set SL1 = Sum ((Len F) | (i -' 1));
A4: (Sum ((Len F) | (i -' 1))) + ((Len F) . i) = Sum ((Len F) | i) by A1, A2, Lm2;
reconsider FI = F . i as Matrix of len (F . i), width (F . i),D by MATRIX_2:7;
set B = block_diagonal (F,d);
set W = Width F;
set SW1 = Sum ((Width F) | (i -' 1));
set SW = Sum ((Width F) | i);
A5: dom F = dom (Width F) by Def4;
then A6: (Sum ((Width F) | (i -' 1))) + ((Width F) . i) = Sum ((Width F) | i) by A1, Lm2;
A7: i in NAT by ORDINAL1:def_12;
then Sum ((Len F) | (i -' 1)) <= Sum ((Len F) | i) by NAT_D:35, POLYNOM3:18;
then Seg (Sum ((Len F) | (i -' 1))) c= Seg (Sum ((Len F) | i)) by FINSEQ_1:5;
then A8: card ((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))) = (card (Seg (Sum ((Len F) | i)))) - (card (Seg (Sum ((Len F) | (i -' 1))))) by CARD_2:44
.= (Sum ((Len F) | i)) - (card (Seg (Sum ((Len F) | (i -' 1))))) by FINSEQ_1:57
.= ((Sum ((Len F) | (i -' 1))) + ((Len F) . i)) - (Sum ((Len F) | (i -' 1))) by A4, FINSEQ_1:57
.= len (F . i) by A1, A2, Def3 ;
Sum ((Width F) | (i -' 1)) <= Sum ((Width F) | i) by A7, NAT_D:35, POLYNOM3:18;
then Seg (Sum ((Width F) | (i -' 1))) c= Seg (Sum ((Width F) | i)) by FINSEQ_1:5;
then A9: card ((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))) = (card (Seg (Sum ((Width F) | i)))) - (card (Seg (Sum ((Width F) | (i -' 1))))) by CARD_2:44
.= (Sum ((Width F) | i)) - (card (Seg (Sum ((Width F) | (i -' 1))))) by FINSEQ_1:57
.= ((Sum ((Width F) | (i -' 1))) + ((Width F) . i)) - (Sum ((Width F) | (i -' 1))) by A6, FINSEQ_1:57
.= width (F . i) by A1, A5, Def4 ;
A10: width (F . i) = (Width F) . i by A1, A5, Def4;
now__::_thesis:_for_j,_k_being_Nat_st_[j,k]_in_Indices_FI_holds_
(Segm_((block_diagonal_(F,d)),((Seg_(Sum_((Len_F)_|_i)))_\_(Seg_(Sum_((Len_F)_|_(i_-'_1))))),((Seg_(Sum_((Width_F)_|_i)))_\_(Seg_(Sum_((Width_F)_|_(i_-'_1)))))))_*_(j,k)_=_(F_._i)_*_(j,k)
A11: Indices FI = Indices (Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))) by A8, A9, MATRIX_1:26;
A12: dom FI = Seg ((Len F) . i) by A3, FINSEQ_1:def_3;
let j, k be Nat; ::_thesis: ( [j,k] in Indices FI implies (Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))) * (j,k) = (F . i) * (j,k) )
assume A13: [j,k] in Indices FI ; ::_thesis: (Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))) * (j,k) = (F . i) * (j,k)
k in Seg ((Width F) . i) by A10, A13, ZFMISC_1:87;
then A14: (Sgm ((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1)))))) . k = k + (Sum ((Width F) | (i -' 1))) by A6, MATRIX15:8;
j in dom FI by A13, ZFMISC_1:87;
then (Sgm ((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1)))))) . j = j + (Sum ((Len F) | (i -' 1))) by A4, A12, MATRIX15:8;
hence (Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1))))))) * (j,k) = (block_diagonal (F,d)) * ((j + (Sum ((Len F) | (i -' 1)))),(k + (Sum ((Width F) | (i -' 1))))) by A13, A11, A14, MATRIX13:def_1
.= (F . i) * (j,k) by A1, A13, Th30 ;
::_thesis: verum
end;
hence F . i = Segm ((block_diagonal (F,d)),((Seg (Sum ((Len F) | i))) \ (Seg (Sum ((Len F) | (i -' 1))))),((Seg (Sum ((Width F) | i))) \ (Seg (Sum ((Width F) | (i -' 1)))))) by A8, A9, MATRIX_1:27; ::_thesis: verum
end;
theorem Th32: :: MATRIXJ1:32
for D being non empty set
for d being Element of D
for M being Matrix of D
for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((<*M*> ^ F),d)),(Seg (len M)),(Seg (width M)))
proof
let D be non empty set ; ::_thesis: for d being Element of D
for M being Matrix of D
for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((<*M*> ^ F),d)),(Seg (len M)),(Seg (width M)))
let d be Element of D; ::_thesis: for M being Matrix of D
for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((<*M*> ^ F),d)),(Seg (len M)),(Seg (width M)))
let M be Matrix of D; ::_thesis: for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((<*M*> ^ F),d)),(Seg (len M)),(Seg (width M)))
let F be FinSequence_of_Matrix of D; ::_thesis: M = Segm ((block_diagonal ((<*M*> ^ F),d)),(Seg (len M)),(Seg (width M)))
set MF = <*M*> ^ F;
set L = Len (<*M*> ^ F);
set W = Width (<*M*> ^ F);
A1: Seg (Sum ((Len (<*M*> ^ F)) | 0)) = {} by RVSUM_1:72;
A2: Seg (Sum ((Width (<*M*> ^ F)) | 0)) = {} by RVSUM_1:72;
A3: Len <*M*> = <*(len M)*> by Th15;
A4: len <*(len M)*> = 1 by FINSEQ_1:39;
Len (<*M*> ^ F) = (Len <*M*>) ^ (Len F) by Th14;
then (Len (<*M*> ^ F)) | 1 = <*(len M)*> by A3, A4, FINSEQ_5:23;
then A5: Sum ((Len (<*M*> ^ F)) | 1) = len M by RVSUM_1:73;
A6: len <*(width M)*> = 1 by FINSEQ_1:39;
A7: Width <*M*> = <*(width M)*> by Th19;
A8: (<*M*> ^ F) . 1 = M by FINSEQ_1:41;
1 in Seg 1 ;
then A9: 1 in dom <*M*> by FINSEQ_1:38;
A10: dom <*M*> c= dom (<*M*> ^ F) by FINSEQ_1:26;
Width (<*M*> ^ F) = (Width <*M*>) ^ (Width F) by Th18;
then A11: (Width (<*M*> ^ F)) | 1 = <*(width M)*> by A7, A6, FINSEQ_5:23;
1 -' 1 = 0 by XREAL_1:232;
hence M = Segm ((block_diagonal ((<*M*> ^ F),d)),((Seg (Sum ((Len (<*M*> ^ F)) | 1))) \ {}),((Seg (Sum ((Width (<*M*> ^ F)) | 1))) \ {})) by A1, A2, A9, A10, A8, Th31
.= Segm ((block_diagonal ((<*M*> ^ F),d)),(Seg (len M)),(Seg (width M))) by A11, A5, RVSUM_1:73 ;
::_thesis: verum
end;
theorem Th33: :: MATRIXJ1:33
for D being non empty set
for d being Element of D
for M being Matrix of D
for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((F ^ <*M*>),d)),((Seg ((len M) + (Sum (Len F)))) \ (Seg (Sum (Len F)))),((Seg ((width M) + (Sum (Width F)))) \ (Seg (Sum (Width F)))))
proof
let D be non empty set ; ::_thesis: for d being Element of D
for M being Matrix of D
for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((F ^ <*M*>),d)),((Seg ((len M) + (Sum (Len F)))) \ (Seg (Sum (Len F)))),((Seg ((width M) + (Sum (Width F)))) \ (Seg (Sum (Width F)))))
let d be Element of D; ::_thesis: for M being Matrix of D
for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((F ^ <*M*>),d)),((Seg ((len M) + (Sum (Len F)))) \ (Seg (Sum (Len F)))),((Seg ((width M) + (Sum (Width F)))) \ (Seg (Sum (Width F)))))
let M be Matrix of D; ::_thesis: for F being FinSequence_of_Matrix of D holds M = Segm ((block_diagonal ((F ^ <*M*>),d)),((Seg ((len M) + (Sum (Len F)))) \ (Seg (Sum (Len F)))),((Seg ((width M) + (Sum (Width F)))) \ (Seg (Sum (Width F)))))
let F be FinSequence_of_Matrix of D; ::_thesis: M = Segm ((block_diagonal ((F ^ <*M*>),d)),((Seg ((len M) + (Sum (Len F)))) \ (Seg (Sum (Len F)))),((Seg ((width M) + (Sum (Width F)))) \ (Seg (Sum (Width F)))))
set FM = F ^ <*M*>;
set L = Len (F ^ <*M*>);
set W = Width (F ^ <*M*>);
set 1F = 1 + (len F);
A1: len (F ^ <*M*>) = 1 + (len F) by FINSEQ_2:16;
len (Len (F ^ <*M*>)) = len (F ^ <*M*>) by CARD_1:def_7;
then A2: (Len (F ^ <*M*>)) | (1 + (len F)) = Len (F ^ <*M*>) by A1, FINSEQ_1:58;
len (Width (F ^ <*M*>)) = len (F ^ <*M*>) by CARD_1:def_7;
then A3: (Width (F ^ <*M*>)) | (1 + (len F)) = Width (F ^ <*M*>) by A1, FINSEQ_1:58;
1 + (len F) in Seg ((len F) + 1) by FINSEQ_1:4;
then A4: 1 + (len F) in dom (F ^ <*M*>) by A1, FINSEQ_1:def_3;
A5: Width (F ^ <*M*>) = (Width F) ^ (Width <*M*>) by Th18;
len (Width F) = len F by CARD_1:def_7;
then A6: (Width (F ^ <*M*>)) | (len F) = Width F by A5, FINSEQ_5:23;
Width <*M*> = <*(width M)*> by Th19;
then A7: Sum (Width (F ^ <*M*>)) = (Sum (Width F)) + (width M) by A5, RVSUM_1:74;
A8: Len (F ^ <*M*>) = (Len F) ^ (Len <*M*>) by Th14;
len (Len F) = len F by CARD_1:def_7;
then A9: (Len (F ^ <*M*>)) | (len F) = Len F by A8, FINSEQ_5:23;
Len <*M*> = <*(len M)*> by Th15;
then A10: Sum (Len (F ^ <*M*>)) = (Sum (Len F)) + (len M) by A8, RVSUM_1:74;
A11: (F ^ <*M*>) . (1 + (len F)) = M by FINSEQ_1:42;
(1 + (len F)) -' 1 = (1 + (len F)) - 1 by NAT_D:37;
hence M = Segm ((block_diagonal ((F ^ <*M*>),d)),((Seg ((len M) + (Sum (Len F)))) \ (Seg (Sum (Len F)))),((Seg ((width M) + (Sum (Width F)))) \ (Seg (Sum (Width F))))) by A9, A6, A10, A7, A4, A11, A3, A2, Th31; ::_thesis: verum
end;
theorem Th34: :: MATRIXJ1:34
for D being non empty set
for d being Element of D
for M being Matrix of D holds block_diagonal (<*M*>,d) = M
proof
let D be non empty set ; ::_thesis: for d being Element of D
for M being Matrix of D holds block_diagonal (<*M*>,d) = M
let d be Element of D; ::_thesis: for M being Matrix of D holds block_diagonal (<*M*>,d) = M
let M be Matrix of D; ::_thesis: block_diagonal (<*M*>,d) = M
reconsider E = <*> ((D *) *) as Matrix-yielding FinSequence of (D *) * by Th12;
set ME = <*M*> ^ E;
set B = block_diagonal (<*M*>,d);
A1: len (block_diagonal (<*M*>,d)) = Sum (Len <*M*>) by Def5
.= len M by Lm4 ;
A2: width (block_diagonal (<*M*>,d)) = Sum (Width <*M*>) by Def5
.= width M by Lm5 ;
<*M*> ^ E = <*M*> by FINSEQ_1:34;
hence M = Segm ((block_diagonal (<*M*>,d)),(Seg (len M)),(Seg (width M))) by Th32
.= block_diagonal (<*M*>,d) by A1, A2, MATRIX13:46 ;
::_thesis: verum
end;
theorem Th35: :: MATRIXJ1:35
for D being non empty set
for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D holds block_diagonal ((F1 ^ F2),d) = block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)
proof
let D be non empty set ; ::_thesis: for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D holds block_diagonal ((F1 ^ F2),d) = block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)
let d be Element of D; ::_thesis: for F1, F2 being FinSequence_of_Matrix of D holds block_diagonal ((F1 ^ F2),d) = block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)
let F1, F2 be FinSequence_of_Matrix of D; ::_thesis: block_diagonal ((F1 ^ F2),d) = block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)
set F12 = F1 ^ F2;
set D1 = block_diagonal (F1,d);
set D2 = block_diagonal (F2,d);
set D12 = block_diagonal ((F1 ^ F2),d);
set DF = <*(block_diagonal (F1,d))*> ^ F2;
set DF2 = block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d);
set LF1 = Len F1;
set WF1 = Width F1;
set LF2 = Len F2;
set WF2 = Width F2;
set LF = Len (F1 ^ F2);
set WF = Width (F1 ^ F2);
A1: Len (F1 ^ F2) = (Len F1) ^ (Len F2) by Th14;
len (block_diagonal ((F1 ^ F2),d)) = Sum (Len (F1 ^ F2)) by Def5;
then A2: len (block_diagonal ((F1 ^ F2),d)) = (Sum (Len F1)) + (Sum (Len F2)) by A1, RVSUM_1:75;
A3: Len <*(block_diagonal (F1,d))*> = <*(len (block_diagonal (F1,d)))*> by Th15;
then A4: Sum (Len <*(block_diagonal (F1,d))*>) = len (block_diagonal (F1,d)) by RVSUM_1:73;
A5: block_diagonal (<*(block_diagonal (F1,d))*>,d) = block_diagonal (F1,d) by Th34;
A6: Sum (Width F1) = width (block_diagonal (F1,d)) by Def5;
A7: Len (<*(block_diagonal (F1,d))*> ^ F2) = (Len <*(block_diagonal (F1,d))*>) ^ (Len F2) by Th14;
A8: Width (F1 ^ F2) = (Width F1) ^ (Width F2) by Th18;
len (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) = Sum (Len (<*(block_diagonal (F1,d))*> ^ F2)) by Def5;
then A9: len (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) = (len (block_diagonal (F1,d))) + (Sum (Len F2)) by A7, A3, RVSUM_1:76;
A10: Width <*(block_diagonal (F1,d))*> = <*(width (block_diagonal (F1,d)))*> by Th19;
then A11: Sum (Width <*(block_diagonal (F1,d))*>) = width (block_diagonal (F1,d)) by RVSUM_1:73;
A12: Sum (Len F1) = len (block_diagonal (F1,d)) by Def5;
A13: width (block_diagonal (F1,d)) = Sum (Width F1) by Def5;
A14: width (block_diagonal ((F1 ^ F2),d)) = Sum (Width (F1 ^ F2)) by Def5;
then A15: width (block_diagonal ((F1 ^ F2),d)) = (Sum (Width F1)) + (Sum (Width F2)) by A8, RVSUM_1:75;
A16: Width (<*(block_diagonal (F1,d))*> ^ F2) = (Width <*(block_diagonal (F1,d))*>) ^ (Width F2) by Th18;
A17: len (block_diagonal (F1,d)) = Sum (Len F1) by Def5;
width (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) = Sum (Width (<*(block_diagonal (F1,d))*> ^ F2)) by Def5;
then A18: width (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) = (width (block_diagonal (F1,d))) + (Sum (Width F2)) by A16, A10, RVSUM_1:76;
A19: Indices (block_diagonal ((F1 ^ F2),d)) = [:(Seg (len (block_diagonal ((F1 ^ F2),d)))),(Seg (width (block_diagonal ((F1 ^ F2),d)))):] by FINSEQ_1:def_3
.= Indices (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) by A2, A15, A17, A13, A9, A18, FINSEQ_1:def_3 ;
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_(block_diagonal_((F1_^_F2),d))_holds_
(block_diagonal_((F1_^_F2),d))_*_(i,j)_=_(block_diagonal_((<*(block_diagonal_(F1,d))*>_^_F2),d))_*_(i,j)
A20: dom (block_diagonal ((F1 ^ F2),d)) = Seg (len (block_diagonal ((F1 ^ F2),d))) by FINSEQ_1:def_3;
let i, j be Nat; ::_thesis: ( [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) implies (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j) )
assume A21: [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j)
i in dom (block_diagonal ((F1 ^ F2),d)) by A21, ZFMISC_1:87;
then A22: 1 <= i by A20, FINSEQ_1:1;
A23: j in Seg (width (block_diagonal ((F1 ^ F2),d))) by A21, ZFMISC_1:87;
then A24: 1 <= j by FINSEQ_1:1;
now__::_thesis:_(block_diagonal_((F1_^_F2),d))_*_(i,j)_=_(block_diagonal_((<*(block_diagonal_(F1,d))*>_^_F2),d))_*_(i,j)
percases ( ( i <= Sum (Len F1) & j <= Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) or ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j > Sum (Width F1) ) ) ;
supposeA25: ( i <= Sum (Len F1) & j <= Sum (Width F1) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j)
then A26: i in dom (block_diagonal (F1,d)) by A12, A22, FINSEQ_3:25;
j in Seg (width (block_diagonal (F1,d))) by A6, A23, A24, A25;
then A27: [i,j] in Indices (block_diagonal (F1,d)) by A26, ZFMISC_1:87;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal (F1,d)) * (i,j) by Th26
.= (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j) by A5, A27, Th26 ;
::_thesis: verum
end;
supposeA28: ( ( i > Sum (Len F1) & j <= Sum (Width F1) ) or ( i <= Sum (Len F1) & j > Sum (Width F1) ) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j)
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = d by A21, Th29
.= (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j) by A17, A13, A4, A11, A19, A21, A28, Th29 ;
::_thesis: verum
end;
supposeA29: ( i > Sum (Len F1) & j > Sum (Width F1) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j)
then reconsider ii = i - (Sum (Len F1)), jj = j - (Sum (Width F1)) as Element of NAT by NAT_1:21;
A30: jj <> 0 by A29;
A31: i = ii + (Sum (Len F1)) ;
A32: j = jj + (Sum (Width F1)) ;
ii <> 0 by A29;
then A33: [ii,jj] in Indices (block_diagonal (F2,d)) by A21, A31, A32, A30, Th27;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal (F2,d)) * (ii,jj) by A31, A32, Th28
.= (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j) by A17, A13, A4, A11, A31, A32, A33, Th28 ;
::_thesis: verum
end;
end;
end;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d)) * (i,j) ; ::_thesis: verum
end;
hence block_diagonal ((F1 ^ F2),d) = block_diagonal ((<*(block_diagonal (F1,d))*> ^ F2),d) by A14, A8, A2, A17, A13, A9, A18, MATRIX_1:21, RVSUM_1:75; ::_thesis: verum
end;
theorem Th36: :: MATRIXJ1:36
for D being non empty set
for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D holds block_diagonal ((F1 ^ F2),d) = block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)
proof
let D be non empty set ; ::_thesis: for d being Element of D
for F1, F2 being FinSequence_of_Matrix of D holds block_diagonal ((F1 ^ F2),d) = block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)
let d be Element of D; ::_thesis: for F1, F2 being FinSequence_of_Matrix of D holds block_diagonal ((F1 ^ F2),d) = block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)
let F1, F2 be FinSequence_of_Matrix of D; ::_thesis: block_diagonal ((F1 ^ F2),d) = block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)
set F12 = F1 ^ F2;
set D1 = block_diagonal (F1,d);
set D2 = block_diagonal (F2,d);
set D12 = block_diagonal ((F1 ^ F2),d);
set FD = F1 ^ <*(block_diagonal (F2,d))*>;
set FD2 = block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d);
set LF1 = Len F1;
set WF1 = Width F1;
set LF2 = Len F2;
set WF2 = Width F2;
set LF = Len (F1 ^ F2);
set WF = Width (F1 ^ F2);
A1: Len (F1 ^ F2) = (Len F1) ^ (Len F2) by Th14;
len (block_diagonal ((F1 ^ F2),d)) = Sum (Len (F1 ^ F2)) by Def5;
then A2: len (block_diagonal ((F1 ^ F2),d)) = (Sum (Len F1)) + (Sum (Len F2)) by A1, RVSUM_1:75;
A3: Sum (Width <*(block_diagonal (F2,d))*>) = width (block_diagonal (F2,d)) by Lm5;
A4: Len (F1 ^ <*(block_diagonal (F2,d))*>) = (Len F1) ^ (Len <*(block_diagonal (F2,d))*>) by Th14;
len (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) = Sum (Len (F1 ^ <*(block_diagonal (F2,d))*>)) by Def5;
then A5: len (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) = (Sum (Len <*(block_diagonal (F2,d))*>)) + (Sum (Len F1)) by A4, RVSUM_1:75;
A6: Sum (Len F1) = len (block_diagonal (F1,d)) by Def5;
A7: Width (F1 ^ F2) = (Width F1) ^ (Width F2) by Th18;
A8: Width (F1 ^ <*(block_diagonal (F2,d))*>) = (Width F1) ^ (Width <*(block_diagonal (F2,d))*>) by Th18;
width (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) = Sum (Width (F1 ^ <*(block_diagonal (F2,d))*>)) by Def5;
then A9: width (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) = (Sum (Width <*(block_diagonal (F2,d))*>)) + (Sum (Width F1)) by A8, RVSUM_1:75;
A10: Sum (Width F1) = width (block_diagonal (F1,d)) by Def5;
A11: len (block_diagonal (F2,d)) = Sum (Len F2) by Def5;
A12: width (block_diagonal ((F1 ^ F2),d)) = Sum (Width (F1 ^ F2)) by Def5;
then A13: width (block_diagonal ((F1 ^ F2),d)) = (Sum (Width F1)) + (Sum (Width F2)) by A7, RVSUM_1:75;
A14: Sum (Len <*(block_diagonal (F2,d))*>) = len (block_diagonal (F2,d)) by Lm4;
A15: block_diagonal (<*(block_diagonal (F2,d))*>,d) = block_diagonal (F2,d) by Th34;
A16: width (block_diagonal (F2,d)) = Sum (Width F2) by Def5;
A17: Indices (block_diagonal ((F1 ^ F2),d)) = [:(Seg (len (block_diagonal ((F1 ^ F2),d)))),(Seg (width (block_diagonal ((F1 ^ F2),d)))):] by FINSEQ_1:def_3
.= Indices (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) by A2, A13, A11, A16, A5, A9, A14, A3, FINSEQ_1:def_3 ;
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_(block_diagonal_((F1_^_F2),d))_holds_
(block_diagonal_((F1_^_F2),d))_*_(i,j)_=_(block_diagonal_((F1_^_<*(block_diagonal_(F2,d))*>),d))_*_(i,j)
A18: dom (block_diagonal ((F1 ^ F2),d)) = Seg (len (block_diagonal ((F1 ^ F2),d))) by FINSEQ_1:def_3;
let i, j be Nat; ::_thesis: ( [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) implies (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j) )
assume A19: [i,j] in Indices (block_diagonal ((F1 ^ F2),d)) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j)
i in dom (block_diagonal ((F1 ^ F2),d)) by A19, ZFMISC_1:87;
then A20: 1 <= i by A18, FINSEQ_1:1;
A21: j in Seg (width (block_diagonal ((F1 ^ F2),d))) by A19, ZFMISC_1:87;
then A22: 1 <= j by FINSEQ_1:1;
now__::_thesis:_(block_diagonal_((F1_^_F2),d))_*_(i,j)_=_(block_diagonal_((F1_^_<*(block_diagonal_(F2,d))*>),d))_*_(i,j)
percases ( ( i <= Sum (Len F1) & j <= Sum (Width F1) ) or ( i > Sum (Len F1) & j <= Sum (Width F1) ) or ( i <= Sum (Len F1) & j > Sum (Width F1) ) or ( i > Sum (Len F1) & j > Sum (Width F1) ) ) ;
supposeA23: ( i <= Sum (Len F1) & j <= Sum (Width F1) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j)
then A24: i in dom (block_diagonal (F1,d)) by A6, A20, FINSEQ_3:25;
j in Seg (width (block_diagonal (F1,d))) by A10, A21, A22, A23;
then A25: [i,j] in Indices (block_diagonal (F1,d)) by A24, ZFMISC_1:87;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal (F1,d)) * (i,j) by Th26
.= (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j) by A25, Th26 ;
::_thesis: verum
end;
supposeA26: ( ( i > Sum (Len F1) & j <= Sum (Width F1) ) or ( i <= Sum (Len F1) & j > Sum (Width F1) ) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j)
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = d by A19, Th29
.= (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j) by A17, A19, A26, Th29 ;
::_thesis: verum
end;
supposeA27: ( i > Sum (Len F1) & j > Sum (Width F1) ) ; ::_thesis: (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j)
then reconsider ii = i - (Sum (Len F1)), jj = j - (Sum (Width F1)) as Element of NAT by NAT_1:21;
A28: jj <> 0 by A27;
A29: i = ii + (Sum (Len F1)) ;
A30: j = jj + (Sum (Width F1)) ;
ii <> 0 by A27;
then A31: [ii,jj] in Indices (block_diagonal (F2,d)) by A19, A29, A30, A28, Th27;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal (F2,d)) * (ii,jj) by A29, A30, Th28
.= (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j) by A15, A29, A30, A31, Th28 ;
::_thesis: verum
end;
end;
end;
hence (block_diagonal ((F1 ^ F2),d)) * (i,j) = (block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d)) * (i,j) ; ::_thesis: verum
end;
hence block_diagonal ((F1 ^ F2),d) = block_diagonal ((F1 ^ <*(block_diagonal (F2,d))*>),d) by A12, A7, A2, A11, A16, A5, A9, A14, A3, MATRIX_1:21, RVSUM_1:75; ::_thesis: verum
end;
theorem :: MATRIXJ1:37
for i, m being Nat
for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D st i in Seg (Sum (Len F)) & m = min ((Len F),i) holds
Line ((block_diagonal (F,d)),i) = (((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum (Len (F | (m -' 1)))))))) ^ (((Sum (Width F)) -' (Sum (Width (F | m)))) |-> d)
proof
let i, m be Nat; ::_thesis: for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D st i in Seg (Sum (Len F)) & m = min ((Len F),i) holds
Line ((block_diagonal (F,d)),i) = (((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum (Len (F | (m -' 1)))))))) ^ (((Sum (Width F)) -' (Sum (Width (F | m)))) |-> d)
let D be non empty set ; ::_thesis: for d being Element of D
for F being FinSequence_of_Matrix of D st i in Seg (Sum (Len F)) & m = min ((Len F),i) holds
Line ((block_diagonal (F,d)),i) = (((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum (Len (F | (m -' 1)))))))) ^ (((Sum (Width F)) -' (Sum (Width (F | m)))) |-> d)
let d be Element of D; ::_thesis: for F being FinSequence_of_Matrix of D st i in Seg (Sum (Len F)) & m = min ((Len F),i) holds
Line ((block_diagonal (F,d)),i) = (((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum (Len (F | (m -' 1)))))))) ^ (((Sum (Width F)) -' (Sum (Width (F | m)))) |-> d)
let F be FinSequence_of_Matrix of D; ::_thesis: ( i in Seg (Sum (Len F)) & m = min ((Len F),i) implies Line ((block_diagonal (F,d)),i) = (((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum (Len (F | (m -' 1)))))))) ^ (((Sum (Width F)) -' (Sum (Width (F | m)))) |-> d) )
assume that
A1: i in Seg (Sum (Len F)) and
A2: m = min ((Len F),i) ; ::_thesis: Line ((block_diagonal (F,d)),i) = (((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum (Len (F | (m -' 1)))))))) ^ (((Sum (Width F)) -' (Sum (Width (F | m)))) |-> d)
set L = Len F;
A3: ((Len F) | m) . m = (Len F) . m by FINSEQ_3:112;
set BF9m = block_diagonal ((F /^ m),d);
set BFm = block_diagonal ((F | m),d);
A4: len (block_diagonal ((F | m),d)) = Sum (Len (F | m)) by Def5
.= Sum ((Len F) | m) by Th17 ;
F = (F | m) ^ (F /^ m) by RFINSEQ:8;
then A5: block_diagonal (F,d) = block_diagonal (((F | m) ^ <*(block_diagonal ((F /^ m),d))*>),d) by Th36
.= block_diagonal (<*(block_diagonal ((F | m),d)),(block_diagonal ((F /^ m),d))*>,d) by Th35 ;
then Sum (Width F) = width (block_diagonal (<*(block_diagonal ((F | m),d)),(block_diagonal ((F /^ m),d))*>,d)) by Def5
.= Sum (Width <*(block_diagonal ((F | m),d)),(block_diagonal ((F /^ m),d))*>) by Def5
.= (width (block_diagonal ((F | m),d))) + (width (block_diagonal ((F /^ m),d))) by Th20
.= (Sum (Width (F | m))) + (width (block_diagonal ((F /^ m),d))) by Def5 ;
then A6: (Sum (Width F)) -' (Sum (Width (F | m))) = ((Sum (Width (F | m))) + (width (block_diagonal ((F /^ m),d)))) - (Sum (Width (F | m))) by NAT_1:11, XREAL_1:233
.= width (block_diagonal ((F /^ m),d)) ;
Sum ((Len F) | (m -' 1)) < i by A1, A2, Th7;
then A7: i - (Sum ((Len F) | (m -' 1))) = i -' (Sum ((Len F) | (m -' 1))) by XREAL_1:233;
A8: m in dom (Len F) by A1, A2, Def1;
then 1 <= m by FINSEQ_3:25;
then m -' 1 = m - 1 by XREAL_1:233;
then A9: m = (m -' 1) + 1 ;
then m -' 1 <= m by NAT_1:11;
then A10: Seg (m -' 1) c= Seg m by FINSEQ_1:5;
then A11: (F | m) | (m -' 1) = F | (m -' 1) by RELAT_1:74;
m <= len (Len F) by A8, FINSEQ_3:25;
then len ((Len F) | m) = m by FINSEQ_1:59;
then A12: (Len F) | m = (((Len F) | m) | (m -' 1)) ^ <*(((Len F) | m) . m)*> by A9, FINSEQ_3:55;
((Len F) | m) | (m -' 1) = (Len F) | (m -' 1) by A10, RELAT_1:74;
then Sum ((Len F) | m) = (Sum ((Len F) | (m -' 1))) + ((Len F) . m) by A12, A3, RVSUM_1:74
.= (Sum ((Len F) | (m -' 1))) + (len (F . m)) by A8, Def3 ;
then (len (F . m)) + (Sum ((Len F) | (m -' 1))) >= (i -' (Sum ((Len F) | (m -' 1)))) + (Sum ((Len F) | (m -' 1))) by A1, A2, A7, Def1;
then A13: len (F . m) >= i -' (Sum ((Len F) | (m -' 1))) by XREAL_1:6;
i - (Sum ((Len F) | (m -' 1))) <> 0 by A1, A2, Th7;
then i -' (Sum ((Len F) | (m -' 1))) >= 1 by A7, NAT_1:14;
then A14: i -' (Sum ((Len F) | (m -' 1))) in dom (F . m) by A13, FINSEQ_3:25;
set BFm1 = block_diagonal ((F | (m -' 1)),d);
A15: (F | m) . m = F . m by FINSEQ_3:112;
A16: width (block_diagonal ((F | (m -' 1)),d)) = Sum (Width (F | (m -' 1))) by Def5
.= Sum ((Width F) | (m -' 1)) by Th21 ;
A17: 1 <= i by A1, FINSEQ_1:1;
i <= Sum ((Len F) | m) by A1, A2, Def1;
then i in dom (block_diagonal ((F | m),d)) by A17, A4, FINSEQ_3:25;
then A18: Line ((block_diagonal (F,d)),i) = (Line ((block_diagonal ((F | m),d)),i)) ^ ((width (block_diagonal ((F /^ m),d))) |-> d) by A5, Th23;
dom (Len F) = dom F by Def3;
then m <= len F by A8, FINSEQ_3:25;
then len (F | m) = m by FINSEQ_1:59;
then F | m = ((F | m) | (m -' 1)) ^ <*((F | m) . m)*> by A9, FINSEQ_3:55;
then A19: block_diagonal ((F | m),d) = block_diagonal (<*(block_diagonal ((F | (m -' 1)),d)),(F . m)*>,d) by A15, A11, Th35;
len (block_diagonal ((F | (m -' 1)),d)) = Sum (Len (F | (m -' 1))) by Def5
.= Sum ((Len F) | (m -' 1)) by Th17 ;
then ((Sum ((Width F) | (m -' 1))) |-> d) ^ (Line ((F . m),(i -' (Sum ((Len F) | (m -' 1)))))) = Line ((block_diagonal ((F | m),d)),((Sum ((Len F) | (m -' 1))) + (i -' (Sum ((Len F) | (m -' 1)))))) by A14, A16, A19, Th23
.= Line ((block_diagonal ((F | m),d)),i) by A7 ;
then Line ((block_diagonal ((F | m),d)),i) = ((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum ((Len F) | (m -' 1)))))) by Th21;
hence Line ((block_diagonal (F,d)),i) = (((Sum (Width (F | (m -' 1)))) |-> d) ^ (Line ((F . m),(i -' (Sum (Len (F | (m -' 1)))))))) ^ (((Sum (Width F)) -' (Sum (Width (F | m)))) |-> d) by A6, A18, Th17; ::_thesis: verum
end;
theorem :: MATRIXJ1:38
for i, m being Nat
for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D st i in Seg (Sum (Width F)) & m = min ((Width F),i) holds
Col ((block_diagonal (F,d)),i) = (((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum (Width (F | (m -' 1)))))))) ^ (((Sum (Len F)) -' (Sum (Len (F | m)))) |-> d)
proof
let i, m be Nat; ::_thesis: for D being non empty set
for d being Element of D
for F being FinSequence_of_Matrix of D st i in Seg (Sum (Width F)) & m = min ((Width F),i) holds
Col ((block_diagonal (F,d)),i) = (((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum (Width (F | (m -' 1)))))))) ^ (((Sum (Len F)) -' (Sum (Len (F | m)))) |-> d)
let D be non empty set ; ::_thesis: for d being Element of D
for F being FinSequence_of_Matrix of D st i in Seg (Sum (Width F)) & m = min ((Width F),i) holds
Col ((block_diagonal (F,d)),i) = (((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum (Width (F | (m -' 1)))))))) ^ (((Sum (Len F)) -' (Sum (Len (F | m)))) |-> d)
let d be Element of D; ::_thesis: for F being FinSequence_of_Matrix of D st i in Seg (Sum (Width F)) & m = min ((Width F),i) holds
Col ((block_diagonal (F,d)),i) = (((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum (Width (F | (m -' 1)))))))) ^ (((Sum (Len F)) -' (Sum (Len (F | m)))) |-> d)
let F be FinSequence_of_Matrix of D; ::_thesis: ( i in Seg (Sum (Width F)) & m = min ((Width F),i) implies Col ((block_diagonal (F,d)),i) = (((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum (Width (F | (m -' 1)))))))) ^ (((Sum (Len F)) -' (Sum (Len (F | m)))) |-> d) )
assume that
A1: i in Seg (Sum (Width F)) and
A2: m = min ((Width F),i) ; ::_thesis: Col ((block_diagonal (F,d)),i) = (((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum (Width (F | (m -' 1)))))))) ^ (((Sum (Len F)) -' (Sum (Len (F | m)))) |-> d)
set W = Width F;
A3: ((Width F) | m) . m = (Width F) . m by FINSEQ_3:112;
set BF9m = block_diagonal ((F /^ m),d);
set BFm = block_diagonal ((F | m),d);
set L = Len F;
A4: width (block_diagonal ((F | m),d)) = Sum (Width (F | m)) by Def5
.= Sum ((Width F) | m) by Th21 ;
F = (F | m) ^ (F /^ m) by RFINSEQ:8;
then A5: block_diagonal (F,d) = block_diagonal (((F | m) ^ <*(block_diagonal ((F /^ m),d))*>),d) by Th36
.= block_diagonal (<*(block_diagonal ((F | m),d)),(block_diagonal ((F /^ m),d))*>,d) by Th35 ;
then Sum (Len F) = len (block_diagonal (<*(block_diagonal ((F | m),d)),(block_diagonal ((F /^ m),d))*>,d)) by Def5
.= Sum (Len <*(block_diagonal ((F | m),d)),(block_diagonal ((F /^ m),d))*>) by Def5
.= (len (block_diagonal ((F | m),d))) + (len (block_diagonal ((F /^ m),d))) by Th16
.= (Sum (Len (F | m))) + (len (block_diagonal ((F /^ m),d))) by Def5 ;
then A6: (Sum (Len F)) -' (Sum (Len (F | m))) = ((Sum (Len (F | m))) + (len (block_diagonal ((F /^ m),d)))) - (Sum (Len (F | m))) by NAT_1:11, XREAL_1:233
.= len (block_diagonal ((F /^ m),d)) ;
Sum ((Width F) | (m -' 1)) < i by A1, A2, Th7;
then A7: i - (Sum ((Width F) | (m -' 1))) = i -' (Sum ((Width F) | (m -' 1))) by XREAL_1:233;
A8: m in dom (Width F) by A1, A2, Def1;
then 1 <= m by FINSEQ_3:25;
then m -' 1 = m - 1 by XREAL_1:233;
then A9: m = (m -' 1) + 1 ;
then m -' 1 <= m by NAT_1:11;
then A10: Seg (m -' 1) c= Seg m by FINSEQ_1:5;
then A11: (F | m) | (m -' 1) = F | (m -' 1) by RELAT_1:74;
m <= len (Width F) by A8, FINSEQ_3:25;
then len ((Width F) | m) = m by FINSEQ_1:59;
then A12: (Width F) | m = (((Width F) | m) | (m -' 1)) ^ <*(((Width F) | m) . m)*> by A9, FINSEQ_3:55;
((Width F) | m) | (m -' 1) = (Width F) | (m -' 1) by A10, RELAT_1:74;
then Sum ((Width F) | m) = (Sum ((Width F) | (m -' 1))) + ((Width F) . m) by A12, A3, RVSUM_1:74
.= (Sum ((Width F) | (m -' 1))) + (width (F . m)) by A8, Def4 ;
then (width (F . m)) + (Sum ((Width F) | (m -' 1))) >= (i -' (Sum ((Width F) | (m -' 1)))) + (Sum ((Width F) | (m -' 1))) by A1, A2, A7, Def1;
then A13: width (F . m) >= i -' (Sum ((Width F) | (m -' 1))) by XREAL_1:6;
i - (Sum ((Width F) | (m -' 1))) <> 0 by A1, A2, Th7;
then i -' (Sum ((Width F) | (m -' 1))) >= 1 by A7, NAT_1:14;
then A14: i -' (Sum ((Width F) | (m -' 1))) in Seg (width (F . m)) by A13;
set BFm1 = block_diagonal ((F | (m -' 1)),d);
A15: (F | m) . m = F . m by FINSEQ_3:112;
A16: width (block_diagonal ((F | (m -' 1)),d)) = Sum (Width (F | (m -' 1))) by Def5
.= Sum ((Width F) | (m -' 1)) by Th21 ;
A17: 1 <= i by A1, FINSEQ_1:1;
i <= Sum ((Width F) | m) by A1, A2, Def1;
then i in Seg (width (block_diagonal ((F | m),d))) by A17, A4, FINSEQ_1:1;
then A18: Col ((block_diagonal (F,d)),i) = (Col ((block_diagonal ((F | m),d)),i)) ^ ((len (block_diagonal ((F /^ m),d))) |-> d) by A5, Th24;
dom (Width F) = dom F by Def4;
then m <= len F by A8, FINSEQ_3:25;
then len (F | m) = m by FINSEQ_1:59;
then F | m = ((F | m) | (m -' 1)) ^ <*((F | m) . m)*> by A9, FINSEQ_3:55;
then A19: block_diagonal ((F | m),d) = block_diagonal (<*(block_diagonal ((F | (m -' 1)),d)),(F . m)*>,d) by A15, A11, Th35;
len (block_diagonal ((F | (m -' 1)),d)) = Sum (Len (F | (m -' 1))) by Def5
.= Sum ((Len F) | (m -' 1)) by Th17 ;
then ((Sum ((Len F) | (m -' 1))) |-> d) ^ (Col ((F . m),(i -' (Sum ((Width F) | (m -' 1)))))) = Col ((block_diagonal ((F | m),d)),((Sum ((Width F) | (m -' 1))) + (i -' (Sum ((Width F) | (m -' 1)))))) by A14, A16, A19, Th24
.= Col ((block_diagonal ((F | m),d)),i) by A7 ;
then Col ((block_diagonal ((F | m),d)),i) = ((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum ((Width F) | (m -' 1)))))) by Th17;
hence Col ((block_diagonal (F,d)),i) = (((Sum (Len (F | (m -' 1)))) |-> d) ^ (Col ((F . m),(i -' (Sum (Width (F | (m -' 1)))))))) ^ (((Sum (Len F)) -' (Sum (Len (F | m)))) |-> d) by A6, A18, Th21; ::_thesis: verum
end;
theorem :: MATRIXJ1:39
for D being non empty set
for d1, d2 being Element of D
for M1, M2, N1, N2 being Matrix of D st len M1 = len N1 & width M1 = width N1 & len M2 = len N2 & width M2 = width N2 & block_diagonal (<*M1,M2*>,d1) = block_diagonal (<*N1,N2*>,d2) holds
( M1 = N1 & M2 = N2 )
proof
let D be non empty set ; ::_thesis: for d1, d2 being Element of D
for M1, M2, N1, N2 being Matrix of D st len M1 = len N1 & width M1 = width N1 & len M2 = len N2 & width M2 = width N2 & block_diagonal (<*M1,M2*>,d1) = block_diagonal (<*N1,N2*>,d2) holds
( M1 = N1 & M2 = N2 )
let d1, d2 be Element of D; ::_thesis: for M1, M2, N1, N2 being Matrix of D st len M1 = len N1 & width M1 = width N1 & len M2 = len N2 & width M2 = width N2 & block_diagonal (<*M1,M2*>,d1) = block_diagonal (<*N1,N2*>,d2) holds
( M1 = N1 & M2 = N2 )
let M1, M2, N1, N2 be Matrix of D; ::_thesis: ( len M1 = len N1 & width M1 = width N1 & len M2 = len N2 & width M2 = width N2 & block_diagonal (<*M1,M2*>,d1) = block_diagonal (<*N1,N2*>,d2) implies ( M1 = N1 & M2 = N2 ) )
assume that
A1: len M1 = len N1 and
A2: width M1 = width N1 and
A3: len M2 = len N2 and
A4: width M2 = width N2 and
A5: block_diagonal (<*M1,M2*>,d1) = block_diagonal (<*N1,N2*>,d2) ; ::_thesis: ( M1 = N1 & M2 = N2 )
set G1 = <*N1*>;
set F1 = <*M1*>;
A6: Sum (Width <*M1*>) = Sum <*(width M1)*> by Th19
.= Sum (Width <*N1*>) by A2, Th19 ;
set G2 = <*N2*>;
set F2 = <*M2*>;
thus M1 = Segm ((block_diagonal ((<*M1*> ^ <*M2*>),d1)),(Seg (len M1)),(Seg (width M1))) by Th32
.= Segm ((block_diagonal ((<*N1*> ^ <*N2*>),d2)),(Seg (len N1)),(Seg (width N1))) by A1, A2, A5
.= N1 by Th32 ; ::_thesis: M2 = N2
A7: Sum (Len <*M1*>) = Sum <*(len M1)*> by Th15
.= Sum (Len <*N1*>) by A1, Th15 ;
thus M2 = Segm ((block_diagonal ((<*M1*> ^ <*M2*>),d1)),((Seg ((len M2) + (Sum (Len <*M1*>)))) \ (Seg (Sum (Len <*M1*>)))),((Seg ((width M2) + (Sum (Width <*M1*>)))) \ (Seg (Sum (Width <*M1*>))))) by Th33
.= N2 by A3, A4, A5, A7, A6, Th33 ; ::_thesis: verum
end;
theorem Th40: :: MATRIXJ1:40
for D being non empty set
for d being Element of D
for M being Matrix of D
for F being FinSequence_of_Matrix of D st M = {} holds
( block_diagonal ((F ^ <*M*>),d) = block_diagonal (F,d) & block_diagonal ((<*M*> ^ F),d) = block_diagonal (F,d) )
proof
let D be non empty set ; ::_thesis: for d being Element of D
for M being Matrix of D
for F being FinSequence_of_Matrix of D st M = {} holds
( block_diagonal ((F ^ <*M*>),d) = block_diagonal (F,d) & block_diagonal ((<*M*> ^ F),d) = block_diagonal (F,d) )
let d be Element of D; ::_thesis: for M being Matrix of D
for F being FinSequence_of_Matrix of D st M = {} holds
( block_diagonal ((F ^ <*M*>),d) = block_diagonal (F,d) & block_diagonal ((<*M*> ^ F),d) = block_diagonal (F,d) )
let M be Matrix of D; ::_thesis: for F being FinSequence_of_Matrix of D st M = {} holds
( block_diagonal ((F ^ <*M*>),d) = block_diagonal (F,d) & block_diagonal ((<*M*> ^ F),d) = block_diagonal (F,d) )
let F be FinSequence_of_Matrix of D; ::_thesis: ( M = {} implies ( block_diagonal ((F ^ <*M*>),d) = block_diagonal (F,d) & block_diagonal ((<*M*> ^ F),d) = block_diagonal (F,d) ) )
set MM = <*M*>;
set bf = block_diagonal (F,d);
set BF = <*(block_diagonal (F,d))*>;
set bFM = block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d);
set bMF = block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d);
set BFM = block_diagonal ((F ^ <*M*>),d);
set BMF = block_diagonal ((<*M*> ^ F),d);
A1: width (block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d)) = Sum (Width (<*M*> ^ <*(block_diagonal (F,d))*>)) by Def5;
A2: Len (<*(block_diagonal (F,d))*> ^ <*M*>) = (Len <*(block_diagonal (F,d))*>) ^ (Len <*M*>) by Th14;
A3: Sum (Len <*(block_diagonal (F,d))*>) = len (block_diagonal (F,d)) by Lm4;
assume A4: M = {} ; ::_thesis: ( block_diagonal ((F ^ <*M*>),d) = block_diagonal (F,d) & block_diagonal ((<*M*> ^ F),d) = block_diagonal (F,d) )
then A5: len M = 0 ;
then A6: Sum (Len <*M*>) = 0 by Lm4;
A7: width M = 0 by A4, CARD_1:27, MATRIX_1:def_3;
then A8: Sum (Width <*M*>) = 0 by Lm5;
A9: Sum (Len <*M*>) = len M by Lm4;
A10: Seg (Sum (Width <*M*>)) = {} by A8;
len (block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d)) = Sum (Len (<*(block_diagonal (F,d))*> ^ <*M*>)) by Def5;
then A11: len (block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d)) = (len (block_diagonal (F,d))) + (len M) by A2, A9, A3, RVSUM_1:75;
A12: Len (<*M*> ^ <*(block_diagonal (F,d))*>) = (Len <*M*>) ^ (Len <*(block_diagonal (F,d))*>) by Th14;
len (block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d)) = Sum (Len (<*M*> ^ <*(block_diagonal (F,d))*>)) by Def5;
then A13: len (block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d)) = (len M) + (len (block_diagonal (F,d))) by A12, A9, A3, RVSUM_1:75;
A14: Width (<*M*> ^ <*(block_diagonal (F,d))*>) = (Width <*M*>) ^ (Width <*(block_diagonal (F,d))*>) by Th18;
A15: Width (<*(block_diagonal (F,d))*> ^ <*M*>) = (Width <*(block_diagonal (F,d))*>) ^ (Width <*M*>) by Th18;
A16: Sum (Width <*M*>) = width M by Lm5;
A17: Sum (Width <*(block_diagonal (F,d))*>) = width (block_diagonal (F,d)) by Lm5;
width (block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d)) = Sum (Width (<*(block_diagonal (F,d))*> ^ <*M*>)) by Def5;
then A18: width (block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d)) = (width (block_diagonal (F,d))) + (width M) by A15, A16, A17, RVSUM_1:75;
thus block_diagonal ((F ^ <*M*>),d) = block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d) by Th35
.= Segm ((block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d)),(Seg (len (block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d)))),(Seg (width (block_diagonal ((<*(block_diagonal (F,d))*> ^ <*M*>),d))))) by MATRIX13:46
.= block_diagonal (F,d) by A5, A7, A11, A18, Th32 ; ::_thesis: block_diagonal ((<*M*> ^ F),d) = block_diagonal (F,d)
thus block_diagonal ((<*M*> ^ F),d) = block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d) by Th36
.= Segm ((block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d)),(Seg (len (block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d)))),(Seg (width (block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d))))) by MATRIX13:46
.= Segm ((block_diagonal ((<*M*> ^ <*(block_diagonal (F,d))*>),d)),((Seg ((len (block_diagonal (F,d))) + (Sum (Len <*M*>)))) \ (Seg (Sum (Len <*M*>)))),((Seg ((width (block_diagonal (F,d))) + (Sum (Width <*M*>)))) \ (Seg (Sum (Width <*M*>))))) by A5, A1, A14, A17, A13, A6, A8, A10, RVSUM_1:75
.= block_diagonal (F,d) by Th33 ; ::_thesis: verum
end;
theorem Th41: :: MATRIXJ1:41
for i being Nat
for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a)
proof
let i be Nat; ::_thesis: for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a)
let K be Field; ::_thesis: for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a)
let a be Element of K; ::_thesis: for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a)
let A be Matrix of K; ::_thesis: for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a)
let G be FinSequence_of_Matrix of K; ::_thesis: ( i in dom A & width A = width (DelLine (A,i)) implies DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a) )
assume that
A1: i in dom A and
A2: width A = width (DelLine (A,i)) ; ::_thesis: DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a)
A3: i in Seg (len A) by A1, FINSEQ_1:def_3;
set da = DelLine (A,i);
consider m being Nat such that
A4: len A = m + 1 and
A5: len (DelLine (A,i)) = m by A1, FINSEQ_3:104;
set bG = block_diagonal (G,a);
set DA = <*(DelLine (A,i))*>;
set AA = <*A*>;
set BG = <*(block_diagonal (G,a))*>;
set bAG = block_diagonal (<*A,(block_diagonal (G,a))*>,a);
set bdAG = block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a);
A6: Seg (len (block_diagonal (<*A,(block_diagonal (G,a))*>,a))) = dom (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) by FINSEQ_1:def_3;
A7: len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) = Sum (Len (<*A*> ^ <*(block_diagonal (G,a))*>)) by Def5;
then A8: len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) = (len A) + (len (block_diagonal (G,a))) by Th16;
then len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) >= len A by NAT_1:11;
then A9: Seg (len A) c= Seg (len (block_diagonal (<*A,(block_diagonal (G,a))*>,a))) by FINSEQ_1:5;
A10: len (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) = Sum (Len (<*(DelLine (A,i))*> ^ <*(block_diagonal (G,a))*>)) by Def5;
then A11: len (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) = m + (len (block_diagonal (G,a))) by A5, Th16;
A12: len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) = (m + (len (block_diagonal (G,a)))) + 1 by A4, A8;
A13: len (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) = (len (DelLine (A,i))) + (len (block_diagonal (G,a))) by A10, Th16;
A14: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_m_+_(len_(block_diagonal_(G,a)))_holds_
(Del_((block_diagonal_(<*A,(block_diagonal_(G,a))*>,a)),i))_._j_=_(block_diagonal_(<*(DelLine_(A,i)),(block_diagonal_(G,a))*>,a))_._j
m + (len (block_diagonal (G,a))) <= len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) by A12, NAT_1:11;
then A15: Seg (m + (len (block_diagonal (G,a)))) c= Seg (len (block_diagonal (<*A,(block_diagonal (G,a))*>,a))) by FINSEQ_1:5;
reconsider da9 = DelLine (A,i) as Matrix of len (DelLine (A,i)), width (DelLine (A,i)),K by MATRIX_2:7;
reconsider A9 = A as Matrix of len A, width A,K by MATRIX_2:7;
let j be Nat; ::_thesis: ( 1 <= j & j <= m + (len (block_diagonal (G,a))) implies (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) . j )
assume that
A16: 1 <= j and
A17: j <= m + (len (block_diagonal (G,a))) ; ::_thesis: (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) . j
A18: j in Seg (m + (len (block_diagonal (G,a)))) by A16, A17, FINSEQ_1:1;
A19: 1 <= 1 + j by NAT_1:11;
j + 1 <= len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) by A12, A17, XREAL_1:7;
then A20: j + 1 in Seg (len (block_diagonal (<*A,(block_diagonal (G,a))*>,a))) by A19;
now__::_thesis:_(Del_((block_diagonal_(<*A,(block_diagonal_(G,a))*>,a)),i))_._j_=_(block_diagonal_(<*(DelLine_(A,i)),(block_diagonal_(G,a))*>,a))_._j
percases ( j < i or j >= i ) ;
supposeA21: j < i ; ::_thesis: (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) . j
i <= len A by A3, FINSEQ_1:1;
then A22: j < len A by A21, XXREAL_0:2;
then A23: j <= m by A4, NAT_1:13;
then A24: j in dom (DelLine (A,i)) by A5, A16, FINSEQ_3:25;
A25: j in dom A by A16, A22, FINSEQ_3:25;
then A26: j in Seg m by A16, A23;
j in Seg (len A) by A16, A22, FINSEQ_1:1;
then A27: Line (A9,j) = A . j by MATRIX_2:8
.= da9 . j by A21, FINSEQ_3:110
.= Line ((DelLine (A,i)),j) by A5, A26, MATRIX_2:8 ;
thus (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) . j by A21, FINSEQ_3:110
.= Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),j) by A7, A18, A15, MATRIX_2:8
.= (Line ((DelLine (A,i)),j)) ^ ((width (block_diagonal (G,a))) |-> a) by A25, A27, Th23
.= Line ((block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)),j) by A24, Th23
.= (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) . j by A5, A10, A13, A18, MATRIX_2:8 ; ::_thesis: verum
end;
supposeA28: j >= i ; ::_thesis: (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) . j
then A29: (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) . (j + 1) by A12, A9, A3, A6, A17, FINSEQ_3:111
.= Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),(j + 1)) by A7, A20, MATRIX_2:8 ;
now__::_thesis:_(Del_((block_diagonal_(<*A,(block_diagonal_(G,a))*>,a)),i))_._j_=_Line_((block_diagonal_(<*(DelLine_(A,i)),(block_diagonal_(G,a))*>,a)),j)
percases ( j + 1 <= len A or j + 1 > len A ) ;
supposeA30: j + 1 <= len A ; ::_thesis: (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = Line ((block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)),j)
then A31: j + 1 in dom A by A19, FINSEQ_3:25;
A32: j <= m by A4, A30, XREAL_1:8;
then A33: j in Seg m by A16, FINSEQ_1:1;
A34: j in dom (DelLine (A,i)) by A5, A16, A32, FINSEQ_3:25;
j + 1 in Seg (len A) by A19, A30;
then Line (A9,(j + 1)) = A . (j + 1) by MATRIX_2:8
.= da9 . j by A1, A4, A28, A32, FINSEQ_3:111
.= Line ((DelLine (A,i)),j) by A5, A33, MATRIX_2:8 ;
hence (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (Line ((DelLine (A,i)),j)) ^ ((width (block_diagonal (G,a))) |-> a) by A29, A31, Th23
.= Line ((block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)),j) by A34, Th23 ;
::_thesis: verum
end;
supposeA35: j + 1 > len A ; ::_thesis: (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = Line ((block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)),j)
then reconsider jL = (j + 1) - (len A) as Element of NAT by NAT_1:21;
jL <> 0 by A35;
then A36: jL >= 1 by NAT_1:14;
jL + (len A) <= (len (block_diagonal (G,a))) + (len A) by A8, A12, A17, XREAL_1:7;
then jL <= len (block_diagonal (G,a)) by XREAL_1:8;
then A37: jL in dom (block_diagonal (G,a)) by A36, FINSEQ_3:25;
thus (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),(jL + (len A))) by A29
.= ((width (DelLine (A,i))) |-> a) ^ (Line ((block_diagonal (G,a)),jL)) by A2, A37, Th23
.= Line ((block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)),(jL + (len (DelLine (A,i))))) by A37, Th23
.= Line ((block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)),j) by A4, A5 ; ::_thesis: verum
end;
end;
end;
hence (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) . j by A5, A10, A13, A18, MATRIX_2:8; ::_thesis: verum
end;
end;
end;
hence (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a)) . j ; ::_thesis: verum
end;
A38: block_diagonal ((<*(DelLine (A,i))*> ^ G),a) = block_diagonal (<*(DelLine (A,i)),(block_diagonal (G,a))*>,a) by Th36;
A39: block_diagonal ((<*A*> ^ G),a) = block_diagonal (<*A,(block_diagonal (G,a))*>,a) by Th36;
len (Del ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) = m + (len (block_diagonal (G,a))) by A12, A9, A3, A6, FINSEQ_3:109;
hence DelLine ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelLine (A,i))*> ^ G),a) by A11, A39, A38, A14, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th42: :: MATRIXJ1:42
for i being Nat
for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a)
proof
let i be Nat; ::_thesis: for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a)
let K be Field; ::_thesis: for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a)
let a be Element of K; ::_thesis: for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a)
let A be Matrix of K; ::_thesis: for G being FinSequence_of_Matrix of K st i in dom A & width A = width (DelLine (A,i)) holds
DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a)
let G be FinSequence_of_Matrix of K; ::_thesis: ( i in dom A & width A = width (DelLine (A,i)) implies DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a) )
assume that
A1: i in dom A and
A2: width A = width (DelLine (A,i)) ; ::_thesis: DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a)
A3: i in Seg (len A) by A1, FINSEQ_1:def_3;
set da = DelLine (A,i);
consider m being Nat such that
A4: len A = m + 1 and
A5: len (DelLine (A,i)) = m by A1, FINSEQ_3:104;
set Si = (Sum (Len G)) + i;
set bG = block_diagonal (G,a);
set DA = <*(DelLine (A,i))*>;
set AA = <*A*>;
set BG = <*(block_diagonal (G,a))*>;
set bGA = block_diagonal (<*(block_diagonal (G,a)),A*>,a);
set bGdA = block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a);
A6: Seg (len (block_diagonal (<*(block_diagonal (G,a)),A*>,a))) = dom (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) by FINSEQ_1:def_3;
A7: len (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) = Sum (Len (<*(block_diagonal (G,a))*> ^ <*(DelLine (A,i))*>)) by Def5;
then A8: len (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) = m + (len (block_diagonal (G,a))) by A5, Th16;
A9: len (block_diagonal (G,a)) = Sum (Len G) by Def5;
A10: len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) = Sum (Len (<*(block_diagonal (G,a))*> ^ <*A*>)) by Def5;
then A11: len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) = (len A) + (len (block_diagonal (G,a))) by Th16;
then A12: len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) = (m + (len (block_diagonal (G,a)))) + 1 by A4;
A13: len (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) = (len (DelLine (A,i))) + (len (block_diagonal (G,a))) by A7, Th16;
A14: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_m_+_(len_(block_diagonal_(G,a)))_holds_
(Del_((block_diagonal_(<*(block_diagonal_(G,a)),A*>,a)),(i_+_(Sum_(Len_G)))))_._j_=_(block_diagonal_(<*(block_diagonal_(G,a)),(DelLine_(A,i))*>,a))_._j
m + (len (block_diagonal (G,a))) <= len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) by A12, NAT_1:11;
then A15: Seg (m + (len (block_diagonal (G,a)))) c= Seg (len (block_diagonal (<*(block_diagonal (G,a)),A*>,a))) by FINSEQ_1:5;
reconsider da9 = DelLine (A,i) as Matrix of len (DelLine (A,i)), width (DelLine (A,i)),K by MATRIX_2:7;
reconsider A9 = A as Matrix of len A, width A,K by MATRIX_2:7;
let j be Nat; ::_thesis: ( 1 <= j & j <= m + (len (block_diagonal (G,a))) implies (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(i + (Sum (Len G))))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) . j )
assume that
A16: 1 <= j and
A17: j <= m + (len (block_diagonal (G,a))) ; ::_thesis: (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(i + (Sum (Len G))))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) . j
A18: j in Seg (m + (len (block_diagonal (G,a)))) by A16, A17, FINSEQ_1:1;
A19: 1 <= 1 + j by NAT_1:11;
j + 1 <= len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) by A12, A17, XREAL_1:7;
then A20: j + 1 in Seg (len (block_diagonal (<*(block_diagonal (G,a)),A*>,a))) by A19;
now__::_thesis:_(Del_((block_diagonal_(<*(block_diagonal_(G,a)),A*>,a)),((Sum_(Len_G))_+_i)))_._j_=_(block_diagonal_(<*(block_diagonal_(G,a)),(DelLine_(A,i))*>,a))_._j
percases ( j <= len (block_diagonal (G,a)) or j > len (block_diagonal (G,a)) ) ;
supposeA21: j <= len (block_diagonal (G,a)) ; ::_thesis: (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) . j
then A22: j in dom (block_diagonal (G,a)) by A16, FINSEQ_3:25;
0 < i by A3, FINSEQ_1:1;
then j + 0 < (len (block_diagonal (G,a))) + i by A21, XREAL_1:8;
then j < (Sum (Len G)) + i by Def5;
hence (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) . j by FINSEQ_3:110
.= Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),j) by A10, A18, A15, MATRIX_2:8
.= (Line ((block_diagonal (G,a)),j)) ^ ((width (DelLine (A,i))) |-> a) by A2, A22, Th23
.= Line ((block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)),j) by A22, Th23
.= (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) . j by A5, A7, A13, A18, MATRIX_2:8 ;
::_thesis: verum
end;
supposeA23: j > len (block_diagonal (G,a)) ; ::_thesis: (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) . j
then reconsider jL = j - (len (block_diagonal (G,a))) as Element of NAT by NAT_1:21;
A24: 0 + 1 <= jL + 1 by NAT_1:13;
jL + (len (block_diagonal (G,a))) <= m + (len (block_diagonal (G,a))) by A17;
then A25: jL <= m by XREAL_1:8;
then A26: jL + 1 <= len A by A4, XREAL_1:7;
then A27: jL + 1 in dom A by A24, FINSEQ_3:25;
jL <> 0 by A23;
then A28: 1 <= jL by NAT_1:14;
then A29: jL in dom (DelLine (A,i)) by A5, A25, FINSEQ_3:25;
A30: jL + 1 in Seg (len A) by A24, A26;
A31: jL in Seg (len (DelLine (A,i))) by A5, A28, A25;
A32: jL <= len A by A4, A25, NAT_1:13;
then A33: jL in Seg (len A) by A28;
A34: jL in dom A by A28, A32, FINSEQ_3:25;
now__::_thesis:_(Del_((block_diagonal_(<*(block_diagonal_(G,a)),A*>,a)),((Sum_(Len_G))_+_i)))_._j_=_Line_((block_diagonal_(<*(block_diagonal_(G,a)),(DelLine_(A,i))*>,a)),(jL_+_(len_(block_diagonal_(G,a)))))
percases ( j < (Sum (Len G)) + i or j >= (Sum (Len G)) + i ) ;
supposeA35: j < (Sum (Len G)) + i ; ::_thesis: (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = Line ((block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)),(jL + (len (block_diagonal (G,a)))))
then jL + (len (block_diagonal (G,a))) < i + (len (block_diagonal (G,a))) by Def5;
then A36: jL < i by XREAL_1:7;
A37: Line (A,jL) = A9 . jL by A33, MATRIX_2:8
.= da9 . jL by A36, FINSEQ_3:110
.= Line ((DelLine (A,i)),jL) by A31, MATRIX_2:8 ;
thus (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) . j by A35, FINSEQ_3:110
.= Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(jL + (len (block_diagonal (G,a))))) by A10, A18, A15, MATRIX_2:8
.= ((width (block_diagonal (G,a))) |-> a) ^ (Line ((DelLine (A,i)),jL)) by A34, A37, Th23
.= Line ((block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)),(jL + (len (block_diagonal (G,a))))) by A29, Th23 ; ::_thesis: verum
end;
supposeA38: j >= (Sum (Len G)) + i ; ::_thesis: (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = Line ((block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)),(jL + (len (block_diagonal (G,a)))))
then jL + (len (block_diagonal (G,a))) >= i + (len (block_diagonal (G,a))) by Def5;
then A39: jL >= i by XREAL_1:8;
A40: Line (A,(1 + jL)) = A9 . (1 + jL) by A30, MATRIX_2:8
.= da9 . jL by A1, A4, A25, A39, FINSEQ_3:111
.= Line ((DelLine (A,i)),jL) by A31, MATRIX_2:8 ;
thus (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) . (j + 1) by A9, A11, A12, A3, A6, A17, A38, FINSEQ_1:60, FINSEQ_3:111
.= Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((jL + 1) + (len (block_diagonal (G,a))))) by A10, A20, MATRIX_2:8
.= ((width (block_diagonal (G,a))) |-> a) ^ (Line ((DelLine (A,i)),jL)) by A27, A40, Th23
.= Line ((block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)),(jL + (len (block_diagonal (G,a))))) by A29, Th23 ; ::_thesis: verum
end;
end;
end;
hence (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) . j by A5, A7, A13, A18, MATRIX_2:8; ::_thesis: verum
end;
end;
end;
hence (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(i + (Sum (Len G))))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a)) . j ; ::_thesis: verum
end;
A41: block_diagonal ((G ^ <*(DelLine (A,i))*>),a) = block_diagonal (<*(block_diagonal (G,a)),(DelLine (A,i))*>,a) by Th35;
A42: block_diagonal ((G ^ <*A*>),a) = block_diagonal (<*(block_diagonal (G,a)),A*>,a) by Th35;
len (Del ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),((Sum (Len G)) + i))) = m + (len (block_diagonal (G,a))) by A9, A11, A12, A3, A6, FINSEQ_1:60, FINSEQ_3:109;
hence DelLine ((block_diagonal ((G ^ <*A*>),a)),((Sum (Len G)) + i)) = block_diagonal ((G ^ <*(DelLine (A,i))*>),a) by A8, A42, A41, A14, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th43: :: MATRIXJ1:43
for i being Nat
for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a)
proof
let i be Nat; ::_thesis: for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a)
let K be Field; ::_thesis: for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a)
let a be Element of K; ::_thesis: for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a)
let A be Matrix of K; ::_thesis: for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a)
let G be FinSequence_of_Matrix of K; ::_thesis: ( i in Seg (width A) implies DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a) )
assume A1: i in Seg (width A) ; ::_thesis: DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a)
set bG = block_diagonal (G,a);
set Da = DelCol (A,i);
set AA = <*A*>;
set DA = <*(DelCol (A,i))*>;
set BG = <*(block_diagonal (G,a))*>;
set BAG = block_diagonal (<*A,(block_diagonal (G,a))*>,a);
set BDG = block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a);
A2: len (DelCol (A,i)) = len A by MATRIX_2:def_5;
len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) = Sum (Len (<*A*> ^ <*(block_diagonal (G,a))*>)) by Def5;
then A3: len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) = (len A) + (len (block_diagonal (G,a))) by Th16;
A4: len (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) = Sum (Len (<*(DelCol (A,i))*> ^ <*(block_diagonal (G,a))*>)) by Def5;
then A5: len (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) = (len (DelCol (A,i))) + (len (block_diagonal (G,a))) by Th16;
A6: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(block_diagonal_(<*(DelCol_(A,i)),(block_diagonal_(G,a))*>,a))_holds_
(DelCol_((block_diagonal_(<*A,(block_diagonal_(G,a))*>,a)),i))_._j_=_(block_diagonal_(<*(DelCol_(A,i)),(block_diagonal_(G,a))*>,a))_._j
reconsider Da9 = DelCol (A,i) as Matrix of len (DelCol (A,i)), width (DelCol (A,i)),K by MATRIX_2:7;
let j be Nat; ::_thesis: ( 1 <= j & j <= len (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) implies (DelCol ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) . j )
assume that
A7: 1 <= j and
A8: j <= len (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) ; ::_thesis: (DelCol ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) . j
A9: j in Seg (len (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a))) by A7, A8, FINSEQ_1:1;
A10: now__::_thesis:_Del_((Line_((block_diagonal_(<*A,(block_diagonal_(G,a))*>,a)),j)),i)_=_(block_diagonal_(<*(DelCol_(A,i)),(block_diagonal_(G,a))*>,a))_._j
percases ( j <= len A or j > len A ) ;
supposeA11: j <= len A ; ::_thesis: Del ((Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),j)),i) = (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) . j
then A12: j in Seg (len A) by A7, FINSEQ_1:1;
A13: j in dom (DelCol (A,i)) by A2, A7, A11, FINSEQ_3:25;
A14: dom (Line (A,j)) = Seg (width A) by FINSEQ_2:124;
A15: j in dom A by A7, A11, FINSEQ_3:25;
then A16: Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),j) = (Line (A,j)) ^ ((width (block_diagonal (G,a))) |-> a) by Th23;
Del ((Line (A,j)),i) = Da9 . j by A15, MATRIX_2:def_5
.= Line ((DelCol (A,i)),j) by A2, A12, MATRIX_2:8 ;
hence Del ((Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),j)),i) = (Line ((DelCol (A,i)),j)) ^ ((width (block_diagonal (G,a))) |-> a) by A1, A16, A14, Th2
.= Line ((block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)),j) by A13, Th23
.= (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) . j by A4, A9, MATRIX_2:8 ;
::_thesis: verum
end;
supposeA17: j > len A ; ::_thesis: Del ((Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),j)),i) = (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) . j
then reconsider jL = j - (len A) as Element of NAT by NAT_1:21;
jL <> 0 by A17;
then A18: jL >= 1 by NAT_1:14;
width A <> 0 by A1;
then reconsider w1 = (width A) - 1 as Element of NAT by NAT_1:14, NAT_1:21;
A19: dom ((width A) |-> a) = Seg (width A) by FINSEQ_2:124;
A20: width (DelCol (A,i)) = (w1 + 1) -' 1 by A1, LAPLACE:3
.= w1 by NAT_D:34 ;
jL + (len A) <= (len (block_diagonal (G,a))) + (len A) by A5, A8, MATRIX_2:def_5;
then jL <= len (block_diagonal (G,a)) by XREAL_1:8;
then A21: jL in dom (block_diagonal (G,a)) by A18, FINSEQ_3:25;
then Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),(jL + (len A))) = ((width A) |-> a) ^ (Line ((block_diagonal (G,a)),jL)) by Th23;
hence Del ((Line ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),j)),i) = (Del (((w1 + 1) |-> a),i)) ^ (Line ((block_diagonal (G,a)),jL)) by A1, A19, Th2
.= ((width (DelCol (A,i))) |-> a) ^ (Line ((block_diagonal (G,a)),jL)) by A1, A20, Th4
.= Line ((block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)),((len A) + jL)) by A2, A21, Th23
.= (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) . j by A4, A9, MATRIX_2:8 ;
::_thesis: verum
end;
end;
end;
j in dom (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) by A2, A5, A3, A7, A8, FINSEQ_3:25;
hence (DelCol ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) . j = (block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a)) . j by A10, MATRIX_2:def_5; ::_thesis: verum
end;
A22: block_diagonal ((<*(DelCol (A,i))*> ^ G),a) = block_diagonal (<*(DelCol (A,i)),(block_diagonal (G,a))*>,a) by Th36;
A23: len (DelCol ((block_diagonal (<*A,(block_diagonal (G,a))*>,a)),i)) = len (block_diagonal (<*A,(block_diagonal (G,a))*>,a)) by MATRIX_2:def_5;
block_diagonal ((<*A*> ^ G),a) = block_diagonal (<*A,(block_diagonal (G,a))*>,a) by Th36;
hence DelCol ((block_diagonal ((<*A*> ^ G),a)),i) = block_diagonal ((<*(DelCol (A,i))*> ^ G),a) by A2, A23, A4, A3, A6, A22, Th16, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th44: :: MATRIXJ1:44
for i being Nat
for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a)
proof
let i be Nat; ::_thesis: for K being Field
for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a)
let K be Field; ::_thesis: for a being Element of K
for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a)
let a be Element of K; ::_thesis: for A being Matrix of K
for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a)
let A be Matrix of K; ::_thesis: for G being FinSequence_of_Matrix of K st i in Seg (width A) holds
DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a)
let G be FinSequence_of_Matrix of K; ::_thesis: ( i in Seg (width A) implies DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a) )
assume A1: i in Seg (width A) ; ::_thesis: DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a)
set iS = i + (Sum (Width G));
set bG = block_diagonal (G,a);
set Da = DelCol (A,i);
set AA = <*A*>;
set DA = <*(DelCol (A,i))*>;
set BG = <*(block_diagonal (G,a))*>;
set BGA = block_diagonal (<*(block_diagonal (G,a)),A*>,a);
set BGD = block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a);
A2: len (DelCol (A,i)) = len A by MATRIX_2:def_5;
len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) = Sum (Len (<*(block_diagonal (G,a))*> ^ <*A*>)) by Def5;
then A3: len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) = (len (block_diagonal (G,a))) + (len A) by Th16;
A4: width (block_diagonal (G,a)) = Sum (Width G) by Def5;
A5: len (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) = Sum (Len (<*(block_diagonal (G,a))*> ^ <*(DelCol (A,i))*>)) by Def5;
then A6: len (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) = (len (block_diagonal (G,a))) + (len (DelCol (A,i))) by Th16;
A7: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_len_(block_diagonal_(<*(block_diagonal_(G,a)),(DelCol_(A,i))*>,a))_holds_
(DelCol_((block_diagonal_(<*(block_diagonal_(G,a)),A*>,a)),(i_+_(Sum_(Width_G)))))_._j_=_(block_diagonal_(<*(block_diagonal_(G,a)),(DelCol_(A,i))*>,a))_._j
width A <> 0 by A1;
then width A >= 1 by NAT_1:14;
then (width A) -' 1 = (width A) - 1 by XREAL_1:233;
then A8: width A = ((width A) -' 1) + 1 ;
A9: dom ((width A) |-> a) = Seg (width A) by FINSEQ_2:124;
A10: len ((width (block_diagonal (G,a))) |-> a) = width (block_diagonal (G,a)) by CARD_1:def_7;
reconsider Da9 = DelCol (A,i) as Matrix of len (DelCol (A,i)), width (DelCol (A,i)),K by MATRIX_2:7;
let j be Nat; ::_thesis: ( 1 <= j & j <= len (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) implies (DelCol ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(i + (Sum (Width G))))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) . j )
assume that
A11: 1 <= j and
A12: j <= len (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) ; ::_thesis: (DelCol ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(i + (Sum (Width G))))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) . j
A13: j in Seg (len (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a))) by A11, A12, FINSEQ_1:1;
A14: len (Line ((block_diagonal (G,a)),j)) = width (block_diagonal (G,a)) by MATRIX_1:def_7;
A15: now__::_thesis:_Del_((Line_((block_diagonal_(<*(block_diagonal_(G,a)),A*>,a)),j)),(i_+_(Sum_(Width_G))))_=_(block_diagonal_(<*(block_diagonal_(G,a)),(DelCol_(A,i))*>,a))_._j
percases ( j <= len (block_diagonal (G,a)) or j > len (block_diagonal (G,a)) ) ;
suppose j <= len (block_diagonal (G,a)) ; ::_thesis: Del ((Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),j)),(i + (Sum (Width G)))) = (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) . j
then A16: j in dom (block_diagonal (G,a)) by A11, FINSEQ_3:25;
then Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),j) = (Line ((block_diagonal (G,a)),j)) ^ ((width A) |-> a) by Th23;
hence Del ((Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),j)),(i + (Sum (Width G)))) = (Line ((block_diagonal (G,a)),j)) ^ (Del (((width A) |-> a),i)) by A1, A4, A9, A14, Th3
.= (Line ((block_diagonal (G,a)),j)) ^ (((width A) -' 1) |-> a) by A1, A8, Th4
.= (Line ((block_diagonal (G,a)),j)) ^ ((width (DelCol (A,i))) |-> a) by A1, LAPLACE:3
.= Line ((block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)),j) by A16, Th23
.= (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) . j by A5, A13, MATRIX_2:8 ;
::_thesis: verum
end;
supposeA17: j > len (block_diagonal (G,a)) ; ::_thesis: Del ((Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),j)),(i + (Sum (Width G)))) = (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) . j
then reconsider jL = j - (len (block_diagonal (G,a))) as Element of NAT by NAT_1:21;
jL <> 0 by A17;
then A18: jL >= 1 by NAT_1:14;
jL + (len (block_diagonal (G,a))) <= (len (block_diagonal (G,a))) + (len A) by A6, A12, MATRIX_2:def_5;
then A19: jL <= len A by XREAL_1:8;
then A20: jL in dom (DelCol (A,i)) by A2, A18, FINSEQ_3:25;
A21: jL in Seg (len A) by A18, A19;
A22: jL in dom A by A18, A19, FINSEQ_3:25;
then A23: Del ((Line (A,jL)),i) = Da9 . jL by MATRIX_2:def_5
.= Line ((DelCol (A,i)),jL) by A2, A21, MATRIX_2:8 ;
A24: dom (Line (A,jL)) = Seg (width A) by FINSEQ_2:124;
Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(jL + (len (block_diagonal (G,a))))) = ((width (block_diagonal (G,a))) |-> a) ^ (Line (A,jL)) by A22, Th23;
hence Del ((Line ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),j)),(i + (Sum (Width G)))) = ((width (block_diagonal (G,a))) |-> a) ^ (Del ((Line (A,jL)),i)) by A1, A4, A10, A24, Th3
.= Line ((block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)),((len (block_diagonal (G,a))) + jL)) by A20, A23, Th23
.= (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) . j by A5, A13, MATRIX_2:8 ;
::_thesis: verum
end;
end;
end;
j in dom (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) by A2, A6, A3, A11, A12, FINSEQ_3:25;
hence (DelCol ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(i + (Sum (Width G))))) . j = (block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a)) . j by A15, MATRIX_2:def_5; ::_thesis: verum
end;
A25: block_diagonal ((G ^ <*(DelCol (A,i))*>),a) = block_diagonal (<*(block_diagonal (G,a)),(DelCol (A,i))*>,a) by Th35;
A26: len (DelCol ((block_diagonal (<*(block_diagonal (G,a)),A*>,a)),(i + (Sum (Width G))))) = len (block_diagonal (<*(block_diagonal (G,a)),A*>,a)) by MATRIX_2:def_5;
block_diagonal ((G ^ <*A*>),a) = block_diagonal (<*(block_diagonal (G,a)),A*>,a) by Th35;
hence DelCol ((block_diagonal ((G ^ <*A*>),a)),(i + (Sum (Width G)))) = block_diagonal ((G ^ <*(DelCol (A,i))*>),a) by A2, A26, A5, A3, A7, A25, Th16, FINSEQ_1:14; ::_thesis: verum
end;
definition
let D be non empty set ;
let F be FinSequence of (D *) * ;
attrF is Square-Matrix-yielding means :Def6: :: MATRIXJ1:def 6
for i being Nat st i in dom F holds
ex n being Nat st F . i is Matrix of n,D;
end;
:: deftheorem Def6 defines Square-Matrix-yielding MATRIXJ1:def_6_:_
for D being non empty set
for F being FinSequence of (D *) * holds
( F is Square-Matrix-yielding iff for i being Nat st i in dom F holds
ex n being Nat st F . i is Matrix of n,D );
registration
let D be non empty set ;
cluster Relation-like NAT -defined (D *) * -valued Function-like V33() FinSequence-like FinSubsequence-like Square-Matrix-yielding for FinSequence of (D *) * ;
existence
ex b1 being FinSequence of (D *) * st b1 is Square-Matrix-yielding
proof
reconsider F = <*> ((D *) *) as FinSequence of (D *) * ;
take F ; ::_thesis: F is Square-Matrix-yielding
for i being Nat st i in dom F holds
ex n being Nat st F . i is Matrix of n,D ;
hence F is Square-Matrix-yielding by Def6; ::_thesis: verum
end;
end;
registration
let D be non empty set ;
cluster Square-Matrix-yielding -> Matrix-yielding for FinSequence of (D *) * ;
coherence
for b1 being FinSequence of (D *) * st b1 is Square-Matrix-yielding holds
b1 is Matrix-yielding
proof
let F be FinSequence of (D *) * ; ::_thesis: ( F is Square-Matrix-yielding implies F is Matrix-yielding )
assume A1: F is Square-Matrix-yielding ; ::_thesis: F is Matrix-yielding
let i be Nat; :: according to MATRIXJ1:def_2 ::_thesis: ( i in dom F implies F . i is Matrix of D )
assume i in dom F ; ::_thesis: F . i is Matrix of D
then ex n being Nat st F . i is Matrix of n,D by A1, Def6;
hence F . i is Matrix of D ; ::_thesis: verum
end;
end;
definition
let D be non empty set ;
mode FinSequence_of_Square-Matrix of D is Square-Matrix-yielding FinSequence of (D *) * ;
end;
definition
let K be Field;
mode FinSequence_of_Square-Matrix of K is Square-Matrix-yielding FinSequence of ( the carrier of K *) * ;
end;
theorem :: MATRIXJ1:45
for D being non empty set holds {} is FinSequence_of_Square-Matrix of D
proof
let D be non empty set ; ::_thesis: {} is FinSequence_of_Square-Matrix of D
set F = <*> ((D *) *);
for i being Nat st i in dom (<*> ((D *) *)) holds
ex n being Nat st (<*> ((D *) *)) . i is Matrix of n,D ;
hence {} is FinSequence_of_Square-Matrix of D by Def6; ::_thesis: verum
end;
definition
let D be non empty set ;
let S be FinSequence_of_Square-Matrix of D;
let x be set ;
:: original: .
redefine funcS . x -> Matrix of len (S . x),D;
coherence
S . x is Matrix of len (S . x),D
proof
reconsider E = {} as Matrix of 0 ,D by MATRIX_1:13;
percases ( x in dom S or not x in dom S ) ;
supposeA1: x in dom S ; ::_thesis: S . x is Matrix of len (S . x),D
then reconsider i = x as Element of NAT ;
consider n being Nat such that
A2: S . i is Matrix of n,D by A1, Def6;
len (S . i) = n by A2, MATRIX_1:24;
hence S . x is Matrix of len (S . x),D by A2; ::_thesis: verum
end;
supposeA3: not x in dom S ; ::_thesis: S . x is Matrix of len (S . x),D
A4: len E = 0 ;
S . x = E by A3, FUNCT_1:def_2;
hence S . x is Matrix of len (S . x),D by A4; ::_thesis: verum
end;
end;
end;
end;
definition
let D be non empty set ;
let S1, S2 be FinSequence_of_Square-Matrix of D;
:: original: ^
redefine funcS1 ^ S2 -> FinSequence_of_Square-Matrix of D;
coherence
S1 ^ S2 is FinSequence_of_Square-Matrix of D
proof
S1 ^ S2 is Square-Matrix-yielding
proof
let i be Nat; :: according to MATRIXJ1:def_6 ::_thesis: ( i in dom (S1 ^ S2) implies ex n being Nat st (S1 ^ S2) . i is Matrix of n,D )
assume A1: i in dom (S1 ^ S2) ; ::_thesis: ex n being Nat st (S1 ^ S2) . i is Matrix of n,D
take len ((S1 ^ S2) . i) ; ::_thesis: (S1 ^ S2) . i is Matrix of len ((S1 ^ S2) . i),D
percases ( i in dom S1 or ex n being Nat st
( n in dom S2 & i = (len S1) + n ) ) by A1, FINSEQ_1:25;
suppose i in dom S1 ; ::_thesis: (S1 ^ S2) . i is Matrix of len ((S1 ^ S2) . i),D
then (S1 ^ S2) . i = S1 . i by FINSEQ_1:def_7;
hence (S1 ^ S2) . i is Matrix of len ((S1 ^ S2) . i),D ; ::_thesis: verum
end;
suppose ex n being Nat st
( n in dom S2 & i = (len S1) + n ) ; ::_thesis: (S1 ^ S2) . i is Matrix of len ((S1 ^ S2) . i),D
then consider n being Nat such that
A2: n in dom S2 and
A3: i = (len S1) + n ;
(S1 ^ S2) . i = S2 . n by A2, A3, FINSEQ_1:def_7;
hence (S1 ^ S2) . i is Matrix of len ((S1 ^ S2) . i),D ; ::_thesis: verum
end;
end;
end;
hence S1 ^ S2 is FinSequence_of_Square-Matrix of D ; ::_thesis: verum
end;
end;
Lm6: for n being Nat
for D being non empty set
for M being Matrix of n,D holds <*M*> is FinSequence_of_Square-Matrix of D
proof
let n be Nat; ::_thesis: for D being non empty set
for M being Matrix of n,D holds <*M*> is FinSequence_of_Square-Matrix of D
let D be non empty set ; ::_thesis: for M being Matrix of n,D holds <*M*> is FinSequence_of_Square-Matrix of D
let M be Matrix of n,D; ::_thesis: <*M*> is FinSequence_of_Square-Matrix of D
now__::_thesis:_for_i_being_Nat_st_i_in_dom_<*M*>_holds_
ex_n_being_Nat_st_<*M*>_._i_is_Matrix_of_n,D
let i be Nat; ::_thesis: ( i in dom <*M*> implies ex n being Nat st <*M*> . i is Matrix of n,D )
assume A1: i in dom <*M*> ; ::_thesis: ex n being Nat st <*M*> . i is Matrix of n,D
take n = n; ::_thesis: <*M*> . i is Matrix of n,D
A2: <*M*> . 1 = M by FINSEQ_1:def_8;
dom <*M*> = {1} by FINSEQ_1:2, FINSEQ_1:def_8;
hence <*M*> . i is Matrix of n,D by A1, A2, TARSKI:def_1; ::_thesis: verum
end;
hence <*M*> is FinSequence_of_Square-Matrix of D by Def6; ::_thesis: verum
end;
definition
let D be non empty set ;
let n be Nat;
let M1 be Matrix of n,D;
:: original: <*
redefine func<*M1*> -> FinSequence_of_Square-Matrix of D;
coherence
<*M1*> is FinSequence_of_Square-Matrix of D by Lm6;
end;
definition
let D be non empty set ;
let n, m be Nat;
let M1 be Matrix of n,D;
let M2 be Matrix of m,D;
:: original: <*
redefine func<*M1,M2*> -> FinSequence_of_Square-Matrix of D;
coherence
<*M1,M2*> is FinSequence_of_Square-Matrix of D
proof
reconsider F1 = <*M1*>, F2 = <*M2*> as FinSequence_of_Square-Matrix of D ;
<*M1,M2*> = F1 ^ F2 ;
hence <*M1,M2*> is FinSequence_of_Square-Matrix of D ; ::_thesis: verum
end;
end;
definition
let D be non empty set ;
let n be Nat;
let S be FinSequence_of_Square-Matrix of D;
:: original: |
redefine funcS | n -> FinSequence_of_Square-Matrix of D;
coherence
S | n is FinSequence_of_Square-Matrix of D
proof
S | n is Square-Matrix-yielding
proof
let i be Nat; :: according to MATRIXJ1:def_6 ::_thesis: ( i in dom (S | n) implies ex n being Nat st (S | n) . i is Matrix of n,D )
assume A1: i in dom (S | n) ; ::_thesis: ex n being Nat st (S | n) . i is Matrix of n,D
take L = len (S . i); ::_thesis: (S | n) . i is Matrix of L,D
thus (S | n) . i is Matrix of L,D by A1, FUNCT_1:47; ::_thesis: verum
end;
hence S | n is FinSequence_of_Square-Matrix of D ; ::_thesis: verum
end;
:: original: /^
redefine funcS /^ n -> FinSequence_of_Square-Matrix of D;
coherence
S /^ n is FinSequence_of_Square-Matrix of D
proof
S /^ n is Square-Matrix-yielding
proof
let i be Nat; :: according to MATRIXJ1:def_6 ::_thesis: ( i in dom (S /^ n) implies ex n being Nat st (S /^ n) . i is Matrix of n,D )
assume A2: i in dom (S /^ n) ; ::_thesis: ex n being Nat st (S /^ n) . i is Matrix of n,D
i + n in dom S by A2, FINSEQ_5:26;
then A3: S . (n + i) = S /. (n + i) by PARTFUN1:def_6;
take L = len (S . (n + i)); ::_thesis: (S /^ n) . i is Matrix of L,D
(S /^ n) . i = (S /^ n) /. i by A2, PARTFUN1:def_6;
hence (S /^ n) . i is Matrix of L,D by A2, A3, FINSEQ_5:27; ::_thesis: verum
end;
hence S /^ n is FinSequence_of_Square-Matrix of D ; ::_thesis: verum
end;
end;
theorem Th46: :: MATRIXJ1:46
for D being non empty set
for S being FinSequence_of_Square-Matrix of D holds Len S = Width S
proof
let D be non empty set ; ::_thesis: for S being FinSequence_of_Square-Matrix of D holds Len S = Width S
let S be FinSequence_of_Square-Matrix of D; ::_thesis: Len S = Width S
set L = Len S;
set W = Width S;
A1: dom (Width S) = dom S by Def4;
A2: dom (Len S) = dom S by Def3;
now__::_thesis:_for_k_being_Nat_st_k_in_dom_(Len_S)_holds_
(Len_S)_._k_=_(Width_S)_._k
let k be Nat; ::_thesis: ( k in dom (Len S) implies (Len S) . k = (Width S) . k )
assume A3: k in dom (Len S) ; ::_thesis: (Len S) . k = (Width S) . k
thus (Len S) . k = len (S . k) by A3, Def3
.= width (S . k) by MATRIX_1:24
.= (Width S) . k by A2, A1, A3, Def4 ; ::_thesis: verum
end;
hence Len S = Width S by A2, A1, FINSEQ_1:13; ::_thesis: verum
end;
definition
let D be non empty set ;
let d be Element of D;
let S be FinSequence_of_Square-Matrix of D;
:: original: block_diagonal
redefine func block_diagonal (S,d) -> Matrix of Sum (Len S),D;
coherence
block_diagonal (S,d) is Matrix of Sum (Len S),D
proof
block_diagonal (S,d) is Matrix of Sum (Len S), Sum (Width S),D ;
hence block_diagonal (S,d) is Matrix of Sum (Len S),D by Th46; ::_thesis: verum
end;
end;
theorem Th47: :: MATRIXJ1:47
for n, i, j being Nat
for K being Field
for a being Element of K
for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
proof
let n, i, j be Nat; ::_thesis: for K being Field
for a being Element of K
for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
let K be Field; ::_thesis: for a being Element of K
for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
let a be Element of K; ::_thesis: for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
let R be FinSequence_of_Square-Matrix of K; ::_thesis: for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
let A be Matrix of n,K; ::_thesis: ( i in dom A & j in Seg n implies Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a) )
assume that
A1: i in dom A and
A2: j in Seg n ; ::_thesis: Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
n <> 0 by A2;
then A3: n >= 1 by NAT_1:14;
set AA = <*A*>;
set b = block_diagonal (R,a);
set B = <*(block_diagonal (R,a))*>;
set LAR = Sum (Len (<*A*> ^ R));
set LAB = Sum (Len (<*A*> ^ <*(block_diagonal (R,a))*>));
A4: width A = n by MATRIX_1:24;
Width <*A*> = <*(width A)*> by Th19;
then A5: Sum (Width <*A*>) = width A by RVSUM_1:73;
A6: Width <*(block_diagonal (R,a))*> = <*(width (block_diagonal (R,a)))*> by Th19;
A7: Len <*A*> = <*(len A)*> by Th15;
then A8: Sum (Len <*A*>) = len A by RVSUM_1:73;
Len (<*A*> ^ <*(block_diagonal (R,a))*>) = (Len <*A*>) ^ (Len <*(block_diagonal (R,a))*>) by Th14;
then A9: Sum (Len (<*A*> ^ <*(block_diagonal (R,a))*>)) = (len A) + (Sum (Len <*(block_diagonal (R,a))*>)) by A7, RVSUM_1:76;
Len (<*A*> ^ R) = (Len <*A*>) ^ (Len R) by Th14;
then A10: Sum (Len (<*A*> ^ R)) = (len A) + (Sum (Len R)) by A7, RVSUM_1:76;
A11: Len (<*A*> ^ <*(block_diagonal (R,a))*>) = Width (<*A*> ^ <*(block_diagonal (R,a))*>) by Th46;
Width (<*A*> ^ <*(block_diagonal (R,a))*>) = (Width <*A*>) ^ (Width <*(block_diagonal (R,a))*>) by Th18;
then A12: Sum (Len (<*A*> ^ <*(block_diagonal (R,a))*>)) = (Sum (Width <*A*>)) + (width (block_diagonal (R,a))) by A6, A11, RVSUM_1:74;
A13: len (block_diagonal (R,a)) = Sum (Len R) by Def5;
Len <*(block_diagonal (R,a))*> = <*(len (block_diagonal (R,a)))*> by Th15;
then A14: Sum (Len <*(block_diagonal (R,a))*>) = len (block_diagonal (R,a)) by RVSUM_1:73;
A15: len A = n by MATRIX_1:24;
then A16: dom A = Seg n by FINSEQ_1:def_3;
percases ( n = 1 or n > 1 ) by A3, XXREAL_0:1;
supposeA17: n = 1 ; ::_thesis: Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
then A18: i = 1 by A1, A16, FINSEQ_1:2, TARSKI:def_1;
A19: j = 1 by A2, A17, FINSEQ_1:2, TARSKI:def_1;
len (Deleting (A,i,j)) = 1 -' 1 by A1, A17, LAPLACE:2
.= 0 by XREAL_1:232 ;
then A20: Deleting (A,i,j) = {} ;
thus Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = Deleting ((block_diagonal ((<*A*> ^ <*(block_diagonal (R,a))*>),a)),i,j) by A13, A10, A9, A14, Th36
.= Segm ((block_diagonal ((<*A*> ^ <*(block_diagonal (R,a))*>),a)),((Seg (Sum (Len (<*A*> ^ <*(block_diagonal (R,a))*>)))) \ {i}),((Seg (Sum (Len (<*A*> ^ <*(block_diagonal (R,a))*>)))) \ {j})) by MATRIX13:58
.= block_diagonal (R,a) by A15, A4, A9, A12, A14, A8, A5, A17, A18, A19, Th33, FINSEQ_1:2
.= block_diagonal (<*(block_diagonal (R,a))*>,a) by Th34
.= block_diagonal ((<*(Deleting (A,i,j))*> ^ <*(block_diagonal (R,a))*>),a) by A20, Th40
.= block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a) by Th36 ; ::_thesis: verum
end;
suppose n > 1 ; ::_thesis: Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a)
then A21: width A = width (DelLine (A,i)) by A15, LAPLACE:4;
thus Deleting ((block_diagonal ((<*A*> ^ R),a)),i,j) = DelCol ((DelLine ((block_diagonal ((<*A*> ^ R),a)),i)),j) by MATRIX_2:def_6
.= DelCol ((block_diagonal ((<*(DelLine (A,i))*> ^ R),a)),j) by A1, A21, Th41
.= block_diagonal ((<*(DelCol ((DelLine (A,i)),j))*> ^ R),a) by A2, A4, A21, Th43
.= block_diagonal ((<*(Deleting (A,i,j))*> ^ R),a) by MATRIX_2:def_6 ; ::_thesis: verum
end;
end;
end;
theorem :: MATRIXJ1:48
for n, i, j being Nat
for K being Field
for a being Element of K
for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
proof
let n, i, j be Nat; ::_thesis: for K being Field
for a being Element of K
for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
let K be Field; ::_thesis: for a being Element of K
for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
let a be Element of K; ::_thesis: for R being FinSequence_of_Square-Matrix of K
for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
let R be FinSequence_of_Square-Matrix of K; ::_thesis: for A being Matrix of n,K st i in dom A & j in Seg n holds
Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
let A be Matrix of n,K; ::_thesis: ( i in dom A & j in Seg n implies Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a) )
assume that
A1: i in dom A and
A2: j in Seg n ; ::_thesis: Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
n <> 0 by A2;
then A3: n >= 1 by NAT_1:14;
set jS = j + (Sum (Len R));
set iS = i + (Sum (Len R));
set AA = <*A*>;
set b = block_diagonal (R,a);
set B = <*(block_diagonal (R,a))*>;
set LRA = Sum (Len (R ^ <*A*>));
set LBA = Sum (Len (<*(block_diagonal (R,a))*> ^ <*A*>));
A4: width A = n by MATRIX_1:24;
A5: Len R = Width R by Th46;
A6: len A = n by MATRIX_1:24;
then A7: dom A = Seg n by FINSEQ_1:def_3;
A8: Width <*A*> = <*(width A)*> by Th19;
A9: len (block_diagonal (R,a)) = Sum (Len R) by Def5;
A10: Len (<*(block_diagonal (R,a))*> ^ <*A*>) = Width (<*(block_diagonal (R,a))*> ^ <*A*>) by Th46;
A11: Len <*A*> = <*(len A)*> by Th15;
then A12: Sum (Len <*A*>) = len A by RVSUM_1:73;
Len (R ^ <*A*>) = (Len R) ^ (Len <*A*>) by Th14;
then A13: Sum (Len (R ^ <*A*>)) = (len A) + (Sum (Len R)) by A11, RVSUM_1:74;
Len (<*(block_diagonal (R,a))*> ^ <*A*>) = (Len <*(block_diagonal (R,a))*>) ^ (Len <*A*>) by Th14;
then A14: Sum (Len (<*(block_diagonal (R,a))*> ^ <*A*>)) = (len A) + (Sum (Len <*(block_diagonal (R,a))*>)) by A11, RVSUM_1:74;
A15: Width <*(block_diagonal (R,a))*> = <*(width (block_diagonal (R,a)))*> by Th19;
then A16: Sum (Width <*(block_diagonal (R,a))*>) = width (block_diagonal (R,a)) by RVSUM_1:73;
Width (<*(block_diagonal (R,a))*> ^ <*A*>) = (Width <*(block_diagonal (R,a))*>) ^ (Width <*A*>) by Th18;
then A17: Sum (Len (<*(block_diagonal (R,a))*> ^ <*A*>)) = (Sum (Width <*A*>)) + (width (block_diagonal (R,a))) by A15, A10, RVSUM_1:76;
Len <*(block_diagonal (R,a))*> = <*(len (block_diagonal (R,a)))*> by Th15;
then A18: Sum (Len <*(block_diagonal (R,a))*>) = len (block_diagonal (R,a)) by RVSUM_1:73;
percases ( n = 1 or n > 1 ) by A3, XXREAL_0:1;
supposeA19: n = 1 ; ::_thesis: Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
then A20: i = 1 by A1, A7, FINSEQ_1:2, TARSKI:def_1;
A21: j = 1 by A2, A19, FINSEQ_1:2, TARSKI:def_1;
len (Deleting (A,i,j)) = 1 -' 1 by A1, A19, LAPLACE:2
.= 0 by XREAL_1:232 ;
then A22: Deleting (A,i,j) = {} ;
thus Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = Deleting ((block_diagonal ((<*(block_diagonal (R,a))*> ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) by A9, A13, A14, A18, Th35
.= Segm ((block_diagonal ((<*(block_diagonal (R,a))*> ^ <*A*>),a)),((Seg (Sum (Len (<*(block_diagonal (R,a))*> ^ <*A*>)))) \ {(i + (Sum (Len R)))}),((Seg (Sum (Len (<*(block_diagonal (R,a))*> ^ <*A*>)))) \ {(j + (Sum (Len R)))})) by MATRIX13:58
.= Segm ((block_diagonal ((<*(block_diagonal (R,a))*> ^ <*A*>),a)),(Seg (Sum (Len <*(block_diagonal (R,a))*>))),((Seg (Sum (Len (<*(block_diagonal (R,a))*> ^ <*A*>)))) \ {(j + (Sum (Len R)))})) by A6, A9, A14, A18, A19, A20, FINSEQ_1:10
.= Segm ((block_diagonal ((<*(block_diagonal (R,a))*> ^ <*A*>),a)),(Seg (Sum (Len <*(block_diagonal (R,a))*>))),(Seg (Sum (Width <*(block_diagonal (R,a))*>)))) by A6, A4, A9, A11, A8, A14, A17, A18, A12, A16, A19, A21, FINSEQ_1:10
.= block_diagonal (R,a) by A18, A16, Th32
.= block_diagonal (<*(block_diagonal (R,a))*>,a) by Th34
.= block_diagonal ((<*(block_diagonal (R,a))*> ^ <*(Deleting (A,i,j))*>),a) by A22, Th40
.= block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a) by Th35 ; ::_thesis: verum
end;
suppose n > 1 ; ::_thesis: Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a)
then A23: width A = width (DelLine (A,i)) by A6, LAPLACE:4;
thus Deleting ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))),(j + (Sum (Len R)))) = DelCol ((DelLine ((block_diagonal ((R ^ <*A*>),a)),(i + (Sum (Len R))))),(j + (Sum (Len R)))) by MATRIX_2:def_6
.= DelCol ((block_diagonal ((R ^ <*(DelLine (A,i))*>),a)),(j + (Sum (Len R)))) by A1, A23, Th42
.= block_diagonal ((R ^ <*(DelCol ((DelLine (A,i)),j))*>),a) by A2, A4, A5, A23, Th44
.= block_diagonal ((R ^ <*(Deleting (A,i,j))*>),a) by MATRIX_2:def_6 ; ::_thesis: verum
end;
end;
end;
definition
let K be Field;
let R be FinSequence_of_Square-Matrix of K;
func Det R -> FinSequence of K means :Def7: :: MATRIXJ1:def 7
( dom it = dom R & ( for i being Nat st i in dom it holds
it . i = Det (R . i) ) );
existence
ex b1 being FinSequence of K st
( dom b1 = dom R & ( for i being Nat st i in dom b1 holds
b1 . i = Det (R . i) ) )
proof
deffunc H1( Nat) -> Element of the carrier of K = Det (R . $1);
consider p being FinSequence of K such that
A1: len p = len R and
A2: for i being Nat st i in dom p holds
p . i = H1(i) from FINSEQ_2:sch_1();
take p ; ::_thesis: ( dom p = dom R & ( for i being Nat st i in dom p holds
p . i = Det (R . i) ) )
thus ( dom p = dom R & ( for i being Nat st i in dom p holds
p . i = Det (R . i) ) ) by A1, A2, FINSEQ_3:29; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence of K st dom b1 = dom R & ( for i being Nat st i in dom b1 holds
b1 . i = Det (R . i) ) & dom b2 = dom R & ( for i being Nat st i in dom b2 holds
b2 . i = Det (R . i) ) holds
b1 = b2
proof
let F1, F2 be FinSequence of K; ::_thesis: ( dom F1 = dom R & ( for i being Nat st i in dom F1 holds
F1 . i = Det (R . i) ) & dom F2 = dom R & ( for i being Nat st i in dom F2 holds
F2 . i = Det (R . i) ) implies F1 = F2 )
assume that
A3: dom F1 = dom R and
A4: for i being Nat st i in dom F1 holds
F1 . i = Det (R . i) and
A5: dom F2 = dom R and
A6: for i being Nat st i in dom F2 holds
F2 . i = Det (R . i) ; ::_thesis: F1 = F2
now__::_thesis:_for_x_being_set_st_x_in_dom_F1_holds_
F1_._x_=_F2_._x
let x be set ; ::_thesis: ( x in dom F1 implies F1 . x = F2 . x )
assume A7: x in dom F1 ; ::_thesis: F1 . x = F2 . x
reconsider i = x as Element of NAT by A7;
thus F1 . x = Det (R . i) by A4, A7
.= F2 . x by A3, A5, A6, A7 ; ::_thesis: verum
end;
hence F1 = F2 by A3, A5, FUNCT_1:2; ::_thesis: verum
end;
end;
:: deftheorem Def7 defines Det MATRIXJ1:def_7_:_
for K being Field
for R being FinSequence_of_Square-Matrix of K
for b3 being FinSequence of K holds
( b3 = Det R iff ( dom b3 = dom R & ( for i being Nat st i in dom b3 holds
b3 . i = Det (R . i) ) ) );
definition
let K be Field;
let R be FinSequence_of_Square-Matrix of K;
:: original: Det
redefine func Det R -> Element of (len R) -tuples_on the carrier of K;
coherence
Det R is Element of (len R) -tuples_on the carrier of K
proof
dom (Det R) = dom R by Def7;
then len (Det R) = len R by FINSEQ_3:29;
hence Det R is Element of (len R) -tuples_on the carrier of K by FINSEQ_2:92; ::_thesis: verum
end;
end;
theorem Th49: :: MATRIXJ1:49
for n being Nat
for K being Field
for N being Matrix of n,K holds Det <*N*> = <*(Det N)*>
proof
let n be Nat; ::_thesis: for K being Field
for N being Matrix of n,K holds Det <*N*> = <*(Det N)*>
let K be Field; ::_thesis: for N being Matrix of n,K holds Det <*N*> = <*(Det N)*>
let N be Matrix of n,K; ::_thesis: Det <*N*> = <*(Det N)*>
set F = <*N*>;
A1: len <*N*> = 1 by FINSEQ_1:40;
A2: n = len N by MATRIX_1:def_2;
A3: <*N*> . 1 = N by FINSEQ_1:40;
A4: len <*N*> = len (Det <*N*>) by CARD_1:def_7;
A5: dom (Det <*N*>) = Seg (len <*N*>) by FINSEQ_2:124;
1 in Seg 1 ;
then (Det <*N*>) . 1 = Det (<*N*> . 1) by A1, A5, Def7;
hence Det <*N*> = <*(Det N)*> by A1, A4, A3, A2, FINSEQ_1:40; ::_thesis: verum
end;
theorem Th50: :: MATRIXJ1:50
for K being Field
for R1, R2 being FinSequence_of_Square-Matrix of K holds Det (R1 ^ R2) = (Det R1) ^ (Det R2)
proof
let K be Field; ::_thesis: for R1, R2 being FinSequence_of_Square-Matrix of K holds Det (R1 ^ R2) = (Det R1) ^ (Det R2)
let R1, R2 be FinSequence_of_Square-Matrix of K; ::_thesis: Det (R1 ^ R2) = (Det R1) ^ (Det R2)
set R12 = R1 ^ R2;
A1: len (R1 ^ R2) = (len R1) + (len R2) by FINSEQ_1:22;
A2: len ((Det R1) ^ (Det R2)) = (len R1) + (len R2) by CARD_1:def_7;
len R2 = len (Det R2) by CARD_1:def_7;
then A3: dom (Det R2) = dom R2 by FINSEQ_3:29;
A4: len R1 = len (Det R1) by CARD_1:def_7;
then A5: dom (Det R1) = dom R1 by FINSEQ_3:29;
A6: len (Det (R1 ^ R2)) = len (R1 ^ R2) by CARD_1:def_7;
then A7: dom ((Det R1) ^ (Det R2)) = dom (Det (R1 ^ R2)) by A1, A2, FINSEQ_3:29;
now__::_thesis:_for_k_being_Nat_st_1_<=_k_&_k_<=_(len_R1)_+_(len_R2)_holds_
(Det_(R1_^_R2))_._k_=_((Det_R1)_^_(Det_R2))_._k
let k be Nat; ::_thesis: ( 1 <= k & k <= (len R1) + (len R2) implies (Det (R1 ^ R2)) . k = ((Det R1) ^ (Det R2)) . k )
assume that
A8: 1 <= k and
A9: k <= (len R1) + (len R2) ; ::_thesis: (Det (R1 ^ R2)) . k = ((Det R1) ^ (Det R2)) . k
A10: k in dom ((Det R1) ^ (Det R2)) by A2, A8, A9, FINSEQ_3:25;
now__::_thesis:_((Det_R1)_^_(Det_R2))_._k_=_(Det_(R1_^_R2))_._k
percases ( k in dom (Det R1) or ex n being Nat st
( n in dom (Det R2) & k = (len (Det R1)) + n ) ) by A10, FINSEQ_1:25;
supposeA11: k in dom (Det R1) ; ::_thesis: ((Det R1) ^ (Det R2)) . k = (Det (R1 ^ R2)) . k
then A12: len (R1 . k) = len ((R1 ^ R2) . k) by A5, FINSEQ_1:def_7;
thus ((Det R1) ^ (Det R2)) . k = (Det R1) . k by A11, FINSEQ_1:def_7
.= Det (R1 . k) by A11, Def7
.= Det ((R1 ^ R2) . k) by A5, A11, A12, FINSEQ_1:def_7
.= (Det (R1 ^ R2)) . k by A7, A10, Def7 ; ::_thesis: verum
end;
suppose ex n being Nat st
( n in dom (Det R2) & k = (len (Det R1)) + n ) ; ::_thesis: ((Det R1) ^ (Det R2)) . k = (Det (R1 ^ R2)) . k
then consider n being Nat such that
A13: n in dom (Det R2) and
A14: k = (len R1) + n by A4;
A15: len (R2 . n) = len ((R1 ^ R2) . k) by A3, A13, A14, FINSEQ_1:def_7;
thus ((Det R1) ^ (Det R2)) . k = (Det R2) . n by A4, A13, A14, FINSEQ_1:def_7
.= Det (R2 . n) by A13, Def7
.= Det ((R1 ^ R2) . k) by A3, A13, A14, A15, FINSEQ_1:def_7
.= (Det (R1 ^ R2)) . k by A7, A10, Def7 ; ::_thesis: verum
end;
end;
end;
hence (Det (R1 ^ R2)) . k = ((Det R1) ^ (Det R2)) . k ; ::_thesis: verum
end;
hence Det (R1 ^ R2) = (Det R1) ^ (Det R2) by A6, A1, A2, FINSEQ_1:14; ::_thesis: verum
end;
theorem :: MATRIXJ1:51
for n being Nat
for K being Field
for R being FinSequence_of_Square-Matrix of K holds Det (R | n) = (Det R) | n
proof
let n be Nat; ::_thesis: for K being Field
for R being FinSequence_of_Square-Matrix of K holds Det (R | n) = (Det R) | n
let K be Field; ::_thesis: for R being FinSequence_of_Square-Matrix of K holds Det (R | n) = (Det R) | n
let R be FinSequence_of_Square-Matrix of K; ::_thesis: Det (R | n) = (Det R) | n
A1: len (Det R) = len R by CARD_1:def_7;
percases ( n >= len R or n < len R ) ;
supposeA2: n >= len R ; ::_thesis: Det (R | n) = (Det R) | n
then R | n = R by FINSEQ_1:58;
hence Det (R | n) = (Det R) | n by A1, A2, FINSEQ_1:58; ::_thesis: verum
end;
supposeA3: n < len R ; ::_thesis: Det (R | n) = (Det R) | n
R = (R | n) ^ (R /^ n) by RFINSEQ:8;
then A4: Det R = (Det (R | n)) ^ (Det (R /^ n)) by Th50;
len (R | n) = n by A3, FINSEQ_1:59;
then len (Det (R | n)) = n by CARD_1:def_7;
hence Det (R | n) = (Det R) | n by A4, FINSEQ_5:23; ::_thesis: verum
end;
end;
end;
theorem Th52: :: MATRIXJ1:52
for n, m being Nat
for K being Field
for N being Matrix of n,K
for N1 being Matrix of m,K holds Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
proof
let n, m be Nat; ::_thesis: for K being Field
for N being Matrix of n,K
for N1 being Matrix of m,K holds Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
let K be Field; ::_thesis: for N being Matrix of n,K
for N1 being Matrix of m,K holds Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
let N be Matrix of n,K; ::_thesis: for N1 being Matrix of m,K holds Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
let N1 be Matrix of m,K; ::_thesis: Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
defpred S1[ Nat] means for n, m being Nat
for N being Matrix of n,K
for N1 being Matrix of m,K st n = $1 holds
Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1);
A1: for i being Nat st S1[i] holds
S1[i + 1]
proof
let i be Nat; ::_thesis: ( S1[i] implies S1[i + 1] )
assume A2: S1[i] ; ::_thesis: S1[i + 1]
set i1 = i + 1;
let n, m be Nat; ::_thesis: for N being Matrix of n,K
for N1 being Matrix of m,K st n = i + 1 holds
Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
let N be Matrix of n,K; ::_thesis: for N1 being Matrix of m,K st n = i + 1 holds
Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
let N1 be Matrix of m,K; ::_thesis: ( n = i + 1 implies Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1) )
assume A3: n = i + 1 ; ::_thesis: Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
1 <= (i + m) + 1 by NAT_1:11;
then A4: 1 in Seg (n + m) by A3;
1 <= i + 1 by NAT_1:11;
then A5: 1 in Seg n by A3;
set L0 = (len N1) |-> (0. K);
reconsider nn = n as Element of NAT by ORDINAL1:def_12;
set D = Det N1;
set L1 = LaplaceExpL (N,1);
set NN = <*N,N1*>;
reconsider M = N as Matrix of K ;
set bN = block_diagonal (<*N,N1*>,(0. K));
set L = LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1);
A6: width N = n by MATRIX_1:24;
set Ln = (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n;
A7: len (LaplaceExpL (N,1)) = n by LAPLACE:def_7;
set L9n = (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n;
A8: LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1) = ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n) ^ ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n) by RFINSEQ:8;
A9: len N = n by MATRIX_1:24;
then A10: dom N = Seg n by FINSEQ_1:def_3;
reconsider L1 = LaplaceExpL (N,1) as Element of nn -tuples_on the carrier of K by A7, FINSEQ_2:92;
A11: len N1 = m by MATRIX_1:24;
then A12: len ((len N1) |-> (0. K)) = m by CARD_1:def_7;
A13: Sum (Len <*N,N1*>) = (len N) + (len N1) by Th16;
then A14: len (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) = n + m by A9, A11, LAPLACE:def_7;
then A15: len ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n) = n by FINSEQ_1:59, NAT_1:11;
A16: width (block_diagonal (<*N,N1*>,(0. K))) = Sum (Len <*N,N1*>) by MATRIX_1:24;
A17: now__::_thesis:_for_j_being_Nat_st_1_<=_j_&_j_<=_n_holds_
((LaplaceExpL_((block_diagonal_(<*N,N1*>,(0._K))),1))_|_n)_._j_=_((Det_N1)_*_L1)_._j
A18: i = n -' 1 by A3, NAT_D:34;
let j be Nat; ::_thesis: ( 1 <= j & j <= n implies ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n) . j = ((Det N1) * L1) . j )
assume that
A19: 1 <= j and
A20: j <= n ; ::_thesis: ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n) . j = ((Det N1) * L1) . j
A21: len (Delete (N,1,j)) = n -' 1 by MATRIX_1:def_2;
A22: j in dom ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n) by A15, A19, A20, FINSEQ_3:25;
then j in (dom (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1))) /\ (Seg n) by RELAT_1:61;
then A23: j in dom (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) by XBOOLE_0:def_4;
j in dom L1 by A7, A19, A20, FINSEQ_3:25;
then A24: (N * (1,j)) * (Cofactor (N,1,j)) = L1 . j by LAPLACE:def_7;
A25: ((i + m) + 1) -' 1 = i + m by NAT_D:34;
A26: dom (Line (N,1)) = Seg n by A6, FINSEQ_2:124;
A27: dom ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n) = Seg n by A15, FINSEQ_1:def_3;
A28: dom (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) = Seg (n + m) by A14, FINSEQ_1:def_3;
then A29: Delete ((block_diagonal (<*N,N1*>,(0. K))),1,j) = Deleting ((block_diagonal (<*N,N1*>,(0. K))),1,j) by A13, A9, A11, A4, A23, LAPLACE:def_1
.= block_diagonal ((<*(Deleting (N,1,j))*> ^ <*N1*>),(0. K)) by A5, A10, A22, A27, Th47
.= block_diagonal (<*(Delete (N,1,j)),N1*>,(0. K)) by A5, A22, A27, LAPLACE:def_1 ;
(Minor (N,1,j)) * (Det N1) = Det (block_diagonal (<*(Delete (N,1,j)),N1*>,(0. K))) by A2, A3, NAT_D:34
.= Minor ((block_diagonal (<*N,N1*>,(0. K))),1,j) by A3, A13, A9, A11, A29, A18, A25, A21, Th16 ;
then A30: Cofactor ((block_diagonal (<*N,N1*>,(0. K))),1,j) = (Det N1) * (Cofactor (N,1,j)) by GROUP_1:def_3;
A31: (block_diagonal (<*N,N1*>,(0. K))) * (1,j) = (Line ((block_diagonal (<*M,N1*>,(0. K))),1)) . j by A16, A13, A9, A11, A23, A28, MATRIX_1:def_7
.= ((Line (N,1)) ^ ((width N1) |-> (0. K))) . j by A5, A10, Th23
.= (Line (N,1)) . j by A22, A27, A26, FINSEQ_1:def_7
.= N * (1,j) by A6, A22, A27, MATRIX_1:def_7 ;
thus ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n) . j = (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) . j by A22, FUNCT_1:47
.= (N * (1,j)) * ((Det N1) * (Cofactor (N,1,j))) by A23, A30, A31, LAPLACE:def_7
.= (Det N1) * ((N * (1,j)) * (Cofactor (N,1,j))) by GROUP_1:def_3
.= ((Det N1) * L1) . j by A22, A27, A24, FVSUM_1:51 ; ::_thesis: verum
end;
n <= n + m by NAT_1:11;
then A32: len ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n) = (n + m) - n by A14, RFINSEQ:def_1;
A33: width N1 = m by MATRIX_1:24;
now__::_thesis:_for_i_being_Nat_st_1_<=_i_&_i_<=_m_holds_
((LaplaceExpL_((block_diagonal_(<*N,N1*>,(0._K))),1))_/^_n)_._i_=_((len_N1)_|->_(0._K))_._i
A34: len (Line (N,1)) = n by A6, CARD_1:def_7;
let i be Nat; ::_thesis: ( 1 <= i & i <= m implies ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n) . i = ((len N1) |-> (0. K)) . i )
assume that
A35: 1 <= i and
A36: i <= m ; ::_thesis: ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n) . i = ((len N1) |-> (0. K)) . i
A37: i in Seg m by A35, A36, FINSEQ_1:1;
A38: i in dom ((len N1) |-> (0. K)) by A12, A35, A36, FINSEQ_3:25;
A39: i in dom ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n) by A32, A35, A36, FINSEQ_3:25;
then A40: n + i in dom (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) by FINSEQ_5:26;
dom (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) = Seg (width (block_diagonal (<*N,N1*>,(0. K)))) by A16, A13, A9, A11, A14, FINSEQ_1:def_3;
then A41: (block_diagonal (<*N,N1*>,(0. K))) * (1,(i + n)) = (Line ((block_diagonal (<*M,N1*>,(0. K))),1)) . (i + n) by A40, MATRIX_1:def_7
.= ((Line (N,1)) ^ ((len N1) |-> (0. K))) . (i + n) by A11, A33, A5, A10, Th23
.= ((len N1) |-> (0. K)) . i by A38, A34, FINSEQ_1:def_7
.= 0. K by A11, A37, FINSEQ_2:57 ;
thus ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n) . i = ((LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n) /. i by A39, PARTFUN1:def_6
.= (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /. (i + n) by A39, FINSEQ_5:27
.= (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) . (i + n) by A40, PARTFUN1:def_6
.= ((block_diagonal (<*N,N1*>,(0. K))) * (1,(i + n))) * (Cofactor ((block_diagonal (<*N,N1*>,(0. K))),1,(i + n))) by A40, LAPLACE:def_7
.= 0. K by A41, VECTSP_1:6
.= ((len N1) |-> (0. K)) . i by A11, A37, FINSEQ_2:57 ; ::_thesis: verum
end;
then A42: (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) /^ n = (len N1) |-> (0. K) by A32, A12, FINSEQ_1:14;
len ((Det N1) * L1) = nn by A7, MATRIXR1:16;
then (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) | n = (Det N1) * L1 by A15, A17, FINSEQ_1:14;
then Sum (LaplaceExpL ((block_diagonal (<*N,N1*>,(0. K))),1)) = (Sum ((Det N1) * L1)) + (Sum ((len N1) |-> (0. K))) by A42, A8, RLVECT_1:41
.= (Sum ((Det N1) * L1)) + (Sum ((len N1) |-> ((0. K) * (0. K)))) by VECTSP_1:6
.= (Sum ((Det N1) * L1)) + (Sum ((0. K) * ((len N1) |-> (0. K)))) by FVSUM_1:53
.= ((Det N1) * (Sum L1)) + (Sum ((0. K) * ((len N1) |-> (0. K)))) by FVSUM_1:73
.= ((Det N1) * (Sum L1)) + ((0. K) * (Sum ((len N1) |-> (0. K)))) by FVSUM_1:73
.= ((Det N1) * (Sum L1)) + (0. K) by VECTSP_1:6
.= (Det N1) * (Sum L1) by RLVECT_1:def_4
.= (Det N1) * (Det N) by A5, LAPLACE:25 ;
hence Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1) by A13, A9, A11, A4, LAPLACE:25; ::_thesis: verum
end;
A43: S1[ 0 ]
proof
let n, m be Nat; ::_thesis: for N being Matrix of n,K
for N1 being Matrix of m,K st n = 0 holds
Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
let N be Matrix of n,K; ::_thesis: for N1 being Matrix of m,K st n = 0 holds
Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
let N1 be Matrix of m,K; ::_thesis: ( n = 0 implies Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1) )
assume A44: n = 0 ; ::_thesis: Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1)
A45: len N = n by MATRIX_1:def_2;
then N = {} by A44;
then A46: block_diagonal (<*N,N1*>,(0. K)) = block_diagonal (<*N1*>,(0. K)) by Th40
.= N1 by Th34 ;
len N1 = m by MATRIX_1:def_2;
then Sum (Len <*N,N1*>) = 0 + m by A44, A45, Th16;
hence Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N1) * (1_ K) by A46, VECTSP_1:def_6
.= (Det N) * (Det N1) by A44, MATRIXR2:41 ;
::_thesis: verum
end;
for i being Nat holds S1[i] from NAT_1:sch_2(A43, A1);
hence Det (block_diagonal (<*N,N1*>,(0. K))) = (Det N) * (Det N1) ; ::_thesis: verum
end;
theorem :: MATRIXJ1:53
for K being Field
for R being FinSequence_of_Square-Matrix of K holds Det (block_diagonal (R,(0. K))) = Product (Det R)
proof
let K be Field; ::_thesis: for R being FinSequence_of_Square-Matrix of K holds Det (block_diagonal (R,(0. K))) = Product (Det R)
let R be FinSequence_of_Square-Matrix of K; ::_thesis: Det (block_diagonal (R,(0. K))) = Product (Det R)
defpred S1[ Nat] means for R being FinSequence_of_Square-Matrix of K st len R = $1 holds
Det (block_diagonal (R,(0. K))) = Product (Det R);
A1: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] )
assume A2: S1[n] ; ::_thesis: S1[n + 1]
set n1 = n + 1;
let R be FinSequence_of_Square-Matrix of K; ::_thesis: ( len R = n + 1 implies Det (block_diagonal (R,(0. K))) = Product (Det R) )
assume A3: len R = n + 1 ; ::_thesis: Det (block_diagonal (R,(0. K))) = Product (Det R)
set Rn = R | n;
A4: len (R | n) = n by A3, FINSEQ_1:59, NAT_1:11;
set R1 = R . (n + 1);
set bR = block_diagonal ((R | n),(0. K));
A5: R = (R | n) ^ <*(R . (n + 1))*> by A3, FINSEQ_3:55;
then A6: block_diagonal (R,(0. K)) = block_diagonal (<*(block_diagonal ((R | n),(0. K))),(R . (n + 1))*>,(0. K)) by Th35;
Sum (Len <*(block_diagonal ((R | n),(0. K))),(R . (n + 1))*>) = (len (block_diagonal ((R | n),(0. K)))) + (len (R . (n + 1))) by Th16
.= (Sum (Len (R | n))) + (len (R . (n + 1))) by Def5
.= Sum ((Len (R | n)) ^ <*(len (R . (n + 1)))*>) by RVSUM_1:74
.= Sum ((Len (R | n)) ^ (Len <*(R . (n + 1))*>)) by Th15
.= Sum (Len R) by A5, Th14 ;
hence Det (block_diagonal (R,(0. K))) = (Det (block_diagonal ((R | n),(0. K)))) * (Det (R . (n + 1))) by A6, Th52
.= (Product (Det (R | n))) * (Det (R . (n + 1))) by A2, A4
.= Product ((Det (R | n)) ^ <*(Det (R . (n + 1)))*>) by GROUP_4:6
.= Product ((Det (R | n)) ^ (Det <*(R . (n + 1))*>)) by Th49
.= Product (Det R) by A5, Th50 ;
::_thesis: verum
end;
A7: S1[ 0 ]
proof
let R be FinSequence_of_Square-Matrix of K; ::_thesis: ( len R = 0 implies Det (block_diagonal (R,(0. K))) = Product (Det R) )
assume A8: len R = 0 ; ::_thesis: Det (block_diagonal (R,(0. K))) = Product (Det R)
Len R = {} by A8;
hence Det (block_diagonal (R,(0. K))) = 1_ K by MATRIXR2:41, RVSUM_1:72
.= Product (Det R) by A8, FVSUM_1:80 ;
::_thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch_2(A7, A1);
hence Det (block_diagonal (R,(0. K))) = Product (Det R) ; ::_thesis: verum
end;
theorem Th54: :: MATRIXJ1:54
for n being Nat
for K being Field
for A1, A2 being Matrix of K
for N being Matrix of n,K st len A1 <> width A1 & N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
proof
let n be Nat; ::_thesis: for K being Field
for A1, A2 being Matrix of K
for N being Matrix of n,K st len A1 <> width A1 & N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
let K be Field; ::_thesis: for A1, A2 being Matrix of K
for N being Matrix of n,K st len A1 <> width A1 & N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
let A1, A2 be Matrix of K; ::_thesis: for N being Matrix of n,K st len A1 <> width A1 & N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
let N be Matrix of n,K; ::_thesis: ( len A1 <> width A1 & N = block_diagonal (<*A1,A2*>,(0. K)) implies Det N = 0. K )
defpred S1[ Nat] means for A1 being Matrix of K st len A1 <> width A1 & width A1 = $1 holds
for n being Nat
for N being Matrix of n,K st N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K;
A1: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; ::_thesis: ( S1[k] implies S1[k + 1] )
assume A2: S1[k] ; ::_thesis: S1[k + 1]
set k1 = k + 1;
let A1 be Matrix of K; ::_thesis: ( len A1 <> width A1 & width A1 = k + 1 implies for n being Nat
for N being Matrix of n,K st N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K )
assume that
A3: len A1 <> width A1 and
A4: width A1 = k + 1 ; ::_thesis: for n being Nat
for N being Matrix of n,K st N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
A5: Sum (Len <*A1,A2*>) = (len A1) + (len A2) by Th16;
1 <= k + 1 by NAT_1:14;
then A6: 1 in Seg (width A1) by A4;
A7: len (A1 ^ A2) = (len A1) + (len A2) by FINSEQ_1:22;
A8: Sum (Width <*A1,A2*>) = (width A1) + (width A2) by Th20;
let n be Nat; ::_thesis: for N being Matrix of n,K st N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
let N be Matrix of n,K; ::_thesis: ( N = block_diagonal (<*A1,A2*>,(0. K)) implies Det N = 0. K )
assume A9: N = block_diagonal (<*A1,A2*>,(0. K)) ; ::_thesis: Det N = 0. K
A10: len N = Sum (Len <*A1,A2*>) by A9, Def5;
set C = LaplaceExpC (N,1);
A11: n = len N by MATRIX_1:24;
then A12: len (LaplaceExpC (N,1)) = len N by LAPLACE:def_8;
A13: len A1 <> 0 by A3, MATRIX_1:def_3;
then A14: 1 + 0 <= len N by A10, A5, NAT_1:14;
then A15: 1 in Seg n by A11;
A16: width N = Sum (Width <*A1,A2*>) by A9, Def5;
set L0 = (len N) |-> (0. K);
A17: n = width N by MATRIX_1:24;
A18: len A1 >= 1 by A13, NAT_1:14;
A19: now__::_thesis:_for_i_being_Nat_st_1_<=_i_&_i_<=_len_N_holds_
(LaplaceExpC_(N,1))_._i_=_((len_N)_|->_(0._K))_._i
let i be Nat; ::_thesis: ( 1 <= i & i <= len N implies (LaplaceExpC (N,1)) . i = ((len N) |-> (0. K)) . i )
assume that
A20: 1 <= i and
A21: i <= len N ; ::_thesis: (LaplaceExpC (N,1)) . i = ((len N) |-> (0. K)) . i
A22: i in Seg n by A11, A20, A21, FINSEQ_1:1;
i in dom (LaplaceExpC (N,1)) by A12, A20, A21, FINSEQ_3:25;
then A23: (LaplaceExpC (N,1)) . i = (N * (i,1)) * (Cofactor (N,i,1)) by LAPLACE:def_8;
A24: N * (i,1) = (Line (N,i)) . 1 by A17, A15, MATRIX_1:def_7;
A25: i in dom (A1 ^ A2) by A10, A5, A7, A20, A21, FINSEQ_3:25;
now__::_thesis:_0._K_=_(LaplaceExpC_(N,1))_._i
percases ( i in dom A1 or ex j being Nat st
( j in dom A2 & i = (len A1) + j ) ) by A25, FINSEQ_1:25;
supposeA26: i in dom A1 ; ::_thesis: 0. K = (LaplaceExpC (N,1)) . i
now__::_thesis:_Det_(Delete_(N,i,1))_=_0._K
percases ( len A1 = 1 or len A1 > 1 ) by A18, XXREAL_0:1;
supposeA27: len A1 = 1 ; ::_thesis: Det (Delete (N,i,1)) = 0. K
then k <> 0 by A3, A4;
then k in Seg k by FINSEQ_1:3;
then A28: 1 <= k by FINSEQ_1:1;
then 1 + 1 <= k + 1 by XREAL_1:7;
then A29: 2 in Seg (k + 1) ;
A30: 1 <= i by A26, FINSEQ_3:25;
i <= 1 by A26, A27, FINSEQ_3:25;
then A31: i = 1 by A30, XXREAL_0:1;
set Q = (Seg n) \ {1};
Seg 1 c= Seg n by A11, A14, FINSEQ_1:5;
then A32: card ((Seg n) \ {1}) = (card (Seg n)) - (card (Seg 1)) by CARD_2:44, FINSEQ_1:2
.= (card (Seg n)) - 1 by FINSEQ_1:57
.= n - 1 by FINSEQ_1:57
.= k + (width A2) by A4, A17, A16, A8 ;
then A33: card ((Seg n) \ {1}) = ((k + (width A2)) + 1) -' 1 by NAT_D:34
.= n -' 1 by A4, A9, A17, A8, Def5 ;
1 + 0 <= card ((Seg n) \ {1}) by A32, A28, XREAL_1:7;
then A34: 1 in Seg (card ((Seg n) \ {1})) ;
Delete (N,i,1) = Deleting (N,i,1) by A15, A22, LAPLACE:def_1
.= Segm (N,((Seg n) \ {1}),((Seg n) \ {1})) by A31, MATRIX13:58 ;
then A35: Col ((Delete (N,i,1)),1) = (Col (N,((Sgm ((Seg n) \ {1})) . 1))) * (Sgm ((Seg n) \ {1})) by A11, A34, MATRIX13:49, XBOOLE_1:36;
now__::_thesis:_for_j_being_Element_of_NAT_st_j_in_Seg_(n_-'_1)_holds_
(Col_((Delete_(N,i,1)),1))_._j_=_0._K
A36: dom ((len A2) |-> (0. K)) = Seg (len A2) by FINSEQ_2:124;
A37: n = 1 + (card ((Seg n) \ {1})) by A4, A9, A17, A8, A32, Def5;
A38: len (Col (A1,2)) = 1 by A27, CARD_1:def_7;
let j be Element of NAT ; ::_thesis: ( j in Seg (n -' 1) implies (Col ((Delete (N,i,1)),1)) . j = 0. K )
assume A39: j in Seg (n -' 1) ; ::_thesis: (Col ((Delete (N,i,1)),1)) . j = 0. K
dom (Sgm ((Seg n) \ {1})) = Seg (card ((Seg n) \ {1})) by FINSEQ_3:40, XBOOLE_1:36;
hence (Col ((Delete (N,i,1)),1)) . j = (Col (N,((Sgm ((Seg n) \ {1})) . 1))) . ((Sgm ((Seg n) \ {1})) . j) by A33, A35, A39, FUNCT_1:13
.= (Col (N,(1 + 1))) . ((Sgm ((Seg n) \ {1})) . j) by A34, A37, FINSEQ_1:2, MATRIX15:8
.= (Col (N,(1 + 1))) . (j + 1) by A33, A39, A37, FINSEQ_1:2, MATRIX15:8
.= ((Col (A1,2)) ^ ((len A2) |-> (0. K))) . (j + 1) by A4, A9, A29, Th24
.= ((len A2) |-> (0. K)) . j by A4, A10, A11, A17, A16, A5, A8, A27, A32, A33, A39, A38, A36, FINSEQ_1:def_7
.= 0. K by A4, A10, A11, A17, A16, A5, A8, A27, A32, A33, A39, FINSEQ_2:57 ;
::_thesis: verum
end;
hence Det (Delete (N,i,1)) = 0. K by A33, A34, MATRIX_9:53; ::_thesis: verum
end;
supposeA40: len A1 > 1 ; ::_thesis: 0. K = Det (Delete (N,i,1))
set DL = DelLine (A1,i);
set DC = DelCol ((DelLine (A1,i)),1);
A41: (k + 1) -' 1 = k by NAT_D:34;
reconsider L1 = (len A1) - 1 as Element of NAT by A40, NAT_1:21;
A42: len (DelCol ((DelLine (A1,i)),1)) = len (DelLine (A1,i)) by MATRIX_2:def_5;
A43: width A1 = width (DelLine (A1,i)) by A40, LAPLACE:4;
then A44: width (DelCol ((DelLine (A1,i)),1)) = (width A1) -' 1 by A6, LAPLACE:3;
A45: Delete (N,i,1) = Deleting (N,i,1) by A15, A22, LAPLACE:def_1
.= DelCol ((DelLine (N,i)),1) by MATRIX_2:def_6
.= DelCol ((block_diagonal ((<*(DelLine (A1,i))*> ^ <*A2*>),(0. K))),1) by A9, A26, A43, Th41
.= block_diagonal (<*(DelCol ((DelLine (A1,i)),1)),A2*>,(0. K)) by A6, A43, Th43 ;
len A1 = L1 + 1 ;
then len (DelCol ((DelLine (A1,i)),1)) <> width (DelCol ((DelLine (A1,i)),1)) by A3, A4, A26, A44, A42, A41, FINSEQ_3:109;
hence 0. K = Det (Delete (N,i,1)) by A2, A4, A44, A45, NAT_D:34; ::_thesis: verum
end;
end;
end;
then 0. K = Cofactor (N,i,1) by VECTSP_1:6;
hence 0. K = (LaplaceExpC (N,1)) . i by A23, VECTSP_1:6; ::_thesis: verum
end;
supposeA46: ex j being Nat st
( j in dom A2 & i = (len A1) + j ) ; ::_thesis: 0. K = (LaplaceExpC (N,1)) . i
A47: dom ((width A1) |-> (0. K)) = Seg (width A1) by FINSEQ_2:124;
consider j being Nat such that
A48: j in dom A2 and
A49: i = (len A1) + j by A46;
N * (i,1) = (((width A1) |-> (0. K)) ^ (Line (A2,j))) . 1 by A9, A24, A48, A49, Th23
.= ((width A1) |-> (0. K)) . 1 by A6, A47, FINSEQ_1:def_7
.= 0. K by A6, FINSEQ_2:57 ;
hence 0. K = (LaplaceExpC (N,1)) . i by A23, VECTSP_1:6; ::_thesis: verum
end;
end;
end;
hence (LaplaceExpC (N,1)) . i = ((len N) |-> (0. K)) . i by A11, A22, FINSEQ_2:57; ::_thesis: verum
end;
len ((len N) |-> (0. K)) = len N by CARD_1:def_7;
then LaplaceExpC (N,1) = (len N) |-> (0. K) by A12, A19, FINSEQ_1:14;
then LaplaceExpC (N,1) = (len N) |-> ((0. K) * (0. K)) by VECTSP_1:7;
then Sum (LaplaceExpC (N,1)) = Sum ((0. K) * ((len N) |-> (0. K))) by FVSUM_1:53
.= (0. K) * (Sum ((len N) |-> (0. K))) by FVSUM_1:73
.= 0. K by VECTSP_1:6 ;
hence Det N = 0. K by A15, LAPLACE:27; ::_thesis: verum
end;
A50: S1[ 0 ]
proof
let A1 be Matrix of K; ::_thesis: ( len A1 <> width A1 & width A1 = 0 implies for n being Nat
for N being Matrix of n,K st N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K )
assume that
A51: len A1 <> width A1 and
A52: width A1 = 0 ; ::_thesis: for n being Nat
for N being Matrix of n,K st N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
A53: len A1 in Seg (len A1) by A51, A52, FINSEQ_1:3;
A54: Sum (Width <*A1,A2*>) = (width A1) + (width A2) by Th20;
A55: Sum (Len <*A1,A2*>) = (len A1) + (len A2) by Th16;
A56: len A1 <= (len A1) + (len A2) by NAT_1:11;
let n be Nat; ::_thesis: for N being Matrix of n,K st N = block_diagonal (<*A1,A2*>,(0. K)) holds
Det N = 0. K
let N be Matrix of n,K; ::_thesis: ( N = block_diagonal (<*A1,A2*>,(0. K)) implies Det N = 0. K )
assume A57: N = block_diagonal (<*A1,A2*>,(0. K)) ; ::_thesis: Det N = 0. K
A58: width N = Sum (Width <*A1,A2*>) by A57, Def5;
len N = Sum (Len <*A1,A2*>) by A57, Def5;
then A59: Seg (len A1) c= Seg (len N) by A55, A56, FINSEQ_1:5;
A60: n = len N by MATRIX_1:def_2;
dom A1 = Seg (len A1) by FINSEQ_1:def_3;
then Line (N,(len A1)) = (Line (A1,(len A1))) ^ ((width A2) |-> (0. K)) by A57, A53, Th23
.= (<*> the carrier of K) ^ ((width A2) |-> (0. K)) by A52
.= (width A2) |-> (0. K) by FINSEQ_1:34
.= (0. K) * (Line (N,(len A1))) by A52, A58, A54, FVSUM_1:58 ;
hence Det N = Det (RLine (N,(len A1),((0. K) * (Line (N,(len A1)))))) by MATRIX11:30
.= (0. K) * (Det N) by A60, A53, A59, MATRIX11:35
.= 0. K by VECTSP_1:6 ;
::_thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch_2(A50, A1);
hence ( len A1 <> width A1 & N = block_diagonal (<*A1,A2*>,(0. K)) implies Det N = 0. K ) ; ::_thesis: verum
end;
theorem :: MATRIXJ1:55
for n being Nat
for K being Field
for G being FinSequence_of_Matrix of K st Len G <> Width G holds
for M being Matrix of n,K st M = block_diagonal (G,(0. K)) holds
Det M = 0. K
proof
let n be Nat; ::_thesis: for K being Field
for G being FinSequence_of_Matrix of K st Len G <> Width G holds
for M being Matrix of n,K st M = block_diagonal (G,(0. K)) holds
Det M = 0. K
let K be Field; ::_thesis: for G being FinSequence_of_Matrix of K st Len G <> Width G holds
for M being Matrix of n,K st M = block_diagonal (G,(0. K)) holds
Det M = 0. K
let G be FinSequence_of_Matrix of K; ::_thesis: ( Len G <> Width G implies for M being Matrix of n,K st M = block_diagonal (G,(0. K)) holds
Det M = 0. K )
set B = block_diagonal (G,(0. K));
defpred S1[ Nat] means ( $1 in Seg (len G) & (Len G) . $1 <> (Width G) . $1 );
A1: Seg (len G) = dom G by FINSEQ_1:def_3;
assume Len G <> Width G ; ::_thesis: for M being Matrix of n,K st M = block_diagonal (G,(0. K)) holds
Det M = 0. K
then A2: ex k being Nat st S1[k] by FINSEQ_2:119;
consider k being Nat such that
A3: S1[k] and
A4: for n being Nat st S1[n] holds
k <= n from NAT_1:sch_5(A2);
1 <= k by A3, FINSEQ_1:1;
then reconsider k1 = k - 1 as Element of NAT by NAT_1:21;
set Gk = G | k1;
A5: len G = len (Width G) by CARD_1:def_7;
then k in dom (Width G) by A3, FINSEQ_1:def_3;
then A6: width (G . k) = (Width G) . k by Def4;
set bGk = block_diagonal ((G | k1),(0. K));
set bGk1 = block_diagonal ((G /^ k),(0. K));
set bGG = block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K));
k1 + 1 <= len G by A3, FINSEQ_1:1;
then A7: k1 < len G by NAT_1:13;
then len ((Width G) | k1) = k1 by A5, FINSEQ_1:59;
then A8: dom ((Width G) | k1) = Seg k1 by FINSEQ_1:def_3;
A9: len G = len (Len G) by CARD_1:def_7;
then len ((Len G) | k1) = k1 by A7, FINSEQ_1:59;
then A10: dom ((Len G) | k1) = Seg k1 by FINSEQ_1:def_3;
A11: Seg k1 c= Seg (len G) by A7, FINSEQ_1:5;
A12: now__::_thesis:_for_j_being_Nat_st_j_in_Seg_k1_holds_
(Len_(G_|_k1))_._j_=_(Width_(G_|_k1))_._j
let j be Nat; ::_thesis: ( j in Seg k1 implies (Len (G | k1)) . j = (Width (G | k1)) . j )
assume A13: j in Seg k1 ; ::_thesis: (Len (G | k1)) . j = (Width (G | k1)) . j
j <= k1 by A13, FINSEQ_1:1;
then j < k1 + 1 by NAT_1:13;
then A14: (Len G) . j = (Width G) . j by A4, A11, A13;
thus (Len (G | k1)) . j = ((Len G) | k1) . j by Th17
.= (Len G) . j by A10, A13, FUNCT_1:47
.= ((Width G) | k1) . j by A8, A13, A14, FUNCT_1:47
.= (Width (G | k1)) . j by Th21 ; ::_thesis: verum
end;
len (G | k1) = k1 by A7, FINSEQ_1:59;
then reconsider bGk = block_diagonal ((G | k1),(0. K)) as Matrix of Sum (Len (G | k1)),K by A12, FINSEQ_2:119;
let M be Matrix of n,K; ::_thesis: ( M = block_diagonal (G,(0. K)) implies Det M = 0. K )
assume M = block_diagonal (G,(0. K)) ; ::_thesis: Det M = 0. K
then A15: M = block_diagonal (((G | (k1 + 1)) ^ (G /^ k)),(0. K)) by RFINSEQ:8
.= block_diagonal ((((G | k1) ^ <*(G . k)*>) ^ (G /^ k)),(0. K)) by A3, A1, FINSEQ_5:10
.= block_diagonal (((G | k1) ^ (<*(G . k)*> ^ (G /^ k))),(0. K)) by FINSEQ_1:32
.= block_diagonal ((<*bGk*> ^ (<*(G . k)*> ^ (G /^ k))),(0. K)) by Th35
.= block_diagonal ((<*bGk*> ^ <*(block_diagonal ((<*(G . k)*> ^ (G /^ k)),(0. K)))*>),(0. K)) by Th36
.= block_diagonal (<*bGk,(block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)))*>,(0. K)) by Th36 ;
then A16: len M = Sum (Len <*bGk,(block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)))*>) by Def5;
A17: Sum (Width <*bGk,(block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)))*>) = (width bGk) + (width (block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)))) by Th20;
A18: width bGk = Sum (Len (G | k1)) by MATRIX_1:24;
A19: len bGk = Sum (Len (G | k1)) by Def5;
A20: width M = n by MATRIX_1:24;
A21: Sum (Len <*bGk,(block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)))*>) = (len bGk) + (len (block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)))) by Th16;
A22: len M = n by MATRIX_1:24;
width M = Sum (Width <*bGk,(block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)))*>) by A15, Def5;
then reconsider bGG9 = block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K)) as Matrix of len (block_diagonal (<*(G . k),(block_diagonal ((G /^ k),(0. K)))*>,(0. K))),K by A16, A22, A20, A21, A19, A18, A17, MATRIX_2:7;
k in dom (Len G) by A3, A9, FINSEQ_1:def_3;
then len (G . k) = (Len G) . k by Def3;
then Det bGG9 = 0. K by A3, A6, Th54;
hence Det M = (Det bGk) * (0. K) by A15, A16, A22, Th52
.= 0. K by VECTSP_1:6 ;
::_thesis: verum
end;
begin
definition
let K be Field;
let f be FinSequence of NAT ;
func 1. (K,f) -> FinSequence_of_Square-Matrix of K means :Def8: :: MATRIXJ1:def 8
( dom it = dom f & ( for i being Nat st i in dom it holds
it . i = 1. (K,(f . i)) ) );
existence
ex b1 being FinSequence_of_Square-Matrix of K st
( dom b1 = dom f & ( for i being Nat st i in dom b1 holds
b1 . i = 1. (K,(f . i)) ) )
proof
deffunc H1( Nat) -> Matrix of f . $1,f . $1, the carrier of K = 1. (K,(f . $1));
consider IT being FinSequence such that
A1: len IT = len f and
A2: for k being Nat st k in dom IT holds
IT . k = H1(k) from FINSEQ_1:sch_2();
rng IT c= ( the carrier of K *) *
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in rng IT or y in ( the carrier of K *) * )
assume y in rng IT ; ::_thesis: y in ( the carrier of K *) *
then consider x being set such that
A3: x in dom IT and
A4: IT . x = y by FUNCT_1:def_3;
reconsider x = x as Nat by A3;
IT . x = 1. (K,(f . x)) by A2, A3;
hence y in ( the carrier of K *) * by A4, FINSEQ_1:def_11; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence of ( the carrier of K *) * by FINSEQ_1:def_4;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_IT_holds_
IT_._i_is_Matrix_of_K
let i be Nat; ::_thesis: ( i in dom IT implies IT . i is Matrix of K )
assume i in dom IT ; ::_thesis: IT . i is Matrix of K
then IT . i = 1. (K,(f . i)) by A2;
hence IT . i is Matrix of K ; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence_of_Matrix of K by Def2;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_IT_holds_
ex_n_being_Nat_st_IT_._i_is_Matrix_of_n,K
let i be Nat; ::_thesis: ( i in dom IT implies ex n being Nat st IT . i is Matrix of n,K )
assume i in dom IT ; ::_thesis: ex n being Nat st IT . i is Matrix of n,K
then IT . i = 1. (K,(f . i)) by A2;
hence ex n being Nat st IT . i is Matrix of n,K ; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence_of_Square-Matrix of K by Def6;
take IT ; ::_thesis: ( dom IT = dom f & ( for i being Nat st i in dom IT holds
IT . i = 1. (K,(f . i)) ) )
thus ( dom IT = dom f & ( for i being Nat st i in dom IT holds
IT . i = 1. (K,(f . i)) ) ) by A1, A2, FINSEQ_3:29; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence_of_Square-Matrix of K st dom b1 = dom f & ( for i being Nat st i in dom b1 holds
b1 . i = 1. (K,(f . i)) ) & dom b2 = dom f & ( for i being Nat st i in dom b2 holds
b2 . i = 1. (K,(f . i)) ) holds
b1 = b2
proof
let T1, T2 be FinSequence_of_Square-Matrix of K; ::_thesis: ( dom T1 = dom f & ( for i being Nat st i in dom T1 holds
T1 . i = 1. (K,(f . i)) ) & dom T2 = dom f & ( for i being Nat st i in dom T2 holds
T2 . i = 1. (K,(f . i)) ) implies T1 = T2 )
assume that
A5: dom T1 = dom f and
A6: for i being Nat st i in dom T1 holds
T1 . i = 1. (K,(f . i)) and
A7: dom T2 = dom f and
A8: for i being Nat st i in dom T2 holds
T2 . i = 1. (K,(f . i)) ; ::_thesis: T1 = T2
now__::_thesis:_for_i_being_Nat_st_i_in_dom_f_holds_
T1_._i_=_T2_._i
let i be Nat; ::_thesis: ( i in dom f implies T1 . i = T2 . i )
assume A9: i in dom f ; ::_thesis: T1 . i = T2 . i
thus T1 . i = 1. (K,(f . i)) by A5, A6, A9
.= T2 . i by A7, A8, A9 ; ::_thesis: verum
end;
hence T1 = T2 by A5, A7, FINSEQ_1:13; ::_thesis: verum
end;
end;
:: deftheorem Def8 defines 1. MATRIXJ1:def_8_:_
for K being Field
for f being FinSequence of NAT
for b3 being FinSequence_of_Square-Matrix of K holds
( b3 = 1. (K,f) iff ( dom b3 = dom f & ( for i being Nat st i in dom b3 holds
b3 . i = 1. (K,(f . i)) ) ) );
theorem :: MATRIXJ1:56
for K being Field
for f being FinSequence of NAT holds
( Len (1. (K,f)) = f & Width (1. (K,f)) = f )
proof
let K be Field; ::_thesis: for f being FinSequence of NAT holds
( Len (1. (K,f)) = f & Width (1. (K,f)) = f )
let f be FinSequence of NAT ; ::_thesis: ( Len (1. (K,f)) = f & Width (1. (K,f)) = f )
set ONE = 1. (K,f);
A1: dom (1. (K,f)) = dom f by Def8;
A2: dom (Len (1. (K,f))) = dom (1. (K,f)) by Def3;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Len_(1._(K,f)))_holds_
(Len_(1._(K,f)))_._i_=_f_._i
let i be Nat; ::_thesis: ( i in dom (Len (1. (K,f))) implies (Len (1. (K,f))) . i = f . i )
assume A3: i in dom (Len (1. (K,f))) ; ::_thesis: (Len (1. (K,f))) . i = f . i
thus (Len (1. (K,f))) . i = len ((1. (K,f)) . i) by A3, Def3
.= len (1. (K,(f . i))) by A2, A3, Def8
.= f . i by MATRIX_1:24 ; ::_thesis: verum
end;
hence Len (1. (K,f)) = f by A2, A1, FINSEQ_1:13; ::_thesis: Width (1. (K,f)) = f
A4: dom (Width (1. (K,f))) = dom (1. (K,f)) by Def4;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Width_(1._(K,f)))_holds_
(Width_(1._(K,f)))_._i_=_f_._i
let i be Nat; ::_thesis: ( i in dom (Width (1. (K,f))) implies (Width (1. (K,f))) . i = f . i )
assume A5: i in dom (Width (1. (K,f))) ; ::_thesis: (Width (1. (K,f))) . i = f . i
thus (Width (1. (K,f))) . i = width ((1. (K,f)) . i) by A5, Def4
.= width (1. (K,(f . i))) by A4, A5, Def8
.= f . i by MATRIX_1:24 ; ::_thesis: verum
end;
hence Width (1. (K,f)) = f by A4, A1, FINSEQ_1:13; ::_thesis: verum
end;
theorem Th57: :: MATRIXJ1:57
for K being Field
for i being Element of NAT holds 1. (K,<*i*>) = <*(1. (K,i))*>
proof
let K be Field; ::_thesis: for i being Element of NAT holds 1. (K,<*i*>) = <*(1. (K,i))*>
let i be Element of NAT ; ::_thesis: 1. (K,<*i*>) = <*(1. (K,i))*>
A1: dom (1. (K,<*i*>)) = dom <*i*> by Def8
.= Seg 1 by FINSEQ_1:38 ;
then 1 in dom (1. (K,<*i*>)) ;
then A2: (1. (K,<*i*>)) . 1 = 1. (K,(<*i*> . 1)) by Def8
.= 1. (K,i) by FINSEQ_1:40 ;
len (1. (K,<*i*>)) = 1 by A1, FINSEQ_1:def_3;
hence 1. (K,<*i*>) = <*(1. (K,i))*> by A2, FINSEQ_1:40; ::_thesis: verum
end;
theorem Th58: :: MATRIXJ1:58
for K being Field
for f, g being FinSequence of NAT holds 1. (K,(f ^ g)) = (1. (K,f)) ^ (1. (K,g))
proof
let K be Field; ::_thesis: for f, g being FinSequence of NAT holds 1. (K,(f ^ g)) = (1. (K,f)) ^ (1. (K,g))
let f, g be FinSequence of NAT ; ::_thesis: 1. (K,(f ^ g)) = (1. (K,f)) ^ (1. (K,g))
set F = 1. (K,f);
set G = 1. (K,g);
set FG = (1. (K,f)) ^ (1. (K,g));
set ONE = 1. (K,(f ^ g));
A1: len (f ^ g) = (len f) + (len g) by FINSEQ_1:22;
A2: dom (1. (K,(f ^ g))) = dom (f ^ g) by Def8;
A3: dom (1. (K,g)) = dom g by Def8;
then A4: len (1. (K,g)) = len g by FINSEQ_3:29;
A5: dom (1. (K,f)) = dom f by Def8;
then A6: len (1. (K,f)) = len f by FINSEQ_3:29;
A7: len ((1. (K,f)) ^ (1. (K,g))) = (len (1. (K,f))) + (len (1. (K,g))) by FINSEQ_1:22;
A8: now__::_thesis:_for_i_being_Nat_st_1_<=_i_&_i_<=_len_((1._(K,f))_^_(1._(K,g)))_holds_
(1._(K,(f_^_g)))_._i_=_((1._(K,f))_^_(1._(K,g)))_._i
let i be Nat; ::_thesis: ( 1 <= i & i <= len ((1. (K,f)) ^ (1. (K,g))) implies (1. (K,(f ^ g))) . i = ((1. (K,f)) ^ (1. (K,g))) . i )
assume that
A9: 1 <= i and
A10: i <= len ((1. (K,f)) ^ (1. (K,g))) ; ::_thesis: (1. (K,(f ^ g))) . i = ((1. (K,f)) ^ (1. (K,g))) . i
i in dom (1. (K,(f ^ g))) by A2, A6, A4, A7, A1, A9, A10, FINSEQ_3:25;
then A11: (1. (K,(f ^ g))) . i = 1. (K,((f ^ g) . i)) by Def8;
A12: i in dom ((1. (K,f)) ^ (1. (K,g))) by A9, A10, FINSEQ_3:25;
now__::_thesis:_(1._(K,(f_^_g)))_._i_=_((1._(K,f))_^_(1._(K,g)))_._i
percases ( i in dom (1. (K,f)) or ex n being Nat st
( n in dom (1. (K,g)) & i = (len (1. (K,f))) + n ) ) by A12, FINSEQ_1:25;
supposeA13: i in dom (1. (K,f)) ; ::_thesis: (1. (K,(f ^ g))) . i = ((1. (K,f)) ^ (1. (K,g))) . i
hence (1. (K,(f ^ g))) . i = 1. (K,(f . i)) by A5, A11, FINSEQ_1:def_7
.= (1. (K,f)) . i by A13, Def8
.= ((1. (K,f)) ^ (1. (K,g))) . i by A13, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom (1. (K,g)) & i = (len (1. (K,f))) + n ) ; ::_thesis: (1. (K,(f ^ g))) . i = ((1. (K,f)) ^ (1. (K,g))) . i
then consider n being Nat such that
A14: n in dom (1. (K,g)) and
A15: i = (len (1. (K,f))) + n ;
thus (1. (K,(f ^ g))) . i = 1. (K,(g . n)) by A3, A6, A11, A14, A15, FINSEQ_1:def_7
.= (1. (K,g)) . n by A14, Def8
.= ((1. (K,f)) ^ (1. (K,g))) . i by A14, A15, FINSEQ_1:def_7 ; ::_thesis: verum
end;
end;
end;
hence (1. (K,(f ^ g))) . i = ((1. (K,f)) ^ (1. (K,g))) . i ; ::_thesis: verum
end;
len (1. (K,(f ^ g))) = len (f ^ g) by A2, FINSEQ_3:29;
hence 1. (K,(f ^ g)) = (1. (K,f)) ^ (1. (K,g)) by A6, A4, A1, A8, FINSEQ_1:14, FINSEQ_1:22; ::_thesis: verum
end;
theorem :: MATRIXJ1:59
for n being Nat
for K being Field
for f being FinSequence of NAT holds 1. (K,(f | n)) = (1. (K,f)) | n
proof
let n be Nat; ::_thesis: for K being Field
for f being FinSequence of NAT holds 1. (K,(f | n)) = (1. (K,f)) | n
let K be Field; ::_thesis: for f being FinSequence of NAT holds 1. (K,(f | n)) = (1. (K,f)) | n
let f be FinSequence of NAT ; ::_thesis: 1. (K,(f | n)) = (1. (K,f)) | n
dom (1. (K,(f | n))) = dom (f | n) by Def8;
then A1: len (1. (K,(f | n))) = len (f | n) by FINSEQ_3:29;
dom (1. (K,f)) = dom f by Def8;
then A2: len (1. (K,f)) = len f by FINSEQ_3:29;
percases ( n > len f or n <= len f ) ;
supposeA3: n > len f ; ::_thesis: 1. (K,(f | n)) = (1. (K,f)) | n
then f | n = f by FINSEQ_1:58;
hence 1. (K,(f | n)) = (1. (K,f)) | n by A2, A3, FINSEQ_1:58; ::_thesis: verum
end;
supposeA4: n <= len f ; ::_thesis: 1. (K,(f | n)) = (1. (K,f)) | n
f = (f | n) ^ (f /^ n) by RFINSEQ:8;
then A5: 1. (K,f) = (1. (K,(f | n))) ^ (1. (K,(f /^ n))) by Th58;
len (1. (K,(f | n))) = n by A1, A4, FINSEQ_1:59;
hence 1. (K,(f | n)) = (1. (K,f)) | n by A5, FINSEQ_5:23; ::_thesis: verum
end;
end;
end;
theorem Th60: :: MATRIXJ1:60
for i, j being Nat
for K being Field holds block_diagonal (<*(1. (K,i)),(1. (K,j))*>,(0. K)) = 1. (K,(i + j))
proof
let i, j be Nat; ::_thesis: for K being Field holds block_diagonal (<*(1. (K,i)),(1. (K,j))*>,(0. K)) = 1. (K,(i + j))
let K be Field; ::_thesis: block_diagonal (<*(1. (K,i)),(1. (K,j))*>,(0. K)) = 1. (K,(i + j))
set I = 1. (K,i);
set J = 1. (K,j);
set B = block_diagonal (<*(1. (K,i)),(1. (K,j))*>,(0. K));
A1: len (1. (K,i)) = i by MATRIX_1:24;
A2: Sum (Len <*(1. (K,j))*>) = len (1. (K,j)) by Lm4;
A3: len (1. (K,j)) = j by MATRIX_1:24;
then A4: Indices (block_diagonal (<*(1. (K,j))*>,(0. K))) = [:(Seg j),(Seg j):] by A2, MATRIX_1:24;
Sum (Len <*(1. (K,i)),(1. (K,j))*>) = (len (1. (K,i))) + (len (1. (K,j))) by Th16;
then reconsider B = block_diagonal (<*(1. (K,i)),(1. (K,j))*>,(0. K)) as Matrix of i + j,K by A1, A3;
A5: Indices B = [:(Seg (i + j)),(Seg (i + j)):] by MATRIX_1:24;
A6: Indices (1. (K,j)) = [:(Seg j),(Seg j):] by MATRIX_1:24;
A7: width (1. (K,i)) = i by MATRIX_1:24;
A8: Indices (1. (K,i)) = [:(Seg i),(Seg i):] by MATRIX_1:24;
A9: Sum (Width <*(1. (K,i))*>) = width (1. (K,i)) by Lm5;
A10: Sum (Len <*(1. (K,i))*>) = len (1. (K,i)) by Lm4;
then A11: Indices (block_diagonal (<*(1. (K,i))*>,(0. K))) = [:(Seg i),(Seg i):] by A1, MATRIX_1:24;
A12: now__::_thesis:_for_n,_m_being_Nat_st_[n,m]_in_Indices_B_&_n_<>_m_holds_
B_*_(n,m)_=_0._K
let n, m be Nat; ::_thesis: ( [n,m] in Indices B & n <> m implies B * (n,m) = 0. K )
assume that
A13: [n,m] in Indices B and
A14: n <> m ; ::_thesis: B * (n,m) = 0. K
A15: m in Seg (i + j) by A5, A13, ZFMISC_1:87;
then A16: m >= 1 by FINSEQ_1:1;
A17: n in Seg (i + j) by A5, A13, ZFMISC_1:87;
then A18: n >= 1 by FINSEQ_1:1;
now__::_thesis:_B_*_(n,m)_=_0._K
percases ( ( n <= i & m <= i ) or ( n > i & m > i ) or ( n <= i & m > i ) or ( n > i & m <= i ) ) ;
supposeA19: ( n <= i & m <= i ) ; ::_thesis: B * (n,m) = 0. K
then A20: m in Seg i by A15, A16;
n in Seg i by A17, A18, A19;
then A21: [n,m] in [:(Seg i),(Seg i):] by A20, ZFMISC_1:87;
hence B * (n,m) = (block_diagonal (<*(1. (K,i))*>,(0. K))) * (n,m) by A2, A11, Th26
.= (1. (K,i)) * (n,m) by Th34
.= 0. K by A8, A14, A21, MATRIX_1:def_11 ;
::_thesis: verum
end;
supposeA22: ( n > i & m > i ) ; ::_thesis: B * (n,m) = 0. K
then A23: m - i <> 0 ;
n -' i = n - i by A22, XREAL_1:233;
then A24: n = (n -' i) + i ;
m -' i = m - i by A22, XREAL_1:233;
then A25: m = (m -' i) + i ;
n - i <> 0 by A22;
then A26: [(n -' i),(m -' i)] in [:(Seg j),(Seg j):] by A10, A9, A1, A7, A4, A13, A23, A24, A25, Th27;
hence B * (n,m) = (block_diagonal (<*(1. (K,j))*>,(0. K))) * ((n -' i),(m -' i)) by A10, A9, A1, A7, A4, A24, A25, Th28
.= (1. (K,j)) * ((n -' i),(m -' i)) by Th34
.= 0. K by A6, A14, A24, A25, A26, MATRIX_1:def_11 ;
::_thesis: verum
end;
suppose ( ( n <= i & m > i ) or ( n > i & m <= i ) ) ; ::_thesis: B * (n,m) = 0. K
hence B * (n,m) = 0. K by A10, A9, A2, A1, A7, A13, Th29; ::_thesis: verum
end;
end;
end;
hence B * (n,m) = 0. K ; ::_thesis: verum
end;
now__::_thesis:_for_n_being_Nat_st_[n,n]_in_Indices_B_holds_
B_*_(n,n)_=_1__K
let n be Nat; ::_thesis: ( [n,n] in Indices B implies B * (n,n) = 1_ K )
assume A27: [n,n] in Indices B ; ::_thesis: B * (n,n) = 1_ K
A28: n in Seg (i + j) by A5, A27, ZFMISC_1:87;
then A29: n >= 1 by FINSEQ_1:1;
now__::_thesis:_B_*_(n,n)_=_1__K
percases ( n <= i or n > i ) ;
suppose n <= i ; ::_thesis: B * (n,n) = 1_ K
then n in Seg i by A28, A29;
then A30: [n,n] in [:(Seg i),(Seg i):] by ZFMISC_1:87;
hence B * (n,n) = (block_diagonal (<*(1. (K,i))*>,(0. K))) * (n,n) by A2, A11, Th26
.= (1. (K,i)) * (n,n) by Th34
.= 1_ K by A8, A30, MATRIX_1:def_11 ;
::_thesis: verum
end;
supposeA31: n > i ; ::_thesis: B * (n,n) = 1_ K
then n -' i = n - i by XREAL_1:233;
then A32: n = (n -' i) + i ;
n - i <> 0 by A31;
then A33: [(n -' i),(n -' i)] in [:(Seg j),(Seg j):] by A10, A9, A1, A7, A4, A27, A32, Th27;
hence B * (n,n) = (block_diagonal (<*(1. (K,j))*>,(0. K))) * ((n -' i),(n -' i)) by A10, A9, A1, A7, A4, A32, Th28
.= (1. (K,j)) * ((n -' i),(n -' i)) by Th34
.= 1_ K by A6, A33, MATRIX_1:def_11 ;
::_thesis: verum
end;
end;
end;
hence B * (n,n) = 1_ K ; ::_thesis: verum
end;
hence block_diagonal (<*(1. (K,i)),(1. (K,j))*>,(0. K)) = 1. (K,(i + j)) by A12, MATRIX_1:def_11; ::_thesis: verum
end;
theorem :: MATRIXJ1:61
for K being Field
for f being FinSequence of NAT holds block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f))
proof
let K be Field; ::_thesis: for f being FinSequence of NAT holds block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f))
let f be FinSequence of NAT ; ::_thesis: block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f))
defpred S1[ Nat] means for f being FinSequence of NAT st len f = $1 holds
block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f));
A1: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] )
assume A2: S1[n] ; ::_thesis: S1[n + 1]
set n1 = n + 1;
let f be FinSequence of NAT ; ::_thesis: ( len f = n + 1 implies block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f)) )
assume A3: len f = n + 1 ; ::_thesis: block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f))
A4: len (f | n) = n by A3, FINSEQ_1:59, NAT_1:11;
1 <= n + 1 by NAT_1:11;
then n + 1 in dom f by A3, FINSEQ_3:25;
then A5: f /. (n + 1) = f . (n + 1) by PARTFUN1:def_6;
A6: f = (f | n) ^ <*(f . (n + 1))*> by A3, FINSEQ_3:55;
hence block_diagonal ((1. (K,f)),(0. K)) = block_diagonal (((1. (K,(f | n))) ^ (1. (K,<*(f /. (n + 1))*>))),(0. K)) by A5, Th58
.= block_diagonal (((1. (K,(f | n))) ^ <*(1. (K,(f . (n + 1))))*>),(0. K)) by A5, Th57
.= block_diagonal ((<*(block_diagonal ((1. (K,(f | n))),(0. K)))*> ^ <*(1. (K,(f . (n + 1))))*>),(0. K)) by Th35
.= block_diagonal (<*(1. (K,(Sum (f | n)))),(1. (K,(f . (n + 1))))*>,(0. K)) by A2, A4
.= 1. (K,((Sum (f | n)) + (f . (n + 1)))) by Th60
.= 1. (K,(Sum f)) by A6, RVSUM_1:74 ;
::_thesis: verum
end;
A7: S1[ 0 ]
proof
let f be FinSequence of NAT ; ::_thesis: ( len f = 0 implies block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f)) )
assume A8: len f = 0 ; ::_thesis: block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f))
dom (1. (K,f)) = dom f by Def8;
then len (1. (K,f)) = 0 by A8, FINSEQ_3:29;
then A9: Sum (Len (1. (K,f))) = 0 by RVSUM_1:72;
f = {} by A8;
hence block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f)) by A9, MATRIX_1:35, RVSUM_1:72; ::_thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch_2(A7, A1);
then S1[ len f] ;
hence block_diagonal ((1. (K,f)),(0. K)) = 1. (K,(Sum f)) ; ::_thesis: verum
end;
begin
definition
let K be Field;
let G be FinSequence_of_Matrix of K;
let p be FinSequence of K;
func mlt (p,G) -> FinSequence_of_Matrix of K means :Def9: :: MATRIXJ1:def 9
( dom it = dom G & ( for i being Nat st i in dom it holds
it . i = (p /. i) * (G . i) ) );
existence
ex b1 being FinSequence_of_Matrix of K st
( dom b1 = dom G & ( for i being Nat st i in dom b1 holds
b1 . i = (p /. i) * (G . i) ) )
proof
deffunc H1( Nat) -> FinSequence of the carrier of K * = (p /. $1) * (G . $1);
consider IT being FinSequence such that
A1: len IT = len G and
A2: for k being Nat st k in dom IT holds
IT . k = H1(k) from FINSEQ_1:sch_2();
rng IT c= ( the carrier of K *) *
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in rng IT or y in ( the carrier of K *) * )
assume y in rng IT ; ::_thesis: y in ( the carrier of K *) *
then consider x being set such that
A3: x in dom IT and
A4: IT . x = y by FUNCT_1:def_3;
reconsider x = x as Nat by A3;
IT . x = (p /. x) * (G . x) by A2, A3;
hence y in ( the carrier of K *) * by A4, FINSEQ_1:def_11; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence of ( the carrier of K *) * by FINSEQ_1:def_4;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_IT_holds_
IT_._i_is_Matrix_of_K
let i be Nat; ::_thesis: ( i in dom IT implies IT . i is Matrix of K )
assume i in dom IT ; ::_thesis: IT . i is Matrix of K
then IT . i = (p /. i) * (G . i) by A2;
hence IT . i is Matrix of K ; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence_of_Matrix of K by Def2;
take IT ; ::_thesis: ( dom IT = dom G & ( for i being Nat st i in dom IT holds
IT . i = (p /. i) * (G . i) ) )
thus ( dom IT = dom G & ( for i being Nat st i in dom IT holds
IT . i = (p /. i) * (G . i) ) ) by A1, A2, FINSEQ_3:29; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence_of_Matrix of K st dom b1 = dom G & ( for i being Nat st i in dom b1 holds
b1 . i = (p /. i) * (G . i) ) & dom b2 = dom G & ( for i being Nat st i in dom b2 holds
b2 . i = (p /. i) * (G . i) ) holds
b1 = b2
proof
let T1, T2 be FinSequence_of_Matrix of K; ::_thesis: ( dom T1 = dom G & ( for i being Nat st i in dom T1 holds
T1 . i = (p /. i) * (G . i) ) & dom T2 = dom G & ( for i being Nat st i in dom T2 holds
T2 . i = (p /. i) * (G . i) ) implies T1 = T2 )
assume that
A5: dom T1 = dom G and
A6: for i being Nat st i in dom T1 holds
T1 . i = (p /. i) * (G . i) and
A7: dom T2 = dom G and
A8: for i being Nat st i in dom T2 holds
T2 . i = (p /. i) * (G . i) ; ::_thesis: T1 = T2
now__::_thesis:_for_i_being_Nat_st_i_in_dom_G_holds_
T1_._i_=_T2_._i
let i be Nat; ::_thesis: ( i in dom G implies T1 . i = T2 . i )
assume A9: i in dom G ; ::_thesis: T1 . i = T2 . i
thus T1 . i = (p /. i) * (G . i) by A5, A6, A9
.= T2 . i by A7, A8, A9 ; ::_thesis: verum
end;
hence T1 = T2 by A5, A7, FINSEQ_1:13; ::_thesis: verum
end;
end;
:: deftheorem Def9 defines mlt MATRIXJ1:def_9_:_
for K being Field
for G being FinSequence_of_Matrix of K
for p being FinSequence of K
for b4 being FinSequence_of_Matrix of K holds
( b4 = mlt (p,G) iff ( dom b4 = dom G & ( for i being Nat st i in dom b4 holds
b4 . i = (p /. i) * (G . i) ) ) );
registration
let K be Field;
let R be FinSequence_of_Square-Matrix of K;
let p be FinSequence of K;
cluster mlt (p,R) -> Square-Matrix-yielding ;
coherence
mlt (p,R) is Square-Matrix-yielding
proof
set M = mlt (p,R);
let i be Nat; :: according to MATRIXJ1:def_6 ::_thesis: ( i in dom (mlt (p,R)) implies ex n being Nat st (mlt (p,R)) . i is Matrix of n, the carrier of K )
assume i in dom (mlt (p,R)) ; ::_thesis: ex n being Nat st (mlt (p,R)) . i is Matrix of n, the carrier of K
then A1: (mlt (p,R)) . i = (p /. i) * (R . i) by Def9;
consider n being Nat such that
A2: R . i is Matrix of n,K ;
take n ; ::_thesis: (mlt (p,R)) . i is Matrix of n, the carrier of K
len (R . i) = n by A2, MATRIX_1:24;
hence (mlt (p,R)) . i is Matrix of n,K by A1; ::_thesis: verum
end;
end;
theorem :: MATRIXJ1:62
for K being Field
for G being FinSequence_of_Matrix of K
for p being FinSequence of K holds
( Len (mlt (p,G)) = Len G & Width (mlt (p,G)) = Width G )
proof
let K be Field; ::_thesis: for G being FinSequence_of_Matrix of K
for p being FinSequence of K holds
( Len (mlt (p,G)) = Len G & Width (mlt (p,G)) = Width G )
let G be FinSequence_of_Matrix of K; ::_thesis: for p being FinSequence of K holds
( Len (mlt (p,G)) = Len G & Width (mlt (p,G)) = Width G )
let p be FinSequence of K; ::_thesis: ( Len (mlt (p,G)) = Len G & Width (mlt (p,G)) = Width G )
set M = mlt (p,G);
A1: dom (Len (mlt (p,G))) = dom (mlt (p,G)) by Def3;
A2: dom (mlt (p,G)) = dom G by Def9;
A3: dom (Len G) = dom G by Def3;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Len_(mlt_(p,G)))_holds_
(Len_(mlt_(p,G)))_._i_=_(Len_G)_._i
let i be Nat; ::_thesis: ( i in dom (Len (mlt (p,G))) implies (Len (mlt (p,G))) . i = (Len G) . i )
assume A4: i in dom (Len (mlt (p,G))) ; ::_thesis: (Len (mlt (p,G))) . i = (Len G) . i
thus (Len (mlt (p,G))) . i = len ((mlt (p,G)) . i) by A4, Def3
.= len ((p /. i) * (G . i)) by A1, A4, Def9
.= len (G . i) by MATRIX_3:def_5
.= (Len G) . i by A1, A3, A2, A4, Def3 ; ::_thesis: verum
end;
hence Len (mlt (p,G)) = Len G by A1, A3, A2, FINSEQ_1:13; ::_thesis: Width (mlt (p,G)) = Width G
A5: dom (Width (mlt (p,G))) = dom (mlt (p,G)) by Def4;
A6: dom (Width G) = dom G by Def4;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Width_(mlt_(p,G)))_holds_
(Width_(mlt_(p,G)))_._i_=_(Width_G)_._i
let i be Nat; ::_thesis: ( i in dom (Width (mlt (p,G))) implies (Width (mlt (p,G))) . i = (Width G) . i )
assume A7: i in dom (Width (mlt (p,G))) ; ::_thesis: (Width (mlt (p,G))) . i = (Width G) . i
thus (Width (mlt (p,G))) . i = width ((mlt (p,G)) . i) by A7, Def4
.= width ((p /. i) * (G . i)) by A5, A7, Def9
.= width (G . i) by MATRIX_3:def_5
.= (Width G) . i by A6, A5, A2, A7, Def4 ; ::_thesis: verum
end;
hence Width (mlt (p,G)) = Width G by A6, A5, A2, FINSEQ_1:13; ::_thesis: verum
end;
theorem Th63: :: MATRIXJ1:63
for K being Field
for A being Matrix of K
for p being FinSequence of K holds mlt (p,<*A*>) = <*((p /. 1) * A)*>
proof
let K be Field; ::_thesis: for A being Matrix of K
for p being FinSequence of K holds mlt (p,<*A*>) = <*((p /. 1) * A)*>
let A be Matrix of K; ::_thesis: for p being FinSequence of K holds mlt (p,<*A*>) = <*((p /. 1) * A)*>
let p be FinSequence of K; ::_thesis: mlt (p,<*A*>) = <*((p /. 1) * A)*>
A1: dom (mlt (p,<*A*>)) = dom <*A*> by Def9
.= Seg 1 by FINSEQ_1:38 ;
then 1 in dom (mlt (p,<*A*>)) ;
then A2: (mlt (p,<*A*>)) . 1 = (p /. 1) * (<*A*> . 1) by Def9
.= (p /. 1) * A by FINSEQ_1:40 ;
len (mlt (p,<*A*>)) = 1 by A1, FINSEQ_1:def_3;
hence mlt (p,<*A*>) = <*((p /. 1) * A)*> by A2, FINSEQ_1:40; ::_thesis: verum
end;
theorem Th64: :: MATRIXJ1:64
for K being Field
for G, G1 being FinSequence_of_Matrix of K
for p, p1 being FinSequence of K st len G = len p & len G1 <= len p1 holds
mlt ((p ^ p1),(G ^ G1)) = (mlt (p,G)) ^ (mlt (p1,G1))
proof
let K be Field; ::_thesis: for G, G1 being FinSequence_of_Matrix of K
for p, p1 being FinSequence of K st len G = len p & len G1 <= len p1 holds
mlt ((p ^ p1),(G ^ G1)) = (mlt (p,G)) ^ (mlt (p1,G1))
let G, G1 be FinSequence_of_Matrix of K; ::_thesis: for p, p1 being FinSequence of K st len G = len p & len G1 <= len p1 holds
mlt ((p ^ p1),(G ^ G1)) = (mlt (p,G)) ^ (mlt (p1,G1))
let p, p1 be FinSequence of K; ::_thesis: ( len G = len p & len G1 <= len p1 implies mlt ((p ^ p1),(G ^ G1)) = (mlt (p,G)) ^ (mlt (p1,G1)) )
assume that
A1: len G = len p and
A2: len G1 <= len p1 ; ::_thesis: mlt ((p ^ p1),(G ^ G1)) = (mlt (p,G)) ^ (mlt (p1,G1))
A3: dom G = dom p by A1, FINSEQ_3:29;
dom G1 = Seg (len G1) by FINSEQ_1:def_3;
then dom G1 c= Seg (len p1) by A2, FINSEQ_1:5;
then A4: dom G1 c= dom p1 by FINSEQ_1:def_3;
set M1 = mlt (p1,G1);
set M = mlt (p,G);
set GG1 = G ^ G1;
set pp1 = p ^ p1;
set MM = mlt ((p ^ p1),(G ^ G1));
A5: dom (G ^ G1) = Seg (len (G ^ G1)) by FINSEQ_1:def_3;
A6: dom (mlt ((p ^ p1),(G ^ G1))) = dom (G ^ G1) by Def9;
A7: dom (mlt (p1,G1)) = dom G1 by Def9;
then A8: len (mlt (p1,G1)) = len G1 by FINSEQ_3:29;
A9: dom (mlt (p,G)) = dom G by Def9;
then A10: len (mlt (p,G)) = len G by FINSEQ_3:29;
len (G ^ G1) = (len G) + (len G1) by FINSEQ_1:22;
then len (G ^ G1) <= (len p) + (len p1) by A1, A2, XREAL_1:7;
then dom (G ^ G1) c= Seg ((len p) + (len p1)) by A5, FINSEQ_1:5;
then A11: dom (G ^ G1) c= dom (p ^ p1) by FINSEQ_1:def_7;
A12: now__::_thesis:_for_i_being_Nat_st_1_<=_i_&_i_<=_len_(G_^_G1)_holds_
(mlt_((p_^_p1),(G_^_G1)))_._i_=_((mlt_(p,G))_^_(mlt_(p1,G1)))_._i
let i be Nat; ::_thesis: ( 1 <= i & i <= len (G ^ G1) implies (mlt ((p ^ p1),(G ^ G1))) . i = ((mlt (p,G)) ^ (mlt (p1,G1))) . i )
assume that
A13: 1 <= i and
A14: i <= len (G ^ G1) ; ::_thesis: (mlt ((p ^ p1),(G ^ G1))) . i = ((mlt (p,G)) ^ (mlt (p1,G1))) . i
A15: i in dom (G ^ G1) by A13, A14, FINSEQ_3:25;
then A16: (p ^ p1) /. i = (p ^ p1) . i by A11, PARTFUN1:def_6;
A17: (mlt ((p ^ p1),(G ^ G1))) . i = ((p ^ p1) /. i) * ((G ^ G1) . i) by A6, A15, Def9;
now__::_thesis:_(mlt_((p_^_p1),(G_^_G1)))_._i_=_((mlt_(p,G))_^_(mlt_(p1,G1)))_._i
percases ( i in dom G or ex n being Nat st
( n in dom G1 & i = (len G) + n ) ) by A15, FINSEQ_1:25;
supposeA18: i in dom G ; ::_thesis: (mlt ((p ^ p1),(G ^ G1))) . i = ((mlt (p,G)) ^ (mlt (p1,G1))) . i
then A19: (G ^ G1) . i = G . i by FINSEQ_1:def_7;
A20: p . i = p /. i by A3, A18, PARTFUN1:def_6;
(p ^ p1) . i = p . i by A3, A18, FINSEQ_1:def_7;
hence (mlt ((p ^ p1),(G ^ G1))) . i = (mlt (p,G)) . i by A9, A17, A16, A18, A19, A20, Def9
.= ((mlt (p,G)) ^ (mlt (p1,G1))) . i by A9, A18, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom G1 & i = (len G) + n ) ; ::_thesis: (mlt ((p ^ p1),(G ^ G1))) . i = ((mlt (p,G)) ^ (mlt (p1,G1))) . i
then consider n being Nat such that
A21: n in dom G1 and
A22: i = (len G) + n ;
A23: (G ^ G1) . i = G1 . n by A21, A22, FINSEQ_1:def_7;
A24: p1 /. n = p1 . n by A4, A21, PARTFUN1:def_6;
(p ^ p1) . i = p1 . n by A1, A4, A21, A22, FINSEQ_1:def_7;
hence (mlt ((p ^ p1),(G ^ G1))) . i = (mlt (p1,G1)) . n by A7, A17, A16, A21, A23, A24, Def9
.= ((mlt (p,G)) ^ (mlt (p1,G1))) . i by A7, A10, A21, A22, FINSEQ_1:def_7 ;
::_thesis: verum
end;
end;
end;
hence (mlt ((p ^ p1),(G ^ G1))) . i = ((mlt (p,G)) ^ (mlt (p1,G1))) . i ; ::_thesis: verum
end;
A25: len ((mlt (p,G)) ^ (mlt (p1,G1))) = (len (mlt (p,G))) + (len (mlt (p1,G1))) by FINSEQ_1:22;
len (mlt ((p ^ p1),(G ^ G1))) = len (G ^ G1) by A6, FINSEQ_3:29;
hence mlt ((p ^ p1),(G ^ G1)) = (mlt (p,G)) ^ (mlt (p1,G1)) by A10, A8, A25, A12, FINSEQ_1:14, FINSEQ_1:22; ::_thesis: verum
end;
Lm7: for K being Field
for a, a1 being Element of K
for A1, A2 being Matrix of K holds a * (block_diagonal (<*A1,A2*>,a1)) = block_diagonal (<*(a * A1),(a * A2)*>,(a * a1))
proof
let K be Field; ::_thesis: for a, a1 being Element of K
for A1, A2 being Matrix of K holds a * (block_diagonal (<*A1,A2*>,a1)) = block_diagonal (<*(a * A1),(a * A2)*>,(a * a1))
let a, a1 be Element of K; ::_thesis: for A1, A2 being Matrix of K holds a * (block_diagonal (<*A1,A2*>,a1)) = block_diagonal (<*(a * A1),(a * A2)*>,(a * a1))
let A1, A2 be Matrix of K; ::_thesis: a * (block_diagonal (<*A1,A2*>,a1)) = block_diagonal (<*(a * A1),(a * A2)*>,(a * a1))
set AA1 = a * A1;
set AA2 = a * A2;
set aa1 = a * a1;
set B = block_diagonal (<*A1,A2*>,a1);
A1: width (a * A2) = width A2 by MATRIX_3:def_5;
A2: width (a * A1) = width A1 by MATRIX_3:def_5;
then A3: Sum (Width <*(a * A1),(a * A2)*>) = (width A1) + (width A2) by A1, Th20;
A4: len (block_diagonal (<*A1,A2*>,a1)) = Sum (Len <*A1,A2*>) by Def5;
A5: len (a * A2) = len A2 by MATRIX_3:def_5;
then A6: dom (a * A2) = dom A2 by FINSEQ_3:29;
A7: Sum (Width <*A1,A2*>) = (width A1) + (width A2) by Th20;
A8: Sum (Len <*A1,A2*>) = (len A1) + (len A2) by Th16;
A9: len (a * A1) = len A1 by MATRIX_3:def_5;
then A10: dom (a * A1) = dom A1 by FINSEQ_3:29;
A11: now__::_thesis:_for_i_being_Nat_holds_
(_(_i_in_dom_(a_*_A1)_implies_Line_((a_*_(block_diagonal_(<*A1,A2*>,a1))),i)_=_(Line_((a_*_A1),i))_^_((width_(a_*_A2))_|->_(a_*_a1))_)_&_(_i_in_dom_(a_*_A2)_implies_Line_((a_*_(block_diagonal_(<*A1,A2*>,a1))),(i_+_(len_(a_*_A1))))_=_((width_(a_*_A1))_|->_(a_*_a1))_^_(Line_((a_*_A2),i))_)_)
let i be Nat; ::_thesis: ( ( i in dom (a * A1) implies Line ((a * (block_diagonal (<*A1,A2*>,a1))),i) = (Line ((a * A1),i)) ^ ((width (a * A2)) |-> (a * a1)) ) & ( i in dom (a * A2) implies Line ((a * (block_diagonal (<*A1,A2*>,a1))),(i + (len (a * A1)))) = ((width (a * A1)) |-> (a * a1)) ^ (Line ((a * A2),i)) ) )
thus ( i in dom (a * A1) implies Line ((a * (block_diagonal (<*A1,A2*>,a1))),i) = (Line ((a * A1),i)) ^ ((width (a * A2)) |-> (a * a1)) ) ::_thesis: ( i in dom (a * A2) implies Line ((a * (block_diagonal (<*A1,A2*>,a1))),(i + (len (a * A1)))) = ((width (a * A1)) |-> (a * a1)) ^ (Line ((a * A2),i)) )
proof
assume A12: i in dom (a * A1) ; ::_thesis: Line ((a * (block_diagonal (<*A1,A2*>,a1))),i) = (Line ((a * A1),i)) ^ ((width (a * A2)) |-> (a * a1))
then A13: 1 <= i by FINSEQ_3:25;
A14: i <= len A1 by A9, A12, FINSEQ_3:25;
len A1 <= len (block_diagonal (<*A1,A2*>,a1)) by A8, A4, NAT_1:11;
then i <= len (block_diagonal (<*A1,A2*>,a1)) by A14, XXREAL_0:2;
hence Line ((a * (block_diagonal (<*A1,A2*>,a1))),i) = a * (Line ((block_diagonal (<*A1,A2*>,a1)),i)) by A13, MATRIXR1:20
.= a * ((Line (A1,i)) ^ ((width A2) |-> a1)) by A10, A12, Th23
.= (a * (Line (A1,i))) ^ (a * ((width A2) |-> a1)) by MATRIX15:4
.= (Line ((a * A1),i)) ^ (a * ((width A2) |-> a1)) by A13, A14, MATRIXR1:20
.= (Line ((a * A1),i)) ^ ((width (a * A2)) |-> (a * a1)) by A1, FVSUM_1:53 ;
::_thesis: verum
end;
thus ( i in dom (a * A2) implies Line ((a * (block_diagonal (<*A1,A2*>,a1))),(i + (len (a * A1)))) = ((width (a * A1)) |-> (a * a1)) ^ (Line ((a * A2),i)) ) ::_thesis: verum
proof
assume A15: i in dom (a * A2) ; ::_thesis: Line ((a * (block_diagonal (<*A1,A2*>,a1))),(i + (len (a * A1)))) = ((width (a * A1)) |-> (a * a1)) ^ (Line ((a * A2),i))
then A16: 1 <= i by FINSEQ_3:25;
then A17: 0 + 1 <= i + (len A1) by XREAL_1:7;
A18: i <= len A2 by A5, A15, FINSEQ_3:25;
then i + (len A1) <= len (block_diagonal (<*A1,A2*>,a1)) by A8, A4, XREAL_1:7;
hence Line ((a * (block_diagonal (<*A1,A2*>,a1))),(i + (len (a * A1)))) = a * (Line ((block_diagonal (<*A1,A2*>,a1)),(i + (len A1)))) by A9, A17, MATRIXR1:20
.= a * (((width A1) |-> a1) ^ (Line (A2,i))) by A6, A15, Th23
.= (a * ((width A1) |-> a1)) ^ (a * (Line (A2,i))) by MATRIX15:4
.= ((width A1) |-> (a * a1)) ^ (a * (Line (A2,i))) by FVSUM_1:53
.= ((width (a * A1)) |-> (a * a1)) ^ (Line ((a * A2),i)) by A2, A16, A18, MATRIXR1:20 ;
::_thesis: verum
end;
end;
Sum (Len <*(a * A1),(a * A2)*>) = (len A1) + (len A2) by A9, A5, Th16;
hence a * (block_diagonal (<*A1,A2*>,a1)) = block_diagonal (<*(a * A1),(a * A2)*>,(a * a1)) by A8, A3, A7, A11, Th23; ::_thesis: verum
end;
theorem :: MATRIXJ1:65
for K being Field
for a, a1 being Element of K
for G being FinSequence_of_Matrix of K holds a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
proof
let K be Field; ::_thesis: for a, a1 being Element of K
for G being FinSequence_of_Matrix of K holds a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
let a, a1 be Element of K; ::_thesis: for G being FinSequence_of_Matrix of K holds a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
let G be FinSequence_of_Matrix of K; ::_thesis: a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
defpred S1[ Nat] means for a, a1 being Element of K
for G being FinSequence_of_Matrix of K st len G = $1 holds
a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1));
A1: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] )
assume A2: S1[n] ; ::_thesis: S1[n + 1]
set n1 = n + 1;
let a, a1 be Element of K; ::_thesis: for G being FinSequence_of_Matrix of K st len G = n + 1 holds
a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
let G be FinSequence_of_Matrix of K; ::_thesis: ( len G = n + 1 implies a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1)) )
assume A3: len G = n + 1 ; ::_thesis: a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
A4: G = (G | n) ^ <*(G . (n + 1))*> by A3, FINSEQ_3:55;
n <= n + 1 by NAT_1:13;
then A5: len (G | n) = n by A3, FINSEQ_1:59;
1 in Seg 1 ;
then 1 in dom <*a*> by FINSEQ_1:def_8;
then A6: <*a*> . 1 = <*a*> /. 1 by PARTFUN1:def_6;
A7: <*a*> . 1 = a by FINSEQ_1:def_8;
A8: len <*a*> = 1 by FINSEQ_1:39;
A9: len <*(G . (n + 1))*> = 1 by FINSEQ_1:39;
A10: len (n |-> a) = n by CARD_1:def_7;
(n + 1) |-> a = (n |-> a) ^ <*a*> by FINSEQ_2:60;
hence block_diagonal ((mlt (((len G) |-> a),G)),(a * a1)) = block_diagonal (((mlt ((n |-> a),(G | n))) ^ (mlt (<*a*>,<*(G . (n + 1))*>))),(a * a1)) by A3, A4, A5, A10, A9, A8, Th64
.= block_diagonal (((mlt ((n |-> a),(G | n))) ^ <*(a * (G . (n + 1)))*>),(a * a1)) by A6, A7, Th63
.= block_diagonal ((<*(block_diagonal ((mlt ((n |-> a),(G | n))),(a * a1)))*> ^ <*(a * (G . (n + 1)))*>),(a * a1)) by Th35
.= block_diagonal (<*(a * (block_diagonal ((G | n),a1))),(a * (G . (n + 1)))*>,(a * a1)) by A2, A5
.= a * (block_diagonal (<*(block_diagonal ((G | n),a1)),(G . (n + 1))*>,a1)) by Lm7
.= a * (block_diagonal (G,a1)) by A4, Th35 ;
::_thesis: verum
end;
A11: S1[ 0 ]
proof
let a, a1 be Element of K; ::_thesis: for G being FinSequence_of_Matrix of K st len G = 0 holds
a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
let G be FinSequence_of_Matrix of K; ::_thesis: ( len G = 0 implies a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1)) )
assume A12: len G = 0 ; ::_thesis: a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))
dom (mlt (((len G) |-> a),G)) = dom G by Def9;
then len (mlt (((len G) |-> a),G)) = len G by FINSEQ_3:29;
then Len (mlt (((len G) |-> a),G)) = {} by A12;
then len (block_diagonal ((mlt (((len G) |-> a),G)),(a * a1))) = 0 by Def5, RVSUM_1:72;
then A13: block_diagonal ((mlt (((len G) |-> a),G)),(a * a1)) = {} ;
Len G = {} by A12;
then len (block_diagonal (G,a1)) = 0 by Def5, RVSUM_1:72;
then len (a * (block_diagonal (G,a1))) = 0 by MATRIX_3:def_5;
hence a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1)) by A13; ::_thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch_2(A11, A1);
hence a * (block_diagonal (G,a1)) = block_diagonal ((mlt (((len G) |-> a),G)),(a * a1)) ; ::_thesis: verum
end;
definition
let K be Field;
let G1, G2 be FinSequence_of_Matrix of K;
funcG1 (+) G2 -> FinSequence_of_Matrix of K means :Def10: :: MATRIXJ1:def 10
( dom it = dom G1 & ( for i being Nat st i in dom it holds
it . i = (G1 . i) + (G2 . i) ) );
existence
ex b1 being FinSequence_of_Matrix of K st
( dom b1 = dom G1 & ( for i being Nat st i in dom b1 holds
b1 . i = (G1 . i) + (G2 . i) ) )
proof
deffunc H1( Nat) -> FinSequence of the carrier of K * = (G1 . $1) + (G2 . $1);
consider IT being FinSequence such that
A1: len IT = len G1 and
A2: for k being Nat st k in dom IT holds
IT . k = H1(k) from FINSEQ_1:sch_2();
rng IT c= ( the carrier of K *) *
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in rng IT or y in ( the carrier of K *) * )
assume y in rng IT ; ::_thesis: y in ( the carrier of K *) *
then consider x being set such that
A3: x in dom IT and
A4: IT . x = y by FUNCT_1:def_3;
reconsider x = x as Nat by A3;
IT . x = (G1 . x) + (G2 . x) by A2, A3;
hence y in ( the carrier of K *) * by A4, FINSEQ_1:def_11; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence of ( the carrier of K *) * by FINSEQ_1:def_4;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_IT_holds_
IT_._i_is_Matrix_of_K
let i be Nat; ::_thesis: ( i in dom IT implies IT . i is Matrix of K )
assume i in dom IT ; ::_thesis: IT . i is Matrix of K
then IT . i = (G1 . i) + (G2 . i) by A2;
hence IT . i is Matrix of K ; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence_of_Matrix of K by Def2;
take IT ; ::_thesis: ( dom IT = dom G1 & ( for i being Nat st i in dom IT holds
IT . i = (G1 . i) + (G2 . i) ) )
thus ( dom IT = dom G1 & ( for i being Nat st i in dom IT holds
IT . i = (G1 . i) + (G2 . i) ) ) by A1, A2, FINSEQ_3:29; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence_of_Matrix of K st dom b1 = dom G1 & ( for i being Nat st i in dom b1 holds
b1 . i = (G1 . i) + (G2 . i) ) & dom b2 = dom G1 & ( for i being Nat st i in dom b2 holds
b2 . i = (G1 . i) + (G2 . i) ) holds
b1 = b2
proof
let T1, T2 be FinSequence_of_Matrix of K; ::_thesis: ( dom T1 = dom G1 & ( for i being Nat st i in dom T1 holds
T1 . i = (G1 . i) + (G2 . i) ) & dom T2 = dom G1 & ( for i being Nat st i in dom T2 holds
T2 . i = (G1 . i) + (G2 . i) ) implies T1 = T2 )
assume that
A5: dom T1 = dom G1 and
A6: for i being Nat st i in dom T1 holds
T1 . i = (G1 . i) + (G2 . i) and
A7: dom T2 = dom G1 and
A8: for i being Nat st i in dom T2 holds
T2 . i = (G1 . i) + (G2 . i) ; ::_thesis: T1 = T2
now__::_thesis:_for_i_being_Nat_st_i_in_dom_G1_holds_
T1_._i_=_T2_._i
let i be Nat; ::_thesis: ( i in dom G1 implies T1 . i = T2 . i )
assume A9: i in dom G1 ; ::_thesis: T1 . i = T2 . i
thus T1 . i = (G1 . i) + (G2 . i) by A5, A6, A9
.= T2 . i by A7, A8, A9 ; ::_thesis: verum
end;
hence T1 = T2 by A5, A7, FINSEQ_1:13; ::_thesis: verum
end;
end;
:: deftheorem Def10 defines (+) MATRIXJ1:def_10_:_
for K being Field
for G1, G2, b4 being FinSequence_of_Matrix of K holds
( b4 = G1 (+) G2 iff ( dom b4 = dom G1 & ( for i being Nat st i in dom b4 holds
b4 . i = (G1 . i) + (G2 . i) ) ) );
registration
let K be Field;
let R be FinSequence_of_Square-Matrix of K;
let G be FinSequence_of_Matrix of K;
clusterR (+) G -> Square-Matrix-yielding ;
coherence
R (+) G is Square-Matrix-yielding
proof
set RG = R (+) G;
let i be Nat; :: according to MATRIXJ1:def_6 ::_thesis: ( i in dom (R (+) G) implies ex n being Nat st (R (+) G) . i is Matrix of n, the carrier of K )
assume i in dom (R (+) G) ; ::_thesis: ex n being Nat st (R (+) G) . i is Matrix of n, the carrier of K
then A1: (R (+) G) . i = (R . i) + (G . i) by Def10;
consider n being Nat such that
A2: R . i is Matrix of n,K ;
take n ; ::_thesis: (R (+) G) . i is Matrix of n, the carrier of K
A3: len ((R . i) + (G . i)) = len (R . i) by MATRIX_3:def_3;
A4: width ((R . i) + (G . i)) = width (R . i) by MATRIX_3:def_3;
width (R . i) = n by A2, MATRIX_1:24;
hence (R (+) G) . i is Matrix of n,K by A2, A1, A3, A4, MATRIX_1:24, MATRIX_2:7; ::_thesis: verum
end;
end;
theorem Th66: :: MATRIXJ1:66
for K being Field
for G1, G2 being FinSequence_of_Matrix of K holds
( Len (G1 (+) G2) = Len G1 & Width (G1 (+) G2) = Width G1 )
proof
let K be Field; ::_thesis: for G1, G2 being FinSequence_of_Matrix of K holds
( Len (G1 (+) G2) = Len G1 & Width (G1 (+) G2) = Width G1 )
let G1, G2 be FinSequence_of_Matrix of K; ::_thesis: ( Len (G1 (+) G2) = Len G1 & Width (G1 (+) G2) = Width G1 )
set G12 = G1 (+) G2;
A1: dom (Len (G1 (+) G2)) = dom (G1 (+) G2) by Def3;
A2: dom (G1 (+) G2) = dom G1 by Def10;
A3: dom (Len G1) = dom G1 by Def3;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Len_(G1_(+)_G2))_holds_
(Len_(G1_(+)_G2))_._i_=_(Len_G1)_._i
let i be Nat; ::_thesis: ( i in dom (Len (G1 (+) G2)) implies (Len (G1 (+) G2)) . i = (Len G1) . i )
assume A4: i in dom (Len (G1 (+) G2)) ; ::_thesis: (Len (G1 (+) G2)) . i = (Len G1) . i
thus (Len (G1 (+) G2)) . i = len ((G1 (+) G2) . i) by A4, Def3
.= len ((G1 . i) + (G2 . i)) by A1, A4, Def10
.= len (G1 . i) by MATRIX_3:def_3
.= (Len G1) . i by A3, A1, A2, A4, Def3 ; ::_thesis: verum
end;
hence Len (G1 (+) G2) = Len G1 by A3, A1, A2, FINSEQ_1:13; ::_thesis: Width (G1 (+) G2) = Width G1
A5: dom (Width (G1 (+) G2)) = dom (G1 (+) G2) by Def4;
A6: dom (Width G1) = dom G1 by Def4;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Width_(G1_(+)_G2))_holds_
(Width_(G1_(+)_G2))_._i_=_(Width_G1)_._i
let i be Nat; ::_thesis: ( i in dom (Width (G1 (+) G2)) implies (Width (G1 (+) G2)) . i = (Width G1) . i )
assume A7: i in dom (Width (G1 (+) G2)) ; ::_thesis: (Width (G1 (+) G2)) . i = (Width G1) . i
thus (Width (G1 (+) G2)) . i = width ((G1 (+) G2) . i) by A7, Def4
.= width ((G1 . i) + (G2 . i)) by A5, A7, Def10
.= width (G1 . i) by MATRIX_3:def_3
.= (Width G1) . i by A6, A5, A2, A7, Def4 ; ::_thesis: verum
end;
hence Width (G1 (+) G2) = Width G1 by A6, A5, A2, FINSEQ_1:13; ::_thesis: verum
end;
theorem Th67: :: MATRIXJ1:67
for K being Field
for G, G9, G1, G2 being FinSequence_of_Matrix of K st len G = len G9 holds
(G ^ G1) (+) (G9 ^ G2) = (G (+) G9) ^ (G1 (+) G2)
proof
let K be Field; ::_thesis: for G, G9, G1, G2 being FinSequence_of_Matrix of K st len G = len G9 holds
(G ^ G1) (+) (G9 ^ G2) = (G (+) G9) ^ (G1 (+) G2)
let G, G9, G1, G2 be FinSequence_of_Matrix of K; ::_thesis: ( len G = len G9 implies (G ^ G1) (+) (G9 ^ G2) = (G (+) G9) ^ (G1 (+) G2) )
set GG9 = G (+) G9;
set G12 = G1 (+) G2;
set GG1 = G ^ G1;
set GG2 = G9 ^ G2;
A1: len (G ^ G1) = (len G) + (len G1) by FINSEQ_1:22;
A2: dom (G (+) G9) = dom G by Def10;
then A3: len (G (+) G9) = len G by FINSEQ_3:29;
A4: dom ((G ^ G1) (+) (G9 ^ G2)) = dom (G ^ G1) by Def10;
then A5: len ((G ^ G1) (+) (G9 ^ G2)) = len (G ^ G1) by FINSEQ_3:29;
assume A6: len G = len G9 ; ::_thesis: (G ^ G1) (+) (G9 ^ G2) = (G (+) G9) ^ (G1 (+) G2)
then A7: len (G9 ^ G2) = (len G) + (len G2) by FINSEQ_1:22;
A8: len ((G (+) G9) ^ (G1 (+) G2)) = (len (G (+) G9)) + (len (G1 (+) G2)) by FINSEQ_1:22;
A9: dom (G1 (+) G2) = dom G1 by Def10;
A10: dom G = dom G9 by A6, FINSEQ_3:29;
A11: now__::_thesis:_for_i_being_Nat_st_1_<=_i_&_i_<=_(len_G)_+_(len_G1)_holds_
((G_^_G1)_(+)_(G9_^_G2))_._i_=_((G_(+)_G9)_^_(G1_(+)_G2))_._i
let i be Nat; ::_thesis: ( 1 <= i & i <= (len G) + (len G1) implies ((G ^ G1) (+) (G9 ^ G2)) . i = ((G (+) G9) ^ (G1 (+) G2)) . i )
assume that
A12: 1 <= i and
A13: i <= (len G) + (len G1) ; ::_thesis: ((G ^ G1) (+) (G9 ^ G2)) . i = ((G (+) G9) ^ (G1 (+) G2)) . i
A14: i in dom ((G ^ G1) (+) (G9 ^ G2)) by A4, A1, A12, A13, FINSEQ_3:25;
then A15: ((G ^ G1) (+) (G9 ^ G2)) . i = ((G ^ G1) . i) + ((G9 ^ G2) . i) by Def10;
now__::_thesis:_((G_^_G1)_(+)_(G9_^_G2))_._i_=_((G_(+)_G9)_^_(G1_(+)_G2))_._i
percases ( i in dom G or ex n being Nat st
( n in dom G1 & i = (len G) + n ) ) by A4, A14, FINSEQ_1:25;
supposeA16: i in dom G ; ::_thesis: ((G ^ G1) (+) (G9 ^ G2)) . i = ((G (+) G9) ^ (G1 (+) G2)) . i
hence ((G ^ G1) (+) (G9 ^ G2)) . i = (G . i) + ((G9 ^ G2) . i) by A15, FINSEQ_1:def_7
.= (G . i) + (G9 . i) by A10, A16, FINSEQ_1:def_7
.= (G (+) G9) . i by A2, A16, Def10
.= ((G (+) G9) ^ (G1 (+) G2)) . i by A2, A16, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom G1 & i = (len G) + n ) ; ::_thesis: ((G ^ G1) (+) (G9 ^ G2)) . i = ((G (+) G9) ^ (G1 (+) G2)) . i
then consider n being Nat such that
A17: n in dom G1 and
A18: i = (len G) + n ;
now__::_thesis:_(G9_^_G2)_._i_=_G2_._n
percases ( n in dom G2 or not n in dom G2 ) ;
suppose n in dom G2 ; ::_thesis: (G9 ^ G2) . i = G2 . n
hence (G9 ^ G2) . i = G2 . n by A6, A18, FINSEQ_1:def_7; ::_thesis: verum
end;
supposeA19: not n in dom G2 ; ::_thesis: (G9 ^ G2) . i = G2 . n
then ( n < 1 or n > len G2 ) by FINSEQ_3:25;
then i > (len G) + (len G2) by A17, A18, FINSEQ_3:25, XREAL_1:8;
then not i in dom (G9 ^ G2) by A7, FINSEQ_3:25;
hence (G9 ^ G2) . i = {} by FUNCT_1:def_2
.= G2 . n by A19, FUNCT_1:def_2 ;
::_thesis: verum
end;
end;
end;
hence ((G ^ G1) (+) (G9 ^ G2)) . i = (G1 . n) + (G2 . n) by A15, A17, A18, FINSEQ_1:def_7
.= (G1 (+) G2) . n by A9, A17, Def10
.= ((G (+) G9) ^ (G1 (+) G2)) . i by A9, A3, A17, A18, FINSEQ_1:def_7 ;
::_thesis: verum
end;
end;
end;
hence ((G ^ G1) (+) (G9 ^ G2)) . i = ((G (+) G9) ^ (G1 (+) G2)) . i ; ::_thesis: verum
end;
len (G1 (+) G2) = len G1 by A9, FINSEQ_3:29;
hence (G ^ G1) (+) (G9 ^ G2) = (G (+) G9) ^ (G1 (+) G2) by A3, A5, A1, A8, A11, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th68: :: MATRIXJ1:68
for K being Field
for A being Matrix of K
for G being FinSequence_of_Matrix of K holds <*A*> (+) G = <*(A + (G . 1))*>
proof
let K be Field; ::_thesis: for A being Matrix of K
for G being FinSequence_of_Matrix of K holds <*A*> (+) G = <*(A + (G . 1))*>
let A be Matrix of K; ::_thesis: for G being FinSequence_of_Matrix of K holds <*A*> (+) G = <*(A + (G . 1))*>
let G be FinSequence_of_Matrix of K; ::_thesis: <*A*> (+) G = <*(A + (G . 1))*>
dom (<*A*> (+) G) = dom <*A*> by Def10;
then A1: len (<*A*> (+) G) = len <*A*> by FINSEQ_3:29
.= 1 by FINSEQ_1:39 ;
then dom (<*A*> (+) G) = {1} by FINSEQ_1:2, FINSEQ_1:def_3;
then 1 in dom (<*A*> (+) G) by TARSKI:def_1;
then (<*A*> (+) G) . 1 = (<*A*> . 1) + (G . 1) by Def10
.= A + (G . 1) by FINSEQ_1:40 ;
hence <*A*> (+) G = <*(A + (G . 1))*> by A1, FINSEQ_1:40; ::_thesis: verum
end;
theorem Th69: :: MATRIXJ1:69
for K being Field
for A1, A2 being Matrix of K holds <*A1*> (+) <*A2*> = <*(A1 + A2)*>
proof
let K be Field; ::_thesis: for A1, A2 being Matrix of K holds <*A1*> (+) <*A2*> = <*(A1 + A2)*>
let A1, A2 be Matrix of K; ::_thesis: <*A1*> (+) <*A2*> = <*(A1 + A2)*>
thus <*A1*> (+) <*A2*> = <*(A1 + (<*A2*> . 1))*> by Th68
.= <*(A1 + A2)*> by FINSEQ_1:40 ; ::_thesis: verum
end;
theorem Th70: :: MATRIXJ1:70
for K being Field
for A1, B1, A2, B2 being Matrix of K holds <*A1,B1*> (+) <*A2,B2*> = <*(A1 + A2),(B1 + B2)*>
proof
let K be Field; ::_thesis: for A1, B1, A2, B2 being Matrix of K holds <*A1,B1*> (+) <*A2,B2*> = <*(A1 + A2),(B1 + B2)*>
let A1, B1, A2, B2 be Matrix of K; ::_thesis: <*A1,B1*> (+) <*A2,B2*> = <*(A1 + A2),(B1 + B2)*>
A1: len <*A2*> = 1 by FINSEQ_1:39;
len <*A1*> = 1 by FINSEQ_1:39;
hence <*A1,B1*> (+) <*A2,B2*> = (<*A1*> (+) <*A2*>) ^ (<*B1*> (+) <*B2*>) by A1, Th67
.= (<*A1*> (+) <*A2*>) ^ <*(B1 + B2)*> by Th69
.= <*(A1 + A2),(B1 + B2)*> by Th69 ;
::_thesis: verum
end;
Lm8: for i being Nat
for K being Field
for A1, A2 being Matrix of K st width A1 = width A2 & i in dom A1 holds
Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i))
proof
let i be Nat; ::_thesis: for K being Field
for A1, A2 being Matrix of K st width A1 = width A2 & i in dom A1 holds
Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i))
let K be Field; ::_thesis: for A1, A2 being Matrix of K st width A1 = width A2 & i in dom A1 holds
Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i))
let A1, A2 be Matrix of K; ::_thesis: ( width A1 = width A2 & i in dom A1 implies Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i)) )
assume that
A1: width A1 = width A2 and
A2: i in dom A1 ; ::_thesis: Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i))
reconsider L1 = Line (A1,i), L2 = Line (A2,i) as Element of (width A1) -tuples_on the carrier of K by A1;
percases ( width A1 = 0 or width A1 > 0 ) ;
supposeA3: width A1 = 0 ; ::_thesis: Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i))
then width (A1 + A2) = 0 by MATRIX_3:def_3;
then Line ((A1 + A2),i) = <*> the carrier of K
.= L1 + L2 by A3 ;
hence Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i)) ; ::_thesis: verum
end;
suppose width A1 > 0 ; ::_thesis: Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i))
then width A1 in Seg (width A1) by FINSEQ_1:3;
then [i,(width A1)] in Indices A1 by A2, ZFMISC_1:87;
hence Line ((A1 + A2),i) = (Line (A1,i)) + (Line (A2,i)) by A1, MATRIX_4:59; ::_thesis: verum
end;
end;
end;
theorem Th71: :: MATRIXJ1:71
for K being Field
for a1, a2 being Element of K
for A1, B1, A2, B2 being Matrix of K st len A1 = len B1 & len A2 = len B2 & width A1 = width B1 & width A2 = width B2 holds
(block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2)) = block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))
proof
let K be Field; ::_thesis: for a1, a2 being Element of K
for A1, B1, A2, B2 being Matrix of K st len A1 = len B1 & len A2 = len B2 & width A1 = width B1 & width A2 = width B2 holds
(block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2)) = block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))
let a1, a2 be Element of K; ::_thesis: for A1, B1, A2, B2 being Matrix of K st len A1 = len B1 & len A2 = len B2 & width A1 = width B1 & width A2 = width B2 holds
(block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2)) = block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))
let A1, B1, A2, B2 be Matrix of K; ::_thesis: ( len A1 = len B1 & len A2 = len B2 & width A1 = width B1 & width A2 = width B2 implies (block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2)) = block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2)) )
assume that
A1: len A1 = len B1 and
A2: len A2 = len B2 and
A3: width A1 = width B1 and
A4: width A2 = width B2 ; ::_thesis: (block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2)) = block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))
set b12 = <*B1,B2*>;
set a12 = <*A1,A2*>;
set AB2 = A2 + B2;
set AB1 = A1 + B1;
set ab = <*A1,A2*> (+) <*B1,B2*>;
set bA = block_diagonal (<*A1,A2*>,a1);
set bB = block_diagonal (<*B1,B2*>,a2);
set bAB = block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2));
A5: len ((block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2))) = len (block_diagonal (<*A1,A2*>,a1)) by MATRIX_3:def_3;
width ((block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2))) = width (block_diagonal (<*A1,A2*>,a1)) by MATRIX_3:def_3;
then reconsider bAbB = (block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2)) as Matrix of len (block_diagonal (<*A1,A2*>,a1)), width (block_diagonal (<*A1,A2*>,a1)),K by A5, MATRIX_2:7;
A6: len (A1 + B1) = len A1 by MATRIX_3:def_3;
A7: len (block_diagonal (<*A1,A2*>,a1)) = Sum (Len <*A1,A2*>) by Def5;
A8: Sum (Len <*A1,A2*>) = (len A1) + (len A2) by Th16;
A9: len (A2 + B2) = len A2 by MATRIX_3:def_3;
A10: Sum (Width <*B1,B2*>) = (width B1) + (width B2) by Th20;
A11: len (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) = Sum (Len (<*A1,A2*> (+) <*B1,B2*>)) by Def5;
A12: width (block_diagonal (<*B1,B2*>,a2)) = Sum (Width <*B1,B2*>) by Def5;
A13: width (block_diagonal (<*A1,A2*>,a1)) = Sum (Width <*A1,A2*>) by Def5;
A14: width (A2 + B2) = width A2 by MATRIX_3:def_3;
A15: width (A1 + B1) = width A1 by MATRIX_3:def_3;
A16: Len (<*A1,A2*> (+) <*B1,B2*>) = Len <*A1,A2*> by Th66;
A17: <*A1,A2*> (+) <*B1,B2*> = <*(A1 + B1),(A2 + B2)*> by Th70;
now__::_thesis:_for_i_being_Nat_st_1_<=_i_&_i_<=_len_(block_diagonal_((<*A1,A2*>_(+)_<*B1,B2*>),(a1_+_a2)))_holds_
(block_diagonal_((<*A1,A2*>_(+)_<*B1,B2*>),(a1_+_a2)))_._i_=_((block_diagonal_(<*A1,A2*>,a1))_+_(block_diagonal_(<*B1,B2*>,a2)))_._i
A18: dom (block_diagonal (<*A1,A2*>,a1)) = Seg (len (block_diagonal (<*A1,A2*>,a1))) by FINSEQ_1:def_3;
let i be Nat; ::_thesis: ( 1 <= i & i <= len (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) implies (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = ((block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2))) . i )
assume that
A19: 1 <= i and
A20: i <= len (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) ; ::_thesis: (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = ((block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2))) . i
A21: i in Seg (len (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2)))) by A19, A20, FINSEQ_1:1;
then A22: (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = Line ((block_diagonal (<*(A1 + B1),(A2 + B2)*>,(a1 + a2))),i) by A17, A11, MATRIX_2:8;
A23: bAbB . i = Line (((block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2))),i) by A16, A7, A11, A21, MATRIX_2:8;
A24: dom (A1 ^ A2) = Seg (len (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2)))) by A8, A16, A11, FINSEQ_1:def_7;
now__::_thesis:_(block_diagonal_((<*A1,A2*>_(+)_<*B1,B2*>),(a1_+_a2)))_._i_=_bAbB_._i
percases ( i in dom A1 or ex n being Nat st
( n in dom A2 & i = (len A1) + n ) ) by A21, A24, FINSEQ_1:25;
supposeA25: i in dom A1 ; ::_thesis: (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = bAbB . i
A26: len (Line (B1,i)) = width B1 by CARD_1:def_7;
A27: dom A1 = dom B1 by A1, FINSEQ_3:29;
A28: len (Line (A1,i)) = width A1 by CARD_1:def_7;
dom A1 = dom (A1 + B1) by A6, FINSEQ_3:29;
hence (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = (Line ((A1 + B1),i)) ^ ((width (A2 + B2)) |-> (a1 + a2)) by A22, A25, Th23
.= ((Line (A1,i)) + (Line (B1,i))) ^ ((width (A2 + B2)) |-> (a1 + a2)) by A3, A25, Lm8
.= ((Line (A1,i)) + (Line (B1,i))) ^ (((width (A2 + B2)) |-> a1) + ((width (A2 + B2)) |-> a2)) by FVSUM_1:20
.= ((Line (A1,i)) ^ ((width A2) |-> a1)) + ((Line (B1,i)) ^ ((width B2) |-> a2)) by A3, A4, A14, A28, A26, Th1
.= (Line ((block_diagonal (<*A1,A2*>,a1)),i)) + ((Line (B1,i)) ^ ((width B2) |-> a2)) by A25, Th23
.= (Line ((block_diagonal (<*A1,A2*>,a1)),i)) + (Line ((block_diagonal (<*B1,B2*>,a2)),i)) by A25, A27, Th23
.= bAbB . i by A3, A4, A10, A16, A7, A13, A12, A11, A21, A18, A23, Lm8, Th20 ;
::_thesis: verum
end;
supposeA29: ex n being Nat st
( n in dom A2 & i = (len A1) + n ) ; ::_thesis: (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = bAbB . i
A30: len ((width (A1 + B1)) |-> a1) = width (A1 + B1) by CARD_1:def_7;
A31: dom A2 = dom B2 by A2, FINSEQ_3:29;
A32: len ((width (A1 + B1)) |-> a2) = width (A1 + B1) by CARD_1:def_7;
consider n being Nat such that
A33: n in dom A2 and
A34: i = (len A1) + n by A29;
dom A2 = dom (A2 + B2) by A9, FINSEQ_3:29;
hence (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = ((width (A1 + B1)) |-> (a1 + a2)) ^ (Line ((A2 + B2),n)) by A6, A22, A33, A34, Th23
.= ((width (A1 + B1)) |-> (a1 + a2)) ^ ((Line (A2,n)) + (Line (B2,n))) by A4, A33, Lm8
.= (((width (A1 + B1)) |-> a1) + ((width (A1 + B1)) |-> a2)) ^ ((Line (A2,n)) + (Line (B2,n))) by FVSUM_1:20
.= (((width (A1 + B1)) |-> a1) ^ (Line (A2,n))) + (((width (A1 + B1)) |-> a2) ^ (Line (B2,n))) by A30, A32, Th1
.= (Line ((block_diagonal (<*A1,A2*>,a1)),i)) + (((width B1) |-> a2) ^ (Line (B2,n))) by A3, A15, A33, A34, Th23
.= (Line ((block_diagonal (<*A1,A2*>,a1)),i)) + (Line ((block_diagonal (<*B1,B2*>,a2)),i)) by A1, A33, A34, A31, Th23
.= bAbB . i by A3, A4, A10, A16, A7, A13, A12, A11, A21, A18, A23, Lm8, Th20 ;
::_thesis: verum
end;
end;
end;
hence (block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2))) . i = ((block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2))) . i ; ::_thesis: verum
end;
hence (block_diagonal (<*A1,A2*>,a1)) + (block_diagonal (<*B1,B2*>,a2)) = block_diagonal ((<*A1,A2*> (+) <*B1,B2*>),(a1 + a2)) by A16, A7, A11, A5, FINSEQ_1:14; ::_thesis: verum
end;
theorem :: MATRIXJ1:72
for K being Field
for a1, a2 being Element of K
for R1, R2 being FinSequence_of_Square-Matrix of K st Len R1 = Len R2 & Width R1 = Width R2 holds
(block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
proof
let K be Field; ::_thesis: for a1, a2 being Element of K
for R1, R2 being FinSequence_of_Square-Matrix of K st Len R1 = Len R2 & Width R1 = Width R2 holds
(block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
let a1, a2 be Element of K; ::_thesis: for R1, R2 being FinSequence_of_Square-Matrix of K st Len R1 = Len R2 & Width R1 = Width R2 holds
(block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
let R1, R2 be FinSequence_of_Square-Matrix of K; ::_thesis: ( Len R1 = Len R2 & Width R1 = Width R2 implies (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2)) )
defpred S1[ Nat] means for R1, R2 being FinSequence_of_Square-Matrix of K
for a1, a2 being Element of K st Len R1 = Len R2 & Width R1 = Width R2 & len R1 = $1 holds
(block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2));
assume that
A1: Len R1 = Len R2 and
A2: Width R1 = Width R2 ; ::_thesis: (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
A3: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] )
assume A4: S1[n] ; ::_thesis: S1[n + 1]
set n1 = n + 1;
let R1, R2 be FinSequence_of_Square-Matrix of K; ::_thesis: for a1, a2 being Element of K st Len R1 = Len R2 & Width R1 = Width R2 & len R1 = n + 1 holds
(block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
let a1, a2 be Element of K; ::_thesis: ( Len R1 = Len R2 & Width R1 = Width R2 & len R1 = n + 1 implies (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2)) )
assume that
A5: Len R1 = Len R2 and
A6: Width R1 = Width R2 and
A7: len R1 = n + 1 ; ::_thesis: (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
A8: n + 1 in Seg (n + 1) by FINSEQ_1:4;
set R2n = R2 | n;
A9: R1 = (R1 | n) ^ <*(R1 . (n + 1))*> by A7, FINSEQ_3:55;
set R1n = R1 | n;
set b2n = block_diagonal ((R2 | n),a2);
set b1n = block_diagonal ((R1 | n),a1);
A10: len (R1 | n) = n by A7, FINSEQ_1:59, NAT_1:11;
A11: dom (Len R1) = Seg (n + 1) by A7, FINSEQ_2:124;
then A12: len (R1 . (n + 1)) = (Len R1) . (n + 1) by A8, Def3
.= len (R2 . (n + 1)) by A5, A8, A11, Def3 ;
A13: len R1 = len (Len R2) by A5, CARD_1:def_7
.= len R2 by CARD_1:def_7 ;
then A14: len (R2 | n) = n by A7, FINSEQ_1:59, NAT_1:11;
A15: dom (Width R1) = Seg (n + 1) by A7, FINSEQ_2:124;
then A16: width (R1 . (n + 1)) = (Width R1) . (n + 1) by A8, Def4
.= width (R2 . (n + 1)) by A6, A8, A15, Def4 ;
A17: Len (R1 | n) = (Len R1) | n by Th17
.= Len (R2 | n) by A5, Th17 ;
then A18: len (block_diagonal ((R1 | n),a1)) = Sum (Len (R2 | n)) by Def5
.= len (block_diagonal ((R2 | n),a2)) by Def5 ;
A19: Width (R1 | n) = (Width R1) | n by Th21
.= Width (R2 | n) by A6, Th21 ;
then A20: width (block_diagonal ((R1 | n),a1)) = Sum (Width (R2 | n)) by Def5
.= width (block_diagonal ((R2 | n),a2)) by Def5 ;
A21: R2 = (R2 | n) ^ <*(R2 . (n + 1))*> by A7, A13, FINSEQ_3:55;
hence (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = (block_diagonal (<*(block_diagonal ((R1 | n),a1)),(R1 . (n + 1))*>,a1)) + (block_diagonal (((R2 | n) ^ <*(R2 . (n + 1))*>),a2)) by A9, Th35
.= (block_diagonal (<*(block_diagonal ((R1 | n),a1)),(R1 . (n + 1))*>,a1)) + (block_diagonal (<*(block_diagonal ((R2 | n),a2)),(R2 . (n + 1))*>,a2)) by Th35
.= block_diagonal ((<*(block_diagonal ((R1 | n),a1)),(R1 . (n + 1))*> (+) <*(block_diagonal ((R2 | n),a2)),(R2 . (n + 1))*>),(a1 + a2)) by A18, A20, A12, A16, Th71
.= block_diagonal (<*((block_diagonal ((R1 | n),a1)) + (block_diagonal ((R2 | n),a2))),((R1 . (n + 1)) + (R2 . (n + 1)))*>,(a1 + a2)) by Th70
.= block_diagonal (<*(block_diagonal (((R1 | n) (+) (R2 | n)),(a1 + a2))),((R1 . (n + 1)) + (R2 . (n + 1)))*>,(a1 + a2)) by A4, A10, A17, A19
.= block_diagonal ((((R1 | n) (+) (R2 | n)) ^ <*((R1 . (n + 1)) + (R2 . (n + 1)))*>),(a1 + a2)) by Th35
.= block_diagonal ((((R1 | n) (+) (R2 | n)) ^ (<*(R1 . (n + 1))*> (+) <*(R2 . (n + 1))*>)),(a1 + a2)) by Th69
.= block_diagonal ((R1 (+) R2),(a1 + a2)) by A10, A14, A9, A21, Th67 ;
::_thesis: verum
end;
A22: S1[ 0 ]
proof
let R1, R2 be FinSequence_of_Square-Matrix of K; ::_thesis: for a1, a2 being Element of K st Len R1 = Len R2 & Width R1 = Width R2 & len R1 = 0 holds
(block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
let a1, a2 be Element of K; ::_thesis: ( Len R1 = Len R2 & Width R1 = Width R2 & len R1 = 0 implies (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2)) )
assume that
Len R1 = Len R2 and
Width R1 = Width R2 and
A23: len R1 = 0 ; ::_thesis: (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2))
set b12 = block_diagonal ((R1 (+) R2),(a1 + a2));
set b2 = block_diagonal (R2,a2);
set b1 = block_diagonal (R1,a1);
A24: Len R1 = {} by A23;
Len R1 = Len (R1 (+) R2) by Th66;
then len (block_diagonal ((R1 (+) R2),(a1 + a2))) = 0 by A24, Def5, RVSUM_1:72;
then A25: block_diagonal ((R1 (+) R2),(a1 + a2)) = {} ;
len (block_diagonal (R1,a1)) = 0 by A24, Def5, RVSUM_1:72;
then len ((block_diagonal (R1,a1)) + (block_diagonal (R2,a2))) = 0 by MATRIX_3:def_3;
hence (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2)) by A25; ::_thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch_2(A22, A3);
hence (block_diagonal (R1,a1)) + (block_diagonal (R2,a2)) = block_diagonal ((R1 (+) R2),(a1 + a2)) by A1, A2; ::_thesis: verum
end;
definition
let K be Field;
let G1, G2 be FinSequence_of_Matrix of K;
funcG1 (#) G2 -> FinSequence_of_Matrix of K means :Def11: :: MATRIXJ1:def 11
( dom it = dom G1 & ( for i being Nat st i in dom it holds
it . i = (G1 . i) * (G2 . i) ) );
existence
ex b1 being FinSequence_of_Matrix of K st
( dom b1 = dom G1 & ( for i being Nat st i in dom b1 holds
b1 . i = (G1 . i) * (G2 . i) ) )
proof
deffunc H1( Nat) -> FinSequence of the carrier of K * = (G1 . $1) * (G2 . $1);
consider IT being FinSequence such that
A1: len IT = len G1 and
A2: for k being Nat st k in dom IT holds
IT . k = H1(k) from FINSEQ_1:sch_2();
rng IT c= ( the carrier of K *) *
proof
let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in rng IT or y in ( the carrier of K *) * )
assume y in rng IT ; ::_thesis: y in ( the carrier of K *) *
then consider x being set such that
A3: x in dom IT and
A4: IT . x = y by FUNCT_1:def_3;
reconsider x = x as Nat by A3;
IT . x = (G1 . x) * (G2 . x) by A2, A3;
hence y in ( the carrier of K *) * by A4, FINSEQ_1:def_11; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence of ( the carrier of K *) * by FINSEQ_1:def_4;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_IT_holds_
IT_._i_is_Matrix_of_K
let i be Nat; ::_thesis: ( i in dom IT implies IT . i is Matrix of K )
assume i in dom IT ; ::_thesis: IT . i is Matrix of K
then IT . i = (G1 . i) * (G2 . i) by A2;
hence IT . i is Matrix of K ; ::_thesis: verum
end;
then reconsider IT = IT as FinSequence_of_Matrix of K by Def2;
take IT ; ::_thesis: ( dom IT = dom G1 & ( for i being Nat st i in dom IT holds
IT . i = (G1 . i) * (G2 . i) ) )
thus ( dom IT = dom G1 & ( for i being Nat st i in dom IT holds
IT . i = (G1 . i) * (G2 . i) ) ) by A1, A2, FINSEQ_3:29; ::_thesis: verum
end;
uniqueness
for b1, b2 being FinSequence_of_Matrix of K st dom b1 = dom G1 & ( for i being Nat st i in dom b1 holds
b1 . i = (G1 . i) * (G2 . i) ) & dom b2 = dom G1 & ( for i being Nat st i in dom b2 holds
b2 . i = (G1 . i) * (G2 . i) ) holds
b1 = b2
proof
let T1, T2 be FinSequence_of_Matrix of K; ::_thesis: ( dom T1 = dom G1 & ( for i being Nat st i in dom T1 holds
T1 . i = (G1 . i) * (G2 . i) ) & dom T2 = dom G1 & ( for i being Nat st i in dom T2 holds
T2 . i = (G1 . i) * (G2 . i) ) implies T1 = T2 )
assume that
A5: dom T1 = dom G1 and
A6: for i being Nat st i in dom T1 holds
T1 . i = (G1 . i) * (G2 . i) and
A7: dom T2 = dom G1 and
A8: for i being Nat st i in dom T2 holds
T2 . i = (G1 . i) * (G2 . i) ; ::_thesis: T1 = T2
now__::_thesis:_for_i_being_Nat_st_i_in_dom_G1_holds_
T1_._i_=_T2_._i
let i be Nat; ::_thesis: ( i in dom G1 implies T1 . i = T2 . i )
assume A9: i in dom G1 ; ::_thesis: T1 . i = T2 . i
thus T1 . i = (G1 . i) * (G2 . i) by A5, A6, A9
.= T2 . i by A7, A8, A9 ; ::_thesis: verum
end;
hence T1 = T2 by A5, A7, FINSEQ_1:13; ::_thesis: verum
end;
end;
:: deftheorem Def11 defines (#) MATRIXJ1:def_11_:_
for K being Field
for G1, G2, b4 being FinSequence_of_Matrix of K holds
( b4 = G1 (#) G2 iff ( dom b4 = dom G1 & ( for i being Nat st i in dom b4 holds
b4 . i = (G1 . i) * (G2 . i) ) ) );
theorem Th73: :: MATRIXJ1:73
for K being Field
for G1, G2 being FinSequence_of_Matrix of K st Width G1 = Len G2 holds
( Len (G1 (#) G2) = Len G1 & Width (G1 (#) G2) = Width G2 )
proof
let K be Field; ::_thesis: for G1, G2 being FinSequence_of_Matrix of K st Width G1 = Len G2 holds
( Len (G1 (#) G2) = Len G1 & Width (G1 (#) G2) = Width G2 )
let G1, G2 be FinSequence_of_Matrix of K; ::_thesis: ( Width G1 = Len G2 implies ( Len (G1 (#) G2) = Len G1 & Width (G1 (#) G2) = Width G2 ) )
assume A1: Width G1 = Len G2 ; ::_thesis: ( Len (G1 (#) G2) = Len G1 & Width (G1 (#) G2) = Width G2 )
set G12 = G1 (#) G2;
A2: dom (Len (G1 (#) G2)) = dom (G1 (#) G2) by Def3;
A3: dom (G1 (#) G2) = dom G1 by Def11;
A4: dom (Width G2) = dom G2 by Def4;
A5: dom (Width G1) = dom G1 by Def4;
A6: dom (Len G1) = dom G1 by Def3;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Len_(G1_(#)_G2))_holds_
(Len_(G1_(#)_G2))_._i_=_(Len_G1)_._i
let i be Nat; ::_thesis: ( i in dom (Len (G1 (#) G2)) implies (Len (G1 (#) G2)) . i = (Len G1) . i )
assume A7: i in dom (Len (G1 (#) G2)) ; ::_thesis: (Len (G1 (#) G2)) . i = (Len G1) . i
A8: width (G1 . i) = (Width G1) . i by A2, A5, A3, A7, Def4
.= len (G2 . i) by A1, A2, A5, A3, A7, Def3 ;
thus (Len (G1 (#) G2)) . i = len ((G1 (#) G2) . i) by A7, Def3
.= len ((G1 . i) * (G2 . i)) by A2, A7, Def11
.= len (G1 . i) by A8, MATRIX_3:def_4
.= (Len G1) . i by A6, A2, A3, A7, Def3 ; ::_thesis: verum
end;
hence Len (G1 (#) G2) = Len G1 by A6, A2, A3, FINSEQ_1:13; ::_thesis: Width (G1 (#) G2) = Width G2
A9: dom (Width (G1 (#) G2)) = dom (G1 (#) G2) by Def4;
A10: dom (Len G2) = dom G2 by Def3;
now__::_thesis:_for_i_being_Nat_st_i_in_dom_(Width_(G1_(#)_G2))_holds_
(Width_(G1_(#)_G2))_._i_=_(Width_G2)_._i
let i be Nat; ::_thesis: ( i in dom (Width (G1 (#) G2)) implies (Width (G1 (#) G2)) . i = (Width G2) . i )
assume A11: i in dom (Width (G1 (#) G2)) ; ::_thesis: (Width (G1 (#) G2)) . i = (Width G2) . i
A12: width (G1 . i) = (Width G1) . i by A5, A9, A3, A11, Def4
.= len (G2 . i) by A1, A5, A9, A3, A11, Def3 ;
thus (Width (G1 (#) G2)) . i = width ((G1 (#) G2) . i) by A11, Def4
.= width ((G1 . i) * (G2 . i)) by A9, A11, Def11
.= width (G2 . i) by A12, MATRIX_3:def_4
.= (Width G2) . i by A1, A5, A10, A9, A4, A3, A11, Def4 ; ::_thesis: verum
end;
hence Width (G1 (#) G2) = Width G2 by A1, A5, A10, A9, A4, A3, FINSEQ_1:13; ::_thesis: verum
end;
theorem Th74: :: MATRIXJ1:74
for K being Field
for G, G9, G1, G2 being FinSequence_of_Matrix of K st len G = len G9 holds
(G ^ G1) (#) (G9 ^ G2) = (G (#) G9) ^ (G1 (#) G2)
proof
let K be Field; ::_thesis: for G, G9, G1, G2 being FinSequence_of_Matrix of K st len G = len G9 holds
(G ^ G1) (#) (G9 ^ G2) = (G (#) G9) ^ (G1 (#) G2)
let G, G9, G1, G2 be FinSequence_of_Matrix of K; ::_thesis: ( len G = len G9 implies (G ^ G1) (#) (G9 ^ G2) = (G (#) G9) ^ (G1 (#) G2) )
set GG9 = G (#) G9;
set G12 = G1 (#) G2;
set GG1 = G ^ G1;
set GG2 = G9 ^ G2;
A1: len (G ^ G1) = (len G) + (len G1) by FINSEQ_1:22;
A2: dom (G (#) G9) = dom G by Def11;
then A3: len (G (#) G9) = len G by FINSEQ_3:29;
A4: dom ((G ^ G1) (#) (G9 ^ G2)) = dom (G ^ G1) by Def11;
then A5: len ((G ^ G1) (#) (G9 ^ G2)) = len (G ^ G1) by FINSEQ_3:29;
assume A6: len G = len G9 ; ::_thesis: (G ^ G1) (#) (G9 ^ G2) = (G (#) G9) ^ (G1 (#) G2)
then A7: len (G9 ^ G2) = (len G) + (len G2) by FINSEQ_1:22;
A8: len ((G (#) G9) ^ (G1 (#) G2)) = (len (G (#) G9)) + (len (G1 (#) G2)) by FINSEQ_1:22;
A9: dom (G1 (#) G2) = dom G1 by Def11;
A10: dom G = dom G9 by A6, FINSEQ_3:29;
A11: now__::_thesis:_for_i_being_Nat_st_1_<=_i_&_i_<=_(len_G)_+_(len_G1)_holds_
((G_^_G1)_(#)_(G9_^_G2))_._i_=_((G_(#)_G9)_^_(G1_(#)_G2))_._i
let i be Nat; ::_thesis: ( 1 <= i & i <= (len G) + (len G1) implies ((G ^ G1) (#) (G9 ^ G2)) . i = ((G (#) G9) ^ (G1 (#) G2)) . i )
assume that
A12: 1 <= i and
A13: i <= (len G) + (len G1) ; ::_thesis: ((G ^ G1) (#) (G9 ^ G2)) . i = ((G (#) G9) ^ (G1 (#) G2)) . i
A14: i in dom ((G ^ G1) (#) (G9 ^ G2)) by A4, A1, A12, A13, FINSEQ_3:25;
then A15: ((G ^ G1) (#) (G9 ^ G2)) . i = ((G ^ G1) . i) * ((G9 ^ G2) . i) by Def11;
now__::_thesis:_((G_^_G1)_(#)_(G9_^_G2))_._i_=_((G_(#)_G9)_^_(G1_(#)_G2))_._i
percases ( i in dom G or ex n being Nat st
( n in dom G1 & i = (len G) + n ) ) by A4, A14, FINSEQ_1:25;
supposeA16: i in dom G ; ::_thesis: ((G ^ G1) (#) (G9 ^ G2)) . i = ((G (#) G9) ^ (G1 (#) G2)) . i
hence ((G ^ G1) (#) (G9 ^ G2)) . i = (G . i) * ((G9 ^ G2) . i) by A15, FINSEQ_1:def_7
.= (G . i) * (G9 . i) by A10, A16, FINSEQ_1:def_7
.= (G (#) G9) . i by A2, A16, Def11
.= ((G (#) G9) ^ (G1 (#) G2)) . i by A2, A16, FINSEQ_1:def_7 ;
::_thesis: verum
end;
suppose ex n being Nat st
( n in dom G1 & i = (len G) + n ) ; ::_thesis: ((G ^ G1) (#) (G9 ^ G2)) . i = ((G (#) G9) ^ (G1 (#) G2)) . i
then consider n being Nat such that
A17: n in dom G1 and
A18: i = (len G) + n ;
now__::_thesis:_(G9_^_G2)_._i_=_G2_._n
percases ( n in dom G2 or not n in dom G2 ) ;
suppose n in dom G2 ; ::_thesis: (G9 ^ G2) . i = G2 . n
hence (G9 ^ G2) . i = G2 . n by A6, A18, FINSEQ_1:def_7; ::_thesis: verum
end;
supposeA19: not n in dom G2 ; ::_thesis: (G9 ^ G2) . i = G2 . n
then ( n < 1 or n > len G2 ) by FINSEQ_3:25;
then i > (len G) + (len G2) by A17, A18, FINSEQ_3:25, XREAL_1:8;
then not i in dom (G9 ^ G2) by A7, FINSEQ_3:25;
hence (G9 ^ G2) . i = {} by FUNCT_1:def_2
.= G2 . n by A19, FUNCT_1:def_2 ;
::_thesis: verum
end;
end;
end;
hence ((G ^ G1) (#) (G9 ^ G2)) . i = (G1 . n) * (G2 . n) by A15, A17, A18, FINSEQ_1:def_7
.= (G1 (#) G2) . n by A9, A17, Def11
.= ((G (#) G9) ^ (G1 (#) G2)) . i by A9, A3, A17, A18, FINSEQ_1:def_7 ;
::_thesis: verum
end;
end;
end;
hence ((G ^ G1) (#) (G9 ^ G2)) . i = ((G (#) G9) ^ (G1 (#) G2)) . i ; ::_thesis: verum
end;
len (G1 (#) G2) = len G1 by A9, FINSEQ_3:29;
hence (G ^ G1) (#) (G9 ^ G2) = (G (#) G9) ^ (G1 (#) G2) by A3, A5, A1, A8, A11, FINSEQ_1:14; ::_thesis: verum
end;
theorem Th75: :: MATRIXJ1:75
for K being Field
for A being Matrix of K
for G being FinSequence_of_Matrix of K holds <*A*> (#) G = <*(A * (G . 1))*>
proof
let K be Field; ::_thesis: for A being Matrix of K
for G being FinSequence_of_Matrix of K holds <*A*> (#) G = <*(A * (G . 1))*>
let A be Matrix of K; ::_thesis: for G being FinSequence_of_Matrix of K holds <*A*> (#) G = <*(A * (G . 1))*>
let G be FinSequence_of_Matrix of K; ::_thesis: <*A*> (#) G = <*(A * (G . 1))*>
dom (<*A*> (#) G) = dom <*A*> by Def11;
then A1: len (<*A*> (#) G) = len <*A*> by FINSEQ_3:29
.= 1 by FINSEQ_1:39 ;
then dom (<*A*> (#) G) = {1} by FINSEQ_1:2, FINSEQ_1:def_3;
then 1 in dom (<*A*> (#) G) by TARSKI:def_1;
then (<*A*> (#) G) . 1 = (<*A*> . 1) * (G . 1) by Def11
.= A * (G . 1) by FINSEQ_1:40 ;
hence <*A*> (#) G = <*(A * (G . 1))*> by A1, FINSEQ_1:40; ::_thesis: verum
end;
theorem Th76: :: MATRIXJ1:76
for K being Field
for A1, A2 being Matrix of K holds <*A1*> (#) <*A2*> = <*(A1 * A2)*>
proof
let K be Field; ::_thesis: for A1, A2 being Matrix of K holds <*A1*> (#) <*A2*> = <*(A1 * A2)*>
let A1, A2 be Matrix of K; ::_thesis: <*A1*> (#) <*A2*> = <*(A1 * A2)*>
thus <*A1*> (#) <*A2*> = <*(A1 * (<*A2*> . 1))*> by Th75
.= <*(A1 * A2)*> by FINSEQ_1:40 ; ::_thesis: verum
end;
theorem Th77: :: MATRIXJ1:77
for K being Field
for A1, B1, A2, B2 being Matrix of K holds <*A1,B1*> (#) <*A2,B2*> = <*(A1 * A2),(B1 * B2)*>
proof
let K be Field; ::_thesis: for A1, B1, A2, B2 being Matrix of K holds <*A1,B1*> (#) <*A2,B2*> = <*(A1 * A2),(B1 * B2)*>
let A1, B1, A2, B2 be Matrix of K; ::_thesis: <*A1,B1*> (#) <*A2,B2*> = <*(A1 * A2),(B1 * B2)*>
A1: len <*A2*> = 1 by FINSEQ_1:39;
len <*A1*> = 1 by FINSEQ_1:39;
hence <*A1,B1*> (#) <*A2,B2*> = (<*A1*> (#) <*A2*>) ^ (<*B1*> (#) <*B2*>) by A1, Th74
.= (<*A1*> (#) <*A2*>) ^ <*(B1 * B2)*> by Th76
.= <*(A1 * A2),(B1 * B2)*> by Th76 ;
::_thesis: verum
end;
Lm9: for i, j being Nat
for K being Field
for R1, S1 being Element of i -tuples_on the carrier of K
for R2, S2 being Element of j -tuples_on the carrier of K holds Sum (mlt ((R1 ^ R2),(S1 ^ S2))) = (Sum (mlt (R1,S1))) + (Sum (mlt (R2,S2)))
proof
let i, j be Nat; ::_thesis: for K being Field
for R1, S1 being Element of i -tuples_on the carrier of K
for R2, S2 being Element of j -tuples_on the carrier of K holds Sum (mlt ((R1 ^ R2),(S1 ^ S2))) = (Sum (mlt (R1,S1))) + (Sum (mlt (R2,S2)))
let K be Field; ::_thesis: for R1, S1 being Element of i -tuples_on the carrier of K
for R2, S2 being Element of j -tuples_on the carrier of K holds Sum (mlt ((R1 ^ R2),(S1 ^ S2))) = (Sum (mlt (R1,S1))) + (Sum (mlt (R2,S2)))
let R1, S1 be Element of i -tuples_on the carrier of K; ::_thesis: for R2, S2 being Element of j -tuples_on the carrier of K holds Sum (mlt ((R1 ^ R2),(S1 ^ S2))) = (Sum (mlt (R1,S1))) + (Sum (mlt (R2,S2)))
let R2, S2 be Element of j -tuples_on the carrier of K; ::_thesis: Sum (mlt ((R1 ^ R2),(S1 ^ S2))) = (Sum (mlt (R1,S1))) + (Sum (mlt (R2,S2)))
mlt ((R1 ^ R2),(S1 ^ S2)) = (mlt (R1,S1)) ^ (mlt (R2,S2)) by FINSEQOP:11;
hence Sum (mlt ((R1 ^ R2),(S1 ^ S2))) = (Sum (mlt (R1,S1))) + (Sum (mlt (R2,S2))) by RLVECT_1:41; ::_thesis: verum
end;
theorem Th78: :: MATRIXJ1:78
for K being Field
for A1, B1, A2, B2 being Matrix of K st width A1 = len B1 & width A2 = len B2 holds
(block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K))) = block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))
proof
let K be Field; ::_thesis: for A1, B1, A2, B2 being Matrix of K st width A1 = len B1 & width A2 = len B2 holds
(block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K))) = block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))
let A1, B1, A2, B2 be Matrix of K; ::_thesis: ( width A1 = len B1 & width A2 = len B2 implies (block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K))) = block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K)) )
assume that
A1: width A1 = len B1 and
A2: width A2 = len B2 ; ::_thesis: (block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K))) = block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))
A3: width (A1 * B1) = width B1 by A1, MATRIX_3:def_4;
set b12 = <*B1,B2*>;
set a12 = <*A1,A2*>;
set b2 = <*B2*>;
set b1 = <*B1*>;
set a2 = <*A2*>;
set a1 = <*A1*>;
set ab = <*A1,A2*> (#) <*B1,B2*>;
A4: Len <*B1,B2*> = (Len <*B1*>) ^ (Len <*B2*>) by Th14;
set bB = block_diagonal (<*B1,B2*>,(0. K));
set bA = block_diagonal (<*A1,A2*>,(0. K));
A5: Sum (Width <*A1,A2*>) = width (block_diagonal (<*A1,A2*>,(0. K))) by Def5;
A6: Sum (Len <*B1,B2*>) = len (block_diagonal (<*B1,B2*>,(0. K))) by Def5;
A7: Width <*A1*> = <*(width A1)*> by Th19;
set bAbB = (block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)));
set bAB = block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K));
A8: Sum (Len (<*A1,A2*> (#) <*B1,B2*>)) = len (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) by Def5;
A9: Sum (Width (<*A1,A2*> (#) <*B1,B2*>)) = width (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) by Def5;
A10: Sum (Len <*A1,A2*>) = (len A1) + (len A2) by Th16;
A11: Sum (Width <*B1,B2*>) = (width B1) + (width B2) by Th20;
A12: len (A2 * B2) = len A2 by A2, MATRIX_3:def_4;
A13: <*A1,A2*> (#) <*B1,B2*> = <*(A1 * B1),(A2 * B2)*> by Th77;
A14: Width <*A2*> = <*(width A2)*> by Th19;
A15: Len <*B2*> = <*(len B2)*> by Th15;
A16: Len <*B1*> = <*(len B1)*> by Th15;
A17: Width <*A1,A2*> = (Width <*A1*>) ^ (Width <*A2*>) by Th18;
then A18: Len (<*A1,A2*> (#) <*B1,B2*>) = Len <*A1,A2*> by A1, A2, A4, A7, A14, A16, A15, Th73;
A19: Width (<*A1,A2*> (#) <*B1,B2*>) = Width <*B1,B2*> by A1, A2, A17, A4, A7, A14, A16, A15, Th73;
Sum (Len <*A1,A2*>) = len (block_diagonal (<*A1,A2*>,(0. K))) by Def5;
then A20: len ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) = Sum (Len <*A1,A2*>) by A1, A2, A17, A4, A7, A14, A16, A15, A5, A6, MATRIX_3:def_4;
A21: len (A1 * B1) = len A1 by A1, MATRIX_3:def_4;
Sum (Width <*B1,B2*>) = width (block_diagonal (<*B1,B2*>,(0. K))) by Def5;
then A22: width ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) = Sum (Width <*B1,B2*>) by A1, A2, A17, A4, A7, A14, A16, A15, A5, A6, MATRIX_3:def_4;
A23: width (A2 * B2) = width B2 by A2, MATRIX_3:def_4;
A24: Indices (A1 * B1) = [:(Seg (len (A1 * B1))),(Seg (width (A1 * B1))):] by FINSEQ_1:def_3
.= [:(dom A1),(Seg (width B1)):] by A3, A21, FINSEQ_1:def_3 ;
now__::_thesis:_for_i,_j_being_Nat_st_[i,j]_in_Indices_(block_diagonal_((<*A1,A2*>_(#)_<*B1,B2*>),(0._K)))_holds_
(block_diagonal_((<*A1,A2*>_(#)_<*B1,B2*>),(0._K)))_*_(i,j)_=_((block_diagonal_(<*A1,A2*>,(0._K)))_*_(block_diagonal_(<*B1,B2*>,(0._K))))_*_(i,j)
A25: dom (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) = Seg (len (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K)))) by FINSEQ_1:def_3;
let i, j be Nat; ::_thesis: ( [i,j] in Indices (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) implies (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) = ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) )
assume A26: [i,j] in Indices (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) ; ::_thesis: (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) = ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j)
A27: j in Seg (width (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K)))) by A26, ZFMISC_1:87;
A28: i in dom (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) by A26, ZFMISC_1:87;
then A29: 1 <= i by A25, FINSEQ_1:1;
Indices (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) = [:(Seg (len (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))))),(Seg (width (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))))):] by FINSEQ_1:def_3
.= Indices ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) by A8, A9, A20, A22, A18, A19, FINSEQ_1:def_3 ;
then A30: ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (Line ((block_diagonal (<*A1,A2*>,(0. K))),i)) "*" (Col ((block_diagonal (<*B1,B2*>,(0. K))),j)) by A1, A2, A17, A4, A7, A14, A16, A15, A5, A6, A26, MATRIX_3:def_4
.= Sum (mlt ((Line ((block_diagonal (<*A1,A2*>,(0. K))),i)),(Col ((block_diagonal (<*B1,B2*>,(0. K))),j)))) ;
A31: 1 <= j by A27, FINSEQ_1:1;
now__::_thesis:_((block_diagonal_(<*A1,A2*>,(0._K)))_*_(block_diagonal_(<*B1,B2*>,(0._K))))_*_(i,j)_=_(block_diagonal_((<*A1,A2*>_(#)_<*B1,B2*>),(0._K)))_*_(i,j)
percases ( i <= len A1 or i > len A1 ) ;
supposeA32: i <= len A1 ; ::_thesis: ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j)
then A33: i in dom (A1 * B1) by A21, A29, FINSEQ_3:25;
A34: i in dom A1 by A29, A32, FINSEQ_3:25;
then A35: Line ((block_diagonal (<*A1,A2*>,(0. K))),i) = (Line (A1,i)) ^ ((width A2) |-> (0. K)) by Th23;
now__::_thesis:_((block_diagonal_(<*A1,A2*>,(0._K)))_*_(block_diagonal_(<*B1,B2*>,(0._K))))_*_(i,j)_=_(block_diagonal_((<*A1,A2*>_(#)_<*B1,B2*>),(0._K)))_*_(i,j)
percases ( j <= width B1 or j > width B1 ) ;
suppose j <= width B1 ; ::_thesis: ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j)
then A36: j in Seg (width B1) by A31, FINSEQ_1:1;
then A37: [i,j] in Indices (A1 * B1) by A24, A34, ZFMISC_1:87;
A38: dom (Line ((A1 * B1),i)) = Seg (width B1) by A3, FINSEQ_2:124;
Col ((block_diagonal (<*B1,B2*>,(0. K))),j) = (Col (B1,j)) ^ ((len B2) |-> (0. K)) by A36, Th24;
hence ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (Sum (mlt ((Line (A1,i)),(Col (B1,j))))) + (Sum (mlt (((width A2) |-> (0. K)),((len B2) |-> (0. K))))) by A1, A2, A30, A35, Lm9
.= (Sum (mlt ((Line (A1,i)),(Col (B1,j))))) + (Sum ((0. K) * ((width A2) |-> (0. K)))) by A2, FVSUM_1:66
.= (Sum (mlt ((Line (A1,i)),(Col (B1,j))))) + ((0. K) * (Sum ((width A2) |-> (0. K)))) by FVSUM_1:73
.= (Sum (mlt ((Line (A1,i)),(Col (B1,j))))) + (0. K) by VECTSP_1:6
.= (Line (A1,i)) "*" (Col (B1,j)) by RLVECT_1:def_4
.= (A1 * B1) * (i,j) by A1, A37, MATRIX_3:def_4
.= (Line ((A1 * B1),i)) . j by A3, A36, MATRIX_1:def_7
.= ((Line ((A1 * B1),i)) ^ ((width (A2 * B2)) |-> (0. K))) . j by A36, A38, FINSEQ_1:def_7
.= (Line ((block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))),i)) . j by A13, A33, Th23
.= (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) by A27, MATRIX_1:def_7 ;
::_thesis: verum
end;
supposeA39: j > width B1 ; ::_thesis: ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j)
then reconsider J = j - (width B1) as Element of NAT by NAT_1:21;
A40: j = J + (width B1) ;
A41: len (Line ((A1 * B1),i)) = width B1 by A3, CARD_1:def_7;
A42: dom ((width (A2 * B2)) |-> (0. K)) = Seg (width B2) by A23, FINSEQ_2:124;
J <> 0 by A39;
then A43: J in Seg (width B2) by A9, A19, A11, A27, A40, FINSEQ_1:61;
then Col ((block_diagonal (<*B1,B2*>,(0. K))),(J + (width B1))) = ((len B1) |-> (0. K)) ^ (Col (B2,J)) by Th24;
hence ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (Sum (mlt ((Line (A1,i)),((len B1) |-> (0. K))))) + (Sum (mlt (((width A2) |-> (0. K)),(Col (B2,J))))) by A1, A2, A30, A35, Lm9
.= (Sum (mlt ((Line (A1,i)),((len B1) |-> (0. K))))) + (Sum ((0. K) * (Col (B2,J)))) by A2, FVSUM_1:66
.= (Sum ((0. K) * (Line (A1,i)))) + (Sum ((0. K) * (Col (B2,J)))) by A1, FVSUM_1:66
.= (Sum ((0. K) * (Line (A1,i)))) + ((0. K) * (Sum (Col (B2,J)))) by FVSUM_1:73
.= ((0. K) * (Sum (Line (A1,i)))) + ((0. K) * (Sum (Col (B2,J)))) by FVSUM_1:73
.= ((0. K) * (Sum (Line (A1,i)))) + (0. K) by VECTSP_1:6
.= (0. K) + (0. K) by VECTSP_1:6
.= 0. K by RLVECT_1:def_4
.= ((width (A2 * B2)) |-> (0. K)) . J by A23, A43, FINSEQ_2:57
.= ((Line ((A1 * B1),i)) ^ ((width (A2 * B2)) |-> (0. K))) . (J + (width (A1 * B1))) by A3, A43, A41, A42, FINSEQ_1:def_7
.= (Line ((block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))),i)) . j by A13, A3, A33, Th23
.= (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) by A27, MATRIX_1:def_7 ;
::_thesis: verum
end;
end;
end;
hence ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) ; ::_thesis: verum
end;
supposeA44: i > len A1 ; ::_thesis: ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j)
then reconsider I = i - (len A1) as Element of NAT by NAT_1:21;
A45: i = I + (len A1) ;
A46: dom A2 = dom (A2 * B2) by A12, FINSEQ_3:29;
I <> 0 by A44;
then I in Seg (len A2) by A8, A18, A10, A28, A25, A45, FINSEQ_1:61;
then A47: I in dom A2 by FINSEQ_1:def_3;
then A48: Line ((block_diagonal (<*A1,A2*>,(0. K))),(I + (len A1))) = ((width A1) |-> (0. K)) ^ (Line (A2,I)) by Th23;
now__::_thesis:_((block_diagonal_(<*A1,A2*>,(0._K)))_*_(block_diagonal_(<*B1,B2*>,(0._K))))_*_(i,j)_=_(block_diagonal_((<*A1,A2*>_(#)_<*B1,B2*>),(0._K)))_*_(i,j)
percases ( j <= width B1 or j > width B1 ) ;
supposeA49: j <= width B1 ; ::_thesis: ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j)
A50: dom ((width (A1 * B1)) |-> (0. K)) = Seg (width B1) by A3, FINSEQ_2:124;
A51: j in Seg (width B1) by A31, A49, FINSEQ_1:1;
then Col ((block_diagonal (<*B1,B2*>,(0. K))),j) = (Col (B1,j)) ^ ((len B2) |-> (0. K)) by Th24;
hence ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (Sum (mlt (((width A1) |-> (0. K)),(Col (B1,j))))) + (Sum (mlt ((Line (A2,I)),((len B2) |-> (0. K))))) by A1, A2, A30, A48, Lm9
.= (Sum (mlt (((width A1) |-> (0. K)),(Col (B1,j))))) + (Sum ((0. K) * (Line (A2,I)))) by A2, FVSUM_1:66
.= (Sum ((0. K) * (Col (B1,j)))) + (Sum ((0. K) * (Line (A2,I)))) by A1, FVSUM_1:66
.= (Sum ((0. K) * (Col (B1,j)))) + ((0. K) * (Sum (Line (A2,I)))) by FVSUM_1:73
.= ((0. K) * (Sum (Col (B1,j)))) + ((0. K) * (Sum (Line (A2,I)))) by FVSUM_1:73
.= ((0. K) * (Sum (Col (B1,j)))) + (0. K) by VECTSP_1:6
.= (0. K) + (0. K) by VECTSP_1:6
.= 0. K by RLVECT_1:def_4
.= ((width (A1 * B1)) |-> (0. K)) . j by A3, A51, FINSEQ_2:57
.= (((width (A1 * B1)) |-> (0. K)) ^ (Line ((A2 * B2),I))) . j by A51, A50, FINSEQ_1:def_7
.= (Line ((block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))),(I + (len A1)))) . j by A13, A21, A47, A46, Th23
.= (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) by A27, MATRIX_1:def_7 ;
::_thesis: verum
end;
supposeA52: j > width B1 ; ::_thesis: ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j)
then reconsider J = j - (width B1) as Element of NAT by NAT_1:21;
A53: j = J + (width B1) ;
J <> 0 by A52;
then A54: J in Seg (width B2) by A9, A19, A11, A27, A53, FINSEQ_1:61;
then A55: [I,J] in Indices (A2 * B2) by A23, A47, A46, ZFMISC_1:87;
A56: len ((width (A1 * B1)) |-> (0. K)) = width B1 by A3, CARD_1:def_7;
A57: dom (Line ((A2 * B2),I)) = Seg (width B2) by A23, FINSEQ_2:124;
Col ((block_diagonal (<*B1,B2*>,(0. K))),(J + (width B1))) = ((len B1) |-> (0. K)) ^ (Col (B2,J)) by A54, Th24;
hence ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (Sum (mlt (((width A1) |-> (0. K)),((len B1) |-> (0. K))))) + (Sum (mlt ((Line (A2,I)),(Col (B2,J))))) by A1, A2, A30, A48, Lm9
.= (Sum ((0. K) * ((width A1) |-> (0. K)))) + (Sum (mlt ((Line (A2,I)),(Col (B2,J))))) by A1, FVSUM_1:66
.= ((0. K) * (Sum ((width A1) |-> (0. K)))) + (Sum (mlt ((Line (A2,I)),(Col (B2,J))))) by FVSUM_1:73
.= (0. K) + (Sum (mlt ((Line (A2,I)),(Col (B2,J))))) by VECTSP_1:6
.= (Line (A2,I)) "*" (Col (B2,J)) by RLVECT_1:def_4
.= (A2 * B2) * (I,J) by A2, A55, MATRIX_3:def_4
.= (Line ((A2 * B2),I)) . J by A23, A54, MATRIX_1:def_7
.= (((width (A1 * B1)) |-> (0. K)) ^ (Line ((A2 * B2),I))) . (J + (width B1)) by A54, A57, A56, FINSEQ_1:def_7
.= (Line ((block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))),(I + (len A1)))) . j by A13, A21, A47, A46, Th23
.= (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) by A27, MATRIX_1:def_7 ;
::_thesis: verum
end;
end;
end;
hence ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) = (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) ; ::_thesis: verum
end;
end;
end;
hence (block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K))) * (i,j) = ((block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K)))) * (i,j) ; ::_thesis: verum
end;
hence (block_diagonal (<*A1,A2*>,(0. K))) * (block_diagonal (<*B1,B2*>,(0. K))) = block_diagonal ((<*A1,A2*> (#) <*B1,B2*>),(0. K)) by A8, A9, A20, A22, A18, A19, MATRIX_1:21; ::_thesis: verum
end;
theorem :: MATRIXJ1:79
for K being Field
for R1, R2 being FinSequence_of_Square-Matrix of K st Width R1 = Len R2 holds
(block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K))
proof
let K be Field; ::_thesis: for R1, R2 being FinSequence_of_Square-Matrix of K st Width R1 = Len R2 holds
(block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K))
let R1, R2 be FinSequence_of_Square-Matrix of K; ::_thesis: ( Width R1 = Len R2 implies (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K)) )
defpred S1[ Nat] means for R1, R2 being FinSequence_of_Square-Matrix of K st Width R1 = Len R2 & len R1 = $1 holds
(block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K));
assume A1: Width R1 = Len R2 ; ::_thesis: (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K))
A2: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] )
assume A3: S1[n] ; ::_thesis: S1[n + 1]
set n1 = n + 1;
let R1, R2 be FinSequence_of_Square-Matrix of K; ::_thesis: ( Width R1 = Len R2 & len R1 = n + 1 implies (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K)) )
assume that
A4: Width R1 = Len R2 and
A5: len R1 = n + 1 ; ::_thesis: (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K))
A6: n + 1 in Seg (n + 1) by FINSEQ_1:4;
set R1n = R1 | n;
A7: len (R1 | n) = n by A5, FINSEQ_1:59, NAT_1:11;
set R2n = R2 | n;
A8: len R1 = len (Len R2) by A4, CARD_1:def_7
.= len R2 by CARD_1:def_7 ;
then A9: len (R2 | n) = n by A5, FINSEQ_1:59, NAT_1:11;
set b2n = block_diagonal ((R2 | n),(0. K));
set b1n = block_diagonal ((R1 | n),(0. K));
A10: Width (R1 | n) = (Width R1) | n by Th21
.= Len (R2 | n) by A4, Th17 ;
A11: dom (Width R1) = Seg (n + 1) by A5, FINSEQ_2:124;
then A12: width (R1 . (n + 1)) = (Len R2) . (n + 1) by A4, A6, Def4
.= len (R2 . (n + 1)) by A4, A6, A11, Def3 ;
A13: R1 = (R1 | n) ^ <*(R1 . (n + 1))*> by A5, FINSEQ_3:55;
A14: width (block_diagonal ((R1 | n),(0. K))) = Sum (Width (R1 | n)) by Def5
.= len (block_diagonal ((R2 | n),(0. K))) by A10, Def5 ;
A15: R2 = (R2 | n) ^ <*(R2 . (n + 1))*> by A5, A8, FINSEQ_3:55;
hence (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = (block_diagonal (<*(block_diagonal ((R1 | n),(0. K))),(R1 . (n + 1))*>,(0. K))) * (block_diagonal (((R2 | n) ^ <*(R2 . (n + 1))*>),(0. K))) by A13, Th35
.= (block_diagonal (<*(block_diagonal ((R1 | n),(0. K))),(R1 . (n + 1))*>,(0. K))) * (block_diagonal (<*(block_diagonal ((R2 | n),(0. K))),(R2 . (n + 1))*>,(0. K))) by Th35
.= block_diagonal ((<*(block_diagonal ((R1 | n),(0. K))),(R1 . (n + 1))*> (#) <*(block_diagonal ((R2 | n),(0. K))),(R2 . (n + 1))*>),(0. K)) by A14, A12, Th78
.= block_diagonal (<*((block_diagonal ((R1 | n),(0. K))) * (block_diagonal ((R2 | n),(0. K)))),((R1 . (n + 1)) * (R2 . (n + 1)))*>,(0. K)) by Th77
.= block_diagonal (<*(block_diagonal (((R1 | n) (#) (R2 | n)),(0. K))),((R1 . (n + 1)) * (R2 . (n + 1)))*>,(0. K)) by A3, A7, A10
.= block_diagonal ((((R1 | n) (#) (R2 | n)) ^ <*((R1 . (n + 1)) * (R2 . (n + 1)))*>),(0. K)) by Th35
.= block_diagonal ((((R1 | n) (#) (R2 | n)) ^ (<*(R1 . (n + 1))*> (#) <*(R2 . (n + 1))*>)),(0. K)) by Th76
.= block_diagonal ((R1 (#) R2),(0. K)) by A7, A9, A13, A15, Th74 ;
::_thesis: verum
end;
A16: S1[ 0 ]
proof
let R1, R2 be FinSequence_of_Square-Matrix of K; ::_thesis: ( Width R1 = Len R2 & len R1 = 0 implies (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K)) )
assume that
A17: Width R1 = Len R2 and
A18: len R1 = 0 ; ::_thesis: (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K))
A19: Sum (Width R1) = 0 by A18, RVSUM_1:72;
set b2 = block_diagonal (R2,(0. K));
Len R2 = {} by A17, A18;
then A20: len (block_diagonal (R2,(0. K))) = 0 by Def5, RVSUM_1:72;
set b1 = block_diagonal (R1,(0. K));
A21: Sum (Width R1) = width (block_diagonal (R1,(0. K))) by Def5;
set b12 = block_diagonal ((R1 (#) R2),(0. K));
A22: Len R1 = {} by A18;
Len R1 = Len (R1 (#) R2) by A17, Th73;
then len (block_diagonal ((R1 (#) R2),(0. K))) = 0 by A22, Def5, RVSUM_1:72;
then A23: block_diagonal ((R1 (#) R2),(0. K)) = {} ;
len (block_diagonal (R1,(0. K))) = 0 by A22, Def5, RVSUM_1:72;
then len ((block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K)))) = 0 by A20, A21, A19, MATRIX_3:def_4;
hence (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K)) by A23; ::_thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch_2(A16, A2);
hence (block_diagonal (R1,(0. K))) * (block_diagonal (R2,(0. K))) = block_diagonal ((R1 (#) R2),(0. K)) by A1; ::_thesis: verum
end;