Skip to content

Commit 6356769

Browse files
feat: list mvcgen and stateful proof mode tactics in tactic reference (#566)
This PR lists `mvcgen` and the stateful proof mode tactics in tactic reference. --------- Co-authored-by: David Thrane Christiansen <[email protected]>
1 parent eaa3fd1 commit 6356769

File tree

7 files changed

+117
-15
lines changed

7 files changed

+117
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/.lake
2+
/.direnv
23
/_out/
34
.DS_Store
45
figures/lake.trace

Manual/Meta/ErrorExplanation.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import Lean.ErrorExplanations
1313
import PreprocessedExplanations
1414

1515
open Lean Elab
16-
open Verso.ArgParse
16+
open Verso (ArgParse)
17+
open Verso.ArgParse (parseThe)
1718
open Verso.Doc Elab
1819
open Verso.Genre.Manual Markdown InlineLean
1920
open SubVerso.Highlighting

Manual/Meta/LexedText.lean

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,12 @@ def Inline.c (value : LexedText) : Inline where
134134

135135
def lexedText := ()
136136

137-
@[code_block_expander c]
138-
def c : CodeBlockExpander
139-
| args, str => do
140-
ArgParse.done.run args
137+
@[code_block]
138+
def c : CodeBlockExpanderOf Unit
139+
| (), str => do
141140
let codeStr := str.getString
142141
let toks ← LexedText.highlight hlC codeStr
143-
pure #[← ``(Block.other (Block.c $(quote toks)) #[Block.code $(quote codeStr)])]
142+
``(Block.other (Block.c $(quote toks)) #[Block.code $(quote codeStr)])
144143

145144
open Verso.Output Html in
146145
open Verso.Doc.Html in
@@ -166,14 +165,13 @@ def c.idescr : InlineDescr where
166165
pure {{<code class="c">{{v.toHtml}}</code>}}
167166
extraCss := [c.css]
168167

169-
@[role_expander c]
170-
def cInline : RoleExpander
171-
| args, contents => do
172-
ArgParse.done.run args
168+
@[role c]
169+
def cInline : RoleExpanderOf Unit
170+
| (), contents => do
173171
let #[x] := contents
174172
| throwError "Expected exactly one parameter"
175173
let `(inline|code($str)) := x
176174
| throwError "Expected exactly one code item"
177175
let codeStr := str.getString
178176
let toks ← LexedText.highlight hlC codeStr
179-
pure #[← ``(Inline.other (Inline.c $(quote toks)) #[Inline.code $(quote codeStr)])]
177+
``(Inline.other (Inline.c $(quote toks)) #[Inline.code $(quote codeStr)])

Manual/Tactics/Reference.lean

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,3 +660,104 @@ tag := "tactic-ref-other"
660660

661661
:::tactic Lean.Parser.Tactic.runTac
662662
:::
663+
664+
# Verification Condition Generation
665+
%%%
666+
tag := "tactic-ref-mvcgen"
667+
%%%
668+
669+
:::tactic "mvcgen"
670+
:::
671+
672+
## Tactics for Stateful Goals in `Std.Do.SPred`
673+
%%%
674+
tag := "tactic-ref-spred"
675+
%%%
676+
677+
### Starting and Stopping the Proof Mode
678+
679+
:::tactic "mstart"
680+
:::
681+
682+
:::tactic "mstop"
683+
:::
684+
685+
:::TODO
686+
Next release:
687+
```
688+
:::tactic "mleave"
689+
:::
690+
```
691+
:::
692+
693+
### Proving a Stateful Goal
694+
695+
:::tactic "mspec"
696+
:::
697+
698+
:::tactic "mintro"
699+
:::
700+
701+
:::tactic "mexact"
702+
:::
703+
704+
:::tactic "massumption"
705+
:::
706+
707+
:::tactic "mrefine"
708+
:::
709+
710+
:::tactic "mconstructor"
711+
:::
712+
713+
:::tactic "mleft"
714+
:::
715+
716+
:::tactic "mright"
717+
:::
718+
719+
:::tactic "mexists"
720+
:::
721+
722+
:::tactic "mpure_intro"
723+
:::
724+
725+
:::tactic "mexfalso"
726+
:::
727+
728+
### Manipulating Stateful Hypotheses
729+
730+
:::tactic "mclear"
731+
:::
732+
733+
:::tactic "mdup"
734+
:::
735+
736+
:::tactic "mhave"
737+
:::
738+
739+
:::tactic "mreplace"
740+
:::
741+
742+
:::tactic "mspecialize"
743+
:::
744+
745+
:::tactic "mspecialize_pure"
746+
:::
747+
748+
:::tactic "mcases"
749+
:::
750+
751+
:::TODO
752+
Next release:
753+
```
754+
:::tactic "mrename_i"
755+
:::
756+
```
757+
:::
758+
759+
:::tactic "mpure"
760+
:::
761+
762+
:::tactic "mframe"
763+
:::

flake.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
{ devShell.${system} = pkgs.stdenv.mkDerivation rec {
99
name = "env";
1010
buildInputs = with pkgs; [
11-
elan
11+
#elan # Should be installed manually
1212
python3
13+
poppler_utils
1314
];
1415
};};
1516
}

lake-manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"type": "git",
66
"subDir": null,
77
"scope": "",
8-
"rev": "77828b7a94f9406083bcbb1551ce9b81bac7e4ec",
8+
"rev": "78002a2a5c6012e2aee9e680b646dddbaa0a900d",
99
"name": "verso",
1010
"manifestFile": "lake-manifest.json",
11-
"inputRev": "v4.23.0-rc2",
11+
"inputRev": "main",
1212
"inherited": false,
1313
"configFile": "lakefile.lean"},
1414
{"url": "https://github.com/acmepjz/md4lean",

lakefile.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Lake
88
open Lake DSL
99
open System (FilePath)
1010

11-
require verso from git "https://github.com/leanprover/verso.git"@"v4.23.0-rc2"
11+
require verso from git "https://github.com/leanprover/verso.git"@"main"
1212

1313
package "verso-manual" where
1414
-- building the C code cost much more than the optimizations save

0 commit comments

Comments
 (0)