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

Theorem repswsymballbi 12410
Description: A word is a "repeated symbol word" iff each of its symbols equals the first symbol of the word. (Contributed by AV, 10-Nov-2018.)
Assertion
Ref Expression
repswsymballbi  |-  ( W  e. Word  V  ->  ( W  =  ( ( W `  0 ) repeatS  (
# `  W )
)  <->  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) )
Distinct variable group:    i, W
Allowed substitution hint:    V( i)

Proof of Theorem repswsymballbi
StepHypRef Expression
1 fveq2 5686 . . . . 5  |-  ( W  =  (/)  ->  ( # `  W )  =  (
# `  (/) ) )
2 hash0 12127 . . . . 5  |-  ( # `  (/) )  =  0
31, 2syl6eq 2486 . . . 4  |-  ( W  =  (/)  ->  ( # `  W )  =  0 )
4 fvex 5696 . . . . . . . 8  |-  ( W `
 0 )  e. 
_V
5 repsw0 12407 . . . . . . . 8  |-  ( ( W `  0 )  e.  _V  ->  (
( W `  0
) repeatS  0 )  =  (/) )
64, 5ax-mp 5 . . . . . . 7  |-  ( ( W `  0 ) repeatS 
0 )  =  (/)
76eqcomi 2442 . . . . . 6  |-  (/)  =  ( ( W `  0
) repeatS  0 )
8 simpr 461 . . . . . 6  |-  ( ( ( # `  W
)  =  0  /\  W  =  (/) )  ->  W  =  (/) )
9 oveq2 6094 . . . . . . 7  |-  ( (
# `  W )  =  0  ->  (
( W `  0
) repeatS  ( # `  W
) )  =  ( ( W `  0
) repeatS  0 ) )
109adantr 465 . . . . . 6  |-  ( ( ( # `  W
)  =  0  /\  W  =  (/) )  -> 
( ( W ` 
0 ) repeatS  ( # `  W
) )  =  ( ( W `  0
) repeatS  0 ) )
117, 8, 103eqtr4a 2496 . . . . 5  |-  ( ( ( # `  W
)  =  0  /\  W  =  (/) )  ->  W  =  ( ( W `  0 ) repeatS  (
# `  W )
) )
12 ral0 3779 . . . . . . 7  |-  A. i  e.  (/)  ( W `  i )  =  ( W `  0 )
13 oveq2 6094 . . . . . . . . 9  |-  ( (
# `  W )  =  0  ->  (
0..^ ( # `  W
) )  =  ( 0..^ 0 ) )
14 fzo0 11565 . . . . . . . . 9  |-  ( 0..^ 0 )  =  (/)
1513, 14syl6eq 2486 . . . . . . . 8  |-  ( (
# `  W )  =  0  ->  (
0..^ ( # `  W
) )  =  (/) )
1615raleqdv 2918 . . . . . . 7  |-  ( (
# `  W )  =  0  ->  ( A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
)  <->  A. i  e.  (/)  ( W `  i )  =  ( W ` 
0 ) ) )
1712, 16mpbiri 233 . . . . . 6  |-  ( (
# `  W )  =  0  ->  A. i  e.  ( 0..^ ( # `  W ) ) ( W `  i )  =  ( W ` 
0 ) )
1817adantr 465 . . . . 5  |-  ( ( ( # `  W
)  =  0  /\  W  =  (/) )  ->  A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) )
1911, 182thd 240 . . . 4  |-  ( ( ( # `  W
)  =  0  /\  W  =  (/) )  -> 
( W  =  ( ( W `  0
) repeatS  ( # `  W
) )  <->  A. i  e.  ( 0..^ ( # `  W ) ) ( W `  i )  =  ( W ` 
0 ) ) )
203, 19mpancom 669 . . 3  |-  ( W  =  (/)  ->  ( W  =  ( ( W `
 0 ) repeatS  ( # `
 W ) )  <->  A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) )
2120a1d 25 . 2  |-  ( W  =  (/)  ->  ( W  e. Word  V  ->  ( W  =  ( ( W `  0 ) repeatS  (
# `  W )
)  <->  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) ) )
22 df-3an 967 . . . . 5  |-  ( ( W  e. Word  V  /\  ( # `  W )  =  ( # `  W
)  /\  A. i  e.  ( 0..^ ( # `  W ) ) ( W `  i )  =  ( W ` 
0 ) )  <->  ( ( W  e. Word  V  /\  ( # `
 W )  =  ( # `  W
) )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) )
2322a1i 11 . . . 4  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  (
( W  e. Word  V  /\  ( # `  W
)  =  ( # `  W )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) )  <->  ( ( W  e. Word  V  /\  ( # `
 W )  =  ( # `  W
) )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) ) )
24 fstwrdne 12255 . . . . . 6  |-  ( ( W  e. Word  V  /\  W  =/=  (/) )  ->  ( W `  0 )  e.  V )
2524ancoms 453 . . . . 5  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  ( W `  0 )  e.  V )
26 lencl 12241 . . . . . 6  |-  ( W  e. Word  V  ->  ( # `
 W )  e. 
NN0 )
2726adantl 466 . . . . 5  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  ( # `
 W )  e. 
NN0 )
28 repsdf2 12408 . . . . 5  |-  ( ( ( W `  0
)  e.  V  /\  ( # `  W )  e.  NN0 )  -> 
( W  =  ( ( W `  0
) repeatS  ( # `  W
) )  <->  ( W  e. Word  V  /\  ( # `  W )  =  (
# `  W )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) ) )
2925, 27, 28syl2anc 661 . . . 4  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  ( W  =  ( ( W `  0 ) repeatS  (
# `  W )
)  <->  ( W  e. Word  V  /\  ( # `  W
)  =  ( # `  W )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) ) )
30 simpr 461 . . . . . 6  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  W  e. Word  V )
31 eqidd 2439 . . . . . 6  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  ( # `
 W )  =  ( # `  W
) )
3230, 31jca 532 . . . . 5  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  ( W  e. Word  V  /\  ( # `
 W )  =  ( # `  W
) ) )
3332biantrurd 508 . . . 4  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  ( A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
)  <->  ( ( W  e. Word  V  /\  ( # `
 W )  =  ( # `  W
) )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) ) )
3423, 29, 333bitr4d 285 . . 3  |-  ( ( W  =/=  (/)  /\  W  e. Word  V )  ->  ( W  =  ( ( W `  0 ) repeatS  (
# `  W )
)  <->  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) )
3534ex 434 . 2  |-  ( W  =/=  (/)  ->  ( W  e. Word  V  ->  ( W  =  ( ( W `
 0 ) repeatS  ( # `
 W ) )  <->  A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) ) )
3621, 35pm2.61ine 2682 1  |-  ( W  e. Word  V  ->  ( W  =  ( ( W `  0 ) repeatS  (
# `  W )
)  <->  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( W `  0
) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756    =/= wne 2601   A.wral 2710   _Vcvv 2967   (/)c0 3632   ` cfv 5413  (class class class)co 6086   0cc0 9274   NN0cn0 10571  ..^cfzo 11540   #chash 12095  Word cword 12213   repeatS creps 12220
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2419  ax-rep 4398  ax-sep 4408  ax-nul 4416  ax-pow 4465  ax-pr 4526  ax-un 6367  ax-cnex 9330  ax-resscn 9331  ax-1cn 9332  ax-icn 9333  ax-addcl 9334  ax-addrcl 9335  ax-mulcl 9336  ax-mulrcl 9337  ax-mulcom 9338  ax-addass 9339  ax-mulass 9340  ax-distr 9341  ax-i2m1 9342  ax-1ne0 9343  ax-1rid 9344  ax-rnegex 9345  ax-rrecex 9346  ax-cnre 9347  ax-pre-lttri 9348  ax-pre-lttrn 9349  ax-pre-ltadd 9350  ax-pre-mulgt0 9351
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2256  df-mo 2257  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2715  df-rex 2716  df-reu 2717  df-rab 2719  df-v 2969  df-sbc 3182  df-csb 3284  df-dif 3326  df-un 3328  df-in 3330  df-ss 3337  df-pss 3339  df-nul 3633  df-if 3787  df-pw 3857  df-sn 3873  df-pr 3875  df-tp 3877  df-op 3879  df-uni 4087  df-int 4124  df-iun 4168  df-br 4288  df-opab 4346  df-mpt 4347  df-tr 4381  df-eprel 4627  df-id 4631  df-po 4636  df-so 4637  df-fr 4674  df-we 4676  df-ord 4717  df-on 4718  df-lim 4719  df-suc 4720  df-xp 4841  df-rel 4842  df-cnv 4843  df-co 4844  df-dm 4845  df-rn 4846  df-res 4847  df-ima 4848  df-iota 5376  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-riota 6047  df-ov 6089  df-oprab 6090  df-mpt2 6091  df-om 6472  df-1st 6572  df-2nd 6573  df-recs 6824  df-rdg 6858  df-1o 6912  df-oadd 6916  df-er 7093  df-en 7303  df-dom 7304  df-sdom 7305  df-fin 7306  df-card 8101  df-pnf 9412  df-mnf 9413  df-xr 9414  df-ltxr 9415  df-le 9416  df-sub 9589  df-neg 9590  df-nn 10315  df-n0 10572  df-z 10639  df-uz 10854  df-fz 11430  df-fzo 11541  df-hash 12096  df-word 12221  df-reps 12228
This theorem is referenced by:  cshw1repsw  12449  cshwsidrepsw  14112  cshwshashlem1  14114  cshwshash  14123
  Copyright terms: Public domain W3C validator