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

Theorem efgredlema 16230
Description: The reduced word that forms the base of the sequence in efgsval 16221 is uniquely determined, given the ending representation. (Contributed by Mario Carneiro, 1-Oct-2015.)
Hypotheses
Ref Expression
efgval.w  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
efgval.r  |-  .~  =  ( ~FG  `  I )
efgval2.m  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
efgval2.t  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
efgred.d  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
efgred.s  |-  S  =  ( m  e.  {
t  e.  (Word  W  \  { (/) } )  |  ( ( t ` 
0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t
) ) ( t `
 k )  e. 
ran  ( T `  ( t `  (
k  -  1 ) ) ) ) } 
|->  ( m `  (
( # `  m )  -  1 ) ) )
efgredlem.1  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
efgredlem.2  |-  ( ph  ->  A  e.  dom  S
)
efgredlem.3  |-  ( ph  ->  B  e.  dom  S
)
efgredlem.4  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
efgredlem.5  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
Assertion
Ref Expression
efgredlema  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
Distinct variable groups:    a, b, A    y, a, z, b   
t, n, v, w, y, z    m, a, n, t, v, w, x, M, b    k,
a, T, b, m, t, x    W, a, b    k, n, v, w, y, z, W, m, t, x    .~ , a,
b, m, t, x, y, z    B, a, b    S, a, b    I,
a, b, m, n, t, v, w, x, y, z    D, a, b, m, t
Allowed substitution hints:    ph( x, y, z, w, v, t, k, m, n, a, b)    A( x, y, z, w, v, t, k, m, n)    B( x, y, z, w, v, t, k, m, n)    D( x, y, z, w, v, k, n)    .~ ( w, v, k, n)    S( x, y, z, w, v, t, k, m, n)    T( y, z, w, v, n)    I( k)    M( y, z, k)

Proof of Theorem efgredlema
Dummy variable  u is distinct from all other variables.
StepHypRef Expression
1 efgredlem.5 . . . . 5  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
2 efgredlem.3 . . . . . . . . 9  |-  ( ph  ->  B  e.  dom  S
)
3 efgval.w . . . . . . . . . 10  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
4 efgval.r . . . . . . . . . 10  |-  .~  =  ( ~FG  `  I )
5 efgval2.m . . . . . . . . . 10  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
6 efgval2.t . . . . . . . . . 10  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
7 efgred.d . . . . . . . . . 10  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
8 efgred.s . . . . . . . . . 10  |-  S  =  ( m  e.  {
t  e.  (Word  W  \  { (/) } )  |  ( ( t ` 
0 )  e.  D  /\  A. k  e.  ( 1..^ ( # `  t
) ) ( t `
 k )  e. 
ran  ( T `  ( t `  (
k  -  1 ) ) ) ) } 
|->  ( m `  (
( # `  m )  -  1 ) ) )
93, 4, 5, 6, 7, 8efgsval 16221 . . . . . . . . 9  |-  ( B  e.  dom  S  -> 
( S `  B
)  =  ( B `
 ( ( # `  B )  -  1 ) ) )
102, 9syl 16 . . . . . . . 8  |-  ( ph  ->  ( S `  B
)  =  ( B `
 ( ( # `  B )  -  1 ) ) )
11 efgredlem.4 . . . . . . . . 9  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
12 efgredlem.2 . . . . . . . . . 10  |-  ( ph  ->  A  e.  dom  S
)
133, 4, 5, 6, 7, 8efgsval 16221 . . . . . . . . . 10  |-  ( A  e.  dom  S  -> 
( S `  A
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1412, 13syl 16 . . . . . . . . 9  |-  ( ph  ->  ( S `  A
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1511, 14eqtr3d 2475 . . . . . . . 8  |-  ( ph  ->  ( S `  B
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1610, 15eqtr3d 2475 . . . . . . 7  |-  ( ph  ->  ( B `  (
( # `  B )  -  1 ) )  =  ( A `  ( ( # `  A
)  -  1 ) ) )
17 oveq1 6097 . . . . . . . . 9  |-  ( (
# `  A )  =  1  ->  (
( # `  A )  -  1 )  =  ( 1  -  1 ) )
18 1m1e0 10386 . . . . . . . . 9  |-  ( 1  -  1 )  =  0
1917, 18syl6eq 2489 . . . . . . . 8  |-  ( (
# `  A )  =  1  ->  (
( # `  A )  -  1 )  =  0 )
2019fveq2d 5692 . . . . . . 7  |-  ( (
# `  A )  =  1  ->  ( A `  ( ( # `
 A )  - 
1 ) )  =  ( A `  0
) )
2116, 20sylan9eq 2493 . . . . . 6  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( B `  ( ( # `  B
)  -  1 ) )  =  ( A `
 0 ) )
2211eleq1d 2507 . . . . . . . . 9  |-  ( ph  ->  ( ( S `  A )  e.  D  <->  ( S `  B )  e.  D ) )
233, 4, 5, 6, 7, 8efgs1b 16226 . . . . . . . . . 10  |-  ( A  e.  dom  S  -> 
( ( S `  A )  e.  D  <->  (
# `  A )  =  1 ) )
2412, 23syl 16 . . . . . . . . 9  |-  ( ph  ->  ( ( S `  A )  e.  D  <->  (
# `  A )  =  1 ) )
253, 4, 5, 6, 7, 8efgs1b 16226 . . . . . . . . . 10  |-  ( B  e.  dom  S  -> 
( ( S `  B )  e.  D  <->  (
# `  B )  =  1 ) )
262, 25syl 16 . . . . . . . . 9  |-  ( ph  ->  ( ( S `  B )  e.  D  <->  (
# `  B )  =  1 ) )
2722, 24, 263bitr3d 283 . . . . . . . 8  |-  ( ph  ->  ( ( # `  A
)  =  1  <->  ( # `
 B )  =  1 ) )
2827biimpa 481 . . . . . . 7  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( # `  B
)  =  1 )
29 oveq1 6097 . . . . . . . . 9  |-  ( (
# `  B )  =  1  ->  (
( # `  B )  -  1 )  =  ( 1  -  1 ) )
3029, 18syl6eq 2489 . . . . . . . 8  |-  ( (
# `  B )  =  1  ->  (
( # `  B )  -  1 )  =  0 )
3130fveq2d 5692 . . . . . . 7  |-  ( (
# `  B )  =  1  ->  ( B `  ( ( # `
 B )  - 
1 ) )  =  ( B `  0
) )
3228, 31syl 16 . . . . . 6  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( B `  ( ( # `  B
)  -  1 ) )  =  ( B `
 0 ) )
3321, 32eqtr3d 2475 . . . . 5  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( A ` 
0 )  =  ( B `  0 ) )
341, 33mtand 654 . . . 4  |-  ( ph  ->  -.  ( # `  A
)  =  1 )
353, 4, 5, 6, 7, 8efgsdm 16220 . . . . . . . 8  |-  ( A  e.  dom  S  <->  ( A  e.  (Word  W  \  { (/)
} )  /\  ( A `  0 )  e.  D  /\  A. u  e.  ( 1..^ ( # `  A ) ) ( A `  u )  e.  ran  ( T `
 ( A `  ( u  -  1
) ) ) ) )
3635simp1bi 998 . . . . . . 7  |-  ( A  e.  dom  S  ->  A  e.  (Word  W  \  { (/) } ) )
37 eldifsn 3997 . . . . . . . 8  |-  ( A  e.  (Word  W  \  { (/) } )  <->  ( A  e. Word  W  /\  A  =/=  (/) ) )
38 lennncl 12246 . . . . . . . 8  |-  ( ( A  e. Word  W  /\  A  =/=  (/) )  ->  ( # `
 A )  e.  NN )
3937, 38sylbi 195 . . . . . . 7  |-  ( A  e.  (Word  W  \  { (/) } )  -> 
( # `  A )  e.  NN )
4012, 36, 393syl 20 . . . . . 6  |-  ( ph  ->  ( # `  A
)  e.  NN )
41 elnn1uz2 10927 . . . . . 6  |-  ( (
# `  A )  e.  NN  <->  ( ( # `  A )  =  1  \/  ( # `  A
)  e.  ( ZZ>= ` 
2 ) ) )
4240, 41sylib 196 . . . . 5  |-  ( ph  ->  ( ( # `  A
)  =  1  \/  ( # `  A
)  e.  ( ZZ>= ` 
2 ) ) )
4342ord 377 . . . 4  |-  ( ph  ->  ( -.  ( # `  A )  =  1  ->  ( # `  A
)  e.  ( ZZ>= ` 
2 ) ) )
4434, 43mpd 15 . . 3  |-  ( ph  ->  ( # `  A
)  e.  ( ZZ>= ` 
2 ) )
45 uz2m1nn 10925 . . 3  |-  ( (
# `  A )  e.  ( ZZ>= `  2 )  ->  ( ( # `  A
)  -  1 )  e.  NN )
4644, 45syl 16 . 2  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
4734, 27mtbid 300 . . . 4  |-  ( ph  ->  -.  ( # `  B
)  =  1 )
483, 4, 5, 6, 7, 8efgsdm 16220 . . . . . . . 8  |-  ( B  e.  dom  S  <->  ( B  e.  (Word  W  \  { (/)
} )  /\  ( B `  0 )  e.  D  /\  A. u  e.  ( 1..^ ( # `  B ) ) ( B `  u )  e.  ran  ( T `
 ( B `  ( u  -  1
) ) ) ) )
4948simp1bi 998 . . . . . . 7  |-  ( B  e.  dom  S  ->  B  e.  (Word  W  \  { (/) } ) )
50 eldifsn 3997 . . . . . . . 8  |-  ( B  e.  (Word  W  \  { (/) } )  <->  ( B  e. Word  W  /\  B  =/=  (/) ) )
51 lennncl 12246 . . . . . . . 8  |-  ( ( B  e. Word  W  /\  B  =/=  (/) )  ->  ( # `
 B )  e.  NN )
5250, 51sylbi 195 . . . . . . 7  |-  ( B  e.  (Word  W  \  { (/) } )  -> 
( # `  B )  e.  NN )
532, 49, 523syl 20 . . . . . 6  |-  ( ph  ->  ( # `  B
)  e.  NN )
54 elnn1uz2 10927 . . . . . 6  |-  ( (
# `  B )  e.  NN  <->  ( ( # `  B )  =  1  \/  ( # `  B
)  e.  ( ZZ>= ` 
2 ) ) )
5553, 54sylib 196 . . . . 5  |-  ( ph  ->  ( ( # `  B
)  =  1  \/  ( # `  B
)  e.  ( ZZ>= ` 
2 ) ) )
5655ord 377 . . . 4  |-  ( ph  ->  ( -.  ( # `  B )  =  1  ->  ( # `  B
)  e.  ( ZZ>= ` 
2 ) ) )
5747, 56mpd 15 . . 3  |-  ( ph  ->  ( # `  B
)  e.  ( ZZ>= ` 
2 ) )
58 uz2m1nn 10925 . . 3  |-  ( (
# `  B )  e.  ( ZZ>= `  2 )  ->  ( ( # `  B
)  -  1 )  e.  NN )
5957, 58syl 16 . 2  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  NN )
6046, 59jca 529 1  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    \/ wo 368    /\ wa 369    = wceq 1364    e. wcel 1761    =/= wne 2604   A.wral 2713   {crab 2717    \ cdif 3322   (/)c0 3634   {csn 3874   <.cop 3880   <.cotp 3882   U_ciun 4168   class class class wbr 4289    e. cmpt 4347    _I cid 4627    X. cxp 4834   dom cdm 4836   ran crn 4837   ` cfv 5415  (class class class)co 6090    e. cmpt2 6092   1oc1o 6909   2oc2o 6910   0cc0 9278   1c1 9279    < clt 9414    - cmin 9591   NNcn 10318   2c2 10367   ZZ>=cuz 10857   ...cfz 11433  ..^cfzo 11544   #chash 12099  Word cword 12217   splice csplice 12222   <"cs2 12464   ~FG cefg 16196
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-8 1763  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-rep 4400  ax-sep 4410  ax-nul 4418  ax-pow 4467  ax-pr 4528  ax-un 6371  ax-cnex 9334  ax-resscn 9335  ax-1cn 9336  ax-icn 9337  ax-addcl 9338  ax-addrcl 9339  ax-mulcl 9340  ax-mulrcl 9341  ax-mulcom 9342  ax-addass 9343  ax-mulass 9344  ax-distr 9345  ax-i2m1 9346  ax-1ne0 9347  ax-1rid 9348  ax-rnegex 9349  ax-rrecex 9350  ax-cnre 9351  ax-pre-lttri 9352  ax-pre-lttrn 9353  ax-pre-ltadd 9354  ax-pre-mulgt0 9355
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 961  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2261  df-mo 2262  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rab 2722  df-v 2972  df-sbc 3184  df-csb 3286  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-pss 3341  df-nul 3635  df-if 3789  df-pw 3859  df-sn 3875  df-pr 3877  df-tp 3879  df-op 3881  df-uni 4089  df-int 4126  df-iun 4170  df-br 4290  df-opab 4348  df-mpt 4349  df-tr 4383  df-eprel 4628  df-id 4632  df-po 4637  df-so 4638  df-fr 4675  df-we 4677  df-ord 4718  df-on 4719  df-lim 4720  df-suc 4721  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-rn 4847  df-res 4848  df-ima 4849  df-iota 5378  df-fun 5417  df-fn 5418  df-f 5419  df-f1 5420  df-fo 5421  df-f1o 5422  df-fv 5423  df-riota 6049  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-om 6476  df-1st 6576  df-2nd 6577  df-recs 6828  df-rdg 6862  df-1o 6916  df-oadd 6920  df-er 7097  df-en 7307  df-dom 7308  df-sdom 7309  df-fin 7310  df-card 8105  df-pnf 9416  df-mnf 9417  df-xr 9418  df-ltxr 9419  df-le 9420  df-sub 9593  df-neg 9594  df-nn 10319  df-2 10376  df-n0 10576  df-z 10643  df-uz 10858  df-fz 11434  df-fzo 11545  df-hash 12100  df-word 12225
This theorem is referenced by:  efgredlemf  16231  efgredlemg  16232  efgredlemd  16234  efgredlemc  16235  efgredlem  16237
  Copyright terms: Public domain W3C validator