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 33517
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 5182 . . . . . . . 8 ((𝑥𝐴𝑦𝐵) → ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵))
2 ffvelrn 6397 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
31, 2sylan2 490 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ (𝑥𝐴𝑦𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
43anassrs 681 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) ∧ 𝑦𝐵) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
5 eqid 2651 . . . . . 6 (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) = (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))
64, 5fmptd 6425 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
763ad2antl1 1243 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
8 elmapg 7912 . . . . . . 7 ((𝐶𝑊𝐵 ∈ (𝑉 ∖ {∅})) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
98ancoms 468 . . . . . 6 ((𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
1093adant1 1099 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
1110adantr 480 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
127, 11mpbird 247 . . 3 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶𝑚 𝐵))
13 eqid 2651 . . 3 (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)))
1412, 13fmptd 6425 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵))
15 eldifsni 4353 . . . 4 (𝐵 ∈ (𝑉 ∖ {∅}) → 𝐵 ≠ ∅)
16 df-cur 7438 . . . . . 6 curry 𝐹 = (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧})
17 fdm 6089 . . . . . . . . . 10 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom 𝐹 = (𝐴 × 𝐵))
1817dmeqd 5358 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom dom 𝐹 = dom (𝐴 × 𝐵))
19 dmxp 5376 . . . . . . . . 9 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
2018, 19sylan9eq 2705 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → dom dom 𝐹 = 𝐴)
2120mpteq1d 4771 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}))
22 ffun 6086 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun 𝐹)
23 funbrfv2b 6279 . . . . . . . . . . . . . 14 (Fun 𝐹 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2422, 23syl 17 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2517eleq2d 2716 . . . . . . . . . . . . . . 15 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
26 opelxp 5180 . . . . . . . . . . . . . . 15 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2725, 26syl6bb 276 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ (𝑥𝐴𝑦𝐵)))
2827anbi1d 741 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → ((⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2924, 28bitrd 268 . . . . . . . . . . . 12 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
30 ibar 524 . . . . . . . . . . . . 13 (𝑥𝐴 → ((𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)))))
31 anass 682 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
32 eqcom 2658 . . . . . . . . . . . . . . 15 (𝑧 = (𝐹‘⟨𝑥, 𝑦⟩) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)
3332anbi2i 730 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3431, 33bitr3i 266 . . . . . . . . . . . . 13 ((𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3530, 34syl6rbb 277 . . . . . . . . . . . 12 (𝑥𝐴 → (((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3629, 35sylan9bb 736 . . . . . . . . . . 11 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (⟨𝑥, 𝑦𝐹𝑧 ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3736opabbidv 4749 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))})
38 df-mpt 4763 . . . . . . . . . 10 (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))}
3937, 38syl6eqr 2703 . . . . . . . . 9 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)))
4039mpteq2dva 4777 . . . . . . . 8 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4140adantr 480 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4221, 41eqtrd 2685 . . . . . 6 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4316, 42syl5eq 2697 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → curry 𝐹 = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4443feq1d 6068 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵)))
4515, 44sylan2 490 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵)))
46453adant3 1101 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶𝑚 𝐵)))
4714, 46mpbird 247 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶𝑚 𝐵))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 383  w3a 1054   = wceq 1523  wcel 2030  wne 2823  cdif 3604  c0 3948  {csn 4210  cop 4216   class class class wbr 4685  {copab 4745  cmpt 4762   × cxp 5141  dom cdm 5143  Fun wfun 5920  wf 5922  cfv 5926  (class class class)co 6690  curry ccur 7436  𝑚 cmap 7899
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-ral 2946  df-rex 2947  df-rab 2950  df-v 3233  df-sbc 3469  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-op 4217  df-uni 4469  df-br 4686  df-opab 4746  df-mpt 4763  df-id 5053  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-fv 5934  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-cur 7438  df-map 7901
This theorem is referenced by:  unccur  33522  matunitlindflem1  33535  matunitlindflem2  33536
  Copyright terms: Public domain W3C validator