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

Theorem curf 35682
Description: Functional property of currying. (Contributed by Brendan Leahy, 2-Jun-2021.)
Assertion
Ref Expression
curf ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶m 𝐵))

Proof of Theorem curf
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 opelxpi 5617 . . . . . . . 8 ((𝑥𝐴𝑦𝐵) → ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵))
2 ffvelrn 6941 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
31, 2sylan2 592 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ (𝑥𝐴𝑦𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
43anassrs 467 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) ∧ 𝑦𝐵) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
54fmpttd 6971 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
653ad2antl1 1183 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
7 elmapg 8586 . . . . . . 7 ((𝐶𝑊𝐵 ∈ (𝑉 ∖ {∅})) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
87ancoms 458 . . . . . 6 ((𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
983adant1 1128 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
109adantr 480 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
116, 10mpbird 256 . . 3 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵))
1211fmpttd 6971 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵))
13 eldifsni 4720 . . . 4 (𝐵 ∈ (𝑉 ∖ {∅}) → 𝐵 ≠ ∅)
14 df-cur 8054 . . . . . 6 curry 𝐹 = (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧})
15 fdm 6593 . . . . . . . . . 10 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom 𝐹 = (𝐴 × 𝐵))
1615dmeqd 5803 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom dom 𝐹 = dom (𝐴 × 𝐵))
17 dmxp 5827 . . . . . . . . 9 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
1816, 17sylan9eq 2799 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → dom dom 𝐹 = 𝐴)
1918mpteq1d 5165 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}))
20 ffun 6587 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun 𝐹)
21 funbrfv2b 6809 . . . . . . . . . . . . . 14 (Fun 𝐹 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2220, 21syl 17 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2315eleq2d 2824 . . . . . . . . . . . . . . 15 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
24 opelxp 5616 . . . . . . . . . . . . . . 15 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2523, 24bitrdi 286 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ (𝑥𝐴𝑦𝐵)))
2625anbi1d 629 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → ((⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2722, 26bitrd 278 . . . . . . . . . . . 12 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
28 ibar 528 . . . . . . . . . . . . 13 (𝑥𝐴 → ((𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)))))
29 anass 468 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
30 eqcom 2745 . . . . . . . . . . . . . . 15 (𝑧 = (𝐹‘⟨𝑥, 𝑦⟩) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)
3130anbi2i 622 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3229, 31bitr3i 276 . . . . . . . . . . . . 13 ((𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3328, 32bitr2di 287 . . . . . . . . . . . 12 (𝑥𝐴 → (((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3427, 33sylan9bb 509 . . . . . . . . . . 11 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (⟨𝑥, 𝑦𝐹𝑧 ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3534opabbidv 5136 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))})
36 df-mpt 5154 . . . . . . . . . 10 (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))}
3735, 36eqtr4di 2797 . . . . . . . . 9 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)))
3837mpteq2dva 5170 . . . . . . . 8 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
3938adantr 480 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4019, 39eqtrd 2778 . . . . . 6 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4114, 40syl5eq 2791 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → curry 𝐹 = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4241feq1d 6569 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
4313, 42sylan2 592 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
44433adant3 1130 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
4512, 44mpbird 256 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶m 𝐵))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 395  w3a 1085   = wceq 1539  wcel 2108  wne 2942  cdif 3880  c0 4253  {csn 4558  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  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-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-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-cur 8054  df-map 8575
This theorem is referenced by:  unccur  35687  matunitlindflem1  35700  matunitlindflem2  35701
  Copyright terms: Public domain W3C validator