Stafford38/Characteristic/LocalizedPartialDerivation.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Stafford38.Characteristic.PostScalarExtensionPoisson
3 public import Stafford38.Characteristic.LocalizedDerivationQuotient
4 
5 @[expose] public section
6 
7 /-!
8 # Polynomial partial derivatives on a prime localization
9 
10 The partial derivative on the symbol ring is extended by the generic
11 localization operation from AlgebraicAnalysis.  The quotient-rule formula
12 used by the localization argument is recorded below as a proved
13 specialization of the generic Leibniz/inverse formula.
14 -/
15 
16 namespace Stafford38.Characteristic.LocalizedPartialDerivation
17 
18 open Stafford38.Characteristic
19 open Stafford38.Characteristic.PostScalarExtensionPoisson
20 open AlgebraicAnalysis.DifferentialOperators.LocalizedPolynomialDerivations
21 
22 noncomputable section
23 
24 variable {k : Type*} [Field k] {n : ℕ}
25 
26 abbrev R := SymbolRing k n
27 
28 abbrev AtPrime (P : Ideal (R (k := k) (n := n))) [P.IsPrime] :=
29   Localization P.primeCompl
30 
31 /-- The `i`th polynomial partial derivative, extended through the localization
32 at `P`.  This is the generic AlgebraicAnalysis extension specialized to the
33 phase-space partial derivative. -/
34 noncomputable def localizedPDeriv
35     (P : Ideal (R (k := k) (n := n))) [P.IsPrime] (i : PhaseVar n) :
36     Derivation k (AtPrime (k := k) (n := n) P) (AtPrime P) :=
37   extendDerivation k (R (k := k) (n := n)) (AtPrime P) P.primeCompl
38     ((Algebra.linearMap (R (k := k) (n := n)) (AtPrime P)).compDer
39       (MvPolynomial.pderiv i))
40 
41 theorem localizedPDeriv_compAlgebraMap
42     (P : Ideal (R (k := k) (n := n))) [P.IsPrime] (i : PhaseVar n) :
43     (localizedPDeriv (k := k) (n := n) P i).compAlgebraMap (R (k := k) (n := n)) =
44       (Algebra.linearMap (R (k := k) (n := n)) (AtPrime P)).compDer
45         (MvPolynomial.pderiv i) := by
46   change (extendDerivation k (R (k := k) (n := n)) (AtPrime P)
47     P.primeCompl ((Algebra.linearMap (R (k := k) (n := n)) (AtPrime P)).compDer
48       (MvPolynomial.pderiv i))).compAlgebraMap (R (k := k) (n := n)) = _
49   exact extendDerivation_compAlgebraMap k (R (k := k) (n := n)) (AtPrime P)
50     P.primeCompl ((Algebra.linearMap (R (k := k) (n := n)) (AtPrime P)).compDer
51       (MvPolynomial.pderiv i))
52 
53 /-- Exact quotient-rule formula for the canonical localization extension.
54 The denominator square is a localization unit, and the formula follows by
55 specializing the generic cross-multiplied Leibniz rule. -/
56 theorem localizedPDeriv_mk
57     (P : Ideal (R (k := k) (n := n))) [P.IsPrime]
58     (i : PhaseVar n) (a : R) (s : P.primeCompl) :
59     extendDerivation k (R (k := k) (n := n)) (AtPrime P) P.primeCompl
60       ((Algebra.linearMap (R (k := k) (n := n)) (AtPrime P)).compDer
61         (MvPolynomial.pderiv i))
62       (IsLocalization.mk' (AtPrime P) a s) =
63       IsLocalization.mk' (AtPrime P)
64         (s.1 * MvPolynomial.pderiv i a - a * MvPolynomial.pderiv i s.1)
65         ⟨s.1 ^ 2, P.primeCompl.pow_mem s.2 2⟩ := by
66   let B := AtPrime (k := k) (n := n) P
67   let N : R := s.1 * MvPolynomial.pderiv i a - a * MvPolynomial.pderiv i s.1
68   have hnum : algebraMap R B N =
69       algebraMap R B s.1 * algebraMap R B (MvPolynomial.pderiv i a) -
70         algebraMap R B a * algebraMap R B (MvPolynomial.pderiv i s.1) := by
71     simp [N, map_sub, map_mul]
72   have h := Stafford38.Characteristic.LocalizedDerivationQuotient.extendDerivation_apply_mk'_cross
73     (k := k) (A := R (k := k) (n := n)) (B := B) (S := P.primeCompl)
74     ((Algebra.linearMap (R (k := k) (n := n)) B).compDer (MvPolynomial.pderiv i)) a s
75   apply (IsLocalization.map_units B
76     ⟨s.1 ^ 2, P.primeCompl.pow_mem s.2 2⟩).mul_right_inj.mp
77   calc
78     algebraMap R B (s.1 ^ 2) *
79         extendDerivation k R B P.primeCompl
80           ((Algebra.linearMap R B).compDer (MvPolynomial.pderiv i))
81           (IsLocalization.mk' B a s) = algebraMap R B N := by
82         rw [map_pow, mul_comm]
83         exact h.trans hnum.symm
84     _ = algebraMap R B (s.1 ^ 2) *
85         IsLocalization.mk' B N ⟨s.1 ^ 2, P.primeCompl.pow_mem s.2 2⟩ := by
86           rw [mul_comm]
87           exact (IsLocalization.mk'_spec B N
88             ⟨s.1 ^ 2, P.primeCompl.pow_mem s.2 2⟩).symm
89 
90 theorem localizedPDeriv_apply_mk
91     (P : Ideal (R (k := k) (n := n))) [P.IsPrime]
92     (i : PhaseVar n) (a : R (k := k) (n := n)) (s : P.primeCompl) :
93     localizedPDeriv P i (IsLocalization.mk' (AtPrime P) a s) =
94       IsLocalization.mk' (AtPrime P)
95         (s.1 * MvPolynomial.pderiv i a - a * MvPolynomial.pderiv i s.1)
96         ⟨s.1 ^ 2, P.primeCompl.pow_mem s.2 2⟩ := by
97   change extendDerivation k (R (k := k) (n := n)) (AtPrime P) P.primeCompl
98       ((Algebra.linearMap (R (k := k) (n := n)) (AtPrime P)).compDer
99         (MvPolynomial.pderiv i))
100       (IsLocalization.mk' (AtPrime P) a s) = _
101   exact localizedPDeriv_mk P i a s
102 
103 theorem localizedPDeriv_add
104     (P : Ideal (R (k := k) (n := n))) [P.IsPrime]
105     (i : PhaseVar n) (f g : AtPrime P) :
106     localizedPDeriv P i (f + g) = localizedPDeriv P i f + localizedPDeriv P i g :=
107   Derivation.map_add (localizedPDeriv P i) f g
108 
109 theorem localizedPDeriv_mul
110     (P : Ideal (R (k := k) (n := n))) [P.IsPrime]
111     (i : PhaseVar n) (f g : AtPrime P) :
112     localizedPDeriv P i (f * g) =
113       localizedPDeriv P i f * g + f * localizedPDeriv P i g := by
114   rw [Derivation.leibniz]
115   ring
116 
117 theorem localizedPDeriv_algebraMap
118     (P : Ideal (R (k := k) (n := n))) [P.IsPrime]
119     (i : PhaseVar n) (a : R (k := k) (n := n)) :
120     localizedPDeriv P i
121         (algebraMap (R (k := k) (n := n)) (AtPrime P) a) =
122       algebraMap (R (k := k) (n := n)) (AtPrime P) (MvPolynomial.pderiv i a) := by
123   have h := Derivation.congr_fun (localizedPDeriv_compAlgebraMap P i) a
124   change localizedPDeriv P i
125       (algebraMap (R (k := k) (n := n)) (AtPrime P) a) =
126     algebraMap (R (k := k) (n := n)) (AtPrime P) (MvPolynomial.pderiv i a) at h
127   exact h
128 
129 end
130 end Stafford38.Characteristic.LocalizedPartialDerivation
131