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

Theorem efgredlemb 16236
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, 30-Sep-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 ) )
efgredlemb.k  |-  K  =  ( ( ( # `  A )  -  1 )  -  1 )
efgredlemb.l  |-  L  =  ( ( ( # `  B )  -  1 )  -  1 )
efgredlemb.p  |-  ( ph  ->  P  e.  ( 0 ... ( # `  ( A `  K )
) ) )
efgredlemb.q  |-  ( ph  ->  Q  e.  ( 0 ... ( # `  ( B `  L )
) ) )
efgredlemb.u  |-  ( ph  ->  U  e.  ( I  X.  2o ) )
efgredlemb.v  |-  ( ph  ->  V  e.  ( I  X.  2o ) )
efgredlemb.6  |-  ( ph  ->  ( S `  A
)  =  ( P ( T `  ( A `  K )
) U ) )
efgredlemb.7  |-  ( ph  ->  ( S `  B
)  =  ( Q ( T `  ( B `  L )
) V ) )
efgredlemb.8  |-  ( ph  ->  -.  ( A `  K )  =  ( B `  L ) )
Assertion
Ref Expression
efgredlemb  |-  -.  ph
Distinct variable groups:    a, b, A    y, a, z, b    L, a, b    K, a, b    t, n, v, w, y, z, P   
m, a, n, t, v, w, x, M, b    U, n, v, w, y, z    k, a, T, b, m, t, x    n, V, v, w, y, z    Q, n, t, v, w, y, z    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)    P( x, k, m, a, b)    Q( x, k, m, a, b)    .~ ( w, v, k, n)    S( x, y, z, w, v, t, k, m, n)    T( y, z, w, v, n)    U( x, t, k, m, a, b)    I( k)    K( x, y, z, w, v, t, k, m, n)    L( x, y, z, w, v, t, k, m, n)    M( y, z, k)    V( x, t, k, m, a, b)

Proof of Theorem efgredlemb
StepHypRef Expression
1 efgval.w . . . . 5  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
2 efgval.r . . . . 5  |-  .~  =  ( ~FG  `  I )
3 efgval2.m . . . . 5  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
4 efgval2.t . . . . 5  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
5 efgred.d . . . . 5  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
6 efgred.s . . . . 5  |-  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 ) ) )
7 efgredlem.1 . . . . . 6  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
8 efgredlem.4 . . . . . . 7  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
9 fveq2 5688 . . . . . . . . . 10  |-  ( ( S `  A )  =  ( S `  B )  ->  ( # `
 ( S `  A ) )  =  ( # `  ( S `  B )
) )
109breq2d 4301 . . . . . . . . 9  |-  ( ( S `  A )  =  ( S `  B )  ->  (
( # `  ( S `
 a ) )  <  ( # `  ( S `  A )
)  <->  ( # `  ( S `  a )
)  <  ( # `  ( S `  B )
) ) )
1110imbi1d 317 . . . . . . . 8  |-  ( ( S `  A )  =  ( S `  B )  ->  (
( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) )  <-> 
( ( # `  ( S `  a )
)  <  ( # `  ( S `  B )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) ) )
12112ralbidv 2755 . . . . . . 7  |-  ( ( S `  A )  =  ( S `  B )  ->  ( A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) )  <->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  B )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) ) )
138, 12syl 16 . . . . . 6  |-  ( ph  ->  ( A. a  e. 
dom  S A. b  e.  dom  S ( (
# `  ( S `  a ) )  < 
( # `  ( S `
 A ) )  ->  ( ( S `
 a )  =  ( S `  b
)  ->  ( a `  0 )  =  ( b `  0
) ) )  <->  A. a  e.  dom  S A. b  e.  dom  S ( (
# `  ( S `  a ) )  < 
( # `  ( S `
 B ) )  ->  ( ( S `
 a )  =  ( S `  b
)  ->  ( a `  0 )  =  ( b `  0
) ) ) ) )
147, 13mpbid 210 . . . . 5  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  B )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
15 efgredlem.3 . . . . 5  |-  ( ph  ->  B  e.  dom  S
)
16 efgredlem.2 . . . . 5  |-  ( ph  ->  A  e.  dom  S
)
178eqcomd 2446 . . . . 5  |-  ( ph  ->  ( S `  B
)  =  ( S `
 A ) )
18 efgredlem.5 . . . . . 6  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
19 eqcom 2443 . . . . . 6  |-  ( ( A `  0 )  =  ( B ` 
0 )  <->  ( B `  0 )  =  ( A `  0
) )
2018, 19sylnib 304 . . . . 5  |-  ( ph  ->  -.  ( B ` 
0 )  =  ( A `  0 ) )
21 efgredlemb.l . . . . 5  |-  L  =  ( ( ( # `  B )  -  1 )  -  1 )
22 efgredlemb.k . . . . 5  |-  K  =  ( ( ( # `  A )  -  1 )  -  1 )
23 efgredlemb.q . . . . 5  |-  ( ph  ->  Q  e.  ( 0 ... ( # `  ( B `  L )
) ) )
24 efgredlemb.p . . . . 5  |-  ( ph  ->  P  e.  ( 0 ... ( # `  ( A `  K )
) ) )
25 efgredlemb.v . . . . 5  |-  ( ph  ->  V  e.  ( I  X.  2o ) )
26 efgredlemb.u . . . . 5  |-  ( ph  ->  U  e.  ( I  X.  2o ) )
27 efgredlemb.7 . . . . 5  |-  ( ph  ->  ( S `  B
)  =  ( Q ( T `  ( B `  L )
) V ) )
28 efgredlemb.6 . . . . 5  |-  ( ph  ->  ( S `  A
)  =  ( P ( T `  ( A `  K )
) U ) )
29 efgredlemb.8 . . . . . 6  |-  ( ph  ->  -.  ( A `  K )  =  ( B `  L ) )
30 eqcom 2443 . . . . . 6  |-  ( ( A `  K )  =  ( B `  L )  <->  ( B `  L )  =  ( A `  K ) )
3129, 30sylnib 304 . . . . 5  |-  ( ph  ->  -.  ( B `  L )  =  ( A `  K ) )
321, 2, 3, 4, 5, 6, 14, 15, 16, 17, 20, 21, 22, 23, 24, 25, 26, 27, 28, 31efgredlemc 16235 . . . 4  |-  ( ph  ->  ( Q  e.  (
ZZ>= `  P )  -> 
( B `  0
)  =  ( A `
 0 ) ) )
3332, 19syl6ibr 227 . . 3  |-  ( ph  ->  ( Q  e.  (
ZZ>= `  P )  -> 
( A `  0
)  =  ( B `
 0 ) ) )
341, 2, 3, 4, 5, 6, 7, 16, 15, 8, 18, 22, 21, 24, 23, 26, 25, 28, 27, 29efgredlemc 16235 . . 3  |-  ( ph  ->  ( P  e.  (
ZZ>= `  Q )  -> 
( A `  0
)  =  ( B `
 0 ) ) )
35 elfzelz 11449 . . . . 5  |-  ( P  e.  ( 0 ... ( # `  ( A `  K )
) )  ->  P  e.  ZZ )
3624, 35syl 16 . . . 4  |-  ( ph  ->  P  e.  ZZ )
37 elfzelz 11449 . . . . 5  |-  ( Q  e.  ( 0 ... ( # `  ( B `  L )
) )  ->  Q  e.  ZZ )
3823, 37syl 16 . . . 4  |-  ( ph  ->  Q  e.  ZZ )
39 uztric 10878 . . . 4  |-  ( ( P  e.  ZZ  /\  Q  e.  ZZ )  ->  ( Q  e.  (
ZZ>= `  P )  \/  P  e.  ( ZZ>= `  Q ) ) )
4036, 38, 39syl2anc 656 . . 3  |-  ( ph  ->  ( Q  e.  (
ZZ>= `  P )  \/  P  e.  ( ZZ>= `  Q ) ) )
4133, 34, 40mpjaod 381 . 2  |-  ( ph  ->  ( A `  0
)  =  ( B `
 0 ) )
4241, 18pm2.65i 173 1  |-  -.  ph
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    \/ wo 368    /\ wa 369    = wceq 1364    e. wcel 1761   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   ZZcz 10642   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-ot 3883  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-2o 6917  df-oadd 6920  df-er 7097  df-map 7212  df-pm 7213  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-rp 10988  df-fz 11434  df-fzo 11545  df-hash 12100  df-word 12225  df-concat 12227  df-s1 12228  df-substr 12229  df-splice 12230  df-s2 12471
This theorem is referenced by:  efgredlem  16237
  Copyright terms: Public domain W3C validator