text
stringlengths
4
690k
module x10-747Lists-hc where -- Library import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; trans; cong) open Eq.≡-Reasoning open import Data.Bool using (Bool; true; false; T; _∧_; _∨_; not) open import Data.Nat using (ℕ; zero; suc; _+_; _*_; ...
postulate A : Set P : A → Set Q : ∀{a} → P a → Set variable -- WORKS if replaced by postulate a : A module _ (p : P a) (let q = p) where postulate r : Q q -- Panic: unbound variable q (id: 18@787003719158301342) -- when checking that the expression q has type P _a_12
{-# OPTIONS --allow-unsolved-metas #-} open import Level open import Relation.Unary using (Pred) open import Data.Product hiding (swap; curry) open import Data.List open import Data.List.Relation.Unary.All as All open import Data.List.Relation.Unary.Any open import Data.List.Membership.Propositional open import Data.L...
{-# OPTIONS --allow-unsolved-metas #-} module Issue242 where postulate Y : Set module Inner (X : Set) where module M (A : Set) where postulate R : Set module R (r : R) where postulate C : Set open module MX = M Y module M' (r : R) where open module Rr = R r c : C c = {!!}
{-# OPTIONS --sized-types #-} module SizedTypesLoopDueInadmissibility where postulate Size : Set _^ : Size -> Size ∞ : Size {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZESUC _^ #-} {-# BUILTIN SIZEINF ∞ #-} data Nat : {size : Size} -> Set where zero : {size : Size} -> Nat {size ^} suc : {size : Size} ...
------------------------------------------------------------------------ -- Some definitions related to and properties of booleans ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Bool {reflexive} (eq : ∀ {a p} → Equality-with-J...
postulate A : Set open import Agda.Builtin.Equality foo : (f : A → A → A) (@0 g : @0 A → @0 A → A) → @0 _≡_ {A = @0 A → @0 A → A} g (\ x y → f y x) → @0 A → @0 A → A foo f g refl = g -- In the goal, `C-c C-n g` gives -- λ (@0 x) (@0 y) → f y x -- which is only well-typed in an erased context. bad : ...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Sum.Base where open import Cubical.Core.Everything private variable ℓ ℓ' : Level A B C D : Type ℓ data _⊎_ (A : Type ℓ)(B : Type ℓ') : Type (ℓ-max ℓ ℓ') where inl : A → A ⊎ B inr : B → A ⊎ B elim-⊎ : {C : A ⊎ B → Type ℓ} → ((a : A) → C (inl a)) → (...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Sn.Properties where open import Cubical.Data.Int hiding (_+_) open import Cubical.Data.Bool open import Cubical.Foundations.Pointed open import Cubical.Foundations.Function open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLeve...
{-# OPTIONS --cubical --safe #-} module _ where open import Agda.Primitive open import Agda.Primitive.Cubical open import Agda.Builtin.Cubical.Glue open import Agda.Builtin.Bool -- If primGlue does not reduce away we should report an error for -- patterns of other types. -- -- In the future we might want to allow th...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Values for caching evaluation of MTerm ------------------------------------------------------------------------ import Parametric.Syntax.Type as Type import Parametric.Syntax.MType as MType import Parametric.Denota...
open import Relation.Binary.Core module PLRTree.Insert.Properties {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Data.Sum open import PLRTree {A} open import PLRTree.Compound {A} open import PLRTree.Insert _≤_ tot≤ lemma-insert-compound : (x : A)(t :...
-- Placeholder
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Homotopy.WedgeConnectivity where open import Cubical.Foundations.Everything open import Cubical.Data.HomotopyGroup open import Cubical.Data.Nat open import Cubical.Data.Sigma open import Cubical.HITs.Nullification open import Cubical.HITs.Susp open impo...
{-# OPTIONS --without-K #-} -- most of this is subsumed by crypto-agda Search code open import Type hiding (★) open import Data.Nat.NP hiding (_==_) renaming (_<=_ to _ℕ<=_) open import Data.Bits open import Data.Bit hiding (_==_) open import Data.Bool.Properties using (not-involutive) import Data.Vec.NP as V open V hi...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020 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 Category.Functor open import Data.Maybe open import Function open i...
-- Andreas, 2015-05-28 open import Common.Size fix : ∀ {C : Size → Set} → (∀ i → (∀ (j : Size< i) → C j) → C i) → ∀ i → C i fix t i = t i λ (j : Size< i) → fix t j -- Expected error: -- Possibly empty type of sizes (Size< i) -- when checking that the expression λ (j : Size< i) → fix t j has -- type (j : Size< i) → ....
module Main where open import Category.Functor open import Category.Monad open import Data.Unit open import Data.Container.Indexed open import Data.Maybe open import Data.Product open import IO.Primitive hiding (_>>=_) open import Signature open import Sodium open import Model open import View ----------------------...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Operations.Multiplication where open import Data.Binary.Definitions open import Data.Binary.Operations.Addition mul : 𝔹⁺ → 𝔹⁺ → 𝔹⁺ mul 1ᵇ ys = ys mul (O ∷ xs) ys = O ∷ (mul xs ys) mul (I ∷ xs) ys = add O (O ∷ mul ys xs) ys _*_ : 𝔹 → 𝔹 → 𝔹 0ᵇ * ys = 0ᵇ (0<...
{-# OPTIONS --without-K #-} open import Base module Homotopy.Cover.Def {i} (A : Set i) where record covering : Set (suc i) where constructor cov[_,_] field fiber : A → Set i fiber-is-set : ∀ a → is-set (fiber a) open import Homotopy.Truncation open import Homotopy.Connected open import Homotopy.PathTrun...
{-# OPTIONS --prop --without-K --rewriting #-} open import Calf.CostMonoid module Calf.Types.Eq where open import Calf.Prelude open import Calf.Metalanguage open import Calf.PhaseDistinction open import Relation.Binary.PropositionalEquality postulate eq : (A : tp pos) → val A → val A → tp pos eq/intro : ∀ {A v1...
------------------------------------------------------------------------ -- The Agda standard library -- -- Primality ------------------------------------------------------------------------ module Data.Nat.Primality where open import Data.Empty open import Data.Fin as Fin hiding (_+_) open import Data.Fin.Dec open i...
module Rev {A : Set} where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; trans; cong; cong₂; _≢_) open Eq.≡-Reasoning open import Data.Empty using (⊥; ⊥-elim) open import Data.List using (List; []; _∷_; _++_; map; foldr; replicate; length; _∷ʳ_) -- renaming (reverse to rev) open...
-- Andreas, 2021-04-10, issue #5288 -- De Bruijn index problem in treeless compiler -- {-# OPTIONS -v tc.cc:20 #-} -- {-# OPTIONS -v treeless:40 #-} -- {-# OPTIONS -v treeless.convert.lambdas:40 #-} open import Agda.Builtin.Equality open import Agda.Builtin.IO open import Agda.Builtin.Nat open import Agda.Builtin.Uni...
-- Andreas, 2012-09-17 {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.with.type:15 -v syntax.reify.con:30 #-} module ReifyConstructorParametersForWith where import Common.Level module M {i} {I : Set i} where data D : Set i where c : {i : I} → D -- danger of confusion for c {i = ...} data P : D → Set ...
module slots.defs where open import slots.imports record config : Set where field n : ℕ -- reel count m : ℕ -- fruit count Win/Bet = ℕ -- win per 1 bet Fruit = Fin m ReelNo = Fin n Reel = List Fruit Reels = Vec Reel n WinLine = Vec Win/Bet n WinTable = Vec WinLine m Line = Vec Fruit n r...
{-# OPTIONS --without-K #-} open import HoTT module cohomology.WithCoefficients where →Ω-group-structure : ∀ {i j} (X : Ptd i) (Y : Ptd j) → GroupStructure (fst (X ⊙→ ⊙Ω Y)) →Ω-group-structure X Y = record { ident = ((λ _ → idp) , idp); inv = λ F → ((! ∘ fst F) , ap ! (snd F)); comp = λ F G → ((λ x → fst...
postulate P : Set -> Set test : (B : Set) -> P B -> P B test = λ p p -> {!!} postulate A : Set test₂ : Set → A test₂ A = {!!}
module Haskell.RangedSetsProp.BoundariesProperties where open import Haskell.RangedSetsProp.library open import Agda.Builtin.Equality open import Agda.Builtin.Bool open import Haskell.Prim open import Haskell.Prim.Ord open import Haskell.Prim.Bool open import Haskell.Prim.Maybe open import Haskell.Prim.Enum open imp...
{- Type class for natural transformations. -} module CategoryTheory.NatTrans where open import CategoryTheory.Categories open import CategoryTheory.Functor open import Relation.Binary using (IsEquivalence) infixr 25 _⟹_ -- Natural transformation between two functors record _⟹_ {n} {ℂ 𝔻 : Category n} (F : Functor ℂ...
-- Andreas, AIM XXIII, Issue 1944 -- {-# OPTIONS -v tc.proj.amb:30 #-} -- Non-overloaded record Wrap (A : Set) : Set where field wrapped : A open Wrap -- Overloaded record Sg (A : Set) : Set where field head : A open Sg record Sg' (A : Set) : Set where field head : A open Sg' -- ov/ov works : ∀ {A : Set} ...
module SizedIO.coIOIO where open import Size mutual data coIO² (i : Size) (j : Size) (Cin : Set ) (Rin : Cin → Set) (Cext : Set) (Rext : Cext → Set) (A : Set) : Set where return : A → coIO² i j Cin Rin Cext Rext A dof : (i' : Size< i) → (c : Ci...
-- Andreas, 2012-02-24 example by Ramana Kumar {-# OPTIONS --sized-types #-} -- {-# OPTIONS --show-implicit -v tc.size.solve:20 -v tc.conv.size:15 #-} module SizeInconsistentMeta4 where open import Data.Nat using (ℕ;zero;suc) renaming (_<_ to _N<_) open import Data.Product using (_,_;_×_) open import Data.Product.Rela...
{-# OPTIONS --universe-polymorphism #-} module Categories.Globe where import Level open import Relation.Binary using (IsEquivalence; module IsEquivalence) open import Relation.Binary.PropositionalEquality using (isEquivalence) open import Data.Nat using (ℕ; zero; suc; _<_; _≤_; z≤n; s≤s) open import Data.Nat.Properti...
primitive abstract postulate private mutual macro variable instance record F : Set where field
open import Common.Level -- Note that this is level-polymorphic record ⊤ {a} : Set a where constructor tt data ⊥ {a} : Set a where data ℕ : Set where zero : ℕ suc : ℕ → ℕ lzero' : ℕ → Level lzero' zero = lzero lzero' (suc n) = lzero ⊔ (lzero' n) IsZero : (x : ℕ) → Set (lsuc (lzero' x)) IsZero zero = ⊤ I...
open import Level using (_⊔_) open import Data.Maybe using (Maybe; nothing; just) open import Data.List.Any as A hiding (map) open import Relation.Binary.PropositionalEquality.Core as PropEq open import Relation.Binary open import Prelude hiding (map) open Eq {{...}} module RW.Data.PMap (A : Set){{eqA : Eq A}} where ...
{-# OPTIONS --universe-polymorphism #-} open import Level module Categories.Categories.Products (o ℓ e : Level) where open import Categories.Category open import Categories.Categories import Categories.Object.Products open Categories.Object.Products (Categories o ℓ e) open import Categories.Product import Categori...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core using (Category) open import Categories.Functor.Bifunctor using (Bifunctor) module Categories.Diagram.Cowedge {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {D : Category o′ ℓ′ e′} (F : Bifunctor (Category.op C) C D) where private module C = Category...
{- 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.ImplShared.Consensus.Types open import Optics.All open i...
{-# OPTIONS --without-K #-} module function.isomorphism.univalence where open import equality.core open import function.core open import function.isomorphism.core open import hott.equivalence.alternative open import hott.univalence ≅⇒≡ : ∀ {i}{X Y : Set i} → X ≅ Y → X ≡ Y ≅⇒≡ = ≈⇒≡ ∘ ≅⇒≈
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Structures.Category where open import Cubical.Foundations.Prelude open import Cubical.DStructures.Base open import Cubical.DStructures.Meta.Properties open import Cubical.Categories.Category renaming (isUnivalent to isUnivalentCat) priva...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import LogicalFormulae open import Setoids.Subset open import Setoids.Setoids open import Setoids.Orders.Partial.Definition open import Setoids.Orders.Total.Definition open import Sets.Equi...
module FStream.Clocked where open import Library open import FStream.Core mutual record ClSF {i : Size} {ℓ₁ ℓ₂} {Cl : Set ℓ₂} (C : Container ℓ₁) (cl : FStream C Cl) (A B : Set ℓ₂) : Set (ℓ₁ ⊔ ℓ₂) where inductive field inFCl : A → ⟦ C ⟧ (ClSF' {i} C cl A B) record ClSF' {i : Size} {ℓ₁ ℓ₂} {Cl : Set ...
{-# OPTIONS --rewriting --confluence-check #-} open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite postulate A : Set a b c : A f g : A → A rew₁ : f a ≡ b rew₂ : ∀ {x} → f (g x) ≡ c rew₃ : g a ≡ a {-# REWRITE rew₁ #-} {-# REWRITE rew₂ #-} {-# REWRITE rew₃ #-} works : (x : A) → f ...
module Mendler (F : Set → Set) where open import Data.Product using (_×_) Alg : Set → Set₁ Alg X = ∀ (R : Set) → (R → X) → F R → X test : Set → Set test A = A × A test′ : ∀ (R : Set) → Set test′ A = A × A
--{-# OPTIONS -vtc:50 #-} {-# OPTIONS --double-check #-} open import Agda.Primitive postulate Id : (l : Level) (A : Set l) → A → A → Set l postulate w/e : (l : Level) (A : Set l) → A data Box l (A : Set l) : Set l where box : A → Box l A unbox : (l : Level) (A : Set l) → Box l A → A unbox l A (box x) = x record...
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-} open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Relation.Nullary.Base -- ¬_ open import Cubical.Relation.Binary.Base -- Rel open import Cubical.Data.Sigma.Base renaming (_×_ to infixr 4 _×_) open...
module InterpretationEqualityExceptAtVariableName where open import OscarPrelude open import VariableName open import FunctionName open import PredicateName open import Elements open import Interpretation record _≞_/_ (𝓘 : Interpretation) (I : Interpretation) (𝑥 : VariableName) : Set where field μEquality :...
{-# OPTIONS --cubical --safe #-} module Cubical.Structures.InftyMagma where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.FunExtEquiv open import Cubical.Foundations.SIP renaming (SNS-PathP to SNS) private variable ℓ ℓ' ℓ'' : Level -- ∞-Magmas wi...
module 060-commutative-group where -- We need groups. open import 050-group record CommutativeGroup {M : Set} (_==_ : M -> M -> Set) (_*_ : M -> M -> M) (id : M) (invert : M -> M) : Set1 where field group : Group _==_ _*_ id invert comm : ∀ {r s} -> (r * s) == (s * r) open Group group publi...
{-# OPTIONS --without-K #-} module Explore.BinTree where open import Level.NP open import Type hiding (★) open import Data.Tree.Binary open import Data.Zero open import Data.One open import Data.Sum open import Data.Product open import Relation.Binary.PropositionalEquality.NP open import HoTT open Equivalences open i...
{-# OPTIONS --safe --warning=error --without-K #-} open import Groups.Definition open import Groups.Abelian.Definition open import Setoids.Setoids open import Rings.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Modules.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+R_ : A →...
{-# OPTIONS --safe --without-K #-} open import Level using (_⊔_) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; trans; subst₂) open import Function using (_∘_) open import Relation.Nullary.Negation using (contradiction) module PiCalculus.Utils where module ListInv {a} {A : Set a} where o...
record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field proj₁ : A proj₂ : B proj₁ data ⊤ : Set where tt : ⊤ id : ⊤ → ⊤ id tt = tt data Foo : ⊤ → Set where foo : {x : ⊤} → Foo (id x) test : {x : Σ ⊤ Foo} → Set test {x₁ , x₂} = {!x₂!}
module Issue639 where postulate A : Set
{-# OPTIONS --enable-prop #-} data _≡P_ {A : Set} (x : A) : A → Prop where refl : x ≡P x J-P : {A : Set} (x : A) (P : (y : A) → x ≡P y → Set) → P x refl → (y : A) (e : x ≡P y) → P y e J-P x P p .x refl = p
module DuplicateConstructors where data D : Set where c : D c : D f : D -> D f c = c
-- Home to all functions creating, modifying or removing ScopeEnv or ScopeState module ScopeState where open import Data.List using (List) renaming ([] to emptyList ; map to listMap ; _∷_ to _cons_) open import Data.String renaming (_++_ to _then_) open import Data.Bool open import Data.Nat open import Data.Fin renamin...
{- Copyright 2019 Lisandra Silva Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
module Prelude.Strict where open import Prelude.Equality open import Agda.Builtin.Strict force : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) → (∀ x → B x) → B x force x f = primForce x f force′ : ∀ {a b} {A : Set a} {B : A → Set b} → (x : A) → (∀ y → x ≡ y → B y) → B x force′ x k = (force x λ y → k y) refl forceLe...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Graph where open import Cubical.Data.Graph.Base public open import Cubical.Data.Graph.Examples public
------------------------------------------------------------------------ -- The partiality monad's monad instance ------------------------------------------------------------------------ {-# OPTIONS --cubical --safe #-} module Partiality-monad.Inductive.Monad where open import Equality.Propositional.Cubical open imp...
postulate F : Set₂ → Set₃ G : Set₁ → Set₂ H : Set₀ → Set₁ infix 1 F infix 2 G infix 3 H syntax F x = ! x syntax G x = # x syntax H x = ! x ok₁ : Set₀ → Set₂ ok₁ X = # ! X ok₂ : Set₁ → Set₃ ok₂ X = ! # X
{-# OPTIONS --cubical #-} module n2o.N2O where open import proto.Base open import proto.Core open import proto.IO open import n2o.Network.WebSocket open import n2o.Network.Socket open import n2o.Network.Core open import n2o.Network.Internal -- open import Infinity.Proto postulate terminationCheck : IO ⊤ {-#...
module Syntax where data S (A₁ : Set) (A₂ : A₁ → Set) : Set where _,_ : (x₁ : A₁) → A₂ x₁ → S A₁ A₂ syntax S A₁ (λ x → A₂) = x ∈ A₁ × A₂ module M where data S' (A₁ : Set) (A₂ : A₁ → Set) : Set where _,'_ : (x₁ : A₁) → A₂ x₁ → S' A₁ A₂ syntax S' A₁...
-- Andreas, Issue 1944, Bengtfest Marsstrand 2016-04-28 -- A reason why issue 1098 (automatic opening of record modules) -- cannot easily be fixed data Bool : Set where true false : Bool if_then_else_ : ∀{A : Set} → Bool → A → A → A if true then t else e = t if false then t else e = e record Testable (A : Set) :...
------------------------------------------------------------------------ -- The Agda standard library -- -- Functors on indexed sets (predicates) ------------------------------------------------------------------------ -- Note that currently the functor laws are not included here. {-# OPTIONS --without-K --safe #-} ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Monad.Duality {o ℓ e} (C : Category o ℓ e) where open import Categories.Functor open import Categories.NaturalTransformation open import Categories.Monad open import Categories.Comonad private module C = Category C open C ope...
open import Reflection open import Reflection.Term open import Reflection.Universe open import Reflection.Annotated open import Agda.Builtin.Reflection using (withReconstructed; dontReduceDefs; onlyReduceDefs) open import Relation.Nullary open import Data.String as S open import Data.Maybe hiding (_>>=_) open import Da...
------------------------------------------------------------------------------ -- The relation of divisibility on partial natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no...
module FFI.IO where import Lvl open import Data open import String open import Type postulate IO : ∀{a} → Type{a} → Type{a} {-# BUILTIN IO IO #-} {-# FOREIGN GHC type AgdaIO a b = IO b #-} {-# COMPILE GHC IO = type AgdaIO #-} {-# FOREIGN GHC import qualified Data.Text.IO #-} postulate printStr : String → IO(Un...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NType2 -- [Subtype] is defined in lib.NType. module lib.types.Subtype where infix 40 _⊆_ _⊆_ : ∀ {i j₁ j₂} {A : Type i} → SubtypeProp A j₁ → SubtypeProp A j₂ → Type (lmax i (lmax j₁ j₂)) P₁ ⊆ P₂ = ∀ a → SubtypeProp.prop P₁ a → SubtypeP...
module _ where module A where postulate Nat : Set suc : Nat → Nat open A syntax suc x = ⟦ x ⟧ -- Error WAS: -- Names out of scope in fixity declarations: suc -- Error SHOULD BE something like: -- Name 'suc' not declared in same scope as its syntax declaration.
{-# OPTIONS --sized-types --show-implicit #-} -- {-# OPTIONS -v tc.size.solve:60 #-} module Issue300 where open import Common.Size data Nat : {size : Size} -> Set where zero : {size : Size} -> Nat {↑ size} suc : {size : Size} -> Nat {size} -> Nat {↑ size} -- Size meta used in a different context than the one c...
module sn-calculus-compatconf.base where open import sn-calculus open import utility renaming (_U̬_ to _∪_) open import Esterel.Lang open import Esterel.Lang.Properties open import Esterel.Lang.Binding open import Esterel.Lang.CanFunction using (Can ; Canₛ ; Canₛₕ ; Canₖ ; module CodeSet) open import Esterel.Enviro...
{- 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 -} import LibraBFT.Impl.OBM.Genesis as Genesis open im...
-- A simple word counter open import Coinduction using ( ♯_ ) open import Data.Char.Classifier using ( isSpace ) open import Data.Bool using ( Bool ; true ; false ) open import Data.Natural using ( Natural ; show ) open import System.IO using ( Command ) open import System.IO.Transducers.Lazy using ( _⇒_ ; inp ; out ;...
module _ where data D (@erased A : Set) : Set -- The modality should not be repeated here data D (@erased A) where mkD : D A
{-# OPTIONS --guardedness #-} module Class.Monad.IO where open import Class.Monad open import IO open import Level record MonadIO {a} (M : Set a → Set a) {{_ : Monad M}} : Set (suc a) where field liftIO : ∀ {A} → IO A → M A open MonadIO {{...}} public
open import FRP.JS.Float using ( ℝ ) renaming ( _/?_ to _/?r_ ) open import FRP.JS.Int using ( ℤ ; _-_ ) renaming ( float to floatz ; show to showz ) open import FRP.JS.Primitive using ( String ) open import FRP.JS.Bool using ( Bool ; _∨_ ; not ) open import FRP.JS.True using ( True ) open import FRP.JS.Maybe using ( M...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core open import Categories.Object.Zero -- Normal Mono and Epimorphisms -- https://ncatlab.org/nlab/show/normal+monomorphism module Categories.Morphism.Normal {o ℓ e} (𝒞 : Category o ℓ e) (𝒞-Zero : Zero 𝒞) where open import Level open import Cate...
{- 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.PKCS import LibraBFT.Impl.Types.LedgerInfoWith...
module TerminationNoArgs where loop : Set loop = loop
module lib.libraryDec where -- old version of Dec -- open import Data.Empty open import Level open import Relation.Nullary using ( ¬_ ) data Dec {p} (P : Set p) : Set p where yes : ( p : P) → Dec P no : (¬p : ¬ P) → Dec P
module UselessPrivateImportAs where private import Common.Prelude as P
------------------------------------------------------------------------ -- The Agda standard library -- -- Automatic solver for equations over product and sum types -- -- See examples at the bottom of the file for how to use this solver ------------------------------------------------------------------------ {-# OPTI...
module Sized.ConsoleExample where open import SizedIO.Base open import SizedIO.Console hiding (main) open import NativeIO myProgram : ∀{i} → IOConsole i Unit force myProgram = do' getLine λ line → do (putStrLn line) λ _ → do (putStrLn line) λ _ → ...
module Calculator where open import Human.Humanity hiding (_==_) open import Human.Nat public hiding (_==_) open import Human.Char public open import Human.Equality public --------- Data --------- -- Generic proof to proof "Or" operation. Proof that one of the arguments must be true data Either (A B : Set) : Set wher...
open import level open import bool open import bool-thms open import eq open import eq-reasoning open import sum open import nat data Lgc : Set where ttrue : Lgc ffalse : Lgc aand : Lgc → Lgc → Lgc oor : Lgc → Lgc → Lgc nnot : Lgc → Lgc check_ : Lgc → 𝔹 check ttrue = tt check ffalse = ff chec...
{-# OPTIONS --without-K --safe #-} -- Verbatim dual of Categories.Category.Construction.Kleisli module Categories.Category.Construction.CoKleisli where open import Level open import Categories.Category open import Categories.Functor using (Functor; module Functor) open import Categories.NaturalTransformation hiding ...
import Data.Integer as Integer open Integer using (ℤ) module NumberTheory.ModularArithmetic (m : ℤ) where open import Algebra.Structures open Integer hiding (+_; _-_) -- using (_+_; _*_; -_; +0) open import Data.Integer.GCD open import Data.Integer.Properties hiding (*-1-isMonoid; *-1-isCommutativeMonoid; +-*-isComm...
{-# OPTIONS -v tc.lhs.unify:80 #-} data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x postulate A : Set a : A record Foo : Set where constructor foo field anA : A test : (f : A → A) (x : Foo) → foo (f a) ≡ x → A test f .(foo (f a)) refl = a
module Highlighting where Set-one : Set₂ Set-one = Set₁ record R (A : Set) : Set-one where constructor con field X : Set F : Set → Set → Set F A B = B field P : F A X → Set -- highlighting of non-terminating definition Q : F A X → Set Q = Q postulate P : _ open import Highlighting.M data D (A :...
------------------------------------------------------------------------ -- Integers, defined using a quotient type ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} import Equality.Path as P module Integer.Quotient {e⁺} (eq : ∀ {a p} → P.Equality-with...
-- Reported by guillaume.brunerie, Sep 18, 2013 -- Andreas, 2013-10-27 issue submitted by Guilliaume Brunerie {-# OPTIONS --copatterns #-} module Issue907 where -- Globular types as a coinductive record record Glob : Set1 where coinductive field Ob : Set Hom : (a b : Ob) → Glob open Glob public Glob-c...
module Oscar.Category.CategoryAction where open import Oscar.Category.Action open import Oscar.Category.Category open import Oscar.Category.SemigroupoidAction open import Oscar.Category.Setoid open import Oscar.Level module _ {𝔊𝔬 𝔊𝔪 𝔊𝔮} (category : Category 𝔊𝔬 𝔊𝔪 𝔊𝔮) where open Category category mod...
------------------------------------------------------------------------ -- The Agda standard library -- -- Morphisms between algebraic structures ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Algebra.Morphism where open import Relation.Binary open...
module Function.Equals.Proofs where import Lvl open import Data import Functional import Function.Equals open import Logic.Predicate open import Logic.Propositional open import Structure.Setoid open import Structure.Function import Structure.Operator.Names as Names open import Structure.Operator.Pr...
{-# OPTIONS --safe #-} module Definition.Conversion.Conversion where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.RedSteps open import Definition.Typed.Properties open import Definition.Conversion open import Definition.Conversion.Stability open import Definition.Typed.Cons...