Skip to content

feat: add cbv simprocs to the language reference - #803

Merged
wkrozowski merged 19 commits into
nightly-testingfrom
wojciech/cbv_simprocs
Mar 25, 2026
Merged

wkrozowski merged 19 commits into
nightly-testingfrom
wojciech/cbv_simprocs

Conversation

@wkrozowski

Copy link
Copy Markdown

This PR adds information about cbv simprocs to the reference manual.

@david-christiansen david-christiansen added the HTML available HTML has been generated for this PR label Mar 12, 2026
@wkrozowski
wkrozowski marked this pull request as ready for review March 13, 2026 13:14
Comment thread Manual/Tactics/Reference.lean Resolved
Comment on lines +954 to +964
```grammar
cbv_simproc ↓
```

```grammar
cbv_simproc ↑
```

```grammar
cbv_simproc cbv_eval
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make these the grammar of the phase specifier, rather than the attribute here? Then they can be hyperlink targets.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like:

:::syntax cbv_simproc_phase (title := "Phase Specifiers for `cbv` Simprocs")
```grammar
cbv_eval
```
text
...
:::

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't know how to make that work when phases are not a separate syntax node, without modifying the lean syntax definitions.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah, if the attr syntax just has three productions, then we don't have a good way to do that.

For simp and grind, the modifications are their own parser, something like

syntax cbvMod := "↑" <|> "↓" <|> "cbv_eval"

syntax "cbv_simproc " cbvMod : attr

but if that's not how it's implemented here, we don't have a good way.

Comment thread Manual/Tactics/Reference.lean Resolved
Comment thread Manual/Tactics/Reference.lean Resolved
Comment thread Manual/Tactics/Reference.lean Resolved
Comment thread Manual/Tactics/Reference.lean Resolved
Comment thread Manual/Tactics/Reference.lean Resolved
Comment thread Manual/Tactics/Reference.lean Resolved
@wkrozowski

Copy link
Copy Markdown
Author

@david-christiansen I have resolved your round of comments - is there anything I should keep an eye on or is it okay to merge?

@david-christiansen

Copy link
Copy Markdown
Collaborator

I took the liberty of adding hyperlinks to the reduction types in the text.

Once CI goes through, it's good to go. Thank you!

@github-actions

Copy link
Copy Markdown
Contributor

Preview for this PR is ready! 🎉 (also as a proofreading version). built with commit ed5aff3.

@wkrozowski
wkrozowski merged commit 865f7a2 into nightly-testing Mar 25, 2026
10 checks passed
@wkrozowski
wkrozowski deleted the wojciech/cbv_simprocs branch March 25, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTML available HTML has been generated for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants