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

Theorem repsdf2 12428
Description: Alternative definition of a "repeated symbol word". (Contributed by AV, 7-Nov-2018.)
Assertion
Ref Expression
repsdf2  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W  =  ( S repeatS  N )  <->  ( W  e. Word  V  /\  ( # `  W )  =  N  /\  A. i  e.  ( 0..^ N ) ( W `  i
)  =  S ) ) )
Distinct variable groups:    i, N    S, i    i, W
Allowed substitution hint:    V( i)

Proof of Theorem repsdf2
StepHypRef Expression
1 repsconst 12422 . . 3  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( S repeatS  N )  =  ( ( 0..^ N )  X.  { S } ) )
21eqeq2d 2454 . 2  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W  =  ( S repeatS  N )  <->  W  =  ( ( 0..^ N )  X.  { S } ) ) )
3 fconst2g 5944 . . 3  |-  ( S  e.  V  ->  ( W : ( 0..^ N ) --> { S }  <->  W  =  ( ( 0..^ N )  X.  { S } ) ) )
43adantr 465 . 2  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W : ( 0..^ N ) --> { S }  <->  W  =  ( ( 0..^ N )  X.  { S } ) ) )
5 fconstfv 5952 . . . . . . . . 9  |-  ( W : ( 0..^ N ) --> { S }  <->  ( W  Fn  ( 0..^ N )  /\  A. i  e.  ( 0..^ N ) ( W `
 i )  =  S ) )
6 simpr 461 . . . . . . . . . . . . 13  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  W : ( 0..^ N ) --> { S } )  ->  W : ( 0..^ N ) --> { S }
)
7 snssi 4029 . . . . . . . . . . . . . . 15  |-  ( S  e.  V  ->  { S }  C_  V )
87adantr 465 . . . . . . . . . . . . . 14  |-  ( ( S  e.  V  /\  N  e.  NN0 )  ->  { S }  C_  V
)
98adantr 465 . . . . . . . . . . . . 13  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  W : ( 0..^ N ) --> { S } )  ->  { S }  C_  V
)
106, 9jca 532 . . . . . . . . . . . 12  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  W : ( 0..^ N ) --> { S } )  -> 
( W : ( 0..^ N ) --> { S }  /\  { S }  C_  V ) )
11 fss 5579 . . . . . . . . . . . 12  |-  ( ( W : ( 0..^ N ) --> { S }  /\  { S }  C_  V )  ->  W : ( 0..^ N ) --> V )
12 iswrdi 12251 . . . . . . . . . . . 12  |-  ( W : ( 0..^ N ) --> V  ->  W  e. Word  V )
1310, 11, 123syl 20 . . . . . . . . . . 11  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  W : ( 0..^ N ) --> { S } )  ->  W  e. Word  V )
14 ffn 5571 . . . . . . . . . . . . . . 15  |-  ( W : ( 0..^ N ) --> { S }  ->  W  Fn  ( 0..^ N ) )
15 fseq0hash 12206 . . . . . . . . . . . . . . . 16  |-  ( ( N  e.  NN0  /\  W  Fn  ( 0..^ N ) )  -> 
( # `  W )  =  N )
1615expcom 435 . . . . . . . . . . . . . . 15  |-  ( W  Fn  ( 0..^ N )  ->  ( N  e.  NN0  ->  ( # `  W
)  =  N ) )
1714, 16syl 16 . . . . . . . . . . . . . 14  |-  ( W : ( 0..^ N ) --> { S }  ->  ( N  e.  NN0  ->  ( # `  W
)  =  N ) )
1817com12 31 . . . . . . . . . . . . 13  |-  ( N  e.  NN0  ->  ( W : ( 0..^ N ) --> { S }  ->  ( # `  W
)  =  N ) )
1918adantl 466 . . . . . . . . . . . 12  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W : ( 0..^ N ) --> { S }  ->  ( # `
 W )  =  N ) )
2019imp 429 . . . . . . . . . . 11  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  W : ( 0..^ N ) --> { S } )  -> 
( # `  W )  =  N )
2113, 20jca 532 . . . . . . . . . 10  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  W : ( 0..^ N ) --> { S } )  -> 
( W  e. Word  V  /\  ( # `  W
)  =  N ) )
2221ex 434 . . . . . . . . 9  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W : ( 0..^ N ) --> { S }  ->  ( W  e. Word  V  /\  ( # `
 W )  =  N ) ) )
235, 22syl5bir 218 . . . . . . . 8  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( ( W  Fn  ( 0..^ N )  /\  A. i  e.  ( 0..^ N ) ( W `
 i )  =  S )  ->  ( W  e. Word  V  /\  ( # `
 W )  =  N ) ) )
2423expcomd 438 . . . . . . 7  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( A. i  e.  ( 0..^ N ) ( W `  i
)  =  S  -> 
( W  Fn  (
0..^ N )  -> 
( W  e. Word  V  /\  ( # `  W
)  =  N ) ) ) )
2524imp 429 . . . . . 6  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  A. i  e.  ( 0..^ N ) ( W `  i
)  =  S )  ->  ( W  Fn  ( 0..^ N )  -> 
( W  e. Word  V  /\  ( # `  W
)  =  N ) ) )
26 wrdf 12252 . . . . . . . . . 10  |-  ( W  e. Word  V  ->  W : ( 0..^ (
# `  W )
) --> V )
27 ffn 5571 . . . . . . . . . 10  |-  ( W : ( 0..^ (
# `  W )
) --> V  ->  W  Fn  ( 0..^ ( # `  W ) ) )
28 oveq2 6111 . . . . . . . . . . . . . 14  |-  ( (
# `  W )  =  N  ->  ( 0..^ ( # `  W
) )  =  ( 0..^ N ) )
2928fneq2d 5514 . . . . . . . . . . . . 13  |-  ( (
# `  W )  =  N  ->  ( W  Fn  ( 0..^ (
# `  W )
)  <->  W  Fn  (
0..^ N ) ) )
3029biimpd 207 . . . . . . . . . . . 12  |-  ( (
# `  W )  =  N  ->  ( W  Fn  ( 0..^ (
# `  W )
)  ->  W  Fn  ( 0..^ N ) ) )
3130a1d 25 . . . . . . . . . . 11  |-  ( (
# `  W )  =  N  ->  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W  Fn  (
0..^ ( # `  W
) )  ->  W  Fn  ( 0..^ N ) ) ) )
3231com13 80 . . . . . . . . . 10  |-  ( W  Fn  ( 0..^ (
# `  W )
)  ->  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( ( # `  W
)  =  N  ->  W  Fn  ( 0..^ N ) ) ) )
3326, 27, 323syl 20 . . . . . . . . 9  |-  ( W  e. Word  V  ->  (
( S  e.  V  /\  N  e.  NN0 )  ->  ( ( # `  W )  =  N  ->  W  Fn  (
0..^ N ) ) ) )
3433com12 31 . . . . . . . 8  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W  e. Word  V  ->  ( ( # `  W
)  =  N  ->  W  Fn  ( 0..^ N ) ) ) )
3534impd 431 . . . . . . 7  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( ( W  e. Word  V  /\  ( # `  W
)  =  N )  ->  W  Fn  (
0..^ N ) ) )
3635adantr 465 . . . . . 6  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  A. i  e.  ( 0..^ N ) ( W `  i
)  =  S )  ->  ( ( W  e. Word  V  /\  ( # `
 W )  =  N )  ->  W  Fn  ( 0..^ N ) ) )
3725, 36impbid 191 . . . . 5  |-  ( ( ( S  e.  V  /\  N  e.  NN0 )  /\  A. i  e.  ( 0..^ N ) ( W `  i
)  =  S )  ->  ( W  Fn  ( 0..^ N )  <->  ( W  e. Word  V  /\  ( # `  W )  =  N ) ) )
3837ex 434 . . . 4  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( A. i  e.  ( 0..^ N ) ( W `  i
)  =  S  -> 
( W  Fn  (
0..^ N )  <->  ( W  e. Word  V  /\  ( # `  W )  =  N ) ) ) )
3938pm5.32rd 640 . . 3  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( ( W  Fn  ( 0..^ N )  /\  A. i  e.  ( 0..^ N ) ( W `
 i )  =  S )  <->  ( ( W  e. Word  V  /\  ( # `
 W )  =  N )  /\  A. i  e.  ( 0..^ N ) ( W `
 i )  =  S ) ) )
40 df-3an 967 . . 3  |-  ( ( W  e. Word  V  /\  ( # `  W )  =  N  /\  A. i  e.  ( 0..^ N ) ( W `
 i )  =  S )  <->  ( ( W  e. Word  V  /\  ( # `
 W )  =  N )  /\  A. i  e.  ( 0..^ N ) ( W `
 i )  =  S ) )
4139, 5, 403bitr4g 288 . 2  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W : ( 0..^ N ) --> { S }  <->  ( W  e. Word  V  /\  ( # `  W )  =  N  /\  A. i  e.  ( 0..^ N ) ( W `  i
)  =  S ) ) )
422, 4, 413bitr2d 281 1  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W  =  ( S repeatS  N )  <->  ( W  e. Word  V  /\  ( # `  W )  =  N  /\  A. i  e.  ( 0..^ N ) ( W `  i
)  =  S ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 965    = wceq 1369    e. wcel 1756   A.wral 2727    C_ wss 3340   {csn 3889    X. cxp 4850    Fn wfn 5425   -->wf 5426   ` cfv 5430  (class class class)co 6103   0cc0 9294   NN0cn0 10591  ..^cfzo 11560   #chash 12115  Word cword 12233   repeatS creps 12240
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 2423  ax-rep 4415  ax-sep 4425  ax-nul 4433  ax-pow 4482  ax-pr 4543  ax-un 6384  ax-cnex 9350  ax-resscn 9351  ax-1cn 9352  ax-icn 9353  ax-addcl 9354  ax-addrcl 9355  ax-mulcl 9356  ax-mulrcl 9357  ax-mulcom 9358  ax-addass 9359  ax-mulass 9360  ax-distr 9361  ax-i2m1 9362  ax-1ne0 9363  ax-1rid 9364  ax-rnegex 9365  ax-rrecex 9366  ax-cnre 9367  ax-pre-lttri 9368  ax-pre-lttrn 9369  ax-pre-ltadd 9370  ax-pre-mulgt0 9371
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 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2620  df-nel 2621  df-ral 2732  df-rex 2733  df-reu 2734  df-rab 2736  df-v 2986  df-sbc 3199  df-csb 3301  df-dif 3343  df-un 3345  df-in 3347  df-ss 3354  df-pss 3356  df-nul 3650  df-if 3804  df-pw 3874  df-sn 3890  df-pr 3892  df-tp 3894  df-op 3896  df-uni 4104  df-int 4141  df-iun 4185  df-br 4305  df-opab 4363  df-mpt 4364  df-tr 4398  df-eprel 4644  df-id 4648  df-po 4653  df-so 4654  df-fr 4691  df-we 4693  df-ord 4734  df-on 4735  df-lim 4736  df-suc 4737  df-xp 4858  df-rel 4859  df-cnv 4860  df-co 4861  df-dm 4862  df-rn 4863  df-res 4864  df-ima 4865  df-iota 5393  df-fun 5432  df-fn 5433  df-f 5434  df-f1 5435  df-fo 5436  df-f1o 5437  df-fv 5438  df-riota 6064  df-ov 6106  df-oprab 6107  df-mpt2 6108  df-om 6489  df-1st 6589  df-2nd 6590  df-recs 6844  df-rdg 6878  df-1o 6932  df-oadd 6936  df-er 7113  df-en 7323  df-dom 7324  df-sdom 7325  df-fin 7326  df-card 8121  df-pnf 9432  df-mnf 9433  df-xr 9434  df-ltxr 9435  df-le 9436  df-sub 9609  df-neg 9610  df-nn 10335  df-n0 10592  df-z 10659  df-uz 10874  df-fz 11450  df-fzo 11561  df-hash 12116  df-word 12241  df-reps 12248
This theorem is referenced by:  repswsymball  12429  repswsymballbi  12430  cshwrepswhash1  14141
  Copyright terms: Public domain W3C validator