Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] proving UIP on decidable domains

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] proving UIP on decidable domains


Chronological Thread 
  • From: Thorsten Altenkirch <Thorsten.Altenkirch AT nottingham.ac.uk>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] proving UIP on decidable domains
  • Date: Thu, 15 Dec 2016 11:52:19 +0000
  • Accept-language: en-US
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=Thorsten.Altenkirch AT nottingham.ac.uk; spf=Pass smtp.mailfrom=Thorsten.Altenkirch AT nottingham.ac.uk; spf=None smtp.helo=postmaster AT uidappmx05.nottingham.ac.uk
  • Ironport-phdr: 9a23:mkSERRG1KZ3TBHq3KpWYpp1GYnF86YWxBRYc798ds5kLTJ7ypMWwAkXT6L1XgUPTWs2DsrQf2rGQ7fCrADdIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSijewZb1/IA+3oAjSucUanIVvIbstxxXUpXdFZ/5Yzn5yK1KJmBb86Maw/Jp9/ClVpvks6c1OX7jkcqohVbBXAygoPG4z5M3wqBnMVhCP6WcGUmUXiRVHHQ7I5wznU5jrsyv6su192DSGPcDzULs5Vyiu47ttRRT1jioMKjw3/3zNisFojKxVvg+vpwBxzYDXboGaNvRxfqLBct0VSmVMRdpRVzVbD4+gc4cCFfcNMOBFpIf9vVsOqh6+CBGyCuPvzT9InGT23bEk3OQnDArLwAggH84Qv3TSr9X1Nb0SXvy1zKLVyjjNcfNW2TDn6IjTbhAuv/eMUahsfMrV1UkgCQXFjlaRqYz/IzyV1v8As26c7+p8SeKvimgnqw5xoje1w8cgkJPGiZ4PxlDZ9iV02YA4LsC2Rk58ZN6rCppQtyeCOot3RMMiWWBotzwgxr0Io562ejUBxpc/xxPHdvCLbYuF7gj9WOueLzp0nn1odbylixqv70StyfXwWtSq3FtJtCZJjNbBu34X2xDN9sSLUOZx80i91TqXygzf9OJJLVoqmafUJZMt2KM8m5oJvUjeECL6hkP7h7KMeEo+4Oin8eHnb63mppCCM490jRnzMrkvmsOiG+s4KhAOX22U+Oig1LDv50v5QLJWjv0qk6nZtp/aJcQBqa68GQNayJos5wyiDzelyNgYnH8HI0xZeB+fkoTlJVLDLOrmAfqwjVmgijhmyv7cMrH8HJnALWDPkLL7crZ8705cxhAzzdda559MFL8BIPXzWlXqtNzEEBA5NRa4zvrjCNVhyIweX2GPAq6DMKzOsV+F/eQvI+6QZI8JuTb9Lfcl5/70gn88g1MSZ7Wm0YEKaHC7BvhmOVmWYWLwgtcdFmcHphYxTOvziFGbTTFTY2uyULkn6zEgCIOmCJ/DSZq3jLyA2ie7BJxWaXpcBlCCC3e7P7mDDr0HbzvXKct8mBQFU6KgQskvz1vm4AT90v9sKvfe0iwer5PqktZvsb79jxY3oAB0CN6Gz2yLB0hwgm4ORD4s16A39XB9zU2YzaV+xdVcCdFV5PJTWQcSM5nA0+18BND7X0TIdZGUSwD1EZ2dHTgtQ4dpkJc1aEFnFoD6gw==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Hi,

Just a comment: using functional extensionality we can actually prove UIP
for types with a stable equality, that is ~~(x = y) -> x=y. Clearly we get
a constant function by composing with x = y -> ~~(x =y). Function types
(and Pi Types) are closed under stable equality, that is if B has a stable
equality then so has A -> B. Using this we can show that all the ³normal²
types in the 1st universe have UIP, the first proper counterexample is the
first universe itself if we assume univalence and higher inductive types.

Cheers,
Thorsten

On 15/12/2016, 09:05,
"coq-club-request AT inria.fr
on behalf of Chunhui He"
<coq-club-request AT inria.fr
on behalf of
iuhnuhceh AT gmail.com>
wrote:

>Hi all,
>
>I'm reading the proof of UIP on decidable domains in the standard
>library of coq:
>source: theories/Logic/Eqdep_dec.v
>doc: https://coq.inria.fr/library/Coq.Logic.Eqdep_dec.html
>
>The proof "eq_proofs_unicity_on" uses some definitions like "nu" and
>"nu_inv".
>I think the proof is confusing, does anyone know the meaning of "nu"
>and "nu_inv"?
>
>I try to simplify the proof by inlining (see below).
>I find we can use a projection instead of "nu" and "nu_inv".
>maybe it seem cleaner than the original proof?
>
>Thanks!
>
>Chunhui
>
>---
>Section eqdep_dec.
> Variable A : Type.
> Variable A_dec : forall (x y : A), x = y \/ x <> y.
>
> Definition or_proj {x' y : A} (oreq : x' = y \/ x' <> y)
> (x : A) (def : x = y) : x = y :=
> match oreq with
> | or_introl H =>
> match A_dec x' x with
> | or_introl e =>
> match e in _ = y' return y' = y with
> | eq_refl => H
> end
> | or_intror _ => def
> end
> | or_intror _ => def
> end.
>
> Lemma or_proj_eq : forall {x y : A} (u : x = y), or_proj (A_dec x y) x
>u = u.
> Proof.
> intros x y u.
> unfold or_proj.
> case u.
> case (A_dec x x) as [Heq | Hneq].
> { case Heq. apply eq_refl. }
> { exfalso; apply (Hneq eq_refl). }
> Qed.
>
> Theorem eq_proofs_unicity : forall {x y : A} (p1 p2 : x = y), p1 = p2.
> Proof.
> intros x y p1 p2.
> case (or_proj_eq p1).
> case (or_proj_eq p2).
> unfold or_proj.
> case (A_dec x y) as [Heq | Hneq].
> { case (A_dec x x) as [Heq' | Hneq'] .
> { apply eq_refl. }
> { exfalso; apply (Hneq' eq_refl). } }
> { exfalso; apply (Hneq p1). }
> Qed.
>End eqdep_dec.





This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it.

Please do not use, copy or disclose the information contained in this
message or in any attachment. Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.




Archive powered by MHonArc 2.6.18.

Top of Page