auto gitdoc commit
This commit is contained in:
parent
9b55a90c5e
commit
fc151b6421
7 changed files with 8 additions and 70 deletions
|
@ -1,8 +0,0 @@
|
|||
module Dedekind.Bool where
|
||||
|
||||
-- Booleans
|
||||
data Bool : Set where
|
||||
true : Bool
|
||||
false : Bool
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
module Dedekind.Integer where
|
||||
|
||||
open import Dedekind.Natural using (ℕ)
|
||||
|
||||
-- Integers
|
||||
data ℤ : Set where
|
||||
pos : ℕ → ℤ
|
||||
negsuc : ℕ → ℤ
|
|
@ -1,15 +0,0 @@
|
|||
module Dedekind.Natural where
|
||||
|
||||
open import Dedekind.Set using (⊤; ⊥)
|
||||
|
||||
-- Natural
|
||||
data ℕ : Set where
|
||||
zero : ℕ
|
||||
suc : ℕ → ℕ
|
||||
|
||||
NonZero : ℕ → Set
|
||||
NonZero zero = ⊥
|
||||
NonZero (suc n) = ⊤
|
||||
|
||||
gcd : (x y : ℕ) .{{ _ : NonZero x }} .{{ _ : NonZero y }} → ℕ
|
||||
gcd x y = ?
|
|
@ -1,12 +0,0 @@
|
|||
module Dedekind.Rational where
|
||||
|
||||
open import Dedekind.Bool using (Bool)
|
||||
open import Dedekind.Integer using (ℤ)
|
||||
open import Dedekind.Natural using (ℕ; NonZero)
|
||||
|
||||
-- Rational
|
||||
data ℚ : Set where
|
||||
rat : ℤ → (d : ℕ) .{{ _ : NonZero d }} → ℚ
|
||||
|
||||
_<_ : ℚ → ℚ → Bool
|
||||
x < y = ?
|
|
@ -1,20 +0,0 @@
|
|||
-- Dedekind cuts using Cubical Agda
|
||||
{-# OPTIONS --cubical #-}
|
||||
|
||||
module Dedekind.Real where
|
||||
|
||||
open import Dedekind.Rational using (ℚ; _<_)
|
||||
|
||||
-- Dedekind cuts
|
||||
record ℝ : Set where
|
||||
constructor real
|
||||
field
|
||||
lower : (ℚ → Bool)
|
||||
closed : ∀ (x y : ℚ) → x < y
|
||||
|
||||
-- Operations on reals
|
||||
_+_ : ℝ → ℝ → ℝ
|
||||
a + b = real
|
||||
(λ q → ℝ.lower a q)
|
||||
|
||||
-- Properties of reals
|
|
@ -1,6 +0,0 @@
|
|||
module Dedekind.Set where
|
||||
|
||||
record ⊥ : Set where
|
||||
|
||||
record ⊤ : Set where
|
||||
instance constructor tt
|
|
@ -14,13 +14,20 @@ isSet : (A : Set) → Set
|
|||
isSet A = (x y : A) → (p q : x ≡ y) → p ≡ q
|
||||
```
|
||||
|
||||
### Example 3.1.1
|
||||
### Example 3.1.2
|
||||
|
||||
```
|
||||
𝟙-is-Set : isSet 𝟙
|
||||
𝟙-is-Set tt tt p q = {! !}
|
||||
```
|
||||
|
||||
### Example 3.1.3
|
||||
|
||||
```
|
||||
⊥-is-Set : isSet ⊥
|
||||
⊥-is-Set () () p q
|
||||
```
|
||||
|
||||
## 3.2 Propositions as types?
|
||||
|
||||
## 3.4 Classical vs. intuitionistic logic
|
||||
|
|
Loading…
Reference in a new issue