-
Notifications
You must be signed in to change notification settings - Fork 34
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
Goals with large context #36
Comments
We could have a maximum height on the hypotheses area. I wonder if CSS has a way to say "truncate at top, not at bottom". |
Related: #15 |
maybe giving the possibility to display only the assumptions that have changed would be nice |
Giving options like (all-hyps -hyp1 -hyp2 ... ) or (no-hyps + hyp1 +hyp2 ... ) ? |
I was thinking more on something in the line of this where one displays onl waht has changed. |
Ok, I see!
For my part, I’m working on using Alectryon for writing a pdf document. When commenting the main steps of a long proof,
I often present some sub-goal, then the tactic for solving it. But displaying the full context results in a often hard to read block.
So, I wish to display only the hypotheses which really matter.
… Le 5 août 2021 à 12:12, Laurent Théry ***@***.***> a écrit :
I was thinking more on something in the line of this <https://coq.inria.fr/refman/proofs/writing-proofs/proof-mode.html#showing-differences-between-proof-steps> where one displays onl waht has changed.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#36 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJW6FCR5FEQBZUY2I5MPV2TT3JPZHANCNFSM43DTAZ4Q>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
|
@thery I would love to do this, and it's been on my list for a while. The problem is that Coq doesn't expose enough info right because the tree structure of goals is not exposed (there's no way to know which "parent" goal a new goal came from). This makes it hard to know what to compute diffs against: of course there's the problem of tactics like |
@Casteran I like this idea, even though it's a different use case indeed. I think it's just a matter of improving the annotation mini-language. |
I guess in my context as the context is very large, diff with sibling or ancestor both would do the trick. |
|
@Casteran I've implemented a prototype to allow you to select hypotheses and goals to display. It shares the language introduced for @jhaag in #2. Please see https://github.com/cpitclaudel/alectryon#controlling-output and the following sections. Source: Result: |
Apparently
after |
A short answer for now: The comments in Well after creating that mapping, I learned that the kernel has a data structure with all evars (IIRC both resolved and unresolved), from which it would be even easier to recover these relationships and get the complete family tree of the contexts, then make it available through some API. The data structure Switching to the kernel data structure may not be entirely trivial but shouldn't be that hard.
I think it would show a diff compared to the previous goal for both induction subgoals. Why don't you try it? |
Also, |
And a few more comments above |
Thanks @jfehrle .
I did, and I didn't understand the result; hence the question: It seems it shows diffs only in the first subproof? @thery :
The problem is: what is the "state before" for the second goal of an induction, when it gets focused? Goal forall n: nat, n > 0 -> True.
destruct n.
- ….
- (* Here *) |
not sure the |
That, but also in the screenshot above, where there's no focus |
@cpitclaudel |
Though this gives the same diff result for your example: The change is computed relative to the first previous non-trivial step rather than the parent goal. ( |
Got it, thanks.
Yes, that's precisely the info I was talking about. |
I have goals with very large context. When hovering over tactics.
I mostly see the initial assumptions. Is there a way to activate some scrolling
or at least have the visible part concentrated on the conclusion?
The text was updated successfully, but these errors were encountered: