text
stringlengths
4
690k
-- {-# OPTIONS -v tc.meta:20 #-} -- Agdalist 2010-09-24 David Leduc module Issue323 where data Sigma (A : Set)(B : A -> Set) : Set where _,_ : (a : A) -> B a -> Sigma A B data Trivial {A : Set}(a : A) : Set where trivial : Trivial a lemma : (A : Set)(x y : A) -> Trivial (x , y) lemma A x y = trivial
import Lvl open import Type module Type.Functions.Inverse {β„“β‚— : Lvl.Level}{ℓₒ₁}{β„“β‚’β‚‚} {X : Type{ℓₒ₁}} {Y : Type{β„“β‚’β‚‚}} where open import Function.Domains open import Type.Functions {β„“β‚—}{ℓₒ₁}{β„“β‚’β‚‚} {X}{Y} open import Type.Properties.Empty open import Type.Properties.Singleton {ℓₒ₁}{β„“β‚’β‚‚} inv : (f : X β†’ Y) β†’ ⦃ _ : Bi...
module Issue2486.HaskellB where {-# FOREIGN GHC import qualified MAlonzo.Code.Issue2486.ImportB as B #-} {-# FOREIGN GHC data Test = Con B.BBool #-}
module FreeVarPresheaves where open import Data.Nat as Nat import Level open import Categories.Category open import Categories.Presheaf open import Relation.Binary.Core open import Relation.Binary open import Function using (flip) module DTO = DecTotalOrder Nat.decTotalOrder data β„•-≀-eq {n m : β„•} : Rel (n ≀ m) Level...
-- Andreas, 2015-08-27 Allow rewrite rules for symbols defined in other file {-# OPTIONS --rewriting #-} open import Common.Nat open import Common.Equality {-# BUILTIN REWRITE _≑_ #-} x+0 : βˆ€ x β†’ x + 0 ≑ x x+0 zero = refl x+0 (suc x) rewrite x+0 x = refl {-# REWRITE x+0 #-} -- adding rewrite rule for + is ok x+0...
------------------------------------------------------------------------ -- The Agda standard library -- -- A universe which includes several kinds of "relatedness" for sets, -- such as equivalences, surjections and bijections ------------------------------------------------------------------------ {-# OPTIONS --witho...
{- An experiment of transporting rev-++-distr from lists to lists where the arguments to cons have been flipped inspired by section 2 of https://arxiv.org/abs/2010.00774 Note that Agda doesn't care about the order of constructors so we can't do exactly the same example. -} {-# OPTIONS --cubical --no-import-sorts --s...
-- {-# OPTIONS -v tc.meta:100 #-} -- Andreas, 2011-04-20 -- see Abel Pientka TLCA 2011 module PruningNonMillerPattern where data _≑_ {A : Set}(a : A) : A -> Set where refl : a ≑ a data Nat : Set where zero : Nat suc : Nat -> Nat -- bad variable y in head position test : let X : Nat -> Nat -> Nat X ...
module BTree.Equality.Properties {A : Set} where open import BTree {A} open import BTree.Equality {A} open import Relation.Binary.Core trans≃ : Transitive _≃_ trans≃ ≃lf ≃lf = ≃lf trans≃ (≃nd x x' l≃r l≃l' l'≃r') (≃nd .x' x'' _ l'≃l'' l''≃r'') = ≃nd x x'' l≃r (trans≃ l≃l' l'≃l'') l''≃r'' symm≃ : Symmetric _≃_ sym...
{-# OPTIONS --safe #-} module Cubical.Algebra.Ring where open import Cubical.Algebra.Ring.Base public open import Cubical.Algebra.Ring.Properties public
{-# OPTIONS --cubical --safe #-} open import Prelude open import Algebra module Data.Maybe.Monoid {β„“} (sgr : Semigroup β„“) where open import Data.Maybe open Semigroup sgr _Β«βˆ™Β»_ : Maybe 𝑆 β†’ Maybe 𝑆 β†’ Maybe 𝑆 nothing Β«βˆ™Β» y = y just x Β«βˆ™Β» nothing = just x just x Β«βˆ™Β» just y = just (x βˆ™ y) maybeMonoid : Monoid β„“ may...
{- Copyright Β© 2015 Benjamin Barenblat 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 writing, so...
postulate foo : Set bar : Set baz : Set β†’ Set baz fooo = Fooo
{-# OPTIONS --without-K --safe #-} module Dodo.Unary.Union where -- Stdlib imports import Relation.Binary.PropositionalEquality as Eq open Eq using (_≑_; cong) open import Level using (Level; _βŠ”_) open import Function using (_∘_; _βˆ˜β‚‚_) open import Data.Sum using (_⊎_; inj₁; injβ‚‚; swap) open import Data.Product using ...
module Recutter where open import Basics open import All open import Cutting open import Perm module RECUTTER {I}(C : I |> I) where open _|>_ CutKit : (I -> Set) -> Set CutKit P = (i : I)(c : Cuts C i) -> P i -> All P (inners C c) Subs : List I -> Set Subs = All (\ i -> One + Cuts C i) subCollect : (is...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Conversion {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.LogicalRelation.Irrelevance open import Definition.LogicalRelation.Properties open import Definition.Logic...
module Abstract where abstract f : {A : Set} β†’ A β†’ A f x = x g : {A : Set} β†’ A β†’ A g x = x h : {A : Set} β†’ A β†’ A h x = f x _ : {A : Set} β†’ A β†’ A _ = Ξ» x β†’ x
-- 2012-03-06 Andreas -- Errors during printing of debug messages should not propagate to the -- top level {-# OPTIONS -v tc.meta.assign:10 #-} module Issue578 where -- Skipping import of Level will leave us with no level builtins -- import Level data D : Set where -- This will generate a debug message, but it cann...
-- Andreas, 2017-01-19, issue #2416, probably regression -- Give failed for constrained size -- {-# OPTIONS -v interaction.give:40 #-} -- {-# OPTIONS -v tc.conv:10 #-} -- {-# OPTIONS -v tc.conv.coerce:70 #-} -- {-# OPTIONS -v tc.size:40 #-} -- {-# OPTIONS -v tc.check.internal:40 #-} open import Common.Size open impor...
open import Auto open import Function using (const) open import Data.Bool using (Bool; true; false) open import Data.Bool.Show as Bool using () open import Data.List using (_∷_; []) open import Data.Maybe open import Data.Nat using (β„•; suc; zero) open import Data.Nat.Show as Nat using () open import Data.String using (...
module Peano where data β„• : Set where zero : β„• suc : β„• β†’ β„• _+_ : β„• β†’ β„• β†’ β„• zero + zero = zero zero + n = n (suc n) + m = suc (n + m) data _even : β„• β†’ Set where ZERO : zero even STEP : βˆ€ x β†’ x even β†’ suc (suc x) even proof₁ : suc (suc (suc (suc zero))) even proof₁ = STEP (suc (suc z...
{- Name: Bowornmet (Ben) Hudson -- define the source language from the paper -} open import Preliminaries open import Preorder-withmax module Source-lang where -- define the source language from the paper -- we want to focus on arrow, cross, and nat types data Tp : Set where unit : Tp nat : Tp su...
------------------------------------------------------------------------ -- Lemmas related to application of substitutions ------------------------------------------------------------------------ open import Data.Universe.Indexed module deBruijn.Substitution.Data.Application.Application222 {i u e} {Uni : IndexedUni...
------------------------------------------------------------------------ -- Convenient syntax for relational reasoning using transitive -- relations ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module Relation.Binary.TransReasoning where open import Leve...
open import Relation.Binary using (Preorder) open import Relation.Binary.PropositionalEquality open import Level module Category.Monad.Monotone.State {β„“}(pre : Preorder β„“ β„“ β„“)(H : Preorder.Carrier pre β†’ Set β„“) where open Preorder pre renaming (Carrier to I; _∼_ to _≀_; refl to ≀-refl; trans to ≀-trans) open import D...
data Bool : Set where true : Bool false : Bool record Eq (t : Set) : Set where field _==_ : t β†’ t β†’ Bool open Eq {{...}} -- Now package this into a record type for "sets with boolean equality": record EqSet : Set₁ where field set : Set instance eq : Eq set open EqSet equality : {{A : EqSet}} (x y...
{- Constant structure: _ ↦ A -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.Relational.Constant where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical....
{-# OPTIONS --without-K --exact-split --allow-unsolved-metas #-} module 12-univalence where import 11-function-extensionality open 11-function-extensionality public -- Section 10.1 Type extensionality equiv-eq : {i : Level} {A : UU i} {B : UU i} β†’ Id A B β†’ A ≃ B equiv-eq {A = A} refl = pair id (is-equiv-id A) UNIV...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.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 op...
module Bad where data Bool : Set where false : Bool true : Bool data Nat : Set where zero : Nat suc : Nat -> Nat F : Bool -> Set F false = Bool F true = Nat cast : {x : Bool} -> F x -> F x cast a = a not : Bool -> Bool not true = false not false = true oops : Bool oops = not (cast zero)
module _ where open import Agda.Builtin.Reflection open import Agda.Builtin.Bool open import Agda.Builtin.Unit open import Agda.Builtin.String open import Common.Prelude _<_ = primQNameLess True : Bool β†’ Set True true = ⊀ True false = βŠ₯ zzz aaa : ⊀ zzz = _ aaa = _ βŠ₯-elim : {A : Set} β†’ βŠ₯ β†’ A βŠ₯-elim () check : (x...
------------------------------------------------------------------------ -- The Agda standard library -- -- The reflexive, symmetric and transitive closure of a binary -- relation (aka the equivalence closure). ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} ...
module Prelude.Int.Properties where open import Prelude.Unit open import Prelude.Nat open import Prelude.Nat.Properties open import Prelude.Number open import Prelude.Equality open import Prelude.Int.Core open import Prelude.Smashed open import Prelude.Ord open import Prelude.Semiring open import Prelude.Function --...
module Luau.Type where open import FFI.Data.Maybe using (Maybe; just; nothing) data Type : Set where nil : Type _β‡’_ : Type β†’ Type β†’ Type none : Type any : Type number : Type _βˆͺ_ : Type β†’ Type β†’ Type _∩_ : Type β†’ Type β†’ Type src : Type β†’ Type src nil = none src (S β‡’ T) = S src none = none src any = any ...
module NumeralNaturalProofs where open NumeralNatural open Structure open Structure.Function'.Properties open Structure.Relator open Structure.Relator.Properties [∩]-inductive : Proof(βˆ€β‚—(a ↦ βˆ€β‚—(b ↦ (Inductive(a) ∧ Inductive(b)) ⟢ Inductive(a ∩ b)))) [∩]-inductive = ([βˆ€].intro (\{a}...
module Cats.Category.Sets where open import Data.Product using (Ξ£ ; _Γ—_ ; proj₁ ; projβ‚‚) open import Level open import Relation.Binary using (Rel ; IsEquivalence ; _Preservesβ‚‚_⟢_⟢_) open import Relation.Binary.PropositionalEquality as ≑ using (_≑_) open import Cats.Category.Base open import Cats.Util.Function open im...
module Bughunting2 where data Nat : Set where zero : Nat -- Comment which gets eaten suc : Nat -> Nat --Comment which is preserved plus : Nat -> Nat -> Nat plus2 : Nat -> Nat -> Nat plus2 = plus plus zero m = m plus m n = {! !}
module Categories.WithFamilies where open import Level import Relation.Binary.HeterogeneousEquality as Het open Het using (_β‰…_) open import Categories.Support.PropositionalEquality open import Categories.Support.Experimental open import Categories.Category open import Categories.Functor open import Categories.Natura...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Concrete where open import Level open import Categories.Category.Core using (Category) open import Categories.Category.Instance.Setoids using (Setoids) open import Categories.Functor.Core using (Functor) open import Categories.Functor.Representable using ...
{- Name: Bowornmet (Ben) Hudson --Complexity : "Playing The Game"-- -} open import Preliminaries open import Preorder-withmax module Complexity-lang where data Typ : Set where nat : Typ _Γ—'_ : Typ β†’ Typ β†’ Typ _β‡’_ : Typ β†’ Typ β†’ Typ unit : Typ ------------------------------------------ -- repre...
------------------------------------------------------------------------------ -- Well-founded induction on natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-poly...
module Golden.Constructor where open import Agda.Builtin.Nat f : (Nat -> Nat) -> Nat f g = g zero fsuc = suc fzero = zero one = f suc a = fsuc fzero
{-# OPTIONS --safe --cubical #-} module Data.Product.NAry where open import Data.Sigma open import Prelude hiding (⊀; tt) open import Data.Unit.UniversePolymorphic open import Path.Reasoning private variable n : β„• β„“ : Level Levels : β„• β†’ Type Levels zero = ⊀ Levels (suc n) = Level Γ— Levels n private var...
-- Andreas, 2017-04-10, issue #2537 reported by xekoukou -- Preserve named args when splitting in a where clause. -- {-# OPTIONS -v reify:100 #-} data Bool : Set where true false : Bool fun : {a b c d e f g : Bool} β†’ Bool β†’ Bool fun {g = g} x with x ... | r = {!g!} -- C-c C-c g -- Expected result: -- fun {g = tru...
module Numeral.Natural.Oper.Comparisons.Proofs where open import Data.Boolean.Stmt open import Data.Boolean open import Logic.Propositional open import Numeral.Natural open import Numeral.Natural.Oper.Comparisons open import Numeral.Natural.Oper.Proofs open import Relator.Equals [≀?]-𝟎 : βˆ€{n} β†’ IsTrue(𝟎 ≀? n) [≀?]-...
open import Relation.Binary.Core module InsertSort.Impl1.Correctness.Permutation.Alternative {A : Set} (_≀_ : A β†’ A β†’ Set) (tot≀ : Total _≀_) where open import Data.List open import Data.Sum open import Function open import InsertSort.Impl1 _≀_ tot≀ open import List.Permutation.Alt...
module NF.Sum where open import NF open import Data.Sum open import Relation.Binary.PropositionalEquality instance nfInj₁ : {A B : Set}{a : A}{{nfa : NF a}} -> NF {A ⊎ B} (inj₁ a) Sing.unpack (NF.!! (nfInj₁ {a = a})) = inj₁ (nf a) Sing.eq (NF.!! (nfInj₁ {{nfa}})) rewrite nf≑ {{nfa}} = refl {-# INLINE nfInj₁ ...
module Category.Universality where open import Level open import Category.Core open import Category.Comma open import Category.Instance -- something is universal from c to S when it's an initial object in c / S universal : {𝒸₀ β„“β‚€ 𝒸₁ ℓ₁ : Level} β†’ {C : Category 𝒸₀ β„“β‚€} {D : Category 𝒸₁ ℓ₁} β†’ {c : Category.O...
------------------------------------------------------------------------------ -- Operations on and with functions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism ...
{-# OPTIONS --cubical --safe #-} module Cubical.HITs.Truncation.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical.Foundations.Pat...
module Numeric.Nat.Divide.Properties where open import Prelude open import Numeric.Nat.Properties open import Numeric.Nat.DivMod open import Numeric.Nat.Divide open import Tactic.Nat divides-add : βˆ€ {a b d} β†’ d Divides a β†’ d Divides b β†’ d Divides (a + b) divides-add (factor! q) (factor! q₁) = factor (q + q₁) auto d...
------------------------------------------------------------------------ -- The Agda standard library -- -- The Maybe type and some operations ------------------------------------------------------------------------ -- The definitions in this file are reexported by Data.Maybe. {-# OPTIONS --without-K --safe #-} modu...
-- Solver for Category {-# OPTIONS --without-K --safe #-} open import Categories.Category module Experiment.Categories.Solver.Category {o β„“ e} (π’ž : Category o β„“ e) where open import Level open import Relation.Binary using (Rel) import Categories.Morphism.Reasoning as MR open Category π’ž open HomReasoning open MR...
module even 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 nat open import logic even : (n : β„• ) β†’ Set even zero =...
{-# OPTIONS --without-K --termination-depth=2 #-} open import HoTT open import cw.CW module cw.Sphere where CWSphere-skel : βˆ€ n β†’ Skeleton {lzero} n CWSphere : β„• β†’ Typeβ‚€ CWSphere n = ⟦ CWSphere-skel n ⟧ Sphere-to-CWSphere : (n : β„•) β†’ Sphere n β†’ CWSphere n CWSphere-skel O = Bool CWSphere-skel (S n) = (CWSphere-s...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Weakening {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed open import Definition.T...
{-# OPTIONS --copatterns #-} open import Common.Prelude open import Common.Product postulate A : Set B : A β†’ Set f : βˆ€ a β†’ B a bla : βˆƒ B {-# NON_TERMINATING #-} proj₁ bla = proj₁ bla projβ‚‚ bla = f (proj₁ bla) T : Bool β†’ Set T true = Bool T false = Bool test : (βˆ€ b β†’ T b) β†’ βˆƒ T {-# NON_TERMINATING #-} proj₁ ...
module Common.Sum where open import Common.Level data _⊎_ {a b} (A : Set a) (B : Set b) : Set (a βŠ” b) where inj₁ : (x : A) β†’ A ⊎ B injβ‚‚ : (y : B) β†’ A ⊎ B [_,_] : βˆ€ {a b c} {A : Set a} {B : Set b} {C : A ⊎ B β†’ Set c} β†’ ((x : A) β†’ C (inj₁ x)) β†’ ((x : B) β†’ C (injβ‚‚ x)) β†’ ((x : A ⊎ B) β†’ C x) [ f , g ...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order module Numbers.Modulo.Definition where record β„€n (n : β„•) .(pr : 0 <N n) : Set where field x : β„• .xLess : x <N n equalityZn : {n : β„•} .{pr : 0 <N n} β†’ {a b...
{-# OPTIONS --cubical --safe #-} module Cubical.Structures.Monoid 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.P...
-- TODO -- Common syntax. module BasicT.Syntax.Common where open import Common.Context public -- Types, or propositions. infixl 9 _∧_ infixr 7 _β–»_ data Ty : Set where Ξ±_ : Atom β†’ Ty _β–»_ : Ty β†’ Ty β†’ Ty _∧_ : Ty β†’ Ty β†’ Ty ⊀ : Ty BOOL : Ty NAT : Ty -- Additional useful types. infix 7 _β–»β—…_ _β–»β—…_ :...
{-# OPTIONS --safe #-} module Cubical.Data.Bool.Properties where open import Cubical.Core.Everything open import Cubical.Functions.Involution open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import C...
module Adjoint where import Category import Functor open Category open Functor using (Functor) module Adj where open Functor.Projections using (Map; map) data _⊒_ {β„‚ β…… : Cat}(F : Functor β„‚ β……)(G : Functor β…… β„‚) : Set1 where adjunction : (_* : {X : Obj β„‚}{Y : Obj β……} -> Map F X ─→ Y -> X ─→ Map G Y) ...
{- This is mostly for convenience, when working with ideals (which are defined for general rings) in a commutative ring. -} {-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.Ideal where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Powerset op...
-- Jesper, 2018-11-29: Instances with explicit arguments will never be -- used, so declaring them should give a warning. postulate X : Set instance _ : Set β†’ X -- this should give a warning it : {{_ : X}} β†’ X it {{x}} = x -- OTOH, this is fine as the instance can be used inside the module module _ (A : Set) wher...
{-# OPTIONS --without-K --safe #-} module Categories.Functor where open import Level open import Function renaming (id to idβ†’; _∘_ to _●_) using () open import Categories.Category open import Categories.Functor.Core public private variable o β„“ e oβ€² β„“β€² eβ€² oβ€³ β„“β€³ eβ€³ : Level Endofunctor : Category o β„“ e β†’ Set _ E...
module Type.Properties.Inhabited{β„“} where import Lvl open import Type -- An inhabited type, which essentially means non-empty (there exists objects with this type), and this object is pointed out/specified/chosen. -- This means that there exists objects with such an type, and such an object is extractable constr...
{- β„š is a Commutative Ring -} {-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.Instances.QuoQ where open import Cubical.Foundations.Prelude open import Cubical.Algebra.CommRing open import Cubical.HITs.Rationals.QuoQ renaming (β„š to β„šType ; _+_ to _+β„š_; _Β·_ to _Β·β„š_; -_ to -β„š_) open CommRingStr β„šCommRing :...
{-# OPTIONS --prop --rewriting #-} open import Calf.CostMonoid open import Data.Nat using (β„•) module Examples.Sorting.Comparable (costMonoid : CostMonoid) (fromβ„• : β„• β†’ CostMonoid.β„‚ costMonoid) where open CostMonoid costMonoid using (β„‚) open import Calf costMonoid open import Calf.Types.Bool open import Calf.Types...
{- Name: Bowornmet (Ben) Hudson and Theodore (Ted) Kim -- COMP360 Final Project: Group Theory in Agda -- In this project, we define some fundamental ideas of group theory and prove a few basic theorems about the topic using Agda. For example, we define what a group is, and give several elementary examples of grou...
module PiQ.Eval where open import Data.Empty open import Data.Unit hiding (_β‰Ÿ_) open import Data.Sum open import Data.Product open import Data.Maybe open import Data.Nat hiding (_β‰Ÿ_) open import Data.List as L hiding (_∷_) open import Relation.Binary.Core open import Relation.Binary open import Relation.Nullary open im...
import Lvl open import Structure.Operator.Vector open import Structure.Setoid open import Type module Structure.Operator.Vector.LinearCombination.Proofs {β„“α΅₯ β„“β‚› β„“α΅₯β‚‘ β„“β‚›β‚‘} {V : Type{β„“α΅₯}} ⦃ equiv-V : Equiv{β„“α΅₯β‚‘}(V) ⦄ {S : Type{β„“β‚›}} ⦃ equiv-S : Equiv{β„“β‚›β‚‘}(S) ⦄ {_+α΅₯_ : V β†’ V β†’ V} {_β‹…β‚›α΅₯_ : S β†’ V β†’ V} {_+β‚›_ _β‹…...
{-# OPTIONS --without-K #-} module hott.equivalence.properties where open import sum open import equality.core open import equality.calculus open import function.core open import function.isomorphism open import function.extensionality open import hott.equivalence.core open import hott.equivalence.alternative open im...
module FFI.Data.HaskellInt where open import Agda.Builtin.Int using (Int) {-# FOREIGN GHC import qualified Data.Int #-} postulate HaskellInt : Set {-# COMPILE GHC HaskellInt = type Data.Int.Int #-} postulate intToHaskellInt : Int β†’ HaskellInt haskellIntToInt : HaskellInt β†’ Int {-# COMPILE GHC intToHaskellInt = ...
{-# OPTIONS -v tc.unquote:30 #-} open import Common.Prelude open import Common.Reflection data Box : Bool β†’ Set where box : (b : Bool) β†’ Box b works : (b : Bool) β†’ Box b β†’ Bool works b (box .b) = unquote (give (var 0 [])) worksβ‚‚ : (b : Bool) β†’ Box b β†’ Bool unquoteDef worksβ‚‚ = defineFun worksβ‚‚ (clause ( arg (argI...
------------------------------------------------------------------------ -- The Agda standard library -- -- The Maybe type ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Maybe where open import Data.Unit using (⊀) open import Data.Empty using (...
module OldBasicILP.Syntax.Projection where open import Common.UntypedContext public import OldBasicILP.UntypedSyntax.ClosedHilbertSequential as CHS import OldBasicILP.UntypedSyntax.ClosedHilbert as CH -- Projection of types and derivations to a form parametrised by a closed, untyped representation of syntax. modul...
-- Andreas, 2016-07-19 revisiting issue #418 module Issue418private where open import Common.Equality abstract A : Set₁ A = Set private works : A ≑ A works = refl test : A ≑ _ test = refl -- Since test is private, abstract definitions are transparent in its type. -- The meta should be solve...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.NType2 open import lib.PathFunctor open import lib.PathGroupoid open import lib.types.Bool open import lib.types.IteratedSuspension open import lib.types.LoopSpace open import lib.types.Nat open import lib.types.Paths open import lib.types.Pi open imp...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Category.Monoidal open import Categories.Category.Monoidal.Closed module Categories.Category.Monoidal.Closed.IsClosed.Pentagon {o β„“ e} {C : Category o β„“ e} {M : Monoidal C} (Cl : Closed M) where open import Data.Product using...
-- Andreas, 2019-06-17, LAIM 2019, issue #3855 -- Only allow erased definitions (such as projections of erased fields) -- in erased context. open import Common.IO open import Common.Unit open import Common.String open import Common.Bool record Erased (A : Set) : Set where constructor erase field @0 gone : A ...
module Structure.Relator.Apartness.Proofs where open import Data open import Data.Either as Either open import Data.Tuple as Tuple open import Functional open import Logic.Classical open import Logic.Propositional open import Logic.Propositional.Theorems import Lvl open import Structure.Relator.Apartness open imp...
import Lvl open import Logic open import Type module Data.List.Relation.Pairwise {ℓ₁ β„“β‚‚} {T : Type{ℓ₁}} where open import Data.List import Data.List.Functions as List open import Data.List.Relation.Quantification open import Functional open import Logic.Propositional -- Whether a list's elements pairwise s...
open import Agda.Builtin.Nat -- split on m -- WAS: m = zero or m = suc m -- WANT: m = suc m because 2nd clause already covers m = zero f : Nat -> Nat -> Nat f m zero = {!!} f zero zero = zero f _ _ = zero -- However for g, we still get m = zero or m = suc m -- because the other splits are orthogonal / catchalls g ...
module _ where open import Common.Prelude hiding (_>>=_) open import Common.Reflection pattern `Nat = def (quote Nat) [] unquoteDecl f = declareDef (vArg f) `Nat
module _ where postulate D : Set module A where infixr 5 _∷_ postulate _∷_ : Set₁ β†’ D β†’ D module B where infix 5 _∷_ postulate _∷_ : Set₁ β†’ Set₁ β†’ D open A open B foo : D foo = Set ∷ Set
module Cats.Category.Setoids where open import Cats.Util.SetoidMorphism public using (_β‡’_ ; _β‰ˆ_ ; β‰ˆ-intro ; β‰ˆ-elim ; β‰ˆ-elimβ€² ; equiv ; _∘_ ; id ; ∘-resp ; assoc ; id-l ; id-r) open import Level using (_βŠ”_ ; suc) open import Relation.Binary using (Setoid) open import Cats.Category.Base open import Cats.Category.S...
{-# OPTIONS --sized-types #-} module Ex where open import Size open import Data.Empty open import Data.Unit open import Data.Nat open import Data.Product open import Data.Sum open import Data.Fin open import Function open import Relation.Binary.PropositionalEquality open import Relation.Nullary β€’ : Set β€’ = ⊀ -- | C...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Subset open import Setoids.Setoids open import Setoids.Orders.Partial.Definition open import Setoids.Orders.Total.Definition open import Sets.EquivalenceRelations open import Rings.Orders.Total.Definition open import Rin...
-- Andreas, 2020-04-15, issue #4586 -- Better error message when `let` contains an absurd pattern. test : Set₁ test = let f () in Set -- WAS: -- Not a valid let-declaration -- when scope checking let f () in Set -- EXPECTED: -- Missing right hand side in let binding -- when scope checking let f () in Set
-- Andreas, 2014-05-02 -- As of now, we have no negative integer literals, and these parse as identifiers. module _ where open import Common.Prelude n : Nat n = -1 -- Should give error "not in scope: -1"
module UnSizedIO.ConsoleObject where open import UnSizedIO.Console open import UnSizedIO.Object open import UnSizedIO.IOObject -- A console object is an IO object for the IO interface of console ConsoleObject : (iface : Interface) β†’ Set ConsoleObject iface = IOObject ConsoleInterface iface
------------------------------------------------------------------------ -- The Agda standard library -- -- Propertiers of any for containers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Container.Morphism.Properties where open import Level u...
module Issue488 where open import Data.Product using (βˆƒ-syntax; -,_; _Γ—_; _,_) open import Relation.Nullary using (Β¬_) open import Relation.Binary.PropositionalEquality using (_≑_; refl; sym; trans) module CounterExample where data Term : Set where A B C D : Term data _β€”β†’_ : (M N : Term) β†’ Set where Bβ€”β†’...
module SizedPolyIO.Console where open import Level using () renaming (zero to lzero) open import Size open import NativePolyIO open import SizedPolyIO.Base data ConsoleCommand : Set where putStrLn : String β†’ ConsoleCommand getLine : ConsoleCommand ConsoleResponse : ConsoleCommand β†’ Set ConsoleResponse (putStrL...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Lists.Lists open import Agda.Primitive using (Level; lzero; lsuc; _βŠ”_) open import Decidable.Sets open import Numbers.Naturals.Definition open import Numbers.Naturals.Semiring module Computability.LambdaCalculus.Definition wher...
module StateSizedIO.Base where open import Size open import SizedIO.Base open import Data.Product record IOInterfaceΛ’ : Set₁ where field IOStateΛ’ : Set CommandΛ’ : IOStateΛ’ β†’ Set ResponseΛ’ : (s : IOStateΛ’) β†’ (m : CommandΛ’ s) β†’ Set IOnextΛ’ : (s : IOStateΛ’) β†’ (m : CommandΛ’ s) β†’ (ResponseΛ’ ...
open import Categories open import Functors import RMonads module RMonads.RKleisli {a b c d} {C : Cat {a}{b}} {D : Cat {c}{d}} {J : Fun C D} (M : RMonads.RMonad J) where open import Library open RMonads.RMonad M open Cat open Fun Kl : Cat Kl = record{ Obj = Obj C; Hom = Ξ» X Y β†’ Hom D (OMap J X) (T...
---------------------------------------------------------------------- -- -- -- Author : Jan Stolarek <jan.stolarek@p.lodz.pl> -- -- License : Public Domain -- -- ...
-- Andreas, 2019-04-10, issue #3687, name mayhem when printing module contents (C-c C-o) -- {-# OPTIONS -v interaction.contents.record:20 #-} record Cat : Set₁ where field Obj : Set Hom : (A B : Obj) β†’ Set Eq : βˆ€{A B} (f g : Hom A B) β†’ Set id : (A : Obj) β†’ Hom A A comp : βˆ€{A B C} (f :...