Experimental proof assistant (and architecture) for dependent linear logic
Haskell
57
93 commits
updated May 5, 2022
A fresh interactive theorem prover
(Also home of the unfix-binders library for a while)
I wrote this README before being distracted by another project. When I came back to this, I had a completely different idea of what I wanted to do. Namely a more innovative theorem prover with a less innovative architecture.
I don't really know what I'm getting at yet, so I'm not rewriting the README for the time being. But whatever is below is likely to be out of date.
You can follow the development of these idea on twitch.tv/notnotarnaud, where I livecode roughly fortnightly. You can also catch up on previous streams on my Youtube channel, which I update irregularly.
The world certainly doesn't need another proof assistant. There are plenty great ones out there for all your computer-checked proving needs (such as Coq, Isabelle, Agda, or Lean, to name a few). To be perfectly blunt: I simply needed a side project, and I happen to like writing and designing proof assistants.
I've been thinking of dependently typed linear logic for a while. My interest was greatly revived by Michael Schulman's remarkable analysis of the connection between linear logic and the constructive mathematics praxis.
I favour dependent type theory over more traditional logics, such as HOL, mainly for one reason: I like to abstract all the things, and dependent type theory offers a framework to do just that.
The language basically follows my ideas on dependent linear types, though McBride's (pdf) and Atkey's (pdf) more recent work on so-called quantitative type theory greatly improve the theory. I'm following the style of Linear Haskell rather than that of quantitative type theory because I believe it to work better. However, it seems to me that values (of positive type) should maybe have a forward analysis in the style of quantified type theory, rather than the backward analysis that computations (of negative types) seem to require.
Putting these preliminary thoughts together, Peppermint
Clearly the design is not particularly justified, mostly it's what I want to do, rather than what needs to be done. So be it.
Some non-logic considerations:
t (I
believe Idris has something like this, too)As a general consideration, I don't have an enormous amount of time to dedicate to this project, so I favour everything that can gain me some time. I intend this project to be innovative and exploratory only on the narrow set of aspects such as the logic and, to some degree, the logic's implementation.
For the rest, I will prefer off-the-shelf components. I'll also try to use bidirectional parser/pretty-printer rather than give myself a lot of flexibility on either end. I also favour types and structure over efficiency. Incidentally, it's also why this program is written in the Haskell programming language: while for a more large-scale effort I would probably prefer Ocaml, Haskell is unique in the short-cuts it offers, and will more realistically get Peppermint off the ground.
To sketch a more detailed design of the implementation, Peppermint is implemented as various layers, each concerned with extending the logic with extra stuff. At this early stage, I don't have yet a precise run down of the specific layers that Peppermint will have (or the API of Peppermint-the-library). But, here are some example of layers:
A layer can add elements which are recursive with previous layer elements (e.g. adding let-binders to a layer that only understands lambdas), because they are defined by open recursion (that is, recursive types are defined as the least fixed point of a functor which is materialised, and functions which would normally recurse over that type are defined as algebra of the structure functor).
I intend the peppermint executable to give access to several (but probably not all) of the layers.
As a last note: it is not the intention that the proofs always be verified by the lowest layer. This is a point on which the design differs radically than that of Coq. In particular, proofs interactively elaborated, by tactics, as terms with existential variables are not rechecked in a notional kernel at "qed" time. I am, however, considering giving the possibility of translating developments from a layer to lower layers, for the sake of heightened confidence (it is not, however, necessary, that all features which are not in the lowest layer can be eliminated).
93 commits
Haskell
99.6%
Experimental proof assistant (and architecture) for dependent linear logic
Haskell
57
93 commits
updated May 5, 2022
A fresh interactive theorem prover
(Also home of the unfix-binders library for a while)
I wrote this README before being distracted by another project. When I came back to this, I had a completely different idea of what I wanted to do. Namely a more innovative theorem prover with a less innovative architecture.
I don't really know what I'm getting at yet, so I'm not rewriting the README for the time being. But whatever is below is likely to be out of date.
You can follow the development of these idea on twitch.tv/notnotarnaud, where I livecode roughly fortnightly. You can also catch up on previous streams on my Youtube channel, which I update irregularly.
The world certainly doesn't need another proof assistant. There are plenty great ones out there for all your computer-checked proving needs (such as Coq, Isabelle, Agda, or Lean, to name a few). To be perfectly blunt: I simply needed a side project, and I happen to like writing and designing proof assistants.
I've been thinking of dependently typed linear logic for a while. My interest was greatly revived by Michael Schulman's remarkable analysis of the connection between linear logic and the constructive mathematics praxis.
I favour dependent type theory over more traditional logics, such as HOL, mainly for one reason: I like to abstract all the things, and dependent type theory offers a framework to do just that.
The language basically follows my ideas on dependent linear types, though McBride's (pdf) and Atkey's (pdf) more recent work on so-called quantitative type theory greatly improve the theory. I'm following the style of Linear Haskell rather than that of quantitative type theory because I believe it to work better. However, it seems to me that values (of positive type) should maybe have a forward analysis in the style of quantified type theory, rather than the backward analysis that computations (of negative types) seem to require.
Putting these preliminary thoughts together, Peppermint
Clearly the design is not particularly justified, mostly it's what I want to do, rather than what needs to be done. So be it.
Some non-logic considerations:
t (I
believe Idris has something like this, too)As a general consideration, I don't have an enormous amount of time to dedicate to this project, so I favour everything that can gain me some time. I intend this project to be innovative and exploratory only on the narrow set of aspects such as the logic and, to some degree, the logic's implementation.
For the rest, I will prefer off-the-shelf components. I'll also try to use bidirectional parser/pretty-printer rather than give myself a lot of flexibility on either end. I also favour types and structure over efficiency. Incidentally, it's also why this program is written in the Haskell programming language: while for a more large-scale effort I would probably prefer Ocaml, Haskell is unique in the short-cuts it offers, and will more realistically get Peppermint off the ground.
To sketch a more detailed design of the implementation, Peppermint is implemented as various layers, each concerned with extending the logic with extra stuff. At this early stage, I don't have yet a precise run down of the specific layers that Peppermint will have (or the API of Peppermint-the-library). But, here are some example of layers:
A layer can add elements which are recursive with previous layer elements (e.g. adding let-binders to a layer that only understands lambdas), because they are defined by open recursion (that is, recursive types are defined as the least fixed point of a functor which is materialised, and functions which would normally recurse over that type are defined as algebra of the structure functor).
I intend the peppermint executable to give access to several (but probably not all) of the layers.
As a last note: it is not the intention that the proofs always be verified by the lowest layer. This is a point on which the design differs radically than that of Coq. In particular, proofs interactively elaborated, by tactics, as terms with existential variables are not rechecked in a notional kernel at "qed" time. I am, however, considering giving the possibility of translating developments from a layer to lower layers, for the sake of heightened confidence (it is not, however, necessary, that all features which are not in the lowest layer can be eliminated).
93 commits
Haskell
99.6%