Theorem: orderOf_dvd_card_univ
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: classical
  have ft_prod : Fintype ((G ⧸ zpowers x) × zpowers x) :=
    Fintype.ofEquiv G groupEquivQuotientProdSubgroup
  have ft_s : Fintype (zpowers x) := @Fintype.prodRight _ _ _ ft_prod _
  have ft_cosets : Fintype (G ⧸ zpowers x) :=
    @Fintype.prodLeft _ _ _ ft_prod ⟨⟨1, (zpowers x).one_mem⟩⟩
  have eq₁ : Fintype.card G = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s :=
    calc
      Fintype.card G = @Fintype.card _ ft_prod :=
        @Fintype.card_congr _ _ _ ft_prod groupEquivQuotientProdSubgroup
      _ = @Fintype.card _ (@instFintypeProd _ _ ft_cosets ft_s) :=
        congr_arg (@Fintype.card _) <| Subsingleton.elim _ _
      _ = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s :=
        @Fintype.card_prod _ _ ft_cosets ft_s
  have eq₂ : orderOf x = @Fintype.card _ ft_s :=
    calc
      orderOf x = _ := orderOf_eq_card_zpowers
      _ = _ := congr_arg (@Fintype.card _) <| Subsingleton.elim _ _
  exact Dvd.intro (@Fintype.card (G ⧸ Subgroup.zpowers x) ft_cosets) (by rw [eq₁, eq₂, mul_comm])
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
⊢ orderOf x ∣ Fintype.card G

tactic: have ft_prod : Fintype ((G ⧸ zpowers x) × zpowers x) :=
  Fintype.ofEquiv G groupEquivQuotientProdSubgroup
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
⊢ orderOf x ∣ Fintype.card G

tactic: have ft_s : Fintype (zpowers x) := @Fintype.prodRight _ _ _ ft_prod _
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
ft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })
⊢ orderOf x ∣ Fintype.card G

tactic: have ft_cosets : Fintype (G ⧸ zpowers x) :=
  @Fintype.prodLeft _ _ _ ft_prod ⟨⟨1, (zpowers x).one_mem⟩⟩
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
ft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })
ft_s : Fintype { x_1 // x_1 ∈ zpowers x }
⊢ orderOf x ∣ Fintype.card G

tactic: have eq₁ : Fintype.card G = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s :=
  calc
    Fintype.card G = @Fintype.card _ ft_prod :=
      @Fintype.card_congr _ _ _ ft_prod groupEquivQuotientProdSubgroup
    _ = @Fintype.card _ (@instFintypeProd _ _ ft_cosets ft_s) :=
      congr_arg (@Fintype.card _) <| Subsingleton.elim _ _
    _ = @Fintype.card _ ft_cosets * @Fintype.card _ ft_s :=
      @Fintype.card_prod _ _ ft_cosets ft_s
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
ft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })
ft_s : Fintype { x_1 // x_1 ∈ zpowers x }
ft_cosets : Fintype (G ⧸ zpowers x)
⊢ orderOf x ∣ Fintype.card G

tactic: have eq₂ : orderOf x = @Fintype.card _ ft_s :=
  calc
    orderOf x = _ := orderOf_eq_card_zpowers
    _ = _ := congr_arg (@Fintype.card _) <| Subsingleton.elim _ _
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
ft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })
ft_s : Fintype { x_1 // x_1 ∈ zpowers x }
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : Fintype.card G = Fintype.card (G ⧸ zpowers x) * Fintype.card { x_1 // x_1 ∈ zpowers x }
⊢ orderOf x ∣ Fintype.card G

tactic: exact Dvd.intro (@Fintype.card (G ⧸ Subgroup.zpowers x) ft_cosets) (by rw [eq₁, eq₂, mul_comm])
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
ft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })
ft_s : Fintype { x_1 // x_1 ∈ zpowers x }
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : Fintype.card G = Fintype.card (G ⧸ zpowers x) * Fintype.card { x_1 // x_1 ∈ zpowers x }
eq₂ : orderOf x = Fintype.card { x_1 // x_1 ∈ zpowers x }
⊢ orderOf x ∣ Fintype.card G

tactic: rw [eq₁, eq₂, mul_comm]
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝² : Group G
inst✝¹ : AddGroup A
inst✝ : Fintype G
ft_prod : Fintype ((G ⧸ zpowers x) × { x_1 // x_1 ∈ zpowers x })
ft_s : Fintype { x_1 // x_1 ∈ zpowers x }
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : Fintype.card G = Fintype.card (G ⧸ zpowers x) * Fintype.card { x_1 // x_1 ∈ zpowers x }
eq₂ : orderOf x = Fintype.card { x_1 // x_1 ∈ zpowers x }
⊢ orderOf x * Fintype.card (G ⧸ zpowers x) = Fintype.card G