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

Theorem curry2 7812
 Description: Composition with ◡(1st ↾ (V × {𝐶})) turns any binary operation 𝐹 with a constant second operand into a function 𝐺 of the first operand only. This transformation is called "currying". (If this becomes frequently used, we can introduce a new notation for the hypothesis.) (Contributed by NM, 16-Dec-2008.)
Hypothesis
Ref Expression
curry2.1 𝐺 = (𝐹(1st ↾ (V × {𝐶})))
Assertion
Ref Expression
curry2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → 𝐺 = (𝑥𝐴 ↦ (𝑥𝐹𝐶)))
Distinct variable groups:   𝑥,𝐴   𝑥,𝐵   𝑥,𝐶   𝑥,𝐹   𝑥,𝐺

Proof of Theorem curry2
StepHypRef Expression
1 fnfun 6438 . . . . 5 (𝐹 Fn (𝐴 × 𝐵) → Fun 𝐹)
2 1stconst 7805 . . . . . 6 (𝐶𝐵 → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
3 dff1o3 6612 . . . . . . 7 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ↔ ((1st ↾ (V × {𝐶})):(V × {𝐶})–onto→V ∧ Fun (1st ↾ (V × {𝐶}))))
43simprbi 500 . . . . . 6 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V → Fun (1st ↾ (V × {𝐶})))
52, 4syl 17 . . . . 5 (𝐶𝐵 → Fun (1st ↾ (V × {𝐶})))
6 funco 6379 . . . . 5 ((Fun 𝐹 ∧ Fun (1st ↾ (V × {𝐶}))) → Fun (𝐹(1st ↾ (V × {𝐶}))))
71, 5, 6syl2an 598 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → Fun (𝐹(1st ↾ (V × {𝐶}))))
8 dmco 6088 . . . . 5 dom (𝐹(1st ↾ (V × {𝐶}))) = ((1st ↾ (V × {𝐶})) “ dom 𝐹)
9 fndm 6440 . . . . . . . 8 (𝐹 Fn (𝐴 × 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
109adantr 484 . . . . . . 7 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → dom 𝐹 = (𝐴 × 𝐵))
1110imaeq2d 5905 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → ((1st ↾ (V × {𝐶})) “ dom 𝐹) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)))
12 imacnvcnv 6039 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵))
13 df-ima 5540 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵))
14 resres 5840 . . . . . . . . . 10 ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1514rneqi 5782 . . . . . . . . 9 ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1612, 13, 153eqtri 2785 . . . . . . . 8 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
17 inxp 5677 . . . . . . . . . . . . 13 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵))
18 incom 4108 . . . . . . . . . . . . . . 15 (V ∩ 𝐴) = (𝐴 ∩ V)
19 inv1 4293 . . . . . . . . . . . . . . 15 (𝐴 ∩ V) = 𝐴
2018, 19eqtri 2781 . . . . . . . . . . . . . 14 (V ∩ 𝐴) = 𝐴
2120xpeq1i 5553 . . . . . . . . . . . . 13 ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
2217, 21eqtri 2781 . . . . . . . . . . . 12 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
23 snssi 4701 . . . . . . . . . . . . . 14 (𝐶𝐵 → {𝐶} ⊆ 𝐵)
24 df-ss 3877 . . . . . . . . . . . . . 14 ({𝐶} ⊆ 𝐵 ↔ ({𝐶} ∩ 𝐵) = {𝐶})
2523, 24sylib 221 . . . . . . . . . . . . 13 (𝐶𝐵 → ({𝐶} ∩ 𝐵) = {𝐶})
2625xpeq2d 5557 . . . . . . . . . . . 12 (𝐶𝐵 → (𝐴 × ({𝐶} ∩ 𝐵)) = (𝐴 × {𝐶}))
2722, 26syl5eq 2805 . . . . . . . . . . 11 (𝐶𝐵 → ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × {𝐶}))
2827reseq2d 5827 . . . . . . . . . 10 (𝐶𝐵 → (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = (1st ↾ (𝐴 × {𝐶})))
2928rneqd 5783 . . . . . . . . 9 (𝐶𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = ran (1st ↾ (𝐴 × {𝐶})))
30 1stconst 7805 . . . . . . . . . 10 (𝐶𝐵 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto𝐴)
31 f1ofo 6613 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto𝐴 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto𝐴)
32 forn 6583 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto𝐴 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3330, 31, 323syl 18 . . . . . . . . 9 (𝐶𝐵 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3429, 33eqtrd 2793 . . . . . . . 8 (𝐶𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = 𝐴)
3516, 34syl5eq 2805 . . . . . . 7 (𝐶𝐵 → ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3635adantl 485 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3711, 36eqtrd 2793 . . . . 5 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → ((1st ↾ (V × {𝐶})) “ dom 𝐹) = 𝐴)
388, 37syl5eq 2805 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → dom (𝐹(1st ↾ (V × {𝐶}))) = 𝐴)
39 curry2.1 . . . . . 6 𝐺 = (𝐹(1st ↾ (V × {𝐶})))
4039fneq1i 6435 . . . . 5 (𝐺 Fn 𝐴 ↔ (𝐹(1st ↾ (V × {𝐶}))) Fn 𝐴)
41 df-fn 6342 . . . . 5 ((𝐹(1st ↾ (V × {𝐶}))) Fn 𝐴 ↔ (Fun (𝐹(1st ↾ (V × {𝐶}))) ∧ dom (𝐹(1st ↾ (V × {𝐶}))) = 𝐴))
4240, 41bitri 278 . . . 4 (𝐺 Fn 𝐴 ↔ (Fun (𝐹(1st ↾ (V × {𝐶}))) ∧ dom (𝐹(1st ↾ (V × {𝐶}))) = 𝐴))
437, 38, 42sylanbrc 586 . . 3 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → 𝐺 Fn 𝐴)
44 dffn5 6716 . . 3 (𝐺 Fn 𝐴𝐺 = (𝑥𝐴 ↦ (𝐺𝑥)))
4543, 44sylib 221 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → 𝐺 = (𝑥𝐴 ↦ (𝐺𝑥)))
4639fveq1i 6663 . . . . 5 (𝐺𝑥) = ((𝐹(1st ↾ (V × {𝐶})))‘𝑥)
47 dff1o4 6614 . . . . . . . . 9 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ↔ ((1st ↾ (V × {𝐶})) Fn (V × {𝐶}) ∧ (1st ↾ (V × {𝐶})) Fn V))
482, 47sylib 221 . . . . . . . 8 (𝐶𝐵 → ((1st ↾ (V × {𝐶})) Fn (V × {𝐶}) ∧ (1st ↾ (V × {𝐶})) Fn V))
4948simprd 499 . . . . . . 7 (𝐶𝐵(1st ↾ (V × {𝐶})) Fn V)
50 vex 3413 . . . . . . 7 𝑥 ∈ V
51 fvco2 6753 . . . . . . 7 (((1st ↾ (V × {𝐶})) Fn V ∧ 𝑥 ∈ V) → ((𝐹(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
5249, 50, 51sylancl 589 . . . . . 6 (𝐶𝐵 → ((𝐹(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
5352ad2antlr 726 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → ((𝐹(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
5446, 53syl5eq 2805 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐺𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
552adantr 484 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
5650a1i 11 . . . . . . . . . 10 ((𝐶𝐵𝑥𝐴) → 𝑥 ∈ V)
57 snidg 4559 . . . . . . . . . . 11 (𝐶𝐵𝐶 ∈ {𝐶})
5857adantr 484 . . . . . . . . . 10 ((𝐶𝐵𝑥𝐴) → 𝐶 ∈ {𝐶})
5956, 58opelxpd 5565 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6055, 59jca 515 . . . . . . . 8 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})))
6150a1i 11 . . . . . . . . . . . 12 (𝐶𝐵𝑥 ∈ V)
6261, 57opelxpd 5565 . . . . . . . . . . 11 (𝐶𝐵 → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6362fvresd 6682 . . . . . . . . . 10 (𝐶𝐵 → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
6463adantr 484 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
65 op1stg 7710 . . . . . . . . . 10 ((𝑥𝐴𝐶𝐵) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6665ancoms 462 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6764, 66eqtrd 2793 . . . . . . . 8 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥)
68 f1ocnvfv 7032 . . . . . . . 8 (((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})) → (((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥 → ((1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩))
6960, 67, 68sylc 65 . . . . . . 7 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩)
7069fveq2d 6666 . . . . . 6 ((𝐶𝐵𝑥𝐴) → (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
7170adantll 713 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
72 df-ov 7158 . . . . 5 (𝑥𝐹𝐶) = (𝐹‘⟨𝑥, 𝐶⟩)
7371, 72eqtr4di 2811 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)) = (𝑥𝐹𝐶))
7454, 73eqtrd 2793 . . 3 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐺𝑥) = (𝑥𝐹𝐶))
7574mpteq2dva 5130 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → (𝑥𝐴 ↦ (𝐺𝑥)) = (𝑥𝐴 ↦ (𝑥𝐹𝐶)))
7645, 75eqtrd 2793 1 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → 𝐺 = (𝑥𝐴 ↦ (𝑥𝐹𝐶)))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 399   = wceq 1538   ∈ wcel 2111  Vcvv 3409   ∩ cin 3859   ⊆ wss 3860  {csn 4525  ⟨cop 4531   ↦ cmpt 5115   × cxp 5525  ◡ccnv 5526  dom cdm 5527  ran crn 5528   ↾ cres 5529   “ cima 5530   ∘ ccom 5531  Fun wfun 6333   Fn wfn 6334  –onto→wfo 6337  –1-1-onto→wf1o 6338  ‘cfv 6339  (class class class)co 7155  1st c1st 7696 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2729  ax-sep 5172  ax-nul 5179  ax-pr 5301  ax-un 7464 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3an 1086  df-tru 1541  df-fal 1551  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2557  df-eu 2588  df-clab 2736  df-cleq 2750  df-clel 2830  df-nfc 2901  df-ne 2952  df-ral 3075  df-rex 3076  df-rab 3079  df-v 3411  df-sbc 3699  df-csb 3808  df-dif 3863  df-un 3865  df-in 3867  df-ss 3877  df-nul 4228  df-if 4424  df-sn 4526  df-pr 4528  df-op 4532  df-uni 4802  df-iun 4888  df-br 5036  df-opab 5098  df-mpt 5116  df-id 5433  df-xp 5533  df-rel 5534  df-cnv 5535  df-co 5536  df-dm 5537  df-rn 5538  df-res 5539  df-ima 5540  df-iota 6298  df-fun 6341  df-fn 6342  df-f 6343  df-f1 6344  df-fo 6345  df-f1o 6346  df-fv 6347  df-ov 7158  df-1st 7698  df-2nd 7699 This theorem is referenced by:  curry2f  7813  curry2val  7814
 Copyright terms: Public domain W3C validator