Zulip Chat Archive

Stream: lean4

Topic: How to prove ∀ {x : α}, p x without introducing x


Chris Hughes (Dec 09 2022 at 12:55):

What's the nicest way to prove ∀ {x : α}, p x when I don't want to start the proof by introducing x. In my particular use case (here) the elaborator doesn't like the method @fun x => old_proof x so I resorted to the following which is very ugly

have  (x : α), p x := old_proof
this _

Kevin Buzzard (Dec 09 2022 at 12:57):

Does @old_proof work?

Ruben Van de Velde (Dec 09 2022 at 12:57):

fun {x} => ...?

Kevin Buzzard (Dec 09 2022 at 12:58):

example (p : α  Prop) (h :  (x : α), p x) :  {x : α}, p x := @h

Sebastian Ullrich (Dec 09 2022 at 13:02):

Can GCD.induction not be used with induction using? Then I would just move the variables to the left of the colon (or use auto-implicits) and have induction handle the reverts.

Chris Hughes (Dec 09 2022 at 18:08):

I can't figure out how to give the induction hypothesis a name when I use induction using

Sebastian Ullrich (Dec 09 2022 at 18:09):

It should just be an additional parameter in the "pattern". It behaves basically like case.


Last updated: Dec 20 2023 at 11:08 UTC