n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) (2 * 2)
n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = 2 * lcm n 2
rw [← normalize_eq 2, ← lcm_mul_left, normalize_eq]
n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) (2 * 2)
norm_num
case inl
n : ℕ
hn : n = 0
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4

case inr
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
n : ℕ
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
cases' eq_zero_or_neZero n with hn hn
case inr.a
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (QuaternionGroup n) ∣ lcm (2 * n) 4

case inr.a
n : ℕ
hn : NeZero n
⊢ lcm (2 * n) 4 ∣ Monoid.exponent (QuaternionGroup n)
case inr
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
apply Nat.dvd_antisymm
case inl

⊢ Monoid.exponent (QuaternionGroup 0) = lcm (2 * 0) 4
case inl
n : ℕ
hn : n = 0
⊢ Monoid.exponent (QuaternionGroup n) = lcm (2 * n) 4
subst hn
case inl

⊢ Monoid.exponent (QuaternionGroup 0) = 0
case inl

⊢ Monoid.exponent (QuaternionGroup 0) = lcm (2 * 0) 4
simp only [lcm_zero_left, MulZeroClass.mul_zero]
no goals
case inl

⊢ Monoid.exponent (QuaternionGroup 0) = 0
exact Monoid.exponent_eq_zero_of_order_zero orderOf_a_one
case inr.a.hG
n : ℕ
hn : NeZero n
⊢ ∀ (g : QuaternionGroup n), g ^ lcm (2 * n) 4 = 1
case inr.a
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (QuaternionGroup n) ∣ lcm (2 * n) 4
apply Monoid.exponent_dvd_of_forall_pow_eq_one
case inr.a.hG.a
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ a m ^ lcm (2 * n) 4 = 1

case inr.a.hG.xa
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ xa m ^ lcm (2 * n) 4 = 1
case inr.a.hG
n : ℕ
hn : NeZero n
⊢ ∀ (g : QuaternionGroup n), g ^ lcm (2 * n) 4 = 1
rintro (m | m)
case inr.a.hG.a
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ 2 * n / Nat.gcd (2 * n) (ZMod.val m) ∣ lcm (2 * n) 4
case inr.a.hG.a
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ a m ^ lcm (2 * n) 4 = 1
rw [← orderOf_dvd_iff_pow_eq_one, orderOf_a]
case inr.a.hG.a
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ 2 * n = 2 * n / Nat.gcd (2 * n) (ZMod.val m) * gcd (2 * n) (ZMod.val m)
case inr.a.hG.a
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ 2 * n / Nat.gcd (2 * n) (ZMod.val m) ∣ lcm (2 * n) 4
refine' Nat.dvd_trans ⟨gcd (2 * n) m.val, _⟩ (dvd_lcm_left (2 * n) 4)
no goals
case inr.a.hG.a
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ 2 * n = 2 * n / Nat.gcd (2 * n) (ZMod.val m) * gcd (2 * n) (ZMod.val m)
exact (Nat.div_mul_cancel (Nat.gcd_dvd_left (2 * n) m.val)).symm
case inr.a.hG.xa
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ 4 ∣ lcm (2 * n) 4
case inr.a.hG.xa
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ xa m ^ lcm (2 * n) 4 = 1
rw [← orderOf_dvd_iff_pow_eq_one, orderOf_xa]
no goals
case inr.a.hG.xa
n : ℕ
hn : NeZero n
m : ZMod (2 * n)
⊢ 4 ∣ lcm (2 * n) 4
exact dvd_lcm_right (2 * n) 4
case inr.a.hab
n : ℕ
hn : NeZero n
⊢ 2 * n ∣ Monoid.exponent (QuaternionGroup n)

case inr.a.hcb
n : ℕ
hn : NeZero n
⊢ 4 ∣ Monoid.exponent (QuaternionGroup n)
case inr.a
n : ℕ
hn : NeZero n
⊢ lcm (2 * n) 4 ∣ Monoid.exponent (QuaternionGroup n)
apply lcm_dvd
case h.e'_3
n : ℕ
hn : NeZero n
⊢ 2 * n = orderOf (a 1)
case inr.a.hab
n : ℕ
hn : NeZero n
⊢ 2 * n ∣ Monoid.exponent (QuaternionGroup n)
convert Monoid.order_dvd_exponent (a 1)
no goals
case h.e'_3
n : ℕ
hn : NeZero n
⊢ 2 * n = orderOf (a 1)
exact orderOf_a_one.symm
case h.e'_3
n : ℕ
hn : NeZero n
⊢ 4 = orderOf (xa 0)
case inr.a.hcb
n : ℕ
hn : NeZero n
⊢ 4 ∣ Monoid.exponent (QuaternionGroup n)
convert Monoid.order_dvd_exponent (xa (0 : ZMod (2 * n)))
no goals
case h.e'_3
n : ℕ
hn : NeZero n
⊢ 4 = orderOf (xa 0)
exact (orderOf_xa 0).symm