fact stringlengths 6 3.84k | type stringclasses 11
values | library stringclasses 32
values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
pow_of_dvd (h : IsPrimitiveRoot ζ k) {p : ℕ} (hp : p ≠ 0) (hdiv : p ∣ k) :
IsPrimitiveRoot (ζ ^ p) (k / p) := by
rw [h.eq_orderOf] at hdiv ⊢
rw [← orderOf_pow_of_dvd hp hdiv]
exact IsPrimitiveRoot.orderOf _ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | pow_of_dvd | null |
protected mem_rootsOfUnity {ζ : Mˣ} {n : ℕ} (h : IsPrimitiveRoot ζ n) :
ζ ∈ rootsOfUnity n M :=
h.pow_eq_one | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | mem_rootsOfUnity | null |
pow {n : ℕ} {a b : ℕ} (hn : 0 < n) (h : IsPrimitiveRoot ζ n) (hprod : n = a * b) :
IsPrimitiveRoot (ζ ^ a) b := by
subst n
simp only [iff_def, ← pow_mul, h.pow_eq_one, true_and]
intro l hl
exact Nat.dvd_of_mul_dvd_mul_left (Nat.pos_of_mul_pos_right hn) <| h.dvd_of_pow_eq_one _ hl | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | pow | If there is an `n`-th primitive root of unity in `R` and `b` divides `n`,
then there is a `b`-th primitive root of unity in `R`. |
injOn_pow {n : ℕ} {ζ : M} (hζ : IsPrimitiveRoot ζ n) :
Set.InjOn (ζ ^ ·) (Finset.range n) := by
intro i hi j hj e
rw [Finset.coe_range, Set.mem_Iio] at hi hj
exact hζ.pow_inj hi hj e | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | injOn_pow | null |
exists_pos {k : ℕ} (hζ : ζ ^ k = 1) (hk : k ≠ 0) :
∃ k' > 0, IsPrimitiveRoot ζ k' :=
⟨orderOf ζ, by
rw [gt_iff_lt, orderOf_pos_iff, isOfFinOrder_iff_pow_eq_one]
exact ⟨k, Nat.pos_iff_ne_zero.mpr hk, hζ⟩, .orderOf _⟩ | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | exists_pos | null |
existsUnique : ∃! k, IsPrimitiveRoot ζ k :=
⟨_, .orderOf _, fun _ hl ↦ unique hl (.orderOf _)⟩ | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | existsUnique | null |
_root_.isPrimitiveRoot_of_mem_rootsOfUnity {u : Mˣ} {n : ℕ} [NeZero n]
(hu : u ∈ rootsOfUnity n M) :
∃ d : ℕ, d ≠ 0 ∧ d ∣ n ∧ IsPrimitiveRoot u d :=
⟨orderOf u, (IsOfFinOrder.orderOf_pos ⟨n, NeZero.pos n,
(isPeriodicPt_mul_iff_pow_eq_one u).mpr hu⟩).ne', orderOf_dvd_of_pow_eq_one hu,
IsPrimitiveRoot.orderOf u⟩ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | _root_.isPrimitiveRoot_of_mem_rootsOfUnity | null |
map_of_injective [MonoidHomClass F M N] (h : IsPrimitiveRoot ζ k) (hf : Injective f) :
IsPrimitiveRoot (f ζ) k where
pow_eq_one := by rw [← map_pow, h.pow_eq_one, map_one]
dvd_of_pow_eq_one := by
rw [h.eq_orderOf]
intro l hl
rw [← map_pow, ← map_one f] at hl
exact orderOf_dvd_of_pow_eq_one (hf hl) | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | map_of_injective | null |
of_map_of_injective [MonoidHomClass F M N] (h : IsPrimitiveRoot (f ζ) k)
(hf : Injective f) : IsPrimitiveRoot ζ k where
pow_eq_one := by apply_fun f; rw [map_pow, map_one, h.pow_eq_one]
dvd_of_pow_eq_one := by
rw [h.eq_orderOf]
intro l hl
apply_fun f at hl
rw [map_pow, map_one] at hl
exact orderOf_dvd_of_pow_eq_one hl | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | of_map_of_injective | null |
map_iff_of_injective [MonoidHomClass F M N] (hf : Injective f) :
IsPrimitiveRoot (f ζ) k ↔ IsPrimitiveRoot ζ k :=
⟨fun h => h.of_map_of_injective hf, fun h => h.map_of_injective hf⟩ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | map_iff_of_injective | null |
zero [Nontrivial M₀] : IsPrimitiveRoot (0 : M₀) 0 :=
⟨pow_zero 0, fun l hl ↦ by simpa [zero_pow_eq] using hl⟩ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zero | null |
protected ne_zero [Nontrivial M₀] {ζ : M₀} (h : IsPrimitiveRoot ζ k) : k ≠ 0 → ζ ≠ 0 :=
mt fun hn ↦ h.unique (hn.symm ▸ IsPrimitiveRoot.zero) | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | ne_zero | null |
injOn_pow_mul {n : ℕ} {ζ : M₀} (hζ : IsPrimitiveRoot ζ n) {α : M₀} (hα : α ≠ 0) :
Set.InjOn (ζ ^ · * α) (Finset.range n) :=
fun i hi j hj e ↦
hζ.injOn_pow hi hj (by simpa [mul_eq_mul_right_iff, or_iff_left hα] using e) | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | injOn_pow_mul | null |
zpow_eq_one (h : IsPrimitiveRoot ζ k) : ζ ^ (k : ℤ) = 1 := by
exact_mod_cast h.pow_eq_one | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zpow_eq_one | null |
zpow_eq_one_iff_dvd (h : IsPrimitiveRoot ζ k) (l : ℤ) : ζ ^ l = 1 ↔ (k : ℤ) ∣ l := by
by_cases h0 : 0 ≤ l
· lift l to ℕ using h0; exact_mod_cast h.pow_eq_one_iff_dvd l
· have : 0 ≤ -l := (Int.neg_pos_of_neg <| Int.lt_of_not_ge h0).le
lift -l to ℕ using this with l' hl'
rw [← dvd_neg, ← hl']
norm_cast
rw [← h.pow_eq_one_iff_dvd, ← inv_inj, ← zpow_neg, ← hl', zpow_natCast, inv_one] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zpow_eq_one_iff_dvd | null |
inv (h : IsPrimitiveRoot ζ k) : IsPrimitiveRoot ζ⁻¹ k :=
{ pow_eq_one := by simp only [h.pow_eq_one, inv_one, inv_pow]
dvd_of_pow_eq_one := by
intro l hl
apply h.dvd_of_pow_eq_one l
rw [← inv_inj, ← inv_pow, hl, inv_one] }
@[simp] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | inv | null |
inv_iff : IsPrimitiveRoot ζ⁻¹ k ↔ IsPrimitiveRoot ζ k :=
⟨fun h ↦ inv_inv ζ ▸ inv h, fun h ↦ inv h⟩ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | inv_iff | null |
zpow_of_gcd_eq_one (h : IsPrimitiveRoot ζ k) (i : ℤ) (hi : i.gcd k = 1) :
IsPrimitiveRoot (ζ ^ i) k := by
by_cases h0 : 0 ≤ i
· lift i to ℕ using h0
exact_mod_cast h.pow_of_coprime i hi
have : 0 ≤ -i := (Int.neg_pos_of_neg <| Int.lt_of_not_ge h0).le
lift -i to ℕ using this with i' hi'
rw [← inv_iff, ← zpow_neg, ← hi', zpow_natCast]
apply h.pow_of_coprime
rwa [Int.gcd, ← Int.natAbs_neg, ← hi'] at hi | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zpow_of_gcd_eq_one | null |
sub_one_ne_zero (hn : 1 < n) (hζ : IsPrimitiveRoot ζ n) : ζ - 1 ≠ 0 :=
sub_ne_zero.mpr <| hζ.ne_one hn | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | sub_one_ne_zero | null |
@[simp]
primitiveRoots_one : primitiveRoots 1 R = {(1 : R)} := by
refine Finset.eq_singleton_iff_unique_mem.2 ⟨?_, fun x hx ↦ ?_⟩
· simp only [IsPrimitiveRoot.one_right_iff, mem_primitiveRoots zero_lt_one]
· rwa [mem_primitiveRoots zero_lt_one, IsPrimitiveRoot.one_right_iff] at hx | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | primitiveRoots_one | null |
neZero' {n : ℕ} [NeZero n] (hζ : IsPrimitiveRoot ζ n) : NeZero ((n : ℕ) : R) := by
let p := ringChar R
have hfin := Nat.finiteMultiplicity_iff.2 ⟨CharP.char_ne_one R p, NeZero.pos n⟩
obtain ⟨m, hm⟩ := hfin.exists_eq_pow_mul_and_not_dvd
by_cases hp : p ∣ n
· obtain ⟨k, hk⟩ := Nat.exists_eq_succ_of_ne_zero (multiplicity_pos_of_dvd hp).ne'
have : NeZero p := NeZero.of_pos (Nat.pos_of_dvd_of_pos hp (NeZero.pos n))
have hpri : Fact p.Prime := CharP.char_is_prime_of_pos R p
have := hζ.pow_eq_one
rw [hm.1, hk, pow_succ', mul_assoc, pow_mul', ← frobenius_def, ← frobenius_one p] at this
exfalso
have hpos : 0 < p ^ k * m :=
mul_pos (pow_pos hpri.1.pos _) <| Nat.pos_of_ne_zero (fun H ↦ hm.2 <| H ▸ p.dvd_zero)
refine hζ.pow_ne_one_of_pos_of_lt hpos ?_ (frobenius_inj R p this)
rw [hm.1, hk, pow_succ', mul_assoc, mul_comm p]
exact lt_mul_of_one_lt_right hpos hpri.1.one_lt
· exact NeZero.of_not_dvd R hp
nonrec theorem mem_nthRootsFinset (hζ : IsPrimitiveRoot ζ k) (hk : 0 < k) :
ζ ∈ nthRootsFinset k (1 : R) :=
(mem_nthRootsFinset hk (1 : R)).2 hζ.pow_eq_one | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | neZero' | null |
eq_neg_one_of_two_right [NoZeroDivisors R] {ζ : R} (h : IsPrimitiveRoot ζ 2) : ζ = -1 :=
(sq_eq_one_iff.mp h.pow_eq_one).resolve_left <| ne_one h one_lt_two | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | eq_neg_one_of_two_right | null |
neg_one (p : ℕ) [Nontrivial R] [h : CharP R p] (hp : p ≠ 2) :
IsPrimitiveRoot (-1 : R) 2 := by
convert IsPrimitiveRoot.orderOf (-1 : R)
rw [orderOf_neg_one, if_neg <| by rwa [ringChar.eq_iff.mpr h]] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | neg_one | null |
geom_sum_eq_zero [IsDomain R] {ζ : R} (hζ : IsPrimitiveRoot ζ k) (hk : 1 < k) :
∑ i ∈ range k, ζ ^ i = 0 := by
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] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | geom_sum_eq_zero | If `1 < k` then `(∑ i ∈ range k, ζ ^ i) = 0`. |
pow_sub_one_eq [IsDomain R] {ζ : R} (hζ : IsPrimitiveRoot ζ k) (hk : 1 < k) :
ζ ^ k.pred = -∑ i ∈ 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] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | pow_sub_one_eq | If `1 < k`, then `ζ ^ k.pred = -(∑ i ∈ range k.pred, ζ ^ i)`. |
zmodEquivZPowers (h : IsPrimitiveRoot ζ k) : ZMod k ≃+ Additive (Subgroup.zpowers ζ) :=
AddEquiv.ofBijective
(AddMonoidHom.liftOfRightInverse (Int.castAddHom <| ZMod k) _ ZMod.intCast_rightInverse
⟨{ toFun := fun i ↦ Additive.ofMul (⟨_, i, rfl⟩ : Subgroup.zpowers ζ)
map_zero' := by simp only [zpow_zero]; rfl
map_add' := by intro i j; simp only [zpow_add]; rfl }, fun i hi ↦ by
simp only [AddMonoidHom.mem_ker, CharP.intCast_eq_zero_iff (ZMod k) k, AddMonoidHom.coe_mk,
Int.coe_castAddHom] at hi ⊢
obtain ⟨i, rfl⟩ := hi
simp [zpow_mul, h.pow_eq_one, one_zpow, zpow_natCast]⟩)
(by
constructor
· rw [injective_iff_map_eq_zero]
intro i hi
rw [Subtype.ext_iff] at hi
have := (h.zpow_eq_one_iff_dvd _).mp hi
rw [← (CharP.intCast_eq_zero_iff (ZMod k) k _).mpr this, eq_comm]
exact ZMod.intCast_rightInverse i
· rintro ⟨ξ, i, rfl⟩
refine ⟨Int.castAddHom (ZMod k) i, ?_⟩
rw [AddMonoidHom.liftOfRightInverse_comp_apply]
rfl)
@[simp] | def | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zmodEquivZPowers | The (additive) monoid equivalence between `ZMod k`
and the powers of a primitive root of unity `ζ`. |
zmodEquivZPowers_apply_coe_int (i : ℤ) :
h.zmodEquivZPowers i = Additive.ofMul (⟨ζ ^ i, i, rfl⟩ : Subgroup.zpowers ζ) := by
rw [zmodEquivZPowers, AddEquiv.ofBijective_apply] -- Porting note: Original proof didn't have `rw`
exact AddMonoidHom.liftOfRightInverse_comp_apply _ _ ZMod.intCast_rightInverse _ _
@[simp] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zmodEquivZPowers_apply_coe_int | null |
zmodEquivZPowers_apply_coe_nat (i : ℕ) :
h.zmodEquivZPowers i = Additive.ofMul (⟨ζ ^ i, i, rfl⟩ : Subgroup.zpowers ζ) := by
have : (i : ZMod k) = (i : ℤ) := by norm_cast
simp only [this, zmodEquivZPowers_apply_coe_int, zpow_natCast]
@[simp] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zmodEquivZPowers_apply_coe_nat | null |
zmodEquivZPowers_symm_apply_zpow (i : ℤ) :
h.zmodEquivZPowers.symm (Additive.ofMul (⟨ζ ^ i, i, rfl⟩ : Subgroup.zpowers ζ)) = i := by
rw [← h.zmodEquivZPowers.symm_apply_apply i, zmodEquivZPowers_apply_coe_int]
@[simp] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zmodEquivZPowers_symm_apply_zpow | null |
zmodEquivZPowers_symm_apply_zpow' (i : ℤ) : h.zmodEquivZPowers.symm ⟨ζ ^ i, i, rfl⟩ = i :=
h.zmodEquivZPowers_symm_apply_zpow i
@[simp] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zmodEquivZPowers_symm_apply_zpow' | null |
zmodEquivZPowers_symm_apply_pow (i : ℕ) :
h.zmodEquivZPowers.symm (Additive.ofMul (⟨ζ ^ i, i, rfl⟩ : Subgroup.zpowers ζ)) = i := by
rw [← h.zmodEquivZPowers.symm_apply_apply i, zmodEquivZPowers_apply_coe_nat]
@[simp] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zmodEquivZPowers_symm_apply_pow | null |
zmodEquivZPowers_symm_apply_pow' (i : ℕ) : h.zmodEquivZPowers.symm ⟨ζ ^ i, i, rfl⟩ = i :=
h.zmodEquivZPowers_symm_apply_pow i
variable [IsDomain R] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zmodEquivZPowers_symm_apply_pow' | null |
zpowers_eq {k : ℕ} [NeZero k] {ζ : Rˣ} (h : IsPrimitiveRoot ζ k) :
Subgroup.zpowers ζ = rootsOfUnity k R := by
apply SetLike.coe_injective
have F : Fintype (Subgroup.zpowers ζ) := Fintype.ofEquiv _ h.zmodEquivZPowers.toEquiv
refine
@Set.eq_of_subset_of_card_le Rˣ _ _ F (rootsOfUnity.fintype R k)
(Subgroup.zpowers_le_of_mem <| show ζ ∈ rootsOfUnity k R from h.pow_eq_one) ?_
calc
Fintype.card (rootsOfUnity k R) ≤ k := card_rootsOfUnity R k
_ = Fintype.card (ZMod k) := (ZMod.card k).symm
_ = Fintype.card (Subgroup.zpowers ζ) := Fintype.card_congr h.zmodEquivZPowers.toEquiv | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | zpowers_eq | null |
map_rootsOfUnity {S F} [CommRing S] [IsDomain S] [FunLike F R S] [MonoidHomClass F R S]
{ζ : R} {n : ℕ} [NeZero n] (hζ : IsPrimitiveRoot ζ n) {f : F} (hf : Function.Injective f) :
(rootsOfUnity n R).map (Units.map f) = rootsOfUnity n S := by
letI : CommMonoid Sˣ := inferInstance
replace hζ := hζ.isUnit_unit <| NeZero.pos n
rw [← hζ.zpowers_eq,
← (hζ.map_of_injective (Units.map_injective (f := (f : R →* S)) hf)).zpowers_eq,
MonoidHom.map_zpowers] | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | map_rootsOfUnity | null |
@[simps! -isSimp apply_coe_val apply_coe_inv_val]
noncomputable
_root_.rootsOfUnityEquivOfPrimitiveRoots {S F} [CommRing S] [IsDomain S]
[FunLike F R S] [MonoidHomClass F R S]
{n : ℕ} [NeZero n] {f : F} (hf : Function.Injective f) (hζ : (primitiveRoots n R).Nonempty) :
(rootsOfUnity n R) ≃* rootsOfUnity n S :=
(Subgroup.equivMapOfInjective _ (Units.map f) (Units.map_injective hf)).trans
(MulEquiv.subgroupCongr <|
((mem_primitiveRoots <| NeZero.pos n).mp hζ.choose_spec).map_rootsOfUnity hf) | def | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | _root_.rootsOfUnityEquivOfPrimitiveRoots | If `R` contains an `n`-th primitive root, and `S/R` is a ring extension,
then the `n`-th roots of unity in `R` and `S` are isomorphic.
Also see `IsPrimitiveRoot.map_rootsOfUnity` for the equality as `Subgroup Sˣ`. |
_root_.rootsOfUnityEquivOfPrimitiveRoots_symm_apply
{S F} [CommRing S] [IsDomain S] [FunLike F R S] [MonoidHomClass F R S] {n : ℕ} [NeZero n]
{f : F} (hf : Function.Injective f) (hζ : (primitiveRoots n R).Nonempty) (η) :
f ((rootsOfUnityEquivOfPrimitiveRoots hf hζ).symm η : Rˣ) = (η : Sˣ) := by
obtain ⟨ε, rfl⟩ := (rootsOfUnityEquivOfPrimitiveRoots hf hζ).surjective η
rw [MulEquiv.symm_apply_apply, val_rootsOfUnityEquivOfPrimitiveRoots_apply_coe] | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | _root_.rootsOfUnityEquivOfPrimitiveRoots_symm_apply | null |
eq_pow_of_mem_rootsOfUnity {k : ℕ} [NeZero k] {ζ ξ : Rˣ} (h : IsPrimitiveRoot ζ k)
(hξ : ξ ∈ rootsOfUnity k R) : ∃ i < k, ζ ^ i = ξ := by
obtain ⟨n, rfl⟩ : ∃ n : ℤ, ζ ^ n = ξ := by rwa [← h.zpowers_eq] at hξ
have hk0 : (0 : ℤ) < k := mod_cast NeZero.pos k
let i := n % k
have hi0 : 0 ≤ i := Int.emod_nonneg _ (ne_of_gt hk0)
lift i to ℕ using hi0 with i₀ hi₀
refine ⟨i₀, ?_, ?_⟩
· zify; rw [hi₀]; exact Int.emod_lt_of_pos _ hk0
· rw [← zpow_natCast, hi₀, ← Int.emod_add_mul_ediv n k, zpow_add, zpow_mul, h.zpow_eq_one,
one_zpow, mul_one] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | eq_pow_of_mem_rootsOfUnity | null |
eq_pow_of_pow_eq_one {k : ℕ} [NeZero k] {ζ ξ : R} (h : IsPrimitiveRoot ζ k)
(hξ : ξ ^ k = 1) :
∃ i < k, ζ ^ i = ξ := by
lift ζ to Rˣ using h.isUnit <| NeZero.pos k
lift ξ to Rˣ using .of_pow_eq_one hξ <| NeZero.ne k
simp only [← Units.val_pow_eq_pow_val, ← Units.ext_iff]
rw [coe_units_iff] at h
exact h.eq_pow_of_mem_rootsOfUnity <| (mem_rootsOfUnity' k ξ).mpr hξ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | eq_pow_of_pow_eq_one | null |
isPrimitiveRoot_iff' {k : ℕ} [NeZero k] {ζ ξ : Rˣ} (h : IsPrimitiveRoot ζ k) :
IsPrimitiveRoot ξ k ↔ ∃ i < k, i.Coprime k ∧ ζ ^ i = ξ := by
constructor
· intro hξ
obtain ⟨i, hik, rfl⟩ := h.eq_pow_of_mem_rootsOfUnity hξ.pow_eq_one
rw [h.pow_iff_coprime <| NeZero.pos k] at hξ
exact ⟨i, hik, hξ, rfl⟩
· rintro ⟨i, -, hi, rfl⟩; exact h.pow_of_coprime i hi | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | isPrimitiveRoot_iff' | null |
isPrimitiveRoot_iff {k : ℕ} [NeZero k] {ζ ξ : R} (h : IsPrimitiveRoot ζ k) :
IsPrimitiveRoot ξ k ↔ ∃ i < k, i.Coprime k ∧ ζ ^ i = ξ := by
constructor
· intro hξ
obtain ⟨i, hik, rfl⟩ := h.eq_pow_of_pow_eq_one hξ.pow_eq_one
rw [h.pow_iff_coprime <| NeZero.pos k] at hξ
exact ⟨i, hik, hξ, rfl⟩
· rintro ⟨i, -, hi, rfl⟩; exact h.pow_of_coprime i hi | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | isPrimitiveRoot_iff | null |
nthRoots_eq {n : ℕ} {ζ : R} (hζ : IsPrimitiveRoot ζ n) {α a : R} (e : α ^ n = a) :
nthRoots n a = (Multiset.range n).map (ζ ^ · * α) := by
obtain (rfl | hn) := n.eq_zero_or_pos; · simp
by_cases hα : α = 0
· rw [hα, zero_pow hn.ne'] at e
simp only [hα, e.symm, nthRoots_zero_right, mul_zero,
Multiset.map_const', Multiset.card_range]
classical
symm; apply Multiset.eq_of_le_of_card_le
· rw [← Finset.range_val,
← Finset.image_val_of_injOn (hζ.injOn_pow_mul hα), Finset.val_le_iff_val_subset]
intro x hx
simp only [Finset.image_val, Finset.range_val, Multiset.mem_dedup, Multiset.mem_map,
Multiset.mem_range] at hx
obtain ⟨m, _, rfl⟩ := hx
rw [mem_nthRoots hn, mul_pow, e, ← pow_mul, mul_comm m,
pow_mul, hζ.pow_eq_one, one_pow, one_mul]
· simpa only [Multiset.card_map, Multiset.card_range] using card_nthRoots n a | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | nthRoots_eq | null |
adjoin_pair_eq (S : Type*) [CommSemiring S] [Algebra S R] {ζ₁ ζ₂ : R} {k₁ : ℕ} {k₂ : ℕ}
(hζ₁ : IsPrimitiveRoot ζ₁ k₁) (hζ₂ : IsPrimitiveRoot ζ₂ k₂) (hk₁ : k₁ ≠ 0) (hk₂ : k₂ ≠ 0)
{ζ : R} (hζ : IsPrimitiveRoot ζ (k₁.lcm k₂)) :
Algebra.adjoin S {ζ₁, ζ₂} = Algebra.adjoin S {ζ} := by
have : NeZero (k₁.lcm k₂) := ⟨Nat.lcm_ne_zero hk₁ hk₂⟩
refine le_antisymm (Algebra.adjoin_le ?_) (Algebra.adjoin_le ?_)
· refine Set.pair_subset_iff.mpr ⟨?_, ?_⟩
· obtain ⟨_, _, rfl⟩ := hζ.eq_pow_of_pow_eq_one <|
(hζ₁.pow_eq_one_iff_dvd _).mpr <| k₁.dvd_lcm_left k₂
exact Subalgebra.pow_mem _ (Algebra.self_mem_adjoin_singleton S _) _
· obtain ⟨_, _, rfl⟩ := hζ.eq_pow_of_pow_eq_one <|
(hζ₂.pow_eq_one_iff_dvd _).mpr <| k₁.dvd_lcm_right k₂
exact Subalgebra.pow_mem _ (Algebra.self_mem_adjoin_singleton S _) _
· have hζ' := IsPrimitiveRoot.pow_mul_pow_lcm hζ₁ hζ₂ hk₁ hk₂
obtain ⟨_, _, rfl⟩ := hζ'.eq_pow_of_pow_eq_one hζ.pow_eq_one
aesop
open scoped Classical in | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | adjoin_pair_eq | The sub-algebra generated by two roots of unity of order `k₁` and `k₂` resp. is the same as the one
generated by a root of unity of order `lcm k₁ k₂`.
See `IsPrimitiveRoot.pow_mul_pow_lcm` for how to construct a root of unity of order `lcm k₁ k₂`
from roots of unity of order `k₁` and `k₂`. |
card_nthRoots {n : ℕ} {ζ : R} (hζ : IsPrimitiveRoot ζ n) (a : R) :
Multiset.card (nthRoots n a) = if ∃ α, α ^ n = a then n else 0 := by
split_ifs with h
· obtain ⟨α, hα⟩ := h
rw [nthRoots_eq hζ hα, Multiset.card_map, Multiset.card_range]
· obtain (rfl | hn) := n.eq_zero_or_pos; · simp
push_neg at h
simpa only [Multiset.card_eq_zero, Multiset.eq_zero_iff_forall_notMem, mem_nthRoots hn] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | card_nthRoots | null |
card_rootsOfUnity' {n : ℕ} [NeZero n] (h : IsPrimitiveRoot ζ n) :
Fintype.card (rootsOfUnity n R) = n := by
let e := h.zmodEquivZPowers
have : Fintype (Subgroup.zpowers ζ) := Fintype.ofEquiv _ e.toEquiv
calc
Fintype.card (rootsOfUnity n R) = Fintype.card (Subgroup.zpowers ζ) :=
Fintype.card_congr <| by rw [h.zpowers_eq]
_ = Fintype.card (ZMod n) := Fintype.card_congr e.toEquiv.symm
_ = n := ZMod.card n | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | card_rootsOfUnity' | A variant of `IsPrimitiveRoot.card_rootsOfUnity` for `ζ : Rˣ`. |
card_rootsOfUnity {ζ : R} {n : ℕ} [NeZero n] (h : IsPrimitiveRoot ζ n) :
Fintype.card (rootsOfUnity n R) = n := by
obtain ⟨ζ, hζ⟩ := h.isUnit <| NeZero.pos n
rw [← hζ, IsPrimitiveRoot.coe_units_iff] at h
exact h.card_rootsOfUnity' | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | card_rootsOfUnity | null |
_root_.card_rootsOfUnity_eq_iff_exists_isPrimitiveRoot {n : ℕ} [NeZero n] :
Fintype.card (rootsOfUnity n R) = n ↔ ∃ ζ : R, IsPrimitiveRoot ζ n := by
refine ⟨fun h ↦ ?_, fun ⟨ζ, hζ⟩ ↦ hζ.card_rootsOfUnity⟩
obtain ⟨⟨ζ, hζ'⟩, hζ⟩ := (rootsOfUnity.isCyclic R n).exists_ofOrder_eq_natCard
rw [Nat.card_eq_fintype_card, h, ← IsPrimitiveRoot.iff_orderOf, ← coe_submonoidClass_iff,
← IsPrimitiveRoot.coe_units_iff] at hζ
use ζ | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | _root_.card_rootsOfUnity_eq_iff_exists_isPrimitiveRoot | null |
card_nthRoots_one {ζ : R} {n : ℕ} (h : IsPrimitiveRoot ζ n) :
Multiset.card (nthRoots n (1 : R)) = n := by
rw [card_nthRoots h, if_pos ⟨ζ, h.pow_eq_one⟩] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | card_nthRoots_one | The cardinality of the multiset `nthRoots ↑n (1 : R)` is `n`
if there is a primitive root of unity in `R`. |
nthRoots_nodup {ζ : R} {n : ℕ} (h : IsPrimitiveRoot ζ n) {a : R} (ha : a ≠ 0) :
(nthRoots n a).Nodup := by
obtain (rfl | hn) := n.eq_zero_or_pos; · simp
by_cases h : ∃ α, α ^ n = a
· obtain ⟨α, hα⟩ := h
by_cases hα' : α = 0
· exact (ha (by rwa [hα', zero_pow hn.ne', eq_comm] at hα)).elim
rw [nthRoots_eq h hα, Multiset.nodup_map_iff_inj_on (Multiset.nodup_range n)]
exact h.injOn_pow_mul hα'
· suffices nthRoots n a = 0 by simp [this]
push_neg at h
simpa only [Multiset.card_eq_zero, Multiset.eq_zero_iff_forall_notMem, mem_nthRoots hn] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | nthRoots_nodup | null |
nthRoots_one_nodup {ζ : R} {n : ℕ} (h : IsPrimitiveRoot ζ n) :
(nthRoots n (1 : R)).Nodup :=
h.nthRoots_nodup one_ne_zero | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | nthRoots_one_nodup | The multiset `nthRoots ↑n (1 : R)` has no repeated elements
if there is a primitive root of unity in `R`. |
card_nthRootsFinset {ζ : R} {n : ℕ} (h : IsPrimitiveRoot ζ n) :
#(nthRootsFinset n (1 : R)) = n := by
classical
rw [nthRootsFinset, ← Multiset.toFinset_eq (nthRoots_one_nodup h), card_mk, h.card_nthRoots_one]
open scoped Nat | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | card_nthRootsFinset | null |
card_primitiveRoots {ζ : R} {k : ℕ} (h : IsPrimitiveRoot ζ k) :
#(primitiveRoots k R) = φ k := by
by_cases h0 : k = 0
· simp [h0]
have : NeZero k := ⟨h0⟩
symm
refine Finset.card_bij (fun i _ ↦ ζ ^ i) ?_ ?_ ?_
· simp only [and_imp, mem_filter, mem_range]
rintro i - hi
rw [mem_primitiveRoots (Nat.pos_of_ne_zero h0)]
exact h.pow_of_coprime i hi.symm
· simp only [and_imp, mem_filter, mem_range]
rintro i hi - j hj - H
exact h.pow_inj hi hj H
· simp only [exists_prop, mem_filter, mem_range]
intro ξ hξ
rw [mem_primitiveRoots (Nat.pos_of_ne_zero h0), h.isPrimitiveRoot_iff] at hξ
rcases hξ with ⟨i, hin, hi, H⟩
exact ⟨i, ⟨hin, hi.symm⟩, H⟩ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | card_primitiveRoots | If an integral domain has a primitive `k`-th root of unity, then it has `φ k` of them. |
disjoint {k l : ℕ} (h : k ≠ l) : Disjoint (primitiveRoots k R) (primitiveRoots l R) :=
Finset.disjoint_left.2 fun _ hk hl ↦
h <|
(isPrimitiveRoot_of_mem_primitiveRoots hk).unique <| isPrimitiveRoot_of_mem_primitiveRoots hl | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | disjoint | The sets `primitiveRoots k R` are pairwise disjoint. |
nthRoots_one_eq_biUnion_primitiveRoots [DecidableEq R] {n : ℕ} :
nthRootsFinset n (1 : R) = (Nat.divisors n).biUnion fun i ↦ primitiveRoots i R := by
by_cases hn : n = 0
· simp only [hn, nthRootsFinset_zero, Nat.divisors_zero, biUnion_empty]
have : NeZero n := ⟨hn⟩
exact nthRoots_one_eq_biUnion_primitiveRoots' | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | nthRoots_one_eq_biUnion_primitiveRoots | `nthRoots n` as a `Finset` is equal to the union of `primitiveRoots i R` for `i ∣ n`. -/
private -- marking as `private` since `nthRoots_one_eq_biUnion_primitiveRoots` can be used instead
theorem nthRoots_one_eq_biUnion_primitiveRoots' [DecidableEq R] {n : ℕ} [NeZero n] :
nthRootsFinset n (1 : R) = (Nat.divisors n).biUnion fun i ↦ primitiveRoots i R := by
ext x
suffices x ^ n = 1 ↔ ∃ a, a ∣ n ∧ x ∈ primitiveRoots a R by
simpa [Polynomial.mem_nthRootsFinset (NeZero.pos n), (NeZero.ne n)]
constructor
· intro H
obtain ⟨k, hk, hx⟩ := exists_pos H (NeZero.ne n)
exact ⟨k, hx.2 _ H, (mem_primitiveRoots hk).mpr hx⟩
· rintro ⟨a, ⟨d, hd⟩, ha⟩
have hazero : 0 < a := Nat.pos_of_ne_zero fun ha₀ ↦ by simp_all
rw [mem_primitiveRoots hazero] at ha
rw [hd, pow_mul, ha.pow_eq_one, one_pow]
/-- `nthRoots n` as a `Finset` is equal to the union of `primitiveRoots i R` for `i ∣ n`. |
noncomputable autToPow [NeZero n] : (S ≃ₐ[R] S) →* (ZMod n)ˣ :=
let μ' := hμ.toRootsOfUnity
have ho : orderOf μ' = n := by
refine Eq.trans ?_ hμ.eq_orderOf.symm -- `rw [hμ.eq_orderOf]` gives "motive not type correct"
rw [← hμ.val_toRootsOfUnity_coe, orderOf_units, Subgroup.orderOf_coe]
MonoidHom.toHomUnits
{ toFun := fun σ ↦ (map_rootsOfUnity_eq_pow_self σ.toAlgHom μ').choose
map_one' := by
generalize_proofs h1
have h := h1.choose_spec
replace h : μ' = μ' ^ h1.choose :=
rootsOfUnity.coe_injective (by simpa only [rootsOfUnity.coe_pow] using h)
nth_rw 1 [← pow_one μ'] at h
convert ho ▸ (ZMod.natCast_eq_natCast_iff ..).mpr (pow_eq_pow_iff_modEq.mp h).symm
exact Nat.cast_one.symm
map_mul' := by
intro x y
generalize_proofs hxy' hx' hy'
have hxy := hxy'.choose_spec
replace hxy : x (((μ' : Sˣ) : S) ^ hy'.choose) = ((μ' : Sˣ) : S) ^ hxy'.choose :=
hy'.choose_spec ▸ hxy
rw [map_pow] at hxy
replace hxy : (((μ' : Sˣ) : S) ^ hx'.choose) ^ hy'.choose = ((μ' : Sˣ) : S) ^ hxy'.choose :=
hx'.choose_spec ▸ hxy
rw [← pow_mul] at hxy
replace hxy : μ' ^ (hx'.choose * hy'.choose) = μ' ^ hxy'.choose :=
rootsOfUnity.coe_injective (by simpa only [rootsOfUnity.coe_pow] using hxy)
convert ho ▸ (ZMod.natCast_eq_natCast_iff ..).mpr (pow_eq_pow_iff_modEq.mp hxy).symm
exact (Nat.cast_mul ..).symm } | def | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | autToPow | The `MonoidHom` that takes an automorphism to the power of `μ` that `μ` gets mapped to
under it. |
coe_autToPow_apply [NeZero n] (f : S ≃ₐ[R] S) :
(autToPow R hμ f : ZMod n) =
((map_rootsOfUnity_eq_pow_self f hμ.toRootsOfUnity).choose : ZMod n) :=
rfl
@[simp] | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | coe_autToPow_apply | null |
autToPow_spec [NeZero n] (f : S ≃ₐ[R] S) : μ ^ (hμ.autToPow R f : ZMod n).val = f μ := by
rw [IsPrimitiveRoot.coe_autToPow_apply]
generalize_proofs h
refine (?_ : ((hμ.toRootsOfUnity : Sˣ) : S) ^ _ = _).trans h.choose_spec.symm
rw [← rootsOfUnity.coe_pow, ← rootsOfUnity.coe_pow]
congr 2
rw [pow_eq_pow_iff_modEq, ZMod.val_natCast]
conv => enter [2, 2]; rw [hμ.eq_orderOf]
rw [← Subgroup.orderOf_coe, ← orderOf_units]
exact Nat.mod_modEq _ _ | theorem | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | autToPow_spec | null |
IsCyclic.exists_apply_ne_one {G G' : Type*} [Group G] [IsCyclic G] [Finite G]
[CommGroup G'] (hG' : ∃ ζ : G', IsPrimitiveRoot ζ (Nat.card G)) ⦃a : G⦄ (ha : a ≠ 1) :
∃ φ : G →* G', φ a ≠ 1 := by
let inst : Fintype G := Fintype.ofFinite _
obtain ⟨ζ, hζ⟩ := hG'
obtain ⟨g, hg⟩ := IsCyclic.exists_generator (α := G)
have hζg : orderOf ζ ∣ orderOf g := by
rw [← hζ.eq_orderOf, orderOf_eq_card_of_forall_mem_zpowers hg, Nat.card_eq_fintype_card]
let φ := monoidHomOfForallMemZpowers hg hζg
have hφg : IsPrimitiveRoot (φ g) (Nat.card G) := by
rwa [monoidHomOfForallMemZpowers_apply_gen hg hζg]
use φ
contrapose! ha
specialize hg a
rw [← mem_powers_iff_mem_zpowers, Submonoid.mem_powers_iff] at hg
obtain ⟨k, hk⟩ := hg
rw [← hk, map_pow] at ha
obtain ⟨l, rfl⟩ := (hφg.pow_eq_one_iff_dvd k).mp ha
rw [← hk, pow_mul, Nat.card_eq_fintype_card, pow_card_eq_one, one_pow] | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | IsCyclic.exists_apply_ne_one | If `G` is cyclic of order `n` and `G'` contains a primitive `n`th root of unity,
then for each `a : G` with `a ≠ 1` there is a homomorphism `φ : G →* G'` such that `φ a ≠ 1`. |
ZMod.exists_monoidHom_apply_ne_one {M : Type*} [CommMonoid M] {n : ℕ} [NeZero n]
(hG : ∃ ζ : M, IsPrimitiveRoot ζ n) {a : ZMod n} (ha : a ≠ 0) :
∃ φ : Multiplicative (ZMod n) →* Mˣ, φ (Multiplicative.ofAdd a) ≠ 1 := by
obtain ⟨ζ, hζ⟩ := hG
have hc : n = Nat.card (Multiplicative (ZMod n)) := by
simp only [Nat.card_eq_fintype_card, Fintype.card_multiplicative, card]
exact IsCyclic.exists_apply_ne_one
(hc ▸ ⟨hζ.toRootsOfUnity.val, IsPrimitiveRoot.coe_units_iff.mp hζ⟩) <|
by simp only [ne_eq, ofAdd_eq_one, ha, not_false_eq_true] | lemma | RingTheory | [
"Mathlib.Data.Nat.Factorization.LCM",
"Mathlib.Algebra.Group.TypeTags.Finite",
"Mathlib.RingTheory.RootsOfUnity.Basic"
] | Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean | ZMod.exists_monoidHom_apply_ne_one | If `M` is a commutative group that contains a primitive `n`th root of unity
and `a : ZMod n` is nonzero, then there exists a group homomorphism `φ` from the
additive group `ZMod n` to the multiplicative group `Mˣ` such that `φ a ≠ 1`. |
@[mk_iff] IsSimpleModule extends
IsSimpleOrder (Submodule R M) | class | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | IsSimpleModule | A module is simple when it has only two submodules, `⊥` and `⊤`. |
@[mk_iff] IsSemisimpleModule extends
ComplementedLattice (Submodule R M) | class | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | IsSemisimpleModule | A module is semisimple when every submodule has a complement, or equivalently, the module
is a direct sum of simple modules. |
IsSemisimpleRing := IsSemisimpleModule R R
variable {R S} in | abbrev | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | IsSemisimpleRing | A ring is semisimple if it is semisimple as a module over itself. |
RingEquiv.isSemisimpleRing (e : R ≃+* S) [IsSemisimpleRing R] : IsSemisimpleRing S where
__ := (Submodule.orderIsoMapComap e.toSemilinearEquiv).complementedLattice
variable {R S} in | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | RingEquiv.isSemisimpleRing | null |
RingEquiv.isSemisimpleRing_iff (e : R ≃+* S) : IsSemisimpleRing R ↔ IsSemisimpleRing S :=
⟨fun _ ↦ e.isSemisimpleRing, fun _ ↦ e.symm.isSemisimpleRing⟩ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | RingEquiv.isSemisimpleRing_iff | null |
IsSimpleModule.nontrivial [IsSimpleModule R M] : Nontrivial M :=
⟨⟨0, by
have h : (⊥ : Submodule R M) ≠ ⊤ := bot_ne_top
contrapose! h
ext x
simp [Submodule.mem_bot, Submodule.mem_top, h x]⟩⟩
variable {m : Submodule R M} {N : Type*} [AddCommGroup N] {R S M} | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | IsSimpleModule.nontrivial | null |
LinearMap.isSimpleModule_iff_of_bijective [Module S N] {σ : R →+* S} [RingHomSurjective σ]
(l : M →ₛₗ[σ] N) (hl : Function.Bijective l) : IsSimpleModule R M ↔ IsSimpleModule S N := by
simp_rw [isSimpleModule_iff, (Submodule.orderIsoMapComapOfBijective l hl).isSimpleOrder_iff]
variable [Module R N] | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | LinearMap.isSimpleModule_iff_of_bijective | null |
IsSimpleModule.congr (e : M ≃ₗ[R] N) [IsSimpleModule R N] : IsSimpleModule R M where
__ := (Submodule.orderIsoMapComap e).isSimpleOrder | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | IsSimpleModule.congr | null |
LinearEquiv.isSimpleModule_iff (e : M ≃ₗ[R] N) : IsSimpleModule R M ↔ IsSimpleModule R N :=
⟨(·.congr e.symm), (·.congr e)⟩ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | LinearEquiv.isSimpleModule_iff | null |
isSimpleModule_iff_isAtom : IsSimpleModule R m ↔ IsAtom m := by
rw [← Set.isSimpleOrder_Iic_iff_isAtom, isSimpleModule_iff]
exact m.mapIic.isSimpleOrder_iff | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isSimpleModule_iff_isAtom | null |
isSimpleModule_iff_isCoatom : IsSimpleModule R (M ⧸ m) ↔ IsCoatom m := by
rw [← Set.isSimpleOrder_Ici_iff_isCoatom, isSimpleModule_iff]
exact (Submodule.comapMkQRelIso m).isSimpleOrder_iff | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isSimpleModule_iff_isCoatom | null |
covBy_iff_quot_is_simple {A B : Submodule R M} (hAB : A ≤ B) :
A ⋖ B ↔ IsSimpleModule R (B ⧸ Submodule.comap B.subtype A) := by
set f : Submodule R B ≃o Set.Iic B := B.mapIic with hf
rw [covBy_iff_coatom_Iic hAB, isSimpleModule_iff_isCoatom, ← OrderIso.isCoatom_iff f, hf]
simp [-OrderIso.isCoatom_iff, Submodule.map_comap_subtype, inf_eq_right.2 hAB] | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | covBy_iff_quot_is_simple | null |
@[simp]
isAtom [IsSimpleModule R m] : IsAtom m :=
isSimpleModule_iff_isAtom.1 ‹_›
variable [IsSimpleModule R M] (R)
open LinearMap | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isAtom | null |
span_singleton_eq_top {m : M} (hm : m ≠ 0) : Submodule.span R {m} = ⊤ :=
(eq_bot_or_eq_top _).resolve_left fun h ↦ hm (h.le <| Submodule.mem_span_singleton_self m) | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | span_singleton_eq_top | null |
toSpanSingleton_surjective {m : M} (hm : m ≠ 0) :
Function.Surjective (toSpanSingleton R M m) := by
rw [← range_eq_top, ← span_singleton_eq_range, span_singleton_eq_top R hm] | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | toSpanSingleton_surjective | null |
ker_toSpanSingleton_isMaximal {m : M} (hm : m ≠ 0) :
Ideal.IsMaximal (ker (toSpanSingleton R M m)) := by
rw [Ideal.isMaximal_def, ← isSimpleModule_iff_isCoatom]
exact congr (quotKerEquivOfSurjective _ <| toSpanSingleton_surjective R hm)
open scoped IsSimpleOrder in | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | ker_toSpanSingleton_isMaximal | null |
isSimpleModule_iff_quot_maximal :
IsSimpleModule R M ↔ ∃ I : Ideal R, I.IsMaximal ∧ Nonempty (M ≃ₗ[R] R ⧸ I) := by
refine ⟨fun h ↦ ?_, fun ⟨I, ⟨coatom⟩, ⟨equiv⟩⟩ ↦ ?_⟩
· have := IsSimpleModule.nontrivial R M
have ⟨m, hm⟩ := exists_ne (0 : M)
exact ⟨_, ker_toSpanSingleton_isMaximal R hm,
⟨(LinearMap.quotKerEquivOfSurjective _ <| toSpanSingleton_surjective R hm).symm⟩⟩
· convert congr equiv; rwa [isSimpleModule_iff_isCoatom] | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isSimpleModule_iff_quot_maximal | A module is simple iff it's isomorphic to the quotient of the ring by a maximal left ideal
(not necessarily unique if the ring is not commutative). |
IsSimpleModule.annihilator_isMaximal {R} [CommRing R] [Module R M]
[simple : IsSimpleModule R M] : (Module.annihilator R M).IsMaximal := by
have ⟨I, max, ⟨e⟩⟩ := isSimpleModule_iff_quot_maximal.mp simple
rwa [e.annihilator_eq, I.annihilator_quotient] | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | IsSimpleModule.annihilator_isMaximal | In general, the annihilator of a simple module is called a primitive ideal, and it is
always a two-sided prime ideal, but mathlib's `Ideal.IsPrime` is not the correct definition
for noncommutative rings. |
isSimpleModule_iff_toSpanSingleton_surjective : IsSimpleModule R M ↔
Nontrivial M ∧ ∀ x : M, x ≠ 0 → Function.Surjective (LinearMap.toSpanSingleton R M x) where
mp h := ⟨h.nontrivial, fun _ ↦ h.toSpanSingleton_surjective⟩
mpr := fun ⟨_, h⟩ ↦ (isSimpleModule_iff R M).mpr
⟨fun m ↦ or_iff_not_imp_left.mpr fun ne_bot ↦
have ⟨x, hxm, hx0⟩ := m.ne_bot_iff.mp ne_bot
top_unique <| fun z _ ↦ by obtain ⟨y, rfl⟩ := h x hx0 z; exact m.smul_mem _ hxm⟩ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isSimpleModule_iff_toSpanSingleton_surjective | null |
isSimpleModule_self_iff_isUnit :
IsSimpleModule R R ↔ Nontrivial R ∧ ∀ x : R, x ≠ 0 → IsUnit x :=
isSimpleModule_iff_toSpanSingleton_surjective.trans <| and_congr_right fun _ ↦ by
refine ⟨fun h x hx ↦ ?_, fun h x hx ↦ (h x hx).unit.mulRight_bijective.surjective⟩
obtain ⟨y, hyx : y * x = 1⟩ := h x hx 1
have hy : y ≠ 0 := left_ne_zero_of_mul (hyx.symm ▸ one_ne_zero)
obtain ⟨z, hzy : z * y = 1⟩ := h y hy 1
exact ⟨⟨x, y, left_inv_eq_right_inv hzy hyx ▸ hzy, hyx⟩, rfl⟩ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isSimpleModule_self_iff_isUnit | A ring is a simple module over itself iff it is a division ring. |
IsSemisimpleModule.of_sSup_simples_eq_top
(h : sSup { m : Submodule R M | IsSimpleModule R m } = ⊤) : IsSemisimpleModule R M where
__ := complementedLattice_of_sSup_atoms_eq_top (by simp_rw [← h, isSimpleModule_iff_isAtom]) | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | IsSemisimpleModule.of_sSup_simples_eq_top | null |
of_isComplemented_domain (h : IsComplemented m) : Module.Finite R₀ (m →ₗ[R] P) :=
.of_surjective (.lcomp R₀ P ..) (LinearMap.surjective_comp_subtype_of_isComplemented h) | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | of_isComplemented_domain | null |
of_isComplemented_codomain (h : IsComplemented m) : Module.Finite R₀ (P →ₗ[R] m) :=
.of_surjective (.compRight ..) (LinearMap.surjective_comp_linearProjOfIsCompl h.choose_spec) | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | of_isComplemented_codomain | null |
eq_bot_or_exists_simple_le (N : Submodule R M) [IsSemisimpleModule R N] :
N = ⊥ ∨ ∃ m ≤ N, IsSimpleModule R m := by
rw [← N.subsingleton_iff_eq_bot, ← Submodule.subsingleton_iff R, ← subsingleton_iff_bot_eq_top]
refine (eq_bot_or_exists_atom_le _).imp .symm fun ⟨m, h, _⟩ ↦ ⟨_, N.map_subtype_le m, ?_⟩
rw [← isSimpleModule_iff_isAtom] at h
exact .congr (m.equivMapOfInjective _ N.subtype_injective).symm
variable [IsSemisimpleModule R M] | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | eq_bot_or_exists_simple_le | null |
extension_property {P} [AddCommGroup P] [Module R P] (f : N →ₗ[R] M)
(hf : Function.Injective f) (g : N →ₗ[R] P) :
∃ h : M →ₗ[R] P, h ∘ₗ f = g :=
have ⟨m, compl⟩ := exists_isCompl (LinearMap.range f)
⟨g ∘ₗ f.linearProjOfIsCompl _ hf compl, by ext; simp⟩ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | extension_property | null |
lifting_property {P} [AddCommGroup P] [Module R P] (f : M →ₗ[R] N)
(hf : Function.Surjective f) (g : P →ₗ[R] N) :
∃ h : P →ₗ[R] M, f ∘ₗ h = g := by
have ⟨m, compl⟩ := exists_isCompl (LinearMap.ker f)
let e := (Submodule.quotientEquivOfIsCompl _ m compl).symm ≪≫ₗ f.quotKerEquivOfSurjective hf
refine ⟨Submodule.subtype _ ∘ₗ e.symm.toLinearMap ∘ₗ g, LinearMap.ext fun x ↦ ?_⟩
obtain ⟨z, eq⟩ := e.surjective (g x)
simp only [LinearMap.comp_apply, ← eq, LinearEquiv.coe_coe, e.symm_apply_apply]
simp [e] | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | lifting_property | null |
sSup_simples_le (N : Submodule R M) :
sSup { m : Submodule R M | IsSimpleModule R m ∧ m ≤ N } = N := by
simpa only [isSimpleModule_iff_isAtom] using sSup_atoms_le_eq _
variable (R M) | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | sSup_simples_le | null |
exists_simple_submodule [Nontrivial M] : ∃ m : Submodule R M, IsSimpleModule R m := by
simpa only [isSimpleModule_iff_isAtom] using IsAtomic.exists_atom _ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | exists_simple_submodule | null |
sSup_simples_eq_top : sSup { m : Submodule R M | IsSimpleModule R m } = ⊤ := by
simpa only [isSimpleModule_iff_isAtom] using sSup_atoms_eq_top | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | sSup_simples_eq_top | null |
exists_sSupIndep_sSup_simples_eq_top :
∃ s : Set (Submodule R M), sSupIndep s ∧ sSup s = ⊤ ∧ ∀ m ∈ s, IsSimpleModule R m := by
have := sSup_simples_eq_top R M
simp_rw [isSimpleModule_iff_isAtom] at this ⊢
exact exists_sSupIndep_of_sSup_atoms_eq_top this | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | exists_sSupIndep_sSup_simples_eq_top | null |
annihilator_isRadical (R) [CommRing R] [Module R M] [IsSemisimpleModule R M] :
(Module.annihilator R M).IsRadical := by
rw [← Submodule.annihilator_top, ← sSup_simples_eq_top, sSup_eq_iSup', Submodule.annihilator_iSup]
exact Ideal.isRadical_iInf _ fun i ↦ (i.2.annihilator_isMaximal).isPrime.isRadical | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | annihilator_isRadical | The annihilator of a semisimple module over a commutative ring is a radical ideal. |
submodule {m : Submodule R M} : IsSemisimpleModule R m where
__ := m.mapIic.complementedLattice_iff.2 IsModularLattice.complementedLattice_Iic
variable {R M}
open LinearMap | instance | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | submodule | null |
congr (e : N ≃ₗ[R] M) : IsSemisimpleModule R N where
__ := (Submodule.orderIsoMapComap e.symm).complementedLattice | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | congr | null |
of_injective (f : N →ₗ[R] M) (hf : Function.Injective f) : IsSemisimpleModule R N :=
congr (Submodule.topEquiv.symm.trans <| Submodule.equivMapOfInjective f hf _) | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | of_injective | null |
quotient : IsSemisimpleModule R (M ⧸ m) :=
have ⟨P, compl⟩ := exists_isCompl m
.congr (m.quotientEquivOfIsCompl P compl) | instance | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | quotient | null |
protected range (f : M →ₗ[R] N) : IsSemisimpleModule R (range f) :=
congr (quotKerEquivRange _).symm | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | range | null |
of_surjective (f : M →ₗ[R] N) (hf : Function.Surjective f) : IsSemisimpleModule R N :=
congr (f.quotKerEquivOfSurjective hf).symm | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | of_surjective | null |
_root_.LinearMap.isSemisimpleModule_iff_of_bijective
[RingHomSurjective σ] (hl : Function.Bijective l) :
IsSemisimpleModule R M' ↔ IsSemisimpleModule S N' := by
simp_rw [isSemisimpleModule_iff,
(Submodule.orderIsoMapComapOfBijective l hl).complementedLattice_iff]
proof_wanted _root_.LinearMap.isSemisimpleModule_of_injective (_ : Function.Injective l)
[IsSemisimpleModule S N'] : IsSemisimpleModule R M'
proof_wanted _root_.LinearMap.isSemisimpleModule_of_surjective (_ : Function.Surjective l)
[IsSemisimpleModule R M'] : IsSemisimpleModule S N' | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | _root_.LinearMap.isSemisimpleModule_iff_of_bijective | null |
LinearEquiv.isSemisimpleModule_iff (e : M ≃ₗ[R] N) :
IsSemisimpleModule R M ↔ IsSemisimpleModule R N :=
⟨(·.congr e.symm), (·.congr e)⟩ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | LinearEquiv.isSemisimpleModule_iff | null |
sSup_simples_eq_top_iff_isSemisimpleModule :
sSup { m : Submodule R M | IsSimpleModule R m } = ⊤ ↔ IsSemisimpleModule R M :=
⟨.of_sSup_simples_eq_top, fun _ ↦ IsSemisimpleModule.sSup_simples_eq_top _ _⟩ | theorem | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | sSup_simples_eq_top_iff_isSemisimpleModule | A module is semisimple iff it is generated by its simple submodules. |
isSemisimpleModule_of_isSemisimpleModule_submodule {s : Set ι} {p : ι → Submodule R M}
(hp : ∀ i ∈ s, IsSemisimpleModule R (p i)) (hp' : ⨆ i ∈ s, p i = ⊤) :
IsSemisimpleModule R M := by
simp_rw [isSemisimpleModule_iff] at hp ⊢
refine complementedLattice_of_complementedLattice_Iic (fun i hi ↦ ?_) hp'
simpa only [← (p i).mapIic.complementedLattice_iff] using hp i hi
open Submodule in | lemma | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isSemisimpleModule_of_isSemisimpleModule_submodule | A module generated by semisimple submodules is itself semisimple. |
isSemisimpleModule_biSup_of_isSemisimpleModule_submodule {s : Set ι} {p : ι → Submodule R M}
(hp : ∀ i ∈ s, IsSemisimpleModule R (p i)) :
IsSemisimpleModule R ↥(⨆ i ∈ s, p i) := by
refine isSemisimpleModule_of_isSemisimpleModule_submodule
((comap_equiv_self_of_inj_of_le (injective_subtype _) ?_).isSemisimpleModule_iff.mpr <| hp · ·)
(biSup_comap_subtype_eq_top ..)
simp_rw [range_subtype, le_biSup p ‹_›] | lemma | RingTheory | [
"Mathlib.Algebra.DirectSum.Module",
"Mathlib.Data.Finite.Card",
"Mathlib.Data.Matrix.Mul",
"Mathlib.LinearAlgebra.DFinsupp",
"Mathlib.LinearAlgebra.Finsupp.Span",
"Mathlib.LinearAlgebra.Isomorphisms",
"Mathlib.LinearAlgebra.Projection",
"Mathlib.Order.Atoms.Finite",
"Mathlib.Order.CompactlyGenerated... | Mathlib/RingTheory/SimpleModule/Basic.lean | isSemisimpleModule_biSup_of_isSemisimpleModule_submodule | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.