Skip to content
Draft
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
12 changes: 6 additions & 6 deletions src/Data/Bool/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

module Data.Bool.Base where

open import Data.Unit.Base using (⊤)
open import Data.Empty using (⊥)
open import Data.Unit.Base using (⊤)
open import Data.Empty using (⊥)
open import Level using (Level)

private
Expand Down Expand Up @@ -57,13 +57,13 @@ true xor b = not b
false xor b = b

------------------------------------------------------------------------
-- Conversion to Set
-- Conversion to Prop

-- A function mapping true to an inhabited type and false to an empty
-- type.
T : Bool → Set
T true = ⊤
T false = ⊥
T : Bool → Prop
T true = ⊤
T false = ⊥

------------------------------------------------------------------------
-- Other operations
Expand Down
17 changes: 8 additions & 9 deletions src/Data/Empty.agda
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

module Data.Empty where

open import Data.Irrelevant using (Irrelevant)

------------------------------------------------------------------------
-- Definition

Expand All @@ -20,15 +18,16 @@ open import Data.Irrelevant using (Irrelevant)
private
data Empty : Set where

-- ⊥ is defined via Data.Irrelevant (a record with a single irrelevant
-- field) so that Agda can judgementally declare that all proofs of ⊥
-- are equal to each other. In particular this means that all functions
-- returning a proof of ⊥ are equal.
-- ⊥ is defined a record with a single irrelevant so that Agda can judgementally
-- declare that all proofs of ⊥ are equal to each other. In particular this
-- means that all functions returning a proof of ⊥ are equal.

⊥ : Set
⊥ = Irrelevant Empty
data ⊥ₚ : Prop where

{-# DISPLAY Irrelevant Empty = ⊥ #-}
-- TOOD: make a generic Prop → Set record
record ⊥ : Set where
constructor [_]
field bot : ⊥ₚ

------------------------------------------------------------------------
-- Functions
Expand Down
6 changes: 6 additions & 0 deletions src/Data/Unit/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ module Data.Unit.Base where

open import Agda.Builtin.Unit public
using (⊤; tt)

------------------------------------------------------------------------
-- A propositional variant of ⊤

record ⊤ₚ : Prop where
instance constructor tt
1 change: 1 addition & 0 deletions standard-library.agda-lib
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
name: standard-library-3.0
include: src
flags: --prop
Loading