Zulip Chat Archive

Stream: Is there code for X?

Topic: example (a b c : α) (w : c < b) (h : b ≤ a) : a - b < a - c


Scott Morrison (Jul 13 2023 at 03:29):

Is there I type class that I can put on α so:

example (a b c : α) (w : c < b) (h : b  a) : a - b < a - c := sorry

is true?

And that has instances for both ℕ and ℤ?

Heather Macbeth (Jul 13 2023 at 03:31):

Maybe docs#ExistsAddOfLE (cc @Peter Nelson)?

Yury G. Kudryashov (Jul 13 2023 at 04:33):

Do we have an OrderedSub instance for an OrderedAddCommGroup?

Yaël Dillies (Jul 13 2023 at 06:57):

Yes we do. I added it a while back

Yaël Dillies (Jul 13 2023 at 07:01):

The lemma you want to use is docs#tsub_lt_tsub_left_of_le

Yaël Dillies (Jul 13 2023 at 07:01):

You can use the hypotheses from the lemma directly, or if you need something stronger (because you need another lemma) I can point you to the right mix of assumptions.

Scott Morrison (Jul 14 2023 at 08:57):

Thanks, @Yaël Dillies, that was what I was after, along with the product instances for OrderedSub that I've added in #5890.


Last updated: Dec 20 2023 at 11:08 UTC