Zulip Chat Archive

Stream: Is there code for X?

Topic: proof refiner


Vasily Ilin (May 29 2022 at 18:45):

Is there a command to "refine" a proof? E.g. I have

import tactic -- imports all the Lean tactics
import linear_algebra.basis
import data.real.basic

example :  t a b c : , a  ((3,1,4) :  ×  × ) + b  (2,-3,5) + c  (5,9,t) = (0,0,0)  (a,b,c)  (0,0,0) :=
begin
  use 2,
  use 3,
  use -2,
  use -1,
  split,
    {simp, split, ring, split, ring, ring,},
    {simp,},
end

and I want to make it shorter. Can I call a command to do so? If not, can you just tell me how to make it shorter? Surely I should be able to fit all four uses in one command

Violeta Hernández (May 29 2022 at 18:52):

I think you're looking for refine

Violeta Hernández (May 29 2022 at 18:52):

Try refine ⟨2, 3, -2, -1, _⟩

Violeta Hernández (May 29 2022 at 18:52):

You can also use the use tactic for this though, use [2, 3, -2, -1]

Violeta Hernández (May 29 2022 at 18:52):

Up to you

Vasily Ilin (May 29 2022 at 18:53):

Nice, thanks!

Kyle Miller (May 29 2022 at 19:03):

It's tactic#zulip :wink:


Last updated: Dec 20 2023 at 11:08 UTC