Use prelude everywhere

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-21 14:56:43 +01:00
parent 29f45d1426
commit ae0ff092f8
11 changed files with 25 additions and 65 deletions

View File

@ -1,36 +1,33 @@
module Cat.Categories.CwF where
open import Agda.Primitive
open import Data.Product
open import Cat.Prelude
open import Cat.Category
open import Cat.Category.Functor
open import Cat.Categories.Fam
open Category
open Functor
module _ {a b : Level} where
record CwF : Set (lsuc (a b)) where
-- "A category with families consists of"
field
-- "A base category"
: Category a b
module = Category
-- It's objects are called contexts
Contexts = Object
Contexts = .Object
-- It's arrows are called substitutions
Substitutions = Arrow
Substitutions = .Arrow
field
-- A functor T
T : Functor (opposite ) (Fam a b)
-- Empty context
[] : Terminal
[] : .Terminal
private
module T = Functor T
Type : (Γ : Object ) Set a
Type : (Γ : .Object) Set a
Type Γ = proj₁ (proj₁ (T.omap Γ))
module _ {Γ : Object } {A : Type Γ} where
module _ {Γ : .Object} {A : Type Γ} where
-- module _ {A B : Object } {γ : [ A , B ]} where
-- k : Σ (proj₁ (omap T B) → proj₁ (omap T A))
@ -46,7 +43,7 @@ module _ {a b : Level} where
record ContextComprehension : Set (a b) where
field
Γ&A : Object
Γ&A : .Object
proj1 : [ Γ&A , Γ ]
-- proj2 : ????

View File

@ -1,11 +1,9 @@
{-# OPTIONS --allow-unsolved-metas #-}
module Cat.Categories.Free where
open import Agda.Primitive
open import Relation.Binary
open import Cat.Prelude hiding (Path ; empty)
open import Cubical hiding (Path ; empty)
open import Data.Product
open import Relation.Binary
open import Cat.Category
@ -60,7 +58,7 @@ module _ {a b : Level} ( : Category a b) where
open Univalence isIdentity
module _ {A B : .Object} where
arrowsAreSets : Cubical.isSet (Path .Arrow A B)
arrowsAreSets : isSet (Path .Arrow A B)
arrowsAreSets a b p q = {!!}
eqv : isEquiv (A B) (A B) (Univalence.id-to-iso isIdentity A B)

View File

@ -1,13 +1,7 @@
{-# OPTIONS --allow-unsolved-metas --cubical #-}
module Cat.Categories.Fun where
open import Agda.Primitive
open import Data.Product
open import Cubical
open import Cubical.GradLemma
open import Cubical.NType.Properties
open import Cat.Prelude
open import Cat.Category
open import Cat.Category.Functor hiding (identity)

View File

@ -1,12 +1,8 @@
{-# OPTIONS --cubical --allow-unsolved-metas #-}
module Cat.Categories.Rel where
open import Cubical
open import Cubical.GradLemma
open import Agda.Primitive
open import Data.Product renaming (proj₁ to fst ; proj₂ to snd)
open import Cat.Prelude renaming (proj₁ to fst ; proj₂ to snd)
open import Function
import Cubical.FromStdLib
open import Cat.Category
@ -74,7 +70,7 @@ module _ {A B : Set} {S : Subset (A × B)} (ab : A × B) where
equi : (Σ[ a' A ] (a , a') Diag A × (a' , b) S)
(a , b) S
equi = backwards Cubical.FromStdLib., isequiv
equi = backwards , isequiv
ident-r : (Σ[ a' A ] (a , a') Diag A × (a' , b) S)
(a , b) S
@ -108,7 +104,7 @@ module _ {A B : Set} {S : Subset (A × B)} (ab : A × B) where
equi : (Σ[ b' B ] (a , b') S × (b' , b) Diag B)
ab S
equi = backwards Cubical.FromStdLib., isequiv
equi = backwards , isequiv
ident-l : (Σ[ b' B ] (a , b') S × (b' , b) Diag B)
ab S
@ -146,7 +142,7 @@ module _ {A B C D : Set} {S : Subset (A × B)} {R : Subset (B × C)} {Q : Subset
equi : (Σ[ c C ] (Σ[ b B ] (a , b) S × (b , c) R) × (c , d) Q)
(Σ[ b B ] (a , b) S × (Σ[ c C ] (b , c) R × (c , d) Q))
equi = fwd Cubical.FromStdLib., isequiv
equi = fwd , isequiv
-- isAssociativec : Q + (R + S) ≡ (Q + R) + S
is-isAssociative : (Σ[ c C ] (Σ[ b B ] (a , b) S × (b , c) R) × (c , d) Q)

View File

@ -7,7 +7,6 @@ import Data.Product
open import Function using (_∘_)
open import Cubical hiding (_≃_)
open import Cubical.Univalence using (univalence ; con ; _≃_ ; idtoeqv ; ua)
open import Cat.Category

View File

@ -20,14 +20,7 @@ The monoidal representation is exposed by default from this module.
{-# OPTIONS --cubical --allow-unsolved-metas #-}
module Cat.Category.Monad where
open import Agda.Primitive
open import Data.Product
open import Cubical
open import Cubical.NType.Properties using (lemPropF ; lemSig ; lemSigP)
open import Cubical.GradLemma using (gradLemma)
open import Cat.Prelude
open import Cat.Category
open import Cat.Category.Functor as F
open import Cat.Category.NaturalTransformation

View File

@ -4,11 +4,7 @@ The Kleisli formulation of monads
{-# OPTIONS --cubical --allow-unsolved-metas #-}
open import Agda.Primitive
open import Data.Product
open import Cubical
open import Cubical.NType.Properties using (lemPropF ; lemSig ; lemSigP)
open import Cubical.GradLemma using (gradLemma)
open import Cat.Prelude
open import Cat.Category
open import Cat.Category.Functor as F

View File

@ -4,11 +4,7 @@ Monoidal formulation of monads
{-# OPTIONS --cubical --allow-unsolved-metas #-}
open import Agda.Primitive
open import Data.Product
open import Cubical
open import Cubical.NType.Properties using (lemPropF ; lemSig ; lemSigP)
open import Cubical.GradLemma using (gradLemma)
open import Cat.Prelude
open import Cat.Category
open import Cat.Category.Functor as F

View File

@ -4,14 +4,8 @@ This module provides construction 2.3 in [voe]
{-# OPTIONS --cubical --allow-unsolved-metas --caching #-}
module Cat.Category.Monad.Voevodsky where
open import Agda.Primitive
open import Data.Product
open import Function using (_∘_ ; _$_)
open import Cubical
open import Cubical.NType.Properties using (lemPropF ; lemSig ; lemSigP)
open import Cubical.GradLemma using (gradLemma)
open import Cat.Prelude
open import Function
open import Cat.Category
open import Cat.Category.Functor as F

View File

@ -19,15 +19,12 @@
-- * A composition operator.
{-# OPTIONS --allow-unsolved-metas --cubical #-}
module Cat.Category.NaturalTransformation where
open import Agda.Primitive
open import Data.Product
open import Cat.Prelude
open import Data.Nat using (_≤_ ; z≤n ; s≤s)
module Nat = Data.Nat
open import Cubical
open import Cubical.Sigma
open import Cubical.NType.Properties
open import Cat.Category
open import Cat.Category.Functor hiding (identity)
open import Cat.Wishlist

View File

@ -24,7 +24,7 @@ open import Cubical.NType.Properties
( lemPropF ; lemSig ; lemSigP ; isSetIsProp
; propPi ; propHasLevel ; setPi ; propSet)
public
open import Cubical.Sigma using (setSig) public
open import Cubical.Sigma using (setSig ; sigPresSet) public
open import Cubical.Universe using (hSet) public
-----------------