4,178 research outputs found
Formal Proofs for Nonlinear Optimization
We present a formally verified global optimization framework. Given a
semialgebraic or transcendental function and a compact semialgebraic domain
, we use the nonlinear maxplus template approximation algorithm to provide a
certified lower bound of over . This method allows to bound in a modular
way some of the constituents of by suprema of quadratic forms with a well
chosen curvature. Thus, we reduce the initial goal to a hierarchy of
semialgebraic optimization problems, solved by sums of squares relaxations. Our
implementation tool interleaves semialgebraic approximations with sums of
squares witnesses to form certificates. It is interfaced with Coq and thus
benefits from the trusted arithmetic available inside the proof assistant. This
feature is used to produce, from the certificates, both valid underestimators
and lower bounds for each approximated constituent. The application range for
such a tool is widespread; for instance Hales' proof of Kepler's conjecture
yields thousands of multivariate transcendental inequalities. We illustrate the
performance of our formal framework on some of these inequalities as well as on
examples from the global optimization literature.Comment: 24 pages, 2 figures, 3 table
Koka: Programming with Row Polymorphic Effect Types
We propose a programming model where effects are treated in a disciplined
way, and where the potential side-effects of a function are apparent in its
type signature. The type and effect of expressions can also be inferred
automatically, and we describe a polymorphic type inference system based on
Hindley-Milner style inference. A novel feature is that we support polymorphic
effects through row-polymorphism using duplicate labels. Moreover, we show that
our effects are not just syntactic labels but have a deep semantic connection
to the program. For example, if an expression can be typed without an exn
effect, then it will never throw an unhandled exception. Similar to Haskell's
`runST` we show how we can safely encapsulate stateful operations. Through the
state effect, we can also safely combine state with let-polymorphism without
needing either imperative type variables or a syntactic value restriction.
Finally, our system is implemented fully in a new language called Koka and has
been used successfully on various small to medium-sized sample programs ranging
from a Markdown processor to a tier-splitted chat application. You can try out
Koka live at www.rise4fun.com/koka/tutorial.Comment: In Proceedings MSFP 2014, arXiv:1406.153
Reaching for the Star: Tale of a Monad in Coq
Monadic programming is an essential component in the toolbox of functional programmers. For the pure and total programmers, who sometimes navigate the waters of certified programming in type theory, it is the only means to concisely implement the imperative traits of certain algorithms. Monads open up a portal to the imperative world, all that from the comfort of the functional world. The trend towards certified programming within type theory begs the question of reasoning about such programs. Effectful programs being encoded as pure programs in the host type theory, we can readily manipulate these objects through their encoding. In this article, we pursue the idea, popularized by Maillard [Kenji Maillard, 2019], that every monad deserves a dedicated program logic and that, consequently, a proof over a monadic program ought to take place within a Floyd-Hoare logic built for the occasion. We illustrate this vision through a case study on the SimplExpr module of CompCert [Xavier Leroy, 2009], using a separation logic tailored to reason about the freshness of a monadic gensym
Modular pre-processing for automated reasoning in dependent type theory
The power of modern automated theorem provers can be put at the service of
interactive theorem proving. But this requires in particular bridging the
expressivity gap between the logics these provers are respectively based on.
This paper presents the implementation of a modular suite of pre-processing
transformations, which incrementally bring certain formulas expressed in the
Calculus of Inductive Constructions closer to the first-order logic of
Satifiability Modulo Theory solvers. These transformations address issues
related to the axiomatization of inductive types, to polymorphic definitions or
to the different implementations of a same theory signature. This suite is
implemented as a plugin for the Coq proof assistant, and integrated to the
SMTCoq toolchain
Typeful Normalization by Evaluation
We present the first typeful implementation of Normalization by Evaluation for the simply typed lambda-calculus with sums and control operators: we guarantee type preservation and eta-long (modulo commuting conversions), beta-normal forms using only Generalized Algebraic Data Types in a general-purpose programming language, here OCaml; and we account for sums and control operators with Continuation-Passing Style. First, we implement the standard NbE algorithm for the implicational fragment in a typeful way that is correct by construction. We then derive its call-by-value continuation-passing counterpart, that maps a lambda-term with sums and call/cc into a CPS term in normal form, which we express in a typed dedicated syntax. Beyond showcasing the expressive power of GADTs, we emphasize that type inference gives a smooth way to re-derive the encodings of the syntax and typing of normal forms in Continuation-Passing Style
Ramsey's Theorem for Pairs and Colors as a Sub-Classical Principle of Arithmetic
The purpose is to study the strength of Ramsey's Theorem for pairs restricted
to recursive assignments of -many colors, with respect to Intuitionistic
Heyting Arithmetic. We prove that for every natural number , Ramsey's
Theorem for pairs and recursive assignments of colors is equivalent to the
Limited Lesser Principle of Omniscience for formulas over Heyting
Arithmetic. Alternatively, the same theorem over intuitionistic arithmetic is
equivalent to: for every recursively enumerable infinite -ary tree there is
some and some branch with infinitely many children of index .Comment: 17 page
- …