Files
NNG/Game.lean

115 lines
4.2 KiB
Lean4
Raw Normal View History

2023-09-21 15:55:45 +01:00
-- Here's the import to make Lean know about things called `Game`s
2023-04-25 18:37:27 +02:00
import GameServer.Commands
2023-10-09 07:55:07 +01:00
-- 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.
2023-05-15 15:05:02 +02:00
import Game.Levels.Tutorial
import Game.Levels.Addition
2023-08-12 05:01:29 +01:00
import Game.Levels.Multiplication
import Game.Levels.Power
2023-10-11 17:53:51 +01:00
import Game.Levels.Implication
2023-10-01 20:43:54 +01:00
import Game.Levels.AdvAddition
2023-10-13 19:11:24 +01:00
import Game.Levels.LessOrEqual
2023-10-31 01:19:56 +00:00
import Game.Levels.AdvMultiplication
--import Game.Levels.EvenOdd
--import Game.Levels.Prime
--import Game.Levels.StrongInduction
--import Game.Levels.Hard
2023-10-27 18:24:50 +01:00
import Game.Levels.Algorithm
2024-03-27 01:39:16 +01:00
import I18n
2023-08-12 05:01:29 +01:00
2023-09-21 15:55:45 +01:00
-- Here's what we'll put on the title screen
2023-09-01 20:10:13 +02:00
Title "Natural Number Game"
2023-04-25 18:37:27 +02:00
Introduction
"
2023-09-01 12:12:17 +02:00
# Welcome to the Natural Number Game
#### An introduction to mathematical proof.
2023-04-25 18:37:27 +02:00
2023-09-21 16:36:17 +01:00
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`.
2023-09-21 16:36:17 +01:00
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.
2023-04-25 18:37:27 +02:00
2023-10-09 07:55:07 +01:00
# 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\".
2023-09-21 16:17:39 +01:00
Note: this is a new Lean 4 version of the game containing several
worlds which were not present in the old Lean 3 version. More new worlds
such as Strong Induction World, Even/Odd World and Prime Number World
are in development; if you want to see their state or even help out, checkout
out the [issues in the github repo](https://github.com/leanprover-community/NNG4/issues).
2023-10-02 17:36:27 +01:00
2023-09-01 12:12:17 +02:00
## More
2023-10-22 15:50:20 +01:00
Click on the three lines in the top right and select \"Game Info\" for resources,
2023-09-21 17:11:26 +01:00
links, and ways to interact with the Lean community.
2023-09-01 12:12:17 +02:00
"
Info "
*Game version: 4.3*
2023-10-02 17:36:27 +01:00
*Recent additions: bug fixes*
2023-04-25 18:37:27 +02:00
2023-09-01 12:12:17 +02:00
## Progress saving
The game stores your progress in your local browser storage.
2023-04-25 18:37:27 +02:00
If you delete it, your progress will be lost!
2023-09-01 12:12:17 +02:00
Warning: In most browsers, deleting cookies will also clear the local storage
(or \"local site data\"). Make sure to download your game progress first!
2023-04-25 18:37:27 +02:00
## Credits
2023-09-21 15:55:45 +01:00
* **Creators:** Kevin Buzzard, Jon Eugster
2023-04-25 18:37:27 +02:00
* **Original Lean3-version:** Kevin Buzzard, Mohammad Pedramfar
* **Game Engine:** Alexander Bentkamp, Jon Eugster, Patrick Massot
2023-09-21 15:55:45 +01:00
* **Additional levels:** Sian Carey, Ivan Farabella, Archie Browne.
2023-09-21 16:43:52 +01:00
* **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.
2023-04-25 18:37:27 +02:00
## Resources
* The [Lean Zulip chat](https://leanprover.zulipchat.com/) forum
2023-09-21 15:55:45 +01:00
* [Original Lean3 version](https://www.ma.imperial.ac.uk/~buzzard/xena/natural_number_game/) (no longer maintained)
2023-09-01 12:12:17 +02:00
## 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).
2023-09-01 12:12:17 +02:00
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.
2023-04-25 18:37:27 +02:00
"
2023-10-16 17:46:50 +02:00
-- Dependency Implication → Power -- `Power` uses `≠` which is introduced in `Implication`
2023-12-08 01:31:15 +01:00
/-! Information to be displayed on the servers landing page. -/
Languages "en" "zh" "uk" "it" "fr"
2023-12-08 01:31:15 +01:00
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. -/
2023-04-25 18:37:27 +02:00
MakeGame