Zulip Chat Archive
Stream: mathlib4
Topic: Ordinal.succ
Kenny Lau (Jun 29 2025 at 20:11):
Why do we not have Ordinal.succ defeq to Order.succ (currently Ordinal.succ does not exist)?
Aaron Liu (Jun 29 2025 at 20:13):
Are you proposing to add
def Ordinal.succ (o : Ordinal) : Ordinal := Order.succ o
for the dot notation?
Mario Carneiro (Jun 29 2025 at 20:14):
note that Ordinal.succ used to exist, it was removed with the order refactor
Kenny Lau (Jun 29 2025 at 20:14):
hmm probably the same reason why we don't want A+B as ideal then
Aaron Liu (Jun 29 2025 at 20:14):
Why can't you just add one?
Mario Carneiro (Jun 29 2025 at 20:15):
Addition is not commutative, so you have to be a bit careful there.
Mario Carneiro (Jun 29 2025 at 20:15):
but I think o + 1 is equal to o.succ
Aaron Liu (Jun 29 2025 at 20:15):
Yeah, do o + 1 I mean
Aaron Liu (Jun 29 2025 at 20:16):
1 + o = o for o infinite
Mario Carneiro (Jun 29 2025 at 20:16):
but I think it's the same as for Nat, succ is in some ways more basic
Mario Carneiro (Jun 29 2025 at 20:16):
and they aren't defeq
Kenny Lau (Jun 29 2025 at 20:16):
wait how can o+1 not be defeq to succ o
Aaron Liu (Jun 29 2025 at 20:16):
Mario Carneiro said:
and they aren't defeq
Don't we have a typeclass for this? It's docs#SuccAddOrder
Kenny Lau (Jun 29 2025 at 20:16):
oh is succ defined classically?
Kenny Lau (Jun 29 2025 at 20:17):
wait no succ is an explicit argument there
Kenny Lau (Jun 29 2025 at 20:17):
instance : SuccOrder Ordinal.{u} :=
SuccOrder.ofSuccLeIff (fun o => o + 1) succ_le_iff'
Aaron Liu (Jun 29 2025 at 20:18):
Oh, so it is defeq?
Kenny Lau (Jun 29 2025 at 20:18):
import Mathlib
universe u
example (o : Ordinal.{u}) : Order.succ o = o + 1 := rfl
Kenny Lau (Jun 29 2025 at 20:18):
it is defeq!
Kenny Lau (Jun 29 2025 at 20:18):
brb refactoring all succ lemmas to +1
Aaron Liu (Jun 29 2025 at 20:18):
maybe make sure we want this first before putting in all the work
Kenny Lau (Jun 29 2025 at 20:19):
@loogle Ordinal, Order.succ
loogle (Jun 29 2025 at 20:19):
:search: Ordinal.succ_ne_zero, Cardinal.lt_ord_succ_card, and 165 more
Aaron Liu (Jun 29 2025 at 20:19):
oh so it's not that much
Kenny Lau (Jun 29 2025 at 20:19):
Aaron Liu said:
maybe make sure we want this first before putting in all the work
(that was a joke, i don't have the time to refactor 165 lemmas)
Kevin Buzzard (Jun 29 2025 at 20:46):
You could just get a language model to do it for you, if everything is defeq it would stand a good chance.
Violeta Hernández (Jul 03 2025 at 07:24):
Hi! Sorry for the late reply. The plan is to turn docs#SuccAddOrder.succ_eq_add_one into a simp lemma, and stop using Order.succ directly in the Ordinal files. I just haven't been able to do this yet.
Violeta Hernández (Jul 03 2025 at 07:24):
Kenny Lau said:
brb refactoring all succ lemmas to +1
If you do find the time to do this, please go ahead!
Last updated: Dec 20 2025 at 21:32 UTC