1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* ON NUMBERS AND GAMES: MATITA SOURCE FILES
17 * - Patience on me to gain peace and perfection! -
19 * specification starts.
22 include "basics/pts.ma".
23 include "notation.ma".
25 (* GAMES ********************************************************************)
27 inductive Game: Type[1] ≝
28 | game: ∀L,R:Type[0]. (L → Game) → (R → Game) → Game
31 interpretation "game" 'Game = Game.
34 "'Let' term 46 g ≡ { L , l | R , r } 'in' term 46 t"
35 non associative with precedence 46
36 for @{ 'Destructor (match $g with [ game ${ident L} ${ident R} ${ident l} ${ident r} ⇒ $t]) }.
38 interpretation "game destructor" 'Destructor x = x.
40 definition pippo ≝ λx.
41 match x with [ game L R F G ⇒ x ].
44 notation < "hvbox('if' \nbsp term 46 e \nbsp break 'then' \nbsp term 46 t \nbsp break 'else' \nbsp term 49 f \nbsp)" non associative with precedence 46
45 for @{ match $e return $T with [ true ⇒ $t | false ⇒ $f] }.