Zulip Chat Archive

Stream: maths

Topic: Pi.Lex complete linear order


Violeta Hernández (Jul 16 2025 at 07:16):

Suppose a is well-ordered and b is a complete linear order. Does it follow that a -> b (with the lexicographic ordering) is a complete linear order? Do we have this in Mathlib? If not, how do we prove it?

Yaël Dillies (Jul 16 2025 at 07:24):

a embeds into a → b, so you definitely need a to be complete too

Violeta Hernández (Jul 16 2025 at 07:24):

Well-order with top, then

Violeta Hernández (Jul 16 2025 at 07:26):

My actual example is WithTop Ordinal -> SignType in case that's relevant

Aaron Liu (Jul 16 2025 at 12:38):

Yes it follows, but I'm not aware of anything in mathlib

Aaron Liu (Jul 16 2025 at 13:53):

Yaël Dillies said:

a embeds into a → b

Not necessarily

Aaron Liu (Jul 16 2025 at 13:53):

not with the lex order

Yaël Dillies (Jul 16 2025 at 13:57):

Oh yes, sorry, I was confusing with ∑ₗ _ : a, b

Edward van de Meent (Jul 16 2025 at 15:52):

i think you might be able to do it if b has elements b1 < b2, by mapping x to fun y => if y < x then b2 else b1?

Aaron Liu (Jul 16 2025 at 15:59):

huh

Aaron Liu (Jul 16 2025 at 16:00):

oh

Aaron Liu (Jul 16 2025 at 16:00):

yeah that probably works

Edward van de Meent (Jul 16 2025 at 16:01):

it at the very least preserves <

Edward van de Meent (Jul 16 2025 at 16:02):

i'm not sure the other direction holds tho...

Aaron Liu (Jul 16 2025 at 16:05):

well it's linear

Edward van de Meent (Jul 16 2025 at 16:05):

ah yes of course

Edward van de Meent (Jul 16 2025 at 16:07):

so it can't in general be an embedding

Edward van de Meent (Jul 16 2025 at 16:07):

because not all well-orders are linear

Aaron Liu (Jul 16 2025 at 16:09):

well-orders are linear

Aaron Liu (Jul 16 2025 at 16:09):

well-founded relations are not necessarily linear

Edward van de Meent (Jul 16 2025 at 16:10):

ah, i was under the mistaken impression that wellorders are wellfounded orders

Edward van de Meent (Jul 16 2025 at 16:11):

in the case where a is linearly ordered, it is true that this is an embedding

Aaron Liu (Jul 16 2025 at 16:13):

wellorders are wellfounded linear orders

Aaron Liu (Jul 16 2025 at 16:14):

that is, linear orders that are docs#WellFoundedLT

Aaron Liu (Jul 16 2025 at 16:15):

it says so in the docstring for docs#IsWellOrder

Edward van de Meent (Jul 16 2025 at 16:15):

sure, but i didn't read that because the name seems descriptive enough to assume otherwise

Edward van de Meent (Jul 16 2025 at 16:16):

anywho, i understand the difference now.

Violeta Hernández (Jul 16 2025 at 19:16):

Aaron Liu said:

Yes it follows, but I'm not aware of anything in mathlib

Lol the reason I ask is because I wonder if your proof can be simplified and put into Mathlib in a more general case

Aaron Liu (Jul 16 2025 at 19:17):

my proof isn't for lex though

Aaron Liu (Jul 16 2025 at 19:17):

it's for a subtype of lex

Aaron Liu (Jul 16 2025 at 19:18):

I don't see how this would transfer to the subtype so I would still have to prove it again

Aaron Liu (Jul 16 2025 at 19:21):

I think I can probably generalize to CompleteLattice (Lex ((a : α) → β a)) when we have LinearOrder α and WellFoundedLT α and ∀ a, CompleteLattice (β a)

Aaron Liu (Jul 16 2025 at 19:21):

oh and I do see how I might be able to transfer to the subtype

Violeta Hernández (Jul 16 2025 at 19:24):

Aaron Liu said:

it's for a subtype of lex

Wait, the complete order on the subtype isn't just the one inherited from the order?

Aaron Liu (Jul 16 2025 at 19:25):

Violeta Hernández said:

Aaron Liu said:

it's for a subtype of lex

Wait, the complete order on the subtype isn't just the one inherited from the order?

not always

Violeta Hernández (Jul 16 2025 at 19:25):

Huh

Aaron Liu (Jul 16 2025 at 19:25):

only sometimes

Violeta Hernández (Jul 16 2025 at 19:25):

Do you have an example?

Violeta Hernández (Jul 16 2025 at 19:26):

(context for everyone else, the subtype is sequences where the pre image of {0} is upper closed)

Aaron Liu (Jul 16 2025 at 19:26):

take WithTop (WithTop Nat) and let the subtype be · ≠ WithTop.some ⊤

Violeta Hernández (Jul 16 2025 at 19:26):

Oh well yeah

Aaron Liu (Jul 16 2025 at 19:26):

then the sup of the natural numbers is different

Violeta Hernández (Jul 16 2025 at 19:26):

I mean, does it not transfer for our specific subtype

Aaron Liu (Jul 16 2025 at 19:26):

it does for our specific one I think

Violeta Hernández (Jul 16 2025 at 23:26):

nevermind counterexample doesn't work

Violeta Hernández (Jul 16 2025 at 23:48):

I think I have a relatively simple construction for the infimum

Violeta Hernández (Jul 16 2025 at 23:49):

Take a set SS of functions f:αβf : \alpha \to \beta, define Ti={f(i):fS}T_i = \{f(i) : f \in S\}. Let iαi \in \alpha be the least index with infTiTi\inf T_i \notin T_i. Then the infimum is the function ff with f(j)=infTjf(j) = \inf T_j for jij \le i and f(j)=f(j) = \top otherwise.

Violeta Hernández (Jul 16 2025 at 23:53):

@Aaron Liu Does this seem correct? It definitely does seem simpler than what you had; this is what I meant when I called ordinal induction a "noob trap".

Aaron Liu (Jul 16 2025 at 23:56):

no that doesn't work

Violeta Hernández (Jul 16 2025 at 23:56):

Darn :frown:

Violeta Hernández (Jul 16 2025 at 23:56):

Counterexample?

Aaron Liu (Jul 16 2025 at 23:59):

your order is the cantor set Lex (ℕ → Bool) and your set is {toLex fun n => n == 0, toLex fun n => n == 1}, the infimum is toLex fun n => n == 1 but your algorithm gives toLex fun n => n == 0 && n == 1

Violeta Hernández (Jul 17 2025 at 00:05):

hm you're right it's clearly a bit more subtle than that

Aaron Liu (Jul 17 2025 at 00:16):

just do what I did

Violeta Hernández (Jul 17 2025 at 00:27):

Ok yeah you know what I'm starting to think this is actually one of those cases where you need to use ordinal induction

Violeta Hernández (Jul 17 2025 at 00:28):

Aaron Liu said:

just do what I did

I admit I haven't quite figured out what you did

Violeta Hernández (Jul 17 2025 at 17:30):

Ok fine, I'm now convinced that building the complete lattice structure on lexicographically ordered functions requires ordinal induction

Aaron Liu (Jul 17 2025 at 23:12):

Violeta Hernández said:

Ok fine, I'm now convinced that building the complete lattice structure on lexicographically ordered functions requires ordinal induction

There is a way to avoid it

Violeta Hernández (Jul 17 2025 at 23:13):

the plot thickens

Aaron Liu (Jul 17 2025 at 23:15):

Basically you do well founded induction on LT instead

Violeta Hernández (Jul 17 2025 at 23:15):

well i mean yeah


Last updated: Dec 20 2025 at 21:32 UTC