Zulip Chat Archive

Stream: lean4

Topic: universe level maximum integer


Madeleine Birchfield (Jul 19 2022 at 18:07):

What happens when you try doing mathematics in Lean at the maximum integer value used to index the universes before the integer overflow occurs?

In Agda, up until a few months ago, it was possible to prove Russell's paradox at the (2^64 - 1)th universe: https://github.com/agda/agda/issues/5706

Henrik Böving (Jul 19 2022 at 18:11):

docs4#Lean.Expr uses docs4#Lean.Level to represent universe levels which doesn't seem like it is prone to overflow?

Marc Huisinga (Jul 19 2022 at 18:20):

I haven't looked into it too closely but what about functions like to_offset?

Gabriel Ebner (Jul 19 2022 at 18:23):

Oh, that is indeed an issue. The function will overflow on inputs that are larger than 103 gigabytes.

Locria Cyber (Jul 19 2022 at 18:29):

A function that takes a bijillion years to finish is total.

Reid Barton (Jul 19 2022 at 19:08):

Lean takes an ultrafinitist approach to universe levels

Julian Berman (Jul 20 2022 at 05:33):

Madeleine Birchfield said:

In Agda, up until a few months ago, it was possible to prove Russell's paradox at the (2^64 - 1)th universe: https://github.com/agda/agda/issues/5706

This is cute :) added it to my bug collection.


Last updated: Dec 20 2023 at 11:08 UTC