Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Nested Fixpoint

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Nested Fixpoint


Chronological Thread 
  • From: "Terrell, Jeffrey" <jeffrey.terrell AT kcl.ac.uk>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Nested Fixpoint
  • Date: Wed, 8 Jan 2014 15:41:15 +0000
  • Accept-language: en-GB, en-US

Hi,

It is possible to reorganise the following example (which is not meant to do
anything useful) so that the definition of g is not contained within f?

Inductive A : Set :=
Build_A : list B -> A
with B : Set :=
Build_B : A -> B.

Fixpoint f (a : A ) : list B :=
match a with Build_A l =>
(fix g (l : list B) : list B :=
match l with
nil => nil |
b :: l' => b :: g l' ++ h b
end) l
end
with h (b : B) : list B :=
match b with Build_B a =>
f a
end.

Thanks.

Regards,
Jeff.


Archive powered by MHonArc 2.6.18.

Top of Page