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

Theorem efgredlema 16627
Description: The reduced word that forms the base of the sequence in efgsval 16618 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 16618 . . . . . . . . 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 16618 . . . . . . . . . 10  |-  ( A  e.  dom  S  -> 
( S `  A
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1412, 13syl 16 . . . . . . . . 9  |-  ( ph  ->  ( S `  A
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1511, 14eqtr3d 2484 . . . . . . . 8  |-  ( ph  ->  ( S `  B
)  =  ( A `
 ( ( # `  A )  -  1 ) ) )
1610, 15eqtr3d 2484 . . . . . . 7  |-  ( ph  ->  ( B `  (
( # `  B )  -  1 ) )  =  ( A `  ( ( # `  A
)  -  1 ) ) )
17 oveq1 6284 . . . . . . . . 9  |-  ( (
# `  A )  =  1  ->  (
( # `  A )  -  1 )  =  ( 1  -  1 ) )
18 1m1e0 10605 . . . . . . . . 9  |-  ( 1  -  1 )  =  0
1917, 18syl6eq 2498 . . . . . . . 8  |-  ( (
# `  A )  =  1  ->  (
( # `  A )  -  1 )  =  0 )
2019fveq2d 5856 . . . . . . 7  |-  ( (
# `  A )  =  1  ->  ( A `  ( ( # `
 A )  - 
1 ) )  =  ( A `  0
) )
2116, 20sylan9eq 2502 . . . . . 6  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( B `  ( ( # `  B
)  -  1 ) )  =  ( A `
 0 ) )
2211eleq1d 2510 . . . . . . . . 9  |-  ( ph  ->  ( ( S `  A )  e.  D  <->  ( S `  B )  e.  D ) )
233, 4, 5, 6, 7, 8efgs1b 16623 . . . . . . . . . 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 16623 . . . . . . . . . 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 484 . . . . . . 7  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( # `  B
)  =  1 )
29 oveq1 6284 . . . . . . . . 9  |-  ( (
# `  B )  =  1  ->  (
( # `  B )  -  1 )  =  ( 1  -  1 ) )
3029, 18syl6eq 2498 . . . . . . . 8  |-  ( (
# `  B )  =  1  ->  (
( # `  B )  -  1 )  =  0 )
3130fveq2d 5856 . . . . . . 7  |-  ( (
# `  B )  =  1  ->  ( B `  ( ( # `
 B )  - 
1 ) )  =  ( B `  0
) )
3228, 31syl 16 . . . . . 6  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( B `  ( ( # `  B
)  -  1 ) )  =  ( B `
 0 ) )
3321, 32eqtr3d 2484 . . . . 5  |-  ( (
ph  /\  ( # `  A
)  =  1 )  ->  ( A ` 
0 )  =  ( B `  0 ) )
341, 33mtand 659 . . . 4  |-  ( ph  ->  -.  ( # `  A
)  =  1 )
353, 4, 5, 6, 7, 8efgsdm 16617 . . . . . . . 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 1010 . . . . . . 7  |-  ( A  e.  dom  S  ->  A  e.  (Word  W  \  { (/) } ) )
37 eldifsn 4136 . . . . . . . 8  |-  ( A  e.  (Word  W  \  { (/) } )  <->  ( A  e. Word  W  /\  A  =/=  (/) ) )
38 lennncl 12537 . . . . . . . 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 11162 . . . . . 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 11160 . . 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 16617 . . . . . . . 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 1010 . . . . . . 7  |-  ( B  e.  dom  S  ->  B  e.  (Word  W  \  { (/) } ) )
50 eldifsn 4136 . . . . . . . 8  |-  ( B  e.  (Word  W  \  { (/) } )  <->  ( B  e. Word  W  /\  B  =/=  (/) ) )
51 lennncl 12537 . . . . . . . 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 11162 . . . . . 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 11160 . . 3  |-  ( (
# `  B )  e.  ( ZZ>= `  2 )  ->  ( ( # `  B
)  -  1 )  e.  NN )
5957, 58syl 16 . 2  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  NN )
6046, 59jca 532 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 1381    e. wcel 1802    =/= wne 2636   A.wral 2791   {crab 2795    \ cdif 3455   (/)c0 3767   {csn 4010   <.cop 4016   <.cotp 4018   U_ciun 4311   class class class wbr 4433    |-> cmpt 4491    _I cid 4776    X. cxp 4983   dom cdm 4985   ran crn 4986   ` cfv 5574  (class class class)co 6277    |-> cmpt2 6279   1oc1o 7121   2oc2o 7122   0cc0 9490   1c1 9491    < clt 9626    - cmin 9805   NNcn 10537   2c2 10586   ZZ>=cuz 11085   ...cfz 11676  ..^cfzo 11798   #chash 12379  Word cword 12508   splice csplice 12513   <"cs2 12780   ~FG cefg 16593
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1603  ax-4 1616  ax-5 1689  ax-6 1732  ax-7 1774  ax-8 1804  ax-9 1806  ax-10 1821  ax-11 1826  ax-12 1838  ax-13 1983  ax-ext 2419  ax-rep 4544  ax-sep 4554  ax-nul 4562  ax-pow 4611  ax-pr 4672  ax-un 6573  ax-cnex 9546  ax-resscn 9547  ax-1cn 9548  ax-icn 9549  ax-addcl 9550  ax-addrcl 9551  ax-mulcl 9552  ax-mulrcl 9553  ax-mulcom 9554  ax-addass 9555  ax-mulass 9556  ax-distr 9557  ax-i2m1 9558  ax-1ne0 9559  ax-1rid 9560  ax-rnegex 9561  ax-rrecex 9562  ax-cnre 9563  ax-pre-lttri 9564  ax-pre-lttrn 9565  ax-pre-ltadd 9566  ax-pre-mulgt0 9567
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 973  df-3an 974  df-tru 1384  df-ex 1598  df-nf 1602  df-sb 1725  df-eu 2270  df-mo 2271  df-clab 2427  df-cleq 2433  df-clel 2436  df-nfc 2591  df-ne 2638  df-nel 2639  df-ral 2796  df-rex 2797  df-reu 2798  df-rmo 2799  df-rab 2800  df-v 3095  df-sbc 3312  df-csb 3418  df-dif 3461  df-un 3463  df-in 3465  df-ss 3472  df-pss 3474  df-nul 3768  df-if 3923  df-pw 3995  df-sn 4011  df-pr 4013  df-tp 4015  df-op 4017  df-uni 4231  df-int 4268  df-iun 4313  df-br 4434  df-opab 4492  df-mpt 4493  df-tr 4527  df-eprel 4777  df-id 4781  df-po 4786  df-so 4787  df-fr 4824  df-we 4826  df-ord 4867  df-on 4868  df-lim 4869  df-suc 4870  df-xp 4991  df-rel 4992  df-cnv 4993  df-co 4994  df-dm 4995  df-rn 4996  df-res 4997  df-ima 4998  df-iota 5537  df-fun 5576  df-fn 5577  df-f 5578  df-f1 5579  df-fo 5580  df-f1o 5581  df-fv 5582  df-riota 6238  df-ov 6280  df-oprab 6281  df-mpt2 6282  df-om 6682  df-1st 6781  df-2nd 6782  df-recs 7040  df-rdg 7074  df-1o 7128  df-oadd 7132  df-er 7309  df-en 7515  df-dom 7516  df-sdom 7517  df-fin 7518  df-card 8318  df-cda 8546  df-pnf 9628  df-mnf 9629  df-xr 9630  df-ltxr 9631  df-le 9632  df-sub 9807  df-neg 9808  df-nn 10538  df-2 10595  df-n0 10797  df-z 10866  df-uz 11086  df-fz 11677  df-fzo 11799  df-hash 12380  df-word 12516
This theorem is referenced by:  efgredlemf  16628  efgredlemg  16629  efgredlemd  16631  efgredlemc  16632  efgredlem  16634
  Copyright terms: Public domain W3C validator