Metamath Proof Explorer


Theorem msubffval

Description: A substitution applied to an expression. (Contributed by Mario Carneiro, 18-Jul-2016)

Ref Expression
Hypotheses msubffval.v V=mVRT
msubffval.r R=mRExT
msubffval.s S=mSubstT
msubffval.e E=mExT
msubffval.o O=mRSubstT
Assertion msubffval TWS=fR𝑝𝑚VeE1steOf2nde

Proof

Step Hyp Ref Expression
1 msubffval.v V=mVRT
2 msubffval.r R=mRExT
3 msubffval.s S=mSubstT
4 msubffval.e E=mExT
5 msubffval.o O=mRSubstT
6 elex TWTV
7 fveq2 t=TmRExt=mRExT
8 7 2 eqtr4di t=TmRExt=R
9 fveq2 t=TmVRt=mVRT
10 9 1 eqtr4di t=TmVRt=V
11 8 10 oveq12d t=TmRExt𝑝𝑚mVRt=R𝑝𝑚V
12 fveq2 t=TmExt=mExT
13 12 4 eqtr4di t=TmExt=E
14 fveq2 t=TmRSubstt=mRSubstT
15 14 5 eqtr4di t=TmRSubstt=O
16 15 fveq1d t=TmRSubsttf=Of
17 16 fveq1d t=TmRSubsttf2nde=Of2nde
18 17 opeq2d t=T1stemRSubsttf2nde=1steOf2nde
19 13 18 mpteq12dv t=TemExt1stemRSubsttf2nde=eE1steOf2nde
20 11 19 mpteq12dv t=TfmRExt𝑝𝑚mVRtemExt1stemRSubsttf2nde=fR𝑝𝑚VeE1steOf2nde
21 df-msub mSubst=tVfmRExt𝑝𝑚mVRtemExt1stemRSubsttf2nde
22 ovex R𝑝𝑚VV
23 22 mptex fR𝑝𝑚VeE1steOf2ndeV
24 20 21 23 fvmpt TVmSubstT=fR𝑝𝑚VeE1steOf2nde
25 3 24 eqtrid TVS=fR𝑝𝑚VeE1steOf2nde
26 6 25 syl TWS=fR𝑝𝑚VeE1steOf2nde