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

Theorem vtxdgfval 27834
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 27833 . 2 VtxDeg = (𝑔 ∈ V ↦ (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))))
2 fvex 6787 . . . 4 (Vtx‘𝑔) ∈ V
3 fvex 6787 . . . 4 (iEdg‘𝑔) ∈ V
4 simpl 483 . . . . 5 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → 𝑣 = (Vtx‘𝑔))
5 dmeq 5812 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → dom 𝑒 = dom (iEdg‘𝑔))
6 fveq1 6773 . . . . . . . . . 10 (𝑒 = (iEdg‘𝑔) → (𝑒𝑥) = ((iEdg‘𝑔)‘𝑥))
76eleq2d 2824 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → (𝑢 ∈ (𝑒𝑥) ↔ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)))
85, 7rabeqbidv 3420 . . . . . . . 8 (𝑒 = (iEdg‘𝑔) → {𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)} = {𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)})
98fveq2d 6778 . . . . . . 7 (𝑒 = (iEdg‘𝑔) → (♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) = (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}))
106eqeq1d 2740 . . . . . . . . 9 (𝑒 = (iEdg‘𝑔) → ((𝑒𝑥) = {𝑢} ↔ ((iEdg‘𝑔)‘𝑥) = {𝑢}))
115, 10rabeqbidv 3420 . . . . . . . 8 (𝑒 = (iEdg‘𝑔) → {𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}} = {𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})
1211fveq2d 6778 . . . . . . 7 (𝑒 = (iEdg‘𝑔) → (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}) = (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))
139, 12oveq12d 7293 . . . . . 6 (𝑒 = (iEdg‘𝑔) → ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}})) = ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
1413adantl 482 . . . . 5 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}})) = ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
154, 14mpteq12dv 5165 . . . 4 ((𝑣 = (Vtx‘𝑔) ∧ 𝑒 = (iEdg‘𝑔)) → (𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))))
162, 3, 15csbie2 3874 . . 3 (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})))
17 fveq2 6774 . . . . . 6 (𝑔 = 𝐺 → (Vtx‘𝑔) = (Vtx‘𝐺))
18 vtxdgfval.v . . . . . 6 𝑉 = (Vtx‘𝐺)
1917, 18eqtr4di 2796 . . . . 5 (𝑔 = 𝐺 → (Vtx‘𝑔) = 𝑉)
20 fveq2 6774 . . . . . . . . . 10 (𝑔 = 𝐺 → (iEdg‘𝑔) = (iEdg‘𝐺))
2120dmeqd 5814 . . . . . . . . 9 (𝑔 = 𝐺 → dom (iEdg‘𝑔) = dom (iEdg‘𝐺))
22 vtxdgfval.a . . . . . . . . . 10 𝐴 = dom 𝐼
23 vtxdgfval.i . . . . . . . . . . 11 𝐼 = (iEdg‘𝐺)
2423dmeqi 5813 . . . . . . . . . 10 dom 𝐼 = dom (iEdg‘𝐺)
2522, 24eqtri 2766 . . . . . . . . 9 𝐴 = dom (iEdg‘𝐺)
2621, 25eqtr4di 2796 . . . . . . . 8 (𝑔 = 𝐺 → dom (iEdg‘𝑔) = 𝐴)
2720, 23eqtr4di 2796 . . . . . . . . . 10 (𝑔 = 𝐺 → (iEdg‘𝑔) = 𝐼)
2827fveq1d 6776 . . . . . . . . 9 (𝑔 = 𝐺 → ((iEdg‘𝑔)‘𝑥) = (𝐼𝑥))
2928eleq2d 2824 . . . . . . . 8 (𝑔 = 𝐺 → (𝑢 ∈ ((iEdg‘𝑔)‘𝑥) ↔ 𝑢 ∈ (𝐼𝑥)))
3026, 29rabeqbidv 3420 . . . . . . 7 (𝑔 = 𝐺 → {𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)} = {𝑥𝐴𝑢 ∈ (𝐼𝑥)})
3130fveq2d 6778 . . . . . 6 (𝑔 = 𝐺 → (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) = (♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}))
3228eqeq1d 2740 . . . . . . . 8 (𝑔 = 𝐺 → (((iEdg‘𝑔)‘𝑥) = {𝑢} ↔ (𝐼𝑥) = {𝑢}))
3326, 32rabeqbidv 3420 . . . . . . 7 (𝑔 = 𝐺 → {𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}} = {𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}})
3433fveq2d 6778 . . . . . 6 (𝑔 = 𝐺 → (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}) = (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))
3531, 34oveq12d 7293 . . . . 5 (𝑔 = 𝐺 → ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}})) = ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}})))
3619, 35mpteq12dv 5165 . . . 4 (𝑔 = 𝐺 → (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
3736adantl 482 . . 3 ((𝐺𝑊𝑔 = 𝐺) → (𝑢 ∈ (Vtx‘𝑔) ↦ ((♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ 𝑢 ∈ ((iEdg‘𝑔)‘𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom (iEdg‘𝑔) ∣ ((iEdg‘𝑔)‘𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
3816, 37eqtrid 2790 . 2 ((𝐺𝑊𝑔 = 𝐺) → (Vtx‘𝑔) / 𝑣(iEdg‘𝑔) / 𝑒(𝑢𝑣 ↦ ((♯‘{𝑥 ∈ dom 𝑒𝑢 ∈ (𝑒𝑥)}) +𝑒 (♯‘{𝑥 ∈ dom 𝑒 ∣ (𝑒𝑥) = {𝑢}}))) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
39 elex 3450 . 2 (𝐺𝑊𝐺 ∈ V)
4018fvexi 6788 . . 3 𝑉 ∈ V
41 mptexg 7097 . . 3 (𝑉 ∈ V → (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))) ∈ V)
4240, 41mp1i 13 . 2 (𝐺𝑊 → (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))) ∈ V)
431, 38, 39, 42fvmptd2 6883 1 (𝐺𝑊 → (VtxDeg‘𝐺) = (𝑢𝑉 ↦ ((♯‘{𝑥𝐴𝑢 ∈ (𝐼𝑥)}) +𝑒 (♯‘{𝑥𝐴 ∣ (𝐼𝑥) = {𝑢}}))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 396   = wceq 1539  wcel 2106  {crab 3068  Vcvv 3432  csb 3832  {csn 4561  cmpt 5157  dom cdm 5589  cfv 6433  (class class class)co 7275   +𝑒 cxad 12846  chash 14044  Vtxcvtx 27366  iEdgciedg 27367  VtxDegcvtxdg 27832
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-rep 5209  ax-sep 5223  ax-nul 5230  ax-pr 5352
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-ral 3069  df-rex 3070  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-iun 4926  df-br 5075  df-opab 5137  df-mpt 5158  df-id 5489  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-res 5601  df-ima 5602  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441  df-ov 7278  df-vtxdg 27833
This theorem is referenced by:  vtxdgval  27835  vtxdgop  27837  vtxdgf  27838  vtxdeqd  27844
  Copyright terms: Public domain W3C validator