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

Theorem vtxdgfval 27815
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 27814 . 2 VtxDeg = (𝑔 ∈ V ↦ (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))))
2 fvex 6781 . . . 4 (Vtx‘𝑔) ∈ V
3 fvex 6781 . . . 4 (iEdg‘𝑔) ∈ V
4 simpl 482 . . . . 5 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → 𝑣 = (Vtx‘𝑔))
5 dmeq 5809 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → dom 𝑒 = dom (iEdg‘𝑔))
6 fveq1 6767 . . . . . . . . . 10 (𝑒 = (iEdg‘𝑔) → (𝑒𝑥) = ((iEdg‘𝑔)‘𝑥))
76eleq2d 2825 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → (𝑢 ∈ (𝑒𝑥) ↔ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)))
85, 7rabeqbidv 3418 . . . . . . . 8 (𝑒 = (iEdg‘𝑔) → {𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)} = {𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)})
98fveq2d 6772 . . . . . . 7 (𝑒 = (iEdg‘𝑔) → (♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) = (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}))
106eqeq1d 2741 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → ((𝑒𝑥) = {𝑢} ↔ ((iEdg‘𝑔)‘𝑥) = {𝑢}))
115, 10rabeqbidv 3418 . . . . . . . 8 (𝑒 = (iEdg‘𝑔) → {𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}} = {𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})
1211fveq2d 6772 . . . . . . 7 (𝑒 = (iEdg‘𝑔) → (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}) = (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))
139, 12oveq12d 7286 . . . . . 6 (𝑒 = (iEdg‘𝑔) → ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}})) = ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
1413adantl 481 . . . . 5 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}})) = ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
154, 14mpteq12dv 5169 . . . 4 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → (𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))))
162, 3, 15csbie2 3878 . . 3 (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
17 fveq2 6768 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
18 vtxdgfval.v . . . . . 6 𝑉 = (Vtx‘𝐺)
1917, 18eqtr4di 2797 . . . . 5 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
20 fveq2 6768 . . . . . . . . . 10 (𝑔 = 𝐺 → (iEdg‘𝑔) = (iEdg‘𝐺))
2120dmeqd 5811 . . . . . . . . 9 (𝑔 = 𝐺 → dom (iEdg‘𝑔) = dom (iEdg‘𝐺))
22 vtxdgfval.a . . . . . . . . . 10 𝐴 = dom 𝐼
23 vtxdgfval.i . . . . . . . . . . 11 𝐼 = (iEdg‘𝐺)
2423dmeqi 5810 . . . . . . . . . 10 dom 𝐼 = dom (iEdg‘𝐺)
2522, 24eqtri 2767 . . . . . . . . 9 𝐴 = dom (iEdg‘𝐺)
2621, 25eqtr4di 2797 . . . . . . . 8 (𝑔 = 𝐺 → dom (iEdg‘𝑔) = 𝐴)
2720, 23eqtr4di 2797 . . . . . . . . . 10 (𝑔 = 𝐺 → (iEdg‘𝑔) = 𝐼)
2827fveq1d 6770 . . . . . . . . 9 (𝑔 = 𝐺 → ((iEdg‘𝑔)‘𝑥) = (𝐼𝑥))
2928eleq2d 2825 . . . . . . . 8 (𝑔 = 𝐺 → (𝑢 ∈ ((iEdg‘𝑔)‘𝑥) ↔ 𝑢 ∈ (𝐼𝑥)))
3026, 29rabeqbidv 3418 . . . . . . 7 (𝑔 = 𝐺 → {𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)} = {𝑥𝐴𝑢 ∈ (𝐼𝑥)})
3130fveq2d 6772 . . . . . 6 (𝑔 = 𝐺 → (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) = (♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}))
3228eqeq1d 2741 . . . . . . . 8 (𝑔 = 𝐺 → (((iEdg‘𝑔)‘𝑥) = {𝑢} ↔ (𝐼𝑥) = {𝑢}))
3326, 32rabeqbidv 3418 . . . . . . 7 (𝑔 = 𝐺 → {𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}} = {𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}})
3433fveq2d 6772 . . . . . 6 (𝑔 = 𝐺 → (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}) = (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))
3531, 34oveq12d 7286 . . . . 5 (𝑔 = 𝐺 → ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})) = ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}})))
3619, 35mpteq12dv 5169 . . . 4 (𝑔 = 𝐺 → (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
3736adantl 481 . . 3 ((𝐺𝑊𝑔 = 𝐺) → (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
3816, 37eqtrid 2791 . 2 ((𝐺𝑊𝑔 = 𝐺) → (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
39 elex 3448 . 2 (𝐺𝑊𝐺 ∈ V)
4018fvexi 6782 . . 3 𝑉 ∈ V
41 mptexg 7091 . . 3 (𝑉 ∈ V → (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))) ∈ V)
4240, 41mp1i 13 . 2 (𝐺𝑊 → (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))) ∈ V)
431, 38, 39, 42fvmptd2 6877 1 (𝐺𝑊 → (VtxDeg‘𝐺) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 395   = wceq 1541  wcel 2109  {crab 3069  Vcvv 3430  csb 3836  {csn 4566  cmpt 5161  dom cdm 5588  cfv 6430  (class class class)co 7268   +𝑒 cxad 12828  chash 14025  Vtxcvtx 27347  iEdgciedg 27348  VtxDegcvtxdg 27813
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1801  ax-4 1815  ax-5 1916  ax-6 1974  ax-7 2014  ax-8 2111  ax-9 2119  ax-10 2140  ax-11 2157  ax-12 2174  ax-ext 2710  ax-rep 5213  ax-sep 5226  ax-nul 5233  ax-pr 5355
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3an 1087  df-tru 1544  df-fal 1554  df-ex 1786  df-nf 1790  df-sb 2071  df-mo 2541  df-eu 2570  df-clab 2717  df-cleq 2731  df-clel 2817  df-nfc 2890  df-ne 2945  df-ral 3070  df-rex 3071  df-reu 3072  df-rab 3074  df-v 3432  df-sbc 3720  df-csb 3837  df-dif 3894  df-un 3896  df-in 3898  df-ss 3908  df-nul 4262  df-if 4465  df-sn 4567  df-pr 4569  df-op 4573  df-uni 4845  df-iun 4931  df-br 5079  df-opab 5141  df-mpt 5162  df-id 5488  df-xp 5594  df-rel 5595  df-cnv 5596  df-co 5597  df-dm 5598  df-rn 5599  df-res 5600  df-ima 5601  df-iota 6388  df-fun 6432  df-fn 6433  df-f 6434  df-f1 6435  df-fo 6436  df-f1o 6437  df-fv 6438  df-ov 7271  df-vtxdg 27814
This theorem is referenced by:  vtxdgval  27816  vtxdgop  27818  vtxdgf  27819  vtxdeqd  27825
  Copyright terms: Public domain W3C validator