text
stringlengths
4
690k
-- There was a bug where constructors of private datatypes were -- not made private. module Issue484 where module A where private data Foo : Set where foo : Foo foo′ = A.foo
module Issue422 where data Bool : Set where true false : Bool data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x foo : Bool → Bool → Bool foo true b = b foo n true = true foo false b = false good : foo false true ≡ true good = refl data Nat : Set where zero : Nat suc : Nat → Nat data T ...
module Data.QuadTree.Implementation.Foldable where open import Haskell.Prelude renaming (zero to Z; suc to S) open import Data.Logic open import Data.QuadTree.Implementation.Definition open import Data.QuadTree.Implementation.ValidTypes open import Data.QuadTree.Implementation.QuadrantLenses open import Data.QuadTree....
postulate C : Set anything : C record I : Set where constructor c field {f} : C data Wrap : (i : I) → Set where wrap : ∀ {i} → Wrap i works : ∀ {j} → Wrap j → C works {c {._}} (wrap {c {x}}) = anything fails : ∀ {j} → Wrap j → C fails {c {._}} (wrap {c}) = anything -- Failed to infer the value of dot...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of operations on the Stream type ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} module Codata.Stream.Properties where open ...
-- {-# OPTIONS -v tc.meta:100 #-} -- Andreas, 2011-09-21 (fix by Ulf) module Issue458b where data _≡_ {A : Set}(a : A) : A -> Set where refl : a ≡ a data Nat : Set where zero : Nat suc : Nat -> Nat data Pair (A B : Set) : Set where pair : A -> B -> Pair A B fst : {A B : Set} -> Pair A B -> A fst (pair a b)...
open import Data.Bool module GUIgeneric.GUIModelExample where open import GUIgeneric.Prelude renaming (inj₁ to secondButton; inj₂ to firstButton; WxColor to Color) hiding (IOInterfaceˢ) open import GUIgeneric.GUIDefinitions renaming (add to add'; add' to add; ComponentEls to Frame) open import GUIgeneric.GUI open im...
open import Common.Level postulate ℓ : Level f : (l : Level) (A : Set l) → Set ℓ f ℓ A = A -- Expected error: -- ℓ != ℓ of type Level -- (because one is a variable and one a defined identifier) -- when checking that the expression A has type Set ℓ -- Jesper, 2018-12-10, New error: -- A != Issue998a.A of type Set ...
open import Agda.Builtin.Nat variable {n} : Nat data Vec (A : Set) : Nat → Set where [] : Vec A 0 _∷_ : A → Vec A n → Vec A (suc n) cons : ∀ {m A} → A → Vec A m → Vec A (suc m) cons = _∷_ module _ (A : Set) where data Vec' : Nat → Set where [] : Vec' 0 _∷_ : A → Vec' n → Vec' (suc n) cons' : ∀ {m A...
-- Andreas, 2014-06-12 -- No inversion on one clause functions with record patterns only! {-# OPTIONS -v tc.inj:40 #-} -- KEEP! module _ where open import Common.Product -- No inverse should be created for swap by -- checkInjectivity, since we are dealing with a record constructor. swap : ∀{A B} → A × B → B × A swa...
-- Andreas, 2015-06-29 polarity handling is broken -- See also issue 1592 -- {-# OPTIONS -v tc.polarity:20 -v tc.proj.like:100 #-} -- {-# OPTIONS -v tc.conv.elim:25 --show-implicit #-} open import Common.Size open import Common.Prelude data D : Size → Set where c : ∀ i → D (↑ i) record Type (a : Bool) : Set1 wher...
module Issue564 where open import Agda.Primitive using (Level) renaming (lzero to zero) postulate A : Level → Set module M ℓ where postulate a : A ℓ postulate P : A zero → Set open M zero p : P a p = {!!}
module LevelConstraints where open import Common.Level postulate a b : Level OfLvl : ∀ ℓ → Set ℓ → Set SameLvl : ∀ {ℓ} → Set ℓ → Set ℓ → Set -- Here we get two constraints by themselves unsolveable constraints: -- _18 ⊔ a = _18 (solved by _18 := a ⊔ ℓ, for any ℓ) -- a ⊔ _18 = a (solved b...
open import Data.Boolean open import Type module Data.List.Sorting.QuickSort {ℓ} {T : Type{ℓ}} (_≤?_ : T → T → Bool) where import Lvl open import Data.List open import Data.List.Functions as List using (_++_) import Data.List.Functions.Multi as List open import Data.Tuple import Numeral.Finite.Conversi...
module Luau.Syntax where open import Luau.Var using (Var) open import Luau.Addr using (Addr) infixr 5 _∙_ data Block : Set data Stat : Set data Expr : Set data Block where _∙_ : Stat → Block → Block done : Block data Stat where function_⟨_⟩_end : Var → Var → Block → Stat local_←_ : Var → Expr → Stat retu...
{-# OPTIONS --safe --no-qualified-instances #-} open import Data.List hiding (concat) module JVM.Syntax.Labeling {ℓ} (T : Set ℓ) where open import Relation.Unary hiding (_∈_; Empty) open import Relation.Ternary.Core open import Relation.Ternary.Data.Bigplus open import Data.Sum open import Data.Product open import...
module Issue778M (Param : Set) where data Nat : Set where zero : Nat suc : Nat -> Nat pred : Nat → Nat pred = λ { zero → zero; (suc n) → n } where aux = zero
------------------------------------------------------------------------------ -- Agda-Prop Library. -- Syntax Experiment definitions. ------------------------------------------------------------------------------ open import Data.Nat using ( ℕ ) module Data.PropFormula.SyntaxExperiment ( n : ℕ ) where -------------...
------------------------------------------------------------------------ -- The Agda standard library -- -- Examples of printing list and vec-based tables ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module README.Text.Tabular where open import Function....
{-# OPTIONS --without-K --safe #-} module Data.Vec.Iterated where open import Data.Unit.UniversePolymorphic open import Level open import Data.Nat.Base open import Function private variable n m : ℕ mutual Vec : Type a → ℕ → Type a Vec A zero = Vec⁰ Vec A (suc n) = Vec⁺ A n record Vec⁰ {a} : Typ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Dependent product combinators for propositional equality -- preserving functions ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Data.Product.Func...
open import Data.List open import Data.Unit open import Relation.Unary hiding (_∈_) open import Relation.Unary.PredicateTransformer using (Pt) open import Relation.Ternary.Separation open import Relation.Ternary.Separation.Construct.Market open import Relation.Ternary.Separation.Monad open import Relation.Ternary.Sepa...
module STLC.Type.Context where open import STLC.Type as Type using (Type) open Type.Substitution using () renaming (_⊙_ to _⊙τ_; _/_ to _/τ_; wk to wk-τ) open import Data.Nat using (ℕ; _+_) open import Data.Fin using (Fin; zero; suc) open import Data.Fin.Substitution open import Data.Vec using (Vec; []; _∷_; map; ...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An[Am[X]]-Anm[X] where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical.Data.Nat using (ℕ) renaming (_+_ to ...
module Foundation where infix -65536 ℞_ ℞_ : ∀ ℓ → Set _ ℞_ ℓ = Set ℓ id : ∀ {ℓ} {A : ℞ ℓ} → A → A id x = x Op₀ : ∀ {ℓ} → ℞ ℓ → ℞ ℓ Op₀ = id Op₁ : ∀ {a} → ℞ a → ℞ a Op₁ A = A → Op₀ A Op₂ : ∀ {a} (A : ℞ a) → ℞ a Op₂ A = A → Op₁ A record ♩Op₀ {a} (A : ℞ a) : ℞ a where field 𝟘 : Op₀ A record ♩Op₁ {a} (A : ℞ a) : ...
{-# OPTIONS --without-K --safe #-} module Dodo.Nullary.Unique where -- Stdlib imports import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_) open import Level using (Level) -- # Definitions Unique : ∀ {a : Level} (A : Set a) → Set _ Unique A = ∀ (x y : A) → x ≡ y
{- This second-order term syntax was created from the following second-order syntax description: $sig_string -} module ${syn_name}.Syntax where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core open import SOAS.Construction.Structure open import SOAS.ContextMa...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Prod {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed op...
{-# OPTIONS --safe --sized-types #-} module Issue3517.S where open import Agda.Builtin.Size public
{-# OPTIONS --universe-polymorphism #-} module Categories.Monoidal.Helpers where open import Data.Nat using (_+_) open import Function using (flip) open import Categories.Category import Categories.Functor open import Categories.Bifunctor hiding (identityˡ; identityʳ; assoc) renaming (id to idF; _≡_ to _≡F_; _∘_ to ...
{-# OPTIONS --prop --allow-unsolved-metas #-} postulate A : Set P : A → Prop a : A c : P a Q : Prop x : Q x = _ where b : A b = a d : P b d = c
module WellScopedTermsModel where open import Library open import WellScopedTerms open import RMonads open import RMonads.REM open import Categories.Sets _<<_ : ∀{n}{X : Set} → (Fin n → X) → X → Fin (suc n) → X (f << x) zero = x (f << x) (suc i) = f i record LambdaModel : Set₁ where field S : Set Env = ...
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(...
open import Prelude open import Data.Maybe using (Maybe; just; nothing) open import Data.String renaming (_++_ to _++s_) open import RW.Language.RTerm open import RW.Language.RTermUtils open import RW.Language.FinTerm open import RW.Language.Instantiation -- Strategy Module. -- -- Here we'll provide a modular appro...
------------------------------------------------------------------------------ -- Foo module ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --with...
------------------------------------------------------------------------ -- Sizes for Agda's sized types ------------------------------------------------------------------------ module Size where postulate Size : Set ↑_ : Size → Size ∞ : Size {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZESUC ↑_ #-} {-# B...
open import IO main = run (putStr "Hello, World!")
{-# OPTIONS --safe #-} module Mod where open import Data.Fin open import Data.Nat as ℕ using (ℕ; zero; suc; z≤n; s≤s) open import Relation.Binary.PropositionalEquality open import Function private variable k : ℕ last : Fin (suc k) last {k = zero} = zero last {k = suc _} = suc last negate : Fin k -> Fin k negate z...
module BasicIS4.Metatheory.Hilbert-BasicKripkeOno where open import BasicIS4.Syntax.Hilbert public open import BasicIS4.Semantics.BasicKripkeOno public -- Soundness with respect to all models, or evaluation. eval : ∀ {A Γ} → Γ ⊢ A → Γ ⊨ A eval (var i) γ = lookup i γ eval (app {A} {B} t u) γ = _⟪$⟫_ {A} {B...
-- Andreas, 2017-10-09, issue #2576 -- Duplicate definition should be reported as such, -- not as "Missing type signature." data ⊥ : Set where data ⊥ where -- Error was: Missing type signature for ⊥ -- Expected error: Duplicate definition
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Prettyprint where open import Cubical.Data.Sigma.Base open import Number.Postulates open import Number.Base [ℕ] = Number (isNat , anyPositivityᵒʳ) [ℕ⁺⁻] = Number (isNat , isNonzeroᵒʳ ) [ℕ₀⁺] = Number (isNat , isNonnegativeᵒʳ) [ℕ⁺] = Number (...
module Categories.Functor.Coalgebra where
{-# OPTIONS --safe --warning=error --without-K #-} open import Functions.Definition open import LogicalFormulae open import Numbers.Naturals.Definition open import Sets.FinSet.Definition open import Sets.FinSet.Lemmas module Sets.Cardinality.Finite.Lemmas where finsetInjectIntoℕ : {n : ℕ} → Injection (toNat {n}) fin...
open import Prelude open import Data.List.Properties open import Data.List.Any hiding (map) open import Data.List.All as All hiding (map; lookup) open import Data.Vec open import Extensions.Vec module Implicits.Resolution.Deterministic.Semantics where open import Implicits.Syntax open import Implicits.Resolution.Dete...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Reflexivity {{eqrel : EqRelSet}} where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Weakening open import Definition.Typed.Properties open import D...
open import Agda.Primitive using (_⊔_) import Categories.Category as Category import Categories.Category.Cartesian as Cartesian import SingleSorted.Interpretation as Interpretation open import SingleSorted.AlgebraicTheory open import SingleSorted.Substitution import SingleSorted.Power as Power module SingleSorted.Mo...
module exampleEquivalenceLambdaNotations2 where postulate A : Set g : A -> A g = \x -> x g' : A -> A g' a = a postulate P : (A -> A) -> Set f : P g -> P g' f x = x
{-# OPTIONS --safe #-} module Cubical.Data.Graph where open import Cubical.Data.Graph.Base public open import Cubical.Data.Graph.Examples public open import Cubical.Data.Graph.Path public
module Human.Int where open import Human.Nat open import Human.String infix 8 pos data Int : Set where pos : (n : Nat) → Int negsuc : (n : Nat) → Int {-# BUILTIN INTEGER Int #-} {-# BUILTIN INTEGERPOS pos #-} {-# BUILTIN INTEGERNEGSUC negsuc #-} primitive primShowInteger : Int → String
module Data.Product.Instance where open import Class.Equality open import Class.Monoid open import Class.Show open import Data.Product open import Data.Product.Properties open import Data.String.Instance open import Relation.Nullary open import Relation.Binary.PropositionalEquality instance Product-Eq : ∀ {A B} {{_...
{-# OPTIONS --without-K --exact-split #-} module polynomial-rings where import rings open rings public {- We state the universal property of the polynomial ring R[x]. -} precomp-universal-property-polynomial-Ring : {l1 l2 l3 : Level} (R : Ring l1) (S : Ring l2) (T : Ring l3) (f : hom-Ring R S) (s : type-Ring S)...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Ring.Kernel where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Structure open import Cubical.Foundations.HLevels open import Cubical.Foundations.Powerset open import Cubical.Algeb...
module BBHeap {A : Set}(_≤_ : A → A → Set) where open import BHeap _≤_ hiding (forget ; # ; flatten) open import Bound.Lower A open import Bound.Lower.Order _≤_ open import BTree {A} hiding (flatten) open import Data.Nat open import Data.List mutual data BBHeap : Bound → Set where leaf : {b : Bound} → BBHeap b...
-- broken since the clocks are not supposed to be freely instantiable open import guarded-recursion.prelude renaming (O to zero; S to suc) open Coe module guarded-recursion.clocks (Clk : Type) (▹ : ∀ {a} → Clk → Set a → Set a) (▹′ : ∀ {a} κ → ▹ κ (Set a) → Set a) --▹′ κ A = ▹ κ A (next : ∀ {κ a} ...
{-# OPTIONS --safe --cubical #-} module Relation.Binary where open import Level open import Relation.Nullary open import Path as ≡ hiding (sym; refl) open import Data.Sum open import Function open import Data.Bool as Bool using (Bool; true; false; T; bool) open import Relation.Nullary.Decidable open import Relation.N...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.RingSolver.HornerForms where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat using (ℕ) open import Cubical.Data.FinData open import Cubical.Data.Vec open import Cubical.Data.Bool using (Bool; true; false; if_then_else_) op...
open import Agda.Builtin.Nat postulate Pos : Set data FVec : (n : Nat) → Set₁ where FNil : FVec 0 FCons : ∀ {n} → (Pos → Set) → FVec (suc n) pre : ∀ {m n} → FVec m → FVec (suc n) → Pos → Set pre FNil (FCons x) = x pre (FCons x) _ = x data proofAG : ∀ {n} → FVec n → Set where []AG : proofAG FNil ...
{-# OPTIONS --without-K #-} open import Type hiding (★) open import Function open import Relation.Binary.PropositionalEquality open import Explore.Core open import Explore.Properties -- Explore ℓ is not an endo functor because of universe levels module Explore.Monad {a} ℓ where M = Explore {a} ℓ module _ {A : ★ a} ...
-- Occurs when different mixfix operators use similar names. module Issue147a where postulate X : Set f : X -> X f_ : X -> X bad : X -> X bad x = f x
module ExtendedLambdaCase where data Bool : Set where true false : Bool data Void : Set where foo : Bool -> Bool -> Bool -> Bool foo = λ { x → λ { y z → {!!} } } module parameterised {A : Set}(B : A -> Set) where data Bar : (Bool -> Bool) -> Set where baz : (t : Void) -> Bar λ { x → {!!} } -- with hidde...
module Oscar.Data.Term.Substitution.Core {𝔣} (FunctionName : Set 𝔣) where open import Oscar.Data.Term.Core FunctionName open import Oscar.Data.Term.Substitution.Core.bootstrap FunctionName public hiding (_◃Term_; _◃VecTerm_) open import Oscar.Data.Nat.Core open import Oscar.Data.Fin.Core open import Oscar.Data.Vec....
module Impure.LFRef.Readme where open import Impure.LFRef.Syntax open import Impure.LFRef.Welltyped open import Impure.LFRef.Eval open import Impure.LFRef.Properties.Soundness open import Impure.LFRef.Properties.Confluence
------------------------------------------------------------------------ -- The Agda standard library -- -- Union of two binary relations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Binary.Construct.Union where open import Data.Product o...
-- We define the localisation of a commutative ring -- at a multiplicatively closed subset and show that it -- has a commutative ring structure. {-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommRing.Localisation.Base where open import Cubical.Foundations.Prelude open import Cubical.F...
{-# OPTIONS --safe #-} module Cubical.Algebra.Polynomials.UnivariateHIT.Base where open import Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyHIT public {- The Univariate Functional Polynomials over a CommRing A is a CommRing. The base type is define using an HIT. This definition enables to defined a d...
-- Andreas, 2019-11-07, issue #4169 report and testcase by nad. -- Extra coercions needed when erased versions of functions are used. open import Agda.Builtin.Unit open import Common.IO data D : Set where c : D F : D → Set → Set F c A = A → A f : (d : D) (A : Set) → F d A → A → A -- 14 f c A g = g f′ : (d : D...
------------------------------------------------------------------------ -- H-levels ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Partly based on Voevodsky's work on so-called univalent -- foundations. open import Equality module H-level {reflexive...
-- define ⋁ and ⋀ as the bigOps of a Ring when interpreted -- as an additive/multiplicative monoid {-# OPTIONS --safe #-} module Cubical.Algebra.DistLattice.BigOps where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.Equiv open import Cubical.Foundatio...
module examplesPaperJFP.IOExampleConsole where open import examplesPaperJFP.BasicIO hiding (main) open import examplesPaperJFP.Console hiding (main) open import examplesPaperJFP.NativeIOSafe open import examplesPaperJFP.CatTerm main : NativeIO Unit main = translateIOConsole cat
{-# OPTIONS --safe #-} module Cubical.Categories.Additive where open import Cubical.Categories.Additive.Base public open import Cubical.Categories.Additive.Properties public open import Cubical.Categories.Additive.Quotient public
{- This second-order term syntax was created from the following second-order syntax description: syntax CTLC | ΛC type N : 0-ary _↣_ : 2-ary | r30 ¬_ : 1-ary | r30 term app : α ↣ β α -> β | _$_ l20 lam : α.β -> α ↣ β | ƛ_ r10 throw : α ¬ α -> β callcc : ¬ α.α -> α theory (ƛβ) b :...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.RingSolver.Examples where open import Cubical.Foundations.Prelude open import Cubical.Data.FinData open import Cubical.Data.Nat using (ℕ) open import Cubical.Data.Vec.Base open import Cubical.Algebra.RingSolver.AlmostRing open import Cubical.A...
{- This file contains: - Eliminators of direct limit, especially an index-shifting version; - Connectivity of inclusion maps. -} {-# OPTIONS --safe #-} module Cubical.HITs.SequentialColimit.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv.Properties open import Cubic...
------------------------------------------------------------------------ -- Small coinductive higher lenses ------------------------------------------------------------------------ {-# OPTIONS --cubical --guardedness #-} import Equality.Path as P module Lens.Non-dependent.Higher.Coinductive.Small {e⁺} (eq : ∀ {a p...
module test where data Bool : Set where True : Bool False : Bool !_ : Bool → Bool ! True = False ! False = True if_then_else_ : {A : Set} → Bool → A → A → A if True then x else y = x if False then x else y = y data ℕ : Set where zero : ℕ suc : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + a = a suc a + b = suc (...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Conversion.Fast.Strict where open import Data.Binary.Definition open import Data.Nat.DivMod open import Data.Nat.Base using (ℕ; suc; zero) open import Strict open import Data.Bool ⟦_⇑⟧⟨_⟩ : ℕ → ℕ → 𝔹 ⟦ suc n ⇑⟧⟨ suc w ⟩ = let! m =! even n in! let! ms =! ⟦ n ...
-- Andreas, 2017-10-04, issue #2753, reported by nad -- Here, late solving of size constraints, prevented assignment -- of instance metas to their solutions, since the metaOccurs -- check then had more information through meta instantiation -- and saw the loop. -- To solve this issue, we switch off the meta-occurs ch...
{- Matrix with coefficients in a commutative ring -} {-# OPTIONS --safe #-} module Cubical.Algebra.Matrix.CommRingCoefficient where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Powerset open import Cubical.Data....
{-# OPTIONS --without-K #-} module M-types.Coalg where open import M-types.Coalg.Core public open import M-types.Coalg.Bisim public open import M-types.Coalg.M public
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module PolynomialFunctors where -- From: Ulf Norell. Dependently typed programming in Agda. In Koopman -- et al., editors. Advanced Functional Pro...
{-# OPTIONS --safe --no-qualified-instances #-} module JVM.Syntax.Instructions where open import Level open import Data.Unit open import Data.Product hiding (swap) open import Data.String using (String) open import Data.List open import Data.List.Membership.Propositional using () renaming (_∈_ to Reg) open import JVM...
open import Nat open import Prelude open import dynamics-core open import contexts open import preservation module complete-preservation where -- if you substitute a complete term into a complete term, the result is -- still complete. cp-subst : ∀ {x d1 d2} → d1 dcomplete → d2 dcomplete...
module Logic.Congruence where import Prelude import Logic.Relations import Logic.Equivalence open Prelude open Logic.Relations open Logic.Equivalence using (Equivalence) renaming (module Equivalence to Proj) data Congruence (A : Set) : Set1 where congruence : (Eq : Equivalence A) -> ...
{- This second-order term syntax was created from the following second-order syntax description: syntax CommMonoid | CM type * : 0-ary term unit : * | ε add : * * -> * | _⊕_ l20 theory (εU⊕ᴸ) a |> add (unit, a) = a (εU⊕ᴿ) a |> add (a, unit) = a (⊕A) a b c |> add (add(a, b), c) = add (a, add(b, c)) ...
{-# OPTIONS --without-K --safe #-} open import Algebra.Structures.Bundles.Field module Algebra.Linear.Structures.FiniteDimensional {k ℓᵏ} (K : Field k ℓᵏ) where open import Algebra.Linear.Core open import Algebra.FunctionProperties open import Relation.Binary using (Rel) open import Algebra.Linear.Morphism.Bund...
{-# OPTIONS --without-K #-} infixr 1 _‘→’_ data Type : Set where _‘→’_ : Type → Type → Type ‘□’ : Type → Type data □ : Type → Set where Lӧb : ∀ {X} → □ (‘□’ X ‘→’ X) → □ X ⌞_⌟ : Type → Set ⌞ A ‘→’ B ⌟ = ⌞ A ⌟ → ⌞ B ⌟ ⌞ ‘□’ T ⌟ = □ T ⌞_⌟t : ∀ {T : Type} → □ T → ⌞ T ⌟ ⌞ (Lӧb □‘X’→X) ⌟t = ⌞ □‘X’→X ⌟t (Lӧb □‘X’...
------------------------------------------------------------------------ -- Queue instances for the queues in Queue.Simple ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Queue.Simple.Instances {c⁺} (eq : ∀ {a p} → Equality-wit...
-- Andreas, 2015-11-28 -- Aliases in parentheses should also parse. -- Parenthesized aliases are accepted in lets. -- With type annotation, parenthesized aliases are accepted in wheres. id0 : {A : Set} → A → A id0 {A} x = let z = y in z where y : A y = x id1 : {A : Set} → A → A id1 {A} x = let (z) = y in ...
module Structure.Operator.Vector.LinearMap where open import Functional open import Logic open import Logic.Predicate open import Logic.Propositional import Lvl open import Structure.Function open import Structure.Function.Domain open import Structure.Function.Multi open import Structure.Operator open import Stru...
module STLC2.Kovacs.Completeness where open import STLC2.Kovacs.Normalisation public open import STLC2.Kovacs.Convertibility public -- TODO: Remove this postulate █ : ∀ {ℓ} → {X : Set ℓ} → X -------------------------------------------------------------------------------- -- (_≈_) mutual infix 3 _≫_ _≫_ : ∀...
-- Andreas, 2010-09-24 module ParseForallAbsurd where parseFails : forall () -> Set1 parseFails x = Set -- this does no longer give the error message -- "absurd lambda cannot have a body"
-- WARNING: This file was generated automatically by Vehicle -- and should not be modified manually! -- Metadata -- - Agda version: 2.6.2 -- - AISEC version: 0.1.0.1 -- - Time generated: ??? {-# OPTIONS --allow-exec #-} open import Vehicle open import Data.Unit open import Data.Integer as ℤ using (ℤ) open import D...
{-# OPTIONS --without-K --rewriting #-} open import lib.Base open import lib.PathGroupoid open import lib.Relation module lib.NType where module _ {i} where {- Definition of contractible types and truncation levels -} -- We define `has-level' as a record, so that it does not unfold when -- applied to (S n), ...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cw.CW open import cw.FinCW open import cw.FinBoundary open import cohomology.Theory module cw.cohomology.cochainequiv.DualizedHigherBoundary (OT : OrdinaryTheory lzero) {n} (⊙fin-skel : ⊙FinSkeleton (S (S n))) where open OrdinaryTheory OT privat...
open import Common.Prelude pattern [_] x = x ∷ [] pattern tail {x} xs = x ∷ xs length : ∀ {A} → List A → Nat length [] = 0 length [ _ ] = 1 length (tail [ _ ]) = 2 length (tail (tail xs)) = 2 + length xs data Vec (A : Set) : Nat → Set where nil : Vec A 0 cons : ∀ n → A → Vec A n → Vec A (suc n) pattern _∷v_ {n...
{-# OPTIONS --without-K #-} module hott.core.univalence where open import hott.core.universe open import hott.functions open import hott.core.equality open import hott.core.sigma -- The core idea of univalence is to "identify" isomorphic types as -- equal. Of course the normal definition of isomorphism is that the...
-- The category Ab of abelian groups {-# OPTIONS --safe #-} module Cubical.Categories.Instances.AbGroups where open import Cubical.Algebra.AbGroup.Base open import Cubical.Algebra.Group.MorphismProperties open import Cubical.Categories.Category.Base open import Cubical.Foundations.Prelude module _ {ℓ : Level} where...
------------------------------------------------------------------------ -- A total parser combinator library -- -- Nils Anders Danielsson ------------------------------------------------------------------------ module TotalParserCombinators where -- Check out TotalRecognisers for an introduction to the ideas used --...
{- Reported by Nils Anders Danielsson, 2011-07-06 From the release notes for Agda 2.2.10: "Projections now preserve sizes, both in patterns and expressions." However, the following code is rejected: -} module SubTermAndProjections where record _×_ (A B : Set) : Set where constructor _,_ field proj₁ : A ...
open import Agda.Primitive using (_⊔_) open import Categories.Category open import Categories.Functor open import Categories.Monad.Relative module SecondOrder.RelativeKleisli {o l e o' l' e'} {𝒞 : Category o l e} {𝒟 : Category o' l' e'} {J : Functor 𝒞 𝒟} (M : Monad J) ...