On Thu, 14 Jul 2016 09:44:54 -0400, Mario Carneiro <di....@gmail.com> wrote:
> Hi All,
>
> I'd like to open up discussion on the direction of the proof assistant
> SMM3, a.k.a smetamath-rs (https://github.com/sorear/smetamath-rs). It is
> nearly feature complete in other areas (and it has already delivered
> unprecedented verification times for set.mm), but the proof assistant is
> still a big question mark.
>
> The program is designed to work as a back end, so text editing facilities
> can be provided through integration with an existing IDE. Beyond that, how
> should proof input look? ...
I need to spend more time to grok this.
However, there are real advantages to mmj2's current "control-U" behavior.
I've used proof script tools (PVS, Coq, etc.), and they are often
too inflexible about the order of expressions that you have to prove.
In contrast, I find mmj2's approach very freeing.
Once I load the qed, I often first
load up expressions that I expect that I *might* need
(e.g., some definitions) - without knowing exactly how
or when I'll need them.
I also typically do "forward reasoning" by starting at a step,
make a small change, and then see if the tool can find a match
with an existing rule. Given 18K proofs, I can't memorize them all,
so I find it's faster to simply enter a small next step (as a tweaked expression)
and let the *tool* find the step. The current mmj2 behavior is awesome
since in many cases I know what the next step's expression (reasoning forward)
will be, I just don't remember what the rule is.
Indeed, I'd like the ability to do this going backwards: I know that expression X
should be preceded by expression Y - can it list what rules would cause that?
If the *only* way to input things is a proof script, I worry that you'll
lose the ability to start & move in all sorts of ways.
That flexibility is very helpful.
Having the *ability* to support proof scripts is very useful. However, it
should support *much* more than just direct invocations of a given theorem.
All proof script systems I'm aware of have a large library of automated reasoning
functions, each of which apply some different approach to attempt to
find the proof. Proof scripts are especially useful if what you're proving changes
(this is important for proving programs).
It seems to me you could support both.
Indeed, I'd like the ability to do this going backwards: I know that expression X
should be preceded by expression Y - can it list what rules would cause that?
If the *only* way to input things is a proof script, I worry that you'll
lose the ability to start & move in all sorts of ways.
That flexibility is very helpful.
Having the *ability* to support proof scripts is very useful. However, it
should support *much* more than just direct invocations of a given theorem.
All proof script systems I'm aware of have a large library of automated reasoning
functions, each of which apply some different approach to attempt to
find the proof. Proof scripts are especially useful if what you're proving changes
(this is important for proving programs).
Perhaps more importantly, you may want to focus on creating a nice library
that's easy to invoke to do various jobs. Then you can build all sorts of things
on top.
In the longer term I think that you want a neural network - I think
a neural network could be trained to do a *lot* of automation.
If you want mostly-Lisp syntax, you could also support neoteric expressions, where
"term(...)" without a space before "(" is just an abbreviation for "(term ...)".
This enables the more conventional-looking things like
ax-mp(Whatever1 Whatever2)
> because df-3an does not take an argument. With type ascriptions:
>
> sylbi |- ( ( ph /\ ps /\ ch ) -> th )
> df-3an |- ( ( ph /\ ps /\ ch ) <-> ( ( ph /\ ps ) /\ ch ) )
> (imp31 |- ( ( $ /\ ch ) -> th )
> .1 |- ( ph -> ( ps -> $ ) ) )
That nesting looks complicated.
> sylbi df-3an $
>
> is a valid but incomplete proof. A dollar suffix can be used after a
> theorem to mark all of its 0 or more hypotheses as incomplete.
It seems to me that there's no need to include "$" at the end.
If you ask for something, then its preconditions should just show up in the
set of incomplete items. That way, instead of endless nesting, you can
nest if you wish, but otherwise stop after some point and jump around.
I find it important to jump around; a command to say "jump to this hypothesis"
would seem useful to me.
> For extra automation, there are two mechanisms. First, if the program can
> guess the proof at a hole, it will do so silently, marking the dollar with
> an info underline as in the case of holes in the expression. Second, for
> more directed hints we have named macros (TBD) which are marked with a
> leading !. For example,
>
> $p 1kp2ke3k
> !arith
>
> might run the arithmetic prover and either complete the proof, or else the
> macro would be marked with an error and would report the problem, and the
> desired goal.
Sometimes you want to speculatively run something and see the results;
other times you want to keep the results "only if it resolved things".
On Sat, 16 Jul 2016 22:05:47 -0400, Mario Carneiro <di....@gmail.com> wrote:
> However, I don't want it to have the problems that .mm file format has with
> needing to be linearly parsed in order to understand the proof. One part of
> that is macro handling: earlier I said that !rec would act like a
> hypothetical theorem with two hypotheses, but since you don't know how many
> results will remain unproven this means that parsing requires running the
> macro, which I don't want. So instead, macros are always assumed to have
> zero arguments, except if you write !macro$ (which allows any number of
> arguments but puts holes in each of them) or (!macro arg1 arg2),
> parentheses required (which enumerates and fills the arguments as given).
I worry that *requiring* that every hypothesis be included as a parameter
may require so much nesting that it's hard to understand.
I think it'd be useful to prove *some* things, and return with an
environment (with the default "current" expression at the last incomplete part).
You could then start from there.
E.G., you could do this:
ax-mp (prove minor premise) (prove major premise)
*or* this:
ax-mp $ $
(prove major premise)
(prove minor premise)