Metamath Proof Explorer


Theorem msubco

Description: The composition of two substitutions is a substitution. (Contributed by Mario Carneiro, 18-Jul-2016)

Ref Expression
Hypothesis msubco.s S=mSubstT
Assertion msubco FranSGranSFGranS

Proof

Step Hyp Ref Expression
1 msubco.s S=mSubstT
2 eqid mExT=mExT
3 eqid mRSubstT=mRSubstT
4 2 3 1 elmsubrn ranS=ranfranmRSubstTxmExT1stxf2ndx
5 4 eleq2i FranSFranfranmRSubstTxmExT1stxf2ndx
6 eqid franmRSubstTxmExT1stxf2ndx=franmRSubstTxmExT1stxf2ndx
7 fvex mExTV
8 7 mptex xmExT1stxf2ndxV
9 6 8 elrnmpti FranfranmRSubstTxmExT1stxf2ndxfranmRSubstTF=xmExT1stxf2ndx
10 5 9 bitri FranSfranmRSubstTF=xmExT1stxf2ndx
11 2 3 1 elmsubrn ranS=rangranmRSubstTymExT1styg2ndy
12 11 eleq2i GranSGrangranmRSubstTymExT1styg2ndy
13 eqid granmRSubstTymExT1styg2ndy=granmRSubstTymExT1styg2ndy
14 7 mptex ymExT1styg2ndyV
15 13 14 elrnmpti GrangranmRSubstTymExT1styg2ndygranmRSubstTG=ymExT1styg2ndy
16 12 15 bitri GranSgranmRSubstTG=ymExT1styg2ndy
17 reeanv franmRSubstTgranmRSubstTF=xmExT1stxf2ndxG=ymExT1styg2ndyfranmRSubstTF=xmExT1stxf2ndxgranmRSubstTG=ymExT1styg2ndy
18 simpr franmRSubstTgranmRSubstTymExTymExT
19 eqid mTCT=mTCT
20 eqid mRExT=mRExT
21 19 2 20 mexval mExT=mTCT×mRExT
22 18 21 eleqtrdi franmRSubstTgranmRSubstTymExTymTCT×mRExT
23 xp1st ymTCT×mRExT1stymTCT
24 22 23 syl franmRSubstTgranmRSubstTymExT1stymTCT
25 3 20 mrsubf granmRSubstTg:mRExTmRExT
26 25 ad2antlr franmRSubstTgranmRSubstTymExTg:mRExTmRExT
27 xp2nd ymTCT×mRExT2ndymRExT
28 22 27 syl franmRSubstTgranmRSubstTymExT2ndymRExT
29 26 28 ffvelcdmd franmRSubstTgranmRSubstTymExTg2ndymRExT
30 opelxpi 1stymTCTg2ndymRExT1styg2ndymTCT×mRExT
31 24 29 30 syl2anc franmRSubstTgranmRSubstTymExT1styg2ndymTCT×mRExT
32 31 21 eleqtrrdi franmRSubstTgranmRSubstTymExT1styg2ndymExT
33 eqidd franmRSubstTgranmRSubstTymExT1styg2ndy=ymExT1styg2ndy
34 eqidd franmRSubstTgranmRSubstTxmExT1stxf2ndx=xmExT1stxf2ndx
35 fvex 1styV
36 fvex g2ndyV
37 35 36 op1std x=1styg2ndy1stx=1sty
38 35 36 op2ndd x=1styg2ndy2ndx=g2ndy
39 38 fveq2d x=1styg2ndyf2ndx=fg2ndy
40 37 39 opeq12d x=1styg2ndy1stxf2ndx=1styfg2ndy
41 32 33 34 40 fmptco franmRSubstTgranmRSubstTxmExT1stxf2ndxymExT1styg2ndy=ymExT1styfg2ndy
42 fvco3 g:mRExTmRExT2ndymRExTfg2ndy=fg2ndy
43 26 28 42 syl2anc franmRSubstTgranmRSubstTymExTfg2ndy=fg2ndy
44 43 opeq2d franmRSubstTgranmRSubstTymExT1styfg2ndy=1styfg2ndy
45 44 mpteq2dva franmRSubstTgranmRSubstTymExT1styfg2ndy=ymExT1styfg2ndy
46 41 45 eqtr4d franmRSubstTgranmRSubstTxmExT1stxf2ndxymExT1styg2ndy=ymExT1styfg2ndy
47 3 mrsubco franmRSubstTgranmRSubstTfgranmRSubstT
48 7 mptex ymExT1styfg2ndyV
49 eqid hranmRSubstTymExT1styh2ndy=hranmRSubstTymExT1styh2ndy
50 fveq1 h=fgh2ndy=fg2ndy
51 50 opeq2d h=fg1styh2ndy=1styfg2ndy
52 51 mpteq2dv h=fgymExT1styh2ndy=ymExT1styfg2ndy
53 49 52 elrnmpt1s fgranmRSubstTymExT1styfg2ndyVymExT1styfg2ndyranhranmRSubstTymExT1styh2ndy
54 47 48 53 sylancl franmRSubstTgranmRSubstTymExT1styfg2ndyranhranmRSubstTymExT1styh2ndy
55 2 3 1 elmsubrn ranS=ranhranmRSubstTymExT1styh2ndy
56 54 55 eleqtrrdi franmRSubstTgranmRSubstTymExT1styfg2ndyranS
57 46 56 eqeltrd franmRSubstTgranmRSubstTxmExT1stxf2ndxymExT1styg2ndyranS
58 coeq1 F=xmExT1stxf2ndxFG=xmExT1stxf2ndxG
59 coeq2 G=ymExT1styg2ndyxmExT1stxf2ndxG=xmExT1stxf2ndxymExT1styg2ndy
60 58 59 sylan9eq F=xmExT1stxf2ndxG=ymExT1styg2ndyFG=xmExT1stxf2ndxymExT1styg2ndy
61 60 eleq1d F=xmExT1stxf2ndxG=ymExT1styg2ndyFGranSxmExT1stxf2ndxymExT1styg2ndyranS
62 57 61 syl5ibrcom franmRSubstTgranmRSubstTF=xmExT1stxf2ndxG=ymExT1styg2ndyFGranS
63 62 rexlimivv franmRSubstTgranmRSubstTF=xmExT1stxf2ndxG=ymExT1styg2ndyFGranS
64 17 63 sylbir franmRSubstTF=xmExT1stxf2ndxgranmRSubstTG=ymExT1styg2ndyFGranS
65 10 16 64 syl2anb FranSGranSFGranS