Zulip Chat Archive

Stream: general

Topic: applyI


view this post on Zulip Reid Barton (Sep 07 2018 at 08:02):

Is there a variant on apply or refine which turns [...] arguments which couldn't be solved into new goals?

view this post on Zulip Simon Hudon (Sep 07 2018 at 08:03):

What are [...] arguments?

view this post on Zulip Reid Barton (Sep 07 2018 at 08:05):

Class arguments

view this post on Zulip Reid Barton (Sep 07 2018 at 08:05):

Or instances rather

view this post on Zulip Johannes Hölzl (Sep 07 2018 at 08:05):

apply_with allows you to provide a apply_cfg structure. I think { instances := ff }should add them to the goals.

view this post on Zulip Reid Barton (Sep 07 2018 at 08:05):

Ooh

view this post on Zulip Reid Barton (Sep 07 2018 at 08:12):

Yes, it worked.

view this post on Zulip Kevin Buzzard (Sep 07 2018 at 08:53):

Does convert work? I'm a big convert to convert. It seems to allow me to write proofs forwards like a mathematician would. "This term is actually the answer; I'll now pick up the pieces".

view this post on Zulip Reid Barton (Sep 07 2018 at 09:00):

Huh, it does!

view this post on Zulip Reid Barton (Sep 07 2018 at 09:04):

That's really good to know--I already wrote a couple "backwards" proofs involving instances (which I think are really forwards, in the sense that you are building up new known statements from old ones, rather than breaking down the goal) and I was annoyed that I couldn't write them in the normal fashion.

view this post on Zulip Kevin Buzzard (Sep 07 2018 at 09:05):

How long has convert existed? I can't believe I didn't notice it wasn't there. I only found it was there about a week ago and now I kind of feel stupid that I hadn't realised that I wanted it.

view this post on Zulip Reid Barton (Sep 07 2018 at 09:06):

For example

begin
  letI : Π (A : K  Type v), is_iso (colimit.pre A (F.comp G)) :=
  begin intro A, rw colimit.pre_comp, apply_instance, end,
  apply is_cofinal_of_induced_is_iso
end

is now

begin
  convert is_cofinal_of_induced_is_iso _,
  intro A, rw colimit.pre_comp, apply_instance
end

view this post on Zulip Johan Commelin (Sep 07 2018 at 09:07):

https://leanprover.zulipchat.com/#narrow/stream/116395-maths/subject/ZFC.20equality/near/127216190
We need better documentation!

view this post on Zulip Reid Barton (Sep 07 2018 at 09:07):

April
https://leanprover.zulipchat.com/#narrow/stream/113488-general/subject/apply.20with.20new.20equality.20goals/near/125558382

view this post on Zulip Reid Barton (Sep 07 2018 at 10:41):

Maybe it would still be good to have an applyI tactic which is just apply with { instances := ff }, though.

view this post on Zulip Kenny Lau (Sep 07 2018 at 10:48):

maybe we should have 32768 names for our 15 boolean configurations of simp

view this post on Zulip Patrick Massot (Sep 07 2018 at 10:58):

Indeed I would love to read more examples of using convert.


Last updated: May 12 2021 at 22:15 UTC