case inl

⊢ Monoid.exponent (DihedralGroup 0) = lcm 0 2

case inr
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (DihedralGroup n) = lcm n 2
n : ℕ
⊢ Monoid.exponent (DihedralGroup n) = lcm n 2
rcases eq_zero_or_neZero n with (rfl | hn)
case inr.a
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (DihedralGroup n) ∣ lcm n 2

case inr.a
n : ℕ
hn : NeZero n
⊢ lcm n 2 ∣ Monoid.exponent (DihedralGroup n)
case inr
n : ℕ
hn : NeZero n
⊢ Monoid.exponent (DihedralGroup n) = lcm n 2
apply Nat.dvd_antisymm
no goals
case inl

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

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

case inr.a.hcb
n : ℕ
hn : NeZero n
⊢ 2 ∣ Monoid.exponent (DihedralGroup n)
case inr.a
n : ℕ
hn : NeZero n
⊢ lcm n 2 ∣ Monoid.exponent (DihedralGroup n)
apply lcm_dvd
case h.e'_3
n : ℕ
hn : NeZero n
⊢ n = orderOf (r 1)
case inr.a.hab
n : ℕ
hn : NeZero n
⊢ n ∣ Monoid.exponent (DihedralGroup n)
convert Monoid.order_dvd_exponent (r (1 : ZMod n))
no goals
case h.e'_3
n : ℕ
hn : NeZero n
⊢ n = orderOf (r 1)
exact orderOf_r_one.symm
case h.e'_3
n : ℕ
hn : NeZero n
⊢ 2 = orderOf (sr 0)
case inr.a.hcb
n : ℕ
hn : NeZero n
⊢ 2 ∣ Monoid.exponent (DihedralGroup n)
convert Monoid.order_dvd_exponent (sr (0 : ZMod n))
no goals
case h.e'_3
n : ℕ
hn : NeZero n
⊢ 2 = orderOf (sr 0)
exact (orderOf_sr 0).symm