Zulip Chat Archive

Stream: general

Topic: nat trivialities


Patrick Massot (Apr 04 2020 at 19:23):

I'm very bad at finding nat trivialities in mathlib, and library_search does seem to want to help me today. Where can I find:

lemma nat.forall_ge_iff {n : } {P :   Prop} : ( m  n, P m)   k, P (n + k)

lemma nat.forall_gt_iff {n : } {P :   Prop} : ( m > n, P m)   k, P (n + 1 + k)

lemma nat.strict_mono_of_succ {u :   } (h :  n, u n < u (n + 1)) : strict_mono u :=

Patrick Massot (Apr 04 2020 at 19:24):

Note that I can prove those lemmas, but they must be there somewhere, right?

Kevin Buzzard (Apr 04 2020 at 19:24):

You can only do them because there's no subtraction ;-)

Patrick Massot (Apr 04 2020 at 19:25):

Sure, I wouldn't call them trivialities otherwise. They would be either false or hard.

Mario Carneiro (Apr 04 2020 at 19:26):

I don't think we make a habit of writing lemmas of this form

Mario Carneiro (Apr 04 2020 at 19:28):

the closest equivalent to nat.forall_ge_iff is nat.le.dest (where's the converse?)

Patrick Massot (Apr 04 2020 at 19:28):

Would that be a bad habit according to you?

Mario Carneiro (Apr 04 2020 at 19:30):

No, although I'm not sure if they would be very effective. Perhaps they might work as manual simp lemmas

Mario Carneiro (Apr 04 2020 at 19:30):

I would usually just use rcases le.dest h with <n,rfl> if I had a goal that I wanted to rewrite like this

Mario Carneiro (Apr 04 2020 at 19:31):

The last one is in mathlib in the stuff about well orders

Mario Carneiro (Apr 04 2020 at 19:32):

strict_mono.nat in algebra.strict_mono

Patrick Massot (Apr 04 2020 at 19:33):

And now library_search confesses...

Mario Carneiro (Apr 04 2020 at 19:35):

I was thinking of order_embedding.nat_lt in order.order_iso but that other one is a much better fit


Last updated: Dec 20 2023 at 11:08 UTC