Metamath Proof Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >  mpt2curryd Structured version   Visualization version   GIF version

Theorem mpt2curryd 7282
 Description: The currying of an operation given in maps-to notation, splitting the operation (function of two arguments) into a function of the first argument, producing a function over the second argument. (Contributed by AV, 27-Oct-2019.)
Hypotheses
Ref Expression
mpt2curryd.f 𝐹 = (𝑥𝑋, 𝑦𝑌𝐶)
mpt2curryd.c (𝜑 → ∀𝑥𝑋𝑦𝑌 𝐶𝑉)
mpt2curryd.n (𝜑𝑌 ≠ ∅)
Assertion
Ref Expression
mpt2curryd (𝜑 → curry 𝐹 = (𝑥𝑋 ↦ (𝑦𝑌𝐶)))
Distinct variable groups:   𝑥,𝐹,𝑦   𝑥,𝑉,𝑦   𝑥,𝑋,𝑦   𝑥,𝑌,𝑦   𝜑,𝑥,𝑦
Allowed substitution hints:   𝐶(𝑥,𝑦)

Proof of Theorem mpt2curryd
Dummy variables 𝑎 𝑏 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-cur 7280 . 2 curry 𝐹 = (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧})
2 mpt2curryd.c . . . . . . 7 (𝜑 → ∀𝑥𝑋𝑦𝑌 𝐶𝑉)
3 mpt2curryd.f . . . . . . . 8 𝐹 = (𝑥𝑋, 𝑦𝑌𝐶)
43dmmpt2ga 7131 . . . . . . 7 (∀𝑥𝑋𝑦𝑌 𝐶𝑉 → dom 𝐹 = (𝑋 × 𝑌))
52, 4syl 17 . . . . . 6 (𝜑 → dom 𝐹 = (𝑋 × 𝑌))
65dmeqd 5248 . . . . 5 (𝜑 → dom dom 𝐹 = dom (𝑋 × 𝑌))
7 mpt2curryd.n . . . . . 6 (𝜑𝑌 ≠ ∅)
8 dmxp 5265 . . . . . 6 (𝑌 ≠ ∅ → dom (𝑋 × 𝑌) = 𝑋)
97, 8syl 17 . . . . 5 (𝜑 → dom (𝑋 × 𝑌) = 𝑋)
106, 9eqtrd 2644 . . . 4 (𝜑 → dom dom 𝐹 = 𝑋)
1110mpteq1d 4666 . . 3 (𝜑 → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝑋 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}))
12 df-mpt 4645 . . . . 5 (𝑦𝑌𝐶) = {⟨𝑦, 𝑧⟩ ∣ (𝑦𝑌𝑧 = 𝐶)}
133mpt2fun 6660 . . . . . . . 8 Fun 𝐹
14 funbrfv2b 6150 . . . . . . . 8 (Fun 𝐹 → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
1513, 14mp1i 13 . . . . . . 7 ((𝜑𝑥𝑋) → (⟨𝑥, 𝑦𝐹𝑧 ↔ (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
165adantr 480 . . . . . . . . . 10 ((𝜑𝑥𝑋) → dom 𝐹 = (𝑋 × 𝑌))
1716eleq2d 2673 . . . . . . . . 9 ((𝜑𝑥𝑋) → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ ⟨𝑥, 𝑦⟩ ∈ (𝑋 × 𝑌)))
18 opelxp 5070 . . . . . . . . 9 (⟨𝑥, 𝑦⟩ ∈ (𝑋 × 𝑌) ↔ (𝑥𝑋𝑦𝑌))
1917, 18syl6bb 275 . . . . . . . 8 ((𝜑𝑥𝑋) → (⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ↔ (𝑥𝑋𝑦𝑌)))
2019anbi1d 737 . . . . . . 7 ((𝜑𝑥𝑋) → ((⟨𝑥, 𝑦⟩ ∈ dom 𝐹 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ ((𝑥𝑋𝑦𝑌) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
21 an32 835 . . . . . . . . 9 (((𝑥𝑋𝑦𝑌) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ ((𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ∧ 𝑦𝑌))
22 ancom 465 . . . . . . . . 9 (((𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ∧ 𝑦𝑌) ↔ (𝑦𝑌 ∧ (𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2321, 22bitri 263 . . . . . . . 8 (((𝑥𝑋𝑦𝑌) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝑌 ∧ (𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
24 ibar 524 . . . . . . . . . . . . 13 (𝑥𝑋 → ((𝐹‘⟨𝑥, 𝑦⟩) = 𝑧 ↔ (𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)))
2524bicomd 212 . . . . . . . . . . . 12 (𝑥𝑋 → ((𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
2625adantl 481 . . . . . . . . . . 11 ((𝜑𝑥𝑋) → ((𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
2726adantr 480 . . . . . . . . . 10 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → ((𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧))
28 df-ov 6552 . . . . . . . . . . . . 13 (𝑥𝐹𝑦) = (𝐹‘⟨𝑥, 𝑦⟩)
29 nfcv 2751 . . . . . . . . . . . . . . . . 17 𝑎𝐶
30 nfcv 2751 . . . . . . . . . . . . . . . . 17 𝑏𝐶
31 nfcv 2751 . . . . . . . . . . . . . . . . . 18 𝑥𝑏
32 nfcsb1v 3515 . . . . . . . . . . . . . . . . . 18 𝑥𝑎 / 𝑥𝐶
3331, 32nfcsb 3517 . . . . . . . . . . . . . . . . 17 𝑥𝑏 / 𝑦𝑎 / 𝑥𝐶
34 nfcsb1v 3515 . . . . . . . . . . . . . . . . 17 𝑦𝑏 / 𝑦𝑎 / 𝑥𝐶
35 csbeq1a 3508 . . . . . . . . . . . . . . . . . 18 (𝑥 = 𝑎𝐶 = 𝑎 / 𝑥𝐶)
36 csbeq1a 3508 . . . . . . . . . . . . . . . . . 18 (𝑦 = 𝑏𝑎 / 𝑥𝐶 = 𝑏 / 𝑦𝑎 / 𝑥𝐶)
3735, 36sylan9eq 2664 . . . . . . . . . . . . . . . . 17 ((𝑥 = 𝑎𝑦 = 𝑏) → 𝐶 = 𝑏 / 𝑦𝑎 / 𝑥𝐶)
3829, 30, 33, 34, 37cbvmpt2 6632 . . . . . . . . . . . . . . . 16 (𝑥𝑋, 𝑦𝑌𝐶) = (𝑎𝑋, 𝑏𝑌𝑏 / 𝑦𝑎 / 𝑥𝐶)
393, 38eqtri 2632 . . . . . . . . . . . . . . 15 𝐹 = (𝑎𝑋, 𝑏𝑌𝑏 / 𝑦𝑎 / 𝑥𝐶)
4039a1i 11 . . . . . . . . . . . . . 14 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → 𝐹 = (𝑎𝑋, 𝑏𝑌𝑏 / 𝑦𝑎 / 𝑥𝐶))
4135eqcomd 2616 . . . . . . . . . . . . . . . . . 18 (𝑥 = 𝑎𝑎 / 𝑥𝐶 = 𝐶)
4241equcoms 1934 . . . . . . . . . . . . . . . . 17 (𝑎 = 𝑥𝑎 / 𝑥𝐶 = 𝐶)
4342csbeq2dv 3944 . . . . . . . . . . . . . . . 16 (𝑎 = 𝑥𝑏 / 𝑦𝑎 / 𝑥𝐶 = 𝑏 / 𝑦𝐶)
44 csbeq1a 3508 . . . . . . . . . . . . . . . . . 18 (𝑦 = 𝑏𝐶 = 𝑏 / 𝑦𝐶)
4544eqcomd 2616 . . . . . . . . . . . . . . . . 17 (𝑦 = 𝑏𝑏 / 𝑦𝐶 = 𝐶)
4645equcoms 1934 . . . . . . . . . . . . . . . 16 (𝑏 = 𝑦𝑏 / 𝑦𝐶 = 𝐶)
4743, 46sylan9eq 2664 . . . . . . . . . . . . . . 15 ((𝑎 = 𝑥𝑏 = 𝑦) → 𝑏 / 𝑦𝑎 / 𝑥𝐶 = 𝐶)
4847adantl 481 . . . . . . . . . . . . . 14 ((((𝜑𝑥𝑋) ∧ 𝑦𝑌) ∧ (𝑎 = 𝑥𝑏 = 𝑦)) → 𝑏 / 𝑦𝑎 / 𝑥𝐶 = 𝐶)
49 simpr 476 . . . . . . . . . . . . . . 15 ((𝜑𝑥𝑋) → 𝑥𝑋)
5049adantr 480 . . . . . . . . . . . . . 14 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → 𝑥𝑋)
51 simpr 476 . . . . . . . . . . . . . 14 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → 𝑦𝑌)
52 rsp2 2920 . . . . . . . . . . . . . . . 16 (∀𝑥𝑋𝑦𝑌 𝐶𝑉 → ((𝑥𝑋𝑦𝑌) → 𝐶𝑉))
532, 52syl 17 . . . . . . . . . . . . . . 15 (𝜑 → ((𝑥𝑋𝑦𝑌) → 𝐶𝑉))
5453impl 648 . . . . . . . . . . . . . 14 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → 𝐶𝑉)
5540, 48, 50, 51, 54ovmpt2d 6686 . . . . . . . . . . . . 13 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → (𝑥𝐹𝑦) = 𝐶)
5628, 55syl5eqr 2658 . . . . . . . . . . . 12 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → (𝐹‘⟨𝑥, 𝑦⟩) = 𝐶)
5756eqeq1d 2612 . . . . . . . . . . 11 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → ((𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝐶 = 𝑧))
58 eqcom 2617 . . . . . . . . . . 11 (𝐶 = 𝑧𝑧 = 𝐶)
5957, 58syl6bb 275 . . . . . . . . . 10 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → ((𝐹‘⟨𝑥, 𝑦⟩) = 𝑧𝑧 = 𝐶))
6027, 59bitrd 267 . . . . . . . . 9 (((𝜑𝑥𝑋) ∧ 𝑦𝑌) → ((𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ 𝑧 = 𝐶))
6160pm5.32da 671 . . . . . . . 8 ((𝜑𝑥𝑋) → ((𝑦𝑌 ∧ (𝑥𝑋 ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧)) ↔ (𝑦𝑌𝑧 = 𝐶)))
6223, 61syl5bb 271 . . . . . . 7 ((𝜑𝑥𝑋) → (((𝑥𝑋𝑦𝑌) ∧ (𝐹‘⟨𝑥, 𝑦⟩) = 𝑧) ↔ (𝑦𝑌𝑧 = 𝐶)))
6315, 20, 623bitrrd 294 . . . . . 6 ((𝜑𝑥𝑋) → ((𝑦𝑌𝑧 = 𝐶) ↔ ⟨𝑥, 𝑦𝐹𝑧))
6463opabbidv 4648 . . . . 5 ((𝜑𝑥𝑋) → {⟨𝑦, 𝑧⟩ ∣ (𝑦𝑌𝑧 = 𝐶)} = {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧})
6512, 64syl5req 2657 . . . 4 ((𝜑𝑥𝑋) → {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧} = (𝑦𝑌𝐶))
6665mpteq2dva 4672 . . 3 (𝜑 → (𝑥𝑋 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝑋 ↦ (𝑦𝑌𝐶)))
6711, 66eqtrd 2644 . 2 (𝜑 → (𝑥 ∈ dom dom 𝐹 ↦ {⟨𝑦, 𝑧⟩ ∣ ⟨𝑥, 𝑦𝐹𝑧}) = (𝑥𝑋 ↦ (𝑦𝑌𝐶)))
681, 67syl5eq 2656 1 (𝜑 → curry 𝐹 = (𝑥𝑋 ↦ (𝑦𝑌𝐶)))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 195   ∧ wa 383   = wceq 1475   ∈ wcel 1977   ≠ wne 2780  ∀wral 2896  ⦋csb 3499  ∅c0 3874  ⟨cop 4131   class class class wbr 4583  {copab 4642   ↦ cmpt 4643   × cxp 5036  dom cdm 5038  Fun wfun 5798  ‘cfv 5804  (class class class)co 6549   ↦ cmpt2 6551  curry ccur 7278 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-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-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-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-fv 5812  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-1st 7059  df-2nd 7060  df-cur 7280 This theorem is referenced by:  mpt2curryvald  7283  curfv  32559
 Copyright terms: Public domain W3C validator