Zulip Chat Archive

Stream: lean4

Topic: Change type of variable in local context with equivalence


Alex Keizer (Jul 03 2023 at 14:55):

Suppose I have two equivalent types Foo and Bar, is there some way to change a goal

foo x y

Where x y : Foo into:

foo (Foo.ofBar x') (Foo.ofBar y')

Where x' y' : Bar?

Kevin Buzzard (Jul 03 2023 at 15:25):

If they're equivalent then you can set x' = Bar.ofFoo x and then invoke the fact that Foo.ofBar (Bar.ofFoo x) = x.

Alex Keizer (Jul 03 2023 at 15:53):

That works, thanks!


Last updated: Dec 20 2023 at 11:08 UTC