(Original author: marnix)
There is nothing new here in essence, but the new form might be interesting to some of you.
Let me start with a big thank you to norm and raph. I'm just fiddling a bit with the great things they've done.
This page describes an experiment in designing a core proof language that is essentially the same as that of Ghilbert (and by extension, very similar to that of Metamath).
However, it only offers a proof language.
It therefore removes four aspects from Ghilbert that are necessary for usefulness in practice, but not necessary for the theory: "typing", i.e. kinds and terms; "naming" statements, theorems, and hypotheses; module structure; and verification (including definitions). All these can be layered on top of this simple proof description language.
I consider the sparsity of this language a feature. In my mind, this language comes even closer than Metamath and Ghilbert to the dream of an 'assembly language' for proofs, which can be used to do 'distributed mathematics'. See also How to Check Proofs.
Before I continue, let me point to a work-in-progress at HghCore.xhtml, which attempts to implement the below description. (Note that the .lhs source is executable working code. Well, at least I've written a couple of test cases. Check out the entire Hmm darcs repository if you like.)
(No, no fancy name yet.)
The basis of the language is formed by Ghilbert expressions. In Haskell notation:
data Expression = Var VarName | App ConstName [Expression]
The square brackets here indicate a list of zero or more expressions. (I'm not going to bother with a concrete representation here, but note that these expressions are trivially encoded as LISP S-expressions. This is an abstract language, at least for now.)
A Ghilbert axiom or theorem (stmt or thm) is basically an inference rule:
data InferenceRule = InferenceRule {
disjointVariableRestrictions :: [(VarName, VarName)],
hypotheses :: [Expression],
conclusion :: Expression
}Such a rule says: if we know all hypotheses to be true, we also know the conclusion to be true. This holds for each consistent substitution of variables by expressions, as long as the 'disjoint variable restrictions' are obeyed. (For brevity, I will ignore these restrictions in the rest of this description.)
As an example, one simple inference rule is
for all P, Q, and R (without restriction),
if Q <-> R holds, then (P \/ Q) <-> (P \/ R) holdsor in a picture:
Q <-> R ----------------------- (P \/ Q) <-> (P \/ R)
Nothing new so far: all this is standard Ghilbert (and Metamath) stuff. As is what follows.
Now for the definition of a proof: basically it is a description how inference rules can be 'clicked together' to form a new inference rule. Or put differently, it is a 'program' built out of inference rules that can be executed, and results in a new inference rule.
Or even simpler, a proof describes how a theorem follows from other theorems. (Now, that makes it sound trivial, doesn't it? That's intentional :-) The structure of a proof is as follows:
data Proof =
Hypothesis Expression
| ApplyRule [Proof] [Expression] InferenceRuleLet me explain this by example. Here is a possible proof:
ApplyRule
[Hypothesis {-. F \/ G}
,ApplyRule
[Hypothesis {G <-> H}]
[{-. F}]
" Q <-> R
-----------------------
(P \/ Q) <-> (P \/ R) "
]
[]
" P P <-> Q
---------------
Q " (Notational conveniences: I've used {…} and infix notiation for expressions, and "…picture…" for inference rules.) For the initiated: the above proof format is essentially the same as the Ghilbert proof format. The only things I did was make the proof tree structure explicit, and "inline" the inference rules and hypotheses instead of referring to them by name.
This proof can also be visualized in the following inference tree:
G <-> H
----------------------------- (with P := -. F)
-. F \/ G (-. F \/ G) <-> (-. F \/ H)
--------------------------------------------------------------
-. F \/ HFrom this picture it is easy to see what inference rule this proof proves:
-. F \/ G G <-> H
------------------------
-. F \/ Hor in words,
for all F, G, and H,
if both -. F \/ G and G <-> H hold, then -. F \/ H holdsActually, we haven't proven this inference rule, but rather that it follows from the two other inference rules. That is important. A proof determines a relationship between inference rules: it establishes that an inference rule can be derived from one or more others.
In other words, a collection of proofs leads to a 'web' of inference rules (theorems) that follow from each other.
Of course there are a number of restrictions for a valid Proof, and in particular for a valid ApplyRule: the most important being that there is one sub-proof for each hypothesis of the inference rule that is applied. Validating this correctness is the task of the proof 'interpreter'.
All I've done above, is to cut the proof language out of Ghilbert, and make it into a stand-alone language.
What do I want with this? My vision is to have a web-based database of proofs that anyone can contribute to. These would be proofs in the above language. The website can then show all proofs, just like the Metamath site does. It can show all theorems (inference rules), and visualize how the proofs connect the theorems together. And it can add features like naming, and 'modules' of related theorems (e.g., the collection of all axioms for the real numbers).
(It would also be nice to have something to convert different formalizations of essentially the same mathematical theory, just like IMPS' 'little theories'. But that's further into the future for me.)
The nice thing about all this, is that we can have a database containing just proofs. No names for theorems, no modularity, no decisions about is-this-an-axiom-or-a-definition-or-a-theorem. Plain and simple and verifiable proofs.
Enough writing for now. Let me know what you think.
Hi, I share your interest in providing math-like activities in a collaborative environment, but I am not sure if I understand the benefits and advantages of your specific proposal over, say, Ghilbert or Metamath.
You say "The only things I did was make the proof tree structure explicit, and "inline" the inference rules and hypotheses instead of referring to them by name."
Are you proposing to use total redundancy throughout your database?
How does your system provide "Plain and simple and verifiable proofs."? It has not been my experience that real world proofs are simple or plain, simply due to their length and the complexity of the formulas involved.
Also, have you swept the "metaphysical dirt" under a rug if your database consists of nothing but the structures you have provided here? What do the ASCII symbols mean? Where are the grammar and notation for your examples?
I look forward to your continued greatness and leadership in achievement, so please do not take my questions as a negative inference. The work is important enough to discuss, that's all.
--ocat 16-Jun-2006
If I understand this, marnix, you are trying to achieve complete modularity by making the proof independent of axioms and definitions. And to do this, rather than refer to an earlier theorem by name (which in turn has its own proof naming even earlier theorems and eventually axioms), you simply state the hypotheses+assertion made by the earlier theorem in place of its name.
(While, as ocat suggests, it will eventually be important to pin down the exact grammar, etc., right now I just want to make sure I understand the overall concept. So no details of syntax or grammar are implied in my discussion.)
Let's take a typical proof, say Cantor's theorem canth which has one hypothesis canth.1:
canth.1: A e. V => canth: -. F : A -onto-> P~ A
There are 28 non-syntax theorems referenced in its proof: forn fof id fveq2 eleq12d negbid elrab baibr nbbn eleq2 con3i sylbi syl rgen ffn fvelrn biimpd con3d ralnex syl5ib mpi ssrab rabex elpw mpbir mpbiri 3syl pm2.65i
A couple of them are:
forn: ( F : A -onto-> B -> ran F = B ) pm2.65i: ( ph -> ps ) & ( ph -> -. ps ) => -. ph
So if I understand you correctly, basically, instead of "forn" you would say "( F : A -onto→ B → ran F = B )", which in effect becomes a kind of hypothesis for the canth theorem. This would be different from the "real" hypothesis canth.1. For example, pm2.65i has its own hypotheses, which then become "hypotheses of hypotheses" so to speak. But I think what you are saying is that forn, pm2.65i, etc. are actually "local axioms" from which the proof is derived, and they are essentially different from the ordinary hypotheses (canth.1 in this case) of the theorem under proof.
I think you propose to indicate the substitution instances into these "local" axioms used for each proof step, although in principle that is automatically computable using the Metamath Solitaire's condensed-detachment-with-$d-checking algorithm.
To translate back to a Ghilbert/Metamath database, you'd match the math symbol strings of previous statements in the database to these "local axioms". If the development was complete, you'd be able to eliminate all "local axioms" and end up referencing only earlier theorems or actual axioms (Infinity, Choice, etc.). If the development is incomplete, no harm done: you would just have to add the unproved "local axioms" to some pool of temporary artificial axioms needed to satisfy Ghilbert/Metamath. That pool would also provide the nitpicking formalizers of the world with a to-do list of things that eventually have to be proved from the real axioms.
But all along, your new language/database doesn't care about any of this. People can work on proofs of even advanced theorems independently, without having to develop all the background theory from ZF axioms before they can even get started. That sounds quite promising!
Of course, we couldn't say with certainly whether or not Choice was used until all the "local axioms" are eliminated. And until they are eliminated we can't even be sure they are consistent. But the elimination can be done independently, and it might not even concern a confident and competent mathematician, who is content to let the formalizers of the world worry about such details. We get much closer to the way that math is ordinarily done by mathematicians, but in a way that can ultimately be made fully rigorous by the formalizers.
It would be interesting to see what "local axioms" a typical mathematician would pick. For example, in canth, I doubt that the 28 referenced subtheorems would be picked to result in a 32-step proof. Instead, the mathematician would basically write down - or more likely generate with the assistance of a software tool - perhaps a half-dozen steps that he/she "sees" as the formal proof, corresponding roughly to the higher-level layers of the canth proof, and those would become the "local axioms". More work for the formalization people, but much more efficient for the mathematician.
Do I envision this correctly?
--norm 16-Jun-2006
Per Ray at How to Check Proofs, this issue seems somehow meta-linguistic. So, one proof language should be easy to translate to others.
--jcorneli
Can you clarify what you mean here? What do you mean with "this issue"? The idea of this 'core' language is that it is 'basic' enough so that higher-level languages can be translated to this language; and perhaps (e.g., with annotations) the core language can be translated back to higher-level languages.
--marnix 17-Jun-2006
This issue of devising a core proof language, of course. My point is fairly trivial, but it is that there could be many different languages that would satisfy the property of being a core language with the properties you want your core language to have. So, I'm not talking about translating between your core language and higher-level languages, but between your core language and other languages "at the same level".
--jcorneli