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

Theorem unccur 32562
 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 5958 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 Fn (𝐴 × 𝐵))
21anim1i 590 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
323adant3 1074 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
4 3anass 1035 . . . . . . . . . . 11 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ↔ (𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)))
5 curfv 32559 . . . . . . . . . . 11 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
64, 5sylanbr 489 . . . . . . . . . 10 (((𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
76an32s 842 . . . . . . . . 9 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
87eqeq1d 2612 . . . . . . . 8 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧 ↔ (𝑥𝐹𝑦) = 𝑧))
9 eqcom 2617 . . . . . . . 8 ((𝑥𝐹𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦))
108, 9syl6bb 275 . . . . . . 7 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
113, 10sylan 487 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
12 curf 32557 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶𝑚 𝐵))
1312ffvelrnda 6267 . . . . . . . . 9 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶𝑚 𝐵))
14 elmapfn 7766 . . . . . . . . 9 ((curry 𝐹𝑥) ∈ (𝐶𝑚 𝐵) → (curry 𝐹𝑥) Fn 𝐵)
1513, 14syl 17 . . . . . . . 8 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) Fn 𝐵)
16 fnbrfvb 6146 . . . . . . . 8 (((curry 𝐹𝑥) Fn 𝐵𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1715, 16sylan 487 . . . . . . 7 ((((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) ∧ 𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1817anasss 677 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
19 ibar 524 . . . . . . 7 ((𝑥𝐴𝑦𝐵) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2019adantl 481 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2111, 18, 203bitr3d 297 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
22 df-br 4584 . . . . . . . . . . 11 (𝑦(curry 𝐹𝑥)𝑧 ↔ ⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥))
23 elfvdm 6130 . . . . . . . . . . 11 (⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥) → 𝑥 ∈ dom curry 𝐹)
2422, 23sylbi 206 . . . . . . . . . 10 (𝑦(curry 𝐹𝑥)𝑧𝑥 ∈ dom curry 𝐹)
25 fdm 5964 . . . . . . . . . . . 12 (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) → dom curry 𝐹 = 𝐴)
2625eleq2d 2673 . . . . . . . . . . 11 (curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) → (𝑥 ∈ dom curry 𝐹𝑥𝐴))
2726biimpa 500 . . . . . . . . . 10 ((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥 ∈ dom curry 𝐹) → 𝑥𝐴)
2824, 27sylan2 490 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑥𝐴)
29 ffvelrn 6265 . . . . . . . . . . . . 13 ((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶𝑚 𝐵))
30 elmapi 7765 . . . . . . . . . . . . 13 ((curry 𝐹𝑥) ∈ (𝐶𝑚 𝐵) → (curry 𝐹𝑥):𝐵𝐶)
31 fdm 5964 . . . . . . . . . . . . 13 ((curry 𝐹𝑥):𝐵𝐶 → dom (curry 𝐹𝑥) = 𝐵)
3229, 30, 313syl 18 . . . . . . . . . . . 12 ((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) → dom (curry 𝐹𝑥) = 𝐵)
33 vex 3176 . . . . . . . . . . . . 13 𝑦 ∈ V
34 vex 3176 . . . . . . . . . . . . 13 𝑧 ∈ V
3533, 34breldm 5251 . . . . . . . . . . . 12 (𝑦(curry 𝐹𝑥)𝑧𝑦 ∈ dom (curry 𝐹𝑥))
36 eleq2 2677 . . . . . . . . . . . . 13 (dom (curry 𝐹𝑥) = 𝐵 → (𝑦 ∈ dom (curry 𝐹𝑥) ↔ 𝑦𝐵))
3736biimpa 500 . . . . . . . . . . . 12 ((dom (curry 𝐹𝑥) = 𝐵𝑦 ∈ dom (curry 𝐹𝑥)) → 𝑦𝐵)
3832, 35, 37syl2an 493 . . . . . . . . . . 11 (((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑥𝐴) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
3938an32s 842 . . . . . . . . . 10 (((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) ∧ 𝑥𝐴) → 𝑦𝐵)
4028, 39mpdan 699 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
4128, 40jca 553 . . . . . . . 8 ((curry 𝐹:𝐴⟶(𝐶𝑚 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4212, 41sylan 487 . . . . . . 7 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4342stoic1a 1688 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ 𝑦(curry 𝐹𝑥)𝑧)
44 simpl 472 . . . . . . . 8 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)) → (𝑥𝐴𝑦𝐵))
4544con3i 149 . . . . . . 7 (¬ (𝑥𝐴𝑦𝐵) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4645adantl 481 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4743, 462falsed 365 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4821, 47pm2.61dan 828 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4948oprabbidv 6607 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧} = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))})
50 df-unc 7281 . . 3 uncurry curry 𝐹 = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧}
51 df-mpt2 6554 . . 3 (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)) = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))}
5249, 50, 513eqtr4g 2669 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
53 fnov 6666 . . . 4 (𝐹 Fn (𝐴 × 𝐵) ↔ 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
541, 53sylib 207 . . 3 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
55543ad2ant1 1075 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
5652, 55eqtr4d 2647 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = 𝐹)
 Colors of variables: wff setvar class Syntax hints:  ¬ wn 3   → wi 4   ↔ wb 195   ∧ wa 383   ∧ w3a 1031   = wceq 1475   ∈ wcel 1977   ∖ cdif 3537  ∅c0 3874  {csn 4125  ⟨cop 4131   class class class wbr 4583   × cxp 5036  dom cdm 5038   Fn wfn 5799  ⟶wf 5800  ‘cfv 5804  (class class class)co 6549  {coprab 6550   ↦ cmpt2 6551  curry ccur 7278  uncurry cunc 7279   ↑𝑚 cmap 7744 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-8 1979  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-rep 4699  ax-sep 4709  ax-nul 4717  ax-pow 4769  ax-pr 4833  ax-un 6847 This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-ral 2901  df-rex 2902  df-reu 2903  df-rab 2905  df-v 3175  df-sbc 3403  df-csb 3500  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-nul 3875  df-if 4037  df-pw 4110  df-sn 4126  df-pr 4128  df-op 4132  df-uni 4373  df-iun 4457  df-br 4584  df-opab 4644  df-mpt 4645  df-id 4953  df-xp 5044  df-rel 5045  df-cnv 5046  df-co 5047  df-dm 5048  df-rn 5049  df-res 5050  df-ima 5051  df-iota 5768  df-fun 5806  df-fn 5807  df-f 5808  df-f1 5809  df-fo 5810  df-f1o 5811  df-fv 5812  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-1st 7059  df-2nd 7060  df-cur 7280  df-unc 7281  df-map 7746 This theorem is referenced by: (None)
 Copyright terms: Public domain W3C validator