MFPS2026-Agda
Empty
Initializing search
    pdmosses/mfps2026-agda
    • About
    • Notation
    • Examples
    • Properties
    • Tests
    • Library
    pdmosses/mfps2026-agda
    • About
      • Background
      • Meta-notation
    • Notation
    • Examples
      • LC
        • Abstract-Syntax
        • Domain-Equations
        • Semantic-Functions
      • PCF
        • Abstract-Syntax
        • Domain-Equations
        • Semantic-Functions
      • Scm
        • Abstract-Syntax
        • Auxiliary-Functions
        • Domain-Equations
        • Semantic-Functions
    • Properties
    • Tests
      • LC
      • PCF
      • Scm
    • Library
          • Bool
          • Char
          • Equality
            • Rewrite
          • Int
          • List
          • Maybe
          • Nat
          • Sigma
          • String
          • Unit
        • Primitive
          • Raw
        • Core
          • RawMagma
          • Base
          • Base
        • Empty
          • Polymorphic
          • Base
          • Base
        • Irrelevant
          • Base
            • Base
                • Core
                • Base
          • Base
          • Base
          • Base
          • Base
          • Base
          • Base
          • Base
          • Base
          • Base
            • Base
          • Base
        • Base
        • Bundles
        • Consequences
          • Propositional
          • Setoid
        • Definitions
        • Structures
      • Level
          • Bundles
            • Raw
          • Consequences
              • Reflexive
            • Composition
              • Core
          • Core
          • Definitions
              • Core
            • Setoid
            • Core
            • Properties
            • Syntax
          • Structures
        • Nullary
          • Decidable
            • Core
          • Irrelevant
            • Core
          • Recomputable
            • Core
          • Reflects
        • Unary
          • Properties
    1. Library
    2. Data
    3. Empty

    Empty

    ------------------------------------------------------------------------
    -- 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 ()
    
    Previous
    Base
    Next
    Polymorphic
    Made with Material for MkDocs