math / data /lean /OAI /NumberTheory /PiExponent /Polynomials /HomogeneousSections.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
2.97 kB
import Mathlib.Data.Finsupp.Weight
import Mathlib.LinearAlgebra.Dimension.Constructions
import Mathlib.LinearAlgebra.Dimension.DivisionRing
import Mathlib.LinearAlgebra.Dimension.RankNullity
import Mathlib.LinearAlgebra.Finsupp.Supported
import Mathlib.RingTheory.MvPolynomial.Homogeneous
namespace OAI
namespace PiExponentJets.W64
variable {k Οƒ : Type*} [Field k] [Finite Οƒ]
private theorem finite_exponents_of_degree (n : β„•) :
{d : Οƒ β†’β‚€ β„• | d.degree = n}.Finite :=
(Finsupp.finite_of_degree_le n).subset (fun _ h => le_of_eq h)
noncomputable instance homogeneousSection_finite (n : β„•) :
Module.Finite k (MvPolynomial.homogeneousSubmodule Οƒ k n) := by
rw [MvPolynomial.homogeneousSubmodule_eq_finsupp_supported]
let : Fintype {d : Οƒ β†’β‚€ β„• | d.degree = n} :=
(finite_exponents_of_degree n).fintype
exact Module.Finite.equiv
(AddMonoidAlgebra.supportedEquivFinsupp (R := k) (S := k)
{d : Οƒ β†’β‚€ β„• | d.degree = n}).symm
theorem homogeneousSection_finrank (n : β„•) :
Module.finrank k (MvPolynomial.homogeneousSubmodule Οƒ k n) =
Nat.card {d : Οƒ β†’β‚€ β„• | d.degree = n} := by
rw [MvPolynomial.homogeneousSubmodule_eq_finsupp_supported]
let : Fintype {d : Οƒ β†’β‚€ β„• | d.degree = n} :=
(finite_exponents_of_degree n).fintype
calc
_ = Module.finrank k ({d : Οƒ β†’β‚€ β„• | d.degree = n} β†’β‚€ k) :=
(AddMonoidAlgebra.supportedEquivFinsupp (R := k) (S := k)
{d : Οƒ β†’β‚€ β„• | d.degree = n}).finrank_eq
_ = Nat.card {d : Οƒ β†’β‚€ β„• | d.degree = n} := by
simp only [Module.finrank_finsupp_self, Nat.card_eq_fintype_card]
noncomputable def homogeneousMultiply {d : β„•} (f : MvPolynomial Οƒ k)
(hf : f.IsHomogeneous d) (n : β„•) :
MvPolynomial.homogeneousSubmodule Οƒ k n β†’β‚—[k]
MvPolynomial.homogeneousSubmodule Οƒ k (n + d) where
toFun x := ⟨x.1 * f, x.2.mul hf⟩
map_add' x y := by apply Subtype.ext; exact add_mul _ _ _
map_smul' c x := by apply Subtype.ext; exact smul_mul_assoc _ _ _
omit [Finite Οƒ] in
theorem homogeneousMultiply_injective {d : β„•} (f : MvPolynomial Οƒ k)
(hf : f.IsHomogeneous d) (hf0 : f β‰  0) (n : β„•) :
Function.Injective (homogeneousMultiply f hf n) := by
intro x y h
apply Subtype.ext
exact mul_right_cancelβ‚€ hf0 (congrArg Subtype.val h)
theorem homogeneousCokernel_finrank_add {d : β„•} (f : MvPolynomial Οƒ k)
(hf : f.IsHomogeneous d) (hf0 : f β‰  0) (n : β„•) :
Module.finrank k
(MvPolynomial.homogeneousSubmodule Οƒ k (n + d) β§Έ
LinearMap.range (homogeneousMultiply f hf n)) +
Module.finrank k (MvPolynomial.homogeneousSubmodule Οƒ k n) =
Module.finrank k (MvPolynomial.homogeneousSubmodule Οƒ k (n + d)) := by
have hi := homogeneousMultiply_injective f hf hf0 n
simpa only [LinearMap.finrank_range_of_inj hi] using
(LinearMap.range (homogeneousMultiply f hf n)).finrank_quotient_add_finrank
end PiExponentJets.W64
end OAI