Skip to content

Commit 469dd28

Browse files
authored
Merge pull request #1 from monadius/lean-3.39.1
2 parents ac9d789 + 74b17f1 commit 469dd28

File tree

5 files changed

+22
-8
lines changed

5 files changed

+22
-8
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ RUN set -ex; \
1717
python3-wheel \
1818
; \
1919
# Install `leanproject`
20-
pip3 install -Iv mathlibtools==0.0.10; \
20+
pip3 install -Iv mathlibtools==1.1.0; \
2121
rm -rf /tmp/* /var/lib/apt/lists/*;
2222

2323
USER codewarrior
2424
# Install Elan to manage Lean versions
2525
RUN set -ex; \
2626
cd /tmp; \
27-
wget -q https://github.com/Kha/elan/releases/download/v0.10.2/elan-x86_64-unknown-linux-gnu.tar.gz; \
27+
wget -q https://github.com/leanprover/elan/releases/download/v1.3.1/elan-x86_64-unknown-linux-gnu.tar.gz; \
2828
tar xf elan-x86_64-unknown-linux-gnu.tar.gz; \
2929
rm elan-x86_64-unknown-linux-gnu.tar.gz; \
3030
./elan-init -y --no-modify-path; \

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ C=$(docker container create --rm -w $W ghcr.io/codewars/lean:latest lean test/So
1313
# src/Solution.lean
1414
# src/Preloaded.lean
1515
# test/SolutionTest.lean
16-
docker container cp ./. $C:$W
16+
docker container cp src $C:$W
17+
docker container cp test $C:$W
1718

1819
# Run tests
1920
docker container start --attach $C

bin/run

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
W=/workspace/
2+
# Create container
3+
C=$(docker container create --rm -w $W ghcr.io/codewars/lean:latest lean test/SolutionTest.lean)
4+
# C=$(docker container create --rm -w $W cw_lean lean test/SolutionTest.lean)
5+
6+
# Copy files from the current directory
7+
# src/Solution.lean
8+
# src/Preloaded.lean
9+
# test/SolutionTest.lean
10+
docker container cp src $C:$W
11+
docker container cp test $C:$W
12+
13+
# Run tests
14+
docker container start --attach $C

leanpkg.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "lean-challenge"
3-
version = "1.0"
4-
lean_version = "leanprover-community/lean:3.20.0"
3+
version = "2.0"
4+
lean_version = "leanprover-community/lean:3.39.1"
55
path = "src"
66

77
[dependencies]
8-
mathlib = {git = "https://github.com/leanprover-community/mathlib", rev = "da66bb81bf0466335bae82077f0c335dfe53aeb3"}
8+
mathlib = {git = "https://github.com/leanprover-community/mathlib", rev = "fb41da97816e716c002c723f7f08e103874d9f50"}

src/Solution.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Preloaded tactic
2-
open classical
32

43
-- Task 1: Prove that n + m = n + m
54
theorem immediate : ∀ n m : ℕ, n + m = n + m :=
@@ -10,4 +9,4 @@ theorem plus_comm : ∀ n m : ℕ, n + m = m + n :=
109
by intros; apply add_comm
1110

1211
-- Task 3: Prove excluded middle
13-
theorem excluded_middle : ∀ p : Prop, p ∨ ¬p := em
12+
theorem excluded_middle : ∀ p : Prop, p ∨ ¬p := classical.em

0 commit comments

Comments
 (0)