AlgebraicCurve.six_mul_degree_eq_mul_finrank_of_forall_eq_weightFloor_of_ord_eq_three_two
Source context 8 commands
Surrounding namespaces, section variables, and local commands at this declaration.
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Six_mul_degree_eq_mul_finrank_of_forall_eq_weightFloor_of_ord_eq_three_two
attribute [-instance]
AlgebraicCurve.instFundamentalIdentityOfSumRamificationInertia
instIsScalarTowerResidueFieldRestrictPushforward
instAlgebraResidueFieldRestrictPushforward
instIsLocalHomRestrictInclusion
instIsPrimeCenter
instIsFractionRingIntegralClosureAt
instIsTorsionFreeSubtypeMemValuationSubringToValuationSubringIntegralClosureAt
instIsDedekindDomainIntegralClosureAt
instFiniteSubtypeMemValuationSubringToValuationSubringIntegralClosureAt
AlgebraicCurve.RationalFunctionField.instNontrivialInftyValueGroup
attribute [-simp] AlgebraicCurve.Divisor.mapRestrict_single
AlgebraicCurve.Divisor.pushforward_single AlgebraicCurve.Place.coe_restrictInclusion
AlgebraicCurve.Place.mem_fiber AlgebraicCurve.Place.restrict_toValuationSubring
AlgebraicCurve.Divisor.degree_pushforward AlgebraicCurve.Place.restrictResidueMap_residue
AlgebraicCurve.Pic0.coe_pushforwardDegZeroHom AlgebraicCurve.Pic0.coe_pullbackDegZeroHom
attribute [-simp] AlgebraicCurve.Place.placeOfPrime_toValuationSubring
AlgebraicCurve.Place.mem_fiberOver AlgebraicCurve.Place.fiberEquiv_symm_apply
AlgebraicCurve.Place.fiberEquiv_apply AlgebraicCurve.Place.centerHeightOneSpectrum_asIdeal
AlgebraicCurve.RationalFunctionField.placeInfty_toValuationSubring
AlgebraicCurve.RationalFunctionField.placeEquivOption_placeInfty
AlgebraicCurve.RationalFunctionField.placeEquivOption_symm_some
AlgebraicCurve.RationalFunctionField.placeEquivOption_placeOfPoint
AlgebraicCurve.RationalFunctionField.placeEquivOption_symm_none
AlgebraicCurve.Divisor.evalFun_zero AlgebraicCurve.Place.evalAt_one
open AlgebraicCurve
open DegC2 in
Lean source · full declarationtheorem
_root_.AlgebraicCurve.six_mul_degree_eq_mul_finrank_of_forall_eq_weightFloor_of_ord_eq_three_two
(k : Type*) [Field k] [IsAlgClosed k] {F : Type*} [Field F] [Algebra k F]
(y : F) (hy : Transcendental k y)
(hfin : FiniteDimensional ↥(IntermediateField.adjoin k ({y} : Set F)) F)
(h0 : ∀ w : AlgebraicCurve.Place k F, 0 < w.ord y → w.ord y = 3)
(h1728 : ∀ w : AlgebraicCurve.Place k F, 0 < w.ord (y - 1728) → w.ord (y - 1728) = 2)
(m : ℕ) (D : AlgebraicCurve.Divisor k F)
(hD : ∀ w : AlgebraicCurve.Place k F,
D w = (if 0 < w.ord y then (2 * (m : ℤ) * w.ord y) / 3 else 0)
+ (if 0 < w.ord (y - 1728) then ((m : ℤ) * w.ord (y - 1728)) / 2 else 0)
+ (if w.ord y < 0 then (m : ℤ) * w.ord y else 0)) :
6 * D.degree = (m : ℤ) * (Module.finrank ↥(IntermediateField.adjoin k ({y} : Set F)) F : ℤ) :=
by
classical
have := hfin
have : IsCurveOver k F := isCurveOver_of_transcendental_of_perfectField hy hfin
have : HasPrincipalDivisors k F := IsCurveOver.hasPrincipalDivisors
have hdeg1 : ∀ v : Place k F, v.deg = 1 := IsCurveOver.forall_deg_eq_one_of_isAlgClosed
set n : ℤ := (Module.finrank ↥(IntermediateField.adjoin k ({y} : Set F)) F : ℤ) with hn
have hc : (1728 : F) = algebraMap k F 1728 := (map_ofNat (algebraMap k F) 1728).symm
have hD' : ∀ w : Place k F, D w = (if 0 < w.ord y then (2 * (m : ℤ) * w.ord y) / 3 else 0)
+ (if 0 < w.ord (y - algebraMap k F 1728) then ((m : ℤ) * w.ord (y - algebraMap k F
1728)) / 2 else 0)
+ (if w.ord y < 0 then (m : ℤ) * w.ord y else 0) := fun w => by rw [← hc]; exact hD w
have h1728' : ∀ w : Place k F, 0 < w.ord (y - algebraMap k F 1728) → w.ord (y - algebraMap k F
1728) = 2 :=
fun w => by rw [← hc]; exact h1728 w
have hy0 : y ≠ 0 := fun h => hy (h ▸ isAlgebraic_zero)
have hyc : y - algebraMap k F 1728 ≠ 0 := fun h => hy (by
rw [sub_eq_zero] at h; rw [h]; exact isAlgebraic_algebraMap (1728 : k))
obtain ⟨Dj, hDj, hDj0⟩ := HasPrincipalDivisors.exists_divisor (K := k) (F := F) y hy0
obtain ⟨Dc, hDc, hDc0⟩ := HasPrincipalDivisors.exists_divisor (K := k) (F := F) (y - algebraMap k
F 1728) hyc
set S0 := Dj.support.filter (fun v => 0 < v.ord y) with hS0def
set S1 := Dc.support.filter (fun v => 0 < v.ord (y - algebraMap k F 1728)) with hS1def
set T := Dj.support.filter (fun v => v.ord y < 0) with hTdef
have hS0 : ∀ v, v ∈ S0 ↔ 0 < v.ord y := fun v => by
rw [hS0def, Finset.mem_filter, Finsupp.mem_support_iff, hDj v]
exact ⟨And.right, fun h => ⟨ne_of_gt h, h⟩⟩
have hS1 : ∀ v, v ∈ S1 ↔ 0 < v.ord (y - algebraMap k F 1728) := fun v => by
rw [hS1def, Finset.mem_filter, Finsupp.mem_support_iff, hDc v]
exact ⟨And.right, fun h => ⟨ne_of_gt h, h⟩⟩
have hT : ∀ v, v ∈ T ↔ v.ord y < 0 := fun v => by
rw [hTdef, Finset.mem_filter, Finsupp.mem_support_iff, hDj v]
exact ⟨And.right, fun h => ⟨ne_of_lt h, h⟩⟩
let P : Divisor k F := ∑ v ∈ T, Finsupp.single v (-(v.ord y))
have hP : ∀ v : Place k F, P v = max 0 (-v.ord y) := by
intro v
simp only [P, Finsupp.coe_finsetSum, Finset.sum_apply, Finsupp.single_apply]
rw [Finset.sum_ite_eq' T v]
by_cases hv : v ∈ T
· rw [ite_eq_left hv, max_eq_right]; have := (hT v).1 hv; omega
· rw [ite_eq_right hv, max_eq_left]; have := (hT v).not.1 hv; omega
have hPdeg := degree_poleDivisor_eq_finrank_adjoin_of_isAlgClosed_of_transcendental y hy P hP
have hPdeg' : Divisor.degree P = ∑ v ∈ T, -(v.ord y) := by
simp only [P, map_sum, Divisor.degree_single, hdeg1, Nat.cast_one, mul_one]
have hTsum : ∑ v ∈ T, v.ord y = -n := by
have : ∑ v ∈ T, -(v.ord y) = n := hPdeg'.symm.trans hPdeg
rw [Finset.sum_neg_distrib] at this
linarith
have hdegsum : ∀ E : Divisor k F, Divisor.degree E = ∑ v ∈ E.support, E v := by
intro E
conv_lhs => rw [← Finsupp.sum_single E]
rw [Finsupp.sum, map_sum]
simp only [Divisor.degree_single, hdeg1, Nat.cast_one, mul_one]
have hsupp_j : Dj.support = S0 ∪ T := by
ext v
rw [Finset.mem_union, hS0, hT, Finsupp.mem_support_iff, hDj v]
constructor
· intro h; rcases lt_trichotomy (v.ord y) 0 with h' | h' | h'
· exact Or.inr h'
· exact absurd h' h
· exact Or.inl h'
· rintro (h | h) <;> omega
have hdisj_0T : Disjoint S0 T := by
rw [Finset.disjoint_left]; intro v h0' hT'
have := (hS0 v).1 h0'; have := (hT v).1 hT'; omega
have hS0sum : ∑ v ∈ S0, v.ord y = n := by
have h := hdegsum Dj
rw [hDj0, hsupp_j, Finset.sum_union hdisj_0T] at h
simp only [hDj] at h
linarith
have hnpos : 0 < n := by
have : 0 < Module.finrank ↥(IntermediateField.adjoin k ({y} : Set F)) F := Module.finrank_pos
rw [hn]; exact_mod_cast this
by_cases hk : (1728 : k) = 0
· exfalso
have hS0ne : S0.Nonempty := by
by_contra h
rw [Finset.not_nonempty_iff_eq_empty] at h
rw [h, Finset.sum_empty] at hS0sum
linarith
obtain ⟨v, hv⟩ := hS0ne
have hv3 := h0 v ((hS0 v).1 hv)
have hyy : y - algebraMap k F 1728 = y := by rw [hk, map_zero, sub_zero]
have hv2 := h1728' v (by rw [hyy]; exact (hS0 v).1 hv)
rw [hyy] at hv2
omega
have hzero_c : ∀ v : Place k F, 0 < v.ord y → v.ord (y - algebraMap k F 1728) = 0 :=
fun v hv => ord_sub_algebraMap_eq_zero_of_ord_pos v hy0 hk hv
have hpole_c : ∀ v : Place k F, v.ord y < 0 → v.ord (y - algebraMap k F 1728) = v.ord y :=
fun v hv => ord_sub_algebraMap_eq_of_ord_neg v hy0 1728 hv
have hzero_j : ∀ v : Place k F, 0 < v.ord (y - algebraMap k F 1728) → v.ord y = 0 :=
fun v hv => ord_eq_zero_of_ord_sub_algebraMap_pos v hk hyc hv
have hpole_j : ∀ v : Place k F, v.ord (y - algebraMap k F 1728) < 0 → v.ord y = v.ord (y -
algebraMap k F 1728) :=
fun v hv => ord_eq_of_ord_sub_algebraMap_neg v 1728 hyc hv
have hsupp_c : Dc.support = S1 ∪ T := by
ext v
rw [Finset.mem_union, hS1, hT, Finsupp.mem_support_iff, hDc v]
constructor
· intro h; rcases lt_trichotomy (v.ord (y - algebraMap k F 1728)) 0 with h' | h' | h'
· right; rw [hpole_j v h']; exact h'
· exact absurd h' h
· exact Or.inl h'
· rintro (h | h)
· exact ne_of_gt h
· rw [hpole_c v h]; exact ne_of_lt h
have hdisj_1T : Disjoint S1 T := by
rw [Finset.disjoint_left]; intro v h1 hT'
have := (hS1 v).1 h1; have := hzero_j v this; have := (hT v).1 hT'; omega
have hS1sum : ∑ v ∈ S1, v.ord (y - algebraMap k F 1728) = n := by
have h := hdegsum Dc
rw [hDc0, hsupp_c, Finset.sum_union hdisj_1T] at h
simp only [hDc] at h
have : ∑ v ∈ T, v.ord (y - algebraMap k F 1728) = ∑ v ∈ T, v.ord y :=
Finset.sum_congr rfl fun v hv => hpole_c v ((hT v).1 hv)
linarith
have hcnt0 : 3 * (S0.card : ℤ) = n := by
rw [← hS0sum, show ∑ v ∈ S0, v.ord y = ∑ v ∈ S0, (3 : ℤ) from
Finset.sum_congr rfl fun v hv => h0 v ((hS0 v).1 hv)]
simp only [Finset.sum_const]; ring
have hcnt1 : 2 * (S1.card : ℤ) = n := by
rw [← hS1sum, show ∑ v ∈ S1, v.ord (y - algebraMap k F 1728) = ∑ v ∈ S1, (2 : ℤ) from
Finset.sum_congr rfl fun v hv => h1728' v ((hS1 v).1 hv)]
simp only [Finset.sum_const]; ring
have hDval : ∀ v : Place k F, D v =
(if v ∈ S0 then 2 * (m : ℤ) else 0) + (if v ∈ S1 then (m : ℤ) else 0) + (if v ∈ T then (m :
ℤ) * v.ord y else 0) := by
intro v
rw [hD' v]
congr 1
· congr 1
· by_cases h : 0 < v.ord y
· rw [ite_eq_left h, ite_eq_left ((hS0 v).2 h), h0 v h]; omega
· rw [ite_eq_right h, ite_eq_right (fun h' => h ((hS0 v).1 h'))]
· by_cases h : 0 < v.ord (y - algebraMap k F 1728)
· rw [ite_eq_left h, ite_eq_left ((hS1 v).2 h), h1728' v h]; omega
· rw [ite_eq_right h, ite_eq_right (fun h' => h ((hS1 v).1 h'))]
· by_cases h : v.ord y < 0
· rw [ite_eq_left h, ite_eq_left ((hT v).2 h)]
· rw [ite_eq_right h, ite_eq_right (fun h' => h ((hT v).1 h'))]
have hDsupp : D.support ⊆ S0 ∪ S1 ∪ T := by
intro v hv
rw [Finsupp.mem_support_iff, hDval v] at hv
rw [Finset.mem_union, Finset.mem_union]
by_contra hnot
push Not at hnot
obtain ⟨⟨h1, h2⟩, h3⟩ := hnot
rw [ite_eq_right h1, ite_eq_right h2, ite_eq_right h3] at hv
exact hv (by ring)
have hDdeg : Divisor.degree D = ∑ v ∈ S0 ∪ S1 ∪ T, D v := by
rw [hdegsum D]
exact Finset.sum_subset hDsupp (fun v _ hv => by rwa [Finsupp.mem_support_iff, not_not] at hv)
have hsumD : ∑ v ∈ S0 ∪ S1 ∪ T, D v =
∑ v ∈ S0 ∪ S1 ∪ T, ((if v ∈ S0 then 2 * (m : ℤ) else 0) + (if v ∈ S1 then (m : ℤ) else 0) +
(if v ∈ T then (m : ℤ) * v.ord y else 0)) := Finset.sum_congr rfl fun v _ => hDval v
have hA : ∑ v ∈ S0 ∪ S1 ∪ T, (if v ∈ S0 then 2 * (m : ℤ) else 0) = 2 * (m : ℤ) * S0.card := by
rw [Finset.sum_ite_mem,
Finset.inter_eq_right.2 (fun _ hv => Finset.mem_union_left T (Finset.mem_union_left S1 hv)),
Finset.sum_const]
simp only [nsmul_eq_mul]; ring
have hB : ∑ v ∈ S0 ∪ S1 ∪ T, (if v ∈ S1 then (m : ℤ) else 0) = (m : ℤ) * S1.card := by
rw [Finset.sum_ite_mem,
Finset.inter_eq_right.2 (fun _ hv => Finset.mem_union_left T (Finset.mem_union_right S0 hv)),
Finset.sum_const]
simp only [nsmul_eq_mul]; ring
have hC : ∑ v ∈ S0 ∪ S1 ∪ T, (if v ∈ T then (m : ℤ) * v.ord y else 0) = (m : ℤ) * ∑ v ∈ T, v.ord
y := by
rw [Finset.sum_ite_mem,
Finset.inter_eq_right.2 (fun _ hv => Finset.mem_union_right (S0 ∪ S1) hv),
Finset.mul_sum]
rw [hDdeg, hsumD, Finset.sum_add_distrib, Finset.sum_add_distrib, hA, hB, hC, hTsum]
linear_combination (4 * (m : ℤ)) * hcnt0 + (3 * (m : ℤ)) * hcnt1