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

Theorem wlknwwlksnbij 27672
Description: The mapping (𝑡𝑇 ↦ (2nd𝑡)) is a bijection between the set of walks of a fixed length and the set of walks represented by words of the same length in a simple pseudograph. (Contributed by Alexander van der Vekens, 25-Aug-2018.) (Revised by AV, 5-Aug-2022.)
Hypotheses
Ref Expression
wlknwwlksnbij.t 𝑇 = {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}
wlknwwlksnbij.w 𝑊 = (𝑁 WWalksN 𝐺)
wlknwwlksnbij.f 𝐹 = (𝑡𝑇 ↦ (2nd𝑡))
Assertion
Ref Expression
wlknwwlksnbij ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → 𝐹:𝑇1-1-onto𝑊)
Distinct variable groups:   𝐺,𝑝,𝑡   𝑁,𝑝,𝑡   𝑡,𝑇
Allowed substitution hints:   𝑇(𝑝)   𝐹(𝑡,𝑝)   𝑊(𝑡,𝑝)

Proof of Theorem wlknwwlksnbij
Dummy variable 𝑞 is distinct from all other variables.
StepHypRef Expression
1 eqid 2824 . . 3 (𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)) = (𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝))
21wlkswwlksf1o 27663 . . . 4 (𝐺 ∈ USPGraph → (𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)):(Walks‘𝐺)–1-1-onto→(WWalks‘𝐺))
32adantr 484 . . 3 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → (𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)):(Walks‘𝐺)–1-1-onto→(WWalks‘𝐺))
4 fveqeq2 6668 . . . . 5 (𝑞 = (2nd𝑝) → ((♯‘𝑞) = (𝑁 + 1) ↔ (♯‘(2nd𝑝)) = (𝑁 + 1)))
543ad2ant3 1132 . . . 4 (((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) ∧ 𝑝 ∈ (Walks‘𝐺) ∧ 𝑞 = (2nd𝑝)) → ((♯‘𝑞) = (𝑁 + 1) ↔ (♯‘(2nd𝑝)) = (𝑁 + 1)))
6 wlkcpr 27416 . . . . . . 7 (𝑝 ∈ (Walks‘𝐺) ↔ (1st𝑝)(Walks‘𝐺)(2nd𝑝))
7 wlklenvp1 27406 . . . . . . . 8 ((1st𝑝)(Walks‘𝐺)(2nd𝑝) → (♯‘(2nd𝑝)) = ((♯‘(1st𝑝)) + 1))
8 eqeq1 2828 . . . . . . . . . 10 ((♯‘(2nd𝑝)) = ((♯‘(1st𝑝)) + 1) → ((♯‘(2nd𝑝)) = (𝑁 + 1) ↔ ((♯‘(1st𝑝)) + 1) = (𝑁 + 1)))
9 wlkcl 27403 . . . . . . . . . . . . 13 ((1st𝑝)(Walks‘𝐺)(2nd𝑝) → (♯‘(1st𝑝)) ∈ ℕ0)
109nn0cnd 11952 . . . . . . . . . . . 12 ((1st𝑝)(Walks‘𝐺)(2nd𝑝) → (♯‘(1st𝑝)) ∈ ℂ)
1110adantr 484 . . . . . . . . . . 11 (((1st𝑝)(Walks‘𝐺)(2nd𝑝) ∧ (𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0)) → (♯‘(1st𝑝)) ∈ ℂ)
12 nn0cn 11902 . . . . . . . . . . . . 13 (𝑁 ∈ ℕ0𝑁 ∈ ℂ)
1312adantl 485 . . . . . . . . . . . 12 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → 𝑁 ∈ ℂ)
1413adantl 485 . . . . . . . . . . 11 (((1st𝑝)(Walks‘𝐺)(2nd𝑝) ∧ (𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0)) → 𝑁 ∈ ℂ)
15 1cnd 10630 . . . . . . . . . . 11 (((1st𝑝)(Walks‘𝐺)(2nd𝑝) ∧ (𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0)) → 1 ∈ ℂ)
1611, 14, 15addcan2d 10838 . . . . . . . . . 10 (((1st𝑝)(Walks‘𝐺)(2nd𝑝) ∧ (𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0)) → (((♯‘(1st𝑝)) + 1) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁))
178, 16sylan9bbr 514 . . . . . . . . 9 ((((1st𝑝)(Walks‘𝐺)(2nd𝑝) ∧ (𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0)) ∧ (♯‘(2nd𝑝)) = ((♯‘(1st𝑝)) + 1)) → ((♯‘(2nd𝑝)) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁))
1817exp31 423 . . . . . . . 8 ((1st𝑝)(Walks‘𝐺)(2nd𝑝) → ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → ((♯‘(2nd𝑝)) = ((♯‘(1st𝑝)) + 1) → ((♯‘(2nd𝑝)) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁))))
197, 18mpid 44 . . . . . . 7 ((1st𝑝)(Walks‘𝐺)(2nd𝑝) → ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → ((♯‘(2nd𝑝)) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁)))
206, 19sylbi 220 . . . . . 6 (𝑝 ∈ (Walks‘𝐺) → ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → ((♯‘(2nd𝑝)) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁)))
2120impcom 411 . . . . 5 (((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) ∧ 𝑝 ∈ (Walks‘𝐺)) → ((♯‘(2nd𝑝)) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁))
22213adant3 1129 . . . 4 (((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) ∧ 𝑝 ∈ (Walks‘𝐺) ∧ 𝑞 = (2nd𝑝)) → ((♯‘(2nd𝑝)) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁))
235, 22bitrd 282 . . 3 (((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) ∧ 𝑝 ∈ (Walks‘𝐺) ∧ 𝑞 = (2nd𝑝)) → ((♯‘𝑞) = (𝑁 + 1) ↔ (♯‘(1st𝑝)) = 𝑁))
241, 3, 23f1oresrab 6878 . 2 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → ((𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}):{𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}–1-1-onto→{𝑞 ∈ (WWalks‘𝐺) ∣ (♯‘𝑞) = (𝑁 + 1)})
25 wlknwwlksnbij.f . . . 4 𝐹 = (𝑡𝑇 ↦ (2nd𝑡))
26 wlknwwlksnbij.t . . . . . . 7 𝑇 = {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}
2726mpteq1i 5143 . . . . . 6 (𝑡𝑇 ↦ (2nd𝑡)) = (𝑡 ∈ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁} ↦ (2nd𝑡))
28 ssrab2 4042 . . . . . . 7 {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁} ⊆ (Walks‘𝐺)
29 resmpt 5893 . . . . . . 7 ({𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁} ⊆ (Walks‘𝐺) → ((𝑡 ∈ (Walks‘𝐺) ↦ (2nd𝑡)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}) = (𝑡 ∈ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁} ↦ (2nd𝑡)))
3028, 29ax-mp 5 . . . . . 6 ((𝑡 ∈ (Walks‘𝐺) ↦ (2nd𝑡)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}) = (𝑡 ∈ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁} ↦ (2nd𝑡))
31 fveq2 6659 . . . . . . . 8 (𝑡 = 𝑝 → (2nd𝑡) = (2nd𝑝))
3231cbvmptv 5156 . . . . . . 7 (𝑡 ∈ (Walks‘𝐺) ↦ (2nd𝑡)) = (𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝))
3332reseq1i 5837 . . . . . 6 ((𝑡 ∈ (Walks‘𝐺) ↦ (2nd𝑡)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}) = ((𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁})
3427, 30, 333eqtr2i 2853 . . . . 5 (𝑡𝑇 ↦ (2nd𝑡)) = ((𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁})
3534a1i 11 . . . 4 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → (𝑡𝑇 ↦ (2nd𝑡)) = ((𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}))
3625, 35syl5eq 2871 . . 3 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → 𝐹 = ((𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}))
3726a1i 11 . . 3 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → 𝑇 = {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁})
38 wlknwwlksnbij.w . . . 4 𝑊 = (𝑁 WWalksN 𝐺)
39 wwlksn 27621 . . . . 5 (𝑁 ∈ ℕ0 → (𝑁 WWalksN 𝐺) = {𝑞 ∈ (WWalks‘𝐺) ∣ (♯‘𝑞) = (𝑁 + 1)})
4039adantl 485 . . . 4 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → (𝑁 WWalksN 𝐺) = {𝑞 ∈ (WWalks‘𝐺) ∣ (♯‘𝑞) = (𝑁 + 1)})
4138, 40syl5eq 2871 . . 3 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → 𝑊 = {𝑞 ∈ (WWalks‘𝐺) ∣ (♯‘𝑞) = (𝑁 + 1)})
4236, 37, 41f1oeq123d 6599 . 2 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → (𝐹:𝑇1-1-onto𝑊 ↔ ((𝑝 ∈ (Walks‘𝐺) ↦ (2nd𝑝)) ↾ {𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}):{𝑝 ∈ (Walks‘𝐺) ∣ (♯‘(1st𝑝)) = 𝑁}–1-1-onto→{𝑞 ∈ (WWalks‘𝐺) ∣ (♯‘𝑞) = (𝑁 + 1)}))
4324, 42mpbird 260 1 ((𝐺 ∈ USPGraph ∧ 𝑁 ∈ ℕ0) → 𝐹:𝑇1-1-onto𝑊)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399  w3a 1084   = wceq 1538  wcel 2115  {crab 3137  wss 3919   class class class wbr 5053  cmpt 5133  cres 5545  1-1-ontowf1o 6343  cfv 6344  (class class class)co 7146  1st c1st 7679  2nd c2nd 7680  cc 10529  1c1 10532   + caddc 10534  0cn0 11892  chash 13693  USPGraphcuspgr 26939  Walkscwlks 27384  WWalkscwwlks 27609   WWalksN cwwlksn 27610
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 1912  ax-6 1971  ax-7 2016  ax-8 2117  ax-9 2125  ax-10 2146  ax-11 2162  ax-12 2179  ax-ext 2796  ax-rep 5177  ax-sep 5190  ax-nul 5197  ax-pow 5254  ax-pr 5318  ax-un 7452  ax-cnex 10587  ax-resscn 10588  ax-1cn 10589  ax-icn 10590  ax-addcl 10591  ax-addrcl 10592  ax-mulcl 10593  ax-mulrcl 10594  ax-mulcom 10595  ax-addass 10596  ax-mulass 10597  ax-distr 10598  ax-i2m1 10599  ax-1ne0 10600  ax-1rid 10601  ax-rnegex 10602  ax-rrecex 10603  ax-cnre 10604  ax-pre-lttri 10605  ax-pre-lttrn 10606  ax-pre-ltadd 10607  ax-pre-mulgt0 10608
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-ifp 1059  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2071  df-mo 2624  df-eu 2655  df-clab 2803  df-cleq 2817  df-clel 2896  df-nfc 2964  df-ne 3015  df-nel 3119  df-ral 3138  df-rex 3139  df-reu 3140  df-rmo 3141  df-rab 3142  df-v 3482  df-sbc 3759  df-csb 3867  df-dif 3922  df-un 3924  df-in 3926  df-ss 3936  df-pss 3938  df-nul 4277  df-if 4451  df-pw 4524  df-sn 4551  df-pr 4553  df-tp 4555  df-op 4557  df-uni 4826  df-int 4864  df-iun 4908  df-br 5054  df-opab 5116  df-mpt 5134  df-tr 5160  df-id 5448  df-eprel 5453  df-po 5462  df-so 5463  df-fr 5502  df-we 5504  df-xp 5549  df-rel 5550  df-cnv 5551  df-co 5552  df-dm 5553  df-rn 5554  df-res 5555  df-ima 5556  df-pred 6136  df-ord 6182  df-on 6183  df-lim 6184  df-suc 6185  df-iota 6303  df-fun 6346  df-fn 6347  df-f 6348  df-f1 6349  df-fo 6350  df-f1o 6351  df-fv 6352  df-riota 7104  df-ov 7149  df-oprab 7150  df-mpo 7151  df-om 7572  df-1st 7681  df-2nd 7682  df-wrecs 7939  df-recs 8000  df-rdg 8038  df-1o 8094  df-2o 8095  df-oadd 8098  df-er 8281  df-map 8400  df-pm 8401  df-en 8502  df-dom 8503  df-sdom 8504  df-fin 8505  df-dju 9323  df-card 9361  df-pnf 10671  df-mnf 10672  df-xr 10673  df-ltxr 10674  df-le 10675  df-sub 10866  df-neg 10867  df-nn 11633  df-2 11695  df-n0 11893  df-xnn0 11963  df-z 11977  df-uz 12239  df-fz 12893  df-fzo 13036  df-hash 13694  df-word 13865  df-edg 26839  df-uhgr 26849  df-upgr 26873  df-uspgr 26941  df-wlks 27387  df-wwlks 27614  df-wwlksn 27615
This theorem is referenced by:  wlknwwlksnen  27673  wlksnwwlknvbij  27692
  Copyright terms: Public domain W3C validator