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

Theorem wwlksnextprop 27196
Description: Adding additional properties to the set of walks (as words) of a fixed length starting at a fixed vertex. (Contributed by Alexander van der Vekens, 1-Aug-2018.) (Revised by AV, 20-Apr-2021.) (Revised by AV, 29-Oct-2022.)
Hypotheses
Ref Expression
wwlksnextprop.x 𝑋 = ((𝑁 + 1) WWalksN 𝐺)
wwlksnextprop.e 𝐸 = (Edg‘𝐺)
wwlksnextprop.y 𝑌 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑃}
Assertion
Ref Expression
wwlksnextprop (𝑁 ∈ ℕ0 → {𝑥𝑋 ∣ (𝑥‘0) = 𝑃} = {𝑥𝑋 ∣ ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)})
Distinct variable groups:   𝑤,𝐺   𝑤,𝑁   𝑤,𝑃   𝑦,𝐸   𝑥,𝑁,𝑦   𝑦,𝑃   𝑦,𝑋   𝑦,𝑌   𝑥,𝑤
Allowed substitution hints:   𝑃(𝑥)   𝐸(𝑥,𝑤)   𝐺(𝑥,𝑦)   𝑋(𝑥,𝑤)   𝑌(𝑥,𝑤)

Proof of Theorem wwlksnextprop
StepHypRef Expression
1 eqidd 2800 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)))
2 wwlksnextprop.x . . . . . . . . 9 𝑋 = ((𝑁 + 1) WWalksN 𝐺)
32wwlksnextproplem1 27190 . . . . . . . 8 ((𝑥𝑋𝑁 ∈ ℕ0) → ((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0))
43ancoms 451 . . . . . . 7 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0))
54adantr 473 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0))
6 eqeq2 2810 . . . . . . 7 ((𝑥‘0) = 𝑃 → (((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0) ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
76adantl 474 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0) ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
85, 7mpbid 224 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃)
9 wwlksnextprop.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
102, 9wwlksnextproplem2 27192 . . . . . . 7 ((𝑥𝑋𝑁 ∈ ℕ0) → {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)
1110ancoms 451 . . . . . 6 ((𝑁 ∈ ℕ0𝑥𝑋) → {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)
1211adantr 473 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)
13 simpr 478 . . . . . . . 8 ((𝑁 ∈ ℕ0𝑥𝑋) → 𝑥𝑋)
1413adantr 473 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑥𝑋)
15 simpr 478 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥‘0) = 𝑃)
16 simpll 784 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑁 ∈ ℕ0)
17 wwlksnextprop.y . . . . . . . 8 𝑌 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑃}
182, 9, 17wwlksnextproplem3 27194 . . . . . . 7 ((𝑥𝑋 ∧ (𝑥‘0) = 𝑃𝑁 ∈ ℕ0) → (𝑥 prefix (𝑁 + 1)) ∈ 𝑌)
1914, 15, 16, 18syl3anc 1491 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 prefix (𝑁 + 1)) ∈ 𝑌)
20 eqeq2 2810 . . . . . . . 8 (𝑦 = (𝑥 prefix (𝑁 + 1)) → ((𝑥 prefix (𝑁 + 1)) = 𝑦 ↔ (𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1))))
21 fveq1 6410 . . . . . . . . 9 (𝑦 = (𝑥 prefix (𝑁 + 1)) → (𝑦‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
2221eqeq1d 2801 . . . . . . . 8 (𝑦 = (𝑥 prefix (𝑁 + 1)) → ((𝑦‘0) = 𝑃 ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
23 fveq2 6411 . . . . . . . . . 10 (𝑦 = (𝑥 prefix (𝑁 + 1)) → (lastS‘𝑦) = (lastS‘(𝑥 prefix (𝑁 + 1))))
2423preq1d 4463 . . . . . . . . 9 (𝑦 = (𝑥 prefix (𝑁 + 1)) → {(lastS‘𝑦), (lastS‘𝑥)} = {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)})
2524eleq1d 2863 . . . . . . . 8 (𝑦 = (𝑥 prefix (𝑁 + 1)) → ({(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸 ↔ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸))
2620, 22, 253anbi123d 1561 . . . . . . 7 (𝑦 = (𝑥 prefix (𝑁 + 1)) → (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) ↔ ((𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)) ∧ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 ∧ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)))
2726adantl 474 . . . . . 6 ((((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) ∧ 𝑦 = (𝑥 prefix (𝑁 + 1))) → (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) ↔ ((𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)) ∧ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 ∧ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)))
2819, 27rspcedv 3501 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)) ∧ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 ∧ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸) → ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)))
291, 8, 12, 28mp3and 1589 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸))
3029ex 402 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 → ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)))
3121eqcoms 2807 . . . . . . . . 9 ((𝑥 prefix (𝑁 + 1)) = 𝑦 → (𝑦‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
3231eqeq1d 2801 . . . . . . . 8 ((𝑥 prefix (𝑁 + 1)) = 𝑦 → ((𝑦‘0) = 𝑃 ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
333eqcomd 2805 . . . . . . . . . . 11 ((𝑥𝑋𝑁 ∈ ℕ0) → (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
3433ancoms 451 . . . . . . . . . 10 ((𝑁 ∈ ℕ0𝑥𝑋) → (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
3534adantr 473 . . . . . . . . 9 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
36 eqeq2 2810 . . . . . . . . . 10 (𝑃 = ((𝑥 prefix (𝑁 + 1))‘0) → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0)))
3736eqcoms 2807 . . . . . . . . 9 (((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0)))
3835, 37syl5ibr 238 . . . . . . . 8 (((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
3932, 38syl6bi 245 . . . . . . 7 ((𝑥 prefix (𝑁 + 1)) = 𝑦 → ((𝑦‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃)))
4039imp 396 . . . . . 6 (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
41403adant3 1163 . . . . 5 (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
4241com12 32 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4342rexlimdva 3212 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → (∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4430, 43impbid 204 . 2 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 ↔ ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)))
4544rabbidva 3372 1 (𝑁 ∈ ℕ0 → {𝑥𝑋 ∣ (𝑥‘0) = 𝑃} = {𝑥𝑋 ∣ ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 198  wa 385  w3a 1108   = wceq 1653  wcel 2157  wrex 3090  {crab 3093  {cpr 4370  cfv 6101  (class class class)co 6878  0cc0 10224  1c1 10225   + caddc 10227  0cn0 11580  lastSclsw 13582   prefix cpfx 13713  Edgcedg 26282   WWalksN cwwlksn 27077
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 2777  ax-rep 4964  ax-sep 4975  ax-nul 4983  ax-pow 5035  ax-pr 5097  ax-un 7183  ax-cnex 10280  ax-resscn 10281  ax-1cn 10282  ax-icn 10283  ax-addcl 10284  ax-addrcl 10285  ax-mulcl 10286  ax-mulrcl 10287  ax-mulcom 10288  ax-addass 10289  ax-mulass 10290  ax-distr 10291  ax-i2m1 10292  ax-1ne0 10293  ax-1rid 10294  ax-rnegex 10295  ax-rrecex 10296  ax-cnre 10297  ax-pre-lttri 10298  ax-pre-lttrn 10299  ax-pre-ltadd 10300  ax-pre-mulgt0 10301
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 2786  df-cleq 2792  df-clel 2795  df-nfc 2930  df-ne 2972  df-nel 3075  df-ral 3094  df-rex 3095  df-reu 3096  df-rab 3098  df-v 3387  df-sbc 3634  df-csb 3729  df-dif 3772  df-un 3774  df-in 3776  df-ss 3783  df-pss 3785  df-nul 4116  df-if 4278  df-pw 4351  df-sn 4369  df-pr 4371  df-tp 4373  df-op 4375  df-uni 4629  df-int 4668  df-iun 4712  df-br 4844  df-opab 4906  df-mpt 4923  df-tr 4946  df-id 5220  df-eprel 5225  df-po 5233  df-so 5234  df-fr 5271  df-we 5273  df-xp 5318  df-rel 5319  df-cnv 5320  df-co 5321  df-dm 5322  df-rn 5323  df-res 5324  df-ima 5325  df-pred 5898  df-ord 5944  df-on 5945  df-lim 5946  df-suc 5947  df-iota 6064  df-fun 6103  df-fn 6104  df-f 6105  df-f1 6106  df-fo 6107  df-f1o 6108  df-fv 6109  df-riota 6839  df-ov 6881  df-oprab 6882  df-mpt2 6883  df-om 7300  df-1st 7401  df-2nd 7402  df-wrecs 7645  df-recs 7707  df-rdg 7745  df-1o 7799  df-oadd 7803  df-er 7982  df-map 8097  df-pm 8098  df-en 8196  df-dom 8197  df-sdom 8198  df-fin 8199  df-card 9051  df-pnf 10365  df-mnf 10366  df-xr 10367  df-ltxr 10368  df-le 10369  df-sub 10558  df-neg 10559  df-nn 11313  df-2 11376  df-n0 11581  df-z 11667  df-uz 11931  df-fz 12581  df-fzo 12721  df-hash 13371  df-word 13535  df-lsw 13583  df-substr 13665  df-pfx 13714  df-wwlks 27081  df-wwlksn 27082
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator