From ac738dd602cb0f8a0bb0301dc1380fd97bb75655 Mon Sep 17 00:00:00 2001 From: Eric Giovannini <ecg19@seas.upenn.edu> Date: Tue, 11 Jul 2023 17:11:23 -0400 Subject: [PATCH] Additions to Common.agda --- .../guarded-cubical/Common/Common.agda | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/formalizations/guarded-cubical/Common/Common.agda b/formalizations/guarded-cubical/Common/Common.agda index 9c08594..b4235a6 100644 --- a/formalizations/guarded-cubical/Common/Common.agda +++ b/formalizations/guarded-cubical/Common/Common.agda @@ -1,4 +1,4 @@ -{-# OPTIONS --cubical --rewriting --guarded #-} +{-# OPTIONS --cubical #-} -- to allow opening this module in other files while there are still holes {-# OPTIONS --allow-unsolved-metas #-} @@ -14,6 +14,12 @@ open import Cubical.Data.Empty open import Cubical.Data.Unit renaming (Unit to ⊤) +private + variable + ℓ ℓ' : Level + ℓA ℓB ℓC ℓD : Level + ℓR ℓS : Level + id : {ℓ : Level} -> {A : Type ℓ} -> A -> A id x = x @@ -32,3 +38,15 @@ inl≠inr {_} {_} {A} {B} a b eq = transport (cong (diagonal ⊤ ⊥) eq) tt diagonal : (Left Right : Type) -> (A ⊎ B) -> Type diagonal Left Right (inl a) = Left diagonal Left Right (inr b) = Right + +TwoCell : {A : Type ℓA} {B : Type ℓB} {C : Type ℓC} {D : Type ℓD} -> +-- {A C : Type ℓ} -> {B D : Type ℓ'} + (R : A -> B -> Type ℓR) -> + (S : C -> D -> Type ℓS) + (f : A -> C) -> + (g : B -> D) -> + Type (ℓ-max (ℓ-max (ℓ-max ℓA ℓB) ℓR) ℓS) +-- Type (ℓ-max (ℓ-max (ℓ-max ℓ ℓ') ℓR) ℓS) +TwoCell R S f g = ∀ a b -> R a b -> S (f a) (g b) + + -- GitLab