forked from agda/agda-stdlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmpty.agda
40 lines (28 loc) · 1.2 KB
/
Empty.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
------------------------------------------------------------------------
-- The Agda standard library
--
-- Empty type, judgementally proof irrelevant, Level-monomorphic
------------------------------------------------------------------------
{-# OPTIONS --cubical-compatible --safe #-}
module Data.Empty where
open import Data.Irrelevant using (Irrelevant)
------------------------------------------------------------------------
-- Definition
-- Note that by default the empty type is not universe polymorphic as it
-- often results in unsolved metas. See `Data.Empty.Polymorphic` for a
-- universe polymorphic variant.
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.
⊥ : Set
⊥ = Irrelevant Empty
{-# DISPLAY Irrelevant Empty = ⊥ #-}
------------------------------------------------------------------------
-- Functions
⊥-elim : ∀ {w} {Whatever : Set w} → ⊥ → Whatever
⊥-elim ()
⊥-elim-irr : ∀ {w} {Whatever : Set w} → .⊥ → Whatever
⊥-elim-irr ()