text
stringlengths
4
690k
module ModuleInstInLet where data Nat : Set where zero : Nat suc : Nat -> Nat module List (Elem : Set) where data List : Set where [] : List _::_ : Elem -> List -> List xs : let open List Nat in List xs = List._::_ zero List.[]
{-# OPTIONS --no-termination-check #-} -- TODO: switch the termination checker back on. open import Coinduction using ( ∞ ; ♭ ; ♯_ ) open import Data.Bool using ( Bool ; true ; false ) open import Data.Maybe using ( Maybe ; just ; nothing ) open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ ) open import Data.Product usin...
{-# OPTIONS --without-K --safe #-} module EqBool where open import Data.Bool record HasEqBool {a} (A : Set a) : Set a where field _==_ : A → A → Bool open HasEqBool ⦃ ... ⦄ public open import Data.List as List using (List; _∷_; []) ==[] : ∀ {a} {A : Set a} → ⦃ _ : HasEqBool A ⦄ → List A → List A → Bool ==[] [] ...
module L0 where open import Common -- Syntax data Name : Set where d n j m : Name data Pred1 : Set where M B : Pred1 data Pred2 : Set where K L : Pred2 data Expr : Set where _⦅_⦆ : Pred1 -> Name -> Expr _⦅_,_⦆ : Pred2 -> Name -> Name -> Expr ¬ : Expr -> Expr [_∧_] : Expr -> Expr -> Expr [_∨_] : Expr ...
{-# OPTIONS --cubical --safe --postfix-projections #-} open import Prelude open import Relation.Binary module Relation.Binary.Construct.Bounded {e} {E : Type e} {r₁ r₂} (totalOrder : TotalOrder E r₁ r₂) where open TotalOrder totalOrder renaming (refl to ≤-refl) import Data.Unit.UniversePolymorphic as Poly import Dat...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lexicographic ordering of lists ------------------------------------------------------------------------ -- The definitions of lexicographic ordering used here are suitable if -- the argument order is a strict p...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Base where {- The free commutative algebra over a commutative ring, or in other words the ring of polynomials with coefficients in a given ring. Note that this is a constructive definition, which entails that polynomials cannot be repres...
module Issue256 where open import Common.Level const : ∀ {a b} {A : Set a} {B : Set b} → A → B → A const x = λ _ → x level : ∀ {ℓ} → Set ℓ → Level level {ℓ} _ = ℓ -- termination check should fail for the following definition ℓ : Level ℓ = const lzero (Set ℓ) -- A : Set (lsuc {!ℓ!}) -- A = Set (level A)
module FunctionName where open import OscarPrelude record FunctionName : Set where constructor ⟨_⟩ field name : Nat open FunctionName public instance EqFunctionName : Eq FunctionName Eq._==_ EqFunctionName _ = decEq₁ (cong name) ∘ (_≟_ on name $ _)
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.NConnected open import lib.NType2 open import lib.cubical.Square open import lib.types.Lift open import lib.types.Nat open import lib.types.Pointed open import lib.types.Sigma open import lib.types.TLevel open import lib.types.Truncation open import li...
module Bug where data A : Set where a : A h : A -> A h a = a data B : A -> Set where b : (x : A) -> B (h x) data _==_ : {x₁ x₂ : A} -> B x₁ -> B x₂ -> Set where eqb : {x : A} -> b x == b x -- The problem here is that we get the constraint h x = h x, which when x is a -- meta variable we don't solve. This con...
module sv20.assign2.Second_old2 where -- ------------------------------------------------------------------------ open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong) open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.Nat.Properties using (≡-decSetoid) open import Data.Lis...
module Issue307 where postulate A : Set _! : A → A x ! = x ! : A → A ! x = x data D : Set where d : D → D syntax d x = x d f : D → D f (x d) = x g : D → D g (d x) = x
-- Andreas, 2015-09-09 Issue 1643 -- {-# OPTIONS -v tc.mod.apply:20 #-} -- {-# OPTIONS -v tc.signature:30 #-} -- {-# OPTIONS -v tc.display:100 #-} -- {-# OPTIONS -v scope:50 -v scope.inverse:100 -v interactive.meta:20 #-} module _ where module M where postulate A : Set module N = M -- This alias used to introduc...
module PatternSynonymNoParse where pattern f x = a b
------------------------------------------ -- Mathematical induction derived from Z ------------------------------------------ module sv20.assign2.SetTheory.PMI where open import sv20.assign2.SetTheory.Logic open import sv20.assign2.SetTheory.ZAxioms open import sv20.assign2.SetTheory.Algebra open import sv20.assign2...
module tmp where open import univ open import cwf open import Base open import Nat open import help open import proofs {- TODO: Prove w = ƛ ((w // wk) ∙ vz) (η) ƛ v // σ = ƛ (v // (σ ∘ wk ,, vz)) w ∙ u // σ = (w // σ) ∙ (u // σ) -} {- lem-tmp : {Γ : Con}{A : Type Γ}(B : Type (Γ , A)) -> Π A B =Ty Π A...
------------------------------------------------------------------------ -- The Agda standard library -- -- The free monad construction on containers ------------------------------------------------------------------------ module Data.Container.FreeMonad where open import Level open import Function using (_∘_) open i...
module Misc.NumeralSystem where -- One Numeral System to rule them all!? open import Data.Maybe using (Maybe; nothing; just) open import Data.Nat open import Data.Product open import Data.Unit using (⊤; tt) open import Data.Empty using (⊥; ⊥-elim) open import Relation.Nullary using (¬_ ; yes; no) open import Relatio...
module Issue390 where data main : Set where
module Prelude.List.Relations.Permutation where open import Prelude.List.Base open import Prelude.List.Relations.Any data Permutation {a} {A : Set a} : List A → List A → Set a where [] : Permutation [] [] _∷_ : ∀ {x xs ys} (i : x ∈ ys) → Permutation xs (deleteIx ys i) → Permutation (x ∷ xs) ys
module ASN1.BER where open import Data.Word8 using (Word8; _==_) renaming (primWord8fromNat to to𝕎; primWord8toNat to from𝕎) open import Data.ByteString using (ByteString; Strict; Lazy; null; pack; unpack; fromChunks; toStrict; unsafeHead; unsafeTail; unsafeSplitAt) renaming (length to BSlength) open import Data.Boo...
------------------------------------------------------------------------------ -- Conversion rules for the division ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism...
{-# OPTIONS --safe #-} module Sol01 where open import Data.Nat open import Data.Nat.Properties open import Relation.Binary.PropositionalEquality fibAux : ℕ -> ℕ -> ℕ -> ℕ fibAux a b 0 = a fibAux a b (suc n) = fibAux b (a + b) n fib2 : ℕ -> ℕ fib2 = fibAux 0 1 fib : ℕ -> ℕ fib 0 = 0 fib 1 = 1 fib (suc (suc n)) = fib...
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness --no-subtyping #-} module Agda.Builtin.Reflection.External where open import Agda.Builtin.List open import Agda.Builtin.Nat open import Agda.Builtin.Sigma open import Agda.Builtin.String postulate execTC : String → List String → String → TC ...
open import Mockingbird.Forest using (Forest) -- Russel’s Forest module Mockingbird.Problems.Chapter15 {b ℓ} (forest : Forest {b} {ℓ}) where open import Data.Empty using (⊥; ⊥-elim) open import Data.Product using (_×_; _,_; ∃-syntax; proj₁; proj₂) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Function usin...
-- Disjoint sum type; also used as logical disjunction. {-# OPTIONS --safe #-} module Tools.Sum where data _⊎_ (A B : Set) : Set where inj₁ : A → A ⊎ B inj₂ : B → A ⊎ B -- Idempotency. id : ∀ {A} → A ⊎ A → A id (inj₁ x) = x id (inj₂ x) = x -- Symmetry. sym : ∀ {A B} → A ⊎ B → B ⊎ A sym (inj₁ x) = inj₂ x sym ...
mutual record R (A : Set) : Set where inductive field f₁ : A f₂ : R′ A record R′ (A : Set) : Set where inductive field f : R A
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Polynomials.Multivariate.Equiv.Induced-Poly where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_) op...
module FFI where open import Common.Prelude _+'_ : Nat → Nat → Nat zero +' y = y suc x +' y = suc (x +' y) {-# COMPILE GHC _+'_ = (+) :: Integer -> Integer -> Integer #-} -- on-purpose buggy haskell implementation! _+''_ : Nat → Nat → Nat zero +'' y = y suc x +'' y = suc (x +'' y) {-# COMPILE GHC _+''_ = (-) :: Int...
------------------------------------------------------------------------------ -- Testing an implicit argument for natural numbers induction ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --exact-split #-} {-# OPTIONS -...
{-# OPTIONS --no-main #-} postulate easy : (A : Set₁) → A record R₁ : Set₂ where field A : Set₁ record R₂ : Set₂ where field r₁ : R₁ a : R₁.A r₁ r₁ : R₁ r₁ .R₁.A = Set r₂ : R₂ r₂ = λ where .R₂.r₁ → r₁ .R₂.a → easy _
{-# OPTIONS --rewriting #-} open import Agda.Builtin.Unit open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite data Box : Set → Set₁ where box : (A : Set) → Box A data D (A : Set) : Set₁ where c : A → Box A → D A postulate any : {A : Set} → A one : {A : Set} → D A rew : ∀ A → c any ...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Strict2Group.Explicit.ToXModule where open import Cubical.Foundations.Prelude hiding (comp) open import Cubical.Data.Group.Base open import Cubical.Data.XModule.Base open import Cubical.Data.Group.Action.Base open import Cubical.Data.Sigma open import Cubical.Da...
module Test.Numeral where import Lvl open import Relator.Equals{Lvl.𝟎} module One where test0 : (0 mod 1) ≡ 0 test0 = [≡]-intro test1 : (1 mod 1) ≡ 0 test1 = [≡]-intro test2 : (2 mod 1) ≡ 0 test2 = [≡]-intro test3 : (3 mod 1) ≡ 0 test3 = [≡]-intro test4 : (4 mod 1) ≡ 0 te...
{-# OPTIONS --without-K --safe #-} module Relation.Binary.PropositionalEquality.FasterReasoning {a} {A : Set a} where open import Relation.Binary.PropositionalEquality infix 3 _∎ infixr 2 _≡⟨⟩_ step-≡ step-≡˘ infix 1 begin_ begin_ : ∀{x y : A} → x ≡ y → x ≡ y begin_ x≡y = x≡y _≡⟨⟩_ : (x {y} : A) → x ≡ y → x ≡ y ...
module AbstractData where abstract data D : Set where c : D d : D d = c
-- --------------------------------------------------------------------- -- Geometric Group Theory (topics from) -- ------------------------------------------ -- actions are usually denoted as `·` (\cdot) -- mimics structure in stdlib -- --------------------------------------------------------------------- module GG...
{-# OPTIONS --show-implicit #-} {-# OPTIONS --sized-types #-} {-# OPTIONS --termination-depth=2 #-} -- {-# OPTIONS -v term:10 #-} module SizedBTree where open import Common.Size data BTree (A : Set) : {size : Size} → Set where leaf : {i : Size} → A → BTree A {↑ i} node : {i : Size} → BTree A {i} → BTree A {i} → ...
{- Lemmas and operations involving rewriting and heterogeneous equality. -} module TemporalOps.Common.Rewriting where open import Relation.Binary.HeterogeneousEquality as ≅ open import Relation.Binary.PropositionalEquality as ≡ -- | Rewriting and heterogeneous equality -- Substitution with identity predicate – exp...
module Issue546 where data I : Set where i : I data ⊤ : Set where tt : ⊤ abstract P : I → Set P i = ⊤ Q : P i → Set Q _ = ⊤ q : Q tt q = tt -- Q tt should be rejected. -- This bug was introduced in Agda 2.3.0.
open import Prelude hiding (id; Bool) module Implicits.Resolution.Deterministic.Incomplete where open import Implicits.Syntax open import Implicits.WellTyped open import Implicits.Substitutions open import Data.Product open import Data.List hiding ([_]) open import Data.List.Any open Membership-≡ open import Extensi...
module Issue676 where data Bool : Set where true false : Bool data ⊥ : Set where data Silly A : Set where [_] : A → Silly A fail : ⊥ → Silly A -- This shouldn't be projection-like since the second clause won't reduce. unsillify : ∀ {A} → Silly A → A unsillify [ x ] = x unsillify (fail ()) data _≡_ {A : Set...
module Coirc.Format where open import Data.Empty open import Data.Unit open import Data.Bool open import Data.Nat open import Data.Char open import Data.String open import Data.List open import Data.Sum open import Data.Product open import Coirc infixr 3 _∣_ infixr 1 _>>_ _>>-_ _>>=_ within? : Char → ℕ → ℕ → Bool wit...
------------------------------------------------------------------------ -- Termination predicates ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --sized-types #-} open import Prelude hiding (↑; module W) module Delay-monad.Alternative.Termination {a} {A : Type ...
module AnonymousDecl where _ : Set₁ _ = Set _ : Set → Set _ = λ x → x _∋_ : ∀ {ℓ} (A : Set ℓ) → A → A A ∋ a = a _ = Set₁ _ = (Set → Set) ∋ λ x → x data Bool : Set where t f : Bool not : Bool → Bool not t = f not f = t data _≡_ {A : Set} (a : A) : A → Set where refl : a ≡ a _ : ∀ x → not (not x) ≡ x _ = λ { t ...
open import FRP.JS.Time.Core using ( Time ) module FRP.JS.RSet where infixr 1 _⇒_ RSet : Set₁ RSet = Time → Set _⇒_ : RSet → RSet → RSet (A ⇒ B) t = A t → B t ⟨_⟩ : Set → RSet ⟨ A ⟩ t = A ⟦_⟧ : RSet → Set ⟦ A ⟧ = ∀ {t} → A t
-- Andreas, 2016-12-30 test case for #2369 -- {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v scope.import:20 #-} module Issue2369 where import Issue2369.OpenIP -- Error is: -- Module cannot be imported since it has open interaction points -- (consider adding {-# OPTIONS --allow-unsolved-metas #-} to this...
module <-trans-revisited where open import Data.Nat using (ℕ; suc) open import Relations using (_≤_; z≤n; s≤s; ≤-trans; _<_; z<s; s<s) open import ≤-iff-< using (≤-iff-<′) <-iff-≤ : ∀ {m n : ℕ} → m < n --------- → suc m ≤ n <-iff-≤ z<s = s≤s z≤n <-iff-≤ (s<s m<n) = s≤s (<-iff-≤ m<n) -- <-trans の別証明 (≤...
postulate A : Set data B (a : A) : Set where conB : B a → B a → B a data C (a : A) : B a → Set where conC : {bl br : B a} → C a bl → C a br → C a (conB bl br) -- First bug. {- a !=< "An internal error has occurred. Please report this as a bug.\nLocation of the error: src/full/Agda/TypeChecking/Telescope.hs:68\...
------------------------------------------------------------------------ -- Correct-by-construction pretty-printing -- -- Nils Anders Danielsson ------------------------------------------------------------------------ -- A pretty-printing library that guarantees that pretty-printers are -- correct (on the assumption t...
{-# OPTIONS --without-K --rewriting #-} open import HoTT {- Maybe it is actually easier to prove [sum-subindicator] and then derive the other lemma. -} module groups.SumOfSubIndicator where module _ {i} (G : Group i) where open Group G abstract sum-ident : ∀ {I} (f : Fin I → El) → (∀ <I → f <I ==...
module Issue502 where record R : Set where record S (A : Set) : Set where field f : A → A
-------------------------------------------------------------------------------- -- This file is the entry point for checking or executing code. It provides the -- type MetaContext, which tracks the entire state of the interpreter as well as -- the function tryExecute to parse and execute some code if possible --------...
{-# OPTIONS --erased-cubical --safe #-} module Instruments where open import Data.Fin using (#_) open import MidiEvent using (InstrumentNumber-1; maxChannels) open import Data.Vec using (Vec; []; _∷_) -- Start of an instrument list -- all instruments have this type piano : InstrumentNumber-1 piano ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Documentation for the List type ------------------------------------------------------------------------ {-# OPTIONS --warning noMissingDefinitions #-} module README.Data.List where open import Algebra.Structu...
-- {-# OPTIONS -v scope.let:10 #-} module Issue381 (A : Set) where data _≡_ (x : A) : A → Set where refl : x ≡ x id : A → A id x = let abstract y = x in y -- abstract in let should be disallowed lemma : ∀ x → id x ≡ x lemma x = refl
module Metalogic.Classical.Propositional.Syntax {ℓₚ} (Proposition : Set(ℓₚ)) where import Lvl infixl 1011 •_ infixl 1010 ¬_ infixl 1005 _∧_ infixl 1004 _∨_ infixl 1000 _⇐_ _⇔_ _⇒_ data Formula : Set(ℓₚ) where •_ : Proposition → Formula ⊤ : Formula ⊥ : Formula ¬_ : Formula → Formula _∧_ : Formula → Formu...
{-# OPTIONS --cubical --safe #-} module Lens where open import Lens.Definition public open import Lens.Operators public open import Lens.Composition public open import Lens.Pair public
module Data.Unit.Instance where open import Class.Monoid open import Data.Unit.Polymorphic instance Unit-Monoid : ∀ {a} → Monoid {a} ⊤ Unit-Monoid = record { mzero = tt ; _+_ = λ _ _ -> tt }
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Group.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.SIP open import Cubical.Data.Sigma open import Cubical.Data.Int renaming (_+_ to _+Int_ ; _-_ to _-Int_) open import Cubical.Data.Unit open import Cubical....
{-# OPTIONS --cubical #-} module n2o.Network.WebSocket where open import proto.Base open import proto.IO open import n2o.Network.Internal {-# FOREIGN GHC import Network.N2O.Web.WebSockets #-} data N2OProto (A : Set) : Set where Io : ByteString Strict → ByteString Strict → N2OProto A Nop : ...
-- Andreas, 2012-11-22 abstract aliases module Issue729 where abstract B = Set B₁ = B B₂ = Set abstract foo : Set₁ foo = x where x = B {- does not work yet mutual abstract D = C C = B -} -- other stuff private A = Set Y = let X = Set in Set
{-# OPTIONS --without-K --safe #-} module root2 where -- imports. We use the latest agda stdlib. open import Data.Nat open import Data.Nat.DivMod open import Data.Nat.Properties open import Data.Nat.Solver open import Relation.Binary.PropositionalEquality open import Data.Product open import Data.Sum renaming (inj₁ ...
module pretty where open import general-util -- Adapted from A Prettier Printer (Philip Wadler) -- https://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf -- The pretty printer infixr 5 _:<|>_ infixr 6 _:<>_ infixr 6 _<>_ data DOC : Set where NIL : DOC _:<>_ : DOC → DOC → DOC NEST : ℕ → DOC → DOC ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core using (Category) module Categories.Diagram.Pushout {o ℓ e} (C : Category o ℓ e) where open Category C open HomReasoning open import Level private variable A B E X Y Z : Obj record Pushout (f : X ⇒ Y) (g : X ⇒ Z) : Set (o ⊔ ℓ ⊔ e) where ...
module Prelude.Product where open import Agda.Primitive open import Agda.Builtin.Sigma public open import Prelude.Function open import Prelude.Equality open import Prelude.Decidable open import Prelude.Ord instance ipair : ∀ {a b} {A : Set a} {B : A → Set b} {{x : A}} {{y : B x}} → Σ A B ipair {{x}} {{y}} = x , ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.DescendingList where open import Cubical.Data.DescendingList.Base public open import Cubical.Data.DescendingList.Properties public open import Cubical.Data.DescendingList.Examples public open import Cubical.Data.DescendingList.Strict public open i...
import Lvl -- TODO: Is it possible formalize this like this? Is it even correct? -- Based on http://www.maths.ed.ac.uk/~tl/edinburgh_yrm/ (2017-11-22) module Sets.ETCS where open import Logic.Propositional module Theory (S : Set(Lvl.𝟎)) (F : S → S → Set(Lvl.𝟎)) (_∘_ : ∀{a b c} → F(b)(c) → F(a)(b) → F(a)(...
module Lectures.Two where -- Introduce imports open import Lectures.One -- Introduce type parameters module List-types where data List (A : Set₁) : Set₁ where [] : List A _∷_ : A → List A → List A _ : List Set _ = ⊥ ∷ (ℕ ∷ (⊤ ∷ [])) module List {ℓ} where data List (A : Set ℓ) : Set ℓ where ...
{- 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 Level open import Function open import Category.Functor open import...
open import Agda.Primitive open import Agda.Builtin.Nat -- Named implicit function types postulate T : Set → Set → Set foo : {A = X : Set} {B : Set} → T X B bar : ∀ {A = X} {B} → T X B foo₁ : (X : Set) → T X X foo₁ X = foo {A = X} {B = X} bar₁ : ∀ X → T X X bar₁ X = bar {A = X} {B = X} Id : {A = _ : Set} → ...
module Prelude.Bot where data Bot : Set where magic : ∀{A : Set} -> Bot -> A magic ()
open import Data.List {- --- 6. Vectors --- -} {- 6.1 Warmup -} {- Problem: what do we return for the empty list ? -} head2 : {A : Set} → List A → A head2 [] = {!!} head2 (x ∷ l) = x {- 6.2 Definition -} open import Data.Nat data Vec (A : Set) : ℕ → Set where [] : Vec A zero _::_ : {n : ℕ} → A → Vec A n → Vec ...
{-# OPTIONS --without-K --safe #-} open import Level module Categories.Category.Instance.One where open import Data.Unit using (⊤; tt) open import Categories.Category open import Categories.Functor open import Categories.Category.Instance.Cats import Categories.Object.Terminal as Term module _ {o ℓ e : Level} wher...
{-# OPTIONS --universe-polymorphism #-} module Categories.Presheaves where open import Level open import Categories.Category open import Categories.Agda open import Categories.FunctorCategory Presheaves : ∀ {o ℓ e : Level} → Category o ℓ e → Category _ _ _ Presheaves {o} {ℓ} {e} C = Functors (Category.op C) (ISetoid...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of homogeneous binary relations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Binary where open import Agda.Builtin.Equa...
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.SimilaritySingleton open import Oscar.Class.SimilarityM module Oscar.Class.Similarity where module Similarity {𝔞} {𝔄 : Ø 𝔞} {𝔟} {𝔅 : Ø 𝔟} {𝔣} {𝔉 : Ø 𝔣} {𝔞̇ 𝔟̇} (_∼₁_ : 𝔄 → 𝔄 → Ø 𝔞̇) (_∼₂_ : 𝔅 → 𝔅 → Ø 𝔟̇) (let _∼₂_ ...
module Silica where open import Agda.Builtin.Bool public open import Data.Bool using (true; false) public open import Prelude public open import Data.Nat public open import Data.List public open import Data.Nat.Properties public open import Relation.Nullary using (¬_; Dec; yes; no) public open import Re...
-- labeled λ-calculus module IntrinsicallyTypedLLC where open import Data.List open import Data.List.Relation.Unary.All open import Data.List.Base open import Data.Vec hiding (_++_) open import Data.Unit hiding (_≤_) open import Data.Nat hiding (_≤_) open import Data.Fin.Subset open import Data.Fin.Subset.Properties ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Wrapper for the erased modality -- -- This allows us to store erased proofs in a record and use projections -- to manipulate them without having to turn on the unsafe option -- --irrelevant-projections. ---------...
open import Signature -- | In this module, we construct the free monad and the free completely -- iterative monad over a signature Σ (see Aczel, Adamek, Milius and Velebil). -- The first assigns to a set V of variables the set TV of finite terms over Σ -- (that is, finite trees labelled with symbols in f ∈ ∥Σ∥ and ar(...
module Function.Axioms where open import Lang.Instance open import Logic.Predicate open import Logic import Lvl import Structure.Function.Names as Names open import Structure.Setoid open import Type private variable ℓₒ ℓₒ₁ ℓₒ₂ ℓₒ₃ ℓₗ ℓₗ₁ ℓₗ₂ ℓₗ₃ : Lvl.Level module _ {A : Type{ℓₒ₁}} {B : Type{ℓₒ₂}} ⦃ _ ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Various forms of induction for natural numbers ------------------------------------------------------------------------ module Induction.Nat where open import Function open import Data.Nat open import Data.Fin ...
module AuxDefs where data ℕ : Set where zero : ℕ suc : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + n = n (suc m) + n = suc (m + n) data Bool : Set where true : Bool false : Bool data Comparison : Set where less : Comparison equal : Comparison greater : Comparison _<_ : ℕ → ℕ → Bool zero < y = tru...
module Splitting where open import Basics open import All data _<[_]>_ {X : Set} : List X -> List X -> List X -> Set where sz : [] <[ [] ]> [] sl : forall {l ls ms rs} -> ls <[ ms ]> rs -> (l ,- ls) <[ l ,- ms ]> rs sr : forall {r ls ms rs} -> ls <[ ms ]> rs -> ls <[ r ,- ms ]> (r ,- rs) riffle : {X : Set}{ls ...
{-# OPTIONS --cubical --safe #-} module Function.Injective where open import Function.Injective.Base public
module Open where open import bool open import nat open import product open import sum open import functor data Row : Set₁ where Empty : Row Ty : Set → Row Prod : Row → Row → Row infixr 19 _♯_ _′ = Ty _♯_ = Prod all : Row → Set all Empty = ⊤ all (Ty x) = x all (Prod r₁ r₂) = (all r₁) × (all r₂) one : Ro...
-- Andreas, 2017-08-24, issue #2717, reported by m0davis -- -- Internal error in DisplayForm.hs triggered by -v 100. -- Regression introduced by #2590 {-# OPTIONS -v tc.display.top:100 -v tc.polarity.dep:20 #-} -- KEEP module _ (A : Set) where module M (_ : Set) where data D (n : Set) : Set where d : D n open...
{-# OPTIONS --cubical --safe #-} module Path.Reasoning where open import Prelude infixr 2 ≡˘⟨⟩-syntax _≡⟨⟩_ ≡⟨∙⟩-syntax ≡˘⟨⟩-syntax : ∀ (x : A) {y z} → y ≡ z → y ≡ x → x ≡ z ≡˘⟨⟩-syntax _ y≡z y≡x = sym y≡x ; y≡z syntax ≡˘⟨⟩-syntax x y≡z y≡x = x ≡˘⟨ y≡x ⟩ y≡z ≡⟨∙⟩-syntax : ∀ (x : A) {y z} → y ≡ z → x ≡ y → x ≡ z ≡...
module Generic.Lib.Reflection.Fold where open import Generic.Lib.Intro open import Generic.Lib.Decidable open import Generic.Lib.Category open import Generic.Lib.Data.Nat open import Generic.Lib.Data.String open import Generic.Lib.Data.Maybe open import Generic.Lib.Data.List open import Generic.Lib.Reflection.Core fo...
module MacroNotToTerm where open import Common.Reflection open import Common.Prelude data X : Set where macro f : Term -> Set f x _ = X
{-# OPTIONS --sized-types #-} module SOList.Total {A : Set}(_≤_ : A → A → Set) where open import Bound.Total A open import Bound.Total.Order _≤_ open import Data.List open import Size data SOList : {ι : Size} → Bound → Bound → Set where onil : {ι : Size}{b t : Bound} → LeB b t ...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Nat {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition...
{-# OPTIONS --without-K --safe #-} module Cats.Category.Sets.Facts.Initial where open import Data.Empty using (⊥ ; ⊥-elim) open import Level using (Lift ; lift ; lower) open import Cats.Category open import Cats.Category.Sets using (Sets) instance hasInitial : ∀ {l} → HasInitial (Sets l) hasInitial = record ...
{-# OPTIONS --without-K --exact-split #-} module 02-natural-numbers where import 00-preamble open 00-preamble public -- Definition 2.2.3 id : {i : Level} {A : UU i} → A → A id a = a -- Definition 2.2.4 _∘_ : {i j k : Level} {A : UU i} {B : UU j} {C : UU k} → (B → C) → ((A → B) → (A → C)) (g ∘ f) a = g (f a) d...
{-# OPTIONS --type-in-type #-} module TooManyArgs where open import AgdaPrelude myFun : (a : Set) -> a -> a -> a myFun a x y = x myApp = myFun _ Zero Zero Zero Zero
------------------------------------------------------------------------ -- A coinductive definition of (strong) bisimilarity ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Labelled-transition-system module Bisimilarity {ℓ} (lts : LTS ℓ) where open...
------------------------------------------------------------------------------ -- A proof that was rejected using the --without-K option ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-...
{-# OPTIONS --universe-polymorphism --no-irrelevant-projections --cubical-compatible #-} module SafeFlagSafePragmas where