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

Theorem frmdgsum 15644
Description: Any word in a free monoid can be expressed as the sum of the singletons composing it. (Contributed by Mario Carneiro, 27-Sep-2015.)
Hypotheses
Ref Expression
frmdmnd.m  |-  M  =  (freeMnd `  I )
frmdgsum.u  |-  U  =  (varFMnd `  I )
Assertion
Ref Expression
frmdgsum  |-  ( ( I  e.  V  /\  W  e. Word  I )  ->  ( M  gsumg  ( U  o.  W
) )  =  W )

Proof of Theorem frmdgsum
Dummy variables  x  y  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 coeq2 5098 . . . . . . 7  |-  ( x  =  (/)  ->  ( U  o.  x )  =  ( U  o.  (/) ) )
2 co02 5451 . . . . . . 7  |-  ( U  o.  (/) )  =  (/)
31, 2syl6eq 2508 . . . . . 6  |-  ( x  =  (/)  ->  ( U  o.  x )  =  (/) )
43oveq2d 6208 . . . . 5  |-  ( x  =  (/)  ->  ( M 
gsumg  ( U  o.  x
) )  =  ( M  gsumg  (/) ) )
5 id 22 . . . . 5  |-  ( x  =  (/)  ->  x  =  (/) )
64, 5eqeq12d 2473 . . . 4  |-  ( x  =  (/)  ->  ( ( M  gsumg  ( U  o.  x
) )  =  x  <-> 
( M  gsumg  (/) )  =  (/) ) )
76imbi2d 316 . . 3  |-  ( x  =  (/)  ->  ( ( I  e.  V  -> 
( M  gsumg  ( U  o.  x
) )  =  x )  <->  ( I  e.  V  ->  ( M  gsumg  (/) )  =  (/) ) ) )
8 coeq2 5098 . . . . . 6  |-  ( x  =  y  ->  ( U  o.  x )  =  ( U  o.  y ) )
98oveq2d 6208 . . . . 5  |-  ( x  =  y  ->  ( M  gsumg  ( U  o.  x
) )  =  ( M  gsumg  ( U  o.  y
) ) )
10 id 22 . . . . 5  |-  ( x  =  y  ->  x  =  y )
119, 10eqeq12d 2473 . . . 4  |-  ( x  =  y  ->  (
( M  gsumg  ( U  o.  x
) )  =  x  <-> 
( M  gsumg  ( U  o.  y
) )  =  y ) )
1211imbi2d 316 . . 3  |-  ( x  =  y  ->  (
( I  e.  V  ->  ( M  gsumg  ( U  o.  x
) )  =  x )  <->  ( I  e.  V  ->  ( M  gsumg  ( U  o.  y ) )  =  y ) ) )
13 coeq2 5098 . . . . . 6  |-  ( x  =  ( y concat  <" z "> )  ->  ( U  o.  x
)  =  ( U  o.  ( y concat  <" z "> )
) )
1413oveq2d 6208 . . . . 5  |-  ( x  =  ( y concat  <" z "> )  ->  ( M  gsumg  ( U  o.  x
) )  =  ( M  gsumg  ( U  o.  (
y concat  <" z "> ) ) ) )
15 id 22 . . . . 5  |-  ( x  =  ( y concat  <" z "> )  ->  x  =  ( y concat  <" z "> ) )
1614, 15eqeq12d 2473 . . . 4  |-  ( x  =  ( y concat  <" z "> )  ->  ( ( M  gsumg  ( U  o.  x ) )  =  x  <->  ( M  gsumg  ( U  o.  ( y concat  <" z "> ) ) )  =  ( y concat  <" z "> ) ) )
1716imbi2d 316 . . 3  |-  ( x  =  ( y concat  <" z "> )  ->  ( ( I  e.  V  ->  ( M  gsumg  ( U  o.  x ) )  =  x )  <-> 
( I  e.  V  ->  ( M  gsumg  ( U  o.  (
y concat  <" z "> ) ) )  =  ( y concat  <" z "> )
) ) )
18 coeq2 5098 . . . . . 6  |-  ( x  =  W  ->  ( U  o.  x )  =  ( U  o.  W ) )
1918oveq2d 6208 . . . . 5  |-  ( x  =  W  ->  ( M  gsumg  ( U  o.  x
) )  =  ( M  gsumg  ( U  o.  W
) ) )
20 id 22 . . . . 5  |-  ( x  =  W  ->  x  =  W )
2119, 20eqeq12d 2473 . . . 4  |-  ( x  =  W  ->  (
( M  gsumg  ( U  o.  x
) )  =  x  <-> 
( M  gsumg  ( U  o.  W
) )  =  W ) )
2221imbi2d 316 . . 3  |-  ( x  =  W  ->  (
( I  e.  V  ->  ( M  gsumg  ( U  o.  x
) )  =  x )  <->  ( I  e.  V  ->  ( M  gsumg  ( U  o.  W ) )  =  W ) ) )
23 frmdmnd.m . . . . . 6  |-  M  =  (freeMnd `  I )
2423frmd0 15642 . . . . 5  |-  (/)  =  ( 0g `  M )
2524gsum0 15614 . . . 4  |-  ( M 
gsumg  (/) )  =  (/)
2625a1i 11 . . 3  |-  ( I  e.  V  ->  ( M  gsumg  (/) )  =  (/) )
27 oveq1 6199 . . . . . 6  |-  ( ( M  gsumg  ( U  o.  y
) )  =  y  ->  ( ( M 
gsumg  ( U  o.  y
) ) concat  <" z "> )  =  ( y concat  <" z "> ) )
28 simprl 755 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  y  e. Word  I )
29 simprr 756 . . . . . . . . . . . 12  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  z  e.  I )
3029s1cld 12398 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  <" z ">  e. Word  I )
31 frmdgsum.u . . . . . . . . . . . . 13  |-  U  =  (varFMnd `  I )
3231vrmdf 15640 . . . . . . . . . . . 12  |-  ( I  e.  V  ->  U : I -->Word  I )
3332adantr 465 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  U : I -->Word  I )
34 ccatco 12567 . . . . . . . . . . 11  |-  ( ( y  e. Word  I  /\  <" z ">  e. Word  I  /\  U :
I -->Word  I )  ->  ( U  o.  ( y concat  <" z "> ) )  =  ( ( U  o.  y
) concat  ( U  o.  <" z "> )
) )
3528, 30, 33, 34syl3anc 1219 . . . . . . . . . 10  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( U  o.  ( y concat  <" z "> ) )  =  ( ( U  o.  y
) concat  ( U  o.  <" z "> )
) )
36 s1co 12565 . . . . . . . . . . . . 13  |-  ( ( z  e.  I  /\  U : I -->Word  I )  ->  ( U  o.  <" z "> )  =  <" ( U `
 z ) "> )
3729, 33, 36syl2anc 661 . . . . . . . . . . . 12  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( U  o.  <" z "> )  =  <" ( U `  z
) "> )
3831vrmdval 15639 . . . . . . . . . . . . . 14  |-  ( ( I  e.  V  /\  z  e.  I )  ->  ( U `  z
)  =  <" z "> )
3938adantrl 715 . . . . . . . . . . . . 13  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( U `  z )  =  <" z "> )
4039s1eqd 12396 . . . . . . . . . . . 12  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  <" ( U `  z ) ">  =  <" <" z "> "> )
4137, 40eqtrd 2492 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( U  o.  <" z "> )  =  <" <" z "> "> )
4241oveq2d 6208 . . . . . . . . . 10  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  (
( U  o.  y
) concat  ( U  o.  <" z "> )
)  =  ( ( U  o.  y ) concat  <" <" z "> "> )
)
4335, 42eqtrd 2492 . . . . . . . . 9  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( U  o.  ( y concat  <" z "> ) )  =  ( ( U  o.  y
) concat  <" <" z "> "> )
)
4443oveq2d 6208 . . . . . . . 8  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( M  gsumg  ( U  o.  (
y concat  <" z "> ) ) )  =  ( M  gsumg  ( ( U  o.  y ) concat  <" <" z "> "> )
) )
4523frmdmnd 15641 . . . . . . . . . . 11  |-  ( I  e.  V  ->  M  e.  Mnd )
4645adantr 465 . . . . . . . . . 10  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  M  e.  Mnd )
47 wrdco 12563 . . . . . . . . . . . 12  |-  ( ( y  e. Word  I  /\  U : I -->Word  I )  ->  ( U  o.  y
)  e. Word Word  I )
4828, 33, 47syl2anc 661 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( U  o.  y )  e. Word Word  I )
49 eqid 2451 . . . . . . . . . . . . . 14  |-  ( Base `  M )  =  (
Base `  M )
5023, 49frmdbas 15634 . . . . . . . . . . . . 13  |-  ( I  e.  V  ->  ( Base `  M )  = Word 
I )
5150adantr 465 . . . . . . . . . . . 12  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( Base `  M )  = Word 
I )
52 wrdeq 12355 . . . . . . . . . . . 12  |-  ( (
Base `  M )  = Word  I  -> Word  ( Base `  M
)  = Word Word  I )
5351, 52syl 16 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  -> Word  ( Base `  M )  = Word Word  I )
5448, 53eleqtrrd 2542 . . . . . . . . . 10  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( U  o.  y )  e. Word  ( Base `  M
) )
5530, 51eleqtrrd 2542 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  <" z ">  e.  ( Base `  M ) )
5655s1cld 12398 . . . . . . . . . 10  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  <" <" z "> ">  e. Word  ( Base `  M
) )
57 eqid 2451 . . . . . . . . . . 11  |-  ( +g  `  M )  =  ( +g  `  M )
5849, 57gsumccat 15623 . . . . . . . . . 10  |-  ( ( M  e.  Mnd  /\  ( U  o.  y
)  e. Word  ( Base `  M )  /\  <" <" z "> ">  e. Word  (
Base `  M )
)  ->  ( M  gsumg  ( ( U  o.  y
) concat  <" <" z "> "> )
)  =  ( ( M  gsumg  ( U  o.  y
) ) ( +g  `  M ) ( M 
gsumg  <" <" z "> "> )
) )
5946, 54, 56, 58syl3anc 1219 . . . . . . . . 9  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( M  gsumg  ( ( U  o.  y ) concat  <" <" z "> "> ) )  =  ( ( M  gsumg  ( U  o.  y
) ) ( +g  `  M ) ( M 
gsumg  <" <" z "> "> )
) )
6049gsumws1 15621 . . . . . . . . . . . 12  |-  ( <" z ">  e.  ( Base `  M
)  ->  ( M  gsumg  <" <" z "> "> )  =  <" z "> )
6155, 60syl 16 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( M  gsumg 
<" <" z "> "> )  =  <" z "> )
6261oveq2d 6208 . . . . . . . . . 10  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  (
( M  gsumg  ( U  o.  y
) ) ( +g  `  M ) ( M 
gsumg  <" <" z "> "> )
)  =  ( ( M  gsumg  ( U  o.  y
) ) ( +g  `  M ) <" z "> ) )
6349gsumwcl 15622 . . . . . . . . . . . 12  |-  ( ( M  e.  Mnd  /\  ( U  o.  y
)  e. Word  ( Base `  M ) )  -> 
( M  gsumg  ( U  o.  y
) )  e.  (
Base `  M )
)
6446, 54, 63syl2anc 661 . . . . . . . . . . 11  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( M  gsumg  ( U  o.  y
) )  e.  (
Base `  M )
)
6523, 49, 57frmdadd 15637 . . . . . . . . . . 11  |-  ( ( ( M  gsumg  ( U  o.  y
) )  e.  (
Base `  M )  /\  <" z ">  e.  ( Base `  M ) )  -> 
( ( M  gsumg  ( U  o.  y ) ) ( +g  `  M
) <" z "> )  =  ( ( M  gsumg  ( U  o.  y
) ) concat  <" z "> ) )
6664, 55, 65syl2anc 661 . . . . . . . . . 10  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  (
( M  gsumg  ( U  o.  y
) ) ( +g  `  M ) <" z "> )  =  ( ( M  gsumg  ( U  o.  y
) ) concat  <" z "> ) )
6762, 66eqtrd 2492 . . . . . . . . 9  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  (
( M  gsumg  ( U  o.  y
) ) ( +g  `  M ) ( M 
gsumg  <" <" z "> "> )
)  =  ( ( M  gsumg  ( U  o.  y
) ) concat  <" z "> ) )
6859, 67eqtrd 2492 . . . . . . . 8  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( M  gsumg  ( ( U  o.  y ) concat  <" <" z "> "> ) )  =  ( ( M  gsumg  ( U  o.  y
) ) concat  <" z "> ) )
6944, 68eqtrd 2492 . . . . . . 7  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  ( M  gsumg  ( U  o.  (
y concat  <" z "> ) ) )  =  ( ( M 
gsumg  ( U  o.  y
) ) concat  <" z "> ) )
7069eqeq1d 2453 . . . . . 6  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  (
( M  gsumg  ( U  o.  (
y concat  <" z "> ) ) )  =  ( y concat  <" z "> )  <->  ( ( M  gsumg  ( U  o.  y
) ) concat  <" z "> )  =  ( y concat  <" z "> ) ) )
7127, 70syl5ibr 221 . . . . 5  |-  ( ( I  e.  V  /\  ( y  e. Word  I  /\  z  e.  I
) )  ->  (
( M  gsumg  ( U  o.  y
) )  =  y  ->  ( M  gsumg  ( U  o.  ( y concat  <" z "> )
) )  =  ( y concat  <" z "> ) ) )
7271expcom 435 . . . 4  |-  ( ( y  e. Word  I  /\  z  e.  I )  ->  ( I  e.  V  ->  ( ( M  gsumg  ( U  o.  y ) )  =  y  ->  ( M  gsumg  ( U  o.  (
y concat  <" z "> ) ) )  =  ( y concat  <" z "> )
) ) )
7372a2d 26 . . 3  |-  ( ( y  e. Word  I  /\  z  e.  I )  ->  ( ( I  e.  V  ->  ( M  gsumg  ( U  o.  y ) )  =  y )  ->  ( I  e.  V  ->  ( M  gsumg  ( U  o.  ( y concat  <" z "> ) ) )  =  ( y concat  <" z "> ) ) ) )
747, 12, 17, 22, 26, 73wrdind 12475 . 2  |-  ( W  e. Word  I  ->  (
I  e.  V  -> 
( M  gsumg  ( U  o.  W
) )  =  W ) )
7574impcom 430 1  |-  ( ( I  e.  V  /\  W  e. Word  I )  ->  ( M  gsumg  ( U  o.  W
) )  =  W )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1370    e. wcel 1758   (/)c0 3737    o. ccom 4944   -->wf 5514   ` cfv 5518  (class class class)co 6192  Word cword 12325   concat cconcat 12327   <"cs1 12328   Basecbs 14278   +g cplusg 14342    gsumg cgsu 14483   Mndcmnd 15513  freeMndcfrmd 15629  varFMndcvrmd 15630
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-rep 4503  ax-sep 4513  ax-nul 4521  ax-pow 4570  ax-pr 4631  ax-un 6474  ax-cnex 9441  ax-resscn 9442  ax-1cn 9443  ax-icn 9444  ax-addcl 9445  ax-addrcl 9446  ax-mulcl 9447  ax-mulrcl 9448  ax-mulcom 9449  ax-addass 9450  ax-mulass 9451  ax-distr 9452  ax-i2m1 9453  ax-1ne0 9454  ax-1rid 9455  ax-rnegex 9456  ax-rrecex 9457  ax-cnre 9458  ax-pre-lttri 9459  ax-pre-lttrn 9460  ax-pre-ltadd 9461  ax-pre-mulgt0 9462
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rmo 2803  df-rab 2804  df-v 3072  df-sbc 3287  df-csb 3389  df-dif 3431  df-un 3433  df-in 3435  df-ss 3442  df-pss 3444  df-nul 3738  df-if 3892  df-pw 3962  df-sn 3978  df-pr 3980  df-tp 3982  df-op 3984  df-uni 4192  df-int 4229  df-iun 4273  df-br 4393  df-opab 4451  df-mpt 4452  df-tr 4486  df-eprel 4732  df-id 4736  df-po 4741  df-so 4742  df-fr 4779  df-we 4781  df-ord 4822  df-on 4823  df-lim 4824  df-suc 4825  df-xp 4946  df-rel 4947  df-cnv 4948  df-co 4949  df-dm 4950  df-rn 4951  df-res 4952  df-ima 4953  df-iota 5481  df-fun 5520  df-fn 5521  df-f 5522  df-f1 5523  df-fo 5524  df-f1o 5525  df-fv 5526  df-riota 6153  df-ov 6195  df-oprab 6196  df-mpt2 6197  df-om 6579  df-1st 6679  df-2nd 6680  df-recs 6934  df-rdg 6968  df-1o 7022  df-oadd 7026  df-er 7203  df-map 7318  df-pm 7319  df-en 7413  df-dom 7414  df-sdom 7415  df-fin 7416  df-card 8212  df-pnf 9523  df-mnf 9524  df-xr 9525  df-ltxr 9526  df-le 9527  df-sub 9700  df-neg 9701  df-nn 10426  df-2 10483  df-n0 10683  df-z 10750  df-uz 10965  df-fz 11541  df-fzo 11652  df-seq 11910  df-hash 12207  df-word 12333  df-concat 12335  df-s1 12336  df-substr 12337  df-struct 14280  df-ndx 14281  df-slot 14282  df-base 14283  df-sets 14284  df-ress 14285  df-plusg 14355  df-0g 14484  df-gsum 14485  df-mnd 15519  df-submnd 15569  df-frmd 15631  df-vrmd 15632
This theorem is referenced by:  frmdss2  15645  frmdup3  15648  frgpup3lem  16380
  Copyright terms: Public domain W3C validator