Skip to content

Commit 35fc51a

Browse files
authored
Merge branch 'leanprover-community:master' into unique_riesz
2 parents 6cccdd4 + d5d137a commit 35fc51a

7,221 files changed

Lines changed: 1916099 additions & 0 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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM mcr.microsoft.com/devcontainers/base:jammy
2+
3+
USER vscode
4+
WORKDIR /home/vscode
5+
6+
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
7+
8+
ENV PATH="/home/vscode/.elan/bin:${PATH}"

.devcontainer/devcontainer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "Mathlib4 dev container",
3+
4+
"image": "ghcr.io/leanprover-community/mathlib4/gitpod",
5+
6+
"onCreateCommand": "lake exe cache get!",
7+
8+
"hostRequirements": {
9+
"cpus": 4
10+
},
11+
12+
"customizations": {
13+
"vscode" : {
14+
"extensions" : [ "leanprover.lean4" ]
15+
}
16+
}
17+
}
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: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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.
6+
7+
FROM ubuntu:jammy
8+
9+
USER root
10+
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
13+
14+
RUN useradd -l -u 33333 -G sudo -md /home/gitpod -s /bin/bash -p gitpod gitpod \
15+
# passwordless sudo for users in the 'sudo' group
16+
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
17+
USER gitpod
18+
WORKDIR /home/gitpod
19+
20+
SHELL ["/bin/bash", "-c"]
21+
22+
# gitpod bash prompt
23+
RUN { echo && echo "PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1 \" (%s)\") $ '" ; } >> .bashrc
24+
25+
# install elan
26+
RUN curl https://elan.lean-lang.org/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
27+
28+
# install whichever toolchain mathlib is currently using
29+
RUN . ~/.profile && elan toolchain install $(curl https://raw.githubusercontent.com/leanprover-community/mathlib4/master/lean-toolchain)
30+
31+
# install neovim (for any lean.nvim user), via tarball since the appimage doesn't work for some reason, and jammy's version is ancient
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
33+
34+
ENV PATH="/home/gitpod/.local/bin:/home/gitpod/.elan/bin:/opt/nvim/bin:${PATH}"
35+
36+
# fix the infoview when the container is used on gitpod:
37+
ENV VSCODE_API_VERSION="1.50.0"
38+
39+
# ssh to github once to bypass the unknown fingerprint warning
40+
RUN ssh -o StrictHostKeyChecking=no github.com || true
41+
42+
# run sudo once to suppress usage info
43+
RUN sudo echo finished

.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/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Please see [our contribution guide](https://leanprover-community.github.io/contribute/index.html) on our website.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
---
3+
<!-- The text above the `---` will become the commit message when your
4+
PR is merged. Please leave a blank newline before the `---`, otherwise
5+
GitHub will format the text above it as a title.
6+
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+
To indicate co-authors, include at least one commit authored by each
15+
co-author among the commits in the pull request. If necessary, you may
16+
create empty commits to indicate co-authorship, using commands like so:
17+
18+
git commit --author="Author Name <author@email.com>" --allow-empty -m "add Author Name as coauthor"
19+
20+
When merging, all the commits will be squashed into a single commit listing all co-authors.
21+
22+
If you are moving or deleting declarations, please include these lines at the bottom of the commit message
23+
(that is, before the `---`) using the following format:
24+
25+
Moves:
26+
- Vector.* -> List.Vector.*
27+
- ...
28+
29+
Deletions:
30+
- Nat.bit1_add_bit1
31+
- ...
32+
33+
Any other comments you want to keep out of the PR commit should go
34+
below the `---`, and placed outside this HTML comment, or else they
35+
will be invisible to reviewers.
36+
37+
If this PR depends on other PRs, please list them below this comment,
38+
using the following format:
39+
- [ ] depends on: #abc [optional extra text]
40+
- [ ] depends on: #xyz [optional extra text]
41+
42+
-->
43+
44+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)

.github/actionlint.yml

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

0 commit comments

Comments
 (0)