Metamath Proof Explorer


Theorem cyggenod2

Description: In an infinite cyclic group, the generator must have infinite order, but this property no longer characterizes the generators. (Contributed by Mario Carneiro, 21-Apr-2016)

Ref Expression
Hypotheses iscyg.1 𝐵 = ( Base ‘ 𝐺 )
iscyg.2 · = ( .g𝐺 )
iscyg3.e 𝐸 = { 𝑥𝐵 ∣ ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑥 ) ) = 𝐵 }
cyggenod.o 𝑂 = ( od ‘ 𝐺 )
Assertion cyggenod2 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐸 ) → ( 𝑂𝑋 ) = if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) )

Proof

Step Hyp Ref Expression
1 iscyg.1 𝐵 = ( Base ‘ 𝐺 )
2 iscyg.2 · = ( .g𝐺 )
3 iscyg3.e 𝐸 = { 𝑥𝐵 ∣ ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑥 ) ) = 𝐵 }
4 cyggenod.o 𝑂 = ( od ‘ 𝐺 )
5 1 2 3 iscyggen ( 𝑋𝐸 ↔ ( 𝑋𝐵 ∧ ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) = 𝐵 ) )
6 5 simplbi ( 𝑋𝐸𝑋𝐵 )
7 eqid ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) = ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) )
8 1 4 2 7 dfod2 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐵 ) → ( 𝑂𝑋 ) = if ( ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ∈ Fin , ( ♯ ‘ ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ) , 0 ) )
9 6 8 sylan2 ( ( 𝐺 ∈ Grp ∧ 𝑋𝐸 ) → ( 𝑂𝑋 ) = if ( ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ∈ Fin , ( ♯ ‘ ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ) , 0 ) )
10 5 simprbi ( 𝑋𝐸 → ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) = 𝐵 )
11 10 adantl ( ( 𝐺 ∈ Grp ∧ 𝑋𝐸 ) → ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) = 𝐵 )
12 11 eleq1d ( ( 𝐺 ∈ Grp ∧ 𝑋𝐸 ) → ( ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ∈ Fin ↔ 𝐵 ∈ Fin ) )
13 11 fveq2d ( ( 𝐺 ∈ Grp ∧ 𝑋𝐸 ) → ( ♯ ‘ ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ) = ( ♯ ‘ 𝐵 ) )
14 12 13 ifbieq1d ( ( 𝐺 ∈ Grp ∧ 𝑋𝐸 ) → if ( ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ∈ Fin , ( ♯ ‘ ran ( 𝑛 ∈ ℤ ↦ ( 𝑛 · 𝑋 ) ) ) , 0 ) = if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) )
15 9 14 eqtrd ( ( 𝐺 ∈ Grp ∧ 𝑋𝐸 ) → ( 𝑂𝑋 ) = if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) )