Remove all ProofScript sequent features - #3284
Conversation
|
I really don't think this is the right way to go. For example, how do you plan to reimplement goal_cut? |
|
We can implement |
|
Here is my plan for what operations we should implement to make a suitable replacement for the sequent-based tactics:
For convenience, we should reimplement a couple of commands for which I've removed the sequent versions:
Note that giving users a
Then we could make |
|
This seems like it would do a lot to make our manual proof system a lot more useable. |
|
I don't really think that keeping multiple goals and local hypotheses, but deleting all the infrastructure for managing them, is the best way forward. I think the usability of the proof system is better served by having a functioning sequent calculus implementation. Admittedly, that's going to take some work... |
|
It seems like the proposed alternative replaces the functionality of the removed code with more general tooling. The previous sequent stuff was pretty challenging to use for anything. The times I tried using it I would find a bug that needed to be fixed before I could do what I needed. I don't think anyone's actually using it in anger. |
* `split_goal` * `print_focus` * `unfocus` * `focus_concl` * `focus_hyp` * `delete_hyps` * `retain_hyps` * `delete_concl` * `goal_cut` * `normalize_sequent` * `goal_intro_hyp` * `goal_intro_hyps` * `goal_revert_hyp` * `goal_insert` * `goal_insert_and_specialize` * `goal_apply_hyp` * `simplify_local`
* `SplitEvidence` * `ApplyHypEvidence` * `CutEvidence` * `StructuralEvidence` * `AxiomEvidence`
Now a `Sequent` is just a single `Prop`.
The existing primitive `core_thm s` is now equivalent to `term_thm (parse_core s)`.
apply_thm : Theorem -> [Theorem] -> Theorem Apply a theorem of the form `P1 -> P2 -> ... Pn -> Q` to list of theorems `P1`, `P2` ... `Pn` to yield a theorem `Q`.
Run the given proof script as a subproof starting from a state where only the first subgoal is visible. The inner proof script must discharge its goal, leaving no remaining subgoals; otherwise the proof fails.
3951a86 to
2f1bf3d
Compare
This PR completely removes all SAWScript primitives and code that implements "sequents" in the SAW
ProofScriptmonad. The following SAW primitives are removed:split_goalprint_focusunfocusfocus_conclfocus_hypdelete_hypsretain_hypsdelete_conclgoal_cutnormalize_sequentgoal_intro_hypgoal_intro_hypsgoal_revert_hypgoal_insertgoal_insert_and_specializegoal_apply_hypsimplify_localenable_sequent_goalsdisable_sequent_goalsThe reason for doing this is to remove unnecessary complexity (see #3281), both from the SAW user interface and from the implementation. Over 1000 lines of trusted code are removed from
SAWCentral/Proof.hs.We should be able to emulate all the removed functionality with use of
goal_apply, a few new SAWCore theorems, and just a couple of new SAW primitives. I'll keep this PR in draft state until those new primitives are implemented.This PR builds on #3279.