Zulip Chat Archive

Stream: new members

Topic: deriving `ℝ` as a goal state?


Chris M (Jul 26 2020 at 10:36):

I am trying to just apply the proof monof to h using the have keyword. However, for some reason it gives me a few goal states that I don't understand. This is my code:

example :
  ¬  {f :   }, monotone f   {a b}, f a  f b  a  b :=
begin
  intro h,
  let f := λ x : , (0 : ),
  have monof : monotone f,
  { exact monotone_const},
  have h' : f 1  f 0,
    from le_refl _,
  have h2 := (h monof),
end

This generates three goal states. The first is the one that I actually wanted:

h :  {f :   }, monotone f   {a b : }, f a  f b  a  b,
f :    := λ (x : ), 0,
monof : monotone f,
h' : f 1  f 0,
h2 : f ?m_1  f ?m_2  ?m_1  ?m_2
 false

But it also generates these goal states that I haven't seen before. It wants me to "derive" twice...?

h :  {f :   }, monotone f   {a b : }, f a  f b  a  b,
f :    := λ (x : ), 0,
monof : monotone f,
h' : f 1  f 0
 

h :  {f :   }, monotone f   {a b : }, f a  f b  a  b,
f :    := λ (x : ), 0,
monof : monotone f,
h' : f 1  f 0
 
````

Mario Carneiro (Jul 26 2020 at 10:37):

Those two are ?m_1 and ?m_2 that you can see in the type of h2 in the first goal

Mario Carneiro (Jul 26 2020 at 10:39):

You can mostly ignore them because they usually go away when you finish the proof

Mario Carneiro (Jul 26 2020 at 10:40):

In this case, you presumably want to derive 1 <= 0 using h', so you should finish the application and write have h2 := h monof h', and then those side goals will disappear

Eric Wieser (Jul 26 2020 at 21:13):

Something which I brought up in lftcm - it would be great if m_1 could be used as a heading for it's associated goal in the lean goal state window

Kevin Buzzard (Jul 26 2020 at 21:17):

I'm not sure that the goal knows it's called ?m_1 in another goal

Mario Carneiro (Jul 27 2020 at 06:23):

Unfortunately it doesn't work because the metavariables are given new names every time they get printed

Mario Carneiro (Jul 27 2020 at 06:24):

I don't know how hard it would be to change the pretty printer so that metavariable numbering can be shared across multiple goals


Last updated: Dec 20 2023 at 11:08 UTC