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 33044
Description: Currying of uncurrying. (Contributed by Brendan Leahy, 2-Jun-2021.)
Assertion
Ref Expression
curunc ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)

Proof of Theorem curunc
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 simpl 473 . . 3 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹:𝐴⟶(𝐶𝑚 𝐵))
21feqmptd 6208 . 2 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹 = (𝑥𝐴 ↦ (𝐹𝑥)))
3 uncf 33041 . . . . . . . 8 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶)
4 fdm 6010 . . . . . . . 8 (uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶 → dom uncurry 𝐹 = (𝐴 × 𝐵))
53, 4syl 17 . . . . . . 7 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → dom uncurry 𝐹 = (𝐴 × 𝐵))
65dmeqd 5288 . . . . . 6 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → dom dom uncurry 𝐹 = dom (𝐴 × 𝐵))
7 dmxp 5306 . . . . . 6 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
86, 7sylan9eq 2675 . . . . 5 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → dom dom uncurry 𝐹 = 𝐴)
98eqcomd 2627 . . . 4 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → 𝐴 = dom dom uncurry 𝐹)
10 df-mpt 4677 . . . . . 6 (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))}
11 ffvelrn 6315 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) ∈ (𝐶𝑚 𝐵))
12 elmapi 7826 . . . . . . . 8 ((𝐹𝑥) ∈ (𝐶𝑚 𝐵) → (𝐹𝑥):𝐵𝐶)
1311, 12syl 17 . . . . . . 7 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥):𝐵𝐶)
1413feqmptd 6208 . . . . . 6 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)))
15 ffun 6007 . . . . . . . . . 10 (uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun uncurry 𝐹)
16 funbrfv2b 6199 . . . . . . . . . 10 (Fun uncurry 𝐹 → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
173, 15, 163syl 18 . . . . . . . . 9 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
1817adantr 481 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
195eleq2d 2684 . . . . . . . . . 10 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
20 opelxp 5108 . . . . . . . . . . 11 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2120baib 943 . . . . . . . . . 10 (𝑥𝐴 → (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ 𝑦𝐵))
2219, 21sylan9bb 735 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹𝑦𝐵))
23 df-ov 6610 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = (uncurry 𝐹‘⟨𝑥, 𝑦⟩)
24 vex 3189 . . . . . . . . . . . . . 14 𝑥 ∈ V
25 vex 3189 . . . . . . . . . . . . . 14 𝑦 ∈ V
26 uncov 33043 . . . . . . . . . . . . . 14 ((𝑥 ∈ V ∧ 𝑦 ∈ V) → (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦))
2724, 25, 26mp2an 707 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦)
2823, 27eqtr3i 2645 . . . . . . . . . . . 12 (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = ((𝐹𝑥)‘𝑦)
2928eqeq1i 2626 . . . . . . . . . . 11 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧 ↔ ((𝐹𝑥)‘𝑦) = 𝑧)
30 eqcom 2628 . . . . . . . . . . 11 (((𝐹𝑥)‘𝑦) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
3129, 30bitri 264 . . . . . . . . . 10 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
3231a1i 11 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦)))
3322, 32anbi12d 746 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → ((⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3418, 33bitrd 268 . . . . . . 7 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3534opabbidv 4680 . . . . . 6 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))})
3610, 14, 353eqtr4a 2681 . . . . 5 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3736adantlr 750 . . . 4 (((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
389, 37mpteq12dva 4694 . . 3 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧}))
39 df-cur 7341 . . 3 curry uncurry 𝐹 = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
4038, 39syl6eqr 2673 . 2 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = curry uncurry 𝐹)
412, 40eqtr2d 2656 1 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384   = wceq 1480  wcel 1987  wne 2790  Vcvv 3186  c0 3893  cop 4156   class class class wbr 4615  {copab 4674  cmpt 4675   × cxp 5074  dom cdm 5076  Fun wfun 5843  wf 5845  cfv 5849  (class class class)co 6607  curry ccur 7339  uncurry cunc 7340  𝑚 cmap 7805
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-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-sep 4743  ax-nul 4751  ax-pow 4805  ax-pr 4869  ax-un 6905
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-rab 2916  df-v 3188  df-sbc 3419  df-csb 3516  df-dif 3559  df-un 3561  df-in 3563  df-ss 3570  df-nul 3894  df-if 4061  df-pw 4134  df-sn 4151  df-pr 4153  df-op 4157  df-uni 4405  df-iun 4489  df-br 4616  df-opab 4676  df-mpt 4677  df-id 4991  df-xp 5082  df-rel 5083  df-cnv 5084  df-co 5085  df-dm 5086  df-rn 5087  df-res 5088  df-ima 5089  df-iota 5812  df-fun 5851  df-fn 5852  df-f 5853  df-fv 5857  df-ov 6610  df-oprab 6611  df-mpt2 6612  df-1st 7116  df-2nd 7117  df-cur 7341  df-unc 7342  df-map 7807
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator