Zulip Chat Archive
Stream: new members
Topic: Proving basic inequalities of natural numbers
Sebastian Zimmer (Oct 13 2018 at 16:17):
linarith doesn't seem to be good enough to prove this basic inequality
lemma simple_order_lemma (k : ℕ) (h1 : k > 0) (h2 : ¬ k > 1) : k = 1 := begin sorry end
Sebastian Zimmer (Oct 13 2018 at 16:18):
What's the best way of proving this sort of result?
Kenny Lau (Oct 13 2018 at 16:21):
import data.nat.basic lemma simple_order_lemma (k : ℕ) (h1 : k > 0) (h2 : ¬ k > 1) : k = 1 := (dec_trivial : ∀ k, k ≤ 1 → k > 0 → k = 1) k (le_of_not_gt h2) h1
Kenny Lau (Oct 13 2018 at 16:22):
lemma simple_order_lemma (k : ℕ) (h1 : k > 0) (h2 : ¬ k > 1) : k = 1 := begin have h3 := le_of_not_gt h2, cases h3 with h3 h3, {refl}, cases h3, cases h1 end
Sebastian Zimmer (Oct 13 2018 at 16:25):
Thanks, I would have never thought of that first solution.
Last updated: Dec 20 2023 at 11:08 UTC