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 35760
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 6600 . . . . . . . . 9 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 Fn (𝐴 × 𝐵))
21anim1i 615 . . . . . . . 8 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅})) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
323adant3 1131 . . . . . . 7 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})))
4 3anass 1094 . . . . . . . . . . 11 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ↔ (𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)))
5 curfv 35757 . . . . . . . . . . 11 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝑥𝐴𝑦𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
64, 5sylanbr 582 . . . . . . . . . 10 (((𝐹 Fn (𝐴 × 𝐵) ∧ (𝑥𝐴𝑦𝐵)) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
76an32s 649 . . . . . . . . 9 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → ((curry 𝐹𝑥)‘𝑦) = (𝑥𝐹𝑦))
87eqeq1d 2740 . . . . . . . 8 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧 ↔ (𝑥𝐹𝑦) = 𝑧))
9 eqcom 2745 . . . . . . . 8 ((𝑥𝐹𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦))
108, 9bitrdi 287 . . . . . . 7 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐵 ∈ (𝑉 ∖ {∅})) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
113, 10sylan 580 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑧 = (𝑥𝐹𝑦)))
12 curf 35755 . . . . . . . . . 10 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → curry 𝐹:𝐴⟶(𝐶m 𝐵))
1312ffvelrnda 6961 . . . . . . . . 9 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶m 𝐵))
14 elmapfn 8653 . . . . . . . . 9 ((curry 𝐹𝑥) ∈ (𝐶m 𝐵) → (curry 𝐹𝑥) Fn 𝐵)
1513, 14syl 17 . . . . . . . 8 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) → (curry 𝐹𝑥) Fn 𝐵)
16 fnbrfvb 6822 . . . . . . . 8 (((curry 𝐹𝑥) Fn 𝐵𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1715, 16sylan 580 . . . . . . 7 ((((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑥𝐴) ∧ 𝑦𝐵) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
1817anasss 467 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (((curry 𝐹𝑥)‘𝑦) = 𝑧𝑦(curry 𝐹𝑥)𝑧))
19 ibar 529 . . . . . . 7 ((𝑥𝐴𝑦𝐵) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2019adantl 482 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑧 = (𝑥𝐹𝑦) ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
2111, 18, 203bitr3d 309 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
22 df-br 5075 . . . . . . . . . . 11 (𝑦(curry 𝐹𝑥)𝑧 ↔ ⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥))
23 elfvdm 6806 . . . . . . . . . . 11 (⟨𝑦, 𝑧⟩ ∈ (curry 𝐹𝑥) → 𝑥 ∈ dom curry 𝐹)
2422, 23sylbi 216 . . . . . . . . . 10 (𝑦(curry 𝐹𝑥)𝑧𝑥 ∈ dom curry 𝐹)
25 fdm 6609 . . . . . . . . . . . 12 (curry 𝐹:𝐴⟶(𝐶m 𝐵) → dom curry 𝐹 = 𝐴)
2625eleq2d 2824 . . . . . . . . . . 11 (curry 𝐹:𝐴⟶(𝐶m 𝐵) → (𝑥 ∈ dom curry 𝐹𝑥𝐴))
2726biimpa 477 . . . . . . . . . 10 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥 ∈ dom curry 𝐹) → 𝑥𝐴)
2824, 27sylan2 593 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑥𝐴)
29 ffvelrn 6959 . . . . . . . . . . . . 13 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → (curry 𝐹𝑥) ∈ (𝐶m 𝐵))
30 elmapi 8637 . . . . . . . . . . . . 13 ((curry 𝐹𝑥) ∈ (𝐶m 𝐵) → (curry 𝐹𝑥):𝐵𝐶)
31 fdm 6609 . . . . . . . . . . . . 13 ((curry 𝐹𝑥):𝐵𝐶 → dom (curry 𝐹𝑥) = 𝐵)
3229, 30, 313syl 18 . . . . . . . . . . . 12 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) → dom (curry 𝐹𝑥) = 𝐵)
33 vex 3436 . . . . . . . . . . . . 13 𝑦 ∈ V
34 vex 3436 . . . . . . . . . . . . 13 𝑧 ∈ V
3533, 34breldm 5817 . . . . . . . . . . . 12 (𝑦(curry 𝐹𝑥)𝑧𝑦 ∈ dom (curry 𝐹𝑥))
36 eleq2 2827 . . . . . . . . . . . . 13 (dom (curry 𝐹𝑥) = 𝐵 → (𝑦 ∈ dom (curry 𝐹𝑥) ↔ 𝑦𝐵))
3736biimpa 477 . . . . . . . . . . . 12 ((dom (curry 𝐹𝑥) = 𝐵𝑦 ∈ dom (curry 𝐹𝑥)) → 𝑦𝐵)
3832, 35, 37syl2an 596 . . . . . . . . . . 11 (((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑥𝐴) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
3938an32s 649 . . . . . . . . . 10 (((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) ∧ 𝑥𝐴) → 𝑦𝐵)
4028, 39mpdan 684 . . . . . . . . 9 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → 𝑦𝐵)
4128, 40jca 512 . . . . . . . 8 ((curry 𝐹:𝐴⟶(𝐶m 𝐵) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4212, 41sylan 580 . . . . . . 7 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ 𝑦(curry 𝐹𝑥)𝑧) → (𝑥𝐴𝑦𝐵))
4342stoic1a 1775 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ 𝑦(curry 𝐹𝑥)𝑧)
44 simpl 483 . . . . . . . 8 (((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)) → (𝑥𝐴𝑦𝐵))
4544con3i 154 . . . . . . 7 (¬ (𝑥𝐴𝑦𝐵) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4645adantl 482 . . . . . 6 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → ¬ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦)))
4743, 462falsed 377 . . . . 5 (((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) ∧ ¬ (𝑥𝐴𝑦𝐵)) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4821, 47pm2.61dan 810 . . . 4 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → (𝑦(curry 𝐹𝑥)𝑧 ↔ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))))
4948oprabbidv 7341 . . 3 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧} = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))})
50 df-unc 8084 . . 3 uncurry curry 𝐹 = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ 𝑦(curry 𝐹𝑥)𝑧}
51 df-mpo 7280 . . 3 (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)) = {⟨⟨𝑥, 𝑦⟩, 𝑧⟩ ∣ ((𝑥𝐴𝑦𝐵) ∧ 𝑧 = (𝑥𝐹𝑦))}
5249, 50, 513eqtr4g 2803 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
53 fnov 7405 . . . 4 (𝐹 Fn (𝐴 × 𝐵) ↔ 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
541, 53sylib 217 . . 3 (𝐹:(𝐴 × 𝐵)⟶𝐶𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
55543ad2ant1 1132 . 2 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → 𝐹 = (𝑥𝐴, 𝑦𝐵 ↦ (𝑥𝐹𝑦)))
5652, 55eqtr4d 2781 1 ((𝐹:(𝐴 × 𝐵)⟶𝐶𝐵 ∈ (𝑉 ∖ {∅}) ∧ 𝐶𝑊) → uncurry curry 𝐹 = 𝐹)
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396  w3a 1086   = wceq 1539  wcel 2106  cdif 3884  c0 4256  {csn 4561  cop 4567   class class class wbr 5074   × cxp 5587  dom cdm 5589   Fn wfn 6428  wf 6429  cfv 6433  (class class class)co 7275  {coprab 7276  cmpo 7277  curry ccur 8081  uncurry cunc 8082  m cmap 8615
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 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-rep 5209  ax-sep 5223  ax-nul 5230  ax-pow 5288  ax-pr 5352  ax-un 7588
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-ral 3069  df-rex 3070  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460  df-pw 4535  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-iun 4926  df-br 5075  df-opab 5137  df-mpt 5158  df-id 5489  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-res 5601  df-ima 5602  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441  df-ov 7278  df-oprab 7279  df-mpo 7280  df-1st 7831  df-2nd 7832  df-cur 8083  df-unc 8084  df-map 8617
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator