Dan's 數位πŸͺ΄εœ’

Home

❯

notes

❯

Subtype

Subtype

Feb 19, 20251 min read

  • agda
misc
{-# OPTIONS --cubical #-}
module agda.subtype where
open import Agda.Primitive
open import Cubical.Foundations.Prelude
record Subtype {β„“ β„“'} {A : Type β„“} (P : A β†’ Type β„“') : Type (β„“ βŠ” β„“') where
  field
    a : A
    prop : P a

Example

open import Cubical.Data.Nat
open import Cubical.Data.Nat.Order

m : Subtype (Ξ» (x : β„•) β†’ 1 ≀ x)
m = record { a = 10; prop = suc-≀-suc zero-≀ }

Graph View

Backlinks

  • Subtype

Created with Quartz v4.5.0 Β© 2025

  • GitHub
  • Discord Community