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 36519
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 6718 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 Fn (𝐴 × 𝐵))
21anim1i 616 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
323adant3 1133 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
4 3anass 1096 . . . . . . . . . . 11 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ↔ (𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)))
5 curfv 36516 . . . . . . . . . . 11 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
64, 5sylanbr 583 . . . . . . . . . 10 (((𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
76an32s 651 . . . . . . . . 9 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
87eqeq1d 2735 . . . . . . . 8 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧 ↔ (𝑥𝐹𝑦) = 𝑧))
9 eqcom 2740 . . . . . . . 8 ((𝑥𝐹𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦))
108, 9bitrdi 287 . . . . . . 7 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
113, 10sylan 581 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
12 curf 36514 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶m 𝐵))
1312ffvelcdmda 7087 . . . . . . . . 9 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶m 𝐵))
14 elmapfn 8859 . . . . . . . . 9 ((curry 𝐹𝑥) ∈ (𝐶m 𝐵) → (curry 𝐹𝑥) Fn 𝐵)
1513, 14syl 17 . . . . . . . 8 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) Fn 𝐵)
16 fnbrfvb 6945 . . . . . . . 8 (((curry 𝐹𝑥) Fn 𝐵𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1715, 16sylan 581 . . . . . . 7 ((((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) ∧ 𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1817anasss 468 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
19 ibar 530 . . . . . . 7 ((𝑥𝐴𝑦𝐵) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2019adantl 483 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2111, 18, 203bitr3d 309 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
22 df-br 5150 . . . . . . . . . . 11 (𝑦(curry 𝐹𝑥)𝑧 ↔ ⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥))
23 elfvdm 6929 . . . . . . . . . . 11 (⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥) → 𝑥 ∈ dom curry 𝐹)
2422, 23sylbi 216 . . . . . . . . . 10 (𝑦(curry 𝐹𝑥)𝑧𝑥 ∈ dom curry 𝐹)
25 fdm 6727 . . . . . . . . . . . 12 (curry 𝐹:𝐴⟶(𝐶m 𝐵) → dom curry 𝐹 = 𝐴)
2625eleq2d 2820 . . . . . . . . . . 11 (curry 𝐹:𝐴⟶(𝐶m 𝐵) → (𝑥 ∈ dom curry 𝐹𝑥𝐴))
2726biimpa 478 . . . . . . . . . 10 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥 ∈ dom curry 𝐹) → 𝑥𝐴)
2824, 27sylan2 594 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑥𝐴)
29 ffvelcdm 7084 . . . . . . . . . . . . 13 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶m 𝐵))
30 elmapi 8843 . . . . . . . . . . . . 13 ((curry 𝐹𝑥) ∈ (𝐶m 𝐵) → (curry 𝐹𝑥):𝐵𝐶)
31 fdm 6727 . . . . . . . . . . . . 13 ((curry 𝐹𝑥):𝐵𝐶 → dom (curry 𝐹𝑥) = 𝐵)
3229, 30, 313syl 18 . . . . . . . . . . . 12 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → dom (curry 𝐹𝑥) = 𝐵)
33 vex 3479 . . . . . . . . . . . . 13 𝑦 ∈ V
34 vex 3479 . . . . . . . . . . . . 13 𝑧 ∈ V
3533, 34breldm 5909 . . . . . . . . . . . 12 (𝑦(curry 𝐹𝑥)𝑧𝑦 ∈ dom (curry 𝐹𝑥))
36 eleq2 2823 . . . . . . . . . . . . 13 (dom (curry 𝐹𝑥) = 𝐵 → (𝑦 ∈ dom (curry 𝐹𝑥) ↔ 𝑦𝐵))
3736biimpa 478 . . . . . . . . . . . 12 ((dom (curry 𝐹𝑥) = 𝐵𝑦 ∈ dom (curry 𝐹𝑥)) → 𝑦𝐵)
3832, 35, 37syl2an 597 . . . . . . . . . . 11 (((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
3938an32s 651 . . . . . . . . . 10 (((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) ∧ 𝑥𝐴) → 𝑦𝐵)
4028, 39mpdan 686 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
4128, 40jca 513 . . . . . . . 8 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4212, 41sylan 581 . . . . . . 7 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4342stoic1a 1775 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ 𝑦(curry 𝐹𝑥)𝑧)
44 simpl 484 . . . . . . . 8 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)) → (𝑥𝐴𝑦𝐵))
4544con3i 154 . . . . . . 7 (¬ (𝑥𝐴𝑦𝐵) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4645adantl 483 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4743, 462falsed 377 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4821, 47pm2.61dan 812 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4948oprabbidv 7475 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧} = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))})
50 df-unc 8253 . . 3 uncurry curry 𝐹 = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧}
51 df-mpo 7414 . . 3 (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)) = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))}
5249, 50, 513eqtr4g 2798 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
53 fnov 7540 . . . 4 (𝐹 Fn (𝐴 × 𝐵) ↔ 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
541, 53sylib 217 . . 3 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
55543ad2ant1 1134 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
5652, 55eqtr4d 2776 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 397  w3a 1088   = wceq 1542  wcel 2107  cdif 3946  c0 4323  {csn 4629  cop 4635   class class class wbr 5149   × cxp 5675  dom cdm 5677   Fn wfn 6539  wf 6540  cfv 6544  (class class class)co 7409  {coprab 7410  cmpo 7411  curry ccur 8250  uncurry cunc 8251  m cmap 8820
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 1914  ax-6 1972  ax-7 2012  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2155  ax-12 2172  ax-ext 2704  ax-rep 5286  ax-sep 5300  ax-nul 5307  ax-pow 5364  ax-pr 5428  ax-un 7725
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1783  df-nf 1787  df-sb 2069  df-mo 2535  df-eu 2564  df-clab 2711  df-cleq 2725  df-clel 2811  df-nfc 2886  df-ne 2942  df-ral 3063  df-rex 3072  df-reu 3378  df-rab 3434  df-v 3477  df-sbc 3779  df-csb 3895  df-dif 3952  df-un 3954  df-in 3956  df-ss 3966  df-nul 4324  df-if 4530  df-pw 4605  df-sn 4630  df-pr 4632  df-op 4636  df-uni 4910  df-iun 5000  df-br 5150  df-opab 5212  df-mpt 5233  df-id 5575  df-xp 5683  df-rel 5684  df-cnv 5685  df-co 5686  df-dm 5687  df-rn 5688  df-res 5689  df-ima 5690  df-iota 6496  df-fun 6546  df-fn 6547  df-f 6548  df-f1 6549  df-fo 6550  df-f1o 6551  df-fv 6552  df-ov 7412  df-oprab 7413  df-mpo 7414  df-1st 7975  df-2nd 7976  df-cur 8252  df-unc 8253  df-map 8822
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator