Metamath Proof Explorer


Theorem efgsdmi

Description: Property of the last link in the chain of extensions. (Contributed by Mario Carneiro, 29-Sep-2015)

Ref Expression
Hypotheses efgval.w 𝑊 = ( I ‘ Word ( 𝐼 × 2o ) )
efgval.r = ( ~FG𝐼 )
efgval2.m 𝑀 = ( 𝑦𝐼 , 𝑧 ∈ 2o ↦ ⟨ 𝑦 , ( 1o𝑧 ) ⟩ )
efgval2.t 𝑇 = ( 𝑣𝑊 ↦ ( 𝑛 ∈ ( 0 ... ( ♯ ‘ 𝑣 ) ) , 𝑤 ∈ ( 𝐼 × 2o ) ↦ ( 𝑣 splice ⟨ 𝑛 , 𝑛 , ⟨“ 𝑤 ( 𝑀𝑤 ) ”⟩ ⟩ ) ) )
efgred.d 𝐷 = ( 𝑊 𝑥𝑊 ran ( 𝑇𝑥 ) )
efgred.s 𝑆 = ( 𝑚 ∈ { 𝑡 ∈ ( Word 𝑊 ∖ { ∅ } ) ∣ ( ( 𝑡 ‘ 0 ) ∈ 𝐷 ∧ ∀ 𝑘 ∈ ( 1 ..^ ( ♯ ‘ 𝑡 ) ) ( 𝑡𝑘 ) ∈ ran ( 𝑇 ‘ ( 𝑡 ‘ ( 𝑘 − 1 ) ) ) ) } ↦ ( 𝑚 ‘ ( ( ♯ ‘ 𝑚 ) − 1 ) ) )
Assertion efgsdmi ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( 𝑆𝐹 ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( ( ( ♯ ‘ 𝐹 ) − 1 ) − 1 ) ) ) )

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 efgred.d 𝐷 = ( 𝑊 𝑥𝑊 ran ( 𝑇𝑥 ) )
6 efgred.s 𝑆 = ( 𝑚 ∈ { 𝑡 ∈ ( Word 𝑊 ∖ { ∅ } ) ∣ ( ( 𝑡 ‘ 0 ) ∈ 𝐷 ∧ ∀ 𝑘 ∈ ( 1 ..^ ( ♯ ‘ 𝑡 ) ) ( 𝑡𝑘 ) ∈ ran ( 𝑇 ‘ ( 𝑡 ‘ ( 𝑘 − 1 ) ) ) ) } ↦ ( 𝑚 ‘ ( ( ♯ ‘ 𝑚 ) − 1 ) ) )
7 1 2 3 4 5 6 efgsval ( 𝐹 ∈ dom 𝑆 → ( 𝑆𝐹 ) = ( 𝐹 ‘ ( ( ♯ ‘ 𝐹 ) − 1 ) ) )
8 7 adantr ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( 𝑆𝐹 ) = ( 𝐹 ‘ ( ( ♯ ‘ 𝐹 ) − 1 ) ) )
9 fveq2 ( 𝑖 = ( ( ♯ ‘ 𝐹 ) − 1 ) → ( 𝐹𝑖 ) = ( 𝐹 ‘ ( ( ♯ ‘ 𝐹 ) − 1 ) ) )
10 fvoveq1 ( 𝑖 = ( ( ♯ ‘ 𝐹 ) − 1 ) → ( 𝐹 ‘ ( 𝑖 − 1 ) ) = ( 𝐹 ‘ ( ( ( ♯ ‘ 𝐹 ) − 1 ) − 1 ) ) )
11 10 fveq2d ( 𝑖 = ( ( ♯ ‘ 𝐹 ) − 1 ) → ( 𝑇 ‘ ( 𝐹 ‘ ( 𝑖 − 1 ) ) ) = ( 𝑇 ‘ ( 𝐹 ‘ ( ( ( ♯ ‘ 𝐹 ) − 1 ) − 1 ) ) ) )
12 11 rneqd ( 𝑖 = ( ( ♯ ‘ 𝐹 ) − 1 ) → ran ( 𝑇 ‘ ( 𝐹 ‘ ( 𝑖 − 1 ) ) ) = ran ( 𝑇 ‘ ( 𝐹 ‘ ( ( ( ♯ ‘ 𝐹 ) − 1 ) − 1 ) ) ) )
13 9 12 eleq12d ( 𝑖 = ( ( ♯ ‘ 𝐹 ) − 1 ) → ( ( 𝐹𝑖 ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( 𝑖 − 1 ) ) ) ↔ ( 𝐹 ‘ ( ( ♯ ‘ 𝐹 ) − 1 ) ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( ( ( ♯ ‘ 𝐹 ) − 1 ) − 1 ) ) ) ) )
14 1 2 3 4 5 6 efgsdm ( 𝐹 ∈ dom 𝑆 ↔ ( 𝐹 ∈ ( Word 𝑊 ∖ { ∅ } ) ∧ ( 𝐹 ‘ 0 ) ∈ 𝐷 ∧ ∀ 𝑖 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐹𝑖 ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( 𝑖 − 1 ) ) ) ) )
15 14 simp3bi ( 𝐹 ∈ dom 𝑆 → ∀ 𝑖 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐹𝑖 ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( 𝑖 − 1 ) ) ) )
16 15 adantr ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ∀ 𝑖 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) ( 𝐹𝑖 ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( 𝑖 − 1 ) ) ) )
17 simpr ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ )
18 nnuz ℕ = ( ℤ ‘ 1 )
19 17 18 eleqtrdi ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ( ℤ ‘ 1 ) )
20 eluzfz1 ( ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ( ℤ ‘ 1 ) → 1 ∈ ( 1 ... ( ( ♯ ‘ 𝐹 ) − 1 ) ) )
21 19 20 syl ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → 1 ∈ ( 1 ... ( ( ♯ ‘ 𝐹 ) − 1 ) ) )
22 14 simp1bi ( 𝐹 ∈ dom 𝑆𝐹 ∈ ( Word 𝑊 ∖ { ∅ } ) )
23 22 adantr ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → 𝐹 ∈ ( Word 𝑊 ∖ { ∅ } ) )
24 23 eldifad ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → 𝐹 ∈ Word 𝑊 )
25 lencl ( 𝐹 ∈ Word 𝑊 → ( ♯ ‘ 𝐹 ) ∈ ℕ0 )
26 nn0z ( ( ♯ ‘ 𝐹 ) ∈ ℕ0 → ( ♯ ‘ 𝐹 ) ∈ ℤ )
27 fzoval ( ( ♯ ‘ 𝐹 ) ∈ ℤ → ( 1 ..^ ( ♯ ‘ 𝐹 ) ) = ( 1 ... ( ( ♯ ‘ 𝐹 ) − 1 ) ) )
28 24 25 26 27 4syl ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( 1 ..^ ( ♯ ‘ 𝐹 ) ) = ( 1 ... ( ( ♯ ‘ 𝐹 ) − 1 ) ) )
29 21 28 eleqtrrd ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → 1 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) )
30 fzoend ( 1 ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) → ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) )
31 29 30 syl ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ( 1 ..^ ( ♯ ‘ 𝐹 ) ) )
32 13 16 31 rspcdva ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( 𝐹 ‘ ( ( ♯ ‘ 𝐹 ) − 1 ) ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( ( ( ♯ ‘ 𝐹 ) − 1 ) − 1 ) ) ) )
33 8 32 eqeltrd ( ( 𝐹 ∈ dom 𝑆 ∧ ( ( ♯ ‘ 𝐹 ) − 1 ) ∈ ℕ ) → ( 𝑆𝐹 ) ∈ ran ( 𝑇 ‘ ( 𝐹 ‘ ( ( ( ♯ ‘ 𝐹 ) − 1 ) − 1 ) ) ) )