Metamath Proof Explorer


Theorem efgtlen

Description: Value of the free group construction. (Contributed by Mario Carneiro, 27-Sep-2015)

Ref Expression
Hypotheses efgval.w 𝑊 = ( I ‘ Word ( 𝐼 × 2o ) )
efgval.r = ( ~FG𝐼 )
efgval2.m 𝑀 = ( 𝑦𝐼 , 𝑧 ∈ 2o ↦ ⟨ 𝑦 , ( 1o𝑧 ) ⟩ )
efgval2.t 𝑇 = ( 𝑣𝑊 ↦ ( 𝑛 ∈ ( 0 ... ( ♯ ‘ 𝑣 ) ) , 𝑤 ∈ ( 𝐼 × 2o ) ↦ ( 𝑣 splice ⟨ 𝑛 , 𝑛 , ⟨“ 𝑤 ( 𝑀𝑤 ) ”⟩ ⟩ ) ) )
Assertion efgtlen ( ( 𝑋𝑊𝐴 ∈ ran ( 𝑇𝑋 ) ) → ( ♯ ‘ 𝐴 ) = ( ( ♯ ‘ 𝑋 ) + 2 ) )

Proof

Step Hyp Ref Expression
1 efgval.w 𝑊 = ( I ‘ Word ( 𝐼 × 2o ) )
2 efgval.r = ( ~FG𝐼 )
3 efgval2.m 𝑀 = ( 𝑦𝐼 , 𝑧 ∈ 2o ↦ ⟨ 𝑦 , ( 1o𝑧 ) ⟩ )
4 efgval2.t 𝑇 = ( 𝑣𝑊 ↦ ( 𝑛 ∈ ( 0 ... ( ♯ ‘ 𝑣 ) ) , 𝑤 ∈ ( 𝐼 × 2o ) ↦ ( 𝑣 splice ⟨ 𝑛 , 𝑛 , ⟨“ 𝑤 ( 𝑀𝑤 ) ”⟩ ⟩ ) ) )
5 1 2 3 4 efgtf ( 𝑋𝑊 → ( ( 𝑇𝑋 ) = ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) , 𝑏 ∈ ( 𝐼 × 2o ) ↦ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) ∧ ( 𝑇𝑋 ) : ( ( 0 ... ( ♯ ‘ 𝑋 ) ) × ( 𝐼 × 2o ) ) ⟶ 𝑊 ) )
6 5 simpld ( 𝑋𝑊 → ( 𝑇𝑋 ) = ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) , 𝑏 ∈ ( 𝐼 × 2o ) ↦ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) )
7 6 rneqd ( 𝑋𝑊 → ran ( 𝑇𝑋 ) = ran ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) , 𝑏 ∈ ( 𝐼 × 2o ) ↦ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) )
8 7 eleq2d ( 𝑋𝑊 → ( 𝐴 ∈ ran ( 𝑇𝑋 ) ↔ 𝐴 ∈ ran ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) , 𝑏 ∈ ( 𝐼 × 2o ) ↦ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) ) )
9 eqid ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) , 𝑏 ∈ ( 𝐼 × 2o ) ↦ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) = ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) , 𝑏 ∈ ( 𝐼 × 2o ) ↦ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) )
10 ovex ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ∈ V
11 9 10 elrnmpo ( 𝐴 ∈ ran ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) , 𝑏 ∈ ( 𝐼 × 2o ) ↦ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) ↔ ∃ 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∃ 𝑏 ∈ ( 𝐼 × 2o ) 𝐴 = ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) )
12 8 11 bitrdi ( 𝑋𝑊 → ( 𝐴 ∈ ran ( 𝑇𝑋 ) ↔ ∃ 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∃ 𝑏 ∈ ( 𝐼 × 2o ) 𝐴 = ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) )
13 fviss ( I ‘ Word ( 𝐼 × 2o ) ) ⊆ Word ( 𝐼 × 2o )
14 1 13 eqsstri 𝑊 ⊆ Word ( 𝐼 × 2o )
15 simpl ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → 𝑋𝑊 )
16 14 15 sselid ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → 𝑋 ∈ Word ( 𝐼 × 2o ) )
17 elfzuz ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) → 𝑎 ∈ ( ℤ ‘ 0 ) )
18 17 ad2antrl ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → 𝑎 ∈ ( ℤ ‘ 0 ) )
19 eluzfz2b ( 𝑎 ∈ ( ℤ ‘ 0 ) ↔ 𝑎 ∈ ( 0 ... 𝑎 ) )
20 18 19 sylib ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → 𝑎 ∈ ( 0 ... 𝑎 ) )
21 simprl ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) )
22 simprr ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → 𝑏 ∈ ( 𝐼 × 2o ) )
23 3 efgmf 𝑀 : ( 𝐼 × 2o ) ⟶ ( 𝐼 × 2o )
24 23 ffvelrni ( 𝑏 ∈ ( 𝐼 × 2o ) → ( 𝑀𝑏 ) ∈ ( 𝐼 × 2o ) )
25 22 24 syl ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( 𝑀𝑏 ) ∈ ( 𝐼 × 2o ) )
26 22 25 s2cld ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ∈ Word ( 𝐼 × 2o ) )
27 16 20 21 26 spllen ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( ♯ ‘ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) = ( ( ♯ ‘ 𝑋 ) + ( ( ♯ ‘ ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ) − ( 𝑎𝑎 ) ) ) )
28 s2len ( ♯ ‘ ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ) = 2
29 28 a1i ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( ♯ ‘ ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ) = 2 )
30 eluzelcn ( 𝑎 ∈ ( ℤ ‘ 0 ) → 𝑎 ∈ ℂ )
31 18 30 syl ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → 𝑎 ∈ ℂ )
32 31 subidd ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( 𝑎𝑎 ) = 0 )
33 29 32 oveq12d ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( ( ♯ ‘ ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ) − ( 𝑎𝑎 ) ) = ( 2 − 0 ) )
34 2cn 2 ∈ ℂ
35 34 subid1i ( 2 − 0 ) = 2
36 33 35 eqtrdi ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( ( ♯ ‘ ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ) − ( 𝑎𝑎 ) ) = 2 )
37 36 oveq2d ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( ( ♯ ‘ 𝑋 ) + ( ( ♯ ‘ ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ) − ( 𝑎𝑎 ) ) ) = ( ( ♯ ‘ 𝑋 ) + 2 ) )
38 27 37 eqtrd ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( ♯ ‘ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) = ( ( ♯ ‘ 𝑋 ) + 2 ) )
39 fveqeq2 ( 𝐴 = ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) → ( ( ♯ ‘ 𝐴 ) = ( ( ♯ ‘ 𝑋 ) + 2 ) ↔ ( ♯ ‘ ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) ) = ( ( ♯ ‘ 𝑋 ) + 2 ) ) )
40 38 39 syl5ibrcom ( ( 𝑋𝑊 ∧ ( 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∧ 𝑏 ∈ ( 𝐼 × 2o ) ) ) → ( 𝐴 = ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) → ( ♯ ‘ 𝐴 ) = ( ( ♯ ‘ 𝑋 ) + 2 ) ) )
41 40 rexlimdvva ( 𝑋𝑊 → ( ∃ 𝑎 ∈ ( 0 ... ( ♯ ‘ 𝑋 ) ) ∃ 𝑏 ∈ ( 𝐼 × 2o ) 𝐴 = ( 𝑋 splice ⟨ 𝑎 , 𝑎 , ⟨“ 𝑏 ( 𝑀𝑏 ) ”⟩ ⟩ ) → ( ♯ ‘ 𝐴 ) = ( ( ♯ ‘ 𝑋 ) + 2 ) ) )
42 12 41 sylbid ( 𝑋𝑊 → ( 𝐴 ∈ ran ( 𝑇𝑋 ) → ( ♯ ‘ 𝐴 ) = ( ( ♯ ‘ 𝑋 ) + 2 ) ) )
43 42 imp ( ( 𝑋𝑊𝐴 ∈ ran ( 𝑇𝑋 ) ) → ( ♯ ‘ 𝐴 ) = ( ( ♯ ‘ 𝑋 ) + 2 ) )