SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
MetiTarski: An Automatic
Prover for Real-Valued
Special Functions
Behzad Akbarpour and Lawrence C. Paulson
Computer Laboratory, Cambridge
special functions
Many application domains concern statements
involving the functions sin, cos, ln, exp, etc.
We prove them by combining a resolution theorem
prover (Metis) with a decision procedure for real
closed fields (QEPCAD).
MetiTarski works automatically and delivers
machine-readable proofs.
the basic idea
Our approach involves replacing functions by
rational function upper or lower bounds.
The eventual polynomial inequalities belong to a
decidable theory: real closed fields (RCF).
Logical formulae over the reals involving + − × ≤
and quantifiers are decidable (Tarski).
We call such formulae algebraic.
bounds for exp
Special functions can be approximated, e.g. by
Taylor series or continued fractions.
Typical bounds are only valid (or close) over a
restricted range of arguments.
We need several formulas to cover a range of
intervals. Here are a few of the options.
Bounds and their quirks
Some are extremely
accurate at first, but
veer away drastically.
There is no general
upper bound for the
exponential function.
bounds for ln
based on the continued fraction for ln(x+1)
much more accurate than the Taylor expansion
RCF decision procedure
Quantifier elimination reduces a formula to TRUE
or FALSE, provided it has no free variables.
HOL-Light implements Hörmander’s decision
procedure. It is fairly simple, but it hangs if the
polynomial’s degree exceeds 6.
Cylindrical Algebraic Decomposition (due to
Collins) is still doubly exponential in the number of
variables, but it is polynomial in other parameters.
We use QEPCAD B (Hoon Hong, C. W. Brown).
Metis resolution prover
a full implementation
of the superposition
calculus
integrated with
interactive theorem
provers (HOL4,
Isabelle)
coded in Standard ML

acceptable
performance
easy to modify
due to Joe Hurd
resolution primer
Resolution provers work with clauses: disjunctions
of literals (atoms or their negations).
They seek to contradict the negation of the goal.
Each step combines two clauses and yields new
clauses, which are simplified and perhaps kept.
If the empty clause is produced, we have the
desired contradiction.
a resolution step
resolution data flow
passive
clause set
empty
contraclause
diction!!

selected
clause

new
clauses

inference
rules

simplification

deduced
clauses

active
clause set
modifications to Metis
algebraic literal deletion, via decision procedure
algebraic redundancy test (subsumption)
formula normalization and simplification
modified Knuth-Bendix ordering
“dividing out” products
algebraic literal deletion
Our version of Metis keeps a list of all ground,
algebraic clauses (+ − × ≤, no variables).
Any literal that is inconsistent with those clauses
can be deleted.
Metis simplifies new clauses by calling QEPCAD
to detect inconsistent literals.
Deleting literals brings us closer to the empty
clause!
literal deletion examples
We delete x2+1 < 0, as it has no real solutions.
Knowing xy > 1, we delete the literal x=0.
We take adjacent literals into account: in the
clause x2 > 2 ∨ x > 3, we delete x > 3.

Specifically, QEPCAD finds
∃x [x ≤ 2 ∧ x > 3] to be
2

equivalent to FALSE.
algebraic subsumption
If a new clause is an instance of another, it is
redundant and should be DELETED.
We apply this idea to ground algebraic formulas,
deleting any that follow from existing facts.
Example: knowing x2 > 4 we can delete the clause
x < −1 ∨ x > 2.

QEPCAD: ∃x [x > 4 ∧ ¬(x < −1 ∨ x > 2)]
2

is equivalent to FALSE.
formula normalization
How do we suppress redundant equivalent forms
such as 2x+1, x+1+x, 2(x+1)−1? Horner canonical
form is a recursive representation of polynomials.

The normalised formula is unique and
reasonably compact.
normalization example
first variable

second variable

The “variables” can be arbitrarily non-algebraic
sub-expressions.
Thus, formulas containing special functions can
also be simplified, and the function isolated.
formula simplification
Finally we simplify the output of the Horner
transformation using laws like 0+z=z and 1×z=z.
The maximal function term, say ln E, is isolated (if
possible) on one side of an inequality.
Formulas are converted to rational functions:
choosing the best literal
This is the critical one:
it is the most difficult!
And then this one
should be tackled next.
Knuth-Bendix ordering
Superposition is a refinement of resolution,
selecting the largest literals using an ordering.
Since ln, exp, ... are complex, we give them high
weights. This focuses the search on them.
The Knuth-Bendix ordering (KBO) also counts
occurrences of variables, so t is more complex
than u if it contains more variables.
modified KBO
Our bounds for f(x) contain multiple occurrences of
x, so standard KBO regards the bounds as worse
than the functions themselves!
Ludwig and Waldmann (2007) propose a
modification of KBO that lets us say e.g. “ln(x) is
more complex than 100 occurrences of x.”
This change greatly improves the is performance
for our examples.
dividing out products
The heuristics presented so far only isolate
function occurrences that are additive.
If a function is MULTIPLIED by an expression u, then
we must divide both sides of the inequality by u.
The outcome depends upon the sign of u.
In general, u could be positive, negative or zero; its
sign does not need to be fixed.
|exp(x) 2|x|/(2 + x) ≤ − 1
0.318
−1 < x =⇒ − 1| ≤ exp(|x|)|ln(1 + x)|
4.266
−1 =⇒ |ln(1 + x)| ≤| x) ≤ |ln(1 + x)|
4.266
|x| < 1 < x =⇒ 2|x|/(2 + x|(1 + |x|)/|1 + x|
0.604
0.604
0 < |x| < 1 =⇒ |ln(1 + x)| ≤|1/x 2 + |x|)/|1 + x|
x ≤ π/2 =⇒ 1/ sin2 x < x|(1 + 1 − 4/π2
410
0 < x ≤ π/2 =⇒ 1/ sin2 x < 1/x 2 + 1 − 4/π2
410

dividing out example
0 < x < 1/2 =⇒ cos(πx) > 1 − 2x
0 < x < 1/2 =⇒ cos(πx) > 1 − 2x

Given a clause of the form
deduce the three

f (t ) · u ≤ v ∨C
f (t ) · u ≤ v ∨C

f (t ) ≤ v/u ∨ u ≤ 0 ∨C
clauses f (t ) ≤ v/u ∨ u ≤ 0 ∨C
0 ≤ v ∨ u = 0 ∨C
0 ≤ v ∨ u = 0 ∨C
f (t ) ≥ v/u ∨ u ≥ 0 ∨C
f (t ) ≥ v/u ∨ u ≥ 0 ∨C

Numerous problems can only be solved using
this form of inference.
2

2
notes on the axioms
We omit general laws: transitivity is too prolific!
The decision procedure, QEPCAD, catches many
instances of general laws.
We build transitivity into our bounding axioms.
We use lgen(R,X,Y) to express both X≤Y (when
R=0) and X<Y (when R=1).
We identify x<y with ¬(y≤x).
some exp lower bounds

Covers both
< and ≤

cnf(exp_lower_taylor_1,axiom,
( ~ lgen(R,Y,1+X)
| lgen(R,Y,exp(X)) )).

Transitivity is
built in: to show
Y<exp(X), show
Y<1+X.

cnf(exp_lower_bound_cf2,axiom,
( ~ lgen(R, Y, (X^2 + 6*X + 12) /
(X^2 - 6*X + 12))
| lgen(R,Y,exp(X)) )).
absolute value axioms
Simply |X| = X if X≥0 and |X| = −X otherwise.
It helps to give abs a high weight, discouraging the
introduction of occurrences of abs.
cnf(abs_nonnegative,axiom,
( ~ 0 <= X
| abs(X) = X )).
cnf(abs_negative,axiom,
( 0 <= X
| abs(X) = -X )).
y
x

1

x2
=
y(x 2 + 1)

a few solved problems
x+

1
x

problem
|x| < 1 =⇒ |ln(1 + x)| ≤− ln(1 − |x|)
|exp(x) − 1| ≤ exp(|x|) − 1
−1 < x =⇒ 2|x|/(2 + x) ≤ |ln(1 + x)|
|x| < 1 =⇒ |ln(1 + x)| ≤| x|(1 + |x|)/|1 + x|
0 < x ≤ π/2 =⇒ 1/ sin2 x < 1/x 2 + 1 − 4/π2

< x < 1/2 =⇒ cos(πx) > 1 − 2x

seconds
0.153
0.318
4.266
0.604
410
hybrid systems
Many hybrid systems can be specified by systems
of linear differential equations. (The HSOLVER
Benchmark Database presents 18 examples.)
We can solve these equations using Maple,
typically yielding a problem involving the
exponential function.
MetiTarski can often solve these problems.
collision avoidance system
1

differential equations for the velocity,
CONVOI
acceleration and gap between two vehicles:
˙
v = a,

˙
gap = v f − v

˙
a = −3a − 3(v − v f ) + gap − (v + 10),










solution for v gap (as a function of t):0
the
0 0 1 0
 vf 

x =
 a 
gap

 0 0 0 0

A=
 −4 3 −3 1 
−1 1 0 0

For the given set of initial states as



 0 

B =
 −10 
0

 the
MetiTarski can prove that 2  gap is positive!
 2 

x0 = 
 −0.5 
some limitations
No range reduction: proofs about exp(20) or
sin(3000) are likely to fail.
Not everything can be proved using upper and
lower bounds. Adding laws like exp(X+Y) =
exp(X)exp(Y) greatly increases the search space.
Problems can have only a few variables or
QEPCAD will never terminate.
example of a limitation
We can prove this theorem if we replace 1/2 by
100/201. Approximating π by a fraction loses
information.
related work?
SPASS+T and SPASS(T) combine the SPASS
prover with various decision procedures.
Ratschan’s RSOLVER solves quantified inequality
constraints over the real numbers using constraint
programming methods.
There are many attempts to add quantification to
SMT solvers, which solve propositional assertions
involving linear arithmetic, etc.
final remarks
By combining a resolution prover with a decision
procedure, we can solve many hard problems.
The system works by deduction and outputs
proofs that could be checked independently.
A similar architecture would probably perform well
using other decision procedures.
acknowledgements
Assistance from C. W. Brown, A. Cuyt, I. Grant, J.
Harrison, J. Hurd, D. Lester, C. Muñoz, U.
Waldmann, etc.
The research was supported by the Engineering
and Physical Sciences Research Council [grant
number EP/C013409/1].

Más contenido relacionado

La actualidad más candente

Elementary differential equation
Elementary differential equationElementary differential equation
Elementary differential equationAngeli Castillo
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...mathsjournal
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equationJUGAL BORAH
 
Cramer row inequality
Cramer row inequality Cramer row inequality
Cramer row inequality VashuGupta8
 
He laplace method for special nonlinear partial differential equations
He laplace method for special nonlinear partial differential equationsHe laplace method for special nonlinear partial differential equations
He laplace method for special nonlinear partial differential equationsAlexander Decker
 
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...mathsjournal
 
Friedrichs1958
Friedrichs1958Friedrichs1958
Friedrichs1958staros11
 
ORDINARY DIFFERENTIAL EQUATION
ORDINARY DIFFERENTIAL EQUATION ORDINARY DIFFERENTIAL EQUATION
ORDINARY DIFFERENTIAL EQUATION LANKESH S S
 
Helmholtz equation (Motivations and Solutions)
Helmholtz equation (Motivations and Solutions)Helmholtz equation (Motivations and Solutions)
Helmholtz equation (Motivations and Solutions)Hassaan Saleem
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equationsvansi007
 
Ode powerpoint presentation1
Ode powerpoint presentation1Ode powerpoint presentation1
Ode powerpoint presentation1Pokkarn Narkhede
 
Mit18 330 s12_chapter1
Mit18 330 s12_chapter1Mit18 330 s12_chapter1
Mit18 330 s12_chapter1CAALAAA
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...mathsjournal
 
honey jose presentation
honey jose presentationhoney jose presentation
honey jose presentationHoney jose
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Tensor algebra and tensor analysis for engineers
Tensor algebra and tensor analysis for engineersTensor algebra and tensor analysis for engineers
Tensor algebra and tensor analysis for engineersSpringer
 

La actualidad más candente (19)

Elementary differential equation
Elementary differential equationElementary differential equation
Elementary differential equation
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equation
 
Cramer row inequality
Cramer row inequality Cramer row inequality
Cramer row inequality
 
He laplace method for special nonlinear partial differential equations
He laplace method for special nonlinear partial differential equationsHe laplace method for special nonlinear partial differential equations
He laplace method for special nonlinear partial differential equations
 
Intro
IntroIntro
Intro
 
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
lassomodel, sparsity, multivariate modeling, NIR spectroscopy, biodiesel from...
 
Friedrichs1958
Friedrichs1958Friedrichs1958
Friedrichs1958
 
patel
patelpatel
patel
 
ORDINARY DIFFERENTIAL EQUATION
ORDINARY DIFFERENTIAL EQUATION ORDINARY DIFFERENTIAL EQUATION
ORDINARY DIFFERENTIAL EQUATION
 
Helmholtz equation (Motivations and Solutions)
Helmholtz equation (Motivations and Solutions)Helmholtz equation (Motivations and Solutions)
Helmholtz equation (Motivations and Solutions)
 
02 first order differential equations
02 first order differential equations02 first order differential equations
02 first order differential equations
 
Ode powerpoint presentation1
Ode powerpoint presentation1Ode powerpoint presentation1
Ode powerpoint presentation1
 
Mit18 330 s12_chapter1
Mit18 330 s12_chapter1Mit18 330 s12_chapter1
Mit18 330 s12_chapter1
 
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
Fractional Newton-Raphson Method and Some Variants for the Solution of Nonlin...
 
Ordinary differential equation
Ordinary differential equationOrdinary differential equation
Ordinary differential equation
 
honey jose presentation
honey jose presentationhoney jose presentation
honey jose presentation
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Tensor algebra and tensor analysis for engineers
Tensor algebra and tensor analysis for engineersTensor algebra and tensor analysis for engineers
Tensor algebra and tensor analysis for engineers
 

Destacado

How Do You Find Peace
How Do You Find PeaceHow Do You Find Peace
How Do You Find PeacePeter Orr
 
Organizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesOrganizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesLawrence Paulson
 
MetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systemsMetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systemsLawrence Paulson
 
The Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZF
The Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZFThe Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZF
The Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZFLawrence Paulson
 
The Reflection Theorem: Formalizing Meta-Theoretic Reasoning
The Reflection Theorem: Formalizing Meta-Theoretic ReasoningThe Reflection Theorem: Formalizing Meta-Theoretic Reasoning
The Reflection Theorem: Formalizing Meta-Theoretic ReasoningLawrence Paulson
 
Defining Functions on Equivalence Classes
Defining Functions on Equivalence ClassesDefining Functions on Equivalence Classes
Defining Functions on Equivalence ClassesLawrence Paulson
 
Mechanized Proofs for a Recursive Authentication Protocol
Mechanized Proofs for a Recursive Authentication ProtocolMechanized Proofs for a Recursive Authentication Protocol
Mechanized Proofs for a Recursive Authentication ProtocolLawrence Paulson
 
Proving Security Protocols Correct
Proving Security Protocols CorrectProving Security Protocols Correct
Proving Security Protocols CorrectLawrence Paulson
 
Mechanizing set theory: cardinal arithmetic and the axiom of choice
Mechanizing set theory: cardinal arithmetic and the axiom of choiceMechanizing set theory: cardinal arithmetic and the axiom of choice
Mechanizing set theory: cardinal arithmetic and the axiom of choiceLawrence Paulson
 

Destacado (9)

How Do You Find Peace
How Do You Find PeaceHow Do You Find Peace
How Do You Find Peace
 
Organizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type ClassesOrganizing Numerical Theories using Axiomatic Type Classes
Organizing Numerical Theories using Axiomatic Type Classes
 
MetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systemsMetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systems
 
The Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZF
The Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZFThe Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZF
The Relative Consistency of the Axiom of Choice — Mechanized Using Isabelle/ZF
 
The Reflection Theorem: Formalizing Meta-Theoretic Reasoning
The Reflection Theorem: Formalizing Meta-Theoretic ReasoningThe Reflection Theorem: Formalizing Meta-Theoretic Reasoning
The Reflection Theorem: Formalizing Meta-Theoretic Reasoning
 
Defining Functions on Equivalence Classes
Defining Functions on Equivalence ClassesDefining Functions on Equivalence Classes
Defining Functions on Equivalence Classes
 
Mechanized Proofs for a Recursive Authentication Protocol
Mechanized Proofs for a Recursive Authentication ProtocolMechanized Proofs for a Recursive Authentication Protocol
Mechanized Proofs for a Recursive Authentication Protocol
 
Proving Security Protocols Correct
Proving Security Protocols CorrectProving Security Protocols Correct
Proving Security Protocols Correct
 
Mechanizing set theory: cardinal arithmetic and the axiom of choice
Mechanizing set theory: cardinal arithmetic and the axiom of choiceMechanizing set theory: cardinal arithmetic and the axiom of choice
Mechanizing set theory: cardinal arithmetic and the axiom of choice
 

Similar a MetiTarski: An Automatic Prover for Real-Valued Special Functions

Indefinite Integral
Indefinite IntegralIndefinite Integral
Indefinite IntegralRich Elle
 
Solution of nonlinear_equations
Solution of nonlinear_equationsSolution of nonlinear_equations
Solution of nonlinear_equationsTarun Gehlot
 
Numerical_PDE_Paper
Numerical_PDE_PaperNumerical_PDE_Paper
Numerical_PDE_PaperWilliam Ruys
 
A043001006
A043001006A043001006
A043001006inventy
 
A043001006
A043001006A043001006
A043001006inventy
 
A043001006
A043001006A043001006
A043001006inventy
 
Numarical values
Numarical valuesNumarical values
Numarical valuesAmanSaeed11
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlightedAmanSaeed11
 
Using Eulers formula, exp(ix)=cos(x)+isin.docx
Using Eulers formula, exp(ix)=cos(x)+isin.docxUsing Eulers formula, exp(ix)=cos(x)+isin.docx
Using Eulers formula, exp(ix)=cos(x)+isin.docxcargillfilberto
 
Project in Calcu
Project in CalcuProject in Calcu
Project in Calcupatrickpaz
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionCharles Deledalle
 

Similar a MetiTarski: An Automatic Prover for Real-Valued Special Functions (20)

CALCULUS 2.pptx
CALCULUS 2.pptxCALCULUS 2.pptx
CALCULUS 2.pptx
 
poster2
poster2poster2
poster2
 
Indefinite Integral
Indefinite IntegralIndefinite Integral
Indefinite Integral
 
Limits and derivatives
Limits and derivativesLimits and derivatives
Limits and derivatives
 
Solution of nonlinear_equations
Solution of nonlinear_equationsSolution of nonlinear_equations
Solution of nonlinear_equations
 
Numerical_PDE_Paper
Numerical_PDE_PaperNumerical_PDE_Paper
Numerical_PDE_Paper
 
opt_slides_ump.pdf
opt_slides_ump.pdfopt_slides_ump.pdf
opt_slides_ump.pdf
 
Lecture co3 math21-1
Lecture co3 math21-1Lecture co3 math21-1
Lecture co3 math21-1
 
A043001006
A043001006A043001006
A043001006
 
A043001006
A043001006A043001006
A043001006
 
A043001006
A043001006A043001006
A043001006
 
Thesis
ThesisThesis
Thesis
 
Numarical values
Numarical valuesNumarical values
Numarical values
 
Numarical values highlighted
Numarical values highlightedNumarical values highlighted
Numarical values highlighted
 
Quadrature
QuadratureQuadrature
Quadrature
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Multiple scales
Multiple scalesMultiple scales
Multiple scales
 
Using Eulers formula, exp(ix)=cos(x)+isin.docx
Using Eulers formula, exp(ix)=cos(x)+isin.docxUsing Eulers formula, exp(ix)=cos(x)+isin.docx
Using Eulers formula, exp(ix)=cos(x)+isin.docx
 
Project in Calcu
Project in CalcuProject in Calcu
Project in Calcu
 
IVR - Chapter 1 - Introduction
IVR - Chapter 1 - IntroductionIVR - Chapter 1 - Introduction
IVR - Chapter 1 - Introduction
 

Más de Lawrence Paulson

Automated theorem proving for special functions: the next phase
Automated theorem proving for special functions: the next phaseAutomated theorem proving for special functions: the next phase
Automated theorem proving for special functions: the next phaseLawrence Paulson
 
Theorem proving and the real numbers: overview and challenges
Theorem proving and the real numbers: overview and challengesTheorem proving and the real numbers: overview and challenges
Theorem proving and the real numbers: overview and challengesLawrence Paulson
 
Source-Level Proof Reconstruction for Interactive Proving
Source-Level Proof Reconstruction for Interactive ProvingSource-Level Proof Reconstruction for Interactive Proving
Source-Level Proof Reconstruction for Interactive ProvingLawrence Paulson
 
A Generic Tableau Prover and Its Integration with Isabelle
A Generic Tableau Prover and Its Integration with IsabelleA Generic Tableau Prover and Its Integration with Isabelle
A Generic Tableau Prover and Its Integration with IsabelleLawrence Paulson
 
Proving Properties of Security Protocols by Induction
Proving Properties of Security Protocols by InductionProving Properties of Security Protocols by Induction
Proving Properties of Security Protocols by InductionLawrence Paulson
 
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsA Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsLawrence Paulson
 

Más de Lawrence Paulson (6)

Automated theorem proving for special functions: the next phase
Automated theorem proving for special functions: the next phaseAutomated theorem proving for special functions: the next phase
Automated theorem proving for special functions: the next phase
 
Theorem proving and the real numbers: overview and challenges
Theorem proving and the real numbers: overview and challengesTheorem proving and the real numbers: overview and challenges
Theorem proving and the real numbers: overview and challenges
 
Source-Level Proof Reconstruction for Interactive Proving
Source-Level Proof Reconstruction for Interactive ProvingSource-Level Proof Reconstruction for Interactive Proving
Source-Level Proof Reconstruction for Interactive Proving
 
A Generic Tableau Prover and Its Integration with Isabelle
A Generic Tableau Prover and Its Integration with IsabelleA Generic Tableau Prover and Its Integration with Isabelle
A Generic Tableau Prover and Its Integration with Isabelle
 
Proving Properties of Security Protocols by Induction
Proving Properties of Security Protocols by InductionProving Properties of Security Protocols by Induction
Proving Properties of Security Protocols by Induction
 
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness TheoremsA Machine-Assisted Proof of Gödel's Incompleteness Theorems
A Machine-Assisted Proof of Gödel's Incompleteness Theorems
 

Último

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Último (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

MetiTarski: An Automatic Prover for Real-Valued Special Functions

  • 1. MetiTarski: An Automatic Prover for Real-Valued Special Functions Behzad Akbarpour and Lawrence C. Paulson Computer Laboratory, Cambridge
  • 2. special functions Many application domains concern statements involving the functions sin, cos, ln, exp, etc. We prove them by combining a resolution theorem prover (Metis) with a decision procedure for real closed fields (QEPCAD). MetiTarski works automatically and delivers machine-readable proofs.
  • 3. the basic idea Our approach involves replacing functions by rational function upper or lower bounds. The eventual polynomial inequalities belong to a decidable theory: real closed fields (RCF). Logical formulae over the reals involving + − × ≤ and quantifiers are decidable (Tarski). We call such formulae algebraic.
  • 4. bounds for exp Special functions can be approximated, e.g. by Taylor series or continued fractions. Typical bounds are only valid (or close) over a restricted range of arguments. We need several formulas to cover a range of intervals. Here are a few of the options.
  • 5. Bounds and their quirks Some are extremely accurate at first, but veer away drastically. There is no general upper bound for the exponential function.
  • 6. bounds for ln based on the continued fraction for ln(x+1) much more accurate than the Taylor expansion
  • 7. RCF decision procedure Quantifier elimination reduces a formula to TRUE or FALSE, provided it has no free variables. HOL-Light implements Hörmander’s decision procedure. It is fairly simple, but it hangs if the polynomial’s degree exceeds 6. Cylindrical Algebraic Decomposition (due to Collins) is still doubly exponential in the number of variables, but it is polynomial in other parameters. We use QEPCAD B (Hoon Hong, C. W. Brown).
  • 8. Metis resolution prover a full implementation of the superposition calculus integrated with interactive theorem provers (HOL4, Isabelle) coded in Standard ML acceptable performance easy to modify due to Joe Hurd
  • 9. resolution primer Resolution provers work with clauses: disjunctions of literals (atoms or their negations). They seek to contradict the negation of the goal. Each step combines two clauses and yields new clauses, which are simplified and perhaps kept. If the empty clause is produced, we have the desired contradiction.
  • 11. resolution data flow passive clause set empty contraclause diction!! selected clause new clauses inference rules simplification deduced clauses active clause set
  • 12. modifications to Metis algebraic literal deletion, via decision procedure algebraic redundancy test (subsumption) formula normalization and simplification modified Knuth-Bendix ordering “dividing out” products
  • 13. algebraic literal deletion Our version of Metis keeps a list of all ground, algebraic clauses (+ − × ≤, no variables). Any literal that is inconsistent with those clauses can be deleted. Metis simplifies new clauses by calling QEPCAD to detect inconsistent literals. Deleting literals brings us closer to the empty clause!
  • 14. literal deletion examples We delete x2+1 < 0, as it has no real solutions. Knowing xy > 1, we delete the literal x=0. We take adjacent literals into account: in the clause x2 > 2 ∨ x > 3, we delete x > 3. Specifically, QEPCAD finds ∃x [x ≤ 2 ∧ x > 3] to be 2 equivalent to FALSE.
  • 15. algebraic subsumption If a new clause is an instance of another, it is redundant and should be DELETED. We apply this idea to ground algebraic formulas, deleting any that follow from existing facts. Example: knowing x2 > 4 we can delete the clause x < −1 ∨ x > 2. QEPCAD: ∃x [x > 4 ∧ ¬(x < −1 ∨ x > 2)] 2 is equivalent to FALSE.
  • 16. formula normalization How do we suppress redundant equivalent forms such as 2x+1, x+1+x, 2(x+1)−1? Horner canonical form is a recursive representation of polynomials. The normalised formula is unique and reasonably compact.
  • 17. normalization example first variable second variable The “variables” can be arbitrarily non-algebraic sub-expressions. Thus, formulas containing special functions can also be simplified, and the function isolated.
  • 18. formula simplification Finally we simplify the output of the Horner transformation using laws like 0+z=z and 1×z=z. The maximal function term, say ln E, is isolated (if possible) on one side of an inequality. Formulas are converted to rational functions:
  • 19. choosing the best literal This is the critical one: it is the most difficult! And then this one should be tackled next.
  • 20. Knuth-Bendix ordering Superposition is a refinement of resolution, selecting the largest literals using an ordering. Since ln, exp, ... are complex, we give them high weights. This focuses the search on them. The Knuth-Bendix ordering (KBO) also counts occurrences of variables, so t is more complex than u if it contains more variables.
  • 21. modified KBO Our bounds for f(x) contain multiple occurrences of x, so standard KBO regards the bounds as worse than the functions themselves! Ludwig and Waldmann (2007) propose a modification of KBO that lets us say e.g. “ln(x) is more complex than 100 occurrences of x.” This change greatly improves the is performance for our examples.
  • 22. dividing out products The heuristics presented so far only isolate function occurrences that are additive. If a function is MULTIPLIED by an expression u, then we must divide both sides of the inequality by u. The outcome depends upon the sign of u. In general, u could be positive, negative or zero; its sign does not need to be fixed.
  • 23. |exp(x) 2|x|/(2 + x) ≤ − 1 0.318 −1 < x =⇒ − 1| ≤ exp(|x|)|ln(1 + x)| 4.266 −1 =⇒ |ln(1 + x)| ≤| x) ≤ |ln(1 + x)| 4.266 |x| < 1 < x =⇒ 2|x|/(2 + x|(1 + |x|)/|1 + x| 0.604 0.604 0 < |x| < 1 =⇒ |ln(1 + x)| ≤|1/x 2 + |x|)/|1 + x| x ≤ π/2 =⇒ 1/ sin2 x < x|(1 + 1 − 4/π2 410 0 < x ≤ π/2 =⇒ 1/ sin2 x < 1/x 2 + 1 − 4/π2 410 dividing out example 0 < x < 1/2 =⇒ cos(πx) > 1 − 2x 0 < x < 1/2 =⇒ cos(πx) > 1 − 2x Given a clause of the form deduce the three f (t ) · u ≤ v ∨C f (t ) · u ≤ v ∨C f (t ) ≤ v/u ∨ u ≤ 0 ∨C clauses f (t ) ≤ v/u ∨ u ≤ 0 ∨C 0 ≤ v ∨ u = 0 ∨C 0 ≤ v ∨ u = 0 ∨C f (t ) ≥ v/u ∨ u ≥ 0 ∨C f (t ) ≥ v/u ∨ u ≥ 0 ∨C Numerous problems can only be solved using this form of inference. 2 2
  • 24. notes on the axioms We omit general laws: transitivity is too prolific! The decision procedure, QEPCAD, catches many instances of general laws. We build transitivity into our bounding axioms. We use lgen(R,X,Y) to express both X≤Y (when R=0) and X<Y (when R=1). We identify x<y with ¬(y≤x).
  • 25. some exp lower bounds Covers both < and ≤ cnf(exp_lower_taylor_1,axiom, ( ~ lgen(R,Y,1+X) | lgen(R,Y,exp(X)) )). Transitivity is built in: to show Y<exp(X), show Y<1+X. cnf(exp_lower_bound_cf2,axiom, ( ~ lgen(R, Y, (X^2 + 6*X + 12) / (X^2 - 6*X + 12)) | lgen(R,Y,exp(X)) )).
  • 26. absolute value axioms Simply |X| = X if X≥0 and |X| = −X otherwise. It helps to give abs a high weight, discouraging the introduction of occurrences of abs. cnf(abs_nonnegative,axiom, ( ~ 0 <= X | abs(X) = X )). cnf(abs_negative,axiom, ( 0 <= X | abs(X) = -X )).
  • 27. y x 1 x2 = y(x 2 + 1) a few solved problems x+ 1 x problem |x| < 1 =⇒ |ln(1 + x)| ≤− ln(1 − |x|) |exp(x) − 1| ≤ exp(|x|) − 1 −1 < x =⇒ 2|x|/(2 + x) ≤ |ln(1 + x)| |x| < 1 =⇒ |ln(1 + x)| ≤| x|(1 + |x|)/|1 + x| 0 < x ≤ π/2 =⇒ 1/ sin2 x < 1/x 2 + 1 − 4/π2 < x < 1/2 =⇒ cos(πx) > 1 − 2x seconds 0.153 0.318 4.266 0.604 410
  • 28. hybrid systems Many hybrid systems can be specified by systems of linear differential equations. (The HSOLVER Benchmark Database presents 18 examples.) We can solve these equations using Maple, typically yielding a problem involving the exponential function. MetiTarski can often solve these problems.
  • 29. collision avoidance system 1 differential equations for the velocity, CONVOI acceleration and gap between two vehicles: ˙ v = a, ˙ gap = v f − v ˙ a = −3a − 3(v − v f ) + gap − (v + 10),      solution for v gap (as a function of t):0 the 0 0 1 0  vf   x =  a  gap  0 0 0 0  A=  −4 3 −3 1  −1 1 0 0 For the given set of initial states as   0   B =  −10  0  the MetiTarski can prove that 2  gap is positive!  2   x0 =   −0.5 
  • 30. some limitations No range reduction: proofs about exp(20) or sin(3000) are likely to fail. Not everything can be proved using upper and lower bounds. Adding laws like exp(X+Y) = exp(X)exp(Y) greatly increases the search space. Problems can have only a few variables or QEPCAD will never terminate.
  • 31. example of a limitation We can prove this theorem if we replace 1/2 by 100/201. Approximating π by a fraction loses information.
  • 32. related work? SPASS+T and SPASS(T) combine the SPASS prover with various decision procedures. Ratschan’s RSOLVER solves quantified inequality constraints over the real numbers using constraint programming methods. There are many attempts to add quantification to SMT solvers, which solve propositional assertions involving linear arithmetic, etc.
  • 33. final remarks By combining a resolution prover with a decision procedure, we can solve many hard problems. The system works by deduction and outputs proofs that could be checked independently. A similar architecture would probably perform well using other decision procedures.
  • 34. acknowledgements Assistance from C. W. Brown, A. Cuyt, I. Grant, J. Harrison, J. Hurd, D. Lester, C. Muñoz, U. Waldmann, etc. The research was supported by the Engineering and Physical Sciences Research Council [grant number EP/C013409/1].