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

Theorem curunc 35759
Description: Currying of uncurrying. (Contributed by Brendan Leahy, 2-Jun-2021.)
Assertion
Ref Expression
curunc ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)

Proof of Theorem curunc
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 simpl 483 . . 3 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹:𝐴⟶(𝐶m 𝐵))
21feqmptd 6837 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹 = (𝑥𝐴 ↦ (𝐹𝑥)))
3 uncf 35756 . . . . . . . 8 (𝐹:𝐴⟶(𝐶m 𝐵) → uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶)
43fdmd 6611 . . . . . . 7 (𝐹:𝐴⟶(𝐶m 𝐵) → dom uncurry 𝐹 = (𝐴 × 𝐵))
54dmeqd 5814 . . . . . 6 (𝐹:𝐴⟶(𝐶m 𝐵) → dom dom uncurry 𝐹 = dom (𝐴 × 𝐵))
6 dmxp 5838 . . . . . 6 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
75, 6sylan9eq 2798 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → dom dom uncurry 𝐹 = 𝐴)
87eqcomd 2744 . . . 4 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐴 = dom dom uncurry 𝐹)
9 df-mpt 5158 . . . . . 6 (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))}
10 ffvelrn 6959 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) ∈ (𝐶m 𝐵))
11 elmapi 8637 . . . . . . . 8 ((𝐹𝑥) ∈ (𝐶m 𝐵) → (𝐹𝑥):𝐵𝐶)
1210, 11syl 17 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥):𝐵𝐶)
1312feqmptd 6837 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)))
14 ffun 6603 . . . . . . . . . 10 (uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun uncurry 𝐹)
15 funbrfv2b 6827 . . . . . . . . . 10 (Fun uncurry 𝐹 → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
163, 14, 153syl 18 . . . . . . . . 9 (𝐹:𝐴⟶(𝐶m 𝐵) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
1716adantr 481 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
184eleq2d 2824 . . . . . . . . . 10 (𝐹:𝐴⟶(𝐶m 𝐵) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
19 opelxp 5625 . . . . . . . . . . 11 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2019baib 536 . . . . . . . . . 10 (𝑥𝐴 → (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ 𝑦𝐵))
2118, 20sylan9bb 510 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹𝑦𝐵))
22 df-ov 7278 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = (uncurry 𝐹‘⟨𝑥, 𝑦⟩)
23 uncov 35758 . . . . . . . . . . . . . 14 ((𝑥 ∈ V ∧ 𝑦 ∈ V) → (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦))
2423el2v 3440 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦)
2522, 24eqtr3i 2768 . . . . . . . . . . . 12 (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = ((𝐹𝑥)‘𝑦)
2625eqeq1i 2743 . . . . . . . . . . 11 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧 ↔ ((𝐹𝑥)‘𝑦) = 𝑧)
27 eqcom 2745 . . . . . . . . . . 11 (((𝐹𝑥)‘𝑦) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2826, 27bitri 274 . . . . . . . . . 10 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2928a1i 11 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦)))
3021, 29anbi12d 631 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3117, 30bitrd 278 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3231opabbidv 5140 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))})
339, 13, 323eqtr4a 2804 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3433adantlr 712 . . . 4 (((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
358, 34mpteq12dva 5163 . . 3 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧}))
36 df-cur 8083 . . 3 curry uncurry 𝐹 = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3735, 36eqtr4di 2796 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = curry uncurry 𝐹)
382, 37eqtr2d 2779 1 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 396   = wceq 1539  wcel 2106  wne 2943  Vcvv 3432  c0 4256  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  uncurry cunc 8082  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-csb 3833  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-iun 4926  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-1st 7831  df-2nd 7832  df-cur 8083  df-unc 8084  df-map 8617
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator