coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Xavier Leroy <Xavier.Leroy AT inria.fr>
- To: Adam Koprowski <adam.koprowski AT gmail.com>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club]Equality problem.
- Date: Mon, 10 Apr 2006 15:26:49 +0200
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
> During my work in Coq I encountered something that looks rather as an
> elementary problem but I got stucked on it nevertheless. Here is the
> relevant snippet:
>
> Variable A: Set.
> Inductive Test: Set :=
> | Elem: A -> Test
> | Pair: Test -> Test -> Test.
>
> Fact discr: forall a b, ~a = Pair a b.
> Proof. ?
>
> How can one prove discr?
By induction over a, followed by equality-related tactics (I'm quite
fond of "congruence" myself).
> I tried all varations of discriminate,
> injection etc. I could think of. Or is this equality not valid
> intuitionistically?
It is, but only because your type Test is inductive (all values of
type Test are finite trees): if it were coinductive, you could
construct an a such that a = Pair a b. So, it is not surprising that
you need to use induction to prove a property that depends crucially
on the inductive nature of your data type.
Hope this helps,
- Xavier Leroy
- [Coq-Club]Equality problem., Adam Koprowski
- Re: [Coq-Club]Equality problem., roconnor
- Re: [Coq-Club]Equality problem., Xavier Leroy
- Re: [Coq-Club]Equality problem., Andrew McCreight
- Re: [Coq-Club]Equality problem., Jean-Marc Notin
- Re: [Coq-Club]Equality problem., Conor McBride
Archive powered by MhonArc 2.6.16.