Zulip Chat Archive

Stream: lean4

Topic: Pretty-printing and auto-params


Yury G. Kudryashov (Jun 06 2023 at 20:19):

Hi, here is an #mwe:

import Lean

macro "id_tac" : tactic =>
  `(tactic| (first | exact id))

def f (x : ) (g :    := by id_tac) := g x = x

example (h : f 3) : f 3 (· + 5) := _

Yury G. Kudryashov (Jun 06 2023 at 20:20):

Lean shows both assumption and the goal as f 3

Jeremy Salwen (Jun 06 2023 at 20:34):

You should still be able to see g's value if you hover over the expressions in the lean infoview.

Yury G. Kudryashov (Jun 06 2023 at 21:16):

But why auto_param arguments should be hidden? Arguments with default values aren't hidden.

Mario Carneiro (Jun 06 2023 at 21:39):

I think they are being considered as a kind of implicit argument

Floris van Doorn (Feb 29 2024 at 18:13):

I am often annoyed by this behavior, since clicking around in the infoview is an extra step that has to be performed very often.
I made a Lean issue: lean4#3548. If you agree, please upvote.

Kyle Miller (Feb 29 2024 at 18:20):

I fixed this in lean4#3375, and you can expect it in the next Lean release :smile:

Floris van Doorn (Feb 29 2024 at 18:53):

oh yay! That was quick :tada:

Patrick Massot (Feb 29 2024 at 19:14):

I knew I was missing a trick for efficient Lean dev. It was time travel.


Last updated: May 02 2025 at 03:31 UTC