------------------------------------------------------------------------
-- The types Dedicated-star and No-dedicated-star
------------------------------------------------------------------------

import Graded.Modality

module Graded.Modality.Dedicated-star
  {a} {M : Set a}
  (open Graded.Modality M)
  (š•„ : Modality)
  where

open Modality š•„

open import Tools.Empty
open import Tools.Function
open import Tools.Nullary
open import Tools.PropositionalEquality

private variable
  A : Set _

------------------------------------------------------------------------
-- Dedicated-star

-- A wrapper type, intended to be used in the types of instance
-- arguments.

record Dedicated-star : Set a where
  constructor dedicated-star
  field
    star : āŠ›-available

-- This wrapper type is propositional.

Dedicated-star-propositional : (p q : Dedicated-star) ā†’ p ā‰” q
Dedicated-star-propositional (dedicated-star sā‚) (dedicated-star sā‚‚) =
  cong dedicated-star (āŠ›-available-propositional sā‚ sā‚‚)

------------------------------------------------------------------------
-- No-dedicated-star

-- A wrapper type, intended to be used in the types of instance
-- arguments.

record No-dedicated-star : Set a where
  constructor no-dedicated-star
  field
    no-star : Ā¬ āŠ›-available

------------------------------------------------------------------------
-- Some lemmas related to both Dedicated-star and No-dedicated-star

-- One cannot both have and not have a dedicated natrec-star operator.

not-star-and-no-star :
  ā¦ƒ star : Dedicated-star ā¦„ ā¦ƒ no-star : No-dedicated-star ā¦„ ā†’ āŠ„
not-star-and-no-star
  ā¦ƒ star = dedicated-star s ā¦„ ā¦ƒ no-star = no-dedicated-star ns ā¦„ =
  ns s

-- The property of either having or not having a dedicated natrec-star
-- operator.

data Dedicated-star? : Set a where
  does-have-star     : ā¦ƒ has-star : Dedicated-star ā¦„ ā†’ Dedicated-star?
  does-not-have-star : ā¦ƒ no-star : No-dedicated-star ā¦„ ā†’ Dedicated-star?

-- One either has or does not have a dedicated natrec-star operator.

dedicated-star? : Dedicated-star?
dedicated-star? = case āŠ›-available-decided of Ī» where
  (yes has-star) ā†’ does-have-star ā¦ƒ has-star = dedicated-star has-star ā¦„
  (no no-star)   ā†’
    does-not-have-star ā¦ƒ no-star = no-dedicated-star no-star ā¦„