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 33019
Description: Functional property of currying. (Contributed by Brendan Leahy, 2-Jun-2021.)
Assertion
Ref Expression
curf ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶𝑚 𝐵))

Proof of Theorem curf
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 opelxpi 5108 . . . . . . . 8 ((𝑥𝐴𝑦𝐵) → ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵))
2 ffvelrn 6313 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
31, 2sylan2 491 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ (𝑥𝐴𝑦𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
43anassrs 679 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) ∧ 𝑦𝐵) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
5 eqid 2621 . . . . . 6 (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) = (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))
64, 5fmptd 6340 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
763ad2antl1 1221 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
8 elmapg 7815 . . . . . . 7 ((𝐶𝑊𝐵 ∈ (𝑉 ∖ {∅})) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
98ancoms 469 . . . . . 6 ((𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
1093adant1 1077 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
1110adantr 481 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
127, 11mpbird 247 . . 3 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵))
13 eqid 2621 . . 3 (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)))
1412, 13fmptd 6340 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵))
15 eldifsni 4289 . . . 4 (𝐵 ∈ (𝑉 ∖ {∅}) → 𝐵 ≠ ∅)
16 df-cur 7338 . . . . . 6 curry 𝐹 = (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧})
17 fdm 6008 . . . . . . . . . 10 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom 𝐹 = (𝐴 × 𝐵))
1817dmeqd 5286 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom dom 𝐹 = dom (𝐴 × 𝐵))
19 dmxp 5304 . . . . . . . . 9 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
2018, 19sylan9eq 2675 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → dom dom 𝐹 = 𝐴)
2120mpteq1d 4698 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}))
22 ffun 6005 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun 𝐹)
23 funbrfv2b 6197 . . . . . . . . . . . . . 14 (Fun 𝐹 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2422, 23syl 17 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2517eleq2d 2684 . . . . . . . . . . . . . . 15 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
26 opelxp 5106 . . . . . . . . . . . . . . 15 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2725, 26syl6bb 276 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ (𝑥𝐴𝑦𝐵)))
2827anbi1d 740 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → ((⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2924, 28bitrd 268 . . . . . . . . . . . 12 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
30 ibar 525 . . . . . . . . . . . . 13 (𝑥𝐴 → ((𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)))))
31 anass 680 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
32 eqcom 2628 . . . . . . . . . . . . . . 15 (𝑧 = (𝐹‘⟨𝑥, 𝑦⟩) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)
3332anbi2i 729 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3431, 33bitr3i 266 . . . . . . . . . . . . 13 ((𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3530, 34syl6rbb 277 . . . . . . . . . . . 12 (𝑥𝐴 → (((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3629, 35sylan9bb 735 . . . . . . . . . . 11 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (⟨𝑥, 𝑦𝐹𝑧 ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3736opabbidv 4678 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))})
38 df-mpt 4675 . . . . . . . . . 10 (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))}
3937, 38syl6eqr 2673 . . . . . . . . 9 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)))
4039mpteq2dva 4704 . . . . . . . 8 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4140adantr 481 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4221, 41eqtrd 2655 . . . . . 6 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4316, 42syl5eq 2667 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → curry 𝐹 = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4443feq1d 5987 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵)))
4515, 44sylan2 491 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵)))
46453adant3 1079 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵)))
4714, 46mpbird 247 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶𝑚 𝐵))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1036   = wceq 1480  wcel 1987  wne 2790  cdif 3552  c0 3891  {csn 4148  cop 4154   class class class wbr 4613  {copab 4672  cmpt 4673   × cxp 5072  dom cdm 5074  Fun wfun 5841  wf 5843  cfv 5847  (class class class)co 6604  curry ccur 7336  𝑚 cmap 7802
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 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902
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 3418  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-op 4155  df-uni 4403  df-br 4614  df-opab 4674  df-mpt 4675  df-id 4989  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-fv 5855  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-cur 7338  df-map 7804
This theorem is referenced by:  unccur  33024  matunitlindflem1  33037  matunitlindflem2  33038
  Copyright terms: Public domain W3C validator