coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] help with automating derived UIP_refl proofs
- Date: Wed, 31 Aug 2016 23:46:48 +0000
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jasongross9 AT gmail.com; spf=Pass smtp.mailfrom=jasongross9 AT gmail.com; spf=None smtp.helo=postmaster AT mail-qt0-f182.google.com
- Ironport-phdr: 9a23:WwbiDhORBdwvgNBRVOwl6mtUPXoX/o7sNwtQ0KIMzox0KPr+rarrMEGX3/hxlliBBdydsKMdzbeO+Pu6ESxYuNDa4ShEKMQNHzY+yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9GO35F8bogtit0KjqotuIMlwO2WL2Ouk6bE3v616A7o9O2coqA51y4yOBmmFPdeVSyDEgDnOotDG42P2N+oV++T9bofMr+p0Ie6z7e6MlUe4QV2x+YChmrPHs4BLEVE6E4mYWGjEdlQMNCAzY5jn7WI3wu230rLwu9jOdOJjURKszX3yN9aBwU1e8ii4cMDg26mbMkZ1Yg6dSoRbnrBt6ld2HKLqJPeZzK/uONegRQnBMC55c
Here's the pointed version of UIP-respecting-isomorphism:
Set Implicit Arguments.
(** * Step 1: UIP ports across type isomorphism at a point. *)
Section UIP_iso.
Variables A B : Type.
Variable AtoB : A -> B.
Variable BtoA : B -> A.
Hypothesis AtoB_BtoA : forall a, AtoB (BtoA a) = a.
Lemma f_equal_cancel : forall (x y : B) (e : x = y),
e = match AtoB_BtoA x in _ = X return X = _ with
| eq_refl =>
match AtoB_BtoA y in _ = Y return _ = Y with
| eq_refl => f_equal AtoB (f_equal BtoA e)
end
end.
Proof.
intros.
subst.
simpl.
generalize (AtoB_BtoA y).
destruct e.
reflexivity.
Qed.
Theorem UIP_iso_pointed : forall (b : B) (e : b = b), f_equal BtoA e = eq_refl -> e = eq_refl.
Proof.
intros b e H.
rewrite (f_equal_cancel e), H; simpl.
case (AtoB_BtoA b); reflexivity.
Qed.
End UIP_iso.
I think the most general form here is the encode-decode method of homotopy type theory, which is a method for classifying the equality type of types. There's some code here: https://github.com/HoTT/HoTT/issues/757#issuecomment-102128029
On Wed, Aug 31, 2016 at 4:04 PM Jonathan Leivent <jonikelee AT gmail.com> wrote:
>> I wasn't able to use Adam's scheme on recursive inductive types like
>> list or nat because it requires UIP to be universal on the substructure,
>> but in an inductive proof, one only has UIP at a point on the
>> substructure via the inductive hypothesis. I tried to rewrite Adam's
>> UIP_iso proof so that it only requires UIP for the type A at a single
>> point, but failed.
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Dominique Larchey-Wendling, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
- Message not available
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jason Gross, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jason Gross, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jason Gross, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jason Gross, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jason Gross, 09/02/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Dominique Larchey-Wendling, 09/08/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jason Gross, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jason Gross, 09/01/2016
- Message not available
- Re: [Coq-Club] help with automating derived UIP_refl proofs, Jonathan Leivent, 09/01/2016
Archive powered by MHonArc 2.6.18.