data.mv_polynomial.derivation
⟷
Mathlib.Data.MvPolynomial.Derivation
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
-import Data.MvPolynomial.Supported
+import Algebra.MvPolynomial.Supported
import RingTheory.Derivation.Basic
#align_import data.mv_polynomial.derivation from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -84,7 +84,7 @@ theorem derivation_c_hMul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f :
theorem derivation_eqOn_supported {D₁ D₂ : Derivation R (MvPolynomial σ R) A} {s : Set σ}
(h : Set.EqOn (D₁ ∘ X) (D₂ ∘ X) s) {f : MvPolynomial σ R} (hf : f ∈ supported R s) :
D₁ f = D₂ f :=
- Derivation.eqOn_adjoin (Set.ball_image_iff.2 h) hf
+ Derivation.eqOn_adjoin (Set.forall_mem_image.2 h) hf
#align mv_polynomial.derivation_eq_on_supported MvPolynomial.derivation_eqOn_supported
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
-import Mathbin.Data.MvPolynomial.Supported
-import Mathbin.RingTheory.Derivation.Basic
+import Data.MvPolynomial.Supported
+import RingTheory.Derivation.Basic
#align_import data.mv_polynomial.derivation from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -74,9 +74,9 @@ theorem derivation_C (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a)
-/
@[simp]
-theorem derivation_c_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
+theorem derivation_c_hMul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
D (C a * f) = a • D f := by rw [C_mul', D.map_smul]
-#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_c_mul
+#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_c_hMul
#print MvPolynomial.derivation_eqOn_supported /-
/-- If two derivations agree on `X i`, `i ∈ s`, then they agree on all polynomials from
mathlib commit https://github.com/leanprover-community/mathlib/commit/48a058d7e39a80ed56858505719a0b2197900999
@@ -73,12 +73,10 @@ theorem derivation_C (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a)
#align mv_polynomial.derivation_C MvPolynomial.derivation_C
-/
-#print MvPolynomial.derivation_C_mul /-
@[simp]
-theorem derivation_C_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
+theorem derivation_c_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
D (C a * f) = a • D f := by rw [C_mul', D.map_smul]
-#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_C_mul
--/
+#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_c_mul
#print MvPolynomial.derivation_eqOn_supported /-
/-- If two derivations agree on `X i`, `i ∈ s`, then they agree on all polynomials from
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.mv_polynomial.derivation
-! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.MvPolynomial.Supported
import Mathbin.RingTheory.Derivation.Basic
+#align_import data.mv_polynomial.derivation from "leanprover-community/mathlib"@"af471b9e3ce868f296626d33189b4ce730fa4c00"
+
/-!
# Derivations of multivariate polynomials
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -49,30 +49,41 @@ def mkDerivationₗ (f : σ → A) : MvPolynomial σ R →ₗ[R] A :=
end
+#print MvPolynomial.mkDerivationₗ_monomial /-
theorem mkDerivationₗ_monomial (f : σ → A) (s : σ →₀ ℕ) (r : R) :
mkDerivationₗ R f (monomial s r) =
r • s.Sum fun i k => monomial (s - Finsupp.single i 1) (k : R) • f i :=
sum_monomial_eq <| LinearMap.map_zero _
#align mv_polynomial.mk_derivationₗ_monomial MvPolynomial.mkDerivationₗ_monomial
+-/
+#print MvPolynomial.mkDerivationₗ_C /-
theorem mkDerivationₗ_C (f : σ → A) (r : R) : mkDerivationₗ R f (C r) = 0 :=
(mkDerivationₗ_monomial f _ _).trans (smul_zero _)
#align mv_polynomial.mk_derivationₗ_C MvPolynomial.mkDerivationₗ_C
+-/
+#print MvPolynomial.mkDerivationₗ_X /-
theorem mkDerivationₗ_X (f : σ → A) (i : σ) : mkDerivationₗ R f (X i) = f i :=
(mkDerivationₗ_monomial f _ _).trans <| by simp
#align mv_polynomial.mk_derivationₗ_X MvPolynomial.mkDerivationₗ_X
+-/
+#print MvPolynomial.derivation_C /-
@[simp]
theorem derivation_C (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a) = 0 :=
D.map_algebraMap a
#align mv_polynomial.derivation_C MvPolynomial.derivation_C
+-/
+#print MvPolynomial.derivation_C_mul /-
@[simp]
theorem derivation_C_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
D (C a * f) = a • D f := by rw [C_mul', D.map_smul]
#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_C_mul
+-/
+#print MvPolynomial.derivation_eqOn_supported /-
/-- If two derivations agree on `X i`, `i ∈ s`, then they agree on all polynomials from
`mv_polynomial.supported R s`. -/
theorem derivation_eqOn_supported {D₁ D₂ : Derivation R (MvPolynomial σ R) A} {s : Set σ}
@@ -80,25 +91,33 @@ theorem derivation_eqOn_supported {D₁ D₂ : Derivation R (MvPolynomial σ R)
D₁ f = D₂ f :=
Derivation.eqOn_adjoin (Set.ball_image_iff.2 h) hf
#align mv_polynomial.derivation_eq_on_supported MvPolynomial.derivation_eqOn_supported
+-/
+#print MvPolynomial.derivation_eq_of_forall_mem_vars /-
theorem derivation_eq_of_forall_mem_vars {D₁ D₂ : Derivation R (MvPolynomial σ R) A}
{f : MvPolynomial σ R} (h : ∀ i ∈ f.vars, D₁ (X i) = D₂ (X i)) : D₁ f = D₂ f :=
derivation_eqOn_supported h f.mem_supported_vars
#align mv_polynomial.derivation_eq_of_forall_mem_vars MvPolynomial.derivation_eq_of_forall_mem_vars
+-/
+#print MvPolynomial.derivation_eq_zero_of_forall_mem_vars /-
theorem derivation_eq_zero_of_forall_mem_vars {D : Derivation R (MvPolynomial σ R) A}
{f : MvPolynomial σ R} (h : ∀ i ∈ f.vars, D (X i) = 0) : D f = 0 :=
show D f = (0 : Derivation R (MvPolynomial σ R) A) f from derivation_eq_of_forall_mem_vars h
#align mv_polynomial.derivation_eq_zero_of_forall_mem_vars MvPolynomial.derivation_eq_zero_of_forall_mem_vars
+-/
+#print MvPolynomial.derivation_ext /-
@[ext]
theorem derivation_ext {D₁ D₂ : Derivation R (MvPolynomial σ R) A} (h : ∀ i, D₁ (X i) = D₂ (X i)) :
D₁ = D₂ :=
Derivation.ext fun f => derivation_eq_of_forall_mem_vars fun i _ => h i
#align mv_polynomial.derivation_ext MvPolynomial.derivation_ext
+-/
variable [IsScalarTower R (MvPolynomial σ R) A]
+#print MvPolynomial.leibniz_iff_X /-
theorem leibniz_iff_X (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
(∀ p q, D (p * q) = p • D q + q • D p) ↔
∀ s i,
@@ -124,6 +143,7 @@ theorem leibniz_iff_X (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
case h_X q i hq =>
simp only [this, ← mul_assoc, hq, mul_smul, smul_add, smul_comm (X i), add_assoc]
#align mv_polynomial.leibniz_iff_X MvPolynomial.leibniz_iff_X
+-/
variable (R)
@@ -148,17 +168,22 @@ def mkDerivation (f : σ → A) : Derivation R (MvPolynomial σ R) A
#align mv_polynomial.mk_derivation MvPolynomial.mkDerivation
-/
+#print MvPolynomial.mkDerivation_X /-
@[simp]
theorem mkDerivation_X (f : σ → A) (i : σ) : mkDerivation R f (X i) = f i :=
mkDerivationₗ_X f i
#align mv_polynomial.mk_derivation_X MvPolynomial.mkDerivation_X
+-/
+#print MvPolynomial.mkDerivation_monomial /-
theorem mkDerivation_monomial (f : σ → A) (s : σ →₀ ℕ) (r : R) :
mkDerivation R f (monomial s r) =
r • s.Sum fun i k => monomial (s - Finsupp.single i 1) (k : R) • f i :=
mkDerivationₗ_monomial f s r
#align mv_polynomial.mk_derivation_monomial MvPolynomial.mkDerivation_monomial
+-/
+#print MvPolynomial.mkDerivationEquiv /-
/-- `mv_polynomial.mk_derivation` as a linear equivalence. -/
def mkDerivationEquiv : (σ → A) ≃ₗ[R] Derivation R (MvPolynomial σ R) A :=
LinearEquiv.symm <|
@@ -169,6 +194,7 @@ def mkDerivationEquiv : (σ → A) ≃ₗ[R] Derivation R (MvPolynomial σ R) A
left_inv := fun D => derivation_ext <| mkDerivation_X _ _
right_inv := fun f => funext <| mkDerivation_X _ _ }
#align mv_polynomial.mk_derivation_equiv MvPolynomial.mkDerivationEquiv
+-/
end MvPolynomial
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
! This file was ported from Lean 3 source module data.mv_polynomial.derivation
-! leanprover-community/mathlib commit b608348ffaeb7f557f2fd46876037abafd326ff3
+! leanprover-community/mathlib commit af471b9e3ce868f296626d33189b4ce730fa4c00
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.RingTheory.Derivation.Basic
/-!
# Derivations of multivariate polynomials
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
In this file we prove that a derivation of `mv_polynomial σ R` is determined by its values on all
monomials `mv_polynomial.X i`. We also provide a constructor `mv_polynomial.mk_derivation` that
builds a derivation from its values on `X i`s and a linear equivalence
@@ -34,6 +37,7 @@ section
variable (R)
+#print MvPolynomial.mkDerivationₗ /-
/-- The derivation on `mv_polynomial σ R` that takes value `f i` on `X i`, as a linear map.
Use `mv_polynomial.mk_derivation` instead. -/
def mkDerivationₗ (f : σ → A) : MvPolynomial σ R →ₗ[R] A :=
@@ -41,6 +45,7 @@ def mkDerivationₗ (f : σ → A) : MvPolynomial σ R →ₗ[R] A :=
(LinearMap.ringLmapEquivSelf R R A).symm <|
xs.Sum fun i k => monomial (xs - Finsupp.single i 1) (k : R) • f i
#align mv_polynomial.mk_derivationₗ MvPolynomial.mkDerivationₗ
+-/
end
@@ -50,23 +55,23 @@ theorem mkDerivationₗ_monomial (f : σ → A) (s : σ →₀ ℕ) (r : R) :
sum_monomial_eq <| LinearMap.map_zero _
#align mv_polynomial.mk_derivationₗ_monomial MvPolynomial.mkDerivationₗ_monomial
-theorem mkDerivationₗ_c (f : σ → A) (r : R) : mkDerivationₗ R f (C r) = 0 :=
+theorem mkDerivationₗ_C (f : σ → A) (r : R) : mkDerivationₗ R f (C r) = 0 :=
(mkDerivationₗ_monomial f _ _).trans (smul_zero _)
-#align mv_polynomial.mk_derivationₗ_C MvPolynomial.mkDerivationₗ_c
+#align mv_polynomial.mk_derivationₗ_C MvPolynomial.mkDerivationₗ_C
-theorem mkDerivationₗ_x (f : σ → A) (i : σ) : mkDerivationₗ R f (X i) = f i :=
+theorem mkDerivationₗ_X (f : σ → A) (i : σ) : mkDerivationₗ R f (X i) = f i :=
(mkDerivationₗ_monomial f _ _).trans <| by simp
-#align mv_polynomial.mk_derivationₗ_X MvPolynomial.mkDerivationₗ_x
+#align mv_polynomial.mk_derivationₗ_X MvPolynomial.mkDerivationₗ_X
@[simp]
-theorem derivation_c (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a) = 0 :=
+theorem derivation_C (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a) = 0 :=
D.map_algebraMap a
-#align mv_polynomial.derivation_C MvPolynomial.derivation_c
+#align mv_polynomial.derivation_C MvPolynomial.derivation_C
@[simp]
-theorem derivation_c_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
+theorem derivation_C_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
D (C a * f) = a • D f := by rw [C_mul', D.map_smul]
-#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_c_mul
+#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_C_mul
/-- If two derivations agree on `X i`, `i ∈ s`, then they agree on all polynomials from
`mv_polynomial.supported R s`. -/
@@ -94,7 +99,7 @@ theorem derivation_ext {D₁ D₂ : Derivation R (MvPolynomial σ R) A} (h : ∀
variable [IsScalarTower R (MvPolynomial σ R) A]
-theorem leibniz_iff_x (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
+theorem leibniz_iff_X (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
(∀ p q, D (p * q) = p • D q + q • D p) ↔
∀ s i,
D (monomial s 1 * X i) =
@@ -118,17 +123,18 @@ theorem leibniz_iff_x (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
case h_add q₁ q₂ h₁ h₂ => simp only [mul_add, map_add, h₁, h₂, smul_add, add_smul]; abel
case h_X q i hq =>
simp only [this, ← mul_assoc, hq, mul_smul, smul_add, smul_comm (X i), add_assoc]
-#align mv_polynomial.leibniz_iff_X MvPolynomial.leibniz_iff_x
+#align mv_polynomial.leibniz_iff_X MvPolynomial.leibniz_iff_X
variable (R)
+#print MvPolynomial.mkDerivation /-
/-- The derivation on `mv_polynomial σ R` that takes value `f i` on `X i`. -/
def mkDerivation (f : σ → A) : Derivation R (MvPolynomial σ R) A
where
toLinearMap := mkDerivationₗ R f
- map_one_eq_zero' := mkDerivationₗ_c _ 1
+ map_one_eq_zero' := mkDerivationₗ_C _ 1
leibniz' :=
- (leibniz_iff_x (mkDerivationₗ R f) (mkDerivationₗ_c _ 1)).2 fun s i =>
+ (leibniz_iff_X (mkDerivationₗ R f) (mkDerivationₗ_C _ 1)).2 fun s i =>
by
simp only [mk_derivationₗ_monomial, X, monomial_mul, one_smul, one_mul]
rw [Finsupp.sum_add_index'] <;> [skip; · simp;
@@ -140,11 +146,12 @@ def mkDerivation (f : σ → A) : Derivation R (MvPolynomial σ R) A
rw [smul_smul, monomial_mul, one_mul, add_comm s, add_tsub_assoc_of_le]
rwa [Finsupp.single_le_iff, Nat.succ_le_iff, pos_iff_ne_zero, ← Finsupp.mem_support_iff]
#align mv_polynomial.mk_derivation MvPolynomial.mkDerivation
+-/
@[simp]
-theorem mkDerivation_x (f : σ → A) (i : σ) : mkDerivation R f (X i) = f i :=
- mkDerivationₗ_x f i
-#align mv_polynomial.mk_derivation_X MvPolynomial.mkDerivation_x
+theorem mkDerivation_X (f : σ → A) (i : σ) : mkDerivation R f (X i) = f i :=
+ mkDerivationₗ_X f i
+#align mv_polynomial.mk_derivation_X MvPolynomial.mkDerivation_X
theorem mkDerivation_monomial (f : σ → A) (s : σ →₀ ℕ) (r : R) :
mkDerivation R f (monomial s r) =
@@ -159,8 +166,8 @@ def mkDerivationEquiv : (σ → A) ≃ₗ[R] Derivation R (MvPolynomial σ R) A
toFun := fun D i => D (X i)
map_add' := fun D₁ D₂ => rfl
map_smul' := fun c D => rfl
- left_inv := fun D => derivation_ext <| mkDerivation_x _ _
- right_inv := fun f => funext <| mkDerivation_x _ _ }
+ left_inv := fun D => derivation_ext <| mkDerivation_X _ _
+ right_inv := fun f => funext <| mkDerivation_X _ _ }
#align mv_polynomial.mk_derivation_equiv MvPolynomial.mkDerivationEquiv
end MvPolynomial
mathlib commit https://github.com/leanprover-community/mathlib/commit/34ebaffc1d1e8e783fc05438ec2e70af87275ac9
@@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
! This file was ported from Lean 3 source module data.mv_polynomial.derivation
-! leanprover-community/mathlib commit 6e492fdbed778ea815798a5a0c6cb83df8486265
+! leanprover-community/mathlib commit b608348ffaeb7f557f2fd46876037abafd326ff3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Data.MvPolynomial.Supported
-import Mathbin.RingTheory.Derivation
+import Mathbin.RingTheory.Derivation.Basic
/-!
# Derivations of multivariate polynomials
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -131,9 +131,9 @@ def mkDerivation (f : σ → A) : Derivation R (MvPolynomial σ R) A
(leibniz_iff_x (mkDerivationₗ R f) (mkDerivationₗ_c _ 1)).2 fun s i =>
by
simp only [mk_derivationₗ_monomial, X, monomial_mul, one_smul, one_mul]
- rw [Finsupp.sum_add_index'] <;>
- [skip;· simp;· intros ; simp only [Nat.cast_add, (monomial _).map_add, add_smul]]
- rw [Finsupp.sum_single_index, Finsupp.sum_single_index] <;> [skip;· simp;· simp]
+ rw [Finsupp.sum_add_index'] <;> [skip; · simp;
+ · intros; simp only [Nat.cast_add, (monomial _).map_add, add_smul]]
+ rw [Finsupp.sum_single_index, Finsupp.sum_single_index] <;> [skip; · simp; · simp]
rw [tsub_self, add_tsub_cancel_right, Nat.cast_one, ← C_apply, C_1, one_smul, add_comm,
Finsupp.smul_sum]
refine' congr_arg₂ (· + ·) rfl (Finset.sum_congr rfl fun j hj => _); dsimp only
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -23,7 +23,7 @@ builds a derivation from its values on `X i`s and a linear equivalence
namespace MvPolynomial
-open BigOperators
+open scoped BigOperators
noncomputable section
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -102,9 +102,7 @@ theorem leibniz_iff_x (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
(X i : MvPolynomial σ R) • D (monomial s 1) :=
by
refine' ⟨fun H p i => H _ _, fun H => _⟩
- have hC : ∀ r, D (C r) = 0 := by
- intro r
- rw [C_eq_smul_one, D.map_smul, h₁, smul_zero]
+ have hC : ∀ r, D (C r) = 0 := by intro r; rw [C_eq_smul_one, D.map_smul, h₁, smul_zero]
have : ∀ p i, D (p * X i) = p • D (X i) + (X i : MvPolynomial σ R) • D p :=
by
intro p i
@@ -134,9 +132,7 @@ def mkDerivation (f : σ → A) : Derivation R (MvPolynomial σ R) A
by
simp only [mk_derivationₗ_monomial, X, monomial_mul, one_smul, one_mul]
rw [Finsupp.sum_add_index'] <;>
- [skip;· simp;·
- intros
- simp only [Nat.cast_add, (monomial _).map_add, add_smul]]
+ [skip;· simp;· intros ; simp only [Nat.cast_add, (monomial _).map_add, add_smul]]
rw [Finsupp.sum_single_index, Finsupp.sum_single_index] <;> [skip;· simp;· simp]
rw [tsub_self, add_tsub_cancel_right, Nat.cast_one, ← C_apply, C_1, one_smul, add_comm,
Finsupp.smul_sum]
mathlib commit https://github.com/leanprover-community/mathlib/commit/8d33f09cd7089ecf074b4791907588245aec5d1b
@@ -133,10 +133,11 @@ def mkDerivation (f : σ → A) : Derivation R (MvPolynomial σ R) A
(leibniz_iff_x (mkDerivationₗ R f) (mkDerivationₗ_c _ 1)).2 fun s i =>
by
simp only [mk_derivationₗ_monomial, X, monomial_mul, one_smul, one_mul]
- rw [Finsupp.sum_add_index'] <;> [skip, · simp,
- · intros
+ rw [Finsupp.sum_add_index'] <;>
+ [skip;· simp;·
+ intros
simp only [Nat.cast_add, (monomial _).map_add, add_smul]]
- rw [Finsupp.sum_single_index, Finsupp.sum_single_index] <;> [skip, · simp, · simp]
+ rw [Finsupp.sum_single_index, Finsupp.sum_single_index] <;> [skip;· simp;· simp]
rw [tsub_self, add_tsub_cancel_right, Nat.cast_one, ← C_apply, C_1, one_smul, add_comm,
Finsupp.smul_sum]
refine' congr_arg₂ (· + ·) rfl (Finset.sum_congr rfl fun j hj => _); dsimp only
mathlib commit https://github.com/leanprover-community/mathlib/commit/1a313d8bba1bad05faba71a4a4e9742ab5bd9efd
@@ -50,44 +50,44 @@ theorem mkDerivationₗ_monomial (f : σ → A) (s : σ →₀ ℕ) (r : R) :
sum_monomial_eq <| LinearMap.map_zero _
#align mv_polynomial.mk_derivationₗ_monomial MvPolynomial.mkDerivationₗ_monomial
-theorem mkDerivationₗ_c (f : σ → A) (r : R) : mkDerivationₗ R f (c r) = 0 :=
+theorem mkDerivationₗ_c (f : σ → A) (r : R) : mkDerivationₗ R f (C r) = 0 :=
(mkDerivationₗ_monomial f _ _).trans (smul_zero _)
#align mv_polynomial.mk_derivationₗ_C MvPolynomial.mkDerivationₗ_c
-theorem mkDerivationₗ_x (f : σ → A) (i : σ) : mkDerivationₗ R f (x i) = f i :=
+theorem mkDerivationₗ_x (f : σ → A) (i : σ) : mkDerivationₗ R f (X i) = f i :=
(mkDerivationₗ_monomial f _ _).trans <| by simp
#align mv_polynomial.mk_derivationₗ_X MvPolynomial.mkDerivationₗ_x
@[simp]
-theorem derivation_c (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (c a) = 0 :=
+theorem derivation_c (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a) = 0 :=
D.map_algebraMap a
#align mv_polynomial.derivation_C MvPolynomial.derivation_c
@[simp]
theorem derivation_c_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
- D (c a * f) = a • D f := by rw [C_mul', D.map_smul]
+ D (C a * f) = a • D f := by rw [C_mul', D.map_smul]
#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_c_mul
/-- If two derivations agree on `X i`, `i ∈ s`, then they agree on all polynomials from
`mv_polynomial.supported R s`. -/
theorem derivation_eqOn_supported {D₁ D₂ : Derivation R (MvPolynomial σ R) A} {s : Set σ}
- (h : Set.EqOn (D₁ ∘ x) (D₂ ∘ x) s) {f : MvPolynomial σ R} (hf : f ∈ supported R s) :
+ (h : Set.EqOn (D₁ ∘ X) (D₂ ∘ X) s) {f : MvPolynomial σ R} (hf : f ∈ supported R s) :
D₁ f = D₂ f :=
Derivation.eqOn_adjoin (Set.ball_image_iff.2 h) hf
#align mv_polynomial.derivation_eq_on_supported MvPolynomial.derivation_eqOn_supported
theorem derivation_eq_of_forall_mem_vars {D₁ D₂ : Derivation R (MvPolynomial σ R) A}
- {f : MvPolynomial σ R} (h : ∀ i ∈ f.vars, D₁ (x i) = D₂ (x i)) : D₁ f = D₂ f :=
+ {f : MvPolynomial σ R} (h : ∀ i ∈ f.vars, D₁ (X i) = D₂ (X i)) : D₁ f = D₂ f :=
derivation_eqOn_supported h f.mem_supported_vars
#align mv_polynomial.derivation_eq_of_forall_mem_vars MvPolynomial.derivation_eq_of_forall_mem_vars
theorem derivation_eq_zero_of_forall_mem_vars {D : Derivation R (MvPolynomial σ R) A}
- {f : MvPolynomial σ R} (h : ∀ i ∈ f.vars, D (x i) = 0) : D f = 0 :=
+ {f : MvPolynomial σ R} (h : ∀ i ∈ f.vars, D (X i) = 0) : D f = 0 :=
show D f = (0 : Derivation R (MvPolynomial σ R) A) f from derivation_eq_of_forall_mem_vars h
#align mv_polynomial.derivation_eq_zero_of_forall_mem_vars MvPolynomial.derivation_eq_zero_of_forall_mem_vars
@[ext]
-theorem derivation_ext {D₁ D₂ : Derivation R (MvPolynomial σ R) A} (h : ∀ i, D₁ (x i) = D₂ (x i)) :
+theorem derivation_ext {D₁ D₂ : Derivation R (MvPolynomial σ R) A} (h : ∀ i, D₁ (X i) = D₂ (X i)) :
D₁ = D₂ :=
Derivation.ext fun f => derivation_eq_of_forall_mem_vars fun i _ => h i
#align mv_polynomial.derivation_ext MvPolynomial.derivation_ext
@@ -97,9 +97,9 @@ variable [IsScalarTower R (MvPolynomial σ R) A]
theorem leibniz_iff_x (D : MvPolynomial σ R →ₗ[R] A) (h₁ : D 1 = 0) :
(∀ p q, D (p * q) = p • D q + q • D p) ↔
∀ s i,
- D (monomial s 1 * x i) =
- (monomial s 1 : MvPolynomial σ R) • D (x i) +
- (x i : MvPolynomial σ R) • D (monomial s 1) :=
+ D (monomial s 1 * X i) =
+ (monomial s 1 : MvPolynomial σ R) • D (X i) +
+ (X i : MvPolynomial σ R) • D (monomial s 1) :=
by
refine' ⟨fun H p i => H _ _, fun H => _⟩
have hC : ∀ r, D (C r) = 0 := by
@@ -145,7 +145,7 @@ def mkDerivation (f : σ → A) : Derivation R (MvPolynomial σ R) A
#align mv_polynomial.mk_derivation MvPolynomial.mkDerivation
@[simp]
-theorem mkDerivation_x (f : σ → A) (i : σ) : mkDerivation R f (x i) = f i :=
+theorem mkDerivation_x (f : σ → A) (i : σ) : mkDerivation R f (X i) = f i :=
mkDerivationₗ_x f i
#align mv_polynomial.mk_derivation_X MvPolynomial.mkDerivation_x
@@ -159,7 +159,7 @@ theorem mkDerivation_monomial (f : σ → A) (s : σ →₀ ℕ) (r : R) :
def mkDerivationEquiv : (σ → A) ≃ₗ[R] Derivation R (MvPolynomial σ R) A :=
LinearEquiv.symm <|
{ invFun := mkDerivation R
- toFun := fun D i => D (x i)
+ toFun := fun D i => D (X i)
map_add' := fun D₁ D₂ => rfl
map_smul' := fun c D => rfl
left_inv := fun D => derivation_ext <| mkDerivation_x _ _
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Data
(#11751)
Polynomial
and MvPolynomial
are algebraic objects, hence should be under Algebra
(or at least not under Data
)
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
-import Mathlib.Data.MvPolynomial.Supported
+import Mathlib.Algebra.MvPolynomial.Supported
import Mathlib.RingTheory.Derivation.Basic
#align_import data.mv_polynomial.derivation from "leanprover-community/mathlib"@"b608348ffaeb7f557f2fd46876037abafd326ff3"
ball
and bex
from lemma names (#10816)
ball
for "bounded forall" and bex
for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem
and exists_mem
in the few Set
lemma names that mention them.
Also deprecate ball_image_of_ball
, mem_image_elim
, mem_image_elim_on
since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image
semi-implicit), have obscure names and are completely unused.
@@ -74,7 +74,7 @@ theorem derivation_C_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : M
theorem derivation_eqOn_supported {D₁ D₂ : Derivation R (MvPolynomial σ R) A} {s : Set σ}
(h : Set.EqOn (D₁ ∘ X) (D₂ ∘ X) s) {f : MvPolynomial σ R} (hf : f ∈ supported R s) :
D₁ f = D₂ f :=
- Derivation.eqOn_adjoin (Set.ball_image_iff.2 h) hf
+ Derivation.eqOn_adjoin (Set.forall_mem_image.2 h) hf
#align mv_polynomial.derivation_eq_on_supported MvPolynomial.derivation_eqOn_supported
theorem derivation_eq_of_forall_mem_vars {D₁ D₂ : Derivation R (MvPolynomial σ R) A}
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -24,7 +24,7 @@ open scoped BigOperators
noncomputable section
-variable {σ R A : Type _} [CommSemiring R] [AddCommMonoid A] [Module R A]
+variable {σ R A : Type*} [CommSemiring R] [AddCommMonoid A] [Module R A]
[Module (MvPolynomial σ R) A]
section
An R-derivation from R[X]
is determined by its value on X
. Joint work with Richard Hill, who needs this stuff for his work on power series. We followed MvPolynomial.Derivation
.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Oliver Nash <github@olivernash.org>
@@ -63,17 +63,11 @@ theorem derivation_C (D : Derivation R (MvPolynomial σ R) A) (a : R) : D (C a)
set_option linter.uppercaseLean3 false in
#align mv_polynomial.derivation_C MvPolynomial.derivation_C
--- @[simp] -- Porting note: simp normal form is `derivation_C_mul'`
-theorem derivation_C_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
- D (C a * f) = a • D f := by rw [C_mul', D.map_smul]
-set_option linter.uppercaseLean3 false in
-#align mv_polynomial.derivation_C_mul MvPolynomial.derivation_C_mul
-
@[simp]
-theorem derivation_C_mul' (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
+theorem derivation_C_mul (D : Derivation R (MvPolynomial σ R) A) (a : R) (f : MvPolynomial σ R) :
C (σ := σ) a • D f = a • D f := by
have : C (σ := σ) a • D f = D (C a * f) := by simp
- rw [this, derivation_C_mul]
+ rw [this, C_mul', D.map_smul]
/-- If two derivations agree on `X i`, `i ∈ s`, then they agree on all polynomials from
`MvPolynomial.supported R s`. -/
@@ -14,7 +14,7 @@ import Mathlib.RingTheory.Derivation.Basic
In this file we prove that a derivation of `MvPolynomial σ R` is determined by its values on all
monomials `MvPolynomial.X i`. We also provide a constructor `MvPolynomial.mkDerivation` that
builds a derivation from its values on `X i`s and a linear equivalence
-`MvPolynomial.equivDerivation` between `σ → A` and `Derivation (MvPolynomial σ R) A`.
+`MvPolynomial.mkDerivationEquiv` between `σ → A` and `Derivation (MvPolynomial σ R) A`.
-/
@@ -2,15 +2,12 @@
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.mv_polynomial.derivation
-! leanprover-community/mathlib commit b608348ffaeb7f557f2fd46876037abafd326ff3
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.MvPolynomial.Supported
import Mathlib.RingTheory.Derivation.Basic
+#align_import data.mv_polynomial.derivation from "leanprover-community/mathlib"@"b608348ffaeb7f557f2fd46876037abafd326ff3"
+
/-!
# Derivations of multivariate polynomials
The unported dependencies are