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

Theorem efgredlemg 16886
Description: Lemma for efgred 16892. (Contributed by Mario Carneiro, 4-Jun-2016.)
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 ) )
Assertion
Ref Expression
efgredlemg  |-  ( ph  ->  ( # `  ( A `  K )
)  =  ( # `  ( B `  L
) ) )
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 efgredlemg
StepHypRef Expression
1 efgval.w . . . . . 6  |-  W  =  (  _I  ` Word  ( I  X.  2o ) )
2 fviss 5931 . . . . . 6  |-  (  _I 
` Word  ( I  X.  2o ) )  C_ Word  ( I  X.  2o )
31, 2eqsstri 3529 . . . . 5  |-  W  C_ Word  ( I  X.  2o )
4 efgval.r . . . . . . 7  |-  .~  =  ( ~FG  `  I )
5 efgval2.m . . . . . . 7  |-  M  =  ( y  e.  I ,  z  e.  2o  |->  <. y ,  ( 1o 
\  z ) >.
)
6 efgval2.t . . . . . . 7  |-  T  =  ( v  e.  W  |->  ( n  e.  ( 0 ... ( # `  v ) ) ,  w  e.  ( I  X.  2o )  |->  ( v splice  <. n ,  n ,  <" w ( M `  w ) "> >. )
) )
7 efgred.d . . . . . . 7  |-  D  =  ( W  \  U_ x  e.  W  ran  ( T `  x ) )
8 efgred.s . . . . . . 7  |-  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 ) ) )
9 efgredlem.1 . . . . . . 7  |-  ( ph  ->  A. a  e.  dom  S A. b  e.  dom  S ( ( # `  ( S `  a )
)  <  ( # `  ( S `  A )
)  ->  ( ( S `  a )  =  ( S `  b )  ->  (
a `  0 )  =  ( b ` 
0 ) ) ) )
10 efgredlem.2 . . . . . . 7  |-  ( ph  ->  A  e.  dom  S
)
11 efgredlem.3 . . . . . . 7  |-  ( ph  ->  B  e.  dom  S
)
12 efgredlem.4 . . . . . . 7  |-  ( ph  ->  ( S `  A
)  =  ( S `
 B ) )
13 efgredlem.5 . . . . . . 7  |-  ( ph  ->  -.  ( A ` 
0 )  =  ( B `  0 ) )
14 efgredlemb.k . . . . . . 7  |-  K  =  ( ( ( # `  A )  -  1 )  -  1 )
15 efgredlemb.l . . . . . . 7  |-  L  =  ( ( ( # `  B )  -  1 )  -  1 )
161, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15efgredlemf 16885 . . . . . 6  |-  ( ph  ->  ( ( A `  K )  e.  W  /\  ( B `  L
)  e.  W ) )
1716simpld 459 . . . . 5  |-  ( ph  ->  ( A `  K
)  e.  W )
183, 17sseldi 3497 . . . 4  |-  ( ph  ->  ( A `  K
)  e. Word  ( I  X.  2o ) )
19 lencl 12568 . . . 4  |-  ( ( A `  K )  e. Word  ( I  X.  2o )  ->  ( # `  ( A `  K
) )  e.  NN0 )
2018, 19syl 16 . . 3  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  NN0 )
2120nn0cnd 10875 . 2  |-  ( ph  ->  ( # `  ( A `  K )
)  e.  CC )
2216simprd 463 . . . . 5  |-  ( ph  ->  ( B `  L
)  e.  W )
233, 22sseldi 3497 . . . 4  |-  ( ph  ->  ( B `  L
)  e. Word  ( I  X.  2o ) )
24 lencl 12568 . . . 4  |-  ( ( B `  L )  e. Word  ( I  X.  2o )  ->  ( # `  ( B `  L
) )  e.  NN0 )
2523, 24syl 16 . . 3  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  NN0 )
2625nn0cnd 10875 . 2  |-  ( ph  ->  ( # `  ( B `  L )
)  e.  CC )
27 2cnd 10629 . 2  |-  ( ph  ->  2  e.  CC )
281, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13efgredlema 16884 . . . . . . 7  |-  ( ph  ->  ( ( ( # `  A )  -  1 )  e.  NN  /\  ( ( # `  B
)  -  1 )  e.  NN ) )
2928simpld 459 . . . . . 6  |-  ( ph  ->  ( ( # `  A
)  -  1 )  e.  NN )
301, 4, 5, 6, 7, 8efgsdmi 16876 . . . . . 6  |-  ( ( A  e.  dom  S  /\  ( ( # `  A
)  -  1 )  e.  NN )  -> 
( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
3110, 29, 30syl2anc 661 . . . . 5  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  ( ( ( # `  A )  -  1 )  -  1 ) ) ) )
3214fveq2i 5875 . . . . . . 7  |-  ( A `
 K )  =  ( A `  (
( ( # `  A
)  -  1 )  -  1 ) )
3332fveq2i 5875 . . . . . 6  |-  ( T `
 ( A `  K ) )  =  ( T `  ( A `  ( (
( # `  A )  -  1 )  - 
1 ) ) )
3433rneqi 5239 . . . . 5  |-  ran  ( T `  ( A `  K ) )  =  ran  ( T `  ( A `  ( ( ( # `  A
)  -  1 )  -  1 ) ) )
3531, 34syl6eleqr 2556 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( A `  K ) ) )
361, 4, 5, 6efgtlen 16870 . . . 4  |-  ( ( ( A `  K
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( A `  K ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
3717, 35, 36syl2anc 661 . . 3  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( A `  K ) )  +  2 ) )
3828simprd 463 . . . . . . 7  |-  ( ph  ->  ( ( # `  B
)  -  1 )  e.  NN )
391, 4, 5, 6, 7, 8efgsdmi 16876 . . . . . . 7  |-  ( ( B  e.  dom  S  /\  ( ( # `  B
)  -  1 )  e.  NN )  -> 
( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4011, 38, 39syl2anc 661 . . . . . 6  |-  ( ph  ->  ( S `  B
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4112, 40eqeltrd 2545 . . . . 5  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  ( ( ( # `  B )  -  1 )  -  1 ) ) ) )
4215fveq2i 5875 . . . . . . 7  |-  ( B `
 L )  =  ( B `  (
( ( # `  B
)  -  1 )  -  1 ) )
4342fveq2i 5875 . . . . . 6  |-  ( T `
 ( B `  L ) )  =  ( T `  ( B `  ( (
( # `  B )  -  1 )  - 
1 ) ) )
4443rneqi 5239 . . . . 5  |-  ran  ( T `  ( B `  L ) )  =  ran  ( T `  ( B `  ( ( ( # `  B
)  -  1 )  -  1 ) ) )
4541, 44syl6eleqr 2556 . . . 4  |-  ( ph  ->  ( S `  A
)  e.  ran  ( T `  ( B `  L ) ) )
461, 4, 5, 6efgtlen 16870 . . . 4  |-  ( ( ( B `  L
)  e.  W  /\  ( S `  A )  e.  ran  ( T `
 ( B `  L ) ) )  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
4722, 45, 46syl2anc 661 . . 3  |-  ( ph  ->  ( # `  ( S `  A )
)  =  ( (
# `  ( B `  L ) )  +  2 ) )
4837, 47eqtr3d 2500 . 2  |-  ( ph  ->  ( ( # `  ( A `  K )
)  +  2 )  =  ( ( # `  ( B `  L
) )  +  2 ) )
4921, 26, 27, 48addcan2ad 9803 1  |-  ( ph  ->  ( # `  ( A `  K )
)  =  ( # `  ( B `  L
) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 369    = wceq 1395    e. wcel 1819   A.wral 2807   {crab 2811    \ cdif 3468   (/)c0 3793   {csn 4032   <.cop 4038   <.cotp 4040   U_ciun 4332   class class class wbr 4456    |-> cmpt 4515    _I cid 4799    X. cxp 5006   dom cdm 5008   ran crn 5009   ` cfv 5594  (class class class)co 6296    |-> cmpt2 6298   1oc1o 7141   2oc2o 7142   0cc0 9509   1c1 9510    + caddc 9512    < clt 9645    - cmin 9824   NNcn 10556   2c2 10606   NN0cn0 10816   ...cfz 11697  ..^cfzo 11820   #chash 12407  Word cword 12537   splice csplice 12542   <"cs2 12817   ~FG cefg 16850
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-rep 4568  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-ot 4041  df-uni 4252  df-int 4289  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-recs 7060  df-rdg 7094  df-1o 7148  df-2o 7149  df-oadd 7152  df-er 7329  df-map 7440  df-pm 7441  df-en 7536  df-dom 7537  df-sdom 7538  df-fin 7539  df-card 8337  df-cda 8565  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-nn 10557  df-2 10615  df-n0 10817  df-z 10886  df-uz 11107  df-fz 11698  df-fzo 11821  df-hash 12408  df-word 12545  df-concat 12547  df-s1 12548  df-substr 12549  df-splice 12550  df-s2 12824
This theorem is referenced by:  efgredleme  16887
  Copyright terms: Public domain W3C validator