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

Commit f912f43

Browse files
committed
Language翻訳 (#10)
* 翻訳開始 * 翻訳完了
1 parent 811663e commit f912f43

File tree

9 files changed

+130
-57
lines changed

9 files changed

+130
-57
lines changed

GLOSSARY.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
| angle bracket | 角括弧 | square bracketと同じ訳語にしているが、直後にコード例がある場合も多いため文脈で見分けられる想定 |
88
| annotation | 注釈 | |
99
| anonymous constructor | 匿名コンストラクタ | |
10+
| assign | 割り当て | |
1011
| associativity | 結合性 | |
1112
| assumption | 仮定 | |
1213
| at most | 高々 | |
1314
| attribute | 属性 | |
15+
| auto-bound | 自動的に束縛された | |
1416
| backtrack | バックトラック | 後戻りと書かれる場合あり |
1517
| base case | 基本ケース | |
1618
| bijection | 全単射 | |
1719
| binder | 束縛子 | |
20+
| binding | 束縛 | |
1821
| boolean | 真偽値 | |
1922
| bound variable | 束縛変数 | |
2023
| box | ボックス化 | |
@@ -46,10 +49,12 @@
4649
| declaration | 宣言 | |
4750
| definition | 定義 | |
4851
| definitional (η-)equality | 定義上の(η)等価性 | |
52+
| definition-like | 定義に類する | |
4953
| definitional proof irrelevance | 定義上の証明の無関係性 | |
5054
| dependent | 依存的 | 後ろに何も続かない場合 |
5155
| dependent function | 依存関数 | |
5256
| dependent type theory | 依存型理論 | |
57+
| derivation | 導出 | |
5358
| deriving | 導出 | |
5459
| desugar | 脱糖 | |
5560
| disjointness | 不連結性 | |
@@ -77,6 +82,7 @@
7782
| extend | 拡張 | |
7883
| field | (構造体・クラスのメンバの意味)フィールド | |
7984
| field specifier | フィールド指定子 | |
85+
| first-class | 第一級 | |
8086
| fixed point operator | 不動点演算子 | |
8187
| fixed-width integer | 固定幅 整数 | |
8288
| formalization | 形式化 | |
@@ -94,7 +100,9 @@
94100
| identifier | 識別子 | |
95101
| identifier component | 識別子要素 | |
96102
| identifier continuation character | 識別子継続文字 | |
103+
| identity function | 恒等関数 | |
97104
| implicit parameter | 暗黙のパラメータ | |
105+
| incompatible | 互換性 | |
98106
| index, indices | 添字 | |
99107
| induction | 帰納法 | |
100108
| induction hypothese | 帰納法の仮定 | |
@@ -108,7 +116,7 @@
108116
| injectivity | 単射性 | |
109117
| instance implicit parameter | インスタンスの暗黙のパラメータ | |
110118
| instances synthesize | インスタンス合成 | |
111-
| instantiate | インスタンス化 | |
119+
| instantiate, instantiation | インスタンス化 | |
112120
| intensional | 内包的 | |
113121
| interactive theorem prover | 対話型定理証明器 | |
114122
| interface | インタフェース | |
@@ -120,9 +128,11 @@
120128
| kind || |
121129
| laziness | 遅延 | |
122130
| language server | 言語サーバ | |
131+
| least upper bound | 最小上界 | |
123132
| lemma | 補題 | |
124133
| letter | 文字 | |
125134
| letterlike | 文字様 | |
135+
| level expression | レベル式 | |
126136
| longest match | 最長一致 | |
127137
| macro | マクロ | |
128138
| machine integer | 機械整数 | |
@@ -133,6 +143,7 @@
133143
| memoization | メモ化 | |
134144
| modifier | 修飾子 | |
135145
| monad | モナド | |
146+
| monomorphism | モノ射 | |
136147
| motive | 動機 | |
137148
| multi-threading | マルチスレッド | |
138149
| mutually inductive | 相互帰納 | |
@@ -155,13 +166,15 @@
155166
| predicate | 述語 | |
156167
| pretty printer | プリティプリンタ | |
157168
| primitive | プリミティブ | |
169+
| primitive recursion | 原始再帰 | |
158170
| product type | 直積型 | |
159171
| projection function | 射影関数 | |
160172
| proof checker | 証明チェッカ | |
161173
| proof state | 証明状態 | |
162174
| proof term | 証明項 | |
163175
| qualification | 修飾 | |
164-
| quantify | 定量化 | |
176+
| quantify | 量化 | |
177+
| quantification | 量化子 | |
165178
| question mark | 疑問符 | |
166179
| quote | クォート | |
167180
| quotient type | 商型 | |
@@ -180,6 +193,7 @@
180193
| run-time | ランタイム | |
181194
| rule | 規則 | |
182195
| saturated application | 完全な適用 | 固定訳は無いように思われ、飽和では意味が分かりづらいため |
196+
| schematic definition | スキーマ的定義 | |
183197
| scope | スコープ | |
184198
| separator | 区切り文字 | |
185199
| set | (数学的な集合を意味しない場合)あつまり、(数学的な集合の場合)集合 | |
@@ -188,18 +202,21 @@
188202
| side effect | 副作用 | |
189203
| signature | シグネチャ | |
190204
| single quote | シングルクォート | |
205+
| singleton | 単集合 | |
191206
| soundness | 健全性 | |
192207
| square bracket | 角括弧 | |
193208
| specialization | 特殊化 | |
194209
| statement || |
195210
| strict implicit parameter | 厳格な暗黙のパラメータ | |
211+
| strictly | (順序の意味で)狭義 | |
196212
| strictness | 正格 | |
197213
| strong induction | 強帰納法 | |
198214
| structure | 構造体 | |
199215
| subfield | サブフィールド | |
200216
| subterm | 部分項 | |
201217
| subtype | 部分型 | |
202218
| subscript | 下付き文字 | |
219+
| substitution | 置換 | |
203220
| syntactically | 構文上 | |
204221
| syntactic sugar | 構文糖衣 | |
205222
| syntax | 構文 | |
@@ -222,6 +239,7 @@
222239
| tree || |
223240
| trivial | 自明な | |
224241
| trust | 信頼 | |
242+
| tuple | タプル | |
225243
| type class | 型クラス | |
226244
| type class instance synthesis | 型クラスインスタンス合成 | |
227245
| type signature | 型シグネチャ | |
@@ -244,10 +262,13 @@
244262
| 用語 | 備考 |
245263
| --- | --- |
246264
| choice node | |
265+
| cumulative | |
266+
| impredicativity, predicativity | |
247267
| packed array | System Verilogという言語にこの名前の文法要素がある? |
248268
| strict positively, negatively | 自己言及される定義の分類、定訳は無い模様 |
249269
| prelude | |
250270
| relevant, irrelevant | 直訳して「関係・無関係」はわかりづらいと判断 |
251271
| subject reduction | TAPLに出てくる模様 |
252272
| subsingleton | |
253-
| type ascription | Scala、Rustに同じ用語あり |
273+
| type ascription | Scala、Rustに同じ用語あり |
274+
| well-typed | |

Manual/Elaboration.lean

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open Lean (Syntax SourceInfo)
1919
/-
2020
#doc (Manual) "Elaboration and Compilation" =>
2121
-/
22-
#doc (Manual) "エラボレーションとコンパイル" =>
22+
#doc (Manual) "エラボレーションとコンパイル(Elaboration and Compilation)" =>
2323
%%%
2424
htmlSplit := .never
2525
%%%
@@ -112,7 +112,7 @@ The next command is parsed and elaborated in this updated state, and itself upda
112112
# Parsing
113113
:::
114114

115-
# パース
115+
# パース(Parsing)
116116
%%%
117117
tag := "parser"
118118
%%%
@@ -174,7 +174,7 @@ Syntax extensions are described in more detail in {ref "language-extension"}[a d
174174
# Macro Expansion and Elaboration
175175
:::
176176

177-
# マクロ展開とエラボレーション
177+
# マクロ展開とエラボレーション(Macro Expansion and Elaboration)
178178
%%%
179179
tag := "macro-and-elab"
180180
%%%
@@ -234,7 +234,7 @@ While macro expansion occurs prior to elaboration for a given “layer” of the
234234
## Info Trees
235235
:::
236236

237-
## 情報木
237+
## 情報木(Info Trees)
238238

239239
:::comment
240240
When interacting with Lean code, much more information is needed than when simply importing it as a dependency.
@@ -264,7 +264,7 @@ This can be used to add information to be used by custom code actions or other u
264264
# The Kernel
265265
:::
266266

267-
# カーネル
267+
# カーネル(The Kernel)
268268

269269
:::comment
270270
Lean's trusted {deftech}_kernel_ is a small, robust implementation of a type checker for the core type theory.
@@ -297,7 +297,7 @@ The language implemented by the kernel is a version of the Calculus of Construct
297297
カーネルが実装する言語は Calculus of Constructions の一種で、以下の特徴を持つ依存型理論です:
298298
+ 完全な依存型
299299
+ 相互に帰納的であったり、他の帰納的データ型の下で入れ子になった再帰を含んだりする帰納的に定義されたデータ型
300-
+ {tech}[impredicative] ・定義上証明と irrelevant な {tech}[propositions] の拡張的 {tech}[universe]
300+
+ {tech}[impredicative] ・定義上証明と irrelevant な {tech}[命題] の拡張的 {tech}[宇宙]
301301
+ {tech}[predicative] なデータの宇宙の非蓄積な階層
302302
* 定義上の計算規則を伴った {ref "quotients"}[商型] (Quotient type)
303303
+ 命題上の関数外延性 {margin}[関数外延性は商型を使って証明できる定理ですが、重要な帰結であるため別で挙げておきます。]
@@ -348,7 +348,7 @@ Lean の型理論には subject reduction の機能はなく、定義上の等
348348
# Elaboration Results
349349
:::
350350

351-
# エラボレーションの結果
351+
# エラボレーションの結果(Elaboration Results)
352352
%%%
353353
tag := "elaboration-results"
354354
%%%
@@ -360,7 +360,7 @@ Thus, the elaborator must translate definitions that use pattern matching and re
360360
This translation is additionally a proof that the function terminates for all potential arguments, because all functions that can be translated to recursors also terminate.
361361
:::
362362

363-
Lean のコア型理論には、パターンマッチや再帰定義は含まれていません。その代わりに、場合分けとプリミティブな再帰の両方を実装するために使用できる低レベルの {tech}[再帰子] を提供します。したがって、エラボレータはパターンマッチと再帰を使用する定義から再帰子を使用する定義に変換する必要があります。この変換はさらに、関数がすべての潜在的な引数に対して停止することの証明でもあります。なぜなら再帰子へ翻訳されるすべての関数は停止するからです。
363+
Lean のコア型理論には、パターンマッチや再帰定義は含まれていません。その代わりに、場合分けと原始再帰の両方を実装するために使用できる低レベルの {tech}[再帰子] を提供します。したがって、エラボレータはパターンマッチと再帰を使用する定義から再帰子を使用する定義に変換する必要があります。この変換はさらに、関数がすべての潜在的な引数に対して停止することの証明でもあります。なぜなら再帰子へ翻訳されるすべての関数は停止するからです。
364364

365365
:::comment
366366
The translation to recursors happens in two phases: during term elaboration, uses of pattern matching are replaced by appeals to {deftech}_auxiliary matching functions_ that implement the particular case distinction that occurs in the code.
@@ -664,7 +664,7 @@ The most important topics related to Lean's reference-counting-based allocator:
664664
# Initialization
665665
:::
666666

667-
# 初期化コード
667+
# 初期化(Initialization)
668668

669669
:::comment
670670
Before starting up, the elaborator must be correctly initialized.

Manual/Language.lean

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,43 +24,81 @@ set_option maxRecDepth 3000
2424

2525
set_option linter.unusedVariables false
2626

27+
/-
2728
#doc (Manual) "Source Files" =>
29+
-/
30+
#doc (Manual) "ソースファイル(Source Files)" =>
2831

2932
{include 0 Manual.Language.Files}
3033

3134

35+
:::comment
3236
# Module Contents
3337

38+
:::
39+
40+
# モジュールの内容(Module Contents)
41+
42+
:::comment
3443
As described {ref "module-structure"}[in the section on the syntax of files], a Lean module consists of a header followed by a sequence of commands.
3544

45+
:::
46+
47+
{ref "module-structure"}[ファイルの構文に関する節] で説明したように、Lean のモジュールはヘッダとそれに続く一連のコマンドで構成されます。
48+
49+
:::comment
3650
## Commands and Declarations
3751

52+
:::
53+
54+
## コマンドと宣言(Commands and Declaration)
55+
56+
:::comment
3857
After the header, every top-level phrase of a Lean module is a command.
3958
Commands may add new types, define new constants, or query Lean for information.
4059
Commands may even {ref "language-extension"}[change the syntax used to parse subsequent commands].
4160

61+
:::
62+
63+
ヘッダの後にある、Lean モジュールのトップレベルのフレーズはすべてコマンドです。コマンドは新しい型を追加したり、新しい定数を定義したり、Lean に情報を問い合わせたりします。コマンドは {ref "language-extension"}[後続のコマンドをパースするために使用される構文を変更する] ことさえもできます。
64+
4265
::: planned 100
4366
* Describe the various families of available commands (definition-like, `#eval`-like, etc).
4467
* Refer to specific chapters that describe major commands, such as `inductive`.
4568
:::
4669

70+
:::comment
4771
### Definition-Like Commands
4872

73+
:::
74+
75+
### 定義に類するコマンド(Definition-Like Commands)
76+
4977
::: planned 101
5078
* Precise descriptions of these commands and their syntax
5179
* Comparison of each kind of definition-like command to the others
5280
:::
5381

82+
:::comment
5483
The following commands in Lean are definition-like: {TODO}[Render commands as their name (a la tactic index)]
84+
:::
85+
86+
以下の Lean のコマンドは定義に類するものです:
87+
5588
* {syntaxKind}`def`
5689
* {syntaxKind}`abbrev`
5790
* {syntaxKind}`example`
5891
* {syntaxKind}`theorem`
5992

60-
All of these commands cause Lean to {tech key:="エラボレータ"}[elaborate]elaborator a term based on a signature.
93+
:::comment
94+
All of these commands cause Lean to {tech key:="elaborator"}[elaborate] a term based on a signature.
6195
With the exception of {syntaxKind}`example`, which discards the result, the resulting expression in Lean's core language is saved for future use in the environment.
6296
The {keywordOf Lean.Parser.Command.declaration}`instance` command is described in the {ref "instance-declarations"}[section on instance declarations].
6397

98+
:::
99+
100+
これらのコマンドはすべて Lean によってシグネチャに応じた項へ {tech key:="エラボレータ"}[エラボレート] されます。結果を破棄する {syntaxKind}`example` を除き、Lean のコア言語での結果の式は将来の環境で使用するために保存されます。
101+
64102
:::syntax Lean.Parser.Command.declaration
65103
```grammar
66104
$_:declModifiers
@@ -134,8 +172,13 @@ example $_ $_ where
134172
```
135173
:::
136174

175+
:::comment
137176
{deftech}_Opaque constants_ are defined constants that cannot be reduced to their definition.
138177

178+
:::
179+
180+
{deftech}_不透明な定数_ はそれらの定義へ簡約されない定数を定義します。
181+
139182
:::syntax Lean.Parser.Command.opaque
140183
```grammar
141184
opaque $_ $_
@@ -186,10 +229,20 @@ Describe signatures, including the following topics:
186229

187230
:::
188231

232+
:::comment
189233
### Headers
190234

235+
:::
236+
237+
### ヘッダ(Headers)
238+
239+
:::comment
191240
The {deftech}[_header_] of a definition or declaration specifies the signature of the new constant that is defined.
192241

242+
:::
243+
244+
定義または宣言の {deftech}[_ヘッダ_] (header)は定義される新しい定数のシグネチャを指定します。
245+
193246
::: TODO
194247
* Precision and examples; list all of them here
195248
* Mention interaction with autoimplicits

0 commit comments

Comments
 (0)