Skip to Content.
Sympa Menu

coq-club - [Coq-Club] Defining -3, -2, -1, 0, 1, 2, 3, ... in Coq

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Defining -3, -2, -1, 0, 1, 2, 3, ... in Coq


Chronological Thread 
  • From: t x <txrev319 AT gmail.com>
  • To: coq-club <coq-club AT inria.fr>
  • Subject: [Coq-Club] Defining -3, -2, -1, 0, 1, 2, 3, ... in Coq
  • Date: Thu, 10 Oct 2013 15:03:32 -0700

I know about Notations in Coq.

However, for notation, I can only map one "symbol" at a time.

Suppose I have:


Inductive Pos :=
| One : Pos
| S : Pos -> Pos.

Inductive Int :=
| IZero
| IPos : Pos -> Int
| INeg : Pos -> Int.


Is there a way I can, using only a finite number of lines,  map ..., -3, -2, -1, 0, 1, 2, 3, ... to my own definition of Int?

(or does this require delving down into the level of ocaml)

Thanks!



Archive powered by MHonArc 2.6.18.

Top of Page