text
stringlengths
4
690k
-- Andreas, 2017-04-28, issue #2558 reported by Youyou Cong -- Size solver assumed invariants that do not hold. open import Common.Size data Con (i : Size) : Set where c : {j : Size< i} → Con i -- needed postulate Tms : {i j : Size} → Con i → Con j → Set Ty : (i : Size) {j : Size< i} → Con j → Set sub : ∀...
module Tactic.Reflection.Reright where open import Prelude hiding (abs) open import Container.Traversable open import Tactic.Reflection open import Tactic.Reflection.Match open import Tactic.Reflection.Replace open import Tactic.Reflection.Quote private {-# TERMINATING #-} reorderVars : List Na...
primitive primLevelMax : _
module 10-localInstances where import Data.Empty as E open import Data.String using (String; toList; _≟_) open import Data.Bool using (Bool; true; false; if_then_else_) open import Data.Nat using (ℕ) renaming (_≟_ to _ℕ≟_) import Data.List as List open import Relation.Nullary.Decidable using (⌊_⌋) open import Function...
------------------------------------------------------------------------------ -- Draft modules render to HTML (via an external Makefile) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no...
{-# OPTIONS --profile=modules --profile=internal #-}
------------------------------------------------------------------------ -- The Agda standard library -- -- Rational numbers in non-reduced form. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Rational.Unnormalised where open import Data.Intege...
-------------------------------------------------------------------------------- -- This is part of Agda Inference Systems {-# OPTIONS --sized-types #-} open import Codata.Colist open import Codata.Thunk open import Size open import Data.Empty open import Relation.Binary.PropositionalEquality module Examples.Colists...
-- Andreas, 2022-03-11, issue #5823 -- Make sure we do not weaken the singleton detection too much by checking for loops. open import Agda.Builtin.Nat record ⊤ : Set where record Wrap (A : Set) : Set where field unwrap : A record _×_ (A B : Set) : Set where field fst : A snd : B -- A singleton record t...
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-} module Number.Structures2 where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Relation.Nullary.Base renaming (...
{- Definition of join for ◇ and associated lemmas. -} module TemporalOps.Diamond.Join where open import CategoryTheory.Categories open import CategoryTheory.Instances.Reactive open import CategoryTheory.Functor open import CategoryTheory.NatTrans open import CategoryTheory.Monad open import TemporalOps.Common open im...
module Issue760 where module M where A : Set₂ A = Set₁ abstract B : Set₁ B = Set open M public -- Not abstract. C : Set₁ C = F where F = Set -- where clauses declare an anonymous open public module -- but we should not see any error here InScope : A InScope = Set private D : Set₁...
open import prelude -- Copied pretty much verbatim data Term : Set where true : Term false : Term if_then_else_end : Term → Term → Term → Term zero : Term succ : Term → Term iszero : Term → Term data NValue : Term → Set where zero : NValue zero succ : ∀ {t} → NValue(t) → NValue(succ t) data Valu...
------------------------------------------------------------------------ -- A definition of the propositional truncation operator that does not -- use recursive higher inductive types ------------------------------------------------------------------------ -- The definition does use natural numbers. The code is based ...
{-# OPTIONS --without-K --safe #-} module Math.FormalLanguage where -- agda-stdlib import Algebra.FunctionProperties as FP import Algebra.Structures as Structures open import Level renaming (zero to lzero; suc to lsuc) open import Data.List as L using (List; []; _++_) import Data.List.Properties as Lₚ open import Dat...
module Everything where import Data.BitVector import Data.BitVector.ContainmentOrder import Data.BitVector.NumericOrder import Data.BitVector.Peano import Data.BitVector.Properties import Data.BitVector.Properties.LatticeProperties
module objectsInAgda where open import Data.Product open import interactiveProgramsAgda hiding (main) open import NativeIO open import Data.String.Base record Interface : Set₁ where field Method : Set Result : (m : Method) → Set open Interface public record Object (I : Interface) : Set where ...
module trichotomy where open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Data.Nat using (ℕ; zero; suc) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Product using (_×_) renaming (_,_ to ⟨_,_⟩) open import Negation using (¬_; _≢_) infix 4 _<_ data _<_ : ℕ → ℕ → Set where...
open import Lemmachine.Resource module Lemmachine.Resolve (c : Resource) where open import Lemmachine.Request open import Lemmachine.Response open import Lemmachine.Utils open import Data.Bool open import Data.Nat open import Data.String open import Data.Function open import Data.Maybe open import Data.List open import...
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Reduction where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties -- Weak head expansion of type equality reduction : ∀ {A A′ B B′ Γ} → Γ ⊢ A ⇒* A′ → Γ ⊢ B ⇒* B′ → Whnf A′ ...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Naturals open import Numbers.Naturals.Order open import Vectors open import Semirings.Definition open import Categories.Definition open import Groups.De...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.RingSolver.RingExpression where open import Cubical.Foundations.Prelude open import Cubical.Data.FinData open import Cubical.Data.Nat using (ℕ) open import Cubical.Data.Nat.Order using (zero-≤) open import Cubical.Data.Vec.Base open import Cubi...
-- The <local hints> in an ATP pragma <prove> can be functions. module ATPLocalHints3 where postulate D : Set zero : D succ : D → D data N : D → Set where zN : N zero sN : ∀ {n} → N n → N (succ n) 1-N : N (succ zero) 1-N = sN zN postulate 2-N : N (succ (succ zero)) {-# ATP prove 2-N 1-...
{-# OPTIONS --prop --rewriting --confluence-check #-} open import Agda.Primitive open import Agda.Builtin.Equality open import Agda.Builtin.Nat renaming (Nat to ℕ; _+_ to _+ℕ_) infix 4 _≐_ data _≐_ {ℓ} {A : Set ℓ} (x : A) : A → Prop ℓ where refl : x ≐ x {-# BUILTIN REWRITE _≐_ #-} variable ℓ : Level A B C : S...
open import Agda.Builtin.Equality test : (A : Set) (x y : A) → x ≡ y → Set test A .y y refl with A test A .y y refl | X = ? -- Jesper, 2018-12-03, issue #2892: -- Error message is: -- Ill-typed pattern after with abstraction: y -- (perhaps you can replace it by `_`?) -- when checking that the clause ;Issue...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommAlgebra.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels op...
------------------------------------------------------------------------ -- Record types with manifest fields and "with", based on Randy -- Pollack's "Dependently Typed Records in Type Theory" ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- The module is ...
------------------------------------------------------------------------ -- The Agda standard library -- -- A definition for the permutation relation using setoid equality ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Permu...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Semigroup.Construct.Empty where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Algebra.Semigroup open import Cubical.Data.Empty import Cubical.Algebra.Magma.Construct.Empty as ⊥Magma open ⊥Magma...
{-# OPTIONS --cubical #-} module CubicalPrims where open import Agda.Primitive renaming (_⊔_ to ℓ-max) open import Agda.Primitive.Cubical renaming (primIMin to _∧_; primIMax to _∨_; primINeg to ~_; isOneEmpty to empty) open import Agda.Builtin.Bool open import Agda.Builtin.Cubical.Sub renaming (Sub to _[_↦_]; primSubO...
{- Mayer-Vietoris cofiber sequence: Let X be a pointed type, and let a span B ←[f]- X -[g]→ C be given. Then the mapping cone of the canonical map (B ⋁ C) → B ⊔_X C is equivalent to Susp X. The sequence Susp X → (B ⋁ C) → B ⊔_X C therefore induces a long exact sequence in cohomology. Proof is adapted from Evan C...
------------------------------------------------------------------------------ -- Conversion rules for the greatest common divisor ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-univer...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties satisfied by Heyting Algebra ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary.Lattice module Relation.Binary.Pr...
------------------------------------------------------------------------ -- The Agda standard library -- -- Many properties which hold for _∼_ also hold for flip _∼_ ------------------------------------------------------------------------ open import Relation.Binary module Relation.Binary.Flip where open import Func...
module Unsolved-meta-in-module-application where module M (A : Set) where open M _ public
-- Closed monoid in the skew-closed category of families module SOAS.Abstract.Monoid {T : Set} where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.ContextMaps.Combinators open import SOAS.Construction.Structure as Structure open import SOAS.Abstract.Hom {T} open import ...
module GUIgeneric.GUIFeaturesPart4 where open import GUIgeneric.Prelude renaming (addButton to addButton') open import GUIgeneric.GUIDefinitions renaming (add to add'; add' to add) open import GUIgeneric.GUI open import GUIgeneric.GUIExampleLib open import StateSizedIO.GUI.WxGraphicsLibLevel3 renaming (addButton to a...
module Nat where open import Data.Product open import Data.Sum open import Relation.Binary.PropositionalEquality as Eq open import Data.Empty open import Level hiding (zero) data ℕ : Set where zero : ℕ succ : ℕ → ℕ open Eq.≡-Reasoning ¬_ : { ℓ : Level} → Set ℓ → Set ℓ ¬ P = P → ⊥ ≡-succ : (n m : ℕ) → succ ...
-- mostly adapted from Agda stdlib module level where import Agda.Primitive open Agda.Primitive public using (Level ; _⊔_ ; lsuc ; lzero) level = Level lone : level lone = lsuc lzero record Lift {a ℓ} (A : Set a) : Set (a ⊔ ℓ) where constructor lift field lower : A open Lift public
module Issue327 where open import Common.Prelude open import Common.Reflect _==_ : QName → QName → Bool _==_ = primQNameEquality postulate Dec : Bool → Set _≟_ : (x y : QName) → Dec (x == y) Foo : Set₁ Foo with quote Foo ≟ quote Foo ... | _ = Set
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} {-# OPTIONS --allow-unsolved-metas #-} module Light.Implementation.Relation.Binary.Equality.Propositional.Decidable where import Light.Implementation.Relation.Binary.Equality.Propositional as Propositional open import Light.Library.Relati...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Regular where -- https://ncatlab.org/nlab/show/regular+category -- https://en.wikipedia.org/wiki/Regular_category open import Level open import Categories.Category.Core open import Categories.Category.Complete.Finitely using (FinitelyComplete) open impor...
open import Prelude module Implicits.Resolution.Stack.Resolution where open import Coinduction open import Data.Fin.Substitution open import Implicits.Syntax open import Implicits.Substitutions open import Induction open import Induction.Nat open import Implicits.Resolution.Termination.Stack infixl 5 _⊢ᵣ_ infixl 5 _...
module Data.List where import Lvl open import Type private variable ℓ : Lvl.Level private variable T : Type{ℓ} infixr 1000 _⊰_ -- A list is a container/collection of elements. -- • The elements are in a linear order. -- • The container allows multiples (non-uniqueness of elements in the container). data List (...
{-# OPTIONS --without-K --safe #-} module Data.Fin.Indexed.Literals where -- import Data.Nat as ℕ -- import Data.Nat.Properties as ℕ open import Data.Fin.Indexed.Base open import Literals.Number -- open import Relation.Nullary open import Agda.Builtin.Nat renaming (_<_ to _<ᵇ_) open import Data.Bool open import Agda....
-- Andreas, 2016-09-20 test whether --no-eta-equality is respected {-# OPTIONS --no-eta-equality #-} open import Common.Equality data Wrap (A : Set) : Set where wrap : A → Wrap A record R : Set where inductive constructor c field p : Wrap R open R test : ∀ (w : R) → w ≡ c (p w) test w = refl -- should fai...
{-# OPTIONS -v treeless.opt:20 #-} -- Test that inlining a recursive function doesn't throw -- the compiler into a loop. module _ where open import Common.Prelude f : Nat → Nat f zero = zero f (suc n) = f n {-# INLINE f #-} main : IO Unit main = printNat (f 4)
------------------------------------------------------------------------------ -- Testing a proof done using Hip (Haskell Inductive Prover) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --...
module list-merge-sort-test where open import list open import nat open import list-merge-sort ℕ _<_ test-list = 3 :: 2 :: 5 :: 1 :: 1 :: 6 :: 8 :: 9 :: 4 :: [] sorted = merge-sort test-list
open import Relation.Nullary using (¬_; Dec; yes; no) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Relation.Nullary.Decidable using (False; map) open import Function.Equivalence as FE using () module AKS.Nat.Base where open import Agda.B...
---------------------------------------------------------------------- -- Functional small-step semantics ---------------------------------------------------------------------- module SystemF.Reduction where open import Codata.Musical.Notation open import Category.Monad open import Category.Monad.Partiality.All open ...
open import Data.Nat using (ℕ; suc; zero; _<_; _≤_; z≤n; s≤s; _+_; _⊔_) open import Data.Bool using (Bool; true; false; not; _∧_) open import Data.Sum using (inj₁; inj₂; _⊎_; [_,_]) open import Data.Product using (_×_; _,_; -,_; _-,-_; ∃; ∃-syntax; proj₂) open import Data.String using (String; _≟_; len...
------------------------------------------------------------------------ -- The Agda standard library -- -- Relations between properties of functions, such as associativity and -- commutativity (only those that don't require any sort of setoid) ------------------------------------------------------------------------ {...
------------------------------------------------------------------------------ -- We could not define the FOTC colists using the Agda machinery for -- co-inductive types. ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-typ...
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness --no-subtyping #-} module Agda.Builtin.Float.Properties where open import Agda.Builtin.Float open import Agda.Builtin.Equality primitive primFloatToWord64Injective : ∀ a b → primFloatToWord64 a ≡ primFloatToWord64 b → a ≡ b
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Interval where open import Cubical.HITs.Interval.Base public -- open import Cubical.HITs.Interval.Properties public
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇. -- Tarski-style semantics with context pairs as concrete worlds, and glueing for α, ▻, and □. -- Hilbert-style syntax. module BasicIS4.Semantics.TarskiOvergluedDyadicHilbert where open import BasicIS4.Syntax.Common public open import Common.Semantics public ...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Acyclic where -- Stdlib imports open import Level using (Level; _⊔_) open import Function using (flip) open import Data.Product using (_×_; _,_; proj₁; proj₂) open import Relation.Binary using (Rel; REL) open import Relation.Binary using (Irreflexive; Tra...
postulate F : Set₁ → Set₁ data P : Set₁ → Set₁ where c : P (F (P Set)) → P Set
-- There was a bug where reexported constructors weren't -- properly translated when termination checking. module OpenPublicTermination where module A where data U : Set where nat : U list : U -> U module A' where open A public open A' f : U -> U f nat = nat f (list nat) = nat f (list (list...
------------------------------------------------------------------------ -- Simple regular expression matcher (without soundness proof) ------------------------------------------------------------------------ open import Eq open import Setoids open import Prelude import RegExps module BoolMatcher (D : Datoid) where ...
{-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.def.fun:10 -v tc.def.where:100 #-} module PartialityMonad where open import Common.Level open import Common.Coinduction record RawMonad {f} (M : Set f → Set f) : Set (lsuc f) where infixl 1 _>>=_ field return : ∀ {A} → A → M A _>>=_ : ∀ {A B} → M A →...
---------------------------------------------------------------------------- -- The FOTC lists of natural numbers type ---------------------------------------------------------------------------- {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphis...
module x04equality where ------------------------------------------------------------------------------ -- EQUALITY -- for any type A -- for any x of type A -- refl constructor provides evidence that x ≡ x -- i.e., every value is equal to itself data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x infix 4 ...
module List where data List (a : Set) : Set where nil : List a _::_ : a -> List a -> List a nil2 : (\x -> x) ({a : Set} -> List a) nil2 = nil {_} tt : Set1 -> Set2 tt _ = Set1 map : {a b : Set} -> (a -> b) -> List a -> List b map f nil = nil map f (x :: xs) = f x :: map f xs
module Issue892a where record R : Set₁ where field f : Set g : Set g = f -- The type of R.g should print as (r : R) → Set -- rather than ( : R) → Set. bad : R.g bad = ?
{-# OPTIONS --exact-split #-} module Thesis.SIRelBigStep.DOpSem where open import Data.Nat open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Thesis.SIRelBigStep.DLangDerive public open import Thesis.SIRelBigStep.OpSem public open import Thesis.SIRelBigStep.DSyntax public data...
{-# OPTIONS --cubical --safe #-} module Cubical.Foundations.FunExtEquiv where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Univalence -- Function extensionality is an equivalence. module _ {ℓ ℓ'} {A : Type ℓ} {B : A...
------------------------------------------------------------------------ -- The Agda standard library -- -- Sums (disjoint unions) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Sum where open import Function open import Data.Unit.Base using (⊤...
open import Agda.Primitive open import Data.List -- f1 : {l : Level} -> (a : Set l) -> (x : a) -> (y : x) -> x -- f1 : (a : Set2) -> (x : a) -> (y : x) -> x -- f1 a x y = ? f0 : (a : Set) -> (x : a) -> a f0 a x = x f1 : (a : Set1) -> (x : a) -> a f1 a x = x myprod : (As : List Set) -> Set myprod = {!!} mysum : (As ...
{-# OPTIONS --allow-unsolved-metas #-} open import Relation.Binary.PropositionalEquality hiding ( [_] ) open import Relation.Nullary using (¬_; Dec; yes; no) open import Data.List hiding ( [_] ) open import finiteSet module derive ( Σ : Set) ( fin : FiniteSet Σ ) ( eq? : (x y : Σ) → Dec (x ≡ y)) where -- open import...
-- Insertion sort {-# OPTIONS --without-K --safe #-} module Algorithms.List.Sort.Insertion where -- agda-stdlib open import Data.Bool hiding (_≤_; _≤?_; _<_) open import Data.List import Data.Nat as ℕ open import Relation.Binary as B open import Relation.Binary.PropositionalEquality using (_≡_; refl) open impor...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Sets where -- Category of (Agda) Sets, aka (types, functions, pointwise equality with implicit value) -- Note the (explicit) levels in each open import Level open import Relation.Binary open import Function using (_∘′_) renaming (id to idf) open i...
{-# OPTIONS --cubical --safe --postfix-projections #-} open import Prelude open import Relation.Binary module Data.RBTree {e} {E : Type e} {r₁ r₂} (totalOrder : TotalOrder E r₁ r₂) where open import Relation.Binary.Construct.Bounded totalOrder open TotalOrder totalOrder using (_≤?_) data Colour : Type where red ...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyList where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat using (ℕ ; zero ; suc) open import Cubical.Algebra.CommRing open import Cubical.Algebra.Polynomials.UnivariateList.Base open import Cubical.Algebr...
module SizedPolyIO.IOObject where open import Data.Product open import Level using (_⊔_) renaming (suc to lsuc) open import Size open import SizedPolyIO.Base open import SizedPolyIO.Object -- An IO object is like a simple object, -- but the method returns IO applied to the result type of a simple object -- which me...
module Relator.Category where open import Data open import Data.Tuple import Lvl open import Structure.Categorical.Properties open import Structure.Category open import Structure.Operator open import Type private variable ℓ : Lvl.Level
module Prelude.IO where open import Prelude.Function open import Prelude.Functor open import Prelude.Applicative open import Prelude.Monad open import Prelude.List open import Prelude.String open import Prelude.Char open import Prelude.Unit open import Prelude.Show open import Prelude.Nat open import Agda.Builtin.IO...
------------------------------------------------------------------------ -- The two methods used to specify the grammars are (language) -- equivalent (for acyclic graphs) ------------------------------------------------------------------------ open import Mixfix.Expr open import Mixfix.Acyclic.PrecedenceGraph using ...
------------------------------------------------------------------------------ -- Testing the η-expansion ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# O...
module Cat where open import Agda.Builtin.Equality {- A category is very much like a graph. It has vertices named objects and vertices named arrows. Each arrow goes from an object to an object (possibly the same!). -} record Cat (obj : Set) (arr : obj -> obj -> Set) : Set where constructor MkCat field {...
-- Checks that UHC FFI calls using non-magic datatypes work module UHC-FFI where data Nat : Set where Zero : Nat Suc : Nat -> Nat {-# COMPILED_DATA_UHC Nat UHC.Agda.Builtins.Nat Zero Suc #-} {-# IMPORT_UHC Data.Char #-} open import Common.IO open import Common.Unit open import Common.String open import Common.Ch...
-- modular arithmetic module nat-mod where open import eq open import nat infix 8 _≡_mod_ data _≡_mod_ : ℕ → ℕ → ℕ → Set where mod-refl : ∀ {n k} → n ≡ n mod k mod-add : ∀ {n m k} → n ≡ m mod k → n + k ≡ m mod k mod-symm : ∀ {n m k} → n ≡ m mod k → m ≡ n mod k {- mod-trans : ∀ {n m o k} → n ≡ m mod k → m ≡ o...
module Generic.Function.FoldMono where open import Generic.Core CurryAll : ∀ {α β} {A : Set α} -> (A -> Set β) -> List A -> Set β -> Set β CurryAll B [] C = C CurryAll B (x ∷ xs) C = B x -> CurryAll B xs C curryAll : ∀ {α β} {A : Set α} {B : A -> Set β} {C xs} -> (All B xs -> C) -> CurryAll B xs C cur...
{-# OPTIONS --termination-depth=2 #-} module plfa-code.Quantifiers where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Relation.Nullary using (¬_) open import Data.Product using (_×_; proj₁; proj₂) renaming (_,_ to ⟨_,_⟩) op...
{- This is mostly for convenience, when working with ideals (which are defined for general rings) in a commutative ring. -} {-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.Ideal where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels ope...
------------------------------------------------------------------------ -- Convenient syntax for "equational reasoning" using a partial order ------------------------------------------------------------------------ open import Relation.Binary module Relation.Binary.PartialOrderReasoning (p : Poset) where open Poset...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Monoidal -- Monoidal natural transformations between lax and strong monoidal functors. -- -- See -- * John Baez, Some definitions everyone should know, -- https://math.ucr.edu/home/baez/qg-fall2004/definitions.pdf -- * https://ncatlab.org/nlab/sh...
import Lvl open import Type module Structure.Logic.Constructive.Functions {ℓₒ} (Domain : Type{ℓₒ}) where private module Meta where open import Numeral.Finite public open import Numeral.Natural public -- The type of a function. Functions on the domain in the meta-logic. Functio...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U open import Definition.Untyped.Properties open import Definition.Typed.Properties open import Definition.Typed open i...
module Readme where -- SystemF with small-step semantics -- and normal forms open import SystemF.Everything -- SystemF extended with functions that take implicit parameters -- including a reduction to SystemF open import Implicits.Everything -- Simply typed lambda calculus with references, -- accompanied by a store-...
module tests.Forcing2 where open import Prelude.Nat open import Prelude.IO open import Prelude.Unit data _**_ (A B : Set) : Set where _,_ : A -> B -> A ** B data P {A B : Set} : A ** B -> Set where _,_ : (x : A)(y : B) -> P (x , y) data Q {A : Set} : A ** A -> Set where [_] : (x : A) -> Q (x , x) test1 : (p ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Conat Literals ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} module Codata.Conat.Literals where open import Agda.Builtin.FromNat open...
open import Data.Product using ( _×_ ; _,_ ) open import Relation.Nullary using ( ¬_ ) open import Relation.Unary using ( _∈_ ; ∅ ; _∪_ ) open import Web.Semantic.DL.ABox using ( ABox ; Assertions ; ε ; _,_ ; _∼_ ; _∈₁_ ; _∈₂_ ) open import Web.Semantic.DL.ABox.Interp using ( Interp ; ⌊_⌋ ; ind ) open import Web.Sema...
open import Agda.Builtin.Equality primitive primEraseEquality : ∀ {a} {A : Set a} {x y : A} → x ≡ y → x ≡ y
{- https://lists.chalmers.se/pipermail/agda/2013/006033.html http://code.haskell.org/~Saizan/unification/ 18-Nov-2013 Andrea Vezzosi -} module Unify-monolithic where -- some equivalences needed to adapt Tactic.Nat to the standard library module EquivalenceOf≤ where open import Agda.Builtin.Equality open import Agd...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics module lib.types.Lift where ⊙Lift : ∀ {i j} → Ptd i → Ptd (lmax i j) ⊙Lift {j = j} ⊙[ A , a ] = ⊙[ Lift {j = j} A , lift a ] ⊙lift : ∀ {i j} {X : Ptd i} → X ⊙→ ⊙Lift {j = j} X ⊙lift = (lift , idp) ⊙lower : ∀ {i j} {X : Ptd i} → ⊙Lift {j = j} X ⊙→ X ⊙l...
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Relation.Binary open import Cubical.Algebra.Monoid module Cubical.Algebra.Monoid.Construct.Quotient {c ℓ} (M : Monoid c) {R : Rel (Monoid.Carrier M) ℓ} (isEq : IsEquivalence R) ...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.Vec.Relation.Unary.All directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.All whe...
{-# OPTIONS --cubical --no-import-sorts #-} module MorePropAlgebra.Definitions where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Relation.Nullary.Base renaming (¬_ to ¬ᵗ_)--...