Weighted coefficient-packet surjectivity is unchanged by truncating the formal logarithm
ProvedOAI.PiExponent.FormalLogTruncation.formalLog_packets_surjective_iff_truncatedLet m be a natural number, let α and J be index types, and let v : Fin (m + 1) → ℚ be a nonnegative rational weight vector. For H ∈ ℚ, put D(v,H) = {d : Fin (m + 1) →₀ ℕ | ∑ₖ d(k)v(k) < H}; the coefficient packet of a multivariate formal power series f is the function d ↦ [Xᵈ]f on D(v,H). Let T : Fin m → ℕ satisfy v(i + 1) ≤ T(i) v(0) for every i, let c assign a complex m-tuple cⱼ to each j ∈ J, and let P assign a polynomial Pₐ in m variables to each a ∈ α. Then the two maps a ↦ (j ↦ packet(formalJet(cⱼ, Pₐ))) and a ↦ (j ↦ packet(truncatedFormalJet(cⱼ, T, Pₐ))) are either both surjective onto all J-indexed packet families or both fail to be surjective. Thus one common index a must realize the prescribed packet for every j in the joint family.
import Definitions.Def_OAI_NumberTheory_PiExponent_Analysis_FormalLogTruncation
import Definitions.Def_OAI_NumberTheory_PiExponent_Jets_FormalLogJet
import Definitions.Def_OAI_NumberTheory_PiExponent_Jets_JetGeometry
import Definitions.Def_OAI_NumberTheory_PiExponent_Polynomials_PolynomialFrame
import Definitions.Def_OAI_NumberTheory_PiExponent_Polynomials_PolynomialFrameDegree
import Lean
import Mathlib.Algebra.Algebra.Hom.Rat
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
import Mathlib.Algebra.BigOperators.Group.Finset.Piecewise
import Mathlib.Algebra.BigOperators.Group.Finset.Sigma
import Mathlib.Algebra.BigOperators.Intervals
import Mathlib.Algebra.Category.ModuleCat.Ext.HasExt
import Mathlib.Algebra.Field.Equiv
import Mathlib.Algebra.Group.ForwardDiff
import Mathlib.Algebra.Homology.DerivedCategory.Ext.ExactSequences
import Mathlib.Algebra.Homology.HomologicalComplex
import Mathlib.Algebra.Homology.ShortComplex.ModuleCat
import Mathlib.Algebra.Module.LocalizedModule.IsLocalization
import Mathlib.Algebra.Module.LocalizedModule.Submodule
import Mathlib.Algebra.Module.SnakeLemma
import Mathlib.Algebra.Module.Submodule.Equiv
import Mathlib.Algebra.Module.Submodule.RestrictScalars
import Mathlib.Algebra.Module.Submodule.Union
import Mathlib.Algebra.Module.Torsion.Basic
import Mathlib.Algebra.MvPolynomial.Basic
import Mathlib.Algebra.MvPolynomial.Degrees
import Mathlib.Algebra.MvPolynomial.Equiv
import Mathlib.Algebra.MvPolynomial.Eval
import Mathlib.Algebra.MvPolynomial.PDeriv
import Mathlib.Algebra.Order.Antidiag.FinsuppEquiv
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Order.BigOperators.GroupWithZero.Finset
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.Floor.Semiring
import Mathlib.Algebra.Order.Group.Defs
import Mathlib.Algebra.Order.Group.Int
import Mathlib.Algebra.Order.Round
import Mathlib.Algebra.Polynomial.Degree.Lemmas
import Mathlib.Algebra.Polynomial.Degree.SmallDegree
import Mathlib.Algebra.Polynomial.Derivation
import Mathlib.Algebra.Polynomial.Div
import Mathlib.Algebra.Polynomial.Eval.Coeff
import Mathlib.Algebra.Polynomial.Eval.Subring
import Mathlib.Algebra.Polynomial.FieldDivision
import Mathlib.Algebra.Polynomial.Laurent
import Mathlib.Algebra.Polynomial.Roots
import Mathlib.Algebra.Polynomial.Taylor
import Mathlib.Algebra.Regular.Defs
import Mathlib.Algebra.Ring.GeomSum
import Mathlib.AlgebraicGeometry.Artinian
import Mathlib.AlgebraicGeometry.FunctionField
import Mathlib.AlgebraicGeometry.Gluing
import Mathlib.AlgebraicGeometry.IdealSheaf.Basic
import Mathlib.AlgebraicGeometry.IdealSheaf.Functorial
import Mathlib.AlgebraicGeometry.Limits
import Mathlib.AlgebraicGeometry.Modules.Tilde
import Mathlib.AlgebraicGeometry.Morphisms.Affine
import Mathlib.AlgebraicGeometry.Morphisms.Finite
import Mathlib.AlgebraicGeometry.Morphisms.FiniteType
import Mathlib.AlgebraicGeometry.Morphisms.SchemeTheoreticallyDominant
import Mathlib.AlgebraicGeometry.Morphisms.Separated
import Mathlib.AlgebraicGeometry.Noetherian
import Mathlib.AlgebraicGeometry.Normalization
import Mathlib.AlgebraicGeometry.OpenImmersion
import Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Proper
import Mathlib.AlgebraicGeometry.Stalk
import Mathlib.AlgebraicGeometry.ValuativeCriterion
import Mathlib.Analysis.Asymptotics.SpecificAsymptotics
import Mathlib.Analysis.Complex.CauchyIntegral
import Mathlib.Analysis.Complex.TaylorSeries
import Mathlib.Analysis.Convex.Cone.Basic
import Mathlib.Analysis.Normed.Group.InfiniteSum
import Mathlib.Analysis.Normed.Group.Rat
import Mathlib.Analysis.Polynomial.Basic
import Mathlib.Analysis.Real.Pi.Bounds
import Mathlib.Analysis.Real.Pi.Irrational
import Mathlib.Analysis.SpecialFunctions.Choose
import Mathlib.Analysis.SpecialFunctions.Complex.Analytic
import Mathlib.Analysis.SpecialFunctions.Complex.LogBounds
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Bounds
import Mathlib.Analysis.SpecificLimits.Basic
import Mathlib.Analysis.SpecificLimits.Normed
import Mathlib.CategoryTheory.Abelian.Projective.Ext
import Mathlib.Data.Complex.Basic
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.Finset.Interval
import Mathlib.Data.Finsupp.Basic
import Mathlib.Data.Finsupp.Multiset
import Mathlib.Data.Finsupp.SMulWithZero
import Mathlib.Data.Finsupp.Weight
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Option
import Mathlib.Data.Nat.Choose.Sum
import Mathlib.Data.Nat.Factorial.Basic
import Mathlib.Data.Nat.Init
import Mathlib.Data.Real.Basic
import Mathlib.Data.Sym.Card
import Mathlib.FieldTheory.AlgebraicClosure
import Mathlib.FieldTheory.IntermediateField.Adjoin.Algebra
import Mathlib.FieldTheory.IntermediateField.Adjoin.Basic
import Mathlib.FieldTheory.IntermediateField.Adjoin.Defs
import Mathlib.FieldTheory.SeparablyGenerated
import Mathlib.LinearAlgebra.Basis.Prod
import Mathlib.LinearAlgebra.Dimension.Constructions
import Mathlib.LinearAlgebra.Dimension.DivisionRing
import Mathlib.LinearAlgebra.Dimension.Finrank
import Mathlib.LinearAlgebra.Dimension.RankNullity
import Mathlib.LinearAlgebra.Dimension.StrongRankCondition
import Mathlib.LinearAlgebra.DirectSum.Finite
import Mathlib.LinearAlgebra.Dual.Defs
import Mathlib.LinearAlgebra.Dual.Lemmas
import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas
import Mathlib.LinearAlgebra.Finsupp.LinearCombination
import Mathlib.LinearAlgebra.Finsupp.Supported
import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
import Mathlib.LinearAlgebra.Isomorphisms
import Mathlib.LinearAlgebra.Matrix.Determinant.Basic
import Mathlib.LinearAlgebra.Prod
import Mathlib.LinearAlgebra.Quotient.Basic
import Mathlib.Logic.Equiv.Sum
import Mathlib.NumberTheory.BernoulliPolynomials
import Mathlib.NumberTheory.Chebyshev
import Mathlib.NumberTheory.Real.Irrational
import Mathlib.NumberTheory.Zsqrtd.GaussianInt
import Mathlib.Order.Minimal
import Mathlib.RingTheory.AdjoinRoot
import Mathlib.RingTheory.AlgebraicIndependent.Basic
import Mathlib.RingTheory.AlgebraicIndependent.TranscendenceBasis
import Mathlib.RingTheory.Coprime.Lemmas
import Mathlib.RingTheory.Derivation.Basic
import Mathlib.RingTheory.Etale.Field
import Mathlib.RingTheory.Etale.Kaehler
import Mathlib.RingTheory.FiniteType
import Mathlib.RingTheory.Finiteness.Basic
import Mathlib.RingTheory.Finiteness.Prod
import Mathlib.RingTheory.Flat.Basic
import Mathlib.RingTheory.Flat.FaithfullyFlat.Algebra
import Mathlib.RingTheory.Flat.Localization
import Mathlib.RingTheory.GradedAlgebra.Homogeneous.Ideal
import Mathlib.RingTheory.GradedAlgebra.Homogeneous.Maps
import Mathlib.RingTheory.GradedAlgebra.Radical
import Mathlib.RingTheory.Ideal.AssociatedPrime.Finiteness
import Mathlib.RingTheory.Ideal.AssociatedPrime.Localization
import Mathlib.RingTheory.Ideal.Colon
import Mathlib.RingTheory.Ideal.Cotangent
import Mathlib.RingTheory.Ideal.GoingDown
import Mathlib.RingTheory.Ideal.GoingUp
import Mathlib.RingTheory.Ideal.KrullsHeightTheorem
import Mathlib.RingTheory.Ideal.Maps
import Mathlib.RingTheory.Ideal.Maximal
import Mathlib.RingTheory.Ideal.MinimalPrime.Localization
import Mathlib.RingTheory.Ideal.MinimalPrime.Noetherian
import Mathlib.RingTheory.Ideal.Operations
import Mathlib.RingTheory.Ideal.Prime
import Mathlib.RingTheory.Ideal.Quotient.Basic
import Mathlib.RingTheory.Ideal.Quotient.Defs
import Mathlib.RingTheory.Ideal.Quotient.Operations
import Mathlib.RingTheory.Ideal.Span
import Mathlib.RingTheory.IntegralClosure.GoingDown
import Mathlib.RingTheory.Jacobson.Ring
import Mathlib.RingTheory.KrullDimension.Field
import Mathlib.RingTheory.KrullDimension.LocalRing
import Mathlib.RingTheory.KrullDimension.NonZeroDivisors
import Mathlib.RingTheory.KrullDimension.Polynomial
import Mathlib.RingTheory.KrullDimension.Regular
import Mathlib.RingTheory.KrullDimension.Zero
import Mathlib.RingTheory.LaurentSeries
import Mathlib.RingTheory.Length
import Mathlib.RingTheory.LocalRing.MaximalIdeal.Basic
import Mathlib.RingTheory.LocalRing.Quotient
import Mathlib.RingTheory.LocalRing.ResidueField.Basic
import Mathlib.RingTheory.LocalRing.ResidueField.Defs
import Mathlib.RingTheory.LocalRing.ResidueField.Ideal
import Mathlib.RingTheory.LocalRing.ResidueField.Instances
import Mathlib.RingTheory.LocalRing.RingHom.Basic
import Mathlib.RingTheory.Localization.AtPrime.Basic
import Mathlib.RingTheory.Localization.FractionRing
import Mathlib.RingTheory.Localization.Ideal
import Mathlib.RingTheory.Localization.LocalizationLocalization
import Mathlib.RingTheory.Localization.Submodule
import Mathlib.RingTheory.MvPolynomial.Basic
import Mathlib.RingTheory.MvPolynomial.Homogeneous
import Mathlib.RingTheory.MvPolynomial.Localization
import Mathlib.RingTheory.MvPolynomial.WeightedHomogeneous
import Mathlib.RingTheory.MvPowerSeries.Derivative
import Mathlib.RingTheory.MvPowerSeries.Equiv
import Mathlib.RingTheory.MvPowerSeries.Inverse
import Mathlib.RingTheory.MvPowerSeries.Order
import Mathlib.RingTheory.MvPowerSeries.Substitution
import Mathlib.RingTheory.NoetherNormalization
import Mathlib.RingTheory.Noetherian.Nilpotent
import Mathlib.RingTheory.OrderOfVanishing.Noetherian
import Mathlib.RingTheory.Polynomial.Basic
import Mathlib.RingTheory.Polynomial.HilbertPoly
import Mathlib.RingTheory.Polynomial.Quotient
import Mathlib.RingTheory.Polynomial.RationalRoot
import Mathlib.RingTheory.Polynomial.UniqueFactorization
import Mathlib.RingTheory.PowerSeries.Basic
import Mathlib.RingTheory.PowerSeries.Log
import Mathlib.RingTheory.PowerSeries.Order
import Mathlib.RingTheory.PowerSeries.Trunc
import Mathlib.RingTheory.PowerSeries.WellKnown
import Mathlib.RingTheory.PrincipalIdealDomain
import Mathlib.RingTheory.Regular.Flat
import Mathlib.RingTheory.Regular.RegularSequence
import Mathlib.RingTheory.RegularLocalRing.Polynomial
import Mathlib.RingTheory.SimpleModule.Basic
import Mathlib.RingTheory.Smooth.Basic
import Mathlib.RingTheory.Spectrum.Prime.Topology
import Mathlib.RingTheory.TensorProduct.Quotient
import Mathlib.RingTheory.Trace.Defs
import Mathlib.SetTheory.Cardinal.ToNat
import Mathlib.Tactic
import Mathlib.Tactic.Abel
import Mathlib.Tactic.Choose
import Mathlib.Tactic.Conv
import Mathlib.Tactic.Convert
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.LinearCombination
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
import Mathlib.Topology.Algebra.InfiniteSum.ENNReal
import Mathlib.Topology.Algebra.InfiniteSum.Real
import Mathlib.Topology.Instances.Matrix
import Mathlib.Topology.Instances.Real.Lemmas
import Theorems.Thm_OAI_PiExponent_FormalLogTruncation_logTail_mem_rationalWeightedIdeal
import Theorems.Thm_OAI_PiExponent_FormalLogTruncation_shiftMap_truncatedFormalJet
section
namespace OAI
namespace PiExponent.FormalLogTruncation
open MvPowerSeries
open scoped BigOperators
variable {R : Type*} [CommRing R]
@[simp] theorem shiftEquiv_apply {m : ℕ} (tail : Fin m → PowerSeries R)
(ht : ∀ i, PowerSeries.constantCoeff (tail i) = 0) (f) :
shiftEquiv tail ht f = shiftMap tail ht f := rfl
open JetGeometry
theorem rationalCoefficientPacket_surjective {σ : Type*} (v : σ → ℚ) (H : ℚ) :
Function.Surjective (rationalCoefficientPacket (R := R) v H) := by
classical
intro p
refine ⟨fun d => if hd : Finsupp.weight v d < H then p ⟨d,hd⟩ else 0, ?_⟩
funext d
exact dif_pos d.property
theorem shiftEquiv_mem_iff {m : ℕ} (tail : Fin m → PowerSeries R)
(ht : ∀ i, PowerSeries.constantCoeff (tail i) = 0)
(v : Fin (m+1) → ℚ) (hv : ∀ i, 0 ≤ v i)
(hweight : ∀ i, (tail i).toMvPowerSeries (0 : Fin (m+1)) ∈
rationalWeightedIdeal v hv (v i.succ)) (H : ℚ) (f) :
shiftEquiv tail ht f ∈ rationalWeightedIdeal v hv H ↔
f ∈ rationalWeightedIdeal v hv H := by
have hn : ∀ i, (-tail i).toMvPowerSeries (0 : Fin (m+1)) ∈
rationalWeightedIdeal v hv (v i.succ) := by
intro i
rw [map_neg]
intro d hd
rw [map_neg, hweight i d hd, neg_zero]
constructor
· intro hf
have h := shiftMap_mem_rationalWeightedIdeal (fun i => -tail i)
(by simp [ht]) v hv hn H _ hf
change (shiftEquiv tail ht).symm (shiftEquiv tail ht f) ∈ _ at h
simpa only [AlgEquiv.symm_apply_apply] using h
· exact shiftMap_mem_rationalWeightedIdeal tail ht v hv hweight H f
theorem packets_surjective_comp_equiv {σ α J : Type*} (v : σ → ℚ)
(hv : ∀ i, 0 ≤ v i) (H : ℚ)
(e : MvPowerSeries σ R ≃ₐ[R] MvPowerSeries σ R)
(he : ∀ f ∈ rationalWeightedIdeal v hv H, e f ∈ rationalWeightedIdeal v hv H)
(f : α → J → MvPowerSeries σ R)
(hf : Function.Surjective (fun a j => rationalCoefficientPacket v H (f a j))) :
Function.Surjective (fun a j => rationalCoefficientPacket v H (e (f a j))) := by
intro p
choose F hF using fun j => rationalCoefficientPacket_surjective (R := R) v H (p j)
obtain ⟨a,ha⟩ := hf (fun j => rationalCoefficientPacket v H (e.symm (F j)))
refine ⟨a, ?_⟩
funext j
have hdiff := he _ ((rationalCoefficientPacket_eq_iff v hv H _ _).mp (congrFun ha j))
rw [map_sub, e.apply_symm_apply] at hdiff
exact ((rationalCoefficientPacket_eq_iff v hv H _ _).mpr hdiff).trans (hF j)
theorem packets_surjective_comp_equiv_iff {σ α J : Type*} (v : σ → ℚ)
(hv : ∀ i, 0 ≤ v i) (H : ℚ)
(e : MvPowerSeries σ R ≃ₐ[R] MvPowerSeries σ R)
(he : ∀ f ∈ rationalWeightedIdeal v hv H, e f ∈ rationalWeightedIdeal v hv H)
(hi : ∀ f ∈ rationalWeightedIdeal v hv H, e.symm f ∈ rationalWeightedIdeal v hv H)
(f : α → J → MvPowerSeries σ R) :
Function.Surjective (fun a j => rationalCoefficientPacket v H (e (f a j))) ↔
Function.Surjective (fun a j => rationalCoefficientPacket v H (f a j)) := by
constructor
· intro h
simpa only [e.symm_apply_apply] using
packets_surjective_comp_equiv v hv H e.symm hi (fun a j => e (f a j)) h
· exact packets_surjective_comp_equiv v hv H e he f
end PiExponent.FormalLogTruncation
end OAI
end
section
open OAI OAI.PiExponent OAI.PiExponent.FormalLogTruncation
open MvPowerSeries
open scoped BigOperators
variable {R : Type*} [CommRing R]
open JetGeometry
open Lean Meta in
run_meta do
let requests : Array (String × Lean.Name × String) := #[]
let env ← Lean.getEnv
let mut rows : Array Lean.Json := #[]
let mut actualNames : Array Lean.Name := #[]
for (sourceName, userName, expectedKind) in requests do
let mut candidates : Array Lean.Name := #[]
for (actualName, _) in env.constants.toList do
if Lean.privateToUserName? actualName == some userName then
if (env.getModuleIdxFor? actualName).isNone then
candidates := candidates.push actualName
unless candidates.size == 1 do
throwError "Expected one OwnModule private binding for {userName}, found {candidates.size}"
let actualName := candidates[0]!
let some ci := env.find? actualName | throwError "Missing recovered private declaration"
let (kind, value, safety) ← match ci with
| .thmInfo t => pure ("theorem", t.value, Lean.Json.null)
| .defnInfo d => pure ("def", d.value, Lean.toJson (reprStr d.safety))
| _ => throwError "Recovered private CI is neither theorem nor definition"
unless kind == expectedKind do
throwError "Recovered private CI kind differs from source Graph: {actualName}"
if ci.type.hasMVar || ci.type.hasFVar || ci.type.hasLooseBVars ||
value.hasMVar || value.hasFVar || value.hasLooseBVars then
throwError "Recovered private CI type/value is not closed"
let axioms ← Lean.collectAxioms actualName
unless axioms.all (fun n => n == `propext || n == `Classical.choice || n == `Quot.sound) do
throwError "Private helper has nonstandard axioms: {actualName}"
actualNames := actualNames.push actualName
rows := rows.push <| Lean.Json.mkObj [
("sourceGraphName", Lean.toJson sourceName),
("nodeGeneratedName", Lean.toJson userName.toString),
("actualKernelName", Lean.toJson actualName.toString),
("kind", Lean.toJson kind), ("safety", safety),
("ownerKind", Lean.toJson "OwnModule"),
("ownModule", Lean.toJson env.mainModule.toString),
("moduleIndexIsNone", Lean.toJson true),
("levelParams", Lean.toJson (ci.levelParams.map Lean.Name.toString)),
("typeRefs", Lean.toJson (ci.type.getUsedConstants.map Lean.Name.toString)),
("valueRefs", Lean.toJson (value.getUsedConstants.map Lean.Name.toString)),
("snapshotValueRequired", Lean.toJson (kind == "def")),
("axioms", Lean.toJson (axioms.map Lean.Name.toString))]
IO.println ("PI_ISOLATED_PRIVATE_MAP " ++ (Lean.Json.mkObj [
("artifact", Lean.toJson "Thm"),
("ownModule", Lean.toJson env.mainModule.toString),
("rows", Lean.Json.arr rows)]).compress)
theorem OAI.PiExponent.FormalLogTruncation.formalLog_packets_surjective_iff_truncated {m : ℕ} {α J : Type*}
(v : Fin (m+1) → ℚ) (hv : ∀ i, 0 ≤ v i) (H : ℚ)
(T : Fin m → ℕ) (hT : ∀ i, v i.succ ≤ (T i : ℚ) * v 0)
(c : J → Fin m → ℂ) (P : α → OAI.PiExponentApprox.FramePolynomial m) :
Function.Surjective (fun a j => OAI.PiExponent.JetGeometry.rationalCoefficientPacket v H (OAI.PiExponent.FormalLogJet.formalJet (c j) (P a))) ↔
Function.Surjective (fun a j => OAI.PiExponent.JetGeometry.rationalCoefficientPacket v H (OAI.PiExponent.FormalLogTruncation.truncatedFormalJet (c j) T (P a))) := by sorry
end