Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.

Commit e570f0b

Browse files
committed
Intro翻訳完了
1 parent 723dfa0 commit e570f0b

File tree

2 files changed

+177
-9
lines changed

2 files changed

+177
-9
lines changed

GLOSSARY.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
11
# 対訳表
22

3-
| 英語 | 日本語 |
4-
| --- | --- |
3+
| 英語 | 日本語 | 備考 |
4+
| --- | --- | --- |
5+
| core type theory | 中核となる型理論 | |
6+
| command | コマンド | |
7+
| constant | 定数 | |
8+
| definition | 定義 | |
9+
| dependent type theory | 依存型理論 | |
10+
| elaborator | エラボレータ | |
11+
| formalization | 形式化 | |
12+
| functional programming language | 関数型プログラミング言語 | |
13+
| inductive predicate | 帰納的述語 | |
14+
| inductive type | 帰納型 | |
15+
| interactive theorem prover | 対話型定理証明器 | |
16+
| kernel | カーネル | |
17+
| language server | 言語サーバ | |
18+
| monad | モナド | |
19+
| multi-threading | マルチスレッド | |
20+
| notation | 記法 |
21+
| proof checker | 証明チェッカ | |
22+
| proof state | 証明状態 | |
23+
| proof term | 証明項 | |
24+
| reference count | 参照カウント |
25+
| run-time | ランタイム | |
26+
| soundness | 健全性 | |
27+
| syntax | 構文 | |
28+
| syntax former | 構文形成器 | |
29+
| tactic | タクティク | |
30+
| Technical Terminology | 専門用語 | |
31+
| trust | 信頼 | |
532

633

734
# 英語表現をそのまま用いている単語
835

9-
| 用語 |
10-
| --- |
36+
| 用語 | 備考 |
37+
| --- | --- |
38+
| packed array | 日本語訳が見つからなかったため。System Verilogという言語にこの名前の文法要素がある? |

Manual/Intro.lean

Lines changed: 145 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,75 +14,137 @@ open Verso.Genre Manual
1414

1515
set_option pp.rawOnError true
1616

17+
/-
1718
#doc (Manual) "Introduction" =>
19+
-/
20+
#doc (Manual) "はじめに" =>
1821
%%%
1922
htmlSplit := .never
2023
%%%
2124

25+
:::comment
2226
The _Lean Language Reference_ is intended as a comprehensive, precise description of Lean.
2327
It is first and foremost a reference work in which Lean users can look up detailed information, rather than a tutorial for new users.
2428
At the moment, this reference manual is a public preview.
2529
Many sections are still to be written.
2630
For tutorials and learning materials, please visit [the Lean documentation page](https://lean-lang.org/documentation/).
31+
:::
2732

33+
_Lean 言語リファレンス_ は Lean の包括的で正確な説明を意図しています。本書は第一義的にリファレンスであり、新規ユーザ向けのチュートリアルではなく、Lean のユーザが詳細な情報を調べるためのマニュアルです。現時点では、このリファレンスマニュアルは高階プレビューです。多くの節は今なお執筆中です。チュートリアルや学習教材については [Lean のドキュメントのページ](https://lean-lang.org/documentation/) をご覧ください。
34+
35+
:::comment
2836
This document describes version {versionString}[] of Lean.
37+
:::
38+
39+
このドキュメントは Lean のバージョン {versionString}[] で記述されています。
2940

3041
# Lean
3142

43+
:::comment
3244
Lean is an *interactive theorem prover* based on dependent type theory, designed for use both in cutting-edge mathematics and in software verification.
3345
Lean's core type theory is expressive enough to capture very complicated mathematical objects, but simple enough to admit independent implementations, reducing the risk of bugs that affect soundness.
3446
The core type theory is implemented in a minimal {tech}[kernel] that does nothing other than check proof terms.
3547
This core theory and kernel are supported by advanced automation, realized in {ref "tactics"}[an expressive tactic language].
3648
Each tactic produces a term in the core type theory that is checked by the kernel, so bugs in tactics do not threaten the soundness of Lean as a whole.
3749
Along with many other parts of Lean, the tactic language is user-extensible, so it can be built up to meet the needs of a given formalization project.
3850
Tactics are written in Lean itself, and can be used immediately upon definition; rebuilding the prover or loading external modules is not required.
51+
:::
52+
53+
Lean は依存型理論に基づいた *対話型定理証明器* (interactive theorem prover)であり、最先端の数学とソフトウェア検証の両方で使用できるように設計されています。Lean の中核となる型理論は、非常に複雑な数学的対象を捉えるにあたって十分な表現力を持ちながら、独立した実装を認めるのに十分なシンプルさを持っており、健全性に影響を与えるバグのリスクを軽減しています。中核となる型理論は、証明項のチェック以外には何もしない最小限の {tech}[カーネル] (kernel)として実装されています。この中核理論とカーネルは {ref "tactics"}[表現力豊かなタクティク言語] で実現される高度な自動化によってサポートされています。各タクティクはカーネルによってチェックされる中核となる型理論の項を生成するため、タクティクにバグがあっても Lean 全体の健全性が脅かされることはありません。Lean の他の多くの部分と同様に、タクティク言語はユーザが拡張可能であるため、それぞれの形式化プロジェクトのニーズに合わせて構築することができます。タクティクは Lean 自体で記述されており、定義するとすぐに使用することができます:証明器の再ビルドや外部モジュールのロードなどは必要ありません。
3954

55+
:::comment
4056
Lean is also a pure *functional programming language*, with features such as a run-time system based on reference counting that can efficiently work with packed array structures, multi-threading, and monadic {name}`IO`.
4157
As befits a programming language, Lean is primarily implemented in itself, including the language server, build tool, {tech}[elaborator], and tactic system.
4258
This very book is written in [Verso](https://github.com/leanprover/verso), a documentation authoring tool written in Lean.
59+
:::
60+
61+
また、Lean は純粋 *関数型プログラミング言語* (functional programming language)でもあり、packed array 構造を効率的に扱うことができる参照カウントに基づくランタイムシステム・マルチスレッド・モナド {name}`IO` などの機能を備えています。プログラミング言語にふさわしく、Lean の言語サーバ・ビルドツール・ {tech}[エラボレータ] ・タクティクシステムなどはもっぱら Lean 自体で実装されています。本書もまさに [Verso](https://github.com/leanprover/verso) という Lean で書かれた文書作成ツールで書かれています。
4362

63+
:::comment
4464
Familiarity with Lean's programming features is valuable even for users whose primary interest is in writing proofs, because Lean programs are used to implement new tactics and proof automation.
4565
Thus, this reference manual does not draw a barrier between the two aspects, but rather describes them together so they can shed light on one another.
66+
:::
67+
68+
Lean のプログラムは新しいタクティクや証明の自動化を実装するために使用されるため、Lean のプログラミング機能に精通することは証明を書くことに主な関心があるユーザにとっても価値があります。したがって、このリファレンスマニュアルでは2つの側面の間に壁を設けず、むしろ互いに光を当てることができるように両者を一緒に説明しています。
4669

70+
:::comment
4771
## History
72+
:::
4873

74+
## 歴史
75+
76+
:::comment
4977
Leonardo de Moura launched the Lean project when he was at Microsoft Research in 2013, and Lean 0.1 was officially released on June 16, 2014.
5078
The goal of the Lean project is to combine the high level of trust provided by a small, independently-implementable logical kernel with the convenience and automation of tools like SMT solvers, while scaling to large problems.
5179
This vision still guides the development of Lean, as we invest in improved automation, improved performance, and user-friendliness; the trusted core proof checker is still minimal and independent implementations exist.
80+
:::
5281

82+
Leonardo de Moura は2013年に Microsoft Research 在籍時に Lean プロジェクトを立ち上げ、2014616日に Lean 0.1 が正式にリリースされました。Lean プロジェクトの目標は、独立に実装可能な小さな論理カーネル提供する高い信頼性と、SMTソルバのようなツールの利便性と自動化を組み合わせ、同時に大規模な問題にも対応できるようにすることです。このビジョンは現在も Lean の開発の指針となっており、自動化の改善・性能の向上・使いやすさの向上に投資されています;信頼されたコアな証明チェッカもまた最小限で、独立な実装が存在します。
83+
84+
:::comment
5385
The initial versions of Lean were primarily configured as C++ libraries in which client code could carry out trustworthy proofs that were independently checkable.
5486
In these early years, the design of Lean rapidly evolved towards traditional interactive provers, first with tactics written in Lua, and later with a dedicated front-end syntax.
5587
January 20, 2017 saw the first release of the Lean 3.0 series.
5688
Lean 3 achieved widespread adoption by mathematicians, and pioneered self-extensibility: tactics, notations, and top-level commands could all be defined in Lean itself.
5789
The mathematics community built Mathlib, which at the end of Lean 3 had over one million lines of formalized mathematics, with all proofs mechanically checked.
5890
The system itself, however, was still implemented in C++, which imposed limits on Lean's flexibility and made it more difficult to develop due to the diverse skills required.
91+
:::
92+
93+
Lean の初期バージョンは主に C++ ライブラリとして構成され、クライアントコードが独立してチェック可能な信頼できる証明を実行できるようになっていました。この初期の数年間で Lean の設計は、最初は Lua で書かれたタクティクからのちに専用のフロントエンド構文へと、伝統的な対話型証明器へと急速に進化しました。2017年1月20日、Lean 3.0 シリーズの最初のリリースがありました。Lean 3 は数学者に広く採用され、自己拡張性を開拓しました:タクティク・記法・トップレベルコマンドはすべて Lean 自体で定義できます。数学コミュニティは Mathlib を構築し、Lean 3 の終わり頃には数学の形式化は100万行を超え、すべての証明が機械的にチェックされていました。しかしシステム自体はまだ C++ で実装されていたため、Lean の柔軟性には限界があり、必要とされるスキルが多岐にわたるため、開発はより困難になっていました。
5994

95+
:::comment
6096
Development of Lean 4 began in 2018, culminating in the 4.0 release on September 8, 2023.
6197
Lean 4 represents an important milestone: as of version 4, Lean is self-hosted - approximately 90% of the code that implements Lean is itself written in Lean.
6298
Lean 4's rich extension API provides users with the ability to adapt it to their needs, rather than relying on the core developers to add necessary features.
6399
Additionally, self-hosting makes the development process much faster, so features and performance can be delivered more quickly; Lean 4 is faster and scales to larger problems than Lean 3.
64100
Mathlib was successfully ported to Lean 4 in 2023 through a community effort supported by the Lean developers, and it has now grown to over 1.5 million lines
65101
Even though Mathlib has grown by 50%, Lean 4 checks it faster than Lean 3 could check its smaller library.
66102
The development process for Lean 4 was approximately as long as that of all prior versions combined, and we are now delighted with its design—no further rewrites are planned.
103+
:::
104+
105+
Lean 4 の開発は2018年に始まり、2023年9月8日の4.0リリースで実を結びました。Lean 4 は重要なマイルストーンを体現しています:バージョン4の時点で、Lean はセルフホストされており、Lean を実装するコードの約90%は Lean で書かれています。Lean 4 の豊富な拡張 API は、必要な機能を追加するためにコアの開発者に依存するのではなく、ユーザに自分のニーズへ適応させる能力を提供します。さらに、セルフホスティングによって開発プロセスが大幅に高速化されたため、Lean の機能やパフォーマンスをより迅速に提供することができます;Lean 4 は Lean 3 よりも高速で、より大きな問題にも対応できるスケーラビリティを備えています。Mathlib は Lean の開発者がサポートするコミュニティの努力によって、2023年に Lean 4 への移植に成功し、現在では150万行を超えるまでに成長しました。Mathlib が50%増大したにも関わらず、Lean 4 は Lean 3 がその小さなライブラリをチェックするよりも早くチェックします。Lean 4 の開発プロセスは以前のすべてのバージョンを合わせたのと同じくらいの時間がかかりましたが、開発者たちはその設計に満足しています。これ以上の改修は予定されていません。
67106

107+
:::comment
68108
Leonardo de Moura and his co-founder, Sebastian Ullrich, launched the Lean Focused Research Organization (FRO) nonprofit in July of 2023 within Convergent Research, with philanthropic support from the Simons Foundation International, the Alfred P. Sloan Foundation, and Richard Merkin.
69109
The FRO currently has more than ten employees working to support the growth and scalability of Lean and the broader Lean community.
110+
:::
70111

112+
Leonardo de Moura と彼の共同設立者である Sebastian Ullrich は20237月、Simons Foundation International・Alfred P. Sloan Foundation・Richard Merkin からの後援を受けて、非営利団体 Lean Focused Research Organization (FRO) を Convergent Research 内に立ち上げました。FRO は現在10人以上の従業員を擁し、Lean やより広範な Lean コミュニティの成長とスケーラビリティの支援に取り組んでいます。
71113

114+
:::comment
72115
# Typographical Conventions
116+
:::
117+
118+
# 表記ルール
73119

120+
:::comment
74121
This document makes use of a number of typographical and layout conventions to indicate various aspects of the information being presented.
122+
:::
123+
124+
本書では提示される情報のさまざまな側面を示すために、多くの表記やレイアウトの慣例を用いています。
75125

126+
:::comment
76127
## Lean Code
128+
:::
129+
130+
## Lean のコード
77131

132+
:::comment
78133
This document contains many Lean code examples.
79134
They are formatted as follows:
135+
:::
136+
137+
本書には多くの Lean コードの例が含まれています。これらは次のような形式になっています:
80138

81139
````lean
82140
def hello : IO Unit := IO.println "Hello, world!"
83141
````
84142

143+
:::comment
85144
Compiler output (which may be errors, warnings, or just information) is shown both in the code and separately:
145+
:::
146+
147+
コンパイラの出力(エラー・警告・単なる情報)は、コードの中と別に表示されます:
86148

87149
````lean (name := output) (error := true)
88150
#eval s!"The answer is {2 + 2}"
@@ -92,17 +154,32 @@ theorem bogus : False := by sorry
92154
example := Nat.succ "two"
93155
````
94156

157+
:::comment
95158
Informative output, such as the result of {keywordOf Lean.Parser.Command.eval}`#eval`, is shown like this:
159+
:::
160+
161+
有益な出力、例えば {keywordOf Lean.Parser.Command.eval}`#eval` の結果などはこのように表示されます:
162+
96163
```leanOutput output (severity := information)
97164
"The answer is 4"
98165
```
99166

167+
:::comment
100168
Warnings are shown like this:
169+
:::
170+
171+
警告はこのように表示されます:
172+
101173
```leanOutput output (severity := warning)
102174
declaration uses 'sorry'
103175
```
104176

177+
:::comment
105178
Error messages are shown like this:
179+
:::
180+
181+
エラーメッセージはこのように表示されます:
182+
106183
```leanOutput output (severity := error)
107184
application type mismatch
108185
Nat.succ "two"
@@ -115,57 +192,109 @@ but is expected to have type
115192
```
116193

117194

195+
:::comment
118196
The presence of tactic proof states is indicated by the presence of small lozenges that can be clicked to show the proof state, such as after {tactic}`rfl` below:
197+
:::
198+
199+
タクティクによる証明状態の存在は、以下の {tactic}`rfl` の後のように、証明状態を表示するためにクリックできる小さな錠剤のようなマークの存在によって示されます:
200+
119201
```lean
120202
example : 2 + 2 = 4 := by rfl
121203
```
122204

123-
:::tacticExample
205+
::::tacticExample
206+
:::comment
124207
Proof states may also be shown on their own.
125208
When attempting to prove that {goal}`2 + 2 = 4`, the initial proof state is:
209+
:::
210+
証明状態は単独で示されることもあります。 {goal}`2 + 2 = 4` を証明しようとするとき、最初の証明状態は次のようになります:
126211
```pre
127212
2 + 2 = 4
128213
```
214+
:::comment
129215
After using {tacticStep}`rfl`, the resulting state is:
216+
:::
217+
{tacticStep}`rfl` を使ったのち、結果の状態は次のようになります:
130218
```post
131219

132220
```
133221

134222
```setup
135223
skip
136224
```
137-
:::
225+
::::
138226

227+
:::comment
139228
Identifiers in code examples are hyperlinked to their documentation.
229+
:::
230+
231+
コード例中の識別子はそれのドキュメントに対してハイパーリンクが張られます。
140232

233+
:::comment
141234
## Examples
235+
:::
236+
237+
## 例
142238

239+
:::comment
143240
Illustrative examples are in callout boxes, as below:
241+
:::
144242

145-
::::keepEnv
146-
:::example "Even Numbers"
243+
具体例は以下のように吹き出しの中に置かれます:
244+
245+
:::::keepEnv
246+
:::comment
247+
::example "Even Numbers"
248+
:::
249+
::::example "偶数"
250+
:::comment
147251
This is an example of an example.
252+
:::
148253

254+
これは具体例の例です。
255+
256+
:::comment
149257
One way to define even numbers is via an inductive predicate:
258+
:::
259+
260+
偶数を定義する1つの方法は、帰納的述語を使うことです:
261+
150262
```lean
151263
inductive Even : Nat → Prop where
152264
| zero : Even 0
153265
| plusTwo : Even n → Even (n + 2)
154266
```
155-
:::
156267
::::
268+
:::::
157269

270+
:::comment
158271
## Technical Terminology
272+
:::
273+
274+
## 専門用語
159275

276+
:::comment
160277
{deftech}_Technical terminology_ refers to terms used in a very specific sense when writing technical material, such as this reference.
161278
Uses of {tech}[technical terminology] are frequently hyperlinked to their definition sites, using links like this one.
279+
:::
280+
281+
{deftech}_専門用語_ とは、このようなリファレンスのような技術資料を書く際に、非常に特殊な意味で使われる用語を指します。 {tech}[専門用語] の使用はこのようなリンクを使ってその定義位置にハイパーリンクされることがよくあります。
162282

283+
:::comment
163284
## Constant, Syntax, and Tactic References
285+
:::
164286

287+
## 定数・構文・タクティクの参照
288+
289+
:::comment
165290
Definitions, inductive types, syntax formers, and tactics have specific descriptions.
166291
These descriptions are marked as follows:
292+
:::
293+
294+
定義・帰納型・構文形成器・タクティクには具体的な記述があります。これらの記述は以下のように記されています。
167295

168296
::::keepEnv
297+
:::comment
169298
```lean
170299
/--
171300
Evenness: a number is even if it can be evenly divided by two.
@@ -176,6 +305,17 @@ inductive Even : Nat → Prop where
176305
| /-- If `n` is even, then so is `n + 2`. -/
177306
plusTwo : Even n → Even (n + 2)
178307
```
308+
:::
309+
```lean
310+
/--
311+
偶:ある数が均等に2で割れるなら偶数である。
312+
-/
313+
inductive Even : Nat → Prop where
314+
| /-- ここでは0は遇だと見なす -/
315+
zero : Even 0
316+
| /-- もし `n` が遇ならば、`n + 2` も遇である。 -/
317+
plusTwo : Even n → Even (n + 2)
318+
```
179319

180320
{docstring Even}
181321

0 commit comments

Comments
 (0)