module Prim.Data.Sigma where
Primitives: Sigma typesπ
The dependent sum type, total space, or type of dependent pairs, is defined as a record, so that it enjoys definitional Ξ·.
record Ξ£ {β β'} (A : Type β) (B : A β Type β') : Type (β β β') where constructor _,_ field fst : A snd : B fst open Ξ£ public {-# BUILTIN SIGMA Ξ£ #-} infixr 4 _,_
Ξ£-syntax : β {β β'} (A : Type β) (F : A β Type β') β Type _ Ξ£-syntax X F = Ξ£ X F syntax Ξ£-syntax X (Ξ» x β F) = Ξ£[ x β X ] F infix 4 Ξ£-syntax instance Ξ£-of-instances : β {β β'} {A : Type β} {B : A β Type β'} β¦ x : A β¦ β¦ y : B x β¦ β Ξ£ A B Ξ£-of-instances β¦ x β¦ β¦ y β¦ = x , y
Similarly, for the unit type:
record β€ : Type where instance constructor tt {-# BUILTIN UNIT β€ #-}