Zulip Chat Archive
Stream: new members
Topic: power function injective over nat
Ainsley Pahljina (Nov 06 2019 at 00:29):
This isn't in math lib, is there any chance someone can help me prove it?
lemma pow_inj (a b c : ℕ) (h : 2 ≤ a) : a^b = a^c → b = c := sorry
Thanks in advance!
Bhavik Mehta (Nov 06 2019 at 00:33):
I needed this same lemma too! My proof is here, but if you want hints rather than a solution, I'd suggest proving that pow is monotonic, and using that.
Bhavik Mehta (Nov 06 2019 at 00:34):
Useful library functions you might need include: pow_lt_pow_of_lt_right
, le_antisymm
, and other easy things about linear orders such as not_le_of_lt
Bhavik Mehta (Nov 06 2019 at 00:35):
Actually, monotonic was the wrong word to use, I'm suggesting you first prove
example { a b c : ℕ } ( h : 2 ≤ a ) ( k : a^b ≤ a^c ) : b ≤ c
Kevin Buzzard (Nov 06 2019 at 07:07):
Avoid \ge as a rule -- rewrite using \le
Bhavik Mehta (Nov 06 2019 at 10:58):
Edited, thanks
Bhavik Mehta (Nov 06 2019 at 10:59):
Is \ge just sugar over \le?
Johan Commelin (Nov 06 2019 at 11:31):
Most of the time: yes, but some parts of Lean are sensitive to the sugar
Scott Morrison (Nov 09 2019 at 04:12):
@Ainsley Pahljina or @Bhavik Mehta, it would be great to PR this to mathlib!
Bhavik Mehta (Nov 09 2019 at 10:17):
I'll try to make this PR later today!
Bhavik Mehta (Nov 09 2019 at 16:53):
@Scott Morrison Where would this sort of thing belong? In data/nat/basic.lean
, maybe?
Scott Morrison (Nov 09 2019 at 19:11):
Yes.
Bhavik Mehta (Nov 13 2019 at 12:46):
@Scott Morrison PR here: https://github.com/leanprover-community/mathlib/pull/1683
Last updated: Dec 20 2023 at 11:08 UTC