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


Last updated: Dec 20 2023 at 11:08 UTC