text
stringlengths
4
690k
{- 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 LibraBFT.Base.Types open import LibraBFT.Impl.OBM.Logging.Logging ...
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-} module SyntheticReals where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) private variable ℓ ℓ' ℓ'' : Level open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cu...
{-# OPTIONS --without-K --safe #-} -- Enriched category over a Monoidal category V open import Categories.Category using (categoryHelper) renaming (Category to Setoid-Category) open import Categories.Category.Monoidal using (Monoidal) module Categories.Enriched.Category {o ℓ e} {V : Setoid-Category o ℓ e} ...
{-# OPTIONS --safe --experimental-lossy-unification #-} {- This file contains: 1. An iso πₙ'(Sⁿ) ≅ ℤ, where πₙ'(Sⁿ) = ∥ Sⁿ →∙ Sⁿ ∥₀ 2. A proof that idfun∙ : Sⁿ →∙ Sⁿ is the generator of πₙ'(Sⁿ) -} module Cubical.Homotopy.Group.PinSn where open import Cubical.Homotopy.Loopspace open import Cubical.Homotopy.Group.Base o...
module IgnoreWarnings where -- all of the following files have warnings, which should be ignored -- because of the command-line flag import Issue2243 import Issue708quote import OldCompilerPragmas import RewritingEmptyPragma import Unreachable -- this should also be ignored {-# REWRITE #-}
-- Andreas, 2012-01-12 module Common.Irrelevance where open import Common.Level record Squash {a}(A : Set a) : Set a where constructor squash field .unsquash : A open Squash public
------------------------------------------------------------------------------ -- FOTC natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTI...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.ZCohomology.CohomologyRings.Unit where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat renaming (_+_ to _+n_ ; _·_ to _·n_) open import Cubic...
module Implicits.Resolution.Embedding where open import Prelude open import Data.Vec open import Data.List as List hiding (map) open import Implicits.Syntax open import SystemF.Everything as F using () ⟦_⟧tp← : ∀ {ν} → F.Type ν → Type ν ⟦ F.tc x ⟧tp← = simpl (tc x) ⟦ F.tvar n ⟧tp← = simpl (tvar n) ⟦ a F.→' b ⟧tp← =...
------------------------------------------------------------------------ -- A parametrised specification of "natrec", along with a proof that -- the specification is propositional (assuming extensionality) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open...
{-# OPTIONS --allow-unsolved-metas #-} module turing where open import Level renaming ( suc to succ ; zero to Zero ) open import Data.Nat -- hiding ( erase ) open import Data.List open import Data.Maybe hiding ( map ) -- open import Data.Bool using ( Bool ; true ; false ) renaming ( not to negate ) open import Relati...
open import Agda.Primitive using (_⊔_) import Categories.Category as Category import Categories.Category.Cartesian as Cartesian open import SingleSorted.Context module SingleSorted.Power {o ℓ e} (𝒞 : Category.Category o ℓ e) where open Category.Category 𝒞 open HomReasoning record Powered (A :...
-- {-# OPTIONS -v tc.conv.coerce:10 -v tc.conv.size:40 -v tc.size.solve:40 #-} -- Andreas, 2014-06-16 Coercion for sizes open import Common.Size data Nat (i : Size) : Set where zero : Nat i suc : (j : Size< i) → Nat j → Nat i three : (i : Size) → Nat (↑ ↑ ↑ i) three i = suc _ (suc _ (suc i zero)) -- Should be o...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} {-# OPTIONS --allow-unsolved-metas #-} module Light.Implementation.Standard.Data.Product where open import Light.Library.Data.Product using (Library ; Dependencies) open import Light.Library.Relation.Binary.Equality.Decidable using (Decid...
open import Level hiding ( suc ; zero ) open import Algebra module sym2 where open import Symmetric open import Data.Unit open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_) open import Function open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero) open import Relation.Nullary open import Da...
open import Nat open import Prelude open import List open import core open import contexts open import typed-expansion open import lemmas-freevars module livelit-reasoning-principles where record reasoning-principles (Φ : livelitctx) (Γ : tctx) (a : livelit...
{- 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 -- This module defines functionality mode...
{-# OPTIONS --cubical-compatible #-} module Issue388 where data P (A : Set₁) : A → Set₁ where p : ∀ x → P A x data D : Set → Set₁ where d : ∀ A → D A Foo : ∀ A → P (D A) (d A) → Set Foo A x = {!x!}
{-# OPTIONS -v treeless.opt:20 #-} module _ where open import Common.Prelude module _ {a} {A : Set a} (_<_ : A → A → Bool) where merge : List A → List A → List A merge [] ys = ys merge xs [] = xs merge xs@(x ∷ xs₁) ys@(y ∷ ys₁) = if x < y then (x ∷ merge xs₁ ys) -- Generated treeless code should preserve...
{-# OPTIONS --warning=error #-} module UselessAbstractAbstract where A : Set₁ abstract abstract A = Set
{-# OPTIONS --safe #-} module Cubical.Algebra.CommAlgebra.Instances.Initial where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Data.Unit open import Cubical.Data.Sigma.Properties using (Σ≡Prop) open import Cubical.Alge...
module z02-theorem-proving-with-booleans where open import bool open import eq open import level -- p 28 ~~tt : ~ ~ tt ≡ tt ~~tt = refl -- p 32 ~~ff : ~ ~ ff ≡ ff ~~ff = refl -- p 33 ~~-elim : ∀ (b : 𝔹) → ~ ~ b ≡ b ~~-elim tt = refl ~~-elim ff = refl -- p 34 ~~-elim2 : ∀ (b : 𝔹) → ~ ~ b ≡ b ~~-elim2 tt = ~~tt ~~...
open import Nat open import Prelude open import dynamics-core open import contexts open import typed-elaboration open import lemmas-gcomplete open import lemmas-complete module complete-elaboration where mutual complete-elaboration-synth : ∀{e τ Γ Δ d} → Γ gcomplete → ...
{-# OPTIONS --without-K #-} module hott.univalence where open import level using (lsuc) open import sum using (_,_ ; proj₁) open import equality.core open import equality.calculus open import equality.reasoning open import function.core open import function.isomorphism.core using (_≅_ ; module _≅_) open import hott.eq...
module Luau.Type where open import FFI.Data.Maybe using (Maybe; just; nothing; just-inv) open import Agda.Builtin.Equality using (_≡_; refl) open import Properties.Dec using (Dec; yes; no) open import Properties.Equality using (cong) open import FFI.Data.Maybe using (Maybe; just; nothing) data Type : Set where nil ...
{-# OPTIONS --without-K --rewriting #-} module LogicalTopology where open import Basics open import lib.types.Truncation -- For convenience, we define the "power type" ℘ A ℘ : {i : ULevel} (j : ULevel) (A : Type i) → Type _ ℘ j A = A → Prop j _∩_ : {i j k : ULevel} {A : Type i} → ℘ j A → ℘ k A →...
{-# OPTIONS --copatterns --sized-types #-} {- In this module, we show that languages are represented by causal stream functions. To this end, let A be a non-empty set (the alphabet) and 2 the Booleans. For a stream s, we denote the list of the first n elements in s by s ↓ n and by s[n] the element at the n-th positio...
{- Conatural number properties (Tesla Ice Zhang et al., Feb. 2019) This file defines operations and properties on conatural numbers: - Infinity (∞). - Proof that ∞ + 1 is equivalent to ∞. - Proof that conatural is an hSet. - Bisimulation on conatural - Proof that bisimulation is equivalent to equivalence (Coinduc...
{-# OPTIONS --universe-polymorphism #-} module PatternMatchingOnCodata where data Level : Set where zero : Level suc : (i : Level) → Level _⊔_ : Level → Level → Level zero ⊔ j = j suc i ⊔ zero = suc i suc i ⊔ suc j = suc (i ⊔ j) {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN ...
module lemmas where open import prelude open import defns postulate NH-CONG : ∀ {D} (H H′ : NavigationHistory(D)) → let open NavigationHistory H in let open NavigationHistory H′ using () renaming ( A to A′ ; Fo to Fo′ ; Eq to Eq′ ; FTO to FTO′ ) in (A ⊆ A′) → (A′ ⊆ A) → (Fo ≣ Fo′) → (Eq ≣ Eq′) → (FTO ≣ FTO′) → (H ≣ H...
open import FRP.LTL.RSet.Core using ( RSet ; ⟦_⟧ ) open import FRP.LTL.RSet.Stateless using ( _⇒_ ) open import FRP.LTL.Time using ( _≤_ ; ≤-refl ; _≤-trans_ ) module FRP.LTL.RSet.Globally where -- □ A is "A holds globally in the future" □ : RSet → RSet □ A t = ∀ {u} → (t ≤ u) → A u -- Comonad structure of □ exten...
{- 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 Optics.All open import LibraBFT.Prelude open import LibraBFT...
-- Andreas, 2016-10-12 AIM XXIV, issue #2256 open import Common.Equality module _ a (A : Set a) where data ⊥ : Set where abs : ⊥ → Set a abs = λ() test : (x : ⊥) → abs x ≡ A test x = refl -- ERROR WAS: -- (λ ()) a A x != A of type Set a -- when checking that the expression refl has type abs x ≡ A -- EXPECTED: --...
module Equiv where import Prelude import Eq open Prelude open Eq data Equiv (a : Set) : Set1 where equiv : (_==_ : a -> a -> Set) -> (refl : (x : a) -> x == x) -> (sym : (x y : a) -> x == y -> y == x) -> (trans : (x y z : a) -> x == y -> y == z -> x == z) -...
{-# OPTIONS --safe #-} module Cubical.Algebra.Matrix where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.Equiv open import Cubical.Foundations.Structure open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalence open import ...
-- {-# OPTIONS -v term:30 #-} -- 2010-10-14 module ProjectionsPreserveGuardednessTrivialExample where open import Common.Level open import Common.Coinduction open import Common.Product -- Streams infixr 5 _∷_ data Stream (A : Set) : Set where _∷_ : (x : A) (xs : ∞ (Stream A)) → Stream A mutual repeat : {A : S...
-- Testing how the pragmas are saved in the Agda interface files (using -- the program dump-agdai interface). -- 13 July 2012. Because for example the pragma BUILTIN is not a -- PragmaOption it is not saved in iPragmaOptions, i.e. -- -- iPragmaOptions = [] module NoOptionPragma where data Bool : Set where true fal...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Level where open import Agda.Primitive using (Level ; _⊔_ ; Setω) renaming (lzero to 0ℓ ; lsuc to ++_) public record Lifted ℓ {aℓ} (𝕒 : Set aℓ) : Set (ℓ ⊔ aℓ) where constructor lift field lower : 𝕒
open import Kaleid as K using () open import Extract (K.kompile-funp) using (kompile) open import ReflHelper open import Data.Nat open import Data.Nat.Properties open import Data.List as L using (List; []; _∷_) open import Data.Fin using (Fin; zero; suc; fromℕ<) open import Relation.Binary.PropositionalEquality open ...
module AnyRelational where open import Data.Function open import Data.Unit open import Data.Empty open import Data.Bool open import Data.Nat open import Data.List hiding (any) open import Data.Sum open import Data.Product open import Relation.Nullary open import Relation.Nullary.Decidable renaming (map to dec-map) open...
module Abstract where data Bool : Set where true false : Bool not : Bool → Bool not true = false not false = true abstract Answer : Set Answer = Bool yes : Answer yes = true no : Answer no = false data _≡_ {A : Set}(x : A) : A → Set where refl : x ≡ x data Box : Set where [_] : Answer → Box ...
{-# OPTIONS --rewriting #-} module Examples.Run where open import Agda.Builtin.Equality using (_≡_; refl) open import Luau.Syntax using (nil; var; _$_; function_is_end; return; _∙_; done; _⟨_⟩; number; binexp; +) open import Luau.Value using (nil; number) open import Luau.Run using (run; return) open import Luau.Heap...
-- Andreas, 2013-05-02 This ain't a bug, it is a feature. -- {-# OPTIONS -v scope.name:10 #-} -- {-# OPTIONS -v scope:10 #-} module Issue836 where module M where record R : Set₁ where field X : Set open M using (R) X : R → Set X = R.X -- A glimpse at the scope (showing only concrete names, though): --...
{-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude import GSeTT.Typed-Syntax import Globular-TT.Syntax {- Type theory for globular sets -} module Globular-TT.Typed-Syntax {l} (index : Set l) (rule : index → GSeTT.Typed-Syntax.Ctx × (Globular-TT.Syntax.Pre-Ty index)) (eqdec-inde...
{- Comparison view and associated lemmas -} module TemporalOps.Common.Compare where open import CategoryTheory.Categories open import Relation.Binary.PropositionalEquality as ≡ open import Relation.Binary.HeterogeneousEquality as ≅ open import Data.Nat.Properties using (+-identityʳ ; +-assoc ; +-suc) open import Data...
open import Oscar.Prelude open import Oscar.Class.HasEquivalence open import Oscar.Data.Substitunction open import Oscar.Data.Proposequality import Oscar.Property.Setoid.Proposextensequality open import Oscar.Class import Oscar.Data.Constraint module Oscar.Class.HasEquivalence.Substitunction where module _ {𝔭} {𝔓 ...
{-# OPTIONS --safe #-} module Cubical.HITs.S2.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Pointed open import Cubical.Foundations.Function open import Cubical.Foundations.GroupoidLaws open import Cubical.Foundations.Path open import ...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Product.Properties where -- properties of the product _※_ of Functors (so probably should be renamed?) open import Level open import Data.Product open import Categories.Category open import Categories.Functor renaming (id to idF) open import Categories.Na...
module Trans where open import Prelude Rel : Set -> Set1 Rel A = A -> A -> Set data [_]* {A : Set}(R : Rel A)(x : A) : A -> Set where ref : [ R ]* x x _▹_ : {y z : A} -> R x y -> [ R ]* y z -> [ R ]* x z infixr 40 _▹_ _▹◃_ length : {A : Set}{R : Rel A}{x y : A} -> [ R ]* x y -> Nat length ref = zero leng...
module Coirc.Parser where open import Data.Unit open import Data.Bool open import Data.Nat open import Data.Char open import Data.String open import Data.Maybe open import Data.List hiding (_++_) open import Data.Sum open import Data.Product open import Relation.Nullary open import Relation.Binary.PropositionalEquality...
postulate A : Set record R : Set where constructor r field f : A test : R → R test x = let r a = x foo : R → A foo x = let r a = x in a in r (foo (r a))
{-# OPTIONS --without-K --safe #-} module Dodo.Unary.Dec where -- Stdlib imports open import Level using (Level; _⊔_) open import Relation.Nullary using (Dec) open import Relation.Unary using (Pred) DecPred : {a ℓ : Level} {A : Set a} → Pred A ℓ → Set (a ⊔ ℓ) DecPred P = ∀ x → Dec (P x)
------------------------------------------------------------------------ -- The Agda standard library -- -- Closures of a unary relation with respect to a strict partial order ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary modul...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Group.Morphism where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Structure open import Cubical.Algebra.Group.Base open import Cubical.Data.Sigma private variable ℓ ℓ' ℓ'' ℓ...
module combinators where open import bool open import bool-thms2 import closures open import eq open import list open import list-thms open import nat open import nat-thms open import product open import product-thms open import sum open import string open import termination data comb : Set where S : comb K : com...
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for "equational reasoning" using a strict partial -- order. ------------------------------------------------------------------------ -- Example uses: -- -- u≤x : u ≤ x -- u≤x = begin -- ...
{-# OPTIONS --cubical #-} module Type.Cubical.Path where open import Type open import Type.Cubical postulate PathP : ∀{ℓ}(P : Interval → Type{ℓ}) → P(Interval.𝟎) → P(Interval.𝟏) → Type{ℓ} {-# BUILTIN PATHP PathP #-} -- The type of paths. -- Can be seen as a path between two points in the space P. -- (A continuous...
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category; module Commutation) open import Categories.Category.Monoidal.Core using (Monoidal) -- The "four middle interchange" for monoidal categories. -- -- Aka the "interchange law" or "exchange law" (though those terms are -- more comonly use...
module Issue848 where A : Set1 A = B module _ where B : Set1 B = Set C : Set1 C = B D : Set1 D = E module _ where E : Set1 E = Set F : Set1 F = G module _ where G : Set1 G = H module _ where H : Set1 H = Set
{-# OPTIONS --cubical --postfix-projections #-} open import Prelude open import Algebra open import Container module Control.Monad.ListT {ℓ} (𝔽 : Container ℓ ℓ) (is-mon : IsMonad {ℓ} ⟦ 𝔽 ⟧ ) where open IsMonad is-mon postulate cmap-return : (f : A → B) (x : ⟦ 𝔽 ⟧ A) → (cmap f x ≡ (x >>=...
-- 2014-05-27 Jesper and Andreas postulate A : Set a : A → A → A {-# BUILTIN REWRITE a #-} -- Expected error: -- a does not have the right type for a rewriting relation -- because its type does not end in a sort, but in A -- when checking the pragma BUILTIN REWRITE a
{-# OPTIONS --without-K --safe #-} module Categories.NaturalTransformation where -- all the important stuff about NaturalTransformation are defined in .Core open import Categories.NaturalTransformation.Core public
open import Issue481PonderBase open import Issue481PonderImportMe as as module Issue481PonderMaster where module M = as as as
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Diagram.Pullback.Properties {o ℓ e} (C : Category o ℓ e) where open import Function using (_$_) open import Categories.Category.Cartesian C open import Categories.Diagram.Pullback C open import Categories.Diagram.Equalizer C open i...
open import Agda.Primitive using (lzero; lsuc; _⊔_) open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst) open import Relation.Binary import MultiSorted.Context as MSC import MultiSorted.AlgebraicTheory as MST import SingleSorted.AlgebraicTheory module MultiSorted.FromSingleSorted (Σ : Singl...
------------------------------------------------------------------------ -- Polymorphic and iso-recursive types ------------------------------------------------------------------------ module SystemF.Type where open import Data.Fin using (Fin; zero; suc) open import Data.Fin.Substitution open import Data.Fin.Substitu...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Universe {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Weakening open...
-- Products and Cartesian categories module CategoryTheory.BCCCs.Cartesian where open import CategoryTheory.Categories open import Relation.Binary using (IsEquivalence) module _ {n} (ℂ : Category n) where open Category ℂ -- Terminal object in a category record TerminalObj : Set (lsuc n) where ...
module Issue309b where data D : Set where d : D → D syntax d x = f g : D → D g (d x) = f
module TerminationListInsertionNaive where data List (A : Set) : Set where [] : List A _::_ : A -> List A -> List A infixr 50 _::_ -- non-deterministic choice postulate _⊕_ : {A : Set} -> A -> A -> A infixl 10 _⊕_ -- a funny formulation of insert -- insert (a :: l) inserts a into l -- -- this example cann...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Unit.Properties where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Dat...
open import Common.Prelude _test_ : Nat → Nat → Nat _test n = _+ n
module ChainRule where import Sets import Functor import Logic.ChainReasoning.Poly as CR import Isomorphism import Derivative open Derivative open Sets open Functor open Semantics open Isomorphism module Chain = CR _==_ (\x -> refl{x = x}) (\x y z -> trans{x = x}{y}{z}) open Chain chain-ru...
module Data.List.Relation where import Lvl import Data open import Data.List open import Logic open import Logic.Propositional open import Structure.Setoid open import Type private variable ℓ ℓₑ ℓₑ₁ ℓₑ₂ : Lvl.Level private variable T : Type{ℓ} data Empty {ℓ}{T : Type{ℓ}} : List(T) → Stmt{Lvl.𝐒(ℓ)} where ...
-- An example of something where normalization is surprisingly slow {-# OPTIONS --cubical --safe #-} module Cubical.Experiments.Problem where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Data.Int open import Cubical.HITs.S1 open import Cubical.HITs.S2 open import C...
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Equivalence module HoTT.Equivalence.Coproduct where open variables private variable A' B' : 𝒰 i +-empty₁ : 𝟎 {i} + B ≃ B +-empty₁ = let open Iso in iso→eqv λ where .f (inl ()) .f (inr b) → b .g → inr .η (inl ()) .η (inr b) → refl ...
module Datoid where import Equiv import Prelude open Equiv open Prelude data Datoid : Set1 where datoid : (a : Set) -> DecidableEquiv a -> Datoid El : Datoid -> Set El (datoid a _) = a datoidEq : (a : Datoid) -> DecidableEquiv (El a) datoidEq (datoid _ eq) = eq datoidRel : (a : Datoid) ->...
open import MLib.Prelude.FromStdlib open import Relation.Binary using (Decidable; IsStrictTotalOrder) module MLib.Prelude.DFS {v p e} {V : Set v} (_⇒_ : V → V → Set e) {_<_ : V → V → Set p} (isStrictTotalOrder : IsStrictTotalOrder _≡_ _<_) where open import MLib.Prelude.Path open Bool using (T) open import Func...
open import Oscar.Prelude open import Oscar.Class.[ExtensibleType] open import Oscar.Data.Proposequality module Oscar.Class.[ExtensibleType].Proposequality where instance [ExtensibleType]Proposequality : ∀ {a} {b} {A : Set a} {B : A → Set b} → [ExtensibleType] (λ {w} → Proposequality⟦ B w ⟧) [ExtensibleType]Pro...
{-# OPTIONS --cubical --safe #-} module TreeFold where open import Prelude open import Data.List open import Algebra using (Associative) open import Data.List.Properties using (foldr-fusion; foldl-fusion; foldl′-foldl) infixr 5 _^_&_ data Spine (A : Type a) : Type a where &0 : Spine A _^_&_ : A → ℕ → Spine A → S...
------------------------------------------------------------------------------ -- Testing the translation of definitions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymor...
module Bound.Lower (A : Set) where data Bound : Set where bot : Bound val : A → Bound
-- 2014-05-16 Andreas: Question mark not recognized by emacs module _ where data Nat : Set where suc : Nat → Nat data Fin : Nat → Set where zero : ∀ n → Fin (suc n) test : ∀ n → Fin n → Set test .? (zero n) = Nat -- The questionmark in the dot pattern is not recognized by emacs-mode. -- This cannot be tested ...
module BHeap.Order {A : Set}(_≤_ : A → A → Set) where open import BHeap _≤_ open import Bound.Lower A open import Bound.Lower.Order _≤_ open import Data.Nat _≺_ : {b b' : Bound} → BHeap b → BHeap b' → Set h ≺ h' = # h <′ # h' data Acc {b' : Bound}(h' : BHeap b') : Set where acc : (∀ {b} h → (_≺_ {b} {b'} h h') → ...
open import Data.Boolean open import Type module Data.BinaryTree.Heap {ℓ} {T : Type{ℓ}} (_≤?_ : T → T → Bool) where import Lvl open import Data hiding (empty) open import Data.BinaryTree BinaryHeap = BinaryTree (Unit{Lvl.𝟎}) (T) private variable ℓᵣ : Lvl.Level private variable R : Type{ℓᵣ} open import Data.O...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} -- Thm: (∃x)A(x), (∀x)(A(x) ⇒ B(x)) ⊢ (∃x)B(x) -- From: Elliott Mendelson. Introduction to mathematical logic. Chapman & -- Hall, 4th edition, 199...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Monoidal open import Categories.Functor.Monoidal module Categories.NaturalTransformation.NaturalIsomorphism.Monoidal where open import Level open import Data.Product using (_,_) open import Relation.Binary using (IsEquivalence; Setoid) open import...
postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} {-# COMPILE GHC ♭ as flat #-}
-- Some basic stuff for Conor's talk. module SomeBasicStuff where infixr 40 _::_ _↦_∣_ infix 30 _∈_ _==_ infixr 10 _,_ data _==_ {A : Set}(x : A) : A -> Set where refl : x == x data Σ (A : Set)(B : A -> Set) : Set where _,_ : (x : A) -> B x -> Σ A B _×_ : Set -> Set -> Set A × B = Σ A \_ -> B fst : {A : Set}{...
module sn-calculus-confluence.potpot where open import utility open import sn-calculus open import context-properties using (->pot-view) open import Esterel.Lang open import Esterel.Lang.CanFunction using (Can ; Canₛ ; Canₛₕ ; Canθ ; Canθₛ ; Canθₛₕ) open import Esterel.Lang.CanFunction.Properties using ( canθₛ-...
{-# OPTIONS --safe #-} module Issue2487.d where -- trying to import a two-level, non-safe module open import Issue2487.e
{-# OPTIONS --universe-polymorphism #-} module Categories.Support.EqReasoning where open import Categories.Support.Equivalence using (Setoid; module Setoid) open import Relation.Binary.PropositionalEquality using () renaming (_≡_ to _≣_; trans to ≣-trans; sym to ≣-sym; refl to ≣-refl) module SetoidReasoning {s₁ s₂} (...
{- This file contains a summary of what remains for π₄(S³) ≡ ℤ/2ℤ to be proved. See the module π₄S³ at the end of this file. -} {-# OPTIONS --safe #-} module Cubical.Homotopy.Group.Pi4S3.Summary where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.Data.Nat.Base...
------------------------------------------------------------------------ -- The Agda standard library -- -- More efficient mod and divMod operations (require the K axiom) ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Data.Nat.DivMod.WithK where open i...
{-# OPTIONS --cubical-compatible #-} mutual record R : Set₁ where constructor c field @0 A : Set x : _ _ : (@0 A : Set) → A → R _ = c
{- 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 Lib...
module Coirc.Bot where open import Coirc open import Coirc.Network open import Coinduction open import IO open import Data.String server = "irc.freenode.org" name = "coalgbot" real = "Coalgebra Bot" bot : Bot bot = put (nick name) (♯ put (user name real) (♯ loop)) where loop = get f where f : Event → Bot...
{-# OPTIONS --cubical --safe #-} open import Prelude open import Relation.Binary module LexPerm where
open import Prelude module Implicits.Resolution.Finite.Resolution where open import Coinduction open import Data.Fin.Substitution open import Data.List open import Data.List.Any open Membership-≡ open import Implicits.Syntax open import Implicits.Substitutions open import Implicits.Resolution.Termination open import ...
module Data.Fin.Sigma where open import Prelude open import Data.Nat open import Data.Nat.Properties Fin : ℕ → Type Fin n = ∃ m × (m < n) open import Data.List _!!_ : (xs : List A) → Fin (length xs) → A (x ∷ xs) !! (zero , p) = x (x ∷ xs) !! (suc n , p) = xs !! (n , p)