forked from leanprover-community/NNG4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.lean
114 lines (87 loc) · 4.14 KB
/
Game.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-- Here's the import to make Lean know about things called `Game`s
import GameServer.Commands
-- Here are the imports defining many worlds for the game `Game` (the natural number game,
-- in this case). Each world consists of a finite number of levels, and levels
-- are numbered 1,2,3,4... inside the level files.
import Game.Levels.Tutorial
import Game.Levels.Addition
import Game.Levels.Multiplication
import Game.Levels.Power
import Game.Levels.Implication
import Game.Levels.AdvAddition
import Game.Levels.LessOrEqual
import Game.Levels.AdvMultiplication
--import Game.Levels.EvenOdd
--import Game.Levels.Prime
--import Game.Levels.StrongInduction
--import Game.Levels.Hard
import Game.Levels.Algorithm
import I18n
-- Here's what we'll put on the title screen
Title "Natural Number Game"
Introduction
"
# Welcome to the Natural Number Game
#### An introduction to mathematical proof.
In this game, we will build the basic theory of the natural
numbers `{0,1,2,3,4,...}` from scratch. Our first goal is to prove
that `2 + 2 = 4`. Next we'll prove that `x + y = y + x`.
And at the end we'll see if we can prove Fermat's Last Theorem.
We'll do this by solving levels of a computer puzzle game called Lean.
# Read this.
Learning how to use an interactive theorem prover takes time.
Tests show that the people who get the most out of this game are
those who read the help texts like this one.
To start, click on \"Tutorial World\".
Note: this is a new Lean 4 version of the game containing several
worlds which were not present in the old Lean 3 version. A new version
of Advanced Multiplication World is in preparation, and worlds
such as Prime Number World and more will be appearing during October and
November 2023.
## More
Click on the three lines in the top right and select \"Game Info\" for resources,
links, and ways to interact with the Lean community.
"
Info "
*Game version: 4.2*
*Recent additions: Inequality world, algorithm world*
## Progress saving
The game stores your progress in your local browser storage.
If you delete it, your progress will be lost!
Warning: In most browsers, deleting cookies will also clear the local storage
(or \"local site data\"). Make sure to download your game progress first!
## Credits
* **Creators:** Kevin Buzzard, Jon Eugster
* **Original Lean3-version:** Kevin Buzzard, Mohammad Pedramfar
* **Game Engine:** Alexander Bentkamp, Jon Eugster, Patrick Massot
* **Additional levels:** Sian Carey, Ivan Farabella, Archie Browne.
* **Additional thanks:** All the student beta testers, all the schools
who invited Kevin to speak, and all the schoolkids who asked him questions
about the material.
## Resources
* The [Lean Zulip chat](https://leanprover.zulipchat.com/) forum
* [Original Lean3 version](https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game/) (no longer maintained)
## Problems?
Please ask any questions about this game in the
[Lean Zulip chat](https://leanprover.zulipchat.com/) forum, for example in
the stream \"New Members\". The community will happily help. Note that
the Lean Zulip chat is a professional research forum.
Please use your full real name there, stay on topic, and be nice. If you're
looking for somewhere less formal (e.g. you want to post natural number
game memes) then head on over to the [Lean Discord](https://discord.gg/WZ9bs9UCvx).
Alternatively, if you experience issues / bugs you can also open github issues:
* For issues with the game engine, please open an
[issue at the lean4game](https://github.com/leanprover-community/lean4game/issues) repo.
* For issues about the game's content, please open an
[issue at the NNG](https://github.com/hhu-adam/NNG4/issues) repo.
"
-- Dependency Implication → Power -- `Power` uses `≠` which is introduced in `Implication`
/-! Information to be displayed on the servers landing page. -/
Languages "en" "zh"
CaptionShort "The classical introduction game for Lean."
CaptionLong "In this game you recreate the natural numbers $\\mathbb{N}$ from the Peano axioms,
learning the basics about theorem proving in Lean.
This is a good first introduction to Lean!"
CoverImage "images/cover.png"
/-! Build the game. Show's warnings if it found a problem with your game. -/
MakeGame