Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reprint / Re-state Theorems #26

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jsimonrichard
Copy link

@jsimonrichard jsimonrichard commented Apr 23, 2024

This is a simple answer to the discussion in #8.

Although it doesn't support conjunctive normal form, it integrates with the existing label system and can print multiple theorems that share a label.

Let me know what you think.

@sahasatvik
Copy link
Owner

sahasatvik commented Apr 23, 2024

I really like this setup! I've already implemented something in the v2.0.0 branch, and the result looks like this (output). It doesn't use labels like your solution though, which I would love to add.

v2.0.0 is a fairly big overhaul; you can check out the code here. I have also tried to use tidy to write a function reference: do let me know if things make sense there!

My solution stores every theorem in a big array (as a state), then retrieves them as necessary usingthm-restate or thm-display (after filtering). This is probably a little expensive, but it gives a lot of flexibility (like the list of theorems in this example). This is also geared more towards bulk restatement/display.

I'd like to integrate your solution into the restate/display setup, maybe something like thm-display(<thm>) fetches things with the label <thm>? That way, a <label> behaves like a special 'filter' function.


I also like the safeguard on thm-counters, I guess that prevents weird behaviour when nesting theorems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants