text
stringlengths
4
690k
-- Andreas, 2017-01-14, issue #2405 reported by m0davis -- Instance not found due to regression introduced by -- parameter-refinement. -- {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.instance:70 #-} -- {-# OPTIONS -v tc.meta.assign:40 #-} -- {-# OPTIONS -v tc.conv:40 #-} -- {-# OPTIONS -v tc.sig.param:100 #-} ...
------------------------------------------------------------------------------ -- Co-lists ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-uni...
module Issue561 where open import Common.Prelude hiding (primIsDigit) primitive primIsDigit : Char → Bool main : IO Bool main = return true
------------------------------------------------------------------------ -- The Step function, used to define strong and weak bisimilarity as -- well as expansion ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude open import Labelled-transition...
{-# OPTIONS --without-K --safe #-} module Categories.Adjoint where -- Adjoints open import Level open import Data.Product using (_,_; _×_) open import Function using (_$_) renaming (_∘_ to _∙_) open import Function.Equality using (Π; _⟶_) import Function.Inverse as FI open import Relation.Binary using (Rel; IsEquiva...
module main where open import IO main : Main main = run (putStrLn "Hello World!")
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Implementation.Relation.Binary.Equality.Propositional where open import Agda.Builtin.Equality using (_≡_ ; refl) open import Light.Library.Relation.Binary using (SelfSymmetric ; SelfTransitive ; Reflexive ; Binary ; Sel...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.Groups.Torus where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.Groups.Connected open import Cubical.ZCohomology.MayerVietorisUnreduced open import Cubical.ZCohomology.Groups...
module Data.List.FunctionsProven where import Lvl open import Data.Boolean open import Data.List as List using (List ; ∅ ; _⊰_) import Data.List.Functions as List open import Data.List.Relation.Membership open import Data.List.Relation.Quantification open import Functional open import Lang.Instance open impo...
{-# OPTIONS --without-K #-} module factorial where open import Type open import Data.Nat.NP open import Data.Product open import Data.Sum.NP open import Data.Zero open import Data.Maybe open import Data.One using (𝟙) open import Data.Fin.NP using (Fin; Fin′; zero; suc; inject₁; inject!;...
module Ag03 where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym) open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Data.Nat.Properties using (+-comm; *-comm; +-suc) data _≤_ : ℕ → ℕ → Set where z≤n : ∀ {n : ℕ} → zero ≤ n s≤s : ∀ {m n : ℕ} → m ≤ n → suc m ≤ s...
------------------------------------------------------------------------------ -- Simple example of a nested recursive function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-...
{-# OPTIONS --guardedness-preserving-type-constructors #-} module Issue602 where infix 1000 ♯_ postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} data CoNat : Set0 where ...
{-# OPTIONS --safe --without-K #-} module Data.Fin.Subset.Dec where open import Data.Nat as ℕ open import Data.Fin as Fin open import Data.Fin.Subset open import Relation.Nullary open import Relation.Unary renaming (Decidable to Decidable₁) using () open import Function using (_∘_) open import Data.Vec using ([]; _∷...
------------------------------------------------------------------------------ -- Well-founded induction on natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-poly...
module vector-test-ctors where open import bool open import list open import vector ---------------------------------------------------------------------- -- syntax ---------------------------------------------------------------------- test-vector : 𝕃 (𝕍 𝔹 2) test-vector = (ff :: tt :: []) :: (tt :: ff :: []) :: ...
open import Relation.Binary.PropositionalEquality using ( refl ) open import Web.Semantic.DL.Category.Object using ( Object ) open import Web.Semantic.DL.Category.Morphism using ( _≣_ ) open import Web.Semantic.DL.Category.Composition using ( _∙_ ) open import Web.Semantic.DL.Category.Tensor using ( _⊗_ ; _⟨⊗⟩_ ) open ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- Equalizers in a Category C module Categories.Diagram.Equalizer {o ℓ e} (C : Category o ℓ e) where open Category C open HomReasoning open import Level open import Data.Product as Σ open import Function using (_$_) open import Categories.Morphism C ...
open import Everything module Test.SubstitunctionPropId {𝔭} (𝔓 : Ø 𝔭) where open Substitunction 𝔓 relpropid-Substitunction : ∀ {m n ℓ} {f : Substitunction m n} (P : LeftExtensionṖroperty ℓ Substitunction Proposextensequality m) (let P₀ = π₀ (π₀ P)) → P₀ f → P₀ (ε ∙ f) relpropid-Substitunction P pf = hmap _ P p...
module UniDB.Morph.Depth where open import UniDB.Spec open import Data.Sum -------------------------------------------------------------------------------- data Depth (Ξ : MOR) : MOR where depth : {γ₁ γ₂ : Dom} (ξ : Ξ γ₁ γ₂) (δ : Dom) → Depth Ξ (γ₁ ∪ δ) (γ₂ ∪ δ) Fin-∪ : {γ₁ : Dom} (γ₂ δ : Dom) (i : Ix (γ₁ ∪ ...
{- NEW TRANSLATION STUFF: same thing but interpret source nat as ♭nat-} open import Preliminaries open import Source open import Pilot module Translation-New where mutual ⟨⟨_⟩⟩ : Tp → CTp ⟨⟨ unit ⟩⟩ = unit ⟨⟨ nat ⟩⟩ = nat ⟨⟨ susp A ⟩⟩ = || A || ⟨⟨ A ->s B ⟩⟩ = ⟨⟨ A ⟩⟩ ->c || B || ⟨⟨ A ×s B ...
-- Andreas, 2020-03-27, re #3684 record R : Set₁ where _ : R _ = record { f = Set; f = Set } -- Should complain about alien fields rather than duplicate fields -- The record type R does not have the fields f, f -- when checking that the expression record { f = Set ; f = Set } has type R
------------------------------------------------------------------------------ -- Agda internal syntax ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} -- Test...
module Graph where import Lvl open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional open import Data.List open import Logic.Propositional{Lvl.𝟎} open import Logic.Predicate{Lvl.𝟎}{Lvl.𝟎} open import Relator.Equals{Lvl.𝟎} open import Data.List.Relation.Membership{Lvl.𝟎} using (_∈_) -- Edge...
-- Andreas, 2017-03-27 fixing regression #2472 -- Auto should be applicable also outside function clauses -- {-# OPTIONS -v auto:100 #-} open import Agda.Primitive test : Set {!!} test = Set -- Auto should succeed on this goal
module TermUnification where open import OscarPrelude open import Delay open import VariableName open import FunctionName open import Arity open import Vector open import Term mutual substituteTerm⇑ : VariableName → Term → ∀ {i} → Term → Delay i Term substituteTerm⇑ 𝑥ₛ τₛ τ@(variable 𝑥) = now $ ifYes 𝑥ₛ ≟ 𝑥...
{- Agda Implementors' Meeting VI Göteborg May 24 - 30, 2007 Hello Agda! Ulf Norell -} -- Let's have a closer look at the module system module Modules where {- Importing and opening modules -} -- You can import a module defined in a dif...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Transitivity {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Properties...
{-# OPTIONS --without-K #-} module function.isomorphism.core where open import level using (_⊔_) open import equality.core open import equality.groupoid open import equality.reasoning open import function.core open import function.overloading open import sum open import function.extensionality.core open import overloa...
{-# OPTIONS --without-K --safe #-} open import Algebra.Structures.Bundles.Field module Algebra.Linear.Morphism.Bundles {k ℓᵏ} (K : Field k ℓᵏ) where open import Algebra.FunctionProperties as FP open import Relation.Binary using (Rel; Setoid) open import Level import Algebra.Linear.Structures.Bundles as VS open...
open import Agda.Builtin.Unit open import Agda.Builtin.List open import Agda.Builtin.Nat open import Agda.Builtin.Equality open import Agda.Builtin.Reflection open import Agda.Builtin.Sigma macro @0 trivial : Term → TC ⊤ trivial = unify (con (quote refl) []) test : 42 ≡ 42 test = trivial @0 m : Name → TC ⊤ m F =...
open import Level using () renaming (_⊔_ to _⊔ˡ_) open import Data.Product using (_,_; proj₁) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Relation.Nullary using (yes; no; ¬_) open import Relation.Nullary.Negation using (contradiction) open import Relation.Binary using (Reflexive; Symmetric; Transitive; S...
{-# OPTIONS --erased-cubical #-} module SMain where open import Data.List using (map) open import Data.Nat using (_*_) open import Data.Unit using (⊤) open import Midi using (IO; exportTracks; track→htrack) open import Soundness using (soundTracks) open import Motif using (multiplier) main : IO ⊤ main = ...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Connecting Parametric.Change.Term and Parametric.Change.Value. ------------------------------------------------------------------------ import Parametric.Syntax.Type as Type import Parametric.Syntax.Term as Term im...
module TelescopingLet1 where f : (let ★ = Set) (A : ★) → A → A f A x = x data X : ★ where -- should fail, since ★ is not in global scope
-- Andreas, 2017-09-03, issue #2729. -- Expect non-indexed or -primed variables when splitting. -- {-# OPTIONS -v interaction.case:100 #-} -- {-# OPTIONS -v tc.cover:40 #-} data Size : Set where ↑ : Size → Size data Nat : Size → Set where zero : ∀ i → Nat (↑ i) suc : ∀ i → Nat i → Nat (↑ i) pred : ∀ i → Nat ...
-- Andreas, 2017-07-29, issue #2644 reported by Christian Sattler -- -- Silly mistake in expandRecordVar: -- Substitution applied to ListTel instead of Telescope. -- (Messed up the de Bruijn indices, garbage.) -- This file should pass with lots of yellow. {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.m...
-- Kapitel 1, Abschnitt D (Die Eigenschaften der Gleichheit) module CombinatoryLogic.Equality where open import Algebra.Definitions using (Congruent₂; LeftCongruent; RightCongruent) open import Data.Vec using (Vec; []; _∷_; foldr₁; lookup) open import Function using (_$_) open import Relation.Binary using (IsEquivalen...
{-# OPTIONS --guardedness #-} module Cubical.README where ------------------------------------------------------------------------ -- An experimental library for Cubical Agda ----------------------------------------------------------------------- -- The library comes with a .agda-lib file, for use with the library -...
-- Andreas, 2017-04-26, issue #2554 -- Allow mutual sized types in successor style. -- {-# OPTIONS -v tc.pos.args:100 #-} -- {-# OPTIONS -v tc.pos:100 #-} -- {-# OPTIONS -v tc.polarity:20 #-} open import Agda.Builtin.Size mutual data C : Size → Set where c : ∀{i} → D i → C (↑ i) data D : Size → Set where ...
open import OutsideIn.Prelude open import OutsideIn.X module OutsideIn.TopLevel(x : X) where import OutsideIn.Expressions as E open E(x) open X(x) data Program (ev : Set)(tv : Set) : Set where end : Program ev tv bind₁_,_ : ∀ {s} → Expression ev tv s → Program (Ⓢ ev) tv → Program ev tv bind₂_·_∷_⇒...
module Fail.NonCopatternInstance where record HasId (a : Set) : Set where field id : a → a open HasId ⦃ ... ⦄ {-# COMPILE AGDA2HS HasId class #-} data Unit : Set where MkUnit : Unit {-# COMPILE AGDA2HS Unit #-} instance UnitHasId : HasId Unit UnitHasId = record { id = λ x → x } -- NOT CORRECT -- Unit...
-- Andreas, 2020-02-15, issue #4447 -- -- Positivity checker needs to see the constructor types -- in the same way as the type checker has seen them. -- -- Thus, we need to reduce types of constructors even -- with definitions that have not yet been subjected to termination -- checking, e.g. because they live in a mutu...
module Acme.Data.Fin where open import Acme.Type open import Acme.Data.Nat as ℕ using (ℕ) Fin : Elt ℕ → Type Fin = ℕ.induction (λ _ → Type) base (λ _ → step) where base : Type base _ = false step : Type → Type step ih [] = false step ih (c ∷ cs) = c == 'Z' && isNil cs || c == 'S' && i...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.PointedSets where -- Category of Pointed Sets open import Level open import Relation.Binary open import Function using (_∘′_; _$_) renaming (id to idf) open import Relation.Binary.PropositionalEquality as ≡ using (_≡_; refl) open import Data.Produ...
{-# OPTIONS --without-K --rewriting --termination-depth=2 #-} open import HoTT open import cw.CW open import cw.examples.Sphere module cw.examples.Torus where ⊤-has-dec-eq : has-dec-eq ⊤ ⊤-has-dec-eq unit unit = inl idp ⊤-is-set : is-set ⊤ ⊤-is-set = dec-eq-is-set ⊤-has-dec-eq cw-torus-skel : Skeleton {lzero} (S ...
{-# OPTIONS --without-K #-} module equality.reasoning where open import equality.core module ≡-Reasoning {i} {X : Set i} where infix 4 _IsRelatedTo_ infix 2 _∎ infixr 2 _≡⟨_⟩_ infix 1 begin_ -- This seemingly unnecessary type is used to make it possible to -- infer arguments even if the underlying equ...
{-# OPTIONS --allow-unsolved-metas #-} {- The moral of the story is best told by comparing RegularVsConstructedMoreSimpler and RegularVsConstructed-EnhancedReg: * aliased type constructors can lose information about their dependencies, leading to some inconvenience when using a function which takes those dependenc...
{-# OPTIONS --without-K --safe #-} -- Properties of F<:⁻ -- -- This file shows several structural properties of F<:⁻, including weakening, -- narrowing and transitivity. They are not used anywhere, but just serve as a -- reference to compare the complexity with the corresponding proofs of D<:. module FsubMinus2 where ...
module Categories where infix 10 _≡_ data _≡_ {A : Set}(a : A) : {B : Set} -> B -> Set where refl : a ≡ a trans : forall {A B C}{a : A}{b : B}{c : C} -> a ≡ b -> b ≡ c -> a ≡ c trans refl p = p sym : forall {A B}{a : A}{b : B} -> a ≡ b -> b ≡ a sym refl = refl resp : forall {A}{B : A -> Set}{a a' : A} -> ...
------------------------------------------------------------------------ -- Pointers to results from the paper ------------------------------------------------------------------------ -- Note that this is a version of the code that does not quite match -- the description in the paper. See README for some discussion of...
module Cats.Category.Cones where open import Relation.Binary using (Rel ; IsEquivalence ; _Preserves₂_⟶_⟶_) open import Level using (_⊔_) open import Cats.Category.Base open import Cats.Functor using (Functor) renaming (_∘_ to _∘F_) open import Cats.Util.Conv import Relation.Binary.PropositionalEquality as ≡ import...
{-# OPTIONS --without-K --safe #-} module Dodo.Nullary.Disjoint where -- Stdlib imports open import Level using (Level) open import Data.Product using (_×_) open import Relation.Nullary using (¬_) -- # Definitions Disjoint : ∀ {a b : Level} (A : Set a) (B : Set b) → Set _ Disjoint A B = ¬ (A × B)
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties related to Linked ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Unary.Linked.Properties where open import Data...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import groups.Cokernel {- K ↑ ╎ ψ₁ q[_] ╎ ψ₂ Coker ψ₂ ↞--- G ←------ L ↑ ↑ φ₁ ╎ ╎ inject ↑ ↑ H ↞------- Ker ψ₁ φ₂ Then, H ...
{-# OPTIONS --experimental-irrelevance #-} --{-# OPTIONS -v tc.lhs.unify:65 -v tc.irr:50 #-} open import Agda.Builtin.Bool open import Agda.Builtin.Equality data D : ..(b : Bool) → Set where c : (b : Bool) → D b test : ..(a : Bool) → D a → Bool test a (c b) = b data ⊥ : Set where record ⊤ : Set where constructor ...
module Numeral.Natural.Combinatorics where open import Numeral.Natural open import Numeral.Natural.Oper -- Counting combinations. -- `𝑐𝐶 n k` is the number of ways one can pick `k` number of distinct objects from a set of `n` number of distinct objects. -- Equivalently, it is the number of `k`-sized subsets of an `...
------------------------------------------------------------------------------ -- The LTC-PCF base ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS ...
open import Data.Product using ( proj₁ ; proj₂ ) open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ ) open import Relation.Binary.PropositionalEquality using ( refl ) open import Web.Semantic.DL.ABox.Interp using ( ⌊_⌋ ; ind ; _*_ ) open import Web.Semantic.DL.ABox.Interp.Morphism using ( _,_ ) open import Web.Semantic.DL....
-- Andreas, 2017-04-26 -- Allow more flexible size assignment. module _ where open import Agda.Builtin.Size module ZeroZero where data Nat : Size → Set where zero : ∀{i} → Nat i -- does not have to be ↑ i suc : ∀{i} → Nat i → Nat (↑ i) mon : ∀{i}{j : Size< i} → Nat j → Nat i mon x = x m...
{-# OPTIONS --without-K #-} open import HoTT import homotopy.HopfConstruction open import homotopy.CircleHSpace open import homotopy.SuspensionJoin using () renaming (e to suspension-join) import homotopy.JoinAssocCubical module homotopy.Hopf where module Hopf = homotopy.HopfConstruction S¹ S¹-connected S¹-hSpace H...
data Nat : Set where zero : Nat suc : Nat → Nat {-# BUILTIN NATURAL Nat #-} data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x pred : Nat → Nat pred zero = zero pred (suc n) = n {-# NON_TERMINATING #-} loop : Nat → Nat loop zero = zero loop n = loop (pred n) -- Non-terminating functions reduce when ev...
module z01-fp-with-booleans where open import bool {- data 𝔹 : Set where tt : 𝔹 ff : 𝔹 ˜_ : 𝔹 → 𝔹 ˜ tt = ff ˜ ff = tt if_then_else_ : ∀ {ℓ} {A : Set ℓ} → 𝔹 → A → A → A if tt then t else f = t if ff then t else f = f -} -- load / type-check file -- C-c, C-l -- check type of expression -- C-c, C-d ; then ...
------------------------------------------------------------------------------ -- Propositional equality ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OP...
-- Needs the --injective-type-constructors option enabled to type check. module InjectiveTypeConstructors where data D (A : Set) : Set where data _==_ (A : Set) : Set → Set where refl : A == A injD : ∀ {A B} → D A == D B → A == B injD refl = refl
module Cats.Category.Product.Binary.Facts where open import Cats.Category open import Cats.Category.Product.Binary using (_×_) open import Cats.Functor open import Cats.Util.Logic.Constructive using (_∧_ ; _,_ ; ∧-eliml ; ∧-elimr) module _ {lo la l≈ lo′ la′ l≈′} {C : Category lo la l≈} {D : Category lo′ la′ l≈′}...
{- # --without-K # -} open import Data.Unit open import Data.Empty open import Data.Nat open import Data.Sum as Sum open import Data.Product open import Function open import Relation.Binary.PropositionalEquality open import Relation.Unary open import Relation.Binary open import Relation.Binary using (module IsEquivale...
module Tactic.Nat.Auto where open import Prelude open import Builtin.Reflection open import Tactic.Reflection.Quote open import Tactic.Reflection open import Tactic.Nat.NF open import Tactic.Nat.Exp open import Tactic.Nat.Reflect open import Tactic.Nat.Auto.Lemmas open Tactic.Nat.Reflect public using (cantProve; in...
import Lvl open import Structure.Setoid open import Type module Automaton.TuringMachine where open import Data.Boolean import Data.Boolean.Operators open Data.Boolean.Operators.Programming open import Data.Either as Either using (_‖_) open import Data.Either.Setoid open import Data.Option as Option o...
module Data.QuadTree.LensProofs.Valid-LensBCD where open import Haskell.Prelude renaming (zero to Z; suc to S) open import Data.Lens.Lens open import Data.Logic open import Data.QuadTree.InternalAgda open import Agda.Primitive open import Data.Lens.Proofs.LensLaws open import Data.Lens.Proofs.LensPostulates open impor...
{-# OPTIONS --type-in-type #-} module Bias where open import AgdaPrelude myFun : (a : Set) -> a -> a -> a -> a myFun a x y z = x --myApp1 = myFun _ Zero Zero (Nil Nat) myApp2 = myFun _ (Nil Nat) Zero Zero
module Test2 where open import MiniHoTT A : Set A = ℕ -- a, b : A {- [ a, b ] : List A [ a, b ] := inr ( a , ?) -- inr ((a, inr ( b, inl(unit)) -} T : {A : Set} → (X : Set) → Set T {A} X = 𝟙 lzero + A × X -- This is an example of a polynomial functor. data List (A : Set) ...
open import Level open import Ordinals open import logic open import Relation.Nullary module LEMC {n : Level } (O : Ordinals {n} ) (p∨¬p : ( p : Set n) → p ∨ ( ¬ p )) where open import zf open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) open import Relation.Binary.PropositionalEq...
module Data.QuadTree.Implementation.Definition where open import Haskell.Prelude renaming (zero to Z; suc to S) open import Data.Lens.Lens open import Data.Logic {-# FOREIGN AGDA2HS {-# LANGUAGE Safe #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE Rank2Types #-} import Data.Nat import Data.Lens.Lens import Data.Logic #-...
{-# OPTIONS --type-in-type #-} open import Data.Unit open import Data.Product hiding ( curry ; uncurry ) open import Data.List hiding ( concat ) open import Data.String open import Relation.Binary.PropositionalEquality open import Function module GenericElim.Desc where -------------------------------------------------...
------------------------------------------------------------------------ -- The Agda standard library -- -- Bounded vectors (inefficient, concrete implementation) ------------------------------------------------------------------------ -- Vectors of a specified maximum length. {-# OPTIONS --without-K --safe #-} modu...
{-# OPTIONS --rewriting --prop #-} open import common hiding (_===_) {- Syntax of term- and type-expressions, using de Bruijn indices -} variable {n} {m} {k} : ℕ data Expr : SyntaxSort → ℕ → Set TyExpr = Expr Ty TmExpr = Expr Tm data Expr where uu : {n : ℕ} → TyExpr n el : {n : ℕ} (v : TmExpr n) → TyExpr n ...
{-# OPTIONS --universe-polymorphism #-} module TrustMe where open import Common.Equality postulate A : Set x : A eq : x ≡ x eq = primTrustMe evaluates-to-refl : sym (sym eq) ≡ eq evaluates-to-refl = refl
-- Eta contraction didn't consider hiding when contracting, -- leading to the following module not type checking. module Issue259 where postulate A : Set B : A → Set foo : (∀ x → B x) → A q : ∀ {x} → B x foo′ : (∀ {x} → B x) → A bar : A bar = foo (λ y → q {y}) Baz : B bar → Set → Set Baz b C wit...
module Issue728 where open import Common.MAlonzo using () renaming (main to mainDefault) main = mainDefault
-- Andreas, 2020-09-09, issue #4880 -- Make sure that duplicate hiding info is an error. module _ (A B : Set) where postulate _ : { { A } } → B -- Expected: ERROR or WARNING -- For instance: -- {A} cannot appear by itself. It needs to be the argument to a -- function expecting an implicit argument. -- when scope c...
{-# OPTIONS --universe-polymorphism #-} open import Level hiding (suc; zero) open import Categories.Category module Categories.Power {o ℓ e : Level} (C : Category o ℓ e) where open import Function using () renaming (id to idf) open import Data.Nat using (ℕ; _+_; zero; suc; _≤?_) open import Data.Product using (_,_) op...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Caching evaluation ------------------------------------------------------------------------ import Parametric.Syntax.Type as Type import Parametric.Syntax.Term as Term import Parametric.Syntax.MType as MType impor...
------------------------------------------------------------------------ -- The Agda standard library -- -- Fancy display functions for List-based tables -- -- The functions in this module assume some (unenforced) invariants. -- If you cannot guarantee that your data respects these invariants, -- you should instead use...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.elims.Lemmas module homotopy.elims.SuspSmash {i j k} {X : Ptd i} {Y : Ptd j} {P : Susp (X ∧ Y) → Type k} (north* : P north) (south* : P south) (smin* : (x : de⊙ X) (y : de⊙ Y) → north* == south* [ P ↓ merid (smin x y) ]) where priv...
{-# OPTIONS --prop --show-irrelevant #-} postulate P : Prop p : P A : P → Set f : {x : P} → A x test : A p test = f
-- Andreas, 2017-11-06, issue #2840 reported by wenkokke Id : (F : Set → Set) → Set → Set Id F = F data D (A : Set) : Set where c : Id _ A -- WAS: internal error in positivity checker -- EXPECTED: success, or -- Failed to solve the following constraints: -- [4] _F_2 A A = D A : Set -- when checking the construc...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.Theory open import cohomology.CofiberSequence module cohomology.LongExactSequence {i} (CT : CohomologyTheory i) (n : ℤ) {X Y : Ptd i} (f : fst (X ⊙→ Y)) where open CohomologyTheory CT long-exact-diag : ExactDiag _...
module UnSizedIO.IOObject where open import Data.Product open import UnSizedIO.Base open import UnSizedIO.Object -- An IO object is like a simple object, -- but the method returns IO applied to the result type of a simple object -- which means the method returns an IO program which when terminating -- returns the re...
{-# OPTIONS --copatterns #-} open import Common.Size open import Common.Prelude open import Common.Product renaming (proj₁ to fst; proj₂ to snd) record Stream (i : Size) (A : Set) : Set where coinductive field force : ∀{j : Size< i} → A × Stream j A open Stream head : ∀{i A} → Stream (↑ i) A → A head s = fst (f...
{-# OPTIONS --without-K --allow-unsolved-metas #-} module Space where open import Data.Empty using (⊥; ⊥-elim) open import Data.Nat using (ℕ; suc) renaming (_+_ to _ℕ+_; _*_ to _ℕ*_; _⊔_ to _ℕ⊔_) open import Data.Nat.Properties open import Data.Integer as ℤ using (ℤ; +_; -[1+_]; ∣_∣; _+_; _⊔_; -_) open import Data....
_∘_ : {A : Set} {B : A → Set} {C : {x : A} → B x → Set₁} → (∀ {x} (y : B x) → C y) → (g : (x : A) → B x) → ((x : A) → C (g x)) f ∘ g = λ x → f (g x) postulate R : {A : Set₁} → A → A → Set₁ _≡_ : {A : Set₁} → A → A → Set₁ _≡_ = R data D (A : Set) : Set where c : A → D A postulate cong : {A B : Se...
-------------------------------------------------------------------------------- -- This is part of Agda Inference Systems {-# OPTIONS --sized-types --guardedness #-} open import Data.Product open import Data.Vec open import Data.Unit open import Codata.Colist open import Agda.Builtin.Equality open import Size open i...
module Cats.Bifunctor where open import Data.Product using (_,_) open import Level using (_⊔_) open import Relation.Binary using (IsEquivalence ; _Preserves₂_⟶_⟶_) open import Cats.Category open import Cats.Category.Cat using (_∘_ ; ∘-resp ; _≈_ ; equiv) open import Cats.Category.Cat.Facts.Product using (Swap ; hasBi...
------------------------------------------------------------------------ -- Banker's queues (following Okasaki) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Queue.Bankers {c⁺} (eq : ∀ {a p} → Equality-with-J a p c⁺) where ope...
open import Agda.Builtin.Reflection open import Agda.Builtin.List open import Agda.Builtin.Unit data World : Set where ww : World test : Term → TC ⊤ test hole = unify (con (quote ww) []) hole HVet : Set₁ HVet = {@(tactic test) w : World} → Set a : {HQ : HVet} → HQ → ⊤ a = _
{-# OPTIONS --without-K --rewriting #-} module JamesAll where import JamesTwoMaps import JamesFirstComposite import JamesSecondComposite import JamesContractibility
A : Set A = ? B : Set B = ?
open import Level open import Ordinals module BAlgbra {n : Level } (O : Ordinals {n}) where open import zf open import logic import OrdUtil import OD import ODUtil import ODC open import Relation.Nullary open import Relation.Binary open import Data.Empty open import Relation.Binary open import Relation.Binary.Core...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.CircleHSpace open import homotopy.LoopSpaceCircle import homotopy.Pi2HSusp as Pi2HSusp open import homotopy.IterSuspensionStable -- This summerizes all [πₙ Sⁿ] module homotopy.PinSn where πS-SphereS-iso-ℤ : ∀ n → πS n (⊙Sphere (S n)) ≃ᴳ ...