Giter Site home page Giter Site logo

zhouxt1 / mathematics_in_lean Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leanprover-community/mathematics_in_lean

0.0 0.0 0.0 19.04 MB

The user home repository for the Mathematics in Lean tutorial.

JavaScript 1.63% CSS 0.95% HTML 84.00% Lean 13.35% Dockerfile 0.07%

mathematics_in_lean's Introduction

Mathematics in Lean

This tutorial depends on Lean 4, VS Code, and Mathlib. You can find the textbook both online and in this repository in html format or as a pdf document. The book is designed to be read as you work through examples and exercises, using a copy of this repository on your computer. Alternatively, you can use Gitpod to run Lean and VS Code in the cloud.

This version of Mathematics in Lean is designed for Lean 4 and Mathlib. For the Lean 3 version, see https://github.com/leanprover-community/mathematics_in_lean3.

To use this repository on your computer

Do the following:

  1. Install Lean 4 and VS Code following these instructions.

  2. Make sure you have git installed.

  3. Follow these instructions to fetch the mathematics_in_lean repository and open it up in VS Code.

  4. Each section in the textbook has an associated Lean file with examples and exercises. You can find them in the folder MIL, organized by chapter. We strongly recommend making a copy of that folder and experimenting and doing the exercises in that copy. This leaves the originals intact, and it also makes it easier to update the repository as it changes (see below). You can call the copy my_files or whatever you want and use it to create your own Lean files as well.

At that point, you can open the textbook in a side panel in VS Code as follows:

  1. Type ctrl-shift-P (command-shift-P in macOS).

  2. Type Lean 4: Open Documentation View in the bar that appears, and then press return. (You can press return to select it as soon as it is highlighted in the menu.)

  3. In the window that opens, click on Open documentation of current project.

The textbook and this repository are still a work in progress. You can update the repository by typing git pull followed by lake exe cache get inside the mathematics_in_lean folder. (This assumes that you have not changed the contents of the MIL folder, which is why we suggested making a copy.)

To use this repository with Gitpod

If you have a Gitpod account or are willing to sign up for one, just point your browser to https://gitpod.io/#/https://github.com/leanprover-community/mathematics_in_lean. This creates a virtual machine in the cloud, and installs Lean and Mathlib. It then presents you with a VS Code window, running in a virtual copy of the repository. We still suggest making a copy of the MIL directory, as described in step 5 in the last section. You can update the repository by opening a terminal in the browser and typing git pull followed by lake exe cache get as above.

Gitpod gives you 50 free hours every month. When you are done working, choose Stop workspace from the menu on the left. The workspace should also stop automatically 30 minutes after the last interaction or 3 minutes after closing the tab.

To restart a previous workspace, go to https://gitpod.io/workspaces/. If you change the filter from Active to All, you will see all your recent workspaces. You can pin a workspace to keep it on the list of active ones.

Contributing

PRs and issues should be opened at the upstream source repository.

mathematics_in_lean's People

Contributors

patrickmassot avatar avigad avatar zhouxt1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.