Zulip Chat Archive

Stream: new members

Topic: Type equality


Keeley Hoek (Nov 11 2018 at 13:46):

Is it possible to decide whether two types are equal?

Kenny Lau (Nov 11 2018 at 13:49):

no

Keeley Hoek (Nov 11 2018 at 13:53):

That makes me sad

Kenny Lau (Nov 11 2018 at 13:54):

local attribute [instance] classical.dec

Keeley Hoek (Nov 11 2018 at 13:55):

Cheers, but I wanted to use it in a program

Keeley Hoek (Nov 11 2018 at 13:55):

Instead I think I'm going to have to concoct some user_notation trickery to get the same syntax

Kevin Buzzard (Nov 11 2018 at 14:37):

I've heard it said here that even nat = int is undecidable

Kenny Lau (Nov 11 2018 at 14:40):

independent, even

Abhimanyu Pallavi Sudhir (Nov 11 2018 at 16:21):

I've heard it said here that even nat = int is undecidable

How exactly are we defining equality of types?

Chris Hughes (Nov 11 2018 at 16:39):

As defined in Lean. If you separately define two inductive types of the same size, their equality will be independent.

Keeley Hoek (Nov 12 2018 at 08:16):

I guess the lesson is to stay in expr-land if you're trying to do something programmatically like this (e.g. either its a expr.const `bool [] or its not)

Mario Carneiro (Nov 12 2018 at 08:19):

Well, it depends on what you mean. That will not get id bool = bool

Keeley Hoek (Nov 12 2018 at 08:55):

sure yep


Last updated: Dec 20 2023 at 11:08 UTC