Zulip Chat Archive

Stream: mathlib4

Topic: o ≠ 0 vs 0 < o


Violeta Hernández (Aug 20 2024 at 03:05):

Currently the ordinal API uses these two spellings somewhat interchangeably. Am I correct in saying we should prefer the former for statements and the latter for proofs?

Violeta Hernández (Aug 20 2024 at 03:06):

Converting h : 0 < o into o ≠ 0 is just h.ne'. Doing the converse requires Ordinal.pos_iff_ne_zero.2 h which is a hassle.

Violeta Hernández (Aug 20 2024 at 03:07):

Admittedly we should probably have an alias for that, but the point stands

Yury G. Kudryashov (Aug 20 2024 at 04:01):

We have docs#Ne.bot_lt but it gives a slightly wrong expression (which is defeq to what you need).

Ruben Van de Velde (Aug 20 2024 at 06:04):

Policy for Nat is ne for hypotheses and lt for conclusions

Violeta Hernández (Aug 20 2024 at 06:05):

Does that policy extend to inequalities? e.g. does something like b < c → a * b < a * c take 0 < a or a ≠ 0?

Yury G. Kudryashov (Aug 20 2024 at 06:12):

Probably, we should think again about this policy, since positivity doesn't care about 0 < a vs a ≠ 0.

Kevin Buzzard (Aug 20 2024 at 19:04):

It's also trivial to switch between the two so I wonder whether we should just choose a simp normal form.

Yaël Dillies (Aug 20 2024 at 19:05):

I don't think we should. a ≠ 0 is clearly algebraic, 0 < a is clearly order theoretic. Each has their use, and forcing people to use only one of them is friction


Last updated: May 02 2025 at 03:31 UTC