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

Theorem curry2 8107
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 6631 . . . . 5 (𝐹 Fn (𝐴 × 𝐵) → Fun 𝐹)
2 1stconst 8100 . . . . . 6 (𝐶 ∈ 𝐵 → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
3 dff1o3 6823 . . . . . . 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 6572 . . . . 5 ((Fun 𝐹 ∧ Fun ◡(1st ↾ (V × {𝐶}))) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
71, 5, 6syl2an 608 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
8 dmco 6249 . . . . 5 dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹)
9 fndm 6634 . . . . . . . 8 (𝐹 Fn (𝐴 × 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
109adantr 486 . . . . . . 7 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
1110imaeq2d 6054 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)))
12 imacnvcnv 6200 . . . . . . . . 9 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵))
13 df-ima 5664 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵))
14 resres 5983 . . . . . . . . . 10 ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1514rneqi 5919 . . . . . . . . 9 ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1612, 13, 153eqtri 2788 . . . . . . . 8 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
17 inxp 5809 . . . . . . . . . . . . 13 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵))
18 incom 4155 . . . . . . . . . . . . . . 15 (V ∩ 𝐴) = (𝐴 ∩ V)
19 inv1 4348 . . . . . . . . . . . . . . 15 (𝐴 ∩ V) = 𝐴
2018, 19eqtri 2784 . . . . . . . . . . . . . 14 (V ∩ 𝐴) = 𝐴
2120xpeq1i 5677 . . . . . . . . . . . . 13 ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
2217, 21eqtri 2784 . . . . . . . . . . . 12 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
23 snssi 4746 . . . . . . . . . . . . . 14 (𝐶 ∈ 𝐵 → {𝐶} ⊆ 𝐵)
24 dfss2 3917 . . . . . . . . . . . . . 14 ({𝐶} ⊆ 𝐵 ↔ ({𝐶} ∩ 𝐵) = {𝐶})
2523, 24sylib 221 . . . . . . . . . . . . 13 (𝐶 ∈ 𝐵 → ({𝐶} ∩ 𝐵) = {𝐶})
2625xpeq2d 5681 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → (𝐴 × ({𝐶} ∩ 𝐵)) = (𝐴 × {𝐶}))
2722, 26eqtrid 2808 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × {𝐶}))
2827reseq2d 5970 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = (1st ↾ (𝐴 × {𝐶})))
2928rneqd 5920 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = ran (1st ↾ (𝐴 × {𝐶})))
30 1stconst 8100 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto→𝐴)
31 f1ofo 6824 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–1-1-onto→𝐴 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto→𝐴)
32 forn 6791 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})–onto→𝐴 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3330, 31, 323syl 19 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3429, 33eqtrd 2796 . . . . . . . 8 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = 𝐴)
3516, 34eqtrid 2808 . . . . . . 7 (𝐶 ∈ 𝐵 → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3635adantl 487 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3711, 36eqtrd 2796 . . . . 5 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = 𝐴)
388, 37eqtrid 2808 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = 𝐴)
39 curry2.1 . . . . . 6 𝐺 = (𝐹 ∘ ◡(1st ↾ (V × {𝐶})))
4039fneq1i 6628 . . . . 5 (𝐺 Fn 𝐴 ↔ (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) Fn 𝐴)
41 df-fn 6534 . . . . 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 6935 . . 3 (𝐺 Fn 𝐴 ↔ 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4543, 44sylib 221 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4639fveq1i 6878 . . . . 5 (𝐺‘𝑥) = ((𝐹 ∘ ◡(1st ↾ (V × {𝐶})))‘𝑥)
47 dff1o4 6825 . . . . . . . . 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 3455 . . . . . . 7 𝑥 ∈ V
51 fvco2 6974 . . . . . . 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 2808 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)))
552adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V)
5650a1i 11 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝑥 ∈ V)
57 snidg 4621 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → 𝐶 ∈ {𝐶})
5857adantr 486 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝐶 ∈ {𝐶})
5956, 58opelxpd 5690 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6055, 59jca 521 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})))
6150a1i 11 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → 𝑥 ∈ V)
6261, 57opelxpd 5690 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6362fvresd 6897 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
6463adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
65 op1stg 8002 . . . . . . . . . 10 ((𝑥 ∈ 𝐴 ∧ 𝐶 ∈ 𝐵) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6665ancoms 464 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6764, 66eqtrd 2796 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥)
68 f1ocnvfv 7278 . . . . . . . 8 (((1st ↾ (V × {𝐶})):(V × {𝐶})–1-1-onto→V ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})) → (((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥 → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩))
6960, 67, 68sylc 66 . . . . . . 7 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩)
7069fveq2d 6881 . . . . . 6 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
7170adantll 727 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
72 df-ov 7415 . . . . 5 (𝑥𝐹𝐶) = (𝐹‘⟨𝑥, 𝐶⟩)
7371, 72eqtr4di 2814 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝑥𝐹𝐶))
7454, 73eqtrd 2796 . . 3 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝑥𝐹𝐶))
7574mpteq2dva 5198 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)) = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
7645, 75eqtrd 2796 1 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ∧ wa 401   = wceq 1570   ∈ wcel 2145  Vcvv 3451   ∩ cin 3898   ⊆ wss 3899  {csn 4584  ⟨cop 4590   ↦ cmpt 5186   × cxp 5649  ◡ccnv 5650  dom cdm 5651  ran crn 5652   ↾ cres 5653   “ cima 5654   ∘ ccom 5655  Fun wfun 6525   Fn wfn 6526  –onto→wfo 6529  –1-1-onto→wf1o 6530  ‘cfv 6531  (class class class)co 7412  1st c1st 7988
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733  ax-sep 5249  ax-nul 5260  ax-pr 5391  ax-un 7740
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ne 2957  df-ral 3078  df-rex 3088  df-rab 3414  df-v 3453  df-sbc 3740  df-csb 3848  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-nul 4280  df-if 4483  df-sn 4585  df-pr 4587  df-op 4591  df-uni 4868  df-iun 4953  df-br 5104  df-opab 5168  df-mpt 5187  df-id 5546  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-rn 5662  df-res 5663  df-ima 5664  df-iota 6487  df-fun 6533  df-fn 6534  df-f 6535  df-f1 6536  df-fo 6537  df-f1o 6538  df-fv 6539  df-ov 7415  df-1st 7990  df-2nd 7991
This theorem is used by:  curry2f  8108  curry2val  8109
  Copyright terms: Public domain W3C validator