Skip to Content.
Sympa Menu

coq-club - [Coq-Club] A warning of Functional Scheme, and Program Scheme

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] A warning of Functional Scheme, and Program Scheme


chronological Thread 
  • From: Jianzhou Zhao <jianzhou AT seas.upenn.edu>
  • To: coq-club AT inria.fr
  • Subject: [Coq-Club] A warning of Functional Scheme, and Program Scheme
  • Date: Tue, 20 Apr 2010 09:35:10 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=QtIw9eY04PFekDFm1MtOQKDIuj0ewdeB8OxzZQb3+lwFYbdGz76ADpTlu19GUESoNu F4s3bs36BLtgN6gKXtUp8a1Dx16P6yiWuGqYgD0rBlfSk88xtIsxw9XlaHuzrNs2H77O sYRegky7cyEC59uM2T+Idil+57bWhSFI96pIo=

Hi,

I got "Warning: Cannot define principle(s) for div2"
when generating functional inductive scheme:

Require Import Omega.
Definition test (n:nat) := n + 1.
Function div2 (n:nat) {measure (fun n'=>n')} : nat :=
 match n with
 | O => 0
 | S O => 0
 | S (S n') => S (div2 (test n'))
 end.
intros. subst. unfold test. omega. Qed.

Functional Scheme div2_ind := Induction for div2 Sort Prop.

>> Warning: Cannot define principle(s) for div2

But I can still use div2_ind for induction proofs.

Lemma div2_le' : forall n:nat, div2 n <= n.
intro n.
functional induction (div2 n).
auto. auto. unfold test in *. omega.
Qed.

If I defined 'div2' by recursion on {struct...}, it doesn't
report this warning. Does this warning affect anything
for a well-found measure Function?

"Program Fixpoint" is another feature for programming in Coq.
I found it is more convenient if the definition replies on
equalities from pattern-matching. Does "Program Fixpoint"
also support "inductive scheme"? Do we have any applications
which proved inductive properties for "Program Fixpoint"?

Thanks
-- 
Jianzhou



Archive powered by MhonArc 2.6.16.

Top of Page