text
stringlengths
4
690k
{- NEW INTERP WITH RREC -} {-# OPTIONS --no-termination-check #-} open import Preliminaries open import Preorder open import Pilot-WithFlatrec module Interp-WithFlatrec where -- interpret complexity types as preorders [_]t : CTp → PREORDER [ unit ]t = unit-p [ nat ]t = Nat , ♭nat-p [ τ ->c τ₁ ]t = [ τ ]t ...
------------------------------------------------------------------------ -- The Agda standard library -- -- AVL trees ------------------------------------------------------------------------ -- AVL trees are balanced binary search trees. -- The search tree invariant is specified using the technique -- described by Co...
module Issue4260.M where postulate F : Set → Set syntax F X = G X
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} open import Light.Library.Data.Integer as ℤ using (ℤ ; zero ; successor) open import Light.Package using (Package) module Light.Literals.Integer ⦃ package : Package record { ℤ } ⦄ where open import Light.Literals.Definition.Natural using...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Int.Base where open import Cubical.Core.Everything open import Cubical.Data.Nat data Int : Type₀ where pos : (n : ℕ) → Int negsuc : (n : ℕ) → Int sucInt : Int → Int sucInt (pos n) = pos (suc n) sucInt (negsuc zero) = pos zero sucInt (negsuc (su...
open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ; trans ; subst ; subst₂ ; cong ; cong₂ ) open import AssocFree.Util using ( δsubst₂ ) import AssocFree.STLambdaC.Typ import AssocFree.STLambdaC.Exp import AssocFree.STLambdaC.NF import AssocFree.STLambdaC.Redn module AssocFree.STLambdaC.E...
module Duploid.Functor where open import Preduploid open import Duploid import Preduploid.Functor as PF open import Level record Functor {o₁ ℓ₁ o₂ ℓ₂} (𝒞 : Duploid o₁ ℓ₁) (𝒟 : Duploid o₂ ℓ₂) : Set (levelOfTerm 𝒞 ⊔ levelOfTerm 𝒟) where private module 𝒞 = Duploid.Duploid 𝒞 module 𝒟 = Duploid.Duploid...
{-# OPTIONS --cubical --safe #-} module Cubical.Structures.Ring 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.NA...
open import Common.Prelude hiding (_>>=_) open import Common.Reflection open import Common.Equality open import Agda.Builtin.Sigma record Functor (F : Set → Set) : Set₁ where field fmap : ∀ {A B} → (A → B) → F A → F B IdF : Functor (λ A → A) unquoteDef IdF = defineFun IdF (clause (("x" , vArg unknown) ∷ ("f"...
open import Agda.Builtin.Reflection open import Agda.Builtin.Unit open import Agda.Builtin.String infixr 4 _>>=_ _>>=_ = bindTC login : String → String login "secret" = "access granted" login _ = "access denied" macro getDef : Name → Term → TC ⊤ getDef f hole = getDefinition f >>= λ def → quoteTC def...
module Everything where import Prelude import Category -------------------------------------------------------------------------------- -- The syntax of STLC. import STLC.Syntax -- A simplification of Coquand 2002, -- with de Bruijn indices and implicit substitutions. import STLC.Coquand.Renaming import STLC.Coqu...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Implementation.Standard.Relation.Sets where open import Light.Level using (_⊔_) open import Light.Variable.Levels open import Light.Variable.Sets open import Light.Library.Relation using (Base ; Kind ; Style) open import Ligh...
-- Agda program using the Iowa Agda library open import bool module PROOF-permlength (Choice : Set) (choose : Choice → 𝔹) (lchoice : Choice → Choice) (rchoice : Choice → Choice) where open import eq open import bool open import nat open import list open import maybe --------------------------------------...
module SHE-Prelude where record Functor (T : Set -> Set) : Set1 where field -- OPERATIONS ---------------------------------------------- map : forall {X Y} -> (X -> Y) -> T X -> T Y record Applicative (T : Set -> Set) : Set1 where field -- OPERATIONS ---------------------------------------------- ...
-- Note that this module assumes function extensionality module guarded-recursion.prelude where open import Level public using (_⊔_) renaming (zero to ₀ ;suc to ₛ) open import Function public using (id; _∘_; _∘′_) open impor...
module Categories.Terminal where open import Library open import Categories open import Categories.Sets open Cat record Term {a b} (C : Cat {a}{b})(T : Obj C) : Set (a ⊔ b) where constructor term field t : ∀{X} → Hom C X T law : ∀{X}{f : Hom C X T} → t {X} ≅ f OneSet : Term Sets ⊤ OneSet = record {t = λ ...
import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} {- Addition -} _+_ : ℕ → ℕ → ℕ zero + n = n (suc m) + n = suc (m + n) _ : 3 + 4 ≡ 7 _ = begin 3 + 4 ≡⟨⟩ ...
module String where import Lvl open import Data.Boolean open import Data.List open import Numeral.Natural open import Type postulate Char : Type{Lvl.𝟎} {-# BUILTIN CHAR Char #-} postulate String : Type{Lvl.𝟎} {-# BUILTIN STRING String #-} private module Primitives where primitive primStringToList : S...
{- This file describes properties of computable relations. -} open import bool open import level open import eq open import product open import product-thms module relations {ℓ ℓ' : level}{A : Set ℓ} (_≥A_ : A → A → Set ℓ') where reflexive : Set (ℓ ⊔ ℓ') reflexive = ∀ {a : A} → a ≥A a transitive : Set (ℓ ⊔ ℓ') tra...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Type where open import Cubical.Foundations.Prelude open import Cubical.Categories.Category open Precategory module _ ℓ where TYPE : Precategory (ℓ-suc ℓ) ℓ TYPE .ob = Type ℓ TYPE .Hom[_,_] A B = A → B TYPE .id A = λ x → x TYPE ....
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness --no-subtyping #-} module Agda.Builtin.Reflection.Properties where open import Agda.Builtin.Reflection open import Agda.Builtin.Equality primitive primMetaToNatInjective : ∀ a b → primMetaToNat a ≡ primMetaToNat b → a ≡ b primQNameToWo...
------------------------------------------------------------------------ -- Some theory of equivalences with erased "proofs", developed using -- Cubical Agda ------------------------------------------------------------------------ -- This module instantiates and reexports code from -- Equivalence.Erased. {-# OPTIONS ...
{-# OPTIONS --without-K --safe #-} -- Defines Restriction Category -- https://ncatlab.org/nlab/show/restriction+category -- but see also -- https://github.com/jmchapman/restriction-categories -- Notation choice: one of the interpretations is that the -- restriction structure captures the "domain of definedness" -...
module Formalization.LambdaCalculus where import Lvl open import Data open import Numeral.Natural open import Numeral.Finite open import Syntax.Number open import Type -- A lambda term (A term in the language of lambda calculus). -- This is encoded with an abstraction depth which ensures that every term is well-...
module ctxt-types where open import lib open import cedille-types open import general-util open import syntax-util location : Set location = string × posinfo -- file path and starting position in the file -- file path and starting / ending position in file span-location = string × posinfo × posinfo -- missing loca...
-- {-# OPTIONS -v tc.cover.split.con:100 #-} {-# OPTIONS --show-implicit #-} data D : Set where d : {x : D} → D f : D → Set f y = {!!}
open import Sec2 data Vec (A : Set) : ℕ → Set where [] : Vec A Z _∷_ : {n : ℕ} → A → Vec A n → Vec A (S n) head : {A : Set} → {n : ℕ} → Vec A (S n) → A head (x ∷ vs) = x tail : {A : Set} → {n : ℕ} → Vec A (S n) → Vec A n tail (x ∷ vs) = vs map : {A B : Set} → {n : ℕ} → (f : A → B) → Vec A n → Vec B n map f [] ...
module x02-842Induction-hc-2 where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_) -- PLFA coverage of identity, associativity, commutativity, distributivity. -- + associativ...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Groupoids where -- The category of groupoids. -- -- This category should maybe be called "Ho(Groupoids)" or "Ho(Gpd)" -- instead. The "homsets" are not the "usual" ones consisting of -- functors, but consist instead of equivalence classes of funct...
{-# OPTIONS --safe #-} module Cubical.Algebra.DistLattice where open import Cubical.Algebra.DistLattice.Base public
-- Andreas, 2016-04-14 Issue 1821 -- pts rule for SizeUniv not implemented properly open import Common.Size open import Common.Equality record Reveal_·_is_ {A : Set} {B : A → Set} (f : (x : A) → B x) (x : A) (y : B x) : Set where constructor [_] field eq : f x ≡ y inspect...
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import LogicalFormulae open import Functions.Definition open import Numbers.Naturals.Definition open import Sets.FinSet.Definition open import Setoids.Setoids module Setoids.Cardinality.Infinite.Definiti...
module Properties.Dec where data ⊥ : Set where data Dec(A : Set) : Set where yes : A → Dec A no : (A → ⊥) → Dec A
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Magma.Morphism where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Functions.Embedding open import Cubical.Algebra private variable m n : Level IsMagmaHom : (M : Magma m) (N : Magma n)...
{-# OPTIONS --without-K #-} module Piston where open import Data.Fin using (#_) open import Data.List using (List; map; _∷_; []; concatMap; zip; drop; length; replicate; intercalate) open import Data.Maybe using (Maybe; fromMaybe) open import Data.Nat using (ℕ) open import Data.Product using (_×_; proj₁;...
module A where postulate A : Set
module Data.Any where import Lvl open import Type -- A type that can hold a value of any type. record Any {ℓ} : Type{Lvl.𝐒(ℓ)} where constructor intro field {type} : Type{ℓ} value : type map : ∀{T : Type{ℓ}} → (type → T) → Any{ℓ} map f = record{value = f(value)} -- A type that can hold a valu...
module List.Permutation.Base.Equivalence (A : Set) where open import List.Permutation.Base A open import Data.List open import Data.Product renaming (_×_ to _∧_) refl∼ : {xs : List A} → xs ∼ xs refl∼ {[]} = ∼[] refl∼ {x ∷ xs} = ∼x /head /head refl∼ sym∼ : {xs ys : List A} → xs ∼ ys → ys ∼ xs sym∼ ∼[] = ∼[] sym...
{- This file contains: - the abelianization of groups as a HIT as proposed in https://arxiv.org/abs/2007.05833 The definition of the abelianization is not as a set-quotient, since the relation of abelianization is cumbersome to work with. -} {-# OPTIONS --safe #-} module Cubical.Algebra.Group.Abelianization.Prop...
{-# OPTIONS --copatterns #-} module IOExampleGraphicsMovingText where -- -- not yet updated for new SizedIO library -- not yet updated to change with IOInterface Record of Commands / Responses -- {- open import SizedIO.General open import SizedIO.IOGraphicsLib -- TODO open import Data.Bool.Base open import Data....
open import Data.Empty open import Data.List renaming (_∷_ to _∷ₗ_ ; [_] to [_]ₗ) open import Data.Maybe open import Data.Product open import Data.Sum open import Data.Unit open import AEff open import AwaitingComputations open import EffectAnnotations open import Preservation open import ProcessPreservation open impo...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRingSolver.Solver where open import Cubical.Foundations.Prelude open import Cubical.Data.FinData open import Cubical.Data.Nat using (ℕ) open import Cubical.Data.Nat.Order using (zero-≤) open import Cubical.Data.Vec.Base open import Cubical.Algebra.CommRing open import...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Diagram.Pullback {o ℓ e} (C : Category o ℓ e) where open Category C open HomReasoning open import Level open import Data.Product using (_,_; ∃) open import Function using (flip; _$_) renaming (_∘_ to _●_) open import Categories.Morp...
-- Environment model of the STLC module STLC.Model where open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core open import SOAS.Families.Build open import SOAS.ContextMaps.Inductive open import SOAS.Abstract.Monoid open import SOAS.Coalgebraic.Lift open import STLC...
-- Andreas, 2016-12-12, issue #2046, reported by Nad -- Parameter refinement broke the size solver. -- {-# OPTIONS -v tc.size.solve:100 #-} -- {-# OPTIONS -v tc.constr.cast:100 #-} -- -- {-# OPTIONS -v tc.sig.param:60 #-} -- -- {-# OPTIONS -v tc.check.internal:100 #-} -- -- {-# OPTIONS -v interaction.give:100 #-} ope...
{- Matrix with coefficients in integers -} {-# OPTIONS --safe #-} module Cubical.Algebra.IntegerMatrix.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function hiding (const) open import Cubical.Foundations.Powerset open import Cubical.Data.Nat hiding (_·_) renaming (_+_ to ...
{-# OPTIONS --exact-split #-} -- The --exact-split flag causes Agda to raise an error whenever -- a clause in a definition by pattern matching cannot be made to -- hold definitionally (i.e. as a reduction rule). Specific clauses -- can be excluded from this check by means of the {-# CATCHALL #-} -- pragma. module Exa...
module Numeral.Finite.Conversions where import Lvl open import Data using (Empty ; Unit ; <>) open import Data.Boolean using (Bool ; 𝐹 ; 𝑇) open import Data.Tuple using (_,_) open import Logic.Propositional using (_↔_) open import Numeral.Finite open import Numeral.Natural open import Syntax.Number private var...
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Equivalence module HoTT.Equivalence.Lift where open variables Lift-equiv : Lift {i} A ≃ A Lift-equiv = iso→eqv λ{.f → lower ; .g → lift ; .η _ → refl ; .ε _ → refl} where open Iso
module prelude where open import level public open import product public open import product-thms public open import sum public open import empty public open import unit public open import functions renaming (id to id-set) public open import eq public open import list public open import list-thms public open import bo...
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Transitivity module Oscar.Class.Transitivity.Function where module _ {a} where instance 𝓣ransitivityFunction : Transitivity.class Function⟦ a ⟧ 𝓣ransitivityFunction .⋆ f g = g ∘ f
{-# OPTIONS --safe --warning=error --without-K #-} open import Functions.Definition open import LogicalFormulae open import Numbers.Naturals.Definition open import Sets.FinSet.Definition module Sets.Cardinality.Infinite.Definition where InfiniteSet : {a : _} (A : Set a) → Set a InfiniteSet A = (n : ℕ) → (f : FinSet ...
open import Agda.Builtin.Nat open import Agda.Builtin.Equality pathological : (e : 9999999999 ≡ 9999999999) → Set pathological refl = Nat
------------------------------------------------------------------------ -- The Agda standard library -- -- Container combinators ------------------------------------------------------------------------ module Data.Container.Combinator where open import Data.Container open import Data.Empty using (⊥; ⊥-elim) open imp...
test : Set → Set test A with A test | B = B
module Sec4 where -- open import Sec2 Prop : Set₁ Prop = Set Value : Set₁ Value = Set -- XXX: The true type data ⊤ : Prop where ⋆ : ⊤ -- XXX: The false type data ⊥ : Prop where -- XXX: Conjunction of Propositions data _∧_ (A B : Prop) : Prop where and : A → B → (A ∧ B) -- XXX: The disjuction of propositions d...
{-# OPTIONS --universe-polymorphism #-} module Categories.Cocone where open import Level open import Categories.Category open import Categories.Functor hiding (_≡_; _∘_) record Cocone {o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) : Set (o ⊔ ℓ ⊔ e ⊔ o′ ⊔ ℓ′) where module J = Cate...
------------------------------------------------------------------------ -- Up-to techniques, compatibility, size-preserving functions, and the -- companion ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} -- The definitions below are parametrised by an indexed co...
module Homogenous.Reflexivity where import Homogenous.Base import Homogenous.Equality open Homogenous.Base using(Arity; Sig; Fa; Fa1; F; F1; T; It; FIHa; FIH; R) open Homogenous.Equality using(equal; eq_step; eq_step'; eq_step_ar) import PolyDepPrelude open PolyDepPrelude using(Bool; true; false; True; ...
open import Agda.Builtin.Bool test : (true : Bool) → Set test = {!!} -- C-c C-c
{-# OPTIONS --without-K #-} module sets.nat.ordering.leq.core where open import decidable open import equality.core open import function.core open import sets.nat.core open import sets.empty data _≤_ : ℕ → ℕ → Set where z≤n : ∀ {n} → zero ≤ n s≤s : ∀ {m n} (p : m ≤ n) → suc m ≤ suc n ap-pred-≤ : ∀ {n m} → suc n ...
-- You can't define the same module twice. module ClashingModule where module A where module A where open A
module Nat where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} _+_ : ℕ → ℕ → ℕ zero + n = n (suc m) + n = suc (m + n) _ : 2 + 3 ≡ 5 _ = begin 2 + 3 ≡⟨⟩ ...
{- This example goes through now that we allow instantiation of blocked terms #-} module Issue439 where record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field p₁ : A p₂ : B p₁ open Σ record ⊤ : Set where data Tree : Set where leaf : Tree node : Tree → Tree → Tree mutual U : Tree → Set U...
{-# OPTIONS --without-K --safe #-} module Data.Quiver.Paths where -- Paths in a Quiver. -- -- This is almost the same as the 'paths' in a relation, as defined in -- Relation.Binary.Construct.Closure.ReflexiveTransitive -- but here the relation is typed, and that has to be respected. So this -- is somewhat duplicated ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Base definitions for the right-biased universe-sensitive functor -- and monad instances for the Product type. -- -- To minimize the universe level of the RawFunctor, we require that -- elements of B are "lifted" ...
{-# OPTIONS --no-positivity-check #-} module Section4a where open import Section3 public -- 4. The semantic model -- ===================== -- -- As we want to deal with full conversion on open terms and the η-rule, we choose to describe -- the semantics in a Kripke style model [6, 11, 15]. A Kripke model is a set ...
{-# OPTIONS --without-K #-} module sets.list where open import sets.list.core public
module UnicodeSetIndex where X : Set₁₄₀ X = Set₁₃₉
-- Andreas, 2015-05-09 trigger some option errors {-# OPTIONS --dont-termination-check --not-termination-check --without-K=4 --without-k --senf-gurke #-} {- Expected error: Unrecognized options: --dont-termination-check (did you mean --no-termination-check ?) --not-termination-check (did you mean --no-ter...
module utility where open import Algebra using (Monoid) open import Algebra.Structures using (IsMonoid ; IsSemigroup) open import Data.Empty open import Function using (_∘_) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality using (_≡_ ; refl ; setoid ; sym ; cong...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties, related to reflexive transitive closures, that rely on -- the K rule ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Relation.Binary...
{-# OPTIONS --without-K #-} module PointedTypes where open import Agda.Prim open import Data.Unit open import Data.Bool open import Data.Nat hiding (_⊔_) open import Data.Sum open import Data.Product open import Function open import Relation.Binary.PropositionalEquality ---------------------------------------------...
------------------------------------------------------------------------------ -- Properties for the equality on Conat ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorph...
{- Product of structures S and T: X ↦ S X × T X -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.Relational.Product where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Structure open...
module Issue498b where record ⊤ : Set where constructor tt postulate U : Set → Set pr : ∀ {A} → A → U A _*_ : ∀ {A B} → U A → (A → U B) → U B module M (I : Set)(J : I → Set)(K : (i : I)(j : J i) → Set) where data D (P : I → Set) : I → Set where r : ∀ {i} → P i → D P i d : (i : I)(j : J i) ...
-- Andreas, 2016-10-08 issue #2243 -- This is a test case reported at #708 by pepijnkokke open import Common.Bool using (Bool; true; false) open import Common.Reflection using (QName) example : QName → Bool example (quote Bool) = true example (quote Bool) = false example _ = false
module Data.Unsigned where open import Data.Bit using (Bit ; b0 ; b1 ; Bits-num ; Overflowing ; _overflow:_ ; result ; carry ; WithCarry ; _with-carry:_ ; toBool ; tryToFinₙ ; !ₙ ) renaming ( _+_ to bit+ ; _-_ to bit- ; ! to bit! ; _&_ to bit& ; _~|_ to bit| ; _^_ to bit^ ; _>...
{-# OPTIONS --without-K --safe #-} module Definition.Conversion.Universe where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.RedSteps open import Definition.Conversion open import Definition.Conversion.Reduction open import Definition....
{-# OPTIONS --without-K #-} {- Here, we derive our main theorem: there is a type in the n-th universe that is not an n-type, implying the n-th universe is not n-truncated. The n-th universe restricted to n-types is hence a 'strict' n-type. For this, we first derive local-global looping in a modular way. A...
module Issue478c where record Ko (Q : Set) : Set₁ where field T : Set foo : (Q : Set)(ko : Ko Q) → Ko.T ko foo Q ko = Set -- We should make sure not to destroy printing -- outside the record module. Type should be -- printed as it's given: Ko.T ko
module NoSuchPrimitiveFunction where postulate X : Set primitive fooBar : X
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Change Structures. -- -- This module defines the notion of change structures, -- as well as change structures for groups, functions and lists. -- -- This module corresponds to Section 2 of the PLDI paper. ----------...
module Web.URI.Port.Primitive where postulate Port? : Set {-# COMPILED_TYPE Port? String #-} postulate :80 : Port? {-# COMPILED :80 ":80" #-} postulate ε : Port? {-# COMPILED ε "" #-}
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything module Cubical.Algebra.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Relation.Binary.Base using (Rel) open import Cubical.Relation.Binary.Definitions open imp...
{- Macros (autoDesc, AutoStructure, AutoEquivStr, autoUnivalentStr) for automatically generating structure definitions. For example: autoDesc (λ (X : Type₀) → X → X × ℕ) ↦ function+ var (var , constant ℕ) We prefer to use the constant structure whenever possible, e.g., [autoDesc (λ (X : Type₀) → ℕ → ℕ)] is [c...
{- Please do not move this file. Changes should only be made if necessary. This file contains benchmarks for the paper: Synthetic Cohomology Theory in Cubical Agda Command to run the benchmarks and get timings: agda -v profile.definitions:10 Benchmarks.agda This assumes that there is no Benchmarks.agdai file. If...
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Instance.Core where -- Core Functor (from Cats to Groupoids). -- This is the right-adjoint of the forgetful functor from Groupoids to -- Cats (see Categories.Functor.Adjoint.Instance.Core) open import Level using (_⊔_) open import Categories.Category usin...
------------------------------------------------------------------------ -- The Agda standard library -- -- Results concerning the excluded middle axiom. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Axiom.ExcludedMiddle where open import Level ope...
module CyclicModuleDependency where import CyclicModuleDependency
-- Andreas, 2013-05-02 This ain't a bug, it is a feature. -- {-# OPTIONS -v scope.name:10 #-} -- {-# OPTIONS -v scope:10 #-} -- {-# OPTIONS -v scope.mod.inst:30 #-} module _ where module M (_ : Set₁) where record R : Set₁ where field X : Set open M Set using (R) X : R → Set X = R.X -- A glimpse at the ...
-- There was a bug where the arguments to a let function got reversed. module LetLHS where f : {A B : Set} -> A -> B -> A f {A}{B} = let const : A -> B -> A const x y = x in const
------------------------------------------------------------------------------ -- Testing the translation of the propositional functions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-...
module Examples.Max where open import Data.Empty open import Data.Bool open import Data.Nat open import Data.Product open import Data.List hiding (sum) open import Data.Vec hiding (init) open import Relation.Nullary open import Relation.Binary.PropositionalEquality import DTGP data Word : Set where nat : ℕ → Word ...
------------------------------------------------------------------------------ -- Testing the use of numeric literals ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphi...
module RW.Data.RTrie where open import RW.Data.RTrie.Decl public open import RW.Data.RTrie.Insert using (insertTerm) public open import RW.Data.RTrie.Lookup renaming (lookup to lookupTerm) public
open import Data.String using ( String ) open import Data.ByteString using ( ByteString ; Style ; lazy ; strict ) open import Data.ByteString.UTF8 using ( toString ; fromString ) open import System.IO.Primitive using ( HandleR ; HandleW ; hOpenR ; hOpenW ; hCloseR ; hCloseW ; hGetStrict ; hGetLazy ; hPutStrict ; hPutLa...
module Implicits.Resolution.Infinite.Undecidable where open import Prelude hiding (Bool; Dec) open import Data.Fin.Substitution open import Function.Equivalence using (_⇔_; equivalence) open import Relation.Nullary.Decidable as DecM using () open import Relation.Nullary open import Extensions.ListFirst open import S...
{-# OPTIONS --without-K #-} open import Base module Spaces.Interval where private data #I : Set where #zer : #I #one : #I I : Set I = #I zer : I zer = #zer one : I one = #one postulate -- HIT seg : zer ≡ one I-rec : ∀ {i} (P : I → Set i) (x₀ : P zer) (x₁ : P one) (p : transport P seg x₀ ≡ x₁) →...
-- {-# OPTIONS --show-implicit --show-irrelevant #-} module Data.QuadTree.FunctorProofs.Valid-QuadrantFunctor where open import Haskell.Prelude renaming (zero to Z; suc to S) open import Data.Logic open import Data.QuadTree.InternalAgda open import Agda.Primitive open import Data.QuadTree.FunctorProofs.FunctorLaws ope...