Download data/lean/OAI/Algebra/Determinantal/InitialForm.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.08 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Determinantal/InitialForm.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/Determinantal/InitialForm.lean
-
curl -L -o InitialForm.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Determinantal/InitialForm.lean
7.08 kB
| import OAI.Algebra.Determinantal.BorderClosure | |
| import OAI.Algebra.Determinantal.BorderPolars | |
| namespace OAI | |
| namespace PermanentBorder | |
| open MvPolynomial Filter | |
| open scoped Topology | |
| namespace InitialHomogeneous | |
| variable {Ο : Type*} [Fintype Ο] | |
| noncomputable def dilation (t : β) : Poly Ο ββ[β] Poly Ο := by | |
| classical | |
| exact affineSubstitution (fun _ => 0) (fun i j => if i = j then t else 0) | |
| lemma dilation_eq_aeval (t : β) : | |
| dilation (Ο := Ο) t = aeval (fun i => C t * X i) := by | |
| classical | |
| unfold dilation affineSubstitution | |
| congr 1 | |
| funext i | |
| simp [apply_ite] | |
| lemma dilation_monomial (t : β) (e : Ο ββ β) (c : β) : | |
| dilation t (monomial e c) = t ^ e.degree β’ monomial e c := by | |
| rw [dilation_eq_aeval] | |
| have h := SliceParameters.homogeneous_aeval_scale | |
| (isHomogeneous_monomial c (n := e.degree) rfl) (C t) (fun i : Ο => X i) | |
| simpa only [aeval_X_left_apply, β map_pow, smul_eq_C_mul] using h | |
| lemma coeff_dilation (t : β) (q : Poly Ο) (e : Ο ββ β) : | |
| (dilation t q).coeff e = t ^ e.degree * q.coeff e := by | |
| classical | |
| induction q using MvPolynomial.induction_on' with | |
| | monomial s c => | |
| rw [dilation_monomial, coeff_smul] | |
| by_cases h : s = e | |
| Β· subst s; rfl | |
| Β· simp [coeff_monomial, h] | |
| | add p q hp hq => | |
| simp only [map_add, AddMonoidAlgebra.coeff_add, Finsupp.add_apply, hp, hq, mul_add] | |
| noncomputable def normalizedDilation (r : β) (q : Poly Ο) (t : β) : Poly Ο := | |
| (t ^ r)β»ΒΉ β’ dilation t q | |
| omit [Fintype Ο] in | |
| lemma coeff_eq_zero_of_lower_components {q : Poly Ο} {r : β} | |
| (hlow : β j < r, homogeneousComponent j q = 0) | |
| (e : Ο ββ β) (he : e.degree < r) : q.coeff e = 0 := by | |
| have h := congrArg (fun p : Poly Ο => p.coeff e) (hlow e.degree he) | |
| simpa [coeff_homogeneousComponent] using h | |
| lemma coeff_normalizedDilation {q : Poly Ο} {r : β} | |
| (hlow : β j < r, homogeneousComponent j q = 0) | |
| {t : β} (ht : t β 0) (e : Ο ββ β) : | |
| (normalizedDilation r q t).coeff e = | |
| if e.degree < r then 0 else t ^ (e.degree - r) * q.coeff e := by | |
| simp only [normalizedDilation, coeff_smul, smul_eq_mul, coeff_dilation] | |
| by_cases he : e.degree < r | |
| Β· simp [he, coeff_eq_zero_of_lower_components hlow e he] | |
| Β· rw [ite_eq_right he] | |
| obtain β¨k, hkβ© := Nat.exists_eq_add_of_le (Nat.le_of_not_gt he) | |
| rw [hk, Nat.add_sub_cancel_left, pow_add] | |
| rw [β mul_assoc, β mul_assoc, inv_mul_cancelβ (pow_ne_zero r ht), one_mul] | |
| /-- Cancellation of the pole gives coefficientwise convergence along any filter | |
| approaching zero through nonzero complex values. -/ | |
| theorem normalizedDilation_tendsto {Ξ± : Type*} {l : Filter Ξ±} | |
| {q : Poly Ο} {r : β} | |
| (hlow : β j < r, homogeneousComponent j q = 0) | |
| {t : Ξ± β β} (ht : Tendsto t l (π 0)) | |
| (hne : βαΆ j in l, t j β 0) (e : Ο ββ β) : | |
| Tendsto (fun j => (normalizedDilation r q (t j)).coeff e) | |
| l (π ((homogeneousComponent r q).coeff e)) := by | |
| have heq : (fun j => (normalizedDilation r q (t j)).coeff e) =αΆ [l] | |
| (fun j => if e.degree < r then 0 else t j ^ (e.degree-r) * q.coeff e) := | |
| hne.mono fun j hj => coeff_normalizedDilation hlow hj e | |
| apply Tendsto.congr' heq.symm | |
| rw [coeff_homogeneousComponent] | |
| by_cases hlo : e.degree < r | |
| Β· simp only [hlo, ite_true, ite_eq_right (Nat.ne_of_lt hlo)] | |
| exact tendsto_const_nhds | |
| Β· simp only [hlo, ite_false] | |
| by_cases he : e.degree = r | |
| Β· simp only [he, Nat.sub_self, pow_zero, one_mul, ite_true] | |
| exact tendsto_const_nhds | |
| Β· have hk : e.degree-r β 0 := by omega | |
| simpa only [ite_eq_right he, zero_pow hk, zero_mul] using | |
| (ht.pow (e.degree-r)).mul_const (q.coeff e) | |
| /-- Normalized dilation converges coefficientwise as the positive real scale tends to zero. -/ | |
| theorem normalizedDilation_tendsto_positive {q : Poly Ο} {r : β} | |
| (hlow : β j < r, homogeneousComponent j q = 0) (e : Ο ββ β) : | |
| Tendsto (fun t : β => (normalizedDilation r q (t : β)).coeff e) | |
| (π[Set.Ioi 0] 0) (π ((homogeneousComponent r q).coeff e)) := by | |
| apply normalizedDilation_tendsto hlow | |
| Β· exact (Complex.continuous_ofReal.tendsto 0).mono_left nhdsWithin_le_nhds | |
| Β· filter_upwards [self_mem_nhdsWithin] with t ht | |
| exact_mod_cast (ne_of_gt ht : t β (0 : β)) | |
| end InitialHomogeneous | |
| /-- The lowest homogeneous component inherits the fixed border determinant size | |
| by degeneration along a geometric sequence of nonzero scales. -/ | |
| theorem HasBorderDeterminant.lowest_homogeneousComponent | |
| {Ο : Type*} [Fintype Ο] {n r : β} {q : Poly Ο} | |
| (hb : HasBorderDeterminant n q) | |
| (hlow : β j < r, homogeneousComponent j q = 0) : | |
| HasBorderDeterminant n (homogeneousComponent r q) := by | |
| classical | |
| let t : β β β := fun j => (1 / 2 : β) ^ j | |
| have ht : Tendsto t atTop (π 0) := by | |
| apply tendsto_pow_atTop_nhds_zero_of_norm_lt_one | |
| norm_num | |
| have hne : β j, t j β 0 := fun j => pow_ne_zero j (by norm_num) | |
| apply HasBorderDeterminant.coefficientwise_limit | |
| (P := fun j => InitialHomogeneous.normalizedDilation r q (t j)) | |
| Β· intro j | |
| exact hb.affineSubstitution_smul (fun _ => 0) | |
| (fun i k => if i = k then t j else 0) ((t j ^ r)β»ΒΉ) | |
| Β· exact InitialHomogeneous.normalizedDilation_tendsto hlow ht | |
| (Filter.Eventually.of_forall hne) | |
| /-- A smooth lowest homogeneous term after translation bounds both border and exact | |
| determinant sizes by the product of its degree minus one and dimension minus one, | |
| divided by `4 * Real.exp 1`. -/ | |
| theorem smooth_initial_form_lower_bound (d r : β) (g : Poly (Fin d)) | |
| (a : Fin d β β) (hd : 2 β€ d) (hr : 2 β€ r) | |
| (_hG : homogeneousComponent r | |
| (affineSubstitution a (fun i j : Fin d => if i = j then 1 else 0) g) β 0) | |
| (hlow : β j < r, homogeneousComponent j | |
| (affineSubstitution a (fun i j : Fin d => if i = j then 1 else 0) g) = 0) | |
| (hs : β y : Fin d β β, | |
| eval y (homogeneousComponent r | |
| (affineSubstitution a (fun i j : Fin d => if i = j then 1 else 0) g)) = 0 β | |
| (β i, eval y (pderiv i (homogeneousComponent r | |
| (affineSubstitution a (fun i j : Fin d => if i = j then 1 else 0) g))) = 0) β | |
| y = 0) : | |
| β n : β, | |
| (HasBorderDeterminant n g β | |
| ((r-1 : β) : β) * ((d-1 : β) : β) / (4*Real.exp 1) β€ (n : β)) β§ | |
| (HasExactDeterminant n g β | |
| ((r-1 : β) : β) * ((d-1 : β) : β) / (4*Real.exp 1) β€ (n : β)) := by | |
| intro n | |
| have hb : HasBorderDeterminant n g β | |
| ((r-1 : β) : β) * ((d-1 : β) : β) / (4*Real.exp 1) β€ (n : β) := by | |
| intro h | |
| have hq := h.affineSubstitution a | |
| (fun i j : Fin d => if i = j then (1 : β) else 0) | |
| have hinit := hq.lowest_homogeneousComponent hlow | |
| simpa only [Fintype.card_fin] using Polar.HasBorderDeterminant.smooth_lower_bound hinit | |
| (by simpa only [Fintype.card_fin] using hd) hr | |
| (homogeneousComponent_isHomogeneous r _) hs | |
| exact β¨hb, fun h => hb h.hasBorderDeterminantβ© | |
| end PermanentBorder | |
| end OAI | |