Zulip Chat Archive

Stream: new members

Topic: How to prove that the real number 2 < 3?


Martin C. Martin (Nov 28 2023 at 18:49):

import Mathlib.Data.Real.Basic

example : (2 : ) < 3 := sorry

simp doesn't make any progress, and I'm not sure what else to try.

Shreyas Srinivas (Nov 28 2023 at 18:50):

norm_num?

Martin C. Martin (Nov 28 2023 at 18:50):

Ah thanks!

Kevin Buzzard (Nov 28 2023 at 19:07):

There should maybe be a better answer to the general question of "I don't know the 40 or so standard mathlib tactics so don't know how to make progress on this math-simple goal". I mean, a better answer than "go and read Mathematics In Lean and learn what all the tactics do" or "in your case this tactic works". Does hint solve this one or does it just melt your machine?

Martin C. Martin (Nov 28 2023 at 19:13):

Thanks Kevin. My Mathlib checkout doesn't have Mathlib.Tactic.Hint. Is it new?

Martin C. Martin (Nov 28 2023 at 19:14):

I have 4.3.0-rc1. I'll try upgrading to rc2.

Riccardo Brasca (Nov 28 2023 at 19:15):

It's probably not imported by Mathlib.Data.Real.Basic.

Riccardo Brasca (Nov 28 2023 at 19:15):

Try

import Mathlib.Tactic

Shreyas Srinivas (Nov 28 2023 at 19:16):

Kevin Buzzard said:

There should maybe be a better answer to the general question of "I don't know the 40 or so standard mathlib tactics so don't know how to make progress on this math-simple goal". I mean, a better answer than "go and read Mathematics In Lean and learn what all the tactics do" or "in your case this tactic works". Does hint solve this one or does it just melt your machine?

@Martin Dvořák 's Cheatsheet? EDIT: it would be cool to have in the docview

Riccardo Brasca (Nov 28 2023 at 19:17):

hint is instantaneous on my machine, and it says that linarith does the job.

Riccardo Brasca (Nov 28 2023 at 19:21):

BTW show_term linarith produces a huge term (that doesn't work), why show_term norm_num is much shorter.

Martin Dvořák (Nov 28 2023 at 19:22):

Shreyas Srinivas said:

Martin Dvořák 's Cheatsheet? EDIT: it would be cool to have in the docview

Which one did you want?
https://github.com/madvorak/lean4-tactics
Or the printable one?

Damiano Testa (Nov 28 2023 at 19:26):

Riccardo Brasca said:

BTW show_term linarith produces a huge term (that doesn't work), why show_term norm_num is much shorter.

There is also the shorter proof Nat.cast_lt.mpr (Nat.lt.base 2).

Shreyas Srinivas (Nov 28 2023 at 19:37):

Martin Dvořák said:

Shreyas Srinivas said:

Martin Dvořák 's Cheatsheet? EDIT: it would be cool to have in the docview

Which one did you want?
https://github.com/madvorak/lean4-tactics
Or the printable one?

The link version should do


Last updated: Dec 20 2023 at 11:08 UTC