text
stringlengths
4
690k
{-# OPTIONS --safe #-} module Cubical.Categories.Instances.Sets where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Categories.Category open import Cubical.Categories.Functor open import Cubical.Categories.NaturalTransfo...
------------------------------------------------------------------------ -- Another implementation of the Fibonacci sequence using tail, along -- with some other examples ------------------------------------------------------------------------ module ArbitraryChunks where open import Codata.Musical.Notation open impo...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Terms that operate on changes with the Nehemiah plugin. ------------------------------------------------------------------------ module Nehemiah.Change.Term where open import Data.Integer open import Nehemiah.Syn...
module Numeral.Finite.Equiv where open import Numeral.Finite open import Relator.Equals.Proofs.Equiv open import Structure.Setoid instance 𝕟-equiv : ∀{n} → Equiv(𝕟(n)) 𝕟-equiv = [≡]-equiv
{-# OPTIONS --without-K --safe #-} open import Algebra open import Bundles open import Structures module Properties.RingWithoutOne {r₁ r₂} (R : RingWithoutOne r₁ r₂) where open RingWithoutOne R import Algebra.Properties.AbelianGroup as AbelianGroupProperties open import Function.Base using (_$_) open import Relatio...
open import Agda.Builtin.List open import Agda.Builtin.Reflection open import Agda.Builtin.Unit postulate A B : Set @0 a : A tac : Term → TC ⊤ tac = unify (def (quote a) []) postulate f : {@0 @(tactic tac) x : A} → B test : B test = f
module StateSizedIO.GUI.WxBindingsFFI where open import Data.Bool.Base open import Data.Integer open import Data.Nat open import Data.Product hiding (map) open import NativeIO {-# FOREIGN GHC import qualified GHC.Conc.Sync #-} {-# FOREIGN GHC import qualified Control.Concurrent #-} {-# FOREIGN GHC import qualifie...
{-# OPTIONS --type-in-type #-} module BialgebraSorting where import Relation.Binary.PropositionalEquality open Relation.Binary.PropositionalEquality open ≡-Reasoning open import Function open import Data.Product using (Σ; _,_; proj₁; proj₂) record Functor (F : Set → Set) : Set where field map : {A B : Set} → ...
------------------------------------------------------------------------------ -- Testing the use of various options using only an OPTIONS pragma ------------------------------------------------------------------------------ {-# OPTIONS --exact-split --no-sized-types --no-universe-polymorphism ...
------------------------------------------------------------------------ -- The All predicate, defined using _∈_ ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module List.All {c⁺} (eq : ∀ {a p} → Equality-with-J a p c⁺) where open De...
open import Common.Prelude test : Nat → Nat test = _Common.Prelude.+ 2
module UniDB.Core where open import Data.Nat public using (ℕ; suc; zero) open import Data.Fin public using (Fin; suc; zero) open import Function public using (id; _∘_) open import Relation.Binary.PropositionalEquality as PropEq public using (_≡_; _≢_; refl; sym; cong; cong₂; trans; subst; module ≡-Reasoning) open ...
module hcio where -- https://github.com/alhassy/AgdaCheatSheet#interacting-with-the-real-world-compilation-haskell-and-io open import Agda.Builtin.Coinduction using (♯_) open import Agda.Builtin.Unit using (⊤) open import Codata.Musical.Colist as CL using (take) open import Codata.Musical.Costring using (C...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Homotopy.Group.SuspensionMap where open import Cubical.Homotopy.Group.Base open import Cubical.Homotopy.Loopspace open import Cubical.Homotopy.Freudenthal open import Cubical.Homotopy.Connected open import Cubical.Foundations.Prelude open import C...
module PiFrac.Category where open import Categories.Category.Monoidal open import Categories.Category.Monoidal.Braided open import Categories.Category.Monoidal.Symmetric open import Categories.Category.Monoidal.Rigid open import Categories.Category.Monoidal.CompactClosed open import Categories.Functor.Bifunctor open im...
{- Types Summer School 2007 Bertinoro Aug 19 - 31, 2007 Agda Ulf Norell -} {- Learn more about Agda on the Agda wiki: http://www.cs.chalmers.se/~ulfn/Agda This is where you find the exercises for the afternoon. -} -- Each Agd...
------------------------------------------------------------------------ -- The Agda standard library -- -- Basic lemmas showing that various types are related (isomorphic or -- equivalent or…) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Function....
{- Types Summer School 2007 Bertinoro Aug 19 - 31, 2007 Agda Ulf Norell -} -- This is where the fun begins. -- Unleashing datatypes, pattern matching and recursion. module Datatypes where {- Simple datatypes. -} -- Let's define nat...
module Oscar.Definition where {- unpack : AList m n → Fin m → Term n -- sub substitute : (Fin m → Term n) → Term m → Term n -- _◃_ substitutes : ∀ N → (Fin m → Term n) → Terms N m → Terms N n -- _◃s_ stepify : (Term m → Term n) → Step m → Step n -- fmapS collapse : (List ∘ Step) n → Term n → Term n -- _⊹_ Substitis...
{- 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 -} module Haskell.Prelude where open import Haskell.Modules.Either public...
module Ex6AgdaSetup where {- This file contains all the basic types you need for the editor. You should read and understand the Agda in this file, but not bother too much about the funny compiler directives. -} open import CS410-Prelude open import CS410-Nat record _**_ (S T : Set) : Set where constructor _,...
------------------------------------------------------------------------ -- The partiality monads in Partiality-monad.Inductive and -- Partiality-monad.Coinductive are pointwise equivalent, for sets, -- assuming extensionality and countable choice ------------------------------------------------------------------------...
{-# OPTIONS --universe-polymorphism #-} -- {-# OPTIONS --verbose tc.rec:15 #-} -- {-# OPTIONS --verbose tc.records.ifs:15 #-} -- {-# OPTIONS --verbose tc.constr.findInScope:15 #-} -- {-# OPTIONS --verbose tc.term.args.ifs:15 #-} module InstanceArguments.05-equality-std2 where open import Agda.Primitive open import Re...
module Syntax.Substitution where open import Syntax.Substitution.Kits public open import Syntax.Substitution.Instances public open import Syntax.Substitution.Lemmas public
------------------------------------------------------------------------ -- Properties related to Any ------------------------------------------------------------------------ -- The other modules under Data.List.Any also contain properties -- related to Any. module Any where open import Algebra import Algebra.Defini...
------------------------------------------------------------------------ -- A variant of Coherently that is defined without the use of -- coinduction ------------------------------------------------------------------------ {-# OPTIONS --cubical #-} import Equality.Path as P module Lens.Non-dependent.Higher.Coherentl...
------------------------------------------------------------------------ -- The Agda standard library -- -- Maps from keys to values, based on AVL trees -- This modules provides a simpler map interface, without a dependency -- between the key and value types. ------------------------------------------------------------...
open import Agda.Builtin.IO open import Agda.Builtin.List open import Agda.Builtin.Size open import Agda.Builtin.String record Thunk (F : Size → Set) (i : Size) : Set where coinductive field force : {j : Size< i} → F j open Thunk public FilePath = String -- A directory tree is rooted in the current directory; it...
module Issue358 where postulate Sigma : Set -> (Set -> Set) -> Set syntax Sigma A (\x -> B) = x colon A operator B postulate T : Set test = x colon T operator {!!}
module Data.Variant where open import Data.List using (List) renaming ([_] to [_]ₗ) open import Data.List.Membership.Propositional using (_∈_) open import Data.Product using (∃; ∃-syntax; _,_) open import Data.Maybe using (Maybe; _>>=_; just) open import Data.Union using (Union; here) renaming (inj to injᵤ; proj to...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Category.Cocomplete.Properties {o ℓ e} (C : Category o ℓ e) where open import Level open import Data.Product using (_,_) open import Categories.Adjoint.Properties open import Categories.Category.Complete open import Categories.Cate...
module STLCRef.Examples where -- This file contains a few example programs for the definitional -- interpreter for STLC+Ref using monadic strength, defined in Section -- 3. open import STLCRef.Semantics open import Data.List open import Data.List.Relation.Unary.Any open import Data.List.Relation.Unary.All open import...
-- Proof: if we non-deterministically select an element -- which is less-than-or-equal than all other elements, -- such a result is the minimum of the list. -- This holds for any non-deterministically selected element. -- Basically, this is the translation of the Curry rule: -- -- min-nd xs@(_++[x]++_) | all (x<=) x...
{- A Cubical proof of Blakers-Massey Theorem (KANG Rongji, Oct. 2021) Based on the previous type-theoretic proof described in Kuen-Bang Hou (Favonia), Eric Finster, Dan Licata, Peter LeFanu Lumsdaine, "A Mechanization of the Blakers–Massey Connectivity Theorem in Homotopy Type Theory" (https://arxiv.org/abs/160...
{-# OPTIONS --rewriting #-} open import Agda.Primitive postulate _↦_ : ∀{i j}{A : Set i}{B : Set j} → A → B → Set (i ⊔ j) {-# BUILTIN REWRITE _↦_ #-} -- currently fails a sanity check postulate resize : ∀{i j} → Set i → Set j resize-id : ∀{i} {j} {A : Set i} → resize {i} {j} A ↦ A {-# REWRITE resize-id #-} ...
module Data.Num.Increment where open import Data.Num.Core open import Data.Num.Bounded open import Data.Num.Maximum open import Data.Num.Next open import Data.Nat open import Data.Nat.Properties open import Data.Nat.Properties.Simple open import Data.Nat.Properties.Extra open import Data.Fin as Fin using (Fin; f...
module Haskell.RangedSets.RangedSet where open import Agda.Builtin.Equality 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 import Haskell.Prim.Num open import Haskell.Prim.Eq open import Haskell.Prim.Foldable open im...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Bags with negative multiplicities, for Nehemiah. -- -- Instead of implementing bags (with negative multiplicities, -- like in the paper) in Agda, we postulate that a group of such -- bags exist. Note that integer ba...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of functions, such as associativity and commutativity ------------------------------------------------------------------------ -- These properties can (for instance) be used to define algebraic -- str...
------------------------------------------------------------------------------ -- Properties of the divisibility relation ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymo...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.NType2 open import lib.types.Pi open import lib.types.Group {- The definition of G-sets. Thanks to Daniel Grayson. -} module lib.types.GroupSet {i} where -- The right group action with respect to the group [grp]. record GsetStructure (grp :...
module StratSigma where data Sigma0 (A : Set0) (B : A -> Set0) : Set0 where _,_ : (x : A) (y : B x) -> Sigma0 A B _*0_ : (A : Set0)(B : Set0) -> Set0 A *0 B = Sigma0 A \_ -> B fst0 : {A : Set0}{B : A -> Set0} -> Sigma0 A B -> A fst0 (a , _) = a snd0 : {A : Set0}{B : A -> Set0} (p : Sigma0 A B) -> B (fst0 p) snd...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Maybe.Properties where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Data.Empty open import Cubical.Data.Unit open import Cubical.Da...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Weakening {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Weakeni...
{-# OPTIONS --without-K #-} module function.extensionality.strong where open import level open import sum open import function.core open import equality.core open import function.isomorphism open import function.extensionality.core open import function.extensionality.proof open import hott.level.core open import hott....
module ConstructorsInstance where record UnitRC : Set where instance constructor tt data UnitD : Set where instance tt : UnitD postulate fRC : {{_ : UnitRC}} → Set fD : {{_ : UnitD}} → Set tryRC : Set tryRC = fRC tryD : Set tryD = fD data D : Set where a : D instance b : D c : D post...
{-# OPTIONS --cubical --safe #-} module Cubical.HITs.Everything where open import Cubical.HITs.Cylinder public open import Cubical.HITs.Hopf public open import Cubical.HITs.Interval public open import Cubical.HITs.Ints.BiInvInt public hiding ( pred ; suc-pred ; pred-suc ) open import Cubical.HITs.Ints.DeltaInt public ...
{-# OPTIONS -WShadowingInTelescope #-} bad : Set → Set → Set bad = λ x x → x
{-# OPTIONS --safe #-} module Cubical.Algebra.CommAlgebra.FreeCommAlgebra.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical.Foundations.Structure open import Cubical.Fou...
------------------------------------------------------------------------ -- Encoders and decoders ------------------------------------------------------------------------ open import Atom module Coding (atoms : χ-atoms) where open import Equality.Propositional open import Prelude hiding (const) open import Tactic.By...
-- Hilbert-style formalisation of closed syntax. -- Sequences of terms. module OldBasicILP.Syntax.ClosedHilbertSequential where open import OldBasicILP.Syntax.Common public -- Mutually-recursive declarations. data Ty : Set record Proof (Ξ : Cx Ty) (A : Ty) : Set data ⊢ᴰ_ : Cx Ty → Set _⧺ᴰ_ : ∀ {Ξ₁ Ξ₂} → ⊢ᴰ Ξ₁ →...
------------------------------------------------------------------------ -- Some types and functions used by several parser variants ------------------------------------------------------------------------ module Utilities where open import Data.Product open import Data.List open import Data.Function using (flip) --...
{-# OPTIONS --cubical --safe #-} module Cubical.Foundations.Pointed.Base where open import Cubical.Foundations.Prelude Pointed : (ℓ : Level) → Type (ℓ-suc ℓ) Pointed ℓ = Σ[ A ∈ Type ℓ ] A typ : ∀ {ℓ} (A∙ : Pointed ℓ) → Type ℓ typ = fst pt : ∀ {ℓ} (A∙ : Pointed ℓ) → typ A∙ pt = snd
module Oscar.Class.Substitution where open import Oscar.Data.Equality open import Oscar.Function open import Oscar.Relation open import Oscar.Level record Substitution {a} {A : Set a} {b} (B : A → Set b) {c} (C : A → Set c) : Set (a ⊔ b ⊔ c) where field ε : ∀ {m} → B m → C m _◇_ : ∀ {l m n} → (g : B m → C ...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Numbers.Naturals.Naturals open import Numbers.Naturals.Multiplication open import Numbers.Integers.Order open import Numbers.Integers.RingStructure.Ring op...
{-# OPTIONS --without-K --safe #-} data D : Set where c : D → D variable x y : D data P : D → D → Set where c : P (c x) (c y) record Q (y : D) : Set where G : .(Q y) → P x y → Set₁ G _ c = Set
{-# OPTIONS --without-K #-} module hott.loop.sum where open import sum open import equality open import function.core open import function.extensionality open import function.isomorphism open import function.overloading open import sets.nat open import pointed open import hott.equivalence open import hott.level.core o...
module Oscar.Property.Associativity where open import Oscar.Level record Associativity {𝔬} {⋆ : Set 𝔬} {𝔪} {_⇒_ : ⋆ → ⋆ → Set 𝔪} (_∙_ : ∀ {y z} → y ⇒ z → ∀ {x} → x ⇒ y → x ⇒ z) {𝔮} (_≤_ : ∀ {x y} → x ⇒ y → x ⇒ y → Set 𝔮) : Set (𝔬 ⊔ 𝔪 ⊔ 𝔮) where field associativity : ∀ {w x} (f : w ⇒ x) {y} (...
------------------------------------------------------------------------ -- Universe levels ------------------------------------------------------------------------ module Imports.Level where postulate Level : Set zero : Level suc : (i : Level) → Level _⊔_ : Level -> Level -> Level {-# BUILTIN LEVEL Lev...
module Mockingbird.Forest where open import Mockingbird.Forest.Base public
-- {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.lhs.unify:65 -v tc.irr:50 #-} open import Agda.Builtin.Nat data B {A : Set} : A → Set where b : (a : A) → B a data C {A : Set} : ∀ a → B {A} a → Set where c : (a : A) → C a (b a) id : ∀ x → C _ x → B 0 id x (c y) = {!!}
{-# OPTIONS --without-K #-} module hw2 where open import Level using (_⊔_) open import Function using (id) open import Data.Nat using (ℕ; suc; _+_; _*_) open import Data.Empty using (⊥) open import Data.Sum using (_⊎_; inj₁; inj₂) import Level infix 4 _≡_ recℕ : ∀ {ℓ} → (C : Set ℓ) → C → (ℕ → C → C) → ℕ → C recℕ C ...
{- 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.ImplShared.Consensus.Typ...
------------------------------------------------------------------------------ -- Totality properties of the division ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphi...
module L0E where open import Common -- Syntax data Conj : Set where and or : Conj data N : Set where Saddie Liz Hank : N data Vᵢ : Set where snores sleeps is-boring : Vᵢ data Vₜ : Set where loves hates is-taller-than : Vₜ data Neg : Set where it-is-not-the-case-that : Neg data VP : Set where iv : V...
-- There was a problem with open public in parameterised modules. module Issue165 where postulate X : Set module M where postulate P : Set module R₀ (X : Set) where open M public module R₁ (X : Set) where open R₀ X public open R₁ X postulate p : P
-- In this file we consider the special of localising at a single -- element f : R (or rather the set of powers of f). This is also -- known as inverting f. -- We then prove that localising first at an element f and at an element -- g (or rather the image g/1) is the same as localising at the product f·g -- This fact h...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Base where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.HITs.SetQuotients.Base open import Cubical.HITs.Propositio...
{-# OPTIONS --exact-split #-} -- {-# OPTIONS -v tc.cover:10 #-} postulate A : Set record I : Set where constructor i field f : A data Wrap : (j : I) → Set where con : (j : I) → Wrap j postulate C : Set anything : C test : (X : I) -> Wrap X -> C test (i ._) (con x) = anything
{-# OPTIONS --cubical-compatible #-} open import Common.Prelude open import Common.Equality KNat : {x : Nat} (e : x ≡ x) → e ≡ refl KNat refl = refl KEqNat : {x : Nat} {e : x ≡ x} (p : e ≡ e) → p ≡ refl KEqNat refl = refl KListNat : {x : List Nat} (e : x ≡ x) → e ≡ refl KListNat refl = refl data D (A : Set) : Nat →...
{-# OPTIONS --without-K #-} open import Base open import Integers open import Homotopy.Truncation open import Spaces.Spheres open import Spaces.Suspension open import Homotopy.Connected open import Homotopy.ConnectedSuspension open import Homotopy.Pointed open import Homotopy.HomotopyGroups module Spaces.PikSn where ...
{-# OPTIONS --rewriting #-} module RewritingNat where open import Common.Equality {-# BUILTIN REWRITE _≡_ #-} data Nat : Set where zero : Nat suc : Nat → Nat _+_ : Nat → Nat → Nat zero + n = n (suc m) + n = suc (m + n) plusAssoc : ∀ x {y z : Nat} → ((x + y) + z) ≡ (x + (y + z)) plusAssoc zero = refl plusAsso...
{- 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 Dijkstra.EitherD open import LibraBFT.Impl.Consensus.EpochManager...
------------------------------------------------------------------------ -- The Agda standard library -- -- Generalised notion of interleaving two lists into one in an -- order-preserving manner ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Lis...
module Plain.Terms where open import Data.Nat open import Data.Fin record Signature (n : ℕ) : Set where field -- symbols are encoded as numbers in Fin n -- arity ar : Fin n → ℕ open Signature public -- | Countable set of Variables Var : Set Var = ℕ open import Data.Vec as V open import Size -- | Term...
module spaceShipSimpleVar where open import Unit open import Data.List.Base hiding ([]) open import Data.Bool.Base open import Data.Integer open import Data.Product hiding (map) open import NativeIO open import StateSizedIO.GUI.WxBindingsFFI open import StateSizedIO.GUI.WxGraphicsLib open import StateSized.GUI.ShipBi...
{- Formal verification of authenticated append-only skiplists in Agda, version 1.0. 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 Data.Empty open import Data.Sum open import Data.Fin usi...
{-# OPTIONS --cubical --safe #-} module Cubical.Algebra.SymmetricGroup where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Data.Nat using (ℕ ; suc ; zero) open import Cubical.Data.Fin using (Fin ;...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat using (ℕ) open import Cubical.Data.Sigma open import Cubical.Data.Vec open import Cubical.Data.Vec.OperationsNat op...
{- This file contains: - Definitions equivalences - Glue types -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Core.Glue where open import Cubical.Core.Primitives open import Agda.Builtin.Cubical.Glue public using ( isEquiv -- ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (f : A → B) → Type (ℓ ...
-- Andreas, 2018-03-03, termination bug found by Nisse -- caused by a missing call to `instantiate`. -- {-# OPTIONS -vtc:20 -vterm:20 #-} {-# BUILTIN SIZEUNIV SizeU #-} {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZELT Size<_ #-} {-# BUILTIN SIZEINF ∞ #-} record Unit (i : Size) : Set where coinductive f...
-- Andreas, 2019-05-30, issue #3823 -- Named where module M should be in scope in rhs. -- This enables to use it in expressions like record{M}. open import Agda.Builtin.Equality record R : Set₂ where field A : Set₁ r : R r = record {M} module M where A = Set -- ERROR WAS: -- No module M in scope -- when...
------------------------------------------------------------------------ -- The Agda standard library -- -- Empty type ------------------------------------------------------------------------ module Data.Empty where open import Level data ⊥ : Set where {-# IMPORT Data.FFI #-} {-# COMPILED_DATA ⊥ Data.FFI.AgdaEmpty ...
module Relation.Equivalence.Univalence where open import Basics open import Level open import Relation.Equality open import Data.Product -- For any A and B, a quasi-inverse of f is a triple with -- ∘ A way back (an inverse for the homomorphism) -- ∘ Homotopies: -- ⊚ α : f ∘ g ∼ id -- ⊚ β : g ∘ f ∼...
module Example where data Nat : Set where zero : Nat suc : Nat -> Nat postulate case-Nat : (P : Nat -> Set) -> P zero -> ((n:Nat) -> P (suc n)) -> (n : Nat) -> P n -- test : Nat -> Nat test = case-Nat _ zero (\n -> n) {- data Size : Set where empty : Size nonempty : Size whatever : Size...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Functions.Definition open import Functions.Lemmas open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Number...
-- The empty type; also used as absurd proposition (``Falsity''). {-# OPTIONS --without-K --safe #-} module Tools.Empty where data ⊥ : Set where -- Ex falsum quod libet. ⊥-elim : ∀ {a} {A : Set a} → ⊥ → A ⊥-elim () ⊥-elimω : ∀ {A : Agda.Primitive.Setω} → ⊥ → A ⊥-elimω ()
module Lib where -- Natural numbers data Nat : Set where zero : Nat suc : Nat -> Nat {-# BUILTIN NATURAL Nat #-} _+_ : Nat -> Nat -> Nat zero + n = n suc k + n = suc (k + n) -- Finite sets data Fin : Nat -> Set where fzero : forall {n} -> Fin (suc n) fsuc : forall {n} -> Fin n -> Fin...
------------------------------------------------------------------------------ -- Agda-Prop Library. -- Deep Embedding for Propositional Logic. ------------------------------------------------------------------------------ open import Data.Nat using ( ℕ ) module Data.PropFormula ( n : ℕ ) where ---------------------...
module W where open import Function using (_∘_) open import Data.Bool using (Bool; true; false) open import Data.Product open import Data.Unit using (⊤; tt) open import Data.Empty using (⊥; ⊥-elim) data W (S : Set) (P : S → Set) : Set where max : (s : S) → (f : P s → W S P) → W S P -- data ℕ : Set where -- z...
-- Andreas, 2015-07-13 Better parse errors for illegal type signatures -1 : Set1 -1 = Set
------------------------------------------------------------------------ -- The one-step truncation HIT with an erased higher constructor ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} -- The module is parametrised by a notion of equality. The higher -...
{-# OPTIONS --universe-polymorphism #-} module Coind where open import Common.IO open import Common.Level open import Common.Nat open import Common.Unit open import Common.Coinduction renaming (♯_ to sharp; ♭ to flat) {- infix 1000 sharp_ postulate Infinity : ∀ {a} (A : Set a) → Set a sharp_ : ∀ {a} {A : Set a}...
---------------------------------------------------------------------- -- Copyright: 2013, Jan Stolarek, Lodz University of Technology -- -- -- -- License: See LICENSE file in root of the repo -- -- Repo address: https://github.com/...
------------------------------------------------------------------------ -- The Agda standard library -- -- Decidable propositional membership over lists ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Decidable) open impor...
{-# OPTIONS --without-K --safe #-} module Cats.Category.Fun.Facts.Product where open import Data.Product using (_,_) open import Cats.Category open import Cats.Category.Fun as Fun using (_↝_) open import Cats.Category.Constructions.Product using (HasBinaryProducts) open import Cats.Functor using (Functor) open import...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.FiberedProduct where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Algebra.Ring open import Cubical.Algebra.CommRing private variable...
{-# OPTIONS --without-K #-} module sets.nat.ordering.leq.decide where open import decidable open import sets.core open import sets.nat.core open import sets.nat.ordering.leq.core open import sets.nat.ordering.lt.core _≤?_ : (n m : ℕ) → Dec (n ≤ m) 0 ≤? m = yes z≤n suc n ≤? 0 = no λ () suc n ≤? suc m with n ≤? m suc n...
-- records are allowed in mutual blocks module Issue138 where mutual B = Set record Foo : Set where
-- This file tests that record constructors are used in error -- messages, if possible. module RecordConstructorsInErrorMessages where record R : Set₁ where constructor con field {A} : Set f : A → A {B C} D {E} : Set g : B → C → E postulate A : Set r₁ : R r₂ : R ...