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 34741
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 6730 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹 = (𝑥𝐴 ↦ (𝐹𝑥)))
3 uncf 34738 . . . . . . . 8 (𝐹:𝐴⟶(𝐶m 𝐵) → uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶)
43fdmd 6520 . . . . . . 7 (𝐹:𝐴⟶(𝐶m 𝐵) → dom uncurry 𝐹 = (𝐴 × 𝐵))
54dmeqd 5773 . . . . . 6 (𝐹:𝐴⟶(𝐶m 𝐵) → dom dom uncurry 𝐹 = dom (𝐴 × 𝐵))
6 dmxp 5798 . . . . . 6 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
75, 6sylan9eq 2881 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → dom dom uncurry 𝐹 = 𝐴)
87eqcomd 2832 . . . 4 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → 𝐴 = dom dom uncurry 𝐹)
9 df-mpt 5144 . . . . . 6 (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))}
10 ffvelrn 6845 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) ∈ (𝐶m 𝐵))
11 elmapi 8418 . . . . . . . 8 ((𝐹𝑥) ∈ (𝐶m 𝐵) → (𝐹𝑥):𝐵𝐶)
1210, 11syl 17 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥):𝐵𝐶)
1312feqmptd 6730 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)))
14 ffun 6514 . . . . . . . . . 10 (uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun uncurry 𝐹)
15 funbrfv2b 6720 . . . . . . . . . 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 2903 . . . . . . . . . 10 (𝐹:𝐴⟶(𝐶m 𝐵) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
19 opelxp 5590 . . . . . . . . . . 11 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2019baib 536 . . . . . . . . . 10 (𝑥𝐴 → (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ 𝑦𝐵))
2118, 20sylan9bb 510 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹𝑦𝐵))
22 df-ov 7151 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = (uncurry 𝐹‘⟨𝑥, 𝑦⟩)
23 uncov 34740 . . . . . . . . . . . . . 14 ((𝑥 ∈ V ∧ 𝑦 ∈ V) → (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦))
2423el2v 3507 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦)
2522, 24eqtr3i 2851 . . . . . . . . . . . 12 (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = ((𝐹𝑥)‘𝑦)
2625eqeq1i 2831 . . . . . . . . . . 11 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧 ↔ ((𝐹𝑥)‘𝑦) = 𝑧)
27 eqcom 2833 . . . . . . . . . . 11 (((𝐹𝑥)‘𝑦) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2826, 27bitri 276 . . . . . . . . . 10 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
2928a1i 11 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦)))
3021, 29anbi12d 630 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → ((⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3117, 30bitrd 280 . . . . . . 7 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3231opabbidv 5129 . . . . . 6 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))})
339, 13, 323eqtr4a 2887 . . . . 5 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3433adantlr 711 . . . 4 (((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
358, 34mpteq12dva 5147 . . 3 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧}))
36 df-cur 7924 . . 3 curry uncurry 𝐹 = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3735, 36syl6eqr 2879 . 2 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = curry uncurry 𝐹)
382, 37eqtr2d 2862 1 ((𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 207  wa 396   = wceq 1530  wcel 2107  wne 3021  Vcvv 3500  c0 4295  cop 4570   class class class wbr 5063  {copab 5125  cmpt 5143   × cxp 5552  dom cdm 5554  Fun wfun 6346  wf 6348  cfv 6352  (class class class)co 7148  curry ccur 7922  uncurry cunc 7923  m cmap 8396
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1789  ax-4 1803  ax-5 1904  ax-6 1963  ax-7 2008  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2153  ax-12 2169  ax-ext 2798  ax-sep 5200  ax-nul 5207  ax-pow 5263  ax-pr 5326  ax-un 7451
This theorem depends on definitions:  df-bi 208  df-an 397  df-or 844  df-3an 1083  df-tru 1533  df-ex 1774  df-nf 1778  df-sb 2063  df-mo 2620  df-eu 2652  df-clab 2805  df-cleq 2819  df-clel 2898  df-nfc 2968  df-ne 3022  df-ral 3148  df-rex 3149  df-rab 3152  df-v 3502  df-sbc 3777  df-csb 3888  df-dif 3943  df-un 3945  df-in 3947  df-ss 3956  df-nul 4296  df-if 4471  df-pw 4544  df-sn 4565  df-pr 4567  df-op 4571  df-uni 4838  df-iun 4919  df-br 5064  df-opab 5126  df-mpt 5144  df-id 5459  df-xp 5560  df-rel 5561  df-cnv 5562  df-co 5563  df-dm 5564  df-rn 5565  df-res 5566  df-ima 5567  df-iota 6312  df-fun 6354  df-fn 6355  df-f 6356  df-fv 6360  df-ov 7151  df-oprab 7152  df-mpo 7153  df-1st 7680  df-2nd 7681  df-cur 7924  df-unc 7925  df-map 8398
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator