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 35382
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 486 . . 3 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹:𝐴⟶(𝐶m 𝐵))
21feqmptd 6737 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹 = (𝑥𝐴 ↦ (𝐹𝑥)))
3 uncf 35379 . . . . . . . 8 (𝐹:𝐴⟶(𝐶m 𝐵) → uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶)
43fdmd 6515 . . . . . . 7 (𝐹:𝐴⟶(𝐶m 𝐵) → dom uncurry 𝐹 = (𝐴 × 𝐵))
54dmeqd 5748 . . . . . 6 (𝐹:𝐴⟶(𝐶m 𝐵) → dom dom uncurry 𝐹 = dom (𝐴 × 𝐵))
6 dmxp 5772 . . . . . 6 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
75, 6sylan9eq 2793 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → dom dom uncurry 𝐹 = 𝐴)
87eqcomd 2744 . . . 4 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐴 = dom dom uncurry 𝐹)
9 df-mpt 5111 . . . . . 6 (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))}
10 ffvelrn 6859 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) ∈ (𝐶m 𝐵))
11 elmapi 8459 . . . . . . . 8 ((𝐹𝑥) ∈ (𝐶m 𝐵) → (𝐹𝑥):𝐵𝐶)
1210, 11syl 17 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥):𝐵𝐶)
1312feqmptd 6737 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)))
14 ffun 6507 . . . . . . . . . 10 (uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun uncurry 𝐹)
15 funbrfv2b 6727 . . . . . . . . . 10 (Fun uncurry 𝐹 → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
163, 14, 153syl 18 . . . . . . . . 9 (𝐹:𝐴⟶(𝐶m 𝐵) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
1716adantr 484 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
184eleq2d 2818 . . . . . . . . . 10 (𝐹:𝐴⟶(𝐶m 𝐵) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
19 opelxp 5561 . . . . . . . . . . 11 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2019baib 539 . . . . . . . . . 10 (𝑥𝐴 → (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ 𝑦𝐵))
2118, 20sylan9bb 513 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹𝑦𝐵))
22 df-ov 7173 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = (uncurry 𝐹‘⟨𝑥, 𝑦⟩)
23 uncov 35381 . . . . . . . . . . . . . 14 ((𝑥 ∈ V ∧ 𝑦 ∈ V) → (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦))
2423el2v 3406 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦)
2522, 24eqtr3i 2763 . . . . . . . . . . . 12 (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = ((𝐹𝑥)‘𝑦)
2625eqeq1i 2743 . . . . . . . . . . 11 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧 ↔ ((𝐹𝑥)‘𝑦) = 𝑧)
27 eqcom 2745 . . . . . . . . . . 11 (((𝐹𝑥)‘𝑦) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2826, 27bitri 278 . . . . . . . . . 10 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2928a1i 11 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦)))
3021, 29anbi12d 634 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3117, 30bitrd 282 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3231opabbidv 5096 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))})
339, 13, 323eqtr4a 2799 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3433adantlr 715 . . . 4 (((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
358, 34mpteq12dva 5114 . . 3 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧}))
36 df-cur 7962 . . 3 curry uncurry 𝐹 = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3735, 36eqtr4di 2791 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = curry uncurry 𝐹)
382, 37eqtr2d 2774 1 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399   = wceq 1542  wcel 2114  wne 2934  Vcvv 3398  c0 4211  cop 4522   class class class wbr 5030  {copab 5092  cmpt 5110   × cxp 5523  dom cdm 5525  Fun wfun 6333  wf 6335  cfv 6339  (class class class)co 7170  curry ccur 7960  uncurry cunc 7961  m cmap 8437
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2020  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2162  ax-12 2179  ax-ext 2710  ax-sep 5167  ax-nul 5174  ax-pow 5232  ax-pr 5296  ax-un 7479
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2075  df-mo 2540  df-eu 2570  df-clab 2717  df-cleq 2730  df-clel 2811  df-nfc 2881  df-ne 2935  df-ral 3058  df-rex 3059  df-rab 3062  df-v 3400  df-sbc 3681  df-csb 3791  df-dif 3846  df-un 3848  df-in 3850  df-ss 3860  df-nul 4212  df-if 4415  df-pw 4490  df-sn 4517  df-pr 4519  df-op 4523  df-uni 4797  df-iun 4883  df-br 5031  df-opab 5093  df-mpt 5111  df-id 5429  df-xp 5531  df-rel 5532  df-cnv 5533  df-co 5534  df-dm 5535  df-rn 5536  df-res 5537  df-ima 5538  df-iota 6297  df-fun 6341  df-fn 6342  df-f 6343  df-fv 6347  df-ov 7173  df-oprab 7174  df-mpo 7175  df-1st 7714  df-2nd 7715  df-cur 7962  df-unc 7963  df-map 8439
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator