Metamath Proof Explorer


Theorem vtxdun

Description: The degree of a vertex in the union of two graphs on the same vertex set is the sum of the degrees of the vertex in each graph. (Contributed by Mario Carneiro, 12-Mar-2015) (Revised by Alexander van der Vekens, 21-Dec-2017) (Revised by AV, 19-Feb-2021)

Ref Expression
Hypotheses vtxdun.i I = iEdg G
vtxdun.j J = iEdg H
vtxdun.vg V = Vtx G
vtxdun.vh φ Vtx H = V
vtxdun.vu φ Vtx U = V
vtxdun.d φ dom I dom J =
vtxdun.fi φ Fun I
vtxdun.fj φ Fun J
vtxdun.n φ N V
vtxdun.u φ iEdg U = I J
Assertion vtxdun φ VtxDeg U N = VtxDeg G N + 𝑒 VtxDeg H N

Proof

Step Hyp Ref Expression
1 vtxdun.i I = iEdg G
2 vtxdun.j J = iEdg H
3 vtxdun.vg V = Vtx G
4 vtxdun.vh φ Vtx H = V
5 vtxdun.vu φ Vtx U = V
6 vtxdun.d φ dom I dom J =
7 vtxdun.fi φ Fun I
8 vtxdun.fj φ Fun J
9 vtxdun.n φ N V
10 vtxdun.u φ iEdg U = I J
11 df-rab x dom iEdg U | N iEdg U x = x | x dom iEdg U N iEdg U x
12 10 dmeqd φ dom iEdg U = dom I J
13 dmun dom I J = dom I dom J
14 12 13 eqtrdi φ dom iEdg U = dom I dom J
15 14 eleq2d φ x dom iEdg U x dom I dom J
16 elun x dom I dom J x dom I x dom J
17 15 16 bitrdi φ x dom iEdg U x dom I x dom J
18 17 anbi1d φ x dom iEdg U N iEdg U x x dom I x dom J N iEdg U x
19 andir x dom I x dom J N iEdg U x x dom I N iEdg U x x dom J N iEdg U x
20 18 19 bitrdi φ x dom iEdg U N iEdg U x x dom I N iEdg U x x dom J N iEdg U x
21 20 abbidv φ x | x dom iEdg U N iEdg U x = x | x dom I N iEdg U x x dom J N iEdg U x
22 11 21 eqtrid φ x dom iEdg U | N iEdg U x = x | x dom I N iEdg U x x dom J N iEdg U x
23 unab x | x dom I N iEdg U x x | x dom J N iEdg U x = x | x dom I N iEdg U x x dom J N iEdg U x
24 23 eqcomi x | x dom I N iEdg U x x dom J N iEdg U x = x | x dom I N iEdg U x x | x dom J N iEdg U x
25 24 a1i φ x | x dom I N iEdg U x x dom J N iEdg U x = x | x dom I N iEdg U x x | x dom J N iEdg U x
26 df-rab x dom I | N iEdg U x = x | x dom I N iEdg U x
27 10 fveq1d φ iEdg U x = I J x
28 27 adantr φ x dom I iEdg U x = I J x
29 7 funfnd φ I Fn dom I
30 29 adantr φ x dom I I Fn dom I
31 8 funfnd φ J Fn dom J
32 31 adantr φ x dom I J Fn dom J
33 6 anim1i φ x dom I dom I dom J = x dom I
34 fvun1 I Fn dom I J Fn dom J dom I dom J = x dom I I J x = I x
35 30 32 33 34 syl3anc φ x dom I I J x = I x
36 28 35 eqtrd φ x dom I iEdg U x = I x
37 36 eleq2d φ x dom I N iEdg U x N I x
38 37 rabbidva φ x dom I | N iEdg U x = x dom I | N I x
39 26 38 eqtr3id φ x | x dom I N iEdg U x = x dom I | N I x
40 df-rab x dom J | N iEdg U x = x | x dom J N iEdg U x
41 27 adantr φ x dom J iEdg U x = I J x
42 29 adantr φ x dom J I Fn dom I
43 31 adantr φ x dom J J Fn dom J
44 6 anim1i φ x dom J dom I dom J = x dom J
45 fvun2 I Fn dom I J Fn dom J dom I dom J = x dom J I J x = J x
46 42 43 44 45 syl3anc φ x dom J I J x = J x
47 41 46 eqtrd φ x dom J iEdg U x = J x
48 47 eleq2d φ x dom J N iEdg U x N J x
49 48 rabbidva φ x dom J | N iEdg U x = x dom J | N J x
50 40 49 eqtr3id φ x | x dom J N iEdg U x = x dom J | N J x
51 39 50 uneq12d φ x | x dom I N iEdg U x x | x dom J N iEdg U x = x dom I | N I x x dom J | N J x
52 22 25 51 3eqtrd φ x dom iEdg U | N iEdg U x = x dom I | N I x x dom J | N J x
53 52 fveq2d φ x dom iEdg U | N iEdg U x = x dom I | N I x x dom J | N J x
54 1 fvexi I V
55 54 dmex dom I V
56 55 rabex x dom I | N I x V
57 56 a1i φ x dom I | N I x V
58 2 fvexi J V
59 58 dmex dom J V
60 59 rabex x dom J | N J x V
61 60 a1i φ x dom J | N J x V
62 ssrab2 x dom I | N I x dom I
63 ssrab2 x dom J | N J x dom J
64 ss2in x dom I | N I x dom I x dom J | N J x dom J x dom I | N I x x dom J | N J x dom I dom J
65 62 63 64 mp2an x dom I | N I x x dom J | N J x dom I dom J
66 65 6 sseqtrid φ x dom I | N I x x dom J | N J x
67 ss0 x dom I | N I x x dom J | N J x x dom I | N I x x dom J | N J x =
68 66 67 syl φ x dom I | N I x x dom J | N J x =
69 hashunx x dom I | N I x V x dom J | N J x V x dom I | N I x x dom J | N J x = x dom I | N I x x dom J | N J x = x dom I | N I x + 𝑒 x dom J | N J x
70 57 61 68 69 syl3anc φ x dom I | N I x x dom J | N J x = x dom I | N I x + 𝑒 x dom J | N J x
71 53 70 eqtrd φ x dom iEdg U | N iEdg U x = x dom I | N I x + 𝑒 x dom J | N J x
72 df-rab x dom iEdg U | iEdg U x = N = x | x dom iEdg U iEdg U x = N
73 17 anbi1d φ x dom iEdg U iEdg U x = N x dom I x dom J iEdg U x = N
74 andir x dom I x dom J iEdg U x = N x dom I iEdg U x = N x dom J iEdg U x = N
75 73 74 bitrdi φ x dom iEdg U iEdg U x = N x dom I iEdg U x = N x dom J iEdg U x = N
76 75 abbidv φ x | x dom iEdg U iEdg U x = N = x | x dom I iEdg U x = N x dom J iEdg U x = N
77 72 76 eqtrid φ x dom iEdg U | iEdg U x = N = x | x dom I iEdg U x = N x dom J iEdg U x = N
78 unab x | x dom I iEdg U x = N x | x dom J iEdg U x = N = x | x dom I iEdg U x = N x dom J iEdg U x = N
79 78 eqcomi x | x dom I iEdg U x = N x dom J iEdg U x = N = x | x dom I iEdg U x = N x | x dom J iEdg U x = N
80 79 a1i φ x | x dom I iEdg U x = N x dom J iEdg U x = N = x | x dom I iEdg U x = N x | x dom J iEdg U x = N
81 df-rab x dom I | iEdg U x = N = x | x dom I iEdg U x = N
82 36 eqeq1d φ x dom I iEdg U x = N I x = N
83 82 rabbidva φ x dom I | iEdg U x = N = x dom I | I x = N
84 81 83 eqtr3id φ x | x dom I iEdg U x = N = x dom I | I x = N
85 df-rab x dom J | iEdg U x = N = x | x dom J iEdg U x = N
86 47 eqeq1d φ x dom J iEdg U x = N J x = N
87 86 rabbidva φ x dom J | iEdg U x = N = x dom J | J x = N
88 85 87 eqtr3id φ x | x dom J iEdg U x = N = x dom J | J x = N
89 84 88 uneq12d φ x | x dom I iEdg U x = N x | x dom J iEdg U x = N = x dom I | I x = N x dom J | J x = N
90 77 80 89 3eqtrd φ x dom iEdg U | iEdg U x = N = x dom I | I x = N x dom J | J x = N
91 90 fveq2d φ x dom iEdg U | iEdg U x = N = x dom I | I x = N x dom J | J x = N
92 55 rabex x dom I | I x = N V
93 92 a1i φ x dom I | I x = N V
94 59 rabex x dom J | J x = N V
95 94 a1i φ x dom J | J x = N V
96 ssrab2 x dom I | I x = N dom I
97 ssrab2 x dom J | J x = N dom J
98 ss2in x dom I | I x = N dom I x dom J | J x = N dom J x dom I | I x = N x dom J | J x = N dom I dom J
99 96 97 98 mp2an x dom I | I x = N x dom J | J x = N dom I dom J
100 99 6 sseqtrid φ x dom I | I x = N x dom J | J x = N
101 ss0 x dom I | I x = N x dom J | J x = N x dom I | I x = N x dom J | J x = N =
102 100 101 syl φ x dom I | I x = N x dom J | J x = N =
103 hashunx x dom I | I x = N V x dom J | J x = N V x dom I | I x = N x dom J | J x = N = x dom I | I x = N x dom J | J x = N = x dom I | I x = N + 𝑒 x dom J | J x = N
104 93 95 102 103 syl3anc φ x dom I | I x = N x dom J | J x = N = x dom I | I x = N + 𝑒 x dom J | J x = N
105 91 104 eqtrd φ x dom iEdg U | iEdg U x = N = x dom I | I x = N + 𝑒 x dom J | J x = N
106 71 105 oveq12d φ x dom iEdg U | N iEdg U x + 𝑒 x dom iEdg U | iEdg U x = N = x dom I | N I x + 𝑒 x dom J | N J x + 𝑒 x dom I | I x = N + 𝑒 x dom J | J x = N
107 hashxnn0 x dom I | N I x V x dom I | N I x 0 *
108 57 107 syl φ x dom I | N I x 0 *
109 hashxnn0 x dom J | N J x V x dom J | N J x 0 *
110 61 109 syl φ x dom J | N J x 0 *
111 hashxnn0 x dom I | I x = N V x dom I | I x = N 0 *
112 93 111 syl φ x dom I | I x = N 0 *
113 hashxnn0 x dom J | J x = N V x dom J | J x = N 0 *
114 95 113 syl φ x dom J | J x = N 0 *
115 108 110 112 114 xnn0add4d φ x dom I | N I x + 𝑒 x dom J | N J x + 𝑒 x dom I | I x = N + 𝑒 x dom J | J x = N = x dom I | N I x + 𝑒 x dom I | I x = N + 𝑒 x dom J | N J x + 𝑒 x dom J | J x = N
116 106 115 eqtrd φ x dom iEdg U | N iEdg U x + 𝑒 x dom iEdg U | iEdg U x = N = x dom I | N I x + 𝑒 x dom I | I x = N + 𝑒 x dom J | N J x + 𝑒 x dom J | J x = N
117 9 5 eleqtrrd φ N Vtx U
118 eqid Vtx U = Vtx U
119 eqid iEdg U = iEdg U
120 eqid dom iEdg U = dom iEdg U
121 118 119 120 vtxdgval N Vtx U VtxDeg U N = x dom iEdg U | N iEdg U x + 𝑒 x dom iEdg U | iEdg U x = N
122 117 121 syl φ VtxDeg U N = x dom iEdg U | N iEdg U x + 𝑒 x dom iEdg U | iEdg U x = N
123 eqid dom I = dom I
124 3 1 123 vtxdgval N V VtxDeg G N = x dom I | N I x + 𝑒 x dom I | I x = N
125 9 124 syl φ VtxDeg G N = x dom I | N I x + 𝑒 x dom I | I x = N
126 9 4 eleqtrrd φ N Vtx H
127 eqid Vtx H = Vtx H
128 eqid dom J = dom J
129 127 2 128 vtxdgval N Vtx H VtxDeg H N = x dom J | N J x + 𝑒 x dom J | J x = N
130 126 129 syl φ VtxDeg H N = x dom J | N J x + 𝑒 x dom J | J x = N
131 125 130 oveq12d φ VtxDeg G N + 𝑒 VtxDeg H N = x dom I | N I x + 𝑒 x dom I | I x = N + 𝑒 x dom J | N J x + 𝑒 x dom J | J x = N
132 116 122 131 3eqtr4d φ VtxDeg U N = VtxDeg G N + 𝑒 VtxDeg H N