text
stringlengths
4
690k
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Pi module lib.types.Group where record GroupStructure {i} (El : Type i) --(El-level : has-level 0 El) : Type i where constructor group-structure field ident : El inv : El → El comp : El → El → El unitl : ∀ a → comp ident a...
{-# OPTIONS --allow-unsolved-metas --warning=error --without-K --guardedness #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids open import Rings.Definition open import Rings.Lemmas open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition open import...
{-# OPTIONS --universe-polymorphism --allow-unsolved-metas --no-termination-check #-} module Issue202 where Foo : ∀ {A} → A → Set Foo x = Foo x -- Previously resulted in the following (cryptic) error: -- Bug.agda:6,13-14 -- _5 !=< _5 -- when checking that the expression x has type _5
------------------------------------------------------------------------ -- Operations and lemmas related to application of substitutions ------------------------------------------------------------------------ open import Data.Universe.Indexed module deBruijn.Substitution.Data.Application.Application1 {i u e} {Uni...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pointers into star-lists ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Data.Star.Pointer {ℓ} {I : Set ℓ} where open import Data.Maybe.Base usin...
-- (Pre)additive categories {-# OPTIONS --safe #-} module Cubical.Categories.Additive.Base where open import Cubical.Algebra.AbGroup.Base open import Cubical.Categories.Category.Base open import Cubical.Categories.Limits.Initial open import Cubical.Categories.Limits.Terminal open import Cubical.Foundations.Prelude p...
-- Andreas, 2013-01-08, Reported by andres.sicard.ramirez, Jan 7 -- {-# OPTIONS -v term:10 -v term.matrices:40 #-} -- The difference between @bar@ and @bar'@ is the position of the -- hypothesis (n : ℕ). While @bar@ is accepted by the termination -- checker, @bar'@ is rejected for it. open import Common.Prelude renam...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Diagram.Pullback module Categories.Bicategory.Construction.Spans {o ℓ e} {𝒞 : Category o ℓ e} (_×ₚ_ : ∀ {X Y Z} → (f : 𝒞 [ X , Z ]) (g : 𝒞 [ Y , Z ]) → Pullback 𝒞 f g) where o...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.NaturalTransformation where open import Cubical.Foundations.Prelude open import Cubical.Categories.Category open import Cubical.Categories.Functor private variable ℓC ℓC' ℓD ℓD' : Level module _ {C : Precategory ℓC ℓC'} {D : Precateg...
{- Part 3: Univalence and the SIP - Univalence from ua and uaβ - Transporting with ua (examples: ua not : Bool = Bool, ua suc : Z = Z, ...) - Subst using ua - The SIP as a consequence of ua - Examples of using the SIP for math and programming (algebra, data structures, etc.) -} {-# OPTIONS --cubical #-} module Pa...
{-# OPTIONS --cubical --safe #-} module Fin where open import Cubical.Core.Everything using (_≡_; Level; Type; Σ; _,_; fst; snd; _≃_; ~_) open import Cubical.Foundations.Prelude using (refl; sym; _∙_; cong; transport; subst; funExt; transp; I; i0; i1) open import Cubical.Foundations.Function using (_∘_) open ...
---------------------------------------------------------------------- -- Functional big-step evaluation of terms in the partiality monad -- (alternative version not productivity checker workarounds) ---------------------------------------------------------------------- module SystemF.Eval.NoWorkarounds where open im...
module Agda.Builtin.Int where open import Agda.Builtin.Nat open import Agda.Builtin.String infix 8 pos -- Standard library uses this as +_ data Int : Set where pos : (n : Nat) → Int negsuc : (n : Nat) → Int {-# BUILTIN INTEGER Int #-} {-# BUILTIN INTEGERPOS pos #-} {-# BUILTIN INTEGERNEGSUC ...
module Stack where open import Prelude public -- Stacks, or snoc-lists. data Stack (X : Set) : Set where ∅ : Stack X _,_ : Stack X → X → Stack X -- Stack membership, or de Bruijn indices. module _ {X : Set} where infix 3 _∈_ data _∈_ (A : X) : Stack X → Set where top : ∀ {Γ} → A ∈ Γ , A pop :...
module examplesPaperJFP.loadAllOOAgdaPart2 where -- This is a continuation of the file loadAllOOAgdaPart1 -- giving the code from the ooAgda paper -- This file was split into two because of a builtin IO which -- makes loading files from part1 and part2 incompatible. -- Note that some files which are directly in the ...
-- {-# OPTIONS -v tc.meta:20 #-} -- Andreas, 2011-04-21 module PruneLHS where data _≡_ {A : Set}(a : A) : A -> Set where refl : a ≡ a data Bool : Set where true false : Bool test : let X : Bool -> Bool -> Bool -> Bool X = _ in (C : Set) -> (({x y : Bool} -> X x y x ≡ x) -> ({...
{- This file contains a diagonalization procedure simpler than Smith normalization. For any matrix M, it provides two invertible matrices P, Q, one diagonal matrix D and an equality M = P·D·Q. The only difference from Smith is, the numbers in D are allowed to be arbitrary, instead of being consecutively divisible. But...
module constants where open import lib cedille-extension : string cedille-extension = "ced" self-name : string self-name = "self" pattern ignored-var = "_" pattern meta-var-pfx = '?' pattern qual-local-chr = '@' pattern qual-global-chr = '.' meta-var-pfx-str = 𝕃char-to-string [ meta-var-pfx ] qual-local-str = �...
open import Agda.Builtin.Char open import Agda.Builtin.String open import Agda.Builtin.Maybe open import Agda.Builtin.Sigma open import Common.IO printTail : String → IO _ printTail str with primStringUncons str ... | just (_ , tl) = putStr tl ... | nothing = putStr "" main : _ main = printTail "/test/Compiler/...
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Char where open import Agda.Builtin.Nat open import Agda.Builtin.Bool open import Agda.Builtin.Equality postulate Char : Set {-# BUILTIN CHAR Char #-} primitive primIsLower primIsDigit primIsAlpha primIsSpace primIsAscii ...
open import Oscar.Prelude module Oscar.Class.Amgu where record Amgu {𝔵} {X : Ø 𝔵} {𝔱} (T : X → Ø 𝔱) {𝔞} (A : X → Ø 𝔞) {𝔪} (M : Ø 𝔞 → Ø 𝔪) : Ø 𝔵 ∙̂ 𝔱 ∙̂ 𝔞 ∙̂ 𝔪 where field amgu : ∀ {x} → T x → T x → A x → M (A x) open Amgu ⦃ … ⦄ public
module FOLsequent where open import Data.Empty open import Data.Nat open import Data.Nat.Properties open import Data.String using (String) open import Data.Sum open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; _≢_; refl; sym; cong; subst) open import Relation.Nullary open import Data.List.Base ...
open import Agda.Builtin.Nat open import Agda.Builtin.Sigma open import Agda.Builtin.Equality data Maybe {a} (A : Set a) : Set a where just : A → Maybe A nothing : Maybe A record RawRoutingAlgebra : Set₁ where field PathWeight : Set module _ (A : RawRoutingAlgebra) where open RawRoutingAlgebra A Pat...
module Data.Boolean where import Lvl open import Type -- Boolean type data Bool : Type{Lvl.𝟎} where 𝑇 : Bool -- Represents truth 𝐹 : Bool -- Represents falsity {-# BUILTIN BOOL Bool #-} {-# BUILTIN TRUE 𝑇 #-} {-# BUILTIN FALSE 𝐹 #-} elim : ∀{ℓ}{T : Bool → Type{ℓ}} → T(𝑇) → T(𝐹) → ((b : Bool) → T(b)) el...
{-# OPTIONS --erased-cubical --safe #-} module FarmCanon where open import Data.List using (List; _∷_; []) open import Data.Nat using (ℕ) open import Data.Sign renaming (+ to s+ ; - to s-) open import Data.Vec using (Vec; _∷_; []; map) open import Canon using (makeCanon2) open imp...
------------------------------------------------------------------------------ -- ABP Lemma 2 ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --wit...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.CoHSpace module homotopy.Cogroup where record CogroupStructure {i} (X : Ptd i) : Type i where field co-h-struct : CoHSpaceStructure X ⊙inv : X ⊙→ X open CoHSpaceStructure co-h-struct public inv : de⊙ X → de⊙ X inv = fst ⊙i...
{-# OPTIONS --without-K #-} module Common.Integer where open import Agda.Builtin.Int public renaming (Int to Integer)
{-# OPTIONS --without-K #-} module sets.nat.ordering.lt.level where open import sum open import equality.core open import hott.level.core open import hott.level.closure open import sets.nat.core open import sets.nat.ordering.lt.core open import sets.nat.ordering.leq.level open import sets.empty open import container.c...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core open import Categories.Category.Monoidal.Core module Categories.Object.Monoid {o ℓ e} {𝒞 : Category o ℓ e} (C : Monoidal 𝒞) where open import Level -- a monoid object is a generalization of the idea from algebra of a monoid, -- extended into a...
module AKS.Everything where open import AKS.Binary open import AKS.Exponentiation open import AKS.Extended open import AKS.Fin -- open import AKS.Modular.Quotient -- open import AKS.Polynomial open import AKS.Primality open import AKS.Nat open import AKS.Nat.GCD
------------------------------------------------------------------------ -- Quotiented queues: any two queues representing the same sequence -- are equal ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} import Equality.Path as P module Queue.Quotiented ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Right-biased universe-sensitive functor and monad instances for These. -- -- To minimize the universe level of the RawFunctor, we require that -- elements of B are "lifted" to a copy of B at a higher universe lev...
------------------------------------------------------------------------ -- The Agda standard library -- -- Choosing between elements based on the result of applying a function ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Algebra module Algeb...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Sets.EquivalenceRelations open import Rings.IntegralDomains.Definition open import Rings.Definition module Rings.Irreducibles.Lemmas {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A}...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Group.EilenbergMacLane.CupProduct where open import Cubical.Algebra.Group.EilenbergMacLane.Base renaming (elim to EM-elim) open import Cubical.Algebra.Group.EilenbergMacLane.WedgeConnectivity open import Cubical.Algebra.Group.EilenbergMacL...
{-# OPTIONS --without-K --rewriting #-} module Axiom.LEM where open import Basics open import Flat open import lib.Basics postulate LEM : {@♭ i : ULevel} (@♭ P : PropT i) → Dec (P holds)
module Generic.Test.Reify where open import Generic.Core open import Generic.Property.Reify open import Generic.Test.Data.Fin open import Generic.Test.Data.Vec open import Data.Fin renaming (Fin to StdFin) open import Data.Vec renaming (Vec to StdVec) xs : Vec (Fin 4) 3 xs = fsuc (fsuc (fsuc fzero)) ∷ᵥ fzero ∷ᵥ fsuc...
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-} module Cubical.ZCohomology.Groups.Prelims where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.GroupStructure open import Cubical.Foundations.HLevels open import Cubical...
module Everything where import Algebra.Structures.Field import Algebra.Structures.Bundles.Field import Algebra.Linear.Core import Algebra.Linear.Space import Algebra.Linear.Space.Hom import Algebra.Linear.Space.Product import Algebra.Linear.Space.FiniteDimensional import Algebra.Linear.Space.FiniteDimensional.Hom im...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pointwise lifting of relations to maybes ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Maybe.Relation.Binary.Pointwise where open impor...
module _ where open import Agda.Builtin.Equality postulate A : Set P : A → Set data Flat (@♭ A : Set) : Set where con : (@♭ x : A) → Flat A -- it should not be able to unify x and y, -- because the equality is not @♭. test4 : (@♭ x : A) (@♭ y : A) → (x ≡ y) → P x → P y test4 x y refl p = {!!}
{-# OPTIONS --without-K #-} open import Base module Homotopy.Pointed where open import Integers open import Homotopy.Truncation open import Homotopy.Connected record pType (i : Level) : Set (suc i) where constructor ⋆[_,_] field ∣_∣ : Set i -- \| ⋆ : ∣_∣ -- \* open pType public pType₀ : Set₁ pType₀ =...
{-# OPTIONS --cubical --safe #-} module Algebra.Construct.Free.Semilattice.Definition where open import Prelude infixr 5 _∷_ data 𝒦 (A : Type a) : Type a where [] : 𝒦 A _∷_ : A → 𝒦 A → 𝒦 A com : ∀ x y xs → x ∷ y ∷ xs ≡ y ∷ x ∷ xs dup : ∀ x xs → x ∷ x ∷ xs ≡ x ∷ xs trunc : isSet (𝒦 A)
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Equivalence module HoTT.Identity.Universe {i} {A B : 𝒰 i} where -- Axiom 2.10.3 - univalence postulate idtoeqv-equiv : isequiv (idtoeqv {A = A} {B = B}) =𝒰-equiv : (A == B) ≃ (A ≃ B) =𝒰-equiv = idtoeqv , idtoeqv-equiv module _ where open qinv...
module hott.types.int where open import hott.functions open import hott.core import hott.types.nat as nat open nat using (ℕ) data ℤ : Type₀ where zero : ℤ +ve : ℕ → ℤ -ve : ℕ → ℤ fromNat : ℕ → ℤ fromNat nat.zero = zero fromNat (nat.succ n) = +ve n neg : ℤ → ℤ neg zero = zero neg (+ve n) = -ve n neg (-ve n...
------------------------------------------------------------------------ -- Second-order abstract syntax -- -- Examples of the formalisation framework in use ------------------------------------------------------------------------ module Examples where -- | Algebraic structures -- Monoids import Monoid.Signature im...
{-# OPTIONS --without-K --safe #-} module Experiment.Zero where open import Level using (_⊔_) -- Empty type data ⊥ : Set where -- Unit type record ⊤ : Set where constructor tt -- Boolean data Bool : Set where true false : Bool -- Natural number data ℕ : Set where zero : ℕ suc : ℕ → ℕ -- Propositional Eq...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Intersection where -- Stdlib imports open import Level using (Level; _⊔_) open import Data.Product as P open import Data.Product using (_×_; _,_; swap; proj₁; proj₂) open import Relation.Binary using (REL) -- Local imports open import Dodo.Binary.Equality -- # D...
-- Andreas, 2015-12-10, issue reported by Andrea Vezzosi open import Common.Equality open import Common.Bool id : Bool → Bool id true = true id false = false is-id : ∀ x → x ≡ id x is-id true = refl is-id false = refl postulate P : Bool → Set b : Bool p : P (id b) proof : P b proof rewrite is-id b = p
module Selective where open import Prelude.Equality open import Agda.Builtin.TrustMe ----------------------------------------------------------------- -- id : ∀ {a} {A : Set a} → A → A -- id x = x id : ∀ {A : Set} → A → A id x = x {-# INLINE id #-} infixl -10 id syntax id {A = A} x = x ofType A const : ∀ {a b} {A ...
module SizedIO.ConsoleObject where open import Size open import SizedIO.Console open import SizedIO.Object open import SizedIO.IOObject -- A console object is an IO object for the IO interface of console ConsoleObject : (i : Size) → (iface : Interface) → Set ConsoleObject i iface = IOObject consoleI iface i
module Acc where data Rel(A : Set) : Set1 where rel : (A -> A -> Set) -> Rel A _is_than_ : {A : Set} -> A -> Rel A -> A -> Set x is rel f than y = f x y data Acc {A : Set} (less : Rel A) (x : A) : Set where acc : ((y : A) -> x is less than y -> Acc less y) -> Acc less x data WO {A : Set} (less : Rel A) : Set w...
{-# OPTIONS --cumulativity #-} open import Agda.Builtin.Equality mutual X : Set X = _ Y : Set₁ Y = Set test : _≡_ {A = Set₁} X Y test = refl
------------------------------------------------------------------------ -- Potentially cyclic precedence graphs ------------------------------------------------------------------------ module Mixfix.Cyclic.PrecedenceGraph where open import Data.Fin using (Fin) open import Data.Nat using (ℕ) open import Data.Vec as V...
------------------------------------------------------------------------ -- This module establishes that the recognisers are as expressive as -- possible when the alphabet is Bool (this could be generalised to -- arbitrary finite alphabets), whereas this is not the case when the -- alphabet is ℕ -----------------------...
module Lemmachine.Spike where open import Data.Fin open import Data.Digit -- 3.9 Quality Values DIGIT = Decimal data qvalue : DIGIT → DIGIT → DIGIT → Set where zero : (d₁ d₂ d₃ : DIGIT) → qvalue d₁ d₂ d₃ one : qvalue zero zero zero
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Commutativity where open import Cubical.Foundations.Prelude open import Cubical.Categories.Category private variable ℓ ℓ' : Level module _ {C : Precategory ℓ ℓ'} where open Precategory C compSq : ∀ {x y z w u v} {f : C [ x , y ]...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lexicographic induction ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Induction.Lexicographic where open import Data.Product open import Ind...
{- This file contains: - Fibers of induced map between set truncations is the set truncation of fibers modulo a certain equivalence relation defined by π₁ of the base. -} {-# OPTIONS --safe #-} module Cubical.HITs.SetTruncation.Fibers where open import Cubical.HITs.SetTruncation.Base open import Cubical.Foundati...
{- Formal verification of authenticated append-only skiplists in Agda, version 1.0. Copyright (c) 2021 Victor C Miraldo. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import Data.Unit.NonEta open import Data.Empty open import Data.Sum open im...
-- Andreas, 2012-01-30, bug reported by Nisse -- {-# OPTIONS -v tc.term.absurd:50 -v tc.signature:30 -v tc.conv.atom:30 -v tc.conv.elim:50 #-} module Issue557 where data ⊥ : Set where postulate A : Set a : (⊥ → ⊥) → A F : A → Set f : (a : A) → F a module M (I : Set → Set) where x : A x = a (λ ()) y : A...
module Data.Real.Complete where import Prelude import Data.Real.Gauge import Data.Rational open Prelude open Data.Real.Gauge open Data.Rational Complete : Set -> Set Complete A = Gauge -> A unit : {A : Set} -> A -> Complete A unit x ε = x join : {A : Set} -> Complete (Complete A) -> Complete A join f ε = f ε2 ε2 ...
module Issue1148 where foo : Set → Set foo = {!!}
------------------------------------------------------------------------ -- The Agda standard library -- -- Any predicate transformer for fresh lists ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Fresh.Relation.Unary.Any where open import...
module Prelude where open import Level public hiding (zero) renaming (suc to sucℓ) open import Size public open import Function public open import Data.List using (List; _∷_; []; [_]) public open import Data.Unit using (⊤; tt) public open import Data.Nat using (ℕ; suc; zero; _+_) public open import Data.Sum using (in...
{-# OPTIONS --rewriting #-} open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-} record Box (P : Set) : Set where constructor box field unbox : P open Box public postulate A : Set a : A f : Box A → A f= : f (box a) ≡ a {-# REWRITE f= #-} [a] : Box A unbox [a] = a -- Works thanks to eta tes...
{-# OPTIONS --without-K #-} module Data.Word8 where import Data.Word8.Primitive as Prim open Prim renaming (primWord8fromNat to to𝕎; primWord8toNat to from𝕎) public open import Agda.Builtin.Bool using (Bool; true; false) open import Relation.Nullary using (yes; no) open import Relation.Binary using (Decidable) ope...
{-# OPTIONS --copatterns #-} module Issue939 where record Sigma (A : Set)(P : A → Set) : Set where field fst : A .snd : P fst open Sigma postulate A : Set P : A → Set x : A .p : P x ex : Sigma A P ex = record { fst = x ; snd = p } ex' : Sigma A P fst ex' = x snd ex' = p -- ...
module plfa-code.Decidable where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq.≡-Reasoning open import Data.Nat using (ℕ; zero; suc) open import Data.Product using (_×_) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Relation.Nullary using (¬_) o...
module IrrelevantProjections where import Common.Irrelevance record [_] (A : Set) : Set where field .inflate : A open [_] using (inflate) -- Should fail, since proj isn't declared irrelevant. proj : ∀ {A} → [ A ] → A proj x = inflate x
{-# OPTIONS --without-K #-} open import HoTT module homotopy.SuspAdjointLoop where module SuspAdjointLoop {i j} (X : Ptd i) (Y : Ptd j) where private A = fst X; a₀ = snd X B = fst Y; b₀ = snd Y R : {b : B} → Σ (Suspension A → B) (λ h → h (north A) == b) → Σ (A → (b == b)) (λ k → k a₀ == idp) ...
{-# OPTIONS --without-K --safe #-} -- Monoidal natural transformations between lax and strong symmetric -- monoidal functors. -- -- NOTE. Symmetric monoidal natural transformations are really just -- monoidal natural transformations that happen to go between -- symmetric monoidal functors. No additional conditions ar...
{-# OPTIONS --rewriting #-} module Properties.DecSubtyping where open import Agda.Builtin.Equality using (_≡_; refl) open import FFI.Data.Either using (Either; Left; Right; mapLR; swapLR; cond) open import Luau.Subtyping using (_<:_; _≮:_; Tree; Language; ¬Language; witness; unknown; never; scalar; function; scalar-f...
{-# OPTIONS --without-K #-} open import HoTT module homotopy.JoinFunc where module F {i j k l} {A : Type i} {B : Type j} {C : Type k} {D : Type l} (f : A → C) (g : B → D) where fg-glue : (ab : A × B) → left (f (fst ab)) == right (g (snd ab)) :> (C * D) fg-glue (a , b) = glue (f a , g b) to : A * B → C...
module Function.Multi where open import Data open import Data.Tuple open import Data.Tuple.Raise open import Data.Tuple.RaiseTypeᵣ open import Functional import Lvl import Lvl.MultiFunctions as Lvl open import Numeral.Natural open import Type private variable ℓ ℓ₁ ℓ₂ : Lvl.Level private variable n : ℕ infi...
------------------------------------------------------------------------------ -- Equivalence of definitions of total lists ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-poly...
{- https://github.com/mietek/lamport-timestamps An Agda formalisation of Lamport timestamps. Made by Miëtek Bak. Published under the MIT X11 license. -} module Everything where import Prelude -- Processes, clocks, timestamps, messages, and events are defined as abstract interfaces. import AbstractInterfaces i...
------------------------------------------------------------------------ -- A language of parser equivalence proofs ------------------------------------------------------------------------ -- This module defines yet another set of equivalence relations and -- preorders for parsers. For symmetric kinds these relations ...
module Logics.Or where open import Function open import Logics.And ------------------------------------------------------------------------ -- definitions infixl 4 _∨_ data _∨_ (P Q : Set) : Set where ∨-intro₀ : P → P ∨ Q ∨-intro₁ : Q → P ∨ Q --------------------------------------------------------------------...
{-# OPTIONS --without-K #-} module function.isomorphism.coherent where open import sum open import equality.core open import equality.calculus open import equality.reasoning open import function.core open import function.isomorphism.core open import function.overloading open import overloading.core coherent : ∀ {i j}...
open import Prelude module Implicits.Improved.Stack.Expressiveness where open import Coinduction open import Data.Fin.Substitution open import Implicits.Oliveira.Types open import Implicits.Oliveira.Terms open import Implicits.Oliveira.Contexts open import Implicits.Oliveira.Substitutions open import Implicits.Olivei...
module PointedFrac where open import Data.Sum open import Data.Product record ∙_ (A : Set) : Set where constructor ⇡ field focus : A open ∙_ -- Paths between values---identical to dynamic semantics? data _⟷_ : {A B : Set} → ∙ A → ∙ B → Set1 where id : {A : Set} → (x : A) → (⇡ x) ⟷ (⇡ x) swap₊₁ : {A B :...
{-# OPTIONS --without-K --exact-split #-} module localizations-rings where import subrings open subrings public is-invertible-Ring : {l1 : Level} (R : Ring l1) (x : type-Ring R) → UU l1 is-invertible-Ring R = is-invertible-Monoid (multiplicative-monoid-Ring R) is-prop-is-invertible-Ring : {l1 : Level} (R : Ri...
module reflnat where data ℕ : Set where Z : ℕ S : ℕ -> ℕ _+_ : ℕ -> ℕ -> ℕ n + Z = n n + S m = S (n + m) infixr 10 _+_ infixr 20 _*_ _*_ : ℕ -> ℕ -> ℕ n * Z = Z n * S m = n * m + n data Bool : Set where tt : Bool ff : Bool data ⊤ : Set where true : ⊤ data ⊥ : Set where Atom : Bool -> Set ...
{-# OPTIONS --cubical-compatible #-} variable @0 A : Set data D : Set₁ where c : A → D
module Logic.Predicate where open import Functional import Lvl open import Logic open import Logic.Propositional open import Type open import Type.Properties.Inhabited ------------------------------------------ -- Existential quantification (Existance, Exists) module _ {ℓ₁}{ℓ₂} where record ∃ {Obj : Type{ℓ₁}}...
------------------------------------------------------------------------ -- Parsing of matching parentheses, along with a correctness proof ------------------------------------------------------------------------ -- A solution to an exercise set by Helmut Schwichtenberg. module TotalRecognisers.LeftRecursion.Matching...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lists where every pair of elements are related (symmetrically) ------------------------------------------------------------------------ -- Core modules are not meant to be used directly outside of the -- standar...
open import OutsideIn.Prelude open import OutsideIn.X module OutsideIn.Inference.ConstraintGen(x : X) where import OutsideIn.Constraints as C import OutsideIn.TypeSchema as TS import OutsideIn.Expressions as E import OutsideIn.Environments as V open X(x) renaming (funType to _⟶_; appType to _··_) open C(x) ...
------------------------------------------------------------------------ -- The coinductive type family Coherently ------------------------------------------------------------------------ -- This type family is used to define the lenses in -- Lens.Non-dependent.Higher.Coinductive and -- Lens.Non-dependent.Higher.Coind...
module Haskell.Prim.Real where open import Haskell.Prim open import Haskell.Prim.Ord open import Haskell.Prim.Enum open import Haskell.Prim.Num open import Haskell.Prim.Eq open import Haskell.Prim.Int open import Haskell.Prim.Integer -- infixr 8 _^_ _^^_ -- infixl 7 _/_ _`quot`_ _`rem`_ _`div`_ _`mod`_ -- infixl 7 ...
------------------------------------------------------------------------------ -- The gcd is commutative ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OP...
{-# OPTIONS --type-in-type #-} module TooFewArgsWrongType where open import AgdaPrelude myFun : Vec Nat Zero -> Nat -> Nat myFun x y = y myApp : Nat myApp = (myFun Zero)
module HoleFilling where data Bool : Set where false : Bool true : Bool _∧_ : Bool → Bool → Bool false ∧ b = false true ∧ b = b
open import Agda.Builtin.Nat record R : Set where field x : Nat open R {{...}} f₁ f₂ : R -- This is fine. x ⦃ f₁ ⦄ = 0 -- WAS: THIS WORKS BUT MAKES NO SENSE!!! f₂ ⦃ .x ⦄ = 0 -- Error: -- Cannot eliminate type R with pattern ⦃ .x ⦄ (suggestion: write .(x) -- for a dot pattern, or remove the braces for a pos...
module _ where postulate F : Set → Set A : Set module A (X : Set) where postulate T : Set module B where private module M = A A open M postulate t : F T postulate op : {A : Set} → A → A → A open A A foo : F T foo = op B.t {!!} -- ?0 : F .ReduceNotInScope.B.M.T
module Formalization.ClassicalPropositionalLogic.Syntax where import Lvl open import Functional open import Sets.PredicateSet using (PredSet) open import Type private variable ℓₚ ℓ : Lvl.Level module _ (P : Type{ℓₚ}) where -- Formulas. -- Inductive definition of the grammatical elements of the language of p...
-- 2010-10-15 module Issue331 where record ⊤ : Set where constructor tt data Wrap (I : Set) : Set where wrap : I → Wrap I data B (I : Set) : Wrap I → Set₁ where b₁ : ∀ i → B I (wrap i) b₂ : {w : Wrap I} → B I w → B I w b₃ : (X : Set){w : Wrap I}(f : X → B I w) → B I w ok : B ⊤ (wrap tt) ok = b₂ (b₁ _) -...
open import guarded-recursion.prelude module guarded-recursion.model where -- ℂʷᵒᵖ (ℂ^{ω}^{op}) -- Notation: -- For the category ℂ we use superscript 'c' to disambiguate (e.g. _→ᶜ_) -- We use ᵖ for the presheaf category. module Presheaf {o m} (Objᶜ : Type_ o) (_→ᶜ_ : Objᶜ → Objᶜ → Type_ m) (idᶜ : {A : Ob...