Skip to content
This repository was archived by the owner on Jan 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions GLOSSARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
| identifier component | 識別子要素 | |
| identifier continuation character | 識別子継続文字 | |
| identity function | 恒等関数 | |
| immediate value | 即値 | |
| imperative | 命令型 | |
| implicit parameter | 暗黙のパラメータ | |
| inaccessible | (仮定のアクセス可否の文脈で)アクセス不能 | |
Expand All @@ -134,6 +135,7 @@
| interface | インタフェース | |
| interleave | 交互に実行する | |
| intermediate representation | 中間表現 | |
| interpolate | 補間 | |
| invariant | 不変量 | |
| kernel | カーネル | |
| keyword | キーワード | |
Expand Down Expand Up @@ -289,6 +291,7 @@
| choice node | |
| cumulative | |
| impredicativity, predicativity | |
| no confusion | |
| packed array | System Verilogという言語にこの名前の文法要素がある? |
| strict positively, negatively | 自己言及される定義の分類、定訳は無い模様 |
| prelude | |
Expand Down
43 changes: 43 additions & 0 deletions Manual/BasicTypes.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ open Verso.Genre Manual
set_option pp.rawOnError true


/-
#doc (Manual) "Basic Types" =>
-/
#doc (Manual) "基本的な型(Basic Types)" =>

:::comment
Lean includes a number of built-in datatypes that are specially supported by the compiler.
Some, such as {lean}`Nat`, additionally have special support in the kernel.
Other types don't have special compiler support _per se_, but rely in important ways on the internal representation of types for performance reasons.

:::

Lean にはコンパイラが特別にサポートする組み込みのデータ型が多数あります。 {lean}`Nat` のように、カーネルで特別にサポートされているものもあります。その他の型はコンパイラからの特別なサポート _自体_ はありませんが、パフォーマンス上の理由から型の内部表現に依存しています。

{include 0 Manual.BasicTypes.Nat}

# Integers
Expand Down Expand Up @@ -54,25 +62,60 @@ Other types don't have special compiler support _per se_, but rely in important
* Relationship between IEEE floats and decidable equality
:::

:::comment
# Characters

:::

# 文字(Characters)

{docstring Char}

:::comment
## Syntax

:::

## 構文(Syntax)

:::comment
## Logical Model



:::

## 論理モデル(Logical Model)

:::comment
## Run-Time Representation

:::

## ランタイム表現(Run-Time Representation)

:::comment
In monomorphic contexts, characters are represented as 32-bit immediate values. In other words, a field of a datatype or structure of type `Char` does not require indirection to access. In polymorphic contexts, characters are boxed.


:::

モノ射なコンテキストでは、文字は32ビットの即値として表現されます。言い換えると、`Char` 型のデータ型や構造体のフィールドにアクセスする際にインダイレクトは必要ありません。多相なコンテキストでは文字はボックス化されます。

:::comment
## API Reference

:::

## API リファレンス(API Reference)

:::comment
### Character Classes

:::

### 文字クラス(Character Classes)

{docstring Char.isAlpha}

{docstring Char.isAlphanum}
Expand Down
Loading