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 35755
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 5626 . . . . . . . 8 ((𝑥𝐴𝑦𝐵) → ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵))
2 ffvelrn 6959 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
31, 2sylan2 593 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ (𝑥𝐴𝑦𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
43anassrs 468 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) ∧ 𝑦𝐵) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
54fmpttd 6989 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
653ad2antl1 1184 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
7 elmapg 8628 . . . . . . 7 ((𝐶𝑊𝐵 ∈ (𝑉 ∖ {∅})) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
87ancoms 459 . . . . . 6 ((𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
983adant1 1129 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
109adantr 481 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
116, 10mpbird 256 . . 3 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵))
1211fmpttd 6989 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵))
13 eldifsni 4723 . . . 4 (𝐵 ∈ (𝑉 ∖ {∅}) → 𝐵 ≠ ∅)
14 df-cur 8083 . . . . . 6 curry 𝐹 = (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧})
15 fdm 6609 . . . . . . . . . 10 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom 𝐹 = (𝐴 × 𝐵))
1615dmeqd 5814 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom dom 𝐹 = dom (𝐴 × 𝐵))
17 dmxp 5838 . . . . . . . . 9 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
1816, 17sylan9eq 2798 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → dom dom 𝐹 = 𝐴)
1918mpteq1d 5169 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}))
20 ffun 6603 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun 𝐹)
21 funbrfv2b 6827 . . . . . . . . . . . . . 14 (Fun 𝐹 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2220, 21syl 17 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2315eleq2d 2824 . . . . . . . . . . . . . . 15 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
24 opelxp 5625 . . . . . . . . . . . . . . 15 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2523, 24bitrdi 287 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ (𝑥𝐴𝑦𝐵)))
2625anbi1d 630 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → ((⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2722, 26bitrd 278 . . . . . . . . . . . 12 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
28 ibar 529 . . . . . . . . . . . . 13 (𝑥𝐴 → ((𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)))))
29 anass 469 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
30 eqcom 2745 . . . . . . . . . . . . . . 15 (𝑧 = (𝐹‘⟨𝑥, 𝑦⟩) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)
3130anbi2i 623 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3229, 31bitr3i 276 . . . . . . . . . . . . 13 ((𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3328, 32bitr2di 288 . . . . . . . . . . . 12 (𝑥𝐴 → (((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3427, 33sylan9bb 510 . . . . . . . . . . 11 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (⟨𝑥, 𝑦𝐹𝑧 ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3534opabbidv 5140 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))})
36 df-mpt 5158 . . . . . . . . . 10 (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))}
3735, 36eqtr4di 2796 . . . . . . . . 9 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)))
3837mpteq2dva 5174 . . . . . . . 8 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
3938adantr 481 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4019, 39eqtrd 2778 . . . . . 6 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4114, 40eqtrid 2790 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → curry 𝐹 = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4241feq1d 6585 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
4313, 42sylan2 593 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
44433adant3 1131 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
4512, 44mpbird 256 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶m 𝐵))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 396  w3a 1086   = wceq 1539  wcel 2106  wne 2943  cdif 3884  c0 4256  {csn 4561  cop 4567   class class class wbr 5074  {copab 5136  cmpt 5157   × cxp 5587  dom cdm 5589  Fun wfun 6427  wf 6429  cfv 6433  (class class class)co 7275  curry ccur 8081  m cmap 8615
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-sep 5223  ax-nul 5230  ax-pow 5288  ax-pr 5352  ax-un 7588
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-rab 3073  df-v 3434  df-sbc 3717  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460  df-pw 4535  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  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-fv 6441  df-ov 7278  df-oprab 7279  df-mpo 7280  df-cur 8083  df-map 8617
This theorem is referenced by:  unccur  35760  matunitlindflem1  35773  matunitlindflem2  35774
  Copyright terms: Public domain W3C validator