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

Theorem efgredlema 15377
Description: The reduced word that forms the base of the sequence in efgsval 15368 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 15368 . . . . . . . . 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 15368 . . . . . . . . . 10  |-  ( A  e.  dom  S  -> 
( S `  A
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1412, 13syl 16 . . . . . . . . 9  |-  ( ph  ->  ( S `  A
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1511, 14eqtr3d 2472 . . . . . . . 8  |-  ( ph  ->  ( S `  B
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1610, 15eqtr3d 2472 . . . . . . 7  |-  ( ph  ->  ( B `  (
( # `  B )  -  1 ) )  =  ( A `  ( ( # `  A
)  -  1 ) ) )
17 oveq1 6091 . . . . . . . . 9  |-  ( (
# `  A )  =  1  ->  (
( # `  A )  -  1 )  =  ( 1  -  1 ) )
18 1m1e0 10073 . . . . . . . . 9  |-  ( 1  -  1 )  =  0
1917, 18syl6eq 2486 . . . . . . . 8  |-  ( (
# `  A )  =  1  ->  (
( # `  A )  -  1 )  =  0 )
2019fveq2d 5735 . . . . . . 7  |-  ( (
# `  A )  =  1  ->  ( A `  ( ( # `
 A )  - 
1 ) )  =  ( A `  0
) )
2116, 20sylan9eq 2490 . . . . . 6  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( B `  ( ( # `  B
)  -  1 ) )  =  ( A `
 0 ) )
2211eleq1d 2504 . . . . . . . . 9  |-  ( ph  ->  ( ( S `  A )  e.  D  <->  ( S `  B )  e.  D ) )
233, 4, 5, 6, 7, 8efgs1b 15373 . . . . . . . . . 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 15373 . . . . . . . . . 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 276 . . . . . . . 8  |-  ( ph  ->  ( ( # `  A
)  =  1  <->  ( # `
 B )  =  1 ) )
2827biimpa 472 . . . . . . 7  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( # `  B
)  =  1 )
29 oveq1 6091 . . . . . . . . 9  |-  ( (
# `  B )  =  1  ->  (
( # `  B )  -  1 )  =  ( 1  -  1 ) )
3029, 18syl6eq 2486 . . . . . . . 8  |-  ( (
# `  B )  =  1  ->  (
( # `  B )  -  1 )  =  0 )
3130fveq2d 5735 . . . . . . 7  |-  ( (
# `  B )  =  1  ->  ( B `  ( ( # `
 B )  - 
1 ) )  =  ( B `  0
) )
3228, 31syl 16 . . . . . 6  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( B `  ( ( # `  B
)  -  1 ) )  =  ( B `
 0 ) )
3321, 32eqtr3d 2472 . . . . 5  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( A ` 
0 )  =  ( B `  0 ) )
341, 33mtand 642 . . . 4  |-  ( ph  ->  -.  ( # `  A
)  =  1 )
353, 4, 5, 6, 7, 8efgsdm 15367 . . . . . . . 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 973 . . . . . . 7  |-  ( A  e.  dom  S  ->  A  e.  (Word  W  \  { (/) } ) )
37 eldifsn 3929 . . . . . . . 8  |-  ( A  e.  (Word  W  \  { (/) } )  <->  ( A  e. Word  W  /\  A  =/=  (/) ) )
38 lennncl 11741 . . . . . . . 8  |-  ( ( A  e. Word  W  /\  A  =/=  (/) )  ->  ( # `
 A )  e.  NN )
3937, 38sylbi 189 . . . . . . 7  |-  ( A  e.  (Word  W  \  { (/) } )  -> 
( # `  A )  e.  NN )
4012, 36, 393syl 19 . . . . . 6  |-  ( ph  ->  ( # `  A
)  e.  NN )
41 elnn1uz2 10557 . . . . . 6  |-  ( (
# `  A )  e.  NN  <->  ( ( # `  A )  =  1  \/  ( # `  A
)  e.  ( ZZ>= ` 
2 ) ) )
4240, 41sylib 190 . . . . 5  |-  ( ph  ->  ( ( # `  A
)  =  1  \/  ( # `  A
)  e.  ( ZZ>= ` 
2 ) ) )
4342ord 368 . . . 4  |-  ( ph  ->  ( -.  ( # `  A )  =  1  ->  ( # `  A
)  e.  ( ZZ>= ` 
2 ) ) )
4434, 43mpd 15 . . 3  |-  ( ph  ->  ( # `  A
)  e.  ( ZZ>= ` 
2 ) )
45 uz2m1nn 10555 . . 3  |-  ( (
# `  A )  e.  ( ZZ>= `  2 )  ->  ( ( # `  A
)  -  1 )  e.  NN )
4644, 45syl 16 . 2  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
4734, 27mtbid 293 . . . 4  |-  ( ph  ->  -.  ( # `  B
)  =  1 )
483, 4, 5, 6, 7, 8efgsdm 15367 . . . . . . . 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 973 . . . . . . 7  |-  ( B  e.  dom  S  ->  B  e.  (Word  W  \  { (/) } ) )
50 eldifsn 3929 . . . . . . . 8  |-  ( B  e.  (Word  W  \  { (/) } )  <->  ( B  e. Word  W  /\  B  =/=  (/) ) )
51 lennncl 11741 . . . . . . . 8  |-  ( ( B  e. Word  W  /\  B  =/=  (/) )  ->  ( # `
 B )  e.  NN )
5250, 51sylbi 189 . . . . . . 7  |-  ( B  e.  (Word  W  \  { (/) } )  -> 
( # `  B )  e.  NN )
532, 49, 523syl 19 . . . . . 6  |-  ( ph  ->  ( # `  B
)  e.  NN )
54 elnn1uz2 10557 . . . . . 6  |-  ( (
# `  B )  e.  NN  <->  ( ( # `  B )  =  1  \/  ( # `  B
)  e.  ( ZZ>= ` 
2 ) ) )
5553, 54sylib 190 . . . . 5  |-  ( ph  ->  ( ( # `  B
)  =  1  \/  ( # `  B
)  e.  ( ZZ>= ` 
2 ) ) )
5655ord 368 . . . 4  |-  ( ph  ->  ( -.  ( # `  B )  =  1  ->  ( # `  B
)  e.  ( ZZ>= ` 
2 ) ) )
5747, 56mpd 15 . . 3  |-  ( ph  ->  ( # `  B
)  e.  ( ZZ>= ` 
2 ) )
58 uz2m1nn 10555 . . 3  |-  ( (
# `  B )  e.  ( ZZ>= `  2 )  ->  ( ( # `  B
)  -  1 )  e.  NN )
5957, 58syl 16 . 2  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  NN )
6046, 59jca 520 1  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 178    \/ wo 359    /\ wa 360    = wceq 1653    e. wcel 1726    =/= wne 2601   A.wral 2707   {crab 2711    \ cdif 3319   (/)c0 3630   {csn 3816   <.cop 3819   <.cotp 3820   U_ciun 4095   class class class wbr 4215    e. cmpt 4269    _I cid 4496    X. cxp 4879   dom cdm 4881   ran crn 4882   ` cfv 5457  (class class class)co 6084    e. cmpt2 6086   1oc1o 6720   2oc2o 6721   0cc0 8995   1c1 8996    < clt 9125    - cmin 9296   NNcn 10005   2c2 10054   ZZ>=cuz 10493   ...cfz 11048  ..^cfzo 11140   #chash 11623  Word cword 11722   splice csplice 11726   <"cs2 11810   ~FG cefg 15343
This theorem is referenced by:  efgredlemf  15378  efgredlemg  15379  efgredlemd  15381  efgredlemc  15382  efgredlem  15384
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-rep 4323  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704  ax-cnex 9051  ax-resscn 9052  ax-1cn 9053  ax-icn 9054  ax-addcl 9055  ax-addrcl 9056  ax-mulcl 9057  ax-mulrcl 9058  ax-mulcom 9059  ax-addass 9060  ax-mulass 9061  ax-distr 9062  ax-i2m1 9063  ax-1ne0 9064  ax-1rid 9065  ax-rnegex 9066  ax-rrecex 9067  ax-cnre 9068  ax-pre-lttri 9069  ax-pre-lttrn 9070  ax-pre-ltadd 9071  ax-pre-mulgt0 9072
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-int 4053  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-tr 4306  df-eprel 4497  df-id 4501  df-po 4506  df-so 4507  df-fr 4544  df-we 4546  df-ord 4587  df-on 4588  df-lim 4589  df-suc 4590  df-om 4849  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-1st 6352  df-2nd 6353  df-riota 6552  df-recs 6636  df-rdg 6671  df-1o 6727  df-oadd 6731  df-er 6908  df-en 7113  df-dom 7114  df-sdom 7115  df-fin 7116  df-card 7831  df-pnf 9127  df-mnf 9128  df-xr 9129  df-ltxr 9130  df-le 9131  df-sub 9298  df-neg 9299  df-nn 10006  df-2 10063  df-n0 10227  df-z 10288  df-uz 10494  df-fz 11049  df-fzo 11141  df-hash 11624  df-word 11728
  Copyright terms: Public domain W3C validator