Zulip Chat Archive

Stream: new members

Topic: le/lt trans


Iocta (Jun 24 2020 at 23:43):

example :  {a b c : real}, a < b  b  c  a < c :=
begin
intros a b c h1 h2,
end

1) How do I say this without the \forall? 2) What is the name of this lemma?

Jalex Stark (Jun 24 2020 at 23:48):

import tactic
example (a b c : real) : a < b  b  c  a < c :=
begin
  library_search
end

Jalex Stark (Jun 24 2020 at 23:48):

putting things to the left of the binder makes them arguments

Jalex Stark (Jun 24 2020 at 23:49):

in this case, you've stated the lemma in a way that's very similar to how it's stated in the library, so library_search finds the name for you

Iocta (Jun 24 2020 at 23:50):

Thanks

Jalex Stark (Jun 24 2020 at 23:52):

it sounds dumb, but it's actually pretty efficient to guess the name of this lemma using autocomplete

Iocta (Jun 24 2020 at 23:52):

How come I can't

variables {a b c : real}
example  : a < b  b  c : a < c := sorry

Jalex Stark (Jun 24 2020 at 23:52):

you have two binders

Jalex Stark (Jun 24 2020 at 23:53):

: is not a synonym for

Jalex Stark (Jun 24 2020 at 23:54):

this should work

variables {a b c : real}
example (hab : a < b) (hbc : b  c) : a < c := sorry

Jalex Stark (Jun 24 2020 at 23:54):

hypotheses to the left of the binder ought to have names, though I think you can omit them

Iocta (Jun 24 2020 at 23:55):

Ah ok


Last updated: Dec 20 2023 at 11:08 UTC