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
@[simp] coe_add (D1 D2 : Derivation R A M) : ⇑(D1 + D2) = D1 + D2 := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_add
null
coe_add_linearMap (D1 D2 : Derivation R A M) : ↑(D1 + D2) = (D1 + D2 : A →ₗ[R] M) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_add_linearMap
null
add_apply : (D1 + D2) a = D1 a + D2 a := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
add_apply
null
@[simp] coe_smul (r : S) (D : Derivation R A M) : ⇑(r • D) = r • ⇑D := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_smul
null
coe_smul_linearMap (r : S) (D : Derivation R A M) : ↑(r • D) = r • (D : A →ₗ[R] M) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_smul_linearMap
null
smul_apply (r : S) (D : Derivation R A M) : (r • D) a = r • D a := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
smul_apply
null
coeFnAddMonoidHom : Derivation R A M →+ A → M where toFun := (⇑) map_zero' := coe_zero map_add' := coe_add @[simp]
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coeFnAddMonoidHom
`coeFn` as an `AddMonoidHom`.
coeFnAddMonoidHom_apply (D : Derivation R A M) : coeFnAddMonoidHom D = D := rfl
lemma
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coeFnAddMonoidHom_apply
null
instModule {S : Type*} [Semiring S] [Module S M] [SMulCommClass R S M] [SMulCommClass S A M] : Module S (Derivation R A M) := Function.Injective.module S coeFnAddMonoidHom coe_injective coe_smul
instance
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
instModule
null
_root_.LinearMap.compDer : Derivation R A M →ₗ[R] Derivation R A N where toFun D := { toLinearMap := (f : M →ₗ[R] N).comp (D : A →ₗ[R] M) map_one_eq_zero' := by simp only [LinearMap.comp_apply, coeFn_coe, map_one_eq_zero, map_zero] leibniz' := fun a b => by simp only [coeFn_coe, LinearMap.comp_apply, LinearMap.map_add, leibniz, LinearMap.coe_restrictScalars, LinearMap.map_smul] } map_add' D₁ D₂ := by ext; exact LinearMap.map_add _ _ _ map_smul' r D := by dsimp; ext; exact LinearMap.map_smul (f : M →ₗ[R] N) _ _ @[simp]
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
_root_.LinearMap.compDer
We can push forward derivations using linear maps, i.e., the composition of a derivation with a linear map is a derivation. Furthermore, this operation is linear on the spaces of derivations.
coe_to_linearMap_comp : (f.compDer D : A →ₗ[R] N) = (f : M →ₗ[R] N).comp (D : A →ₗ[R] M) := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_to_linearMap_comp
null
coe_comp : (f.compDer D : A → N) = (f : M →ₗ[R] N).comp (D : A →ₗ[R] M) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_comp
null
@[simps] llcomp : (M →ₗ[A] N) →ₗ[A] Derivation R A M →ₗ[R] Derivation R A N where toFun f := f.compDer map_add' f₁ f₂ := by ext; rfl map_smul' r D := by ext; rfl
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
llcomp
The composition of a derivation with a linear map as a bilinear map
_root_.LinearEquiv.compDer : Derivation R A M ≃ₗ[R] Derivation R A N := { e.toLinearMap.compDer with invFun := e.symm.toLinearMap.compDer left_inv := fun D => by ext a; exact e.symm_apply_apply (D a) right_inv := fun D => by ext a; exact e.apply_symm_apply (D a) } @[simp]
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
_root_.LinearEquiv.compDer
Pushing a derivation forward through a linear equivalence is an equivalence.
linearEquiv_coe_to_linearMap_comp : (e.compDer D : A →ₗ[R] N) = (e.toLinearMap : M →ₗ[R] N).comp (D : A →ₗ[R] M) := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
linearEquiv_coe_to_linearMap_comp
null
linearEquiv_coe_comp : (e.compDer D : A → N) = (e.toLinearMap : M →ₗ[R] N).comp (D : A →ₗ[R] M) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
linearEquiv_coe_comp
null
@[simps!] compAlgebraMap [Algebra A B] [IsScalarTower R A B] [IsScalarTower A B M] (d : Derivation R B M) : Derivation R A M where map_one_eq_zero' := by simp leibniz' a b := by simp toLinearMap := d.toLinearMap.comp (IsScalarTower.toAlgHom R A B).toLinearMap
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
compAlgebraMap
For a tower `R → A → B` and an `R`-derivation `B → M`, we may compose with `A → B` to obtain an `R`-derivation `A → M`.
protected restrictScalars (d : Derivation S A M) : Derivation R A M where map_one_eq_zero' := d.map_one_eq_zero leibniz' := d.leibniz toLinearMap := d.toLinearMap.restrictScalars R
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
restrictScalars
If `A` is both an `R`-algebra and an `S`-algebra; `M` is both an `R`-module and an `S`-module, then an `S`-derivation `A → M` is also an `R`-derivation if it is also `R`-linear.
coe_restrictScalars (d : Derivation S A M) : ⇑(d.restrictScalars R) = ⇑d := rfl @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_restrictScalars
null
restrictScalars_apply (d : Derivation S A M) (x : A) : d.restrictScalars R x = d x := rfl
lemma
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
restrictScalars_apply
null
liftOfRightInverse {f : F} {f_inv : M → A} (hf : Function.RightInverse f_inv f) ⦃d : Derivation R A A⦄ (hd : ∀ x, f x = 0 → f (d x) = 0) : Derivation R M M where toFun x := f (d (f_inv x)) map_add' x y := by suffices f (d (f_inv (x + y) - (f_inv x + f_inv y))) = 0 by simpa [sub_eq_zero] apply hd simp [hf _] map_smul' x y := by suffices f (d (f_inv (x • y) - x • f_inv y)) = 0 by simpa [sub_eq_zero] apply hd simp [hf _] map_one_eq_zero' := by suffices f (d (f_inv 1 - 1)) = 0 by simpa [sub_eq_zero] apply hd simp [hf _] leibniz' x y := by suffices f (d (f_inv (x * y) - f_inv x * f_inv y)) = 0 by simpa [sub_eq_zero, hf _] apply hd simp [hf _] @[simp]
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
liftOfRightInverse
Lift a derivation via an algebra homomorphism `f` with a right inverse such that `f(x) = 0 → f(d(x)) = 0`. This gives the derivation `f ∘ d ∘ f⁻¹`. This is needed for an argument in [Rosenlicht, M. Integration in finite terms][Rosenlicht_1972].
liftOfRightInverse_apply {f : F} {f_inv : M → A} (hf : Function.RightInverse f_inv f) {d : Derivation R A A} (hd : ∀ x, f x = 0 → f (d x) = 0) (x : A) : Derivation.liftOfRightInverse hf hd (f x) = f (d x) := by suffices f (d (f_inv (f x) - x)) = 0 by simpa [sub_eq_zero] apply hd simp [hf _]
lemma
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
liftOfRightInverse_apply
null
liftOfRightInverse_eq {f : F} {f_inv₁ f_inv₂ : M → A} (hf₁ : Function.RightInverse f_inv₁ f) (hf₂ : Function.RightInverse f_inv₂ f) : liftOfRightInverse hf₁ = liftOfRightInverse hf₂ := by ext _ _ x obtain ⟨x, rfl⟩ := hf₁.surjective x simp
lemma
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
liftOfRightInverse_eq
null
noncomputable liftOfSurjective {f : F} (hf : Function.Surjective f) ⦃d : Derivation R A A⦄ (hd : ∀ x, f x = 0 → f (d x) = 0) : Derivation R M M := d.liftOfRightInverse (Function.rightInverse_surjInv hf) hd
abbrev
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
liftOfSurjective
A noncomputable version of `liftOfRightInverse` for surjective homomorphisms.
liftOfSurjective_apply {f : F} (hf : Function.Surjective f) {d : Derivation R A A} (hd : ∀ x, f x = 0 → f (d x) = 0) (x : A) : Derivation.liftOfSurjective hf hd (f x) = f (d x) := by simp
lemma
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
liftOfSurjective_apply
null
mk' (D : A →ₗ[R] M) (h : ∀ a b, D (a * b) = a • D b + b • D a) : Derivation R A M where toLinearMap := D map_one_eq_zero' := (add_eq_left (a := D 1)).1 <| by simpa only [one_smul, one_mul] using (h 1 1).symm leibniz' := h @[simp]
def
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
mk'
Define `Derivation R A M` from a linear map when `M` is cancellative by verifying the Leibniz rule.
coe_mk' (D : A →ₗ[R] M) (h) : ⇑(mk' D h) = D := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_mk'
null
coe_mk'_linearMap (D : A →ₗ[R] M) (h) : (mk' D h : A →ₗ[R] M) = D := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_mk'_linearMap
null
protected map_neg : D (-a) = -D a := map_neg D a
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
map_neg
null
protected map_sub : D (a - b) = D a - D b := map_sub D a b @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
map_sub
null
map_intCast (n : ℤ) : D (n : A) = 0 := by rw [← zsmul_one, D.map_smul_of_tower n, map_one_eq_zero, smul_zero]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
map_intCast
null
leibniz_of_mul_eq_one {a b : A} (h : a * b = 1) : D a = -a ^ 2 • D b := by rw [neg_smul] refine eq_neg_of_add_eq_zero_left ?_ calc D a + a ^ 2 • D b = a • b • D a + a • a • D b := by simp only [smul_smul, h, one_smul, sq] _ = a • D (a * b) := by rw [leibniz, smul_add, add_comm] _ = 0 := by rw [h, map_one_eq_zero, smul_zero]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
leibniz_of_mul_eq_one
null
leibniz_invOf [Invertible a] : D (⅟a) = -⅟a ^ 2 • D a := D.leibniz_of_mul_eq_one <| invOf_mul_self a
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
leibniz_invOf
null
leibniz_inv (a : K) : D a⁻¹ = -a⁻¹ ^ 2 • D a := by rcases eq_or_ne a 0 with (rfl | ha) · simp · exact D.leibniz_of_mul_eq_one (inv_mul_cancel₀ ha)
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
leibniz_inv
null
leibniz_div (a b : K) : D (a / b) = b⁻¹ ^ 2 • (b • D a - a • D b) := by simp only [div_eq_mul_inv, leibniz, leibniz_inv, inv_pow, neg_smul, smul_neg, smul_smul, add_comm, sub_eq_add_neg, smul_add] rw [← inv_mul_mul_self b⁻¹, inv_inv] ring_nf
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
leibniz_div
null
leibniz_div_const (a b : K) (h : D b = 0) : D (a / b) = b⁻¹ • D a := by simp only [leibniz_div, inv_pow, h, smul_zero, sub_zero, smul_smul] rw [← mul_self_mul_inv b⁻¹, inv_inv] ring_nf
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
leibniz_div_const
null
leibniz_zpow (a : K) (n : ℤ) : D (a ^ n) = n • a ^ (n - 1) • D a := by by_cases hn : n = 0 · simp [hn] by_cases ha : a = 0 · simp [ha, zero_zpow n hn] rcases Int.natAbs_eq n with h | h · rw [h] simp only [zpow_natCast, leibniz_pow, natCast_zsmul] rw [← zpow_natCast] congr cutsat · rw [h, zpow_neg, zpow_natCast, leibniz_inv, leibniz_pow, inv_pow, ← pow_mul, ← zpow_natCast, ← zpow_natCast, ← Nat.cast_smul_eq_nsmul K, ← Int.cast_smul_eq_zsmul K, smul_smul, smul_smul, smul_smul] trans (-n.natAbs * (a ^ ((n.natAbs - 1 : ℕ) : ℤ) / (a ^ ((n.natAbs * 2 : ℕ) : ℤ)))) • D a · ring_nf rw [← zpow_sub₀ ha] congr 3 · norm_cast cutsat
lemma
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
leibniz_zpow
null
@[simp] coe_neg (D : Derivation R A M) : ⇑(-D) = -D := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_neg
null
coe_neg_linearMap (D : Derivation R A M) : ↑(-D) = (-D : A →ₗ[R] M) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_neg_linearMap
null
neg_apply : (-D) a = -D a := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
neg_apply
null
@[simp] coe_sub (D1 D2 : Derivation R A M) : ⇑(D1 - D2) = D1 - D2 := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_sub
null
coe_sub_linearMap (D1 D2 : Derivation R A M) : ↑(D1 - D2) = (D1 - D2 : A →ₗ[R] M) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
coe_sub_linearMap
null
sub_apply : (D1 - D2) a = D1 a - D2 a := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Polynomial.AlgebraMap", "Mathlib.Algebra.Polynomial.Derivative" ]
Mathlib/RingTheory/Derivation/Basic.lean
sub_apply
null
@[ext] Differential (R : Type*) [CommRing R] where /-- The `Derivation` associated with the ring. -/ deriv : Derivation ℤ R R @[inherit_doc] scoped[Differential] postfix:max "′" => Differential.deriv open scoped Differential open Lean PrettyPrinter Delaborator SubExpr in
class
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
Differential
A derivation from a ring to itself, as a typeclass.
@[app_delab DFunLike.coe] delabDeriv : Delab := do let e ← getExpr guard <| e.isAppOfArity' ``DFunLike.coe 6 guard <| (e.getArg!' 4).isAppOf' ``Differential.deriv let arg ← withAppArg delab `($arg′)
def
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
delabDeriv
A delaborator for the x′ notation. This is required because it's not direct function application, so the default delaborator doesn't work.
DifferentialAlgebra (A B : Type*) [CommRing A] [CommRing B] [Algebra A B] [Differential A] [Differential B] : Prop where deriv_algebraMap : ∀ a : A, (algebraMap A B a)′ = algebraMap A B a′ export DifferentialAlgebra (deriv_algebraMap) @[norm_cast]
class
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
DifferentialAlgebra
A differential algebra is an `Algebra` where the derivation commutes with `algebraMap`.
algebraMap.coe_deriv {A : Type*} {B : Type*} [CommRing A] [CommRing B] [Algebra A B] [Differential A] [Differential B] [DifferentialAlgebra A B] (a : A) : (a′ : A) = (a : B)′ := (DifferentialAlgebra.deriv_algebraMap _).symm
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
algebraMap.coe_deriv
null
Differential.ContainConstants (A B : Type*) [CommRing A] [CommRing B] [Algebra A B] [Differential B] : Prop where /-- If the derivative of x is 0, then it's in the range of `algebraMap A B`. -/ protected mem_range_of_deriv_eq_zero {x : B} (h : x′ = 0) : x ∈ (algebraMap A B).range
class
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
Differential.ContainConstants
A differential ring `A` and an algebra over it `B` share constants if all constants in B are in the range of `algebraMap A B`.
mem_range_of_deriv_eq_zero (A : Type*) {B : Type*} [CommRing A] [CommRing B] [Algebra A B] [Differential B] [Differential.ContainConstants A B] {x : B} (h : x′ = 0) : x ∈ (algebraMap A B).range := Differential.ContainConstants.mem_range_of_deriv_eq_zero h
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
mem_range_of_deriv_eq_zero
null
@[reducible] Differential.equiv {R R₂ : Type*} [CommRing R] [CommRing R₂] [Differential R₂] (h : R ≃+* R₂) : Differential R := ⟨Derivation.mk' (h.symm.toAddMonoidHom.toIntLinearMap ∘ₗ Differential.deriv.toLinearMap ∘ₗ h.toAddMonoidHom.toIntLinearMap) (by simp)⟩
def
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
Differential.equiv
Transfer a `Differential` instance across a `RingEquiv`.
DifferentialAlgebra.equiv {A : Type*} [CommRing A] [Differential A] {R R₂ : Type*} [CommRing R] [CommRing R₂] [Differential R₂] [Algebra A R] [Algebra A R₂] [DifferentialAlgebra A R₂] (h : R ≃ₐ[A] R₂) : letI := Differential.equiv h.toRingEquiv DifferentialAlgebra A R := letI := Differential.equiv h.toRingEquiv ⟨fun a ↦ by change (LinearMap.comp ..) _ = _ simp only [AlgEquiv.toRingEquiv_eq_coe, RingHom.toAddMonoidHom_eq_coe, RingEquiv.toRingHom_eq_coe, AlgEquiv.toRingEquiv_toRingHom, LinearMap.coe_comp, AddMonoidHom.coe_toIntLinearMap, AddMonoidHom.coe_coe, RingHom.coe_coe, Derivation.coeFn_coe, Function.comp_apply, AlgEquiv.commutes, deriv_algebraMap] apply h.symm.commutes⟩
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/DifferentialRing.lean
DifferentialAlgebra.equiv
Transfer a `DifferentialAlgebra` instance across a `AlgEquiv`.
@[simp] commutator_coe_linear_map : ↑⁅D1, D2⁆ = ⁅(D1 : Module.End R A), (D2 : Module.End R A)⁆ := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Lie.OfAssociative", "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/Lie.lean
commutator_coe_linear_map
null
commutator_apply : ⁅D1, D2⁆ a = D1 (D2 a) - D2 (D1 a) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.Lie.OfAssociative", "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/Lie.lean
commutator_apply
null
instLieAlgebra : LieAlgebra R (Derivation R A A) := { Derivation.instModule with lie_smul := fun r d e => by ext a; simp only [commutator_apply, map_smul, smul_sub, smul_apply] }
instance
RingTheory
[ "Mathlib.Algebra.Lie.OfAssociative", "Mathlib.RingTheory.Derivation.Basic" ]
Mathlib/RingTheory/Derivation/Lie.lean
instLieAlgebra
null
mapCoeffs : Derivation R A[X] (PolynomialModule A M) where __ := (PolynomialModule.map A d.toLinearMap).comp PolynomialModule.equivPolynomial.symm.toLinearMap map_one_eq_zero' := show (Finsupp.single 0 1).mapRange (d : A → M) d.map_zero = 0 by simp leibniz' p q := by dsimp induction p using Polynomial.induction_on' with | add => simp only [add_mul, map_add, add_smul, smul_add, add_add_add_comm, *] | monomial n a => induction q using Polynomial.induction_on' with | add => simp only [mul_add, map_add, add_smul, smul_add, add_add_add_comm, *] | monomial m b => refine Finsupp.ext fun i ↦ ?_ dsimp [PolynomialModule.equivPolynomial, PolynomialModule.map] simp only [toFinsupp_mul, toFinsupp_monomial, AddMonoidAlgebra.single_mul_single] change d _ = _ + _ dsimp only [PolynomialModule, Finsupp.mapRange.linearMap_apply, coeFn_coe] rw [Finsupp.mapRange_single, Finsupp.mapRange_single] change _ = (_ • PolynomialModule.single A _ _) _ + (_ • PolynomialModule.single A _ _) i simp only [PolynomialModule.monomial_smul_single, AddMonoidAlgebra.single_apply, apply_ite d, leibniz, map_zero, PolynomialModule.single_apply, ite_add_zero, add_comm m n] @[simp]
def
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs
The `R`-derivation from `A[X]` to `M[X]` which applies the derivative to each of the coefficients.
mapCoeffs_apply (p : A[X]) (i) : d.mapCoeffs p i = d (coeff p i) := rfl @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs_apply
null
mapCoeffs_monomial (n : ℕ) (x : A) : d.mapCoeffs (monomial n x) = .single A n (d x) := Finsupp.ext fun _ ↦ by simp [coeff_monomial, apply_ite d, PolynomialModule.single_apply] @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs_monomial
null
mapCoeffs_X : d.mapCoeffs (X : A[X]) = 0 := by simp [← monomial_one_one_eq_X] @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs_X
null
mapCoeffs_C (x : A) : d.mapCoeffs (C x) = .single A 0 (d x) := by simp [← monomial_zero_left] variable {B M' : Type*} [CommRing B] [Algebra R B] [Algebra A B] [AddCommGroup M'] [Module B M'] [Module R M'] [Module A M']
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs_C
null
apply_aeval_eq' (d' : Derivation R B M') (f : M →ₗ[A] M') (h : ∀ a, f (d a) = d' (algebraMap A B a)) (x : B) (p : A[X]) : d' (aeval x p) = PolynomialModule.eval x (PolynomialModule.map B f (d.mapCoeffs p)) + aeval x (derivative p) • d' x := by induction p using Polynomial.induction_on' with | add => simp_all only [map_add, add_smul]; abel | monomial => simp only [aeval_monomial, leibniz, leibniz_pow, mapCoeffs_monomial, PolynomialModule.map_single, PolynomialModule.eval_single, derivative_monomial, map_mul, _root_.map_natCast, h] rw [add_comm, ← smul_smul, ← smul_smul, Nat.cast_smul_eq_nsmul]
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
apply_aeval_eq'
null
apply_aeval_eq [IsScalarTower R A B] [IsScalarTower A B M'] (d : Derivation R B M') (x : B) (p : A[X]) : d (aeval x p) = PolynomialModule.eval x ((d.compAlgebraMap A).mapCoeffs p) + aeval x (derivative p) • d x := by convert apply_aeval_eq' (d.compAlgebraMap A) d LinearMap.id _ x p · apply Finsupp.ext intro x rfl · intro a rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
apply_aeval_eq
null
apply_eval_eq (x : A) (p : A[X]) : d (eval x p) = PolynomialModule.eval x (d.mapCoeffs p) + eval x (derivative p) • d x := apply_aeval_eq d x p
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
apply_eval_eq
null
mapCoeffs : Derivation ℤ A[X] A[X] := PolynomialModule.equivPolynomialSelf.compDer Differential.deriv.mapCoeffs @[simp]
def
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs
A specialization of `Derivation.mapCoeffs` for the case of a differential ring.
coeff_mapCoeffs (p : A[X]) (i) : coeff (mapCoeffs p) i = (coeff p i)′ := rfl @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
coeff_mapCoeffs
null
mapCoeffs_monomial (n : ℕ) (x : A) : mapCoeffs (monomial n x) = monomial n x′ := by simp [mapCoeffs] @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs_monomial
null
mapCoeffs_X : mapCoeffs (X : A[X]) = 0 := by simp [← monomial_one_one_eq_X] @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs_X
null
mapCoeffs_C (x : A) : mapCoeffs (C x) = C x′ := by simp [← monomial_zero_left] variable {R : Type*} [CommRing R] [Differential R] [Algebra A R] [DifferentialAlgebra A R]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
mapCoeffs_C
null
deriv_aeval_eq (x : R) (p : A[X]) : (aeval x p)′ = aeval x (mapCoeffs p) + aeval x (derivative p) * x′ := by convert Derivation.apply_aeval_eq' Differential.deriv _ (Algebra.linearMap A R) .. · simp [mapCoeffs] · simp [deriv_algebraMap]
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
deriv_aeval_eq
null
implicitDeriv (v : A[X]) : Derivation ℤ A[X] A[X] := mapCoeffs + v • derivative'.restrictScalars ℤ @[simp]
def
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
implicitDeriv
The unique derivation which can be made to a `DifferentialAlgebra` on `A[X]` with `X′ = v`.
implicitDeriv_C (v : A[X]) (b : A) : implicitDeriv v (C b) = C b′ := by simp [implicitDeriv] @[simp]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
implicitDeriv_C
null
implicitDeriv_X (v : A[X]) : implicitDeriv v X = v := by simp [implicitDeriv]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
implicitDeriv_X
null
deriv_aeval_eq_implicitDeriv (x : R) (v : A[X]) (h : x′ = aeval x v) (p : A[X]) : (aeval x p)′ = aeval x (implicitDeriv v p) := by simp [deriv_aeval_eq, implicitDeriv, h, mul_comm] variable {R' : Type*} [CommRing R'] [Differential R'] [Algebra A R'] [DifferentialAlgebra A R'] variable [IsDomain R'] [Nontrivial R]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
deriv_aeval_eq_implicitDeriv
null
algHom_deriv (f : R →ₐ[A] R') (hf : Function.Injective f) (x : R) (h : IsSeparable A x) : f (x′) = (f x)′ := by let p := minpoly A x apply mul_left_cancel₀ (a := aeval (f x) (derivative p)) · rw [Polynomial.aeval_algHom] simp only [AlgHom.coe_comp, Function.comp_apply, ne_eq, map_eq_zero_iff f hf] apply Separable.aeval_derivative_ne_zero h (minpoly.aeval A x) conv => lhs; rw [Polynomial.aeval_algHom] simp only [AlgHom.coe_comp, Function.comp_apply, ← map_mul] apply add_left_cancel (a := aeval (f x) (mapCoeffs p)) rw [← deriv_aeval_eq] simp only [aeval_algHom, AlgHom.coe_comp, Function.comp_apply, ← map_add, ← deriv_aeval_eq, minpoly.aeval, map_zero, p] omit [Nontrivial R] in
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
algHom_deriv
null
algEquiv_deriv (f : R ≃ₐ[A] R') (x : R) (h : IsSeparable A x) : f (x′) = (f x)′ := haveI := f.nontrivial algHom_deriv f.toAlgHom f.injective x h variable [Algebra.IsSeparable A R]
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
algEquiv_deriv
null
algHom_deriv' (f : R →ₐ[A] R') (hf : Function.Injective f) (x : R) : f (x′) = (f x)′ := algHom_deriv f hf x (Algebra.IsSeparable.isSeparable' x) omit [Nontrivial R] in
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
algHom_deriv'
`algHom_deriv` in a separable algebra
algEquiv_deriv' (f : R ≃ₐ[A] R') (x : R) : f (x′) = (f x)′ := haveI := f.nontrivial algHom_deriv' f.toAlgHom f.injective x
lemma
RingTheory
[ "Mathlib.RingTheory.Derivation.DifferentialRing", "Mathlib.Algebra.Polynomial.Module.Basic", "Mathlib.Algebra.Polynomial.Derivation", "Mathlib.FieldTheory.Separable" ]
Mathlib/RingTheory/Derivation/MapCoeffs.lean
algEquiv_deriv'
`algEquiv_deriv` in a separable algebra
diffToIdealOfQuotientCompEq (f₁ f₂ : A →ₐ[R] B) (e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂) : A →ₗ[R] I := LinearMap.codRestrict (I.restrictScalars _) (f₁.toLinearMap - f₂.toLinearMap) (by intro x change f₁ x - f₂ x ∈ I rw [← Ideal.Quotient.eq, ← Ideal.Quotient.mkₐ_eq_mk R, ← AlgHom.comp_apply, e] rfl) @[simp]
def
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
diffToIdealOfQuotientCompEq
If `f₁ f₂ : A →ₐ[R] B` are two lifts of the same `A →ₐ[R] B ⧸ I`, we may define a map `f₁ - f₂ : A →ₗ[R] I`.
diffToIdealOfQuotientCompEq_apply (f₁ f₂ : A →ₐ[R] B) (e : (Ideal.Quotient.mkₐ R I).comp f₁ = (Ideal.Quotient.mkₐ R I).comp f₂) (x : A) : ((diffToIdealOfQuotientCompEq I f₁ f₂ e) x : B) = f₁ x - f₂ x := rfl variable [Algebra A B]
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
diffToIdealOfQuotientCompEq_apply
null
derivationToSquareZeroOfLift [IsScalarTower R A B] (hI : I ^ 2 = ⊥) (f : A →ₐ[R] B) (e : (Ideal.Quotient.mkₐ R I).comp f = IsScalarTower.toAlgHom R A (B ⧸ I)) : Derivation R A I := by refine { diffToIdealOfQuotientCompEq I f (IsScalarTower.toAlgHom R A B) ?_ with map_one_eq_zero' := ?_ leibniz' := ?_ } · rw [e]; ext; rfl · ext; simp · intro x y let F := diffToIdealOfQuotientCompEq I f (IsScalarTower.toAlgHom R A B) (by rw [e]; ext; rfl) have : (f x - algebraMap A B x) * (f y - algebraMap A B y) = 0 := by rw [← Ideal.mem_bot, ← hI, pow_two] convert Ideal.mul_mem_mul (F x).2 (F y).2 using 1 ext dsimp only [Submodule.coe_add, Submodule.coe_mk, LinearMap.coe_mk, diffToIdealOfQuotientCompEq_apply, Submodule.coe_smul_of_tower, IsScalarTower.coe_toAlgHom', LinearMap.toFun_eq_coe] simp only [map_mul, sub_mul, mul_sub, Algebra.smul_def] at this ⊢ rw [sub_eq_iff_eq_add, sub_eq_iff_eq_add] at this simp only [this] ring variable (hI : I ^ 2 = ⊥)
def
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
derivationToSquareZeroOfLift
Given a tower of algebras `R → A → B`, and a square-zero `I : Ideal B`, each lift `A →ₐ[R] B` of the canonical map `A →ₐ[R] B ⧸ I` corresponds to an `R`-derivation from `A` to `I`.
derivationToSquareZeroOfLift_apply [IsScalarTower R A B] (f : A →ₐ[R] B) (e : (Ideal.Quotient.mkₐ R I).comp f = IsScalarTower.toAlgHom R A (B ⧸ I)) (x : A) : (derivationToSquareZeroOfLift I hI f e x : B) = f x - algebraMap A B x := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
derivationToSquareZeroOfLift_apply
null
@[simps -isSimp] liftOfDerivationToSquareZero [IsScalarTower R A B] (hI : I ^ 2 = ⊥) (f : Derivation R A I) : A →ₐ[R] B := { ((I.restrictScalars R).subtype.comp f.toLinearMap + (IsScalarTower.toAlgHom R A B).toLinearMap : A →ₗ[R] B) with toFun := fun x => f x + algebraMap A B x map_one' := by rw [map_one (algebraMap _ _), f.map_one_eq_zero, Submodule.coe_zero, zero_add] map_mul' := fun x y => by have : (f x : B) * f y = 0 := by rw [← Ideal.mem_bot, ← hI, pow_two] convert Ideal.mul_mem_mul (f x).2 (f y).2 using 1 simp only [map_mul, f.leibniz, add_mul, mul_add, Submodule.coe_add, Submodule.coe_smul_of_tower, Algebra.smul_def, this] ring commutes' := fun r => by simp only [Derivation.map_algebraMap, zero_add, Submodule.coe_zero, ← IsScalarTower.algebraMap_apply R A B r] map_zero' := ((I.restrictScalars R).subtype.comp f.toLinearMap + (IsScalarTower.toAlgHom R A B).toLinearMap).map_zero }
def
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
liftOfDerivationToSquareZero
Given a tower of algebras `R → A → B`, and a square-zero `I : Ideal B`, each `R`-derivation from `A` to `I` corresponds to a lift `A →ₐ[R] B` of the canonical map `A →ₐ[R] B ⧸ I`.
liftOfDerivationToSquareZero_mk_apply [IsScalarTower R A B] (d : Derivation R A I) (x : A) : Ideal.Quotient.mk I (liftOfDerivationToSquareZero I hI d x) = algebraMap A (B ⧸ I) x := by rw [liftOfDerivationToSquareZero_apply, map_add, Ideal.Quotient.eq_zero_iff_mem.mpr (d x).prop, zero_add] rfl @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
liftOfDerivationToSquareZero_mk_apply
null
liftOfDerivationToSquareZero_mk_apply' (d : Derivation R A I) (x : A) : (Ideal.Quotient.mk I) (d x) + (algebraMap A (B ⧸ I)) x = algebraMap A (B ⧸ I) x := by simp only [Ideal.Quotient.eq_zero_iff_mem.mpr (d x).prop, zero_add]
theorem
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
liftOfDerivationToSquareZero_mk_apply'
null
@[simps!] derivationToSquareZeroEquivLift [IsScalarTower R A B] : Derivation R A I ≃ { f : A →ₐ[R] B // (Ideal.Quotient.mkₐ R I).comp f = IsScalarTower.toAlgHom R A (B ⧸ I) } := by refine ⟨fun d => ⟨liftOfDerivationToSquareZero I hI d, ?_⟩, fun f => (derivationToSquareZeroOfLift I hI f.1 f.2 :), ?_, ?_⟩ · ext x; exact liftOfDerivationToSquareZero_mk_apply I hI d x · intro d; ext x; exact add_sub_cancel_right (d x : B) (algebraMap A B x) · rintro ⟨f, hf⟩; ext x; exact sub_add_cancel (f x) (algebraMap A B x)
def
RingTheory
[ "Mathlib.RingTheory.Derivation.Basic", "Mathlib.RingTheory.Ideal.Quotient.Operations" ]
Mathlib/RingTheory/Derivation/ToSquareZero.lean
derivationToSquareZeroEquivLift
Given a tower of algebras `R → A → B`, and a square-zero `I : Ideal B`, there is a 1-1 correspondence between `R`-derivations from `A` to `I` and lifts `A →ₐ[R] B` of the canonical map `A →ₐ[R] B ⧸ I`.
IsDiscreteValuationRing (R : Type u) [CommRing R] [IsDomain R] : Prop extends IsPrincipalIdealRing R, IsLocalRing R where not_a_field' : maximalIdeal R ≠ ⊥
class
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
IsDiscreteValuationRing
An integral domain is a *discrete valuation ring* (DVR) if it's a local PID which is not a field.
not_a_field : maximalIdeal R ≠ ⊥ := not_a_field'
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
not_a_field
null
not_isField : ¬IsField R := IsLocalRing.isField_iff_maximalIdeal_eq.not.mpr (not_a_field R) variable {R} open PrincipalIdealRing
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
not_isField
A discrete valuation ring `R` is not a field.
irreducible_of_span_eq_maximalIdeal {R : Type*} [CommSemiring R] [IsLocalRing R] [IsDomain R] (ϖ : R) (hϖ : ϖ ≠ 0) (h : maximalIdeal R = Ideal.span {ϖ}) : Irreducible ϖ := by have h2 : ¬IsUnit ϖ := show ϖ ∈ maximalIdeal R from h.symm ▸ Submodule.mem_span_singleton_self ϖ refine ⟨h2, ?_⟩ intro a b hab by_contra! h obtain ⟨ha : a ∈ maximalIdeal R, hb : b ∈ maximalIdeal R⟩ := h rw [h, mem_span_singleton'] at ha hb rcases ha with ⟨a, rfl⟩ rcases hb with ⟨b, rfl⟩ rw [show a * ϖ * (b * ϖ) = ϖ * (ϖ * (a * b)) by ring] at hab apply hϖ apply eq_zero_of_mul_eq_self_right _ hab.symm exact fun hh => h2 (isUnit_of_dvd_one ⟨_, hh.symm⟩)
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
irreducible_of_span_eq_maximalIdeal
null
irreducible_iff_uniformizer (ϖ : R) : Irreducible ϖ ↔ maximalIdeal R = Ideal.span {ϖ} := ⟨fun hϖ => (eq_maximalIdeal (isMaximal_of_irreducible hϖ)).symm, fun h => irreducible_of_span_eq_maximalIdeal ϖ (fun e => not_a_field R <| by rwa [h, span_singleton_eq_bot]) h⟩
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
irreducible_iff_uniformizer
An element of a DVR is irreducible iff it is a uniformizer, that is, generates the maximal ideal of `R`.
_root_.Irreducible.maximalIdeal_eq {ϖ : R} (h : Irreducible ϖ) : maximalIdeal R = Ideal.span {ϖ} := (irreducible_iff_uniformizer _).mp h variable (R)
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
_root_.Irreducible.maximalIdeal_eq
null
exists_irreducible : ∃ ϖ : R, Irreducible ϖ := by simp_rw [irreducible_iff_uniformizer] exact (IsPrincipalIdealRing.principal <| maximalIdeal R).principal
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
exists_irreducible
Uniformizers exist in a DVR.
exists_prime : ∃ ϖ : R, Prime ϖ := (exists_irreducible R).imp fun _ => irreducible_iff_prime.1
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
exists_prime
Uniformizers exist in a DVR.
iff_pid_with_one_nonzero_prime (R : Type u) [CommRing R] [IsDomain R] : IsDiscreteValuationRing R ↔ IsPrincipalIdealRing R ∧ ∃! P : Ideal R, P ≠ ⊥ ∧ IsPrime P := by constructor · intro RDVR rcases id RDVR with ⟨Rlocal⟩ constructor · assumption use IsLocalRing.maximalIdeal R constructor · exact ⟨Rlocal, inferInstance⟩ · rintro Q ⟨hQ1, hQ2⟩ obtain ⟨q, rfl⟩ := (IsPrincipalIdealRing.principal Q).1 have hq : q ≠ 0 := by rintro rfl apply hQ1 simp rw [submodule_span_eq, span_singleton_prime hq] at hQ2 replace hQ2 := hQ2.irreducible rw [irreducible_iff_uniformizer] at hQ2 exact hQ2.symm · rintro ⟨RPID, Punique⟩ haveI : IsLocalRing R := IsLocalRing.of_unique_nonzero_prime Punique refine { not_a_field' := ?_ } rcases Punique with ⟨P, ⟨hP1, hP2⟩, _⟩ have hPM : P ≤ maximalIdeal R := le_maximalIdeal hP2.1 intro h rw [h, le_bot_iff] at hPM exact hP1 hPM
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
iff_pid_with_one_nonzero_prime
An integral domain is a DVR iff it's a PID with a unique non-zero prime ideal.
associated_of_irreducible {a b : R} (ha : Irreducible a) (hb : Irreducible b) : Associated a b := by rw [irreducible_iff_uniformizer] at ha hb rw [← span_singleton_eq_span_singleton, ← ha, hb] variable (R : Type*)
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
associated_of_irreducible
null
HasUnitMulPowIrreducibleFactorization [CommRing R] : Prop := ∃ p : R, Irreducible p ∧ ∀ {x : R}, x ≠ 0 → ∃ n : ℕ, Associated (p ^ n) x
def
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
HasUnitMulPowIrreducibleFactorization
Alternative characterisation of discrete valuation rings.
unique_irreducible (hR : HasUnitMulPowIrreducibleFactorization R) ⦃p q : R⦄ (hp : Irreducible p) (hq : Irreducible q) : Associated p q := by rcases hR with ⟨ϖ, hϖ, hR⟩ suffices ∀ {p : R} (_ : Irreducible p), Associated p ϖ by apply Associated.trans (this hp) (this hq).symm clear hp hq p q intro p hp obtain ⟨n, hn⟩ := hR hp.ne_zero have : Irreducible (ϖ ^ n) := hn.symm.irreducible hp rcases lt_trichotomy n 1 with (H | rfl | H) · obtain rfl : n = 0 := by clear hn this revert H n decide simp [not_irreducible_one, pow_zero] at this · simpa only [pow_one] using hn.symm · obtain ⟨n, rfl⟩ : ∃ k, n = 1 + k + 1 := Nat.exists_eq_add_of_lt H rw [pow_succ'] at this rcases this.isUnit_or_isUnit rfl with (H0 | H0) · exact (hϖ.not_isUnit H0).elim · rw [add_comm, pow_succ'] at H0 exact (hϖ.not_isUnit (isUnit_of_mul_isUnit_left H0)).elim variable [IsDomain R]
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
unique_irreducible
null
toUniqueFactorizationMonoid (hR : HasUnitMulPowIrreducibleFactorization R) : UniqueFactorizationMonoid R := let p := Classical.choose hR let spec := Classical.choose_spec hR UniqueFactorizationMonoid.of_exists_prime_factors fun x hx => by use Multiset.replicate (Classical.choose (spec.2 hx)) p constructor · intro q hq have hpq := Multiset.eq_of_mem_replicate hq rw [hpq] refine ⟨spec.1.ne_zero, spec.1.not_isUnit, ?_⟩ intro a b h by_cases ha : a = 0 · rw [ha] simp only [true_or, dvd_zero] obtain ⟨m, u, rfl⟩ := spec.2 ha rw [mul_assoc, mul_left_comm, Units.dvd_mul_left] at h rw [Units.dvd_mul_right] by_cases hm : m = 0 · simp only [hm, one_mul, pow_zero] at h ⊢ right exact h left obtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hm rw [pow_succ'] apply dvd_mul_of_dvd_left dvd_rfl _ · rw [Multiset.prod_replicate] exact Classical.choose_spec (spec.2 hx)
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
toUniqueFactorizationMonoid
An integral domain in which there is an irreducible element `p` such that every nonzero element is associated to a power of `p` is a unique factorization domain. See `IsDiscreteValuationRing.ofHasUnitMulPowIrreducibleFactorization`.
of_ufd_of_unique_irreducible [UniqueFactorizationMonoid R] (h₁ : ∃ p : R, Irreducible p) (h₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q) : HasUnitMulPowIrreducibleFactorization R := by obtain ⟨p, hp⟩ := h₁ refine ⟨p, hp, ?_⟩ intro x hx obtain ⟨fx, hfx⟩ := WfDvdMonoid.exists_factors x hx refine ⟨Multiset.card fx, ?_⟩ have H := hfx.2 rw [← Associates.mk_eq_mk_iff_associated] at H ⊢ rw [← H, ← Associates.prod_mk, Associates.mk_pow, ← Multiset.prod_replicate] congr 1 symm rw [Multiset.eq_replicate] simp only [true_and, and_imp, Multiset.card_map, Multiset.mem_map, exists_imp] rintro _ q hq rfl rw [Associates.mk_eq_mk_iff_associated] apply h₂ (hfx.1 _ hq) hp
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
of_ufd_of_unique_irreducible
null
aux_pid_of_ufd_of_unique_irreducible (R : Type u) [CommRing R] [IsDomain R] [UniqueFactorizationMonoid R] (h₁ : ∃ p : R, Irreducible p) (h₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q) : IsPrincipalIdealRing R := by classical constructor intro I by_cases I0 : I = ⊥ · rw [I0] use 0 simp only [Set.singleton_zero, Submodule.span_zero] obtain ⟨x, hxI, hx0⟩ : ∃ x ∈ I, x ≠ (0 : R) := I.ne_bot_iff.mp I0 obtain ⟨p, _, H⟩ := HasUnitMulPowIrreducibleFactorization.of_ufd_of_unique_irreducible h₁ h₂ have ex : ∃ n : ℕ, p ^ n ∈ I := by obtain ⟨n, u, rfl⟩ := H hx0 refine ⟨n, ?_⟩ simpa only [Units.mul_inv_cancel_right] using I.mul_mem_right (↑u⁻¹) hxI constructor use p ^ Nat.find ex change I = Ideal.span _ apply le_antisymm · intro r hr by_cases hr0 : r = 0 · simp only [hr0, Submodule.zero_mem] obtain ⟨n, u, rfl⟩ := H hr0 simp only [mem_span_singleton, Units.isUnit, IsUnit.dvd_mul_right] apply pow_dvd_pow apply Nat.find_min' simpa only [Units.mul_inv_cancel_right] using I.mul_mem_right (↑u⁻¹) hr · rw [span_singleton_le_iff_mem] exact Nat.find_spec ex
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
aux_pid_of_ufd_of_unique_irreducible
null
of_ufd_of_unique_irreducible {R : Type u} [CommRing R] [IsDomain R] [UniqueFactorizationMonoid R] (h₁ : ∃ p : R, Irreducible p) (h₂ : ∀ ⦃p q : R⦄, Irreducible p → Irreducible q → Associated p q) : IsDiscreteValuationRing R := by rw [iff_pid_with_one_nonzero_prime] haveI PID : IsPrincipalIdealRing R := aux_pid_of_ufd_of_unique_irreducible R h₁ h₂ obtain ⟨p, hp⟩ := h₁ refine ⟨PID, ⟨Ideal.span {p}, ⟨?_, ?_⟩, ?_⟩⟩ · rw [Submodule.ne_bot_iff] exact ⟨p, Ideal.mem_span_singleton.mpr (dvd_refl p), hp.ne_zero⟩ · rwa [Ideal.span_singleton_prime hp.ne_zero, ← UniqueFactorizationMonoid.irreducible_iff_prime] · intro I rw [← Submodule.IsPrincipal.span_singleton_generator I] rintro ⟨I0, hI⟩ apply span_singleton_eq_span_singleton.mpr apply h₂ _ hp rw [Ne, Submodule.span_singleton_eq_bot] at I0 rwa [UniqueFactorizationMonoid.irreducible_iff_prime, ← Ideal.span_singleton_prime I0]
theorem
RingTheory
[ "Mathlib.RingTheory.AdicCompletion.Basic", "Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic", "Mathlib.RingTheory.LocalRing.RingHom.Basic", "Mathlib.RingTheory.UniqueFactorizationDomain.Basic", "Mathlib.RingTheory.Valuation.PrimeMultiplicity", "Mathlib.RingTheory.Valuation.ValuationRing" ]
Mathlib/RingTheory/DiscreteValuationRing/Basic.lean
of_ufd_of_unique_irreducible
A unique factorization domain with at least one irreducible element in which all irreducible elements are associated is a discrete valuation ring.