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 33815
Description: Currying of uncurrying. (Contributed by Brendan Leahy, 2-Jun-2021.)
Assertion
Ref Expression
curunc ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)

Proof of Theorem curunc
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 simpl 474 . . 3 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹:𝐴⟶(𝐶𝑚 𝐵))
21feqmptd 6438 . 2 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → 𝐹 = (𝑥𝐴 ↦ (𝐹𝑥)))
3 uncf 33812 . . . . . . . 8 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶)
43fdmd 6232 . . . . . . 7 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → dom uncurry 𝐹 = (𝐴 × 𝐵))
54dmeqd 5494 . . . . . 6 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → dom dom uncurry 𝐹 = dom (𝐴 × 𝐵))
6 dmxp 5512 . . . . . 6 (𝐵 ≠ ∅ → dom (𝐴 × 𝐵) = 𝐴)
75, 6sylan9eq 2819 . . . . 5 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → dom dom uncurry 𝐹 = 𝐴)
87eqcomd 2771 . . . 4 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → 𝐴 = dom dom uncurry 𝐹)
9 df-mpt 4889 . . . . . 6 (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))}
10 ffvelrn 6547 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) ∈ (𝐶𝑚 𝐵))
11 elmapi 8082 . . . . . . . 8 ((𝐹𝑥) ∈ (𝐶𝑚 𝐵) → (𝐹𝑥):𝐵𝐶)
1210, 11syl 17 . . . . . . 7 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥):𝐵𝐶)
1312feqmptd 6438 . . . . . 6 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = (𝑦𝐵 ↦ ((𝐹𝑥)‘𝑦)))
14 ffun 6226 . . . . . . . . . 10 (uncurry 𝐹:(𝐴 × 𝐵)⟶𝐶 → Fun uncurry 𝐹)
15 funbrfv2b 6429 . . . . . . . . . 10 (Fun uncurry 𝐹 → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
163, 14, 153syl 18 . . . . . . . . 9 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
1716adantr 472 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
184eleq2d 2830 . . . . . . . . . 10 (𝐹:𝐴⟶(𝐶𝑚 𝐵) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
19 opelxp 5313 . . . . . . . . . . 11 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
2019baib 531 . . . . . . . . . 10 (𝑥𝐴 → (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ 𝑦𝐵))
2118, 20sylan9bb 505 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹𝑦𝐵))
22 df-ov 6845 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = (uncurry 𝐹‘⟨𝑥, 𝑦⟩)
23 vex 3353 . . . . . . . . . . . . . 14 𝑥 ∈ V
24 vex 3353 . . . . . . . . . . . . . 14 𝑦 ∈ V
25 uncov 33814 . . . . . . . . . . . . . 14 ((𝑥 ∈ V ∧ 𝑦 ∈ V) → (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦))
2623, 24, 25mp2an 683 . . . . . . . . . . . . 13 (𝑥uncurry 𝐹𝑦) = ((𝐹𝑥)‘𝑦)
2722, 26eqtr3i 2789 . . . . . . . . . . . 12 (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = ((𝐹𝑥)‘𝑦)
2827eqeq1i 2770 . . . . . . . . . . 11 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧 ↔ ((𝐹𝑥)‘𝑦) = 𝑧)
29 eqcom 2772 . . . . . . . . . . 11 (((𝐹𝑥)‘𝑦) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
3028, 29bitri 266 . . . . . . . . . 10 ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦))
3130a1i 11 . . . . . . . . 9 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → ((uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = ((𝐹𝑥)‘𝑦)))
3221, 31anbi12d 624 . . . . . . . 8 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → ((⟨𝑥, 𝑦⟩ ∈ dom uncurry 𝐹 ∧ (uncurry 𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3317, 32bitrd 270 . . . . . . 7 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (⟨𝑥, 𝑦⟩uncurry 𝐹𝑧 ↔ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))))
3433opabbidv 4875 . . . . . 6 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧} = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝐵𝑧 = ((𝐹𝑥)‘𝑦))})
359, 13, 343eqtr4a 2825 . . . . 5 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3635adantlr 706 . . . 4 (((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) ∧ 𝑥𝐴) → (𝐹𝑥) = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
378, 36mpteq12dva 4891 . . 3 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧}))
38 df-cur 7596 . . 3 curry uncurry 𝐹 = (𝑥 ∈ dom dom uncurry 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦⟩uncurry 𝐹𝑧})
3937, 38syl6eqr 2817 . 2 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → (𝑥𝐴 ↦ (𝐹𝑥)) = curry uncurry 𝐹)
402, 39eqtr2d 2800 1 ((𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝐵 ≠ ∅) → curry uncurry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 197  wa 384   = wceq 1652  wcel 2155  wne 2937  Vcvv 3350  c0 4079  cop 4340   class class class wbr 4809  {copab 4871  cmpt 4888   × cxp 5275  dom cdm 5277  Fun wfun 6062  wf 6064  cfv 6068  (class class class)co 6842  curry ccur 7594  uncurry cunc 7595  𝑚 cmap 8060
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2070  ax-7 2105  ax-8 2157  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2352  ax-ext 2743  ax-sep 4941  ax-nul 4949  ax-pow 5001  ax-pr 5062  ax-un 7147
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-3an 1109  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2063  df-mo 2565  df-eu 2582  df-clab 2752  df-cleq 2758  df-clel 2761  df-nfc 2896  df-ne 2938  df-ral 3060  df-rex 3061  df-rab 3064  df-v 3352  df-sbc 3597  df-csb 3692  df-dif 3735  df-un 3737  df-in 3739  df-ss 3746  df-nul 4080  df-if 4244  df-pw 4317  df-sn 4335  df-pr 4337  df-op 4341  df-uni 4595  df-iun 4678  df-br 4810  df-opab 4872  df-mpt 4889  df-id 5185  df-xp 5283  df-rel 5284  df-cnv 5285  df-co 5286  df-dm 5287  df-rn 5288  df-res 5289  df-ima 5290  df-iota 6031  df-fun 6070  df-fn 6071  df-f 6072  df-fv 6076  df-ov 6845  df-oprab 6846  df-mpt2 6847  df-1st 7366  df-2nd 7367  df-cur 7596  df-unc 7597  df-map 8062
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator