veri edcomputer-aided mathematics[introduction to interval analysis - r. e. moore, r. b. kearfott,...
TRANSCRIPT
Verified Computer-AidedMathematics
Assia Mahboubi
Assia Mahboubi – Verified Computer-Aided Mathematics 1
What is a proof assistant?
Mathematica: A System for Doing Mathematics by Computer,Stephen Wolfram, Addison-Wesley 1988.
Assia Mahboubi – Verified Computer-Aided Mathematics 2
What is a proof assistant?
Mathematica:
A System for Doing Mathematics by Computer
,Stephen Wolfram, Addison-Wesley 1988.
Assia Mahboubi – Verified Computer-Aided Mathematics 2
What is a proof assistant?
Mathematica: A System for Doing Mathematics by Computer,Stephen Wolfram, Addison-Wesley 1988.
Assia Mahboubi – Verified Computer-Aided Mathematics 2
Proof assistants
Representing mathematics in a fixed formal language:
• Define mathematical objects, statements, proofs;
• Verify the correctness of proofs by a routine process.
And use a proof assistant to make this possible in practice.
Assia Mahboubi – Verified Computer-Aided Mathematics 3
Proof assistants
Representing mathematics in a fixed formal language:
• Define mathematical objects, statements, proofs;
• Verify the correctness of proofs by a routine process.
And use a proof assistant to make this possible in practice.
Assia Mahboubi – Verified Computer-Aided Mathematics 3
Proof Assistants
Formal Logic
Proof Assistant
ProofChecker
Libraries
Assia Mahboubi – Verified Computer-Aided Mathematics 4
Assistance for building proofs
• Tactic language;
• Formal-proof producing decision procedures.
Assia Mahboubi – Verified Computer-Aided Mathematics 5
Assistance for writing statements
Variables gT (G : {group gT}).
Lemma cfCauchySchwarz (phi psi : ’CF(G)) :
|[phi, psi]| 2 <= [phi] * [psi] , eq_iff (~~ free (phi :: psi)).
Assia Mahboubi – Verified Computer-Aided Mathematics 6
Assistance for writing statements
Variables gT (G : {group gT}).
Lemma cfCauchySchwarz (phi psi : ’CF(G)) :
|[phi, psi]| 2 <= [phi] * [psi] , eq_iff (~~ free (phi :: psi)).
Assia Mahboubi – Verified Computer-Aided Mathematics 6
Usage
• Program verification:- Compcert compiler (Leroy et al., 2006),- sel4 micro-kernel (Klein et al., 2008),- etc.
• Mathematics:- Four color theorem (Gonthier, 2004),- Odd Order Theorem (Gonthier et al, 2012),- Flyspeck (Hales et al. 2014),- etc.
Assia Mahboubi – Verified Computer-Aided Mathematics 7
Usage
• Program verification:- Compcert compiler (Leroy et al., 2006),- sel4 micro-kernel (Klein et al., 2008),- etc.
• Mathematics:- Four color theorem (Gonthier, 2004),- Odd Order Theorem (Gonthier et al, 2012),- Flyspeck (Hales et al. 2014),- etc.
Assia Mahboubi – Verified Computer-Aided Mathematics 7
Assia Mahboubi – Verified Computer-Aided Mathematics 8
In the Age of the Turing Machine
The Misfortunes of a Trio of Mathematicians Using ComputerAlgebra Systems. Can We Trust in Them?
Antonio J. Duran, Mario Perez, and Juan L. Varona, Notices of the AMS, Nov. 2014
Assia Mahboubi – Verified Computer-Aided Mathematics 9
In the Age of the Turing Machine
The Misfortunes of a Trio of Mathematicians Using ComputerAlgebra Systems. Can We Trust in Them?
Antonio J. Duran, Mario Perez, and Juan L. Varona, Notices of the AMS, Nov. 2014
Assia Mahboubi – Verified Computer-Aided Mathematics 9
Computing Integrals
m ≤∫ b
a
f ≤ M
∫ 8
0
sin(t + exp(t))dt,
∫ 2
√π
ln(t)dt,
∫ +∞
0
cos(t)ln(t)
t2dt
Joint work with Guillaume Melquiond and Thomas Sibut-Pinote, JAR 2018
Assia Mahboubi – Verified Computer-Aided Mathematics 10
Computing Integrals
m ≤∫ b
a
f ≤ M
∫ 8
0
sin(t + exp(t))dt,
∫ 2
√π
ln(t)dt,
∫ +∞
0
cos(t)ln(t)
t2dt
Joint work with Guillaume Melquiond and Thomas Sibut-Pinote, JAR 2018
Assia Mahboubi – Verified Computer-Aided Mathematics 10
Example
Assia Mahboubi – Verified Computer-Aided Mathematics 11
Ternary Goldbach Conjecture
Assia Mahboubi – Verified Computer-Aided Mathematics 12
Integral computations
Assia Mahboubi – Verified Computer-Aided Mathematics 13
Real numbers in a computer: Floats
• Compromise between precision and range• IEEE standards• Efficient algorithms
• Compromise between precision and range• Notoriously difficult to specify
Credit: Dominique ThiebautAssia Mahboubi – Verified Computer-Aided Mathematics 14
Real numbers in a computer: intervals
I = {[a, b] | a, b ∈ R ∪ {+∞} ∪ {−∞}}
• Examples:
[0, 0] [3.14, 3.15] [17,+∞] [−∞,+∞]
• Operations:
[−1, 2]× [−3, 1] = [−6, 2] [0, 100]− [0, 100] = [−100, 100]
• Computations: floating-point numbers as bounds.
• Reasoning: interval analysis.
Assia Mahboubi – Verified Computer-Aided Mathematics 15
Interval extensions
F : In → I is an interval extension of f : Rn → R, if:
∀x ∈ Rn,∀x ∈ In, x ∈ x⇒ f (x) ∈ F(x)
An interval function F : In → I is isotonic if:
yi ⊂ xi ⇒ F(y1, . . . , yn) ⊂ F(x1, . . . , xn)
[Introduction to Interval Analysis - R. E. Moore, R. B. Kearfott, M. J. Cloud]
[Validated Numerics: A Short Introduction to Rigorous Computations - W. Tucker]
Assia Mahboubi – Verified Computer-Aided Mathematics 16
Interval extensions
F : In → I is an interval extension of f : Rn → R, if:
∀x ∈ Rn,∀x ∈ In, x ∈ x⇒ f (x) ∈ F(x)
An interval function F : In → I is isotonic if:
yi ⊂ xi ⇒ F(y1, . . . , yn) ⊂ F(x1, . . . , xn)
[Introduction to Interval Analysis - R. E. Moore, R. B. Kearfott, M. J. Cloud]
[Validated Numerics: A Short Introduction to Rigorous Computations - W. Tucker]
Assia Mahboubi – Verified Computer-Aided Mathematics 16
Interval Riemann integration
If f is continuous on [a, b], then:∫ b
a
f ∈ (b − a)[m,M]
If F extends f , and a ∈ a, b ∈ b:∫ b
a
f ∈ (b− a)F(hull(a,b))
Combine with dichotomy and higher order methods.
Assia Mahboubi – Verified Computer-Aided Mathematics 17
Interval Riemann integration
If f is continuous on [a, b], then:∫ b
a
f ∈ (b − a)[m,M]
If F extends f , and a ∈ a, b ∈ b:
∫ b
a
f ∈ (b− a)F(hull(a,b))
Combine with dichotomy and higher order methods.
Assia Mahboubi – Verified Computer-Aided Mathematics 17
Interval Riemann integration
If f is continuous on [a, b], then:∫ b
a
f ∈ (b − a)[m,M]
If F extends f , and a ∈ a, b ∈ b:∫ b
a
f ∈ (b− a)F(hull(a,b))
Combine with dichotomy and higher order methods.
Assia Mahboubi – Verified Computer-Aided Mathematics 17
Interval Riemann integration
If f is continuous on [a, b], then:∫ b
a
f ∈ (b − a)[m,M]
If F extends f , and a ∈ a, b ∈ b:∫ b
a
f ∈ (b− a)F(hull(a,b))
Combine with dichotomy and higher order methods.
Assia Mahboubi – Verified Computer-Aided Mathematics 17
Correctness theorem
• Program: cos : I→ I
• Mathematical definition: cos : R→ R• Specification:
For any x ∈ R and any i ∈ I, x ∈ i⇒ cos(x) ∈ cos(i)
⇒ A formal proof per integrand.
Assia Mahboubi – Verified Computer-Aided Mathematics 18
Correctness theorem
• Program: cos : I→ I• Mathematical definition: cos : R→ R
• Specification:
For any x ∈ R and any i ∈ I, x ∈ i⇒ cos(x) ∈ cos(i)
⇒ A formal proof per integrand.
Assia Mahboubi – Verified Computer-Aided Mathematics 18
Correctness theorem
• Program: cos : I→ I• Mathematical definition: cos : R→ R• Specification:
For any x ∈ R and any i ∈ I, x ∈ i⇒ cos(x) ∈ cos(i)
⇒ A formal proof per integrand.
Assia Mahboubi – Verified Computer-Aided Mathematics 18
Correctness theorem
• Program: cos : I→ I• Mathematical definition: cos : R→ R• Specification:
For any x ∈ R and any i ∈ I, x ∈ i⇒ cos(x) ∈ cos(i)
⇒ A formal proof per integrand.
Assia Mahboubi – Verified Computer-Aided Mathematics 18
Catalogue
Based on an abstract syntax of (univariate) expressions:
E := x | F| π |E + E | E − E | E × E | E ÷ E | − E | ‖E‖ |√E | Ek |
cos(E) | sin(E) | tan(E) | atan(E) |exp(E) | ln(E)
And on an arithmetic of interval extensions.[Proving bounds on real-valued functions with computations - G. Melquiond, Proc. of IJCAR 2008]
Assia Mahboubi – Verified Computer-Aided Mathematics 19
Computations of extensions
Expressions are equipped with several evaluations schemes:
• [e]R : R→ R• [e]R⊥ : R⊥ → R⊥• [e]I⊥ : I⊥ → I⊥
• Value ⊥R models the complement of the definition domain.
• Interval ⊥I is the only one containing ⊥R.
• A correctness theorem ensures:
∀e ∈ E ,∀i ∈ I⊥,∀x ∈ i, [e]R⊥(x) ∈ [e]I⊥(i)
Assia Mahboubi – Verified Computer-Aided Mathematics 20
Computations of extensions
Expressions are equipped with several evaluations schemes:
• [e]R : R→ R• [e]R⊥ : R⊥ → R⊥• [e]I⊥ : I⊥ → I⊥
• Value ⊥R models the complement of the definition domain.
• Interval ⊥I is the only one containing ⊥R.
• A correctness theorem ensures:
∀e ∈ E ,∀i ∈ I⊥,∀x ∈ i, [e]R⊥(x) ∈ [e]I⊥(i)
Assia Mahboubi – Verified Computer-Aided Mathematics 20
Computations of extensions
Expressions are equipped with several evaluations schemes:
• [e]R : R→ R• [e]R⊥ : R⊥ → R⊥• [e]I⊥ : I⊥ → I⊥
• Value ⊥R models the complement of the definition domain.
• Interval ⊥I is the only one containing ⊥R.
• A correctness theorem ensures:
∀e ∈ E ,∀i ∈ I⊥,∀x ∈ i, [e]R⊥(x) ∈ [e]I⊥(i)
Assia Mahboubi – Verified Computer-Aided Mathematics 20
Computations of extensions
Expressions are equipped with several evaluations schemes:
• [e]R : R→ R• [e]R⊥ : R⊥ → R⊥• [e]I⊥ : I⊥ → I⊥
• Value ⊥R models the complement of the definition domain.
• Interval ⊥I is the only one containing ⊥R.
• A correctness theorem ensures:
∀e ∈ E ,∀i ∈ I⊥,∀x ∈ i, [e]R⊥(x) ∈ [e]I⊥(i)
Assia Mahboubi – Verified Computer-Aided Mathematics 20
Meaning
∫ b
a
f ?
In fact, for any expression e ∈ E and interval i:
[e]I⊥(i) 6= ⊥I ⇒ f is continuous on i
⇒ If∫ b
af can be approximated, then f is integrable on [a, b].
Assia Mahboubi – Verified Computer-Aided Mathematics 21
Meaning
∫ b
a
[e]R?
In fact, for any expression e ∈ E and interval i:
[e]I⊥(i) 6= ⊥I ⇒ f is continuous on i
⇒ If∫ b
af can be approximated, then f is integrable on [a, b].
Assia Mahboubi – Verified Computer-Aided Mathematics 21
Meaning
∫ b
a
[e]R?
In fact, for any expression e ∈ E and interval i:
[e]I⊥(i) 6= ⊥I ⇒ f is continuous on i
⇒ If∫ b
af can be approximated, then f is integrable on [a, b].
Assia Mahboubi – Verified Computer-Aided Mathematics 21
Benchmarks
∫ 1
0
∣∣(x4 + 10x3 + 19x2 − 6x − 6)ex∣∣ dx ' 11.14731055005714
Error Time Accuracy Degree Depth Precision10−3 0.7 14 5 8 3010−6 0.9 24 6 13 4010−9 1.3 34 8 18 5010−12 1.9 44 10 22 6010−15 2.7 54 12 28 70
Assia Mahboubi – Verified Computer-Aided Mathematics 22
Benchmarks
∫ 1
0
∣∣(x4 + 10x3 + 19x2 − 6x − 6)ex∣∣ dx ' 11.14731055005714
• Octave’s quad/quadgk: only 10/9 correct digits;
• INTLAB verifyquad: false answer without warning;
• VNODE-LP: cannot be used because of the absolute value.
Assia Mahboubi – Verified Computer-Aided Mathematics 23
Benchmarks
∫ +∞
100000
1 +(
0.5·ln(1+2.25/τ2)+4.1396+lnπln τ
)2
1 + 0.25/τ2·
ln2 τ
τ2dτ ' −3.2555895745 · 10−6
Error Time Accuracy Degree Depth Precision
10−3 0.6 2 3 0 3010−4 0.8 5 5 2 3010−5 1.5 8 7 6 3010−6 3.1 11 9 11 3010−7 5.6 15 12 12 3010−8 11.2 18 15 15 30
Thus: ∫ +∞
−∞
1 +(
0.5·ln(1+2.25/τ2)+4.1396+lnπln τ
)2
1 + 0.25/τ2·
ln2 τ
τ2dτ ∈ [226.849; 226.850]
The upper bound 226.844 given in the preprint is incorrect.
Assia Mahboubi – Verified Computer-Aided Mathematics 24
Benchmarks
∫ +∞
100000
1 +(
0.5·ln(1+2.25/τ2)+4.1396+lnπln τ
)2
1 + 0.25/τ2·
ln2 τ
τ2dτ ' −3.2555895745 · 10−6
Error Time Accuracy Degree Depth Precision
10−3 0.6 2 3 0 3010−4 0.8 5 5 2 3010−5 1.5 8 7 6 3010−6 3.1 11 9 11 3010−7 5.6 15 12 12 3010−8 11.2 18 15 15 30
Thus: ∫ +∞
−∞
1 +(
0.5·ln(1+2.25/τ2)+4.1396+lnπln τ
)2
1 + 0.25/τ2·
ln2 τ
τ2dτ ∈ [226.849; 226.850]
The upper bound 226.844 given in the preprint is incorrect.
Assia Mahboubi – Verified Computer-Aided Mathematics 24
More
• Formal Verification of Nonlinear Inequalities with TaylorInterval Approximations
Thomas Hales and Alexey Solovyev, Proc. of NFM 2013.
• A Verified ODE Solver and the Lorenz AttractorFabian Immler, JAR 2018.
Assia Mahboubi – Verified Computer-Aided Mathematics 25
More
• Formal Verification of Nonlinear Inequalities with TaylorInterval Approximations
Thomas Hales and Alexey Solovyev, Proc. of NFM 2013.
• A Verified ODE Solver and the Lorenz AttractorFabian Immler, JAR 2018.
Assia Mahboubi – Verified Computer-Aided Mathematics 25
Special functions and sequences
Abramowitz and Stegun Plouffe and Sloane
Assia Mahboubi – Verified Computer-Aided Mathematics 26
∂-finiteness
• A function f : K→ K is D-finite if for all x :
pr (x)f (r)(x) + · · ·+ p1(x)f ′(x) + p0(x)f (x) = 0
• A sequence u ∈ KN is P-recursive if for all n ∈ N
pr (n)un+r + · · ·+ p0(n)un = 0
where pi ∈ C[n] are polynomial coefficients and pr 6= 0.
⇒ Extends to systems and multivariates sequences/functions.
Assia Mahboubi – Verified Computer-Aided Mathematics 27
∂-finiteness
• A function f : K→ K is D-finite if for all x :
pr (x)f (r)(x) + · · ·+ p1(x)f ′(x) + p0(x)f (x) = 0
• A sequence u ∈ KN is P-recursive if for all n ∈ N
pr (n)un+r + · · ·+ p0(n)un = 0
where pi ∈ C[n] are polynomial coefficients and pr 6= 0.
⇒ Extends to systems and multivariates sequences/functions.
Assia Mahboubi – Verified Computer-Aided Mathematics 27
∂-finiteness
• A function f : K→ K is D-finite if for all x :
pr (x)f (r)(x) + · · ·+ p1(x)f ′(x) + p0(x)f (x) = 0
• A sequence u ∈ KN is P-recursive if for all n ∈ N
pr (n)un+r + · · ·+ p0(n)un = 0
where pi ∈ C[n] are polynomial coefficients and pr 6= 0.
⇒ Extends to systems and multivariates sequences/functions.
Assia Mahboubi – Verified Computer-Aided Mathematics 27
Examples
• Bessel functions:
x2d2f
dx+ x
df
dx+ (x2 − a2)f = 0
• Binomial coefficients(nm
):
un+1,m+1, = un+1,m + un,m+1 with u0,0 = un,n = 1
Assia Mahboubi – Verified Computer-Aided Mathematics 28
Closure properties
P-recursive sequences on a field K form a K-algebra.
If u and v are P-recursive it is possible to:
• compute recurrences canceling (u + v)
• compute recurrences canceling (u ∗ v)
For (un,k) P-recursive, it is possible to:
• Compute a recurrence canceling Un :=∑n
k=0 un,k
Assia Mahboubi – Verified Computer-Aided Mathematics 29
Closure properties
P-recursive sequences on a field K form a K-algebra.
If u and v are P-recursive it is possible to:
• compute recurrences canceling (u + v)
• compute recurrences canceling (u ∗ v)
For (un,k) P-recursive, it is possible to:
• Compute a recurrence canceling Un :=∑n
k=0 un,k
Assia Mahboubi – Verified Computer-Aided Mathematics 29
Irrationality of ζ(3)
Let ζ(3) be the real number∑+∞
k=11k3 .
Theorem (Apery, 1978): The constant ζ(3) is irrational.
See:“A proof that Euler missed: Apery’s proof of the irrationality ofζ(3). An informal report.” by A. van der Poorten, 1979.
for the tale of this proof, and of its verification.
Assia Mahboubi – Verified Computer-Aided Mathematics 30
Irrationality of ζ(3)
The crux in Apery’s proof is to verify that (an)n∈N and (bn)n∈Nverify the recurrence:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
with:
an =n∑
k=0
(nk
)2(n+kk
)2, bn = an
n∑k=1
1
k3+
n∑k=1
k∑m=1
(−1)m+1(nk
)2(n+kk
)2
2m3(nm
)(n+mm
) .
Assia Mahboubi – Verified Computer-Aided Mathematics 31
Irrationality of ζ(3)
The crux in Apery’s proof is to verify that (an)n∈N and (bn)n∈Nverify the recurrence:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
with:
an =n∑
k=0
(nk
)2(n+kk
)2, bn = an
n∑k=1
1
k3+
n∑k=1
k∑m=1
(−1)m+1(nk
)2(n+kk
)2
2m3(nm
)(n+mm
) .
Assia Mahboubi – Verified Computer-Aided Mathematics 31
Checking the recurrence: telescopes
To prove that an :=∑
k vn,k with vn,k :=(nk
)2(n+kk
)2verifies:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
Cohen and Zagier constructed wn,k such that:
n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k = wn,k+1 − wn,k
And then they sum over k both hand sides:∑k
(n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k) =∑k
(wn,k+1 − wn,k)
n3an − (34n3 − 51n2 + 27n − 5)an−1 + (n − 1)3an−2 = wn,∞ − wn,0 = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 32
Checking the recurrence: telescopes
To prove that an :=∑
k vn,k with vn,k :=(nk
)2(n+kk
)2verifies:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
Cohen and Zagier constructed wn,k such that:
n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k = wn,k+1 − wn,k
And then they sum over k both hand sides:∑k
(n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k) =∑k
(wn,k+1 − wn,k)
n3an − (34n3 − 51n2 + 27n − 5)an−1 + (n − 1)3an−2 = wn,∞ − wn,0 = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 32
Checking the recurrence: telescopes
To prove that an :=∑
k vn,k with vn,k :=(nk
)2(n+kk
)2verifies:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
Cohen and Zagier constructed wn,k such that:
n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k = wn,k+1 − wn,k
And then they sum over k both hand sides:
∑k
(n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k) =∑k
(wn,k+1 − wn,k)
n3an − (34n3 − 51n2 + 27n − 5)an−1 + (n − 1)3an−2 = wn,∞ − wn,0 = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 32
Checking the recurrence: telescopes
To prove that an :=∑
k vn,k with vn,k :=(nk
)2(n+kk
)2verifies:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
Cohen and Zagier constructed wn,k such that:
n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k = wn,k+1 − wn,k
And then they sum over k both hand sides:∑k
(n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k) =∑k
(wn,k+1 − wn,k)
n3an − (34n3 − 51n2 + 27n − 5)an−1 + (n − 1)3an−2 = wn,∞ − wn,0 = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 32
Checking the recurrence: telescopes
To prove that an :=∑
k vn,k with vn,k :=(nk
)2(n+kk
)2verifies:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
Cohen and Zagier constructed wn,k such that:
n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k = wn,k+1 − wn,k
And then they sum over k both hand sides:∑k
(n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k) =∑k
(wn,k+1 − wn,k)
n3an − (34n3 − 51n2 + 27n − 5)an−1 + (n − 1)3an−2
=
wn,∞ − wn,0 = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 32
Checking the recurrence: telescopes
To prove that an :=∑
k vn,k with vn,k :=(nk
)2(n+kk
)2verifies:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
Cohen and Zagier constructed wn,k such that:
n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k = wn,k+1 − wn,k
And then they sum over k both hand sides:∑k
(n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k) =∑k
(wn,k+1 − wn,k)
n3an − (34n3 − 51n2 + 27n − 5)an−1 + (n − 1)3an−2 =
wn,∞ − wn,0 = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 32
Checking the recurrence: telescopes
To prove that an :=∑
k vn,k with vn,k :=(nk
)2(n+kk
)2verifies:
n3yn − (34n3 − 51n2 + 27n − 5)yn−1 + (n − 1)3yn−2 = 0
Cohen and Zagier constructed wn,k such that:
n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k = wn,k+1 − wn,k
And then they sum over k both hand sides:∑k
(n3vn,k−(34n3−51n2+27n−5)vn−1,k+(n−1)3vn−2,k) =∑k
(wn,k+1 − wn,k)
n3an − (34n3 − 51n2 + 27n − 5)an−1 + (n − 1)3an−2 = wn,∞ − wn,0 = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 32
Alternate proofs
• Paper proofs:Beukers (1979, 1987), Nesterenko (1996), Rajkumar(2012), . . .
• Algorithmic proofs:Zeilberger (1993), Zudilin (2002, 2009), Salvy (2003),Schneider (2007), . . .
Assia Mahboubi – Verified Computer-Aided Mathematics 33
Formal recurrence operators
We denote A = Q(n, k)〈Sn, Sk〉 the ring of skew polynomials:
• in the (commuting) indeterminates Sn and Sk
• with coefficients in Q(n, k)
• with the commutation rule:
S inS
jkc(n, k) = c(n + i , k + j)S i
nSjk .
Elements of A can be viewed as algebraic representations forlinear recurrence operators with rational function coefficients.
Assia Mahboubi – Verified Computer-Aided Mathematics 34
Formal recurrence operators
Consider
• P =∑
(i ,j)∈I pi ,j(n, k)S inS
jk ∈ A,
• f a sequence.
The operator P acts on f by:
(P · f )n,k =∑
(i ,j)∈I
pi ,j(n, k)fn+i ,k+j
Assia Mahboubi – Verified Computer-Aided Mathematics 35
Example: binomial coefficient
Recurrences for the binomial coefficient(nk
)(
n + 1
k
)− n + 1
n + 1− k
(n
k
)= 0,
(n
k + 1
)− n − k
k + 1
(n
k
)= 0
can be represented using the operators:
P1 = Sn −n + 1
n + 1− k1, P2 = Sk −
n − k
k + 11
as:P1 · f = 0, P2 · f = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 36
Example: binomial coefficient
Recurrences for the binomial coefficient(nk
)(
n + 1
k
)− n + 1
n + 1− k
(n
k
)= 0,
(n
k + 1
)− n − k
k + 1
(n
k
)= 0
can be represented using the operators:
P1 = Sn −n + 1
n + 1− k, P2 = Sk −
n − k
k + 1as:
P1 · f = 0, P2 · f = 0
Assia Mahboubi – Verified Computer-Aided Mathematics 37
Creative telescoping
The aim is:
• starting from sequence (fn,k),
• to compute annihilating operators for Fn =∑n
k=0 fn,k .
For this:
• An algorithm finds a pair (P ,Q) satisfying
P · f = (Sk − 1)Q · f ;
• With Q ∈ A and P ∈ Q(n, k)〈Sn〉.
Assia Mahboubi – Verified Computer-Aided Mathematics 38
Creative telescoping
The aim is:
• starting from sequence (fn,k),
• to compute annihilating operators for Fn =∑n
k=0 fn,k .
For this:
• An algorithm finds a pair (P ,Q) satisfying
P · f = (Sk − 1)Q · f ;
• With Q ∈ A and P ∈ Q(n, k)〈Sn〉.
Assia Mahboubi – Verified Computer-Aided Mathematics 38
Annihilating ideal and Grobner basis
Let f a (germ of) sequence, cancelled by a certain Pf ∈ A.
• {P ∈ A : P · f = 0} is a left ideal of A;
• Algorithms exist to compute Grobner bases of such an ideal.
• Such a Grobner basis is a good representation for f itself.
Assia Mahboubi – Verified Computer-Aided Mathematics 39
Checking a candidate recurrence
Grobner bases are excellent tools to check the validity of acandidate recurrence.
Check: (n + 1
k + 1
)−(
n
k + 1
)−(n
k
)= 0
Using:(n + 1
k
)=
n + 1
n + 1− k
(n
k
),
(n
k + 1
)=
n − k
k + 1
(n
k
)
Assia Mahboubi – Verified Computer-Aided Mathematics 40
Computing Apery’s recurrence
an =n∑
k=0
(nk
)2(n+kk
)2, bn =
n∑k=1
(nk
)2(n+kk
)2
n∑m=1
1
m3+
k∑m=1
(−1)m+1
2m3(nm
)(n+mm
) .
step explicit form system operation input(s)
1 cn,k =(nk
)2(n+kk
)2C direct
2 an =∑n
k=1 cn,k A Σ C
3 dn,m = (−1)m+1
2m3(nm)(n+m
m )D direct
4 sn,k =∑k
m=1 dn,m S Σ D
5 zn =∑n
m=11m3 Z direct
6 un,k = zn + sn,k U + Z and S
7 vn,k = cn,kun,k V × C and U
8 bn =∑n
k=1 vn,k B Σ V
Assia Mahboubi – Verified Computer-Aided Mathematics 41
Computing Apery’s recurrence
an =n∑
k=0
(nk
)2(n+kk
)2, bn =
n∑k=1
(nk
)2(n+kk
)2
n∑m=1
1
m3+
k∑m=1
(−1)m+1
2m3(nm
)(n+mm
) .
step explicit form system operation input(s)
1 cn,k =(nk
)2(n+kk
)2C direct
2 an =∑n
k=1 cn,k A Σ C
3 dn,m = (−1)m+1
2m3(nm)(n+m
m )D direct
4 sn,k =∑k
m=1 dn,m S Σ D
5 zn =∑n
m=11m3 Z direct
6 un,k = zn + sn,k U + Z and S
7 vn,k = cn,kun,k V × C and U
8 bn =∑n
k=1 vn,k B Σ V
Assia Mahboubi – Verified Computer-Aided Mathematics 42
Checking Apery’s recurrence
an =n∑
k=0
(nk
)2(n+kk
)2, bn =
n∑k=1
(nk
)2(n+kk
)2
n∑m=1
1
m3+
k∑m=1
(−1)m+1
2m3(nm
)(n+mm
) .
step explicit form GB operation input(s)8 bn =
∑nk=1 vn,k B creative telescoping V
7 vn,k = cn,kun,k V product C and U
6 un,k = zn + sn,k U addition Z and S
5 zn
=∑n
m=11m3
Z
direct
4 sn,k =∑k
m=1 dn,m S creative telescoping D
3 dn,m
= (−1)m+1
2m3(nm)(n+m
m )
D
direct
2 an =∑n
k=1 cn,k A creative telescoping C
1 cn,k
=(nk
)2(n+kk
)2
C
direct
Assia Mahboubi – Verified Computer-Aided Mathematics 43
Checking Apery’s recurrence
an =n∑
k=0
(nk
)2(n+kk
)2, bn =
n∑k=1
(nk
)2(n+kk
)2
n∑m=1
1
m3+
k∑m=1
(−1)m+1
2m3(nm
)(n+mm
) .
step explicit form GB operation input(s)8 bn =
∑nk=1 vn,k B creative telescoping V
7 vn,k = cn,kun,k V product C and U
6 un,k = zn + sn,k U addition Z and S
5 zn =∑n
m=11m3 Z direct
4 sn,k =∑k
m=1 dn,m S creative telescoping D
3 dn,m = (−1)m+1
2m3(nm)(n+m
m )D direct
2 an =∑n
k=1 cn,k A creative telescoping C
1 cn,k =(nk
)2(n+kk
)2C direct
Assia Mahboubi – Verified Computer-Aided Mathematics 43
Sound creative telescoping
From the guarded creative telescoping identity for (fn,k)
(n, k) /∈ ∆⇒ (P · f ,k)n = (Q · f )n,k+1 − (Q · f )n,k ,
We can prove for Fn =∑n+β
k=α fn,k that:
(P · F )n =(
(Q · f )n,n+β+1 − (Q · f )n,α)
+r∑
i=1
i∑j=1
pi(n) fn+i ,n+β+j
+∑
α≤k≤n+β ∧ (n,k)∈∆
(P · f ,k)n − (Q · f )n,k+1 + (Q · f )n,k ,
Assia Mahboubi – Verified Computer-Aided Mathematics 44
Sound creative telescoping
From the guarded creative telescoping identity for (fn,k)
(n, k) /∈ ∆⇒ (P · f ,k)n = (Q · f )n,k+1 − (Q · f )n,k ,
We can prove for Fn =∑n+β
k=α fn,k that:
(P · F )n =(
(Q · f )n,n+β+1 − (Q · f )n,α)
+r∑
i=1
i∑j=1
pi(n) fn+i ,n+β+j
+∑
α≤k≤n+β ∧ (n,k)∈∆
(P · f ,k)n − (Q · f )n,k+1 + (Q · f )n,k ,
Assia Mahboubi – Verified Computer-Aided Mathematics 44
A formal, computer-algebra aided, proof
Joint work with Frederic Chyzak, Thomas Sibut-Pinote, ITP 2014
• A Maple session computes the recurrence operators;
• It generates Coq statements of candidate properties;
• We annotate the generated recurrences with provisos;
• We prove lemmas by interactive formal proofs.
See also: Formal proofs of hypergeometric sums, John Harrison, Journal of Automated Reasoning, 2015
Assia Mahboubi – Verified Computer-Aided Mathematics 45
A formal, computer-algebra aided, proof
Joint work with Frederic Chyzak, Thomas Sibut-Pinote, ITP 2014
• A Maple session computes the recurrence operators;
• It generates Coq statements of candidate properties;
• We annotate the generated recurrences with provisos;
• We prove lemmas by interactive formal proofs.
See also: Formal proofs of hypergeometric sums, John Harrison, Journal of Automated Reasoning, 2015
Assia Mahboubi – Verified Computer-Aided Mathematics 45
A formal, computer-algebra aided, proof
Joint work with Frederic Chyzak, Thomas Sibut-Pinote, ITP 2014
• A Maple session computes the recurrence operators;
• It generates Coq statements of candidate properties;
• We annotate the generated recurrences with provisos;
• We prove lemmas by interactive formal proofs.
See also: Formal proofs of hypergeometric sums, John Harrison, Journal of Automated Reasoning, 2015
Assia Mahboubi – Verified Computer-Aided Mathematics 45
First order theories
Inductive term : Type :=
| Var (n : N)| Add (t1 t2 : term)
| Opp (t : term)
| NatConst (n : N)| NatMul (t : term)(n : N)| Mul (t1 t2 : term)
.
Inductive formula : Type :=
| Bool (b : B)| Equal (t1 t2 : term)
| Leq (t1 t2 : term)
| And (f1 f2 : formula)
| Or (f1 f2 : formula)
| Implies (f1 f2 : formula)
| Not (f : formula)
| Exists (n : N) (f : formula)
| Forall (n : N) (f : formula)
.
Definition qfree_form : formula -> B
Definition eval (R : ringType) : seq R -> term -> R
Definition holds (R : ringType) : seq R -> formula -> Prop
⇒ (holds R e f) is the (yet unproved) statement “R |=e f ”.
Assia Mahboubi – Verified Computer-Aided Mathematics 46
First order theories
Inductive term : Type :=
| Var (n : N)| Add (t1 t2 : term)
| Opp (t : term)
| NatConst (n : N)| NatMul (t : term)(n : N)| Mul (t1 t2 : term)
.
Inductive formula : Type :=
| Bool (b : B)| Equal (t1 t2 : term)
| Leq (t1 t2 : term)
| And (f1 f2 : formula)
| Or (f1 f2 : formula)
| Implies (f1 f2 : formula)
| Not (f : formula)
| Exists (n : N) (f : formula)
| Forall (n : N) (f : formula)
.
Definition qfree_form : formula -> B
Definition eval (R : ringType) : seq R -> term -> R
Definition holds (R : ringType) : seq R -> formula -> Prop
⇒ (holds R e f) is the (yet unproved) statement “R |=e f ”.
Assia Mahboubi – Verified Computer-Aided Mathematics 46
First order theories
Inductive term : Type :=
| Var (n : N)| Add (t1 t2 : term)
| Opp (t : term)
| NatConst (n : N)| NatMul (t : term)(n : N)| Mul (t1 t2 : term)
.
Inductive formula : Type :=
| Bool (b : B)| Equal (t1 t2 : term)
| Leq (t1 t2 : term)
| And (f1 f2 : formula)
| Or (f1 f2 : formula)
| Implies (f1 f2 : formula)
| Not (f : formula)
| Exists (n : N) (f : formula)
| Forall (n : N) (f : formula)
.
Definition qfree_form : formula -> B
Definition eval (R : ringType) : seq R -> term -> R
Definition holds (R : ringType) : seq R -> formula -> Prop
⇒ (holds R e f) is the (yet unproved) statement “R |=e f ”.
Assia Mahboubi – Verified Computer-Aided Mathematics 46
First order theories
Inductive term : Type :=
| Var (n : N)| Add (t1 t2 : term)
| Opp (t : term)
| NatConst (n : N)| NatMul (t : term)(n : N)| Mul (t1 t2 : term)
.
Inductive formula : Type :=
| Bool (b : B)| Equal (t1 t2 : term)
| Leq (t1 t2 : term)
| And (f1 f2 : formula)
| Or (f1 f2 : formula)
| Implies (f1 f2 : formula)
| Not (f : formula)
| Exists (n : N) (f : formula)
| Forall (n : N) (f : formula)
.
Definition qfree_form : formula -> B
Definition eval (R : ringType) : seq R -> term -> R
Definition holds (R : ringType) : seq R -> formula -> Prop
⇒ (holds R e f) is the (yet unproved) statement “R |=e f ”.
Assia Mahboubi – Verified Computer-Aided Mathematics 46
First order theories
Inductive term : Type :=
| Var (n : N)| Add (t1 t2 : term)
| Opp (t : term)
| NatConst (n : N)| NatMul (t : term)(n : N)| Mul (t1 t2 : term)
.
Inductive formula : Type :=
| Bool (b : B)| Equal (t1 t2 : term)
| Leq (t1 t2 : term)
| And (f1 f2 : formula)
| Or (f1 f2 : formula)
| Implies (f1 f2 : formula)
| Not (f : formula)
| Exists (n : N) (f : formula)
| Forall (n : N) (f : formula)
.
Definition qfree_form : formula -> B
Definition eval (R : ringType) : seq R -> term -> R
Definition holds (R : ringType) : seq R -> formula -> Prop
⇒ (holds R e f) is the (yet unproved) statement “R |=e f ”.
Assia Mahboubi – Verified Computer-Aided Mathematics 46
Quantifier elimination: real closed fields
⇒ A function:
Definition rcf_qelim : formula -> formula
such that:
• forall f : formula, qfree (qelim f)= true
• forall (R : realClosedField) (e : seq R) (f : formula),
holds e f <-> holds e (rcf_qelim e f)
Joint work with Cyril Cohen, LMCS 2012.
⇒ A (constructive) theory of semi-algebraic sets and functions.Boris Djalal, Proceedings of CPP 2018.
Assia Mahboubi – Verified Computer-Aided Mathematics 47
Quantifier elimination: real closed fields
⇒ A function:
Definition rcf_qelim : formula -> formula
such that:
• forall f : formula, qfree (qelim f)= true
• forall (R : realClosedField) (e : seq R) (f : formula),
holds e f <-> holds e (rcf_qelim e f)
Joint work with Cyril Cohen, LMCS 2012.
⇒ A (constructive) theory of semi-algebraic sets and functions.Boris Djalal, Proceedings of CPP 2018.
Assia Mahboubi – Verified Computer-Aided Mathematics 47
Formal abstracts?
Uniform p-adic cell decomposition and local zeta functions,Johan Pas, J. reine angew. Math. 399 (1989), 137—172.
Define:
qelim : formula -> formula
Kq_free : formula -> B
Such that:
forall f : formula, Kq_free (qelim f)
Now:
forall f : formula,
exists out : {finset N}, forall (p : N), prime p -> p /∈ out ->
forall (e : seq Qp), Qp, holds Qp e f <-> holds Qp e (qelim f).
Assia Mahboubi – Verified Computer-Aided Mathematics 48
Formal abstracts?
Uniform p-adic cell decomposition and local zeta functions,Johan Pas, J. reine angew. Math. 399 (1989), 137—172.
Define:
qelim : formula -> formula
Kq_free : formula -> B
Such that:
forall f : formula, Kq_free (qelim f)
Now:
forall f : formula,
exists out : {finset N}, forall (p : N), prime p -> p /∈ out ->
forall (e : seq Qp), Qp, holds Qp e f <-> holds Qp e (qelim f).
Assia Mahboubi – Verified Computer-Aided Mathematics 48
Formal abstracts?
Uniform p-adic cell decomposition and local zeta functions,Johan Pas, J. reine angew. Math. 399 (1989), 137—172.
Define:
qelim : formula -> formula
Kq_free : formula -> B
Such that:
forall f : formula, Kq_free (qelim f)
Now:
forall f : formula,
exists out : {finset N}, forall (p : N), prime p -> p /∈ out ->
forall (e : seq Qp), Qp, holds Qp e f <-> holds Qp e (qelim f).
Assia Mahboubi – Verified Computer-Aided Mathematics 48
Formal abstracts?
Uniform p-adic cell decomposition and local zeta functions,Johan Pas, J. reine angew. Math. 399 (1989), 137—172.
Define:
qelim : formula -> formula
Kq_free : formula -> B
Such that:
forall f : formula, Kq_free (qelim f)
Now:
forall f : formula,
exists out : {finset N}, forall (p : N), prime p -> p /∈ out ->
forall (e : seq Qp), Qp, holds Qp e f <-> holds Qp e (qelim f).
Assia Mahboubi – Verified Computer-Aided Mathematics 48
Formal abstracts?
Uniform p-adic cell decomposition and local zeta functions,Johan Pas, J. reine angew. Math. 399 (1989), 137—172.
Define:
qelim : formula -> formula
Kq_free : formula -> B
Such that:
forall f : formula, Kq_free (qelim f)
Now:
forall f : formula,
exists out : {finset N}, forall (p : N), prime p -> p /∈ out ->
forall (e : seq Qp), Qp, holds Qp e f <-> holds Qp e (qelim f).
Assia Mahboubi – Verified Computer-Aided Mathematics 48
Conclusion
Happy Birthday Tom
Assia Mahboubi – Verified Computer-Aided Mathematics 49
Conclusion
Happy Birthday Tom
Assia Mahboubi – Verified Computer-Aided Mathematics 49