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
exists_nonneg_right (h : SameRay R x y) (hy : y ≠ 0) : ∃ r : R, 0 ≤ r ∧ x = r • y := (h.symm.exists_nonneg_left hy).imp fun _ => And.imp_right Eq.symm
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_nonneg_right
If a vector `v₁` is on the same ray as a nonzero vector `v₂`, then it is equal to `c • v₂` for some nonnegative `c`.
exists_eq_smul_add (h : SameRay R v₁ v₂) : ∃ a b : R, 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ v₁ = a • (v₁ + v₂) ∧ v₂ = b • (v₁ + v₂) := by rcases h with (rfl | rfl | ⟨r₁, r₂, h₁, h₂, H⟩) · use 0, 1 simp · use 1, 0 simp · have h₁₂ : 0 < r₁ + r₂ := add_pos h₁ h₂ refine ⟨r₂ / (r₁ + r₂), r₁ / (r₁ + r₂), div_nonneg h₂.le h₁₂.le, div_nonneg h₁.le h₁₂.le, ?_, ?_, ?_⟩ · rw [← add_div, add_comm, div_self h₁₂.ne'] · rw [div_eq_inv_mul, mul_smul, smul_add, ← H, ← add_smul, add_comm r₂, inv_smul_smul₀ h₁₂.ne'] · rw [div_eq_inv_mul, mul_smul, smul_add, H, ← add_smul, add_comm r₂, inv_smul_smul₀ h₁₂.ne']
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_eq_smul_add
If vectors `v₁` and `v₂` are on the same ray, then for some nonnegative `a b`, `a + b = 1`, we have `v₁ = a • (v₁ + v₂)` and `v₂ = b • (v₁ + v₂)`.
exists_eq_smul (h : SameRay R v₁ v₂) : ∃ (u : M) (a b : R), 0 ≤ a ∧ 0 ≤ b ∧ a + b = 1 ∧ v₁ = a • u ∧ v₂ = b • u := ⟨v₁ + v₂, h.exists_eq_smul_add⟩
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_eq_smul
If vectors `v₁` and `v₂` are on the same ray, then they are nonnegative multiples of the same vector. Actually, this vector can be assumed to be `v₁ + v₂`, see `SameRay.exists_eq_smul_add`.
exists_pos_left_iff_sameRay (hx : x ≠ 0) (hy : y ≠ 0) : (∃ r : R, 0 < r ∧ r • x = y) ↔ SameRay R x y := by refine ⟨fun h => ?_, fun h => h.exists_pos_left hx hy⟩ rcases h with ⟨r, hr, rfl⟩ exact SameRay.sameRay_pos_smul_right x hr
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_pos_left_iff_sameRay
null
exists_pos_left_iff_sameRay_and_ne_zero (hx : x ≠ 0) : (∃ r : R, 0 < r ∧ r • x = y) ↔ SameRay R x y ∧ y ≠ 0 := by constructor · rintro ⟨r, hr, rfl⟩ simp [hx, hr.le, hr.ne'] · rintro ⟨hxy, hy⟩ exact (exists_pos_left_iff_sameRay hx hy).2 hxy
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_pos_left_iff_sameRay_and_ne_zero
null
exists_nonneg_left_iff_sameRay (hx : x ≠ 0) : (∃ r : R, 0 ≤ r ∧ r • x = y) ↔ SameRay R x y := by refine ⟨fun h => ?_, fun h => h.exists_nonneg_left hx⟩ rcases h with ⟨r, hr, rfl⟩ exact SameRay.sameRay_nonneg_smul_right x hr
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_nonneg_left_iff_sameRay
null
exists_pos_right_iff_sameRay (hx : x ≠ 0) (hy : y ≠ 0) : (∃ r : R, 0 < r ∧ x = r • y) ↔ SameRay R x y := by rw [SameRay.sameRay_comm] simp_rw [eq_comm (a := x)] exact exists_pos_left_iff_sameRay hy hx
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_pos_right_iff_sameRay
null
exists_pos_right_iff_sameRay_and_ne_zero (hy : y ≠ 0) : (∃ r : R, 0 < r ∧ x = r • y) ↔ SameRay R x y ∧ x ≠ 0 := by rw [SameRay.sameRay_comm] simp_rw [eq_comm (a := x)] exact exists_pos_left_iff_sameRay_and_ne_zero hy
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_pos_right_iff_sameRay_and_ne_zero
null
exists_nonneg_right_iff_sameRay (hy : y ≠ 0) : (∃ r : R, 0 ≤ r ∧ x = r • y) ↔ SameRay R x y := by rw [SameRay.sameRay_comm] simp_rw [eq_comm (a := x)] exact exists_nonneg_left_iff_sameRay (R := R) hy
theorem
LinearAlgebra
[ "Mathlib.Algebra.BigOperators.Fin", "Mathlib.Algebra.Order.Module.Algebra", "Mathlib.Algebra.Ring.Subring.Units", "Mathlib.LinearAlgebra.LinearIndependent.Defs", "Mathlib.Tactic.LinearCombination", "Mathlib.Tactic.Module", "Mathlib.Tactic.Positivity.Basic" ]
Mathlib/LinearAlgebra/Ray.lean
exists_nonneg_right_iff_sameRay
null
preReflection : End R M := LinearMap.id - f.smulRight x
def
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
preReflection
Given an element `x` in a module `M` and a linear form `f` on `M`, we define the endomorphism of `M` for which `y ↦ y - (f y) • x`. One is typically interested in this endomorphism when `f x = 2`; this definition exists to allow the user defer discharging this proof obligation. See also `Module.reflection`.
preReflection_apply : preReflection x f y = y - (f y) • x := by simp [preReflection] variable {x f}
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
preReflection_apply
null
preReflection_apply_self (h : f x = 2) : preReflection x f x = - x := by rw [preReflection_apply, h, two_smul]; abel
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
preReflection_apply_self
null
involutive_preReflection (h : f x = 2) : Involutive (preReflection x f) := fun y ↦ by simp [map_sub, h, two_smul, preReflection_apply]
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
involutive_preReflection
null
preReflection_preReflection (g : Dual R M) (h : f x = 2) : preReflection (preReflection x f y) (preReflection f (Dual.eval R M x) g) = (preReflection x f) ∘ₗ (preReflection y g) ∘ₗ (preReflection x f) := by ext m simp only [h, preReflection_apply, mul_comm (g x) (f m), mul_two, mul_assoc, Dual.eval_apply, LinearMap.sub_apply, LinearMap.coe_comp, LinearMap.smul_apply, smul_eq_mul, smul_sub, sub_smul, smul_smul, sub_mul, comp_apply, map_sub, map_smul, add_smul] abel
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
preReflection_preReflection
null
reflection (h : f x = 2) : M ≃ₗ[R] M := { preReflection x f, (involutive_preReflection h).toPerm with }
def
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection
Given an element `x` in a module `M` and a linear form `f` on `M` for which `f x = 2`, we define the endomorphism of `M` for which `y ↦ y - (f y) • x`. It is an involutive endomorphism of `M` fixing the kernel of `f` for which `x ↦ -x`.
reflection_apply (h : f x = 2) : reflection h y = y - (f y) • x := preReflection_apply x f y @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_apply
null
reflection_apply_self (h : f x = 2) : reflection h x = - x := preReflection_apply_self h
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_apply_self
null
involutive_reflection (h : f x = 2) : Involutive (reflection h) := involutive_preReflection h @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
involutive_reflection
null
reflection_inv (h : f x = 2) : (reflection h)⁻¹ = reflection h := rfl @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_inv
null
reflection_symm (h : f x = 2) : (reflection h).symm = reflection h := rfl
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_symm
null
invOn_reflection_of_mapsTo {Φ : Set M} (h : f x = 2) : InvOn (reflection h) (reflection h) Φ Φ := ⟨fun x _ ↦ involutive_reflection h x, fun x _ ↦ involutive_reflection h x⟩
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
invOn_reflection_of_mapsTo
null
bijOn_reflection_of_mapsTo {Φ : Set M} (h : f x = 2) (h' : MapsTo (reflection h) Φ Φ) : BijOn (reflection h) Φ Φ := (invOn_reflection_of_mapsTo h).bijOn h' h'
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
bijOn_reflection_of_mapsTo
null
_root_.Submodule.mem_invtSubmodule_reflection_of_mem (h : f x = 2) (p : Submodule R M) (hx : x ∈ p) : p ∈ End.invtSubmodule (reflection h) := by suffices ∀ y ∈ p, reflection h y ∈ p from (End.mem_invtSubmodule _).mpr fun y hy ↦ by simpa using this y hy intro y hy simpa only [reflection_apply, p.sub_mem_iff_right hy] using p.smul_mem (f y) hx
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
_root_.Submodule.mem_invtSubmodule_reflection_of_mem
null
_root_.Submodule.mem_invtSubmodule_reflection_iff [NeZero (2 : R)] [NoZeroSMulDivisors R M] (h : f x = 2) {p : Submodule R M} (hp : Disjoint p (R ∙ x)) : p ∈ End.invtSubmodule (reflection h) ↔ p ≤ LinearMap.ker f := by refine ⟨fun h' y hy ↦ ?_, fun h' y hy ↦ ?_⟩ · have hx : x ≠ 0 := by rintro rfl; exact two_ne_zero (α := R) <| by simp [← h] suffices f y • x ∈ p by have aux : f y • x ∈ p ⊓ (R ∙ x) := ⟨this, Submodule.mem_span_singleton.mpr ⟨f y, rfl⟩⟩ rw [hp.eq_bot, Submodule.mem_bot, smul_eq_zero] at aux exact aux.resolve_right hx specialize h' hy simp only [Submodule.mem_comap, LinearEquiv.coe_coe, reflection_apply] at h' simpa using p.sub_mem h' hy · have hy' : f y = 0 := by simpa using h' hy simpa [reflection_apply, hy'] /-! ### Powers of the product of two reflections Let $M$ be a module over a commutative ring $R$. Let $x, y \in M$ and $f, g \in M^*$ with $f(x) = g(y) = 2$. The corresponding reflections $r_1, r_2 \colon M \to M$ (`Module.reflection`) are given by $r_1z = z - f(z) x$ and $r_2 z = z - g(z) y$. These are linear automorphisms of $M$. To define reflection representations of a Coxeter group, it is important to be able to compute the order of the composition $r_1 r_2$. Note that if $M$ is a real inner product space and $r_1$ and $r_2$ are both orthogonal reflections (i.e. $f(z) = 2 \langle x, z \rangle / \langle x, x \rangle$ and $g(z) = 2 \langle y, z\rangle / \langle y, y\rangle$ for all $z \in M$), then $r_1 r_2$ is a rotation by the angle $$\cos^{-1}\left(\frac{f(y) g(x) - 2}{2}\right)$$ and one may determine the order of $r_1 r_2$ accordingly. However, if $M$ does not have an inner product, and even if $R$ is not $\mathbb{R}$, then we may instead use the formulas in this section. These formulas all involve evaluating Chebyshev $S$-polynomials (`Polynomial.Chebyshev.S`) at $t = f(y) g(x) - 2$, and they hold over any commutative ring. -/
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
_root_.Submodule.mem_invtSubmodule_reflection_iff
null
reflection_mul_reflection_pow_apply (m : ℕ) (z : M) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : ((reflection hf * reflection hg) ^ m) z = z + ((S R ((m - 2) / 2)).eval t * ((S R ((m - 1) / 2)).eval t + (S R ((m - 3) / 2)).eval t)) • ((g x * f z - g z) • y - f z • x) + ((S R ((m - 1) / 2)).eval t * ((S R (m / 2)).eval t + (S R ((m - 2) / 2)).eval t)) • ((f y * g z - f z) • x - g z • y) := by induction m with | zero => simp | succ m ih => /- Now, let us collect two facts about the evaluations of `S r k`. These easily follow from the properties of the `S` polynomials. -/ have S_eval_t_sub_two (k : ℤ) : (S R (k - 2)).eval t = t * (S R (k - 1)).eval t - (S R k).eval t := by simp [S_sub_two] have S_eval_t_sq_add_S_eval_t_sq (k : ℤ) : (S R k).eval t ^ 2 + (S R (k + 1)).eval t ^ 2 - t * (S R k).eval t * (S R (k + 1)).eval t = 1 := by simpa using congr_arg (Polynomial.eval t) (S_sq_add_S_sq R k) rw [pow_succ', LinearEquiv.mul_apply, ih, LinearEquiv.mul_apply] simp only [reflection_apply, map_add, map_sub, map_smul, hf, hg] push_cast rw [← Int.mul_ediv_add_emod m 2] set k : ℤ := m / 2 set e : ℤ := m % 2 simp_rw [add_assoc (2 * k), add_sub_assoc (2 * k), add_comm (2 * k), add_mul_ediv_left _ k (by simp : (2 : ℤ) ≠ 0)] have he : e = 0 ∨ e = 1 := by omega clear_value e /- Now, equate the coefficients on both sides. These linear combinations were found using `polyrith`. -/ match_scalars · rfl · linear_combination (norm := skip) (-g z * f y * (S R (e - 1 + k)).eval t + f z * (S R (e - 1 + k)).eval t) * S_eval_t_sub_two (e + k) + (-g z * f y + f z) * S_eval_t_sq_add_S_eval_t_sq (k - 1) subst ht obtain rfl | rfl : e = 0 ∨ e = 1 := he <;> ring_nf · linear_combination (norm := skip) g z * (S R (e - 1 + k)).eval t * S_eval_t_sub_two (e + k) + g z * S_eval_t_sq_add_S_eval_t_sq (k - 1) subst ht obtain rfl | rfl : e = 0 ∨ e = 1 := he <;> ring_nf
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_pow_apply
A formula for $(r_1 r_2)^m z$, where $m$ is a natural number and $z \in M$.
reflection_mul_reflection_pow (m : ℕ) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : ((reflection hf * reflection hg) ^ m).toLinearMap = LinearMap.id (R := R) (M := M) + ((S R ((m - 2) / 2)).eval t * ((S R ((m - 1) / 2)).eval t + (S R ((m - 3) / 2)).eval t)) • ((g x • f - g).smulRight y - f.smulRight x) + ((S R ((m - 1) / 2)).eval t * ((S R (m / 2)).eval t + (S R ((m - 2) / 2)).eval t)) • ((f y • g - f).smulRight x - g.smulRight y) := by ext z simpa using reflection_mul_reflection_pow_apply hf hg m z t ht
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_pow
A formula for $(r_1 r_2)^m$, where $m$ is a natural number.
reflection_mul_reflection_zpow_apply (m : ℤ) (z : M) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : ((reflection hf * reflection hg) ^ m) z = z + ((S R ((m - 2) / 2)).eval t * ((S R ((m - 1) / 2)).eval t + (S R ((m - 3) / 2)).eval t)) • ((g x * f z - g z) • y - f z • x) + ((S R ((m - 1) / 2)).eval t * ((S R (m / 2)).eval t + (S R ((m - 2) / 2)).eval t)) • ((f y * g z - f z) • x - g z • y) := by induction m using Int.negInduction with | nat m => exact_mod_cast reflection_mul_reflection_pow_apply hf hg m z t ht | neg _ m => have ht' : t = g x * f y - 2 := by rwa [mul_comm (g x)] rw [zpow_neg, ← inv_zpow, mul_inv_rev, reflection_inv, reflection_inv, zpow_natCast, reflection_mul_reflection_pow_apply hg hf m z t ht', add_right_comm z] have aux (a b : ℤ) (hab : a + b = -3 := by omega) : a / 2 = -(b / 2) - 2 := by omega rw [aux (-m - 3) m, aux (-m - 2) (m - 1), aux (-m - 1) (m - 2), aux (-m) (m - 3)] simp only [S_neg_sub_two, Polynomial.eval_neg] ring_nf
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_zpow_apply
A formula for $(r_1 r_2)^m z$, where $m$ is an integer and $z \in M$.
reflection_mul_reflection_zpow (m : ℤ) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : ((reflection hf * reflection hg) ^ m).toLinearMap = LinearMap.id (R := R) (M := M) + ((S R ((m - 2) / 2)).eval t * ((S R ((m - 1) / 2)).eval t + (S R ((m - 3) / 2)).eval t)) • ((g x • f - g).smulRight y - f.smulRight x) + ((S R ((m - 1) / 2)).eval t * ((S R (m / 2)).eval t + (S R ((m - 2) / 2)).eval t)) • ((f y • g - f).smulRight x - g.smulRight y) := by ext z simpa using reflection_mul_reflection_zpow_apply hf hg m z t ht
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_zpow
A formula for $(r_1 r_2)^m$, where $m$ is an integer.
reflection_mul_reflection_zpow_apply_self (m : ℤ) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : ((reflection hf * reflection hg) ^ m) x = ((S R m).eval t + (S R (m - 1)).eval t) • x + ((S R (m - 1)).eval t * -g x) • y := by /- Even though this is a special case of `Module.reflection_mul_reflection_zpow_apply`, it is easier to prove it from scratch. -/ have S_eval_t_sub_two (k : ℤ) : (S R (k - 2)).eval t = (f y * g x - 2) * (S R (k - 1)).eval t - (S R k).eval t := by simp [S_sub_two, ht] induction m with | zero => simp | succ m ih => rw [add_comm (m : ℤ) 1, zpow_one_add, LinearEquiv.mul_apply, LinearEquiv.mul_apply, ih] simp only [reflection_apply, map_add, map_sub, map_smul, hf, hg] match_scalars · linear_combination (norm := ring_nf) -S_eval_t_sub_two (m + 1) · ring_nf | pred m ih => rw [sub_eq_add_neg (-m : ℤ) 1, add_comm (-m : ℤ) (-1), zpow_add, zpow_neg_one, mul_inv_rev, reflection_inv, reflection_inv, LinearEquiv.mul_apply, LinearEquiv.mul_apply, ih] simp only [reflection_apply, map_add, map_sub, map_smul, hf, hg] match_scalars · linear_combination (norm := ring_nf) -S_eval_t_sub_two (-m) · linear_combination (norm := ring_nf) g x * S_eval_t_sub_two (-m)
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_zpow_apply_self
A formula for $(r_1 r_2)^m x$, where $m$ is an integer. This is the special case of `Module.reflection_mul_reflection_zpow_apply` with $z = x$.
reflection_mul_reflection_pow_apply_self (m : ℕ) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : ((reflection hf * reflection hg) ^ m) x = ((S R m).eval t + (S R (m - 1)).eval t) • x + ((S R (m - 1)).eval t * -g x) • y := mod_cast reflection_mul_reflection_zpow_apply_self hf hg m t ht
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_pow_apply_self
A formula for $(r_1 r_2)^m x$, where $m$ is a natural number. This is the special case of `Module.reflection_mul_reflection_pow_apply` with $z = x$.
reflection_mul_reflection_mul_reflection_zpow_apply_self (m : ℤ) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : (reflection hg * (reflection hf * reflection hg) ^ m) x = ((S R m).eval t + (S R (m - 1)).eval t) • x + ((S R m).eval t * -g x) • y := by rw [LinearEquiv.mul_apply, reflection_mul_reflection_zpow_apply_self hf hg m t ht] simp only [reflection_apply, map_add, map_smul, hg] module
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_mul_reflection_zpow_apply_self
A formula for $r_2 (r_1 r_2)^m x$, where $m$ is an integer.
reflection_mul_reflection_mul_reflection_pow_apply_self (m : ℕ) (t : R := f y * g x - 2) (ht : t = f y * g x - 2 := by rfl) : (reflection hg * (reflection hf * reflection hg) ^ m) x = ((S R m).eval t + (S R (m - 1)).eval t) • x + ((S R m).eval t * -g x) • y := mod_cast reflection_mul_reflection_mul_reflection_zpow_apply_self hf hg m t ht
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_mul_reflection_mul_reflection_pow_apply_self
A formula for $r_2 (r_1 r_2)^m x$, where $m$ is a natural number.
Dual.eq_of_preReflection_mapsTo [CharZero R] [NoZeroSMulDivisors R M] {x : M} {Φ : Set M} (hΦ₁ : Φ.Finite) (hΦ₂ : span R Φ = ⊤) {f g : Dual R M} (hf₁ : f x = 2) (hf₂ : MapsTo (preReflection x f) Φ Φ) (hg₁ : g x = 2) (hg₂ : MapsTo (preReflection x g) Φ Φ) : f = g := by have hx : x ≠ 0 := by rintro rfl; simp at hf₁ let u := reflection hg₁ * reflection hf₁ have hu : u = LinearMap.id (R := R) (M := M) + (f - g).smulRight x := by ext y simp only [u, reflection_apply, hg₁, two_smul, LinearEquiv.coe_toLinearMap_mul, LinearMap.id_coe, LinearEquiv.coe_coe, Module.End.mul_apply, LinearMap.add_apply, id_eq, LinearMap.coe_smulRight, LinearMap.sub_apply, map_sub, map_smul, sub_add_cancel_left, smul_neg, sub_neg_eq_add, sub_smul] abel replace hu : ∀ (n : ℕ), ↑(u ^ n) = LinearMap.id (R := R) (M := M) + (n : R) • (f - g).smulRight x := by intro n induction n with | zero => simp | succ n ih => have : ((f - g).smulRight x).comp ((n : R) • (f - g).smulRight x) = 0 := by ext; simp [hf₁, hg₁] rw [pow_succ', LinearEquiv.coe_toLinearMap_mul, ih, hu, add_mul, mul_add, mul_add] simp_rw [Module.End.mul_eq_comp, LinearMap.comp_id, LinearMap.id_comp, this, add_zero, add_assoc, Nat.cast_succ, add_smul, one_smul] suffices IsOfFinOrder u by obtain ⟨n, hn₀, hn₁⟩ := isOfFinOrder_iff_pow_eq_one.mp this replace hn₁ : (↑(u ^ n) : M →ₗ[R] M) = LinearMap.id := LinearEquiv.toLinearMap_inj.mpr hn₁ simpa [hn₁, hn₀.ne', hx, sub_eq_zero] using hu n exact u.isOfFinOrder_of_finite_of_span_eq_top_of_mapsTo hΦ₁ hΦ₂ (hg₂.comp hf₂)
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
Dual.eq_of_preReflection_mapsTo
See also `Module.Dual.eq_of_preReflection_mapsTo'` for a variant of this lemma which applies when `Φ` does not span. This rather technical-looking lemma exists because it is exactly what is needed to establish various uniqueness results for root data / systems. One might regard this lemma as lying at the boundary of linear algebra and combinatorics since the finiteness assumption is the key.
Dual.eq_of_preReflection_mapsTo' [CharZero R] [NoZeroSMulDivisors R M] {x : M} {Φ : Set M} (hΦ₁ : Φ.Finite) (hx : x ∈ span R Φ) {f g : Dual R M} (hf₁ : f x = 2) (hf₂ : MapsTo (preReflection x f) Φ Φ) (hg₁ : g x = 2) (hg₂ : MapsTo (preReflection x g) Φ Φ) : (span R Φ).subtype.dualMap f = (span R Φ).subtype.dualMap g := by set Φ' : Set (span R Φ) := range (inclusion <| Submodule.subset_span (R := R) (s := Φ)) rw [← finite_coe_iff] at hΦ₁ have hΦ'₁ : Φ'.Finite := finite_range (inclusion Submodule.subset_span) have hΦ'₂ : span R Φ' = ⊤ := by simp only [Φ'] rw [range_inclusion] simp let x' : span R Φ := ⟨x, hx⟩ have this : ∀ {F : Dual R M}, MapsTo (preReflection x F) Φ Φ → MapsTo (preReflection x' ((span R Φ).subtype.dualMap F)) Φ' Φ' := by intro F hF ⟨y, hy⟩ hy' simp only [Φ'] at hy' ⊢ rw [range_inclusion] at hy' simp only [SetLike.coe_sort_coe, mem_setOf_eq] at hy' ⊢ rw [range_inclusion] exact hF hy' exact eq_of_preReflection_mapsTo hΦ'₁ hΦ'₂ hf₁ (this hf₂) hg₁ (this hg₂) variable {y} variable {g : Dual R M}
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
Dual.eq_of_preReflection_mapsTo'
This rather technical-looking lemma exists because it is exactly what is needed to establish a uniqueness result for root data. See the doc string of `Module.Dual.eq_of_preReflection_mapsTo` for further remarks.
reflection_reflection_iterate (hfx : f x = 2) (hgy : g y = 2) (hgxfy : f y * g x = 4) (n : ℕ) : ((reflection hgy).trans (reflection hfx))^[n] y = y + n • (f y • x - (2 : R) • y) := by induction n with | zero => simp | succ n ih => have hz : ∀ z : M, f y • g x • z = 2 • 2 • z := by intro z rw [smul_smul, hgxfy, smul_smul, ← Nat.cast_smul_eq_nsmul R (2 * 2), show 2 * 2 = 4 from rfl, Nat.cast_ofNat] simp only [iterate_succ', comp_apply, ih, two_smul, smul_sub, smul_add, map_add, LinearEquiv.trans_apply, reflection_apply_self, map_neg, reflection_apply, neg_sub, map_sub, map_nsmul, map_smul, smul_neg, hz, add_smul] abel
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
reflection_reflection_iterate
Composite of reflections in "parallel" hyperplanes is a shear (special case).
infinite_range_reflection_reflection_iterate_iff [NoZeroSMulDivisors ℤ M] (hfx : f x = 2) (hgy : g y = 2) (hgxfy : f y * g x = 4) : (range <| fun n ↦ ((reflection hgy).trans (reflection hfx))^[n] y).Infinite ↔ f y • x ≠ (2 : R) • y := by simp only [reflection_reflection_iterate hfx hgy hgxfy, infinite_range_add_nsmul_iff, sub_ne_zero]
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
infinite_range_reflection_reflection_iterate_iff
null
eq_of_mapsTo_reflection_of_mem [NoZeroSMulDivisors ℤ M] {Φ : Set M} (hΦ : Φ.Finite) (hfx : f x = 2) (hgy : g y = 2) (hgx : g x = 2) (hfy : f y = 2) (hxfΦ : MapsTo (preReflection x f) Φ Φ) (hygΦ : MapsTo (preReflection y g) Φ Φ) (hyΦ : y ∈ Φ) : x = y := by suffices h : f y • x = (2 : R) • y by rw [hfy, two_smul R x, two_smul R y, ← two_zsmul, ← two_zsmul] at h exact smul_right_injective _ two_ne_zero h rw [← not_infinite] at hΦ contrapose! hΦ apply ((infinite_range_reflection_reflection_iterate_iff hfx hgy (by rw [hfy, hgx]; norm_cast)).mpr hΦ).mono rw [range_subset_iff] intro n rw [← IsFixedPt.image_iterate ((bijOn_reflection_of_mapsTo hfx hxfΦ).comp (bijOn_reflection_of_mapsTo hgy hygΦ)).image_eq n] exact mem_image_of_mem _ hyΦ
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
eq_of_mapsTo_reflection_of_mem
null
injOn_dualMap_subtype_span_range_range {ι : Type*} [NoZeroSMulDivisors ℤ M] {r : ι ↪ M} {c : ι → Dual R M} (hfin : (range r).Finite) (h_two : ∀ i, c i (r i) = 2) (h_mapsTo : ∀ i, MapsTo (preReflection (r i) (c i)) (range r) (range r)) : InjOn (span R (range r)).subtype.dualMap (range c) := by rintro - ⟨i, rfl⟩ - ⟨j, rfl⟩ hij congr suffices ∀ k, c i (r k) = c j (r k) by rw [← EmbeddingLike.apply_eq_iff_eq r] exact eq_of_mapsTo_reflection_of_mem (f := c i) (g := c j) hfin (h_two i) (h_two j) (by rw [← this, h_two]) (by rw [this, h_two]) (h_mapsTo i) (h_mapsTo j) (mem_range_self j) intro k simpa using LinearMap.congr_fun hij ⟨r k, Submodule.subset_span (mem_range_self k)⟩
lemma
LinearAlgebra
[ "Mathlib.Algebra.EuclideanDomain.Basic", "Mathlib.Algebra.EuclideanDomain.Int", "Mathlib.Algebra.Module.LinearMap.Basic", "Mathlib.Algebra.Module.Submodule.Invariant", "Mathlib.Algebra.Module.Torsion", "Mathlib.GroupTheory.OrderOfElement", "Mathlib.LinearAlgebra.Dual.Defs", "Mathlib.LinearAlgebra.Fini...
Mathlib/LinearAlgebra/Reflection.lean
injOn_dualMap_subtype_span_range_range
null
IsSemisimple := IsSemisimpleModule R[X] (AEval' f)
def
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple
A linear endomorphism of an `R`-module `M` is called *semisimple* if the induced `R[X]`-module structure on `M` is semisimple. This is equivalent to saying that every `f`-invariant `R`-submodule of `M` has an `f`-invariant complement: see `Module.End.isSemisimple_iff`.
IsFinitelySemisimple : Prop := ∀ p (hp : p ∈ invtSubmodule f), Module.Finite R p → IsSemisimple (LinearMap.restrict f hp) variable {f}
def
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsFinitelySemisimple
A weaker version of semisimplicity that only prescribes behaviour on finitely-generated submodules.
isSemisimple_iff' : f.IsSemisimple ↔ ∀ p : invtSubmodule f, ∃ q : invtSubmodule f, IsCompl p q := by rw [IsSemisimple, isSemisimpleModule_iff, (AEval.mapSubmodule R M f).symm.complementedLattice_iff, complementedLattice_iff] rfl
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isSemisimple_iff'
A linear endomorphism is semisimple if every invariant submodule has in invariant complement. See also `Module.End.isSemisimple_iff`.
isSemisimple_iff : f.IsSemisimple ↔ ∀ p ∈ invtSubmodule f, ∃ q ∈ invtSubmodule f, IsCompl p q := by simp [isSemisimple_iff']
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isSemisimple_iff
null
isSemisimple_restrict_iff (p) (hp : p ∈ invtSubmodule f) : IsSemisimple (LinearMap.restrict f hp) ↔ ∀ q ∈ f.invtSubmodule, q ≤ p → ∃ r ≤ p, r ∈ f.invtSubmodule ∧ Disjoint q r ∧ q ⊔ r = p := by let e : Submodule R[X] (AEval' (f.restrict hp)) ≃o Iic (AEval.mapSubmodule R M f ⟨p, hp⟩) := (Submodule.orderIsoMapComap <| AEval.restrict_equiv_mapSubmodule f p hp).trans (Submodule.mapIic _) simp_rw [IsSemisimple, isSemisimpleModule_iff, e.complementedLattice_iff, disjoint_iff, ← (OrderIso.Iic _ _).complementedLattice_iff, Iic.complementedLattice_iff, Subtype.forall, Subtype.exists, Subtype.mk_le_mk, Sublattice.mk_inf_mk, Sublattice.mk_sup_mk, Subtype.mk.injEq, exists_and_left, exists_and_right, invtSubmodule.mk_eq_bot_iff, exists_prop, and_assoc] rfl
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isSemisimple_restrict_iff
null
isFinitelySemisimple_iff' : f.IsFinitelySemisimple ↔ ∀ p (hp : p ∈ invtSubmodule f), Module.Finite R p → IsSemisimple (LinearMap.restrict f hp) := Iff.rfl
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isFinitelySemisimple_iff'
A linear endomorphism is finitely semisimple if it is semisimple on every finitely-generated invariant submodule. See also `Module.End.isFinitelySemisimple_iff`.
isFinitelySemisimple_iff : f.IsFinitelySemisimple ↔ ∀ p ∈ invtSubmodule f, Module.Finite R p → ∀ q ∈ invtSubmodule f, q ≤ p → ∃ r, r ≤ p ∧ r ∈ invtSubmodule f ∧ Disjoint q r ∧ q ⊔ r = p := by simp_rw [isFinitelySemisimple_iff', isSemisimple_restrict_iff] @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isFinitelySemisimple_iff
A characterisation of `Module.End.IsFinitelySemisimple` using only the lattice of submodules of `M` (thus avoiding submodules of submodules).
isSemisimple_zero [IsSemisimpleModule R M] : IsSemisimple (0 : Module.End R M) := by simpa [isSemisimple_iff] using exists_isCompl @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isSemisimple_zero
null
isSemisimple_id [IsSemisimpleModule R M] : IsSemisimple (LinearMap.id : Module.End R M) := by simpa [isSemisimple_iff] using exists_isCompl @[simp] lemma isSemisimple_neg : (-f).IsSemisimple ↔ f.IsSemisimple := by simp [isSemisimple_iff, mem_invtSubmodule] variable (f) in
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isSemisimple_id
null
protected _root_.LinearEquiv.isSemisimple_iff {M₂ : Type*} [AddCommGroup M₂] [Module R M₂] (g : End R M₂) (e : M ≃ₗ[R] M₂) (he : e ∘ₗ f = g ∘ₗ e) : f.IsSemisimple ↔ g.IsSemisimple := by let e : AEval' f ≃ₗ[R[X]] AEval' g := LinearEquiv.ofAEval _ (e.trans (AEval'.of g)) fun x ↦ by simpa [AEval'.X_smul_of] using LinearMap.congr_fun he x simp_rw [IsSemisimple, isSemisimpleModule_iff, (Submodule.orderIsoMapComap e).complementedLattice_iff]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
_root_.LinearEquiv.isSemisimple_iff
null
eq_zero_of_isNilpotent_isSemisimple (hn : IsNilpotent f) (hs : f.IsSemisimple) : f = 0 := by have ⟨n, h0⟩ := hn rw [← aeval_X (R := R) f]; rw [← aeval_X_pow (R := R) f] at h0 rw [← RingHom.mem_ker, ← AEval.annihilator_eq_ker_aeval (M := M)] at h0 ⊢ exact hs.annihilator_isRadical _ _ ⟨n, h0⟩
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
eq_zero_of_isNilpotent_isSemisimple
null
eq_zero_of_isNilpotent_of_isFinitelySemisimple (hn : IsNilpotent f) (hs : IsFinitelySemisimple f) : f = 0 := by have (p) (hp₁ : p ∈ f.invtSubmodule) (hp₂ : Module.Finite R p) : f.restrict hp₁ = 0 := by specialize hs p hp₁ hp₂ replace hn : IsNilpotent (f.restrict hp₁) := isNilpotent.restrict hp₁ hn exact eq_zero_of_isNilpotent_isSemisimple hn hs ext x obtain ⟨k : ℕ, hk : f ^ k = 0⟩ := hn let p := Submodule.span R {(f ^ i) x | (i : ℕ) (_ : i ≤ k)} have hp₁ : p ∈ f.invtSubmodule := by simp only [mem_invtSubmodule, p, Submodule.span_le] rintro - ⟨i, hi, rfl⟩ apply Submodule.subset_span rcases lt_or_eq_of_le hi with hik | rfl · exact ⟨i + 1, hik, by simpa [Module.End.pow_apply] using iterate_succ_apply' f i x⟩ · exact ⟨i, by simp [hk]⟩ have hp₂ : Module.Finite R p := by let g : ℕ → M := fun i ↦ (f ^ i) x have hg : {(f ^ i) x | (i : ℕ) (_ : i ≤ k)} = g '' Iic k := by ext; simp [g] exact Module.Finite.span_of_finite _ <| hg ▸ toFinite (g '' Iic k) simpa [LinearMap.restrict_apply, Subtype.ext_iff] using LinearMap.congr_fun (this p hp₁ hp₂) ⟨x, Submodule.subset_span ⟨0, k.zero_le, rfl⟩⟩ @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
eq_zero_of_isNilpotent_of_isFinitelySemisimple
null
isSemisimple_sub_algebraMap_iff {μ : R} : (f - algebraMap R (End R M) μ).IsSemisimple ↔ f.IsSemisimple := by suffices ∀ p : Submodule R M, p ≤ p.comap (f - algebraMap R (Module.End R M) μ) ↔ p ≤ p.comap f by simp [mem_invtSubmodule, isSemisimple_iff, this] refine fun p ↦ ⟨fun h x hx ↦ ?_, fun h x hx ↦ p.sub_mem (h hx) (p.smul_mem μ hx)⟩ simpa using p.add_mem (h hx) (p.smul_mem μ hx)
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isSemisimple_sub_algebraMap_iff
null
IsSemisimple.restrict {p : Submodule R M} (hp : p ∈ f.invtSubmodule) (hf : f.IsSemisimple) : IsSemisimple (f.restrict hp) := by rw [IsSemisimple] at hf ⊢ let e : Submodule R[X] (AEval' (LinearMap.restrict f hp)) ≃o Iic (AEval.mapSubmodule R M f ⟨p, hp⟩) := (Submodule.orderIsoMapComap <| AEval.restrict_equiv_mapSubmodule f p hp).trans <| Submodule.mapIic _ exact (isSemisimpleModule_iff ..).mpr (e.complementedLattice_iff.mpr inferInstance)
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.restrict
null
IsSemisimple.isFinitelySemisimple (hf : f.IsSemisimple) : f.IsFinitelySemisimple := isFinitelySemisimple_iff'.mp fun _ _ _ ↦ hf.restrict _ @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.isFinitelySemisimple
null
isFinitelySemisimple_iff_isSemisimple [Module.Finite R M] : f.IsFinitelySemisimple ↔ f.IsSemisimple := by refine ⟨fun hf ↦ isSemisimple_iff.mpr fun p hp ↦ ?_, IsSemisimple.isFinitelySemisimple⟩ obtain ⟨q, -, hq₁, hq₂, hq₃⟩ := isFinitelySemisimple_iff.mp hf ⊤ (invtSubmodule.top_mem f) inferInstance p hp le_top exact ⟨q, hq₁, hq₂, codisjoint_iff.mpr hq₃⟩ @[simp]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isFinitelySemisimple_iff_isSemisimple
null
isFinitelySemisimple_sub_algebraMap_iff {μ : R} : (f - algebraMap R (End R M) μ).IsFinitelySemisimple ↔ f.IsFinitelySemisimple := by suffices ∀ p : Submodule R M, p ≤ p.comap (f - algebraMap R (Module.End R M) μ) ↔ p ≤ p.comap f by simp_rw [isFinitelySemisimple_iff, mem_invtSubmodule, this] refine fun p ↦ ⟨fun h x hx ↦ ?_, fun h x hx ↦ p.sub_mem (h hx) (p.smul_mem μ hx)⟩ simpa using p.add_mem (h hx) (p.smul_mem μ hx)
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isFinitelySemisimple_sub_algebraMap_iff
null
IsFinitelySemisimple.restrict {p : Submodule R M} (hp : p ∈ f.invtSubmodule) (hf : f.IsFinitelySemisimple) : IsFinitelySemisimple (f.restrict hp) := by intro q hq₁ hq₂ have := invtSubmodule.map_subtype_mem_of_mem_invtSubmodule f hp hq₁ let e : q ≃ₗ[R] q.map p.subtype := p.equivSubtypeMap q rw [e.isSemisimple_iff ((LinearMap.restrict f hp).restrict hq₁) (LinearMap.restrict f this) rfl] exact hf _ this (Finite.map q p.subtype)
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsFinitelySemisimple.restrict
null
IsSemisimple_smul_iff {t : K} (ht : t ≠ 0) : (t • f).IsSemisimple ↔ f.IsSemisimple := by simp [isSemisimple_iff, mem_invtSubmodule, Submodule.comap_smul f (h := ht)]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple_smul_iff
null
IsSemisimple_smul (t : K) (h : f.IsSemisimple) : (t • f).IsSemisimple := by wlog ht : t ≠ 0; · simp [not_not.mp ht] rwa [IsSemisimple_smul_iff ht]
lemma
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple_smul
null
isSemisimple_of_squarefree_aeval_eq_zero {p : K[X]} (hp : Squarefree p) (hpf : aeval f p = 0) : f.IsSemisimple := by rw [← RingHom.mem_ker, ← AEval.annihilator_eq_ker_aeval (M := M), mem_annihilator, ← IsTorsionBy, ← isTorsionBySet_singleton_iff, isTorsionBySet_iff_is_torsion_by_span] at hpf let R := K[X] ⧸ Ideal.span {p} have : IsReduced R := (Ideal.isRadical_iff_quotient_reduced _).mp (isRadical_iff_span_singleton.mp hp.isRadical) have : FiniteDimensional K R := (AdjoinRoot.powerBasis hp.ne_zero).finite have : IsArtinianRing R := .of_finite K R have : IsSemisimpleRing R := IsArtinianRing.isSemisimpleRing_of_isReduced R letI : Module R (AEval' f) := Module.IsTorsionBySet.module hpf let e : AEval' f →ₛₗ[Ideal.Quotient.mk (Ideal.span {p})] AEval' f := { AddMonoidHom.id _ with map_smul' := fun _ _ ↦ rfl } exact (e.isSemisimpleModule_iff_of_bijective bijective_id).mpr inferInstance variable [FiniteDimensional K M]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
isSemisimple_of_squarefree_aeval_eq_zero
null
IsSemisimple.minpoly_squarefree : Squarefree (minpoly K f) := IsRadical.squarefree (minpoly.ne_zero <| Algebra.IsIntegral.isIntegral _) <| by rw [isRadical_iff_span_singleton, span_minpoly_eq_annihilator]; exact hf.annihilator_isRadical
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.minpoly_squarefree
The minimal polynomial of a semisimple endomorphism is square free
protected IsSemisimple.aeval (p : K[X]) : (aeval f p).IsSemisimple := let R := K[X] ⧸ Ideal.span {minpoly K f} have : Module.Finite K R := (AdjoinRoot.powerBasis' <| minpoly.monic <| Algebra.IsIntegral.isIntegral f).finite have : IsReduced R := (Ideal.isRadical_iff_quotient_reduced _).mp <| span_minpoly_eq_annihilator K f ▸ hf.annihilator_isRadical isSemisimple_of_squarefree_aeval_eq_zero ((minpoly.isRadical K _).squarefree <| minpoly.ne_zero <| .of_finite K <| Ideal.Quotient.mkₐ K (.span {minpoly K f}) p) <| by rw [← Ideal.Quotient.liftₐ_comp (.span {minpoly K f}) (aeval f) fun a h ↦ by rwa [Ideal.span, ← minpoly.ker_aeval_eq_span_minpoly] at h, aeval_algHom, AlgHom.comp_apply, AlgHom.comp_apply, ← aeval_algHom_apply, minpoly.aeval, map_zero]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.aeval
null
IsSemisimple.of_mem_adjoin_singleton {a : End K M} (ha : a ∈ Algebra.adjoin K {f}) : a.IsSemisimple := by rw [Algebra.adjoin_singleton_eq_range_aeval] at ha; obtain ⟨p, rfl⟩ := ha; exact .aeval hf _
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.of_mem_adjoin_singleton
null
protected IsSemisimple.pow (n : ℕ) : (f ^ n).IsSemisimple := .of_mem_adjoin_singleton hf (pow_mem (Algebra.self_mem_adjoin_singleton _ _) _)
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.pow
null
IsSemisimple.of_mem_adjoin_pair {a : End K M} (ha : a ∈ Algebra.adjoin K {f, g}) : a.IsSemisimple := by let R := K[X] ⧸ Ideal.span {minpoly K f} let S := AdjoinRoot ((minpoly K g).map <| algebraMap K R) have : Module.Finite K R := (AdjoinRoot.powerBasis' <| minpoly.monic <| Algebra.IsIntegral.isIntegral f).finite have : Module.Finite R S := (AdjoinRoot.powerBasis' <| (minpoly.monic <| Algebra.IsIntegral.isIntegral g).map _).finite have : Module.Finite K S := .trans R S have : IsArtinianRing R := .of_finite K R have : IsReduced R := (Ideal.isRadical_iff_quotient_reduced _).mp <| span_minpoly_eq_annihilator K f ▸ hf.annihilator_isRadical have : IsReduced S := by simp_rw [S, AdjoinRoot, ← Ideal.isRadical_iff_quotient_reduced, ← isRadical_iff_span_singleton] exact (PerfectField.separable_iff_squarefree.mpr hg.minpoly_squarefree).map.squarefree.isRadical let φ : S →ₐ[K] End K M := Ideal.Quotient.liftₐ _ (eval₂AlgHom' (Ideal.Quotient.liftₐ _ (aeval f) fun a ↦ ?_) g ?_) ((Ideal.span_singleton_le_iff_mem _).mpr ?_ : _ ≤ RingHom.ker _) rotate_left 1 · rw [Ideal.span, ← minpoly.ker_aeval_eq_span_minpoly]; exact id · rintro ⟨p⟩; exact p.induction_on (fun k ↦ by simp [R, Algebra.commute_algebraMap_left]) (fun p q hp hq ↦ by simpa [R] using hp.add_left hq) fun n k ↦ by simpa [R, pow_succ, ← mul_assoc _ _ X] using (·.mul_left comm) · simpa only [RingHom.mem_ker, eval₂AlgHom'_apply, eval₂_map, AlgHom.comp_algebraMap_of_tower] using minpoly.aeval K g have : Algebra.adjoin K {f, g} ≤ φ.range := Algebra.adjoin_le fun x ↦ by rintro (hx | hx) <;> rw [hx] · exact ⟨AdjoinRoot.of _ (AdjoinRoot.root _), (eval₂_C _ _).trans (aeval_X f)⟩ · exact ⟨AdjoinRoot.root _, eval₂_X _ _⟩ obtain ⟨p, rfl⟩ := (AlgHom.mem_range _).mp (this ha) refine isSemisimple_of_squarefree_aeval_eq_zero ((minpoly.isRadical K p).squarefree <| minpoly.ne_zero <| .of_finite K p) ?_ rw [aeval_algHom, φ.comp_apply, minpoly.aeval, map_zero]
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.of_mem_adjoin_pair
null
IsSemisimple.add_of_commute : (f + g).IsSemisimple := .of_mem_adjoin_pair comm hf hg <| add_mem (Algebra.subset_adjoin <| .inl rfl) (Algebra.subset_adjoin <| .inr rfl)
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.add_of_commute
null
IsSemisimple.sub_of_commute : (f - g).IsSemisimple := .of_mem_adjoin_pair comm hf hg <| sub_mem (Algebra.subset_adjoin <| .inl rfl) (Algebra.subset_adjoin <| .inr rfl)
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.sub_of_commute
null
IsSemisimple.mul_of_commute : (f * g).IsSemisimple := .of_mem_adjoin_pair comm hf hg <| mul_mem (Algebra.subset_adjoin <| .inl rfl) (Algebra.subset_adjoin <| .inr rfl)
theorem
LinearAlgebra
[ "Mathlib.Algebra.Module.Torsion", "Mathlib.FieldTheory.Perfect", "Mathlib.LinearAlgebra.AnnihilatingPolynomial", "Mathlib.RingTheory.Artinian.Instances", "Mathlib.RingTheory.Ideal.Quotient.Nilpotent", "Mathlib.RingTheory.SimpleModule.Basic" ]
Mathlib/LinearAlgebra/Semisimple.lean
IsSemisimple.mul_of_commute
null
IsOrtho (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) (x : M₁) (y : M₂) : Prop := B x y = 0
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrtho
The proposition that two elements of a sesquilinear map space are orthogonal
isOrtho_def {B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M} {x y} : B.IsOrtho x y ↔ B x y = 0 := Iff.rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isOrtho_def
null
isOrtho_zero_left (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) (x) : IsOrtho B (0 : M₁) x := by dsimp only [IsOrtho] rw [map_zero B, zero_apply]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isOrtho_zero_left
null
isOrtho_zero_right (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] M) (x) : IsOrtho B x (0 : M₂) := map_zero (B x)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isOrtho_zero_right
null
isOrtho_flip {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M} {x y} : B.IsOrtho x y ↔ B.flip.IsOrtho y x := by simp_rw [isOrtho_def, flip_apply] open scoped Function in -- required for scoped `on` notation
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isOrtho_flip
null
IsOrthoᵢ (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M) (v : n → M₁) : Prop := Pairwise (B.IsOrtho on v)
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsOrthoᵢ
A set of vectors `v` is orthogonal with respect to some bilinear map `B` if and only if for all `i ≠ j`, `B (v i) (v j) = 0`. For orthogonality between two elements, use `BilinForm.isOrtho`
isOrthoᵢ_def {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M} {v : n → M₁} : B.IsOrthoᵢ v ↔ ∀ i j : n, i ≠ j → B (v i) (v j) = 0 := Iff.rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isOrthoᵢ_def
null
isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] M) {v : n → M₁} : B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by simp_rw [isOrthoᵢ_def] constructor <;> exact fun h i j hij ↦ h j i hij.symm
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isOrthoᵢ_flip
null
ortho_smul_left {B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] V} {x y} {a : K₁} (ha : a ≠ 0) : IsOrtho B x y ↔ IsOrtho B (a • x) y := by dsimp only [IsOrtho] constructor <;> intro H · rw [map_smulₛₗ₂, H, smul_zero] · rw [map_smulₛₗ₂, smul_eq_zero] at H rcases H with H | H · rw [map_eq_zero I₁] at H trivial · exact H
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
ortho_smul_left
null
ortho_smul_right {B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] V} {x y} {a : K₂} {ha : a ≠ 0} : IsOrtho B x y ↔ IsOrtho B x (a • y) := by dsimp only [IsOrtho] constructor <;> intro H · rw [map_smulₛₗ, H, smul_zero] · rw [map_smulₛₗ, smul_eq_zero] at H rcases H with H | H · simp only [map_eq_zero] at H exfalso exact ha H · exact H
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
ortho_smul_right
null
linearIndependent_of_isOrthoᵢ {B : V₁ →ₛₗ[I₁] V₁ →ₛₗ[I₁'] V} {v : n → V₁} (hv₁ : B.IsOrthoᵢ v) (hv₂ : ∀ i, ¬B.IsOrtho (v i) (v i)) : LinearIndependent K₁ v := by classical rw [linearIndependent_iff'] intro s w hs i hi have : B (s.sum fun i : n ↦ w i • v i) (v i) = 0 := by rw [hs, map_zero, zero_apply] have hsum : (s.sum fun j : n ↦ I₁ (w j) • B (v j) (v i)) = I₁ (w i) • B (v i) (v i) := by apply Finset.sum_eq_single_of_mem i hi intro j _hj hij rw [isOrthoᵢ_def.1 hv₁ _ _ hij, smul_zero] simp_rw [B.map_sum₂, map_smulₛₗ₂, hsum] at this apply (map_eq_zero I₁).mp exact (smul_eq_zero.mp this).elim _root_.id (hv₂ i · |>.elim)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
linearIndependent_of_isOrthoᵢ
A set of orthogonal vectors `v` with respect to some sesquilinear map `B` is linearly independent if for all `i`, `B (v i) (v i) ≠ 0`.
IsRefl (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M) : Prop := ∀ x y, B x y = 0 → B y x = 0
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsRefl
The proposition that a sesquilinear map is reflexive
eq_zero : ∀ {x y}, B x y = 0 → B y x = 0 := fun {x y} ↦ H x y
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
eq_zero
null
eq_iff {x y} : B x y = 0 ↔ B y x = 0 := ⟨H x y, H y x⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
eq_iff
null
ortho_comm {x y} : IsOrtho B x y ↔ IsOrtho B y x := ⟨eq_zero H, eq_zero H⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
ortho_comm
null
domRestrict (p : Submodule R₁ M₁) : (B.domRestrict₁₂ p p).IsRefl := fun _ _ ↦ by simp_rw [domRestrict₁₂_apply] exact H _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
domRestrict
null
@[simp] flip_isRefl_iff : B.flip.IsRefl ↔ B.IsRefl := ⟨fun h x y H ↦ h y x ((B.flip_apply _ _).trans H), fun h x y ↦ h y x⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
flip_isRefl_iff
null
ker_flip_eq_bot (H : B.IsRefl) (h : LinearMap.ker B = ⊥) : LinearMap.ker B.flip = ⊥ := by refine ker_eq_bot'.mpr fun _ hx ↦ ker_eq_bot'.mp h _ ?_ ext exact H _ _ (LinearMap.congr_fun hx _)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
ker_flip_eq_bot
null
ker_eq_bot_iff_ker_flip_eq_bot (H : B.IsRefl) : LinearMap.ker B = ⊥ ↔ LinearMap.ker B.flip = ⊥ := by refine ⟨ker_flip_eq_bot H, fun h ↦ ?_⟩ exact (congr_arg _ B.flip_flip.symm).trans (ker_flip_eq_bot (flip_isRefl_iff.mpr H) h)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
ker_eq_bot_iff_ker_flip_eq_bot
null
IsSymm (B : M →ₛₗ[I] M →ₗ[R] R) : Prop where protected eq : ∀ x y, I (B x y) = B y x
structure
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsSymm
The proposition that a sesquilinear form is symmetric
isSymm_def {B : M →ₛₗ[I] M →ₗ[R] R} : B.IsSymm ↔ ∀ x y, I (B x y) = B y x := ⟨fun ⟨h⟩ ↦ h, fun h ↦ ⟨h⟩⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isSymm_def
null
isRefl (H : B.IsSymm) : B.IsRefl := fun x y H1 ↦ by rw [← H.eq] simp [H1]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isRefl
null
ortho_comm (H : B.IsSymm) {x y} : IsOrtho B x y ↔ IsOrtho B y x := H.isRefl.ortho_comm
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
ortho_comm
null
domRestrict (H : B.IsSymm) (p : Submodule R M) : (B.domRestrict₁₂ p p).IsSymm where eq _ _ := by simp_rw [domRestrict₁₂_apply] exact H.eq _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
domRestrict
null
@[simp] isSymm_zero : (0 : M →ₛₗ[I] M →ₗ[R] R).IsSymm := ⟨fun _ _ => map_zero _⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isSymm_zero
null
BilinMap.isSymm_iff_eq_flip {N : Type*} [AddCommMonoid N] [Module R N] {B : LinearMap.BilinMap R M N} : (∀ x y, B x y = B y x) ↔ B = B.flip := by simp [LinearMap.ext_iff₂]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
BilinMap.isSymm_iff_eq_flip
null
isSymm_iff_eq_flip {B : LinearMap.BilinForm R M} : B.IsSymm ↔ B = B.flip := isSymm_def.trans BilinMap.isSymm_iff_eq_flip
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isSymm_iff_eq_flip
null
IsAlt (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] M) : Prop := ∀ x, B x x = 0 variable (H : B.IsAlt) include H
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAlt
The proposition that a sesquilinear map is alternating
IsAlt.self_eq_zero (x : M₁) : B x x = 0 := H x
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAlt.self_eq_zero
null
IsAlt.eq_of_add_add_eq_zero [IsCancelAdd M] {a b c : M₁} (hAdd : a + b + c = 0) : B a b = B b c := by have : B a a + B a b + B a c = B a c + B b c + B c c := by simp_rw [← map_add, ← map_add₂, hAdd, map_zero, LinearMap.zero_apply] rw [H, H, zero_add, add_zero, add_comm] at this exact add_left_cancel this
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
IsAlt.eq_of_add_add_eq_zero
null
neg (H : B.IsAlt) (x y : M₁) : -B x y = B y x := by have H1 : B (y + x) (y + x) = 0 := self_eq_zero H (y + x) simpa [map_add, self_eq_zero H, add_eq_zero_iff_neg_eq] using H1
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
neg
null
isRefl (H : B.IsAlt) : B.IsRefl := by intro x y h rw [← neg H, h, neg_zero]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
isRefl
null
ortho_comm (H : B.IsAlt) {x y} : IsOrtho B x y ↔ IsOrtho B y x := H.isRefl.ortho_comm
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Basis.Basic", "Mathlib.LinearAlgebra.BilinearMap", "Mathlib.LinearAlgebra.LinearIndependent.Lemmas" ]
Mathlib/LinearAlgebra/SesquilinearForm.lean
ortho_comm
null