Metamath Proof Explorer


Theorem uncfval

Description: Value of the uncurry functor, which is the reverse of the curry functor, taking G : C --> ( D --> E ) to uncurryF ( G ) : C X. D --> E . (Contributed by Mario Carneiro, 13-Jan-2017)

Ref Expression
Hypotheses uncfval.g F = ⟨“ CDE ”⟩ uncurry F G
uncfval.c φ D Cat
uncfval.d φ E Cat
uncfval.f φ G C Func D FuncCat E
Assertion uncfval φ F = D eval F E func G func C 1 st F D ⟨,⟩ F C 2 nd F D

Proof

Step Hyp Ref Expression
1 uncfval.g F = ⟨“ CDE ”⟩ uncurry F G
2 uncfval.c φ D Cat
3 uncfval.d φ E Cat
4 uncfval.f φ G C Func D FuncCat E
5 df-uncf uncurry F = c V , f V c 1 eval F c 2 func f func c 0 1 st F c 1 ⟨,⟩ F c 0 2 nd F c 1
6 5 a1i φ uncurry F = c V , f V c 1 eval F c 2 func f func c 0 1 st F c 1 ⟨,⟩ F c 0 2 nd F c 1
7 simprl φ c = ⟨“ CDE ”⟩ f = G c = ⟨“ CDE ”⟩
8 7 fveq1d φ c = ⟨“ CDE ”⟩ f = G c 1 = ⟨“ CDE ”⟩ 1
9 s3fv1 D Cat ⟨“ CDE ”⟩ 1 = D
10 2 9 syl φ ⟨“ CDE ”⟩ 1 = D
11 10 adantr φ c = ⟨“ CDE ”⟩ f = G ⟨“ CDE ”⟩ 1 = D
12 8 11 eqtrd φ c = ⟨“ CDE ”⟩ f = G c 1 = D
13 7 fveq1d φ c = ⟨“ CDE ”⟩ f = G c 2 = ⟨“ CDE ”⟩ 2
14 s3fv2 E Cat ⟨“ CDE ”⟩ 2 = E
15 3 14 syl φ ⟨“ CDE ”⟩ 2 = E
16 15 adantr φ c = ⟨“ CDE ”⟩ f = G ⟨“ CDE ”⟩ 2 = E
17 13 16 eqtrd φ c = ⟨“ CDE ”⟩ f = G c 2 = E
18 12 17 oveq12d φ c = ⟨“ CDE ”⟩ f = G c 1 eval F c 2 = D eval F E
19 simprr φ c = ⟨“ CDE ”⟩ f = G f = G
20 7 fveq1d φ c = ⟨“ CDE ”⟩ f = G c 0 = ⟨“ CDE ”⟩ 0
21 funcrcl G C Func D FuncCat E C Cat D FuncCat E Cat
22 4 21 syl φ C Cat D FuncCat E Cat
23 22 simpld φ C Cat
24 s3fv0 C Cat ⟨“ CDE ”⟩ 0 = C
25 23 24 syl φ ⟨“ CDE ”⟩ 0 = C
26 25 adantr φ c = ⟨“ CDE ”⟩ f = G ⟨“ CDE ”⟩ 0 = C
27 20 26 eqtrd φ c = ⟨“ CDE ”⟩ f = G c 0 = C
28 27 12 oveq12d φ c = ⟨“ CDE ”⟩ f = G c 0 1 st F c 1 = C 1 st F D
29 19 28 oveq12d φ c = ⟨“ CDE ”⟩ f = G f func c 0 1 st F c 1 = G func C 1 st F D
30 27 12 oveq12d φ c = ⟨“ CDE ”⟩ f = G c 0 2 nd F c 1 = C 2 nd F D
31 29 30 oveq12d φ c = ⟨“ CDE ”⟩ f = G f func c 0 1 st F c 1 ⟨,⟩ F c 0 2 nd F c 1 = G func C 1 st F D ⟨,⟩ F C 2 nd F D
32 18 31 oveq12d φ c = ⟨“ CDE ”⟩ f = G c 1 eval F c 2 func f func c 0 1 st F c 1 ⟨,⟩ F c 0 2 nd F c 1 = D eval F E func G func C 1 st F D ⟨,⟩ F C 2 nd F D
33 s3cli ⟨“ CDE ”⟩ Word V
34 elex ⟨“ CDE ”⟩ Word V ⟨“ CDE ”⟩ V
35 33 34 mp1i φ ⟨“ CDE ”⟩ V
36 4 elexd φ G V
37 ovexd φ D eval F E func G func C 1 st F D ⟨,⟩ F C 2 nd F D V
38 6 32 35 36 37 ovmpod φ ⟨“ CDE ”⟩ uncurry F G = D eval F E func G func C 1 st F D ⟨,⟩ F C 2 nd F D
39 1 38 eqtrid φ F = D eval F E func G func C 1 st F D ⟨,⟩ F C 2 nd F D