Skip to content

Commit 2efb0a3

Browse files
better
1 parent 68c61b7 commit 2efb0a3

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

FltRegular/NumberTheory/Cyclotomic/UnitLemmas.lean

+8-4
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ theorem unit_inv_conj_not_neg_zeta_runity (h : p ≠ 2) (u : Rˣ) (n : ℕ) (hp
374374
apply hζ.two_not_mem_one_sub_zeta h
375375
rw [← Ideal.Quotient.eq_zero_iff_mem, map_two, ← neg_one_eq_one_iff_two_eq_zero, ← hμ', hμ]
376376

377+
-- Add to mathlib
378+
@[norm_cast]
379+
lemma NumberField.RingOfIntegers.eq_iff {K : Type*} [Field K] {x y : 𝓞 K} :
380+
(x : K) = (y : K) ↔ x = y :=
381+
NumberField.RingOfIntegers.ext_iff.symm
377382

378383
-- this proof has mild coe annoyances rn
379384
theorem unit_inv_conj_is_root_of_unity (h : p ≠ 2) (hp : (p : ℕ).Prime) (u : Rˣ) :
@@ -389,15 +394,14 @@ theorem unit_inv_conj_is_root_of_unity (h : p ≠ 2) (hp : (p : ℕ).Prime) (u :
389394
have hk := Nat.even_or_odd k
390395
cases' hk with hk hk
391396
· simp only [hk.neg_one_pow, one_mul] at hz
392-
rw [← map_mul, ← Units.val_mul, ← map_pow, ← Units.val_pow_eq_pow_val,
393-
← NumberField.RingOfIntegers.ext_iff, ← Units.ext_iff] at hz
397+
rw [← map_mul, ← Units.val_mul, ← map_pow, ← Units.val_pow_eq_pow_val] at hz
398+
norm_cast at hz
394399
rw [hz]
395400
refine' (exists_congr fun a => _).mp (zeta_runity_pow_even hζ hpo n)
396401
· rw [mul_comm]
397402
· by_contra
398403
simp only [hk.neg_one_pow, neg_mul, one_mul] at hz
399-
rw [← map_mul, ← Units.val_mul, ← map_pow, ← Units.val_pow_eq_pow_val, ← map_neg,
400-
← NumberField.RingOfIntegers.ext_iff] at hz
404+
rw [← map_mul, ← Units.val_mul, ← map_pow, ← Units.val_pow_eq_pow_val, ← map_neg] at hz
401405
norm_cast at hz
402406
simpa [hz] using unit_inv_conj_not_neg_zeta_runity hζ h u n hp
403407
· apply RingHom.IsIntegralElem.mul

0 commit comments

Comments
 (0)