text
stringlengths
4
690k
module Data.Maybe.Properties.Extra {a}{A : Set a} where open import Data.Maybe open import Relation.Binary.PropositionalEquality open import Relation.Nullary nothing≢just : ∀ {a : A} → ¬ (_≡_ {A = Maybe A} nothing (just a)) nothing≢just ()
{-# OPTIONS --no-positivity-check #-} {-# OPTIONS --no-termination-check #-} module UniDB.Examples.Free where open import UniDB open import Function open import Relation.Binary.PropositionalEquality import Level -- Interpret a value of the morphism representation Ξ as -- a morphism between S and T. Int : (Ξ : MOR) (...
{-# OPTIONS --safe #-} -- --without-K #-} open import Function using (_∘_) open import Data.Empty using (⊥-elim) open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; trans; sym; cong; cong₂) open Relation.Binary.PropositionalEquality.≡-Reasoning open import Data.Product using (Σ-syntax; _,_) open i...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.PA.Inductive.CanonicalTerm where -- We cannot extract a canonical term from a non-intuitionistic proof. open import PA.Inductive.Base ...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module CombiningProofs.ForallExistSchema where open import Common.FOL.FOL-Eq A : D → Set A x = x ≡ x ∨ x ≡ x {-# ATP definition A #-} postulate ...
module prime where open import Data.Nat open import Data.Nat.Properties open import Data.Empty open import Data.Unit using (⊤ ; tt) open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Relation.Binary.Definitions open import gcd open import nat record Prime (i : ℕ ) : Set where...
-- Andreas, 2018-12-30, issue #3480 -- Parse error should be reported close to the incomplete "module _" -- rather than at the end of the file, which is miles away. module _ {- A long comment: Per Martin-L"of ON THE MEANINGS OF THE LOGICAL CONSTANTS AND THE JUSTIFICATIONS OF THE LOGICAL LAWS Preface The following...
{-# OPTIONS --cubical #-} --open import Data.Nat using (ℕ; zero; suc; _+_) open import Cubical.Data.Nat using (ℕ; zero; suc; _+_) open import Cubical.Foundations.Prelude using (refl; _≡_; subst; cong; transport; transp; ℓ-zero; ℓ-suc) -- hiding (_≡⟨_⟩_) open import Cubical.Foundations.Function using (_∘_) data Captur...
-- Terms using Agdas Sized Types -- module TermsSized where open import Data.Vec hiding (_++_) open import Relation.Binary.PropositionalEquality open import Data.Nat open import Data.List open import Data.List.Relation.Unary.All open import Data.Fin.Base open import Size -- Ranked alphabet: Vector of natural numbers...
{-# OPTIONS --no-coverage-check #-} module FlexibleFunArity where data Bool : Set where true false : Bool g : Bool -> Bool -> Bool g true = \ x -> true g false true = false g false false = true T : Bool -> Set T true = Bool T false = Bool -> Bool f : (b : Bool) -> T b f true = true f false true = false f false f...
module Data.Empty.Instance where open import Class.Equality open import Class.Show open import Data.Empty instance Empty-Eq : Eq ⊥ Empty-Eq = record { _≟_ = λ x () } Empty-Show : Show ⊥ Empty-Show = record { show = λ () }
import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; trans; cong) open Eq.≡-Reasoning open import Function using (_∘_) open import Data.Product using (_×_) using (_,_; proj₁; proj₂) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Unit using (⊤; tt) open import Data.Empty using...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Operations.Subtraction where open import Data.Binary.Definitions open import Data.Product as Product using (map₁; map₂; proj₁; proj₂; _,_; _×_) open import Data.Bool import Data.Maybe as Maybe import Data.Binary.Operations.Addition as + open import Data.Binary.Ope...
{-# OPTIONS --rewriting #-} open import Agda.Builtin.Equality postulate f : Set₁ → Set₁ module _ (A : Set) where postulate rew : f Set ≡ Set {-# BUILTIN REWRITE _≡_ #-} {-# REWRITE rew #-}
module CwF where open import Setoid open EqChain infixr 30 _⇒_ infixl 50 _/_ _/ˢ_ infixr 45 _◄_ infixl 45 _▷_ Cxt : Set Cxt = Setoid _⇒_ : Cxt -> Cxt -> Set Γ ⇒ Δ = El (Γ ==> Δ) Type : Cxt -> Set Type Γ = Fam Γ _/_ : {Γ Δ : Cxt} -> Type Γ -> (Δ ⇒ Γ) -> Type Δ A / σ = A ○ σ lem-/id : {Γ : Cxt}{A : Type Γ} -> A /...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.FunctionOver open import cohomology.Theory open import cohomology.CofiberSequence module cohomology.LongExactSequence {i} (CT : CohomologyTheory i) {X Y : Ptd i} (n : ℤ) (f : fst (X ⊙→ Y)) where open CohomologyTheo...
open import Prelude open import Nat open import dynamics-core open import contexts open import disjointness -- this module contains lemmas and properties about the holes-disjoint -- judgement that double check that it acts as we would expect module holes-disjoint-checks where -- these lemmas are all structurally re...
{-# OPTIONS --without-K #-} open import Base module Algebra.F2NotCommutative where import Algebra.FreeGroup open Algebra.FreeGroup (bool {zero}) renaming (freegroup to F2) X : Set X = bool × bool X-is-set : is-set X X-is-set = ×-is-truncated _ bool-is-set bool-is-set pattern a = (true , true ) pattern b = (true ...
module Structure.Sets.Relator where open import Functional import Lvl open import Logic open import Logic.Propositional open import Logic.Predicate import Structure.Sets.Names as Names open import Type private variable ℓ ℓₗ ℓᵣ ℓᵣₑₗ : Lvl.Level private variable S Sₗ Sᵣ E Eₗ Eᵣ : Type{ℓ} private variable _∈ₗ_...
------------------------------------------------------------------------ -- The Agda standard library -- -- W-types ------------------------------------------------------------------------ module Data.W where open import Level open import Relation.Nullary -- The family of W-types. data W {a b} (A : Set a) (B : A → ...
{-# OPTIONS --without-K #-} module function.isomorphism.properties where open import level open import sum open import sets.nat.core open import equality.core open import equality.calculus open import equality.reasoning open import function.fibration open import function.overloading open import function.extensionality...
module Text.Greek.SBLGNT.Phlm where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΠΡΟΣ-ΦΙΛΗΜΟΝΑ : List (Word) ΠΡΟΣ-ΦΙΛΗΜΟΝΑ = word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Phlm.1.1" ∷ word (δ ∷ έ ∷ σ ∷ μ ∷ ι ∷ ο ∷ ς ∷ []) "Phlm.1.1" ∷ word (Χ ∷ ρ ...
-- {-# OPTIONS -v tc.cover:20 #-} -- Andreas, 2017-01-18, issue #2407 -- If underscores are not preserved (issue #819), -- the case split fails due to size constraints. open import Common.Size data D (i : Size) : (j : Size< ↑ i) → Set where c : ∀ (j : Size< ↑ i) (k : Size< ↑ j) → D i j → D j k ...
open import Level.NP open import Type open import Relation.Binary.Logical open import Relation.Binary.PropositionalEquality module Explore.Universe.Logical (X : ★) where open import Explore.Universe.Type open import Explore.Universe X open import Explore.Core module From⟦X⟧ (⟦X⟧ : ⟦★₀⟧ X X) where -- TODO _⟦≃⟧_ : ...
module Ord where data Nat : Set where Z : Nat S : Nat -> Nat data Ord : Set where z : Ord lim : (Nat -> Ord) -> Ord zp : Ord -> Ord zp z = z zp (lim f) = lim (\x -> zp (f x))
-- 2018-11-02, Jesper: -- Problem reported by Martin Escardo -- Example by Guillaume Brunerie -- C-c C-s was generating postfix projections -- even with --postfix-projections disabled. open import Agda.Builtin.Equality record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B open _×_ post...
module Lib.IO where open import Lib.List open import Lib.Prelude {-# IMPORT System.Environment #-} FilePath = String postulate IO : Set -> Set getLine : IO String putStrLn : String -> IO Unit putStr : String -> IO Unit bindIO : {A B : Set} -> IO A -> (A -> IO B) -> IO B returnIO : {A :...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Nat where -- Skeleton of FinSetoid as a Category open import Level open import Data.Fin.Base using (Fin; inject+; raise; splitAt; join) open import Data.Fin.Properties open import Data.Nat.Base using (ℕ; _+_) open import Data.Sum using (inj₁; inj...
-- Path induction {-# OPTIONS --without-K --safe #-} module Experiment.PropositionalEq where open import Level renaming (zero to lzero; suc to lsuc) open import Relation.Binary.PropositionalEquality import Relation.Binary.Reasoning.Setoid as SetoidReasoning open import Relation.Binary private variable a c : L...
------------------------------------------------------------------------ -- The Agda standard library -- -- Characters ------------------------------------------------------------------------ module Data.Char where open import Data.Nat using (ℕ) import Data.Nat.Properties as NatProp open import Data.Bool using (Bool;...
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for "equational reasoning" in multiple Setoids ------------------------------------------------------------------------ -- Example use: -- -- open import Data.Maybe -- import Relation.Binar...
{-# OPTIONS --without-K #-} open import Base open import Homotopy.Pushout open import Homotopy.VanKampen.Guide module Homotopy.VanKampen.Code {i} (d : pushout-diag i) (l : legend i (pushout-diag.C d)) where open pushout-diag d open legend l open import Homotopy.Truncation open import Homotopy.PathTruncati...
open import Prelude open import core module lemmas-consistency where -- type consistency is symmetric ~sym : {t1 t2 : typ} → t1 ~ t2 → t2 ~ t1 ~sym TCRefl = TCRefl ~sym TCHole1 = TCHole2 ~sym TCHole2 = TCHole1 ~sym (TCArr p1 p2) = TCArr (~sym p1) (~sym p2) ~sym (TCProd h h₁) = TCProd (~sym h) (~sym h₁) ...
{-# OPTIONS --cubical --safe #-} module Relation.Nullary.Discrete where open import Relation.Nullary.Decidable open import Path open import Level Discrete : Type a → Type a Discrete A = (x y : A) → Dec (x ≡ y)
-- Andreas, 2017-10-04, issue #689, test case by stevana -- {-# OPTIONS -v tc.data:50 #-} -- {-# OPTIONS -v tc.force:100 #-} -- {-# OPTIONS -v tc.constr:50 #-} -- {-# OPTIONS -v tc.conv.sort:30 #-} -- {-# OPTIONS -v tc.conv.nat:30 #-} open import Agda.Primitive data L {a} (A : Set a) : Set a where _∷_ : A → L A → ...
module Data.Num.Injection where open import Data.Num.Core open import Data.Nat hiding (compare) open import Data.Nat.Properties open import Data.Nat.Properties.Simple open import Data.Nat.Properties.Extra open import Data.Fin as Fin using (Fin; fromℕ≤; inject≤) renaming (zero to z; suc to s) open import Data...
module Lambda where open import Prelude open import Star open import Examples open import Modal -- Environments record TyAlg (ty : Set) : Set where field nat : ty _⟶_ : ty -> ty -> ty data Ty : Set where <nat> : Ty _<⟶>_ : Ty -> Ty -> Ty freeTyAlg : TyAlg Ty freeTyAlg = record { nat = <nat>; _⟶_ = _<...
{-# OPTIONS --allow-unsolved-metas #-} module regex1 where open import Level renaming ( suc to succ ; zero to Zero ) open import Data.Fin open import Data.Nat hiding ( _≟_ ) open import Data.List hiding ( any ; [_] ) -- import Data.Bool using ( Bool ; true ; false ; _∧_ ) -- open import Data.Bool using ( Bool ; true ...
------------------------------------------------------------------------ -- Labelled transition systems ------------------------------------------------------------------------ {-# OPTIONS --safe #-} module Labelled-transition-system where open import Equality.Propositional import Logical-equivalence open import Pre...
{- following Johnstone's book "Stone Spaces" we define semilattices to be commutative monoids such that every element is idempotent. In particular, we take every semilattice to have a neutral element that is either the maximal or minimal element depending on whether we have a join or meet semilattice. -} {-# OPTI...
-- Reported by Nils Anders Danielsson in Issue #3960. open import Agda.Builtin.Unit open import Agda.Primitive id : ∀ {a} (A : Set a) → A → A id _ a = a apply : ∀ {a b} {A : Set a} {B : Set b} → A → (A → B) → B apply = λ x f → f x postulate P : ∀ {a} {A : Set a} → A → A → Set a Q : ∀ {ℓ} → Set ℓ → Set ℓ Q A = {x...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Raw.Properties where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function using (_∘_; _$_; flip; id) open import Cubical.Relation.Binary.Base open import Cubical.Relation....
module examplesPaperJFP.VariableList where open import Data.Product hiding (map) open import Data.List open import NativeIO open import StateSizedIO.GUI.WxBindingsFFI open import Relation.Binary.PropositionalEquality data VarList : Set₁ where [] : VarList addVar : (A : Set) → Var A → VarList → VarList ...
{-# OPTIONS --cubical #-} module _ where open import Agda.Builtin.Cubical.Path open import Agda.Builtin.Bool data S¹ : Set where base : S¹ loop : base ≡ base -- We cannot allow this definition as -- decideEq (loop i) base ↦ false -- but -- decideEq (loop i0) base ↦ true decideEq : ∀ (x y : S¹) → Bool decide...
-- Andreas, 2012-06-01, issue reported by fredrik.forsberg module Issue661 where import Common.Level data Top : Set where tt : Top mutual data Ctxt : Set1 where [] : Ctxt cons : (G : Ctxt) -> (Env G -> Set) -> Ctxt Env : Ctxt -> Set --only important that Env x doesn't reduce for x neutral Env [] = ...
module FunSetPerBool where data Bool : Set where True : Bool False : Bool data T : Set where E : T s : Bool -> Set s True = Bool s False = T f = \ (x : s True) -> x g = f True f2 = \ (x : Bool) (y : s x) -> y h = f2 False E -- i : (xx : _) -> _ i = f2 True j : (eh : s False) -> s False j = f2 False
module Luau.Syntax.FromJSON where open import Luau.Syntax using (Block; Stat ; Expr; nil; _$_; var; function⟨_⟩_end; local_←_; function_⟨_⟩_end; return; done; _∙_) open import Agda.Builtin.List using (List; _∷_; []) open import FFI.Data.Aeson using (Value; Array; Object; object; array; string; fromString; lookup) op...
module BeforeSpaces where import BehindSpaces
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Yoneda.Continuous {o ℓ e} (C : Category o ℓ e) where open import Function.Equality using (Π) open import Relation.Binary using (Setoid) open import Categories.Category.Construction.Cones open import Categories.Category.Construction...
------------------------------------------------------------------------ -- Equivalences with erased "proofs" ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Equivalence.Erased {reflexive} (eq : ∀ {a p} → Equality-with-J a p re...
module Issue552 where data Id3 {A : Set} : A -> A -> A -> Set where refl3 : {x : A} -> Id3 x x x -- These work: ok1 : {A : Set}(a b c : A) -> Id3 a b c -> Id3 a b c ok1 ._ ._ ._ (refl3 {_}) = refl3 ok2 : {A : Set}(a b c : A) -> Id3 a b c -> Id3 a b c ok2 _ ._ ._ (refl3) = refl3 ok3 : {A : Set}(a b c : A) -> Id3...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Poset where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Logic open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv renaming (_■ to _QED) open import Cubical.Foundations.SIP ...
------------------------------------------------------------------------ -- A derivative operator for parsers ------------------------------------------------------------------------ -- Similar to the derivative operator in Brzozowski's "Derivatives of -- Regular Expressions". module TotalParserCombinators.Derivative...
-- 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 Vehicle.Data.Tensor open import Data.Integer as ℤ using (ℤ) ope...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Monoidal.Structure using (SymmetricMonoidalCategory) module Categories.Functor.Monoidal.Symmetric {o o′ ℓ ℓ′ e e′} (C : SymmetricMonoidalCategory o ℓ e) (D : SymmetricMonoidalCategory o′ ℓ′ e′) where open import Level open import Data.Product u...
module Properties.Remember where open import Agda.Builtin.Equality using (_≡_; refl) data Remember {A : Set} (a : A) : Set where _,_ : ∀ b → (a ≡ b) → Remember(a) remember : ∀ {A} (a : A) → Remember(a) remember a = (a , refl)
{-# OPTIONS --safe #-} module Definition.Typed where open import Definition.Untyped open import Tools.Nat using (Nat) open import Tools.Product import Tools.PropositionalEquality as PE infixl 30 _∙_ infix 30 Πⱼ_▹_▹_▹_ -- Well-typed variables data _∷_^_∈_ : (x : Nat) (A : Term) (r : TypeInfo) (Γ : Con Term) → Set w...
{-# OPTIONS --sized-types #-} open import Relation.Binary.Core module BBHeap.Height.Convert {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Bound.Lower A open import Bound.Lower.Order _≤_ open import BBHeap _≤_ open import BBHeap.Properties _≤_ open import BB...
{-# OPTIONS --type-in-type #-} module FusionNotes where {- Idea: doing computation at compile time instead of at runtime VTy : MTy -- value types (inductive data) CTy : MTy -- computation types (functions) MTy : MTy -- meta types (meta TT types) VTy ≤ CTy (implicit cumulativity) ^_ : VTy → MT...
module Sets.IterativeSet where import Lvl open import Logic open import Type module _ where private variable {ℓ ℓ₁ ℓ₂} : Lvl.Level -- A model of constructive set theory (CZF) by using W-types (iterative sets). -- The interpretation of Iset being a type of sets comes from the idea that the image of `elem` ...
{-# OPTIONS --universe-polymorphism #-} open import Categories.Category module Categories.Object.IndexedProduct {o ℓ e} (C : Category o ℓ e) where -- An indexed product is similar to a limit, but the diagram is from a Set -- (irrelevant Setoid here) rather than a category, so there are no subobjects -- involved. ...
{-# OPTIONS --allow-unsolved-metas #-} module LiteralSequent where open import Sequent open import IsLiteralSequent record LiteralSequent : Set where constructor ⟨_⟩ field {sequent} : Sequent isLiteralSequent : IsLiteralSequent sequent open LiteralSequent public open import OscarPrelude private modu...
{-# OPTIONS --without-K #-} module hott.truncation where open import hott.truncation.core public open import hott.truncation.const public open import hott.truncation.equality public open import hott.truncation.elim public
module Type.Size.Proofs where import Lvl open import Data open import Data.Proofs open import Functional open import Function.Equals open import Function.Inverseᵣ open import Function.Inverse open import Function.Proofs open import Logic open import Logic.IntroInstances open import Logic.Propositional open import...
{-# OPTIONS --without-K #-} module common where open import Agda.Primitive public using (Level; _⊔_; lzero; lsuc) infixl 1 _,_ infixl 1 _≡_ infixr 2 _∧_ infixr 2 _×_ infixl 2 _+_ data bool : Set where true : bool false : bool _∧_ : bool → bool → bool true ∧ true = true true ∧ false = false false ∧ true = f...
{-# OPTIONS --without-K #-} module TypeEquivEquiv where open import Equiv using (refl∼; sym∼; trans∼; sym≃; _⊎≃_; id≃; _≃_; _●_; _×≃_; qinv; gg; β⊎₁; β⊎₂; β₁; β₂; cong∘l; cong∘r; cong₂∘; β×₁; β×₂) open import TypeEquiv using (unite₊equiv; uniti₊equiv; unite₊′equiv; uniti₊′equiv; assocr₊equiv; assocl₊e...
------------------------------------------------------------------------ -- ω-continuous functions ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} module Partiality-algebra.Omega-continuous where open import Equality.Propositional.Cubical open import P...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.Table.Relation.Binary.Equality directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Tab...
module paper where open import Data.Bool using (Bool; not; _∨_; _∧_) open import Data.Nat using (ℕ) open import Data.Fin using (Fin; suc; zero) open import Data.List using (List; _++_) renaming (_∷_ to _,_; [] to ∅) open import Data.Product using (_×_; _,_) open import Relation.Binary.PropositionalEquality using (_≡_;...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Escape {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Weakening open import Definition.Typed.Propert...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Implementation.Data.Integer where -- TODO
module Categories.Products where open import Library renaming (_×_ to Pair) hiding ([_]) open import Categories _×_ : ∀{l l' m m'}(C : Cat {l}{m})(D : Cat {l'}{m'}) -> Cat C × D = record { Obj = Pair (Obj C) (Obj D) ; Hom = λ {(X , X') (Y , Y') -> Pair (Hom C X Y) (Hom D X' Y')} ; iden...
module Issue59 where data Nat : Set where zero : Nat suc : Nat → Nat -- This no longer termination checks with the -- new rules for with. bad : Nat → Nat bad n with n ... | zero = zero ... | suc m = bad m -- This shouldn't termination check. bad₂ : Nat → Nat bad₂ n with bad₂ n ... | m = m
module Cats.Util.SetoidMorphism.Iso where open import Data.Product using (_,_ ; proj₁ ; proj₂) open import Level using (_⊔_) open import Relation.Binary using (Setoid ; IsEquivalence) open import Cats.Util.SetoidMorphism as Mor using ( _⇒_ ; arr ; resp ; _≈_ ; ≈-intro ; ≈-elim ; ≈-elim′ ; _∘_ ; ∘-resp ; id ; IsInje...
{- T R U N C A T I O N L E V E L S I N H O M O T O P Y T Y P E T H E O R Y ======= ELECTRONIC APPENDIX ======= NICOLAI KRAUS February 2015 -} {-# OPTIONS --without-K #-} module INDEX where -- Chapter 2 open import Preliminaries -- Parts of Chapter 2 are in a separa...
{-# OPTIONS --verbose tc.constr.findInScope:20 #-} module InstanceArgumentsConstraints where data Bool : Set where true false : Bool postulate A1 A2 B C : Set a1 : A1 a2 : A2 someF : A1 → C record Class (R : Bool → Set) : Set where field f : (t : Bool) → R t open Class {{...}} cl...
{-# OPTIONS --cubical --safe #-} module Data.Bool where open import Level open import Agda.Builtin.Bool using (Bool; true; false) public open import Data.Unit open import Data.Empty bool : ∀ {ℓ} {P : Bool → Type ℓ} (f : P false) (t : P true) → (x : Bool) → P x bool f t false = f bool f t true = t not : Bool → Bool ...
------------------------------------------------------------------------ -- Example: Left recursive expression grammar ------------------------------------------------------------------------ module TotalParserCombinators.Examples.Expression where open import Codata.Musical.Notation open import Data.Char as Char usin...
module Tactic.Nat.Reflect where open import Prelude hiding (abs) open import Control.Monad.State open import Control.Monad.Transformer import Agda.Builtin.Nat as Builtin open import Builtin.Reflection open import Tactic.Reflection open import Tactic.Reflection.Quote open import Tactic.Reflection.Meta open import Ta...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Group.Algebra where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical.Foundations.Function using (_∘_) open import Cubical.Foundations.GroupoidLaws op...
module Relations where -- Imports import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong) open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.Nat.Properties using (+-comm) -- Defining relations data _≤_ : ℕ → ℕ → Set where z≤n : ∀ {n : ℕ} -------- → zero ≤ n s≤...
module Data.Nat.Instance where open import Agda.Builtin.Nat open import Class.Equality open import Class.Monoid open import Class.Show open import Data.Char open import Data.List open import Data.Nat renaming (_≟_ to _≟ℕ_; _+_ to _+ℕ_) open import Data.String open import Function private postulate primShowNat ...
open import Data.Product using ( _×_ ; _,_ ; swap ) open import Data.Sum using ( inj₁ ; inj₂ ) open import Relation.Nullary using ( ¬_ ; yes ; no ) open import Relation.Unary using ( _∈_ ) open import Web.Semantic.DL.ABox using ( ABox ; ε ; _,_ ; _∼_ ; _∈₁_ ; _∈₂_ ) open import Web.Semantic.DL.ABox.Interp using ( Int...
{-# OPTIONS --without-K --safe #-} module Fragment.Examples.CSemigroup.Types where
-- This document shows how to encode GADTs using `IFix`. {-# OPTIONS --type-in-type #-} module ScottVec where -- The kind of church-encoded type-level natural numbers. Nat = (Set -> Set) -> Set -> Set zero : Nat zero = λ f z -> z suc : Nat -> Nat suc = λ n f z -> f (n f z) plus : Nat -> Nat -> Nat plus = λ n m f ...
module EqTest where import Common.Level open import Common.Maybe open import Common.Equality data ℕ : Set where zero : ℕ suc : ℕ -> ℕ _≟_ : (x y : ℕ) -> Maybe (x ≡ y) suc m ≟ suc n with m ≟ n suc .n ≟ suc n | just refl = just refl suc m ≟ suc n | nothing = nothing zero ≟ suc _ = nothing suc m ≟ ze...
-- Andreas, 2012-09-26 disable projection-likeness for recursive functions -- {-# OPTIONS -v tc.proj.like:100 #-} module ProjectionLikeRecursive where open import Common.Prelude open import Common.Equality if_then_else_ : {A : Set} → Bool → A → A → A if true then t else e = t if false then t else e = e infixr 5 _∷_ ...
module HasNegation where record HasNegation (A : Set) : Set where field ~ : A → A open HasNegation ⦃ … ⦄ public {-# DISPLAY HasNegation.~ _ = ~ #-}
{- Stream transducers have been described in: N. Ghani, P. Hancock, and D. Pattinson, Continuous functions on final coalgebras. In Proc. CMCS 2006, Electr. Notes in Theoret. Comp. Sci., 2006. They have been modelled by mixed equi-(co)inductive sized types in A. Abel, Mixed Inductive/Coinductive Types and S...
module Properties where import Properties.Contradiction import Properties.Dec import Properties.Equality import Properties.Step import Properties.Remember
{-# OPTIONS --enable-prop #-} data Squash {ℓ} (A : Set ℓ) : Prop ℓ where squash : A → Squash A squash-elim : ∀ {ℓ₁ ℓ₂} (A : Set ℓ₁) (P : Prop ℓ₂) → (A → P) → Squash A → P squash-elim A P f (squash x) = f x
-- Some proposition constructors. {-# OPTIONS --without-K --safe #-} module Tools.Nullary where open import Tools.Empty -- Negation. infix 3 ¬_ ¬_ : Set → Set ¬ P = P → ⊥ -- Decidable propositions. data Dec (P : Set) : Set where yes : ( p : P) → Dec P no : (¬p : ¬ P) → Dec P -- If A and B are logically ...
------------------------------------------------------------------------ -- Finite maps with indexed keys and values, based on AVL trees ------------------------------------------------------------------------ open import Relation.Binary open import Relation.Binary.PropositionalEquality open import Data.Product as Pro...
------------------------------------------------------------------------ -- A small prelude ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Note that parts of Agda's standard library make use of the K rule. module Prelude where -------------------------...
------------------------------------------------------------------------ -- Searchable set ------------------------------------------------------------------------ -- http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.127.3062&rep=rep1&type=pdf -- http://www.cs.bham.ac.uk/~mhe/papers/omniscient-2011-07-06.pdf {...
{-# OPTIONS --without-K --rewriting #-} open import lib.Base open import lib.PathGroupoid open import lib.PathOver module lib.cubical.Square where {- *--1--* | | 0 3 | | *--2--* -} data Square {i} {A : Type i} {a₀₀ : A} : {a₀₁ a₁₀ a₁₁ : A} → a₀₀ == a₀₁ → a₀₀ == a₁₀ → a₀₁ == a₁₁ → a₁₀ == a₁₁ ...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import groups.KernelImage open import groups.KernelImageEmap module cohomology.ChainComplex where record ChainComplex i : Type (lsucc i) where field head : AbGroup i chain : ℕ → AbGroup i augment : AbGroup.grp (chain 0) →ᴳ AbGroup....
{-# OPTIONS --without-K #-} open import HoTT -- Associativity of the join (work in progress) module experimental.JoinAssoc {i j k} (A : Type i) (B : Type j) (C : Type k) where {- First map -} to : (A * B) * C → A * (B * C) to = To.f module _ where to-left-glue : (ab : A × B) → left (fst ab) == right (l...
-- Andreas, 2016-10-08, issue #2243 -- {-# OPTIONS -v tc.cover.cover:100 #-} open import Agda.Builtin.Char f : Char → Char f 'x' = 'x' f 'x' = 'y' -- should be marked as unreachable clause f _ = 's'
{-# OPTIONS --cubical --safe #-} module Cubical.Data.List.Base where open import Agda.Builtin.List public open import Cubical.Core.Everything module _ {ℓ} {A : Type ℓ} where infixr 5 _++_ [_] : A → List A [ a ] = a ∷ [] _++_ : List A → List A → List A [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ xs ++ ys ...