]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/ONAG/game.ma
propagating the arithmetics library, partial commit
[helm.git] / matita / matita / contribs / ONAG / game.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* ON NUMBERS AND GAMES: MATITA SOURCE FILES
16  * Invocation:
17  *   - Patience on me to gain peace and perfection! -
18  * 2012 May 25:
19  *   specification starts.
20  *)
21
22 include "basics/pts.ma".
23 include "notation.ma".
24
25 (* GAMES ********************************************************************)
26
27 inductive Game: Type[1] ≝
28 | game: ∀L,R:Type[0]. (L → Game) → (R → Game) → Game
29 .
30
31 interpretation  "game" 'Game = Game.
32 (*
33 notation > 
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]) }.
37 *)
38 interpretation "game destructor" 'Destructor x = x.
39
40 definition pippo ≝ λx.
41 match x with [ game L R F G ⇒ x ].
42
43 (*
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]  }.
46 *)