File size: 2,970 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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