Zulip Chat Archive

Stream: general

Topic: calc tactic


Mario Carneiro (Jan 02 2019 at 14:37):

I just noticed that calc is an interactive tactic which somehow unfolds to exact calc by magic

example (x : ) : x + 0 = x :=
begin
  calc x + 0 = 0 + x : add_comm _ _
         ... = x : zero_add _
end

Mario Carneiro (Jan 02 2019 at 14:37):

I'm not sure exactly how this works, since tactic.interactive.calc doesn't exist

Mario Carneiro (Jan 02 2019 at 14:42):

yep, it's hardcoded - calc turns into exact calc (https://github.com/leanprover/lean/blob/master/src/frontends/lean/tactic_notation.cpp#L273-L276)


Last updated: Dec 20 2023 at 11:08 UTC