Download data/lean/OAI/AlgebraicGeometry/Seshadri/Interpolation/CompressionRanks.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.59 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/Seshadri/Interpolation/CompressionRanks.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/AlgebraicGeometry/Seshadri/Interpolation/CompressionRanks.lean
-
curl -L -o CompressionRanks.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/AlgebraicGeometry/Seshadri/Interpolation/CompressionRanks.lean
8.59 kB
| import Mathlib | |
| namespace OAI | |
| section | |
| namespace MaximalSeshadri.Interpolation | |
| open scoped BigOperators Pointwise | |
| open scoped BigOperators ContDiff | |
| open Filter Topology | |
| abbrev JetIndex (r m : β) := Fin r Γ Fin m Γ Fin m | |
| noncomputable def finiteJetColumn (r m : β) (points : Fin r β β Γ β) | |
| (f : β β β β β) : JetIndex r m β β := fun j => | |
| if (j.2.1 : β) + (j.2.2 : β) < m then | |
| iteratedDeriv j.2.2 (fun z => iteratedDeriv j.2.1 (fun u => f u z) | |
| (points j.1).1) (points j.1).2 else 0 | |
| theorem finite_jet_rank_persistence {Ξ± ΞΉ : Type*} [Finite ΞΉ] | |
| (l : Filter Ξ±) (r m : β) (points : Fin r β β Γ β) | |
| (f : Ξ± β ΞΉ β β β β β β) (fβ : ΞΉ β β β β β β) | |
| (hconv : β i j, Tendsto (fun s => finiteJetColumn r m points (f s i) j) l | |
| (π (finiteJetColumn r m points (fβ i) j))) | |
| (hβ : LinearIndependent β (fun i => finiteJetColumn r m points (fβ i))) : | |
| βαΆ s in l, LinearIndependent β (fun i => finiteJetColumn r m points (f s i)) := by | |
| have hlim : Tendsto (fun s i => finiteJetColumn r m points (f s i)) l | |
| (π (fun i => finiteJetColumn r m points (fβ i))) := | |
| tendsto_pi_nhds.mpr (fun i => tendsto_pi_nhds.mpr (hconv i)) | |
| exact hlim.eventually hβ.eventually | |
| theorem contDiff_iteratedDeriv_parameter (f : β β β β β) | |
| (hf : ContDiff β β (Function.uncurry f)) (n : β) : | |
| ContDiff β β (fun p : β Γ β => iteratedDeriv n (f p.1) p.2) := by | |
| induction n with | |
| | zero => | |
| exact hf | |
| | succ n ih => | |
| have hh : ContDiff β β (Function.uncurry | |
| (fun p : β Γ β => fun z : β => iteratedDeriv n (f p.1) z)) := by | |
| exact ih.comp (contDiff_fst.fst.prodMk contDiff_snd) | |
| have hd := hh.fderiv contDiff_snd (by simp : (β : ββΟ) + 1 β€ β) | |
| have ha := hd.clm_apply (contDiff_const (c := (1 : β))) | |
| simpa only [iteratedDeriv_succ, deriv] using ha | |
| theorem compression_row_smooth (B h : β) : | |
| ContDiff β β (fun p : β Γ β => (1 + p.1 * p.2) ^ B * p.2 ^ h) := by | |
| fun_prop | |
| theorem compression_row_derivative_limit (B h n : β) (z : β) : | |
| Tendsto (fun s : β => iteratedDeriv n (fun y : β => (1 + s * y) ^ B * y ^ h) z) | |
| (π 0) (π (iteratedDeriv n (fun y : β => y ^ h) z)) := by | |
| have hc := (contDiff_iteratedDeriv_parameter | |
| (fun s y : β => (1 + s * y) ^ B * y ^ h) (compression_row_smooth B h) n).continuous | |
| have hh := (hc.comp (continuous_id.prodMk (continuous_const (y := z)))).tendsto (0 : β) | |
| change Tendsto (fun s : β => iteratedDeriv n (fun y : β => | |
| (1 + s * y) ^ B * y ^ h) z) (π 0) | |
| (π (iteratedDeriv n (fun y : β => (1 + 0 * y) ^ B * y ^ h) z)) at hh | |
| simpa only [zero_mul, add_zero, one_pow, one_mul] using hh | |
| theorem mixed_deriv_separated (f g : β β β) (a b : β) (u z : β) : | |
| iteratedDeriv b (fun y => iteratedDeriv a (fun x => f x * g y) u) z = | |
| iteratedDeriv a f u * iteratedDeriv b g z := by | |
| simp_rw [iteratedDeriv_mul_const_field] | |
| rw [iteratedDeriv_const_mul_field] | |
| theorem compression_mixed_derivative_limit (q : β€) (B h a b : β) (u z : β) : | |
| Tendsto (fun s : β => iteratedDeriv b (fun y => iteratedDeriv a | |
| (fun x => x ^ q * ((1 + s * y) ^ B * y ^ h)) u) z) (π 0) | |
| (π (iteratedDeriv b (fun y => iteratedDeriv a (fun x => x ^ q * y ^ h) u) z)) := by | |
| simp_rw [mixed_deriv_separated] | |
| exact tendsto_const_nhds.mul (compression_row_derivative_limit B h b z) | |
| theorem compression_finite_rank {ΞΉ : Type*} [Finite ΞΉ] (q : ΞΉ β β€) (B h : ΞΉ β β) | |
| (r m : β) (points : Fin r β β Γ β) | |
| (hβ : LinearIndependent β (fun i => finiteJetColumn r m points | |
| (fun u z => u ^ q i * z ^ h i))) : | |
| βαΆ s : β in π 0, LinearIndependent β (fun i => finiteJetColumn r m points | |
| (fun u z => u ^ q i * ((1 + s * z) ^ B i * z ^ h i))) := by | |
| apply finite_jet_rank_persistence (π (0 : β)) r m points _ _ _ hβ | |
| intro i j | |
| dsimp only [finiteJetColumn] | |
| split_ifs | |
| Β· exact compression_mixed_derivative_limit (q i) (B i) (h i) j.2.1 j.2.2 | |
| (points j.1).1 (points j.1).2 | |
| Β· exact tendsto_const_nhds | |
| theorem linearIndependent_of_span_le {ΞΉ V : Type*} [Fintype ΞΉ] | |
| [AddCommGroup V] [Module β V] (u v : ΞΉ β V) | |
| (hu : LinearIndependent β u) | |
| (hspan : Submodule.span β (Set.range u) β€ Submodule.span β (Set.range v)) : | |
| LinearIndependent β v := by | |
| let := Module.Finite.span_of_finite β (Set.finite_range v) | |
| apply linearIndependent_iff_card_le_finrank_span.mpr | |
| rw [β finrank_span_eq_card hu] | |
| exact Submodule.finrank_mono hspan | |
| theorem iteratedDeriv_polynomial (P : Polynomial β) (n : β) : | |
| iteratedDeriv n (fun z : β => P.eval z) = | |
| fun z => (((Polynomial.derivative : Module.End β (Polynomial β)) ^ n) P).eval z := by | |
| induction n generalizing P with | |
| | zero => rfl | |
| | succ n ih => | |
| rw [iteratedDeriv_succ'] | |
| have he : deriv (fun z : β => P.eval z) = fun z => P.derivative.eval z := by | |
| funext z | |
| exact P.deriv | |
| rw [he, ih, Module.End.iterate_succ] | |
| rfl | |
| noncomputable def polynomialJetMap (r m : β) (points : Fin r β β Γ β) (q : β€) : | |
| Polynomial β ββ[β] (JetIndex r m β β) := | |
| LinearMap.pi fun j => if (j.2.1 : β) + (j.2.2 : β) < m then | |
| (iteratedDeriv j.2.1 (fun u : β => u ^ q) (points j.1).1) β’ | |
| ((Polynomial.aeval (points j.1).2).toLinearMap.comp | |
| ((Polynomial.derivative : Module.End β (Polynomial β)) ^ (j.2.2 : β))) | |
| else 0 | |
| theorem polynomialJetMap_eq (r m : β) (points : Fin r β β Γ β) (q : β€) | |
| (P : Polynomial β) : | |
| polynomialJetMap r m points q P = finiteJetColumn r m points | |
| (fun u z => u ^ q * P.eval z) := by | |
| funext j | |
| simp only [polynomialJetMap, LinearMap.pi_apply, finiteJetColumn] | |
| split_ifs <;> simp only [LinearMap.smul_apply, LinearMap.comp_apply, | |
| AlgHom.toLinearMap_apply, Polynomial.coe_aeval_eq_eval, smul_eq_mul, | |
| mixed_deriv_separated, iteratedDeriv_polynomial, LinearMap.zero_apply] | |
| theorem polynomial_image_mem_span {V : Type*} [AddCommGroup V] [Module β V] | |
| (L : Polynomial β ββ[β] V) (P : Polynomial β) (n : β) (hP : P.natDegree β€ n) : | |
| L P β Submodule.span β (Set.range fun j : Fin (n + 1) => L (Polynomial.X ^ (j : β))) := by | |
| classical | |
| rw [β P.sum_monomial_eq, Polynomial.sum_def, map_sum] | |
| apply Submodule.sum_mem | |
| intro j hj | |
| have hjn : j < n + 1 := by | |
| have h := (Polynomial.le_natDegree_of_ne_zero (Polynomial.mem_support_iff.mp hj)).trans hP | |
| omega | |
| have he : Polynomial.monomial j (P.coeff j) = (P.coeff j) β’ (Polynomial.X : Polynomial β) ^ j := by | |
| simp [Polynomial.smul_eq_C_mul, Polynomial.C_mul_X_pow_eq_monomial] | |
| rw [he, map_smul] | |
| exact Submodule.smul_mem _ _ (Submodule.subset_span β¨β¨j, hjnβ©, rflβ©) | |
| noncomputable def compressionRowMap (s : β) (B : β) : Polynomial β ββ[β] Polynomial β where | |
| toFun P := (1 + Polynomial.C s * Polynomial.X) ^ B * P.comp (1 + Polynomial.C s * Polynomial.X) | |
| map_add' P Q := by simp [mul_add] | |
| map_smul' c P := by | |
| simp only [Polynomial.smul_eq_C_mul, RingHom.id_apply, Polynomial.mul_comp, | |
| Polynomial.C_comp] | |
| ring | |
| theorem compressionRowMap_pow (s : β) (B j : β) : | |
| compressionRowMap s B (Polynomial.X ^ j) = (1 + Polynomial.C s * Polynomial.X) ^ (B + j) := by | |
| simp [compressionRowMap, pow_add] | |
| theorem compressionRowMap_inverse (s : β) (hs : s β 0) (B h : β) : | |
| compressionRowMap s B ((Polynomial.C sβ»ΒΉ * (Polynomial.X - 1)) ^ h) = | |
| (1 + Polynomial.C s * Polynomial.X) ^ B * Polynomial.X ^ h := by | |
| have he : Polynomial.C sβ»ΒΉ * ((1 + Polynomial.C s * Polynomial.X) - 1) = | |
| (Polynomial.X : Polynomial β) := by | |
| rw [add_sub_cancel_left, β mul_assoc, β Polynomial.C_mul, inv_mul_cancelβ hs, | |
| Polynomial.C_1, one_mul] | |
| simp only [compressionRowMap, LinearMap.coe_mk, AddHom.coe_mk, Polynomial.pow_comp, | |
| Polynomial.mul_comp, Polynomial.C_comp, Polynomial.sub_comp, Polynomial.X_comp, | |
| Polynomial.one_comp, he] | |
| theorem compression_inverse_degree (s : β) (h : β) : | |
| ((Polynomial.C sβ»ΒΉ * (Polynomial.X - 1)) ^ h).natDegree β€ h := by | |
| have ha : (Polynomial.C sβ»ΒΉ * (Polynomial.X - 1)).natDegree β€ 1 := by | |
| refine (Polynomial.natDegree_mul_le).trans ?_ | |
| simp only [Polynomial.natDegree_C, zero_add] | |
| exact (Polynomial.natDegree_sub_le _ _).trans (by simp) | |
| exact (Polynomial.natDegree_pow_le).trans (by simpa using Nat.mul_le_mul_left h ha) | |
| end MaximalSeshadri.Interpolation | |
| end | |
| end OAI | |