From: Ferruccio Guidi Date: Sat, 26 May 2012 12:47:48 +0000 (+0000) Subject: tentative specification of Conway's construction for surreal numbers X-Git-Tag: make_still_working~1690 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=39d4c08954f6c836015093095ea7a10ef80b3513;p=helm.git tentative specification of Conway's construction for surreal numbers matita.opt game.ma crashes after 4 lines of code :(( --- diff --git a/matita/matita/contribs/ONAG/game.ma b/matita/matita/contribs/ONAG/game.ma new file mode 100644 index 000000000..32da35bb1 --- /dev/null +++ b/matita/matita/contribs/ONAG/game.ma @@ -0,0 +1,46 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* ON NUMBERS AND GAMES: MATITA SOURCE FILES + * Invocation: + * - Patience on me to gain peace and perfection! - + * 2012 May 25: + * specification starts. + *) + +include "basics/pts.ma". +include "notation.ma". + +(* GAMES ********************************************************************) + +inductive Game: Type[1] ≝ +| game: ∀L,R:Type[0]. (L → Game) → (R → Game) → Game +. + +interpretation "game" 'Game = Game. +(* +notation > + "'Let' term 46 g ≡ { L , l | R , r } 'in' term 46 t" + non associative with precedence 46 + for @{ 'Destructor (match $g with [ game ${ident L} ${ident R} ${ident l} ${ident r} ⇒ $t]) }. +*) +interpretation "game destructor" 'Destructor x = x. + +definition pippo ≝ λx. +match x with [ game L R F G ⇒ x ]. + +(* +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 + for @{ match $e return $T with [ true ⇒ $t | false ⇒ $f] }. +*) \ No newline at end of file diff --git a/matita/matita/contribs/ONAG/notation.ma b/matita/matita/contribs/ONAG/notation.ma new file mode 100644 index 000000000..1dacc850e --- /dev/null +++ b/matita/matita/contribs/ONAG/notation.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR ONAG ********************************************************) + +notation "𝔾" + non associative with precedence 90 + for @{ 'Game }. diff --git a/matita/matita/contribs/ONAG/root b/matita/matita/contribs/ONAG/root new file mode 100644 index 000000000..7fc7f48ce --- /dev/null +++ b/matita/matita/contribs/ONAG/root @@ -0,0 +1 @@ +baseuri=cic:/matita/ONAG/