coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Cedric Auger <sedrikov AT gmail.com>
- To: Nuno Gaspar <nmpgaspar AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] should typecheck... right
- Date: Thu, 1 Aug 2013 18:26:09 +0200
2013/8/1 Nuno Gaspar <nmpgaspar AT gmail.com>
No.
[True] lives in [Prop].
[False] lives in [Prop].
but
[x_nil] lives in [∀ n, In n nil] (which in turns lives in [Prop], but [x_nil] does not).
Note also that your context is inconsistant, I do not think that what you wrote is what you wanted.
Plus the 'l' in the type of 'x_not_nil' is not the same as the one bound in your [test] fixpoint.
Now, if you want to make it typecheck, you should first know exactly what you want.I imagine you can guess my doubt.. So why doesn't it typecheck? They both live in Prop... -_-Here follows:Hello.Well, I'm having an hard time reproducing an example I was given. I think I can resume it to the following (I'm actually not sure my simplification didn't break the original problem...but heh)
Parameter l : list nat.
Parameter x_nil : forall n:nat, In n nil.
Parameter x_not_nil : forall (n:nat), In n l.
Fixpoint test l :=
match l with
nil => x_nil
| cons e r => x_not_nil
end.
No.
[True] lives in [Prop].
[False] lives in [Prop].
but
[x_nil] lives in [∀ n, In n nil] (which in turns lives in [Prop], but [x_nil] does not).
Note also that your context is inconsistant, I do not think that what you wrote is what you wanted.
Plus the 'l' in the type of 'x_not_nil' is not the same as the one bound in your [test] fixpoint.
For instance I do not know:
– the expected type of [test] (is it "list nat → Prop" ?)
– why you put a fixpoint in a function which does not do any recursion (from my point of view, it is bad taste to put a "Fixpoint" keyword where a "Definition" keyword would work)
--
.../Sedrikov\...
- [Coq-Club] should typecheck... right, Nuno Gaspar, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Beta Ziliani, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Valentin Robert, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Cedric Auger, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Nuno Gaspar, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Cedric Auger, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Nuno Gaspar, 08/01/2013
- Re: [Coq-Club] should typecheck... right, t x, 08/02/2013
- Re: [Coq-Club] should typecheck... right, Nuno Gaspar, 08/02/2013
- Re: [Coq-Club] should typecheck... right, t x, 08/02/2013
- Re: [Coq-Club] should typecheck... right, Nuno Gaspar, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Cedric Auger, 08/04/2013
- Re: [Coq-Club] should typecheck... right, Nuno Gaspar, 08/05/2013
- Re: [Coq-Club] should typecheck... right, Cedric Auger, 08/01/2013
- Re: [Coq-Club] should typecheck... right, Nuno Gaspar, 08/01/2013
Archive powered by MHonArc 2.6.18.