Zulip Chat Archive

Stream: Is there code for X?

Topic: abv a - abv b ≤ abv (a + b)


Geoffrey Irving (Jan 03 2023 at 23:35):

There's absolute_value.le_sub. Is there a reason there isn't absolute_value.le_add?

Yakov Pechersky (Jan 03 2023 at 23:41):

Do you mean docs#absolute_value.add_le?

Geoffrey Irving (Jan 03 2023 at 23:43):

No, I want abv a - abv b ≤ abv (a + b).

Adam Topaz (Jan 03 2023 at 23:46):

Just rearrange the triangle inequality?

Geoffrey Irving (Jan 03 2023 at 23:51):

Yes, I know how to prove it, but I need it as a lemma to do apply_rules. Should I send a PR, or does it exist somewhere that I didn’t notice?

Adam Topaz (Jan 03 2023 at 23:55):

Oh I see...

Adam Topaz (Jan 03 2023 at 23:56):

Is it possible to pass a term to apply_rules? I don't remember. If so, just pass in the term for the proof using g the usual triangle inequality

Heather Macbeth (Jan 03 2023 at 23:56):

My intuition with inequality proofs (on paper as well as in Lean) is to arrange them in such a way that there is no negation. I suspect metaprogramming will also be more convenient if you keep to this rule. So, can you phrase your intended proofs to involve

abv ((a + b) - b)  abv (a + b) + abv b

instead?

Geoffrey Irving (Jan 04 2023 at 00:03):

Why does that logic not apply to le_sub?

Heather Macbeth (Jan 04 2023 at 00:21):

Well, in fact, I would probably also reorganize to avoid le_sub :)


Last updated: Dec 20 2023 at 11:08 UTC