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

Theorem vtxdgfval 26250
Description: The value of the vertex degree function. (Contributed by Mario Carneiro, 12-Mar-2015.) (Revised by Alexander van der Vekens, 20-Dec-2017.) (Revised by AV, 9-Dec-2020.)
Hypotheses
Ref Expression
vtxdgfval.v 𝑉 = (Vtx‘𝐺)
vtxdgfval.i 𝐼 = (iEdg‘𝐺)
vtxdgfval.a 𝐴 = dom 𝐼
Assertion
Ref Expression
vtxdgfval (𝐺𝑊 → (VtxDeg‘𝐺) = (𝑢𝑉 ↦ ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
Distinct variable groups:   𝑥,𝑢   𝑥,𝐴   𝑢,𝐺,𝑥   𝑢,𝑉
Allowed substitution hints:   𝐴(𝑢)   𝐼(𝑥,𝑢)   𝑉(𝑥)   𝑊(𝑥,𝑢)

Proof of Theorem vtxdgfval
Dummy variables 𝑒 𝑔 𝑣 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-vtxdg 26249 . . 3 VtxDeg = (𝑔 ∈ V ↦ (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))))
21a1i 11 . 2 (𝐺𝑊 → VtxDeg = (𝑔 ∈ V ↦ (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}})))))
3 fvex 6158 . . . 4 (Vtx‘𝑔) ∈ V
4 fvex 6158 . . . 4 (iEdg‘𝑔) ∈ V
5 simpl 473 . . . . 5 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → 𝑣 = (Vtx‘𝑔))
6 dmeq 5284 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → dom 𝑒 = dom (iEdg‘𝑔))
7 fveq1 6147 . . . . . . . . . 10 (𝑒 = (iEdg‘𝑔) → (𝑒𝑥) = ((iEdg‘𝑔)‘𝑥))
87eleq2d 2684 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → (𝑢 ∈ (𝑒𝑥) ↔ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)))
96, 8rabeqbidv 3181 . . . . . . . 8 (𝑒 = (iEdg‘𝑔) → {𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)} = {𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)})
109fveq2d 6152 . . . . . . 7 (𝑒 = (iEdg‘𝑔) → (#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) = (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}))
117eqeq1d 2623 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → ((𝑒𝑥) = {𝑢} ↔ ((iEdg‘𝑔)‘𝑥) = {𝑢}))
126, 11rabeqbidv 3181 . . . . . . . 8 (𝑒 = (iEdg‘𝑔) → {𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}} = {𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})
1312fveq2d 6152 . . . . . . 7 (𝑒 = (iEdg‘𝑔) → (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}) = (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))
1410, 13oveq12d 6622 . . . . . 6 (𝑒 = (iEdg‘𝑔) → ((#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}})) = ((#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
1514adantl 482 . . . . 5 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → ((#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}})) = ((#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
165, 15mpteq12dv 4693 . . . 4 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → (𝑢𝑣 ↦ ((#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢 ∈ (Vtx‘𝑔) ↦ ((#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))))
173, 4, 16csbie2 3544 . . 3 (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢 ∈ (Vtx‘𝑔) ↦ ((#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
18 fveq2 6148 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
19 vtxdgfval.v . . . . . 6 𝑉 = (Vtx‘𝐺)
2018, 19syl6eqr 2673 . . . . 5 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
21 fveq2 6148 . . . . . . . . . 10 (𝑔 = 𝐺 → (iEdg‘𝑔) = (iEdg‘𝐺))
2221dmeqd 5286 . . . . . . . . 9 (𝑔 = 𝐺 → dom (iEdg‘𝑔) = dom (iEdg‘𝐺))
23 vtxdgfval.a . . . . . . . . . 10 𝐴 = dom 𝐼
24 vtxdgfval.i . . . . . . . . . . 11 𝐼 = (iEdg‘𝐺)
2524dmeqi 5285 . . . . . . . . . 10 dom 𝐼 = dom (iEdg‘𝐺)
2623, 25eqtri 2643 . . . . . . . . 9 𝐴 = dom (iEdg‘𝐺)
2722, 26syl6eqr 2673 . . . . . . . 8 (𝑔 = 𝐺 → dom (iEdg‘𝑔) = 𝐴)
2821, 24syl6eqr 2673 . . . . . . . . . 10 (𝑔 = 𝐺 → (iEdg‘𝑔) = 𝐼)
2928fveq1d 6150 . . . . . . . . 9 (𝑔 = 𝐺 → ((iEdg‘𝑔)‘𝑥) = (𝐼𝑥))
3029eleq2d 2684 . . . . . . . 8 (𝑔 = 𝐺 → (𝑢 ∈ ((iEdg‘𝑔)‘𝑥) ↔ 𝑢 ∈ (𝐼𝑥)))
3127, 30rabeqbidv 3181 . . . . . . 7 (𝑔 = 𝐺 → {𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)} = {𝑥𝐴𝑢 ∈ (𝐼𝑥)})
3231fveq2d 6152 . . . . . 6 (𝑔 = 𝐺 → (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) = (#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}))
3329eqeq1d 2623 . . . . . . . 8 (𝑔 = 𝐺 → (((iEdg‘𝑔)‘𝑥) = {𝑢} ↔ (𝐼𝑥) = {𝑢}))
3427, 33rabeqbidv 3181 . . . . . . 7 (𝑔 = 𝐺 → {𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}} = {𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}})
3534fveq2d 6152 . . . . . 6 (𝑔 = 𝐺 → (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}) = (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))
3632, 35oveq12d 6622 . . . . 5 (𝑔 = 𝐺 → ((#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})) = ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}})))
3720, 36mpteq12dv 4693 . . . 4 (𝑔 = 𝐺 → (𝑢 ∈ (Vtx‘𝑔) ↦ ((#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
3837adantl 482 . . 3 ((𝐺𝑊𝑔 = 𝐺) → (𝑢 ∈ (Vtx‘𝑔) ↦ ((#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (#‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
3917, 38syl5eq 2667 . 2 ((𝐺𝑊𝑔 = 𝐺) → (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((#‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (#‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
40 elex 3198 . 2 (𝐺𝑊𝐺 ∈ V)
41 fvex 6158 . . . 4 (Vtx‘𝐺) ∈ V
4219, 41eqeltri 2694 . . 3 𝑉 ∈ V
43 mptexg 6438 . . 3 (𝑉 ∈ V → (𝑢𝑉 ↦ ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))) ∈ V)
4442, 43mp1i 13 . 2 (𝐺𝑊 → (𝑢𝑉 ↦ ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))) ∈ V)
452, 39, 40, 44fvmptd 6245 1 (𝐺𝑊 → (VtxDeg‘𝐺) = (𝑢𝑉 ↦ ((#‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (#‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 384   = wceq 1480  wcel 1987  {crab 2911  Vcvv 3186  csb 3514  {csn 4148  cmpt 4673  dom cdm 5074  cfv 5847  (class class class)co 6604   +𝑒 cxad 11888  #chash 13057  Vtxcvtx 25774  iEdgciedg 25775  VtxDegcvtxdg 26248
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4731  ax-sep 4741  ax-nul 4749  ax-pr 4867
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-ral 2912  df-rex 2913  df-reu 2914  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-nul 3892  df-if 4059  df-sn 4149  df-pr 4151  df-op 4155  df-uni 4403  df-iun 4487  df-br 4614  df-opab 4674  df-mpt 4675  df-id 4989  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-ov 6607  df-vtxdg 26249
This theorem is referenced by:  vtxdgval  26251  vtxdgf  26253  vtxdeqd  26259
  Copyright terms: Public domain W3C validator