This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data State = St Int ((Int, State) -> (Int, State)) | |
unfold2 :: (State, State) -> [Int] | |
unfold2 (St x f, St y g) = let (x', St y' g') = f (x, St y g) in | |
x : (unfold2 (St y' g', St x' f)) | |
-- Some examples. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open import Relation.Binary.PropositionalEquality | |
open import Relation.Nullary | |
open import Data.Product | |
open import Data.Empty | |
open import Function | |
data ℕ : Set where | |
zero : ℕ | |
suc : ℕ → ℕ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Delay | |
%default total | |
codata Partial : Type -> Type where | |
Now : a -> Partial a | |
Later : Partial a -> Partial a | |
Functor Partial where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Coalgebra where | |
open import Coinduction | |
open import Function | |
open import Relation.Binary.PropositionalEquality | |
open import Data.Nat | |
data List (A : Set) : Set where | |
∅ˡ : List A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Topology where | |
import Level | |
open import Function | |
open import Data.Empty | |
open import Data.Unit | |
open import Data.Nat hiding (_⊔_) | |
open import Data.Fin | |
open import Data.Product | |
open import Relation.Nullary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module K.Semantics.Algebra where | |
open import K.Syntax | |
open import Common | |
open import Algebra.Structures using (IsBooleanAlgebra) | |
open import Relation.Binary using (Preorder; IsEquivalence) | |
record ModalAlgebra : Set₁ where | |
infix 6 _≃_ | |
infix 7 _∧_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open import Function using (_$_) renaming (_∘′_ to _∘_) public | |
open import Category.Monad public | |
open import Data.Empty using (⊥) public | |
open import Data.Unit using (⊤) renaming (tt to •) public | |
open import Data.Fin using (Fin) renaming (zero to zeroᶠ; suc to sucᶠ) public | |
open import Data.Product using (_×_) renaming (_,_ to ⟨_,_⟩; proj₁ to π₁; proj₂ to π₂) public | |
open import Data.Bool using (Bool; true; false; if_then_else_; not) renaming (_∧_ to _and_; _∨_ to _or_) public | |
open import Data.Maybe using (Maybe; just; nothing) renaming (monad to Mmonad) public | |
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; subst₂; cong₂) public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BCI.Hilbert.Definition where | |
open import Common | |
-- A tree variant of a Hilbert-style proof system with "BCI" as axioms. | |
data Form : Set where | |
var : Atom → Form | |
_⇒_ : Form → Form → Form | |
infixr 10 _⇒_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module test1 where | |
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong₂) public | |
data List (A : Set) : Set where | |
∅ : List A | |
_,_ : List A → A → List A | |
infixl 10 _,_ | |
data _⊆_ {A} : List A → List A → Set where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module IPC.ToSTLC where | |
open import Common | |
open import IPC | |
open import STLC | |
-- Translation from structural IPC to STLC for open terms. | |
transl : ∀ {Γ α} → Γ ⊢ⁱ α → Γ ⊢ˢ α | |
transl assumpⁱ = var zero |