1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Lean + Mathlib + VS Code の環境を構築してみる

1
Last updated at Posted at 2026-06-06

環境

MacOS

% sw_vers
ProductName:            macOS
ProductVersion:         15.6.1

とはいえ Mac に限らず、 Windows や Linux でも同じ手順で環境構築できるように整備されているはず。

VS Code はインストール済み。

% code --version
1.123.0
6a44c352bd24569c417e530095901b649960f9f8
arm64

インストール

拡張機能をインストールしたら以下のような VS Code 内のセットアップガイドが表示された。これに従いインストールする。

image.png

% lean --version
Lean (version 4.30.0, arm64-apple-darwin24.6.0, commit d024af099ca4bf2c86f649261ebf59565dc8c622, Release)

プロジェクトを作成

様々な数学的な対象を扱えると噂の Mathlib を触ってみたい。なので今回は Create a new project using Mathlib を選択した。

image.png

Mathlib がインストールされていないとのプロンプトが表示されたが、 OK をクリックすると自動的にインストールされ始めた。


プロジェクトが作成できました :tada:

image.png

次のステップ

環境構築はできたので以下の動画を参考にして数学の証明を試してみたいと思います。

体系的に学ぶには以下のドキュメントを読むのが良さそうです。
https://leanprover-community.github.io/mathematics_in_lean/

(おまけ) Mathematics in Lean を読む環境の構築

VS Code 内の Lean のアイコンから Download Project を選択。

image.png

Mathematics in Learn を選択すると例題をダウンロードできる。

image.png

ローカルで色々試しながら学べる。

image.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?