coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: flaviomoura AT unb.br (Flávio Leonardo Cavalcanti de Moura)
- To: coq-club <coq-club AT inria.fr>
- Subject: [Coq-Club] renaming in inversion tactic
- Date: Sun, 22 Nov 2015 06:27:30 -0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=flaviomoura AT unb.br; spf=Pass smtp.mailfrom=flaviomoura AT unb.br; spf=None smtp.helo=postmaster AT mxb.unb.br
- Ironport-phdr: 9a23:wdDCIhCB0ErLzJginVjPUyQJP3N1i/DPJgcQr6AfoPdwSP78p8bcNUDSrc9gkEXOFd2CrakU1qyI7Ou6BT1IyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbspNaJP1QArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIYTGZn9Kq8/VPlTCCksezQ+49Suvh3eRyOO4GEdWyMYiEwbLRLC6UT0Wp7vsyz/sfdn0QGHO8ewR6p8GRqmZrlqT1fMhSABPiQ19yn8g9J5iKlSpg6g7xByi6vTfZucdaktNpjBdM8XEDISFv1aUDZMV9ux
Hi there,
I am trying to prove a property that should be straightforward, but due
to a kind of renaming of the inversion tactic, I don't know how to complete
the
proof. I am doing an adaptation of B. Pierce SF course, in which contexts (for
cbv simply typed lambda calculus) are
defined as follows:
Definition partial_map (A:Type) := var -> option A.
Definition empty {A:Type} : partial_map A := (fun _ => None).
Definition extend {A:Type} (Gamma : partial_map A) (x:var) (T : A) :=
fun x' => if eq_var_dec x x' then Some T else Gamma x'.
Definition context := partial_map ty.
I want to prove subject reduction for the (general) simply typed lambda
calculus,
so I defined consistency of contexts as follows:
Inductive ctx_cons: context -> Prop :=
| empty_cons: ctx_cons empty
| nempt_cons: forall Gamma x U, ctx_cons Gamma -> Gamma x = None -> ctx_cons
(extend Gamma x U).
Now I want to prove that:
Lemma subctx_cons: forall (Gamma:context) (x:var) (U:ty), ctx_cons (extend
Gamma x U) -> ctx_cons Gamma.
It should be straightforward by inversion tactic on the hypothesis H:
ctx_cons (extend Gamma x U), but instead of getting as hypothesis
ctx_cons Gamma, coq generates the following for the second case of the
definition:
Gamma : context
x : var
U : ty
H : ctx_cons (extend Gamma x U)
Gamma0 : context
x0 : var
U0 : ty
H1 : ctx_cons Gamma0
H2 : Gamma0 x0 = None
H0 : extend Gamma0 x0 U0 = extend Gamma x U
============================
ctx_cons Gamma
I don't see how to prove, for instance, that Gamma = Gamma0 because they
don't need to be syntactic the same...
Thanks in advance for any help.
Best regards,
Flávio.
- [Coq-Club] renaming in inversion tactic, Flávio Leonardo Cavalcanti de Moura, 11/22/2015
- Re: [Coq-Club] renaming in inversion tactic, Adam Chlipala, 11/22/2015
- Re: [Coq-Club] renaming in inversion tactic, Cedric Auger, 11/24/2015
- Re: [Coq-Club] renaming in inversion tactic, Flávio Leonardo Cavalcanti de Moura, 11/28/2015
Archive powered by MHonArc 2.6.18.