text
stringlengths
4
690k
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Object.Terminal.Limit {o โ„“ e} (C : Category o โ„“ e) where open import Categories.Category.Lift open import Categories.Category.Finite.Fin.Construction.Discrete open import Categories.Object.Terminal C open import Categories.Diagram.L...
------------------------------------------------------------------------ -- The Agda standard library -- -- Booleans ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Bool where open import Relation.Nullary open import Relation.Binary open import ...
-- 2010-09-29 module IllegalUseOfIrrelevantDeclaration where import Common.Irrelevance record Subset (A : Set) (P : A -> Set) : Set where constructor _#_ field elem : A .certificate : P elem postulate .irrelevant : {A : Set} -> .A -> A certificate : {A : Set}{P : A -> Set} -> (x : Subset A ...
{-# OPTIONS --without-K #-} open import lib.Base open import lib.PathGroupoid open import lib.cubical.Square module lib.cubical.Cube where {- Coordinates are yzx, where x : left -> right y : back -> front z : top -> bottom -} data Cube {i} {A : Type i} {aโ‚€โ‚€โ‚€ : A} : {aโ‚€โ‚โ‚€ aโ‚โ‚€โ‚€ aโ‚โ‚โ‚€ aโ‚€โ‚€โ‚ aโ‚€โ‚โ‚ aโ‚โ‚€โ‚ ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Monad module Categories.Adjoint.Construction.EilenbergMoore {o โ„“ e} {C : Category o โ„“ e} (M : Monad C) where open import Categories.Category.Construction.EilenbergMoore M open import Categories.Adjoint open import Categories.Fu...
open import Data.Product using ( _ร—_ ; _,_ ) open import Relation.Binary.PropositionalEquality using ( refl ) open import Relation.Unary using ( _โˆˆ_ ) open import Web.Semantic.DL.ABox using ( ABox ; โŸจABoxโŸฉ ) open import Web.Semantic.DL.ABox.Interp using ( Interp ; Surjective ; _,_ ; โŒŠ_โŒ‹ ; ind ; _*_ ; emp ) open import ...
-- The natural numbers. {-# OPTIONS --without-K --safe #-} module Tools.Nat where open import Tools.PropositionalEquality open import Tools.Nullary -- We reexport Agda's built-in type of natural numbers. open import Agda.Builtin.Nat using (zero; suc) open import Agda.Builtin.Nat using (Nat) public pattern 1+ n = ...
------------------------------------------------------------------------ -- A counterexample: The number of steps taken by the uninstrumented -- interpreter is not, in general, linear in the number of steps taken -- by the virtual machine for the corresponding compiled program ------------------------------------------...
open import Common.Prelude test : Bool โ†’ Nat test = if_then 4 Common.Prelude.else 5
------------------------------------------------------------------------------ -- Totality properties of the division ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphi...
module sn-calculus where open import utility open import Esterel.Lang open import Esterel.Lang.Binding open import Esterel.Lang.Properties open import Esterel.Lang.CanFunction using (Canฮธโ‚› ; Canฮธโ‚›โ‚• ; [S]-env) open import Esterel.Environment as Env using (Env ; ฮ˜ ; _โ†_ ; sig ; []env ; module SigMap ; module ShrMap...
module Lambda where open import Prelude -- Simply typed ฮป-calculus infixr 70 _โŸถ_ data Type : Set where ฮน : Type _โŸถ_ : Type -> Type -> Type Ctx : Set Ctx = List Type infixl 80 _โ€ข_ infix 20 ฦ›_ data Term : Ctx -> Type -> Set where vz : forall {ฮ“ ฯ„ } -> Term (ฮ“ , ฯ„) ฯ„ wk : forall {ฮ“ ฯƒ ฯ„} -> Term ฮ“ ฯ„ ...
-- Andreas, 2016-06-13 issue #2027: Unbound variables in pattern synonyms -- Quiz by Ulf postulate Nat : Set pattern hm = x -- This pattern synonym should fail with a message like -- Unbound variables in pattern synonym: x quizโ‚ : Nat โ†’ Nat โ†’ Nat quizโ‚ hm hm = hm quizโ‚‚ : Nat โ†’ Nat quizโ‚‚ x = hm quizโ‚ƒ : Nat โ†’ Nat q...
-- This is the preferred version of the integers in the library. Other -- versions can be found in the MoreInts directory. {-# OPTIONS --safe #-} module Cubical.Data.Int where open import Cubical.Data.Int.Base public open import Cubical.Data.Int.Properties public
-- Andreas, 2014-05-08 -- Reported by guillaume.brunerie, Yesterday {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.cc:25 -v reduce.compiled:95 #-} -- {-# OPTIONS --show-implicit -v tc.inj:30 -v tc.conv:20 -v tc.meta.assign:10 #-} -- The code below gives the following odd error: -- > Incomplete pattern matching...
module Equality where postulate _==_ : {A : Set} -> A -> A -> Set refl : {A : Set}{x : A} -> x == x {-# BUILTIN EQUAL _==_ #-} {-# BUILTIN REFL refl #-} private primitive primEqElim : {A : Set}(x : A)(C : (y : A) -> x == y -> Set) -> C x refl -> (y : A) -> (p : x == y) -> C y p elim-== = ...
{- Proof of the standard formulation of the univalence theorem and various consequences of univalence - Re-exports Glue types from Cubical.Core.Glue - The ua constant and its computation rule (up to a path) - Proof of univalence using that unglue is an equivalence ([EquivContr]) - Equivalence induction ([EquivJ], [el...
open import Data.Sum using (_โŠŽ_; injโ‚; injโ‚‚) open import Data.List using (List; []; _โˆท_; [_]; _++_) open import Data.List.Any using (Any; here; there) open import Data.List.Any.Membership.Propositional using (_โˆˆ_) open import Data.Nat using (โ„•) open import Relation.Binary.PropositionalEquality using (_โ‰ก_; refl) -- open...
------------------------------------------------------------------------ -- The Agda standard library -- -- Unsafe Float operations ------------------------------------------------------------------------ {-# OPTIONS --with-K #-} module Data.Float.Unsafe where open import Data.Float open import Data.Bool.Base using ...
------------------------------------------------------------------------ -- Subsets of finite sets ------------------------------------------------------------------------ module Data.Fin.Subset where open import Data.Nat open import Data.Vec hiding (_โˆˆ_) open import Data.Fin open import Data.Product open import Rela...
------------------------------------------------------------------------ -- Operations on nullary relations (like negation and decidability) ------------------------------------------------------------------------ -- Some operations on/properties of nullary relations, i.e. sets. module Relation.Nullary where open im...
-- Andreas, 2019-09-13, AIM XXX, test for #4050 by gallais -- Jesper, 2019-12-19, moved to test/Fail after unfix of #3823 record Wrap : Setโ‚‚ where field wrapped : Setโ‚ f : Wrap f = record { M } module M where wrapped : Setโ‚ wrapped = Set -- Should be accepted.
{-# OPTIONS --without-K #-} module SimpleHoTT where open import Data.Empty open import Data.Sum renaming (map to _โŠŽโ†’_) open import Function renaming (_โˆ˜_ to _โ—‹_) infixr 8 _โˆ˜_ -- path composition infix 4 _โ‰ก_ -- propositional equality infix 2 _โˆŽ -- equational reasoning for paths infixr 2 _โ‰กโŸจ_โŸฉ_ -- equ...
module Oscar.Class.ThickAndThin where open import Oscar.Data.Fin open import Oscar.Data.Equality open import Oscar.Data.Nat open import Oscar.Data.Maybe record ThickAndThin {a} (A : Nat โ†’ Set a) : Set a where field thin : โˆ€ {m} โ†’ Fin (suc m) โ†’ A m โ†’ A (suc m) thin-injective : โˆ€ {m} (x : Fin (suc m)) {yโ‚ yโ‚‚...
open import Mockingbird.Forest using (Forest) module Mockingbird.Forest.Combination.Base {b โ„“} (forest : Forest {b} {โ„“}) where open import Level using (Level; _โŠ”_) open import Relation.Unary using (Pred; _โˆˆ_) open Forest forest private variable p : Level x y z : Bird P : Pred Bird p -- If P is a set ...
{-# OPTIONS --without-K --safe #-} -- In this module, we define the syntax of D<: module DsubDef where open import Data.List as List open import Data.List.All open import Data.Nat as โ„• open import Data.Maybe as Maybe open import Data.Product open import Data.Sum open import Data.Empty renaming (โŠฅ to False) open impor...
{-# OPTIONS --safe --cubical-compatible --no-universe-polymorphism --no-sized-types --no-guardedness #-} module Issue2487-1 where import Issue2487.Coinfective
-- Andreas, 2012-01-11 module Issue551b where data Box (A : Set) : Set where [_] : .A โ†’ Box A implicit : {A : Set}{{a : A}} -> A implicit {{a}} = a postulate A B : Set instance a : A a' : Box A a' = [ implicit ] -- this should succeed f : Box B โ†’ Box (Box B) f [ x ] = [ [ x ] ] -- this as well
------------------------------------------------------------------------ -- Yet another implementation of the Fibonacci sequence using tail ------------------------------------------------------------------------ module LargeCombinators where open import Codata.Musical.Notation open import Codata.Musical.Stream as S ...
------------------------------------------------------------------------------ -- Inductive PA properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# O...
open import Relation.Binary.Core open import Level using (Level; _โŠ”_; suc) open import Data.Product using (ฮฃ; _ร—_; _,_; ฮฃ-syntax; โˆƒ-syntax; projโ‚; projโ‚‚) open import Function open import DeBruijn open import Beta open import Takahashi open import Z open import ConfluenceTakahashi using (lemma3-3; lemma3-5) star-lef...
------------------------------------------------------------------------ -- INCREMENTAL ฮป-CALCULUS -- -- Values for standard evaluation with the Nehemiah plugin. ------------------------------------------------------------------------ module Nehemiah.Denotation.Value where open import Nehemiah.Syntax.Type public open...
import Everything open import Prelude open import Container.Traversable open import Container.Foldable open import Container.List open import Text.Parse open import Text.Lex open import Text.Printf open import Control.Monad.State open import Control.Monad.Transformer open import Control.WellFounded open import Builti...
module Syntax.Number where import Lvl open import Logic.Propositional open import Numeral.Natural open import Type record Numeral {โ„“} (T : Type{โ„“}) : Typeฯ‰ where field {restriction-โ„“} : Lvl.Level restriction : โ„• โ†’ Type{restriction-โ„“} num : (n : โ„•) โ†’ โฆƒ _ : restriction(n) โฆ„ โ†’ T open Numeral โฆƒ ... โฆ„ p...
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-} module Number.Operations.Specification where open import Cubical.Foundations.Everything renaming (_โปยน to _โปยนแต–; assoc to โˆ™-assoc) open import Cubical.Data.Unit.Base -- Unit open import Number.Postulates open import Number.Base open โ„•โฟ open โ„คแถป open โ„šแถ ...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Equivalence where -- Strong equivalence of categories. Same as ordinary equivalence in Cat. -- May not include everything we'd like to think of as equivalences, namely -- the full, faithful functors that are essentially surjective on objects. open import...
module nodcap.LocalChoice where open import Algebra open import Data.Nat as โ„• using (โ„•; suc; zero) open import Data.Pos as โ„•โบ open import Data.List as L using (List; []; _โˆท_; _++_) open import Data.List.Any as LA using (Any; here; there) open import Data.List.Any.BagAndSetEquality as B open import Data.Product as PR u...
-- In this file we consider the special of localising at a single -- element f : R (or rather the set of powers of f). This is also -- known as inverting f. {-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommRing.Localisation.InvertingElements where open imp...
module IIDg where open import LF -- Codes for indexed inductive types data OPg (I : Set) : Set1 where ฮน : I -> OPg I ฯƒ : (A : Set)(ฮณ : A -> OPg I) -> OPg I ฮด : (H : Set)(i : H -> I)(ฮณ : OPg I) -> OPg I -- The top-level structure of values in an IIDg Args : {I : Set}(ฮณ : OPg I)(U : I -> Set) -> Set Args (ฮน _) ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Fresh lists, a proof relevant variant of Catarina Coquand's contexts in -- "A Formalised Proof of the Soundness and Completeness of a Simply Typed -- Lambda-Calculus with Explicit Substitutions" -----------------...
{- This file contains: - Definition of propositional truncation -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.PropositionalTruncation.Base where open import Cubical.Core.Primitives -- Propositional truncation as a higher inductive type: data โˆฅ_โˆฅ {โ„“} (A : Type โ„“) : Type โ„“ where โˆฃ_โˆฃ : A โ†’ โˆฅ A โˆฅ squash...
-- Reported by stevan.andjelkovic, 2014-10-23 -- Case splitting on n in the goal g produces the wrong output, it -- seems like {n} in f is the problem... data โ„• : Set where zero : โ„• suc : โ„• โ†’ โ„• f : {_ : โ„•} โ†’ Setโ‚ f {n} = Set where g : โ„• โ†’ Set g n = {!n!}
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Foundations.Equiv.Base where open import Cubical.Foundations.Function open import Cubical.Foundations.Prelude open import Cubical.Core.Glue public using ( isEquiv ; equiv-proof ; _โ‰ƒ_ ; equivFun ; equivProof ) fiber : โˆ€ {โ„“ โ„“'} {A : Type โ„“} {B : Type ...
module par-swap.properties where open import par-swap open import Esterel.Lang open import Esterel.Lang.Binding open import Esterel.Context open import Data.List using ([] ; [_] ; _โˆท_ ; List ; _++_) open import Data.Product Context1-โˆฅR : โˆ€{p p'} โ†’ (C1 : Context1) โ†’ p โˆฅR p' โ†’ ((C1 โˆท []) โŸฆ p โŸงc) โˆฅR ((C1 โˆท []) โŸฆ p' โŸงc) ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Quotients for Heterogeneous equality ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Relation.Binary.HeterogeneousEquality.Quotients where open i...
-- Reasoning with both a strict and non-strict relation. {-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Relation.Binary.Raw module Cubical.Relation.Binary.Reasoning.Base.Double {a โ„“โ‚ โ„“โ‚‚} {A : Type a} {_โ‰ค_ : RawRel A โ„“โ‚} {_<_ : RawRel A โ„“โ‚‚} (โ‰ค-isPreorder ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Propertiers of any for containers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Container.Relation.Unary.Any.Properties where open impo...
module Highlighting.M where
module Sized.CounterCell where open import Data.Product open import Data.Nat.Base open import Data.Nat.Show open import Data.String.Base using (String; _++_) open import SizedIO.Object open import SizedIO.IOObject open import SizedIO.Base open import SizedIO.Console hiding (main) open import SizedIO.ConsoleObject o...
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-} module Cubical.ZCohomology.Groups.Wedge where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.MayerVietorisUnreduced open import Cubical.Foundations.HLevels open import Cu...
module Generic.Test.Data.W where open import Generic.Main data Wโ€ฒ {ฮฑ ฮฒ} (A : Set ฮฑ) (B : A -> Set ฮฒ) : Set (ฮฑ โŠ” ฮฒ) where supโ€ฒ : โˆ€ {x} -> (B x -> Wโ€ฒ A B) -> Wโ€ฒ A B W : โˆ€ {ฮฑ ฮฒ} -> (A : Set ฮฑ) -> (A -> Set ฮฒ) -> Set (ฮฑ โŠ” ฮฒ) W = readData Wโ€ฒ pattern sup x g = !#โ‚€ (relv x , g , lrefl) elimW : โˆ€ {ฮฑ ฮฒ ฯ€} {A : Set ฮฑ} {B ...
{-# OPTIONS --safe --warning=error #-} open import Agda.Primitive using (Level; lzero; lsuc; _โŠ”_) open import LogicalFormulae open import Logic.PropositionalLogic module ExampleSheets.LogicAndSets.Sheet1 where q1i : {a : _} {A : Set a} โ†’ (p1 p2 p3 : Propositions A) โ†’ Tautology (implies (implies p1 (implies p2 p3))...
module Numeral.Natural.Oper.Modulo.Proofs.Elim where import Lvl open import Data.Boolean.Stmt open import Logic.Propositional open import Numeral.Natural open import Numeral.Natural.Inductions open import Numeral.Natural.Oper open import Numeral.Natural.Oper.Comparisons open import Numeral.Natural.Oper.DivMod.Proofs o...
module Structure.Container.Iterable where import Lvl open import Data open import Data.Boolean open import Data.Option open import Data.Tuple as Tuple using (_โจฏ_ ; _,_) open import Functional import Structure.Container.IndexedIterable open import Type private variable โ„“ โ„“โ‚‘ โ„“โ‚‘โ‚ โ„“โ‚‘โ‚‚ : Lvl.Level private variab...
-- Private signatures module Issue476d where module M where private record R : Setโ‚ record R where field X : Set Q : Setโ‚ Q = M.R
-- {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v term:20 -v term.function:30 #-} -- Andreas, 2015-05-31, issue reported by Bruno Bianchi module Issue1530 {A : Set}(_<=_ : A -> A -> Set) where open import Common.List open import Issue1530.Bound _<=_ data OList : Bound -> Set where nil : {b : Bound} -> OList b ...
-- Andreas, 2019-08-17, issue #1346 open import Issue1346 -- Repeating the definitions of Issue1346.agda private testโ‚ : Listโบ Bool testโ‚ = true โˆท false โˆท [] -- mixing _โˆท_ of _ร—_ and List testโ‚‚ : โˆ€{A : Set} โ†’ A โ†’ List A ร— Listโบ A ร— Listโบ A testโ‚‚ a = [] , a โˆท [] , a โˆท a โˆท [] -- mixing _,_ and _โˆท_ of _ร—_
firstTrue : (f : โ„• โ†’ Bool) โ†’ โˆƒ (ฮป n โ†’ f n โ‰ก true) โ†’ โ„• firstTrue f prf = mp-โ„• firstTrue-true : firstTrue f prf โ‰ก n โ†’ f n โ‰ก true firstTrue-true = ? firstTrue-false : firstTrue f prf โ‰ก n โ†’ โˆ€ m โ†’ m < n โ†’ f m โ‰ก false firstTrue-false = ?
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-} module Cubical.ZCohomology.Groups.RP2 where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.GroupStructure open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.Groups.KleinBottle open import C...
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Consequences.Consistency where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definition.LogicalRelation open import Definition.LogicalRelation.Irrelev...
{-# OPTIONS --cubical #-} open import Agda.Builtin.Nat open import Agda.Builtin.Cubical.Path postulate admit : โˆ€ {A : Set} โ†’ A data Z : Set where pos : Nat โ†’ Z neg : Nat โ†’ Z sameZero : pos 0 โ‰ก neg 0 _+Z_ : Z โ†’ Z โ†’ Z pos x +Z pos y = admit pos x +Z neg y = admit pos x +Z sa...
module Stable where open import Data.Product using (_ร—_; projโ‚; projโ‚‚) renaming (_,_ to โŸจ_,_โŸฉ) open import Negation using (ยฌ_; ยฌยฌยฌ-elim) Stable : Set โ†’ Set Stable A = ยฌ ยฌ A โ†’ A ยฌ-stable : โˆ€ {A : Set} โ†’ Stable (ยฌ A) ยฌ-stable = ฮป ยฌยฌยฌa โ†’ (ฮป a โ†’ ยฌยฌยฌa (ฮป ยฌa โ†’ ยฌa a)) -- ยฌ-stable = ยฌยฌยฌ-elim ร—-stable : โˆ€ {A B : Set} โ†’ Sta...
data Term (V : Set) : Set where App : Term V -> Term V -> Term V Abs : (V -> Term V) -> Term V -- ouch, posititity.
{-# OPTIONS --without-K --safe #-} module Fragment.Examples.Semigroup.Arith.Atomic where open import Fragment.Examples.Semigroup.Arith.Base -- Fully dynamic associativity dyn-assocโ‚ : โˆ€ {m n o} โ†’ (m + n) + o โ‰ก m + (n + o) dyn-assocโ‚ = fragment SemigroupFrex +-semigroup dyn-assocโ‚‚ : โˆ€ {m n o p} โ†’ ((m + n) + o) + p ...
-- Andreas, 2012-11-18 see issue 761 module AbstractMutual where module MA where mutual abstract -- accepted S : Setโ‚ S = T T : Setโ‚ T = Set module AM where abstract -- rejected before, should also be accepted mutual S : Setโ‚ S = T T : Setโ‚ T = Set
{-# OPTIONS --safe --warning=error #-} open import LogicalFormulae open import Orders open import Groups.Groups open import Numbers.Naturals.Naturals open import Numbers.Naturals.WithK open import Numbers.Primes.PrimeNumbers open import Rings.Definition open import Setoids.Setoids open import Numbers.Modulo.IntegersMo...
open import Type module Graph.Properties where open import Functional open import Function.Equals open import Lang.Instance open import Logic open import Logic.Propositional import Lvl open import Graph open import Relator.Equals open import Relator.Equals.Proofs.Equiv open import Structure.Setoid.Uniqueness ope...
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Unit module Oscar.Class.Surjection where module Surjection {๐”ฌโ‚} (๐”’โ‚ : ร˜ ๐”ฌโ‚) {๐”ฌโ‚‚} (๐”’โ‚‚ : ร˜ ๐”ฌโ‚‚) = โ„ญLASS (๐”’โ‚ , ๐”’โ‚‚) (๐”’โ‚ โ†’ ๐”’โ‚‚) module _ {๐”ฌโ‚} {๐”’โ‚ : ร˜ ๐”ฌโ‚} {๐”ฌโ‚‚} {๐”’โ‚‚ : ร˜ ๐”ฌโ‚‚} where surjection = Surjection.method ๐”’โ‚ ๐”’โ‚‚ i...
-- 2014-09-19 -- Reported by Mateusz Kowalczyk. good : Setโ‚ good = let -- F : _ -- worked if you added the type signature F X = X in F Set -- Now works without the type signature.
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommRing.Instances.MultivariatePoly where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat renaming(_+_ to _+n_; _ยท_ to _ยทn_) open import Cubical.Data.Vec open import Cubical.Algebra.Ring open import Cubical.Algebra.Co...
test = forall _0_ โ†’ Set
module Human.List where open import Human.Nat infixr 5 _,_ data List {a} (A : Set a) : Set a where end : List A _,_ : (x : A) (xs : List A) โ†’ List A {-# BUILTIN LIST List #-} {-# COMPILE JS List = function(x,v) { if (x.length < 1) { return v["[]"](); } else { return v["_โˆท_"](x[0], x.slice(1)); } } #-} {-# COMP...
module Auxiliary where open import Agda.Primitive open import Data.List open import Data.Nat renaming (_+_ to _+แดบ_ ; _โ‰ค_ to _โ‰คแดบ_ ; _โ‰ฅ_ to _โ‰ฅแดบ_ ; _<_ to _<แดบ_ ; _>_ to _>แดบ_) open import Data.Nat.Properties open import Data.Integer renaming (_+_ to _+แถป_ ; _โ‰ค_ to _โ‰คแถป_ ; _โ‰ฅ_ to _โ‰ฅแถป_ ; _<_ to _<แถป_ ; _>_ to _>แถป_) import Dat...
{-# OPTIONS --experimental-irrelevance #-} module ShapeIrrelevantParameterNoBecauseOfRecursion where data โŠฅ : Set where record โŠค : Set where data Bool : Set where true false : Bool True : Bool โ†’ Set True false = โŠฅ True true = โŠค data D ..(b : Bool) : Set where c : True b โ†’ D b -- should fail -- Jesper, 2017-0...
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- Definition of Monoidal Category -- Big design decision that differs from the previous version: -- Do not go through "Functor.Power" to encode variables and work -- at the level of NaturalIsomorphisms, instead work at the object/morphism -- level, v...
module Prelude.Show where open import Prelude.Unit open import Prelude.String open import Prelude.Char open import Prelude.Nat open import Prelude.Int open import Prelude.Word open import Prelude.Function open import Prelude.List open import Prelude.Fin open import Prelude.Vec open import Prelude.Maybe open import Pr...
{-# OPTIONS --prop #-} open import Agda.Builtin.Reflection open import Agda.Builtin.List open import Agda.Builtin.Unit _>>=_ = bindTC return = returnTC postulate X : Prop xโ‚€ : X f : X f = xโ‚€ macro getValue : Name โ†’ Term โ†’ TC โŠค getValue s _ = do function (clause _ _ t โˆท []) โ† getDefinition s where ...
------------------------------------------------------------------------------ -- Equality on Conat ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NType2 open import lib.Equivalence2 open import lib.path-seq.Rotations open import lib.types.Unit open import lib.types.Nat open import lib.types.Pi open import lib.types.Pointed open import lib.types.Sigma open import lib.types.Paths open ...
{-# OPTIONS --without-K #-} module FiniteType where open import Equiv using (_โ‰ƒ_) open import Data.Product using (ฮฃ; _,_) open import Data.Nat using (โ„•) open import Data.Fin using (Fin) -------------------------------------------------------------------------- -- -- A finite type is a type which is equivalent to Fin...
{-# OPTIONS --copatterns #-} module IOExampleGraphicsDrawingProgramWhenJust where open import Data.Bool.Base open import Data.Char.Base renaming (primCharEquality to charEquality) open import Data.Nat.Base hiding (_โ‰Ÿ_;_โŠ“_; _+_; _*_) open import Data.List.Base hiding (_++_) open import Data.Integer.Base hiding (suc) ...
module Miscellaneous.associative-side where private variable T : Set private variable _โ–ซ_ : T โ†’ T โ†’ T private variable id : T data _โ‰ก_ {โ„“}{T : Set(โ„“)} : T โ†’ T โ†’ Set(โ„“) where [โ‰ก]-intro : โˆ€{x : T} โ†’ (x โ‰ก x) Associativity : (T โ†’ T โ†’ T) โ†’ Set Associativity(_โ–ซ_) = โˆ€{a b c} โ†’ ((a โ–ซ (b โ–ซ c)) โ‰ก ((a โ–ซ b) โ–ซ c)) Identityโ‚— :...
open import Common.Level postulate โ„“ : Level data D : Set (lsuc โ„“) where c : (โ„“ : Level) โ†’ Set โ„“ โ†’ D -- Bad error: -- The type of the constructor does not fit in the sort of the -- datatype, since Set (lsuc โ„“) is not less or equal than Set (lsuc โ„“) -- when checking the constructor c in the declaration of D
------------------------------------------------------------------------ -- Typing of pure type systems (PTS) ------------------------------------------------------------------------ module Pts.Typing where open import Data.Fin using (Fin; zero) open import Data.Fin.Substitution open import Data.Fin.Substitution.Lemm...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Category.Complete.Finitely {o โ„“ e} (C : Category o โ„“ e) where open import Level open import Categories.Category.Cartesian C open import Categories.Diagram.Equalizer C open import Categories.Diagram.Pullback C open Category C reco...
{-# OPTIONS --without-K --safe #-} module Categories.Functor where open import Level open import Data.Product using (_ร—_; ฮฃ) open import Function.Surjection using (Surjective) open import Function.Equality using (_โŸถ_) open import Relation.Nullary open import Categories.Category open import Categories.Functor.Core pub...
{-# OPTIONS --safe --without-K #-} open import Relation.Binary.PropositionalEquality using (_โ‰ก_; refl; sym; cong) open import Relation.Nullary using (Dec; yes; no) import Data.Product as Product import Data.Sum as Sum import Data.Nat as โ„• import Data.Nat.Properties as โ„•โ‚š open Product using (โˆƒ-syntax; _,_) open Sum u...
{- Types Summer School 2007 Bertinoro Aug 19 - 31, 2007 Agda Ulf Norell -} module Parity where open import Nat -- Parity n tells us whether n is even or odd. data Parity : Nat -> Set where even : (k : Nat) -> Parity (2 * k) odd : ...
{-# OPTIONS --without-K #-} module Util.HoTT.HLevel where open import Util.HoTT.HLevel.Core public open import Util.HoTT.Equiv open import Util.HoTT.FunctionalExtensionality open import Util.HoTT.Homotopy open import Util.HoTT.Univalence.Axiom open import Util.Prelude open import Util.Relation.Binary.PropositionalEqu...
{-# OPTIONS --without-K --safe #-} module Experiment.FingerTree where open import Level renaming (zero to lzero ; suc to lsuc) open import Algebra open import Experiment.FingerTree.Common data Digit {a} (A : Set a) : Set a where one : (a : A) โ†’ Digit A two : (a b : A) โ†’ Digit A three : (a b c :...
module string where open import bool open import eq open import char open import list open import nat open import unit ---------------------------------------------------------------------- -- datatypes ---------------------------------------------------------------------- postulate string : Set {-# BUILTIN STRIN...
-- Andreas, 2019-02-23, issue #3586, reported by mcoblenz shrunk by G. Allais -- WAS: Internal error in ConcreteToAbstract. -- {-# OPTIONS -v scope.pat:60 #-} infixl 5 ^_ data D : Set where ^_ : D โ†’ D postulate _^_ : D โ†’ D โ†’ D foo : D โ†’ Set foo x@(y ^ z) = D -- The term "y ^ z" is parsed as operator pattern (...
------------------------------------------------------------------------------ -- Lists ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K...
-- Andrea(s), 2018-11-23, issue #3378 -- -- WAS: internal error in coverage checker and clause compiler -- for missing hcomp clauses triggered by non-exact splitting. {-# OPTIONS --cubical #-} -- {-# OPTIONS -v tc.cover:10 #-} open import Agda.Builtin.Cubical.Path open import Agda.Builtin.Unit data Interval : Set w...
{-# OPTIONS --show-implicit #-} data Bool : Set where true : Bool false : Bool data D : Set where d : D data E : Set where e : E HSet : Setโ‚ HSet = {b : Bool} โ†’ Set -- Here HA is HSet -- The output of this function is the set E, for input HSet G. โŠจ_ : HSet โ†’ Set โŠจ_ HA = HA {true} G : HSet G {true} = E G {...
{-# OPTIONS --without-K #-} module Perm where -- Definitions for permutations in the Cauchy representation open import Level using (Level; _โŠ”_) renaming (zero to lzero; suc to lsuc) open import Relation.Unary using (Pred) renaming (Decidable to UnaryDecidable) open import Relation.Binary.PropositionalEquality ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pointwise lifting of relations to lists ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Pointwise where open import ...
{-# OPTIONS --safe --warning=error --without-K #-} open import Functions.Definition open import Orders.WellFounded.Definition module Orders.WellFounded.Induction {a b : _} {A : Set a} {_<_ : Rel {a} {b} A} (wf : WellFounded _<_) where private foldAcc : {c : _} (P : A โ†’ Set c) โ†’ (โˆ€ x โ†’ (โˆ€ y โ†’ y < x โ†’ P ...
module DecidableMembership where open import OscarPrelude open import Membership open import Successor record DecidableMembership {โ„“} (m : Set โ„“) (M : Set โ„“) โฆƒ _ : Membership m M โฆ„ : Set (โŠน โ„“) where field _โˆˆ?_ : (x : m) โ†’ (X : M) โ†’ Dec $ x โˆˆ X field _โˆ‰?_ : (x : m) โ†’ (X : M) โ†’ Dec $ x โˆ‰ X open DecidableMembersh...
------------------------------------------------------------------------ -- The Agda standard library -- -- The Delay type and some operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} module Codata.Delay where open import Size open impo...