Metamath Proof Explorer


Theorem erclwwlkneqlen

Description: If two classes are equivalent regarding .~ , then they are words of the same length. (Contributed by Alexander van der Vekens, 8-Apr-2018) (Revised by AV, 30-Apr-2021)

Ref Expression
Hypotheses erclwwlkn.w 𝑊 = ( 𝑁 ClWWalksN 𝐺 )
erclwwlkn.r = { ⟨ 𝑡 , 𝑢 ⟩ ∣ ( 𝑡𝑊𝑢𝑊 ∧ ∃ 𝑛 ∈ ( 0 ... 𝑁 ) 𝑡 = ( 𝑢 cyclShift 𝑛 ) ) }
Assertion erclwwlkneqlen ( ( 𝑇𝑋𝑈𝑌 ) → ( 𝑇 𝑈 → ( ♯ ‘ 𝑇 ) = ( ♯ ‘ 𝑈 ) ) )

Proof

Step Hyp Ref Expression
1 erclwwlkn.w 𝑊 = ( 𝑁 ClWWalksN 𝐺 )
2 erclwwlkn.r = { ⟨ 𝑡 , 𝑢 ⟩ ∣ ( 𝑡𝑊𝑢𝑊 ∧ ∃ 𝑛 ∈ ( 0 ... 𝑁 ) 𝑡 = ( 𝑢 cyclShift 𝑛 ) ) }
3 1 2 erclwwlkneq ( ( 𝑇𝑋𝑈𝑌 ) → ( 𝑇 𝑈 ↔ ( 𝑇𝑊𝑈𝑊 ∧ ∃ 𝑛 ∈ ( 0 ... 𝑁 ) 𝑇 = ( 𝑈 cyclShift 𝑛 ) ) ) )
4 fveq2 ( 𝑇 = ( 𝑈 cyclShift 𝑛 ) → ( ♯ ‘ 𝑇 ) = ( ♯ ‘ ( 𝑈 cyclShift 𝑛 ) ) )
5 eqid ( Vtx ‘ 𝐺 ) = ( Vtx ‘ 𝐺 )
6 5 clwwlknwrd ( 𝑈 ∈ ( 𝑁 ClWWalksN 𝐺 ) → 𝑈 ∈ Word ( Vtx ‘ 𝐺 ) )
7 6 1 eleq2s ( 𝑈𝑊𝑈 ∈ Word ( Vtx ‘ 𝐺 ) )
8 7 adantl ( ( 𝑇𝑊𝑈𝑊 ) → 𝑈 ∈ Word ( Vtx ‘ 𝐺 ) )
9 elfzelz ( 𝑛 ∈ ( 0 ... 𝑁 ) → 𝑛 ∈ ℤ )
10 cshwlen ( ( 𝑈 ∈ Word ( Vtx ‘ 𝐺 ) ∧ 𝑛 ∈ ℤ ) → ( ♯ ‘ ( 𝑈 cyclShift 𝑛 ) ) = ( ♯ ‘ 𝑈 ) )
11 8 9 10 syl2an ( ( ( 𝑇𝑊𝑈𝑊 ) ∧ 𝑛 ∈ ( 0 ... 𝑁 ) ) → ( ♯ ‘ ( 𝑈 cyclShift 𝑛 ) ) = ( ♯ ‘ 𝑈 ) )
12 4 11 sylan9eqr ( ( ( ( 𝑇𝑊𝑈𝑊 ) ∧ 𝑛 ∈ ( 0 ... 𝑁 ) ) ∧ 𝑇 = ( 𝑈 cyclShift 𝑛 ) ) → ( ♯ ‘ 𝑇 ) = ( ♯ ‘ 𝑈 ) )
13 12 rexlimdva2 ( ( 𝑇𝑊𝑈𝑊 ) → ( ∃ 𝑛 ∈ ( 0 ... 𝑁 ) 𝑇 = ( 𝑈 cyclShift 𝑛 ) → ( ♯ ‘ 𝑇 ) = ( ♯ ‘ 𝑈 ) ) )
14 13 3impia ( ( 𝑇𝑊𝑈𝑊 ∧ ∃ 𝑛 ∈ ( 0 ... 𝑁 ) 𝑇 = ( 𝑈 cyclShift 𝑛 ) ) → ( ♯ ‘ 𝑇 ) = ( ♯ ‘ 𝑈 ) )
15 3 14 syl6bi ( ( 𝑇𝑋𝑈𝑌 ) → ( 𝑇 𝑈 → ( ♯ ‘ 𝑇 ) = ( ♯ ‘ 𝑈 ) ) )