Skip to content

Commit db99aaa

Browse files
feat(RingTheory/RootsOfUnity/Basic): add more covenient version of a lemma (#13375)
This provides ```lean lemma eq_pow_of_mem_rootsOfUnity' {k : ℕ} (hk : 0 < k) {ζ : R} (hζ : IsPrimitiveRoot ζ k) {ξ : Rˣ} (hξ : ξ ∈ rootsOfUnity (⟨k, hk⟩ : ℕ+) R) : ∃ i < k, ζ ^ i = ξ ``` for ease of use compared with [IsPrimitiveRoot.eq_pow_of_mem_rootsOfUnity](https://leanprover-community.github.io/mathlib4_docs/Mathlib/RingTheory/RootsOfUnity/Basic.html#IsPrimitiveRoot.eq_pow_of_mem_rootsOfUnity), which requires `k` to be a `PNat` and `ζ` to be a unit.
1 parent 4cedece commit db99aaa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Mathlib/RingTheory/RootsOfUnity/Basic.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,16 @@ theorem eq_pow_of_mem_rootsOfUnity {k : ℕ+} {ζ ξ : Rˣ} (h : IsPrimitiveRoot
834834
mul_one]
835835
#align is_primitive_root.eq_pow_of_mem_roots_of_unity IsPrimitiveRoot.eq_pow_of_mem_rootsOfUnity
836836

837+
/-- A version of `IsPrimitiveRoot.eq_pow_of_mem_rootsOfUnity` that takes a natural number `k`
838+
as argument instead of a `PNat` (and `ζ : R` instead of `ζ : Rˣ`). -/
839+
lemma eq_pow_of_mem_rootsOfUnity' {k : ℕ} (hk : 0 < k) {ζ : R} (hζ : IsPrimitiveRoot ζ k) {ξ : Rˣ}
840+
(hξ : ξ ∈ rootsOfUnity (⟨k, hk⟩ : ℕ+) R) :
841+
∃ i < k, ζ ^ i = ξ := by
842+
have hζ' : IsPrimitiveRoot (hζ.isUnit hk).unit (⟨k, hk⟩ : ℕ+) := isUnit_unit hk hζ
843+
obtain ⟨i, hi₁, hi₂⟩ := hζ'.eq_pow_of_mem_rootsOfUnity hξ
844+
simpa only [Units.val_pow_eq_pow_val, IsUnit.unit_spec]
845+
using ⟨i, hi₁, congrArg ((↑) : Rˣ → R) hi₂⟩
846+
837847
theorem eq_pow_of_pow_eq_one {k : ℕ} {ζ ξ : R} (h : IsPrimitiveRoot ζ k) (hξ : ξ ^ k = 1)
838848
(h0 : 0 < k) : ∃ i < k, ζ ^ i = ξ := by
839849
lift ζ to Rˣ using h.isUnit h0

0 commit comments

Comments
 (0)