text stringlengths 4 690k |
|---|
import Lvl
module Structure.Category.Category {ℓₒ ℓₘ ℓₑ : Lvl.Level} where
open import Structure.Category
open import Structure.Category.Functor.Equiv
open import Structure.Category.Functor
import Structure.Category.Functor.Functors as Functors
open import Structure.Category.Functor.Functors.Proofs
open Ca... |
{-# OPTIONS --without-K --safe #-}
-- verbatim dual of Categories.Category.Construction.Properties.Kleisli
module Categories.Category.Construction.Properties.CoKleisli where
open import Level
import Relation.Binary.PropositionalEquality as ≡
open import Categories.Adjoint
open import Categories.Adjoint.Properties
ope... |
module PatternSynonymImports2 where
open import PatternSynonyms
open import PatternSynonymImports
myzero' = z
myzero'' = myzero
list2 : List _
list2 = 1 ∷ [] |
{-# OPTIONS --without-K #-}
{- This brief section introduces an alternative definition
of n-connectedness defined purely using propositional truncation,
in contrast to the standard one using n-truncations
(The below observation has resulted in Exercise 7.6 of
the HoTT book being modified accordingly).
... |
module Nat.Binary where
open import Data.Bool hiding (_≤_; _<_; _<?_)
open import Data.Empty
open import Data.List
open import Data.List.Properties
open import Data.Maybe
open import Data.Product
open import Data.Sum
open import Function
open import Nat.Class
open import Nat.Unary
using (ℕ₁)
renaming
(zero to ... |
{-# OPTIONS --without-K #-}
module F1b where
open import Data.Unit
open import Data.Sum hiding (map; [_,_])
open import Data.Product hiding (map; ,_)
open import Function using (flip)
open import Relation.Binary.Core using (IsEquivalence; Reflexive; Symmetric; Transitive)
open import Relation.Binary
open import Grou... |
module UnicodeEllipsis where
f : {A B : Set} → (A → B) → A → B
f g a with g a
… | x = x
|
module LineEndings.Unix where
postulate ThisWorks : Set
|
{-# OPTIONS --without-K --safe #-}
open import Level
open import Categories.Category.Core using (Category)
open import Categories.Category
open import Categories.Monad
module Categories.Adjoint.Construction.Adjunctions {o ℓ e} {C : Category o ℓ e} (M : Monad C) where
open Category C
open import Categories.Adjoint
... |
module Dave.Structures.Definitions where
open import Dave.Equality public
op₁ : Set → Set
op₁ A = A → A
op₂ : Set → Set
op₂ A = A → A → A
associative : {A : Set} → op₂ A → Set
associative _·_ = ∀ m n p → (m · n) · p ≡ m · (n · p)
commutative : {A : Set} → op₂ A → Set
commutative ... |
open import MLib.Algebra.PropertyCode
open import MLib.Algebra.PropertyCode.Structures
using (bimonoidCode; BimonoidK; +; *; 0#; 1#)
module MLib.Algebra.Operations {c ℓ} (struct : Struct bimonoidCode c ℓ) where
open import MLib.Prelude
open import Data.Fin.Permutation as Perm using (Permutation; Permutation′; _⟨$⟩ʳ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed binary relations
------------------------------------------------------------------------
-- The contents of this module should be accessed via
-- `Relation.Binary.Indexed.Heterogeneous`.
{-# OPTIONS --... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
-- The Category of Elements
open import Cubical.Categories.Category
module Cubical.Categories.Constructions.Elements {ℓ ℓ'} {C : Precategory ℓ ℓ'} where
open import Cubical.Categories.Instances.Sets
open import Cubical.Categories.Functor
open import Cubical.Foundat... |
module Data.QuadTree.FoldableProofs.FoldableFunctorProof where
open import Haskell.Prelude renaming (zero to Z; suc to S)
open import Data.Logic
open import Data.QuadTree.Implementation.Definition
open import Data.QuadTree.Implementation.ValidTypes
open import Data.QuadTree.Implementation.QuadrantLenses
open import Da... |
------------------------------------------------------------------------------
-- Well-founded induction on the relation LTL
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-pol... |
module UnknownImplicitInstance where
⟨⟩ : {A : Set} {{a : A}} → A
⟨⟩ {{a}} = a
postulate
B : Set
instance b : B
f : {A : Set₁} {{a : A}} → A
x : Set
x = f
|
module Numeral.Rational where
open import Data.Tuple
open import Logic
import Lvl
open import Numeral.Natural
open import Numeral.Natural.Oper
open import Numeral.Integer
open import Numeral.Integer.Oper
open import Relator.Equals
open import Type
open import Type.Quotient
-- Equivalence relation of quotient equ... |
module Selective.Runtime where
open import Selective.Simulate
open import Selective.SimulationEnvironment
open import Prelude
open import Data.Nat.Show using (show)
open import Codata.Musical.Notation using ( ♯_ ; ♭)
import IO
open ∞Trace
record BlockedCount : Set₂ where
field
return-count : ℕ
receive-count... |
module TAlgebra where
open import Level
open import Data.Product
open import Relation.Binary
open Setoid
open import Basic
open import Category
import Functor
import Nat
import Adjoint
open import Monad
open Category.Category
open Functor.Functor
open Nat.Nat
open Nat.Export
open Adjoint.Export
open Monad.Monad
rec... |
open import Nat
open import Prelude
open import dynamics-core
open import contexts
open import lemmas-disjointness
open import exchange
-- this module contains all the proofs of different weakening structural
-- properties that we use for the hypothetical judgements
module weakening where
mutual
weaken-subst-Δ :... |
{-# OPTIONS --without-K #-}
module FiniteFunctions where
open import Data.Vec using (tabulate; _∷_)
open import Data.Fin using (Fin; zero; suc)
open import Data.Nat using (ℕ; suc)
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; cong; module ≡-Reasoning)
open import Function using (_∘_... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use `Data.Universe` instead.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Universe where
{-# WARNING_ON_I... |
-- A cut-down example:
module Issue295 where
data ⊥ : Set where
data Arr : Set where
_⟶_ : ⊥ → ⊥ → Arr
_﹔_ : Arr → Arr → Arr
(a ⟶ b)﹔(c ⟶ d) with b
... | ()
data Fun : Arr → Set where
∙ : ∀ a b c d → Fun (a ⟶ b) → Fun (c ⟶ d) → Fun ((a ⟶ b)﹔(c ⟶ d))
f : ∀ a b c d e f → Fun (a ⟶ b) → Fun (c ⟶ d) → Fun (e ⟶ f)
... |
{-# OPTIONS --without-K --rewriting #-}
module lib.modalities.Modalities where
open import lib.modalities.Truncation public
|
module Cats.Category.Cat.Facts.Product where
open import Data.Bool using (true ; false)
open import Data.Product using (_,_)
open import Level using (_⊔_)
open import Cats.Category
open import Cats.Category.Cat as Cat using (Cat ; Functor ; _⇒_ ; _∘_ ; id ; _≈_)
open import Cats.Category.Product.Binary using (_×_)
op... |
module datatype-functions where
open import lib
open import ctxt
open import syntax-util
open import general-util
open import cedille-types
open import subst
open import rename
open import is-free
data indx : Set where
Index : var → tk → indx
indices = 𝕃 indx
data datatype : Set where
Data : var → params → indic... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Algebra where
-- Algebra for a Functor
open import Level
open import Function using (_$_)
open import Categories.Category using (Category)
open import Categories.Functor using (Functor; Endofunctor)
private
variable
o ℓ e : Level
module _ {C : Cate... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some derivable properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Algebra.Properties.BooleanAlgebra
{b₁ b₂} (B :... |
-- Andreas, 2017-08-13, issue #2684
-- Better error for abstract constructor.
abstract
data D : Set where
c : D
data E : Set where
c : E
test : D
test = c
-- Expected:
-- Constructor c is abstract, thus, not in scope here
-- when checking that the expression c has type D
|
-- Check that unquoted functions are termination checked.
module _ where
open import Common.Prelude hiding (_>>=_)
open import Common.Reflection
open import Common.Equality
`⊥ : Type
`⊥ = def (quote ⊥) []
⊥-elim : ∀ {a} {A : Set a} → ⊥ → A
⊥-elim ()
{-
Generate
cheat : ⊥
cheat = cheat
-}
makeLoop : TC Term
make... |
module Issue1290b where
open import Issue1290
data Eq (x : R) : R → Set where
refl : Eq x x
test : Eq x (exp x)
test = refl
|
------------------------------------------------------------------------
-- Simple combinators working solely on and with functions
------------------------------------------------------------------------
module Data.Function where
infixr 9 _∘_ _∘′_ _∘₀_ _∘₁_
infixl 1 _on_ _on₁_
infixl 1 _⟨_⟩_ _⟨_⟩₁_
infixr 0 _-[_]₁-... |
{-# OPTIONS --safe #-}
module Definition.Typed.Consequences.Injectivity where
open import Definition.Untyped hiding (wk)
import Definition.Untyped as U
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.Typed.Weakening
open import Definition.Typed.Properties
open import Def... |
module _ where
import Issue4373.A as A hiding (t)
postulate
search : ⦃ x : A.T ⦄ → Set
fail : Set
fail = search
|
module Function.Domains.Proofs where
|
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Implementation.Standard.Relation.Decidable where
open import Light.Variable.Sets
import Light.Implementation.Standard.Data.Empty
import Light.Implementation.Standard.Data.Unit
open import Light.Library.Data.Empty as Empty usi... |
module _ where
open import Agda.Primitive
open import Agda.Builtin.Equality
data Wrap {a} (A : Set a) : Set a where
wrap : A → Wrap A
data Unit (A : Set) : Set where
unit : Unit A
cast : ∀ {A B} → Unit A → Unit B
cast unit = unit
data Functor {a b} (F : Set a → Set b) : Set (lsuc (a ⊔ b)) where
mkFunctor : ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.Bouquet
open import homotopy.FinWedge
open import homotopy.SphereEndomorphism
open import groups.SphereEndomorphism
open import cw.CW
open import cw.FinCW
open import cw.WedgeOfCells
open import cw.DegreeByProjection {lzero}
open import coho... |
module Bin-embedding where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; cong)
open Eq.≡-Reasoning
open import Data.Nat using (ℕ; zero; suc; _+_; _*_)
open import Data.Nat.Properties using (+-identityʳ; +-suc; +-comm; +-assoc)
open import Isomorphism using (_≲_)
-- 2進数の表現
data Bin... |
{-# OPTIONS --cubical-compatible --rewriting --confluence-check #-}
postulate
_↦_ : ∀ {i} {A : Set i} → A → A → Set i
idr : ∀ {i} {A : Set i} {a : A} → a ↦ a
{-# BUILTIN REWRITE _↦_ #-}
data _==_ {i} {A : Set i} (a : A) : A → Set i where
idp : a == a
PathOver : ∀ {i j} {A : Set i} (B : A → Set j)
{x y : A} (... |
kk : ∀ {ℓ} → Set ℓ
kk = {!∀ B → B!}
|
module plfa.part1.Connectives where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl)
open Eq.≡-Reasoning
open import Data.Nat using (ℕ)
open import Function using (_∘_)
open import plfa.part1.Isomorphism using (_≃_; _≲_; extensionality)
open plfa.part1.Isomorphism.≃-Reasoning
data _×_ (A B... |
module _ where
open import Agda.Builtin.List
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
variable
a b : Set
{-# FOREIGN AGDA2HS
import Prelude hiding (map, sum)
#-}
data Exp (v : Set) : Set where
Plus : Exp v → Exp v → Exp v
Int : Nat → Exp v
Var : v → Exp v
{-# COMPILE AGDA2HS Exp #... |
module Functors.Fin where
open import Library
open import Categories.Sets
open import Categories.Setoids
open import Categories
open import Categories.Initial
open import Categories.CoProducts
open import Functors
open import Isomorphism
open import Functors.FullyFaithful
open Cat
open Fun
open Iso
Nats : Cat {lzero... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.SumFin where
open import Cubical.Data.SumFin.Base public
|
-- Andreas, 2016-10-14, issue #2260 testcase by Nisse
-- {-# OPTIONS -v tc.meta:40 #-}
data D : Set → Set₁ where
d : (A : Set) → D A
postulate
A : Set
f : (A : Set) → D A → D A
B : Set₁
B = Set
where
abstract
A′ : Set
A′ = A
x : D A′
x = f _ (d A′)
-- WAS: internal error
-- should check
|
------------------------------------------------------------------------
-- A comparison of the two definitions of bisimilarity
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Bisimilarity.Comparison where
open import Equality.Propositional
open import Lo... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- Skew closed structure on a category
module SOAS.Construction.Skew.SkewClosed {o ℓ e} (C : Category o ℓ e) where
private
module C = Category C
open C
variable
A B X X′ Y Y′ Z Z′ U ℐ : Obj
f g : A ⇒ B
open Commutation C
open import... |
module Categories.Setoids where
open import Library
open import Categories
record Setoid {a b} : Set (lsuc (a ⊔ b)) where
field set : Set a
eq : set → set → Set b
ref : {s : set} → eq s s
sym' : {s s' : set} → eq s s' → eq s' s
trn : {s s' s'' : set} →
eq s s' → eq s... |
------------------------------------------------------------------------
-- Divisibility and coprimality
------------------------------------------------------------------------
module Data.Integer.Divisibility where
open import Data.Function
open import Data.Integer
open import Data.Integer.Properties
import Data.Na... |
module Issue18 where
postulate
D : Set
data ∃ (A : D → Set) : Set where
_,_ : (witness : D) → A witness → ∃ A
|
{-# OPTIONS --cubical #-}
module Cubical.README where
------------------------------------------------------------------------
-- An experimental library for Cubical Agda
-----------------------------------------------------------------------
-- The library comes with a .agda-lib file, for use with the library
-- man... |
module Lang.Function where
import Lvl
open import Data.Boolean
open import Data.List as List using (List)
open import Data.List.Functions.Positional as List
open import Data.Option
open import Data
open import Lang.Reflection
open import Syntax.Do
open import Type
-- A default value tactic for implicit arguments... |
postulate
T C D : Set
instance I : {{_ : C}} → D
d : {{_ : D}} → T
t : T
t = d
|
{-# OPTIONS --without-K --safe #-}
module Categories.Diagram.Cone.Properties where
open import Level
open import Categories.Category
open import Categories.Functor
open import Categories.Functor.Properties
open import Categories.NaturalTransformation
import Categories.Diagram.Cone as Con
import Categories.Morphism.R... |
{-# OPTIONS --safe #-}
module Definition.Conversion.HelperDecidable where
open import Definition.Untyped
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.Conversion
open import Definition.Conversion.Whnf
open import Definition.Conver... |
record R (X : Set) : Set₁ where
field
P : X → Set
f : ∀ {x : X} → P x → P x
open R {{…}}
test : ∀ {X} {{r : R X}} {x : X} → P x → P x
test p = f p
-- WAS: instance search fails with several candidates left
-- SHOULD: succeed
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Heterogeneous equality
------------------------------------------------------------------------
{-# OPTIONS --with-K --safe #-}
module Relation.Binary.HeterogeneousEquality where
import Axiom.Extensionality.He... |
{-# OPTIONS --without-K #-}
module Data.Word8.Primitive where
open import Agda.Builtin.Bool using (Bool)
open import Agda.Builtin.Nat using (Nat)
{-# FOREIGN GHC import qualified Data.Word #-}
{-# FOREIGN GHC import qualified Data.Bits #-}
postulate
Word8 : Set
_==_ : Word8 → Word8 → Bool
_/=_ : Word8 → Word8... |
------------------------------------------------------------------------------
-- Testing the --schematic-propositional-symbols option
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-un... |
module Formalization.ClassicalPropositionalLogic.NaturalDeduction.Consistency where
import Lvl
open import Formalization.ClassicalPropositionalLogic.NaturalDeduction
open import Formalization.ClassicalPropositionalLogic.NaturalDeduction.Proofs
open import Formalization.ClassicalPropositionalLogic.Syntax
open impo... |
open import Structure.Operator.Field
open import Structure.Setoid
open import Type
-- Operators for matrices over a field.
module Numeral.Matrix.OverField {ℓ ℓₑ}{T : Type{ℓ}} ⦃ equiv : Equiv{ℓₑ}(T) ⦄ {_+ₛ_ _⋅ₛ_ : T → T → T} ⦃ field-structure : Field(_+ₛ_)(_⋅ₛ_) ⦄ where
open Field(field-structure) renaming (_−_ to _−ₛ_... |
module Five where
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
import Data.Nat as ℕ
import Data.Nat.Properties as ℕₚ
import Data.List as List
import Data.List.Properties as Listₚ
import Data.Product as Product
open List using (List; []; _∷_; _++_)
open ℕ using (ℕ; zero; suc; _+_)
open Product u... |
open import Prelude renaming (lift to finlift) hiding (id; subst)
module Implicits.Substitutions.Lemmas.LNMetaType where
open import Implicits.Syntax.LNMetaType
open import Implicits.Substitutions.LNMetaType
open import Data.Fin.Substitution
open import Data.Fin.Substitution.Lemmas
open import Data.Vec.Properties
o... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.CartesianClosed.Locally {o ℓ e} (C : Category o ℓ e) where
open import Level using (levelOfTerm)
open import Categories.Category.CartesianClosed
open import Categories.Category.Cartesian
open import Categories.Category.Car... |
{-# OPTIONS --safe #-} --without-K #-}
open import Relation.Binary.PropositionalEquality using (_≡_; refl; trans; sym; subst)
open import Function.Reasoning
import Data.Empty as Empty
import Data.Maybe as Maybe
import Data.Nat as Nat
import Data.Bool as Bool
import Data.Fin as Fin
import Data.Product as Product
impor... |
{-# OPTIONS --cubical --no-import-sorts --safe --postfix-projections #-}
open import Cubical.Foundations.Everything renaming (uncurry to λ⟨,⟩_)
open import Cubical.Data.Sigma.Properties
open import Cubical.Foundations.CartesianKanOps
module Cubical.Modalities.Lex
(◯ : ∀ {ℓ} → Type ℓ → Type ℓ)
(η : ∀ {ℓ} {A : Type... |
------------------------------------------------------------------------
-- Higher lenses, defined using the requirement that the remainder
-- function should be surjective
------------------------------------------------------------------------
{-# OPTIONS --cubical --safe #-}
import Equality.Path as P
module Lens.... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Monoid where
open import Cubical.Algebra.Base public
open import Cubical.Algebra.Definitions public
open import Cubical.Algebra.Structures public using (IsMonoid; ismonoid)
open import Cubical.Algebra.Bundles public using (Monoid; mkmonoid; Mon... |
open import Type
open import Structure.Setoid renaming (_≡_ to _≡ₑ_)
-- Finite sets represented by lists
module Data.List.Relation.Membership {ℓ ℓₑ} {T : Type{ℓ}} ⦃ equiv : Equiv{ℓₑ}(T)⦄ where
open import Data.List
open import Data.List.Relation.Quantification using (ExistsElement ; ExistsUniqueElement)
open import F... |
module CS410-Nat where
open import CS410-Prelude
open import CS410-Monoid
data Nat : Set where
zero : Nat
suc : Nat -> Nat
{-# BUILTIN NATURAL Nat #-}
{-# COMPILED_DATA Nat HaskellSetup.Nat HaskellSetup.Zero HaskellSetup.Suc #-}
_+N_ : Nat -> Nat -> Nat
zero +N n = n
suc m +N n = suc (m +N n)
infixr 3 _+N_
+M... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Data.List.Any.Membership instantiated with propositional equality,
-- along with some additional definitions.
------------------------------------------------------------------------
{-# OPTIONS --without-K --sa... |
{-
This is the Agda formalization of
NOTIONS OF ANONYMOUS EXISTENCE IN MARTIN-LOF TYPE THEORY
by
Nicolai Kraus, Martin Escardo, Thierry Coquand, Thorsten Altenkirch
This file stays very close to the article. Because of this, not all
proofs are given in the way that is most ele... |
{-# OPTIONS --safe --no-qualified-instances #-}
module CF.Transform.Compile.Statements where
open import Function using (_∘_)
open import Data.Unit using (⊤; tt)
open import Data.Product
open import Data.List hiding (null; [_])
open import Relation.Binary.PropositionalEquality hiding ([_])
open import Relation.Unary
o... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2020, 2021, 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 Optics.All
open import LibraBFT.Prelude
open import LibraBFT... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some algebraic structures (not packed up with sets, operations,
-- etc.)
------------------------------------------------------------------------
-- The contents of this module should be accessed via `Algebra`, ... |
------------------------------------------------------------------------
-- A variant of weak bisimilarity that can be used to relate the
-- number of steps in two computations
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Prelude hiding (_+_; _*_)
... |
module trichotomy where
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import Data.Nat using (ℕ; zero; suc)
open import Relations using (_<_; z<s; s<s)
-- 三分法
data Trichotomy (m n : ℕ) : Set where
m<n : m < n → Trichotomy m n
m≡n : m ≡ n → Trichotomy m n
n<m : n < m → Trichotomy m n
... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
module Categories.Object.Terminal {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Relation.Binary using (IsEquivalence; Setoid)
open import Categories.Support.PropositionalEquality
open Category C
record Terminal : Set (o ⊔ ℓ ... |
------------------------------------------------------------------------
-- Concrete syntax used by the mixfix operator parser
------------------------------------------------------------------------
module RecursiveDescent.Hybrid.Mixfix.Expr where
open import Data.Nat hiding (_≟_)
open import Data.Vec
open import Da... |
{-# OPTIONS --type-in-type #-}
open import Data.Empty
open import Data.Unit
open import Data.Bool
open import Data.Product hiding ( curry ; uncurry )
open import Data.Nat
open import Data.String
open import Relation.Binary.PropositionalEquality using ( refl ; _≢_ ; _≡_ )
open import Function
module ClosedTheory where
... |
module VaryingClauseArity where
-- see also thread https://lists.chalmers.se/pipermail/agda-dev/2015-January/000041.html
open import Common.IO
open import Common.Unit
open import Common.Nat
Sum : Nat → Set
Sum 0 = Nat
Sum (suc n) = Nat → Sum n
sum : (acc : Nat) (n : Nat) → Sum n
sum acc 0 = acc
sum a... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vectors where all elements satisfy a given property
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.Relation.Unary.All where
open imp... |
{-# OPTIONS --without-K #-}
open import Type using (Type₀; Type₁; Type_)
open import Type.Identities
open import Function.NP using (Π; _∘_; const)
open import Function.Extensionality using (FunExt)
open import Data.Zero using (𝟘)
open import Data.One using (𝟙; 0₁)
open import Data.Two.Base using (𝟚; 0₂; 1₂)
open imp... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2021, 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 LibraBFT.Base.Types
open import LibraBFT.Impl.OBM.Logging.Logging... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.DinaturalTransformation where
open import Level
open import Data.Product
open import Categories.Category
import Categories.NaturalTransformation
private module NT = Categories.NaturalTransformation
open import Categories.Functor using (Functor) renaming (_∘_ t... |
------------------------------------------------------------------------------
-- Proving that two group theory formalisations are equivalents
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS... |
-- Record constructors are not allowed in patterns.
module RecordConstructorPatternMatching where
record R : Set₁ where
constructor con
field
{A} : Set
f : A → A
{B C} D {E} : Set
g : B → C → E
id : R → R
id (con f D g) = con f D g
|
{-# OPTIONS --cubical-compatible #-}
mutual
data D : Set → Set₁ where
c : (@0 A : Set) → _ → D _
_ : (@0 A : Set) → A → D A
_ = c
|
{- Name: Bowornmet (Ben) Hudson
-- new source language module. trying stuff out
-}
open import Preliminaries
open import Preorder-withmax
module Source2 where
data Tp : Set where
unit : Tp
nat : Tp
susp : Tp → Tp
_->s_ : Tp → Tp → Tp
_×s_ : Tp → Tp → Tp
list : Tp → Tp
bool : Tp
Ctx... |
------------------------------------------------------------------------------
-- All parameters are required in an ATP definition
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K... |
------------------------------------------------------------------------
-- Parser monad
------------------------------------------------------------------------
-- This code may have bitrotted.
open import Relation.Binary
open import Relation.Binary.OrderMorphism
import Relation.Binary.PropositionalEquality as PropE... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Empty.Base where
open import Cubical.Core.Everything
data ⊥ : Type₀ where
⊥-elim : ∀ {ℓ} {A : Type ℓ} → ⊥ → A
⊥-elim ()
|
module Luau.Addr.ToString where
open import Agda.Builtin.String using (String; primStringAppend)
open import Luau.Addr using (Addr)
open import Agda.Builtin.Int using (Int; primShowInteger; pos)
addrToString : Addr → String
addrToString a = primStringAppend "a" (primShowInteger (pos a))
|
open import Agda.Primitive
module ManySortedAlgebra where
-- a many sorted signature
record Signature {l : Level} : Set (lsuc l) where
field
sort : Set l -- sorts
op : Set l -- operations
arg : op → Set l
op-sort : op → sort -- the sort of the operation
arg-sort : ∀ {f} → arg f →... |
module With where
open import Reflection
open import Function using (_∘_ ; _$_ ; _∋_ ; id ; const)
open import Data.List
open import Data.Nat hiding (_+_)
open import Relation.Binary using (Setoid ; Decidable)
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality hiding ( [_] ; subst )
open i... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Graph.Examples where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Empty
open import Cubical.Data.Unit renaming (Unit to ⊤)
open import Cubical.Data.Nat
open imp... |
open import bool
module list-merge-sort (A : Set) (_<A_ : A → A → 𝔹) where
open import braun-tree A _<A_
open import eq
open import list
open import nat
open import nat-thms
merge : (l1 l2 : 𝕃 A) → 𝕃 A
merge [] ys = ys
merge xs [] = xs
merge (x :: xs) (y :: ys) with x <A y
merge (x :: xs) (y :: ys) | tt = x :: (m... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed monads
------------------------------------------------------------------------
-- Note that currently the monad laws are not included here.
module Category.Monad.Indexed where
open import Category.App... |
------------------------------------------------------------------------
-- Raw monads
------------------------------------------------------------------------
-- Note that this module is not parametrised by an axiomatisation of
-- equality. This module is reexported from Monad.
{-# OPTIONS --without-K --safe #-}
mo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.