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

Theorem curry2 8148
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 6664 . . . . 5 (𝐹 Fn (𝐴 × 𝐵) → Fun 𝐹)
2 1stconst 8141 . . . . . 6 (𝐶 ∈ 𝐵 → (1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV)
3 dff1o3 6856 . . . . . . 7 ((1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV ↔ ((1st ↾ (V × {𝐶})):(V × {𝐶})⟶ontoV ∧ Fun ◡(1st ↾ (V × {𝐶}))))
43simprbi 503 . . . . . 6 ((1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV → Fun ◡(1st ↾ (V × {𝐶})))
52, 4syl 18 . . . . 5 (𝐶 ∈ 𝐵 → Fun ◡(1st ↾ (V × {𝐶})))
6 funco 6603 . . . . 5 ((Fun 𝐹 ∧ Fun ◡(1st ↾ (V × {𝐶}))) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
71, 5, 6syl2an 608 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
8 dmco 6270 . . . . 5 dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹)
9 fndm 6667 . . . . . . . 8 (𝐹 Fn (𝐴 × 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
109adantr 486 . . . . . . 7 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
1110imaeq2d 6065 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)))
12 imacnvcnv 6221 . . . . . . . . 9 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵))
13 df-ima 5669 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵))
14 resres 5995 . . . . . . . . . 10 ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1514rneqi 5927 . . . . . . . . 9 ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1612, 13, 153eqtri 2790 . . . . . . . 8 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
17 inxp 5816 . . . . . . . . . . . . 13 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵))
18 incom 4109 . . . . . . . . . . . . . . 15 (V ∩ 𝐴) = (𝐴 ∩ V)
19 inv1 4351 . . . . . . . . . . . . . . 15 (𝐴 ∩ V) = 𝐴
2018, 19eqtri 2786 . . . . . . . . . . . . . 14 (V ∩ 𝐴) = 𝐴
2120xpeq1i 5682 . . . . . . . . . . . . 13 ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
2217, 21eqtri 2786 . . . . . . . . . . . 12 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
23 snssi 4746 . . . . . . . . . . . . . 14 (𝐶 ∈ 𝐵 → {𝐶} ⊆ 𝐵)
24 dfss2 4097 . . . . . . . . . . . . . 14 ({𝐶} ⊆ 𝐵 ↔ ({𝐶} ∩ 𝐵) = {𝐶})
2523, 24sylib 221 . . . . . . . . . . . . 13 (𝐶 ∈ 𝐵 → ({𝐶} ∩ 𝐵) = {𝐶})
2625xpeq2d 5686 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → (𝐴 × ({𝐶} ∩ 𝐵)) = (𝐴 × {𝐶}))
2722, 26eqtrid 2810 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × {𝐶}))
2827reseq2d 5982 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = (1st ↾ (𝐴 × {𝐶})))
2928rneqd 5928 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = ran (1st ↾ (𝐴 × {𝐶})))
30 1stconst 8141 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶1-1onto𝐴)
31 f1ofo 6857 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶1-1onto𝐴 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶onto𝐴)
32 forn 6824 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶onto𝐴 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3330, 31, 323syl 19 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3429, 33eqtrd 2798 . . . . . . . 8 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = 𝐴)
3516, 34eqtrid 2810 . . . . . . 7 (𝐶 ∈ 𝐵 → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3635adantl 487 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3711, 36eqtrd 2798 . . . . 5 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = 𝐴)
388, 37eqtrid 2810 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = 𝐴)
39 curry2.1 . . . . . 6 𝐺 = (𝐹 ∘ ◡(1st ↾ (V × {𝐶})))
4039fneq1i 6661 . . . . 5 (𝐺 Fn 𝐴 ↔ (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) Fn 𝐴)
41 df-fn 6564 . . . . 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 6969 . . 3 (𝐺 Fn 𝐴 ↔ 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4543, 44sylib 221 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4639fveq1i 6912 . . . . 5 (𝐺‘𝑥) = ((𝐹 ∘ ◡(1st ↾ (V × {𝐶})))‘𝑥)
47 dff1o4 6858 . . . . . . . . 9 ((1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV ↔ ((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 3458 . . . . . . 7 𝑥 ∈ V
51 fvco2 7008 . . . . . . 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 2810 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)))
552adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV)
5650a1i 11 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝑥 ∈ V)
57 snidg 4621 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → 𝐶 ∈ {𝐶})
5857adantr 486 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝐶 ∈ {𝐶})
5956, 58opelxpd 5695 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6055, 59jca 521 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})))
6150a1i 11 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → 𝑥 ∈ V)
6261, 57opelxpd 5695 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6362fvresd 6931 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
6463adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
65 op1stg 8040 . . . . . . . . . 10 ((𝑥 ∈ 𝐴 ∧ 𝐶 ∈ 𝐵) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6665ancoms 464 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6764, 66eqtrd 2798 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥)
68 f1ocnvfv 7312 . . . . . . . 8 (((1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})) → (((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥 → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩))
6960, 67, 68sylc 66 . . . . . . 7 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩)
7069fveq2d 6915 . . . . . 6 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
7170adantll 727 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
72 df-ov 7449 . . . . 5 (𝑥𝐹𝐶) = (𝐹‘⟨𝑥, 𝐶⟩)
7371, 72eqtr4di 2816 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝑥𝐹𝐶))
7454, 73eqtrd 2798 . . 3 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝑥𝐹𝐶))
7574mpteq2dva 5202 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)) = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
7645, 75eqtrd 2798 1 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ∧ wa 401   = wceq 1570   ∈ wcel 2147  Vcvv 3454   ⊆ wss 3900   ∩ cin 4092  {csn 4588  ⟨cop 4838   ↦ cmpt 5190   × cxp 5654  ◡ccnv 5655  dom cdm 5656  ran crn 5657   ↾ cres 5658   “ cima 5659   ∘ ccom 5660  Fun wfun 6555   Fn wfn 6556  ⟶ontowfo 6559  ⟶1-1ontowf1o 6560  ‘cfv 6561  (class class class)co 7446  1st c1st 8026
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 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735  ax-sep 5253  ax-nul 5264  ax-pr 5396  ax-un 7778
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 2102  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-ral 3081  df-rex 3091  df-rab 3417  df-v 3456  df-sbc 3743  df-csb 3852  df-ss 3901  df-dif 4050  df-in 4094  df-un 4154  df-nul 4282  df-if 4486  df-sn 4589  df-pr 4591  df-op 4839  df-uni 4871  df-iun 4956  df-br 5107  df-opab 5172  df-mpt 5191  df-id 5551  df-xp 5662  df-rel 5663  df-cnv 5664  df-co 5665  df-dm 5666  df-rn 5667  df-res 5668  df-ima 5669  df-iota 6515  df-fun 6563  df-fn 6564  df-f 6565  df-f1 6566  df-fo 6567  df-f1o 6568  df-fv 6569  df-ov 7449  df-1st 8028  df-2nd 8029
This theorem is used by:  curry2f  8149  curry2val  8150
  Copyright terms: Public domain W3C validator