coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Arthur Azevedo de Amorim <arthur.aa AT gmail.com>
- To: "Terrell, Jeffrey" <jeffrey.terrell AT kcl.ac.uk>
- Cc: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Recursion Specification Problem
- Date: Wed, 29 Jan 2014 09:52:31 -0500
I'm having difficult writing a recursive specification that would generate the nested set of match statements below. The problem is that I want to reason about the original value of c whenever the recursion terminates, and not the current value of c. For example, in the inr p3 branch, I want to reason about c1, not c3; and in the inr p2 branch, I want to reason about c1, not c2; and so on.
Any help would be much appreciated. Thanks.
Require Import List.
Inductive C : Set :=
Build_C : list A -> C
with A : Set :=
Build_A : C + P -> A
with P : Set :=
Build_P : P.
Inductive T : Set :=
Build_T : list U -> T
with U : Set :=
Build_U : U.
Variable f : C -> list U.
Variable c1 : C.
Check
(* 1 *)
match c1 with Build_C la1 =>
forall a1 : A, In a1 la1 ->
match a1 with Build_A cp1 =>
match cp1 with
inl c2 =>
(* 2 *)
match c2 with Build_C la2 =>
forall a2 : A, In a2 la2 ->
match a2 with Build_A cp2 =>
match cp2 with
inl c3 =>
(* 3 *)
match c3 with Build_C la3 =>
forall a3 : A, In a3 la3 ->
match a3 with Build_A cp3 =>
match cp3 with
inl c4 => (* 4 *) ... |
inr p3 => exists u : U, In u (f c1)
end
end
end |
inr p2 => exists u : U, In u (f c1)
end
end
end |
inr p1 => exists u : U, In u (f c1)
end
end
end.
Regards,
Jeff.
--
Arthur Azevedo de Amorim
- [Coq-Club] Recursion Specification Problem, Terrell, Jeffrey, 01/29/2014
- Re: [Coq-Club] Recursion Specification Problem, Arthur Azevedo de Amorim, 01/29/2014
Archive powered by MHonArc 2.6.18.