Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Getting "computing" proof terms with dependent types / reduction of matches with single pattern
  • Date: Tue, 6 Sep 2016 12:48:34 -0400
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f182.google.com
  • Ironport-phdr: 9a23:AVQXYhKnXt9s34MZWdmcpTZWNBhigK39O0sv0rFitYgXLfnxwZ3uMQTl6Ol3ixeRBMOAuqsC1rud6vi/ESxYuNDa7yBEKMQNHzY+yuwo3CUYSPafDkP6KPO4JwcbJ+9lEGFfwnegLEJOE9z/bVCB6le77DoVBwmtfVEtfre9ScbuiJG80Pn38JnOaS1JgiC8aPV8NkaYtwLU4+sRh4J+Kq83gj/Eo2VFffgekWFvI1OQkhLx6++/+Zdi92JbvPd3pJ0IarnzY6ltFe8QNz8hKW1gvMA=



On 09/06/2016 12:29 PM, Jonathan Leivent wrote:


On 09/06/2016 12:12 PM, Matthieu Sozeau wrote:
...
In effect, this would be what the definitional version of uniqueness of
identity proofs (aka the K rule/axiom) would give you, i.e. it would use
type information to convert plus_n_Sm 0 1 : S (0 + 1) = 0 + S 1 to eq_refl
: 2 = 2. This rule is not part of Coq's type theory (and neither from
standard Martin-Löf Type Theory).

But, you can use Eqdep_dec.UIP_refl_nat to rewrite those match discriminees down to eq_refl.

-- Jonathan


Which is a little more difficult than I expected, but this works:

Require Import Eqdep_dec.
Goal True.
pose (vector_rev Example2_01 (nil bool)) as v.
compute in v.
pose proof (eq_refl:v=v) as E.
unfold v in E at 1.
repeat rewrite (ltac:(apply UIP_refl_nat)) in E.

-- Jonathan




Archive powered by MHonArc 2.6.18.

Top of Page