Metamath Proof Explorer


Theorem mrsubco

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

Ref Expression
Hypothesis mrsubco.s S = mRSubst T
Assertion mrsubco F ran S G ran S F G ran S

Proof

Step Hyp Ref Expression
1 mrsubco.s S = mRSubst T
2 eqid mREx T = mREx T
3 1 2 mrsubf F ran S F : mREx T mREx T
4 3 adantr F ran S G ran S F : mREx T mREx T
5 1 2 mrsubf G ran S G : mREx T mREx T
6 5 adantl F ran S G ran S G : mREx T mREx T
7 fco F : mREx T mREx T G : mREx T mREx T F G : mREx T mREx T
8 4 6 7 syl2anc F ran S G ran S F G : mREx T mREx T
9 6 adantr F ran S G ran S c mCN T mVR T G : mREx T mREx T
10 eldifi c mCN T mVR T c mCN T
11 elun1 c mCN T c mCN T mVR T
12 10 11 syl c mCN T mVR T c mCN T mVR T
13 12 adantl F ran S G ran S c mCN T mVR T c mCN T mVR T
14 13 s1cld F ran S G ran S c mCN T mVR T ⟨“ c ”⟩ Word mCN T mVR T
15 n0i F ran S ¬ ran S =
16 1 rnfvprc ¬ T V ran S =
17 15 16 nsyl2 F ran S T V
18 17 adantr F ran S G ran S T V
19 18 adantr F ran S G ran S c mCN T mVR T T V
20 eqid mCN T = mCN T
21 eqid mVR T = mVR T
22 20 21 2 mrexval T V mREx T = Word mCN T mVR T
23 19 22 syl F ran S G ran S c mCN T mVR T mREx T = Word mCN T mVR T
24 14 23 eleqtrrd F ran S G ran S c mCN T mVR T ⟨“ c ”⟩ mREx T
25 fvco3 G : mREx T mREx T ⟨“ c ”⟩ mREx T F G ⟨“ c ”⟩ = F G ⟨“ c ”⟩
26 9 24 25 syl2anc F ran S G ran S c mCN T mVR T F G ⟨“ c ”⟩ = F G ⟨“ c ”⟩
27 1 2 21 20 mrsubcn G ran S c mCN T mVR T G ⟨“ c ”⟩ = ⟨“ c ”⟩
28 27 adantll F ran S G ran S c mCN T mVR T G ⟨“ c ”⟩ = ⟨“ c ”⟩
29 28 fveq2d F ran S G ran S c mCN T mVR T F G ⟨“ c ”⟩ = F ⟨“ c ”⟩
30 1 2 21 20 mrsubcn F ran S c mCN T mVR T F ⟨“ c ”⟩ = ⟨“ c ”⟩
31 30 adantlr F ran S G ran S c mCN T mVR T F ⟨“ c ”⟩ = ⟨“ c ”⟩
32 26 29 31 3eqtrd F ran S G ran S c mCN T mVR T F G ⟨“ c ”⟩ = ⟨“ c ”⟩
33 32 ralrimiva F ran S G ran S c mCN T mVR T F G ⟨“ c ”⟩ = ⟨“ c ”⟩
34 1 2 mrsubccat G ran S x mREx T y mREx T G x ++ y = G x ++ G y
35 34 3expb G ran S x mREx T y mREx T G x ++ y = G x ++ G y
36 35 adantll F ran S G ran S x mREx T y mREx T G x ++ y = G x ++ G y
37 36 fveq2d F ran S G ran S x mREx T y mREx T F G x ++ y = F G x ++ G y
38 simpll F ran S G ran S x mREx T y mREx T F ran S
39 6 adantr F ran S G ran S x mREx T y mREx T G : mREx T mREx T
40 simprl F ran S G ran S x mREx T y mREx T x mREx T
41 39 40 ffvelrnd F ran S G ran S x mREx T y mREx T G x mREx T
42 simprr F ran S G ran S x mREx T y mREx T y mREx T
43 39 42 ffvelrnd F ran S G ran S x mREx T y mREx T G y mREx T
44 1 2 mrsubccat F ran S G x mREx T G y mREx T F G x ++ G y = F G x ++ F G y
45 38 41 43 44 syl3anc F ran S G ran S x mREx T y mREx T F G x ++ G y = F G x ++ F G y
46 37 45 eqtrd F ran S G ran S x mREx T y mREx T F G x ++ y = F G x ++ F G y
47 18 22 syl F ran S G ran S mREx T = Word mCN T mVR T
48 47 adantr F ran S G ran S x mREx T y mREx T mREx T = Word mCN T mVR T
49 40 48 eleqtrd F ran S G ran S x mREx T y mREx T x Word mCN T mVR T
50 42 48 eleqtrd F ran S G ran S x mREx T y mREx T y Word mCN T mVR T
51 ccatcl x Word mCN T mVR T y Word mCN T mVR T x ++ y Word mCN T mVR T
52 49 50 51 syl2anc F ran S G ran S x mREx T y mREx T x ++ y Word mCN T mVR T
53 52 48 eleqtrrd F ran S G ran S x mREx T y mREx T x ++ y mREx T
54 fvco3 G : mREx T mREx T x ++ y mREx T F G x ++ y = F G x ++ y
55 39 53 54 syl2anc F ran S G ran S x mREx T y mREx T F G x ++ y = F G x ++ y
56 fvco3 G : mREx T mREx T x mREx T F G x = F G x
57 39 40 56 syl2anc F ran S G ran S x mREx T y mREx T F G x = F G x
58 fvco3 G : mREx T mREx T y mREx T F G y = F G y
59 39 42 58 syl2anc F ran S G ran S x mREx T y mREx T F G y = F G y
60 57 59 oveq12d F ran S G ran S x mREx T y mREx T F G x ++ F G y = F G x ++ F G y
61 46 55 60 3eqtr4d F ran S G ran S x mREx T y mREx T F G x ++ y = F G x ++ F G y
62 61 ralrimivva F ran S G ran S x mREx T y mREx T F G x ++ y = F G x ++ F G y
63 1 2 21 20 elmrsubrn T V F G ran S F G : mREx T mREx T c mCN T mVR T F G ⟨“ c ”⟩ = ⟨“ c ”⟩ x mREx T y mREx T F G x ++ y = F G x ++ F G y
64 18 63 syl F ran S G ran S F G ran S F G : mREx T mREx T c mCN T mVR T F G ⟨“ c ”⟩ = ⟨“ c ”⟩ x mREx T y mREx T F G x ++ y = F G x ++ F G y
65 8 33 62 64 mpbir3and F ran S G ran S F G ran S