如何在agda中定义实数?

时间:2015-02-09 07:10:49

标签: agda dependent-type

我想实现Dedekind在Agda中的切入。我试图先代表实数。但我无法在Agda中定义它。如何定义??

1 个答案:

答案 0 :(得分:1)

可以在few different ways

中构建实数

根据Erret Bishop在建设性分析中构建实数,实数可以在Agda中形式化为有序数的序列以及该序列的收敛证明:

-- Constructible Real numbers as described by Bishop -- A real number is defined to be a sequence along -- with a proof that the sequence is regular record ℝ : Set where constructor Real field f : ℕ -> ℚ reg : {n m : ℕ} -> ∣ f n - f m ∣ ≤ (suc n)⁻¹ + (suc m)⁻¹

结帐this repository,了解使用此定义正式构建等价关系。

定义实数的另一种方法是使用Dedekind削减,正如@vitrus所提到的那样,在the Homotopy Type Theory book

的第11章中讨论