text stringlengths 4 690k |
|---|
module Issue1422 where
open import Common.Level public using (Level ; lzero ; lsuc) renaming (_⊔_ to _l⊔_)
open import Common.Equality public
-- # Relations
relation : ∀ {ℓ} ℓ' → Set ℓ → Set (lsuc ℓ' l⊔ ℓ)
relation ℓ' α = α → α → Set ℓ'
reflexive : ∀ {ℓ ℓ'} {α : Set ℓ} → relation ℓ' α → Set (ℓ l⊔ ℓ')
reflexive _R_ ... |
------------------------------------------------------------------------------
-- Distributive laws base
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OP... |
open import Nat
open import Prelude
open import List
open import contexts
open import core
module completeness where
-- any hole is new to a complete expression
e-complete-hnn : ∀{e u} → e ecomplete → hole-name-new e u
e-complete-hnn (ECFix cmp) = HNNFix (e-complete-hnn cmp)
e-complete-hnn ECVar = HNNVar
e-... |
{-# OPTIONS --without-K --safe #-}
module Experiment.FingerTree.Common where
open import Level renaming (zero to lzero ; suc to lsuc)
open import Algebra
open import Data.Product
open import Function.Core
open import Function.Endomorphism.Propositional
open import Data.Nat hiding (_⊔_)
import Data.Nat.Properties as ℕₚ... |
-- Andreas, 2017-06-16, issue #2604:
-- Symbolic anchors in generated HTML.
module Issue2604 where
test1 : Set₁ -- Symbolic anchor
test1 = bla
where
bla = Set -- Position anchor
test2 : Set₁ -- Symbolic anchor
test2 = bla
where
bla = Set -- Position anchor
test3 : Set₁ -- Symbolic anchor
test3 = bla
... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NConnected
open import lib.types.Bool
open import lib.types.FunctionSeq
open import lib.types.Pointed
open import lib.types.Suspension.Core
open import lib.types.TLevel
module lib.types.Suspension.Iterated where
Susp^ : ∀ {i} (n : ℕ) → Ty... |
-- agda -c -isrc -i/usr/share/agda-stdlib/ src/Main.agda
module Main where
open import IO
open import Function
open import Coinduction
open import Data.String using (String; toList; fromList)
open import Example
-- main = interact $ unline . reverse . lines
main = run (♯ getContents >>= ♯_ ∘ eachline ( fromList ∘ rev... |
{- Formal verification of authenticated append-only skiplists in Agda, version 1.0.
Copyright (c) 2020 Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
open import Data.Empty
open import Data.Fin.Properties using (toℕ<n;... |
{-# OPTIONS --cubical --no-import-sorts --postfix-projections #-}
module Cubical.Codata.M.Bisimilarity where
open import Cubical.Core.Everything
open import Cubical.Codata.M
open import Cubical.Foundations.Equiv.Fiberwise
open import Cubical.Foundations.Everything
open Helpers using (J')
-- Bisimilarity as a coinduct... |
{-
Half adjoint equivalences ([HAEquiv])
- Iso to HAEquiv ([iso→HAEquiv])
- Equiv to HAEquiv ([equiv→HAEquiv])
- Cong is an equivalence ([congEquiv])
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Foundations.Equiv.HalfAdjoint where
open import Cubical.Foundations.Prelude
open import Cubical.F... |
{-# OPTIONS --without-K --exact-split #-}
module abelian-groups where
import 17-number-theory
open 17-number-theory public
is-abelian-Group :
{l : Level} (G : Group l) → UU l
is-abelian-Group G =
(x y : type-Group G) → Id (mul-Group G x y) (mul-Group G y x)
Ab : (l : Level) → UU (lsuc l)
Ab l = Σ (Group l) is-a... |
module Empty where
record ⊤ : Set where
constructor tt
data ⊥ : Set where
{-# IMPORT Data.FFI #-}
{-# COMPILED_DATA ⊥ Data.FFI.AgdaEmpty #-}
absurd : ∀ { A : Set } → ⊥ → A
absurd ()
|
------------------------------------------------------------------------------
-- First-Order Theory of Combinators (FOTC)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polym... |
module OutsideIn.Prelude where
open import Data.Nat public
open import Relation.Binary.PropositionalEquality public renaming ([_] to iC)
open import Relation.Nullary public
open import Function public hiding (case_of_)
cong₃ : ∀ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d}
(f : A → ... |
-- Internal error in coverage checker.
module Issue505 where
data Nat : Set where
zero : Nat
suc : Nat → Nat
_+_ : Nat → Nat → Nat
zero + m = m
suc n + m = suc (n + m)
data Split : Nat → Nat → Set where
1x1 : Split (suc zero) (suc zero)
_∣_ : ∀ {a b c} → Split a b → Split a c → Split a (b + c)
_/_ : ∀ {a... |
module Structure.Setoid.Category.HomFunctor where
import Functional as Fn
open import Function.Equals
open import Function.Equals.Proofs
open import Logic.Predicate
import Lvl
open import Structure.Category
open import Structure.Category.Dual
open import Structure.Category.Functor.Contravariant
open import S... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Any (◇) for containers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Container.Relation.Unary.Any where
open import Level using (_⊔_)
o... |
module SystemF.Syntax.Term.Constructors where
open import Prelude hiding (⊥-elim)
open import SystemF.WellTyped
open import SystemF.Substitutions.Lemmas
open import SystemF.Substitutions
open import SystemF.Syntax.Type.Constructors
-- polymorphic function application
-- applies a polymorphic function to an argument w... |
-- {-# OPTIONS -v interaction.give:30 -v interaction.scope:30 -v highlighting:50 -v auto:10 #-}
-- Andreas, 2014-07-05 and -08
module _ where
data Unit : Set where
unit : Unit
auto : Unit
auto = {!!} -- C-c C-a succeeds but then an error occurs during highlighting
-- Problem WAS:
-- Auto finds a solution, but th... |
module examplesPaperJFP.Sized where
open import Data.Product using (_×_; _,_)
open import Data.String
open import Function using (case_of_)
open import Size
open import examplesPaperJFP.NativeIOSafe
open import examplesPaperJFP.BasicIO using (IOInterface; Command; Response)
open import examplesPaperJFP.ConsoleInterf... |
module STLC2.Kovacs.Normalisation where
open import STLC2.Kovacs.NormalForm public
--------------------------------------------------------------------------------
-- (Tyᴺ)
mutual
infix 3 _⊩_
_⊩_ : 𝒞 → 𝒯 → Set
Γ ⊩ ⎵ = Γ ⊢ⁿᶠ ⎵
Γ ⊩ A ⇒ B = ∀ {Γ′} → (η : Γ′ ⊇ Γ) (∂a : Γ′ ∂⊩ A)
... |
{-# OPTIONS --without-K #-}
open import lib.Basics
module lib.types.Empty where
Empty-rec : ∀ {i} {A : Type i} → (Empty → A)
Empty-rec = Empty-elim
⊥-rec : ∀ {i} {A : Type i} → (⊥ → A)
⊥-rec = Empty-rec
Empty-is-prop : is-prop Empty
Empty-is-prop = Empty-elim
⊥-is-prop : is-prop ⊥
⊥-is-prop = Empty-is-prop
negat... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Sizes for Agda's sized types
------------------------------------------------------------------------
module Size where
postulate
Size : Set
Size<_ : Size → Set
↑_ : Size → Size
∞ : Size
{-#... |
{-# OPTIONS --without-K #-}
module lib.Basics where
open import lib.Base public
open import lib.PathGroupoid public
open import lib.PathFunctor public
open import lib.NType public
open import lib.Equivalences public
open import lib.Univalence public
open import lib.Funext public
open import lib.PathOver public
|
-- Andreas, 2011-04-14
-- {-# OPTIONS -v tc.cover:20 -v tc.lhs.unify:20 #-}
-- Jesper, 2016-06-23: should also work --cubical-compatible
{-# OPTIONS --cubical-compatible #-}
module Issue291-1775 where
-- Example by Ulf
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data _≡_ {A : Set}(a : A) : A -> Set where... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.types.Group
open import lib.types.Sigma
open import lib.types.Pi
open import lib.types.Truncation
open import lib.types.SetQuotient
open import lib.groups.Homomorphism
open import lib.groups.Subgroup
open import lib.g... |
-- Issue #2979 reported by Favonia on 2018-02-23
{-# OPTIONS --cubical-compatible --rewriting --confluence-check #-}
data _==_ {A : Set} (a : A) : A → Set where
idp : a == a
record Marked (A : Set) : Set where
constructor mark
field
unmark : A
open Marked
postulate
_↦_ : ∀ {A : Set} → A → A → Set
{-# BU... |
module Printf where
open import Data.List hiding(_++_)
open import Data.String
open import Data.Unit
open import Data.Empty
open import Data.Char
open import Data.Product
open import Data.Nat.Show renaming (show to showNat)
open import Data.Nat
open import Function using (_∘_)
data ValidFormat : Set₁ where
argume... |
module Imports.Issue958 where
postulate FunctorOps : Set
module FunctorOps (ops : FunctorOps) where
postulate map : Set
postulate IsFunctor : Set
module IsFunctor (fun : IsFunctor) where
postulate ops : FunctorOps
open FunctorOps ops public
|
module Okasaki where
open import Data.Bool using (Bool; true; false) renaming (T to So; not to ¬)
open import Data.Nat hiding (_<_; _≤_; _≟_; compare)
renaming (decTotalOrder to ℕ-DTO)
open import Relation.Binary hiding (_⇒_)
module RBTree {a ℓ}(order : StrictTotalOrder a ℓ ℓ) where
open module sto = StrictTot... |
module _ where
open import Agda.Builtin.Nat
open import Agda.Builtin.List
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.Unit
open import Agda.Builtin.Equality
variable
A B : Set
x y : A
xs : List A
infix 3 _∈_
data _∈_ {A : Set} (x : A) : List A → Set where
zero : ... |
module Data.List.Proofs.Length where
import Lvl
open import Functional
open import Function.Names as Names using (_⊜_)
open import Data.Boolean
open import Data.List as List
open import Data.List.Functions
open import Logic
open import Logic.Propositional
open import Numeral.Finite
open import Numeral.Natural
open imp... |
-- We show Gausssian Integers forms an Euclidean domain. The proofs
-- are straightforward.
{-# OPTIONS --without-K --safe #-}
module GauInt.EucDomain where
-- imports from local.
-- Hiding the usual div and mod function. We will the new instance in
-- Integer.EucDomain2
import Instances hiding (DMℤ)
open Instances... |
{-
Definition of various kinds of categories.
This library follows the UniMath terminology, that is:
Concept Ob C Hom C Univalence
Precategory Type Type No
Category Type Set No
Univalent Category Type Set Yes
This file also contains
- pathToIso ... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.NType2
open import lib.types.Nat
open import lib.types.TLevel
open import lib.types.Empty
open import lib.types.Pi
open import lib.types.Sigma
open import lib.types.Truncation
open import lib.types.Pointed
open import lib.types.Group
open import lib.ty... |
module Issue2579.Import where
record Wrap (A : Set) : Set where
constructor wrap
field wrapped : A
|
module cedille-find where
open import lib
open import cedille-types
occurrence-tuple = var × posinfo × string
occurrences-table = trie (𝕃 occurrence-tuple)
--------------------------
-- helper functions
--------------------------
occurrence-tuple-to-JSON : occurrence-tuple → string
occurrence-tuple-to-JSON (str ... |
module list-thms2 where
open import bool
open import bool-thms
open import bool-thms2
open import functions
open import list
open import list-thms
open import nat
open import nat-thms
open import product-thms
open import logic
list-and-++ : ∀(l1 l2 : 𝕃 𝔹) → list-and (l1 ++ l2) ≡ (list-and l1) && (list-and l2)
list-... |
{-# OPTIONS --allow-unsolved-metas #-}
module Semantics.Bind where
open import Syntax.Types
open import Syntax.Context renaming (_,_ to _,,_)
open import Syntax.Terms
open import Syntax.Substitution.Kits
open import Syntax.Substitution.Instances
open import Syntax.Substitution.Lemmas
open import Semantics.Types
open ... |
module Prelude where
infix 20 _≡_ _≤_ _∈_
infixl 60 _,_ _++_ _+_ _◄_ _◄²_
_∘_ : {A B : Set}{C : B -> Set}(f : (x : B) -> C x)(g : A -> B)(x : A) -> C (g x)
(f ∘ g) x = f (g x)
data _≡_ {A : Set}(x : A) : {B : Set} -> B -> Set where
refl : x ≡ x
cong : {A : Set}{B : A -> Set}(f : (z : A) -> B z){x y : A} ->
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Patterns for Fin
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Fin.Patterns where
open import Data.Fin.Base
--------------------------... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Pretty Printing
-- This module is based on Jean-Philippe Bernardy's functional pearl
-- "A Pretty But Not Greedy Printer"
------------------------------------------------------------------------
{-# OPTIONS --wi... |
module CoinductiveBuiltinList where
open import Common.Coinduction
data List (A : Set) : Set where
[] : List A
_∷_ : (x : A) (xs : ∞ (List A)) → List A
{-# BUILTIN LIST List #-}
{-# BUILTIN NIL [] #-}
{-# BUILTIN CONS _∷_ #-}
|
-- This module introduces operators.
module Introduction.Operators where
-- Agda has a very flexible mechanism for defining operators, supporting infix,
-- prefix, postfix and mixfix operators.
data Nat : Set where
zero : Nat
suc : Nat -> Nat
-- Any name containing underscores (_) can be used as an operator b... |
module Issue1232.All where
import Issue1232.Fin
import Issue1232.List
|
{-# OPTIONS --without-K --safe #-}
open import Level
open import Categories.Category
module Categories.Functor.Power.Functorial {o ℓ e : Level} (C : Category o ℓ e) where
open import Relation.Binary.PropositionalEquality using (_≡_; refl; trans)
open import Categories.Functor renaming (id to idF)
open import Catego... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light where
open import Light.Library public
module Implementation where open import Light.Implementation public
|
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.NatMinusOne where
open import Cubical.Data.NatMinusOne.Base public
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.Bouquet
open import cohomology.Theory
module cohomology.Bouquet {i} (OT : OrdinaryTheory i) where
open OrdinaryTheory OT
open import cohomology.Sphere OT
C-Bouquet-diag : ∀ n (I : Type i) → has-choice 0 I i
→ C (ℕ-to-ℤ n) (⊙Bouquet I n)... |
module Issue756b where
data Nat : Set where
zero : Nat
suc : Nat → Nat
data T : (Nat → Nat) → Set where
idId : T (λ { zero → zero; (suc n) → suc n })
bad : ∀ f → T f → Nat
bad .(λ { zero → zero ; (suc n) → suc n }) idId = zero |
{-# OPTIONS --rewriting --without-K #-}
open import Prelude
open import GSeTT.Syntax
open import GSeTT.Rules
open import GSeTT.Disks
open import CaTT.Ps-contexts
open import CaTT.Uniqueness-Derivations-Ps
open import Sets ℕ eqdecℕ
module CaTT.Fullness where
data Ty : Set₁
data Tm : Set₁
data Sub : Set₁
data... |
------------------------------------------------------------------------
-- A sound, inductive approximation of stream equality
------------------------------------------------------------------------
-- The point of this module is to give a short (not entirely faithful)
-- illustration of the technique used to establ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Support.StarEquality where
open import Categories.Support.Equivalence
open import Data.Star
import Data.Star.Properties as Props
open import Level
open import Relation.Binary
using ( Rel
; Reflexive; Symmetric; Transitive
; IsEquivalence
... |
module LC.Confluence where
open import LC.Base
open import LC.Subst
open import LC.Reduction
open import Data.Product
open import Relation.Binary.Construct.Closure.ReflexiveTransitive
β→confluent : ∀ {M N O : Term} → (M β→ N) → (M β→ O) → ∃ (λ P → (N β→* P) × (O β→* P))
β→confluent (β-ƛ-∙ {M} {N}) β-ƛ-∙ = M [ N... |
-- This module closely follows a section of Martín Escardó's HoTT lecture notes:
-- https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#funextfromua
{-# OPTIONS --without-K #-}
module Util.HoTT.FunctionalExtensionality where
open import Axiom.Extensionality.Propositional using
(Extensional... |
open import Prelude
module Nat where
data Nat : Set where
Z : Nat
1+ : Nat → Nat
{-# BUILTIN NATURAL Nat #-}
-- the succ operation is injective
1+inj : (x y : Nat) → (1+ x == 1+ y) → x == y
1+inj Z .0 refl = refl
1+inj (1+ x) .(1+ x) refl = refl
-- equality of naturals is decidable. we represe... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.PathSetIsInitalCover {i} (X : Ptd i)
-- and an arbitrary covering
{k} (⊙cov : ⊙Cover X k) where
open Cover
private
univ-cover = path-set-cover X
module ⊙cov = ⊙Cover ⊙cov
-- Weak initiality by transport.
quotient-cover... |
import Lvl
open import Structure.Operator.Vector
open import Structure.Setoid
open import Type
module Structure.Operator.Vector.FiniteDimensional.Proofs
{ℓᵥ ℓₛ ℓᵥₑ ℓₛₑ}
{V : Type{ℓᵥ}} ⦃ equiv-V : Equiv{ℓᵥₑ}(V) ⦄
{S : Type{ℓₛ}} ⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄
{_+ᵥ_ : V → V → V}
{_⋅ₛᵥ_ : S → V → V}
{_+ₛ_ _⋅... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Diagram.Pushout {o ℓ e} (C : Category o ℓ e) where
open Category C
open HomReasoning
open import Level
private
variable
A B X Y Z : Obj
h h₁ h₂ j : A ⇒ B
record Pushout (f : X ⇒ Y) (g : X ⇒ Z) : Set (o ⊔ ℓ ⊔ e) where
... |
module L.Base where
-- Reexport definitions
open import L.Base.Sigma public
open import L.Base.Coproduct public renaming (_+_ to _⊎_)
open import L.Base.Empty public
open import L.Base.Unit public
open import L.Base.Nat public
open import L.Base.Id public
|
open import Level
open import Relation.Binary.PropositionalEquality
open import Relation.Binary using (Setoid)
import Function.Equality
import Relation.Binary.Reasoning.Setoid as SetoidR
import Categories.Category
import Categories.Functor
import Categories.Category.Instance.Setoids
import Categories.Category.Cocarte... |
-- Andreas, 2017-12-13, issue #2867
-- Parentheses needed when giving module argument
module _ where
module M (A : Set) where
id : A → A
id x = x
test : (F : Set → Set) (A : Set) (x : F A) → F A
test F A = λ x → x
where open M {!F A!} -- Give this
-- Expected: M (F A)
|
------------------------------------------------------------------------
-- Admissible rules are sometimes not "postulable"
------------------------------------------------------------------------
-- Even though a rule is admissible it may not be sound to postulate
-- it, i.e. add it as an inductive constructor. This ... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
open import Categories.Object.BinaryProducts
module Categories.Object.Exponentiating {o ℓ e}
(C : Category o ℓ e)
(binary : BinaryProducts C) where
open Category C
open BinaryProducts binary
import Categories.Object.Product
open Categor... |
{-# OPTIONS --safe #-}
module Cubical.Data.FinData.Properties where
open import Cubical.Foundations.Function
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Transport
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Powerset
open... |
-- Currently imports are not allowed in mutual blocks.
-- This might change.
module ImportInMutual where
mutual
import Fake.Module
T : Set -> Set
T A = A
|
{-
A parameterized family of structures S can be combined into a single structure:
X ↦ (a : A) → S a X
This is more general than Structures.Function in that S can vary in A.
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Parameterized where
open import Cubical.Foundations.Prelude
op... |
module Haskell.Prim.Bool where
open import Agda.Primitive
open import Agda.Builtin.Bool public
private
variable
ℓ : Level
--------------------------------------------------
-- Booleans
infixr 3 _&&_
_&&_ : Bool → Bool → Bool
false && _ = false
true && x = x
infixr 2 _||_
_||_ : Bool → Bool → Bool
false || ... |
------------------------------------------------------------------------------
-- Testing the η-expansion
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# O... |
module Text.Greek.SBLGNT.Mark where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΚΑΤΑ-ΜΑΡΚΟΝ : List (Word)
ΚΑΤΑ-ΜΑΡΚΟΝ =
word (Ἀ ∷ ρ ∷ χ ∷ ὴ ∷ []) "Mark.1.1"
∷ word (τ ∷ ο ∷ ῦ ∷ []) "Mark.1.1"
∷ word (ε ∷ ὐ ∷ α ∷ γ ∷ γ ∷ ε ∷ ∙λ ∷ ί ∷ ο ... |
{-# OPTIONS --without-K #-}
module FinNatLemmas where
open import Data.Empty using (⊥-elim)
open import Data.Product using (_×_; _,_)
open import Data.Nat
using (ℕ; zero; suc; _+_; _*_; _<_; _≤_; _∸_; z≤n; s≤s; module ≤-Reasoning)
open import Data.Nat.Properties
using (m+n∸n≡m; m≤m+n; +-∸-assoc; cancel-+-left)
o... |
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
test : (A : Set) (let X = _) (x : X) (p : A ≡ Bool) → Bool
test .Bool true refl = false
test .Bool false refl = true
|
-- Andreas, 2014-09-23
-- Syntax declaration for overloaded constructor.
module _ where
module A where
syntax c x = ⟦ x ⟧
data D2 (A : Set) : Set where
c : A → D2 A
data D1 : Set where
c : D1
open A
test : D2 D1
test = ⟦ c ⟧
-- Should work.
|
module Issue1419 where
module A where
module M where
module B where
module M where
open A
open B
module N (let open M) where
module LotsOfStuff where
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- A simple example of a program using the foreign function interface
------------------------------------------------------------------------
module README.Foreign.Haskell where
-- In order to be considered safe ... |
{-# OPTIONS --sized-types #-}
module Sized.Data.List where
import Lvl
open import Lang.Size
open import Type
private variable ℓ ℓ₁ ℓ₂ : Lvl.Level
private variable T A A₁ A₂ B B₁ B₂ Result : Type{ℓ}
private variable s s₁ s₂ : Size
data List(s : Size){ℓ} (T : Type{ℓ}) : Type{ℓ} where
∅ : List(s)(T) -- An emp... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
{- The cofiber space of [winl : X → X ∨ Y] is equivalent to [Y],
- and the cofiber space of [winr : Y → X ∨ Y] is equivalent to [X]. -}
module homotopy.WedgeCofiber {i} (X Y : Ptd i) where
module CofWinl where
module Into = CofiberRec {f = winl} (pt Y... |
module Issue1278.A (X : Set1) where
data D : Set where
d : D
|
-- Combinators for logical reasoning
{-# OPTIONS --without-K --safe --exact-split #-}
module Constructive.Combinators where
-- agda-stdlib
open import Data.Empty
open import Data.Sum as Sum
open import Data.Product as Prod
open import Function.Base
open import Relation.Nullary using (¬_; Dec; yes; no)
open import Rel... |
module Sessions.Semantics.Commands where
open import Prelude
open import Data.Fin
open import Sessions.Syntax.Types
open import Sessions.Syntax.Values
mutual
data Cmd : Pred RCtx 0ℓ where
fork : ∀[ Comp unit ⇒ Cmd ]
mkchan : ∀ α → ε[ Cmd ]
send : ∀ {a α} → ∀[ (Endptr (a ! α) ... |
{-# OPTIONS --cubical --safe #-}
module Relation.Nullary.Decidable.Properties where
open import Relation.Nullary.Decidable
open import Level
open import Relation.Nullary.Stable
open import Data.Empty
open import HLevels
open import Data.Empty.Properties using (isProp¬)
open import Data.Unit
open import Data.Empty
De... |
-- Semantics of syntactic traversal and substitution
module Semantics.Substitution.Traversal where
open import Syntax.Types
open import Syntax.Context renaming (_,_ to _,,_)
open import Syntax.Terms
open import Syntax.Substitution.Kits
open import Syntax.Substitution.Instances
open import Semantics.Types
open import... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Endomorphisms on a Set
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Function.Endomorphism.Propositional {a} (A : Set a) where
open import A... |
-- MIT License
-- Copyright (c) 2021 Luca Ciccone and Luca Padovani
-- Permission is hereby granted, free of charge, to any person
-- obtaining a copy of this software and associated documentation
-- files (the "Software"), to deal in the Software without
-- restriction, including without limitation the rights to use... |
open import Agda.Primitive using (_⊔_; lsuc)
open import Categories.Category
open import Categories.Functor
import Categories.Category.Cartesian as Cartesian
open import Categories.Monad.Relative
import SecondOrder.RelativeKleisli
open import SecondOrder.RelativeMonadMorphism
-- The category of relative monads and r... |
module Sets.ImageSet where
open import Data
open import Functional
open import Logic
open import Logic.Propositional
open import Logic.Predicate
import Lvl
open import Structure.Function
open import Structure.Setoid renaming (_≡_ to _≡ₛ_)
open import Type
open import Type.Dependent
private variable ℓ ℓₑ ℓᵢ ℓᵢ₁ ℓ... |
module Issue878 where
data _==_ {A : Set} (a : A) : A → Set where
idp : a == a
data ⊤ : Set where
tt : ⊤
record args : Set₁ where
field
P : ⊤ → Set
g : (b : ⊤) → P b
module _ (r : args) where
open args r
postulate
ext : ∀ b → P b
module _ {r : args} where
open args r
postulate
β-r :... |
------------------------------------------------------------------------
-- ω-continuous functions
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Partiality-monad.Inductive.Omega-continuous where
open import Equality.Propositional
open import P... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use the Data.(Nat/Fin).Induction
-- modules directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Inducti... |
module SystemF.Syntax.Context where
open import Prelude
open import SystemF.Syntax.Type
open import Data.Vec
Ctx : ℕ → ℕ → Set
Ctx ν n = Vec (Type ν) n
|
module #9 where
{-
Define the type family Fin : N → U mentioned at the end of §1.3, and the dependent
function fmax : ∏(n:N) Fin(n + 1) mentioned in §1.4.
-}
open import Data.Nat
data Fin : ℕ → Set where
FZ : {n : ℕ} → Fin (suc n)
FS : {n : ℕ} → Fin n → Fin (suc n)
fmax : (n : ℕ) → Fin (n + 1)
fmax zero = F... |
------------------------------------------------------------------------
-- An expression can be derived from at most one string
------------------------------------------------------------------------
open import Mixfix.Expr
module Mixfix.Cyclic.Uniqueness
(i : PrecedenceGraphInterface)
(g : Preced... |
module Example where
open import Prelude
import Typed
data Data : Set where
nat : Data
bool : Data
Datatype : Data -> List (List Data)
Datatype nat = ε ◄ ε ◄ (ε ◄ nat)
Datatype bool = ε ◄ ε ◄ ε
data Effect : Set where
data _⊆_ : Effect -> Effect -> Set where
refl⊆ : forall {M} -> M ⊆ M
Monad : Effect ->... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category.Core
module Categories.Category.Construction.KaroubiEnvelope.Properties {o ℓ e} (𝒞 : Category o ℓ e) where
open import Data.Product using (_,_)
open import Categories.Functor renaming (id to idF)
open import Categories.Functor.Properties
open impo... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Functor.Hom where
open import Data.Product using (_×_; uncurry; proj₁; proj₂; _,_)
open import Categories.Support.Equivalence
open import Categories.Support.SetoidFunctions renaming (id to id′)
open import Categories.Category
open import Categories.Bifunctor u... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.Path where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.Isomorphism
private
variable
ℓ ℓ' : Level
A : Type ℓ
-- Less polymorphic version o... |
module DivMod where
open import IO
open import Data.Nat
open import Data.Nat.DivMod
open import Codata.Musical.Notation
open import Data.String.Base
open import Data.Fin.Base using (toℕ)
open import Level using (0ℓ)
g : ℕ
g = 7 div 5
k : ℕ
k = toℕ (7 mod 5)
showNat : ℕ → String
showNat zero = "Z"
showNat (suc x) = ... |
-- Andreas, 2016-07-29
--
-- agda --library-file=GARBAGE Issue2122.agda
--
-- should complain about non-existent library file.
-- This file is intentionally left empty.
|
module Sets.IterativeSet.Oper where
import Lvl
open import Data
open import Data.Boolean
open import Data.Boolean.Stmt
open import Data.Either as Either using (_‖_)
open import Data.Tuple as Tuple using ()
open import Functional
open import Logic
open import Numeral.Natural
open import Relator.Equals using () ren... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Non-empty AVL trees
------------------------------------------------------------------------
-- AVL trees are balanced binary search trees.
-- The search tree invariant is specified using the technique
-- descr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.