Zulip Chat Archive

Stream: general

Topic: calc mode inside `conv`?


Scott Morrison (Jun 26 2020 at 10:51):

It would be really useful to be able to use calc inside a conv block, but this currently fails with unknown declaration 'conv.interactive.refine'.

Anyone either want to do this, or could summarise what would be involved to make this work?

Gabriel Ebner (Jun 26 2020 at 10:55):

Ah, I think this is still fallout from the change where @Johan Commelin modified the tactic-mode calc block so that it uses refine instead of exact.

Gabriel Ebner (Jun 26 2020 at 10:57):

Now that I look at the lean code, it seems like there is no conv.interactive.exact either.

Gabriel Ebner (Jun 26 2020 at 10:58):

I think it should be enough to add a conv.interactive.refine function that takes a proof of an equality and then applies it using transitivity:

example (a b c : ) : a = c :=
by conv {
to_lhs,
-- | a
exact show a = b, from sorry,
-- | b
exact show b = c, from sorry
-- | c
}

Scott Morrison (Jun 26 2020 at 12:19):

Great! I've been missing that anyway.


Last updated: Dec 20 2023 at 11:08 UTC