Zulip Chat Archive

Stream: general

Topic: le_of_lt_of_le


Chris Hughes (Apr 25 2018 at 21:40):

Should we prove le_of_lt_of_le so this stuff works?

example {a b c : } (h : a < b) (h₁ : b  c) : a  c :=
calc a < b : h
   ...  c : h₁

@[trans] lemma le_of_lt_of_le {a b c : } : a < b  b  c  a  c := sorry

example {a b c : } (h : a < b) (h₁ : b  c) : a  c :=
calc a < b : h
   ...  c : h₁

Kevin Buzzard (Apr 25 2018 at 21:42):

I've run into that before

Kevin Buzzard (Apr 25 2018 at 21:42):

You have to remember to apply le_of_lt before starting the calc :-)

Kevin Buzzard (Apr 25 2018 at 21:42):

I like the idea.

Kevin Buzzard (Apr 25 2018 at 21:45):

dammit I want the proof to be le_of_lt $ lt_of_lt_of_le

Kevin Buzzard (Apr 25 2018 at 21:45):

:-)

Kevin Buzzard (Apr 25 2018 at 21:45):

λ x y, le_of_lt $ lt_of_lt_of_le x y looks like you're missing a trick


Last updated: Dec 20 2023 at 11:08 UTC