A machine-checked solution to the Jacobians challenge

32.6. PeriodLattice.OfCurveAnalyticitySkeleton🔗

Jacobians.PeriodLattice.OfCurveAnalyticitySkeletonsource

exists_analytic_primitive_on_ball

A holomorphic function on an open ball has an analytic primitive.

Direct application of Mathlib's DifferentiableOn.isExactOn_ball + DifferentiableOn.analyticOn. Mathlib defines IsExactOn as existence of g with HasDerivAt g (f z) z for all z in the ball; extracting g and showing its analyticity is the content here.

theorem exists_analytic_primitive_on_ball
    {f : ℂ → ℂ} {c : ℂ} {r : ℝ}
    (hf : DifferentiableOn ℂ f (Metric.ball c r)) :
    ∃ g : ℂ → ℂ,
      (∀ z ∈ Metric.ball c r, HasDerivAt g (f z) z) ∧
      AnalyticOn ℂ g (Metric.ball c r)

segmentIntegral_eq_primitive_diff

FTC for a primitive along a straight-line segment in ℂ.

If g is a primitive of f on a ball containing both a and b (and the segment between them), then ∫\_0^1 f(a + t(b-a)) (b-a) dt = g(b) - g(a).

This is just the fundamental theorem of calculus applied to s ↦ g(a + s(b - a)) whose derivative is f(a + s(b - a)) (b - a).

theorem segmentIntegral_eq_primitive_diff
    {f g : ℂ → ℂ} {c : ℂ} {r : ℝ} {a b : ℂ}
    (_ha : a ∈ Metric.ball c r) (_hb : b ∈ Metric.ball c r)
    (hseg : Set.Icc (0 : ℝ) 1 ⊆ {t | a + (t : ℂ) * (b - a) ∈ Metric.ball c r})
    (hf_cont : ContinuousOn f (Metric.ball c r))
    (hg : ∀ z ∈ Metric.ball c r, HasDerivAt g (f z) z) :
    ∫ t in (0 : ℝ)..1, f (a + (t : ℂ) * (b - a)) * (b - a) =
      g b - g a

localLiftChart_analyticAt

Local lift is analytic on a chart ball.

Combines exists_analytic_primitive_on_ball (from chartFormCoeff's holomorphy) with segmentIntegral_eq_primitive_diff (rewriting the straight-line integral as g(z) - g(z₀)).

The result localLiftChart Q₀ constants i z = constants i + g(z) - g(z₀) is analytic in z because g is analytic.

Locally on the chart-ball Metric.ball ((chartAt ℂ Q₀) Q₀) r contained in e.target.

theorem localLiftChart_analyticAt (Q₀ : X) (constants : Fin (genus X) → ℂ)
    (i : Fin (genus X)) :
    AnalyticAt ℂ (localLiftChart (X := X) Q₀ constants i)
      ((chartAt (H := ℂ) Q₀) Q₀)

localLiftChartVec

The chart-coord function of the local lift, as a vector-valued map ℂ → (Fin (genus X) → ℂ).

noncomputable def localLiftChartVec (Q₀ : X) (constants : Fin (genus X) → ℂ)
    (z : ℂ) : Fin (genus X) → ℂ

localLiftChartVec_analyticAt

The chart-coord vector lift is AnalyticAt at the chart point.

theorem localLiftChartVec_analyticAt (Q₀ : X) (constants : Fin (genus X) → ℂ) :
    AnalyticAt ℂ (localLiftChartVec (X := X) Q₀ constants)
      ((chartAt (H := ℂ) Q₀) Q₀)

localLiftChartVec_contDiffAt

The chart-coord vector lift is ContDiffAt at the chart point.

theorem localLiftChartVec_contDiffAt (Q₀ : X) (constants : Fin (genus X) → ℂ) :
    ContDiffAt ℂ ω (localLiftChartVec (X := X) Q₀ constants)
      ((chartAt (H := ℂ) Q₀) Q₀)

localLift_contMDiffAt

The vector-valued local lift is ContMDiffAt at Q₀.

localLift Q₀ constants = localLiftChartVec Q₀ constants ∘ chartAt ℂ Q₀. The chart map chartAt ℂ Q₀ is ContMDiffAt 𝓘(ℂ) 𝓘(ℂ) ω at Q₀ (Mathlib's contMDiffAt_extChartAt), and the chart-coord function is ContDiffAt ℂ ω at (chartAt ℂ Q₀) Q₀ (above). Mathlib's ContDiffAt.comp_contMDiffAt glues these into ContMDiffAt 𝓘(ℂ) 𝓘(ℂ, Fin (genus X) → ℂ) ω of the composition.

theorem localLift_contMDiffAt (Q₀ : X) (constants : Fin (genus X) → ℂ) :
    ContMDiffAt 𝓘(ℂ) 𝓘(ℂ, Fin (genus X) → ℂ) ω
      (localLift (X := X) Q₀ constants) Q₀

periodVec_smoothStep01_comp_eq_generic

Generic periodVec invariance under smoothStep01 reparameterization.

For any path γ : ℝ → X whose chart-pullback is DifferentiableAt ℝ at each s ∈ [0, 1], and whose basis-form integrand is ContinuousOn [0, 1], periodVec (γ ∘ smoothStep01) = periodVec γ.

The proof:

  1. By pathSpeed_smoothStep01_comp_eq, the integrand of periodVec (γ ∘ σ) i equals σ'(t) • (α.toFun(γ(σ t)))(pathSpeed γ (σ t)) pointwise on [0, 1].

  2. By intervalIntegral.integral_deriv_smul_comp' (substitution-of- variables with f = σ, f' = σ', g(u) = α.toFun(γ u)(pathSpeed γ u)), the integral equals ∫\_\{σ 0\}^\{σ 1\} g(u) du = ∫\_0^1 g(u) du = periodVec γ i.

The substitution lemma's hypotheses:

  • HasDerivAt smoothStep01 (smoothStep01_deriv x) x for each x ∈ uIcc 0 1.

  • ContinuousOn smoothStep01_deriv (uIcc 0 1).

  • ContinuousOn g (smoothStep01 '' [[0, 1]] = [0, 1]) (parameter — caller supplies).

lemma periodVec_smoothStep01_comp_eq_generic (γ : ℝ → X)
    (hγ_diff : ∀ s ∈ Set.Icc (0 : ℝ) 1,
      DifferentiableAt ℝ ((chartAt (H := ℂ) (γ s)).toFun ∘ γ) s)
    (hg_cont : ∀ i : Fin (genus X),
      ContinuousOn (fun u => (periodBasisForm X i).toFun (γ u)
        (Jacobians.pathSpeed γ u)) (Set.Icc (0 : ℝ) 1)) :
    Jacobians.periodVec (γ ∘ Jacobians.smoothStep01) = Jacobians.periodVec γ

periodVec_ChartBallPathSmooth_eq

PeriodVec is invariant under smoothStep01 reparameterization for ChartBallPath. Direct corollary of periodVec_smoothStep01_comp_eq_generic applied to ChartBallPath Q₀ Q₀ Q.

lemma periodVec_ChartBallPathSmooth_eq (Q₀ Q : X)
    (h_chart_ball : ∀ s ∈ Set.Icc (0 : ℝ) 1,
      ((1 - (s : ℂ)) * (chartAt (H := ℂ) Q₀) Q₀ +
        (s : ℂ) * (chartAt (H := ℂ) Q₀) Q) ∈ (chartAt (H := ℂ) Q₀).target) :
    Jacobians.periodVec (Jacobians.ChartBallPathSmooth Q₀ Q) =
    Jacobians.periodVec (Jacobians.ChartBallPath Q₀ Q₀ Q)

smoothPathSmooth

The smoothstep-reparameterized version of smoothPath P Q.

noncomputable def smoothPathSmooth (P Q : X) : ℝ → X

smoothPathSmooth_zero

smoothPathSmooth retains the start/end points of smoothPath.

@[simp] lemma smoothPathSmooth_zero (P Q : X) : smoothPathSmooth P Q 0 = P

smoothPathSmooth_one

@[simp] lemma smoothPathSmooth_one (P Q : X) : smoothPathSmooth P Q 1 = Q

periodVec_smoothPathSmooth_eq

PeriodVec invariance for smoothPath under smoothStep01.

Uses MeasureTheory.integral_image_eq_integral_deriv_smul_of_monotoneOn which only requires MonotoneOn (no ContinuousOn of integrand). This is the key insight: even though smoothPath isn't C¹, the substitution formula still holds via monotonicity.

lemma periodVec_smoothPathSmooth_eq (P Q : X) :
    Jacobians.periodVec (smoothPathSmooth P Q) =
    Jacobians.periodVec (Jacobians.smoothPath P Q)

isSmoothPath_smoothPathSmooth

smoothPathSmooth is an IsSmoothPath, with zero derivative at endpoints (via smoothStep01's zero boundary derivatives). Closes start, finish, cont (composition of continuous smoothPath with continuous smoothStep01). diff and integrable remain sub-sorries pending chain-rule + reparam integrability work.

lemma isSmoothPath_smoothPathSmooth (P Q : X) :
    Jacobians.IsSmoothPath P Q (smoothPathSmooth P Q)

isClosedSmoothLoop_concat_ChartBallPathSmooth_reverse_smoothPathSmooth

The concat of ChartBallPathSmooth Q₀ Q and reverse(smoothPathSmooth Q₀ Q) is a closed smooth loop at Q₀.

All path endpoints have zero derivative (via smoothStep01), so the bare concat's derivative at the junction t = 1/2 is 0 from both sides → differentiable.

lemma isClosedSmoothLoop_concat_ChartBallPathSmooth_reverse_smoothPathSmooth
    (Q₀ Q : X)
    (hQ_src : Q ∈ (chartAt (H := ℂ) Q₀).source)
    (h_chart_ball : ∀ s ∈ Set.Icc (0 : ℝ) 1,
      ((1 - (s : ℂ)) * (chartAt (H := ℂ) Q₀) Q₀ +
        (s : ℂ) * (chartAt (H := ℂ) Q₀) Q) ∈ (chartAt (H := ℂ) Q₀).target) :
    Jacobians.IsClosedSmoothLoop (Jacobians.concat (Jacobians.ChartBallPathSmooth Q₀ Q)
      (Jacobians.reverse (smoothPathSmooth Q₀ Q)))

periodVec_concat_ChartBallPathSmooth_reverse_smoothPathSmooth

periodVec of the concat = difference of periodVecs for our paths.

Uses periodVec_reverse (smoothPathSmooth diff is proven) and recognizes that periodVec (concat γ₁ (reverse γ₂)) = periodVec γ₁ - periodVec γ₂ when γ₁ and γ₂ are smooth paths with all integrability hypotheses holding.

The full unconditional version requires applying periodVec_concat with its 6 hypotheses (integrabilities + pathSpeed_concat identities). For now we take periodVec_reverse only, leaving the concat application as a sub-obligation.

lemma periodVec_concat_ChartBallPathSmooth_reverse_smoothPathSmooth
    (Q₀ Q : X)
    (hQ_src : Q ∈ (chartAt (H := ℂ) Q₀).source)
    (h_chart_ball : ∀ s ∈ Set.Icc (0 : ℝ) 1,
      ((1 - (s : ℂ)) * (chartAt (H := ℂ) Q₀) Q₀ +
        (s : ℂ) * (chartAt (H := ℂ) Q₀) Q) ∈ (chartAt (H := ℂ) Q₀).target) :
    Jacobians.periodVec (Jacobians.concat (Jacobians.ChartBallPathSmooth Q₀ Q)
      (Jacobians.reverse (smoothPathSmooth Q₀ Q))) =
    Jacobians.periodVec (Jacobians.ChartBallPathSmooth Q₀ Q) -
    Jacobians.periodVec (smoothPathSmooth Q₀ Q)

chartBallPath_smoothPath_endpoints_eq_in_quotient

Path-difference-in-lattice for ChartBallPath vs smoothPath.

For Q₀, Q : X with the affine chart-coord segment from (chartAt Q₀) Q₀ to (chartAt Q₀) Q contained in (chartAt Q₀).target, the two smooth paths ChartBallPath Q₀ Q₀ Q and smoothPath Q₀ Q both go from Q₀ to Q, so their periodVecs differ by a lattice element.

Proof structure. Apply mk_periodVec_eq_of_endpoints with γ₁ := ChartBallPath Q₀ Q₀ Q, γ₂ := smoothPath Q₀ Q. Hypotheses:

  • γ₁ 0 = γ₂ 0 = Q₀ (ChartBallPath.start + smoothPath_zero).

  • IsClosedSmoothLoop (concat γ₁ (reverse γ₂)): needs ChartBallPath smoothness on chart-ball + smoothPath smoothness via isSmoothPath_smoothPath + reverse/concat smoothness preservation (proven infrastructure in Jacobians/Path/LineIntegral.lean and Jacobians/JacobianConstruction/PeriodLattice.lean).

  • periodVec_concat formula: requires integrability of each basis form integrand on each piece. For ChartBallPath: integrand is bounded continuous on [0, 1] (using chartFormCoeff continuity

    • chartFrame_cancel to identify with the path integrand). For smoothPath: from IsSmoothPath.integrable.

We separate this as a single classical-content sub-obligation.

lemma chartBallPath_smoothPath_endpoints_eq_in_quotient
    (Q₀ Q : X)
    (hQ_src : Q ∈ (chartAt (H := ℂ) Q₀).source)
    (h_chart_ball : ∀ s ∈ Set.Icc (0 : ℝ) 1,
      ((1 - (s : ℂ)) * (chartAt (H := ℂ) Q₀) Q₀ +
        (s : ℂ) * (chartAt (H := ℂ) Q₀) Q) ∈ (chartAt (H := ℂ) Q₀).target) :
    (QuotientAddGroup.mk (Jacobians.periodVec (Jacobians.ChartBallPath Q₀ Q₀ Q)) :
      (Fin (genus X) → ℂ) ⧸ (truePeriodLattice X).toAddSubgroup) =
    QuotientAddGroup.mk (Jacobians.periodVec (Jacobians.smoothPath Q₀ Q))

localLift_quotient_eq_ofCurve_eventually

theorem localLift_quotient_eq_ofCurve_eventually
    (P Q₀ : X) :
    (fun Q => QuotientAddGroup.mk
        (localLift (X := X) Q₀ (periodVec (smoothPath P Q₀)) Q) :
      X → (Fin (genus X) → ℂ) ⧸ (truePeriodLattice X).toAddSubgroup) =ᶠ[nhds Q₀]
      (fun Q => QuotientAddGroup.mk (periodVec (smoothPath P Q)))