text
stringlengths
4
690k
------------------------------------------------------------------------ -- The Agda standard library -- -- Reflection utilities for Fin ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Fin.Reflection where open import Data.Nat.Base as ℕ hiding (...
module algebra where open import Relation.Binary.PropositionalEquality open ≡-Reasoning -- Goals are written as normalised data ℕ : Set where zero : ℕ suc : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + y = y suc x + y = suc (x + y) record Semigroup (a : Set) : Set where field _⊛_ : a → a → a assoc : ∀ a b c → (a ⊛ b...
open import Type open import Structure.Relator open import Structure.Setoid renaming (_≡_ to _≡ₑ_) module Structure.Sets.ZFC.Oper {ℓₛ ℓₗ ℓₑ} {S : Type{ℓₛ}} ⦃ equiv : Equiv{ℓₑ}(S) ⦄ (_∈_ : S → S → Type{ℓₗ}) ⦃ [∈]-binaryRelator : BinaryRelator(_∈_) ⦄ where open import Functional using (id ; _∘₂_) open import Functional...
module ListMember where open import Prelude data Member {A : Set} (x : A) : List A -> Set where here : {xs : List A} -> Member x (cons x xs) there : forall {y} -> {xs : List A} -> Member x xs -> Member x (cons y xs) empty-no-member' : forall {A} -> {x : A} -> Member x nil -> Empty empty-no-member' p = {!!} empt...
-- We ban termination pragmas inside `where` clauses. module Issue1137 where postulate A : Set a : A foo : A foo = bar where {-# TERMINATING #-} bar : A bar = bar
{-# OPTIONS --without-K --safe #-} module Categories.Diagram.Coend.Properties where open import Categories.Category.Core using (Category) open import Categories.Category.Product import Categories.Category.Construction.Cowedges as Cowedges open import Categories.Category.Construction.Functors open import Categories.Ca...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} -- {-# OPTIONS --without-K #-} -- No accepted! module K-FOTC where postulate D : Set data _≡_ (x : D) : D → Set where refl : x ≡ x K : (x : D)(P : x ≡ x → Set) → P refl ...
{-# OPTIONS --without-K #-} module Model.Type.Core where open import Cats.Category open import Relation.Binary using (IsEquivalence) open import Model.RGraph as RG using (RGraph) open import Util.HoTT.Equiv open import Util.HoTT.FunctionalExtensionality open import Util.HoTT.HLevel open import Util.HoTT.Homotopy open...
module Structure.Relator.Function.Proofs where import Lvl open import Logic open import Logic.Propositional open import Logic.Predicate open import Functional open import Structure.Relator.Function open import Structure.Setoid open import Structure.Setoid.Uniqueness open import Structure.Relator.Properties open i...
module List.Order.Bounded.Properties {A : Set} (_≤_ : A → A → Set) (trans≤ : {x y z : A} → x ≤ y → y ≤ z → x ≤ z) where open import Bound.Total A open import Bound.Total.Order _≤_ open import Bound.Total.Order.Properties _≤_ trans≤ open import Data.List open import List.Order.B...
{-# OPTIONS --universe-polymorphism #-} module Categories.Support.PropositionalEquality where open import Function using (flip; id) open import Relation.Binary.PropositionalEquality public using () renaming (_≡_ to _≣_; refl to ≣-refl; trans to ≣-trans; sym to ≣-sym; cong to ≣-cong; cong₂ to ≣-cong₂; subst to ≣-subst;...
module StronglyRigidOccurrence where data Nat : Set where zero : Nat suc : Nat -> Nat data _≡_ {A : Set}(a : A) : A -> Set where refl : a ≡ a test : let X : Nat; X = _ in X ≡ suc X test = refl -- this gives an error in the occurs checker
module Open2 where data ⊤ : Set where tt : ⊤ data ⊤' (x : ⊤) : Set where tt : ⊤' x record R : Set where field x : ⊤ y : ⊤ record S : Set₁ where field x : R open R x public renaming (x to y; y to z) postulate s : S open S s usin...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.Cogroup open import cohomology.Theory -- H^n is a group homomorphism when the domain is (Susp X -> Y). module cohomology.Cogroup {i} (CT : CohomologyTheory i) (n : ℤ) {X : Ptd i} (cogroup-struct : CogroupStructure X) (Y : Ptd i) where ...
------------------------------------------------------------------------------ -- Definition of mutual inductive predicates ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --without-K ...
{-# OPTIONS --rewriting #-} module RewritingNat where open import Common.Equality {-# BUILTIN REWRITE _≡_ #-} data Nat : Set where zero : Nat suc : Nat → Nat _+_ : Nat → Nat → Nat zero + n = n (suc m) + n = suc (m + n) plus0T : Set plus0T = ∀{x} → (x + zero) ≡ x plusSucT : Set plusSucT = ∀{x y} → (x + (suc ...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.MaybeEmb {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.LogicalRelation open import Tools.Nat private ...
module Prelude.Product where record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B open _×_ public
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Sets where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Categories.Category open Precategory module _ ℓ where SET : Precategory (ℓ-suc ℓ) ℓ SET .ob = Σ (Type ℓ) isSet SET .Hom[_,...
-- 2014-03-06 Andreas, Reported by Fabien Renaud -- This is a larger example for the termination checker, to test performance. -- In 2014-02-X, it exhausted the heap. -- 2013-03-17 -- The termination checker now rejects this code instead of crashing. -- I do not know whether it is supposed to terminate. -- {-# OPTI...
module Category.Choice where open import Data.Sum using (_⊎_) open import Agda.Primitive using (Level; _⊔_; lsuc) open import Category.Profunctor record ChoiceImp {a b : Level} (p : Set a → Set a → Set b) : Set (lsuc (a ⊔ b)) where field isProfunctor : ProfunctorImp p left' : ∀ {x y z : Set a} → p x y → p (x...
open import Common.Prelude open import Common.Equality open import Common.Product test : (p : Bool × Bool) → proj₁ p ≡ true → Set test _ e = {!e!} -- WAS: -- Splitting on e gives -- test r refl = ? -- proj₁ r != true of type Bool -- when checking that the pattern refl has type proj₁ r ≡ true
module Category.Strong where open import Data.Product using (_×_) open import Agda.Primitive using (Level; _⊔_; lsuc) open import Category.Profunctor record StrongImp {a b : Level} (p : Set a → Set a → Set b) : Set (lsuc (a ⊔ b)) where field isProfunctor : ProfunctorImp p first' : ∀ {x y z : Set a} → p x y →...
module Bee2.Crypto.Bign where open import Data.ByteString open import Data.ByteVec open import Data.Bool using (Bool) open import Data.Nat using (ℕ) open import Data.Product using (_,_) open import Agda.Builtin.TrustMe using (primTrustMe) import Bee2.Crypto.Defs open Bee2.Crypto.Defs open Bee2.Crypto.Defs using (Hash...
------------------------------------------------------------------------ -- A partial order ------------------------------------------------------------------------ {-# OPTIONS --cubical --sized-types #-} open import Prelude hiding (⊥; module W) module Partiality-monad.Coinductive.Partial-order {a} {A : Type a} wher...
module SystemF.Substitutions.Lemmas where open import Prelude hiding (module Fin; id) open import SystemF.WellTyped open import SystemF.Substitutions open import Data.Fin as Fin using () open import Data.Fin.Substitution open import Data.Fin.Substitution.Lemmas open import Data.Vec hiding ([_]) open import Extensio...
module Issue802b where data I : Set where i : I f : I → I f i = i mutual data P : I → Set where p : (x : I) → Q x x → P (f x) Q : I → I → Set Q i = P g : (x y : I) → Q x y → P y g i _ q = q data R : (x : I) → P x → Set where r : (x : I) (q : Q x x) → R _ (g x _ q) → R (f x) (p x q)
{-# 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 src.Data.Zipper where open import Agda.Builtin.Equality open import Data.Nat open import Data.Nat.Properties open import Induction.WellFounded open import Haskell.Prelude open import Relation.Binary.PropositionalEquality -- language extensions {-# FOREIGN AGDA2HS {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE Der...
module x09-747Decidable-hc where -- Library import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; cong; refl; sym) -- added sym open Eq.≡-Reasoning open import Data.Nat using (ℕ; zero; suc; _≤_; z≤n; s≤s) open import Data.Product usin...
module Numeral.Natural.Function where open import Numeral.Natural open import Numeral.Natural.Oper -- Maximum function -- Returns the greatest number max : ℕ → ℕ → ℕ max 𝟎 𝟎 = 𝟎 max (𝐒(a)) 𝟎 = 𝐒(a) max 𝟎 (𝐒(b)) = 𝐒(b) max (𝐒(a)) (𝐒(b)) = 𝐒(max a b) -- Minimum function -- Returns the s...
module BuildingBlock where open import Data.Nat -------------------------------------------------------------------------------- -- Binomial Tree -- NodeList C n : list of C indexed from 0 to n data NodeList (C : ℕ → Set) : ℕ → Set where Nil : C 0 → NodeList C 0 Cons : ∀ {n} → C (suc n) → NodeList C n → Nod...
-- Andreas, 2018-09-12, issue #3167 -- -- If --no-prop, then Set0 is the least sort and sort constraints -- s <= Set0 should be solved by s = Set0. {-# OPTIONS --no-prop #-} -- (A : Set) can be inferred if Set0 is the bottom universe data Wrap A : Set where wrap : A → Wrap A -- Should succeed with --no-prop
{-# OPTIONS --without-K #-} module Equivalences where open import Level open import Data.Empty open import Data.Sum renaming (map to _⊎→_) open import Data.Product renaming (map to _×→_) open import Function renaming (_∘_ to _○_) open import SimpleHoTT infix 4 _∼_ -- homotopy between two functions infix 4 _≃_...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.S1 where open import Cubical.HITs.S1.Base public open import Cubical.HITs.S1.Properties public
module Prelude.List.Relations.Any where open import Agda.Primitive open import Prelude.Nat open import Prelude.List.Base open import Prelude.Equality open import Prelude.List.Relations.All data Any {a b} {A : Set a} (P : A → Set b) : List A → Set (a ⊔ b) where zero : ∀ {x xs} (p : P x) → Any P (x ∷ xs) suc : ...
------------------------------------------------------------------------ -- Homotopy groups of pointed types ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} import Equality.Path as P module Pointed-type.Homotopy-group {e⁺} (eq : ∀ {a p} → P.Equality-...
{-# OPTIONS --safe --warning=error --without-K #-} open import Sets.EquivalenceRelations open import Setoids.Setoids open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Groups.Definition where record Group {lvl1 lvl2} {A : Set lvl1} (S : Setoid {lvl1} {lvl2} A) (_·_ : A → A → A) : Set (lsuc lvl1 ⊔ lvl2...
-- Andreas, 2017-01-19, issue #2412, raised by bixuanzju -- Agda should not insert hidden lambdas of possibly empty size types open import Agda.Builtin.Size data Nat i : Set where zero : Nat i suc : {j : Size< i} (n : Nat j) → Nat i recNat : (P : (i : Size) (n : Nat i) → Set) → (fz : ∀{i} → P i zero) → (fs...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Nullary.Decidable where open import Cubical.Core.Everything open import Cubical.Data.Empty using (⊥) private variable ℓ : Level -- Negation infix 3 ¬_ ¬_ : Type ℓ → Type ℓ ¬ A = A → ⊥ -- Decidable types (inspired by standard library) ...
module Generic.Lib.Data.Pow where open import Generic.Lib.Intro open import Generic.Lib.Data.Nat open import Generic.Lib.Data.Product infixl 6 _^_ _^_ : ∀ {α} -> Set α -> ℕ -> Set α A ^ 0 = ⊤ A ^ suc n = A × A ^ n elimPow : ∀ {n α} {A : Set α} {b : ∀ {n} -> A ^ n -> Level} -> (B : ∀ {n} -> (xs : A ^ n) ...
module Holes.Test.General where open import Holes.Prelude open PropEq using (_≡_; refl; cong; sym; trans) open import Holes.Term using (⌞_⌟) open import Holes.Cong.Propositional private +-zero : ∀ x → x + 0 ≡ x +-zero zero = refl +-zero (suc x) = cong suc (+-zero x) +-suc : ∀ x y → suc (x + y) ≡ x + suc y ...
open import Data.Sum using ( _⊎_ ) open import FRP.LTL.RSet.Core using ( RSet ) module FRP.LTL.RSet.Sum where infixr 2 _∨_ _∨_ : RSet → RSet → RSet (A ∨ B) t = A t ⊎ B t
module Generics.Mu.Conversion where
module ASN1.Untyped where open import Data.Word8 using (Word8; _and_; _or_; _==_) renaming (primWord8fromNat to to𝕎; primWord8toNat to from𝕎) open import Data.ByteString using (ByteString; Strict; empty; pack; fromChunks; toStrict) open import Data.ByteString.Utf8 using (packStrict) open import Data.Bool using (Bool...
{- This second-order signature was created from the following second-order syntax description: $sig_string -} module ${syn_name}.Signature where open import SOAS.Context $type_decl $derived_ty_ops open import SOAS.Syntax.Signature $type public open import SOAS.Syntax.Build $type public -- Operator symbols data ${...
module List.Permutation.Alternative.Correctness (A : Set) where open import Data.List open import List.Permutation.Alternative A renaming (_∼_ to _∼′_) open import List.Permutation.Base A open import List.Permutation.Base.Equivalence A lemma-∼′-∼ : {xs ys : List A} → xs ∼′ ys → xs ∼ ys lemma-∼′-∼ ∼refl = refl∼ lemma...
{-# OPTIONS --without-K --rewriting #-} open import HoTT module homotopy.PushoutSplit where -- g h -- D --> B --> C K = A ⊔^D B / (f,g) d₁ = A <- D -> B -- f| | | L = K ⊔^B C / (right,h) d₂ = K <- B -> C -- v v v d = A <- D -> C -- ...
-- Copyright: (c) 2016 Ertugrul Söylemez -- License: BSD3 -- Maintainer: Ertugrul Söylemez <esz@posteo.de> module Algebra.Group.Group where open import Algebra.Category open import Algebra.Group.Monoid open import Algebra.Group.Semigroup open import Core -- A group is a monoid where every element has an inverse...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.GradedRing.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Algebra.Monoid open import Cubical.Algebra.AbGroup open import Cubical.Alge...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Unbundled.Properties where -- The Obj-unbundled Category is equivalent (as a type) to the -- usual kind. Quite straightforward and because of η, the proofs are just refl. open import Data.Product using (Σ; _,_) open import Level open import Function using ...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.PartialFunctions where -- Category of (Agda) Sets, and partial functions (modelled using Maybe). -- Note that unlike for basic categories, this is named after the morphisms instead of the objects. open import Data.Maybe using (Maybe; nothing; just...
-- Andreas, 2013-02-27 module Issue385 where import Common.Level open import Common.Equality loop : ∀ {A}{x : A} → x ≡ x loop = loop bad : Set bad rewrite loop = ? -- this used to loop, but should no longer, instead: -- Cannot rewrite by equation of type {A : Set _3} {x : A} → x ≡ x -- when checking that the clause...
module Data.List.Functions.Positional where import Lvl open import Data.List open import Data.Option open import Type private variable ℓ : Lvl.Level private variable T : Type{ℓ} -- A singleton list. A list with only a single element. -- Example: -- singleton(a) = [a] singleton : T → List(T) singleton elem = e...
{-# OPTIONS --without-K #-} module hott.level.sets where open import level open import decidable open import sum open import equality.core open import equality.calculus open import equality.reasoning open import function.core open import function.extensionality.proof open import sets.empty open import sets.unit open i...
import Lvl open import Type module Data.List.Relation.Sublist.Proofs {ℓ} {T : Type{ℓ}} where open import Data.Boolean import Data.Either as Either open import Data.List as List open import Data.List.Functions as List hiding (skip) open import Data.List.Proofs open import Data.List.Relation.Sublist open impo...
------------------------------------------------------------------------ -- Pointed types and loop spaces ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Partly following the HoTT book. open import Equality module Pointed-type {reflexive} (eq : ∀ {a p...
------------------------------------------------------------------------ -- Parser indices ------------------------------------------------------------------------ module RecursiveDescent.Index where open import Data.Bool open import Data.Product.Record open import Relation.Nullary open import Relation.Binary open im...
{-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude open import GSeTT.Syntax open import GSeTT.Rules {- Decidability of type cheking for the type theory for globular sets -} module GSeTT.Dec-Type-Checking where dec-⊢C : ∀ Γ → dec (Γ ⊢C) dec-⊢T : ∀ Γ A → dec (Γ ⊢T A) dec-⊢t : ...
{-# OPTIONS --without-K --safe #-} -- here we define the structure version of a cartesian category module Categories.Category.Cartesian.Structure where open import Level open import Categories.Category open import Categories.Category.Cartesian open import Categories.Category.Monoidal record CartesianCategory o ℓ e ...
module ClashingModuleImport where X = TODO--I-haven't-fully-understood-this-one
------------------------------------------------------------------------ -- Full β-reduction in Fω with interval kinds ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module FOmegaInt.Reduction.Full where open import Data.Fin using (suc; zero) open import D...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Prod.Base where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function -- If × is defined using Σ then transp/hcomp will be compute -- "negatively", that is, they won't reduce unless we project out the ...
{-# OPTIONS --safe --no-qualified-instances #-} -- Bytecode; i.e., instruction sequences; -- agnostic about the exact instructions, but opiniated about labels open import Data.List hiding (concat) module JVM.Syntax.Bytecode {ℓ} (T : Set ℓ) (I : T → T → List T → Set ℓ) where open import Level open import Function usi...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Colimit where open import Cubical.HITs.Colimit.Base public open import Cubical.HITs.Colimit.Examples public
{-# OPTIONS --without-K --safe #-} module Cats.Category.Presheaves.Facts.Exponential where open import Data.Product using (_,_) open import Relation.Binary using (Setoid) open import Cats.Category open import Cats.Category.Fun using (Fun ; ≈-intro ; ≈-elim) open import Cats.Category.Presheaves using (Presheaves) open...
{-# OPTIONS --copatterns --sized-types #-} module SDE where open import Size open import Function open import Data.Product as Prod renaming (Σ to ⨿) open import Data.Sum as Sum open import Streams -- | Signatures record Sig : Set₁ where field ∥_∥ : Set ar : ∥_∥ → Set open Sig public -- | Extension of sig...
-- Andreas, 2021-12-31, issue #5712, reported by Trebor-Huang -- {-# OPTIONS -v tc.cover.cover:10 #-} open import Agda.Builtin.Reflection open import Agda.Builtin.Unit nothing : Term → TC ⊤ nothing hole = returnTC _ record Foo : Set1 where field A : Set @(tactic nothing) foo : A → A open Foo F : Foo F .A...
{-# OPTIONS --without-K --safe #-} module Fragment.Examples.CSemigroup.Arith.Base where open import Fragment.Examples.Semigroup.Arith.Base public open import Data.Nat.Properties using (*-isCommutativeSemigroup; +-isCommutativeSemigroup) +-csemigroup = csemigroup→model +-isCommutativeSemigroup *-csemigroup = csemig...
module Functor where import Logic.Identity as Id import Category import Logic.ChainReasoning open Category open Poly-Cat private module Fun where data Functor (ℂ ⅅ : Cat) : Set1 where functor : (F : Obj ℂ -> Obj ⅅ) (map : {A B : Obj ℂ} -> A ─→ B -> F A ─→ F B) (mapId : {A : Obj ℂ} -> map...
module Examples where open import Data.Maybe using (just ; nothing) open import Data.Nat using (ℕ ; zero ; suc ; _+_ ; ⌈_/2⌉) open import Data.Nat.Properties using (cancel-+-left) import Algebra.Structures open import Data.List using (List ; length) renaming ([] to []L ; _∷_ to _∷L_) open import Data.Vec using (Vec ; ...
module STLC.Coquand.Convertibility where open import STLC.Coquand.Substitution public -------------------------------------------------------------------------------- -- Convertibility infix 3 _∼_ data _∼_ : ∀ {Γ A} → Γ ⊢ A → Γ ⊢ A → Set where refl∼ : ∀ {Γ A} → {M : Γ ⊢ A} → M ∼ M _...
{-# OPTIONS --cubical --safe #-} module Data.Bag where open import Prelude open import Algebra open import Path.Reasoning infixr 5 _∷_ data ⟅_⟆ (A : Type a) : Type a where [] : ⟅ A ⟆ _∷_ : A → ⟅ A ⟆ → ⟅ A ⟆ com : ∀ x y xs → x ∷ y ∷ xs ≡ y ∷ x ∷ xs trunc : isSet ⟅ A ⟆ record Elim {a ℓ} ...
record R (A : Set) : Set₁ where field P : A → Set p : (x : A) → P x module M (r : (A : Set) → R A) where open module R′ {A : Set} = R (r A) public postulate r : (A : Set) → R A A : Set open M r internal-error : (x : A) → P x internal-error x = p
-- Andreas, 2017-08-23, issue #2714 -- Make sure we produce a warning about missing main function -- even though we import a module with --no-main. open import Issue2712
module _ where open import Common.Prelude case_of_ : {A B : Set} → A → (A → B) → B case x of f = f x {-# INLINE case_of_ #-} patlam : Nat → Nat patlam zero = zero patlam (suc n) = case n of λ { zero → zero ; (suc m) → m + patlam n } static : {A : Set} → A → A static x = x {-# STATIC static #-} -- The s...
import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; cong; cong₂; cong-app) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; step-≡; _∎) open import Function using (_∘_) open import Data.Nat using (ℕ; zero; suc) open import Data.Fin hiding (_+_; #_) open import DeBruijn postulate extensionali...
module Category.Functor.Either where open import Agda.Primitive using (_⊔_) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Category.Functor using (RawFunctor ; module RawFunctor ) open import Category.Applicative using (RawApplicative; module RawApplicative) open import Function using (_∘_) Either ...
{-# OPTIONS --cubical --safe #-} module Cubical.HITs.FiniteMultiset.Base where open import Cubical.Foundations.Prelude open import Cubical.HITs.SetTruncation open import Cubical.Foundations.HLevels private variable A : Type₀ infixr 5 _∷_ data FMSet (A : Type₀) : Type₀ where [] : FMSet A _∷_ : (x : A)...
-- Σ type (also used as existential) and -- cartesian product (also used as conjunction). {-# OPTIONS --without-K --safe #-} module Tools.Product where open import Agda.Primitive open import Agda.Builtin.Sigma public using (Σ; _,_) open import Agda.Builtin.Sigma using (fst; snd) infixr 2 _×_ -- Dependent pair type...
-- When defining types by recursion it is sometimes difficult to infer implicit -- arguments. This module illustrates the problem and shows how to get around -- it for the example of vectors of a given length. module DataByRecursion where data Nat : Set where zero : Nat suc : Nat -> Nat data Nil : Set where ...
module FSC where -- focused sequent calculus {- open import Relation.Binary.PropositionalEquality open import Data.Nat hiding (_>_) -} open import StdLibStuff open import Syntax data FSC-Ctx (n : ℕ) : Ctx n → Set where ε : FSC-Ctx n ε _∷_ : {Γ : Ctx n} → (t : Type n) → FSC-Ctx n Γ → FSC-Ctx n (t ∷ Γ) _∷h_ : {Γ...
-- Andreas, 2016-09-20, issue #2197 reported by m0davis {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.pos:20 -v tc.meta.eta:20 #-} record R : Set where inductive field foo : R bar : R bar = {!!} -- This used to loop due to infinite eta-expansion. -- Should check now.
module Common.Issue481ParametrizedModule (A : Set1) where id : A → A id x = x postulate Bla : Set
test = forall _⦇_ → Set
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics module lib.types.Sigma where -- pointed [Σ] ⊙Σ : ∀ {i j} (X : Ptd i) → (de⊙ X → Ptd j) → Ptd (lmax i j) ⊙Σ ⊙[ A , a₀ ] Y = ⊙[ Σ A (de⊙ ∘ Y) , (a₀ , pt (Y a₀)) ] -- Cartesian product _×_ : ∀ {i j} (A : Type i) (B : Type j) → Type (lmax i j) A × B = Σ A (...
{-# OPTIONS --prop --without-K --rewriting #-} -- The basic CBPV metalanguage, extended with parallelism. open import Calf.CostMonoid module Calf.ParMetalanguage (parCostMonoid : ParCostMonoid) where open ParCostMonoid parCostMonoid open import Calf.Prelude open import Calf.Metalanguage open import Calf.Step costM...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Lists.Lists open import Numbers.BinaryNaturals.Definition open import Maybe open import Numbers.BinaryNaturals.SubtractionGo module Numbers.BinaryNaturals.SubtractionGoPreservesCanonicalRight where goPreservesCanonicalRightZer...
open import Nat open import Prelude open import core open import contexts module htype-decidable where lemma-l : ∀{t1 t2 t4} → t1 ==> t2 == t1 ==> t4 → t2 == t4 lemma-l refl = refl lemma-r : ∀{t1 t2 t3} → t1 ==> t2 == t3 ==> t2 → t1 == t3 lemma-r refl = refl lemma-b : ∀{t1 t2 t3 t4} → t1 ==> t2 == t3 ==> t...
open import Agda.Builtin.Nat -- Matching against negative numbers lit : Nat → Nat lit -20 = 0 -- Error thrown here lit _ = 1
------------------------------------------------------------------------ -- The two coinductive definitions of weak bisimilarity are pointwise -- logically equivalent ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Labelled-transition-system module B...
------------------------------------------------------------------------ -- Monads ------------------------------------------------------------------------ -- Note that currently the monad laws are not included here. module Category.Monad where open import Data.Function open import Category.Monad.Indexed open import...
{-# OPTIONS --copatterns #-} -- {-# OPTIONS -v interaction.give:20 -v tc.cc:60 -v reify.clause:60 -v tc.section.check:10 -v tc:90 #-} -- {-# OPTIONS -v tc.lhs:20 #-} module Issue937 where open import Common.Equality data Nat : Set where zero : Nat suc : Nat → Nat record Σ (A : Set) (B : A → Set) : Set where ...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Polynomials.Multivariate.Equiv-Polyn-nPoly where open import Cubical.Foundations.Everything open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_) open import Cubical.Data.Vec open import Cubical.Data.Sigma open import Cubical.A...
import cedille-options open import general-util module toplevel-state (options : cedille-options.options) {mF : Set → Set} {{_ : monad mF}} where open import lib open import cedille-types open import classify options {mF} open import ctxt open import constants open import conversion open import rename open import sp...
module nodcap.NF.Typing where open import Data.Nat as ℕ using (ℕ; suc; zero) open import Data.Pos as ℕ⁺ using (ℕ⁺; suc; _+_) open import Data.Environment open import Data.List as L using (List; []; _∷_; _++_) open import Data.List.Any as LA using (Any; here; there) open import Data.Sum using (_⊎_; inj₁; inj₂) open imp...
-- {-# OPTIONS -v tc.check.app:70 #-} -- {-# OPTIONS -v tc.proj.amb:30 #-} record S : Set₁ where field X : Set record T : Set₁ where field X : Set open S open T ok : S → Set ok s = X s test : S → Set test s = s .X -- Error WAS: -- Cannot resolve overloaded projection X because it is not applied to -- a visibl...
open import Data.Nat open import Data.Vec using ( Vec ; [] ; _∷_ ) module OpenTheory2 where ---------------------------------------------------------------------- data _∈_ {A : Set} : A → {n : ℕ} → Vec A n → Set where here : {n : ℕ} {x : A} {xs : Vec A n} → x ∈ (x ∷ xs) there : {n : ℕ} {x y : A} {xs : Vec A n} (...
------------------------------------------------------------------------------ -- Properties of the inequalities ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-...
-- Like Leftovers.Examples, but more meant to stress-test the library -- than to be clear/readable module Leftovers.Tests where open import Leftovers.Leftovers open import Leftovers.ByRefl open import Level open import Reflection open import Data.Nat open import Relation.Binary.PropositionalEquality open import Data...