statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
pow_of_prime (h : is_primitive_root ζ k) {p : ℕ} (hprime : nat.prime p) (hdiv : ¬ p ∣ k) : is_primitive_root (ζ ^ p) k
h.pow_of_coprime p (hprime.coprime_iff_not_dvd.2 hdiv)
lemma
is_primitive_root.pow_of_prime
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "nat.prime" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_iff_coprime (h : is_primitive_root ζ k) (h0 : 0 < k) (i : ℕ) : is_primitive_root (ζ ^ i) k ↔ i.coprime k
begin refine ⟨_, h.pow_of_coprime i⟩, intro hi, obtain ⟨a, ha⟩ := i.gcd_dvd_left k, obtain ⟨b, hb⟩ := i.gcd_dvd_right k, suffices : b = k, { rwa [this, ← one_mul k, mul_left_inj' h0.ne', eq_comm] at hb { occs := occurrences.pos [1] } }, rw [ha] at hi, rw [mul_comm] at hb, apply nat.dvd_antisymm ⟨i.gcd...
lemma
is_primitive_root.pow_iff_coprime
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "mul_assoc", "mul_comm", "mul_left_inj'", "one_mul", "one_pow", "pow_mul", "pow_mul'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
order_of (ζ : M) : is_primitive_root ζ (order_of ζ)
⟨pow_order_of_eq_one ζ, λ l, order_of_dvd_of_pow_eq_one⟩
lemma
is_primitive_root.order_of
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "order_of" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
unique {ζ : M} (hk : is_primitive_root ζ k) (hl : is_primitive_root ζ l) : k = l
nat.dvd_antisymm (hk.2 _ hl.1) (hl.2 _ hk.1)
lemma
is_primitive_root.unique
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "unique" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_order_of : k = order_of ζ
h.unique (is_primitive_root.order_of ζ)
lemma
is_primitive_root.eq_order_of
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root.order_of", "order_of" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
iff (hk : 0 < k) : is_primitive_root ζ k ↔ ζ ^ k = 1 ∧ ∀ l : ℕ, 0 < l → l < k → ζ ^ l ≠ 1
begin refine ⟨λ h, ⟨h.pow_eq_one, λ l hl' hl, _⟩, λ ⟨hζ, hl⟩, is_primitive_root.mk_of_lt ζ hk hζ hl⟩, rw h.eq_order_of at hl, exact pow_ne_one_of_lt_order_of' hl'.ne' hl, end
lemma
is_primitive_root.iff
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "is_primitive_root.mk_of_lt", "pow_ne_one_of_lt_order_of'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_iff : ¬ is_primitive_root ζ k ↔ order_of ζ ≠ k
⟨λ h hk, h $ hk ▸ is_primitive_root.order_of ζ, λ h hk, h.symm $ hk.unique $ is_primitive_root.order_of ζ⟩
lemma
is_primitive_root.not_iff
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "is_primitive_root.order_of", "not_iff", "order_of" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_of_dvd (h : is_primitive_root ζ k) {p : ℕ} (hp : p ≠ 0) (hdiv : p ∣ k) : is_primitive_root (ζ ^ p) (k / p)
begin suffices : order_of (ζ ^ p) = k / p, { exact this ▸ is_primitive_root.order_of (ζ ^ p) }, rw [order_of_pow' _ hp, ← eq_order_of h, nat.gcd_eq_right hdiv] end
lemma
is_primitive_root.pow_of_dvd
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "is_primitive_root.order_of", "nat.gcd_eq_right", "order_of", "order_of_pow'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_roots_of_unity {ζ : Mˣ} {n : ℕ+} (h : is_primitive_root ζ n) : ζ ∈ roots_of_unity n M
h.pow_eq_one
lemma
is_primitive_root.mem_roots_of_unity
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "mem_roots_of_unity", "roots_of_unity" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow {n : ℕ} {a b : ℕ} (hn : 0 < n) (h : is_primitive_root ζ n) (hprod : n = a * b) : is_primitive_root (ζ ^ a) b
begin subst n, simp only [iff_def, ← pow_mul, h.pow_eq_one, eq_self_iff_true, true_and], intros l hl, have ha0 : a ≠ 0, { rintro rfl, simpa only [nat.not_lt_zero, zero_mul] using hn }, rwa ← mul_dvd_mul_iff_left ha0, exact h.dvd_of_pow_eq_one _ hl end
lemma
is_primitive_root.pow
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "iff_def", "is_primitive_root", "mul_dvd_mul_iff_left", "pow_mul", "zero_mul" ]
If there is a `n`-th primitive root of unity in `R` and `b` divides `n`, then there is a `b`-th primitive root of unity in `R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_of_injective [monoid_hom_class F M N] (h : is_primitive_root ζ k) (hf : injective f) : is_primitive_root (f ζ) k
{ pow_eq_one := by rw [←map_pow, h.pow_eq_one, _root_.map_one], dvd_of_pow_eq_one := begin rw h.eq_order_of, intros l hl, rw [←map_pow, ←map_one f] at hl, exact order_of_dvd_of_pow_eq_one (hf hl) end }
lemma
is_primitive_root.map_of_injective
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "monoid_hom_class", "order_of_dvd_of_pow_eq_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_map_of_injective [monoid_hom_class F M N] (h : is_primitive_root (f ζ) k) (hf : injective f) : is_primitive_root ζ k
{ pow_eq_one := by { apply_fun f, rw [map_pow, _root_.map_one, h.pow_eq_one] }, dvd_of_pow_eq_one := begin rw h.eq_order_of, intros l hl, apply_fun f at hl, rw [map_pow, _root_.map_one] at hl, exact order_of_dvd_of_pow_eq_one hl end }
lemma
is_primitive_root.of_map_of_injective
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "map_pow", "monoid_hom_class", "order_of_dvd_of_pow_eq_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_iff_of_injective [monoid_hom_class F M N] (hf : injective f) : is_primitive_root (f ζ) k ↔ is_primitive_root ζ k
⟨λ h, h.of_map_of_injective hf, λ h, h.map_of_injective hf⟩
lemma
is_primitive_root.map_iff_of_injective
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "monoid_hom_class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zero [nontrivial M₀] : is_primitive_root (0 : M₀) 0
⟨pow_zero 0, λ l hl, by simpa [zero_pow_eq, show ∀ p, ¬p → false ↔ p, from @not_not] using hl⟩
lemma
is_primitive_root.zero
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "nontrivial", "not_not", "zero_pow_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ne_zero [nontrivial M₀] {ζ : M₀} (h : is_primitive_root ζ k) : k ≠ 0 → ζ ≠ 0
mt $ λ hn, h.unique (hn.symm ▸ is_primitive_root.zero)
lemma
is_primitive_root.ne_zero
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "is_primitive_root.zero", "ne_zero", "nontrivial" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_eq_one (h : is_primitive_root ζ k) : ζ ^ (k : ℤ) = 1
by { rw zpow_coe_nat, exact h.pow_eq_one }
lemma
is_primitive_root.zpow_eq_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "zpow_coe_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_eq_one_iff_dvd (h : is_primitive_root ζ k) (l : ℤ) : ζ ^ l = 1 ↔ (k : ℤ) ∣ l
begin by_cases h0 : 0 ≤ l, { lift l to ℕ using h0, rw [zpow_coe_nat], norm_cast, exact h.pow_eq_one_iff_dvd l }, { have : 0 ≤ -l, { simp only [not_le, neg_nonneg] at h0 ⊢, exact le_of_lt h0 }, lift -l to ℕ using this with l' hl', rw [← dvd_neg, ← hl'], norm_cast, rw [← h.pow_eq_one_iff_dvd, ← inv_...
lemma
is_primitive_root.zpow_eq_one_iff_dvd
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "dvd_neg", "inv_inj", "inv_one", "is_primitive_root", "lift", "zpow_coe_nat", "zpow_neg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inv (h : is_primitive_root ζ k) : is_primitive_root ζ⁻¹ k
{ pow_eq_one := by simp only [h.pow_eq_one, inv_one, eq_self_iff_true, inv_pow], dvd_of_pow_eq_one := begin intros l hl, apply h.dvd_of_pow_eq_one l, rw [← inv_inj, ← inv_pow, hl, inv_one] end }
lemma
is_primitive_root.inv
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "inv_inj", "inv_one", "inv_pow", "is_primitive_root" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inv_iff : is_primitive_root ζ⁻¹ k ↔ is_primitive_root ζ k
by { refine ⟨_, λ h, inv h⟩, intro h, rw [← inv_inv ζ], exact inv h }
lemma
is_primitive_root.inv_iff
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "inv_inv", "is_primitive_root" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpow_of_gcd_eq_one (h : is_primitive_root ζ k) (i : ℤ) (hi : i.gcd k = 1) : is_primitive_root (ζ ^ i) k
begin by_cases h0 : 0 ≤ i, { lift i to ℕ using h0, rw zpow_coe_nat, exact h.pow_of_coprime i hi }, have : 0 ≤ -i, { simp only [not_le, neg_nonneg] at h0 ⊢, exact le_of_lt h0 }, lift -i to ℕ using this with i' hi', rw [← inv_iff, ← zpow_neg, ← hi', zpow_coe_nat], apply h.pow_of_coprime, rw [int.gcd...
lemma
is_primitive_root.zpow_of_gcd_eq_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "lift", "zpow_coe_nat", "zpow_neg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
primitive_roots_one : primitive_roots 1 R = {(1 : R)}
begin apply finset.eq_singleton_iff_unique_mem.2, split, { simp only [is_primitive_root.one_right_iff, mem_primitive_roots zero_lt_one] }, { intros x hx, rw [mem_primitive_roots zero_lt_one, is_primitive_root.one_right_iff] at hx, exact hx } end
lemma
is_primitive_root.primitive_roots_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root.one_right_iff", "mem_primitive_roots", "primitive_roots", "zero_lt_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ne_zero' {n : ℕ+} (hζ : is_primitive_root ζ n) : ne_zero ((n : ℕ) : R)
begin let p := ring_char R, have hfin := (multiplicity.finite_nat_iff.2 ⟨char_p.char_ne_one R p, n.pos⟩), obtain ⟨m, hm⟩ := multiplicity.exists_eq_pow_mul_and_not_dvd hfin, by_cases hp : p ∣ n, { obtain ⟨k, hk⟩ := nat.exists_eq_succ_of_ne_zero (multiplicity.pos_of_dvd hfin hp).ne', haveI : ne_zero p := ne...
lemma
is_primitive_root.ne_zero'
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "char_p.char_is_prime_of_pos", "fact", "frobenius_def", "frobenius_inj", "frobenius_one", "is_primitive_root", "lt_mul_of_one_lt_right", "mul_assoc", "mul_comm", "multiplicity.exists_eq_pow_mul_and_not_dvd", "multiplicity.pos_of_dvd", "ne_zero", "ne_zero.of_not_dvd", "ne_zero.of_pos", "p...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_nth_roots_finset (hζ : is_primitive_root ζ k) (hk : 0 < k) : ζ ∈ nth_roots_finset k R
(mem_nth_roots_finset hk).2 hζ.pow_eq_one
lemma
is_primitive_root.mem_nth_roots_finset
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_neg_one_of_two_right [no_zero_divisors R] {ζ : R} (h : is_primitive_root ζ 2) : ζ = -1
begin apply (eq_or_eq_neg_of_sq_eq_sq ζ 1 _).resolve_left, { rw [← pow_one ζ], apply h.pow_ne_one_of_pos_of_lt; dec_trivial }, { simp only [h.pow_eq_one, one_pow] } end
lemma
is_primitive_root.eq_neg_one_of_two_right
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "eq_or_eq_neg_of_sq_eq_sq", "is_primitive_root", "no_zero_divisors", "one_pow", "pow_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
neg_one (p : ℕ) [nontrivial R] [h : char_p R p] (hp : p ≠ 2) : is_primitive_root (-1 : R) 2
begin convert is_primitive_root.order_of (-1 : R), rw [order_of_neg_one, if_neg], rwa ring_char.eq_iff.mpr h end
lemma
is_primitive_root.neg_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "char_p", "is_primitive_root", "is_primitive_root.order_of", "nontrivial", "order_of_neg_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
geom_sum_eq_zero [is_domain R] {ζ : R} (hζ : is_primitive_root ζ k) (hk : 1 < k) : (∑ i in range k, ζ ^ i) = 0
begin refine eq_zero_of_ne_zero_of_mul_left_eq_zero (sub_ne_zero_of_ne (hζ.ne_one hk).symm) _, rw [mul_neg_geom_sum, hζ.pow_eq_one, sub_self] end
lemma
is_primitive_root.geom_sum_eq_zero
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "eq_zero_of_ne_zero_of_mul_left_eq_zero", "is_domain", "is_primitive_root", "mul_neg_geom_sum" ]
If `1 < k` then `(∑ i in range k, ζ ^ i) = 0`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_sub_one_eq [is_domain R] {ζ : R} (hζ : is_primitive_root ζ k) (hk : 1 < k) : ζ ^ k.pred = -(∑ i in range k.pred, ζ ^ i)
by rw [eq_neg_iff_add_eq_zero, add_comm, ←sum_range_succ, ←nat.succ_eq_add_one, nat.succ_pred_eq_of_pos (pos_of_gt hk), hζ.geom_sum_eq_zero hk]
lemma
is_primitive_root.pow_sub_one_eq
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_domain", "is_primitive_root", "pos_of_gt" ]
If `1 < k`, then `ζ ^ k.pred = -(∑ i in range k.pred, ζ ^ i)`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zmod_equiv_zpowers (h : is_primitive_root ζ k) : zmod k ≃+ additive (subgroup.zpowers ζ)
add_equiv.of_bijective (add_monoid_hom.lift_of_right_inverse (int.cast_add_hom $ zmod k) _ zmod.int_cast_right_inverse ⟨{ to_fun := λ i, additive.of_mul (⟨_, i, rfl⟩ : subgroup.zpowers ζ), map_zero' := by { simp only [zpow_zero], refl }, map_add' := by { intros i j, simp only [zpow_add], refl } }, ...
def
is_primitive_root.zmod_equiv_zpowers
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "additive", "additive.of_mul", "char_p.int_cast_eq_zero_iff", "int.cast_add_hom", "int.coe_cast_add_hom", "is_primitive_root", "one_zpow", "subgroup.zpowers", "subtype.ext_iff", "zmod", "zmod.int_cast_right_inverse", "zpow_add", "zpow_coe_nat", "zpow_mul", "zpow_zero" ]
The (additive) monoid equivalence between `zmod k` and the powers of a primitive root of unity `ζ`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zmod_equiv_zpowers_apply_coe_int (i : ℤ) : h.zmod_equiv_zpowers i = additive.of_mul (⟨ζ ^ i, i, rfl⟩ : subgroup.zpowers ζ)
add_monoid_hom.lift_of_right_inverse_comp_apply _ _ zmod.int_cast_right_inverse _ _
lemma
is_primitive_root.zmod_equiv_zpowers_apply_coe_int
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "additive.of_mul", "subgroup.zpowers", "zmod.int_cast_right_inverse" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zmod_equiv_zpowers_apply_coe_nat (i : ℕ) : h.zmod_equiv_zpowers i = additive.of_mul (⟨ζ ^ i, i, rfl⟩ : subgroup.zpowers ζ)
begin have : (i : zmod k) = (i : ℤ), by norm_cast, simp only [this, zmod_equiv_zpowers_apply_coe_int, zpow_coe_nat], refl end
lemma
is_primitive_root.zmod_equiv_zpowers_apply_coe_nat
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "additive.of_mul", "subgroup.zpowers", "zmod", "zpow_coe_nat" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zmod_equiv_zpowers_symm_apply_zpow (i : ℤ) : h.zmod_equiv_zpowers.symm (additive.of_mul (⟨ζ ^ i, i, rfl⟩ : subgroup.zpowers ζ)) = i
by rw [← h.zmod_equiv_zpowers.symm_apply_apply i, zmod_equiv_zpowers_apply_coe_int]
lemma
is_primitive_root.zmod_equiv_zpowers_symm_apply_zpow
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "additive.of_mul", "subgroup.zpowers" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zmod_equiv_zpowers_symm_apply_zpow' (i : ℤ) : h.zmod_equiv_zpowers.symm ⟨ζ ^ i, i, rfl⟩ = i
h.zmod_equiv_zpowers_symm_apply_zpow i
lemma
is_primitive_root.zmod_equiv_zpowers_symm_apply_zpow'
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zmod_equiv_zpowers_symm_apply_pow (i : ℕ) : h.zmod_equiv_zpowers.symm (additive.of_mul (⟨ζ ^ i, i, rfl⟩ : subgroup.zpowers ζ)) = i
by rw [← h.zmod_equiv_zpowers.symm_apply_apply i, zmod_equiv_zpowers_apply_coe_nat]
lemma
is_primitive_root.zmod_equiv_zpowers_symm_apply_pow
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "additive.of_mul", "subgroup.zpowers" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zmod_equiv_zpowers_symm_apply_pow' (i : ℕ) : h.zmod_equiv_zpowers.symm ⟨ζ ^ i, i, rfl⟩ = i
h.zmod_equiv_zpowers_symm_apply_pow i
lemma
is_primitive_root.zmod_equiv_zpowers_symm_apply_pow'
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
zpowers_eq {k : ℕ+} {ζ : Rˣ} (h : is_primitive_root ζ k) : subgroup.zpowers ζ = roots_of_unity k R
begin apply set_like.coe_injective, haveI F : fintype (subgroup.zpowers ζ) := fintype.of_equiv _ (h.zmod_equiv_zpowers).to_equiv, refine @set.eq_of_subset_of_card_le Rˣ (subgroup.zpowers ζ) (roots_of_unity k R) F (roots_of_unity.fintype R k) (subgroup.zpowers_le_of_mem $ show ζ ∈ roots_of_unity k R, from ...
lemma
is_primitive_root.zpowers_eq
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "card_roots_of_unity", "fintype", "fintype.card", "fintype.card_congr", "fintype.of_equiv", "is_primitive_root", "roots_of_unity", "roots_of_unity.fintype", "set.eq_of_subset_of_card_le", "set_like.coe_injective", "subgroup.zpowers", "zmod", "zmod.card" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_pow_of_mem_roots_of_unity {k : ℕ+} {ζ ξ : Rˣ} (h : is_primitive_root ζ k) (hξ : ξ ∈ roots_of_unity k R) : ∃ (i : ℕ) (hi : i < k), ζ ^ i = ξ
begin obtain ⟨n, rfl⟩ : ∃ n : ℤ, ζ ^ n = ξ, by rwa [← h.zpowers_eq] at hξ, have hk0 : (0 : ℤ) < k := by exact_mod_cast k.pos, let i := n % k, have hi0 : 0 ≤ i := int.mod_nonneg _ (ne_of_gt hk0), lift i to ℕ using hi0 with i₀ hi₀, refine ⟨i₀, _, _⟩, { zify, rw [hi₀], exact int.mod_lt_of_pos _ hk0 }, { ha...
lemma
is_primitive_root.eq_pow_of_mem_roots_of_unity
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "aux", "coe_coe", "int.mod_add_div", "int.mod_lt_of_pos", "int.mod_nonneg", "is_primitive_root", "lift", "mul_one", "one_zpow", "roots_of_unity", "zpow_add", "zpow_coe_nat", "zpow_mul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_pow_of_pow_eq_one {k : ℕ} {ζ ξ : R} (h : is_primitive_root ζ k) (hξ : ξ ^ k = 1) (h0 : 0 < k) : ∃ i < k, ζ ^ i = ξ
begin lift ζ to Rˣ using h.is_unit h0, lift ξ to Rˣ using is_unit_of_pow_eq_one hξ h0.ne', lift k to ℕ+ using h0, simp only [← units.coe_pow, ← units.ext_iff], rw coe_units_iff at h, apply h.eq_pow_of_mem_roots_of_unity, rw [mem_roots_of_unity, units.ext_iff, units.coe_pow, hξ, units.coe_one] end
lemma
is_primitive_root.eq_pow_of_pow_eq_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "is_unit_of_pow_eq_one", "lift", "mem_roots_of_unity", "units.coe_one", "units.coe_pow", "units.ext_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root_iff' {k : ℕ+} {ζ ξ : Rˣ} (h : is_primitive_root ζ k) : is_primitive_root ξ k ↔ ∃ (i < (k : ℕ)) (hi : i.coprime k), ζ ^ i = ξ
begin split, { intro hξ, obtain ⟨i, hik, rfl⟩ := h.eq_pow_of_mem_roots_of_unity hξ.pow_eq_one, rw h.pow_iff_coprime k.pos at hξ, exact ⟨i, hik, hξ, rfl⟩ }, { rintro ⟨i, -, hi, rfl⟩, exact h.pow_of_coprime i hi } end
lemma
is_primitive_root.is_primitive_root_iff'
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root_iff {k : ℕ} {ζ ξ : R} (h : is_primitive_root ζ k) (h0 : 0 < k) : is_primitive_root ξ k ↔ ∃ (i < k) (hi : i.coprime k), ζ ^ i = ξ
begin split, { intro hξ, obtain ⟨i, hik, rfl⟩ := h.eq_pow_of_pow_eq_one hξ.pow_eq_one h0, rw h.pow_iff_coprime h0 at hξ, exact ⟨i, hik, hξ, rfl⟩ }, { rintro ⟨i, -, hi, rfl⟩, exact h.pow_of_coprime i hi } end
lemma
is_primitive_root.is_primitive_root_iff
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
card_roots_of_unity' {n : ℕ+} (h : is_primitive_root ζ n) : fintype.card (roots_of_unity n R) = n
begin let e := h.zmod_equiv_zpowers, haveI F : fintype (subgroup.zpowers ζ) := fintype.of_equiv _ e.to_equiv, calc fintype.card (roots_of_unity n R) = fintype.card (subgroup.zpowers ζ) : fintype.card_congr $ by rw h.zpowers_eq ... = fintype.card (zmod n) : fintype.card_congr e.to_equiv.symm ...
lemma
is_primitive_root.card_roots_of_unity'
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "fintype", "fintype.card", "fintype.card_congr", "fintype.of_equiv", "is_primitive_root", "roots_of_unity", "subgroup.zpowers", "zmod", "zmod.card" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
card_roots_of_unity {ζ : R} {n : ℕ+} (h : is_primitive_root ζ n) : fintype.card (roots_of_unity n R) = n
begin obtain ⟨ζ, hζ⟩ := h.is_unit n.pos, rw [← hζ, is_primitive_root.coe_units_iff] at h, exact h.card_roots_of_unity' end
lemma
is_primitive_root.card_roots_of_unity
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "card_roots_of_unity", "fintype.card", "is_primitive_root", "is_primitive_root.coe_units_iff", "roots_of_unity" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
card_nth_roots {ζ : R} {n : ℕ} (h : is_primitive_root ζ n) : (nth_roots n (1 : R)).card = n
begin cases nat.eq_zero_or_pos n with hzero hpos, { simp only [hzero, multiset.card_zero, nth_roots_zero] }, rw eq_iff_le_not_lt, use card_nth_roots n 1, { rw [not_lt], have hcard : fintype.card {x // x ∈ nth_roots n (1 : R)} ≤ (nth_roots n (1 : R)).attach.card := multiset.card_le_of_le (multiset.de...
lemma
is_primitive_root.card_nth_roots
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "card_roots_of_unity", "eq_iff_le_not_lt", "fintype.card", "fintype.card_congr", "is_primitive_root", "multiset.card_attach", "multiset.card_le_of_le", "multiset.card_zero", "multiset.dedup_le", "nat.to_pnat'", "pnat.to_pnat'_coe", "roots_of_unity_equiv_nth_roots" ]
The cardinality of the multiset `nth_roots ↑n (1 : R)` is `n` if there is a primitive root of unity in `R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nth_roots_nodup {ζ : R} {n : ℕ} (h : is_primitive_root ζ n) : (nth_roots n (1 : R)).nodup
begin cases nat.eq_zero_or_pos n with hzero hpos, { simp only [hzero, multiset.nodup_zero, nth_roots_zero] }, apply (@multiset.dedup_eq_self R _ _).1, rw eq_iff_le_not_lt, split, { exact multiset.dedup_le (nth_roots n (1 : R)) }, { by_contra ha, replace ha := multiset.card_lt_of_lt ha, rw card_nth...
lemma
is_primitive_root.nth_roots_nodup
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "by_contra", "card_roots_of_unity", "eq_iff_le_not_lt", "finset", "finset.card_mk", "finset.mem_mk", "fintype.card", "fintype.card_congr", "fintype.card_of_subtype", "is_primitive_root", "multiset.card_lt_of_lt", "multiset.dedup_eq_self", "multiset.dedup_le", "multiset.mem_dedup", "multi...
The multiset `nth_roots ↑n (1 : R)` has no repeated elements if there is a primitive root of unity in `R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
card_nth_roots_finset {ζ : R} {n : ℕ} (h : is_primitive_root ζ n) : (nth_roots_finset n R).card = n
by rw [nth_roots_finset, ← multiset.to_finset_eq (nth_roots_nodup h), card_mk, h.card_nth_roots]
lemma
is_primitive_root.card_nth_roots_finset
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "multiset.to_finset_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
card_primitive_roots {ζ : R} {k : ℕ} (h : is_primitive_root ζ k) : (primitive_roots k R).card = φ k
begin by_cases h0 : k = 0, { simp [h0], }, symmetry, refine finset.card_congr (λ i _, ζ ^ i) _ _ _, { simp only [true_and, and_imp, mem_filter, mem_range, mem_univ], rintro i - hi, rw mem_primitive_roots (nat.pos_of_ne_zero h0), exact h.pow_of_coprime i hi.symm }, { simp only [true_and, and_imp,...
lemma
is_primitive_root.card_primitive_roots
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "and_imp", "exists_prop", "finset.card_congr", "is_primitive_root", "mem_primitive_roots", "primitive_roots" ]
If an integral domain has a primitive `k`-th root of unity, then it has `φ k` of them.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
disjoint {k l : ℕ} (h : k ≠ l) : disjoint (primitive_roots k R) (primitive_roots l R)
finset.disjoint_left.2 $ λ z hk hl, h $ (is_primitive_root_of_mem_primitive_roots hk).unique $ is_primitive_root_of_mem_primitive_roots hl
lemma
is_primitive_root.disjoint
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "disjoint", "is_primitive_root_of_mem_primitive_roots", "primitive_roots", "unique" ]
The sets `primitive_roots k R` are pairwise disjoint.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nth_roots_one_eq_bUnion_primitive_roots' {ζ : R} {n : ℕ+} (h : is_primitive_root ζ n) : nth_roots_finset n R = (nat.divisors ↑n).bUnion (λ i, (primitive_roots i R))
begin symmetry, apply finset.eq_of_subset_of_card_le, { intros x, simp only [nth_roots_finset, ← multiset.to_finset_eq (nth_roots_nodup h), exists_prop, finset.mem_bUnion, finset.mem_filter, finset.mem_range, mem_nth_roots, finset.mem_mk, nat.mem_divisors, and_true, ne.def, pnat.ne_zero, pnat.pos,...
lemma
is_primitive_root.nth_roots_one_eq_bUnion_primitive_roots'
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "disjoint", "exists_prop", "finset.card_bUnion", "finset.eq_of_subset_of_card_le", "finset.mem_bUnion", "finset.mem_filter", "finset.mem_mk", "finset.mem_range", "is_primitive_root", "mem_primitive_roots", "mul_comm", "multiset.to_finset_eq", "nat.divisors", "nat.mem_divisors", "nat.sum_...
`nth_roots n` as a `finset` is equal to the union of `primitive_roots i R` for `i ∣ n` if there is a primitive root of unity in `R`. This holds for any `nat`, not just `pnat`, see `nth_roots_one_eq_bUnion_primitive_roots`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nth_roots_one_eq_bUnion_primitive_roots {ζ : R} {n : ℕ} (h : is_primitive_root ζ n) : nth_roots_finset n R = (nat.divisors n).bUnion (λ i, (primitive_roots i R))
begin by_cases hn : n = 0, { simp [hn], }, exact @nth_roots_one_eq_bUnion_primitive_roots' _ _ _ _ ⟨n, nat.pos_of_ne_zero hn⟩ h end
lemma
is_primitive_root.nth_roots_one_eq_bUnion_primitive_roots
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "is_primitive_root", "nat.divisors", "primitive_roots" ]
`nth_roots n` as a `finset` is equal to the union of `primitive_roots i R` for `i ∣ n` if there is a primitive root of unity in `R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
aut_to_pow : (S ≃ₐ[R] S) →* (zmod n)ˣ
let μ' := hμ.to_roots_of_unity in have ho : order_of μ' = n := by rw [hμ.eq_order_of, ←hμ.coe_to_roots_of_unity_coe, order_of_units, order_of_subgroup], monoid_hom.to_hom_units { to_fun := λ σ, (map_root_of_unity_eq_pow_self σ.to_alg_hom μ').some, map_one' := begin generalize_proofs h1, have h := h1.some_sp...
def
is_primitive_root.aut_to_pow
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "alg_equiv.coe_ring_equiv", "alg_equiv.mul_apply", "alg_equiv.one_apply", "alg_equiv.to_ring_equiv_eq_coe", "map_root_of_unity_eq_pow_self", "monoid_hom.to_hom_units", "nat.cast_one", "order_of", "order_of_subgroup", "order_of_units", "ring_equiv.coe_to_ring_hom", "ring_equiv.to_ring_hom_eq_co...
The `monoid_hom` that takes an automorphism to the power of μ that μ gets mapped to under it.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_aut_to_pow_apply (f : S ≃ₐ[R] S) : (aut_to_pow R hμ f : zmod n) = ((map_root_of_unity_eq_pow_self f hμ.to_roots_of_unity).some : zmod n)
rfl
lemma
is_primitive_root.coe_aut_to_pow_apply
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "map_root_of_unity_eq_pow_self", "zmod" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
aut_to_pow_spec (f : S ≃ₐ[R] S) : μ ^ (hμ.aut_to_pow R f : zmod n).val = f μ
begin rw is_primitive_root.coe_aut_to_pow_apply, generalize_proofs h, have := h.some_spec, dsimp only [alg_equiv.to_alg_hom_eq_coe, alg_equiv.coe_alg_hom] at this, refine (_ : ↑hμ.to_roots_of_unity ^ _ = _).trans this.symm, rw [←roots_of_unity.coe_pow, ←roots_of_unity.coe_pow], congr' 1, rw [pow_eq_pow_...
lemma
is_primitive_root.aut_to_pow_spec
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/basic.lean
[ "algebra.char_p.two", "algebra.ne_zero", "algebra.gcd_monoid.integrally_closed", "data.polynomial.ring_division", "field_theory.finite.basic", "field_theory.separable", "group_theory.specific_groups.cyclic", "number_theory.divisors", "ring_theory.integral_domain", "tactic.zify" ]
[ "alg_equiv.coe_alg_hom", "alg_equiv.to_alg_hom_eq_coe", "is_primitive_root.coe_aut_to_pow_apply", "nat.mod_modeq", "pow_eq_pow_iff_modeq", "zmod", "zmod.val_nat_cast" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root_exp_of_coprime (i n : ℕ) (h0 : n ≠ 0) (hi : i.coprime n) : is_primitive_root (exp (2 * π * I * (i / n))) n
begin rw is_primitive_root.iff_def, simp only [← exp_nat_mul, exp_eq_one_iff], have hn0 : (n : ℂ) ≠ 0, by exact_mod_cast h0, split, { use i, field_simp [hn0, mul_comm (i : ℂ), mul_comm (n : ℂ)] }, { simp only [hn0, mul_right_comm _ _ ↑n, mul_left_inj' two_pi_I_ne_zero, ne.def, not_false_iff, mul_c...
lemma
complex.is_primitive_root_exp_of_coprime
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "dvd_mul_left", "exists_imp_distrib", "exp", "int.coe_nat_dvd", "is_primitive_root", "is_primitive_root.iff_def", "mul_assoc", "mul_comm", "mul_left_inj'", "mul_right_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root_exp (n : ℕ) (h0 : n ≠ 0) : is_primitive_root (exp (2 * π * I / n)) n
by simpa only [nat.cast_one, one_div] using is_primitive_root_exp_of_coprime 1 n h0 n.coprime_one_left
lemma
complex.is_primitive_root_exp
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "exp", "is_primitive_root", "nat.cast_one", "one_div" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root_iff (ζ : ℂ) (n : ℕ) (hn : n ≠ 0) : is_primitive_root ζ n ↔ (∃ (i < (n : ℕ)) (hi : i.coprime n), exp (2 * π * I * (i / n)) = ζ)
begin have hn0 : (n : ℂ) ≠ 0 := by exact_mod_cast hn, split, swap, { rintro ⟨i, -, hi, rfl⟩, exact is_primitive_root_exp_of_coprime i n hn hi }, intro h, obtain ⟨i, hi, rfl⟩ := (is_primitive_root_exp n hn).eq_pow_of_pow_eq_one h.pow_eq_one (nat.pos_of_ne_zero hn), refine ⟨i, hi, ((is_primitive_root_exp ...
lemma
complex.is_primitive_root_iff
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "exp", "is_primitive_root", "mul_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_roots_of_unity (n : ℕ+) (x : units ℂ) : x ∈ roots_of_unity n ℂ ↔ (∃ i < (n : ℕ), exp (2 * π * I * (i / n)) = x)
begin rw [mem_roots_of_unity, units.ext_iff, units.coe_pow, units.coe_one], have hn0 : (n : ℂ) ≠ 0 := by exact_mod_cast (n.ne_zero), split, { intro h, obtain ⟨i, hi, H⟩ : ∃ i < (n : ℕ), exp (2 * π * I / n) ^ i = x, { simpa only using (is_primitive_root_exp n n.ne_zero).eq_pow_of_pow_eq_one h n.pos }, ...
lemma
complex.mem_roots_of_unity
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "exp", "mem_roots_of_unity", "mul_comm", "roots_of_unity", "units", "units.coe_one", "units.coe_pow", "units.ext_iff" ]
The complex `n`-th roots of unity are exactly the complex numbers of the form `e ^ (2 * real.pi * complex.I * (i / n))` for some `i < n`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
card_roots_of_unity (n : ℕ+) : fintype.card (roots_of_unity n ℂ) = n
(is_primitive_root_exp n n.ne_zero).card_roots_of_unity
lemma
complex.card_roots_of_unity
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "card_roots_of_unity", "fintype.card", "roots_of_unity" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
card_primitive_roots (k : ℕ) : (primitive_roots k ℂ).card = φ k
begin by_cases h : k = 0, { simp [h] }, exact (is_primitive_root_exp k h).card_primitive_roots, end
lemma
complex.card_primitive_roots
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "primitive_roots" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root.norm'_eq_one {ζ : ℂ} {n : ℕ} (h : is_primitive_root ζ n) (hn : n ≠ 0) : ‖ζ‖ = 1
complex.norm_eq_one_of_pow_eq_one h.pow_eq_one hn
lemma
is_primitive_root.norm'_eq_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "complex.norm_eq_one_of_pow_eq_one", "is_primitive_root" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root.nnnorm_eq_one {ζ : ℂ} {n : ℕ} (h : is_primitive_root ζ n) (hn : n ≠ 0) : ‖ζ‖₊ = 1
subtype.ext $ h.norm'_eq_one hn
lemma
is_primitive_root.nnnorm_eq_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "is_primitive_root", "subtype.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root.arg_ext {n m : ℕ} {ζ μ : ℂ} (hζ : is_primitive_root ζ n) (hμ : is_primitive_root μ m) (hn : n ≠ 0) (hm : m ≠ 0) (h : ζ.arg = μ.arg) : ζ = μ
complex.ext_abs_arg ((hζ.norm'_eq_one hn).trans (hμ.norm'_eq_one hm).symm) h
lemma
is_primitive_root.arg_ext
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "complex.ext_abs_arg", "is_primitive_root" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root.arg_eq_zero_iff {n : ℕ} {ζ : ℂ} (hζ : is_primitive_root ζ n) (hn : n ≠ 0) : ζ.arg = 0 ↔ ζ = 1
⟨λ h, hζ.arg_ext is_primitive_root.one hn one_ne_zero (h.trans complex.arg_one.symm), λ h, h.symm ▸ complex.arg_one⟩
lemma
is_primitive_root.arg_eq_zero_iff
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "is_primitive_root", "is_primitive_root.one", "one_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root.arg_eq_pi_iff {n : ℕ} {ζ : ℂ} (hζ : is_primitive_root ζ n) (hn : n ≠ 0) : ζ.arg = real.pi ↔ ζ = -1
⟨λ h, hζ.arg_ext (is_primitive_root.neg_one 0 two_ne_zero.symm) hn two_ne_zero (h.trans complex.arg_neg_one.symm), λ h, h.symm ▸ complex.arg_neg_one⟩
lemma
is_primitive_root.arg_eq_pi_iff
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "is_primitive_root", "is_primitive_root.neg_one", "real.pi", "two_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_primitive_root.arg {n : ℕ} {ζ : ℂ} (h : is_primitive_root ζ n) (hn : n ≠ 0) : ∃ i : ℤ, ζ.arg = i / n * (2 * real.pi) ∧ is_coprime i n ∧ i.nat_abs < n
begin rw complex.is_primitive_root_iff _ _ hn at h, obtain ⟨i, h, hin, rfl⟩ := h, rw [mul_comm, ←mul_assoc, complex.exp_mul_I], refine ⟨if i * 2 ≤ n then i else i - n, _, _, _⟩, work_on_goal 2 { replace hin := nat.is_coprime_iff_coprime.mpr hin, split_ifs with _, { exact hin }, { convert hin.add...
lemma
is_primitive_root.arg
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/complex.lean
[ "analysis.special_functions.complex.log", "ring_theory.roots_of_unity.basic" ]
[ "complex.arg_cos_add_sin_mul_I", "complex.exp_mul_I", "complex.is_primitive_root_iff", "div_le_iff'", "div_lt_iff", "div_nonneg", "div_self", "int.nat_abs_eq_iff", "is_coprime", "is_primitive_root", "mul_comm", "mul_div_assoc", "mul_le_of_le_one_right", "mul_lt_iff_lt_one_right", "mul_ne...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_integral : is_integral ℤ μ
begin use (X ^ n - 1), split, { exact (monic_X_pow_sub_C 1 (ne_of_lt hpos).symm) }, { simp only [((is_primitive_root.iff_def μ n).mp h).left, eval₂_one, eval₂_X_pow, eval₂_sub, sub_self] } end
lemma
is_primitive_root.is_integral
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "is_integral", "is_primitive_root.iff_def" ]
`μ` is integral over `ℤ`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
minpoly_dvd_X_pow_sub_one : minpoly ℤ μ ∣ X ^ n - 1
begin rcases n.eq_zero_or_pos with rfl | hpos, { simp }, letI : is_integrally_closed ℤ := gcd_monoid.to_is_integrally_closed, apply minpoly.is_integrally_closed_dvd (is_integral h hpos), simp only [((is_primitive_root.iff_def μ n).mp h).left, aeval_X_pow, eq_int_cast, int.cast_one, aeval_one, alg_hom.map_su...
lemma
is_primitive_root.minpoly_dvd_X_pow_sub_one
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "alg_hom.map_sub", "eq_int_cast", "gcd_monoid.to_is_integrally_closed", "int.cast_one", "is_integral", "is_integrally_closed", "is_primitive_root.iff_def", "minpoly", "minpoly.is_integrally_closed_dvd" ]
The minimal polynomial of a root of unity `μ` divides `X ^ n - 1`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
separable_minpoly_mod {p : ℕ} [fact p.prime] (hdiv : ¬p ∣ n) : separable (map (int.cast_ring_hom (zmod p)) (minpoly ℤ μ))
begin have hdvd : (map (int.cast_ring_hom (zmod p)) (minpoly ℤ μ)) ∣ X ^ n - 1, { simpa [polynomial.map_pow, map_X, polynomial.map_one, polynomial.map_sub] using ring_hom.map_dvd (map_ring_hom (int.cast_ring_hom (zmod p))) (minpoly_dvd_X_pow_sub_one h) }, refine separable.of_dvd (separable_X_pow...
lemma
is_primitive_root.separable_minpoly_mod
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "by_contra", "fact", "int.cast_ring_hom", "minpoly", "one_ne_zero", "polynomial.map_one", "polynomial.map_pow", "polynomial.map_sub", "ring_hom.map_dvd", "zmod", "zmod.nat_coe_zmod_eq_zero_iff_dvd" ]
The reduction modulo `p` of the minimal polynomial of a root of unity `μ` is separable.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
squarefree_minpoly_mod {p : ℕ} [fact p.prime] (hdiv : ¬ p ∣ n) : squarefree (map (int.cast_ring_hom (zmod p)) (minpoly ℤ μ))
(separable_minpoly_mod h hdiv).squarefree
lemma
is_primitive_root.squarefree_minpoly_mod
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "fact", "int.cast_ring_hom", "minpoly", "squarefree", "zmod" ]
The reduction modulo `p` of the minimal polynomial of a root of unity `μ` is squarefree.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
minpoly_dvd_expand {p : ℕ} (hdiv : ¬ p ∣ n) : minpoly ℤ μ ∣ expand ℤ p (minpoly ℤ (μ ^ p))
begin rcases n.eq_zero_or_pos with rfl | hpos, { simp * at *, }, letI : is_integrally_closed ℤ := gcd_monoid.to_is_integrally_closed, refine minpoly.is_integrally_closed_dvd (h.is_integral hpos) _, { rw [aeval_def, coe_expand, ← comp, eval₂_eq_eval_map, map_comp, polynomial.map_pow, map_X, eval_comp, ...
lemma
is_primitive_root.minpoly_dvd_expand
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "gcd_monoid.to_is_integrally_closed", "is_integrally_closed", "map_comp", "minpoly", "minpoly.aeval", "minpoly.is_integrally_closed_dvd", "polynomial.map_pow" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
minpoly_dvd_pow_mod {p : ℕ} [hprime : fact p.prime] (hdiv : ¬ p ∣ n) : map (int.cast_ring_hom (zmod p)) (minpoly ℤ μ) ∣ map (int.cast_ring_hom (zmod p)) (minpoly ℤ (μ ^ p)) ^ p
begin set Q := minpoly ℤ (μ ^ p), have hfrob : map (int.cast_ring_hom (zmod p)) Q ^ p = map (int.cast_ring_hom (zmod p)) (expand ℤ p Q), by rw [← zmod.expand_card, map_expand], rw [hfrob], apply ring_hom.map_dvd (map_ring_hom (int.cast_ring_hom (zmod p))), exact minpoly_dvd_expand h hdiv end
lemma
is_primitive_root.minpoly_dvd_pow_mod
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "fact", "int.cast_ring_hom", "minpoly", "ring_hom.map_dvd", "zmod", "zmod.expand_card" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
minpoly_dvd_mod_p {p : ℕ} [hprime : fact p.prime] (hdiv : ¬ p ∣ n) : map (int.cast_ring_hom (zmod p)) (minpoly ℤ μ) ∣ map (int.cast_ring_hom (zmod p)) (minpoly ℤ (μ ^ p))
(unique_factorization_monoid.dvd_pow_iff_dvd_of_squarefree (squarefree_minpoly_mod h hdiv) hprime.1.ne_zero).1 (minpoly_dvd_pow_mod h hdiv)
lemma
is_primitive_root.minpoly_dvd_mod_p
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "fact", "int.cast_ring_hom", "minpoly", "unique_factorization_monoid.dvd_pow_iff_dvd_of_squarefree", "zmod" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
minpoly_eq_pow {p : ℕ} [hprime : fact p.prime] (hdiv : ¬ p ∣ n) : minpoly ℤ μ = minpoly ℤ (μ ^ p)
begin classical, by_cases hn : n = 0, { simp * at *, }, have hpos := nat.pos_of_ne_zero hn, by_contra hdiff, set P := minpoly ℤ μ, set Q := minpoly ℤ (μ ^ p), have Pmonic : P.monic := minpoly.monic (h.is_integral hpos), have Qmonic : Q.monic := minpoly.monic ((h.pow_of_prime hprime.1 hdiv).is_integral h...
lemma
is_primitive_root.minpoly_eq_pow
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "associated_of_dvd_dvd", "aux", "by_contra", "dvd_or_coprime", "dvd_trans", "eq_int_cast", "fact", "int.cast_injective", "int.cast_one", "int.cast_ring_hom", "irreducible", "is_coprime.mul_dvd", "is_integral", "minpoly", "minpoly.degree_pos", "minpoly.irreducible", "minpoly.monic", ...
If `p` is a prime that does not divide `n`, then the minimal polynomials of a primitive `n`-th root of unity `μ` and of `μ ^ p` are the same.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
minpoly_eq_pow_coprime {m : ℕ} (hcop : nat.coprime m n) : minpoly ℤ μ = minpoly ℤ (μ ^ m)
begin revert n hcop, refine unique_factorization_monoid.induction_on_prime m _ _ _, { intros n hn h, congr, simpa [(nat.coprime_zero_left n).mp hn] using h }, { intros u hunit n hcop h, congr, simp [nat.is_unit_iff.mp hunit] }, { intros a p ha hprime hind n hcop h, rw hind (nat.coprime.cop...
lemma
is_primitive_root.minpoly_eq_pow_coprime
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "minpoly", "nat.coprime.coprime_mul_left", "nat.coprime.coprime_mul_right", "nat.coprime_zero_left", "nat.prime.coprime_iff_not_dvd", "unique_factorization_monoid.induction_on_prime" ]
If `m : ℕ` is coprime with `n`, then the minimal polynomials of a primitive `n`-th root of unity `μ` and of `μ ^ m` are the same.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
pow_is_root_minpoly {m : ℕ} (hcop : nat.coprime m n) : is_root (map (int.cast_ring_hom K) (minpoly ℤ μ)) (μ ^ m)
by simpa [minpoly_eq_pow_coprime h hcop, eval_map, aeval_def (μ ^ m) _] using minpoly.aeval ℤ (μ ^ m)
lemma
is_primitive_root.pow_is_root_minpoly
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "int.cast_ring_hom", "minpoly", "minpoly.aeval" ]
If `m : ℕ` is coprime with `n`, then the minimal polynomial of a primitive `n`-th root of unity `μ` has `μ ^ m` as root.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_roots_of_minpoly [decidable_eq K] : primitive_roots n K ⊆ (map (int.cast_ring_hom K) (minpoly ℤ μ)).roots.to_finset
begin by_cases hn : n = 0, { simp * at *, }, have hpos := nat.pos_of_ne_zero hn, intros x hx, obtain ⟨m, hle, hcop, rfl⟩ := (is_primitive_root_iff h hpos).1 ((mem_primitive_roots hpos).1 hx), simpa [multiset.mem_to_finset, mem_roots (map_monic_ne_zero $ minpoly.monic $ is_integral h hpos)] using pow_i...
lemma
is_primitive_root.is_roots_of_minpoly
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "int.cast_ring_hom", "is_integral", "mem_primitive_roots", "minpoly", "minpoly.monic", "multiset.mem_to_finset", "primitive_roots" ]
`primitive_roots n K` is a subset of the roots of the minimal polynomial of a primitive `n`-th root of unity `μ`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
totient_le_degree_minpoly : nat.totient n ≤ (minpoly ℤ μ).nat_degree
begin classical, let P : ℤ[X] := minpoly ℤ μ,-- minimal polynomial of `μ` let P_K : K[X] := map (int.cast_ring_hom K) P, -- minimal polynomial of `μ` sent to `K[X]` calc n.totient = (primitive_roots n K).card : h.card_primitive_roots.symm ... ≤ P_K.roots.to_finset.card : finset.card_le_of_subset (is_r...
lemma
is_primitive_root.totient_le_degree_minpoly
ring_theory.roots_of_unity
src/ring_theory/roots_of_unity/minpoly.lean
[ "ring_theory.roots_of_unity.basic", "field_theory.minpoly.is_integrally_closed" ]
[ "finset.card_le_of_subset", "int.cast_ring_hom", "minpoly", "multiset.to_finset_card_le", "nat.totient", "primitive_roots" ]
The degree of the minimal polynomial of `μ` is at least `totient n`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subring_class (S : Type*) (R : Type u) [ring R] [set_like S R] extends subsemiring_class S R, neg_mem_class S R : Prop
class
subring_class
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "neg_mem_class", "ring", "set_like", "subsemiring_class" ]
`subring_class S R` states that `S` is a type of subsets `s ⊆ R` that are both a multiplicative submonoid and an additive subgroup.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subring_class.add_subgroup_class (S : Type*) (R : Type u) [set_like S R] [ring R] [h : subring_class S R] : add_subgroup_class S R
{ .. h }
instance
subring_class.add_subgroup_class
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "add_subgroup_class", "ring", "set_like", "subring_class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_int_mem (n : ℤ) : (n : R) ∈ s
by simp only [← zsmul_one, zsmul_mem, one_mem]
lemma
coe_int_mem
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "zsmul_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_has_int_cast : has_int_cast s
⟨λ n, ⟨n, coe_int_mem s n⟩⟩
instance
subring_class.to_has_int_cast
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "coe_int_mem", "has_int_cast" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_ring : ring s
subtype.coe_injective.ring coe rfl rfl (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _, rfl)
instance
subring_class.to_ring
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "ring" ]
A subring of a ring inherits a ring structure
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_comm_ring {R} [comm_ring R] [set_like S R] [subring_class S R] : comm_ring s
subtype.coe_injective.comm_ring coe rfl rfl (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _, rfl)
instance
subring_class.to_comm_ring
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "comm_ring", "set_like", "subring_class" ]
A subring of a `comm_ring` is a `comm_ring`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_ordered_ring {R} [ordered_ring R] [set_like S R] [subring_class S R] : ordered_ring s
subtype.coe_injective.ordered_ring coe rfl rfl (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _, rfl)
instance
subring_class.to_ordered_ring
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "ordered_ring", "set_like", "subring_class" ]
A subring of an `ordered_ring` is an `ordered_ring`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_ordered_comm_ring {R} [ordered_comm_ring R] [set_like S R] [subring_class S R] : ordered_comm_ring s
subtype.coe_injective.ordered_comm_ring coe rfl rfl (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _, rfl)
instance
subring_class.to_ordered_comm_ring
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "ordered_comm_ring", "set_like", "subring_class" ]
A subring of an `ordered_comm_ring` is an `ordered_comm_ring`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_linear_ordered_ring {R} [linear_ordered_ring R] [set_like S R] [subring_class S R] : linear_ordered_ring s
subtype.coe_injective.linear_ordered_ring coe rfl rfl (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl)
instance
subring_class.to_linear_ordered_ring
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "linear_ordered_ring", "set_like", "subring_class" ]
A subring of a `linear_ordered_ring` is a `linear_ordered_ring`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_linear_ordered_comm_ring {R} [linear_ordered_comm_ring R] [set_like S R] [subring_class S R] : linear_ordered_comm_ring s
subtype.coe_injective.linear_ordered_comm_ring coe rfl rfl (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl)
instance
subring_class.to_linear_ordered_comm_ring
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "linear_ordered_comm_ring", "set_like", "subring_class" ]
A subring of a `linear_ordered_comm_ring` is a `linear_ordered_comm_ring`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subtype (s : S) : s →+* R
{ to_fun := coe, .. submonoid_class.subtype s, .. add_subgroup_class.subtype s }
def
subring_class.subtype
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "submonoid_class.subtype" ]
The natural ring hom from a subring of ring `R` to `R`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_nat_cast (n : ℕ) : ((n : s) : R) = n
map_nat_cast (subtype s) n
lemma
subring_class.coe_nat_cast
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "map_nat_cast" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_int_cast (n : ℤ) : ((n : s) : R) = n
map_int_cast (subtype s) n
lemma
subring_class.coe_int_cast
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "map_int_cast" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subring (R : Type u) [ring R] extends subsemiring R, add_subgroup R
structure
subring
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "add_subgroup", "ring", "subsemiring" ]
`subring R` is the type of subrings of `R`. A subring of `R` is a subset `s` that is a multiplicative submonoid and an additive subgroup. Note in particular that it shares the same 0 and 1 as R.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_submonoid (s : subring R) : submonoid R
{ carrier := s.carrier, ..s.to_subsemiring.to_submonoid }
def
subring.to_submonoid
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "submonoid", "subring" ]
The underlying submonoid of a subring.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_carrier {s : subring R} {x : R} : x ∈ s.carrier ↔ x ∈ s
iff.rfl
lemma
subring.mem_carrier
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "subring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_mk {S : set R} {x : R} (h₁ h₂ h₃ h₄ h₅) : x ∈ (⟨S, h₁, h₂, h₃, h₄, h₅⟩ : subring R) ↔ x ∈ S
iff.rfl
lemma
subring.mem_mk
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "subring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_set_mk (S : set R) (h₁ h₂ h₃ h₄ h₅) : ((⟨S, h₁, h₂, h₃, h₄, h₅⟩ : subring R) : set R) = S
rfl
lemma
subring.coe_set_mk
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "subring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_le_mk {S S' : set R} (h₁ h₂ h₃ h₄ h₅ h₁' h₂' h₃' h₄' h₅') : (⟨S, h₁, h₂, h₃, h₄, h₅⟩ : subring R) ≤ (⟨S', h₁', h₂', h₃', h₄', h₅'⟩ : subring R) ↔ S ⊆ S'
iff.rfl
lemma
subring.mk_le_mk
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "subring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext {S T : subring R} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T
set_like.ext h
theorem
subring.ext
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "set_like.ext", "subring" ]
Two subrings are equal if they have the same elements.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
copy (S : subring R) (s : set R) (hs : s = ↑S) : subring R
{ carrier := s, neg_mem' := λ _, hs.symm ▸ S.neg_mem', ..S.to_subsemiring.copy s hs }
def
subring.copy
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "subring" ]
Copy of a subring with a new `carrier` equal to the old one. Useful to fix definitional equalities.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_copy (S : subring R) (s : set R) (hs : s = ↑S) : (S.copy s hs : set R) = s
rfl
lemma
subring.coe_copy
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "subring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
copy_eq (S : subring R) (s : set R) (hs : s = ↑S) : S.copy s hs = S
set_like.coe_injective hs
lemma
subring.copy_eq
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "set_like.coe_injective", "subring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_subsemiring_injective : function.injective (to_subsemiring : subring R → subsemiring R)
| r s h := ext (set_like.ext_iff.mp h : _)
lemma
subring.to_subsemiring_injective
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "subring", "subsemiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_subsemiring_strict_mono : strict_mono (to_subsemiring : subring R → subsemiring R)
λ _ _, id
lemma
subring.to_subsemiring_strict_mono
ring_theory.subring
src/ring_theory/subring/basic.lean
[ "group_theory.subgroup.basic", "ring_theory.subsemiring.basic" ]
[ "strict_mono", "subring", "subsemiring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83