Metamath Proof Explorer


Theorem cyggic

Description: Cyclic groups are isomorphic precisely when they have the same order. (Contributed by Mario Carneiro, 21-Apr-2016)

Ref Expression
Hypotheses cygctb.b 𝐵 = ( Base ‘ 𝐺 )
cygctb.c 𝐶 = ( Base ‘ 𝐻 )
Assertion cyggic ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) → ( 𝐺𝑔 𝐻𝐵𝐶 ) )

Proof

Step Hyp Ref Expression
1 cygctb.b 𝐵 = ( Base ‘ 𝐺 )
2 cygctb.c 𝐶 = ( Base ‘ 𝐻 )
3 1 2 gicen ( 𝐺𝑔 𝐻𝐵𝐶 )
4 eqid if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) = if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 )
5 eqid ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) ) = ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) )
6 1 4 5 cygzn ( 𝐺 ∈ CycGrp → 𝐺𝑔 ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) ) )
7 6 ad2antrr ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → 𝐺𝑔 ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) ) )
8 enfi ( 𝐵𝐶 → ( 𝐵 ∈ Fin ↔ 𝐶 ∈ Fin ) )
9 8 adantl ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → ( 𝐵 ∈ Fin ↔ 𝐶 ∈ Fin ) )
10 hasheni ( 𝐵𝐶 → ( ♯ ‘ 𝐵 ) = ( ♯ ‘ 𝐶 ) )
11 10 adantl ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → ( ♯ ‘ 𝐵 ) = ( ♯ ‘ 𝐶 ) )
12 9 11 ifbieq1d ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) = if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) )
13 12 fveq2d ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) ) = ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) ) )
14 eqid if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) = if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 )
15 eqid ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) ) = ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) )
16 2 14 15 cygzn ( 𝐻 ∈ CycGrp → 𝐻𝑔 ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) ) )
17 16 ad2antlr ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → 𝐻𝑔 ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) ) )
18 gicsym ( 𝐻𝑔 ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) ) → ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) ) ≃𝑔 𝐻 )
19 17 18 syl ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → ( ℤ/nℤ ‘ if ( 𝐶 ∈ Fin , ( ♯ ‘ 𝐶 ) , 0 ) ) ≃𝑔 𝐻 )
20 13 19 eqbrtrd ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) ) ≃𝑔 𝐻 )
21 gictr ( ( 𝐺𝑔 ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) ) ∧ ( ℤ/nℤ ‘ if ( 𝐵 ∈ Fin , ( ♯ ‘ 𝐵 ) , 0 ) ) ≃𝑔 𝐻 ) → 𝐺𝑔 𝐻 )
22 7 20 21 syl2anc ( ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) ∧ 𝐵𝐶 ) → 𝐺𝑔 𝐻 )
23 22 ex ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) → ( 𝐵𝐶𝐺𝑔 𝐻 ) )
24 3 23 impbid2 ( ( 𝐺 ∈ CycGrp ∧ 𝐻 ∈ CycGrp ) → ( 𝐺𝑔 𝐻𝐵𝐶 ) )