text stringlengths 4 690k |
|---|
module Nat where
open import Prelude
open import Star
Nat : Set
Nat = Star One _ _
zero : Nat
zero = ε
suc : Nat -> Nat
suc n = _ • n
infixl 50 _+_ _-_
infixl 60 _*_
_+_ : Nat -> Nat -> Nat
_+_ = _++_
_*_ : Nat -> Nat -> Nat
x * y = bind id (\ _ -> y) x
_-_ : Nat -> Nat -> Nat
n - ε = n
ε - m... |
data N : Set where
Z : N
suc : N -> N
|
open import Prelude
module RW.Data.RTrie.Decl where
open import RW.Language.RTerm public
open import RW.Language.RTermIdx public
open import RW.Data.PMap (RTermᵢ ⊥) as IdxMap
data Rule : Set where
Gr : ℕ → Rule
Tr : ℕ → ℕ → Rule
Fr : ℕ → Name → Rule
mutual
Cell : Set
Cell = Idx... |
{-# OPTIONS --without-K #-}
module TypeEquivCat where
-- We will define a rig category whose objects are types and whose
-- morphisms are type equivalences; and where the equivalence of
-- morphisms ≋ is extensional
open import Level renaming (zero to lzero; suc to lsuc)
open import Data.Empty using (⊥)
... |
module _ where
data X : Set where
data R (x : X) : Set where
module SUListSepElemTypes where
module M2 (Elem : Set) where
data InclWith : Set where
module M1 where
module InclZip1 (R : X → Set) where
open M2 X public
module InclZipUnion (Y : Set) where
module SepElemTypes = SUListSepElemTy... |
open import Everything
module Test.Test5
{𝔵} {𝔛 : Ø 𝔵}
{𝔞} {𝔒₁ : 𝔛 → Ø 𝔞}
{𝔟} {𝔒₂ : 𝔛 → Ø 𝔟}
{ℓ}
{ℓ̇} (_↦_ : ∀ {x} → 𝔒₂ x → 𝔒₂ x → Ø ℓ̇)
⦃ _ : [ExtensibleType] _↦_ ⦄
⦃ _ : Smap!.class (Arrow 𝔒₁ 𝔒₂) (Extension 𝔒₂) ⦄
⦃ _ : Surjextensionality!.class (Arrow 𝔒₁ 𝔒₂) (Pointwise _↦_) (Extens... |
module Div2 where
record True : Set where
data False : Set where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
NonZero : Nat -> Set
NonZero zero = False
NonZero (suc _) = True
divHelp : Nat -> Nat -> Nat -> Nat
divHelp zero zero c = suc zero
divHelp zero (suc y) c = zero
divHelp (suc x) zero ... |
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-}
module Agda.Builtin.IO where
postulate IO : ∀ {a} → Set a → Set a
{-# BUILTIN IO IO #-}
{-# FOREIGN GHC type AgdaIO a b = IO b #-}
{-# COMPILE GHC IO = type AgdaIO #-}
|
open import Oscar.Prelude
module Oscar.Class.Pure where
module _
{𝔬 𝔣}
(𝔉 : Ø 𝔬 → Ø 𝔣)
where
𝓹ure = ∀ {𝔒 : Ø 𝔬} → 𝔒 → 𝔉 𝔒
record 𝓟ure : Ø 𝔣 ∙̂ ↑̂ 𝔬 where
field pure : 𝓹ure
open 𝓟ure ⦃ … ⦄ public
|
record R₁ : Set₁ where
field
A : Set
open R₁ ⦃ … ⦄
record R₂ : Set₁ where
field
⦃ r₁ ⦄ : R₁
B : Set
B = A
|
module Data.Bindings.Everything where
import Data.ByteString
import Data.ByteString.Primitive
import Data.ByteString.UTF8
import Data.ByteString.UTF8.Primitive
import Data.Char.Classifier
import Data.Char.Classifier.Primitive
import Data.List.Primitive
import Data.Maybe.Primitive
import Data.Natural
import Data.Natura... |
------------------------------------------------------------------------
-- Suspensions
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
-- The beginning of this module follows the HoTT book rather closely.
-- The module is parametrised by a notion of e... |
open import Agda.Primitive using (lzero; lsuc; _⊔_)
import SecondOrder.Arity
import SecondOrder.MContext
import SecondOrder.Signature
module SecondOrder.Metavariable
{ℓ}
{𝔸 : SecondOrder.Arity.Arity}
(Σ : SecondOrder.Signature.Signature ℓ 𝔸)
where
open SecondOrder.Signature.Signature Σ
open SecondOrde... |
module BTree.Equality {A : Set} where
open import BTree {A}
data _≃_ : BTree → BTree → Set where
≃lf : leaf ≃ leaf
≃nd : {l r l' r' : BTree}
(x x' : A)
→ l ≃ r
→ l ≃ l'
→ l' ≃ r'
→ node x l r ≃ node x' l' r'
|
{- 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
-}
-- This module contains definitions of properties of only the behavior of the... |
module UselessPrivateImport2 where
private
open import Common.Issue481ParametrizedModule Set
|
module ATPRepeteadConjecture where
-- This error is detected by TypeChecking.Monad.Signature.
postulate
D : Set
_≡_ : D → D → Set
p : ∀ d e → d ≡ e
-- The conjecture foo is rejected because it is repetead.
postulate foo : ∀ d e → d ≡ e
{-# ATP prove foo #-}
{-# ATP prove foo p #-}
|
{-# OPTIONS --allow-exec #-}
open import Agda.Builtin.FromNat
open import Data.Bool.Base using (T; Bool; if_then_else_)
open import Data.String using (String; _++_; lines)
open import Data.Nat.Base using (ℕ)
open import Data.Fin using (Fin)
import Data.Fin.Literals as Fin
import Data.Nat.Literals as Nat
open import D... |
{-# OPTIONS --without-K #-}
module Types where
import Level
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product
open import Relation.Binary
--
data U : Set where
ZERO : U
ONE : U
PLUS : U → U → U
TIMES : U → U → U
⟦_⟧ : U → Set
⟦ ZERO ⟧ = ⊥
⟦ ONE ⟧ ... |
{-# OPTIONS --without-K #-}
module Pi1Examples where
open import PiU using (U; ONE)
open import PiLevel0 using (_⟷_; _◎_; _⊗_; id⟷;
swap₊; unite⋆l; unite⋆r;
swap⋆; uniti⋆l; uniti⋆r)
open import Pi0Examples using (BOOL)
open import PiLevel1 using (_⇔_; id⇔; trans⇔; _⊡_;
assoc◎l; swapl⋆⇔; assoc◎r; linv◎l; idl◎l;... |
module FamilyPattern where
data _==_ {A : Set}(x : A) : A -> Set where
refl : x == x
postulate C : {A : Set} -> A -> Set
-- We can't solve unify x = y since the type is a meta variable.
subst : {A : Set}{x y : A} -> x == y -> C y -> C x
subst refl cx = cx
-- subst {A} refl cx = cx -- works
-- subst {x = ... |
open import Level hiding ( suc ; zero )
open import Algebra
module sym3n where
open import Symmetric
open import Data.Unit
open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_)
open import Function
open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero)
open import Relation.Nullary
open import D... |
{-# OPTIONS --cubical-compatible #-}
module WithoutK-PatternMatchingLambdas2 where
-- Equality defined with two indices.
data _≡_ {A : Set} : A → A → Set where
refl : ∀ x → x ≡ x
-- The --cubical-compatible option works with pattern matching lambdas.
K : (A : Set) (x : A) (P : x ≡ x → Set) → P (refl x) → (p : x ≡ ... |
module Sized.Parrot where
open import Data.Product
open import Data.String.Base
open import SizedIO.IOObject
open import SizedIO.Base
open import SizedIO.Console hiding (main)
open import SizedIO.ConsoleObject
open import NativeIO
open import Sized.SimpleCell hiding (program; main)
open import Size
record Wrap A... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.FinWedge where
module _ {i} {I} (X : Fin I → Ptd i) where
{- the function for cofiber -}
finwedge-f : Fin I → Σ (Fin I) (de⊙ ∘ X)
finwedge-f = bigwedge-f X
FinWedge : Type i
FinWedge = BigWedge X
⊙FinWedge : Ptd i
⊙FinWedge = ⊙... |
open import FRP.JS.RSet using ( RSet ; ⟦_⟧ ; _⇒_ )
open import FRP.JS.Time using ( Time )
module FRP.JS.Product where
-- We define _∧_ directly, rather than as λ t → (A t × B t)
-- in order to make _∧_ invertable. (If we used the obvious defn,
-- (A ∧ B) would only be invertable if A and B were invertable.
infixr 2 ... |
{-# OPTIONS --type-in-type #-} -- yes, there will be some cheating in this lecture
module Lec4 where
open import Lec1Done
open import Lec2Done
open import Lec3Done
-- the identity functor (the identity action on objects and arrows)
ID : {C : Category} -> C => C
ID = id~> where open Category CATEGORY
-- composition... |
------------------------------------------------------------------------
-- Code for converting Vec n A → B to and from n-ary functions
------------------------------------------------------------------------
module Data.Vec.N-ary where
open import Data.Nat
open import Data.Vec
open import Data.Function
open import R... |
{-# OPTIONS --without-K #-}
module CauchyProofsS where
-- Proofs about permutations defined in module Cauchy (multiplicative2)
open import Level using (Level; _⊔_) renaming (zero to lzero; suc to lsuc)
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; sym; trans; subst; subst₂; cong; cong₂; set... |
-- Andreas, 2017-07-28, issue 1077
open import Issue1077
foz = foo
baz = bar
-- WAS: bar not in scope
-- NOW: import fails because module Issue1077 is rejected
|
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Data.Nat.Order where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Data.Empty as ⊥
open import Cubical.Data.Sigma
open import Cubical.Data.... |
module O where
open import Data.Product
open import Function renaming (_∘_ to _○_)
open import Circle
------------------------------------------------------------------------------
-- Abstract interpretation:
-- natural numbers with paths equating all even numbers in one
-- connected component and all odd ... |
{-# OPTIONS --prop #-}
{-# TERMINATING #-}
makeloop : {P : Prop} → P → P
makeloop p = makeloop p
postulate
A : Set
B C : A → Prop
record AB : Set where
no-eta-equality -- the problem goes away if this is left out
constructor _,_
field
a : A
b : B a
open AB public
-- -- Same problem if replacing t... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.SuspAdjointLoop
open import groups.ToOmega
open import cohomology.Theory
{- A spectrum (family (Eₙ | n : ℤ) such that ΩEₙ₊₁ = Eₙ)
- gives rise to a cohomology theory C with Cⁿ(S⁰) = π₁(Eₙ₊₁). -}
module cohomology.SpectrumModel
{i} (E : ℤ ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Automatic solvers for equations over naturals
------------------------------------------------------------------------
-- See README.Nat for examples of how to use this solver
{-# OPTIONS --without-K --safe #-}... |
module PreludeAll where
import PreludeBool public
import PreludeNat
import PreludeShow
open PreludeBool
open PreludeNat
open PreludeShow |
open import Agda.Builtin.Equality
postulate
X : Set
rigid0 : ((@0 x : X) → X) → X
mutual
H : ((@ω x : X) → X) → X
H f = rigid0 _
testω : (f : (@0 x : X) → X) → H (\ (@ω x) → f x) ≡ rigid0 (\ (@0 x) → f x)
testω f = refl
|
------------------------------------------------------------------------
-- Small prelude
------------------------------------------------------------------------
module Prelude where
infixl 6 _+_
infixr 5 _∷_ _++_
infixr 3 _∨_
infix 2 ¬_
------------------------------------------------------------------------
-- S... |
-- Functors from one category into another
module Control.Category.Functor where
open import Level using (suc; _⊔_)
open import Relation.Binary.PropositionalEquality
open import Control.Category
open Category using () renaming (Obj to obj; Hom to hom)
-- Operations of a functor.
-- Module T-FunctorOps C D F provi... |
{-# OPTIONS --without-K --safe #-}
module Dodo.Binary.Trichotomous where
-- Stdlib imports
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; _≢_; refl; cong; subst; subst₂) renaming (sym to ≡-sym)
open import Level using (Level)
open import Function using (flip; _∘_; _∘₂_)
open import Data.Empty ... |
open import Data.Bool using (Bool; true; false; _∧_; _∨_; T)
open import Data.Bool.Properties using (∨-identityˡ; ∨-zeroˡ)
open import Data.List using (List; []; _∷_; any; map; foldl)
open import Data.List.Relation.Unary.Any using (Any; here; there; lookup; satisfied)
open import Data.Product as Prod using (∃; _,_; pro... |
------------------------------------------------------------------------------
-- Well-founded relation on lists based on their length
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-un... |
------------------------------------------------------------------------
-- Forcing of parsers (can be used for inspection/debugging purposes)
------------------------------------------------------------------------
{-# OPTIONS --termination-depth=2 #-}
module TotalParserCombinators.Force where
open import Codata.Mu... |
-- Christian Sattler, 2017-08-05
-- Nullary extended lambdas are useful in the interaction mode
-- for case splitting on the result inside an expression.
module NullaryExtendedLambda where
f : {A : Set} → A → A
f a = λ { → a }
g : {A : Set} → A → A
g a = λ where
→ a
|
module binio where
open import Data.Word8
import Data.ByteString as BS
import Data.ByteString.IO as BSIO
open import Data.Fin using (Fin; toℕ)
open import Data.Vec using (Vec; toList; tabulate)
open import Data.List using (List)
open import Data.Colist using (Colist; fromList)
open import Agda.Builtin.Nat using (Nat; ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Construction.Comma where
open import Data.Product using (_×_; ∃; _,_; proj₁; proj₂; zip; map)
open import Level
open import Relation.Binary using (Rel)
open import Categories.Category.Instance.One
open import Categories.Category using (Category; _[_,_]; _[... |
module Lib.Maybe where
data Maybe (A : Set) : Set where
nothing : Maybe A
just : A -> Maybe A
{-# COMPILED_DATA Maybe Maybe Nothing Just #-}
|
-- A memoised implementation of the Fibonacci sequence, following
-- Hinze's "Memo functions, polytypically!".
module Issue2918 where
open import Agda.Builtin.IO
open import Agda.Builtin.Nat renaming (Nat to ℕ)
open import Agda.Builtin.Size
open import Agda.Builtin.Unit
record _×_ (A B : Set) : Set where
construct... |
{-# OPTIONS --cubical #-}
module leibniz where
open import Cubical.Data.Equality
open import Cubical.Foundations.Function using (_∘_)
module Martin-Löf {ℓ} {A : Set ℓ} where
reflexive≡ : {a : A} → a ≡p a
reflexive≡ = reflp
symmetric≡ : {a b : A} → a ≡p b → b ≡p a
symmetric≡ reflp = reflp
transitive≡ : {a... |
import cedille-options
module to-string (options : cedille-options.options) where
open import lib
open import cedille-types
open import constants
open import syntax-util
open import ctxt
open import rename
open import general-util
data expr-side : Set where
left : expr-side
right : expr-side
neither : expr-sid... |
{-# OPTIONS --without-K --safe #-}
open import Polynomial.Parameters
module Polynomial.Homomorphism.Semantics
{c r₁ r₂ r₃}
(homo : Homomorphism c r₁ r₂ r₃)
where
open import Data.Product using (_,_)
open import Data.List using ([])
open import Data.Vec as Vec using (Vec)
open import Data.Fin u... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.List.Relation.Binary.Subset.Setoid.Properties directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.TLevel
open import lib.types.Group
open import lib.types.LoopSpace
open import lib.groups.Homomorphism
open import lib.groups.Isomorphism
module lib.groups.LoopSpace where
{- A loop space is a pregroup, and a group if it has the rig... |
open import Nat
open import Prelude
open import List
open import contexts
open import core
open import lemmas-general
open import preservation
module eval-checks where
eval-unicity : ∀{⛽ Δ Σ' Γ E e τ r r' K K'} →
Δ , Σ' , Γ ⊢ E →
Δ , Σ' , Γ ⊢ e :: τ →
E ⊢ e ... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.CommAlgebra.Localisation where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open i... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The identity function
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Function.Construct.Composition where
open import Data.Product using (_,_... |
{-# OPTIONS --cubical --no-import-sorts #-}
module MorePropAlgebra.Bundles where
open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero)
private
variable
ℓ ℓ' : Level
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Relation.Nu... |
-- Andreas, 2018-11-23, 2019-07-22, issue #3353
--
-- Preserved names of named arguments under case splitting.
-- {-# OPTIONS -v tc.lhs:40 #-}
-- {-# OPTIONS -v interaction.case:60 -v reify:30 #-}
open import Agda.Builtin.Nat
test : {m n : Nat} → Nat
test {m} {n = n} = {!n!} -- C-c C-c
-- Splitting on n gives:
-- ... |
-- mathematical integers; see int.agda for imported machine integers from Haskell.
module integer where
open import bool
open import bool-thms2
open import eq
open import nat
open import nat-thms
open import product
open import product-thms
open import sum
open import unit
ℤ-pos-t : ℕ → Set
ℤ-pos-t 0 = ⊤
ℤ-pos-t (suc... |
{-# OPTIONS --rewriting --prop --confluence-check #-}
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.Unit
open import ... |
module m-types where
-- Basic definitions
import container.core
-- Construction of M-types as limits
import container.m.from-nat
-- M-types via Agda coinduction
import container.m.core
|
module Data.Vec.Any.Membership.Propositional.Properties where
open import Algebra
open import Data.Vec as Vec
open import Data.Vec.Any
open import Data.Vec.Any.Membership.Propositional
open import Data.Vec.Any.Properties
import Data.Vec.Any.Membership.Properties as Membershipᵖ
open import Function
open import Functio... |
{-# OPTIONS --cubical #-}
module _ where
module _ where
open import Agda.Primitive.Cubical public
postulate
Path' : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ
PathP : ∀ {ℓ} (A : I → Set ℓ) → A i0 → A i1 → Set ℓ
{-# BUILTIN PATH Path' #-}
{-# BUILTIN PATHP PathP #-}
infix 4 ... |
module Generic.Test.ReadData where
open import Generic.Main
data D {α β} (A : Set α) (B : ℕ -> Set β) : ∀ {n} -> B n -> List ℕ -> Set (α ⊔ β) where
c₁ : ∀ {n} (y : B n) xs -> A -> D A B y xs
c₂ : ∀ {y : B 0} -> (∀ {n} (y : B n) {{xs}} -> D A B y xs) -> .(List A) -> D A B y []
-- No longer works: Failed to solve ... |
{-# OPTIONS --rewriting --confluence-check #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
postulate
A : Set
a b : A
f : (X : Set) → X → A
g : (X : Set) → X
rewf₁ : f (A → A) (λ _ → a) ≡ a
rewf₂ : (X : Set) → f X (g X) ≡ b
rewg : (x : A) → g (A → A) x ≡ a
test = f (A ... |
open import Data.Nat
open import Data.List as List hiding (null)
open import Data.List.Membership.Propositional
open import Data.List.Relation.Unary.Any
open import Data.List.Relation.Unary.All
open import Data.List.Prefix
open import Data.Integer
open import Data.Product
-- This file contains the definition of values... |
{- 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 Type
module Graph.Walk.Functions {ℓ₁ ℓ₂} {V : Type{ℓ₁}} where
import Lvl
open import Graph{ℓ₁}{ℓ₂}(V)
open import Graph.Properties
open import Graph.Walk{ℓ₁}{ℓ₂}{V}
open import Numeral.Natural
open import Syntax.Function
open import Type.Dependent
open import Type.Dependent.Functions
module _ {_⟶_ :... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.HSpace renaming (HSpaceStructure to HSS)
import homotopy.WedgeExtension as WedgeExt
module homotopy.Pi2HSusp where
module Pi2HSusp {i} {X : Ptd i} (gA : has-level 1 (de⊙ X))
(cA : is-connected 0 (de⊙ X)) (H-X : HSS X)
where
{- TODO ... |
module Issue1076 where
{-# OPTIONS --no-coverage-check #-}
-- WAS: Parse error
-- NOW:
-- OPTIONS pragma only allowed at beginning of file, before top module
-- declaration
-- when checking the pragma OPTIONS --no-coverage-check
|
-- Andreas, 2012-07-31, issue reported by Nicolas Pouillard
-- {-# OPTIONS -v tc:100 -v term:100 #-}
-- {-# OPTIONS -v tc.def.alias:20 #-}
-- {-# OPTIONS -v tc:0 -v term:0 #-}
module Issue655 where
-- import Common.Level -- this should not be necessary
module TypeAliases where
postulate A : Set
B = A → A
modu... |
module Human.Nat where
open import Human.Bool
data Nat : Set where
zero : Nat
suc : Nat → Nat
{-# BUILTIN NATURAL Nat #-}
infix 4 _==_ _<_
infixl 6 _+_ _-_
infixl 7 _*_
-- add theses guys on infixl 7: _div_ _%_
_+_ : Nat → Nat → Nat
zero + m = m
suc n + m = suc (n + m)
{-# BUILTIN NATPLUS _+_ #-}
_-_ : Na... |
module Univalence where
------------------------------------------------------------------------------
-- Basic utilities
open import LeqLemmas
open import FinNatLemmas
open import FiniteFunctions
open import VectorLemmas -- only _!!_ and lookupassoc are needed
open import Proofs
-- Proofs is a wrapper over all ... |
module Numeral.Finite where
import Lvl
open import Syntax.Number
open import Data.Boolean.Stmt
open import Functional
open import Numeral.Natural.Oper.Comparisons
open import Numeral.Natural hiding (𝐏)
open import Type
-- A structure corresponding to a finite set of natural numbers (0,..,n−1).
-- Specifically an upp... |
module Monads.StateT where
open import Class.Monad
open import Class.Functor
open import Class.MonadTrans
open import Class.Monad.State
open import Class.Monad.Writer
open import Data.Product
open import Data.Unit.Polymorphic
open import Function
open import Level
private
variable
a : Level
S : Set a
State... |
------------------------------------------------------------------------------
-- Test the consistency of GroupTheory.Base
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polym... |
{-
This file contains:
- Properties of groupoid truncations
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.GroupoidTruncation.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.GroupoidTruncation.Base
rec : ∀ {ℓ ℓ'} {A : Type ℓ} {B : T... |
{-# OPTIONS --safe #-}
module Cubical.Data.Nat.Divisibility where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Sigma
open import Cubica... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.DStructures.Meta.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
open import C... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Structures.Pointed where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Transport
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Path
open import Cubical.Foundations.Pointed.Base
... |
{-# OPTIONS --without-K --safe #-}
--------------------------------------------------------------------------------
-- Simple implementation of sets of ℕ.
--------------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Nat.Table where
open import Data.... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
{-# OPTIONS --allow-unsolved-metas #-}
module Light.Implementation.Relation.Decidable where
open import Light.Variable.Levels
open import Light.Variable.Sets
open import Light.Library.Relation.Decidable using (Library ; Dependencies)
open... |
------------------------------------------------------------------------------
-- Properties of the inequalities of unary numbers
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univers... |
data Nat : Set where
O : Nat
S : Nat → Nat
syntax S x = suc x
test : Nat → Nat
test _ = suc O
syntax lim (λ n → m) = limit n at m
data lim (f : Nat → Nat) : Set where
syntax foo (λ _ → n) = const-foo n
postulate
foo : (Nat → Nat) → Nat
|
{-# OPTIONS --type-in-type --no-pattern-matching #-}
open import Spire.DarkwingDuck.Primitive
open import Spire.DarkwingDuck.Derived
module Spire.DarkwingDuck.Examples where
----------------------------------------------------------------------
NatN : String
NatN = "Nat"
NatE : Enum
NatE = "zero" ∷ "suc" ∷ []
NatP ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.FinSet.Binary.Small.Base where
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Univalence
open import Cubical.Data.Bool hiding (isSetBool)
data Binary : Type₀
El : Binary → Type₀
da... |
------------------------------------------------------------------------
-- Examples
------------------------------------------------------------------------
module RecursiveDescent.InductiveWithFix.Examples where
open import Data.List
open import Data.Nat
import Data.Char as C
import Data.String as S
open C using (C... |
module Logic.Leibniz where
-- Leibniz equality
_≡_ : {A : Set} -> A -> A -> Set1
x ≡ y = (P : _ -> Set) -> P x -> P y
≡-refl : {A : Set}(x : A) -> x ≡ x
≡-refl x P px = px
≡-sym : {A : Set}(x y : A) -> x ≡ y -> y ≡ x
≡-sym x y xy P py = xy (\z -> P z -> P x) (\px -> px) py
≡-trans : {A : Set}(x y z : A) -> x ≡ y -... |
------------------------------------------------------------------------
-- One form of induction for natural numbers
------------------------------------------------------------------------
-- I want universe polymorphism.
module Induction1.Nat where
open import Data.Nat
import Induction1.WellFounded as WF
-------... |
-- Checks that UHC FFI calls using non-magic datatypes work
module UHC-FFI where
data Nat : Set where
Zero : Nat
Suc : Nat -> Nat
{-# COMPILE UHC Nat = data UHC.Agda.Builtins.Nat (Zero | Suc) #-}
{-# FOREIGN UHC __IMPORT__ Data.Char #-}
open import Common.IO
open import Common.Unit
open import Common.String
open... |
-- Andreas, 2014-06-27, issue raised by fsfbugs
-- {-# OPTIONS -v interaction.give:10 -v tc:20 -v tc.conv.sort:30 #-}
open import Common.Level
record R (p r : Level) : Set (lsuc (p ⊔ r)) where
field
P : Set p
_~_ : P -> P -> Set r
f : (p p' : P) -> {!p ~ p'!} -- Give (p ~ p') here!
-- PROBLEM WAS... |
module Unify-revised-correct where
--open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
open import Prelude.Function
postulate
Nat : Set
Term : Nat → Set
_~>_ : Nat → Nat → Set -- Fin → Term
_=>_ : Nat → Nat → Set -- Fin → Fin
ε : ∀ {m n} → m ~> n
▹ : ∀ {m n} -> m => n -> m ~> n
_◃_ : ∀ {m... |
open import Oscar.Prelude
open import Oscar.Class
open import Oscar.Class.HasEquivalence
open import Oscar.Class.Reflexivity
open import Oscar.Class.Symmetry
open import Oscar.Class.Transitivity
open import Oscar.Class.IsEquivalence
open import Oscar.Data.ProductIndexEquivalence
import Oscar.Data.Constraint
module Os... |
{- 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.Impl.Consensus.EpochManagerTypes
open import LibraBFT.Im... |
module Basic where
open import Level
open import Data.Product
open import Relation.Binary
open Setoid renaming (_≈_ to eqSetoid)
module Map where
record Map {c₀ c₀′ ℓ ℓ′ : Level} (A : Setoid c₀ ℓ) (B : Setoid c₀′ ℓ′) : Set (suc (c₀ ⊔ ℓ ⊔ c₀′ ⊔ ℓ′)) where
field
mapping : Carrier A → Carrier B
preserv... |
{-# 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 BasicIPC.Metatheory.ClosedHilbert-TarskiGluedClosedImplicit where
open import BasicIPC.Syntax.ClosedHilbert public
open import BasicIPC.Semantics.TarskiGluedClosedImplicit public
open ImplicitSyntax (⊢_) public
-- Completeness with respect to a particular model.
module _ {{_ : Model}} where
reify : ∀ {A} ... |
module resugar where
open import cedille-types
open import general-util
open import syntax-util
open import type-util
{-# TERMINATING #-}
resugar : ∀ {ed} → ⟦ ed ⟧ → ⟦ ed ⟧'
resugar-tk : tpkd → ex-tk
resugar {TERM} (App t t') =
ExApp (resugar t) ff (resugar t')
resugar {TERM} (AppE t tT) =
either-else' tT (ExApp ... |
open import Prelude
module Implicits.Resolution.GenericFinite.Algorithm.Completeness where
open import Induction.WellFounded
open import Induction.Nat
open import Data.Fin.Substitution
open import Data.Nat.Base using (_<′_)
open import Data.Maybe as Maybe
open import Data.Nat hiding (_<_)
open import Data.Nat.Propert... |
------------------------------------------------------------------------
-- A well-typed representation of a dependently typed language
------------------------------------------------------------------------
-- The code is parametrised by an arbitrary (small, unindexed)
-- universe.
import Level
open import Data.Uni... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.