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

Theorem wwlksnextprop 27802
 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 2759 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)))
2 wwlksnextprop.x . . . . . . . . 9 𝑋 = ((𝑁 + 1) WWalksN 𝐺)
32wwlksnextproplem1 27799 . . . . . . . 8 ((𝑥𝑋𝑁 ∈ ℕ0) → ((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0))
43ancoms 462 . . . . . . 7 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0))
54adantr 484 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0))
6 eqeq2 2770 . . . . . . 7 ((𝑥‘0) = 𝑃 → (((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0) ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
76adantl 485 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 prefix (𝑁 + 1))‘0) = (𝑥‘0) ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
85, 7mpbid 235 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃)
9 wwlksnextprop.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
102, 9wwlksnextproplem2 27800 . . . . . . 7 ((𝑥𝑋𝑁 ∈ ℕ0) → {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)
1110ancoms 462 . . . . . 6 ((𝑁 ∈ ℕ0𝑥𝑋) → {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)
1211adantr 484 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)
13 simpr 488 . . . . . . . 8 ((𝑁 ∈ ℕ0𝑥𝑋) → 𝑥𝑋)
1413adantr 484 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑥𝑋)
15 simpr 488 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥‘0) = 𝑃)
16 simpll 766 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑁 ∈ ℕ0)
17 wwlksnextprop.y . . . . . . . 8 𝑌 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑃}
182, 9, 17wwlksnextproplem3 27801 . . . . . . 7 ((𝑥𝑋 ∧ (𝑥‘0) = 𝑃𝑁 ∈ ℕ0) → (𝑥 prefix (𝑁 + 1)) ∈ 𝑌)
1914, 15, 16, 18syl3anc 1368 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 prefix (𝑁 + 1)) ∈ 𝑌)
20 eqeq2 2770 . . . . . . . 8 (𝑦 = (𝑥 prefix (𝑁 + 1)) → ((𝑥 prefix (𝑁 + 1)) = 𝑦 ↔ (𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1))))
21 fveq1 6661 . . . . . . . . 9 (𝑦 = (𝑥 prefix (𝑁 + 1)) → (𝑦‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
2221eqeq1d 2760 . . . . . . . 8 (𝑦 = (𝑥 prefix (𝑁 + 1)) → ((𝑦‘0) = 𝑃 ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
23 fveq2 6662 . . . . . . . . . 10 (𝑦 = (𝑥 prefix (𝑁 + 1)) → (lastS‘𝑦) = (lastS‘(𝑥 prefix (𝑁 + 1))))
2423preq1d 4635 . . . . . . . . 9 (𝑦 = (𝑥 prefix (𝑁 + 1)) → {(lastS‘𝑦), (lastS‘𝑥)} = {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)})
2524eleq1d 2836 . . . . . . . 8 (𝑦 = (𝑥 prefix (𝑁 + 1)) → ({(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸 ↔ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸))
2620, 22, 253anbi123d 1433 . . . . . . 7 (𝑦 = (𝑥 prefix (𝑁 + 1)) → (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) ↔ ((𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)) ∧ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 ∧ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)))
2726adantl 485 . . . . . 6 ((((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) ∧ 𝑦 = (𝑥 prefix (𝑁 + 1))) → (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) ↔ ((𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)) ∧ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 ∧ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸)))
2819, 27rspcedv 3536 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 prefix (𝑁 + 1)) = (𝑥 prefix (𝑁 + 1)) ∧ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 ∧ {(lastS‘(𝑥 prefix (𝑁 + 1))), (lastS‘𝑥)} ∈ 𝐸) → ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)))
291, 8, 12, 28mp3and 1461 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸))
3029ex 416 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 → ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)))
3121eqcoms 2766 . . . . . . . . 9 ((𝑥 prefix (𝑁 + 1)) = 𝑦 → (𝑦‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
3231eqeq1d 2760 . . . . . . . 8 ((𝑥 prefix (𝑁 + 1)) = 𝑦 → ((𝑦‘0) = 𝑃 ↔ ((𝑥 prefix (𝑁 + 1))‘0) = 𝑃))
333eqcomd 2764 . . . . . . . . . . 11 ((𝑥𝑋𝑁 ∈ ℕ0) → (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
3433ancoms 462 . . . . . . . . . 10 ((𝑁 ∈ ℕ0𝑥𝑋) → (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
3534adantr 484 . . . . . . . . 9 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0))
36 eqeq2 2770 . . . . . . . . . 10 (𝑃 = ((𝑥 prefix (𝑁 + 1))‘0) → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0)))
3736eqcoms 2766 . . . . . . . . 9 (((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 prefix (𝑁 + 1))‘0)))
3835, 37syl5ibr 249 . . . . . . . 8 (((𝑥 prefix (𝑁 + 1))‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
3932, 38syl6bi 256 . . . . . . 7 ((𝑥 prefix (𝑁 + 1)) = 𝑦 → ((𝑦‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃)))
4039imp 410 . . . . . 6 (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
41403adant3 1129 . . . . 5 (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
4241com12 32 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4342rexlimdva 3208 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → (∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4430, 43impbid 215 . 2 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 ↔ ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)))
4544rabbidva 3390 1 (𝑁 ∈ ℕ0 → {𝑥𝑋 ∣ (𝑥‘0) = 𝑃} = {𝑥𝑋 ∣ ∃𝑦𝑌 ((𝑥 prefix (𝑁 + 1)) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {(lastS‘𝑦), (lastS‘𝑥)} ∈ 𝐸)})
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 209   ∧ wa 399   ∧ w3a 1084   = wceq 1538   ∈ wcel 2111  ∃wrex 3071  {crab 3074  {cpr 4527  ‘cfv 6339  (class class class)co 7155  0cc0 10580  1c1 10581   + caddc 10583  ℕ0cn0 11939  lastSclsw 13966   prefix cpfx 14084  Edgcedg 26944   WWalksN cwwlksn 27716 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2729  ax-rep 5159  ax-sep 5172  ax-nul 5179  ax-pow 5237  ax-pr 5301  ax-un 7464  ax-cnex 10636  ax-resscn 10637  ax-1cn 10638  ax-icn 10639  ax-addcl 10640  ax-addrcl 10641  ax-mulcl 10642  ax-mulrcl 10643  ax-mulcom 10644  ax-addass 10645  ax-mulass 10646  ax-distr 10647  ax-i2m1 10648  ax-1ne0 10649  ax-1rid 10650  ax-rnegex 10651  ax-rrecex 10652  ax-cnre 10653  ax-pre-lttri 10654  ax-pre-lttrn 10655  ax-pre-ltadd 10656  ax-pre-mulgt0 10657 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-fal 1551  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2557  df-eu 2588  df-clab 2736  df-cleq 2750  df-clel 2830  df-nfc 2901  df-ne 2952  df-nel 3056  df-ral 3075  df-rex 3076  df-reu 3077  df-rab 3079  df-v 3411  df-sbc 3699  df-csb 3808  df-dif 3863  df-un 3865  df-in 3867  df-ss 3877  df-pss 3879  df-nul 4228  df-if 4424  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4802  df-int 4842  df-iun 4888  df-br 5036  df-opab 5098  df-mpt 5116  df-tr 5142  df-id 5433  df-eprel 5438  df-po 5446  df-so 5447  df-fr 5486  df-we 5488  df-xp 5533  df-rel 5534  df-cnv 5535  df-co 5536  df-dm 5537  df-rn 5538  df-res 5539  df-ima 5540  df-pred 6130  df-ord 6176  df-on 6177  df-lim 6178  df-suc 6179  df-iota 6298  df-fun 6341  df-fn 6342  df-f 6343  df-f1 6344  df-fo 6345  df-f1o 6346  df-fv 6347  df-riota 7113  df-ov 7158  df-oprab 7159  df-mpo 7160  df-om 7585  df-1st 7698  df-2nd 7699  df-wrecs 7962  df-recs 8023  df-rdg 8061  df-1o 8117  df-er 8304  df-map 8423  df-en 8533  df-dom 8534  df-sdom 8535  df-fin 8536  df-card 9406  df-pnf 10720  df-mnf 10721  df-xr 10722  df-ltxr 10723  df-le 10724  df-sub 10915  df-neg 10916  df-nn 11680  df-2 11742  df-n0 11940  df-z 12026  df-uz 12288  df-fz 12945  df-fzo 13088  df-hash 13746  df-word 13919  df-lsw 13967  df-substr 14055  df-pfx 14085  df-wwlks 27720  df-wwlksn 27721 This theorem is referenced by: (None)
 Copyright terms: Public domain W3C validator