MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  mpt2matmul Structured version   Unicode version

Theorem mpt2matmul 18743
Description: Multiplication of two N x N matrices given in maps-to notation. (Contributed by AV, 29-Oct-2019.)
Hypotheses
Ref Expression
mpt2matmul.a  |-  A  =  ( N Mat  R )
mpt2matmul.b  |-  B  =  ( Base `  R
)
mpt2matmul.m  |-  .X.  =  ( .r `  A )
mpt2matmul.t  |-  .x.  =  ( .r `  R )
mpt2matmul.r  |-  ( ph  ->  R  e.  V )
mpt2matmul.n  |-  ( ph  ->  N  e.  Fin )
mpt2matmul.x  |-  X  =  ( i  e.  N ,  j  e.  N  |->  C )
mpt2matmul.y  |-  Y  =  ( i  e.  N ,  j  e.  N  |->  E )
mpt2matmul.c  |-  ( (
ph  /\  i  e.  N  /\  j  e.  N
)  ->  C  e.  B )
mpt2matmul.e  |-  ( (
ph  /\  i  e.  N  /\  j  e.  N
)  ->  E  e.  B )
mpt2matmul.d  |-  ( (
ph  /\  ( k  =  i  /\  m  =  j ) )  ->  D  =  C )
mpt2matmul.f  |-  ( (
ph  /\  ( m  =  i  /\  l  =  j ) )  ->  F  =  E )
mpt2matmul.1  |-  ( (
ph  /\  k  e.  N  /\  m  e.  N
)  ->  D  e.  U )
mpt2matmul.2  |-  ( (
ph  /\  m  e.  N  /\  l  e.  N
)  ->  F  e.  W )
Assertion
Ref Expression
mpt2matmul  |-  ( ph  ->  ( X  .X.  Y
)  =  ( k  e.  N ,  l  e.  N  |->  ( R 
gsumg  ( m  e.  N  |->  ( D  .x.  F
) ) ) ) )
Distinct variable groups:    D, i,
j    i, F, j    i, N, j, k, l, m    R, i, j, k, l, m    k, X, l, m    k, Y, l, m    ph, i, j, k, l, m    .x. , k, l
Allowed substitution hints:    A( i, j, k, m, l)    B( i, j, k, m, l)    C( i, j, k, m, l)    D( k, m, l)    .x. ( i, j, m)    .X. ( i,
j, k, m, l)    U( i, j, k, m, l)    E( i, j, k, m, l)    F( k, m, l)    V( i, j, k, m, l)    W( i, j, k, m, l)    X( i, j)    Y( i, j)

Proof of Theorem mpt2matmul
StepHypRef Expression
1 mpt2matmul.n . . . 4  |-  ( ph  ->  N  e.  Fin )
2 mpt2matmul.r . . . 4  |-  ( ph  ->  R  e.  V )
31, 2jca 532 . . 3  |-  ( ph  ->  ( N  e.  Fin  /\  R  e.  V ) )
4 mpt2matmul.a . . . . . . 7  |-  A  =  ( N Mat  R )
5 eqid 2467 . . . . . . 7  |-  ( R maMul  <. N ,  N ,  N >. )  =  ( R maMul  <. N ,  N ,  N >. )
64, 5matmulr 18735 . . . . . 6  |-  ( ( N  e.  Fin  /\  R  e.  V )  ->  ( R maMul  <. N ,  N ,  N >. )  =  ( .r `  A ) )
7 mpt2matmul.m . . . . . . . 8  |-  .X.  =  ( .r `  A )
87eqcomi 2480 . . . . . . 7  |-  ( .r
`  A )  = 
.X.
98a1i 11 . . . . . 6  |-  ( ( N  e.  Fin  /\  R  e.  V )  ->  ( .r `  A
)  =  .X.  )
106, 9eqtrd 2508 . . . . 5  |-  ( ( N  e.  Fin  /\  R  e.  V )  ->  ( R maMul  <. N ,  N ,  N >. )  =  .X.  )
1110oveqd 6301 . . . 4  |-  ( ( N  e.  Fin  /\  R  e.  V )  ->  ( X ( R maMul  <. N ,  N ,  N >. ) Y )  =  ( X  .X.  Y ) )
1211eqcomd 2475 . . 3  |-  ( ( N  e.  Fin  /\  R  e.  V )  ->  ( X  .X.  Y
)  =  ( X ( R maMul  <. N ,  N ,  N >. ) Y ) )
133, 12syl 16 . 2  |-  ( ph  ->  ( X  .X.  Y
)  =  ( X ( R maMul  <. N ,  N ,  N >. ) Y ) )
14 eqid 2467 . . . 4  |-  ( Base `  R )  =  (
Base `  R )
15 mpt2matmul.t . . . 4  |-  .x.  =  ( .r `  R )
16 eqid 2467 . . . . . . 7  |-  ( Base `  A )  =  (
Base `  A )
17 mpt2matmul.c . . . . . . . 8  |-  ( (
ph  /\  i  e.  N  /\  j  e.  N
)  ->  C  e.  B )
18 mpt2matmul.b . . . . . . . . . 10  |-  B  =  ( Base `  R
)
1918eqcomi 2480 . . . . . . . . 9  |-  ( Base `  R )  =  B
2019eleq2i 2545 . . . . . . . 8  |-  ( C  e.  ( Base `  R
)  <->  C  e.  B
)
2117, 20sylibr 212 . . . . . . 7  |-  ( (
ph  /\  i  e.  N  /\  j  e.  N
)  ->  C  e.  ( Base `  R )
)
224, 14, 16, 1, 2, 21matbas2d 18720 . . . . . 6  |-  ( ph  ->  ( i  e.  N ,  j  e.  N  |->  C )  e.  (
Base `  A )
)
23 mpt2matmul.x . . . . . . 7  |-  X  =  ( i  e.  N ,  j  e.  N  |->  C )
2423eleq1i 2544 . . . . . 6  |-  ( X  e.  ( Base `  A
)  <->  ( i  e.  N ,  j  e.  N  |->  C )  e.  ( Base `  A
) )
2522, 24sylibr 212 . . . . 5  |-  ( ph  ->  X  e.  ( Base `  A ) )
264, 14matbas2 18718 . . . . . . 7  |-  ( ( N  e.  Fin  /\  R  e.  V )  ->  ( ( Base `  R
)  ^m  ( N  X.  N ) )  =  ( Base `  A
) )
273, 26syl 16 . . . . . 6  |-  ( ph  ->  ( ( Base `  R
)  ^m  ( N  X.  N ) )  =  ( Base `  A
) )
2827eleq2d 2537 . . . . 5  |-  ( ph  ->  ( X  e.  ( ( Base `  R
)  ^m  ( N  X.  N ) )  <->  X  e.  ( Base `  A )
) )
2925, 28mpbird 232 . . . 4  |-  ( ph  ->  X  e.  ( (
Base `  R )  ^m  ( N  X.  N
) ) )
30 mpt2matmul.e . . . . . . . 8  |-  ( (
ph  /\  i  e.  N  /\  j  e.  N
)  ->  E  e.  B )
3119eleq2i 2545 . . . . . . . 8  |-  ( E  e.  ( Base `  R
)  <->  E  e.  B
)
3230, 31sylibr 212 . . . . . . 7  |-  ( (
ph  /\  i  e.  N  /\  j  e.  N
)  ->  E  e.  ( Base `  R )
)
334, 14, 16, 1, 2, 32matbas2d 18720 . . . . . 6  |-  ( ph  ->  ( i  e.  N ,  j  e.  N  |->  E )  e.  (
Base `  A )
)
34 mpt2matmul.y . . . . . . 7  |-  Y  =  ( i  e.  N ,  j  e.  N  |->  E )
3534eleq1i 2544 . . . . . 6  |-  ( Y  e.  ( Base `  A
)  <->  ( i  e.  N ,  j  e.  N  |->  E )  e.  ( Base `  A
) )
3633, 35sylibr 212 . . . . 5  |-  ( ph  ->  Y  e.  ( Base `  A ) )
3727eleq2d 2537 . . . . 5  |-  ( ph  ->  ( Y  e.  ( ( Base `  R
)  ^m  ( N  X.  N ) )  <->  Y  e.  ( Base `  A )
) )
3836, 37mpbird 232 . . . 4  |-  ( ph  ->  Y  e.  ( (
Base `  R )  ^m  ( N  X.  N
) ) )
395, 14, 15, 2, 1, 1, 1, 29, 38mamuval 18683 . . 3  |-  ( ph  ->  ( X ( R maMul  <. N ,  N ,  N >. ) Y )  =  ( k  e.  N ,  l  e.  N  |->  ( R  gsumg  ( m  e.  N  |->  ( ( k X m ) 
.x.  ( m Y l ) ) ) ) ) )
4023a1i 11 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  X  =  ( i  e.  N ,  j  e.  N  |->  C ) )
41 eqcom 2476 . . . . . . . . . . . . . . . . 17  |-  ( i  =  k  <->  k  =  i )
42 eqcom 2476 . . . . . . . . . . . . . . . . 17  |-  ( j  =  m  <->  m  =  j )
4341, 42anbi12i 697 . . . . . . . . . . . . . . . 16  |-  ( ( i  =  k  /\  j  =  m )  <->  ( k  =  i  /\  m  =  j )
)
4443biimpi 194 . . . . . . . . . . . . . . 15  |-  ( ( i  =  k  /\  j  =  m )  ->  ( k  =  i  /\  m  =  j ) )
4544anim2i 569 . . . . . . . . . . . . . 14  |-  ( (
ph  /\  ( i  =  k  /\  j  =  m ) )  -> 
( ph  /\  (
k  =  i  /\  m  =  j )
) )
46 mpt2matmul.d . . . . . . . . . . . . . 14  |-  ( (
ph  /\  ( k  =  i  /\  m  =  j ) )  ->  D  =  C )
4745, 46syl 16 . . . . . . . . . . . . 13  |-  ( (
ph  /\  ( i  =  k  /\  j  =  m ) )  ->  D  =  C )
4847eqcomd 2475 . . . . . . . . . . . 12  |-  ( (
ph  /\  ( i  =  k  /\  j  =  m ) )  ->  C  =  D )
4948ex 434 . . . . . . . . . . 11  |-  ( ph  ->  ( ( i  =  k  /\  j  =  m )  ->  C  =  D ) )
50493ad2ant1 1017 . . . . . . . . . 10  |-  ( (
ph  /\  k  e.  N  /\  l  e.  N
)  ->  ( (
i  =  k  /\  j  =  m )  ->  C  =  D ) )
5150adantr 465 . . . . . . . . 9  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  (
( i  =  k  /\  j  =  m )  ->  C  =  D ) )
5251imp 429 . . . . . . . 8  |-  ( ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N
)  /\  ( i  =  k  /\  j  =  m ) )  ->  C  =  D )
53 simp2 997 . . . . . . . . 9  |-  ( (
ph  /\  k  e.  N  /\  l  e.  N
)  ->  k  e.  N )
5453adantr 465 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  k  e.  N )
55 simpr 461 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  m  e.  N )
56 simp1 996 . . . . . . . . . . 11  |-  ( (
ph  /\  k  e.  N  /\  l  e.  N
)  ->  ph )
5756adantr 465 . . . . . . . . . 10  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  ph )
5857, 54, 553jca 1176 . . . . . . . . 9  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  ( ph  /\  k  e.  N  /\  m  e.  N
) )
59 mpt2matmul.1 . . . . . . . . 9  |-  ( (
ph  /\  k  e.  N  /\  m  e.  N
)  ->  D  e.  U )
6058, 59syl 16 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  D  e.  U )
6140, 52, 54, 55, 60ovmpt2d 6414 . . . . . . 7  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  (
k X m )  =  D )
6234a1i 11 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  Y  =  ( i  e.  N ,  j  e.  N  |->  E ) )
63 eqcom 2476 . . . . . . . . . . . . . . . . 17  |-  ( i  =  m  <->  m  =  i )
6463biimpi 194 . . . . . . . . . . . . . . . 16  |-  ( i  =  m  ->  m  =  i )
65 eqcom 2476 . . . . . . . . . . . . . . . . 17  |-  ( j  =  l  <->  l  =  j )
6665biimpi 194 . . . . . . . . . . . . . . . 16  |-  ( j  =  l  ->  l  =  j )
6764, 66anim12i 566 . . . . . . . . . . . . . . 15  |-  ( ( i  =  m  /\  j  =  l )  ->  ( m  =  i  /\  l  =  j ) )
6867anim2i 569 . . . . . . . . . . . . . 14  |-  ( (
ph  /\  ( i  =  m  /\  j  =  l ) )  ->  ( ph  /\  ( m  =  i  /\  l  =  j
) ) )
69 mpt2matmul.f . . . . . . . . . . . . . 14  |-  ( (
ph  /\  ( m  =  i  /\  l  =  j ) )  ->  F  =  E )
7068, 69syl 16 . . . . . . . . . . . . 13  |-  ( (
ph  /\  ( i  =  m  /\  j  =  l ) )  ->  F  =  E )
7170ex 434 . . . . . . . . . . . 12  |-  ( ph  ->  ( ( i  =  m  /\  j  =  l )  ->  F  =  E ) )
72713ad2ant1 1017 . . . . . . . . . . 11  |-  ( (
ph  /\  k  e.  N  /\  l  e.  N
)  ->  ( (
i  =  m  /\  j  =  l )  ->  F  =  E ) )
7372adantr 465 . . . . . . . . . 10  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  (
( i  =  m  /\  j  =  l )  ->  F  =  E ) )
7473imp 429 . . . . . . . . 9  |-  ( ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N
)  /\  ( i  =  m  /\  j  =  l ) )  ->  F  =  E )
7574eqcomd 2475 . . . . . . . 8  |-  ( ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N
)  /\  ( i  =  m  /\  j  =  l ) )  ->  E  =  F )
76 simp3 998 . . . . . . . . 9  |-  ( (
ph  /\  k  e.  N  /\  l  e.  N
)  ->  l  e.  N )
7776adantr 465 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  l  e.  N )
7857, 55, 773jca 1176 . . . . . . . . 9  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  ( ph  /\  m  e.  N  /\  l  e.  N
) )
79 mpt2matmul.2 . . . . . . . . 9  |-  ( (
ph  /\  m  e.  N  /\  l  e.  N
)  ->  F  e.  W )
8078, 79syl 16 . . . . . . . 8  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  F  e.  W )
8162, 75, 55, 77, 80ovmpt2d 6414 . . . . . . 7  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  (
m Y l )  =  F )
8261, 81oveq12d 6302 . . . . . 6  |-  ( ( ( ph  /\  k  e.  N  /\  l  e.  N )  /\  m  e.  N )  ->  (
( k X m )  .x.  ( m Y l ) )  =  ( D  .x.  F ) )
8382mpteq2dva 4533 . . . . 5  |-  ( (
ph  /\  k  e.  N  /\  l  e.  N
)  ->  ( m  e.  N  |->  ( ( k X m ) 
.x.  ( m Y l ) ) )  =  ( m  e.  N  |->  ( D  .x.  F ) ) )
8483oveq2d 6300 . . . 4  |-  ( (
ph  /\  k  e.  N  /\  l  e.  N
)  ->  ( R  gsumg  ( m  e.  N  |->  ( ( k X m )  .x.  ( m Y l ) ) ) )  =  ( R  gsumg  ( m  e.  N  |->  ( D  .x.  F
) ) ) )
8584mpt2eq3dva 6345 . . 3  |-  ( ph  ->  ( k  e.  N ,  l  e.  N  |->  ( R  gsumg  ( m  e.  N  |->  ( ( k X m )  .x.  (
m Y l ) ) ) ) )  =  ( k  e.  N ,  l  e.  N  |->  ( R  gsumg  ( m  e.  N  |->  ( D 
.x.  F ) ) ) ) )
8639, 85eqtrd 2508 . 2  |-  ( ph  ->  ( X ( R maMul  <. N ,  N ,  N >. ) Y )  =  ( k  e.  N ,  l  e.  N  |->  ( R  gsumg  ( m  e.  N  |->  ( D 
.x.  F ) ) ) ) )
8713, 86eqtrd 2508 1  |-  ( ph  ->  ( X  .X.  Y
)  =  ( k  e.  N ,  l  e.  N  |->  ( R 
gsumg  ( m  e.  N  |->  ( D  .x.  F
) ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    /\ w3a 973    = wceq 1379    e. wcel 1767   <.cotp 4035    |-> cmpt 4505    X. cxp 4997   ` cfv 5588  (class class class)co 6284    |-> cmpt2 6286    ^m cmap 7420   Fincfn 7516   Basecbs 14490   .rcmulr 14556    gsumg cgsu 14696   maMul cmmul 18680   Mat cmat 18704
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6576  ax-cnex 9548  ax-resscn 9549  ax-1cn 9550  ax-icn 9551  ax-addcl 9552  ax-addrcl 9553  ax-mulcl 9554  ax-mulrcl 9555  ax-mulcom 9556  ax-addass 9557  ax-mulass 9558  ax-distr 9559  ax-i2m1 9560  ax-1ne0 9561  ax-1rid 9562  ax-rnegex 9563  ax-rrecex 9564  ax-cnre 9565  ax-pre-lttri 9566  ax-pre-lttrn 9567  ax-pre-ltadd 9568  ax-pre-mulgt0 9569
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-ot 4036  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fun 5590  df-fn 5591  df-f 5592  df-f1 5593  df-fo 5594  df-f1o 5595  df-fv 5596  df-riota 6245  df-ov 6287  df-oprab 6288  df-mpt2 6289  df-om 6685  df-1st 6784  df-2nd 6785  df-supp 6902  df-recs 7042  df-rdg 7076  df-1o 7130  df-oadd 7134  df-er 7311  df-map 7422  df-ixp 7470  df-en 7517  df-dom 7518  df-sdom 7519  df-fin 7520  df-fsupp 7830  df-sup 7901  df-pnf 9630  df-mnf 9631  df-xr 9632  df-ltxr 9633  df-le 9634  df-sub 9807  df-neg 9808  df-nn 10537  df-2 10594  df-3 10595  df-4 10596  df-5 10597  df-6 10598  df-7 10599  df-8 10600  df-9 10601  df-10 10602  df-n0 10796  df-z 10865  df-dec 10977  df-uz 11083  df-fz 11673  df-struct 14492  df-ndx 14493  df-slot 14494  df-base 14495  df-sets 14496  df-ress 14497  df-plusg 14568  df-mulr 14569  df-sca 14571  df-vsca 14572  df-ip 14573  df-tset 14574  df-ple 14575  df-ds 14577  df-hom 14579  df-cco 14580  df-0g 14697  df-prds 14703  df-pws 14705  df-sra 17618  df-rgmod 17619  df-dsmm 18558  df-frlm 18573  df-mamu 18681  df-mat 18705
This theorem is referenced by:  mat2pmatmul  19027
  Copyright terms: Public domain W3C validator