Metamath Proof Explorer


Theorem ofres

Description: Restrict the operands of a function operation to the same domain as that of the operation itself. (Contributed by Mario Carneiro, 15-Sep-2014)

Ref Expression
Hypotheses ofres.1 φFFnA
ofres.2 φGFnB
ofres.3 φAV
ofres.4 φBW
ofres.5 AB=C
Assertion ofres φFRfG=FCRfGC

Proof

Step Hyp Ref Expression
1 ofres.1 φFFnA
2 ofres.2 φGFnB
3 ofres.3 φAV
4 ofres.4 φBW
5 ofres.5 AB=C
6 eqidd φxAFx=Fx
7 eqidd φxBGx=Gx
8 1 2 3 4 5 6 7 offval φFRfG=xCFxRGx
9 inss1 ABA
10 5 9 eqsstrri CA
11 fnssres FFnACAFCFnC
12 1 10 11 sylancl φFCFnC
13 inss2 ABB
14 5 13 eqsstrri CB
15 fnssres GFnBCBGCFnC
16 2 14 15 sylancl φGCFnC
17 ssexg CAAVCV
18 10 3 17 sylancr φCV
19 inidm CC=C
20 fvres xCFCx=Fx
21 20 adantl φxCFCx=Fx
22 fvres xCGCx=Gx
23 22 adantl φxCGCx=Gx
24 12 16 18 18 19 21 23 offval φFCRfGC=xCFxRGx
25 8 24 eqtr4d φFRfG=FCRfGC