Derivatives for Containers in Univalent Foundations
Cubical.Data.Sigma.Base
Initializing search
    phijor/derivatives
    • Overview
    • Library
    phijor/derivatives
    • Overview
      • Derivative.Bag
      • Derivative.Adjunction
      • Derivative.Basics.Sum
      • Derivative.Basics.Unit
      • Derivative.Basics.W
      • Derivative.Basics.Decidable
      • Derivative.Basics.Embedding
      • Derivative.Basics.Equiv
      • Derivative.Basics.Maybe
      • Derivative.Basics.Sigma
      • Derivative.Category
      • Derivative.ChainRule
      • Derivative.Container
      • Derivative.Derivative
      • Derivative.Indexed.Mu
      • Derivative.Indexed.ChainRule
      • Derivative.Indexed.Container
      • Derivative.Indexed.Derivative
      • Derivative.Indexed.MuRule
      • Derivative.Indexed.Univalence
      • Derivative.Isolated.Base
      • Derivative.Isolated
      • Derivative.Isolated.S1
      • Derivative.Isolated.Sum
      • Derivative.Isolated.W
      • Derivative.Isolated.DependentGrafting
      • Derivative.Isolated.Grafting
      • Derivative.Isolated.Maybe
      • Derivative.Isolated.Sigma
      • Derivative.Prelude
      • Derivative.Properties
      • Derivative.Remove

    Cubical.Data.Sigma.Base

    {- Basic definitions using Σ-types
    
    Σ-types are defined in Core/Primitives as they are needed for Glue types.
    
    The file contains:
    
    - Non-dependent pair types: A × B
    - Mere existence: ∃[x ∈ A] B
    - Unique existence: ∃![x ∈ A] B
    
    -}
    module Cubical.Data.Sigma.Base where
    
    open import Cubical.Core.Primitives public
    
    open import Cubical.Foundations.Prelude
    open import Cubical.HITs.PropositionalTruncation.Base
    
    
    -- Non-dependent pair types
    
    _×_ : ∀ {ℓ ℓ'} (A : Type ℓ) (B : Type ℓ') → Type (ℓ-max ℓ ℓ')
    A × B = Σ A (λ _ → B)
    
    infixr 5 _×_
    
    
    -- Mere existence
    
    ∃ : ∀ {ℓ ℓ'} (A : Type ℓ) (B : A → Type ℓ') → Type (ℓ-max ℓ ℓ')
    ∃ A B = ∥ Σ A B ∥₁
    
    infix 2 ∃-syntax
    
    ∃-syntax : ∀ {ℓ ℓ'} (A : Type ℓ) (B : A → Type ℓ') → Type (ℓ-max ℓ ℓ')
    ∃-syntax = ∃
    
    syntax ∃-syntax A (λ x → B) = ∃[ x ∈ A ] B
    
    
    -- Unique existence
    
    ∃! : ∀ {ℓ ℓ'} (A : Type ℓ) (B : A → Type ℓ') → Type (ℓ-max ℓ ℓ')
    ∃! A B = isContr (Σ A B)
    
    infix 2 ∃!-syntax
    
    ∃!-syntax : ∀ {ℓ ℓ'} (A : Type ℓ) (B : A → Type ℓ') → Type (ℓ-max ℓ ℓ')
    ∃!-syntax = ∃!
    
    syntax ∃!-syntax A (λ x → B) = ∃![ x ∈ A ] B
    
    Made with Material for MkDocs