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

Theorem gsumwrev 16968
Description: A sum in an opposite monoid is the regular sum of a reversed word. (Contributed by Stefan O'Rear, 27-Aug-2015.) (Proof shortened by Mario Carneiro, 28-Feb-2016.)
Hypotheses
Ref Expression
gsumwrev.b  |-  B  =  ( Base `  M
)
gsumwrev.o  |-  O  =  (oppg
`  M )
Assertion
Ref Expression
gsumwrev  |-  ( ( M  e.  Mnd  /\  W  e. Word  B )  ->  ( O  gsumg  W )  =  ( M  gsumg  (reverse `  W )
) )

Proof of Theorem gsumwrev
Dummy variables  x  y  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 6313 . . . . 5  |-  ( x  =  (/)  ->  ( O 
gsumg  x )  =  ( O  gsumg  (/) ) )
2 fveq2 5881 . . . . . . 7  |-  ( x  =  (/)  ->  (reverse `  x
)  =  (reverse `  (/) ) )
3 rev0 12854 . . . . . . 7  |-  (reverse `  (/) )  =  (/)
42, 3syl6eq 2486 . . . . . 6  |-  ( x  =  (/)  ->  (reverse `  x
)  =  (/) )
54oveq2d 6321 . . . . 5  |-  ( x  =  (/)  ->  ( M 
gsumg  (reverse `  x ) )  =  ( M  gsumg  (/) ) )
61, 5eqeq12d 2451 . . . 4  |-  ( x  =  (/)  ->  ( ( O  gsumg  x )  =  ( M  gsumg  (reverse `  x )
)  <->  ( O  gsumg  (/) )  =  ( M  gsumg  (/) ) ) )
76imbi2d 317 . . 3  |-  ( x  =  (/)  ->  ( ( M  e.  Mnd  ->  ( O  gsumg  x )  =  ( M  gsumg  (reverse `  x )
) )  <->  ( M  e.  Mnd  ->  ( O  gsumg  (/) )  =  ( M 
gsumg  (/) ) ) ) )
8 oveq2 6313 . . . . 5  |-  ( x  =  y  ->  ( O  gsumg  x )  =  ( O  gsumg  y ) )
9 fveq2 5881 . . . . . 6  |-  ( x  =  y  ->  (reverse `  x )  =  (reverse `  y ) )
109oveq2d 6321 . . . . 5  |-  ( x  =  y  ->  ( M  gsumg  (reverse `  x )
)  =  ( M 
gsumg  (reverse `  y ) ) )
118, 10eqeq12d 2451 . . . 4  |-  ( x  =  y  ->  (
( O  gsumg  x )  =  ( M  gsumg  (reverse `  x )
)  <->  ( O  gsumg  y )  =  ( M  gsumg  (reverse `  y
) ) ) )
1211imbi2d 317 . . 3  |-  ( x  =  y  ->  (
( M  e.  Mnd  ->  ( O  gsumg  x )  =  ( M  gsumg  (reverse `  x )
) )  <->  ( M  e.  Mnd  ->  ( O  gsumg  y )  =  ( M 
gsumg  (reverse `  y ) ) ) ) )
13 oveq2 6313 . . . . 5  |-  ( x  =  ( y ++  <" z "> )  ->  ( O  gsumg  x )  =  ( O  gsumg  ( y ++  <" z "> ) ) )
14 fveq2 5881 . . . . . 6  |-  ( x  =  ( y ++  <" z "> )  ->  (reverse `  x )  =  (reverse `  ( y ++  <" z "> ) ) )
1514oveq2d 6321 . . . . 5  |-  ( x  =  ( y ++  <" z "> )  ->  ( M  gsumg  (reverse `  x )
)  =  ( M 
gsumg  (reverse `  ( y ++  <" z "> )
) ) )
1613, 15eqeq12d 2451 . . . 4  |-  ( x  =  ( y ++  <" z "> )  ->  ( ( O  gsumg  x )  =  ( M  gsumg  (reverse `  x
) )  <->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) ) ) )
1716imbi2d 317 . . 3  |-  ( x  =  ( y ++  <" z "> )  ->  ( ( M  e. 
Mnd  ->  ( O  gsumg  x )  =  ( M  gsumg  (reverse `  x
) ) )  <->  ( M  e.  Mnd  ->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) ) ) ) )
18 oveq2 6313 . . . . 5  |-  ( x  =  W  ->  ( O  gsumg  x )  =  ( O  gsumg  W ) )
19 fveq2 5881 . . . . . 6  |-  ( x  =  W  ->  (reverse `  x )  =  (reverse `  W ) )
2019oveq2d 6321 . . . . 5  |-  ( x  =  W  ->  ( M  gsumg  (reverse `  x )
)  =  ( M 
gsumg  (reverse `  W ) ) )
2118, 20eqeq12d 2451 . . . 4  |-  ( x  =  W  ->  (
( O  gsumg  x )  =  ( M  gsumg  (reverse `  x )
)  <->  ( O  gsumg  W )  =  ( M  gsumg  (reverse `  W
) ) ) )
2221imbi2d 317 . . 3  |-  ( x  =  W  ->  (
( M  e.  Mnd  ->  ( O  gsumg  x )  =  ( M  gsumg  (reverse `  x )
) )  <->  ( M  e.  Mnd  ->  ( O  gsumg  W )  =  ( M 
gsumg  (reverse `  W ) ) ) ) )
23 gsumwrev.o . . . . . . 7  |-  O  =  (oppg
`  M )
24 eqid 2429 . . . . . . 7  |-  ( 0g
`  M )  =  ( 0g `  M
)
2523, 24oppgid 16958 . . . . . 6  |-  ( 0g
`  M )  =  ( 0g `  O
)
2625gsum0 16472 . . . . 5  |-  ( O 
gsumg  (/) )  =  ( 0g
`  M )
2724gsum0 16472 . . . . 5  |-  ( M 
gsumg  (/) )  =  ( 0g
`  M )
2826, 27eqtr4i 2461 . . . 4  |-  ( O 
gsumg  (/) )  =  ( M 
gsumg  (/) )
2928a1i 11 . . 3  |-  ( M  e.  Mnd  ->  ( O  gsumg  (/) )  =  ( M  gsumg  (/) ) )
30 oveq2 6313 . . . . . 6  |-  ( ( O  gsumg  y )  =  ( M  gsumg  (reverse `  y )
)  ->  ( z
( +g  `  M ) ( O  gsumg  y ) )  =  ( z ( +g  `  M ) ( M 
gsumg  (reverse `  y ) ) ) )
3123oppgmnd 16956 . . . . . . . . . 10  |-  ( M  e.  Mnd  ->  O  e.  Mnd )
3231adantr 466 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  O  e.  Mnd )
33 simprl 762 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  y  e. Word  B )
34 simprr 764 . . . . . . . . . 10  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  z  e.  B )
3534s1cld 12729 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  <" z ">  e. Word  B )
36 gsumwrev.b . . . . . . . . . . 11  |-  B  =  ( Base `  M
)
3723, 36oppgbas 16953 . . . . . . . . . 10  |-  B  =  ( Base `  O
)
38 eqid 2429 . . . . . . . . . 10  |-  ( +g  `  O )  =  ( +g  `  O )
3937, 38gsumccat 16576 . . . . . . . . 9  |-  ( ( O  e.  Mnd  /\  y  e. Word  B  /\  <" z ">  e. Word  B )  ->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( ( O  gsumg  y ) ( +g  `  O
) ( O  gsumg  <" z "> ) ) )
4032, 33, 35, 39syl3anc 1264 . . . . . . . 8  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( ( O  gsumg  y ) ( +g  `  O
) ( O  gsumg  <" z "> ) ) )
4137gsumws1 16574 . . . . . . . . . . 11  |-  ( z  e.  B  ->  ( O  gsumg 
<" z "> )  =  z )
4241ad2antll 733 . . . . . . . . . 10  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  ( O  gsumg 
<" z "> )  =  z )
4342oveq2d 6321 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (
( O  gsumg  y ) ( +g  `  O ) ( O 
gsumg  <" z "> ) )  =  ( ( O  gsumg  y ) ( +g  `  O ) z ) )
44 eqid 2429 . . . . . . . . . 10  |-  ( +g  `  M )  =  ( +g  `  M )
4544, 23, 38oppgplus 16951 . . . . . . . . 9  |-  ( ( O  gsumg  y ) ( +g  `  O ) z )  =  ( z ( +g  `  M ) ( O  gsumg  y ) )
4643, 45syl6eq 2486 . . . . . . . 8  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (
( O  gsumg  y ) ( +g  `  O ) ( O 
gsumg  <" z "> ) )  =  ( z ( +g  `  M
) ( O  gsumg  y ) ) )
4740, 46eqtrd 2470 . . . . . . 7  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( z ( +g  `  M ) ( O 
gsumg  y ) ) )
48 revccat 12856 . . . . . . . . . . 11  |-  ( ( y  e. Word  B  /\  <" z ">  e. Word  B )  ->  (reverse `  ( y ++  <" z "> ) )  =  ( (reverse `  <" z "> ) ++  (reverse `  y ) ) )
4933, 35, 48syl2anc 665 . . . . . . . . . 10  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (reverse `  ( y ++  <" z "> ) )  =  ( (reverse `  <" z "> ) ++  (reverse `  y ) ) )
50 revs1 12855 . . . . . . . . . . 11  |-  (reverse `  <" z "> )  =  <" z ">
5150oveq1i 6315 . . . . . . . . . 10  |-  ( (reverse `  <" z "> ) ++  (reverse `  y
) )  =  (
<" z "> ++  (reverse `  y ) )
5249, 51syl6eq 2486 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (reverse `  ( y ++  <" z "> ) )  =  ( <" z "> ++  (reverse `  y )
) )
5352oveq2d 6321 . . . . . . . 8  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) )  =  ( M  gsumg  ( <" z "> ++  (reverse `  y )
) ) )
54 simpl 458 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  M  e.  Mnd )
55 revcl 12851 . . . . . . . . . 10  |-  ( y  e. Word  B  ->  (reverse `  y )  e. Word  B
)
5655ad2antrl 732 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (reverse `  y )  e. Word  B
)
5736, 44gsumccat 16576 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  <" z ">  e. Word  B  /\  (reverse `  y
)  e. Word  B )  ->  ( M  gsumg  ( <" z "> ++  (reverse `  y )
) )  =  ( ( M  gsumg 
<" z "> ) ( +g  `  M
) ( M  gsumg  (reverse `  y
) ) ) )
5854, 35, 56, 57syl3anc 1264 . . . . . . . 8  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  ( M  gsumg  ( <" z "> ++  (reverse `  y )
) )  =  ( ( M  gsumg 
<" z "> ) ( +g  `  M
) ( M  gsumg  (reverse `  y
) ) ) )
5936gsumws1 16574 . . . . . . . . . 10  |-  ( z  e.  B  ->  ( M  gsumg 
<" z "> )  =  z )
6059ad2antll 733 . . . . . . . . 9  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  ( M  gsumg 
<" z "> )  =  z )
6160oveq1d 6320 . . . . . . . 8  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (
( M  gsumg 
<" z "> ) ( +g  `  M
) ( M  gsumg  (reverse `  y
) ) )  =  ( z ( +g  `  M ) ( M 
gsumg  (reverse `  y ) ) ) )
6253, 58, 613eqtrd 2474 . . . . . . 7  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) )  =  ( z ( +g  `  M ) ( M 
gsumg  (reverse `  y ) ) ) )
6347, 62eqeq12d 2451 . . . . . 6  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (
( O  gsumg  ( y ++  <" z "> ) )  =  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) )  <->  ( z
( +g  `  M ) ( O  gsumg  y ) )  =  ( z ( +g  `  M ) ( M 
gsumg  (reverse `  y ) ) ) ) )
6430, 63syl5ibr 224 . . . . 5  |-  ( ( M  e.  Mnd  /\  ( y  e. Word  B  /\  z  e.  B
) )  ->  (
( O  gsumg  y )  =  ( M  gsumg  (reverse `  y )
)  ->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) ) ) )
6564expcom 436 . . . 4  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( M  e.  Mnd  ->  ( ( O  gsumg  y )  =  ( M  gsumg  (reverse `  y
) )  ->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) ) ) ) )
6665a2d 29 . . 3  |-  ( ( y  e. Word  B  /\  z  e.  B )  ->  ( ( M  e. 
Mnd  ->  ( O  gsumg  y )  =  ( M  gsumg  (reverse `  y
) ) )  -> 
( M  e.  Mnd  ->  ( O  gsumg  ( y ++  <" z "> ) )  =  ( M  gsumg  (reverse `  ( y ++  <" z "> ) ) ) ) ) )
677, 12, 17, 22, 29, 66wrdind 12818 . 2  |-  ( W  e. Word  B  ->  ( M  e.  Mnd  ->  ( O  gsumg  W )  =  ( M  gsumg  (reverse `  W )
) ) )
6867impcom 431 1  |-  ( ( M  e.  Mnd  /\  W  e. Word  B )  ->  ( O  gsumg  W )  =  ( M  gsumg  (reverse `  W )
) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 370    = wceq 1437    e. wcel 1870   (/)c0 3767   ` cfv 5601  (class class class)co 6305  Word cword 12643   ++ cconcat 12645   <"cs1 12646  reversecreverse 12649   Basecbs 15084   +g cplusg 15152   0gc0g 15297    gsumg cgsu 15298   Mndcmnd 16486  oppgcoppg 16947
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1751  ax-6 1797  ax-7 1841  ax-8 1872  ax-9 1874  ax-10 1889  ax-11 1894  ax-12 1907  ax-13 2055  ax-ext 2407  ax-rep 4538  ax-sep 4548  ax-nul 4556  ax-pow 4603  ax-pr 4661  ax-un 6597  ax-cnex 9594  ax-resscn 9595  ax-1cn 9596  ax-icn 9597  ax-addcl 9598  ax-addrcl 9599  ax-mulcl 9600  ax-mulrcl 9601  ax-mulcom 9602  ax-addass 9603  ax-mulass 9604  ax-distr 9605  ax-i2m1 9606  ax-1ne0 9607  ax-1rid 9608  ax-rnegex 9609  ax-rrecex 9610  ax-cnre 9611  ax-pre-lttri 9612  ax-pre-lttrn 9613  ax-pre-ltadd 9614  ax-pre-mulgt0 9615
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1790  df-eu 2270  df-mo 2271  df-clab 2415  df-cleq 2421  df-clel 2424  df-nfc 2579  df-ne 2627  df-nel 2628  df-ral 2787  df-rex 2788  df-reu 2789  df-rmo 2790  df-rab 2791  df-v 3089  df-sbc 3306  df-csb 3402  df-dif 3445  df-un 3447  df-in 3449  df-ss 3456  df-pss 3458  df-nul 3768  df-if 3916  df-pw 3987  df-sn 4003  df-pr 4005  df-tp 4007  df-op 4009  df-uni 4223  df-int 4259  df-iun 4304  df-br 4427  df-opab 4485  df-mpt 4486  df-tr 4521  df-eprel 4765  df-id 4769  df-po 4775  df-so 4776  df-fr 4813  df-we 4815  df-xp 4860  df-rel 4861  df-cnv 4862  df-co 4863  df-dm 4864  df-rn 4865  df-res 4866  df-ima 4867  df-pred 5399  df-ord 5445  df-on 5446  df-lim 5447  df-suc 5448  df-iota 5565  df-fun 5603  df-fn 5604  df-f 5605  df-f1 5606  df-fo 5607  df-f1o 5608  df-fv 5609  df-riota 6267  df-ov 6308  df-oprab 6309  df-mpt2 6310  df-om 6707  df-1st 6807  df-2nd 6808  df-tpos 6981  df-wrecs 7036  df-recs 7098  df-rdg 7136  df-1o 7190  df-oadd 7194  df-er 7371  df-en 7578  df-dom 7579  df-sdom 7580  df-fin 7581  df-card 8372  df-cda 8596  df-pnf 9676  df-mnf 9677  df-xr 9678  df-ltxr 9679  df-le 9680  df-sub 9861  df-neg 9862  df-nn 10610  df-2 10668  df-n0 10870  df-z 10938  df-uz 11160  df-fz 11783  df-fzo 11914  df-seq 12211  df-hash 12513  df-word 12651  df-lsw 12652  df-concat 12653  df-s1 12654  df-substr 12655  df-reverse 12657  df-ndx 15087  df-slot 15088  df-base 15089  df-sets 15090  df-ress 15091  df-plusg 15165  df-0g 15299  df-gsum 15300  df-mgm 16439  df-sgrp 16478  df-mnd 16488  df-submnd 16534  df-oppg 16948
This theorem is referenced by:  symgtrinv  17064
  Copyright terms: Public domain W3C validator