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 35410
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 5572 . . . . . . . 8 ((𝑥𝐴𝑦𝐵) → ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵))
2 ffvelrn 6871 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
31, 2sylan2 596 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶 ∧ (𝑥𝐴𝑦𝐵)) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
43anassrs 471 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) ∧ 𝑦𝐵) → (𝐹‘⟨𝑥, 𝑦⟩) ∈ 𝐶)
54fmpttd 6901 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
653ad2antl1 1186 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶)
7 elmapg 8462 . . . . . . 7 ((𝐶𝑊𝐵 ∈ (𝑉 ∖ {∅})) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
87ancoms 462 . . . . . 6 ((𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
983adant1 1131 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
109adantr 484 . . . 4 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → ((𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵) ↔ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)):𝐵𝐶))
116, 10mpbird 260 . . 3 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) ∈ (𝐶m 𝐵))
1211fmpttd 6901 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵))
13 eldifsni 4688 . . . 4 (𝐵 ∈ (𝑉 ∖ {∅}) → 𝐵 ≠ ∅)
14 df-cur 7974 . . . . . 6 curry 𝐹 = (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧})
15 fdm 6523 . . . . . . . . . 10 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom 𝐹 = (𝐴 × 𝐵))
1615dmeqd 5758 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶 → dom dom 𝐹 = dom (𝐴 × 𝐵))
17 dmxp 5782 . . . . . . . . 9 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
1816, 17sylan9eq 2794 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → dom dom 𝐹 = 𝐴)
1918mpteq1d 5129 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}))
20 ffun 6517 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun 𝐹)
21 funbrfv2b 6739 . . . . . . . . . . . . . 14 (Fun 𝐹 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2220, 21syl 17 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2315eleq2d 2819 . . . . . . . . . . . . . . 15 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
24 opelxp 5571 . . . . . . . . . . . . . . 15 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2523, 24bitrdi 290 . . . . . . . . . . . . . 14 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ (𝑥𝐴𝑦𝐵)))
2625anbi1d 633 . . . . . . . . . . . . 13 (𝐹:(𝐴 × 𝐵)⟶𝐶 → ((⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2722, 26bitrd 282 . . . . . . . . . . . 12 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (⟨𝑥, 𝑦𝐹𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
28 ibar 532 . . . . . . . . . . . . 13 (𝑥𝐴 → ((𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)))))
29 anass 472 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ (𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
30 eqcom 2746 . . . . . . . . . . . . . . 15 (𝑧 = (𝐹‘⟨𝑥, 𝑦⟩) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)
3130anbi2i 626 . . . . . . . . . . . . . 14 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝐹‘⟨𝑥, 𝑦⟩)) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3229, 31bitr3i 280 . . . . . . . . . . . . 13 ((𝑥𝐴 ∧ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))) ↔ ((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
3328, 32bitr2di 291 . . . . . . . . . . . 12 (𝑥𝐴 → (((𝑥𝐴𝑦𝐵) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3427, 33sylan9bb 513 . . . . . . . . . . 11 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → (⟨𝑥, 𝑦𝐹𝑧 ↔ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))))
3534opabbidv 5106 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))})
36 df-mpt 5121 . . . . . . . . . 10 (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = (𝐹‘⟨𝑥, 𝑦⟩))}
3735, 36eqtr4di 2792 . . . . . . . . 9 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩)))
3837mpteq2dva 5135 . . . . . . . 8 (𝐹:(𝐴 × 𝐵)⟶𝐶 → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
3938adantr 484 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥𝐴 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4019, 39eqtrd 2774 . . . . . 6 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4114, 40syl5eq 2786 . . . . 5 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → curry 𝐹 = (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))))
4241feq1d 6499 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ≠ ∅) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
4313, 42sylan2 596 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
44433adant3 1133 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (curry 𝐹:𝐴⟶(𝐶m 𝐵) ↔ (𝑥𝐴 ↦ (𝑦𝐵 ↦ (𝐹‘⟨𝑥, 𝑦⟩))):𝐴⟶(𝐶m 𝐵)))
4512, 44mpbird 260 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶m 𝐵))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399  w3a 1088   = wceq 1542  wcel 2114  wne 2935  cdif 3850  c0 4221  {csn 4526  cop 4532   class class class wbr 5040  {copab 5102  cmpt 5120   × cxp 5533  dom cdm 5535  Fun wfun 6343  wf 6345  cfv 6349  (class class class)co 7182  curry ccur 7972  m cmap 8449
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2020  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2162  ax-12 2179  ax-ext 2711  ax-sep 5177  ax-nul 5184  ax-pow 5242  ax-pr 5306  ax-un 7491
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2075  df-mo 2541  df-eu 2571  df-clab 2718  df-cleq 2731  df-clel 2812  df-nfc 2882  df-ne 2936  df-ral 3059  df-rex 3060  df-rab 3063  df-v 3402  df-sbc 3686  df-dif 3856  df-un 3858  df-in 3860  df-ss 3870  df-nul 4222  df-if 4425  df-pw 4500  df-sn 4527  df-pr 4529  df-op 4533  df-uni 4807  df-br 5041  df-opab 5103  df-mpt 5121  df-id 5439  df-xp 5541  df-rel 5542  df-cnv 5543  df-co 5544  df-dm 5545  df-rn 5546  df-res 5547  df-ima 5548  df-iota 6307  df-fun 6351  df-fn 6352  df-f 6353  df-fv 6357  df-ov 7185  df-oprab 7186  df-mpo 7187  df-cur 7974  df-map 8451
This theorem is referenced by:  unccur  35415  matunitlindflem1  35428  matunitlindflem2  35429
  Copyright terms: Public domain W3C validator