Zulip Chat Archive
Stream: Type theory
Topic: Can `Squash.mk x = Squash.mk y` be made true by definition?
Eric Wieser (May 15 2025 at 22:34):
Would lean's type theory survive a change which made
example : Squash.mk true = Squash.mk false := rfl
true?
Eric Wieser (May 15 2025 at 22:34):
Motivation: passing computationally relevent arguments in a way that is kernel-irrelevant
Eric Wieser (May 15 2025 at 22:36):
(we have docs#Erased for the other direction)
Aaron Liu (May 15 2025 at 23:01):
I think this makes defeq undecidable again
Eric Wieser (May 15 2025 at 23:10):
By again you mean "in yet another way" as opposed to "which we only just fixed"?
Aaron Liu (May 15 2025 at 23:12):
You get any two terms are defeq in an inconsistent context
Aaron Liu (May 15 2025 at 23:12):
Unless you drop more transitivity
Aaron Liu (May 15 2025 at 23:16):
For example, let t be your proof of False, and
true
= id (fun _ => true) t
= Squash.lift (Squash.mk fun _ => true) id t
= Squash.lift (Squash.mk fun _ => false) id t
= id (fun _ => false) t
= false
Aaron Liu (May 15 2025 at 23:19):
Right now all of those are defeqs except for the line converting Squash.mk fun _ => true to Squash.mk fun _ => false
Eric Wieser (May 15 2025 at 23:48):
Thanks, I hate it
Mario Carneiro (May 20 2025 at 13:52):
You would need Squash.lift to be limited to DefeqSubsingleton B instead of Subsingleton B
Mario Carneiro (May 20 2025 at 13:53):
It would be pretty cool if that was a thing, but I think you start to end up with a variation on cubical TT if you take it to its logical conclusion
Niels Voss (May 21 2025 at 04:56):
Is DefeqSubsingleton an actual class, or is it some meta-theoretic property that applies to types like propositions and Unit, but not Unit -> Unit and Empty?
Aaron Liu (May 21 2025 at 11:52):
Unit → Unit looks like it would be a defeq subsingleton because it's a pi type whose codomain is a defeq subsingleton
Mario Carneiro (May 21 2025 at 16:40):
I was meaning DefeqSubsingleton is an actual class with the magic property that if you have two elements of it (even with a variable type) then the kernel knows that they are defeq
Mario Carneiro (May 21 2025 at 16:42):
Structures like Prod Unit Unit are also defeq subsingletons
Eric Wieser (May 21 2025 at 17:56):
Is Squash X a defeq subsingleton?
Mario Carneiro (May 21 2025 at 22:29):
it would be after this suggestion
Niels Voss (May 21 2025 at 23:50):
Ohh so you mean that the kernel would specifically look for DefeqSubsingleton instances and modify its behavior on account of them. I originally thought you meant we would have a typeclass for instances that were already DefeqSubsingletons according to the kernel
Niels Voss (May 21 2025 at 23:51):
If we get the ability to modify defeq behavior using the typeclass system, could we also make it so that propositionally equal but not definitionally equal diamonds now unify with each other?
François G. Dorais (May 22 2025 at 14:29):
Mario Carneiro said:
I was meaning
DefeqSubsingletonis an actual class with the magic property that if you have two elements of it (even with a variable type) then the kernel knows that they are defeq
I've been wanting this magic for a long time. Do they teach Lean at Hogwarts? :grinning:
Last updated: Dec 20 2025 at 21:32 UTC