Derivatives for Containers in Univalent Foundations
Cubical.HITs.Sn.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.HITs.Sn.Base

    module Cubical.HITs.Sn.Base where
    
    open import Cubical.HITs.Susp.Base
    open import Cubical.Foundations.Pointed
    open import Cubical.Data.Nat
    open import Cubical.Data.NatMinusOne
    open import Cubical.Data.Empty
    open import Cubical.Foundations.Prelude
    open import Cubical.Data.Bool
    open import Cubical.HITs.S1
    
    S : ℕ₋₁ → Type₀
    S neg1 = ⊥
    S (ℕ→ℕ₋₁ n) = Susp (S (-1+ n))
    
    S₊ : ℕ → Type₀
    S₊ 0 = Bool
    S₊ 1 = S¹
    S₊ (suc (suc n)) = Susp (S₊ (suc n))
    
    -- Sⁿ⁻¹
    S⁻ : ℕ → Type
    S⁻ zero = ⊥
    S⁻ (suc n) = S₊ n
    
    ptSn : (n : ℕ) → S₊ n
    ptSn zero = true
    ptSn (suc zero) = base
    ptSn (suc (suc n)) = north
    
    -- Pointed version
    S₊∙ : (n : ℕ) → Pointed₀
    S₊∙ n = (S₊ n) , ptSn n
    
    Made with Material for MkDocs