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

Theorem unccur 35687
Description: Uncurrying of currying. (Contributed by Brendan Leahy, 5-Jun-2021.)
Assertion
Ref Expression
unccur ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = 𝐹)

Proof of Theorem unccur
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 ffn 6584 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 Fn (𝐴 × 𝐵))
21anim1i 614 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
323adant3 1130 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
4 3anass 1093 . . . . . . . . . . 11 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ↔ (𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)))
5 curfv 35684 . . . . . . . . . . 11 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
64, 5sylanbr 581 . . . . . . . . . 10 (((𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
76an32s 648 . . . . . . . . 9 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
87eqeq1d 2740 . . . . . . . 8 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧 ↔ (𝑥𝐹𝑦) = 𝑧))
9 eqcom 2745 . . . . . . . 8 ((𝑥𝐹𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦))
108, 9bitrdi 286 . . . . . . 7 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
113, 10sylan 579 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
12 curf 35682 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶m 𝐵))
1312ffvelrnda 6943 . . . . . . . . 9 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶m 𝐵))
14 elmapfn 8611 . . . . . . . . 9 ((curry 𝐹𝑥) ∈ (𝐶m 𝐵) → (curry 𝐹𝑥) Fn 𝐵)
1513, 14syl 17 . . . . . . . 8 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) Fn 𝐵)
16 fnbrfvb 6804 . . . . . . . 8 (((curry 𝐹𝑥) Fn 𝐵𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1715, 16sylan 579 . . . . . . 7 ((((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) ∧ 𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1817anasss 466 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
19 ibar 528 . . . . . . 7 ((𝑥𝐴𝑦𝐵) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2019adantl 481 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2111, 18, 203bitr3d 308 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
22 df-br 5071 . . . . . . . . . . 11 (𝑦(curry 𝐹𝑥)𝑧 ↔ ⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥))
23 elfvdm 6788 . . . . . . . . . . 11 (⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥) → 𝑥 ∈ dom curry 𝐹)
2422, 23sylbi 216 . . . . . . . . . 10 (𝑦(curry 𝐹𝑥)𝑧𝑥 ∈ dom curry 𝐹)
25 fdm 6593 . . . . . . . . . . . 12 (curry 𝐹:𝐴⟶(𝐶m 𝐵) → dom curry 𝐹 = 𝐴)
2625eleq2d 2824 . . . . . . . . . . 11 (curry 𝐹:𝐴⟶(𝐶m 𝐵) → (𝑥 ∈ dom curry 𝐹𝑥𝐴))
2726biimpa 476 . . . . . . . . . 10 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥 ∈ dom curry 𝐹) → 𝑥𝐴)
2824, 27sylan2 592 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑥𝐴)
29 ffvelrn 6941 . . . . . . . . . . . . 13 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶m 𝐵))
30 elmapi 8595 . . . . . . . . . . . . 13 ((curry 𝐹𝑥) ∈ (𝐶m 𝐵) → (curry 𝐹𝑥):𝐵𝐶)
31 fdm 6593 . . . . . . . . . . . . 13 ((curry 𝐹𝑥):𝐵𝐶 → dom (curry 𝐹𝑥) = 𝐵)
3229, 30, 313syl 18 . . . . . . . . . . . 12 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → dom (curry 𝐹𝑥) = 𝐵)
33 vex 3426 . . . . . . . . . . . . 13 𝑦 ∈ V
34 vex 3426 . . . . . . . . . . . . 13 𝑧 ∈ V
3533, 34breldm 5806 . . . . . . . . . . . 12 (𝑦(curry 𝐹𝑥)𝑧𝑦 ∈ dom (curry 𝐹𝑥))
36 eleq2 2827 . . . . . . . . . . . . 13 (dom (curry 𝐹𝑥) = 𝐵 → (𝑦 ∈ dom (curry 𝐹𝑥) ↔ 𝑦𝐵))
3736biimpa 476 . . . . . . . . . . . 12 ((dom (curry 𝐹𝑥) = 𝐵𝑦 ∈ dom (curry 𝐹𝑥)) → 𝑦𝐵)
3832, 35, 37syl2an 595 . . . . . . . . . . 11 (((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
3938an32s 648 . . . . . . . . . 10 (((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) ∧ 𝑥𝐴) → 𝑦𝐵)
4028, 39mpdan 683 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
4128, 40jca 511 . . . . . . . 8 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4212, 41sylan 579 . . . . . . 7 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4342stoic1a 1776 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ 𝑦(curry 𝐹𝑥)𝑧)
44 simpl 482 . . . . . . . 8 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)) → (𝑥𝐴𝑦𝐵))
4544con3i 154 . . . . . . 7 (¬ (𝑥𝐴𝑦𝐵) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4645adantl 481 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4743, 462falsed 376 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4821, 47pm2.61dan 809 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4948oprabbidv 7319 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧} = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))})
50 df-unc 8055 . . 3 uncurry curry 𝐹 = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧}
51 df-mpo 7260 . . 3 (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)) = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))}
5249, 50, 513eqtr4g 2804 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
53 fnov 7383 . . . 4 (𝐹 Fn (𝐴 × 𝐵) ↔ 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
541, 53sylib 217 . . 3 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
55543ad2ant1 1131 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
5652, 55eqtr4d 2781 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 395  w3a 1085   = wceq 1539  wcel 2108  cdif 3880  c0 4253  {csn 4558  cop 4564   class class class wbr 5070   × cxp 5578  dom cdm 5580   Fn wfn 6413  wf 6414  cfv 6418  (class class class)co 7255  {coprab 7256  cmpo 7257  curry ccur 8052  uncurry cunc 8053  m cmap 8573
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-rep 5205  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-ral 3068  df-rex 3069  df-reu 3070  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-op 4565  df-uni 4837  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-id 5480  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-ov 7258  df-oprab 7259  df-mpo 7260  df-1st 7804  df-2nd 7805  df-cur 8054  df-unc 8055  df-map 8575
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator