coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Benoit Montagu <benoit.montagu AT m4x.org>
- To: Randy Pollack <rpollack AT inf.ed.ac.uk>
- Cc: Coq-Club Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Dependent pattern matching?
- Date: Thu, 11 Oct 2012 00:34:10 -0400
Definition mapp (l:ZZNZ) (m:Map l) (r:ZZNZ) (n:Map zr) :
Map (mappIndx l r) :=
match l, r return Map (mappIndx l r) with
| ZZ, ZZ => mx0
| NZ, ZZ => mconsl m n
| ZZ, NZ => mconsr m n
| NZ, NZ => mconsb m n
end.
This last definition is not accepted. How should this be defined?
The following definition works:
Definition mapp (l:ZZNZ) (m:Map l) (r:ZZNZ) (n:Map r) :
Map (mappIndx l r) :=
match m in Map l', n in Map r' return Map (mappIndx l' r') with
| mx0, mx0 => mx0
| m', mx0 as n' => mconsl m' n'
| mx0 as m', n' => mconsr m' n'
| m', n' => mconsb m' n'
end.
-- Benoit
- [Coq-Club] Dependent pattern matching?, Randy Pollack, 10/11/2012
- Re: [Coq-Club] Dependent pattern matching?, Matthieu Sozeau, 10/11/2012
- Re: [Coq-Club] Dependent pattern matching?, Benoit Montagu, 10/11/2012
Archive powered by MHonArc 2.6.18.