Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Silly question about decidable equality and inequality

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Silly question about decidable equality and inequality


Chronological Thread 
  • From: Gabriel Scherer <gabriel.scherer AT gmail.com>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Silly question about decidable equality and inequality
  • Date: Wed, 24 Jun 2020 07:30:02 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gabriel.scherer AT gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk1-f169.google.com
  • Ironport-phdr: 9a23:C5Vo+hCZbzPPCObAktPcUyQJP3N1i/DPJgcQr6AfoPdwSPTzosbcNUDSrc9gkEXOFd2Cra4d1qyP4/6rCDVIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfLN/IA+roQjSt8Qajo9vJrsswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKLCAy/n3JhcNsjaJbuBOhqAJ5w47Ie4GeKf5ycrrAcd8GWWZNW8BcXDFDDIyhdYsCF+UOPehaoIf9qVUArgawCxewC+700DBEmmX70Lcm3+g9EwzL2hErEdIUsHTTqdX4LKYcXvquw6nSzDXMcfdW0irg5ofUchAuv+uMUqxqccHMzkQvGBnKgU6KqYzkITyV0v4Bs3OH4OpgS+2vkXAoqxtqrzigw8cjkIjJhoYPxl/Y8iV5xZ84KNulQ0F0fdCqCoFftz2GN4RoWMMiRXlltDgkx7AGtpO1fCYExIkkyhPdaPGLbpSE7g/tWeieLzp1im9odb28ihuv9UWtxOLxW9Ww3VtXrCdJjtbCu3IC2hHV98OJSeN981+/1TqT0w3f8OJJLEAumabFNZIt3KQ8mocSvEnHGCL9hV/4g7WMdko+/+il8+Tnbavipp+bL4J0jxvxMqUqmsCmGOQ4MRUCU3GV+eih1bDu+Vf1QLpNjv0xnanZtI7VKd4Hqa6+Bg9Zyocj6xChADe6yNkUg2ULIVZfdB+Ej4XlIU/CLO7mAfulnlihkTNmy+jDPrL7A5XNKnbDkK3mfbZ480NcxxA8wstF55JVFL4BJOj/WlTtu9zYEBA5KRK7w/z8BdVy04MRQ2OPAquDPKzOtl+I4/ojI/OQa48NpDb9N/8l6ubygn8+gF8RZLWm3Z8KaH+jBflmOEWYYX/0gtgbC2sKvww+TPbriFKYSzJTaWyyDOoA4WQQD5vuJoPeTMj5i7uYmSy/A5d+Z2ZcC1nKH22+JKueXPJZRyuYOM5slnQ/XrisUYI7nUWhvQXgyrdjaPHf+iACuIjL29185umVnhY3o28nR/+B2n2AGjkn1lgDQCU7ieUm+RQklgWzlJNgivkdLuR9outTW15jZ5HZxu1+Tdv1X1CZJ4rbeBOdWtyjRAoJYJcxztsJORgvHtyjilXa3HPvDeZLxvqEA5s79q+a1H/0dZ4kmiT2kZI5hlxjefNhcGivh6px7Q/WXtebnECQlqLsfqMZjnfA

Pierre-Marie's typical example defines (A -> B) in the guest type theory as (bool * (A -> B)) in the host theory, with a type-preserving translation, and (=) in the guest as just (=) in the host.  For any function you can get another distinct (but observably equivalent in the guest) function by flipping the boolean. This also applies if B is False.

On the other hand, you could define a "smaller" type of inequivalence for a type (as an inductive presentation if you can, for example) that has better properties. This comes up often in cases where you need to reason on elements being equal, as the definition of inequivalence as a function makes it hard to reason about.
For natural numbers for example, one definition of inequivalence might be something like

Inductive different :=
| Bigger : forall (k : nat), m = n + S k -> different m n
| Smaller : forall (k : nat), m + S k = n -> different m n.

and this one should inherit contractibility from equality.

On Wed, Jun 24, 2020 at 6:12 AM Jason Gross <jasongross9 AT gmail.com> wrote:
As I understand it, with funext, you can prove irrelevance for all proofs of x <> y of any type (because False is an hProp).  However, without funext, you can't really prove anything about equality of most function spaces (just like without K nor univalence, you can't really prove anything about equality of most types).  (I think there's actually a deeper relationship here, probably along the same lines of how univalence implies funext.  I don't understand it fully myself, but I believe Dan Licata has a blog post on how knowing about equality in a universe gives you things about equality of functions between types in that universe.). In general, I think all you can say is that if you can prove that `A -> B` is isomorphic to some non-arrow-type `C` when you assume funext, then you can probably embed `C` into `A -> B` even without funext.  So you can lower-bound the number of distinct functions of a given type, but you can't upper-bound it without funext in general.  (Exception: you can upper-bound the number of functions from `A -> B` when `A` is inhabited and `B` is not; the upper-bound is 0.)

I believe Pierre-Marie Pedrot has some models of type-theory (or pointers to them) which contradict funext.  I'm not sure whether or not any of them allow for multiple proofs of `A -> False`, though I could believe that they might.

-Jason

On Tue, Jun 23, 2020, 22:25 Talia Ringer <tringer AT cs.washington.edu> wrote:
Hi all,

I think this should be obvious, but I'm having trouble thinking right now. I figure I'll ask in case somebody knows the answer.

Suppose I have a type with decidable equality, like nat. Then provably I have that all proofs of n = m for n m : nat are equal to each other, without assuming UIP as an axiom. That much I know.

From this, can I say anything about proofs of n <> m for n m : nat without assuming functional extensionality? For example, are all proofs of 0 <> 1 equal to each other? If not, are they provably related in any interesting way?

Talia



Archive powered by MHonArc 2.6.19+.

Top of Page