MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  swrdccatidOLD Structured version   Visualization version   GIF version

Theorem swrdccatidOLD 13806
Description: Obsolete proof of pfxccatid 13805 as of 12-Oct-2022. (Contributed by Alexander van der Vekens, 20-Sep-2018.) (Proof modification is discouraged.) (New usage is discouraged.)
Assertion
Ref Expression
swrdccatidOLD ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → ((𝐴 ++ 𝐵) substr ⟨0, 𝑁⟩) = 𝐴)

Proof of Theorem swrdccatidOLD
StepHypRef Expression
1 3simpa 1179 . . 3 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → (𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉))
2 lencl 13550 . . . . 5 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℕ0)
3 lencl 13550 . . . . . 6 (𝐵 ∈ Word 𝑉 → (♯‘𝐵) ∈ ℕ0)
4 simplr 786 . . . . . . . . 9 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → (♯‘𝐴) ∈ ℕ0)
5 eleq1 2865 . . . . . . . . . 10 (𝑁 = (♯‘𝐴) → (𝑁 ∈ ℕ0 ↔ (♯‘𝐴) ∈ ℕ0))
65adantl 474 . . . . . . . . 9 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → (𝑁 ∈ ℕ0 ↔ (♯‘𝐴) ∈ ℕ0))
74, 6mpbird 249 . . . . . . . 8 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → 𝑁 ∈ ℕ0)
8 nn0addcl 11614 . . . . . . . . . 10 (((♯‘𝐴) ∈ ℕ0 ∧ (♯‘𝐵) ∈ ℕ0) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℕ0)
98ancoms 451 . . . . . . . . 9 (((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℕ0)
109adantr 473 . . . . . . . 8 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → ((♯‘𝐴) + (♯‘𝐵)) ∈ ℕ0)
11 nn0re 11587 . . . . . . . . . . . . 13 ((♯‘𝐴) ∈ ℕ0 → (♯‘𝐴) ∈ ℝ)
1211anim1i 609 . . . . . . . . . . . 12 (((♯‘𝐴) ∈ ℕ0 ∧ (♯‘𝐵) ∈ ℕ0) → ((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℕ0))
1312ancoms 451 . . . . . . . . . . 11 (((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) → ((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℕ0))
14 nn0addge1 11625 . . . . . . . . . . 11 (((♯‘𝐴) ∈ ℝ ∧ (♯‘𝐵) ∈ ℕ0) → (♯‘𝐴) ≤ ((♯‘𝐴) + (♯‘𝐵)))
1513, 14syl 17 . . . . . . . . . 10 (((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) → (♯‘𝐴) ≤ ((♯‘𝐴) + (♯‘𝐵)))
1615adantr 473 . . . . . . . . 9 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → (♯‘𝐴) ≤ ((♯‘𝐴) + (♯‘𝐵)))
17 breq1 4845 . . . . . . . . . 10 (𝑁 = (♯‘𝐴) → (𝑁 ≤ ((♯‘𝐴) + (♯‘𝐵)) ↔ (♯‘𝐴) ≤ ((♯‘𝐴) + (♯‘𝐵))))
1817adantl 474 . . . . . . . . 9 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → (𝑁 ≤ ((♯‘𝐴) + (♯‘𝐵)) ↔ (♯‘𝐴) ≤ ((♯‘𝐴) + (♯‘𝐵))))
1916, 18mpbird 249 . . . . . . . 8 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → 𝑁 ≤ ((♯‘𝐴) + (♯‘𝐵)))
20 elfz2nn0 12682 . . . . . . . 8 (𝑁 ∈ (0...((♯‘𝐴) + (♯‘𝐵))) ↔ (𝑁 ∈ ℕ0 ∧ ((♯‘𝐴) + (♯‘𝐵)) ∈ ℕ0𝑁 ≤ ((♯‘𝐴) + (♯‘𝐵))))
217, 10, 19, 20syl3anbrc 1444 . . . . . . 7 ((((♯‘𝐵) ∈ ℕ0 ∧ (♯‘𝐴) ∈ ℕ0) ∧ 𝑁 = (♯‘𝐴)) → 𝑁 ∈ (0...((♯‘𝐴) + (♯‘𝐵))))
2221exp31 411 . . . . . 6 ((♯‘𝐵) ∈ ℕ0 → ((♯‘𝐴) ∈ ℕ0 → (𝑁 = (♯‘𝐴) → 𝑁 ∈ (0...((♯‘𝐴) + (♯‘𝐵))))))
233, 22syl 17 . . . . 5 (𝐵 ∈ Word 𝑉 → ((♯‘𝐴) ∈ ℕ0 → (𝑁 = (♯‘𝐴) → 𝑁 ∈ (0...((♯‘𝐴) + (♯‘𝐵))))))
242, 23syl5com 31 . . . 4 (𝐴 ∈ Word 𝑉 → (𝐵 ∈ Word 𝑉 → (𝑁 = (♯‘𝐴) → 𝑁 ∈ (0...((♯‘𝐴) + (♯‘𝐵))))))
25243imp 1138 . . 3 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → 𝑁 ∈ (0...((♯‘𝐴) + (♯‘𝐵))))
26 eqid 2798 . . . 4 (♯‘𝐴) = (♯‘𝐴)
2726swrdccat3aOLD 13801 . . 3 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉) → (𝑁 ∈ (0...((♯‘𝐴) + (♯‘𝐵))) → ((𝐴 ++ 𝐵) substr ⟨0, 𝑁⟩) = if(𝑁 ≤ (♯‘𝐴), (𝐴 substr ⟨0, 𝑁⟩), (𝐴 ++ (𝐵 substr ⟨0, (𝑁 − (♯‘𝐴))⟩)))))
281, 25, 27sylc 65 . 2 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → ((𝐴 ++ 𝐵) substr ⟨0, 𝑁⟩) = if(𝑁 ≤ (♯‘𝐴), (𝐴 substr ⟨0, 𝑁⟩), (𝐴 ++ (𝐵 substr ⟨0, (𝑁 − (♯‘𝐴))⟩))))
292, 11syl 17 . . . . . 6 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ∈ ℝ)
3029leidd 10885 . . . . 5 (𝐴 ∈ Word 𝑉 → (♯‘𝐴) ≤ (♯‘𝐴))
31303ad2ant1 1164 . . . 4 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → (♯‘𝐴) ≤ (♯‘𝐴))
32 breq1 4845 . . . . 5 (𝑁 = (♯‘𝐴) → (𝑁 ≤ (♯‘𝐴) ↔ (♯‘𝐴) ≤ (♯‘𝐴)))
33323ad2ant3 1166 . . . 4 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → (𝑁 ≤ (♯‘𝐴) ↔ (♯‘𝐴) ≤ (♯‘𝐴)))
3431, 33mpbird 249 . . 3 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → 𝑁 ≤ (♯‘𝐴))
3534iftrued 4284 . 2 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → if(𝑁 ≤ (♯‘𝐴), (𝐴 substr ⟨0, 𝑁⟩), (𝐴 ++ (𝐵 substr ⟨0, (𝑁 − (♯‘𝐴))⟩))) = (𝐴 substr ⟨0, 𝑁⟩))
36 swrdidOLD 13676 . . . 4 (𝐴 ∈ Word 𝑉 → (𝐴 substr ⟨0, (♯‘𝐴)⟩) = 𝐴)
37363ad2ant1 1164 . . 3 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → (𝐴 substr ⟨0, (♯‘𝐴)⟩) = 𝐴)
38 opeq2 4593 . . . . . 6 (𝑁 = (♯‘𝐴) → ⟨0, 𝑁⟩ = ⟨0, (♯‘𝐴)⟩)
3938oveq2d 6893 . . . . 5 (𝑁 = (♯‘𝐴) → (𝐴 substr ⟨0, 𝑁⟩) = (𝐴 substr ⟨0, (♯‘𝐴)⟩))
4039eqeq1d 2800 . . . 4 (𝑁 = (♯‘𝐴) → ((𝐴 substr ⟨0, 𝑁⟩) = 𝐴 ↔ (𝐴 substr ⟨0, (♯‘𝐴)⟩) = 𝐴))
41403ad2ant3 1166 . . 3 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → ((𝐴 substr ⟨0, 𝑁⟩) = 𝐴 ↔ (𝐴 substr ⟨0, (♯‘𝐴)⟩) = 𝐴))
4237, 41mpbird 249 . 2 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → (𝐴 substr ⟨0, 𝑁⟩) = 𝐴)
4328, 35, 423eqtrd 2836 1 ((𝐴 ∈ Word 𝑉𝐵 ∈ Word 𝑉𝑁 = (♯‘𝐴)) → ((𝐴 ++ 𝐵) substr ⟨0, 𝑁⟩) = 𝐴)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 198  wa 385  w3a 1108   = wceq 1653  wcel 2157  ifcif 4276  cop 4373   class class class wbr 4842  cfv 6100  (class class class)co 6877  cr 10222  0cc0 10223   + caddc 10226  cle 10363  cmin 10555  0cn0 11577  ...cfz 12577  chash 13367  Word cword 13531   ++ cconcat 13587   substr csubstr 13661
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1891  ax-4 1905  ax-5 2006  ax-6 2072  ax-7 2107  ax-8 2159  ax-9 2166  ax-10 2185  ax-11 2200  ax-12 2213  ax-13 2377  ax-ext 2776  ax-rep 4963  ax-sep 4974  ax-nul 4982  ax-pow 5034  ax-pr 5096  ax-un 7182  ax-cnex 10279  ax-resscn 10280  ax-1cn 10281  ax-icn 10282  ax-addcl 10283  ax-addrcl 10284  ax-mulcl 10285  ax-mulrcl 10286  ax-mulcom 10287  ax-addass 10288  ax-mulass 10289  ax-distr 10290  ax-i2m1 10291  ax-1ne0 10292  ax-1rid 10293  ax-rnegex 10294  ax-rrecex 10295  ax-cnre 10296  ax-pre-lttri 10297  ax-pre-lttrn 10298  ax-pre-ltadd 10299  ax-pre-mulgt0 10300
This theorem depends on definitions:  df-bi 199  df-an 386  df-or 875  df-3or 1109  df-3an 1110  df-tru 1657  df-ex 1876  df-nf 1880  df-sb 2065  df-mo 2591  df-eu 2609  df-clab 2785  df-cleq 2791  df-clel 2794  df-nfc 2929  df-ne 2971  df-nel 3074  df-ral 3093  df-rex 3094  df-reu 3095  df-rab 3097  df-v 3386  df-sbc 3633  df-csb 3728  df-dif 3771  df-un 3773  df-in 3775  df-ss 3782  df-pss 3784  df-nul 4115  df-if 4277  df-pw 4350  df-sn 4368  df-pr 4370  df-tp 4372  df-op 4374  df-uni 4628  df-int 4667  df-iun 4711  df-br 4843  df-opab 4905  df-mpt 4922  df-tr 4945  df-id 5219  df-eprel 5224  df-po 5232  df-so 5233  df-fr 5270  df-we 5272  df-xp 5317  df-rel 5318  df-cnv 5319  df-co 5320  df-dm 5321  df-rn 5322  df-res 5323  df-ima 5324  df-pred 5897  df-ord 5943  df-on 5944  df-lim 5945  df-suc 5946  df-iota 6063  df-fun 6102  df-fn 6103  df-f 6104  df-f1 6105  df-fo 6106  df-f1o 6107  df-fv 6108  df-riota 6838  df-ov 6880  df-oprab 6881  df-mpt2 6882  df-om 7299  df-1st 7400  df-2nd 7401  df-wrecs 7644  df-recs 7706  df-rdg 7744  df-1o 7798  df-oadd 7802  df-er 7981  df-en 8195  df-dom 8196  df-sdom 8197  df-fin 8198  df-card 9050  df-pnf 10364  df-mnf 10365  df-xr 10366  df-ltxr 10367  df-le 10368  df-sub 10557  df-neg 10558  df-nn 11312  df-n0 11578  df-z 11664  df-uz 11928  df-fz 12578  df-fzo 12718  df-hash 13368  df-word 13532  df-concat 13588  df-substr 13662
This theorem is referenced by:  ccats1swrdeqbiOLD  13808  clwlkclwwlk2OLD  27291  clwlkclwwlkfoOLD  27299  clwlksfoclwwlkOLD  27397  numclwwlk1lem2foalemOLD  27702  numclwwlk1lem2foOLD  27717
  Copyright terms: Public domain W3C validator