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

Theorem is2wlk 25889
Description: Properties of a pair of functions to be a walk of length 2 (in an undirected graph). (Contributed by Alexander van der Vekens, 16-Feb-2018.)
Assertion
Ref Expression
is2wlk (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → ((𝐹(𝑉 Walks 𝐸)𝑃 ∧ (#‘𝐹) = 2) ↔ (𝐹:(0..^2)⟶dom 𝐸𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))

Proof of Theorem is2wlk
Dummy variable 𝑘 is distinct from all other variables.
StepHypRef Expression
1 iswlk 25842 . . 3 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → (𝐹(𝑉 Walks 𝐸)𝑃 ↔ (𝐹 ∈ Word dom 𝐸𝑃:(0...(#‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))})))
21anbi1d 736 . 2 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → ((𝐹(𝑉 Walks 𝐸)𝑃 ∧ (#‘𝐹) = 2) ↔ ((𝐹 ∈ Word dom 𝐸𝑃:(0...(#‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ∧ (#‘𝐹) = 2)))
3 wrdf 13114 . . . . . . . . . 10 (𝐹 ∈ Word dom 𝐸𝐹:(0..^(#‘𝐹))⟶dom 𝐸)
4 oveq2 6535 . . . . . . . . . . 11 ((#‘𝐹) = 2 → (0..^(#‘𝐹)) = (0..^2))
54feq2d 5930 . . . . . . . . . 10 ((#‘𝐹) = 2 → (𝐹:(0..^(#‘𝐹))⟶dom 𝐸𝐹:(0..^2)⟶dom 𝐸))
63, 5syl5ib 232 . . . . . . . . 9 ((#‘𝐹) = 2 → (𝐹 ∈ Word dom 𝐸𝐹:(0..^2)⟶dom 𝐸))
7 iswrdi 13113 . . . . . . . . 9 (𝐹:(0..^2)⟶dom 𝐸𝐹 ∈ Word dom 𝐸)
86, 7impbid1 213 . . . . . . . 8 ((#‘𝐹) = 2 → (𝐹 ∈ Word dom 𝐸𝐹:(0..^2)⟶dom 𝐸))
98adantl 480 . . . . . . 7 ((((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) ∧ (#‘𝐹) = 2) → (𝐹 ∈ Word dom 𝐸𝐹:(0..^2)⟶dom 𝐸))
10 oveq2 6535 . . . . . . . . 9 ((#‘𝐹) = 2 → (0...(#‘𝐹)) = (0...2))
1110feq2d 5930 . . . . . . . 8 ((#‘𝐹) = 2 → (𝑃:(0...(#‘𝐹))⟶𝑉𝑃:(0...2)⟶𝑉))
1211adantl 480 . . . . . . 7 ((((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) ∧ (#‘𝐹) = 2) → (𝑃:(0...(#‘𝐹))⟶𝑉𝑃:(0...2)⟶𝑉))
13 fzo0to2pr 12378 . . . . . . . . . . 11 (0..^2) = {0, 1}
144, 13syl6eq 2659 . . . . . . . . . 10 ((#‘𝐹) = 2 → (0..^(#‘𝐹)) = {0, 1})
1514raleqdv 3120 . . . . . . . . 9 ((#‘𝐹) = 2 → (∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))} ↔ ∀𝑘 ∈ {0, 1} (𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}))
16 2wlklem 25888 . . . . . . . . 9 (∀𝑘 ∈ {0, 1} (𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))} ↔ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))
1715, 16syl6bb 274 . . . . . . . 8 ((#‘𝐹) = 2 → (∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))} ↔ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})))
1817adantl 480 . . . . . . 7 ((((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) ∧ (#‘𝐹) = 2) → (∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))} ↔ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})))
199, 12, 183anbi123d 1390 . . . . . 6 ((((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) ∧ (#‘𝐹) = 2) → ((𝐹 ∈ Word dom 𝐸𝑃:(0...(#‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ↔ (𝐹:(0..^2)⟶dom 𝐸𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
20 3anass 1034 . . . . . 6 ((𝐹:(0..^2)⟶dom 𝐸𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ (𝐹:(0..^2)⟶dom 𝐸 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
2119, 20syl6bb 274 . . . . 5 ((((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) ∧ (#‘𝐹) = 2) → ((𝐹 ∈ Word dom 𝐸𝑃:(0...(#‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ↔ (𝐹:(0..^2)⟶dom 𝐸 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})))))
2221ex 448 . . . 4 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → ((#‘𝐹) = 2 → ((𝐹 ∈ Word dom 𝐸𝑃:(0...(#‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ↔ (𝐹:(0..^2)⟶dom 𝐸 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))))
2322pm5.32rd 669 . . 3 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → (((𝐹 ∈ Word dom 𝐸𝑃:(0...(#‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ∧ (#‘𝐹) = 2) ↔ ((𝐹:(0..^2)⟶dom 𝐸 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ∧ (#‘𝐹) = 2)))
24 3anass 1034 . . . 4 (((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ ((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
25 an32 834 . . . 4 (((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ↔ ((𝐹:(0..^2)⟶dom 𝐸 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ∧ (#‘𝐹) = 2))
2624, 25bitri 262 . . 3 (((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ ((𝐹:(0..^2)⟶dom 𝐸 ∧ (𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))) ∧ (#‘𝐹) = 2))
2723, 26syl6bbr 276 . 2 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → (((𝐹 ∈ Word dom 𝐸𝑃:(0...(#‘𝐹))⟶𝑉 ∧ ∀𝑘 ∈ (0..^(#‘𝐹))(𝐸‘(𝐹𝑘)) = {(𝑃𝑘), (𝑃‘(𝑘 + 1))}) ∧ (#‘𝐹) = 2) ↔ ((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
28 ffn 5944 . . . . . . 7 (𝐹:(0..^2)⟶dom 𝐸𝐹 Fn (0..^2))
29 hashfn 12980 . . . . . . . 8 (𝐹 Fn (0..^2) → (#‘𝐹) = (#‘(0..^2)))
30 2nn0 11159 . . . . . . . . 9 2 ∈ ℕ0
31 hashfzo0 13032 . . . . . . . . 9 (2 ∈ ℕ0 → (#‘(0..^2)) = 2)
3230, 31ax-mp 5 . . . . . . . 8 (#‘(0..^2)) = 2
3329, 32syl6eq 2659 . . . . . . 7 (𝐹 Fn (0..^2) → (#‘𝐹) = 2)
3428, 33syl 17 . . . . . 6 (𝐹:(0..^2)⟶dom 𝐸 → (#‘𝐹) = 2)
3534pm4.71i 661 . . . . 5 (𝐹:(0..^2)⟶dom 𝐸 ↔ (𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2))
3635bicomi 212 . . . 4 ((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ↔ 𝐹:(0..^2)⟶dom 𝐸)
3736a1i 11 . . 3 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → ((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ↔ 𝐹:(0..^2)⟶dom 𝐸))
38373anbi1d 1394 . 2 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → (((𝐹:(0..^2)⟶dom 𝐸 ∧ (#‘𝐹) = 2) ∧ 𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)})) ↔ (𝐹:(0..^2)⟶dom 𝐸𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
392, 27, 383bitrd 292 1 (((𝑉𝑋𝐸𝑌) ∧ (𝐹𝑊𝑃𝑍)) → ((𝐹(𝑉 Walks 𝐸)𝑃 ∧ (#‘𝐹) = 2) ↔ (𝐹:(0..^2)⟶dom 𝐸𝑃:(0...2)⟶𝑉 ∧ ((𝐸‘(𝐹‘0)) = {(𝑃‘0), (𝑃‘1)} ∧ (𝐸‘(𝐹‘1)) = {(𝑃‘1), (𝑃‘2)}))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 194  wa 382  w3a 1030   = wceq 1474  wcel 1976  wral 2895  {cpr 4126   class class class wbr 4577  dom cdm 5028   Fn wfn 5785  wf 5786  cfv 5790  (class class class)co 6527  0cc0 9793  1c1 9794   + caddc 9796  2c2 10920  0cn0 11142  ...cfz 12155  ..^cfzo 12292  #chash 12937  Word cword 13095   Walks cwalk 25820
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1712  ax-4 1727  ax-5 1826  ax-6 1874  ax-7 1921  ax-8 1978  ax-9 1985  ax-10 2005  ax-11 2020  ax-12 2033  ax-13 2233  ax-ext 2589  ax-rep 4693  ax-sep 4703  ax-nul 4712  ax-pow 4764  ax-pr 4828  ax-un 6825  ax-cnex 9849  ax-resscn 9850  ax-1cn 9851  ax-icn 9852  ax-addcl 9853  ax-addrcl 9854  ax-mulcl 9855  ax-mulrcl 9856  ax-mulcom 9857  ax-addass 9858  ax-mulass 9859  ax-distr 9860  ax-i2m1 9861  ax-1ne0 9862  ax-1rid 9863  ax-rnegex 9864  ax-rrecex 9865  ax-cnre 9866  ax-pre-lttri 9867  ax-pre-lttrn 9868  ax-pre-ltadd 9869  ax-pre-mulgt0 9870
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1867  df-eu 2461  df-mo 2462  df-clab 2596  df-cleq 2602  df-clel 2605  df-nfc 2739  df-ne 2781  df-nel 2782  df-ral 2900  df-rex 2901  df-reu 2902  df-rab 2904  df-v 3174  df-sbc 3402  df-csb 3499  df-dif 3542  df-un 3544  df-in 3546  df-ss 3553  df-pss 3555  df-nul 3874  df-if 4036  df-pw 4109  df-sn 4125  df-pr 4127  df-tp 4129  df-op 4131  df-uni 4367  df-int 4405  df-iun 4451  df-br 4578  df-opab 4638  df-mpt 4639  df-tr 4675  df-eprel 4939  df-id 4943  df-po 4949  df-so 4950  df-fr 4987  df-we 4989  df-xp 5034  df-rel 5035  df-cnv 5036  df-co 5037  df-dm 5038  df-rn 5039  df-res 5040  df-ima 5041  df-pred 5583  df-ord 5629  df-on 5630  df-lim 5631  df-suc 5632  df-iota 5754  df-fun 5792  df-fn 5793  df-f 5794  df-f1 5795  df-fo 5796  df-f1o 5797  df-fv 5798  df-riota 6489  df-ov 6530  df-oprab 6531  df-mpt2 6532  df-om 6936  df-1st 7037  df-2nd 7038  df-wrecs 7272  df-recs 7333  df-rdg 7371  df-1o 7425  df-er 7607  df-map 7724  df-pm 7725  df-en 7820  df-dom 7821  df-sdom 7822  df-fin 7823  df-card 8626  df-pnf 9933  df-mnf 9934  df-xr 9935  df-ltxr 9936  df-le 9937  df-sub 10120  df-neg 10121  df-nn 10871  df-2 10929  df-n0 11143  df-z 11214  df-uz 11523  df-fz 12156  df-fzo 12293  df-hash 12938  df-word 13103  df-wlk 25830
This theorem is referenced by:  usg2wlkonot  26204  usg2wotspth  26205
  Copyright terms: Public domain W3C validator