Skip to Content.
Sympa Menu

coq-club - [Coq-Club] "Matching" on non-inductive types

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] "Matching" on non-inductive types


Chronological Thread 
  • From: Christian Doczkal <doczkal AT ps.uni-saarland.de>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: [Coq-Club] "Matching" on non-inductive types
  • Date: Thu, 3 Apr 2014 18:13:17 +0200

Hello

I was surprised to find out that the following does not generate any errors:

Goal forall (X Y : Type) (s : X) (p : X -> Y),
(let x := s in p x) = (match s with x => p x end).
reflexivity.

Printing reveals, that the match above is probably eliminated before type
checking. Nevertheless I find it strange that this input syntax is allowed.

Is this a bug or a feature? I suspect it has something to do with the match
compilation.

--
Regards
Christian


Archive powered by MHonArc 2.6.18.

Top of Page