Theorem: orderOf_dvd_card
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 = _ := Fintype.card_zpowers.symm
      _ = _ := 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_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
⊢ orderOf x ∣ card G
state_after: no goals

tactic: have ft_prod : Fintype ((G ⧸ zpowers x) × zpowers x) :=
  Fintype.ofEquiv G groupEquivQuotientProdSubgroup
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
⊢ orderOf x ∣ card G
state_after: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
⊢ orderOf x ∣ card G

tactic: have ft_s : Fintype (zpowers x) := @Fintype.prodRight _ _ _ ft_prod _
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
⊢ orderOf x ∣ card G
state_after: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
⊢ orderOf x ∣ card G

tactic: have ft_cosets : Fintype (G ⧸ zpowers x) :=
  @Fintype.prodLeft _ _ _ ft_prod ⟨⟨1, (zpowers x).one_mem⟩⟩
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
⊢ orderOf x ∣ card G
state_after: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
ft_cosets : Fintype (G ⧸ zpowers x)
⊢ orderOf x ∣ 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_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
ft_cosets : Fintype (G ⧸ zpowers x)
⊢ orderOf x ∣ card G
state_after: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : card G = card (G ⧸ zpowers x) * card ↥(zpowers x)
⊢ orderOf x ∣ card G

tactic: have eq₂ : orderOf x = @Fintype.card _ ft_s :=
  calc
    orderOf x = _ := Fintype.card_zpowers.symm
    _ = _ := congr_arg (@Fintype.card _) <| Subsingleton.elim _ _
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : card G = card (G ⧸ zpowers x) * card ↥(zpowers x)
⊢ orderOf x ∣ card G
state_after: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : card G = card (G ⧸ zpowers x) * card ↥(zpowers x)
eq₂ : orderOf x = card ↥(zpowers x)
⊢ orderOf x ∣ 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_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : card G = card (G ⧸ zpowers x) * card ↥(zpowers x)
eq₂ : orderOf x = card ↥(zpowers x)
⊢ orderOf x ∣ card G
state_after: no goals

tactic: rw [eq₁, eq₂, mul_comm]
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : Group G
inst✝ : Fintype G
x : G
n : ℕ
ft_prod : Fintype ((G ⧸ zpowers x) × ↥(zpowers x))
ft_s : Fintype ↥(zpowers x)
ft_cosets : Fintype (G ⧸ zpowers x)
eq₁ : card G = card (G ⧸ zpowers x) * card ↥(zpowers x)
eq₂ : orderOf x = card ↥(zpowers x)
⊢ orderOf x * card (G ⧸ zpowers x) = card G
state_after: no goals