Zulip Chat Archive
Stream: new members
Topic: How to apply `whnf ` to hypotheses in a tactic?
Zihao Zhang (May 01 2025 at 10:01):
How to correct the line that has been commented out?
import Mathlib
open Lean Elab IO Meta Tactic
elab "my_tool" :tactic => do
let g ← getMainGoal
let g_lctx ← getLCtx
for ldecl in g_lctx do
--evalTactic (← `(tactic| whnf at $(ldecl)))
evalTactic (← `(tactic| whnf))
Last updated: May 02 2025 at 03:31 UTC