text
stringlengths
4
690k
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.ListedFiniteSet.Properties where open import Cubical.Foundations.Prelude open import Cubical.Data.Prod using (_×_; _,_) open import Cubical.HITs.ListedFiniteSet.Base private variable ℓ : Level A B : Type ℓ assoc-++ : ∀ (xs : LFSet A) y...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.TypeEqvTo where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.HITs.PropositionalTruncation open import Cubical.Data.Sigma open import Cubical.Foundations.SIP open import Cubical.Foundation...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Definition open import Maybe module Numbers.Naturals.Subtraction where _-N'_ : (a b : ℕ) → Maybe ℕ zero -N' zero = yes 0 zero -N' succ b = no succ a -N' zero = yes (succ a) succ a -N' succ b = a -N' b subtrac...
open import Common.Equality open import Common.Prelude NaN : Float NaN = primFloatDiv 0.0 0.0 NaN≢-NaN : primFloatEquality NaN (primFloatNegate NaN) ≡ false NaN≢-NaN = refl
module Prelude.Strings where import Data.String.Literals import Data.List.Literals open import Data.Unit open import Agda.Builtin.FromString public instance isStringStringPublic = Data.String.Literals.isString isStringListPublic = Data.List.Literals.isString unitInstance = tt
module B where import C
{-# OPTIONS --universe-polymorphism #-} open import Categories.Category module Categories.Object.Exponential {o ℓ e} (C : Category o ℓ e) where open Category C open import Level open import Categories.Square import Categories.Object.Product open Categories.Object.Product C hiding (repack; repack≡id; repack∘; rep...
{-# OPTIONS --no-sized-types #-} open import Common.Size renaming (↑_ to _^) data Nat : {size : Size} -> Set where zero : {size : Size} -> Nat {size ^} suc : {size : Size} -> Nat {size} -> Nat {size ^} weak : {i : Size} -> Nat {i} -> Nat {∞} weak x = x -- Should give error without sized types. -- .i != ∞ of t...
module datatypes-safe where open import bool public open import integer public open import list public open import level public open import maybe public open import nat public open import nat-division public open import product public open import sum public open import tree public open import trie public open import u...
{-# OPTIONS --without-K #-} module hott.topology.spaces.s1 where open import hott.core -- The universe where we work. 𝒰 = Type₀ module Definition where private data SInternal : 𝒰 where pointInternal : SInternal S₁ : 𝒰 S₁ = SInternal point : S₁ point = pointInternal postulate loop : p...
{-# OPTIONS --safe --warning=error #-} open import LogicalFormulae open import Setoids.Setoids open import Setoids.Lists open import Functions open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals open import Sets.FinSet open import Groups.GroupDefinition open import Lists.Lists open ...
open import Agda.Builtin.Unit open import Agda.Builtin.Nat open import Agda.Builtin.Equality open import Agda.Builtin.List open import Agda.Builtin.Sigma open import Agda.Builtin.Reflection renaming (bindTC to _>>=_) data ⊥ : Set where [_] : {A : Set} → A → List A [ x ] = x ∷ [] vArg : {A : Set} → A → Arg A vArg x ...
{-# OPTIONS --rewriting #-} open import Agda.Primitive postulate _↦_ : ∀ {i} {A : Set i} → A → A → Set i idr : ∀ {i} {A : Set i} {a : A} → a ↦ a {-# BUILTIN REWRITE _↦_ #-} postulate _==_ : ∀ {i} {A : Set i} → A → A → Set i idp : ∀ {i} {A : Set i} {a : A} → a == a postulate HetEq : ∀ {i} {A B : Set i} (e ...
module RedBlack where open import Data.Nat -- | The colour of a node. data Color : Set where red : Color black : Color -- | The red black tree data Tree (A : Set) : ℕ -- black height → Color -- color of the root → Set where -- Empty node is always blac...
open import Agda.Builtin.Bool open import Agda.Builtin.Equality open import Agda.Builtin.Sigma open import Agda.Primitive infixr 2 _×_ _×_ : ∀ {a b} → Set a → Set b → Set (a ⊔ b) A × B = Σ A λ _ → B ∃-notation exists-notation : ∀ {a b} {A : Set a} → (A → Set b) → Set (a ⊔ b) ∃-notation = Σ _ exists-notation =...
{-# OPTIONS --rewriting #-} open import Agda.Builtin.Bool open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-} funny : true ≡ false → true ≡ false funny x = x {-# REWRITE funny #-}
module A.M where import A.B.M
{-# OPTIONS --type-in-type #-} module dyn where open import prelude open import functors open import poly0 public open import prelude.Stream open Stream open import Data.List as L using (List) record Dyn : Set where constructor dyn field {state} : Set {body} : ∫ pheno : ∫[ (state , λ _ → state) , b...
module Categories.Coequalizer where
open import Mockingbird.Forest using (Forest) module Mockingbird.Forest.Combination.Properties {b ℓ} (forest : Forest {b} {ℓ}) where open import Data.Product using (_×_; _,_) open import Relation.Binary using (_Respects_) open import Relation.Unary using (Pred; _∈_; _⊆_; ∅; _∩_) open import Level using (Level; _⊔_) ...
{-# OPTIONS --without-K #-} open import HoTT open import homotopy.RibbonCover import homotopy.CoverClassification module experimental.CoverClassificationCat {i} (A∙ : Ptd i) (A-conn : is-connected 0 (fst A∙)) where open Cover open Gset open homotopy.CoverClassification A∙ A-conn private A : Type i ...
open import Nat open import Prelude open import contexts open import dynamics-core open import type-assignment-unicity module canonical-indeterminate-forms where -- this type gives somewhat nicer syntax for the output of the canonical -- forms lemma for indeterminates at num type data cif-num : (Δ : hctx) (d : ...
------------------------------------------------------------------------------ -- Testing the FOL schemata ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# ...
module Unit where record Unit : Set where constructor unit {-# COMPILE GHC Unit = data () (()) #-}
{-# OPTIONS --without-K --safe --exact-split #-} module Math.Googology.Function.Properties where -- agda-stdlib open import Data.Nat open import Data.Nat.Properties open import Data.Nat.GeneralisedArithmetic using (fold) open import Data.List open import Function open import Relation.Binary.PropositionalEquality -- ...
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Equivalence module HoTT.Identity.Unit where open variables =𝟏-equiv : {x y : 𝟏 {i}} → (x == y) ≃ 𝟏 {j} =𝟏-equiv {i} {j} {★} {★} = f , qinv→isequiv (g , η , ε) where f : {x y : 𝟏} → x == y → 𝟏 {j} f _ = ★ g : {x y : 𝟏} → 𝟏 {j} → ...
module Algebra.FreeSemiring where open import Prelude open import Algebra data 𝑅 : Type where _+_ : 𝑅 → 𝑅 → 𝑅 _*_ : 𝑅 → 𝑅 → 𝑅 1# : 𝑅 0# : 𝑅 +-comm : Commutative _+_ +-assoc : Associative _+_ *-assoc : Associative _*_ 0+ : Identityˡ _+_ 0# +0 : Identityʳ _+_ 0# 1* : Identityˡ _*_ 1# *1 ...
{-# OPTIONS --universe-polymorphism #-} module Categories.Agda where open import Level import Relation.Binary import Function.Equality import Categories.Support.Equivalence import Categories.Support.SetoidFunctions open import Categories.Support.PropositionalEquality open import Categories.Category open import Categ...
-- -- Created by Dependently-Typed Lambda Calculus on 2021-03-18 -- lambe -- Author: dplaindoux -- {-# OPTIONS --without-K --safe #-} module Lambe where open import Relation.Nullary using (yes; no) open import Data.List using (List; []; [_]; _∷_; _++_) open import Data.String using (String; _≟_) op...
open import Prelude open import Nat module List where data List (A : Set) : Set where [] : List A _::_ : A → List A → List A map : {A B : Set} → (A → B) → (List A) → List B map f [] = [] map f (x :: L) = (f x) :: map f L foldr : {A B : Set} → (A → B → B) → B → List A → B foldr f b [] = b foldr ...
module Playground where -- Equality type, and its only constructor refl data _==_ {A : Set} (x : A) : A → Set where refl : x == x -- identity map of a type id : {A : Set} → A → A id x = x -- action on paths ap : {A B : Set} (f : A → B) {x y : A} → (x == y -> f x == f y) ap f refl = refl -- transport transport : {...
{-# OPTIONS --cubical #-} open import Agda.Builtin.Nat postulate _≡_ : {A : Set} → A → A → Set refl : (A : Set) (x : A) → x ≡ x cong : (A B : Set) (x y : A) (f : A → B) (x≡y : x ≡ y) → f x ≡ f y subst : (A : Set) (x y : A) (P : A → Set) → x ≡ y → P x → P y apply : (A : Set) (B : A → Set) → ((x : A) → B x...
module Data.Boolean.Operators where open import Data.Boolean -- Definition of boolean operators with conventions from logic module Logic where infixl 1005 _∧_ infixl 1004 _∨_ _⊕_ infixl 1003 _⟵_ _⟷_ _⟶_ _∧_ : Bool → Bool → Bool _∧_ 𝑇 𝑇 = 𝑇 _∧_ 𝐹 𝑇 = 𝐹 _∧_ 𝑇 𝐹 = 𝐹 _∧_ 𝐹 𝐹 = 𝐹 _∨_ : Bool...
-- Andreas, 2017-09-18, issue #2754 reported by nad. -- Command line options -- -- --ignore-interfaces -v tc:10 -- -- caused internal error when processing Agda.Primitive. -- -- Reason: trying to debug print levels while level built-ins -- are not yet bound. -- -- Should work now, printing -- -- .#Lacking_Level_Bui...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lists, based on the Kleene star and plus, basic types and operations. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Kleene.Base whe...
-- TODO: Move these to stuff related to metric spaces module Derivative where open Limit using (Lim ; lim) -- Statement that the point x of function f is a differentiable point DifferentiablePoint : (ℝ → ℝ) → ℝ → Stmt DifferentiablePoint f(p) = Lim(x ↦ ((f(x) − f(p))/(x − p)))(p) -- Statement that function...
module Show where open import Data.Char hiding (show) open import Data.List open import Data.String hiding (show) open import Function record Show (A : Set) : Set where field show : A → String open Show {{...}} public fromHaskell : {A : Set} → (A → List Char) → Show A fromHaskell primShow = record { show = fr...
{-# OPTIONS --universe-polymorphism #-} module 13-implicitProofObligations where open import Relation.Nullary open import Relation.Nullary.Decidable open import Data.Empty open import Data.Unit hiding (_≟_) open import Data.Nat open import Data.Fin using (Fin; toℕ) open import Data.Product using (_×_; _,_) open impor...
open import Relation.Binary.PropositionalEquality using ( refl ) open import Web.Semantic.DL.ABox.Interp using ( _*_ ; ⌊_⌋ ; ind ) open import Web.Semantic.DL.ABox.Interp.Morphism using ( _,_ ) open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ; on-bnode ; bnodes ; ⊨a-resp-≲ ; ⊨a-resp-≡³ ; _,_ ) open import Web.Sem...
{-# OPTIONS --cubical #-} --no-import-sorts module Test2 where -- open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Relation.Nullary.Base -- ¬_ open import Cubical.Data.Empty ...
{-# OPTIONS --without-K #-} module Lecture2 where import Basics open Basics public -- Definition 2.2.3 define the identity function, and show lambda-abstraction in so doing id : {i : Level} {A : UU i} → A → A id = λ a → a -- can also use plain backslash \ instead of lambda (as it resembles lambda?) -- Definition 2....
-- 2012-03-15, example by Nisse module Issue585-11 where data D₁ : Set where d₁ : D₁ f₁ : D₁ → D₁ → D₁ f₁ x d₁ = x data D₂ : Set where d₂ : D₂ → D₂ postulate P : D₁ → Set f₂ : ∀ {n₁ n₂} → P n₁ → P n₂ → P (f₁ n₁ n₂) mutual f₃ : D₁ → D₂ → D₁ f₃ _ (d₂ _) = _ f₄ : ∀ {n} → P n → (i : D₂) → P (f₃ n i) ...
-- Andreas, 2014-11-02 record U : Set where coinductive constructor inn field out : U f : U → U f u = {!u!}
module SafeFlagPrimTrustMe where open import Agda.Builtin.Equality open import Agda.Builtin.TrustMe
open import Agda.Builtin.Bool open import Issue4166.Import {b = true} as A′ it : ⦃ Bool ⦄ → Bool it ⦃ b ⦄ = b b : Bool b = it
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.List.Relation.Binary.Pointwise directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Lis...
module Thesis.SIRelBigStep.Syntax where open import Data.Nat open import Thesis.SIRelBigStep.Types public data Primitive : (τ : Type) → Set where succ : Primitive (nat ⇒ nat) add : Primitive (pair nat nat ⇒ nat) data Const : (τ : Type) → Set where lit : (n : ℕ) → Const nat data Term (Γ : Context) (τ : Type) ...
module Proof where open import Prelude open import Lambda open import Subst open import Trans open import Reduction import Chain open module C = Chain _≤_ (\x -> refl-≤) (\x y z -> trans-≤) renaming (_===_by_ to _<≤>_by_) data SN {Γ : Ctx}{τ : Type}(t : Term Γ τ) : Set where bound : (n : Nat) -> ({...
{-# OPTIONS --universe-polymorphism #-} module Categories.Profunctor where open import Level hiding (lift) open import Categories.Category open import Categories.Agda open import Categories.Bifunctor using (Functor; Bifunctor; _∘_) open import Categories.Functor.Hom open import Categories.Lan open import Categories.Y...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Reduction {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.RedSteps open i...
open import Data.String using ( String ) open import Data.List.Primitive using ( #List ) open import Data.Maybe.Primitive using ( #Maybe ) open import Web.URI.Port.Primitive using ( Port? ) open import Web.URI.Scheme.Primitive using ( Scheme? ) module Web.URI.Primitive where {-# IMPORT Data.Maybe #-} {-# IMPORT Web.UR...
open import Oscar.Prelude open import Oscar.Class.IsPrefunctor open import Oscar.Class.Smap open import Oscar.Class.Surjection open import Oscar.Class.Transitivity module Oscar.Class.Prefunctor where record Prefunctor 𝔬₁ 𝔯₁ ℓ₁ 𝔬₂ 𝔯₂ ℓ₂ : Ø ↑̂ (𝔬₁ ∙̂ 𝔯₁ ∙̂ ℓ₁ ∙̂ 𝔬₂ ∙̂ 𝔯₂ ∙̂ ℓ₂) where constructor ∁ field ...
module Negative5 where data Funny (A : Set) : Set where funny : A -> Funny (Funny A -> A) -> Funny A
module _ where -- Check that previous clauses reduce in later ones open import Agda.Builtin.Nat hiding (_==_) record Σ (A : Set) (B : A → Set) : Set where field fst : A snd : B fst open Σ postulate T : Nat → Set mkT : ∀ n → T n t5 : Σ Nat T fst t5 = 5 snd t5 = mkT 5 -- Also with instance projectio...
------------------------------------------------------------------------ -- The Agda standard library -- -- Natural numbers represented in binary. ------------------------------------------------------------------------ -- This module aims to create an alternative formulation of ℕ that is -- still reasonably computati...
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for reasoning with a setoid ------------------------------------------------------------------------ -- Example use: -- n*0≡0 : ∀ n → n * 0 ≡ 0 -- n*0≡0 zero = refl -- n*0≡0 (suc n) = begin...
module bee2 where open import Bee2.Crypto.Belt open import Data.ByteString.Utf8 open import Data.ByteString.IO open import Data.String using (toList) open import Data.Product using (proj₁) open import IO -- beltPBKDF : Password → ℕ → Salt → Kek main = run (writeBinaryFile "pbkdf2" (proj₁ (beltPBKDF (packStrict "zed...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Union where -- Stdlib imports open import Level using (Level; _⊔_) open import Data.Sum using (_⊎_; inj₁; inj₂; swap) open import Relation.Binary using (REL) -- Local imports open import Dodo.Binary.Equality -- # Definitions infixl 19 _∪₂_ _∪₂_ : {a b ℓ₁ ℓ₂ : ...
postulate F : @0 Set → Set G : @0 Set → Set G A = F (λ { → A })
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cohomology.Theory open import homotopy.PushoutSplit open import cw.CW module cw.cohomology.WedgeOfCells {i} (OT : OrdinaryTheory i) {n} (⊙skel : ⊙Skeleton {i} (S n)) where open OrdinaryTheory OT open import cohomology.Bouquet OT open import cw.We...
{-# OPTIONS --safe --without-K #-} module Literals.Number where open import Agda.Builtin.FromNat public open Number ⦃ ... ⦄ public
module StateSizedIO.Base where open import Size open import SizedIO.Base open import Data.Product record IOInterfaceˢ : Set₁ where field IOStateˢ : Set Commandˢ : IOStateˢ → Set Responseˢ : (s : IOStateˢ) → (m : Commandˢ s) → Set IOnextˢ : (s : IOStateˢ) → (m : Commandˢ s) → (Responseˢ...
module Untyped.Abstract where open import Function open import Data.String open import Data.Nat open import Data.Unit open import Data.Product open import Data.List open import Data.Sum as Sum open import Data.Maybe open import Strict open import Debug.Trace open import Category.Monad open import Untyped.Monads po...
-- Andreas, 2011-05-09 -- {-# OPTIONS -v tc.inj:40 -v tc.meta:30 #-} module Issue383b where postulate Σ : (A : Set) → (A → Set) → Set U : Set El : U → Set mutual data Ctxt : Set where _▻_ : (Γ : Ctxt) → (Env Γ → U) → Ctxt Env : Ctxt → Set Env (Γ ▻ σ) = Σ (Env Γ) λ γ → El (σ γ) postulate Δ : Ctx...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import Level using (0ℓ) -- This module defines utility functions to help...
open import Data.Fin using (Fin; suc; zero) open import Data.Nat using (ℕ) open import Data.Vec using (Vec; []; _∷_; map) open import Dipsy.Polarity renaming (pos to +; neg to -) module Dipsy.Struct (FOp : {n : ℕ} (as : Vec Polarity n) (b : Polarity) → Set) (SOp : {n : ℕ} (as : Vec Polarity n) (b : Polarity) → Set...
{-# OPTIONS --without-K #-} module Equiv2Path where open import FT using (FT; ⟦_⟧; _⇛_; _◎_; sym⇛) open import Equivalences using (_≃_) open import FT-Nat using (normal; bridge) equiv2path : {B₁ B₂ : FT} → (⟦ B₁ ⟧ ≃ ⟦ B₂ ⟧) → (B₁ ⇛ B₂) equiv2path {B₁} {B₂} eq = ((normal B₁) ◎ bridge eq) ◎ (sym⇛ (normal B₂))
------------------------------------------------------------------------------ -- Inequalities on partial natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymo...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Talks.DURG where open import Cubical.Algebra.Group open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalence open import Cubical.Foundations.Equ...
{-# OPTIONS --cubical --safe --postfix-projections #-} open import Prelude module Cardinality.Finite.Cardinal.Category {ℓ : Level} where open import Cardinality.Finite.Cardinal open import HITs.PropositionalTruncation open import Data.Sigma.Properties open import Cubical.Foundations.Equiv open import Cubical.Foundat...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Setoids.Setoids open import Rings.Definition open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition open import Groups.Definition open import Groups.Lemmas open import Fields.Fields open import Sets.EquivalenceR...
{-# OPTIONS --cubical --safe #-} module Data.Binary where open import Data.Binary.Definition public using (𝔹; 0ᵇ; 1ᵇ_; 2ᵇ_) open import Data.Binary.Conversion public using (⟦_⇑⟧; ⟦_⇓⟧) open import Data.Binary.Addition public using (_+_) open import Data.Binary.Multiplication public using (_*_) open import Da...
open import Prelude open import core module lemmas-ground where -- not ground types aren't hole to hole ground-arr-not-hole : ∀{τ} → (τ ground → ⊥) → (τ ≠ (⦇·⦈ ==> ⦇·⦈)) ground-arr-not-hole notg refl = notg GHole ground-prod-not-hole : ∀{τ} → (τ...
module New.LangChanges where open import New.Lang public open import New.Changes isChAlgτ : (τ : Type) → IsChAlg ⟦ τ ⟧Type ⟦ Δt τ ⟧Type Chτ : (τ : Type) → Set Chτ τ = ⟦ Δt τ ⟧Type chAlgt : (τ : Type) → ChAlg ⟦ τ ⟧Type chAlgt τ = record { Ch = Chτ τ ; isChAlg = isChAlgτ τ} instance ichAlgt : ∀ {τ} → ChAlg ⟦ τ ⟧Ty...
{-# OPTIONS --without-K #-} module ConcretePermutation where open import Level renaming (zero to lzero) hiding (suc) open import Data.Nat using (ℕ) open import Data.Fin using (Fin; zero; inject+; fromℕ) open import Data.Vec using (Vec; tabulate; allFin; []; _∷_) open import Data.Vec.Properties using (tabulate∘lookup...
{-# OPTIONS --without-K --safe #-} open import Categories.Bicategory using (Bicategory) module Categories.Bicategory.Extras {o ℓ e t} (Bicat : Bicategory o ℓ e t) where open import Data.Product using (_,_) import Categories.Category.Construction.Core as Core open import Categories.Category.Construction.Functors usi...
------------------------------------------------------------------------------ -- Colists ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without...
module trie-fast where open import trie-core public open import string open import maybe open import char open import bool open import eq trie-lookup-fast3 : ∀{A : Set} → trie A → string → maybe A trie-lookup-fast3{A} t s = extract (stringFoldl f t s) where extract : trie A → maybe A extract (trie.Node x ...
module Lambda where -- The typed λ-calculus -- The type of types data ty : Set where ι : ty -- the base type _⇒_ : ty → ty → ty -- function type _×_ : ty → ty → ty -- product type infixr 7 _⇒_ infixl 8 _×_ -- A typing context, there are no variable names becaus...
open import Prelude open import Nat open import core open import contexts module lemmas-gcomplete where -- if you add a complete type to a complete context, the result is also a -- complete context gcomp-extend : ∀{Γ τ x} → Γ gcomplete → τ tcomplete → x # Γ → (Γ ,, (x , τ)) gcomplete gcomp-extend {Γ} {τ} {x} g...
------------------------------------------------------------------------ -- A definitional interpreter ------------------------------------------------------------------------ {-# OPTIONS --cubical --safe #-} module Lambda.Simplified.Partiality-monad.Inductive.Interpreter where open import Equality.Propositional.Cub...
module Elements where open import OscarPrelude open import Arity open import Vector open import Element record Elements : Set where constructor ⟨_⟩ field {arity} : Arity elements : Vector Element arity open Elements public instance EqElements : Eq Elements Eq._==_ EqElements (⟨_⟩ {𝑎₁} εs₁) (⟨_⟩ {𝑎₂}...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Categories.DistLatticeSheaf.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Structure open import Cubical.Foundations.HLevels open import Cubical.Foundations.Powerset open import Cubical.Data.Sigma open import Cub...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} -- This is a selection of useful functions and definitions -- from the s...
{-# OPTIONS --without-K --safe #-} module Math.NumberTheory.Product.Generic where -- agda-stdlib open import Algebra -- agda-misc open import Math.NumberTheory.Summation.Generic -- TODO add syntax module MonoidProduct {c e} (M : Monoid c e) = MonoidSummation M renaming ( Σ< to Π< ; Σ≤ to Π≤ ; Σ<range to Π...
postulate C : Set anything : C record I : Set where constructor c field f : C data Wrap : (j : I) → Set where wrap : ∀ {j} → Wrap j -- The following should not pass. -- It did before the fix of #142. issue142 : ∀ {j} → Wrap j → C issue142 {c _} (wrap {c _}) with anything issue142 {c _} (wrap .{c anyth...
open import Relation.Unary using ( ∅ ; _∪_ ) open import Web.Semantic.DL.Signature using ( Signature ; CN ; RN ) open import Web.Semantic.Util using ( Subset ; ⁅_⁆ ) module Web.Semantic.DL.Role where data Role (Σ : Signature) : Set where ⟨_⟩ : (r : RN Σ) → Role Σ ⟨_⟩⁻¹ : (r : RN Σ) → Role Σ inv : ∀ {Σ} → Role Σ ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Prelude open import LibraBFT.Lemmas open import Libr...
module Issue252 where data I : Set where zero : I data D : I → Set where c : ∀ i → D i → D i id : I → I id i = i index : ∀ i → D i → I index i _ = i foo : ∀ i → D i → D zero foo .i (c i d) with id i foo ._ (c i d) | zero = d bar : ∀ i → D i → D zero bar .i (c i d) with index i d bar ._ (c i d) | zero = d -- ...
module Thesis.SIRelBigStep.Normalization where open import Thesis.SIRelBigStep.Lang open import Data.Unit.Base hiding (_≤_) open import Data.Product open import Relation.Binary.PropositionalEquality -- Define logical relation for normalization. Adapted from TAPL Ch. 12. mutual normT : ∀ {Γ} τ (t : Term Γ τ) (ρ : ⟦...
module Esterel.Environment where open import utility open import Data.Empty open import Esterel.Variable.Signal as Signal using (Signal ; _ₛ) open import Esterel.Variable.Shared as SharedVar using (SharedVar ; _ₛₕ) open import Esterel.Variable.Sequential as SeqVar using (SeqVar ; _ᵥ) open import Data.Product i...
{-# OPTIONS --safe #-} module Cubical.Algebra.DistLattice.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Unival...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Raw.Construct.Intersection where open import Cubical.Core.Everything open import Cubical.Foundations.Function using (_∘_) open import Cubical.Data.Prod open import Cubical.Data.Sum.Base using (_⊎_; inl; inr; rec) open import Cubical.Re...
-- Andreas & Jesper, 2018-05-11, issue #3052 reported by identicalsnowflake -- -- The problem here was that free variable collection had the standard -- monoid instance of IntMap, which is just "randomly" picking one variant. -- Thus, if we have both irrelevant and relevant occurrences of a variable, -- we get whatever...
module Ex3Lec where ---------------------------------------------------------------------------- -- EXERCISE 3 -- MONADS FOR HUTTON'S RAZOR -- -- VALUE: 15% -- DEADLINE: 5pm, Friday 20 November (week 9) -- -- DON'T SUBMIT, COMMIT! -- -- The purpose of this exercise is to introduce you to some useful -- mathematic...
{-# OPTIONS --type-in-type #-} open import Data.Product data ⊥ : Set where -- f doesn't type check unless we put the equality type in Set data _≡_ {ℓ} {A : Set ℓ} (a : A) : A → Set where refl : a ≡ a subst : ∀ {ℓ ℓ′} {A : Set ℓ} {a b : A} → (P : A → Set ℓ′) → (p : a ≡ b) → P a → P b subst _ refl pa = pa ¬_ : ∀ {...
open import System.IO using ( _>>_ ; putStr ; commit ) open import Data.Natural using ( show ) open import System.IO.Examples.Four using ( four ) module System.IO.Examples.HelloFour where main = putStr "Hello, " >> putStr (show four) >> putStr ".\n" >> commit
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Monoids.Definition module Semirings.Definition where record Semiring {a : _} {A : Set a} (Zero One : A) (_+_ : A → A → A) (_*_ : A → A → A) : Set a where field monoid : Monoid Zero _+_ commutative : (a b : A) → a + b...
{-# OPTIONS --type-in-type --rewriting #-} open import Agda.Builtin.Sigma open import Agda.Builtin.Equality coe : {A B : Set} → A ≡ B → A → B coe refl x = x {-# BUILTIN REWRITE _≡_ #-} Tel = Set U = Set variable Δ : Tel A B : Δ → U δ₀ δ₁ : Δ postulate IdTel : (Δ : Tel)(δ₀ δ₁ : Δ) → Tel Id : (A : Δ → U){...
{-# OPTIONS --cubical-compatible --rewriting --confluence-check #-} module Issue1719.Spans where open import Issue1719.Common record Span : Set₁ where constructor span field A B C : Set f : C → A g : C → B open Span public