text
stringlengths
4
690k
------------------------------------------------------------------------ -- The Agda standard library -- -- Bijections ------------------------------------------------------------------------ module Function.Bijection where open import Data.Product open import Level open import Relation.Binary open import Function.Eq...
------------------------------------------------------------------------------ -- From inductive PA to Mendelson's axioms ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymo...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Operations.Addition where open import Data.Binary.Definitions open import Data.Binary.Operations.Unary add : Bit → 𝔹⁺ → 𝔹⁺ → 𝔹⁺ add c (x ∷ xs) (y ∷ ys) = sumᵇ c x y ∷ add (carryᵇ c x y) xs ys add O 1ᵇ ys = inc⁺⁺ ys add O (O ∷ xs) 1ᵇ = I ∷ xs add O (I ∷ xs) 1ᵇ ...
module SortDependingOnIndex where open import Common.Level data Bad : (l : Level) → Set l where
module Text.Greek.SBLGNT.Rev where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΑΠΟΚΑΛΥΨΙΣ-ΙΩΑΝΝΟΥ : List (Word) ΑΠΟΚΑΛΥΨΙΣ-ΙΩΑΝΝΟΥ = word (Ἀ ∷ π ∷ ο ∷ κ ∷ ά ∷ ∙λ ∷ υ ∷ ψ ∷ ι ∷ ς ∷ []) "Rev.1.1" ∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Rev.1.1" ...
module Oscar.Prelude where module _ where -- Objectevel open import Agda.Primitive public using () renaming ( Level to Ł ; lzero to ∅̂ ; lsuc to ↑̂_ ; _⊔_ to _∙̂_ ) infix 0 Ø_ Ø_ : ∀ 𝔬 → Set (↑̂ 𝔬) Ø_ 𝔬 = Set 𝔬 Ø₀ = Ø ∅̂ Ø₁ = Ø (↑̂ ∅̂) postulate mag...
{-# OPTIONS --cubical --postfix-projections --safe #-} open import Relation.Binary open import Prelude hiding (tt) module Data.List.Sort.InsertionSort {e} {E : Type e} {r₁ r₂} (totalOrder : TotalOrder E r₁ r₂) where open import Relation.Binary.Construct.LowerBound totalOrder open import Data.List.Sort.Sorted totalOr...
------------------------------------------------------------------------------ -- We only translate definition with one clause ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-p...
module 015-logic where -- Simple propositional logic. open import 010-false-true -- Logical and. We represent a proof of A and B as a pair of proofs, -- namely, a proof of A and a proof of B. data Pair (A B : Set) : Set where _,_ : A -> B -> Pair A B _∧_ : (A B : Set) -> Set A ∧ B = Pair A B -- Get back proof o...
{- This second-order signature was created from the following second-order syntax description: syntax QIO type T : 0-ary P : 0-ary term new : P.T -> T measure : P T T -> T applyX : P P.T -> T applyI2 : P P.T -> T applyDuv : P P (P,P).T -> T applyDu : P P.T -> T applyDv ...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Dagger.Instance.Rels where open import Data.Product open import Function open import Relation.Binary.PropositionalEquality open import Level open import Categories.Category.Dagger open import Categories.Category.Instance.Rels RelsHasDagger : ∀ {o ℓ} → Has...
{-# OPTIONS --universe-polymorphism #-} {-# OPTIONS --universe-polymorphism #-} open import Level open import Categories.Category open import Categories.Product -- Parameterize over the categories in whose product we are working module Categories.Product.Properties {o ℓ e o′ ℓ′ e′} (C : Category o ℓ e) (D ...
module Dave.Logic.Basics where open import Dave.Functions open import Dave.Equality open import Dave.Isomorphism open import Dave.Structures.Monoid {- True -} data ⊤ : Set where tt : ⊤ η-⊤ : ∀ (w : ⊤) → tt ≡ w η-⊤ tt = refl {- False -} data ⊥ : Set where -- no ...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use Data.Vec.Recursive.Properties -- instead. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Product.N-...
module Data.List.Instance where open import Class.Equality open import Class.Monad open import Class.Monoid open import Class.Show open import Class.Traversable open import Data.Bool using (Bool; _∧_; true; false) open import Data.List hiding (concat) open import Data.List.Properties open import Data.String using (Str...
module _ where open import Relation.Binary.PropositionalEquality using (refl) _ : 2 + 1 ≡ 3 _ = refl
{-# OPTIONS --prop --allow-unsolved-metas #-} data ⊤ : Prop where tt : ⊤ data A : ⊤ → Set where a : (x : ⊤) → A x f : A tt → ⊤ f (a x) = {!!}
-- Andreas, 2011-10-02 -- {-# OPTIONS -v tc.meta:20 #-} module Issue483 where data _≡_ (a : Set) : Set → Set where refl : a ≡ a test : (P : .Set → Set) → let X : .Set → Set X = _ in (x : Set) → X x ≡ P (P x) test P x = refl -- expected behavior: solving X = P {- THE FOLLOWING COULD BE SOLVED IN THE S...
{-# OPTIONS --without-K --rewriting #-} module Algebra.Monoid where open import Basics open import lib.types.Paths record ∞-monoid i : Type (lsucc i) where field -- data el : Type i μ : el → End el μ' : el → End el μ' b a = μ a b field -- properties unit-l : hfiber μ (idf ...
{- Denotational semantics of the terms in the category of temporal types. -} module Semantics.Terms where open import Syntax.Context renaming (_,_ to _,,_) open import Syntax.Terms open import Syntax.Types open import Semantics.Types open import Semantics.Context open import CategoryTheory.Instances.Reactive open i...
------------------------------------------------------------------------------ -- Well-founded relation related to the McCarthy 91 function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --...
{-# OPTIONS --without-K --safe #-} module Data.List.Base where open import Level open import Agda.Builtin.List using (List; _∷_; []) public open import Data.Nat.Base open import Function open import Strict open import Data.Maybe using (Maybe; just; nothing; maybe) foldr : (A → B → B) → B → List A → B foldr f b [] = ...
{- Set quotients: -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.SetQuotients.Properties where open import Cubical.HITs.SetQuotients.Base open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open impo...
module Basic.Axiomatic.TotalImpliesPartial where open import Basic.AST open import Basic.BigStep open import Basic.Axiomatic.Total as T renaming (〈_〉_〈_〉 to total〈_〉_〈_〉) open import Basic.Axiomatic.Partial as P renaming (〈_〉_〈_〉 to partial〈_〉_〈_〉) hiding (_==>_; _∧_) open import Function open import Data.Produ...
{-# OPTIONS --sized-types #-} module SList.Concatenation (A : Set) where open import Data.List open import List.Permutation.Base A open import Size open import SList lemma-⊕-/ : {xs ys : List A}{x y : A} → xs / x ⟶ ys → unsize A (_⊕_ A (size A xs) (y ∙ snil)) / x ⟶ unsize A (_⊕_ A (size A ys) (y ∙ snil)) lemma-⊕-/ /...
module main where open import Not-named-according-to-the-Haskell-lexical-syntax main = return Not-named-according-to-the-Haskell-lexical-syntax.unit -- The following code once triggered an MAlonzo bug resulting in the -- error message "Panic: ... no such name main.M.d". module M where data D : Set where d : D...
-- This file has been extracted from https://alhassy.github.io/PathCat/ -- Type checks with Agda version 2.6.0. module PathCat where open import Level using (Level) renaming (zero to ℓ₀ ; suc to ℓsuc ; _⊔_ to _⊍_) -- Numbers open import Data.Fin using (Fin ; toℕ ; fromℕ ; fromℕ≤ ; reduce≥ ; inject≤) renaming (_<...
-- Andreas, 2016-12-20, issue #2347, reported by m0davis -- Case splitting in extended lambda with instance argument -- was printed wrongly -- {-# OPTIONS -v interaction.case:100 #-} -- {-# OPTIONS -v reify:100 #-} -- {-# OPTIONS -v reify.clause:100 #-} -- {-# OPTIONS -v extendedlambda:100 #-} -- {-# OPTIONS -v tc.ter...
module Cats.Util.SetoidMorphism where open import Data.Product using (∃-syntax ; _,_ ; proj₁ ; proj₂) open import Level using (_⊔_ ; suc) open import Relation.Binary using (Rel ; Setoid ; IsEquivalence ; _Preserves_⟶_) open import Relation.Binary.SetoidReasoning open import Cats.Util.Function using () renaming (_∘_ t...
-- Andreas, 2016-03-28, Issue 1920 -- Improve error message when user puts where clause in hole. infix 3 _∎ postulate A : Set begin : A _∎ : A → A works : A works = begin ∎ where b = begin test : A test = {!begin ∎ where b = begin !}
module functor where open import level record Functor {ℓ : Level} (F : Set ℓ → Set ℓ) : Set (lsuc ℓ) where constructor mkFunc field fmap : ∀{A B : Set ℓ} → (A → B) → F A → F B open Functor public
{-# OPTIONS --show-implicit #-} module Exegesis where module Superclasses where open import Agda.Primitive open import Agda.Builtin.Equality record Semigroup (A : Set) : Set where field _∙_ : A → A → A assoc : ∀ x y z → (x ∙ y) ∙ z ≡ x ∙ (y ∙ z) cong : ∀ w x y z → w ≡ y → x ≡ z → w ∙ x ≡ ...
---------------------------------------------------------------------------------- -- Types for parse trees ---------------------------------------------------------------------------------- module cedille-types where open import lib -- open import parse-tree posinfo = string alpha = string alpha-bar-3 = string alph...
{-# OPTIONS --warning=error #-} -- Useless abstract module Issue476b where abstract data A : Set data A where
module RecordInParModule (a : Set) where record Setoid : Set1 where field el : Set postulate S : Setoid A : Setoid.el S postulate X : Set module M (x : X) where record R : Set where module E {x : X} (r : M.R x) where open module M' = M.R x r
-- Check that FOREIGN code can have nested pragmas. module _ where open import Common.Prelude {-# FOREIGN GHC {-# NOINLINE plusOne #-} plusOne :: Integer -> Integer plusOne n = n + 1 {-# INLINE plusTwo #-} plusTwo :: Integer -> Integer plusTwo = plusOne . plusOne #-} postulate plusOne : Nat → Nat {-# COMPILE G...
module _ where module M (A : _) where y = Set -- type of A is solved if this is removed x : Set x = A -- WAS: yellow on type of A -- SHOULD: succeed
open import Prelude open import Nat open import dynamics-core open import contexts open import lemmas-disjointness module contraction where -- in the same style as the proofs of exchange, this argument along with -- trasnport allows you to prove contraction for all the hypothetical -- judgements uniformly. we ne...
module Numeral.Integer where import Lvl open import Numeral.Natural as ℕ using (ℕ) import Numeral.Natural.Oper as ℕ open import Syntax.Number open import Type -- Integers data ℤ : Type{Lvl.𝟎} where +ₙ_ : ℕ → ℤ -- Positive integers including zero from the naturals (0,1,..). −𝐒ₙ_ : ℕ → ℤ -- Negati...
-- Andreas, 2017-08-18, issue #2703, reported by davdar, testcase by gallais -- Underapplied constructor triggers internal error {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.getConType:35 #-} postulate A : Set data Sg : A → Set where sg : ∀ t → Sg t -- Target type depends on constructor argument...
module Issue157b where postulate A B : Set R : A → B → Set err : ∀ {a b} → R a b → R b
module Cats.Category.Cat where open import Cats.Functor public using (Functor ; _∘_ ; id) open import Data.Product using (_,_) open import Data.Unit using (⊤ ; tt) open import Level open import Relation.Binary using (IsEquivalence ; _Preserves_⟶_ ; _Preserves₂_⟶_⟶_) open import Relation.Binary.PropositionalEquality...
open import Peano using (ℕ; zero; succ; _+_; Rel) module Semigroup where infix 4 _≡_ data _≡_ {a} {A : Set a} (x : A) : A → Set a where refl : x ≡ x record Semigroup {A : Set} (_◇_ : A → A → A) : Set where field associativity : ∀ x y z → (x ◇ y) ◇ z ≡ x ◇ (y ◇ z) record ℕ+-isSemigroup : Semig...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core -- slice category (https://ncatlab.org/nlab/show/over+category) -- TODO: Forgetful Functor from Slice to 𝒞 module Categories.Category.Slice {o ℓ e} (𝒞 : Category o ℓ e) where open Category 𝒞 open HomReasoning open import Level open import Fun...
module Holes.Term where open import Holes.Prelude -- TODO: This logically ought to be abstract, but that breaks the `cong!` macro -- because when it is abstract, `⌞ x ⌟ ≡ x` does not hold (at least -- definitionally). Look into a way of fixing this. ⌞_⌟ : ∀ {a}{A : Set a} → A → A ⌞ x ⌟ = x private -- Given a term,...
-- Andreas, 2016-05-04 shrunk from the standard library open import Common.Product record ⊤ : Set where IFun : Set → Set1 IFun I = I → I → Set → Set ------------------------------------------------------------------------ -- Indexed state monads record RawIMonad {I : Set} (M : (i j : I) → Set → Set) : Set1 where ...
module Structure.Logic.Constructive.Proofs where open import Functional as Fn open import Lang.Instance open import Logic.Propositional as Logic using (_←_ ; _↔_) open import Logic.Predicate as Logic hiding (∀ₗ) import Lvl import Structure.Logic.Constructive.BoundedPredicate import Structure.Logic.C...
module Logic where -- The true proposition. data ⊤ : Set where obvious : ⊤ -- The proof of truth. -- The false proposition. data ⊥ : Set where -- There is nothing here so one can never prove false. -- The AND of two statments. data _∧_ (A B : Set) : Set where -- The only way to construct a proof of A ∧ B is b...
module Data.Option.Categorical where import Lvl import Functional as Fn open import Function.Equals open import Data.Option open import Data.Option.Functions open import Data.Option.Proofs open import Lang.Instance open import Logic open import Logic.Predicate open import Relator.Equals open import Relator.Equals...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Truncation.FromNegOne where open import Cubical.HITs.Truncation.FromNegOne.Base public open import Cubical.HITs.Truncation.FromNegOne.Properties public
{-# OPTIONS --without-K #-} import Level open import Data.Empty using (⊥-elim) open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.Fin using (Fin; zero; suc) open import Relation.Binary.PropositionalEquality open ≡-Reasoning open import Control.Category module Dimension.PartialWeakening (E : Set) where ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Homomorphism proofs for multiplication over polynomials ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Tactic.RingSolver.Core.Polynomial....
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of the heterogeneous suffix relation ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Suffix.Heterogeneous....
{-# OPTIONS --universe-polymorphism #-} {- This module is really a combination of copumpkin's Semigroup and CommutativeSemigroup modules, available on github at https://github.com/copumpkin/containers.git -} module Permutations where open import Algebra -- import Algebra.FunctionProperties as FunctionProperties...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties related to multiplication of integers ------------------------------------------------------------------------ module Data.Integer.Multiplication.Properties where open import Algebra using (module ...
{-# 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.ChurchNumeral w...
------------------------------------------------------------------------------ -- The FOTC streams type ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPT...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.EilenbergMacLane1 where open import Cubical.HITs.EilenbergMacLane1.Base public open import Cubical.HITs.EilenbergMacLane1.Properties public
module Imports.NonTerminating where Foo : Set Foo = Foo
{-# OPTIONS --without-K #-} open import HoTT module homotopy.S1SuspensionS0 where {- To -} module To = S¹Rec (north Bool) (merid _ false ∙ ! (merid _ true)) to : S¹ → Suspension Bool to = To.f {- From -} from-merid : Bool → base == base from-merid true = loop from-merid false = idp module From = SuspensionRec B...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Group.EilenbergMacLane.Base 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.G...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Torus where open import Cubical.HITs.Torus.Base public -- open import Cubical.HITs.Torus.Properties public
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Pointed module lib.types.Lift where ⊙Lift : ∀ {i j} → Ptd i → Ptd (lmax i j) ⊙Lift {j = j} (A , a) = ⊙[ Lift {j = j} A , lift a ] ⊙lift : ∀ {i j} {X : Ptd i} → fst (X ⊙→ ⊙Lift {j = j} X) ⊙lift = (lift , idp) ⊙lower : ∀ {i j} {X : Ptd i} → fs...
{-# OPTIONS --without-K #-} -- Large indices are not allowed --without-K data Singleton {a} {A : Set a} : A → Set where [_] : ∀ x → Singleton x
{-# OPTIONS --rewriting #-} -- Normalization by Evaluation for Call-By-Push-Value module NfCBPV where -- Imports from the Agda standard library. open import Library hiding (_×̇_) open import Data.Nat using (ℕ) open import Data.Fin using (Fin) pattern here! = here refl -- We postulate a set of generic value types...
{-# OPTIONS --safe #-} module Generics.Constructions.DecEq where open import Generics.Prelude hiding (lookup; _≟_) open import Generics.Telescope open import Generics.Desc open import Generics.All open import Generics.HasDesc import Generics.Helpers as Helpers import Data.Fin.Properties as Fin import Data.Product.P...
{-# OPTIONS -v tc.size:100 #-} -- {-# OPTIONS -v tc.meta:100 #-} open import Common.Size using (Size; Size<_) postulate A : Set record R (i₀ : Size) (x : A) : Set where coinductive field force : (j : Size< i₀) → R j x postulate P : (A → Set) → Set f : (Q : A → Set) (x : A) {{ c : P Q }} → Q x → Q x ...
-- Andreas, AIM XVIII, 2013-09-13 module ProjectionsTakeModuleTelAsParameters where import Common.Level open import Common.Equality module M (A : Set) where record Prod (B : Set) : Set where constructor _,_ field fst : A snd : B open Prod public open M -- underapplied open -- module paramet...
open import Relation.Binary.Core module BBHeap.Heapify {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) (trans≤ : Transitive _≤_) where open import BBHeap _≤_ open import BBHeap.Insert _≤_ tot≤ trans≤ open import Bound.Lower A open import Bound.Lower.Order _≤_ ...
-- {-# OPTIONS -v tc.pos:10 #-} -- Andreas, 2014-07-04 record R (A : Set) : Set where field f : R A -- Should complain about missing 'inductive' or 'coinductive'.
{-# OPTIONS --safe #-} module Cubical.Algebra.Group.Instances.IntMod where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Algebra.Group.Instances.Int open import Cubical.Algebra.Group.Base open import Cubical.Algebra.Monoid.Base open import Cubical.Algebra.Semig...
{-# OPTIONS --sized-types #-} open import Relation.Binary.Core module Mergesort.Impl1.Correctness.Permutation {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Bound.Lower A open import Bound.Lower.Order _≤_ open import Data.List open import Data.Product open impo...
{-# OPTIONS --sized-types #-} module SNat.Sum where open import Relation.Binary.PropositionalEquality open import Size open import SNat +-assoc-succ : (m n : SNat) → m + succ n ≡ succ (m + n) +-assoc-succ zero n = refl +-assoc-succ (succ m) n rewrite +-assoc-succ m n = refl +-assoc-right : (a b c : SNat) → (a + b) +...
{-# OPTIONS --cubical --safe #-} module Data.Nat.WellFounded where open import Prelude open import Data.Nat open import WellFounded infix 4 _≤_ _<_ data _≤_ (n : ℕ) : ℕ → Type where n≤n : n ≤ n n≤s : ∀ {m} → n ≤ m → n ≤ suc m _<_ : ℕ → ℕ → Type n < m = suc n ≤ m ≤-wellFounded : WellFounded _<_ ≤-wellFounded x ...
------------------------------------------------------------------------------ -- Exclusive disjunction theorems ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-...
-- Andreas, 2013-05-02 This ain't a bug, it is a feature. -- {-# OPTIONS -v scope.name:10 #-} module _ where open import Common.Equality module M where record R' : Set₁ where field X : Set open M renaming (R' to R) X : R → Set X = R.X -- Nisse: -- The open directive did not mention the /module/ R, so ...
module Generic.Reflection.DeriveEq where open import Generic.Core open import Generic.Function.FoldMono open import Generic.Reflection.ReadData fromToClausesOf : Data Type -> Name -> List Clause fromToClausesOf (packData d a b cs ns) f = unmap (λ {a} -> clauseOf a) ns where vars : ℕ -> ℕ -> Type -> List (Maybe (Str...
------------------------------------------------------------------------ -- M-types for indexed containers, defined using functions ------------------------------------------------------------------------ -- Based on "Non-wellfounded trees in Homotopy Type Theory" by Ahrens, -- Capriotti and Spadotti. {-# OPTIONS --w...
data Nat : Set where record Ord (A : Set) : Set where field f : A → A instance OrdNat : Ord Nat OrdNat = record { f = λ x → x } postulate T : Nat → Set R : ∀ {A} {{_ : Ord A}} → A → Set -- Before solving the type of m, instance search considers it to -- be a potential candidate for Ord Nat. It then proce...
{-# OPTIONS --without-K #-} module Inspect where open import Data.Unit.Core open import SimpleHoTT using (refl;_≡_) ------------------------------------------------------------------------ -- Inspect on steroids (borrowed from standard library) -- Inspect on steroids can be used when you want to pattern match on --...
-- Andreas, 2015-06-28 -- {-# OPTIONS -v tc.polarity:20 #-} open import Common.Size -- List should be monotone in both arguments -- (even as phantom type). data List (i : Size) (A : Set) : Set where [] : List i A castL : ∀{i A} → List i A → List ∞ A castL x = x castLL : ∀{i A} → List i (List i A) → List ∞ (List...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids open import Rings.Definition open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition open import Sequences open import Setoids.Orders.Par...
module Class.Listable where open import Class.Equality open import Data.List open import Data.List.Relation.Unary.Any open import Data.List.Relation.Unary.All.Properties open import Data.List.Relation.Unary.Unique.Propositional open import Data.List.Membership.Propositional open import Relation.Binary.PropositionalEq...
{-# OPTIONS --without-K #-} {- Ribbon is the explicit covering space construction. This construction is given by Daniel Grayson, Favonia (me) and Guillaume Brunerie together. -} open import Base open import Homotopy.Pointed -- A is the pointed base space. -- Y is intended to be a (group-)set, -- but can be an...
------------------------------------------------------------------------------ -- ABP Lemma 1 ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --wit...
------------------------------------------------------------------------ -- A virtual machine ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --sized-types #-} module Lambda.Partiality-monad.Inductive.Virtual-machine where open import Prelude hiding (⊥) open imp...
module Cats.Category.Constructions.Initial where open import Data.Product using (proj₁ ; proj₂) open import Level open import Cats.Category.Base import Cats.Category.Constructions.Iso as Iso import Cats.Category.Constructions.Unique as Unique module Build {lo la l≈} (Cat : Category lo la l≈) where open Category...
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Limits where open import Level open import Categories.Category open import Categories.Functor open import Categories.Functor.Properties open import Categories.Object.Terminal open import Categories.Object.Initial open import Categories.Diagram.Limit open i...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Maybe open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Semiring module KeyValue.KeyValue {a b : _} (keys : Set a) (values : Set b) where record KeyValue {c : _} (maps : Set c) : Set (a ⊔...
module TerminationArgumentSwapping where -- subtyping simple types data Bool : Set where true : Bool false : Bool _&&_ : Bool -> Bool -> Bool true && a = a false && a = false data Ty : Set where bot : Ty top : Ty arr : Ty -> Ty -> Ty subty : Ty -> Ty -> Bool subty bot _ = true subty _ top = true su...
module Typed.LTLCRef where open import Data.List.Relation.Ternary.Interleaving.Propositional open import Relation.Unary hiding (_∈_) open import Relation.Unary.PredicateTransformer using (Pt) open import Function open import Category.Monad open import Relation.Ternary.Separation open import Relation.Ternary.Separati...
{- 2010-09-28 Andreas, see issue 336 -} module WhyWeNeedUntypedLambda where IdT = ({A : Set} -> A -> A) data _==_ {A : Set2}(a : A) : A -> Set where refl : a == a -- Untyped lambda succeeds, because checking \ x -> x : X is postponed, -- then the solution X = IdT is found, and upon revisiting the tc problem -- a ...
------------------------------------------------------------------------ -- The parser data type ------------------------------------------------------------------------ -- This hybrid variant is coinductive /and/ includes !_. module RecursiveDescent.Hybrid.Type where open import Data.Bool open import Data.Product.R...
------------------------------------------------------------------------------ -- No theorem used by the shelltestrunner test ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-po...
module Categories.SubCategory where open import Categories.Category open import Data.Product sub-category : ∀ {o ℓ e o′ ℓ′} -> (C : Category o ℓ e) -> let module C = Category C in {A : Set o′} (U : A -> C.Obj) (R : ∀ {a b} -> U a C.⇒ U b -> Set ℓ′) -> (∀ {a} -> R (C.id {U a})) -> (∀ ...
module EtaAndMetas where record Functor : Set₁ where field F : Set → Set eta : Functor → Functor eta S = record { F = F } where open Functor S postulate Π : (To : Functor) → Set mkΠ : (B : Functor) → Π (eta B) To : Functor π : Π (eta To) π = mkΠ _
module Integer12 where open import Data.Unit using (⊤; tt) open import Data.Empty using (⊥) open import Data.Bool using (Bool; true; false) open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl; cong; cong₂; sym) isTrue : Bool → Set isTrue true = ⊤ isTrue false = ⊥ -- 整数のガチな定義 ...
open import SOAS.Common open import SOAS.Families.Core open import Categories.Object.Initial open import SOAS.Coalgebraic.Strength import SOAS.Metatheory.MetaAlgebra -- Monoids with ⅀-algebra structure module SOAS.Metatheory.Monoid {T : Set} (⅀F : Functor 𝔽amiliesₛ 𝔽amiliesₛ) (⅀:Str : Strength ⅀F) where open i...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.GroupoidTruncation where open import Cubical.HITs.GroupoidTruncation.Base public open import Cubical.HITs.GroupoidTruncation.Properties public
{-# OPTIONS --safe --cubical #-} module Container where open import Prelude Container : (s p : Level) → Type (ℓsuc (s ℓ⊔ p)) Container s p = Σ[ Shape ⦂ Type s ] × (Shape → Type p) ⟦_⟧ : ∀ {s p ℓ} → Container s p → Set ℓ → Set (s ℓ⊔ p ℓ⊔ ℓ) ⟦ S , P ⟧ X = Σ[ s ⦂ S ] × (P s → X) cmap : ∀ {s p} {C : Container s p} → (...