text stringlengths 4 690k |
|---|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Finite sets, based on AVL trees
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (StrictTotalOrder)
module Data.AVL.... |
{-# OPTIONS --warning=error --safe --without-K --guardedness #-}
open import Everything.Safe
open import Numbers.Reals.Definition
open import Fields.Orders.Limits.Definition
open import Rings.Orders.Partial.Bounded
open import Rings.Orders.Total.Bounded
open import Rings.Orders.Total.BaseExpansion
open import Fields.... |
module STLC.Properties.Determinism where
open import STLC.Term
open import STLC.Term.Reduction
open import Data.Nat using (ℕ; _+_)
open import Relation.Nullary using (¬_)
open import Relation.Nullary.Negation using (contradiction)
open import Data.Product using (Σ; _,_; ∃; Σ-syntax; ∃-syntax)
open import Relation... |
-- Martin-Löf identity type
{-# OPTIONS --without-K --safe #-}
module TypeTheory.Identity where
open import Level renaming (zero to lzero; suc to lsuc)
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as P using (refl; _≡_)
renaming (trans to ≡-trans; sym to ≡-sym; cong to ≡-cong)
impor... |
module _ where
open import Common.Prelude hiding (_>>=_)
open import Common.Reflection
open import Common.Equality
infix 0 case_of_
case_of_ : ∀ {a b} {A : Set a} {B : Set b} → A → (A → B) → B
case x of f = f x
blockOnFresh : TC ⊤
blockOnFresh =
checkType unknown unknown >>= λ
{ (meta m _) → blockOnMeta m
; _... |
open import Syntax
import Renaming
import Instantiation
module Theory (𝕊 : Signature) where
open Expression 𝕊
open Instantiation
open Renaming
infix 5 □⦂_
infix 5 _≡_⦂type-by□
infix 5 _≡_⦂_by□
data BoundaryThesis : ∀ (cl : Class) (𝕄 : MShape) (γ : VShape) → Set where
□⦂type : ∀ {𝕄 γ} → Boundar... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Non-empty lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.NonEmpty where
open import Category.Monad
open import Data.Bool.Base... |
module Type.Properties.Singleton.Proofs where
import Data.Tuple as Tuple
open import Data.Proofs
open import Function.Axioms
open import Logic.Classical
open import Logic
import Lvl
open import Type.Properties.Empty
open import Type.Properties.Inhabited
open import Type.Properties.MereProposition
open import... |
-- Shadowing is allowed.
module Shadow where
module M (A : Set) where
id : Set -> Set
id A = A
|
{-# OPTIONS --without-K #-}
open import Base
open import Homotopy.Connected
{-
Wedge is a pushout.
-}
module Homotopy.Wedge
where
import Homotopy.Pushout as P
record wedge-diag i : Set (suc i) where
constructor diag_,_,_,_
field
A : Set i
B : Set i
a : A
b : B
f : uni... |
-- Patterns are parsed as expressions. That means that expressions can contain
-- pattern parts. That's of course not ok.
module NotAnExpression where
X = x @ y -- as pattern as an expression
|
module Data.Bin.BitListBijection where
--
-- This module gives a bijection between the two setoids:
-- - the set (ℕ)
-- - The set (List Bit), interpreted as least-significant-bit first,
-- with the equivalence relation that ignores the zeroes at the end of the list
open import Data.List
open import Data.List.Pr... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Conat type and some operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Conat where
open import Size
open impo... |
{-# OPTIONS --rewriting --prop --confluence-check --cumulativity #-}
open import Agda.Primitive
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
open import Agda.Builtin.List
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
open import Agda.Builtin.Sigma
open import Agda.Builtin.U... |
{- 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.Concrete.Records
open import LibraBFT.Concrete.System
op... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Functions.Embedding where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.Properties
open import Cubical.Foundations.Equiv.HalfAdjoint
open impo... |
-- IIRDg is expressible in IIRDr + Identity
module Proof where
open import LF
open import IIRD
open import IIRDr
open import DefinitionalEquality
open import Identity
open import Proof.Setup
import Logic.ChainReasoning as Chain
-- We can then define general IIRDs using the ε function from Proof.Setup.
Ug : {I : Set}... |
module Deriv where
open import Relation.Binary.Bundles using (DecSetoid)
open import Algebra.Bundles using (Semiring)
open import Level using (0ℓ)
open import Relation.Nullary using (yes; no)
module _ (S : DecSetoid 0ℓ 0ℓ) (Targ : Set) where
open DecSetoid S renaming (Carrier to Key)
infixl 6 _+_
infixl 7 _*... |
-- Andreas, 2017-07-27
module _ where
module A where
record A : Set where
open A
open A
-- ERROR WAS:
-- Ambiguous module name A. It could refer to any one of
-- A.A
-- Issue705.A
-- EXPECTED:
-- Ambiguous module name A. It could refer to any one of
-- A.A (record module)
-- Issue705.A
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Polynomial reasoning
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Tactic.RingSolver.Core.AlmostCommutativeRing
-- Some specialised too... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Queue.Untruncated2ListInvariant where
open import Cubical.Foundations.Everything
open import Cubical.Data.Empty as ⊥
open import Cubical.Data.List
open import Cubical.Data.Maybe
open import Cubical.Data.Prod
module Untruncated2ListInvariant {ℓ} (A... |
module Numeral.Natural.Function.GreatestCommonDivisor.Proofs where
open import Data
open import Functional
open import Logic.Propositional
open import Numeral.Finite
open import Numeral.Natural
open import Numeral.Natural.Function.GreatestCommonDivisor
open import Numeral.Natural.Oper
open import Numeral.Natural.Oper.... |
open import Relation.Binary.Core
module TreeSort.Impl1.Correctness.Order {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_)
(trans≤ : Transitive _≤_) where
open import BSTree _≤_
open import BSTree.Properties _≤_ trans≤
open import BTree {A}
open import Data.List... |
module HighlightPositivity where
data A : Set where
inA : (A -> A) -> A
data B : Set
data C : Set
data B where
inB : (C -> B) -> B
data C where
inC : B -> C
record D : Set where
inductive
field
outD : D -> D
endo : Set -> Set
endo X = X -> X
data E : Set where
inE : endo E -> E
data F (X : Set -... |
import Loop
import Loop.Bundles
import Loop.Definitions
import Loop.Properties
import Loop.Structures
import Magma
import Magma.Bundles
import Magma.Definitions
import Magma.Properties
import Magma.Structures
import Morphism.Structures
import Quasigroup
import Quasigroup.Bundles
import Quasigroup.Definitions
import Qua... |
module Lec3 where
open import CS410-Prelude
not : Two -> Two
not tt = ff
not ff = tt
data TwoTestable (b : Two) : (x : Two) -> Set where
same : TwoTestable b b
diff : TwoTestable b (not b)
twoTest : (b x : Two) -> TwoTestable b x
twoTest tt tt = same
twoTest tt ff = diff
twoTest ff tt = diff
twoTest ff ff = sam... |
module _ (X : Set) where
open import Agda.Builtin.Equality
postulate
A : Set
data D : Set where
c : A → D
variable
P : D → Set
postulate
p : (f : ∀ x → P (c x)) (x y : A) → f x ≡ f y
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Prod where
open import Cubical.Data.Prod.Base public
open import Cubical.Data.Prod.Properties public
|
module Issue462 where
data _≡_ {A : Set} : A → A → Set where
≡-refl : (x : A) → x ≡ x
postulate A : Set
record R (_≈_ _∼_ : A → A → Set) : Set where
field
≈-refl : (x : A) → x ≈ x
∼-reflexive : (x y : A) → x ≈ y → x ∼ y
∼-refl : (x : A) → x ∼ x
∼-refl x = ∼-reflexive x x (≈-refl x)
postulate
... |
{-
This file contains quotient groups
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.QuotientGroup where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Structure
open import Cubical.Foundations.Powers... |
{-# OPTIONS --cubical --safe #-}
module Relation.Nullary where
|
module HBound where
import Relation.Unary.PredicateTransformer as PT
open import Relation.Unary
open import Level
open import Relation.Binary using (Rel; IsEquivalence; module IsEquivalence; Reflexive; Symmetric; Transitive)
open import Category.Applicative
--naturalTrans : ∀ {a ℓ₁ ℓ₂ : Level } (ix : Set a )... |
module DayConvolution where
open import Library
open import Functors
open import Categories
open import Categories.Sets
open import MonoidalCat
-- first draft
ODay : ∀{l m}(M : Monoidal {l}{m})
(F G : Fun (Monoidal.C M) (Sets {l})) ->
Cat.Obj (Monoidal.C M) -> Set _
ODay M F G X =
Σ Obj \Y -> Σ Obj \... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Substitution lemmas
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Fin.Substitution.Lemmas where
import Category.Applicative.Indexed as ... |
open import eq
open import bool
open import bool-relations using (transitive; total)
open import maybe
open import nat
open import nat-thms using (≤-trans; ≤-total)
open import product
module z05-01-bst-test where
open import bool-relations _≤_ hiding (transitive; total)
import z05-01-bst as BST
open BST nat... |
module Data.TreeRep where
open import Prelude hiding (_>>=_) renaming (_>>=′_ to _>>=_)
open import Container.Traversable
open import Builtin.Reflection
open import Builtin.Float
data Leaf : Set where
char : Char → Leaf
string : String → Leaf
float : Float → Leaf
name : Name → Leaf
data TreeRep : Set w... |
module _ where
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.Unit
open import Agda.Builtin.List
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
open import Agda.Builtin.Bool
_>>_ : {A B : Set} → TC A → TC B → TC B
m >> m₁ = m >>= λ _ → m₁
data Fin : Nat → Set... |
{-# OPTIONS --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Substitution.Introductions.Universe {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.Type... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cohomology.Theory
open import groups.ExactSequence
open import groups.Exactness
open import groups.HomSequence
open import groups.KernelImageUniqueFactorization
import cw.cohomology.GridPtdMap as GPM
open import cw.CW
module cw.cohomology.HigherCoh... |
module PiNF-algebra where
open import Data.Product hiding (map)
open import Level
open import Relation.Binary.Core
open import Algebra
import Algebra.FunctionProperties as FunctionProperties
open import Algebra.FunctionProperties.Core
open import Algebra.Structures
open import PiNF-syntax
--------------------------... |
open import Nat
open import Prelude
module core where
-- types
data τ̇ : Set where
num : τ̇
⦇-⦈ : τ̇
_==>_ : τ̇ → τ̇ → τ̇
-- expressions, prefixed with a · to distinguish name clashes with agda
-- built-ins
data ė : Set where
_·:_ : ė → τ̇ → ė
X : Nat → ė
·λ : Nat → ė →... |
{-# OPTIONS --rewriting #-}
module Properties.DecSubtyping where
open import Agda.Builtin.Equality using (_≡_; refl)
open import FFI.Data.Either using (Either; Left; Right; mapLR; swapLR; cond)
open import Luau.FunctionTypes using (src; srcⁿ; tgt)
open import Luau.Subtyping using (_<:_; _≮:_; Tree; Language; ¬Languag... |
record category { ℓ₀ ℓ₁ } { k : Set ℓ₀ } (_⇒_ : k → k → Set ℓ₁) : Set (lsuc lzero ⊔ ℓ₀ ⊔ ℓ₁)
record groupoid { ℓ₀ ℓ₁ } { k : Set ℓ₀ } (_≈_ : k → k → Set ℓ₁) : Set (lsuc lzero ⊔ ℓ₀ ⊔ ℓ₁)
record groupoid { ℓ₀ ℓ₁ } { k } _≈_
where
coinductive
field
⦃ cat ⦄ : category _≈_
field
symmetry : ∀ { x y } → x ≈ y ... |
module Data.List.Membership.Propositional.Instances where
open import Data.List using (List; _∷_)
open import Data.List.Relation.Unary.Any using (here; there)
open import Data.List.Membership.Propositional using (_∈_)
open import Relation.Binary.PropositionalEquality using (refl)
open import Level using (Level)
pri... |
{-# OPTIONS --safe --warning=error #-}
open import Setoids.Setoids
open import Groups.FreeGroup.Definition
open import Groups.Definition
open import Decidable.Sets
open import Numbers.Naturals.Order
open import LogicalFormulae
open import Semirings.Definition
module Groups.FreeGroup.Group {a : _} {A : Set a} (decA : ... |
module Type.Category.IntensionalFunctionsCategory{ℓ} where
open import Data
open import Functional
open import Logic.Propositional
open import Relator.Equals
open import Relator.Equals.Proofs.Equiv
open import Structure.Category
open import Structure.Categorical.Properties
open import Structure.Operator
open import Ty... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Monoidal where
open import Level
open import Categories.Category
open import Categories.Bifunctor using (Bifunctor)
open import Categories.NaturalIsomorphism
open import Categories.NaturalTransformation using (_∘₁_) renaming (_≡_ to _≡ⁿ_)
open import Categor... |
-- Andreas, 2016-02-16, issue 1777, reported by Martin Stone Davis
data D : Set where
c : D
record R : Set where
field f : D
test : R → D
test record { f = x } with x
... | y = {!y!}
-- Splitting on y should give
-- test record { f = x } | c = ?
|
open import Nat
open import Prelude
open import binders-disjoint-checks
open import judgemental-erase
open import lemmas-matching
open import moveerase
open import statics-core
open import synth-unicity
module sensibility where
mutual
-- if an action transforms a zexp in a synthetic posistion to another zexp,
... |
------------------------------------------------------------------------
-- A function that runs computations
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
open import Prelude hiding (⊥)
module Partiality-monad.Inductive.Approximate {a} {A : Type a} ... |
module Categories.PushOuts where
open import Library
open import Categories
open Cat
record Square {a}{b}{C : Cat {a}{b}}{X Y Z}(f : Hom C Z X)(g : Hom C Z Y) : Set (a ⊔ b) where
constructor square
field W : Obj C
h : Hom C X W
k : Hom C Y W
scom : comp C h f ≅ comp C k g
record... |
-- Overlapping instances are only allowed if all valid candidates are
-- overappable.
module _ where
postulate
A : Set
record B : Set where
field overlap {{a}} : A
record C : Set where
field overlap {{a}} : A
record D : Set where
field {{a}} : A
it : ∀ {a} {A : Set a} {{_ : A}} → A
it {{x}} = x
work : {... |
{-# OPTIONS -v tc.unquote:30 #-}
open import Common.Prelude
open import Common.Reflection
open import Agda.Builtin.Sigma
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₂ = defineF... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.Multivariate.Equiv.Poly1-Poly where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
open import Cubical.Data.Vec renaming ( []... |
test.id : (A:Set) -> (x:A) -> A
test.id A x = x
nat.plus : (x:Nat) -> (y:Nat) -> Nat
nat.plus (nat.suc x) y = nat.suc (nat.plus x y)
nat.plus nat.zero y = y
|
import Lvl
open import Structure.Setoid
open import Type
module Structure.Operator.Vector.Subspaces.Image
{ℓₛ ℓₛₑ}
{S : Type{ℓₛ}}
⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄
{_+ₛ_ _⋅ₛ_ : S → S → S}
where
open import Logic.Predicate
open import Sets.ExtensionalPredicateSet as PredSet using (PredSet ; _∈_ ; [∋]-binaryRe... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cw.CW
open import cw.FinCW
open import cw.FinBoundary
open import cohomology.Theory
{- The reason that RephraseDualizedFirstFinBoundary did not handle this case
is because [FinSkeleton n] does not compute. -}
module cw.cohomology.cochainequiv.Du... |
open import SOAS.Common
open import SOAS.Families.Core
open import Categories.Object.Initial
open import SOAS.Coalgebraic.Strength
import SOAS.Metatheory.MetaAlgebra
-- Initial-algebra semantics
module SOAS.Metatheory.Semantics {T : Set}
(⅀F : Functor 𝔽amiliesₛ 𝔽amiliesₛ) (⅀:Str : Strength ⅀F)
(𝔛 : Familyₛ) (o... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT.Base
open import HoTT.HLevel
module HoTT.HLevel.Truncate where
open variables
postulate _↦_ : ∀ {a} {A : Set a} → A → A → Set a
{-# BUILTIN REWRITE _↦_ #-}
postulate
∥_∥ : 𝒰 i → 𝒰 i
∣_∣ : A → ∥ A ∥
instance ∥-hlevel : hlevel 1 ∥ A ∥
∥-rec : ⦃ hlevel... |
module Issue296 where
postulate
Unit : Set
IO : Set → Set
foo : ((A B : Set) → Unit) → IO Unit
bar : (A B : Set) → Unit
{-# BUILTIN IO IO #-}
{-# COMPILE GHC IO = type IO #-}
{-# COMPILE GHC Unit = type () #-}
{-# COMPILE GHC bar = undefined #-}
main : IO Unit
main = foo bar
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.Cokernel
open import groups.Exactness
open import groups.ExactSequence
open import cohomology.Theory
open import cw.CW
open import cw.WedgeOfCells
module cw.cohomology.reconstructed.TipCoboundary {i} (OT : OrdinaryTheory i)
(⊙skel : ⊙Skele... |
------------------------------------------------------------------------------
-- Reasoning partially about functions
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types ... |
test = forall _Set_ → Set
|
open import Prelude
module List where
data List (A : Set) : Set where
[] : List A
_::_ : (a : A) (as : List A) → List A
-- list append, structural on the left
_++_ : {A : Set} → List A → List A → List A
[] ++ l₂ = l₂
(h :: l₁) ++ l₂ = h :: (l₁ ++ l₂)
-- list membership, as a proposition
data _i... |
-- Andreas, 2012-01-13
module Issue555a where
-- Do we want to allow this?
data Exp : Set → Set1
data Exp Γ where -- needs to report that too many parameters are given
var : Exp Γ
bla : {Δ : Set} → Exp Δ → Exp (Δ → Γ) → Exp Γ
-- A declared index is turned into a parameter by the definition.
data ℕ : Set where
... |
open import SOAS.Common
{-
Framework for constructing categories of objects with extra structure.
The definitions required to construct a category is:
* the category of carrier objects (e.g. sets, presheaves, etc.)
* the extra operations and laws that the carrier objects are equipped with
* the preservation propertie... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category.Core
module Categories.Morphism.Extremal.Properties {o ℓ e} (𝒞 : Category o ℓ e) where
open import Level
open import Function using (_$_)
open import Categories.Diagram.Equalizer 𝒞
open import Categories.Diagram.Coequalizer 𝒞
open import Categor... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.Instances.Int where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Int renaming (Int to IntType ; _+_ to _+Int_ ; _-_ to _-Int_; -_ to -Int_ ; _·_ to _·Int_)
open import Cubical.Algebra.Group.Base
open GroupStr
Int : Group₀
fst Int = IntType
1g (s... |
{-# OPTIONS --without-K #-}
-- This module implements the dependent Σ-type.
module hott.core.sigma where
open import hott.core.universe
record Σ {ℓ₀ ℓ₁}
{A : Type ℓ₀}
(B : A → Type ℓ₁) : Type (ℓ₀ ⊔ ℓ₁) where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
-- The product type is just t... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category.Core
open import Categories.Comonad
-- verbatim dual of Categories.Adjoint.Construction.EilenbergMoore
module Categories.Adjoint.Construction.CoEilenbergMoore {o ℓ e} {C : Category o ℓ e} (M : Comonad C) where
open import Categories.Category.Construc... |
------------------------------------------------------------------------------
-- Axiomatic Peano arithmetic base
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #... |
{-# OPTIONS --without-K #-}
module Data.ByteString.IO where
import Data.ByteString.Primitive as Prim
open import Data.ByteString
open import Data.Word8 using (Word8)
open import Data.Nat using (ℕ)
open import Data.Colist using (Colist)
open import Data.List using (List)
open import Data.String using (String)
open i... |
------------------------------------------------------------------------------
-- Mutual recursive functions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-... |
{-# OPTIONS --sized-types #-}
open import Relation.Binary.Core
module Mergesort.Impl1 {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Bound.Lower A
open import Bound.Lower.Order _≤_
open import Data.Product
open import Data.Sum
open import Size
open import SLis... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.BicartesianClosed {o ℓ e} (𝒞 : Category o ℓ e) where
open import Level
open import Categories.Category.CartesianClosed 𝒞
open import Categories.Category.Cocartesian 𝒞
record BicartesianClosed : Set (levelOfTerm 𝒞) whe... |
open import Prelude
open import Data.Nat
open import Data.Nat.Properties
open import Induction.Nat
module Implicits.Resolution.GenericFinite.Examples.MaximumDepth
where
open import Implicits.Resolution.GenericFinite.TerminationCondition
_<′?_ : (x y : ℕ) → Dec (x <′ y)
x <′? y with (suc x) ≤? y
x <′? y | yes p = ... |
-- Andreas, 2016-10-03, re issue #2231
-- Testing whether the
{-# OPTIONS --guardedness-preserving-type-constructors #-}
-- stuff works in abstract blocks
-- {-# OPTIONS -v term:30 -v tc.term.expr.coind:100 #-}
module AbstractGuardednessPreservingTypeConstructors where
infix 1000 ♯_
postulate
∞ : ∀ {a} (A : Set ... |
{-# OPTIONS --allow-unsolved-metas #-}
module nat where
open import Data.Nat
open import Data.Nat.Properties
open import Data.Empty
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.Core
open import Relation.Binary.Definitions
open import logic
nat-<> : { ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Instance.UnderlyingQuiver where
-- The forgetful functor from categories to its underlying quiver
-- **except** that this functor only goes from **StrictCats**,
-- i.e. where Functor equivalence is propositional equality, not
-- NaturalIsomorphism.
open im... |
module Eta (Gnd : Set)(U : Set)(El : U -> Set) where
open import Basics
open import Pr
open import Nom
import Kind
open Kind Gnd U El
import Cxt
open Cxt Kind
import Loc
open Loc Kind
import Term
open Term Gnd U El
import Shift
open Shift Gnd U El
data Sawn (G : Cxt)(C : Kind)(L : Loc)(R : Kind) : Kind -> Set where
... |
module Structure.Groupoid.Groupoids where
open import Data
open import Data.Proofs
open import Functional
open import Logic
import Lvl
import Relator.Equals as Eq
open import Structure.Setoid
open import Structure.Groupoid
open import Structure.Categorical.Proofs
open import Structure.Categorical.Properties
... |
-- Andreas, 2012-10-18
module Issue481a where
open import Common.Issue481ParametrizedModule Set1
-- ommon.Issue481ParametrizedModule should not be in scope
module PM = Common.Issue481ParametrizedModule
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- The free monad construction on containers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Data.Container.FreeMonad where
open im... |
{-# OPTIONS --without-K #-}
open import HoTT.Base
module HoTT.Transport.Coproduct where
private
variable
i : Level
X : 𝒰 i
A B : X → 𝒰 i
x₁ x₂ : X
transport-+ : (p : x₁ == x₂) →
transport (λ x → A x + B x) p ~
+-rec (inl ∘ transport A p) (inr ∘ transport B p)
transport... |
{-# OPTIONS --verbose=10 #-}
module inorder where
open import Data.Nat
open import Data.Vec
open import Agda.Builtin.Sigma
open import Data.Product
open import Data.Fin using (fromℕ)
open import trees
open import optics
open import lemmas
inorderTree : {A : Set} -> Tree A -> Σ[ n ∈ ℕ ] Vec A n... |
open import Function using (flip; _∘_; _$_)
open import Auto.Counting
open import Data.Nat using (ℕ)
open import Data.List using (List; _∷_; [])
open import Data.Product using (∃; _,_; proj₂)
open import Data.Maybe
open import Data.Sum using (inj₁; inj₂; isInj₂)
module Auto.Example.Sublists whe... |
module Issue1441 where
open import Common.Nat
open import Common.Unit
open import Common.IO
data Sing : (n : Nat) → Set where
sing : ∀ n → Sing n
data D : Set → Set where
c : ∀ n → D (Sing n)
test : (A : Set) → D A → Nat
test .(Sing n) (c n) = n
main : IO Unit
main = printNat (test (Sing 1) (c 1))
-- should ... |
open import Common.Size
postulate
A : Set
f : Size → A
-- k < j ==> ∃ l < j
works : ∀ i (j : Size< (↑ i)) (k : Size< j) → (((l : Size< j) → A) → A) → A
works i j k ret = ret λ l → f l
-- k < j <= i ==> ∃ l < i
test1 : ∀ i (j : Size< (↑ i)) (k : Size< j) → (((l : Size< i) → A) → A) → A
test1 i j k ret = ret λ l →... |
module Tactic.Deriving where
open import Prelude hiding (abs)
open import Tactic.Reflection
private
makeArgs : Nat → List (Arg Nat) → List (Arg Term)
makeArgs n xs = reverse $ map (fmap (λ i → var (n - i - 1) [])) xs
computeInstanceType : Name → Nat → List (Arg Nat) → Type → Maybe Term
computeInstanceType c... |
{-# OPTIONS --no-termination-check #-}
module oldPi where
open import Data.Nat hiding (_⊔_; suc; _+_; _*_)
open import Data.Vec
open import Data.Empty
open import Data.Unit
open import Data.Sum hiding (map)
open import Data.Product hiding (map)
open import Function
open import Level
open import Relation.Binary.Propo... |
postulate
A : Set
a : A
record B : Set where
constructor i
field b : A
open B
data D : (X : Set) → X → Set where
c : D B (record { b = a })
accepted : (X : Set) (x : X) → D X x → Set
accepted .B (i a) c = A
rejected : (X : Set) (x : X) → D X x → Set
rejected .B (record { b = a }) c = A
-- WAS:
-- I'm no... |
module SystemF.Syntax.Type where
open import Prelude
open import Data.Fin hiding (lift)
open import Data.Fin.Substitution
open import Extensions.Substitution
open import Data.Star using (Star; ε; _◅_)
infixl 10 _→'_
data Type (ν : ℕ) : Set where
tc : ℕ → Type ν
tvar : (n : Fin ν) → Type ν
_→'_ : Type ν → Type... |
module NoQualifiedInstances.Import.A where
record I : Set where
instance
postulate i : I
|
open import Categories
open import Monads
module Monads.EM.Adjunction {a b}{C : Cat {a}{b}}(M : Monad C) where
open import Library
open import Functors
open import Adjunctions
open import Monads.EM M
open import Monads.EM.Functors M
open Cat C
open Fun
open Monad M
open Adj
open Alg
open AlgMorph
EMAdj : Adj C EM
... |
{-# OPTIONS --without-K --safe #-}
{-
Extremal Mono and Epimorphisms.
https://ncatlab.org/nlab/show/extremal+epimorphism
-}
open import Categories.Category.Core
module Categories.Morphism.Extremal {o ℓ e} (𝒞 : Category o ℓ e) where
open import Level
open import Categories.Morphism 𝒞
open Category 𝒞
IsExtr... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Homotopy.Loopspace where
open import Cubical.Core.Everything
open import Cubical.Data.Nat
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Groupoid... |
open import Mockingbird.Forest using (Forest)
-- A Gallery of Sage Birds
module Mockingbird.Problems.Chapter13 {b ℓ} (forest : Forest {b} {ℓ}) where
open import Function using (_$_)
open import Data.Product using (proj₂)
open import Mockingbird.Forest.Birds forest
import Mockingbird.Problems.Chapter09 forest as Chap... |
open import Prelude
open import Nat
open import List
open import contexts
module unions where
-- values mapped in Γ2 replace those mapped in Γ1
_∪_ : {A : Set} → A ctx → A ctx → A ctx
Γ1 ∪ Γ2 = union (λ a b → b) Γ1 Γ2
-- duplicate mappings are combined by append (_++_)
_⊎_ : {A : Set} → (List A) ctx → (List... |
open import Data.Word.Primitive public using ( Word8 ; Word16 ; Word32 ; Word64 )
module Data.Word where
data WordSize : Set where
#8 #16 #32 #64 : WordSize
Word : WordSize → Set
Word #8 = Word8
Word #16 = Word16
Word #32 = Word32
Word #64 = Word64
Byte : Set
Byte = Word8
|
open import Data.Empty using ( ⊥ )
open import FRP.LTL.RSet.Core using ( RSet )
module FRP.LTL.RSet.Empty where
F : RSet
F t = ⊥
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.