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

Theorem curry2 8166
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 6679 . . . . 5 (𝐹 Fn (𝐴 × 𝐵) → Fun 𝐹)
2 1stconst 8159 . . . . . 6 (𝐶 ∈ 𝐵 → (1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV)
3 dff1o3 6871 . . . . . . 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 6615 . . . . 5 ((Fun 𝐹 ∧ Fun ◡(1st ↾ (V × {𝐶}))) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
71, 5, 6syl2an 608 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → Fun (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))))
8 dmco 6282 . . . . 5 dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹)
9 fndm 6682 . . . . . . . 8 (𝐹 Fn (𝐴 × 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
109adantr 486 . . . . . . 7 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom 𝐹 = (𝐴 × 𝐵))
1110imaeq2d 6074 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)))
12 imacnvcnv 6230 . . . . . . . . 9 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵))
13 df-ima 5674 . . . . . . . . 9 ((1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵))
14 resres 6002 . . . . . . . . . 10 ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1514rneqi 5934 . . . . . . . . 9 ran ((1st ↾ (V × {𝐶})) ↾ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
1612, 13, 153eqtri 2796 . . . . . . . 8 (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵)))
17 inxp 5822 . . . . . . . . . . . . 13 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵))
18 incom 4111 . . . . . . . . . . . . . . 15 (V ∩ 𝐴) = (𝐴 ∩ V)
19 inv1 4353 . . . . . . . . . . . . . . 15 (𝐴 ∩ V) = 𝐴
2018, 19eqtri 2792 . . . . . . . . . . . . . 14 (V ∩ 𝐴) = 𝐴
2120xpeq1i 5687 . . . . . . . . . . . . 13 ((V ∩ 𝐴) × ({𝐶} ∩ 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
2217, 21eqtri 2792 . . . . . . . . . . . 12 ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × ({𝐶} ∩ 𝐵))
23 snssi 4751 . . . . . . . . . . . . . 14 (𝐶 ∈ 𝐵 → {𝐶} ⊆ 𝐵)
24 dfss2 4099 . . . . . . . . . . . . . 14 ({𝐶} ⊆ 𝐵 ↔ ({𝐶} ∩ 𝐵) = {𝐶})
2523, 24sylib 221 . . . . . . . . . . . . 13 (𝐶 ∈ 𝐵 → ({𝐶} ∩ 𝐵) = {𝐶})
2625xpeq2d 5691 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → (𝐴 × ({𝐶} ∩ 𝐵)) = (𝐴 × {𝐶}))
2722, 26eqtrid 2816 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ((V × {𝐶}) ∩ (𝐴 × 𝐵)) = (𝐴 × {𝐶}))
2827reseq2d 5989 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = (1st ↾ (𝐴 × {𝐶})))
2928rneqd 5935 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = ran (1st ↾ (𝐴 × {𝐶})))
30 1stconst 8159 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶1-1onto𝐴)
31 f1ofo 6872 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶1-1onto𝐴 → (1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶onto𝐴)
32 forn 6839 . . . . . . . . . 10 ((1st ↾ (𝐴 × {𝐶})):(𝐴 × {𝐶})⟶onto𝐴 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3330, 31, 323syl 19 . . . . . . . . 9 (𝐶 ∈ 𝐵 → ran (1st ↾ (𝐴 × {𝐶})) = 𝐴)
3429, 33eqtrd 2804 . . . . . . . 8 (𝐶 ∈ 𝐵 → ran (1st ↾ ((V × {𝐶}) ∩ (𝐴 × 𝐵))) = 𝐴)
3516, 34eqtrid 2816 . . . . . . 7 (𝐶 ∈ 𝐵 → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3635adantl 487 . . . . . 6 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ (𝐴 × 𝐵)) = 𝐴)
3711, 36eqtrd 2804 . . . . 5 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (◡◡(1st ↾ (V × {𝐶})) “ dom 𝐹) = 𝐴)
388, 37eqtrid 2816 . . . 4 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → dom (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) = 𝐴)
39 curry2.1 . . . . . 6 𝐺 = (𝐹 ∘ ◡(1st ↾ (V × {𝐶})))
4039fneq1i 6676 . . . . 5 (𝐺 Fn 𝐴 ↔ (𝐹 ∘ ◡(1st ↾ (V × {𝐶}))) Fn 𝐴)
41 df-fn 6576 . . . . 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 6984 . . 3 (𝐺 Fn 𝐴 ↔ 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4543, 44sylib 221 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)))
4639fveq1i 6927 . . . . 5 (𝐺‘𝑥) = ((𝐹 ∘ ◡(1st ↾ (V × {𝐶})))‘𝑥)
47 dff1o4 6873 . . . . . . . . 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 3460 . . . . . . 7 𝑥 ∈ V
51 fvco2 7023 . . . . . . 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 2816 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)))
552adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV)
5650a1i 11 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝑥 ∈ V)
57 snidg 4624 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → 𝐶 ∈ {𝐶})
5857adantr 486 . . . . . . . . . 10 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → 𝐶 ∈ {𝐶})
5956, 58opelxpd 5700 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6055, 59jca 521 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})))
6150a1i 11 . . . . . . . . . . . 12 (𝐶 ∈ 𝐵 → 𝑥 ∈ V)
6261, 57opelxpd 5700 . . . . . . . . . . 11 (𝐶 ∈ 𝐵 → ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶}))
6362fvresd 6946 . . . . . . . . . 10 (𝐶 ∈ 𝐵 → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
6463adantr 486 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = (1st ‘⟨𝑥, 𝐶⟩))
65 op1stg 8058 . . . . . . . . . 10 ((𝑥 ∈ 𝐴 ∧ 𝐶 ∈ 𝐵) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6665ancoms 464 . . . . . . . . 9 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (1st ‘⟨𝑥, 𝐶⟩) = 𝑥)
6764, 66eqtrd 2804 . . . . . . . 8 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → ((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥)
68 f1ocnvfv 7327 . . . . . . . 8 (((1st ↾ (V × {𝐶})):(V × {𝐶})⟶1-1ontoV ∧ ⟨𝑥, 𝐶⟩ ∈ (V × {𝐶})) → (((1st ↾ (V × {𝐶}))‘⟨𝑥, 𝐶⟩) = 𝑥 → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩))
6960, 67, 68sylc 66 . . . . . . 7 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (◡(1st ↾ (V × {𝐶}))‘𝑥) = ⟨𝑥, 𝐶⟩)
7069fveq2d 6930 . . . . . 6 ((𝐶 ∈ 𝐵 ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
7170adantll 727 . . . . 5 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝐹‘⟨𝑥, 𝐶⟩))
72 df-ov 7465 . . . . 5 (𝑥𝐹𝐶) = (𝐹‘⟨𝑥, 𝐶⟩)
7371, 72eqtr4di 2822 . . . 4 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐹‘(◡(1st ↾ (V × {𝐶}))‘𝑥)) = (𝑥𝐹𝐶))
7454, 73eqtrd 2804 . . 3 (((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) ∧ 𝑥 ∈ 𝐴) → (𝐺‘𝑥) = (𝑥𝐹𝐶))
7574mpteq2dva 5207 . 2 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → (𝑥 ∈ 𝐴 ↦ (𝐺‘𝑥)) = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
7645, 75eqtrd 2804 1 ((𝐹 Fn (𝐴 × 𝐵) ∧ 𝐶 ∈ 𝐵) → 𝐺 = (𝑥 ∈ 𝐴 ↦ (𝑥𝐹𝐶)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   → wi 4   ∧ wa 401   = wceq 1572   ∈ wcel 2151  Vcvv 3456   ⊆ wss 3902   ∩ cin 4094  {csn 4590  ⟨cop 4843   ↦ cmpt 5195   × cxp 5659  ◡ccnv 5660  dom cdm 5661  ran crn 5662   ↾ cres 5663   “ cima 5664   ∘ ccom 5665  Fun wfun 6567   Fn wfn 6568  ⟶ontowfo 6571  ⟶1-1ontowf1o 6572  ‘cfv 6573  (class class class)co 7462  1st c1st 8044
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1830  ax-4 1844  ax-5 1947  ax-6 2004  ax-7 2045  ax-8 2153  ax-9 2161  ax-10 2184  ax-11 2201  ax-12 2220  ax-ext 2741  ax-sep 5258  ax-nul 5269  ax-pr 5401  ax-un 7794
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1106  df-tru 1575  df-fal 1585  df-ex 1815  df-nf 1819  df-sb 2105  df-mo 2571  df-eu 2601  df-clab 2748  df-cleq 2761  df-clel 2845  df-nfc 2919  df-ne 2966  df-ral 3087  df-rex 3097  df-rab 3419  df-v 3458  df-sbc 3745  df-csb 3854  df-ss 3903  df-dif 4052  df-in 4096  df-un 4156  df-nul 4284  df-if 4488  df-sn 4591  df-pr 4593  df-op 4844  df-uni 4876  df-iun 4961  df-br 5112  df-opab 5177  df-mpt 5196  df-id 5556  df-xp 5667  df-rel 5668  df-cnv 5669  df-co 5670  df-dm 5671  df-rn 5672  df-res 5673  df-ima 5674  df-iota 6527  df-fun 6575  df-fn 6576  df-f 6577  df-f1 6578  df-fo 6579  df-f1o 6580  df-fv 6581  df-ov 7465  df-1st 8046  df-2nd 8047
This theorem is used by:  curry2f  8167  curry2val  8168
  Copyright terms: Public domain W3C validator