Skip to content

Commit 574f830

Browse files
committed
merge master; still has conflicts
2 parents c78a96f + 3f87ea8 commit 574f830

8,664 files changed

Lines changed: 1429981 additions & 775267 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ FROM mcr.microsoft.com/devcontainers/base:jammy
33
USER vscode
44
WORKDIR /home/vscode
55

6-
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
6+
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
77

88
ENV PATH="/home/vscode/.elan/bin:${PATH}"

.devcontainer/devcontainer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "Mathlib4 dev container",
33

4-
"build": {
5-
"dockerfile": "Dockerfile"
6-
},
4+
"image": "ghcr.io/leanprover-community/mathlib4/gitpod",
75

86
"onCreateCommand": "lake exe cache get!",
97

8+
"hostRequirements": {
9+
"cpus": 4
10+
},
11+
1012
"customizations": {
1113
"vscode" : {
1214
"extensions" : [ "leanprover.lean4" ]
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This is the Dockerfile for `leanprovercommunity/gitpod4-blueprint`.
2+
# As well as elan, we also install leanblueprint and all of its dependencies.
3+
4+
# This container does not come with a pre-installed version of mathlib.
5+
# When a gitpod container is spawned, elan will be updated and mathlib will be downloaded:
6+
# see the .gitpod.yml file for more information.
7+
8+
FROM ubuntu:jammy
9+
10+
USER root
11+
12+
ENV DEBIAN_FRONTEND=noninteractive
13+
RUN apt-get update && apt-get install sudo git curl git bash-completion texlive texlive-xetex latexmk graphviz graphviz-dev python3 python3-pip python3-requests -y && apt-get clean
14+
15+
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
16+
# passwordless sudo for users in the 'sudo' group
17+
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
18+
USER gitpod
19+
WORKDIR /home/gitpod
20+
21+
SHELL ["/bin/bash", "-c"]
22+
23+
# gitpod bash prompt
24+
RUN { echo && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1 \" (%s)\") $ '" ; } >> .bashrc
25+
26+
# install elan
27+
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
28+
29+
# install whichever toolchain mathlib is currently using
30+
RUN . ~/.profile && elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain)
31+
32+
# install neovim (for any lean.nvim user), via tarball since the appimage doesn't work for some reason, and jammy's version is ancient
33+
RUN curl -s -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz | tar xzf - && sudo mv nvim-linux-x86_64 /opt/nvim
34+
35+
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:/opt/nvim/bin:${PATH}"
36+
37+
# install leanblueprint
38+
RUN python3 -m pip install leanblueprint invoke
39+
40+
# fix the infoview when the container is used on gitpod:
41+
ENV VSCODE_API_VERSION="1.50.0"
42+
43+
# ssh to github once to bypass the unknown fingerprint warning
44+
RUN ssh -o StrictHostKeyChecking=no github.com || true
45+
46+
# run sudo once to suppress usage info
47+
RUN sudo echo finished

.docker/gitpod/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
# This is the Dockerfile for `leanprovercommunity/mathlib:gitpod`.
1+
# This is the Dockerfile for `leanprovercommunity/gitpod4`.
2+
3+
# This container does not come with a pre-installed version of mathlib.
4+
# When a gitpod container is spawned, elan will be updated and mathlib will be downloaded:
5+
# see the .gitpod.yml file for more information.
26

3-
# gitpod doesn't support multiple FROM statements, (or rather, you can't copy from one to another)
4-
# so we just install everything in one go
57
FROM ubuntu:jammy
68

79
USER root
810

9-
RUN apt-get update && apt-get install sudo git curl git bash-completion python3 python3-requests -y && apt-get clean
11+
ENV DEBIAN_FRONTEND=noninteractive
12+
RUN apt-get update && apt-get install sudo git curl git bash-completion python3 python3-pip python3-requests -y && apt-get clean
1013

1114
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
1215
# passwordless sudo for users in the 'sudo' group
@@ -20,13 +23,13 @@ SHELL ["/bin/bash", "-c"]
2023
RUN { echo && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1 \" (%s)\") $ '" ; } >> .bashrc
2124

2225
# install elan
23-
RUN curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
26+
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
2427

2528
# install whichever toolchain mathlib is currently using
2629
RUN . ~/.profile && elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain)
2730

2831
# install neovim (for any lean.nvim user), via tarball since the appimage doesn't work for some reason, and jammy's version is ancient
29-
RUN curl -s -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.tar.gz | tar xzf - && sudo mv nvim-linux64 /opt/nvim
32+
RUN curl -s -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux-x86_64.tar.gz | tar xzf - && sudo mv nvim-linux-x86_64 /opt/nvim
3033

3134
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:/opt/nvim/bin:${PATH}"
3235

.docker/lean/Dockerfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This is the Dockerfile for `leanprovercommunity/lean4`.
2+
# It is based on the generic `debian` image, and installs `elan` and the current stable version of `lean`.
3+
4+
# This container does not come with a pre-installed version of mathlib;
5+
# you should call `lake exe cache get` which will download the most recent version.
6+
# The only difference between this Dockerfile and leanprovercommunity/lean4 is that this image
7+
# bypasses a warning that could occur when trying to connect to github for the first time.
8+
9+
# NOTE: to run this docker image on macos or windows,
10+
# you will need to increase the allowed memory (in the docker GUI) beyond 2GB
11+
12+
FROM debian
13+
USER root
14+
# install prerequisites
15+
RUN apt-get update && apt-get install curl git -y && apt-get clean
16+
# create a non-root user
17+
RUN useradd -m lean
18+
19+
USER lean
20+
WORKDIR /home/lean
21+
22+
SHELL ["/bin/bash", "-c"]
23+
# set the entrypoint to be a login shell, so everything is on the PATH
24+
ENTRYPOINT ["/bin/bash", "-l"]
25+
26+
# make sure binaries are available even in non-login shells
27+
ENV PATH="/home/lean/.elan/bin:/home/lean/.local/bin:$PATH"
28+
29+
# install elan
30+
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none && \
31+
. ~/.profile && \
32+
elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib/master/leanpkg.toml | grep lean_version | awk -F'"' '{print $2}') && \
33+
elan default stable
34+
35+
# ssh to github once to bypass the unknown fingerprint warning
36+
RUN ssh -o StrictHostKeyChecking=no github.com || true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,42 @@
44
PR is merged. Please leave a blank newline before the `---`, otherwise
55
GitHub will format the text above it as a title.
66
7-
To indicate co-authors, include lines at the bottom of the commit message
8-
(that is, before the `---`) using the following format:
7+
For details on the "pull request lifecycle" in mathlib, please see:
8+
https://leanprover-community.github.io/contribute/index.html
9+
10+
In particular, note that most reviewers will only notice your PR
11+
if it passes the continuous integration checks.
12+
Please ask for help on https://leanprover.zulipchat.com if needed.
13+
14+
When merging, all the commits will be squashed into a single commit
15+
listing all co-authors.
16+
17+
Co-authors in the squash commit are gathered from two sources:
18+
19+
First, all authors of commits to this PR branch are included. Thus,
20+
one way to add co-authors is to include at least one commit authored by
21+
each co-author among the commits in the pull request. If necessary, you
22+
may create empty commits to indicate co-authorship, using commands like so:
23+
24+
git commit --author="Author Name <author@email.com>" --allow-empty -m "add Author Name as coauthor"
25+
26+
Second, co-authors can also be listed in lines at the very bottom of
27+
the commit message (that is, directly before the `---`) using the following format:
928
1029
Co-authored-by: Author Name <author@email.com>
1130
31+
If you are moving or deleting declarations, please include these lines
32+
at the bottom of the commit message (before the `---`, and also before
33+
any "Co-authored-by" lines) using the following format:
34+
35+
Moves:
36+
- Vector.* -> List.Vector.*
37+
- ...
38+
39+
Deletions:
40+
- Nat.bit1_add_bit1
41+
- ...
42+
1243
Any other comments you want to keep out of the PR commit should go
1344
below the `---`, and placed outside this HTML comment, or else they
1445
will be invisible to reviewers.
@@ -17,6 +48,7 @@ If this PR depends on other PRs, please list them below this comment,
1748
using the following format:
1849
- [ ] depends on: #abc [optional extra text]
1950
- [ ] depends on: #xyz [optional extra text]
51+
2052
-->
2153

2254
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)

.github/actionlint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
self-hosted-runner:
2+
labels:
3+
- bors
4+
- pr
5+
- doc-gen

0 commit comments

Comments
 (0)