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

Theorem curry2 7802
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 6453 . . . . 5 (𝐹 Fn (𝐴 × 𝐵) → Fun 𝐹)
2 1stconst 7795 . . . . . 6 (𝐶𝐵 → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
3 dff1o3 6621 . . . . . . 7 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ↔ ((1st ↾ (V × {𝐶})):(V × {𝐶})–onto→V ∧ Fun (1st ↾ (V × {𝐶}))))
43simprbi 499 . . . . . 6 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V → Fun (1st ↾ (V × {𝐶})))
52, 4syl 17 . . . . 5 (𝐶𝐵 → Fun (1st ↾ (V × {𝐶})))
6 funco 6395 . . . . 5 ((Fun 𝐹 ∧ Fun (1st ↾ (V × {𝐶}))) → Fun (𝐹(1st ↾ (V × {𝐶}))))
71, 5, 6syl2an 597 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → Fun (𝐹(1st ↾ (V × {𝐶}))))
8 dmco 6107 . . . . 5 dom (𝐹(1st ↾ (V × {𝐶}))) = ((1st ↾ (V × {𝐶})) “ dom 𝐹)
9 fndm 6455 . . . . . . . 8 (𝐹 Fn (𝐴 × 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
109adantr 483 . . . . . . 7 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → dom 𝐹 = (𝐴 × 𝐵))
1110imaeq2d 5929 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → ((1st ↾ (V × {𝐶})) “ dom 𝐹) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)))
12 imacnvcnv 6063 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵))
13 df-ima 5568 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵))
14 resres 5866 . . . . . . . . . 10 ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1514rneqi 5807 . . . . . . . . 9 ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1612, 13, 153eqtri 2848 . . . . . . . 8 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
17 inxp 5703 . . . . . . . . . . . . 13 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵))
18 incom 4178 . . . . . . . . . . . . . . 15 (V ∩ 𝐴) = (𝐴 ∩ V)
19 inv1 4348 . . . . . . . . . . . . . . 15 (𝐴 ∩ V) = 𝐴
2018, 19eqtri 2844 . . . . . . . . . . . . . 14 (V ∩ 𝐴) = 𝐴
2120xpeq1i 5581 . . . . . . . . . . . . 13 ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
2217, 21eqtri 2844 . . . . . . . . . . . 12 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
23 snssi 4741 . . . . . . . . . . . . . 14 (𝐶𝐵 → {𝐶} ⊆ 𝐵)
24 df-ss 3952 . . . . . . . . . . . . . 14 ({𝐶} ⊆ 𝐵 ↔ ({𝐶} ∩ 𝐵) = {𝐶})
2523, 24sylib 220 . . . . . . . . . . . . 13 (𝐶𝐵 → ({𝐶} ∩ 𝐵) = {𝐶})
2625xpeq2d 5585 . . . . . . . . . . . 12 (𝐶𝐵 → (𝐴 × ({𝐶} ∩ 𝐵)) = (𝐴 × {𝐶}))
2722, 26syl5eq 2868 . . . . . . . . . . 11 (𝐶𝐵 → ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × {𝐶}))
2827reseq2d 5853 . . . . . . . . . 10 (𝐶𝐵 → (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = (1st ↾ (𝐴 × {𝐶})))
2928rneqd 5808 . . . . . . . . 9 (𝐶𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = ran (1st ↾ (𝐴 × {𝐶})))
30 1stconst 7795 . . . . . . . . . 10 (𝐶𝐵 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto𝐴)
31 f1ofo 6622 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto𝐴 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto𝐴)
32 forn 6593 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto𝐴 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3330, 31, 323syl 18 . . . . . . . . 9 (𝐶𝐵 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3429, 33eqtrd 2856 . . . . . . . 8 (𝐶𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = 𝐴)
3516, 34syl5eq 2868 . . . . . . 7 (𝐶𝐵 → ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3635adantl 484 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3711, 36eqtrd 2856 . . . . 5 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → ((1st ↾ (V × {𝐶})) “ dom 𝐹) = 𝐴)
388, 37syl5eq 2868 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → dom (𝐹(1st ↾ (V × {𝐶}))) = 𝐴)
39 curry2.1 . . . . . 6 𝐺 = (𝐹(1st ↾ (V × {𝐶})))
4039fneq1i 6450 . . . . 5 (𝐺 Fn 𝐴 ↔ (𝐹(1st ↾ (V × {𝐶}))) Fn 𝐴)
41 df-fn 6358 . . . . 5 ((𝐹(1st ↾ (V × {𝐶}))) Fn 𝐴 ↔ (Fun (𝐹(1st ↾ (V × {𝐶}))) ∧ dom (𝐹(1st ↾ (V × {𝐶}))) = 𝐴))
4240, 41bitri 277 . . . 4 (𝐺 Fn 𝐴 ↔ (Fun (𝐹(1st ↾ (V × {𝐶}))) ∧ dom (𝐹(1st ↾ (V × {𝐶}))) = 𝐴))
437, 38, 42sylanbrc 585 . . 3 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → 𝐺 Fn 𝐴)
44 dffn5 6724 . . 3 (𝐺 Fn 𝐴𝐺 = (𝑥𝐴 ↦ (𝐺𝑥)))
4543, 44sylib 220 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → 𝐺 = (𝑥𝐴 ↦ (𝐺𝑥)))
4639fveq1i 6671 . . . . 5 (𝐺𝑥) = ((𝐹(1st ↾ (V × {𝐶})))‘𝑥)
47 dff1o4 6623 . . . . . . . . 9 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ↔ ((1st ↾ (V × {𝐶})) Fn (V × {𝐶}) ∧ (1st ↾ (V × {𝐶})) Fn V))
482, 47sylib 220 . . . . . . . 8 (𝐶𝐵 → ((1st ↾ (V × {𝐶})) Fn (V × {𝐶}) ∧ (1st ↾ (V × {𝐶})) Fn V))
4948simprd 498 . . . . . . 7 (𝐶𝐵(1st ↾ (V × {𝐶})) Fn V)
50 vex 3497 . . . . . . 7 𝑥 ∈ V
51 fvco2 6758 . . . . . . 7 (((1st ↾ (V × {𝐶})) Fn V ∧ 𝑥 ∈ V) → ((𝐹(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
5249, 50, 51sylancl 588 . . . . . 6 (𝐶𝐵 → ((𝐹(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
5352ad2antlr 725 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → ((𝐹(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
5446, 53syl5eq 2868 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐺𝑥) = (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)))
552adantr 483 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
5650a1i 11 . . . . . . . . . 10 ((𝐶𝐵𝑥𝐴) → 𝑥 ∈ V)
57 snidg 4599 . . . . . . . . . . 11 (𝐶𝐵𝐶 ∈ {𝐶})
5857adantr 483 . . . . . . . . . 10 ((𝐶𝐵𝑥𝐴) → 𝐶 ∈ {𝐶})
5956, 58opelxpd 5593 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6055, 59jca 514 . . . . . . . 8 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})))
6150a1i 11 . . . . . . . . . . . 12 (𝐶𝐵𝑥 ∈ V)
6261, 57opelxpd 5593 . . . . . . . . . . 11 (𝐶𝐵 → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6362fvresd 6690 . . . . . . . . . 10 (𝐶𝐵 → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
6463adantr 483 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
65 op1stg 7701 . . . . . . . . . 10 ((𝑥𝐴𝐶𝐵) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6665ancoms 461 . . . . . . . . 9 ((𝐶𝐵𝑥𝐴) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6764, 66eqtrd 2856 . . . . . . . 8 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥)
68 f1ocnvfv 7035 . . . . . . . 8 (((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})) → (((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥 → ((1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩))
6960, 67, 68sylc 65 . . . . . . 7 ((𝐶𝐵𝑥𝐴) → ((1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩)
7069fveq2d 6674 . . . . . 6 ((𝐶𝐵𝑥𝐴) → (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
7170adantll 712 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
72 df-ov 7159 . . . . 5 (𝑥𝐹𝐶) = (𝐹‘⟨𝑥, 𝐶⟩)
7371, 72syl6eqr 2874 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐹‘((1st ↾ (V × {𝐶}))‘𝑥)) = (𝑥𝐹𝐶))
7454, 73eqtrd 2856 . . 3 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) ∧ 𝑥𝐴) → (𝐺𝑥) = (𝑥𝐹𝐶))
7574mpteq2dva 5161 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → (𝑥𝐴 ↦ (𝐺𝑥)) = (𝑥𝐴 ↦ (𝑥𝐹𝐶)))
7645, 75eqtrd 2856 1 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶𝐵) → 𝐺 = (𝑥𝐴 ↦ (𝑥𝐹𝐶)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 398   = wceq 1537  wcel 2114  Vcvv 3494  cin 3935  wss 3936  {csn 4567  cop 4573  cmpt 5146   × cxp 5553  ccnv 5554  dom cdm 5555  ran crn 5556  cres 5557  cima 5558  ccom 5559  Fun wfun 6349   Fn wfn 6350  ontowfo 6353  1-1-ontowf1o 6354  cfv 6355  (class class class)co 7156  1st c1st 7687
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1796  ax-4 1810  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2161  ax-12 2177  ax-ext 2793  ax-sep 5203  ax-nul 5210  ax-pow 5266  ax-pr 5330  ax-un 7461
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3an 1085  df-tru 1540  df-ex 1781  df-nf 1785  df-sb 2070  df-mo 2622  df-eu 2654  df-clab 2800  df-cleq 2814  df-clel 2893  df-nfc 2963  df-ne 3017  df-ral 3143  df-rex 3144  df-rab 3147  df-v 3496  df-sbc 3773  df-csb 3884  df-dif 3939  df-un 3941  df-in 3943  df-ss 3952  df-nul 4292  df-if 4468  df-sn 4568  df-pr 4570  df-op 4574  df-uni 4839  df-iun 4921  df-br 5067  df-opab 5129  df-mpt 5147  df-id 5460  df-xp 5561  df-rel 5562  df-cnv 5563  df-co 5564  df-dm 5565  df-rn 5566  df-res 5567  df-ima 5568  df-iota 6314  df-fun 6357  df-fn 6358  df-f 6359  df-f1 6360  df-fo 6361  df-f1o 6362  df-fv 6363  df-ov 7159  df-1st 7689  df-2nd 7690
This theorem is referenced by:  curry2f  7803  curry2val  7804
  Copyright terms: Public domain W3C validator