text
stringlengths
4
690k
module Issue1760c where -- Skipping an old-style mutual block: Before the `mutual` keyword. {-# NO_POSITIVITY_CHECK #-} mutual data D : Set where lam : (D → D) → D record U : Set where field ap : U → U
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Symmetry {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.LogicalRel...
{-# OPTIONS --universe-polymorphism #-} module Prelude.Stream where -- open import Coinduction -- Infinite streams. open import Prelude.IO open import Prelude.Nat open import Prelude.Unit data Level : Set where zero : Level suc : (i : Level) → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #...
-- Andreas, 2011-05-10 module MetaAppUnderLambda where data _≡_ {A : Set} (a : A) : A -> Set where refl : a ≡ a data D (A : Set) : Set where cons : A -> (A -> A) -> D A f : {A : Set} -> D A -> A f (cons a h) = a test : (A : Set) -> let X : A X = _ Y : A -> A Y = λ v -> _ ...
-- Andreas, 2015-08-26 {-# OPTIONS --rewriting #-} -- Should give error open import Agda.Builtin.Equality open import Common.List {-# BUILTIN REWRITE _≡_ #-} lengthMap : {A B : Set} (f : A → B) (xs : List A) → length (map f xs) ≡ length xs lengthMap f [] = refl lengthMap f (x ∷ xs) rewrite lengthMap f xs...
open import Oscar.Prelude module Oscar.Class.Apply where module _ (𝔉 : ∀ {𝔣} → Ø 𝔣 → Ø 𝔣) 𝔬₁ 𝔬₂ where 𝓪pply = ∀ {𝔒₁ : Ø 𝔬₁} {𝔒₂ : Ø 𝔬₂} → 𝔉 (𝔒₁ → 𝔒₂) → 𝔉 𝔒₁ → 𝔉 𝔒₂ record 𝓐pply : Ø ↑̂ (𝔬₁ ∙̂ 𝔬₂) where infixl 4 apply field apply : 𝓪pply syntax apply f x = f <*> x open 𝓐ppl...
open import Coinduction using ( ∞ ; ♯_ ; ♭ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ; cong ) open import System.IO.Transducers.Lazy using ( _⇒_ ; inp ; out ; done ; _⟫_ ; ⟦_⟧ ; _≃_ ; equiv ) open import System.IO.Transducers.Session using ( Session ; I ; Σ ; _∼_ ; ∼-refl ; ∼-trans ) ...
{-# OPTIONS --without-K --safe #-} -- Categorical equivalences preserve various structures module Categories.Category.Equivalence.Preserves where open import Level open import Categories.Adjoint.Equivalence using (⊣Equivalence) open import Categories.Category.Core open import Categories.Category.Equivalence using (...
-- An ATP local hint cannot be equal to the conjecture in which it is -- used. -- This error is detected by Syntax.Translation.ConcreteToAbstract. module ATPBadLocalHint1 where postulate D : Set p : D {-# ATP prove p p #-}
------------------------------------------------------------------------ -- Reduced canonical kinding for the undecidability proof ------------------------------------------------------------------------ {-# OPTIONS --safe --exact-split --without-K #-} module FOmegaInt.Kinding.Canonical.Reduced where open import Dat...
------------------------------------------------------------------------ -- An ad-hoc but straightforward solution to the problem of showing -- that elegant definitions of the Hamming numbers (see EWD 792) and -- the Fibonacci sequence are productive ---------------------------------------------------------------------...
module AKS.Modular.Quotient where open import AKS.Modular.Quotient.Base public open import AKS.Modular.Quotient.Properties public
module Formalization.ClassicalPropositionalLogic.Semantics.Proofs where import Lvl open import Data open import Data.Boolean open import Data.Either as Either using (_‖_ ; Left ; Right) open import Formalization.ClassicalPropositionalLogic.Syntax open import Formalization.ClassicalPropositionalLogic.Semantics ope...
module InstanceArgumentsHidden where record ⊤ : Set where -- check that the instance argument resolution takes into account -- instances which take hidden arguments to be of the correct type. postulate A1 A2 B : Set f1 : {{a : A1}} → B f2 : {{a : A2}} → B inst1 : {_ : ⊤} → A1 checkPrope...
module MagicWith where data _×_ (A : Set)(B : A -> Set) : Set where _,_ : (x : A) -> B x -> A × B fst : {A : Set}{B : A -> Set} -> A × B -> A fst (x , y) = x snd : {A : Set}{B : A -> Set}(p : A × B) -> B (fst p) snd (x , y) = y data Nat : Set where zero : Nat suc : Nat -> Nat record True : Set where data ...
------------------------------------------------------------------------ -- An alternative definition of listed finite subsets ------------------------------------------------------------------------ -- The code in this module is based on Frumin, Geuvers, Gondelman and -- van der Weide's "Finite Sets in Homotopy Type ...
------------------------------------------------------------------------------ -- Properties for the nest function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism ...
module README where import Semantics import Theory import Soundness import Categories.Category.Construction.Models import Categories.Category.Construction.Classifying import Categories.Functor.Construction.Inclusion import Internal import Examples
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Base.Types open import LibraBFT.Concrete.Records open im...
{- Copyright 2019 Lisandra Silva Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Instance.0-Truncation where -- 0-trucation of groupoids as a functor from Groupoids to Setoids. -- -- This is the right-adjoint of the inclusion functor from Setoids to -- Groupoids (see Categories.Functor.Adjoint.Instance.ZeroTruncation) import Function o...
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl) open import Relation.Nullary.Decidable using (False; toWitnessFalse) open import Data.Fin using (Fin; _≟_) open import Data.Nat using (ℕ; suc) open import Data.Product using (_×_; _,_) open import Common data Global (n : ℕ) : Set where endG : ...
-- Andreas, 2012-04-21 -- {-# OPTIONS -v tc.proj.like:100 -v tc.with:100 #-} module ReifyProjectionLike where data Maybe (A : Set) : Set where just : A → Maybe A fromJust : (A : Set) → Maybe A → A fromJust A (just a) = a data Sing (A : Set) : A -> Set where sing : (a : A) -> Sing A a succeed : (A : Set) -> M...
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category; module Commutation) open import Categories.Category.Monoidal open import Categories.Category.Monoidal.Braided using (Braided) module Categories.Category.Monoidal.Braided.Properties {o ℓ e} {C : Category o ℓ e} {M : Monoidal C} (BM :...
module Implicits.Resolution.Ambiguous.Undecidable where open import Prelude hiding (Dec) open import Relation.Nullary open import Relation.Nullary.Decidable as DecM open import Function.Equivalence using (_⇔_; equivalence) open import Relation.Binary.HeterogeneousEquality as H using () open import Implicits.Syntax o...
------------------------------------------------------------------------ -- The Agda standard library -- -- An inductive definition of the sublist relation for types which have -- a decidable equality. This is commonly known as Order Preserving -- Embeddings (OPE). ------------------------------------------------------...
module _ where open import Agda.Primitive.Cubical open import Agda.Builtin.Nat postulate PathP : ∀ {ℓ} (A : I → Set ℓ) → A i0 → A i1 → Set ℓ {-# BUILTIN PATHP PathP #-} postulate A : Set a : A b : A p : PathP (\ _ → A) a b test1 : ∀ {p : PathP (\ _ → A) a a} {P : A → Set} → P (p i0) → P a tes...
module NothingAppliedToHiddenArg where bad = {x}
module Utils.Decidable where open import Data.Nat open import Data.Char open import Data.String open import Data.Bool open import Relation.Binary.PropositionalEquality open import Relation.Nullary.Decidable hiding (True; False) open import Relation.Nullary open import Data.Product open import Data.Sum open import Fu...
-- pull in Haskell Ints module int where open import bool open import string postulate int : Set int0 : int int1 : int _+int_ : int → int → int _*int_ : int → int → int _-int_ : int → int → int string-to-int : string → int is-zero-int : int → 𝔹 {-# COMPILED_TYPE int Int #-} {-# COMPILED int0 0 #-} ...
-- {-# OPTIONS -v tc.rec:100 -v tc.signature:20 #-} module Issue414 where record P : Set₁ where field q : Set x : P x = record { q = q } -- Andreas 2011-05-19 -- record constructor should have been added to the signature -- before record module is constructed!
------------------------------------------------------------------------ -- Contexts, variables, context morphisms, context extensions, etc. ------------------------------------------------------------------------ -- The contexts, variables, etc. are parametrised by a universe. open import Data.Universe.Indexed modu...
data D : Set where c : D s : D → D predD : D → D predD c = c predD (s x) = x f : D → D f c = c f (s n) with c f x@(s _) | c = x f (s _) | s _ = c data E : D → Set where e : E c s : ∀ {x} → E x → E (s x) predE : ∀ {d} → E d → E (predD d) predE e = e predE (s x) = x g : ∀ {d} → E d → E (predD d) g e =...
module Everything where import Prelude import Stack import Syntax import ProposedSemantics import Semantics.Ono import Semantics.BozicDosen import Semantics.AlechinaEtAl import Semantics.Iemhoff import CompleteProposedSemantics import CompleteSemantics.Ono import CompleteSemantics.BozicDosen import CompleteSemantic...
{-# OPTIONS --cubical --safe #-} open import Prelude hiding (sym; refl) open import Relation.Binary module Relation.Binary.Lattice {ℓ₁ ℓ₂ ℓ₃} {𝑆 : Type ℓ₁} (totalOrder : TotalOrder 𝑆 ℓ₂ ℓ₃) where open TotalOrder totalOrder import Path as ≡ min-max : 𝑆 → 𝑆 → 𝑆 × 𝑆 min-max x y = bool′ (y , x) (x , y) (x <ᵇ y) ...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cohomology.CupProduct.OnEM.InAllDegrees open import cohomology.CupProduct.OnEM.CommutativityInAllDegrees open import cohomology.EMModel open import cohomology.Theory open import groups.ToOmega open import homotopy.EilenbergMacLane open import homotop...
open import Agda.Builtin.Unit data D : Set where c₁ c₂ : D @0 c₃ : D f : @0 D → ⊤ f c₁ = tt f c₂ = tt f c₃ = tt
------------------------------------------------------------------------ -- This file contains the definition of a preorder as a category with -- -- additional properties. -- ------------------------------------------------------------------------ module Category.Poset where ...
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids module Setoids.Functions.Definition {a b c d : _} {A : Set a} {B : Set b} where WellDefined : (S : Setoid {a} {c} A) (T : Setoid {b} {d} B) (f : A → B) → Set (a ⊔ c ⊔ d) WellDefin...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.FunctionOver module cohomology.TwoPushouts where -- g h -- B --> C --> D K = A ⊔^B C / (f,g) d₁ = A <- B -> C -- f| | | L = K ⊔^C D / (left,h) d₂ = K <- C -> D -- v v v ...
data Foo : Set where foo = Foo -- Bad error message WAS: -- A postulate block can only contain type signatures or instance blocks
{-# OPTIONS --without-K --safe #-} module Definition.Typed.EqualityRelation where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Weakening using (_∷_⊆_) -- Generic equality relation used with the logical relation record EqRelSet : Set₁ where constructor eqRel field ...
module Oscar.Category.Morphism where open import Oscar.Category.Setoid open import Oscar.Level open import Oscar.Property open import Oscar.Data.Nat record Morphism {𝔬} (⋆ : Set 𝔬) 𝔪 𝔮 : Set (𝔬 ⊔ lsuc (𝔪 ⊔ 𝔮)) where constructor #_ field _⇒_ : ⋆ → ⋆ → Setoid 𝔪 𝔮 _↦_ : ⋆ → ⋆ → Set 𝔪 _↦_ x...
{-# OPTIONS --safe #-} module Cubical.Algebra.Group.Exact where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Algebra.Group.Base open import Cubical.Algebra.Group.Morphisms open import Cubical.Algebra.Group.MorphismProperties open import Cubical.HITs.PropositionalTru...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Monoidal.Construction.Minus2 where -- Any -2-Category is Monoidal. Of course, One is Monoidal, but -- we don't need to shrink to do this, it can be done directly. -- The assumptions in the construction of a -2-Category are all -- needed to make things wor...
{-# OPTIONS --without-K #-} open import Base open import Homotopy.PushoutDef -- Suspension is defined as a particular case of pushout module Spaces.Suspension {i} (A : Set i) where suspension-diag : pushout-diag i suspension-diag = diag unit , unit , A , (λ _ → tt) , (λ _ → tt) suspension : Set i suspension = push...
{-# OPTIONS --safe #-} module JVM.Contexts where open import JVM.Types open import Relation.Ternary.Construct.List.Overlapping Ty public renaming ( overlap-rel to ctx-rel ; overlap-commutative to ctx-commutative ; overlap-semigroup to ctx-semigroup ; overlap-monoid to ctx-monoid)
{-# OPTIONS --no-qualified-instances #-} module JVM.Printer where open import Function open import Data.Bool open import Data.Product hiding (swap) open import Data.List as L open import Data.List.Relation.Unary.Any open import Data.Nat as N open import Data.Nat.Show as Nat open import Data.Fin open import Data.String...
module Generic.Test.Data where open import Generic.Test.Data.Fin public open import Generic.Test.Data.Lift public open import Generic.Test.Data.Product public open import Generic.Test.Data.List public open import Generic.Test.Data.Maybe public open import Generic.Test.Data.Vec public open import Generi...
-- binary search trees (not balanced) open import bool open import bool-thms2 open import eq open import maybe open import product open import product-thms open import bool-relations using (transitive ; total) module z05-01-bst (A : Set) -- type of elements (_≤A_ : A → A → 𝔹) ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of unnormalized Rational numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Rational.Unnormalised.Properties where open i...
data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x data Maybe (A : Set) : Set where nothing : Maybe A just : A → Maybe A postulate String : Set {-# BUILTIN STRING String #-} infix 1000 ♯_ postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A ...
module Everything where import Holes.Prelude import Holes.Term import Holes.Cong.Limited import Holes.Cong.General import Holes.Cong.Propositional
module Issue118Comment9 where open import Common.Level open import Common.Coinduction data Box (A : Set) : Set where [_] : A → Box A postulate I : Set data P : I → Set where c : ∀ {i} → Box (∞ (P i)) → P i F : ∀ {i} → P i → I F (c x) = _ G : ∀ {i} → Box (∞ (P i)) → I G [ x ] = _ mutual f : ∀ {i} (x : P i...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Maximal where -- Stdlib imports open import Level using (Level; _⊔_) open import Function using (_∘_) open import Data.Product using (_,_; ∃-syntax) open import Data.Empty using (⊥-elim) open import Relation.Nullary using (¬_) open import Relation.Unary ...
{-# OPTIONS --without-K --safe #-} module Categories.NaturalTransformation.NaturalIsomorphism.Functors where open import Level open import Categories.Category open import Categories.Category.Construction.Functors open import Categories.Functor open import Categories.NaturalTransformation.NaturalIsomorphism import C...
{- Part 4: Higher inductive types • Set quotients via HITs • Propositional truncation • A little synthetic homotopy theory -} {-# OPTIONS --cubical #-} module Part4 where open import Cubical.Foundations.Isomorphism open import Cubical.Data.Int hiding (_+_) open import Cubical.Data.Nat hiding (elim) open import Cu...
data ⊤ : Set where tt : ⊤ postulate IndexL : Set Ordered : IndexL → Set ¬ho-shr-morph : IndexL → IndexL pres-¬ord : ∀ ind → Ordered (¬ho-shr-morph ind) ¬ord-morph : ∀ ind → Ordered ind → Set postulate tt' : ⊤ poo : ∀ ind → ¬ord-morph (¬ho-shr-morph ind) (pres-¬ord ind) poo ind with tt ...
{-# OPTIONS --experimental-irrelevance #-} {-# OPTIONS --universe-polymorphism #-} module IrrelevantLevelToSet where open import Imports.Level -- should fail, because Set i /= Set j for i /= j, so i is not irrelevant in Set i MySet : .(i : Level) -> Set (suc i) MySet i = Set i
module Lam where f : {A : Set} → A → A f x = (λ y z → z) x x g : {A : Set} → A → A g {A = A} x = (λ (y' : A) (z : A) → z) x x
------------------------------------------------------------------------ -- Big-step semantics for the untyped λ-calculus ------------------------------------------------------------------------ module Lambda.Substitution.OneSemantics where open import Codata.Musical.Notation open import Data.Fin open import Function...
-- simulating streams by Nat -> A module Stream where data Bool : Set where true : Bool false : Bool if_then_else_ : forall {A} -> Bool -> A -> A -> A if true then t else e = t if false then t else e = e data Nat : Set where zero : Nat succ : Nat -> Nat Stream : Set -> Set Stream A = Nat -> A _:...
{-# OPTIONS --warning=error --safe --guardedness --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Semiring open import Numbers.Naturals.Naturals open import Numbers.Naturals.Order open import Numbers.Naturals.EuclideanAlgorithm open imp...
module MetaCannotDependOn where data Nat : Set where zero : Nat suc : Nat -> Nat postulate Vec : Nat -> Set -> Set f : (A : Set) -> ((n : Nat) -> A -> Vec n Nat) -> Nat err : Nat err = f _ (\ n xs -> xs)
------------------------------------------------------------------------ -- The Agda standard library -- -- Boring lemmas used in Data.Nat.GCD and Data.Nat.Coprimality ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Nat.GCD.Lemmas where open imp...
-- {-# OPTIONS -v tc.size.solve:100 #-} open import Agda.Builtin.Size data Cx (U : Set) : Set where ⌀ : Cx U _,_ : Cx U → U → Cx U module _ {U : Set} where data _⊆_ : Cx U → Cx U → Set where done : ⌀ ⊆ ⌀ skip : ∀ {A Γ Γ′} → Γ ⊆ Γ′ → Γ ⊆ (Γ′ , A) keep : ∀ {A Γ Γ′} → Γ ⊆ Γ′ → (Γ , A) ⊆ (Γ′ , A) ...
{-# OPTIONS --allow-unsolved-metas #-} module finiteSetUtil where open import Data.Nat hiding ( _≟_ ) open import Data.Fin renaming ( _<_ to _<<_ ; _>_ to _f>_ ; _≟_ to _f≟_ ) hiding (_≤_ ) open import Data.Fin.Properties hiding ( <-trans ) renaming ( <-cmp to <-fcmp ) open import Data.Empty open import Relation.Nu...
module STLC.Lib.MaybeElim where open import Level open import Function open import Relation.Binary.PropositionalEquality open import Data.Unit.Base open import Data.Bool.Base open import Data.Maybe.Base infixl 1 _>>=ᵀ_ _>>=ᵗ_ _>>=⊤_ infixl 4 _<$>ᵗ_ infixr 1 _>=>ᵗ_ infixr 10 _<∘>ᵗ_ data _>>=ᵀ_ {α β} {A : Set α} : ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some code related to indexed containers that uses heterogeneous -- equality ------------------------------------------------------------------------ -- The notation and presentation here is perhaps close to thos...
module Logic.Classical.DoubleNegated where open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional open import Logic.Names open import Logic.Propositional as Constructive using (¬¬_) import Logic.Predicate as Constructive open import Logic import Lvl open import Syntax.Type open import T...
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Identity open import HoTT.Identity.Boolean open import HoTT.Identity.Coproduct open import HoTT.Identity.Sigma open import HoTT.Identity.Identity open import HoTT.Identity.Pi open import HoTT.Identity.NaturalNumber open import HoTT.Transport.Identity op...
------------------------------------------------------------------------ -- Parsing of mixfix operators ------------------------------------------------------------------------ -- This module defines a grammar for the precedence graph g. The -- grammar is neither left nor right recursive. open import Mixfix.Expr open...
module Numeral.Finite.LinearSearch where -- TODO: Maybe move to Numeral.CoordinateVector.LinearSearch open import Data.Boolean open import Data.Boolean.Stmt open import Data.List import Data.List.Functions as List open import Data.Option import Data.Option.Functions as Option open import Functional open impo...
{-# OPTIONS --safe #-} module Cubical.HITs.FreeAbGroup.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Function infixl 7 _·_ infix 20 _⁻¹ private variable ℓ ℓ' : Level A : Type ℓ data FreeAbGroup (A : Type ℓ) : Type ℓ where ⟦_⟧ :...
{-# OPTIONS --type-in-type #-} module chu where open import functors open import prelude record Chu : Set where constructor _,_!_ field _⁺ _⁻ : Set _Ω_ : _⁺ → _⁻ → Set module _ (A@(A⁺ , A⁻ ! _Ω₁_) B@(B⁺ , B⁻ ! _Ω₂_) : Chu) where record Chu[_,_] : Set where -- Morphisms of chu spaces ...
{-# OPTIONS --without-K #-} module Agda.Builtin.IO where postulate IO : ∀ {a} → Set a → Set a {-# BUILTIN IO IO #-} {-# FOREIGN GHC type AgdaIO a b = IO b #-} {-# COMPILE GHC IO = type MAlonzo.Code.Agda.Builtin.IO.AgdaIO #-}
{-# OPTIONS --cubical --safe #-} module Cubical.Structures.Semigroup where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Foundations.SIP renaming (SNS-PathP to SNS) open import Cubical.Structures...
open import Data.Char using ( Char ) open import Data.Bool using ( Bool ) module Data.Char.Classifier.Primitive where postulate isAscii : Char → Bool isLatin1 : Char → Bool isControl : Char → Bool isSpace : Char → Bool isLower : Char → Bool isUpper : Char → Bool isAlpha : Char → Bool isAlphaNum : Cha...
{-# OPTIONS --safe #-} module Cubical.Categories.Presheaf.Base where open import Cubical.Foundations.Prelude open import Cubical.Categories.Category open import Cubical.Categories.Instances.Sets open import Cubical.Categories.Instances.Functors PreShv : ∀ {ℓ ℓ'} → Category ℓ ℓ' → (ℓS : Level) → Category (ℓ-ma...
------------------------------------------------------------------------------ -- Issue 12 ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --withou...
-- Andreas, 2012-04-18, bug reported by sanzhiyan -- {-# OPTIONS -v tc.with:100 #-} module Issue610-4 where import Common.Level open import Common.Equality data ⊥ : Set where record ⊤ : Set where record A : Set₁ where constructor set field .a : Set .ack : A → Set ack x = A.a x hah : set ⊤ ≡ set ⊥ hah = ref...
-- Andreas, 2012-11-13 issue reported by joshkos module Issue754 where data RDesc (I : Set) : Set₁ where ∎ : RDesc I ṿ : (i : I) → RDesc I σ : (S : Set) (D : S → RDesc I) → RDesc I data ROrn {I J} (e : J → I) : RDesc I → RDesc J → Set₁ where ∎ : ROrn e ∎ ∎ ṿ : ∀ j i → ROrn e (ṿ i) (ṿ j) σ : (S : Set) →...
--------------------------------------------------------------- -- This file contains the definitions of several versions of -- -- subcategories. -- --------------------------------------------------------------- module Category.Subcategory where open import Level open import...
-- Andreas, 2019-06-26, issue #3872, make --no-forcing a pragma option {-# OPTIONS --no-forcing #-} open import Agda.Builtin.Nat data List {a} (A : Set a) : Set a where [] : List A _∷_ : A → List A → List A pattern [_] x = x ∷ [] module _ {a} {A : Set a} where _++_ : List A → List A → List A [] ++ y...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly-Quotient where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat open import Cubical.Data.Vec open import Cubical.Data.Vec.OperationsNat open import Cubical.Data.FinData o...
------------------------------------------------------------------------ -- Examples showing how Tree-sort can be used ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Tree-sort.Examples {c⁺} (eq : ∀ {a p} → Equality-with-J a p ...
module main-old where import parse import run open import lib open import cedille-types -- for parser for Cedille source files import cedille module parsem = parse cedille.gratr2-nt ptr open parsem.pnoderiv cedille.rrs cedille.cedille-rtn module pr = run ptr open pr.noderiv {- from run.agda -} -- for parser for opt...
module Utils.HaskellFunctions where open import bool open import maybe open import Utils.HaskellTypes postulate _str-eq_ : String → String → 𝔹 {-# COMPILED _str-eq_ (==) #-} infixr 20 _++s_ postulate _++s_ : String → String → String {-# COMPILED _++s_ Data.Text.append #-} fst : {A B : Set} → Prod A B → A fst (x ,...
module Coirc.Network where open import Function open import Coinduction open import Data.Unit open import Data.String open import Data.Maybe open import IO open import Coirc open import Coirc.Parser import Coirc.Network.Primitive as Prim private Handle = Prim.Handle hConnect : String → IO Handle hConnect s = li...
------------------------------------------------------------------------------ -- Distributive laws on a binary operation: Task B ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-univers...
module DynTheory where open import Prelude open import T ---- Some theory about the dynamic semantics module DynTheory where -- prove some obvious theorems about iterated stepping -- transitivity (which makes sense, given that it is the transitive closure) eval-trans : ∀{A} {e e' e'' : TCExp A} → ...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Nat.Mod where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat open import Cubical.Data.Nat.Order -- Defining x mod 0 to be 0. This way all the theorems below are true -- for n : ℕ instead of n : ℕ₊₁. ------ Preliminary definitions ------ modIn...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.Group.MorphismProperties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels...
open import OutsideIn.Prelude open import OutsideIn.X module OutsideIn.Inference.Prenexer(x : X) where import OutsideIn.Constraints as C import OutsideIn.Expressions as E open E(x) open C(x) open X(x) private module PlusN-m n = Monad (PlusN-is-monad {n}) module PlusN-f n = Functor ...
module Class.Monad.Except where open import Class.Monad open import Class.Monoid open import Data.Maybe open import Level private variable a : Level A : Set a record MonadExcept (M : Set a → Set a) {{_ : Monad M}} (E : Set a) : Set (suc a) where field throwError : E → M A catchError : M A → (E → ...
-- Andreas, 2016-10-11, AIM XXIV, issue #2250 {-# OPTIONS --injective-type-constructors #-} open import Common.Prelude open import Common.Equality abstract f : Bool → Bool f x = true same : f true ≡ f false same = refl -- f should not be treated as injective here, -- even though f true and f false do not r...
open import Prelude renaming (_++_ to _++-List_) open import Data.Maybe using (Maybe; just; nothing) open import Data.Nat using (ℕ; suc; zero; _+_; _≤_; z≤n; s≤s; _≤?_) renaming (decTotalOrder to decTotalOrder-ℕ) open import Data.Nat.Properties as ℕ-Props open import Data.Nat.Properties.Simple using (+-suc; +-comm) ope...
{-# OPTIONS --without-K #-} open import M-types.Base.Core open import M-types.Base.Sum open import M-types.Base.Prod open import M-types.Base.Eq open import M-types.Base.Equi open import M-types.Base.Axiom module M-types.Base.Rel where SpanRel : Ty ℓ → Ty (ℓ-suc ℓ) SpanRel {ℓ} X = ∑[ ty ∈ Ty ℓ ] (ty → X) × ...
module Data.Tree.Base where open import Class.Monoid open import Class.Show open import Data.List using (List; sum; map; replicate; intersperse) open import Data.Nat using (ℕ; suc) open import Data.Nat.Instance open import Data.String using (String) open import Data.String.Instance open import Function data Tree (A :...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary where open import Dodo.Binary.Acyclic public open import Dodo.Binary.Composition public open import Dodo.Binary.Cycle public open import Dodo.Binary.Dec public open import Dodo.Binary.Disjoint public open import Dodo.Binary.Domain public open import Dodo.Binary.Em...