Skip to content

feat(Analysis): the generalized hypergeometric function#41980

Open
mcdoll wants to merge 8 commits into
leanprover-community:masterfrom
mcdoll:hypergeometric_formal
Open

feat(Analysis): the generalized hypergeometric function#41980
mcdoll wants to merge 8 commits into
leanprover-community:masterfrom
mcdoll:hypergeometric_formal

Conversation

@mcdoll

@mcdoll mcdoll commented Jul 21, 2026

Copy link
Copy Markdown
Member

We define the (regularized) generalized hypergeometric function and prove convergence in the cases p < q + 1 and p = q + 1. This includes the Gaussian hypergeometric function (p = 2 and q = 1) and the Bessel functions (p = 0 and q = 1).


Open in Gitpod

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

PR summary 33c10bef48

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Analysis.SpecialFunctions.Hypergeometric (new file) 2624

Declarations diff (regex)

+ Gamma_nat_add_div_Gamma_eq
+ eventually_atTop_regularizedHGFunCoeff_ne_zero
+ finsetProd_div_finsetProd_mul
+ prod_eq_pow_mul_prod
+ radius_regularizedGaussHGFunSeries_eq_one
+ radius_regularizedHGFunSeries_eq_one
+ radius_regularizedHGFunSeries_eq_top
+ radius_regularizedHGFunSeries_eq_top_of_finite
+ regularizedGaussHGFun
+ regularizedGaussHGFunSeries
+ regularizedHGFun
+ regularizedHGFunCoeff
+ regularizedHGFunCoeff_add_one
+ regularizedHGFunCoeff_add_one_div_self
+ regularizedHGFunCoeff_eq_zero_iff
+ regularizedHGFunCoeff_eq_zero_left
+ regularizedHGFunCoeff_eq_zero_left'
+ regularizedHGFunCoeff_eq_zero_right
+ regularizedHGFunSeries
+ regularizedHGFunSeries_coeff
+ regularizedHGFunSeries_eq_zero
+ tendsto_finsetProd_div_add_one
+ tendsto_finsetProd_div_finsetProd_mul

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit 33c10be).

  • +19 new declarations
  • −0 removed declarations
+Complex.Gamma_nat_add_div_Gamma_eq
+Complex.eventually_atTop_regularizedHGFunCoeff_ne_zero
+Complex.radius_regularizedGaussHGFunSeries_eq_one
+Complex.radius_regularizedHGFunSeries_eq_one
+Complex.radius_regularizedHGFunSeries_eq_top
+Complex.radius_regularizedHGFunSeries_eq_top_of_finite
+Complex.regularizedGaussHGFun
+Complex.regularizedGaussHGFunSeries
+Complex.regularizedHGFun
+Complex.regularizedHGFunCoeff
+Complex.regularizedHGFunCoeff_add_one
+Complex.regularizedHGFunCoeff_add_one_div_self
+Complex.regularizedHGFunCoeff_eq_zero_iff
+Complex.regularizedHGFunCoeff_eq_zero_left
+Complex.regularizedHGFunCoeff_eq_zero_left'
+Complex.regularizedHGFunCoeff_eq_zero_right
+Complex.regularizedHGFunSeries
+Complex.regularizedHGFunSeries_coeff
+Complex.regularizedHGFunSeries_eq_zero

No changes to strong technical debt.

Increase in weak tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (weak)
5015 1 exposed public sections

Current commit 33c10bef48
Reference commit d0060d7bbb

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions Bot added the t-analysis Analysis (normed *, calculus) label Jul 21, 2026
@mcdoll
mcdoll marked this pull request as ready for review July 22, 2026 01:55
@mcdoll
mcdoll requested a review from wwylele July 22, 2026 02:10
Comment on lines +90 to +96
variable (a b n) in
theorem regularizedHGFunCoeff_eq_zero_right
(hb : ∃ (j : Fin q) (m : ℕ), b j = -n - m) : regularizedHGFunCoeff a b n = 0 := by grind

variable (a b n) in
theorem regularizedHGFunCoeff_eq_zero_left
(ha : ∃ (j : Fin p), ∃ k < n, k = -a j) : regularizedHGFunCoeff a b n = 0 := by grind

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When an Exists appears in the hypothesis, I think we usually expand it into multiple parameters

Suggested change
variable (a b n) in
theorem regularizedHGFunCoeff_eq_zero_right
(hb : ∃ (j : Fin q) (m : ℕ), b j = -n - m) : regularizedHGFunCoeff a b n = 0 := by grind
variable (a b n) in
theorem regularizedHGFunCoeff_eq_zero_left
(ha : ∃ (j : Fin p), ∃ k < n, k = -a j) : regularizedHGFunCoeff a b n = 0 := by grind
variable (a b n) in
theorem regularizedHGFunCoeff_eq_zero_right {j : Fin q} {m : ℕ} (h : b j = -n - m) :
regularizedHGFunCoeff a b n = 0 := by grind
variable (a b n) in
theorem regularizedHGFunCoeff_eq_zero_left {j : Fin p} {k : ℕ} (hk : k < n) (h : k = -a j) :
regularizedHGFunCoeff a b n = 0 := by grind

simp

/-- If `p < q + 1`, then the hypergeometric series has infinite convergence radius. -/
theorem radius_regularizedHGFunSeries_eq_top (a : Fin p → ℂ) (b : Fin q → ℂ) (h : p < q + 1) :

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
theorem radius_regularizedHGFunSeries_eq_top (a : Fin p → ℂ) (b : Fin q → ℂ) (h : p < q + 1) :
theorem radius_regularizedHGFunSeries_eq_top (a : Fin p → ℂ) (b : Fin q → ℂ) (h : p ≤ q) :

variable {a : Fin p → ℂ} {b : Fin q → ℂ} {n : ℕ}

/-- The coefficients of the regularized hypergeometric series. -/
def regularizedHGFunCoeff (a : Fin p → ℂ) (b : Fin q → ℂ) (n : ℕ) : ℂ :=

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should a and b be Multiset ℂ instead? Advantages are

  • Reflects the fact that order doesn't matter
  • If one wants to introduce a cancelling lemma when there is a common factor among a and b, Multiset allows writing it naturally in insert/erase, while Fin needs reindexing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants