coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Takashi MIYAMOTO <tmiya AT bu.iij4u.or.jp>
- To: Coq-Club <coq-club AT inria.fr>
- Cc: Takashi MIYAMOTO <tmiya AT bu.iij4u.or.jp>
- Subject: [Coq-Club] Defining the function using refine
- Date: Sat, 7 Jan 2012 18:28:07 +0900
Dear all,
I am trying to write a mapping function from a list of Z to a list of subset
type ZH.
The definition of function ZHs_of_Zs fails. It seems that my usage of refine
tactic is wrong.
Could you give an advice how to write functions like this?
---
Require Import ZArith.
Parameter Max:Z.
Parameter HMax:(Max >= 2)%Z.
Definition ZH := {z:Z | (0<=z<Max)%Z}.
Definition ZHs_of_Zs(zs:list Z)(H:forall z, In z zs -> (0<=z<Max)%Z) :list ZH.
refine (fix f (zs:list Z)(_:forall z, In z zs -> (0<=z<Max)%Z):list ZH :=
match zs return (list ZH) with
| nil => nil
| z::zs' => {z|_} :: (f zs' _)
end).
---
Thank you in advance.
===================================
Takashi Miyamoto
- [Coq-Club] Solving equalities over R, Rcompute fails, Ramon Snir
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Laurent Théry
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Ramon Snir
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Frédéric Besson
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Ramon Snir
- Re: [Coq-Club] Solving equalities over R, Rcompute fails, Frédéric Besson
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Ramon Snir
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Frédéric Besson
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Ramon Snir
- [Coq-Club] Defining the function using refine, Takashi MIYAMOTO
- Message not available
- Re: [Coq-Club] Defining the function using refine,
Pierre Boutillier
- Re: [Coq-Club] Defining the function using refine, Takashi MIYAMOTO
- Message not available
- Re: [Coq-Club] Defining the function using refine,
Pierre Boutillier
- Re: [Coq-Club] Defining the function using refine, Takashi MIYAMOTO
- Re: [Coq-Club] Defining the function using refine,
AUGER Cédric
- Re: [Coq-Club] Defining the function using refine,
Hugo Herbelin
- Re: [Coq-Club] Defining the function using refine, Takashi MIYAMOTO
- Re: [Coq-Club] Defining the function using refine,
Hugo Herbelin
- Re: [Coq-Club] Defining the function using refine,
Pierre Boutillier
- Re: [Coq-Club] Defining the function using refine,
Pierre Boutillier
- Re: [Coq-Club] Solving equalities over R, Rcompute fails,
Laurent Théry
Archive powered by MhonArc 2.6.16.