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

Theorem curry2 8120
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 6639 . . . . 5 (𝐹 Fn (𝐴 × 𝐵) → Fun 𝐹)
2 1stconst 8113 . . . . . 6 (𝐶 ∈ 𝐵 → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
3 dff1o3 6831 . . . . . . 7 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ↔ ((1st ↾ (V × {𝐶})):(V × {𝐶})–onto→V ∧ Fun ◡(1st ↾ (V × {𝐶}))))
43simprbi 503 . . . . . 6 ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V → Fun ◡(1st ↾ (V × {𝐶})))
52, 4syl 18 . . . . 5 (𝐶 ∈ 𝐵 → Fun ◡(1st ↾ (V × {𝐶})))
6 funco 6580 . . . . 5 ((Fun 𝐹 ∧ Fun ◡(1st ↾ (V × {𝐶}))) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
71, 5, 6syl2an 608 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
8 dmco 6256 . . . . 5 dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹)
9 fndm 6642 . . . . . . . 8 (𝐹 Fn (𝐴 × 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
109adantr 486 . . . . . . 7 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
1110imaeq2d 6051 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)))
12 imacnvcnv 6207 . . . . . . . . 9 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵))
13 df-ima 5663 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵))
14 resres 5982 . . . . . . . . . 10 ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1514rneqi 5918 . . . . . . . . 9 ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1612, 13, 153eqtri 2787 . . . . . . . 8 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
17 inxp 5808 . . . . . . . . . . . . 13 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵))
18 incom 4106 . . . . . . . . . . . . . . 15 (V ∩ 𝐴) = (𝐴 ∩ V)
19 inv1 4347 . . . . . . . . . . . . . . 15 (𝐴 ∩ V) = 𝐴
2018, 19eqtri 2783 . . . . . . . . . . . . . 14 (V ∩ 𝐴) = 𝐴
2120xpeq1i 5676 . . . . . . . . . . . . 13 ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
2217, 21eqtri 2783 . . . . . . . . . . . 12 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
23 snssi 4742 . . . . . . . . . . . . . 14 (𝐶 ∈ 𝐵 → {𝐶} ⊆ 𝐵)
24 dfss2 4094 . . . . . . . . . . . . . 14 ({𝐶} ⊆ 𝐵 ↔ ({𝐶} ∩ 𝐵) = {𝐶})
2523, 24sylib 221 . . . . . . . . . . . . 13 (𝐶 ∈ 𝐵 → ({𝐶} ∩ 𝐵) = {𝐶})
2625xpeq2d 5680 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → (𝐴 × ({𝐶} ∩ 𝐵)) = (𝐴 × {𝐶}))
2722, 26eqtrid 2807 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × {𝐶}))
2827reseq2d 5969 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = (1st ↾ (𝐴 × {𝐶})))
2928rneqd 5919 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = ran (1st ↾ (𝐴 × {𝐶})))
30 1stconst 8113 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto→𝐴)
31 f1ofo 6832 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto→𝐴 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto→𝐴)
32 forn 6799 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto→𝐴 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3330, 31, 323syl 19 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3429, 33eqtrd 2795 . . . . . . . 8 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = 𝐴)
3516, 34eqtrid 2807 . . . . . . 7 (𝐶 ∈ 𝐵 → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3635adantl 487 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3711, 36eqtrd 2795 . . . . 5 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = 𝐴)
388, 37eqtrid 2807 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = 𝐴)
39 curry2.1 . . . . . 6 𝐺 = (𝐹 ∘ ◡(1st ↾ (V × {𝐶})))
4039fneq1i 6636 . . . . 5 (𝐺 Fn 𝐴 ↔ (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) Fn 𝐴)
41 df-fn 6541 . . . . 5 ((𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) Fn 𝐴 ↔ (Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) ∧ dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = 𝐴))
4240, 41bitri 278 . . . 4 (𝐺 Fn 𝐴 ↔ (Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) ∧ dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = 𝐴))
437, 38, 42sylanbrc 595 . . 3 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 Fn 𝐴)
44 dffn5 6943 . . 3 (𝐺 Fn 𝐴 ↔ 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4543, 44sylib 221 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4639fveq1i 6886 . . . . 5 (𝐺‘𝑥) = ((𝐹 ∘ ◡(1st ↾ (V × {𝐶})))‘𝑥)
47 dff1o4 6833 . . . . . . . . 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 501 . . . . . . 7 (𝐶 ∈ 𝐵 → ◡(1st ↾ (V × {𝐶})) Fn V)
50 vex 3454 . . . . . . 7 𝑥 ∈ V
51 fvco2 6982 . . . . . . 7 ((◡(1st ↾ (V × {𝐶})) Fn V ∧ 𝑥 ∈ V) → ((𝐹 ∘ ◡(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)))
5249, 50, 51sylancl 598 . . . . . 6 (𝐶 ∈ 𝐵 → ((𝐹 ∘ ◡(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)))
5352ad2antlr 740 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → ((𝐹 ∘ ◡(1st ↾ (V × {𝐶})))‘𝑥) = (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)))
5446, 53eqtrid 2807 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)))
552adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
5650a1i 11 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝑥 ∈ V)
57 snidg 4617 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → 𝐶 ∈ {𝐶})
5857adantr 486 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝐶 ∈ {𝐶})
5956, 58opelxpd 5689 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6055, 59jca 521 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})))
6150a1i 11 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → 𝑥 ∈ V)
6261, 57opelxpd 5689 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6362fvresd 6905 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
6463adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
65 op1stg 8013 . . . . . . . . . 10 ((𝑥 ∈ 𝐴 ∧ 𝐶 ∈ 𝐵) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6665ancoms 464 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6764, 66eqtrd 2795 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥)
68 f1ocnvfv 7286 . . . . . . . 8 (((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})) → (((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥 → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩))
6960, 67, 68sylc 66 . . . . . . 7 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩)
7069fveq2d 6889 . . . . . 6 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
7170adantll 727 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
72 df-ov 7423 . . . . 5 (𝑥𝐹𝐶) = (𝐹‘⟨𝑥, 𝐶⟩)
7371, 72eqtr4di 2813 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝑥𝐹𝐶))
7454, 73eqtrd 2795 . . 3 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝑥𝐹𝐶))
7574mpteq2dva 5197 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)) = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
7645, 75eqtrd 2795 1 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ∧ wa 401   = wceq 1569   ∈ wcel 2144  Vcvv 3450   ⊆ wss 3895   ∩ cin 4089  {csn 4584  ⟨cop 4834   ↦ cmpt 5185   × cxp 5648  ◡ccnv 5649  dom cdm 5650  ran crn 5651   ↾ cres 5652   “ cima 5653   ∘ ccom 5654  Fun wfun 6532   Fn wfn 6533  –onto→wfo 6536  –1-1-onto→wf1o 6537  ‘cfv 6538  (class class class)co 7420  1st c1st 7999
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1827  ax-4 1841  ax-5 1942  ax-6 1999  ax-7 2040  ax-8 2146  ax-9 2154  ax-10 2177  ax-11 2193  ax-12 2212  ax-ext 2732  ax-sep 5248  ax-nul 5259  ax-pr 5390  ax-un 7751
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1105  df-tru 1572  df-fal 1582  df-ex 1812  df-nf 1816  df-sb 2099  df-mo 2564  df-eu 2594  df-clab 2739  df-cleq 2752  df-clel 2835  df-nfc 2909  df-ne 2956  df-ral 3077  df-rex 3087  df-rab 3413  df-v 3452  df-sbc 3739  df-csb 3847  df-ss 3896  df-dif 4047  df-in 4091  df-un 4151  df-nul 4279  df-if 4482  df-sn 4585  df-pr 4587  df-op 4835  df-uni 4867  df-iun 4952  df-br 5103  df-opab 5167  df-mpt 5186  df-id 5545  df-xp 5656  df-rel 5657  df-cnv 5658  df-co 5659  df-dm 5660  df-rn 5661  df-res 5662  df-ima 5663  df-iota 6494  df-fun 6540  df-fn 6541  df-f 6542  df-f1 6543  df-fo 6544  df-f1o 6545  df-fv 6546  df-ov 7423  df-1st 8001  df-2nd 8002
This theorem is used by:  curry2f  8121  curry2val  8122
  Copyright terms: Public domain W3C validator