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

Theorem swrdccat2 11124
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 11049 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( S ++  T )  e. Word  B )
2 lencl 10998 . . . . . . 7  |-  ( S  e. Word  B  ->  ( `  S )  e.  NN0 )
32nn0zd 9493 . . . . . 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 10998 . . . . . . . 8  |-  ( T  e. Word  B  ->  ( `  T )  e.  NN0 )
76adantl 277 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  T )  e.  NN0 )
85, 7nn0addcld 9352 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  NN0 )
98nn0zd 9493 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  ZZ )
10 swrdclg 11103 . . . . 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 11009 . . . 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 9683 . . . . . . . . . 10  |-  NN0  =  ( ZZ>= `  0 )
152, 14eleqtrdi 2298 . . . . . . . . 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 9663 . . . . . . . . 9  |-  ( S  e. Word  B  ->  ( `  S )  e.  (
ZZ>= `  ( `  S
) ) )
18 uzaddcl 9707 . . . . . . . . 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 10141 . . . . . . . 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 9330 . . . . . . . . . . 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 2298 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  (
ZZ>= `  0 ) )
2523nn0zd 9493 . . . . . . . . . 10  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  ZZ )
2625uzidd 9663 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  (
ZZ>= `  ( ( `  S
)  +  ( `  T
) ) ) )
27 elfzuzb 10141 . . . . . . . . 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 11051 . . . . . . . . 9  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  ( S ++  T ) )  =  ( ( `  S
)  +  ( `  T
) ) )
3029oveq2d 5960 . . . . . . . 8  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( 0 ... ( `  ( S ++  T ) ) )  =  ( 0 ... ( ( `  S )  +  ( `  T ) ) ) )
3128, 30eleqtrrd 2285 . . . . . . 7  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( ( `  S
)  +  ( `  T
) )  e.  ( 0 ... ( `  ( S ++  T ) ) ) )
32 swrdlen 11105 . . . . . . 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 9350 . . . . . . 7  |-  ( S  e. Word  B  ->  ( `  S )  e.  CC )
356nn0cnd 9350 . . . . . . 7  |-  ( T  e. Word  B  ->  ( `  T )  e.  CC )
36 pncan2 8279 . . . . . . 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 2238 . . . . 5  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( `  ( ( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S )  +  ( `  T )
) >. ) )  =  ( `  T )
)
3938oveq2d 5960 . . . 4  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( 0..^ ( `  (
( S ++  T ) substr  <. ( `  S ) ,  ( ( `  S
)  +  ( `  T
) ) >. )
) )  =  ( 0..^ ( `  T
) ) )
4039fneq2d 5365 . . 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 11009 . . 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 5960 . . . . . 6  |-  ( ( S  e. Word  B  /\  T  e. Word  B )  ->  ( 0..^ ( ( ( `  S )  +  ( `  T )
)  -  ( `  S
) ) )  =  ( 0..^ ( `  T
) ) )
4645eleq2d 2275 . . . . 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 11106 . . . 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 11055 . . . 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 2238 . 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 5680 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 2176   <.cop 3636    Fn wfn 5266   ` cfv 5271  (class class class)co 5944   CCcc 7923   0cc0 7925    + caddc 7928    - cmin 8243   NN0cn0 9295   ZZcz 9372   ZZ>=cuz 9648   ...cfz 10130  ..^cfzo 10264  ♯chash 10920  Word cword 10994   ++ cconcat 11046   substr csubstr 11098
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 1470  ax-7 1471  ax-gen 1472  ax-ie1 1516  ax-ie2 1517  ax-8 1527  ax-10 1528  ax-11 1529  ax-i12 1530  ax-bndl 1532  ax-4 1533  ax-17 1549  ax-i9 1553  ax-ial 1557  ax-i5r 1558  ax-13 2178  ax-14 2179  ax-ext 2187  ax-coll 4159  ax-sep 4162  ax-nul 4170  ax-pow 4218  ax-pr 4253  ax-un 4480  ax-setind 4585  ax-iinf 4636  ax-cnex 8016  ax-resscn 8017  ax-1cn 8018  ax-1re 8019  ax-icn 8020  ax-addcl 8021  ax-addrcl 8022  ax-mulcl 8023  ax-addcom 8025  ax-addass 8027  ax-distr 8029  ax-i2m1 8030  ax-0lt1 8031  ax-0id 8033  ax-rnegex 8034  ax-cnre 8036  ax-pre-ltirr 8037  ax-pre-ltwlin 8038  ax-pre-lttrn 8039  ax-pre-apti 8040  ax-pre-ltadd 8041
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 1484  df-sb 1786  df-eu 2057  df-mo 2058  df-clab 2192  df-cleq 2198  df-clel 2201  df-nfc 2337  df-ne 2377  df-nel 2472  df-ral 2489  df-rex 2490  df-reu 2491  df-rab 2493  df-v 2774  df-sbc 2999  df-csb 3094  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-nul 3461  df-if 3572  df-pw 3618  df-sn 3639  df-pr 3640  df-op 3642  df-uni 3851  df-int 3886  df-iun 3929  df-br 4045  df-opab 4106  df-mpt 4107  df-tr 4143  df-id 4340  df-iord 4413  df-on 4415  df-ilim 4416  df-suc 4418  df-iom 4639  df-xp 4681  df-rel 4682  df-cnv 4683  df-co 4684  df-dm 4685  df-rn 4686  df-res 4687  df-ima 4688  df-iota 5232  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-riota 5899  df-ov 5947  df-oprab 5948  df-mpo 5949  df-1st 6226  df-2nd 6227  df-recs 6391  df-frec 6477  df-1o 6502  df-er 6620  df-en 6828  df-dom 6829  df-fin 6830  df-pnf 8109  df-mnf 8110  df-xr 8111  df-ltxr 8112  df-le 8113  df-sub 8245  df-neg 8246  df-inn 9037  df-n0 9296  df-z 9373  df-uz 9649  df-fz 10131  df-fzo 10265  df-ihash 10921  df-word 10995  df-concat 11047  df-substr 11099
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator