Metamath Proof Explorer


Theorem eupth2lems

Description: Lemma for eupth2 (induction step): The only vertices of odd degree in a graph with an Eulerian path are the endpoints, and then only if the endpoints are distinct, if the Eulerian path shortened by one edge has this property. Formerly part of proof for eupth2 . (Contributed by Mario Carneiro, 8-Apr-2015) (Revised by AV, 26-Feb-2021)

Ref Expression
Hypotheses eupth2.v V = Vtx G
eupth2.i I = iEdg G
eupth2.g φ G UPGraph
eupth2.f φ Fun I
eupth2.p φ F EulerPaths G P
Assertion eupth2lems φ n 0 n F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n + 1 x = if P 0 = P n + 1 P 0 P n + 1

Proof

Step Hyp Ref Expression
1 eupth2.v V = Vtx G
2 eupth2.i I = iEdg G
3 eupth2.g φ G UPGraph
4 eupth2.f φ Fun I
5 eupth2.p φ F EulerPaths G P
6 nn0re n 0 n
7 6 adantl φ n 0 n
8 7 lep1d φ n 0 n n + 1
9 peano2re n n + 1
10 7 9 syl φ n 0 n + 1
11 eupthiswlk F EulerPaths G P F Walks G P
12 wlkcl F Walks G P F 0
13 5 11 12 3syl φ F 0
14 13 nn0red φ F
15 14 adantr φ n 0 F
16 letr n n + 1 F n n + 1 n + 1 F n F
17 7 10 15 16 syl3anc φ n 0 n n + 1 n + 1 F n F
18 8 17 mpand φ n 0 n + 1 F n F
19 18 imim1d φ n 0 n F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n
20 fveq2 x = y VtxDeg V I F 0 ..^ n + 1 x = VtxDeg V I F 0 ..^ n + 1 y
21 20 breq2d x = y 2 VtxDeg V I F 0 ..^ n + 1 x 2 VtxDeg V I F 0 ..^ n + 1 y
22 21 notbid x = y ¬ 2 VtxDeg V I F 0 ..^ n + 1 x ¬ 2 VtxDeg V I F 0 ..^ n + 1 y
23 22 elrab y x V | ¬ 2 VtxDeg V I F 0 ..^ n + 1 x y V ¬ 2 VtxDeg V I F 0 ..^ n + 1 y
24 3 ad3antrrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V G UPGraph
25 4 ad3antrrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V Fun I
26 5 ad3antrrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V F EulerPaths G P
27 eqid V I F 0 ..^ n = V I F 0 ..^ n
28 eqid V I F 0 ..^ n + 1 = V I F 0 ..^ n + 1
29 simpr φ n 0 n 0
30 29 ad2antrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V n 0
31 simprl φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 F
32 31 adantr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V n + 1 F
33 simpr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V y V
34 simplrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n
35 1 2 24 25 26 27 28 30 32 33 34 eupth2lem3 φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V ¬ 2 VtxDeg V I F 0 ..^ n + 1 y y if P 0 = P n + 1 P 0 P n + 1
36 35 pm5.32da φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V ¬ 2 VtxDeg V I F 0 ..^ n + 1 y y V y if P 0 = P n + 1 P 0 P n + 1
37 0elpw 𝒫 V
38 1 wlkepvtx F Walks G P P 0 V P F V
39 38 simpld F Walks G P P 0 V
40 5 11 39 3syl φ P 0 V
41 40 ad2antrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n P 0 V
42 1 wlkp F Walks G P P : 0 F V
43 5 11 42 3syl φ P : 0 F V
44 43 ad2antrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n P : 0 F V
45 peano2nn0 n 0 n + 1 0
46 45 adantl φ n 0 n + 1 0
47 46 adantr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 0
48 nn0uz 0 = 0
49 47 48 eleqtrdi φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 0
50 13 ad2antrr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n F 0
51 50 nn0zd φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n F
52 elfz5 n + 1 0 F n + 1 0 F n + 1 F
53 49 51 52 syl2anc φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 0 F n + 1 F
54 31 53 mpbird φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 0 F
55 44 54 ffvelrnd φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n P n + 1 V
56 41 55 prssd φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n P 0 P n + 1 V
57 prex P 0 P n + 1 V
58 57 elpw P 0 P n + 1 𝒫 V P 0 P n + 1 V
59 56 58 sylibr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n P 0 P n + 1 𝒫 V
60 ifcl 𝒫 V P 0 P n + 1 𝒫 V if P 0 = P n + 1 P 0 P n + 1 𝒫 V
61 37 59 60 sylancr φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n if P 0 = P n + 1 P 0 P n + 1 𝒫 V
62 61 elpwid φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n if P 0 = P n + 1 P 0 P n + 1 V
63 62 sseld φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y if P 0 = P n + 1 P 0 P n + 1 y V
64 63 pm4.71rd φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y if P 0 = P n + 1 P 0 P n + 1 y V y if P 0 = P n + 1 P 0 P n + 1
65 36 64 bitr4d φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y V ¬ 2 VtxDeg V I F 0 ..^ n + 1 y y if P 0 = P n + 1 P 0 P n + 1
66 23 65 syl5bb φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n y x V | ¬ 2 VtxDeg V I F 0 ..^ n + 1 x y if P 0 = P n + 1 P 0 P n + 1
67 66 eqrdv φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n x V | ¬ 2 VtxDeg V I F 0 ..^ n + 1 x = if P 0 = P n + 1 P 0 P n + 1
68 67 exp32 φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n x V | ¬ 2 VtxDeg V I F 0 ..^ n + 1 x = if P 0 = P n + 1 P 0 P n + 1
69 68 a2d φ n 0 n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n + 1 x = if P 0 = P n + 1 P 0 P n + 1
70 19 69 syld φ n 0 n F x V | ¬ 2 VtxDeg V I F 0 ..^ n x = if P 0 = P n P 0 P n n + 1 F x V | ¬ 2 VtxDeg V I F 0 ..^ n + 1 x = if P 0 = P n + 1 P 0 P n + 1