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

Theorem repsdf2 12716
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 12710 . . 3  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( S repeatS  N )  =  ( ( 0..^ N )  X.  { S } ) )
21eqeq2d 2481 . 2  |-  ( ( S  e.  V  /\  N  e.  NN0 )  -> 
( W  =  ( S repeatS  N )  <->  W  =  ( ( 0..^ N )  X.  { S } ) ) )
3 fconst2g 6116 . . 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 6124 . . . . . . . . 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 4171 . . . . . . . . . . . . . . 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 5739 . . . . . . . . . . . 12  |-  ( ( W : ( 0..^ N ) --> { S }  /\  { S }  C_  V )  ->  W : ( 0..^ N ) --> V )
12 iswrdi 12519 . . . . . . . . . . . 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 5731 . . . . . . . . . . . . . . 15  |-  ( W : ( 0..^ N ) --> { S }  ->  W  Fn  ( 0..^ N ) )
15 fseq0hash 12457 . . . . . . . . . . . . . . . 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 12520 . . . . . . . . . 10  |-  ( W  e. Word  V  ->  W : ( 0..^ (
# `  W )
) --> V )
27 ffn 5731 . . . . . . . . . 10  |-  ( W : ( 0..^ (
# `  W )
) --> V  ->  W  Fn  ( 0..^ ( # `  W ) ) )
28 oveq2 6293 . . . . . . . . . . . . . 14  |-  ( (
# `  W )  =  N  ->  ( 0..^ ( # `  W
) )  =  ( 0..^ N ) )
2928fneq2d 5672 . . . . . . . . . . . . 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 975 . . 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 973    = wceq 1379    e. wcel 1767   A.wral 2814    C_ wss 3476   {csn 4027    X. cxp 4997    Fn wfn 5583   -->wf 5584   ` cfv 5588  (class class class)co 6285   0cc0 9493   NN0cn0 10796  ..^cfzo 11793   #chash 12374  Word cword 12501   repeatS creps 12508
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 6577  ax-cnex 9549  ax-resscn 9550  ax-1cn 9551  ax-icn 9552  ax-addcl 9553  ax-addrcl 9554  ax-mulcl 9555  ax-mulrcl 9556  ax-mulcom 9557  ax-addass 9558  ax-mulass 9559  ax-distr 9560  ax-i2m1 9561  ax-1ne0 9562  ax-1rid 9563  ax-rnegex 9564  ax-rrecex 9565  ax-cnre 9566  ax-pre-lttri 9567  ax-pre-lttrn 9568  ax-pre-ltadd 9569  ax-pre-mulgt0 9570
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-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 6246  df-ov 6288  df-oprab 6289  df-mpt2 6290  df-om 6686  df-1st 6785  df-2nd 6786  df-recs 7043  df-rdg 7077  df-1o 7131  df-oadd 7135  df-er 7312  df-en 7518  df-dom 7519  df-sdom 7520  df-fin 7521  df-card 8321  df-pnf 9631  df-mnf 9632  df-xr 9633  df-ltxr 9634  df-le 9635  df-sub 9808  df-neg 9809  df-nn 10538  df-n0 10797  df-z 10866  df-uz 11084  df-fz 11674  df-fzo 11794  df-hash 12375  df-word 12509  df-reps 12516
This theorem is referenced by:  repswsymball  12717  repswsymballbi  12718  cshwrepswhash1  14448
  Copyright terms: Public domain W3C validator