ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  swrdccat2 Unicode version

Theorem swrdccat2 11157
Description: Recover the right half of a concatenated word. (Contributed by Mario Carneiro, 27-Sep-2015.)
Assertion
Ref Expression
swrdccat2  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( S ++  T
) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )  =  T )

Proof of Theorem swrdccat2
Dummy variable  k is distinct from all other variables.
StepHypRef Expression
1 ccatcl 11082 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( S ++  T )  e. Word  B )
2 lencl 11030 . . . . . . 7  |-  ( S  e. Word  B  ->  ( `  S )  e.  NN0 )
32nn0zd 9523 . . . . . 6  |-  ( S  e. Word  B  ->  ( `  S )  e.  ZZ )
43adantr 276 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  S )  e.  ZZ )
52adantr 276 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  S )  e.  NN0 )
6 lencl 11030 . . . . . . . 8  |-  ( T  e. Word  B  ->  ( `  T )  e.  NN0 )
76adantl 277 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  T )  e.  NN0 )
85, 7nn0addcld 9382 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  NN0 )
98nn0zd 9523 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  ZZ )
10 swrdclg 11136 . . . . 5  |-  ( ( ( S ++  T )  e. Word  B  /\  ( `  S )  e.  ZZ  /\  ( ( `  S
)  +  ( `  T
) )  e.  ZZ )  ->  ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. )  e. Word  B
)
111, 4, 9, 10syl3anc 1250 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( S ++  T
) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )  e. Word  B )
12 wrdfn 11041 . . . 4  |-  ( ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )  e. Word  B  ->  ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. )  Fn  (
0..^ ( `  ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) ) ) )
1311, 12syl 14 . . 3  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( S ++  T
) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )  Fn  ( 0..^ ( `  (
( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )
) ) )
14 nn0uz 9713 . . . . . . . . . 10  |-  NN0  =  ( ZZ>= `  0 )
152, 14eleqtrdi 2299 . . . . . . . . 9  |-  ( S  e. Word  B  ->  ( `  S )  e.  (
ZZ>= `  0 ) )
1615adantr 276 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  S )  e.  ( ZZ>= `  0 )
)
173uzidd 9693 . . . . . . . . 9  |-  ( S  e. Word  B  ->  ( `  S )  e.  (
ZZ>= `  ( `  S
) ) )
18 uzaddcl 9737 . . . . . . . . 9  |-  ( ( ( `  S )  e.  ( ZZ>= `  ( `  S
) )  /\  ( `  T )  e.  NN0 )  ->  ( ( `  S
)  +  ( `  T
) )  e.  (
ZZ>= `  ( `  S
) ) )
1917, 6, 18syl2an 289 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  (
ZZ>= `  ( `  S
) ) )
20 elfzuzb 10171 . . . . . . . 8  |-  ( ( `  S )  e.  ( 0 ... ( ( `  S )  +  ( `  T ) ) )  <-> 
( ( `  S
)  e.  ( ZZ>= ` 
0 )  /\  (
( `  S )  +  ( `  T )
)  e.  ( ZZ>= `  ( `  S ) ) ) )
2116, 19, 20sylanbrc 417 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  S )  e.  ( 0 ... (
( `  S )  +  ( `  T )
) ) )
22 nn0addcl 9360 . . . . . . . . . . 11  |-  ( ( ( `  S )  e.  NN0  /\  ( `  T
)  e.  NN0 )  ->  ( ( `  S
)  +  ( `  T
) )  e.  NN0 )
232, 6, 22syl2an 289 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  NN0 )
2423, 14eleqtrdi 2299 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  (
ZZ>= `  0 ) )
2523nn0zd 9523 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  ZZ )
2625uzidd 9693 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  (
ZZ>= `  ( ( `  S
)  +  ( `  T
) ) ) )
27 elfzuzb 10171 . . . . . . . . 9  |-  ( ( ( `  S )  +  ( `  T )
)  e.  ( 0 ... ( ( `  S
)  +  ( `  T
) ) )  <->  ( (
( `  S )  +  ( `  T )
)  e.  ( ZZ>= ` 
0 )  /\  (
( `  S )  +  ( `  T )
)  e.  ( ZZ>= `  ( ( `  S )  +  ( `  T )
) ) ) )
2824, 26, 27sylanbrc 417 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  ( 0 ... ( ( `  S )  +  ( `  T ) ) ) )
29 ccatlen 11084 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  ( S ++  T ) )  =  ( ( `  S
)  +  ( `  T
) ) )
3029oveq2d 5978 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( 0 ... ( `  ( S ++  T ) ) )  =  ( 0 ... ( ( `  S )  +  ( `  T ) ) ) )
3128, 30eleqtrrd 2286 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  ( 0 ... ( `  ( S ++  T ) ) ) )
32 swrdlen 11138 . . . . . . 7  |-  ( ( ( S ++  T )  e. Word  B  /\  ( `  S )  e.  ( 0 ... ( ( `  S )  +  ( `  T ) ) )  /\  ( ( `  S
)  +  ( `  T
) )  e.  ( 0 ... ( `  ( S ++  T ) ) ) )  ->  ( `  (
( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )
)  =  ( ( ( `  S )  +  ( `  T )
)  -  ( `  S
) ) )
331, 21, 31, 32syl3anc 1250 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) )  =  ( ( ( `  S
)  +  ( `  T
) )  -  ( `  S ) ) )
342nn0cnd 9380 . . . . . . 7  |-  ( S  e. Word  B  ->  ( `  S )  e.  CC )
356nn0cnd 9380 . . . . . . 7  |-  ( T  e. Word  B  ->  ( `  T )  e.  CC )
36 pncan2 8309 . . . . . . 7  |-  ( ( ( `  S )  e.  CC  /\  ( `  T
)  e.  CC )  ->  ( ( ( `  S )  +  ( `  T ) )  -  ( `  S ) )  =  ( `  T
) )
3734, 35, 36syl2an 289 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( `  S
)  +  ( `  T
) )  -  ( `  S ) )  =  ( `  T )
)
3833, 37eqtrd 2239 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) )  =  ( `  T )
)
3938oveq2d 5978 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( 0..^ ( `  (
( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )
) )  =  ( 0..^ ( `  T
) ) )
4039fneq2d 5379 . . 3  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. )  Fn  (
0..^ ( `  ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) ) )  <-> 
( ( S ++  T
) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )  Fn  ( 0..^ ( `  T
) ) ) )
4113, 40mpbid 147 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( S ++  T
) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )  Fn  ( 0..^ ( `  T
) ) )
42 wrdfn 11041 . . 3  |-  ( T  e. Word  B  ->  T  Fn  ( 0..^ ( `  T
) ) )
4342adantl 277 . 2  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  T  Fn  ( 0..^ ( `  T )
) )
441, 21, 313jca 1180 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( S ++  T
)  e. Word  B  /\  ( `  S )  e.  ( 0 ... (
( `  S )  +  ( `  T )
) )  /\  (
( `  S )  +  ( `  T )
)  e.  ( 0 ... ( `  ( S ++  T ) ) ) ) )
4537oveq2d 5978 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( 0..^ ( ( ( `  S )  +  ( `  T )
)  -  ( `  S
) ) )  =  ( 0..^ ( `  T
) ) )
4645eleq2d 2276 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( k  e.  ( 0..^ ( ( ( `  S )  +  ( `  T ) )  -  ( `  S ) ) )  <->  k  e.  ( 0..^ ( `  T
) ) ) )
4746biimpar 297 . . . 4  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  k  e.  ( 0..^ ( `  T
) ) )  -> 
k  e.  ( 0..^ ( ( ( `  S
)  +  ( `  T
) )  -  ( `  S ) ) ) )
48 swrdfv 11139 . . . 4  |-  ( ( ( ( S ++  T
)  e. Word  B  /\  ( `  S )  e.  ( 0 ... (
( `  S )  +  ( `  T )
) )  /\  (
( `  S )  +  ( `  T )
)  e.  ( 0 ... ( `  ( S ++  T ) ) ) )  /\  k  e.  ( 0..^ ( ( ( `  S )  +  ( `  T )
)  -  ( `  S
) ) ) )  ->  ( ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) `  k
)  =  ( ( S ++  T ) `  ( k  +  ( `  S ) ) ) )
4944, 47, 48syl2an2r 595 . . 3  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  k  e.  ( 0..^ ( `  T
) ) )  -> 
( ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) `  k
)  =  ( ( S ++  T ) `  ( k  +  ( `  S ) ) ) )
50 ccatval3 11088 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B  /\  k  e.  ( 0..^ ( `  T
) ) )  -> 
( ( S ++  T
) `  ( k  +  ( `  S )
) )  =  ( T `  k ) )
51503expa 1206 . . 3  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  k  e.  ( 0..^ ( `  T
) ) )  -> 
( ( S ++  T
) `  ( k  +  ( `  S )
) )  =  ( T `  k ) )
5249, 51eqtrd 2239 . 2  |-  ( ( ( S  e. Word  B  /\  T  e. Word  B )  /\  k  e.  ( 0..^ ( `  T
) ) )  -> 
( ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) `  k
)  =  ( T `
 k ) )
5341, 43, 52eqfnfvd 5698 1  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( S ++  T
) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )  =  T )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 104    /\ w3a 981    = wceq 1373    e. wcel 2177   <.cop 3641    Fn wfn 5280   ` cfv 5285  (class class class)co 5962   CCcc 7953   0cc0 7955    + caddc 7958    - cmin 8273   NN0cn0 9325   ZZcz 9402   ZZ>=cuz 9678   ...cfz 10160  ..^cfzo 10294  ♯chash 10952  Word cword 11026   ++ cconcat 11079   substr csubstr 11131
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-coll 4170  ax-sep 4173  ax-nul 4181  ax-pow 4229  ax-pr 4264  ax-un 4493  ax-setind 4598  ax-iinf 4649  ax-cnex 8046  ax-resscn 8047  ax-1cn 8048  ax-1re 8049  ax-icn 8050  ax-addcl 8051  ax-addrcl 8052  ax-mulcl 8053  ax-addcom 8055  ax-addass 8057  ax-distr 8059  ax-i2m1 8060  ax-0lt1 8061  ax-0id 8063  ax-rnegex 8064  ax-cnre 8066  ax-pre-ltirr 8067  ax-pre-ltwlin 8068  ax-pre-lttrn 8069  ax-pre-apti 8070  ax-pre-ltadd 8071
This theorem depends on definitions:  df-bi 117  df-dc 837  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rab 2494  df-v 2775  df-sbc 3003  df-csb 3098  df-dif 3172  df-un 3174  df-in 3176  df-ss 3183  df-nul 3465  df-if 3576  df-pw 3623  df-sn 3644  df-pr 3645  df-op 3647  df-uni 3860  df-int 3895  df-iun 3938  df-br 4055  df-opab 4117  df-mpt 4118  df-tr 4154  df-id 4353  df-iord 4426  df-on 4428  df-ilim 4429  df-suc 4431  df-iom 4652  df-xp 4694  df-rel 4695  df-cnv 4696  df-co 4697  df-dm 4698  df-rn 4699  df-res 4700  df-ima 4701  df-iota 5246  df-fun 5287  df-fn 5288  df-f 5289  df-f1 5290  df-fo 5291  df-f1o 5292  df-fv 5293  df-riota 5917  df-ov 5965  df-oprab 5966  df-mpo 5967  df-1st 6244  df-2nd 6245  df-recs 6409  df-frec 6495  df-1o 6520  df-er 6638  df-en 6846  df-dom 6847  df-fin 6848  df-pnf 8139  df-mnf 8140  df-xr 8141  df-ltxr 8142  df-le 8143  df-sub 8275  df-neg 8276  df-inn 9067  df-n0 9326  df-z 9403  df-uz 9679  df-fz 10161  df-fzo 10295  df-ihash 10953  df-word 11027  df-concat 11080  df-substr 11132
This theorem is referenced by:  ccatopth  11202
  Copyright terms: Public domain W3C validator