@@ -225,7 +225,7 @@ namespace Height
225225
226226open AdmissibleAbsValues Real Function
227227
228- variable {K : Type *} [Field K] [AdmissibleAbsValues K] {ι : Type *}
228+ variable {K : Type *} [Field K] [AdmissibleAbsValues K] {ι ι' : Type *}
229229
230230/-- The multiplicative height of a tuple of elements of `K`.
231231For the zero tuple we take the junk value `1`. -/
@@ -252,7 +252,7 @@ lemma mulHeight_one : mulHeight (1 : ι → K) = 1 := by
252252 simp [mulHeight_eq hx]
253253
254254/-- The multiplicative height does not change under re-indexing. -/
255- lemma mulHeight_comp_equiv {ι' : Type *} (e : ι ≃ ι') (x : ι' → K) :
255+ lemma mulHeight_comp_equiv (e : ι ≃ ι') (x : ι' → K) :
256256 mulHeight (x ∘ e) = mulHeight x := by
257257 have H (v : AbsoluteValue K ℝ) : ⨆ i, v (x (e i)) = ⨆ i, v (x i) := e.iSup_congr (congrFun rfl)
258258 rcases eq_or_ne x 0 with rfl | hx
@@ -273,13 +273,20 @@ def logHeight (x : ι → K) : ℝ := log (mulHeight x)
273273lemma logHeight_eq_log_mulHeight (x : ι → K) : logHeight x = log (mulHeight x) := rfl
274274
275275@ [to_fun (attr := simp)]
276- lemma logHeight_zero {ι : Type *} : logHeight (0 : ι → K) = 0 := by
276+ lemma logHeight_zero : logHeight (0 : ι → K) = 0 := by
277277 simp [logHeight_eq_log_mulHeight]
278278
279279@ [to_fun (attr := simp)]
280- lemma logHeight_one {ι : Type *} : logHeight (1 : ι → K) = 0 := by
280+ lemma logHeight_one : logHeight (1 : ι → K) = 0 := by
281281 simp [logHeight_eq_log_mulHeight]
282282
283+ lemma logHeight_comp_equiv (e : ι ≃ ι') (x : ι' → K) :
284+ logHeight (x ∘ ⇑e) = logHeight x := by
285+ simp only [logHeight_eq_log_mulHeight, mulHeight_comp_equiv]
286+
287+ lemma logHeight_swap (x y : K) : logHeight ![x, y] = logHeight ![y, x] := by
288+ simp only [logHeight_eq_log_mulHeight, mulHeight_swap]
289+
283290variable {α : Type *}
284291
285292/-- The multiplicative height of a finitely supported function. -/
@@ -300,7 +307,7 @@ private lemma max_eq_iSup {α : Type*} [ConditionallyCompleteLattice α] (a b :
300307 max a b = iSup ![a, b] :=
301308 eq_of_forall_ge_iff <| by simp [ciSup_le_iff, Fin.forall_fin_two]
302309
303- variable [Finite ι]
310+ variable [Finite ι] [Finite ι']
304311
305312@[fun_prop]
306313private lemma mulSupport_iSup_nonarchAbsVal_finite {x : ι → K} (hx : x ≠ 0 ) :
@@ -358,6 +365,31 @@ lemma mulHeight_ne_zero (x : ι → K) : mulHeight x ≠ 0 :=
358365lemma logHeight_nonneg (x : ι → K) : 0 ≤ logHeight x :=
359366 log_nonneg <| one_le_mulHeight x
360367
368+ open Function in
369+ lemma mulHeight_comp_le (f : ι → ι') (x : ι' → K) :
370+ mulHeight (x ∘ f) ≤ mulHeight x := by
371+ rcases eq_or_ne (x ∘ f) 0 with h₀ | h₀
372+ · simpa [h₀] using one_le_mulHeight _
373+ rcases eq_or_ne x 0 with rfl | hx
374+ · simp
375+ have : Nonempty ι := .intro (ne_iff.mp h₀).choose
376+ rw [mulHeight_eq h₀, mulHeight_eq hx]
377+ have H (v : AbsoluteValue K ℝ) : ⨆ i, v ((x ∘ f) i) ≤ ⨆ i, v (x i) :=
378+ ciSup_le fun i ↦ Finite.le_ciSup_of_le (f i) le_rfl
379+ gcongr
380+ · exact finprod_nonneg fun v ↦ Real.iSup_nonneg_of_nonnegHomClass v.val _
381+ · exact Multiset.prod_map_nonneg fun v _ ↦ Real.iSup_nonneg_of_nonnegHomClass v _
382+ · exact Multiset.prod_map_le_prod_map₀ _ _ (fun v _ ↦ Real.iSup_nonneg_of_nonnegHomClass v _)
383+ fun v _ ↦ H v
384+ · exact finprod_le_finprod (mulSupport_iSup_nonarchAbsVal_finite h₀)
385+ (fun v ↦ Real.iSup_nonneg_of_nonnegHomClass v.val _) (mulSupport_iSup_nonarchAbsVal_finite hx)
386+ fun v ↦ H v.val
387+
388+ open Real in
389+ lemma logHeight_comp_le (f : ι → ι') (x : ι' → K) :
390+ logHeight (x ∘ f) ≤ logHeight x := by
391+ simpa [logHeight_eq_log_mulHeight] using log_le_log (mulHeight_pos _) <| mulHeight_comp_le ..
392+
361393end Height
362394
363395/-!
@@ -503,6 +535,93 @@ lemma logHeight₁_zpow (x : K) (n : ℤ) : logHeight₁ (x ^ n) = n.natAbs * lo
503535
504536end Height
505537
538+ /-!
539+ ### Heights and "Segre embedding"
540+
541+ We show that the multiplicative height of `fun (i, j) ↦ x i * y j` is the product of the
542+ multiplicative heights of `x` and `y` (and the analogous statement for logarithmic heights).
543+
544+ We also show the corresponding statements for product with arbitrarily many factors.
545+ -/
546+
547+ namespace Height
548+
549+ open Height.AdmissibleAbsValues Function
550+
551+ variable {K : Type *} [Field K] [AdmissibleAbsValues K]
552+
553+ section many
554+
555+ universe u v
556+
557+ variable {α : Type u} [Fintype α] {ι : α → Type v} [∀ a, Finite (ι a)]
558+
559+ open Finset in
560+ /-- Consider a finite family `x : (a : α) → ι a → K` of tuples. Then the multiplicative height
561+ of the "multiplication table" `fun (I : (a : α) → ι a ↦ ∏ a, x a (I a))` is the product
562+ of the multiplicative heights of all the `x a`. -/
563+ lemma mulHeight_fun_prod_eq {x : (a : α) → ι a → K} (hx : ∀ a, x a ≠ 0 ) :
564+ mulHeight (fun I : (a : α) → ι a ↦ ∏ a, x a (I a)) = ∏ a, mulHeight (x a) := by
565+ rw [mulHeight_eq ?h₁]
566+ case h₁ =>
567+ simp_rw [ne_iff, Pi.zero_def] at hx ⊢
568+ choose f hf using hx
569+ exact ⟨f, prod_ne_zero_iff.mpr fun a _ ↦ hf a⟩
570+ simp_rw [map_prod, Real.iSup_prod_eq_prod_iSup_of_nonnegHomClass]
571+ rw [Multiset.prod_map_prod,
572+ finprod_prod_comm _ _ fun b _ ↦ mulSupport_iSup_nonarchAbsVal_finite (hx b), ← prod_mul_distrib]
573+ exact prod_congr rfl fun a _ ↦ by rw [mulHeight_eq (hx a)]
574+
575+ open Real in
576+ /-- Consider a finite family `x : (a : α) → ι a → K` of tuples. Then the logarithmic height
577+ of the "multiplication table" `fun (I : (a : α) → ι a ↦ ∏ a, x a (I a))` is the sum
578+ of the logarithmic heights of all the `x a`. -/
579+ lemma logHeight_fun_prod_eq {x : (a : α) → ι a → K} (hx : ∀ a, x a ≠ 0 ) :
580+ logHeight (fun I : (a : α) → ι a ↦ ∏ a, x a (I a)) = ∑ a, logHeight (x a) := by
581+ simp only [logHeight_eq_log_mulHeight]
582+ rw [← log_prod fun a _ ↦ mulHeight_ne_zero _]
583+ exact congrArg log <| mulHeight_fun_prod_eq hx
584+
585+ end many
586+
587+ section two
588+
589+ /-
590+ Note: One could try to deduce the binary case from the general case above,
591+ but this leads into dependent type shenanigans (because `ι` and `ι'` can live in different
592+ universes) that would likely obfuscate the proofs more than simplify them.
593+ -/
594+
595+ variable {ι ι' : Type *} [Finite ι] [Finite ι']
596+
597+ /-- The multiplicative height of the "multiplication table" `fun (i, j) ↦ x i * y j`
598+ is the product of the multiplicative heights of `x` and `y`. -/
599+ lemma mulHeight_fun_mul_eq {x : ι → K} (hx : x ≠ 0 ) {y : ι' → K} (hy : y ≠ 0 ) :
600+ mulHeight (fun a : ι × ι' ↦ x a.1 * y a.2 ) = mulHeight x * mulHeight y := by
601+ have hxy : (fun a : ι × ι' ↦ x a.1 * y a.2 ) ≠ 0 := by
602+ obtain ⟨i, hi⟩ := ne_iff.mp hx
603+ obtain ⟨j, hj⟩ := ne_iff.mp hy
604+ exact ne_iff.mpr ⟨⟨i, j⟩, mul_ne_zero hi hj⟩
605+ rw [mulHeight_eq hx, mulHeight_eq hy, mulHeight_eq hxy, mul_mul_mul_comm, ← Multiset.prod_map_mul,
606+ ← finprod_mul_distrib
607+ (mulSupport_iSup_nonarchAbsVal_finite hx) (mulSupport_iSup_nonarchAbsVal_finite hy)]
608+ congr <;> ext1 v
609+ · exact Real.iSup_fun_mul_eq_iSup_mul_iSup_of_nonneg v x y
610+ · exact Real.iSup_fun_mul_eq_iSup_mul_iSup_of_nonneg v.val x y
611+
612+ open Real in
613+ /-- The logarithmic height of the "multiplication table" `fun (i, j) ↦ x i * y j`
614+ is the sum of the logarithmic heights of `x` and `y`. -/
615+ lemma logHeight_fun_mul_eq {x : ι → K} (hx : x ≠ 0 ) {y : ι' → K} (hy : y ≠ 0 ) :
616+ logHeight (fun a : ι × ι' ↦ x a.1 * y a.2 ) = logHeight x + logHeight y := by
617+ simp only [logHeight_eq_log_mulHeight]
618+ pull (disch := positivity) log
619+ rw [mulHeight_fun_mul_eq hx hy]
620+
621+ end two
622+
623+ end Height
624+
506625/-!
507626### Bounds for the height of sums of field elements
508627
0 commit comments