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

Theorem wwlksnextprop 26801
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.)
Hypotheses
Ref Expression
wwlksnextprop.x 𝑋 = ((𝑁 + 1) WWalksN 𝐺)
wwlksnextprop.e 𝐸 = (Edg‘𝐺)
wwlksnextprop.y 𝑌 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑃}
Assertion
Ref Expression
wwlksnextprop (𝑁 ∈ ℕ0 → {𝑥𝑋 ∣ (𝑥‘0) = 𝑃} = {𝑥𝑋 ∣ ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)})
Distinct variable groups:   𝑤,𝐺   𝑤,𝑁   𝑤,𝑃   𝑦,𝐸   𝑥,𝑁,𝑦   𝑦,𝑃   𝑦,𝑋   𝑦,𝑌   𝑥,𝑤
Allowed substitution hints:   𝑃(𝑥)   𝐸(𝑥,𝑤)   𝐺(𝑥,𝑦)   𝑋(𝑥,𝑤)   𝑌(𝑥,𝑤)

Proof of Theorem wwlksnextprop
StepHypRef Expression
1 eqidd 2622 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩))
2 wwlksnextprop.x . . . . . . . . 9 𝑋 = ((𝑁 + 1) WWalksN 𝐺)
32wwlksnextproplem1 26798 . . . . . . . 8 ((𝑥𝑋𝑁 ∈ ℕ0) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0))
43ancoms 469 . . . . . . 7 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0))
54adantr 481 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0))
6 eqeq2 2632 . . . . . . 7 ((𝑥‘0) = 𝑃 → (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
76adantl 482 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
85, 7mpbid 222 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃)
9 wwlksnextprop.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
102, 9wwlksnextproplem2 26799 . . . . . . 7 ((𝑥𝑋𝑁 ∈ ℕ0) → {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)
1110ancoms 469 . . . . . 6 ((𝑁 ∈ ℕ0𝑥𝑋) → {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)
1211adantr 481 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)
13 simpr 477 . . . . . . . 8 ((𝑁 ∈ ℕ0𝑥𝑋) → 𝑥𝑋)
1413adantr 481 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑥𝑋)
15 simpr 477 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥‘0) = 𝑃)
16 simpll 790 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑁 ∈ ℕ0)
17 wwlksnextprop.y . . . . . . . 8 𝑌 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑃}
182, 9, 17wwlksnextproplem3 26800 . . . . . . 7 ((𝑥𝑋 ∧ (𝑥‘0) = 𝑃𝑁 ∈ ℕ0) → (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∈ 𝑌)
1914, 15, 16, 18syl3anc 1325 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∈ 𝑌)
20 eqeq2 2632 . . . . . . . 8 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ↔ (𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩)))
21 fveq1 6188 . . . . . . . . 9 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → (𝑦‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
2221eqeq1d 2623 . . . . . . . 8 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ((𝑦‘0) = 𝑃 ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
23 fveq2 6189 . . . . . . . . . 10 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ( lastS ‘𝑦) = ( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)))
2423preq1d 4272 . . . . . . . . 9 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → {( lastS ‘𝑦), ( lastS ‘𝑥)} = {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)})
2524eleq1d 2685 . . . . . . . 8 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ({( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸 ↔ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸))
2620, 22, 253anbi123d 1398 . . . . . . 7 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∧ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 ∧ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)))
2726adantl 482 . . . . . 6 ((((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) ∧ 𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩)) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∧ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 ∧ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)))
2819, 27rspcedv 3311 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∧ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 ∧ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸) → ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)))
291, 8, 12, 28mp3and 1426 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸))
3029ex 450 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 → ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)))
3121eqcoms 2629 . . . . . . . . 9 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 → (𝑦‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
3231eqeq1d 2623 . . . . . . . 8 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 → ((𝑦‘0) = 𝑃 ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
333eqcomd 2627 . . . . . . . . . . 11 ((𝑥𝑋𝑁 ∈ ℕ0) → (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
3433ancoms 469 . . . . . . . . . 10 ((𝑁 ∈ ℕ0𝑥𝑋) → (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
3534adantr 481 . . . . . . . . 9 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
36 eqeq2 2632 . . . . . . . . . 10 (𝑃 = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0)))
3736eqcoms 2629 . . . . . . . . 9 (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0)))
3835, 37syl5ibr 236 . . . . . . . 8 (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
3932, 38syl6bi 243 . . . . . . 7 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 → ((𝑦‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃)))
4039imp 445 . . . . . 6 (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
41403adant3 1080 . . . . 5 (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
4241com12 32 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4342rexlimdva 3029 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → (∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4430, 43impbid 202 . 2 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 ↔ ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)))
4544rabbidva 3186 1 (𝑁 ∈ ℕ0 → {𝑥𝑋 ∣ (𝑥‘0) = 𝑃} = {𝑥𝑋 ∣ ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1037   = wceq 1482  wcel 1989  wrex 2912  {crab 2915  {cpr 4177  cop 4181  cfv 5886  (class class class)co 6647  0cc0 9933  1c1 9934   + caddc 9936  0cn0 11289   lastS clsw 13287   substr csubstr 13290  Edgcedg 25933   WWalksN cwwlksn 26712
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1721  ax-4 1736  ax-5 1838  ax-6 1887  ax-7 1934  ax-8 1991  ax-9 1998  ax-10 2018  ax-11 2033  ax-12 2046  ax-13 2245  ax-ext 2601  ax-rep 4769  ax-sep 4779  ax-nul 4787  ax-pow 4841  ax-pr 4904  ax-un 6946  ax-cnex 9989  ax-resscn 9990  ax-1cn 9991  ax-icn 9992  ax-addcl 9993  ax-addrcl 9994  ax-mulcl 9995  ax-mulrcl 9996  ax-mulcom 9997  ax-addass 9998  ax-mulass 9999  ax-distr 10000  ax-i2m1 10001  ax-1ne0 10002  ax-1rid 10003  ax-rnegex 10004  ax-rrecex 10005  ax-cnre 10006  ax-pre-lttri 10007  ax-pre-lttrn 10008  ax-pre-ltadd 10009  ax-pre-mulgt0 10010
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1038  df-3an 1039  df-tru 1485  df-ex 1704  df-nf 1709  df-sb 1880  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2752  df-ne 2794  df-nel 2897  df-ral 2916  df-rex 2917  df-reu 2918  df-rab 2920  df-v 3200  df-sbc 3434  df-csb 3532  df-dif 3575  df-un 3577  df-in 3579  df-ss 3586  df-pss 3588  df-nul 3914  df-if 4085  df-pw 4158  df-sn 4176  df-pr 4178  df-tp 4180  df-op 4182  df-uni 4435  df-int 4474  df-iun 4520  df-br 4652  df-opab 4711  df-mpt 4728  df-tr 4751  df-id 5022  df-eprel 5027  df-po 5033  df-so 5034  df-fr 5071  df-we 5073  df-xp 5118  df-rel 5119  df-cnv 5120  df-co 5121  df-dm 5122  df-rn 5123  df-res 5124  df-ima 5125  df-pred 5678  df-ord 5724  df-on 5725  df-lim 5726  df-suc 5727  df-iota 5849  df-fun 5888  df-fn 5889  df-f 5890  df-f1 5891  df-fo 5892  df-f1o 5893  df-fv 5894  df-riota 6608  df-ov 6650  df-oprab 6651  df-mpt2 6652  df-om 7063  df-1st 7165  df-2nd 7166  df-wrecs 7404  df-recs 7465  df-rdg 7503  df-1o 7557  df-oadd 7561  df-er 7739  df-map 7856  df-pm 7857  df-en 7953  df-dom 7954  df-sdom 7955  df-fin 7956  df-card 8762  df-pnf 10073  df-mnf 10074  df-xr 10075  df-ltxr 10076  df-le 10077  df-sub 10265  df-neg 10266  df-nn 11018  df-2 11076  df-n0 11290  df-z 11375  df-uz 11685  df-fz 12324  df-fzo 12462  df-hash 13113  df-word 13294  df-lsw 13295  df-substr 13298  df-wwlks 26716  df-wwlksn 26717
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator