Module

Divisor_exists_symmValue_rows_kernel_iff.lean

Nyll.AlgebraicCurves.Divisors.Divisor_exists_symmValue_rows_kernel_iff
73 declarations indexed from sourceView source ↗

Divisor exists symm Value rows kernel iff

Imports24
Imported by1

Declarations

AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_ord_algebraMap
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_ord_algebraMap (v : Place k F) (c : k) :
    v.ord (algebraMap k F c) = 0
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_ord_neg
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_ord_neg (v : Place k F) (x : F) : v.ord (-x) = v.ord x
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_unique
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_unique (v : Place k F) {x : F} {c c' : k}
    (h : x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (h' : x = algebraMap k F c' ∨ 0 < v.ord (x - algebraMap k F c')) : c = c'
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_ord_add_min
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_ord_add_min (v : Place k F) {x y : F} (hx : x ≠ 0) (hy : y ≠ 0)
    (hxy : x + y ≠ 0) : min (v.ord x) (v.ord y) ≤ v.ord (x + y)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_add
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_add (v : Place k F) {x y : F} {c e : k}
    (hc : x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (he : y = algebraMap k F e ∨ 0 < v.ord (y - algebraMap k F e)) :
    x + y = algebraMap k F (c + e) ∨ 0 < v.ord (x + y - algebraMap k F (c + e))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_mul
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_mul (v : Place k F) {x y : F} {c e : k}
    (hx : x ∈ v.toValuationSubring)
    (hc : x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (he : y = algebraMap k F e ∨ 0 < v.ord (y - algebraMap k F e)) :
    x * y = algebraMap k F (c * e) ∨ 0 < v.ord (x * y - algebraMap k F (c * e))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_pow
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_pow (v : Place k F) {x : F} {c : k}
    (hx : x ∈ v.toValuationSubring)
    (hc : x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c)) (m : ℕ) :
    x ^ m = algebraMap k F (c ^ m) ∨ 0 < v.ord (x ^ m - algebraMap k F (c ^ m))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_sum
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_sum {ι : Type*} (v : Place k F) (s : Finset ι)
    (f : ι → F) (g : ι → k)
    (h : ∀ i ∈ s, f i = algebraMap k F (g i) ∨ 0 < v.ord (f i - algebraMap k F (g i))) :
    (∑ i ∈ s, f i) = algebraMap k F (∑ i ∈ s, g i)
      ∨ 0 < v.ord ((∑ i ∈ s, f i) - algebraMap k F (∑ i ∈ s, g i))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_aeval_mem
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_aeval_mem (v : Place k F) {x : F} (hx : x ∈ v.toValuationSubring)
    (p : Polynomial k) : Polynomial.aeval x p ∈ v.toValuationSubring
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_aeval
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_aeval (v : Place k F) {x : F} {c : k}
    (hx : x ∈ v.toValuationSubring)
    (hc : x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (p : Polynomial k) :
    Polynomial.aeval x p = algebraMap k F (Polynomial.eval c p)
      ∨ 0 < v.ord (Polynomial.aeval x p - algebraMap k F (Polynomial.eval c p))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_eval₂
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_eval₂ {K₀ : Type*} [Field K₀] [Algebra K₀ k] (v : Place k F)
    {x y : F} {c e : k}
    (hx : x ∈ v.toValuationSubring) (hy : y ∈ v.toValuationSubring)
    (hc : x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (he : y = algebraMap k F e ∨ 0 < v.ord (y - algebraMap k F e))
    (χ : Polynomial (Polynomial K₀)) :
    Polynomial.eval₂ ((Polynomial.aeval x).toRingHom.comp (Polynomial.mapRingHom (algebraMap K₀ k)))
        y χ
      = algebraMap k F (Polynomial.eval₂ (Polynomial.eval₂RingHom (algebraMap K₀ k) c) e χ)
    ∨ 0 < v.ord (Polynomial.eval₂
        ((Polynomial.aeval x).toRingHom.comp (Polynomial.mapRingHom (algebraMap K₀ k))) y χ
      - algebraMap k F (Polynomial.eval₂ (Polynomial.eval₂RingHom (algebraMap K₀ k) c) e χ))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_pin_eval₂_eq_zero
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section pinpack
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGM_pin_eval₂_eq_zero {K₀ : Type*} [Field K₀] [Algebra K₀ k] (v : Place k F)
    {x y : F} {c e : k}
    (hx : x ∈ v.toValuationSubring) (hy : y ∈ v.toValuationSubring)
    (hc : x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (he : y = algebraMap k F e ∨ 0 < v.ord (y - algebraMap k F e))
    (χ : Polynomial (Polynomial K₀))
    (hkill : Polynomial.eval₂
      ((Polynomial.aeval x).toRingHom.comp (Polynomial.mapRingHom (algebraMap K₀ k))) y χ = 0) :
    Polynomial.eval₂ (Polynomial.eval₂RingHom (algebraMap K₀ k) c) e (χ) = 0
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_exists_mulMatrix_chi
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section chilane
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_exists_mulMatrix_chi {j : F} (hj : Transcendental k j)
    (n : ℕ) (b : Fin n → F)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i)
    (d : Polynomial K₀) (hd : d ≠ 0) (A : Fin n → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (hmul : ∀ i i' : Fin n, b i * b i' * Polynomial.aeval j (d.map (algebraMap K₀ k))
      = ∑ i'' : Fin n, Polynomial.aeval j ((A i i'' i').map (algebraMap K₀ k)) * b i'')
    (c₀ : Polynomial K₀) (cc : Fin n → Polynomial K₀) :
    ∃ (M : Matrix (Fin n) (Fin n) (Polynomial K₀)) (χ : Polynomial (Polynomial K₀)),
      χ.Monic ∧
      (∀ (m : ℕ) (i : Fin n),
        (Polynomial.aeval j (c₀.map (algebraMap K₀ k))
            + ∑ i' : Fin n, Polynomial.aeval j ((cc i' * d).map (algebraMap K₀ k)) * b i') ^ m
          * (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i)
        = ∑ i' : Fin n, Polynomial.aeval j (((M ^ m) i' i).map (algebraMap K₀ k))
            * (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i')) ∧
      Polynomial.eval₂
        ((Polynomial.aeval j).toRingHom.comp (Polynomial.mapRingHom (algebraMap K₀ k)))
        (Polynomial.aeval j (c₀.map (algebraMap K₀ k))
          + ∑ i' : Fin n, Polynomial.aeval j ((cc i' * d).map (algebraMap K₀ k)) * b i') χ
      = 0
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_isIntegral_form
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section chilane
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_isIntegral_form {j : F} (hj : Transcendental k j)
    (n : ℕ) (b : Fin n → F)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i)
    (d : Polynomial K₀) (hd : d ≠ 0) (A : Fin n → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (hmul : ∀ i i' : Fin n, b i * b i' * Polynomial.aeval j (d.map (algebraMap K₀ k))
      = ∑ i'' : Fin n, Polynomial.aeval j ((A i i'' i').map (algebraMap K₀ k)) * b i'')
    (c₀ : Polynomial K₀) (cc : Fin n → Polynomial K₀) :
    IsIntegral (Algebra.adjoin k ({j} : Set F))
      (Polynomial.aeval j (c₀.map (algebraMap K₀ k))
        + ∑ i' : Fin n, Polynomial.aeval j ((cc i' * d).map (algebraMap K₀ k)) * b i')
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_isIntegral_j
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section chilane
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_isIntegral_j {j : F} :
    IsIntegral (Algebra.adjoin k ({j} : Set F)) j
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_isIntegral_db
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section chilane
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_isIntegral_db {j : F} (hj : Transcendental k j)
    (n : ℕ) (b : Fin n → F)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i)
    (d : Polynomial K₀) (hd : d ≠ 0) (A : Fin n → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (hmul : ∀ i i' : Fin n, b i * b i' * Polynomial.aeval j (d.map (algebraMap K₀ k))
      = ∑ i'' : Fin n, Polynomial.aeval j ((A i i'' i').map (algebraMap K₀ k)) * b i'') :
    ∀ i : Fin n, IsIntegral (Algebra.adjoin k ({j} : Set F))
      (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_isPrincipalIdealRing_adjoin
Source context 12 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section gstar
open IsDedekindDomain
open scoped IntermediateField.algebraAdjoinAdjoin
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_isPrincipalIdealRing_adjoin (j : F) :
    IsPrincipalIdealRing (Algebra.adjoin k ({j} : Set F))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_isIntegral_adjoin_of_forall_mem
Source context 12 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section gstar
open IsDedekindDomain
open scoped IntermediateField.algebraAdjoinAdjoin
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_isIntegral_adjoin_of_forall_mem {j : F}
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    [Algebra.IsSeparable (IntermediateField.adjoin k ({j} : Set F)) F]
    {x : F} (hx : ∀ v : Place k F, j ∈ v.toValuationSubring → x ∈ v.toValuationSubring) :
    IsIntegral (Algebra.adjoin k ({j} : Set F)) x
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_exists_aeval_eq_trace_of_isIntegral
Source context 12 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section gstar
open IsDedekindDomain
open scoped IntermediateField.algebraAdjoinAdjoin
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_exists_aeval_eq_trace_of_isIntegral {j : F}
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    [Algebra.IsSeparable (IntermediateField.adjoin k ({j} : Set F)) F]
    {x : F} (hint : IsIntegral (Algebra.adjoin k ({j} : Set F)) x) :
    ∃ p : Polynomial k, Polynomial.aeval j p =
      ((Algebra.trace (IntermediateField.adjoin k ({j} : Set F)) F x :
        IntermediateField.adjoin k ({j} : Set F)) : F)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_exists_basis
Source context 12 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section gstar
open IsDedekindDomain
open scoped IntermediateField.algebraAdjoinAdjoin
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_exists_basis {j : F} (hj : Transcendental k j) (n : ℕ) (b : Fin n → F)
    (hbli : ∀ c : Fin n → Polynomial k,
      (∑ i : Fin n, Polynomial.aeval j (c i) * b i) = 0 → ∀ i, c i = 0)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i) :
    ∃ bE : Module.Basis (Fin n) (IntermediateField.adjoin k ({j} : Set F)) F, ⇑bE = b
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_gram_denom
Source context 12 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section gstar
open IsDedekindDomain
open scoped IntermediateField.algebraAdjoinAdjoin
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_gram_denom {j : F} (hj : Transcendental k j)
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    [Algebra.IsSeparable (IntermediateField.adjoin k ({j} : Set F)) F]
    (n : ℕ) (b : Fin n → F)
    (hbli : ∀ c : Fin n → Polynomial k,
      (∑ i : Fin n, Polynomial.aeval j (c i) * b i) = 0 → ∀ i, c i = 0)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i)
    (d : Polynomial K₀) (hd : d ≠ 0) (A : Fin n → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (hmul : ∀ i i' : Fin n, b i * b i' * Polynomial.aeval j (d.map (algebraMap K₀ k))
      = ∑ i'' : Fin n, Polynomial.aeval j ((A i i'' i').map (algebraMap K₀ k)) * b i'') :
    ∃ Δ : Polynomial K₀, Δ ≠ 0 ∧ ∀ x : F, IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ c : Fin n → Polynomial k,
        Polynomial.aeval j (Δ.map (algebraMap K₀ k)) * x
          = ∑ i : Fin n, Polynomial.aeval j (c i)
              * (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_isIntegral_aeval
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section enum
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_isIntegral_aeval (j : F) (p : Polynomial k) :
    IsIntegral (Algebra.adjoin k ({j} : Set F)) (Polynomial.aeval j p)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_exists_enum
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section enum
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
open scoped Classical in
theorem mwALGM_exists_enum (S : Finset (Place k F)) (m : Place k F → ℕ) :
    ∃ (r : ℕ) (pt : Fin r → Place k F),
      (∀ t, pt t ∈ S) ∧
      (∀ v : Place k F, ((∑ t, Finsupp.single (pt t) (1 : ℤ) : Divisor k F) v)
        = if v ∈ S then (m v : ℤ) else 0) ∧
      r = ∑ v ∈ S, m v := by
  classical
  induction S using Finset.induction with
  | empty =>
    refine ⟨0, Fin.elim0, fun t => t.elim0, fun v => ?_, by simp⟩
    rw [Finset.univ_eq_empty, Finset.sum_empty, ite_eq_right (Finset.notMem_empty v)]
    simp
  | insert a s ha ih =>
    obtain ⟨r, pt, hmem, hcount, hr⟩ := ih
    refine ⟨m a + r, Fin.append (fun _ => a) pt, ?_, ?_, ?_⟩
    · intro t
      refine Fin.addCases (fun i => ?_) (fun i => ?_) t
      · rw [Fin.append_left]
        exact Finset.mem_insert_self a s
      · rw [Fin.append_right]
        exact Finset.mem_insert_of_mem (hmem i)
    · intro v
      have hsplit : (∑ t : Fin (m a + r), Finsupp.single (Fin.append (fun _ => a) pt t) (1 : ℤ)
          : Divisor k F)
          = (Finsupp.single a (m a : ℤ) : Divisor k F)
            + ∑ t : Fin r, Finsupp.single (pt t) (1 : ℤ) := by
        rw [Fin.sum_univ_add]
        congr 1
        · have h1 : ∀ i : Fin (m a), Finsupp.single
              (Fin.append (fun _ => a) pt (Fin.castAdd r i)) (1 : ℤ) = Finsupp.single a 1 := by
            intro i
            rw [Fin.append_left]
          rw [Finset.sum_congr rfl fun i _ => h1 i, Finset.sum_const, Finset.card_univ,
            Fintype.card_fin, Finsupp.smul_single, nsmul_eq_mul, mul_one]
        · exact Finset.sum_congr rfl fun i _ => by rw [Fin.append_right]
      rw [hsplit, Finsupp.add_apply, hcount v, Finsupp.single_apply]
      by_cases hv : v = a
      · subst hv
        rw [ite_eq_left rfl, ite_eq_left (Finset.mem_insert_self v s), ite_eq_right ha, add_zero]
      · rw [ite_eq_right fun h => hv h.symm, zero_add]
        by_cases hvs : v ∈ s
        · rw [ite_eq_left hvs, ite_eq_left (Finset.mem_insert_of_mem hvs)]
        · rw [ite_eq_right hvs, ite_eq_right fun h => (Finset.mem_insert.mp h).elim hv hvs]
    · rw [hr, Finset.sum_insert ha]
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_enum
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section enum
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_enum {j : F} (hj : Transcendental k j)
    (hrat : ∀ (v : Place k F) (x : F), j ∈ v.toValuationSubring →
      IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ c : k, x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (n : ℕ) (b : Fin n → F)
    (d : Polynomial K₀) (hd : d ≠ 0)
    (hIdb : ∀ i : Fin n, IsIntegral (Algebra.adjoin k ({j} : Set F))
      (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i))
    (Θ : Polynomial K₀) (hΘ : Θ ≠ 0) (hdΘ : d ∣ Θ)
    (a : ℕ) (cL₀ : Fin a → Polynomial K₀) (cL : Fin a → Fin n → Polynomial K₀)
    (hcLd : ∀ s i, d ∣ cL s i)
    (hLnc : ∀ (s : Fin a) (c : k), (Polynomial.aeval j ((cL₀ s).map (algebraMap K₀ k))
      + ∑ i : Fin n, Polynomial.aeval j ((cL s i).map (algebraMap K₀ k)) * b i)
        ≠ algebraMap k F c)
    (hdegnz : ∀ v : Place k F, v.deg ≠ 0)
    (g : ℕ) (D : Divisor k F) (heff : ∀ v, 0 ≤ D v)
    (hdeg : Divisor.degree D = (g : ℤ)) :
    ∃ (r : ℕ) (_ : r ≤ g) (pt : Fin r → Place k F)
      (val : Fin r × Fin (a + 1) → k) (βpt : Fin r → Fin n → k)
      (r' : ℕ) (pt' : Fin r' → Place k F) (jv' : Fin r' → k),
      (∀ t, 0 ≤ (pt t).ord j ∧
        (pt t).ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0) ∧
      (∀ t', 0 < (pt' t').ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k)))) ∧
      (∀ v : Place k F, 0 ≤ v.ord j → D v =
        ((∑ t, Finsupp.single (pt t) (1 : ℤ))
          + ∑ t', Finsupp.single (pt' t') (1 : ℤ) : Divisor k F) v) ∧
      (∀ t, 0 < (pt t).ord (j - algebraMap k F (val (t, 0)))) ∧
      (∀ t (s : Fin a), 0 < (pt t).ord
        ((Polynomial.aeval j ((cL₀ s).map (algebraMap K₀ k))
          + ∑ i : Fin n, Polynomial.aeval j ((cL s i).map (algebraMap K₀ k)) * b i)
          - algebraMap k F (val (t, s.succ)))) ∧
      (∀ t', 0 < (pt' t').ord (j - algebraMap k F (jv' t'))) ∧
      (∀ t i, Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i = algebraMap k F (βpt t i) ∨
        0 < (pt t).ord (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i
          - algebraMap k F (βpt t i))) ∧
      (∀ t, (pt t).ord (Polynomial.aeval j (d.map (algebraMap K₀ k))) = 0)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_Eexpand
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section eexpand
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_Eexpand {j : F}
    (n : ℕ) (b : Fin n → F) (dj : F) (hdj : dj ≠ 0)
    (mdeg r : ℕ) (L : F) (Mp : Matrix (Fin n) (Fin n) (Polynomial K₀))
    (hpow : ∀ (m : ℕ) (i : Fin n), L ^ m * (dj * b i)
      = ∑ i' : Fin n, Polynomial.aeval j (((Mp ^ m) i' i).map (algebraMap K₀ k)) * (dj * b i'))
    (w : Fin r → k) (u : Fin n × Fin (mdeg + 1) → k) :
    (∏ t : Fin r, (L - algebraMap k F (w t)))
      * (∑ i : Fin n, Polynomial.aeval j
          (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b i)
    = ∑ i' : Fin n, Polynomial.aeval j
        (∑ col : Fin n × Fin (mdeg + 1), Polynomial.C (u col)
          * ((∑ m : Fin (r + 1),
                Polynomial.C ((∏ t : Fin r, (Polynomial.X - Polynomial.C (w t))).coeff (m : ℕ))
                * ((Mp ^ (m : ℕ)) i' col.1).map (algebraMap K₀ k))
              * Polynomial.X ^ ((col.2 : Fin (mdeg + 1)) : ℕ))) * b i'
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_ord_prod
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section kerchow
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_ord_prod (v : Place k F) {ι : Type*} (s : Finset ι) (f : ι → F)
    (hf : ∀ i ∈ s, f i ≠ 0) : v.ord (∏ i ∈ s, f i) = ∑ i ∈ s, v.ord (f i)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_sum_single_apply
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section kerchow
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
open scoped Classical in
theorem mwALGM_sum_single_apply {m : ℕ} (p : Fin m → Place k F) (w : Place k F) :
    ((∑ t, Finsupp.single (p t) (1 : ℤ) : Divisor k F)) w
      = ∑ t, if p t = w then (1 : ℤ) else 0 := by
  rw [Finsupp.finsetSum_apply]
  exact Finset.sum_congr rfl fun t _ => Finsupp.single_apply
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_ker_chow
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section kerchow
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_ker_chow {j : F} (hj : Transcendental k j)
    (n : ℕ) (b : Fin n → F)
    (hbli : ∀ c : Fin n → Polynomial k,
      (∑ i : Fin n, Polynomial.aeval j (c i) * b i) = 0 → ∀ i, c i = 0)
    (d : Polynomial K₀) (hd : d ≠ 0) (Δ : Polynomial K₀) (hΔ : Δ ≠ 0)
    (q₀ : Polynomial K₀) (hq₀ : q₀ ≠ 0) (Θ : Polynomial K₀) (hΘ : Θ = Δ * d * q₀)
    (v₀ : Place k F) (e : ℕ) (D : Divisor k F)
    (a : ℕ) {r : ℕ} (pt : Fin r → Place k F) (val : Fin r × Fin (a + 1) → k)
    {r' : ℕ} (pt' : Fin r' → Place k F) (jv' : Fin r' → k)
    (hpt : ∀ t, 0 ≤ (pt t).ord j ∧
      (pt t).ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0)
    (henum : ∀ v : Place k F, 0 ≤ v.ord j → D v =
      ((∑ t, Finsupp.single (pt t) (1 : ℤ))
        + ∑ t', Finsupp.single (pt' t') (1 : ℤ) : Divisor k F) v)
    (hval0 : ∀ t, 0 < (pt t).ord (j - algebraMap k F (val (t, 0))))
    (L : Fin a → F)
    (hLreg : ∀ (s : Fin a) (v : Place k F), j ∈ v.toValuationSubring →
      L s ∈ v.toValuationSubring)
    (hvalL : ∀ t (s : Fin a), 0 < (pt t).ord (L s - algebraMap k F (val (t, s.succ))))
    (hjv' : ∀ t', 0 < (pt' t').ord (j - algebraMap k F (jv' t')))
    (gU : F) (E : Fin a → Fin n → Polynomial k)
    (hE : ∀ s : Fin a, (∏ t : Fin r, (L s - algebraMap k F (val (t, s.succ)))) * gU
      = ∑ i' : Fin n, Polynomial.aeval j (E s i') * b i')
    (hord : ∀ v : Place k F,
      0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
        + v.ord (gU * (Polynomial.aeval j
            ((∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
              * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
              * q₀.map (algebraMap K₀ k)))⁻¹))
    (hNB : ∀ S : Polynomial k, S ≠ 0 → IsCoprime S (Δ.map (algebraMap K₀ k)) →
      ∀ (N g : F) (E' : Fin n → Polynomial k),
        N * g = ∑ i : Fin n, Polynomial.aeval j (E' i) * b i →
        (∀ v : Place k F, j ∈ v.toValuationSubring →
          Polynomial.aeval j (d.map (algebraMap K₀ k)) * N * g
            * (Polynomial.aeval j S)⁻¹ ∈ v.toValuationSubring) →
        ∃ q : Fin n → Polynomial k, ∀ i, E' i = S * q i) :
    ∀ (s : Fin a) (i' : Fin n),
      (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0)))) ∣ E s i'
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGMdev.mwALGM_theta_choice
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGMdev
section theta
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGM_theta_choice {j : F} (hchar : CharZero K₀)
    (n : ℕ) (b : Fin n → F) (d : Polynomial K₀) (g : ℕ)
    (hNC : ∀ (β : Fin n → F) (θc : Fin (n + 1) → k), Function.Injective θc →
      ∃ s, ∀ c : k, (j + ∑ i : Fin n, algebraMap k F (θc s ^ (i.val + 1)) * β i)
        ≠ algebraMap k F c) :
    ∃ (θ : Fin (n * (g + 1) + 1) → K₀), Function.Injective θ ∧
      ∀ (s : Fin (n * (g + 1) + 1)) (c : k),
        (Polynomial.aeval j (Polynomial.X.map (algebraMap K₀ k))
          + ∑ i : Fin n, Polynomial.aeval j ((Polynomial.C (θ s ^ (i.val + 1)) * d).map
              (algebraMap K₀ k)) * b i)
          ≠ algebraMap k F c
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_aeval_mem
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_aeval_mem (v : Place k F) {j : F} (hjv : j ∈ v.toValuationSubring)
    (p : Polynomial k) : Polynomial.aeval j p ∈ v.toValuationSubring
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_algebraMap
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ord_algebraMap (v : Place k F) {c : k} (hc : c ≠ 0) :
    v.ord (algebraMap k F c) = 0
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_add_eq_of_lt
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ord_add_eq_of_lt (v : Place k F) {x y : F} (hx : x ≠ 0) (hy : y ≠ 0)
    (hlt : v.ord x < v.ord y) : v.ord (x + y) = v.ord x
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_finset_prod
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ord_finset_prod (v : Place k F) {ι : Type*} (s : Finset ι) (f : ι → F)
    (hf : ∀ i ∈ s, f i ≠ 0) : v.ord (∏ i ∈ s, f i) = ∑ i ∈ s, v.ord (f i)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_aeval_of_ord_neg
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ord_aeval_of_ord_neg (w : Place k F) {j : F} (hw : w.ord j < 0)
    (p : Polynomial k) (hp : p ≠ 0) :
    Polynomial.aeval j p ≠ 0 ∧ w.ord (Polynomial.aeval j p) = (p.natDegree : ℤ) * w.ord j
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_prod_sub_eq_card_mul
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
open scoped Classical in
theorem mwALGN_ord_prod_sub_eq_card_mul (w : Place k F) {L : F} (c : k)
    (hLc : 0 < w.ord (L - algebraMap k F c)) {r : ℕ} (wv : Fin r → k) :
    w.ord (∏ t, (L - algebraMap k F (wv t)))
      = ((Finset.univ.filter fun t => wv t = c).card : ℤ) * w.ord (L - algebraMap k F c) := by
  have hLc0 : L - algebraMap k F c ≠ 0 := by
    intro h
    rw [h, ord_zero] at hLc
    exact lt_irrefl _ hLc
  have hfac : ∀ t, (L - algebraMap k F (wv t)) ≠ 0 ∧
      w.ord (L - algebraMap k F (wv t))
        = if wv t = c then w.ord (L - algebraMap k F c) else 0 := by
    intro t
    by_cases ht : wv t = c
    · rw [ite_eq_left ht, ht]
      exact ⟨hLc0, rfl⟩
    · rw [ite_eq_right ht]
      have hsplit : L - algebraMap k F (wv t)
          = algebraMap k F (c - wv t) + (L - algebraMap k F c) := by
        rw [map_sub]
        ring
      have hc0 : c - wv t ≠ 0 := sub_ne_zero.mpr (Ne.symm ht)
      have hc0' : algebraMap k F (c - wv t) ≠ 0 := (_root_.map_ne_zero _).mpr hc0
      have hlt : w.ord (algebraMap k F (c - wv t)) < w.ord (L - algebraMap k F c) := by
        rw [mwALGN_ord_algebraMap w hc0]
        exact hLc
      have hne : L - algebraMap k F (wv t) ≠ 0 := by
        rw [hsplit]
        intro h0
        have h1 : L - algebraMap k F c = -algebraMap k F (c - wv t) :=
          (neg_eq_of_add_eq_zero_right h0).symm
        rw [h1, ord_neg] at hlt
        exact lt_irrefl _ hlt
      refine ⟨hne, ?_⟩
      rw [hsplit, mwALGN_ord_add_eq_of_lt w hc0' hLc0 hlt, mwALGN_ord_algebraMap w hc0]
  rw [mwALGN_ord_finset_prod w _ _ fun t _ => (hfac t).1]
  simp_rw [(hfac _).2]
  rw [Finset.sum_ite, Finset.sum_const_zero, add_zero, Finset.sum_const, nsmul_eq_mul]
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_aeval_le_of_mul_eq
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ord_aeval_le_of_mul_eq (v : Place k F) {j : F} (hjv : j ∈ v.toValuationSubring)
    {n : ℕ} (b : Fin n → F) (hb : ∀ i, b i ∈ v.toValuationSubring)
    (S : Polynomial k) {N g : F} (hN0 : N ≠ 0) (hg0 : g ≠ 0) {d : ℤ} (hN : v.ord N = d)
    (q : Fin n → Polynomial k)
    (hq : N * g = Polynomial.aeval j S * ∑ i, Polynomial.aeval j (q i) * b i) :
    v.ord (Polynomial.aeval j S) ≤ d + v.ord g
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_prod_sub_eq_card
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
open scoped Classical in
theorem mwALGN_ord_prod_sub_eq_card (v : Place k F) {r : ℕ} (pt : Fin r → Place k F)
    {L : F} (hL : L ∈ v.toValuationSubring) {c : k} (hLc : v.ord (L - algebraMap k F c) = 1)
    (w : Fin r → k) (hw : ∀ t, pt t = v → w t = c) (hsep : ∀ t, pt t ≠ v → w t ≠ c) :
    v.ord (∏ t, (L - algebraMap k F (w t)))
      = ((Finset.univ.filter fun t => pt t = v).card : ℤ) := by
  classical
  have _ := hL
  have hLc0 : L - algebraMap k F c ≠ 0 := by
    intro h
    rw [h, ord_zero] at hLc
    exact zero_ne_one hLc
  have hfac : ∀ t, L - algebraMap k F (w t) ≠ 0 ∧
      v.ord (L - algebraMap k F (w t)) = if pt t = v then 1 else 0 := by
    intro t
    by_cases ht : pt t = v
    · rw [ite_eq_left ht, hw t ht]
      exact ⟨hLc0, hLc⟩
    · rw [ite_eq_right ht]
      have hne : c - w t ≠ 0 := sub_ne_zero.mpr (Ne.symm (hsep t ht))
      have hc0 : algebraMap k F (c - w t) ≠ 0 := (_root_.map_ne_zero _).mpr hne
      have hordc : v.ord (algebraMap k F (c - w t)) = 0 := mwALGN_ord_algebraMap v hne
      have hsplit : L - algebraMap k F (w t)
          = algebraMap k F (c - w t) + (L - algebraMap k F c) := by
        rw [map_sub]
        ring
      have hlt : v.ord (algebraMap k F (c - w t)) < v.ord (L - algebraMap k F c) := by
        rw [hordc, hLc]
        exact zero_lt_one
      have h := mwALGN_ord_add_eq_of_lt v hc0 hLc0 hlt
      rw [← hsplit] at h
      refine ⟨fun h0 => ?_, by rw [h, hordc]⟩
      rw [h0, ord_zero, hordc] at h
      have : v.ord (L - algebraMap k F c) = v.ord (-(algebraMap k F (c - w t))) := by
        have hL' : L - algebraMap k F c = -(algebraMap k F (c - w t)) := by
          have := hsplit
          rw [h0] at this
          linear_combination -this
        rw [hL']
      rw [ord_neg, hordc, hLc] at this
      exact one_ne_zero this
  rw [mwALGN_ord_finset_prod v _ _ fun t _ => (hfac t).1]
  simp_rw [fun t => (hfac t).2]
  rw [Finset.sum_boole]
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ordGe

The submodule consisting of zero and the elements whose order is at least the specified bound.

Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
def mwALGN_ordGe (v : Place k F) (m : ℤ) : Submodule k F where
  carrier := {x | x = 0 ∨ m ≤ v.ord x}
  zero_mem' := Or.inl rfl
  add_mem' := by
    intro x y hx hy
    simp only [Set.mem_ofPred_eq] at hx hy ⊢
    by_cases hx0 : x = 0
    · subst hx0
      simpa using hy
    by_cases hy0 : y = 0
    · subst hy0
      simpa using hx
    by_cases hxy : x + y = 0
    · exact Or.inl hxy
    right
    have hx' : m ≤ v.ord x := hx.resolve_left hx0
    have hy' : m ≤ v.ord y := hy.resolve_left hy0
    have h := v.min_ord_le_ord_add hx0 hy0 hxy
    omega
  smul_mem' := by
    intro c x hx
    simp only [Set.mem_ofPred_eq] at hx ⊢
    by_cases hc : c = 0
    · subst hc
      simp
    by_cases hx0 : x = 0
    · subst hx0
      simp
    right
    rw [Algebra.smul_def, v.ord_mul ((_root_.map_ne_zero _).mpr hc) hx0,
      mwALGN_ord_algebraMap v hc, zero_add]
    exact hx.resolve_left hx0
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_mem_ordGe_iff
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_mem_ordGe_iff (v : Place k F) (m : ℤ) (x : F) :
    x ∈ mwALGN_ordGe v m ↔ x = 0 ∨ m ≤ v.ord x
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_mem_of_forall_sum_pow_smul_mem
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_mem_of_forall_sum_pow_smul_mem (W : Submodule k F) {m : ℕ}
    (z : Fin (m + 1) → F) (θ : Fin (m + 1) → k) (hθ : Function.Injective θ)
    (h : ∀ l, (∑ i : Fin (m + 1), θ l ^ (i : ℕ) • z i) ∈ W) (i : Fin (m + 1)) : z i ∈ W
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_exists_exact_form
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_exists_exact_form (v : Place k F) {j : F} {n : ℕ} (β : Fin n → F)
    (cv : k) (hcv : 0 < v.ord (j - algebraMap k F cv))
    (βv : Fin n → k) (hβv : ∀ i, β i = algebraMap k F (βv i) ∨ 0 < v.ord (β i - algebraMap k F (βv
      i)))
    (hU1 : v.ord (j - algebraMap k F cv) = 1 ∨ ∃ i, v.ord (β i - algebraMap k F (βv i)) = 1)
    {r : ℕ} (pt : Fin r → Place k F) (cpt : Fin r → k) (βpt : Fin r → Fin n → k)
    (hS1 : ∀ t, pt t ≠ v → cpt t ≠ cv ∨ βpt t ≠ βv)
    {a : ℕ} (θ : Fin a → k) (hθ : Function.Injective θ) (ha : n * (r + 1) < a) :
    ∃ s : Fin a,
      v.ord ((j + ∑ i : Fin n, algebraMap k F (θ s ^ (i.val + 1)) * β i)
          - algebraMap k F (cv + ∑ i : Fin n, θ s ^ (i.val + 1) * βv i)) = 1 ∧
      ∀ t, pt t ≠ v →
        cpt t + ∑ i : Fin n, θ s ^ (i.val + 1) * βpt t i ≠ cv + ∑ i : Fin n, θ s ^ (i.val + 1) * βv
          i
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_dvd_of_forall_mem
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_dvd_of_forall_mem {j : F} (hj : Transcendental k j)
    {n : ℕ} (b : Fin n → F)
    (hbli : ∀ c : Fin n → Polynomial k,
      (∑ i : Fin n, Polynomial.aeval j (c i) * b i) = 0 → ∀ i, c i = 0)
    (Δ d : Polynomial k) (hd : d ≠ 0)
    (hG : ∀ x : F, IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ ρ : Fin n → Polynomial k, Polynomial.aeval j Δ * x
        = ∑ i, Polynomial.aeval j (ρ i) * (Polynomial.aeval j d * b i))
    (hint : ∀ x : F, (∀ v : Place k F, j ∈ v.toValuationSubring → x ∈ v.toValuationSubring) →
      IsIntegral (Algebra.adjoin k ({j} : Set F)) x)
    (S : Polynomial k) (hS : S ≠ 0) (hSΔ : IsCoprime S Δ) {N g : F} (E : Fin n → Polynomial k)
    (hE : N * g = ∑ i, Polynomial.aeval j (E i) * b i)
    (hx : ∀ v : Place k F, j ∈ v.toValuationSubring →
      Polynomial.aeval j d * N * g * (Polynomial.aeval j S)⁻¹ ∈ v.toValuationSubring) :
    ∃ q : Fin n → Polynomial k, ∀ i, E i = S * q i
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_exists_nonconst_form
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_exists_nonconst_form {j : F} (hj : Transcendental k j) {n : ℕ} (β : Fin n → F)
    (θ : Fin (n + 1) → k) (hθ : Function.Injective θ) :
    ∃ s, ∀ c : k, (j + ∑ i : Fin n, algebraMap k F (θ s ^ (i.val + 1)) * β i)
      ≠ algebraMap k F c
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_pin_iff
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_pin_iff (v : Place k F) (x : F) (c : k) :
    (x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
      ↔ x - algebraMap k F c ∈ mwALGN_ordGe v 1
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ordGe_mul_mem
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ordGe_mul_mem (v : Place k F) (m : ℤ) {x y : F} (hx : x ∈ mwALGN_ordGe v m)
    (hy : y ∈ v.toValuationSubring) : x * y ∈ mwALGN_ordGe v m
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ordGe_mul_mem'
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ordGe_mul_mem' (v : Place k F) (m : ℤ) {x y : F} (hx : x ∈ v.toValuationSubring)
    (hy : y ∈ mwALGN_ordGe v m) : x * y ∈ mwALGN_ordGe v m
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_eq_zero_of_algebraMap_mem_ordGe
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_eq_zero_of_algebraMap_mem_ordGe (v : Place k F) {m : ℤ} (hm : 0 < m) {c : k}
    (hc : algebraMap k F c ∈ mwALGN_ordGe v m) : c = 0
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_aeval_sub_algebraMap_eval_mem
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_aeval_sub_algebraMap_eval_mem (v : Place k F) (m : ℤ) {j : F}
    (hjv : j ∈ v.toValuationSubring) {c : k} (hjc : j - algebraMap k F c ∈ mwALGN_ordGe v m)
    (ρ : Polynomial k) :
    Polynomial.aeval j ρ - algebraMap k F (ρ.eval c) ∈ mwALGN_ordGe v m
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_sum_aeval_mul_sub_mem
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_sum_aeval_mul_sub_mem (v : Place k F) (m : ℤ) {j : F}
    (hjv : j ∈ v.toValuationSubring) {c : k} (hjc : j - algebraMap k F c ∈ mwALGN_ordGe v m)
    {n : ℕ} (β : Fin n → F) (hβ : ∀ i, β i ∈ v.toValuationSubring) (βv : Fin n → k)
    (hβv : ∀ i, β i - algebraMap k F (βv i) ∈ mwALGN_ordGe v m) (ρ : Fin n → Polynomial k) :
    (∑ i, Polynomial.aeval j (ρ i) * β i) - algebraMap k F (∑ i, (ρ i).eval c * βv i)
      ∈ mwALGN_ordGe v m
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_exists_rows_of_submodule
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_exists_rows_of_submodule {ι : Type*} [Fintype ι]
    (W : Submodule k (ι → k)) :
    ∃ (R : ℕ) (Y : Fin R → ι → k), ∀ u : ι → k, (∀ ρ, ∑ c, Y ρ c * u c = 0) ↔ u ∈ W
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_exists_menu
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_exists_menu {ι : Type*} [Fintype ι] (gmap : (ι → k) →ₗ[k] F)
    {Z : Type*} [Finite Z] (plc : Z → Place k F) {T : Type*} [Finite T] (μ : T → Z → ℤ) :
    ∃ (M : ℕ) (eT : T ≃ Fin M) (Rm : Fin M → ℕ) (Y : (l : Fin M) → Fin (Rm l) → ι → k),
      ∀ (τ : T) (u : ι → k),
        (∀ ρ : Fin (Rm (eT τ)), ∑ c, Y (eT τ) ρ c * u c = 0)
          ↔ (gmap u = 0 ∨ ∀ z, μ τ z ≤ (plc z).ord (gmap u))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_isPrincipalIdealRing_adjoin
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
section cfin
open scoped IntermediateField.algebraAdjoinAdjoin
theorem mwALGN_isPrincipalIdealRing_adjoin (j : F) :
    IsPrincipalIdealRing (Algebra.adjoin k ({j} : Set F))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_exists_isIntegral_ord_eq_one
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
section cfin
open scoped IntermediateField.algebraAdjoinAdjoin
theorem mwALGN_exists_isIntegral_ord_eq_one {j : F}
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    [Algebra.IsSeparable (IntermediateField.adjoin k ({j} : Set F)) F]
    (v : Place k F) (hjv : j ∈ v.toValuationSubring) :
    ∃ π : F, IsIntegral (Algebra.adjoin k ({j} : Set F)) π ∧ v.ord π = 1
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_U1
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
section cfin
open scoped IntermediateField.algebraAdjoinAdjoin
theorem mwALGN_U1 (v : Place k F) {j : F} (hj : Transcendental k j)
    (hjv : j ∈ v.toValuationSubring) {n : ℕ} (β : Fin n → F)
    (hβ : ∀ i, β i ∈ v.toValuationSubring)
    (Δ : Polynomial k) (hΔ0 : Δ ≠ 0) (hΔv : v.ord (Polynomial.aeval j Δ) = 0)
    (hG : ∀ x : F, IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ ρ : Fin n → Polynomial k, Polynomial.aeval j Δ * x
        = ∑ i, Polynomial.aeval j (ρ i) * β i)
    {π : F} (hπ : IsIntegral (Algebra.adjoin k ({j} : Set F)) π) (hπ1 : v.ord π = 1)
    (cv : k) (hcv : 0 < v.ord (j - algebraMap k F cv))
    (βv : Fin n → k)
    (hβv : ∀ i, β i = algebraMap k F (βv i) ∨ 0 < v.ord (β i - algebraMap k F (βv i))) :
    v.ord (j - algebraMap k F cv) = 1 ∨ ∃ i, v.ord (β i - algebraMap k F (βv i)) = 1
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_S1
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
section cfin
open scoped IntermediateField.algebraAdjoinAdjoin
theorem mwALGN_S1 {j : F} (hj : Transcendental k j)
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    [Algebra.IsSeparable (IntermediateField.adjoin k ({j} : Set F)) F]
    (v w : Place k F) (hjv : j ∈ v.toValuationSubring) (hjw : j ∈ w.toValuationSubring)
    (hne : v ≠ w) {n : ℕ} (β : Fin n → F)
    (hβv : ∀ i, β i ∈ v.toValuationSubring) (hβw : ∀ i, β i ∈ w.toValuationSubring)
    (Δ : Polynomial k) (hΔ0 : Δ ≠ 0) (hΔv : v.ord (Polynomial.aeval j Δ) = 0)
    (hG : ∀ x : F, IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ ρ : Fin n → Polynomial k, Polynomial.aeval j Δ * x
        = ∑ i, Polynomial.aeval j (ρ i) * β i)
    (cv cw : k) (hcv : 0 < v.ord (j - algebraMap k F cv))
    (hcw : 0 < w.ord (j - algebraMap k F cw))
    (βvv βww : Fin n → k)
    (hβvv : ∀ i, β i = algebraMap k F (βvv i) ∨ 0 < v.ord (β i - algebraMap k F (βvv i)))
    (hβww : ∀ i, β i = algebraMap k F (βww i) ∨ 0 < w.ord (β i - algebraMap k F (βww i))) :
    cv ≠ cw ∨ βvv ≠ βww
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ker_good
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
section cfin
open scoped IntermediateField.algebraAdjoinAdjoin
theorem mwALGN_ker_good {K₀ : Type*} [Field K₀] [Algebra K₀ k] {j : F} (hj : Transcendental k j)
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    [Algebra.IsSeparable (IntermediateField.adjoin k ({j} : Set F)) F]
    (hrat : ∀ (v : Place k F) (x : F), j ∈ v.toValuationSubring →
      IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ c : k, x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (n : ℕ) (b : Fin n → F) (d : Polynomial K₀) (hd : d ≠ 0)
    (hIdb : ∀ i : Fin n, IsIntegral (Algebra.adjoin k ({j} : Set F))
      (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i))
    (Δ : Polynomial K₀) (hΔ : Δ ≠ 0)
    (hG : ∀ x : F, IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ c : Fin n → Polynomial k,
        Polynomial.aeval j (Δ.map (algebraMap K₀ k)) * x
          = ∑ i : Fin n, Polynomial.aeval j (c i)
              * (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i))
    (q₀ : Polynomial K₀) (hq₀ : q₀ ≠ 0) (Θ : Polynomial K₀) (hΘ : Θ = Δ * d * q₀)
    (v₀ : Place k F) (e : ℕ)
    (a : ℕ) (θ : Fin a → K₀) (hθ : Function.Injective θ) (g : ℕ) (ha : n * (g + 1) < a)
    (D : Divisor k F) {r : ℕ} (hrle : r ≤ g) (pt : Fin r → Place k F)
    (val : Fin r × Fin (a + 1) → k) (βpt : Fin r → Fin n → k)
    {r' : ℕ} (pt' : Fin r' → Place k F) (jv' : Fin r' → k)
    (hpt : ∀ t, 0 ≤ (pt t).ord j ∧
      (pt t).ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0)
    (hpt' : ∀ t', 0 < (pt' t').ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))))
    (henum : ∀ v : Place k F, 0 ≤ v.ord j → D v =
      ((∑ t, Finsupp.single (pt t) (1 : ℤ))
        + ∑ t', Finsupp.single (pt' t') (1 : ℤ) : Divisor k F) v)
    (hval0 : ∀ t, 0 < (pt t).ord (j - algebraMap k F (val (t, 0))))
    (hvalL : ∀ t (s : Fin a), 0 < (pt t).ord
      ((Polynomial.aeval j ((Polynomial.X : Polynomial K₀).map (algebraMap K₀ k))
        + ∑ i : Fin n, Polynomial.aeval j
            ((Polynomial.C (θ s ^ (i.val + 1)) * d).map (algebraMap K₀ k)) * b i)
        - algebraMap k F (val (t, s.succ))))
    (hjv' : ∀ t', 0 < (pt' t').ord (j - algebraMap k F (jv' t')))
    (hβpt : ∀ t i, Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i
        = algebraMap k F (βpt t i) ∨
      0 < (pt t).ord (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i
        - algebraMap k F (βpt t i)))
    {gU : F} (hgU0 : gU ≠ 0) (E : Fin a → Fin n → Polynomial k)
    (hE : ∀ s : Fin a,
      (∏ t : Fin r, ((Polynomial.aeval j ((Polynomial.X : Polynomial K₀).map (algebraMap K₀ k))
          + ∑ i : Fin n, Polynomial.aeval j
              ((Polynomial.C (θ s ^ (i.val + 1)) * d).map (algebraMap K₀ k)) * b i)
          - algebraMap k F (val (t, s.succ)))) * gU
        = ∑ i' : Fin n, Polynomial.aeval j (E s i') * b i')
    (hdvd : ∀ (s : Fin a) (i' : Fin n),
      (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0)))) ∣ E s i')
    (v : Place k F) (hvj : 0 ≤ v.ord j)
    (hvΘ : v.ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0) (hv₀ : v ≠ v₀) :
    0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
      + v.ord (gU * (Polynomial.aeval j
          ((∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
            * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
            * q₀.map (algebraMap K₀ k)))⁻¹)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_exists_pinData
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
open scoped Classical in
theorem mwALGN_exists_pinData (j : F) (w : Place k F) :
    ∃ (cw : k) (εw : ℤ), ∀ c : k, j ∈ w.toValuationSubring →
      w.ord (j - algebraMap k F c) = if c = cw then εw else 0 := by
  classical
  by_cases h : ∃ c : k, 0 < w.ord (j - algebraMap k F c)
  · obtain ⟨cw, hcw⟩ := h
    refine ⟨cw, w.ord (j - algebraMap k F cw), fun c hj => ?_⟩
    by_cases hc : c = cw
    · rw [ite_eq_left hc, hc]
    · rw [ite_eq_right hc]
      have hmem : j - algebraMap k F c ∈ w.toValuationSubring := sub_mem hj (w.algebraMap_mem' c)
      have h0 := w.ord_nonneg_of_mem hmem
      by_contra hne
      have hpos : 0 < w.ord (j - algebraMap k F c) := lt_of_le_of_ne h0 (Ne.symm hne)
      have hne0 : cw - c ≠ 0 := sub_ne_zero.mpr (Ne.symm hc)
      have hx0 : j - algebraMap k F c ≠ 0 := by
        intro h0'
        rw [h0', ord_zero] at hpos
        exact lt_irrefl _ hpos
      have hy0 : j - algebraMap k F cw ≠ 0 := by
        intro h0'
        rw [h0', ord_zero] at hcw
        exact lt_irrefl _ hcw
      have hcc : (j - algebraMap k F c) + -(j - algebraMap k F cw) = algebraMap k F (cw - c) := by
        rw [map_sub]
        ring
      have hd0 : (j - algebraMap k F c) + -(j - algebraMap k F cw) ≠ 0 := by
        rw [hcc]
        exact (_root_.map_ne_zero _).mpr hne0
      have hmin := w.min_ord_le_ord_add hx0 (neg_ne_zero.mpr hy0) hd0
      rw [ord_neg, hcc, mwALGN_ord_algebraMap w hne0] at hmin
      have : 0 < min (w.ord (j - algebraMap k F c)) (w.ord (j - algebraMap k F cw)) := lt_min hpos
        hcw
      omega
  · push Not at h
    refine ⟨0, w.ord (j - algebraMap k F 0), fun c hj => ?_⟩
    by_cases hc : c = 0
    · rw [ite_eq_left hc, hc]
    · rw [ite_eq_right hc]
      have hmem : j - algebraMap k F c ∈ w.toValuationSubring := sub_mem hj (w.algebraMap_mem' c)
      have h0 := w.ord_nonneg_of_mem hmem
      have h1 := h c
      omega
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_aeval_prod_X_sub_C
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
open scoped Classical in
theorem mwALGN_ord_aeval_prod_X_sub_C (w : Place k F) {j : F} (hj : Transcendental k j)
    {cw : k} {εw : ℤ} (hpin : ∀ c : k, w.ord (j - algebraMap k F c) = if c = cw then εw else 0)
    {r : ℕ} (c : Fin r → k) :
    Polynomial.aeval j (∏ t, (Polynomial.X - Polynomial.C (c t))) ≠ 0 ∧
      w.ord (Polynomial.aeval j (∏ t, (Polynomial.X - Polynomial.C (c t))))
        = ((Finset.univ.filter fun t => c t = cw).card : ℤ) * εw := by
  classical
  have hfac0 : ∀ t, j - algebraMap k F (c t) ≠ 0 := by
    intro t h0
    apply hj
    rw [sub_eq_zero.mp h0]
    exact isAlgebraic_algebraMap _
  have hprod : Polynomial.aeval j (∏ t, (Polynomial.X - Polynomial.C (c t)))
      = ∏ t, (j - algebraMap k F (c t)) := by
    rw [map_prod]
    refine Finset.prod_congr rfl fun t _ => ?_
    rw [map_sub, Polynomial.aeval_X, Polynomial.aeval_C]
  rw [hprod]
  refine ⟨Finset.prod_ne_zero_iff.mpr fun t _ => hfac0 t, ?_⟩
  rw [mwALGN_ord_finset_prod w _ _ fun t _ => hfac0 t]
  simp_rw [hpin]
  rw [Finset.sum_ite, Finset.sum_const_zero, add_zero, Finset.sum_const, nsmul_eq_mul]
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_ord_nonneg_of_ord_sub_pos
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_ord_nonneg_of_ord_sub_pos (w : Place k F) {j : F} (hj : j ≠ 0) {c : k}
    (h : 0 < w.ord (j - algebraMap k F c)) : 0 ≤ w.ord j
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_sum_le_degree
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_sum_le_degree (D : Divisor k F) (heff : ∀ v, 0 ≤ D v)
    (hdeg1 : ∀ v : Place k F, v.deg ≠ 0) (A : Finset (Place k F)) :
    (∑ v ∈ A, D v) ≤ Divisor.degree D
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_card_le_degree
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
open scoped Classical in
theorem mwALGN_card_le_degree (D : Divisor k F) (heff : ∀ v, 0 ≤ D v)
    (hdeg1 : ∀ v : Place k F, v.deg ≠ 0) {r : ℕ} (pt : Fin r → Place k F)
    (hcount : ∀ t, ((Finset.univ.filter fun t₁ => pt t₁ = pt t).card : ℤ) ≤ D (pt t)) :
    (r : ℤ) ≤ Divisor.degree D := by
  classical
  have h1 : (r : ℤ) = ∑ v ∈ Finset.univ.image pt,
      ((Finset.univ.filter fun t => pt t = v).card : ℤ) := by
    have h := Finset.card_eq_sum_card_image pt Finset.univ
    rw [Finset.card_univ, Fintype.card_fin] at h
    exact_mod_cast h
  rw [h1]
  refine le_trans (Finset.sum_le_sum fun v hv => ?_) (mwALGN_sum_le_degree D heff hdeg1 _)
  obtain ⟨t, -, rfl⟩ := Finset.mem_image.mp hv
  exact hcount t
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.AlgebraicCurve.Place.mwALGN_menu_inst
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace AlgebraicCurve
open _root_.AlgebraicCurve
namespace Place
open _root_.AlgebraicCurve.Place
open _root_.AlgebraicCurve
variable {k F : Type*} [Field k] [Field F] [Algebra k F]
theorem mwALGN_menu_inst {K₀ : Type*} [Field K₀] [Algebra K₀ k] {j : F} (hj : Transcendental k j)
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    (hfin : ∀ x : F, x ≠ 0 → {v : Place k F | x ∉ v.toValuationSubring}.Finite)
    (n : ℕ) (b : Fin n → F)
    (hbli : ∀ c : Fin n → Polynomial k,
      (∑ i : Fin n, Polynomial.aeval j (c i) * b i) = 0 → ∀ i, c i = 0)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i)
    (Θ : Polynomial K₀) (hΘ : Θ ≠ 0)
    (q₀ : Polynomial K₀) (hq₀ : q₀ ≠ 0) (v₀ : Place k F) (g e mdeg : ℕ) :
    ∃ (M : ℕ) (Rm : Fin M → ℕ) (Y : (l : Fin M) → Fin (Rm l) → Fin n × Fin (mdeg + 1) → k),
      ∀ (D : Divisor k F), (∀ v, 0 ≤ D v) → Divisor.degree D = (g : ℤ) →
      ∀ (r : ℕ) (pt : Fin r → Place k F) (r' : ℕ) (pt' : Fin r' → Place k F)
        (val0 : Fin r → k) (jv' : Fin r' → k),
      (∀ t, 0 ≤ (pt t).ord j ∧
        (pt t).ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0) →
      (∀ t', 0 < (pt' t').ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k)))) →
      (∀ v : Place k F, 0 ≤ v.ord j → D v =
        ((∑ t, Finsupp.single (pt t) (1 : ℤ))
          + ∑ t', Finsupp.single (pt' t') (1 : ℤ) : Divisor k F) v) →
      (∀ t, 0 < (pt t).ord (j - algebraMap k F (val0 t))) →
      (∀ t', 0 < (pt' t').ord (j - algebraMap k F (jv' t'))) →
      ∃ l : Fin M, ∀ u : Fin n × Fin (mdeg + 1) → k, u ≠ 0 →
        ((∀ ρ : Fin (Rm l), ∑ col, Y l ρ col * u col = 0) ↔
          ∀ v : Place k F,
            (v.ord j < 0 ∨ 0 < v.ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) ∨ v = v₀) →
            0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
              + v.ord ((∑ i : Fin n, Polynomial.aeval j
                    (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b
                      i)
                  * (Polynomial.aeval j
                      ((∏ t, (Polynomial.X - Polynomial.C (val0 t)))
                        * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
                        * q₀.map (algebraMap K₀ k)))⁻¹))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_heqvN
Source context 8 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
def mwALGC_heqvN (a n r : ℕ) : Fin (a * n * r) ≃ (Fin a × Fin n × Fin r)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_Suniv
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section rows
variable {K₀ : Type*} [CommRing K₀]
def mwALGC_Suniv (a r : ℕ) : Polynomial (MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_Suniv_monic
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section rows
variable {K₀ : Type*} [CommRing K₀]
theorem mwALGC_Suniv_monic (a r : ℕ) :
    (mwALGC_Suniv a r : Polynomial (MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀)).Monic
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_Euniv
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section rows
variable {K₀ : Type*} [CommRing K₀]
def mwALGC_Euniv (a n mdeg : ℕ) (Ms : Fin a → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (r : ℕ) (s : Fin a) (i' i : Fin n) (dd : Fin (mdeg + 1)) :
    Polynomial (MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀)
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_chowFamily
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section rows
variable {K₀ : Type*} [CommRing K₀]
def mwALGC_chowFamily (a n mdeg : ℕ) (Ms : Fin a → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (r : ℕ) (ρ : Fin a × Fin n × Fin r) (col : Fin n × Fin (mdeg + 1)) :
    MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_Ek
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section rows
variable {K₀ : Type*} [CommRing K₀]
variable {k : Type*} [CommRing k] [Algebra K₀ k]
def mwALGC_Ek (a n mdeg : ℕ) (Ms : Fin a → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (r : ℕ) (val : Fin r × Fin (a + 1) → k) (s : Fin a) (i' i : Fin n) (dd : Fin (mdeg + 1)) :
    Polynomial k
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_aeval_chowFamily
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section rows
variable {K₀ : Type*} [CommRing K₀]
variable {k : Type*} [CommRing k] [Algebra K₀ k]
theorem mwALGC_aeval_chowFamily (a n mdeg : ℕ)
    (Ms : Fin a → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (r : ℕ) (val : Fin r × Fin (a + 1) → k) (ρ : Fin a × Fin n × Fin r)
    (col : Fin n × Fin (mdeg + 1)) :
    MvPolynomial.aeval
        (fun ak : Fin (a + 1) × Fin (r + 1) =>
          (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, ak.1)))).coeff (ak.2 : ℕ))
        (mwALGC_chowFamily a n mdeg Ms r ρ col)
      = (mwALGC_Ek a n mdeg Ms r val ρ.1 ρ.2.1 col.1 col.2
          %ₘ (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))).coeff (ρ.2.2 : ℕ) := by
  classical
  set f : MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀ →ₐ[K₀] k := MvPolynomial.aeval
    (fun ak : Fin (a + 1) × Fin (r + 1) =>
      (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, ak.1)))).coeff (ak.2 : ℕ)) with hf
  set S : Polynomial k := ∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))) with hSdef
  have hSm : S.Monic := Polynomial.monic_prod_of_monic _ _ fun t _ => Polynomial.monic_X_sub_C _
  have hS : (mwALGC_Suniv a r).map (f : MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀ →+* k) = S := by
    nontriviality k
    have hSd : S.natDegree = r := by
      rw [hSdef, Polynomial.natDegree_prod_of_monic _ _ fun t _ => Polynomial.monic_X_sub_C _]
      simp
    unfold mwALGC_Suniv
    rw [Polynomial.map_add, Polynomial.map_pow, Polynomial.map_X, Polynomial.map_sum]
    conv_rhs => rw [hSm.as_sum, hSd, Finset.sum_range (fun i => Polynomial.C (S.coeff i) *
      Polynomial.X ^ i)]
    congr 1
    refine Finset.sum_congr rfl fun m _ => ?_
    rw [Polynomial.map_mul, Polynomial.map_C, Polynomial.map_pow, Polynomial.map_X, hf,
      AlgHom.coe_toRingHom, MvPolynomial.aeval_X]
    rfl
  have hE : (mwALGC_Euniv a n mdeg Ms r ρ.1 ρ.2.1 col.1 col.2).map
      (f : MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀ →+* k)
      = mwALGC_Ek a n mdeg Ms r val ρ.1 ρ.2.1 col.1 col.2 := by
    unfold mwALGC_Euniv mwALGC_Ek
    rw [Polynomial.map_mul, Polynomial.map_pow, Polynomial.map_X, Polynomial.map_sum]
    congr 1
    refine Finset.sum_congr rfl fun m _ => ?_
    rw [Polynomial.map_mul, Polynomial.map_C, Polynomial.map_map, AlgHom.comp_algebraMap, hf,
      AlgHom.coe_toRingHom, MvPolynomial.aeval_X]
  change (f : MvPolynomial (Fin (a + 1) × Fin (r + 1)) K₀ →+* k)
      ((mwALGC_Euniv a n mdeg Ms r ρ.1 ρ.2.1 col.1 col.2 %ₘ mwALGC_Suniv a r).coeff (ρ.2.2 : ℕ)) = _
  rw [← Polynomial.coeff_map, Polynomial.map_modByMonic _ (mwALGC_Suniv_monic a r), hE, hS]
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_rows_iff_dvd
Source context 11 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section rows
variable {K₀ : Type*} [CommRing K₀]
variable {k : Type*} [CommRing k] [Algebra K₀ k]
theorem mwALGC_rows_iff_dvd (a n mdeg : ℕ)
    (Ms : Fin a → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (r : ℕ) (val : Fin r × Fin (a + 1) → k) (u : Fin n × Fin (mdeg + 1) → k) :
    (∀ ρ : Fin a × Fin n × Fin r, ∑ col, MvPolynomial.aeval
        (fun ak : Fin (a + 1) × Fin (r + 1) =>
          (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, ak.1)))).coeff (ak.2 : ℕ))
        (mwALGC_chowFamily a n mdeg Ms r ρ col) * u col = 0)
      ↔ (∀ (s : Fin a) (i' : Fin n),
        (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
          ∣ ∑ col, Polynomial.C (u col) * mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2) := by
  classical
  simp_rw [mwALGC_aeval_chowFamily]
  set S : Polynomial k := ∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))) with hSdef
  have hSm : S.Monic := Polynomial.monic_prod_of_monic _ _ fun t _ => Polynomial.monic_X_sub_C _
  have hlin : ∀ (s : Fin a) (i' : Fin n),
      (∑ col, Polynomial.C (u col) * mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2) %ₘ S
        = ∑ col, u col • (mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2 %ₘ S) := by
    intro s i'
    have happ : ∀ p : Polynomial k, Polynomial.modByMonicHom S p = p %ₘ S := fun p => rfl
    rw [← happ, map_sum]
    refine Finset.sum_congr rfl fun col _ => ?_
    rw [happ, Polynomial.C_mul', Polynomial.smul_modByMonic]
  have hcoeff : ∀ (s : Fin a) (i' : Fin n) (m : ℕ),
      (∑ col, u col • (mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2 %ₘ S)).coeff m
        = ∑ col, (mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2 %ₘ S).coeff m * u col := by
    intro s i' m
    rw [Polynomial.finsetSum_coeff]
    refine Finset.sum_congr rfl fun col _ => ?_
    rw [Polynomial.coeff_smul, smul_eq_mul, mul_comm]
  rcases subsingleton_or_nontrivial k with hk | hk
  · exact ⟨fun _ s i' => ⟨0, Subsingleton.elim _ _⟩, fun _ ρ => Subsingleton.elim _ _⟩
  by_cases hr : r = 0
  · subst hr
    refine ⟨fun _ s i' => ?_, fun _ ρ => Fin.elim0 ρ.2.2⟩
    rw [show S = 1 from by rw [hSdef]; exact Finset.prod_of_isEmpty _]
    exact one_dvd _
  have hS1 : S ≠ 1 := by
    intro h1
    have hSd : S.natDegree = r := by
      rw [hSdef, Polynomial.natDegree_prod_of_monic _ _ fun t _ => Polynomial.monic_X_sub_C _]
      simp
    rw [h1, Polynomial.natDegree_one] at hSd
    exact hr hSd.symm
  constructor
  · intro h s i'
    rw [← Polynomial.modByMonic_eq_zero_iff_dvd hSm, hlin]
    refine Polynomial.ext fun m => ?_
    rw [Polynomial.coeff_zero]
    by_cases hm : m < r
    · rw [hcoeff]
      exact h (s, i', ⟨m, hm⟩)
    · refine Polynomial.coeff_eq_zero_of_natDegree_lt (lt_of_lt_of_le ?_ (not_lt.mp hm))
      rw [← hlin]
      have hSd : S.natDegree = r := by
        rw [hSdef, Polynomial.natDegree_prod_of_monic _ _ fun t _ => Polynomial.monic_X_sub_C _]
        simp
      have := Polynomial.natDegree_modByMonic_lt
        (∑ col, Polynomial.C (u col) * mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2) hSm hS1
      rwa [hSd] at this
  · rintro h ⟨s, i', ρ₀⟩
    have h1 := h s i'
    rw [← Polynomial.modByMonic_eq_zero_iff_dvd hSm, hlin] at h1
    have h2 := congrArg (fun p : Polynomial k => p.coeff (ρ₀ : ℕ)) h1
    simp only [Polynomial.coeff_zero] at h2
    rw [hcoeff] at h2
    exact h2
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_menu
Source context 10 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section enumeration
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGC_menu {j : F} (hj : Transcendental k j)
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    (hfin : ∀ x : F, x ≠ 0 → {v : Place k F | x ∉ v.toValuationSubring}.Finite)
    (n : ℕ) (b : Fin n → F)
    (hbli : ∀ c : Fin n → Polynomial k,
      (∑ i : Fin n, Polynomial.aeval j (c i) * b i) = 0 → ∀ i, c i = 0)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i)
    (Θ : Polynomial K₀) (hΘ : Θ ≠ 0)
    (q₀ : Polynomial K₀) (hq₀ : q₀ ≠ 0) (v₀ : Place k F) (g e mdeg : ℕ) :
    ∃ (M : ℕ) (Rm : Fin M → ℕ) (Y : (l : Fin M) → Fin (Rm l) → Fin n × Fin (mdeg + 1) → k),
      ∀ (D : Divisor k F), (∀ v, 0 ≤ D v) → Divisor.degree D = (g : ℤ) →
      ∀ (r : ℕ) (pt : Fin r → Place k F) (r' : ℕ) (pt' : Fin r' → Place k F)
        (val0 : Fin r → k) (jv' : Fin r' → k),
      (∀ t, 0 ≤ (pt t).ord j ∧
        (pt t).ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0) →
      (∀ t', 0 < (pt' t').ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k)))) →
      (∀ v : Place k F, 0 ≤ v.ord j → D v =
        ((∑ t, Finsupp.single (pt t) (1 : ℤ))
          + ∑ t', Finsupp.single (pt' t') (1 : ℤ) : Divisor k F) v) →
      (∀ t, 0 < (pt t).ord (j - algebraMap k F (val0 t))) →
      (∀ t', 0 < (pt' t').ord (j - algebraMap k F (jv' t'))) →
      ∃ l : Fin M, ∀ u : Fin n × Fin (mdeg + 1) → k, u ≠ 0 →
        ((∀ ρ : Fin (Rm l), ∑ col, Y l ρ col * u col = 0) ↔
          ∀ v : Place k F,
            (v.ord j < 0 ∨ 0 < v.ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) ∨ v = v₀) →
            0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
              + v.ord ((∑ i : Fin n, Polynomial.aeval j
                    (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b
                      i)
                  * (Polynomial.aeval j
                      ((∏ t, (Polynomial.X - Polynomial.C (val0 t)))
                        * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
                        * q₀.map (algebraMap K₀ k)))⁻¹))
AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff.mwALGCdev.mwALGC_ker
Source context 12 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
namespace mwALGCdev
section ker
open _root_.AlgebraicCurve
open _root_.Polynomial
variable {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
theorem mwALGC_ker {j : F}
    (n : ℕ) (b : Fin n → F)
    (q₀ : Polynomial K₀) (v₀ : Place k F) (e mdeg : ℕ)
    (Θ : Polynomial K₀) (a : ℕ)
    (Ms : Fin a → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (Rml : ℕ) (Yl : Fin Rml → Fin n × Fin (mdeg + 1) → k)
    (D : Divisor k F)
    (r : ℕ) (val : Fin r × Fin (a + 1) → k)
    (r' : ℕ) (jv' : Fin r' → k)
    (hMenuD : ∀ u : Fin n × Fin (mdeg + 1) → k, u ≠ 0 →
      ((∀ ρ : Fin Rml, ∑ col, Yl ρ col * u col = 0) ↔
        ∀ v : Place k F, (v.ord j < 0 ∨
          0 < v.ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) ∨ v = v₀) →
          0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
            + v.ord ((∑ i : Fin n, Polynomial.aeval j
                  (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b i)
                * (Polynomial.aeval j
                    ((∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
                      * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
                      * q₀.map (algebraMap K₀ k)))⁻¹)))
    (hKERgood : ∀ u : Fin n × Fin (mdeg + 1) → k, u ≠ 0 →
      (∀ (s : Fin a) (i' : Fin n), (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
        ∣ ∑ col : Fin n × Fin (mdeg + 1),
            Polynomial.C (u col) * mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2) →
      ∀ v : Place k F, ¬ (v.ord j < 0 ∨
          0 < v.ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) ∨ v = v₀) →
        0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
          + v.ord ((∑ i : Fin n, Polynomial.aeval j
                (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b i)
              * (Polynomial.aeval j
                  ((∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
                    * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
                    * q₀.map (algebraMap K₀ k)))⁻¹))
    (hKERchow : ∀ u : Fin n × Fin (mdeg + 1) → k, u ≠ 0 →
      (∀ v : Place k F,
        0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
          + v.ord ((∑ i : Fin n, Polynomial.aeval j
                (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b i)
              * (Polynomial.aeval j
                  ((∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
                    * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
                    * q₀.map (algebraMap K₀ k)))⁻¹)) →
      ∀ (s : Fin a) (i' : Fin n), (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
        ∣ ∑ col : Fin n × Fin (mdeg + 1),
            Polynomial.C (u col) * mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2) :
    ∀ u : Fin n × Fin (mdeg + 1) → k,
      ((∀ ρ : Fin (a * n * r), ∑ col, MvPolynomial.aeval
            (fun ak : Fin (a + 1) × Fin (r + 1) =>
              (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, ak.1)))).coeff ak.2)
            (mwALGC_chowFamily a n mdeg Ms r (mwALGC_heqvN a n r ρ) col) * u col = 0) ∧
        (∀ ρ : Fin Rml, ∑ col, Yl ρ col * u col = 0)) ↔
      (u = 0 ∨ ∀ v : Place k F,
        0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
          + v.ord ((∑ i : Fin n, Polynomial.aeval j
                (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b i)
              * (Polynomial.aeval j
                  ((∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))))
                    * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
                    * q₀.map (algebraMap K₀ k)))⁻¹)) := by
  intro u
  set S : Polynomial k := ∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, 0))) with hSdef
  have hrows_iff :
      (∀ ρ : Fin (a * n * r), ∑ col, MvPolynomial.aeval
          (fun ak : Fin (a + 1) × Fin (r + 1) =>
            (∏ t : Fin r, (Polynomial.X - Polynomial.C (val (t, ak.1)))).coeff ak.2)
          (mwALGC_chowFamily a n mdeg Ms r (mwALGC_heqvN a n r ρ) col) * u col = 0)
      ↔ (∀ (s : Fin a) (i' : Fin n), S
          ∣ ∑ col : Fin n × Fin (mdeg + 1),
            Polynomial.C (u col) * mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2) := by
    rw [Equiv.forall_congr_left (mwALGC_heqvN a n r)]
    refine Iff.trans ?_ (mwALGC_rows_iff_dvd a n mdeg Ms r val u)
    simp only [Equiv.apply_symm_apply, Prod.forall]
  rcases eq_or_ne u 0 with hu0 | hu
  · subst hu0
    refine ⟨fun _ => Or.inl rfl, fun _ => ⟨fun _ => ?_, fun _ => ?_⟩⟩ <;>
      simp only [Pi.zero_apply, mul_zero, Finset.sum_const_zero]
  constructor
  · rintro ⟨hchow, hY⟩
    right
    intro v
    by_cases hvbad : v.ord j < 0 ∨
        0 < v.ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) ∨ v = v₀
    · exact (hMenuD u hu).mp hY v hvbad
    · exact hKERgood u hu (hrows_iff.mp hchow) v hvbad
  · rintro (hu0' | hord)
    · exact absurd hu0' hu
    refine ⟨?_, ?_⟩
    · exact hrows_iff.mpr (hKERchow u hu hord)
    · exact (hMenuD u hu).mpr (fun v _ => hord v)
AlgebraicCurve.Divisor.exists_symmValue_rows_kernel_iff
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

section ProofImplementation
namespace AlgebraicCurves.Divisors.Proofs.Divisor_exists_symmValue_rows_kernel_iff
attribute [-instance]
  AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
  AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp] AlgebraicCurve.Place.congrEquiv_symm_apply
  AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
  AlgebraicCurve.Place.congrRingEquiv_toValuationSubring AlgebraicCurve.Place.congrEquiv_apply
  AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
  AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
noncomputable section
open _root_.AlgebraicCurve
open _root_.Polynomial
theorem _root_.AlgebraicCurve.Divisor.exists_symmValue_rows_kernel_iff
    {K₀ k F : Type*} [Field K₀] [Field k] [Field F] [Algebra K₀ k] [Algebra k F]
    {j : F} (hj : Transcendental k j)
    [FiniteDimensional (IntermediateField.adjoin k ({j} : Set F)) F]
    [Algebra.IsSeparable (IntermediateField.adjoin k ({j} : Set F)) F] [CharZero k]
    (hfin : ∀ x : F, x ≠ 0 → {v : Place k F | x ∉ v.toValuationSubring}.Finite)
    (hrat : ∀ (v : Place k F) (x : F), j ∈ v.toValuationSubring →
      IsIntegral (Algebra.adjoin k ({j} : Set F)) x →
      ∃ c : k, x = algebraMap k F c ∨ 0 < v.ord (x - algebraMap k F c))
    (n : ℕ) (b : Fin n → F)
    (hbli : ∀ c : Fin n → Polynomial k,
      (∑ i : Fin n, Polynomial.aeval j (c i) * b i) = 0 → ∀ i, c i = 0)
    (hbsp : ∀ x : F, ∃ (q : Polynomial k) (c : Fin n → Polynomial k), q ≠ 0 ∧
      x * Polynomial.aeval j q = ∑ i : Fin n, Polynomial.aeval j (c i) * b i)
    (d : Polynomial K₀) (hd : d ≠ 0) (A : Fin n → Matrix (Fin n) (Fin n) (Polynomial K₀))
    (hmul : ∀ i i' : Fin n, b i * b i' * Polynomial.aeval j (d.map (algebraMap K₀ k))
      = ∑ i'' : Fin n, Polynomial.aeval j ((A i i'' i').map (algebraMap K₀ k)) * b i'')
    (q₀ : Polynomial K₀) (v₀ : Place k F) (g e mdeg : ℕ) :
    ∃ (Θ : Polynomial K₀) (a : ℕ) (cL₀ : Fin a → Polynomial K₀) (cL : Fin a → Fin n → Polynomial K₀)
      (χ : Fin a → Polynomial (Polynomial K₀))
      (M : ℕ) (Rm : Fin M → ℕ) (Y : (l : Fin M) → Fin (Rm l) → Fin n × Fin (mdeg + 1) → k)
      (R : Fin (g + 1) → ℕ)
      (P : (r : Fin (g + 1)) → Fin (R r) → Fin n × Fin (mdeg + 1) →
        MvPolynomial (Fin (a + 1) × Fin ((r : ℕ) + 1)) K₀),
      (∀ s, (χ s).Monic) ∧
      ∀ (D : Divisor k F), (∀ v, 0 ≤ D v) → Divisor.degree D = (g : ℤ) →
        ∃ (r : Fin (g + 1)) (l : Fin M) (pt : Fin (r : ℕ) → Place k F)
          (val : Fin (r : ℕ) × Fin (a + 1) → k)
          (r' : ℕ) (pt' : Fin r' → Place k F) (jv' : Fin r' → k),
          (∀ t, 0 ≤ (pt t).ord j ∧
            (pt t).ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0) ∧
          (∀ t', 0 < (pt' t').ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k)))) ∧
          (∀ v : Place k F, 0 ≤ v.ord j → D v =
            ((∑ t, Finsupp.single (pt t) (1 : ℤ))
              + ∑ t', Finsupp.single (pt' t') (1 : ℤ) : Divisor k F) v) ∧
          (∀ t, 0 < (pt t).ord (j - algebraMap k F (val (t, 0)))) ∧
          (∀ t (s : Fin a), 0 < (pt t).ord
            ((Polynomial.aeval j ((cL₀ s).map (algebraMap K₀ k))
              + ∑ i : Fin n, Polynomial.aeval j ((cL s i).map (algebraMap K₀ k)) * b i)
              - algebraMap k F (val (t, s.succ)))) ∧
          (∀ t', 0 < (pt' t').ord (j - algebraMap k F (jv' t'))) ∧
          (∀ t (s : Fin a), Polynomial.eval₂ (Polynomial.eval₂RingHom (algebraMap K₀ k) (val (t,
            0)))
              (val (t, s.succ)) (χ s) = 0) ∧
          ∀ u : Fin n × Fin (mdeg + 1) → k,
            ((∀ ρ : Fin (R r), ∑ col, MvPolynomial.aeval
                  (fun ak : Fin (a + 1) × Fin ((r : ℕ) + 1) =>
                    (∏ t : Fin (r : ℕ), (Polynomial.X - Polynomial.C (val (t, ak.1)))).coeff ak.2)
                  (P r ρ col) * u col = 0) ∧
              (∀ ρ : Fin (Rm l), ∑ col, Y l ρ col * u col = 0)) ↔
            (u = 0 ∨ ∀ v : Place k F,
              0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
                + v.ord ((∑ i : Fin n, Polynomial.aeval j
                      (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) *
                        b i)
                    * (Polynomial.aeval j
                        ((∏ t : Fin (r : ℕ), (Polynomial.X - Polynomial.C (val (t, 0))))
                          * (∏ t', (Polynomial.X - Polynomial.C (jv' t')))
                          * q₀.map (algebraMap K₀ k)))⁻¹)) := by
  classical
  have hjne : j ≠ 0 := fun h => hj (h ▸ isAlgebraic_zero)
  rcases Nat.eq_zero_or_pos n with hn0 | hn
  · subst hn0
    exfalso
    obtain ⟨q, c, hq, hqe⟩ := hbsp 1
    rw [Finset.univ_eq_empty, Finset.sum_empty, one_mul] at hqe
    exact hj ⟨q, hq, hqe⟩
  rcases eq_or_ne q₀ 0 with hq₀0 | hq₀
  · subst hq₀0
    have hIdb₀ := mwALGMdev.mwALGM_isIntegral_db hj n b hbsp d hd A hmul
    have hdegnz₀ : ∀ v : Place k F, v.deg ≠ 0 :=
      fun v => Place.deg_ne_zero_of_finiteDimensional_adjoin j hj v
    let ncol : ℕ := n * (mdeg + 1)
    let ec : Fin n × Fin (mdeg + 1) ≃ Fin ncol := finProdFinEquiv
    refine ⟨d, 0, Fin.elim0, Fin.elim0, Fin.elim0, 2, fun _ => ncol,
      fun l ρ col => if (l : ℕ) = 0 then 0 else (if ρ = ec col then 1 else 0),
      fun _ => 0, fun _ => Fin.elim0, fun s => s.elim0, ?_⟩
    intro D heff hdeg
    obtain ⟨r, hrle, pt, val, βpt, r', pt', jv', hpt, hpt', henum, hval0, hvalL, hjv', hβpt,
      hdord⟩ := mwALGMdev.mwALGM_enum hj hrat n b d hd hIdb₀ d hd (dvd_refl d) 0 Fin.elim0
        Fin.elim0 (fun s => s.elim0) (fun s => s.elim0) hdegnz₀ g D heff hdeg
    have hfeq0 : ∀ (gU : F) (p : Polynomial k) (v : Place k F),
        v.ord (gU * (Polynomial.aeval j
          (p * (0 : Polynomial K₀).map (algebraMap K₀ k)))⁻¹) = 0 := by
      intro gU p v
      simp only [Polynomial.map_zero, mul_zero, map_zero, inv_zero, Place.ord_zero]
    by_cases heffv : ∀ v, 0 ≤ (D - (e : ℤ) • Finsupp.single v₀ 1 : Divisor k F) v
    · refine ⟨⟨r, Nat.lt_succ_of_le hrle⟩, 0, pt, val, r', pt', jv',
        hpt, hpt', henum, hval0, fun t s => s.elim0, hjv', fun t s => s.elim0, fun u => ?_⟩
      refine ⟨fun _ => Or.inr fun v => ?_,
        fun _ => ⟨fun ρ => ρ.elim0, fun ρ => by
          simp only [Fin.val_zero, ite_true, zero_mul, Finset.sum_const_zero]⟩⟩
      rw [hfeq0 _ _ v, add_zero]; exact heffv v
    · refine ⟨⟨r, Nat.lt_succ_of_le hrle⟩, 1, pt, val, r', pt', jv',
        hpt, hpt', henum, hval0, fun t s => s.elim0, hjv', fun t s => s.elim0, fun u => ?_⟩
      have hl1 : ((1 : Fin 2) : ℕ) ≠ 0 := one_ne_zero
      constructor
      · rintro ⟨_, hY⟩
        left
        funext col
        have h := hY (ec col)
        simp only [ite_eq_right hl1, ite_mul, one_mul, zero_mul, ← ec.eq_symm_apply,
          Finset.sum_ite_eq, Finset.mem_univ, ite_true, Equiv.symm_apply_apply] at h
        exact h
      · rintro (hu0 | hord)
        · subst hu0
          exact ⟨fun ρ => ρ.elim0, fun ρ => by
            simp only [Pi.zero_apply, mul_zero, Finset.sum_const_zero]⟩
        · exact absurd (fun v => by
            have h := hord v; rw [hfeq0 _ _ v, add_zero] at h; exact h) heffv
  have hIdb := mwALGMdev.mwALGM_isIntegral_db hj n b hbsp d hd A hmul
  obtain ⟨Δ, hΔ, hG⟩ :=
    mwALGMdev.mwALGM_gram_denom hj n b hbli hbsp d hd A hmul
  set Θ : Polynomial K₀ := Δ * d * q₀ with hΘdef
  have hΘ : Θ ≠ 0 := mul_ne_zero (mul_ne_zero hΔ hd) hq₀
  have hdΘ : d ∣ Θ := (Dvd.intro_left Δ rfl).mul_right q₀
  have hK₀char : CharZero K₀ :=
    (RingHom.charZero_iff (algebraMap K₀ k).injective).mpr inferInstance
  have hθchoice : ∃ (θ : Fin (n * (g + 1) + 1) → K₀), Function.Injective θ ∧
      ∀ (s : Fin (n * (g + 1) + 1)) (c : k),
        (Polynomial.aeval j (Polynomial.X.map (algebraMap K₀ k))
          + ∑ i : Fin n, Polynomial.aeval j ((Polynomial.C (θ s ^ (i.val + 1)) * d).map
              (algebraMap K₀ k)) * b i)
          ≠ algebraMap k F c :=
    mwALGMdev.mwALGM_theta_choice hK₀char n b d g
      (fun β θc hθc => AlgebraicCurve.Place.mwALGN_exists_nonconst_form hj β θc hθc)
  let a : ℕ := n * (g + 1) + 1
  obtain ⟨θ, hθinj, hLnc⟩ := hθchoice
  let cL₀ : Fin a → Polynomial K₀ := fun _ => Polynomial.X
  let cL : Fin a → Fin n → Polynomial K₀ := fun s i => Polynomial.C (θ s ^ (i.val + 1)) * d
  have hcLd : ∀ s i, d ∣ cL s i := fun s i => Dvd.intro_left _ rfl
  have hχlane : ∀ s : Fin a, ∃ (M : Matrix (Fin n) (Fin n) (Polynomial K₀))
      (χ : Polynomial (Polynomial K₀)), χ.Monic ∧
      (∀ (m : ℕ) (i : Fin n),
        (Polynomial.aeval j ((cL₀ s).map (algebraMap K₀ k))
            + ∑ i' : Fin n, Polynomial.aeval j (((fun i => Polynomial.C (θ s ^ (i.val + 1))) i'
                * d).map (algebraMap K₀ k)) * b i') ^ m
          * (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i)
        = ∑ i' : Fin n, Polynomial.aeval j (((M ^ m) i' i).map (algebraMap K₀ k))
            * (Polynomial.aeval j (d.map (algebraMap K₀ k)) * b i')) ∧
      Polynomial.eval₂
        ((Polynomial.aeval j).toRingHom.comp (Polynomial.mapRingHom (algebraMap K₀ k)))
        (Polynomial.aeval j ((cL₀ s).map (algebraMap K₀ k))
          + ∑ i' : Fin n, Polynomial.aeval j (((fun i => Polynomial.C (θ s ^ (i.val + 1))) i'
              * d).map (algebraMap K₀ k)) * b i')
        χ = 0 := by
    intro s
    exact mwALGMdev.mwALGM_exists_mulMatrix_chi hj n b hbsp d hd A hmul
      (cL₀ s) (fun i => Polynomial.C (θ s ^ (i.val + 1)))
  choose Ms χ hχmon hpow hkill using hχlane
  obtain ⟨M, Rm, Y, hMenu⟩ :=
    mwALGCdev.mwALGC_menu hj hfin n b hbli hbsp Θ hΘ q₀ hq₀ v₀ g e mdeg
  refine ⟨Θ, a, cL₀, cL, χ, M, Rm, Y, fun r => a * n * (r : ℕ),
    fun r ρ col => mwALGCdev.mwALGC_chowFamily a n mdeg Ms (r : ℕ)
      (mwALGCdev.mwALGC_heqvN a n (r : ℕ) ρ) col, hχmon, ?_⟩
  intro D heff hdeg
  have hdegnz : ∀ v : Place k F, v.deg ≠ 0 :=
    fun v => Place.deg_ne_zero_of_finiteDimensional_adjoin j hj v
  obtain ⟨r, hrle, pt, val, βpt, r', pt', jv', hpt, hpt', henum, hval0, hvalL, hjv', hβpt, hdord⟩ :=
    mwALGMdev.mwALGM_enum hj hrat n b d hd hIdb Θ hΘ hdΘ a cL₀ cL hcLd hLnc hdegnz g D heff hdeg
  obtain ⟨l, hMenuD⟩ := hMenu D heff hdeg r pt r' pt' (fun t => val (t, 0)) jv'
    hpt hpt' henum hval0 hjv'
  have hrlt : r < g + 1 := Nat.lt_succ_of_le hrle
  refine ⟨⟨r, hrlt⟩, l, pt, val, r', pt', jv', hpt, hpt', henum, hval0, hvalL, hjv', ?_, ?_⟩
  · intro t s
    have hjmem : j ∈ (pt t).toValuationSubring := (pt t).mem_of_ord_nonneg hjne (hpt t).1
    have hIform := mwALGMdev.mwALGM_isIntegral_form hj n b hbsp d hd A hmul
      (cL₀ s) (fun i => Polynomial.C (θ s ^ (i.val + 1)))
    have hLsmem : (Polynomial.aeval j ((cL₀ s).map (algebraMap K₀ k))
          + ∑ i' : Fin n, Polynomial.aeval j
              (((fun i => Polynomial.C (θ s ^ (i.val + 1))) i' * d).map (algebraMap K₀ k)) * b i')
        ∈ (pt t).toValuationSubring :=
      (pt t).mem_toValuationSubring_of_isIntegral_adjoin hjmem hIform
    exact mwALGMdev.mwALGM_pin_eval₂_eq_zero (pt t) hjmem hLsmem (Or.inr (hval0 t))
      (Or.inr (hvalL t s)) (χ s) (hkill s)
  · have hdj0 : Polynomial.aeval j (d.map (algebraMap K₀ k)) ≠ 0 := fun h0 =>
      hj ⟨d.map (algebraMap K₀ k),
        (Polynomial.map_ne_zero_iff (algebraMap K₀ k).injective).mpr hd, h0⟩
    set L : Fin a → F := fun s =>
      Polynomial.aeval j ((Polynomial.X : Polynomial K₀).map (algebraMap K₀ k))
        + ∑ i : Fin n, Polynomial.aeval j
            ((Polynomial.C (θ s ^ (i.val + 1)) * d).map (algebraMap K₀ k)) * b i with hLdef
    have hLreg : ∀ (s : Fin a) (v : Place k F), j ∈ v.toValuationSubring →
        L s ∈ v.toValuationSubring := fun s v hjv =>
      v.mem_toValuationSubring_of_isIntegral_adjoin hjv
        (mwALGMdev.mwALGM_isIntegral_form hj n b hbsp d hd A hmul
          Polynomial.X (fun i => Polynomial.C (θ s ^ (i.val + 1))))
    refine mwALGCdev.mwALGC_ker n b q₀ v₀ e mdeg Θ a Ms (Rm l) (Y l) D r val r' jv' hMenuD ?_ ?_
    · intro u hu hdvd v hvbad
      rw [not_or, not_or, not_lt, not_lt] at hvbad
      obtain ⟨hvj, hvΘ', hvne⟩ := hvbad
      have hjmemv : j ∈ v.toValuationSubring := v.mem_of_ord_nonneg hjne hvj
      have hvΘ : v.ord (Polynomial.aeval j (Θ.map (algebraMap K₀ k))) = 0 :=
        le_antisymm hvΘ' (v.ord_nonneg_of_mem (mwALGMdev.mwALGM_aeval_mem v hjmemv _))
      set gU : F := ∑ i : Fin n, Polynomial.aeval j
          (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b i
        with hgUdef
      have hgU0 : gU ≠ 0 := by
        rintro hgU0
        apply hu
        funext ⟨i, dd⟩
        change u (i, dd) = 0
        have h := hbli _ hgU0 i
        have hcoeff : (∑ dd : Fin (mdeg + 1),
            Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)).coeff (dd : ℕ) = 0 := by
          rw [h]; exact Polynomial.coeff_zero _
        simpa only [Polynomial.finsetSum_coeff, Polynomial.coeff_C_mul, Polynomial.coeff_X_pow,
          mul_ite, mul_one, mul_zero, Fin.val_inj, Finset.sum_ite_eq, Finset.mem_univ,
          ite_true] using hcoeff
      have hE : ∀ s : Fin a,
          (∏ t : Fin r, ((Polynomial.aeval j ((Polynomial.X : Polynomial K₀).map (algebraMap K₀ k))
              + ∑ i : Fin n, Polynomial.aeval j
                  ((Polynomial.C (θ s ^ (i.val + 1)) * d).map (algebraMap K₀ k)) * b i)
            - algebraMap k F (val (t, s.succ)))) * gU
          = ∑ i' : Fin n, Polynomial.aeval j (∑ col : Fin n × Fin (mdeg + 1),
              Polynomial.C (u col) * mwALGCdev.mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2)
              * b i' := by
        intro s
        have hEe := mwALGMdev.mwALGM_Eexpand n b (Polynomial.aeval j (d.map (algebraMap K₀ k))) hdj0
          mdeg r (Polynomial.aeval j ((Polynomial.X : Polynomial K₀).map (algebraMap K₀ k))
            + ∑ i : Fin n, Polynomial.aeval j
                ((Polynomial.C (θ s ^ (i.val + 1)) * d).map (algebraMap K₀ k)) * b i)
          (Ms s) (hpow s) (fun t => val (t, s.succ)) u
        simp only [mwALGCdev.mwALGC_Ek]
        exact hEe
      exact AlgebraicCurve.Place.mwALGN_ker_good hj hrat n b d hd hIdb Δ hΔ hG q₀ hq₀ Θ hΘdef v₀ e
        a θ hθinj g
        (Nat.lt_succ_self _) D hrle pt val βpt pt' jv' hpt hpt' henum hval0 hvalL hjv' hβpt hgU0
        (fun s i' => ∑ col : Fin n × Fin (mdeg + 1),
          Polynomial.C (u col) * mwALGCdev.mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2)
        hE hdvd v hvj hvΘ hvne
    · intro u hu hord
      set gU : F := ∑ i : Fin n, Polynomial.aeval j
          (∑ dd : Fin (mdeg + 1), Polynomial.C (u (i, dd)) * Polynomial.X ^ (dd : ℕ)) * b i
        with hgUdef
      have hE : ∀ s : Fin a, (∏ t : Fin r, (L s - algebraMap k F (val (t, s.succ)))) * gU
          = ∑ i' : Fin n, Polynomial.aeval j (∑ col : Fin n × Fin (mdeg + 1),
              Polynomial.C (u col) * mwALGCdev.mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2)
              * b i' := by
        intro s
        have hEe := mwALGMdev.mwALGM_Eexpand n b (Polynomial.aeval j (d.map (algebraMap K₀ k)))
          hdj0 mdeg r (L s) (Ms s) (hpow s) (fun t => val (t, s.succ)) u
        simp only [mwALGCdev.mwALGC_Ek]
        exact hEe
      refine mwALGMdev.mwALGM_ker_chow hj n b hbli d hd Δ hΔ q₀ hq₀ Θ hΘdef v₀ e D a pt val pt'
        jv' hpt henum hval0 L hLreg hvalL hjv' gU
        (fun s i' => ∑ col : Fin n × Fin (mdeg + 1),
          Polynomial.C (u col) * mwALGCdev.mwALGC_Ek a n mdeg Ms r val s i' col.1 col.2)
        hE hord ?_
      intro S hS hSΔ N gg E' hE' hx
      exact AlgebraicCurve.Place.mwALGN_dvd_of_forall_mem hj b hbli
        (Δ.map (algebraMap K₀ k))
        (d.map (algebraMap K₀ k))
        ((Polynomial.map_ne_zero_iff (algebraMap K₀ k).injective).mpr hd)
        hG (fun x hxmem => mwALGMdev.mwALGM_isIntegral_adjoin_of_forall_mem hxmem)
        S hS hSΔ E' hE' hx