text stringlengths 4 690k |
|---|
module _ where
open import Agda.Builtin.Equality
module _ (Ty : Set) where
data Cxt : Set where
sg : (A : Ty) → Cxt
_∙_ : (Γ₁ Γ₂ : Cxt) → Cxt
postulate Sub : Cxt → Cxt → Set
variable Γ Δ : Cxt
data Var (A : Ty) : Cxt → Set where
• : Var A (sg A)
inl : (x : Var A Γ) → Var A (Γ ∙ Δ)
post... |
module _ where
open import Common.Prelude
data Vec (A : Set) : Nat → Set where
[] : Vec A 0
_∷_ : ∀ {@0 n} → A → Vec A n → Vec A (suc n)
sum : ∀ {@0 n} → Vec Nat n → Nat
sum (x ∷ xs) = x + sum xs
sum [] = 0
foldl : ∀ {A} {B : Nat → Set} → (∀ {@0 n} → B n → A → B (suc n)) → B 0 → ∀ {@0 n} → Vec A n → B n
foldl {... |
{-# OPTIONS --safe --without-K #-}
------------------------------------------------------------------------
-- Group objects in a cartesian category.
------------------------------------------------------------------------
open import Categories.Category
open import Categories.Category.Cartesian
module Categories.Obj... |
{-# OPTIONS --disable-positivity-check #-}
module univ where
import Logic.ChainReasoning
module Chain {A : Set}
( _==_ : A -> A -> Set)
(refl : {x : A} -> x == x)
(trans : {x y z : A} -> x == y -> y == z -> x == z) =
Logic.ChainReasoning.Mono.Homogenous _==_ (\x -> ... |
module _ where
open import utility
open import Function using (_∘_)
open import Esterel.Lang
open import Esterel.Lang.Properties
open import Esterel.Lang.CanFunction
using (Canₛ ; Canₛₕ)
open import Esterel.Environment as Env
using (Env ; Θ ; _←_ ; module SigMap ; module ShrMap ; module VarMap ; []env ; sig-stats... |
-- The comonad named Store by Russel O'Connor.
-- See his WGP 2011 paper.
{-# OPTIONS --copatterns #-}
module Control.Comonad.Store where
open import Function using (id) renaming (_∘′_ to _∘_)
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; sym; trans; cong; cong₂; module ≡-Reasoning)
open ≡-Re... |
module z04-lists where
open import bool
open import eq
open import nat
open import nat-thms
open import product-thms using (keep)
open import logic -- needed for filter-idem
{-
-- p 75
'data' : datatype declaration
'𝕃' : name of type being declared
{ℓ} : level
A : element type (polymorphic)
𝕃 is a type... |
-- {-# OPTIONS -v tc.proj.like:10 #-}
-- {-# OPTIONS -v tc.conv:10 #-}
open import Common.Level
module ProjectionLikeAndModules (A : Set) (a : A) where
record ⊤ : Set where
constructor tt
data Wrap (W : Set) : Set where
wrap : W → Wrap W
data Bool : Set where
true false : Bool
-- postulate
-- `or' should be... |
{-# OPTIONS --without-K --safe #-}
open import Algebra.Structures.Bundles.Field
open import Algebra.Linear.Structures.Bundles
module Algebra.Linear.Space.Product
{k ℓ} (K : Field k ℓ)
{a₁ ℓ₁} (V₁-space : VectorSpace K a₁ ℓ₁)
{a₂ ℓ₂} (V₂-space : VectorSpace K a₂ ℓ₂)
where
open import Relation.Binary
open impo... |
{- 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 LibraBFT.Prelude
import LibraBFT.Concrete.Properties.Pr... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.Gysin where
open import Cubical.Foundations.Path
open import Cubical.Foundations.Equiv.HalfAdjoint
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Transport
open import Cubical.Foundations.Function
open import Cu... |
import Lvl
open import Type
module Structure.Logic.Constructive.Propositional {ℓₗ} {Formula : Type{ℓₗ}} {ℓₘₗ} (Proof : Formula → Type{ℓₘₗ}) where
open import Logic.Predicate
private variable X Y Z : Formula
-- Rules of bottom (falsity).
record Bottom(⊥ : Formula) : Type{ℓₘₗ Lvl.⊔ ℓₗ} where
field
elim : P... |
------------------------------------------------------------------------------
-- Properties for the equality on Conat
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorph... |
------------------------------------------------------------------------
-- Quotients, defined as families of equivalence classes
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- Partly based on the presentation of quotients in the HoTT book.
-- Perhaps th... |
{-# OPTIONS --without-K --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
ope... |
import Relation.Binary.PropositionalEquality as PEq
module Relation.Binary.PropositionalEquality.Extensionality
(funext : ∀ {ℓ₁ ℓ₂} → PEq.Extensionality ℓ₁ ℓ₂) where
funext² : ∀ {p q r}{P : Set p}{Q : P → Set q}
{R : (p : P) → Q p → Set r} →
{f g : ∀ (p : P)(q : Q p) → R p q} → (∀ p q → f p q P... |
{-# OPTIONS --prop --without-K --rewriting #-}
module Data.Nat.Log2 where
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Nullary
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as Eq using (_≡_; refl)
open import Agda.Builtin.Equality.Rewrite
private
aux :... |
import Lvl
module Structure.Category.Dual {ℓₒ ℓₘ ℓₑ : Lvl.Level} where
open import Data.Tuple as Tuple using ()
open import Functional using (swap)
open import Structure.Category
open import Structure.Categorical.Names
open import Structure.Categorical.Properties
import Structure.Operator.Properties as Prop... |
module RecordsAndModules where
module Setoids where
record Equiv (a : Set) : Set where
field
x : a
y : a
record Setoid : Set1 where
field
carrier : Set
equiv : Equiv carrier
module RegExps (S : Setoids.Setoid) where
data RegExp : Set where
ε : RegExp
module SimpleMatch... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- The values of terms in Nehemiah.Change.Term.
------------------------------------------------------------------------
module Nehemiah.Change.Value where
open import Nehemiah.Syntax.Type
open import Nehemiah.Syntax... |
module Data.QuadTree.Implementation.Functors where
open import Haskell.Prelude renaming (zero to Z; suc to S)
open import Data.Lens.Lens
open import Data.Logic
open import Data.QuadTree.Implementation.Definition
open import Data.QuadTree.Implementation.ValidTypes
open import Data.QuadTree.Implementation.QuadrantLenses... |
module Issue978 where
module A where
infixr 4 _,_
record _×_ (A B : Set) : Set where
constructor _,_
field
fst : A
snd : B
module B where
infixl 2 _,_
data Ty : Set where
data Cxt : Set where
ε : Cxt
_,_ : (Γ : Cxt) (a : Ty) → Cxt
open A
open B
test : (Γ : Cxt) → Set₁
te... |
{-
Setting an unknown signal can only shrink Can.
canₖ-set-sig-monotonic : ∀ p S θ S∈ status →
Env.sig-stats {S} θ S∈ ≡ Signal.unknown →
∀ k →
k ∈ Canₖ p (Env.set-sig {S} θ S∈ status) →
k ∈ Canₖ p θ
(And its counterpart for Canₛ and Canₛₕ.)
There are also corresponding Canθ versions: Setting ... |
module Issue1624 where
open import Common.Char
open import Common.String
open import Common.List
test : List Char → String
test ('0' ∷ ('x' ∷ xs)) = "x"
test ('0' ∷ ('b' ∷ xs)) = "b"
test xs = "f"
open import Common.IO
open import Common.Unit
main : IO Unit
main = putStr (test x)
where x = '0' ∷ ('... |
------------------------------------------------------------------------
-- A coinductive definition of (strong) similarity
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Labelled-transition-system
module Similarity {ℓ} (lts : LTS ℓ) where
open imp... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Empty.Properties where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Data.Empty.Base
isProp⊥ : isProp ⊥
isProp⊥ x = ⊥-elim x
|
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Definition
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Naturals
open import Numbers.Naturals.Order
open import Numbers.Naturals.Order.Lemmas
open import Numbers.Naturals.Order.WellFounded
... |
------------------------------------------------------------------------
-- Functional semantics for a non-deterministic untyped λ-calculus
-- with constants
------------------------------------------------------------------------
{-# OPTIONS --no-termination-check #-}
module Lambda.Closure.Functional.Non-determinist... |
module CoinductiveConstructorsAndLet where
open import Common.Coinduction
data D : Set where
foo : D → ∞ D
foo x = let y = x in ♯ y
-- CoinductiveConstructorsAndLet.agda:9,24-25
-- Panic: thing out of context ([CtxId 1] is not a sub context of
-- [CtxId 3])
-- when checking that the expression y has type D
|
module SystemF.NormalForm where
open import Prelude
open import SystemF.Syntax
open import SystemF.WellTyped
open import SystemF.Substitutions
open import Data.Vec hiding ([_])
open import Data.List hiding ([_])
mutual
-- The eta-long beta-normal form described by Andreas Abel in:
-- Abel, A., 2008, November.
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of operations on M-types
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.M.Properties where
open import Level
... |
-- Andreas, 2012-01-17
-- {-# OPTIONS -v tc.proj.like:50 #-}
-- {-# OPTIONS -v tc.conv.atom:50 #-}
module Issue553c where
postulate
A : Set
a : A
data Bool : Set where
true false : Bool
data WrapBool (C : Set) : Set where
wrap : Bool -> WrapBool C
-- a projection-like function (must not be constructor-head... |
module STLC1.Kovacs.Substitution where
open import STLC1.Kovacs.Embedding public
open import Category
--------------------------------------------------------------------------------
-- Substitutions (Sub ; ∙ ; _,_)
infix 3 _⊢⋆_
data _⊢⋆_ : 𝒞 → 𝒞 → Set
where
∅ : ∀ {Γ} → Γ ⊢⋆ ∅
_,_ : ∀ {Γ Ξ A} → (σ :... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties, related to products, that rely on the K rule
------------------------------------------------------------------------
{-# OPTIONS --with-K --safe #-}
module Data.Product.Properties.WithK where
open... |
module Oscar.Object {𝔣} (FunctionName : Set 𝔣) where
open import Oscar.Category.Category
open import Oscar.Category.Functor
open import Oscar.Category.Morphism
open import Oscar.Category.Semifunctor
open import Oscar.Category.Semigroupoid
open import Oscar.Category.Setoid
open import Oscar.Data.Nat
{-
open import O... |
module Syntax where
open import Stack public
-- Abstract symbols, or atoms.
abstract
Atom : Set
Atom = Nat
-- Types, or propositions in constructive logic.
infixl 9 _⩕_
infixr 7 _⇒_
data Type : Set where
α_ : Atom → Type
_⇒_ : Type → Type → Type
_⩕_ : Type → Type → Type
⫪ : Type
-- Contexts, o... |
------------------------------------------------------------------------
-- Encoder and decoder instances
------------------------------------------------------------------------
open import Atom
module Coding.Instances (atoms : χ-atoms) where
open import Prelude
open import Chi atoms
open import Free-va... |
module Nat where
import Bool
open Bool
data Nat : Set where
zero : Nat
suc : Nat -> Nat
infixr 25 _+_
_+_ : Nat -> Nat -> Nat
zero + m = m
suc n + m = suc (n + m)
infix 10 _==_ _<_
_==_ : Nat -> Nat -> Bool
zero == zero = true
suc n == zero = false
zero == suc m = false
suc n == suc m = n == m
_<_ : N... |
module #1 where
open import Level
open import Relation.Binary.PropositionalEquality
{-
Exercise 1.1. Given functions f : A → B and g : B → C, define their composite g ◦ f : A → C.
Show that we have h ◦ (g ◦ f ) ≡ (h ◦ g) ◦ f .
-}
-- Function composition
_∘_ : ∀ {a b c}{A : Set a}{B : Set b}{C : Set c} → (B → C) → (A... |
module Miscellaneous.InstanceLoop where
open import Type
postulate A : TYPE
postulate B : TYPE
postulate C : TYPE
instance
postulate ab : ⦃ A ⦄ → B
instance
postulate ba : ⦃ B ⦄ → A
postulate a : A
test-a : B
test-a = ab
|
module Lemmachine.Resource.Universe where
open import Lemmachine.Request
open import Lemmachine.Response
open import Data.Maybe
open import Data.List
open import Data.Product
open import Data.Bool
open import Data.String
AuthHead = Bool
MediaType = String
Handler = String
Charset = String
CharsetConverter = String
Enc... |
------------------------------------------------------------------------------
-- FOTC list terms properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-... |
{-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Equivalence
module HoTT.Equivalence.Empty where
open variables
𝟎-equiv : {A : 𝒰 i} → ¬ A → 𝟎 {i} ≃ A
𝟎-equiv ¬a = 𝟎-rec , qinv→isequiv (𝟎-rec ∘ ¬a , 𝟎-ind , 𝟎-rec ∘ ¬a)
|
-- 2014-05-27 Jesper and Andreas
postulate
A : Set
{-# BUILTIN REWRITE A #-}
-- Expected error:
-- A does not have the right type for a rewriting relation
-- because it should accept at least two arguments
-- when checking the pragma BUILTIN REWRITE A
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.elims.SuspSmash
-- (ΣX)∧Y ≃ Σ(X∧Y)
module homotopy.SuspSmash where
module _ {i j} (X : Ptd i) (Y : Ptd j) where
private
x₀ = pt X
y₀ = pt Y
Σ∧-out-smgluel-merid : ∀ (x : de⊙ X) →
Square idp
(ap (Susp-fmap (λ x... |
{-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.data:25 #-}
-- {-# OPTIONS -v tc.conv.coerce:0 -v tc.with:25 #-}
module FilterSub where
open import Common.Level
open import Common.Equality
_∘_ : ∀ {a b c}
{A : Set a} {B : A → Set b} {C : {x : A} → B x → Set c} →
(∀ {x} (y : B x) → C y) → (g : (x :... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Instances.CommAlgebras where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Powerset
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.Algebra
open import Cubical.Algebra.CommAlgebra
open... |
{-# OPTIONS --safe #-}
module Definition.Typed.RedSteps where
open import Definition.Untyped
open import Definition.Typed
-- Concatenation of type reduction closures
_⇨*_ : ∀ {Γ A B C r} → Γ ⊢ A ⇒* B ^ r → Γ ⊢ B ⇒* C ^ r → Γ ⊢ A ⇒* C ^ r
id ⊢B ⇨* B⇒C = B⇒C
(A⇒A′ ⇨ A′⇒B) ⇨* B⇒C = A⇒A′ ⇨ (A′⇒B ⇨* B⇒C)
-- Concatenati... |
{- 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
-}
import LibraBFT.Impl.Types.BlockInfo as BlockInfo
import ... |
open import Prelude
open import Nat
open import core
open import contexts
module lemmas-env where
env-ctx-same-1 : ∀{Δ Σ' Γ E x} →
Δ , Σ' , Γ ⊢ E →
x # E →
x # Γ
env-ctx-same-1 EnvId h = x#∅
env-ctx-same-1 {x = x} (EnvInd {E = E} {x = x'} ctxcons _) ... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Level
open import Ordinals
module OPair {n : Level } (O : Ordinals {n}) where
open import zf
open import logic
import OD
import ODUtil
import OrdUtil
open import Relation.Nullary
open import Relation.Binary
open import Data.Empty
open import Relation.Binary
open ... |
module PreludeString where
import RTP -- magic module
import PreludeList
open PreludeList using (List)
open import AlonzoPrelude
infixr 50 _++_
private
primitive
primStringAppend : String -> String -> String
-- primStringReverse : String -> String
primStringToList : String -> List Cha... |
-- ----------------------------------------------------------------------
-- The Agda Descriptor Library
--
-- (Closed) Sets
-- ----------------------------------------------------------------------
module Data.Set where
open import Data.Empty using (⊥)
open import Data.Fin using (Fin; suc; zero)
open import Data.Na... |
------------------------------------------------------------------------
-- Universe levels
------------------------------------------------------------------------
module Common.Level where
postulate
Level : Set
lzero : Level
lsuc : (i : Level) → Level
_⊔_ : Level -> Level -> Level
{-# IMPORT Common.FFI ... |
------------------------------------------------------------------------
-- "Equational" reasoning combinator setup
------------------------------------------------------------------------
{-# OPTIONS --safe #-}
open import Labelled-transition-system
-- Note that the module parameter is explicit. If the LTS is not g... |
{- 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
import LibraBFT.Im... |
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; trans; cong; cong₂; _≢_)
open import Data.Empty using (⊥; ⊥-elim)
open import Data.List using (List; []; _∷_; dropWhile)
open import Data.Char using (Char)
open import Data.Bool using (Bool; true; false)
import Data.Char as Char using (_≟... |
------------------------------------------------------------------------------
-- A proof that is rejected using the --without-K option
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-u... |
module Data.Fin.Properties.Extra where
open import Data.Fin hiding (_≤_)
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Binary.PropositionalEquality
inject≤-trans : ∀ {l m n} i (p : l ≤ m)(q : m ≤ n) → inject≤ (inject≤ i p) q ≡ inject≤ i (≤-trans p q)
inject≤-trans () z≤n q
inject≤-trans z... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Comma.Functors where
open import Categories.Category
open import Categories.Functor renaming (_∘_ to _∘F_)
open import Categories.FunctorCategory renaming (Functors to [_⇒_])
open import Categories.NaturalTransformation using (module NaturalTransformation)
open... |
-- Andreas, Bentfest 2016-04-28 Marsstrand
-- Issue 1944: also resolve overloaded projections in checking position
module _ (A : Set) (a : A) where
record R B : Set where
field f : B
open R
record S B : Set where
field f : B
open S
test : R A → A
test = f
test1 : ∀{A} → R A → A
test1 = f
test2 : ∀ A → R A → A... |
module nat-thms where
open import bool
open import bool-thms
open import bool-thms2
open import eq
open import nat
open import neq
open import product
open import product-thms
open import sum
open import level
open import negation
--------------------------------------------------
-- properties of addition
----------... |
module _ where
module M (X : Set) where
postulate
F : Set
G : Set
data ⊥ : Set where
open M ⊥ hiding (F)
easy : M.G ⊥
easy = {!!} -- G
hard : M.F ⊥
hard = {!!} -- M.F ⊥ (and not .Issue1640._.F)
data ⊤ : Set where
tt : ⊤
module With where
private
F : ⊤ → Set
F x with x
F _ | tt = ⊥... |
{-# OPTIONS --rewriting --confluence-check #-}
open import Agda.Builtin.Nat using (Nat; zero; suc)
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
variable
k l m n : Nat
postulate
max : Nat → Nat → Nat
max-0l : max 0 n ≡ n
max-0r : max m 0 ≡ m
max-diag : max m m ≡ m
max-ss : ... |
module bstd.bake where
open import Agda.Builtin.Nat
open import Agda.Builtin.String
open import Data.Word8.Primitive
open import Data.ByteString.Primitive.Strict
open import Data.Tuple.Base
module bpace
(Scalar : Set)
(Point : Set)
(scalarMul : Scalar → Point → Point)
(2ᴸ : Set)
(Key : Set)
(enc dec : Key... |
------------------------------------------------------------------------
-- 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... |
{-# OPTIONS --safe #-}
module Cubical.Data.NatPlusOne.MoreNats.AssocNat where
open import Cubical.Data.NatPlusOne.MoreNats.AssocNat.Base public
open import Cubical.Data.NatPlusOne.MoreNats.AssocNat.Properties public
|
{-# OPTIONS --without-K --safe #-}
open import Algebra.Structures.Bundles.Field
module Algebra.Linear.Construct.Matrix
{k ℓ} (K : Field k ℓ)
where
open import Level using (_⊔_)
open import Data.Product hiding (map)
open import Data.Fin using (Fin; toℕ; fromℕ; _≤_)
open import Data.Fin.Properties using (¬Fin0)
op... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Groups.Definition
open import Groups.Subgroups.Definition
open import Groups.Actions.Definition
open import Sets.EquivalenceRelations
open import Groups.Actions.Definition
module Groups.Actions.Stabiliser {a b c d : _} {A : Set... |
module TelescopingLet3 where
module Star where
★ : Set₁
★ = Set
★₁ : Set₂
★₁ = Set₁
module MEndo (open Star) (A : ★) where
Endo = A → A
-- at this point, ★ should no longer be in scope
data D3 (open Star using (★₁)) : ★₁ where
c : (A : ★) → D3
-- ★₁ is in scope
-- ★ is not in scope since it was not bro... |
variable {A} : Set _
id : A → A
id a = a
test : Set₁
test = id {A = Set₁} Set
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Category.Monoidal
open import Categories.Category.Monoidal.Closed
module Categories.Category.Monoidal.Closed.IsClosed.Dinatural
{o ℓ e} {C : Category o ℓ e} {M : Monoidal C} (Cl : Closed M) where
open import Data.Product usin... |
-- Andreas, 2016-10-11, AIM XXIV
-- COMPILED pragma accidentially also accepted for abstract definitions
open import Common.String
data Unit : Set where
unit : Unit
{-# COMPILED_DATA Unit () () #-}
postulate
IO : Set → Set
doNothing : IO Unit
{-# COMPILED_TYPE IO IO #-}
{-# BUILTIN IO IO #-}
{-# COMPILED doN... |
postulate
A : Set
data D : Set → Set₁ where
d : (A : Set) → D A
f : Set → (D A → Set) → Set
f A f = f (d A)
-- Expected error:
-- A != A of type Set
-- (because one is a variable and one a defined identifier)
-- when checking that the pattern d A has type D A
|
module Numeral.Natural.Relation.Order.Existence.Proofs where
import Lvl
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Functional
open import Logic.Propositional
open import Logic.Propositional.Theorems
open import Logic.Predicate
open import Numeral.Natural
open import Numeral.Natural.Oper
open import ... |
------------------------------------------------------------------------
-- Propositional (intensional) equality
------------------------------------------------------------------------
module Relation.Binary.PropositionalEquality where
open import Relation.Binary
open import Relation.Binary.Consequences
open import ... |
module _ where
open import Agda.Primitive
module _ (a ℓ ℓ' : Level) where
mutual
X : Level
X = _ -- Agda 2.5.1.1 solves this level meta
hyp : Set₁
hyp with (lsuc ℓ')
... | _ = Set
where
X<=a : Set (X ⊔ a) → Set a
X<=a A = A
test : Set₁
test with (lsuc ℓ)
..... |
{-A
Polynomials over commutative rings
==================================
-}
{-# OPTIONS --safe #-}
----------------------------------
module Cubical.Algebra.Polynomials.Univariate.Properties where
open import Cubical.HITs.PropositionalTruncation
open import Cubical.Foundations.Prelude
open import Cubical.Foundation... |
------------------------------------------------------------------------
-- Conversion of ≤ to <, along with a number of properties
------------------------------------------------------------------------
-- Possible TODO: Prove that a conversion ≤ → < → ≤ returns a
-- relation equivalent to the original one (and simi... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use Data.List.Relation.Unary.All
-- directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.All w... |
{-# OPTIONS -v impossible:100 #-}
module Issue882a where
open import Common.Level
open import Common.Equality
private
primitive
primTrustMe : ∀ {a} {A : Set a} {x y : A} → x ≡ y
-- trustMe {x = x} {y = y} evaluates to refl if x and y are
-- definitionally equal.
--
-- For an example of the use of trustMe, see Da... |
{-# OPTIONS --cubical --guardedness --postfix-projections #-}
module Data.Graph where
open import Prelude
open import Data.List
open import Data.Nat
-- record Thunk (A : Type a) : Type a where
-- coinductive
-- constructor ⟪_⟫
-- field force : A
-- open Thunk
-- infixr 5 _◃_
-- record Stream (A : Type a) : Ty... |
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
record D (A : Set) : Set where
constructor mkD
field d : A
open D {{...}}
module test where
instance
_ : D Bool
_ = mkD true
a : D Nat
a = mkD 0
_ : d ≡ true
_ = refl
_ : d ≡ zero
_ = refl
... |
open import Agda.Builtin.List
open import Agda.Builtin.Unit
open import Agda.Builtin.Nat
open import Agda.Builtin.String
renaming (primShowNat to show)
open import Agda.Builtin.Reflection
renaming (bindTC to _>>=_; returnTC to return)
pattern vArg t = arg (arg-info visible relevant) t
pattern var₀ x = var x []
in... |
{-# OPTIONS --without-K #-}
open import HoTT
module homotopy.HSpace where
record HSpaceStructure {i} (A : Type i) : Type i where
constructor hSpaceStructure
field
e : A
μ : A → A → A
μe- : (a : A) → μ e a == a
μ-e : (a : A) → μ a e == a
module ConnectedHSpace {i} (A : Type i) (c : is-connected ⟨... |
-- WARNING: This file was generated automatically by Vehicle
-- and should not be modified manually!
-- Metadata
-- - Agda version: 2.6.2
-- - AISEC version: 0.1.0.1
-- - Time generated: ???
{-# OPTIONS --allow-exec #-}
open import Vehicle
open import Vehicle.Data.Tensor
open import Data.Product
open import Data.I... |
module Imports.ATP-A where
postulate
D : Set
_≡_ : D → D → Set
a b : D
postulate p : a ≡ b
|
{-# OPTIONS --cubical-compatible #-}
-- {-# OPTIONS -v tc.lhs.unify:15 #-}
open import Common.Equality
open import Common.Prelude
data Fin : (n : Nat) → Set where
zero : {n : Nat} → Fin (suc n)
suc : {n : Nat} (i : Fin n) → Fin (suc n)
data _≅_ {A : Set} (a : A) : {B : Set} (b : B) → Set1 where
refl : a ≅ a
... |
module Cxt (K : Set) where
open import Basics
open import Pr
open import Nom
mutual
data Cxt : Set where
EC : Cxt
_[_-_] : (G : Cxt)(x : Nom) -> K -> {p : [| G Hasn't x |]} -> Cxt
HAS : Cxt -> Nom -> Bool
HAS EC x = false
HAS (G [ y - S ]) x with nomEq y x
HAS (G [ y - S ]) .y | yes refl = true
... |
{-# OPTIONS --sized-types #-}
module SOList.Lower.Properties {A : Set}(_≤_ : A → A → Set) where
open import Bound.Lower A
open import Bound.Lower.Order _≤_
open import Size
open import List.Sorted _≤_
open import SOList.Lower _≤_
lemma-solist-sorted : {ι : Size}{b : Bound} → (xs : SOList {ι} b) → Sorted (forget xs)... |
module Float where
import Lvl
open import Type
postulate Float : Type{Lvl.𝟎}
{-# BUILTIN FLOAT Float #-}
|
{-# OPTIONS --copatterns #-}
open import Common.Equality
open import Common.Product
id : {A : Set} → A → A
id x = x
record Functor (F : Set → Set) : Set₁ where
field
map : ∀ {A B} → (A → B) → F A → F B
map-id : ∀ {A}{x : F A} → map id x ≡ x
open Functor
test : {C : Set} → Functor (_×_ C)
map test f (c ... |
{-# OPTIONS --without-K --exact-split #-}
module 02-pi where
import 00-preamble
open 00-preamble public
-- Section 2.3 The identity function, composition, and their laws
-- Definition 2.3.1
id : {i : Level} {A : UU i} → A → A
id a = a
-- Definition 2.3.2
_∘_ :
{i j k : Level} {A : UU i} {B : UU j} {C : UU k} →
... |
------------------------------------------------------------------------
-- Some parsers which require a decidable token equality
------------------------------------------------------------------------
open import Relation.Binary
module RecursiveDescent.Inductive.Token (D : DecSetoid) where
open DecSetoid D using (... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Propositional (intensional) equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.PropositionalEquality where
open import A... |
{-# TERMINATING #-}
{-# NO_POSITIVITY_CHECK #-}
mutual
data D₁ : Set where
lam : (D₁ → D₁) → D₁
Foo₁ : Set
Foo₁ = Foo₁
{-# NON_TERMINATING #-}
{-# NO_POSITIVITY_CHECK #-}
mutual
data D₂ : Set where
lam : (D₂ → D₂) → D₂
Foo₂ : Set
Foo₂ = Foo₂
|
record R0 : Set₁ where
constructor c0
field f0 : Set
record R1 : Set₁ where
constructor c1
field f1 : R0
test : R1 → Set₁
test x@(c1 x) = Set
|
-- forcePi should be allowed to generate constraints
module Lambda where
data Bool : Set where
true : Bool
false : Bool
T : Bool -> Set
T true = Bool -> Bool
T false = Bool
id : {x : Bool} -> T x -> T x
id y = y
f : Bool -> Bool
f = id (\x -> x)
|
-- Andreas, 2013-03-20 Problem was that CompiledClause.Match.unfoldCoinduction
-- did not instantiate metas
-- {-# OPTIONS -v tc.meta.assign:10 -v tc.reduce:100 -v tc.with.abstract:50 #-}
{-# OPTIONS --allow-unsolved-metas #-}
module Issue826 where
open import Common.Coinduction
postulate
A : Set
x : A
P : A → ... |
module SetInf where
id : ∀ {A} → A → A
id x = x
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.