Zulip Chat Archive

Stream: iris-lean

Topic: Minor UX quibble


Shreyas Srinivas (Jul 17 2025 at 14:36):

Could we get syntax highlighting in the infoview for Iris declarations as well? What would we have to do to get this? Currently we use the delaborator in Iris.Proofmode.Display. Or better yet, something fancier using proofwidgets?

Mario Carneiro (Jul 17 2025 at 15:05):

can you show a screenshot of what you mean? I already get syntax highlighting for a lot of things in the proof mode

Shreyas Srinivas (Jul 17 2025 at 15:05):

Screenshot from 2025-07-17 17-05-48.png

Shreyas Srinivas (Jul 17 2025 at 15:06):

from the example file

Mario Carneiro (Jul 17 2025 at 15:06):

I will note that there is a gap in the capabilities of customizing the goal view, which is why you get this funny double turnstile thing

Mario Carneiro (Jul 17 2025 at 15:07):

I would like to have something like the old begin[iris] mechanism from lean 3, but it's not really possible to do this today. You can have a by_iris which takes iris_tactic syntax but you can't create alternatives to the goal view without losing a lot of functionality

Shreyas Srinivas (Jul 17 2025 at 15:09):

Can't we extend the delaborator to tell it to highlight somethings in a different colour on the infoview?

Mario Carneiro (Jul 17 2025 at 15:10):

in short, this is something that iris-lean does not have the power to fix, you need to bug lean core devs to fix it

Mario Carneiro (Jul 17 2025 at 15:10):

no, highlighting is not under control of delaborators

Mario Carneiro (Jul 17 2025 at 15:10):

cc: @Marc Huisinga

Shreyas Srinivas (Jul 17 2025 at 15:13):

right. then that leaves proofwidgets for now. It might be a severe misuse of proof widgets to show another goal view. But there is some precedent : #general > Display goal as LaTeX in infoview @ đź’¬

Shreyas Srinivas (Jul 17 2025 at 15:14):

More specifically this : #general > Display goal as LaTeX in infoview @ đź’¬

Shreyas Srinivas (Jul 17 2025 at 15:16):

even an HTML display of the iris goal view would be cleaner than what we have, minus some interactive functionality

Mario Carneiro (Jul 17 2025 at 15:26):

a widget goal view is certainly an option, but it shows in addition to the regular goal view, and we have to play catch-up with the features of the regular mode. I would much rather have an approved way to do this

Shreyas Srinivas (Jul 17 2025 at 19:05):

@Marc Huisinga : can we anticipate major changes in the infoview in the coming months?

Shreyas Srinivas (Jul 17 2025 at 19:05):

If not then maybe it is worth it to have a proofwidgets substitute for a while

Michael Sammler (Jul 18 2025 at 02:24):

Please keep in mind that proof widgets do not work in all editors. (In particular, they do not work in Emacs and need to be manually reimplemented in nvim AFAIK.) So there should always be a version of the goal display that does not require proof widgets.

Shreyas Srinivas (Jul 18 2025 at 09:11):

It won’t replace it. It will just augment it until the infoview gets extensibility. Maybe I should have used the word “augment” instead of “substitute”, since proofwidgets can’t affect the goal view either.

Markus de Medeiros (Jul 18 2025 at 12:48):

I like the Iris infoview as it is honestly. It's already less visual clutter than Rocq Iris which I am used to haha.

Markus de Medeiros (Jul 18 2025 at 12:49):

I'm glad we (the royal we, meaning Mario) got rid of those gigantic horizontal lines

Oliver Soeser (Jul 18 2025 at 12:51):

I am very averse to the infoview becoming any more cluttered than it needs to be, but I guess this could be a nice add-on for those who'd benefit from it?

Markus de Medeiros (Jul 18 2025 at 12:54):

One step closer to the Iris video game...

Shreyas Srinivas (Jul 18 2025 at 13:00):

  1. The infoview changes that Mario is proposing would give us the colourful highlighting we get for pure propositions already. We could do better than what we have now.

  2. The latexified version is triggered with a tactic in lean and appears under the infoview. The second link I sent in this chat is a good example of what I have in mind, minus the fancy math rendering.

Oliver Soeser (Jul 18 2025 at 13:03):

Colourful highlighting would be nice yes

Shreyas Srinivas (Jul 18 2025 at 13:04):

That and the ctrl click and (subt)-term highlighting on mouse over

Shreyas Srinivas (Jul 18 2025 at 13:04):

We are essentially just rendering text.

Shreyas Srinivas (Jul 18 2025 at 13:05):

Hovering the mouse over the iris proof view highlights the whole thing. Not the individual subterms. It doesn’t even separate the hypothesis and goal

Shreyas Srinivas (Jul 18 2025 at 13:07):

Ideally we could have all of this appear in the infoview and the iris hypothesis could get highlighted in a custom colour

Mario Carneiro (Jul 18 2025 at 15:23):

just to clarify the changes I would like to see: the iris tactic mode goal state would look exactly like the current one, except that hypotheses would be above the turnstile and treated exactly like regular hypotheses, including the highlighting and the greying out for inaccessible or shadowed hypotheses, but with boxes and stars before them to indicate that they are persistent or spatial hypotheses

Shreyas Srinivas (Jul 18 2025 at 15:25):

For iris users' convenience, I think some visible difference between Iris props and pure declarations/props is still useful to have

Mario Carneiro (Jul 18 2025 at 15:37):

they already have a visible difference, this is the star/box you can see in the screenshot


Last updated: Dec 20 2025 at 21:32 UTC