Users' Mathboxes Mathbox for Brendan Leahy < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  curunc Structured version   Visualization version   GIF version

Theorem curunc 35686
Description: Currying of uncurrying. (Contributed by Brendan Leahy, 2-Jun-2021.)
Assertion
Ref Expression
curunc ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)

Proof of Theorem curunc
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 simpl 482 . . 3 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹:𝐴⟶(𝐶m 𝐵))
21feqmptd 6819 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹 = (𝑥𝐴 ↦ (𝐹𝑥)))
3 uncf 35683 . . . . . . . 8 (𝐹:𝐴⟶(𝐶m 𝐵) → uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶)
43fdmd 6595 . . . . . . 7 (𝐹:𝐴⟶(𝐶m 𝐵) → dom uncurry 𝐹 = (𝐴 × 𝐵))
54dmeqd 5803 . . . . . 6 (𝐹:𝐴⟶(𝐶m 𝐵) → dom dom uncurry 𝐹 = dom (𝐴 × 𝐵))
6 dmxp 5827 . . . . . 6 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
75, 6sylan9eq 2799 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → dom dom uncurry 𝐹 = 𝐴)
87eqcomd 2744 . . . 4 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐴 = dom dom uncurry 𝐹)
9 df-mpt 5154 . . . . . 6 (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))}
10 ffvelrn 6941 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) ∈ (𝐶m 𝐵))
11 elmapi 8595 . . . . . . . 8 ((𝐹𝑥) ∈ (𝐶m 𝐵) → (𝐹𝑥):𝐵𝐶)
1210, 11syl 17 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥):𝐵𝐶)
1312feqmptd 6819 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)))
14 ffun 6587 . . . . . . . . . 10 (uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun uncurry 𝐹)
15 funbrfv2b 6809 . . . . . . . . . 10 (Fun uncurry 𝐹 → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
163, 14, 153syl 18 . . . . . . . . 9 (𝐹:𝐴⟶(𝐶m 𝐵) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
1716adantr 480 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
184eleq2d 2824 . . . . . . . . . 10 (𝐹:𝐴⟶(𝐶m 𝐵) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
19 opelxp 5616 . . . . . . . . . . 11 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2019baib 535 . . . . . . . . . 10 (𝑥𝐴 → (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ 𝑦𝐵))
2118, 20sylan9bb 509 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹𝑦𝐵))
22 df-ov 7258 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = (uncurry 𝐹‘⟨𝑥, 𝑦⟩)
23 uncov 35685 . . . . . . . . . . . . . 14 ((𝑥 ∈ V ∧ 𝑦 ∈ V) → (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦))
2423el2v 3430 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦)
2522, 24eqtr3i 2768 . . . . . . . . . . . 12 (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = ((𝐹𝑥)‘𝑦)
2625eqeq1i 2743 . . . . . . . . . . 11 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧 ↔ ((𝐹𝑥)‘𝑦) = 𝑧)
27 eqcom 2745 . . . . . . . . . . 11 (((𝐹𝑥)‘𝑦) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2826, 27bitri 274 . . . . . . . . . 10 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2928a1i 11 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦)))
3021, 29anbi12d 630 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3117, 30bitrd 278 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3231opabbidv 5136 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))})
339, 13, 323eqtr4a 2805 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3433adantlr 711 . . . 4 (((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
358, 34mpteq12dva 5159 . . 3 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧}))
36 df-cur 8054 . . 3 curry uncurry 𝐹 = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3735, 36eqtr4di 2797 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = curry uncurry 𝐹)
382, 37eqtr2d 2779 1 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 395   = wceq 1539  wcel 2108  wne 2942  Vcvv 3422  c0 4253  cop 4564   class class class wbr 5070  {copab 5132  cmpt 5153   × cxp 5578  dom cdm 5580  Fun wfun 6412  wf 6414  cfv 6418  (class class class)co 7255  curry ccur 8052  uncurry cunc 8053  m cmap 8573
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-ral 3068  df-rex 3069  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-op 4565  df-uni 4837  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-id 5480  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-fv 6426  df-ov 7258  df-oprab 7259  df-mpo 7260  df-1st 7804  df-2nd 7805  df-cur 8054  df-unc 8055  df-map 8575
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator