text stringlengths 4 690k |
|---|
{-
Some basic utilities for reflection
-}
{-# OPTIONS --cubical --no-exact-split --safe #-}
module Cubical.Reflection.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Data.List.Base
open import Cubical.Data.Nat.Base
import Agda.Builtin.Reflection as R
open import Agda.Builtin.String
_>>=_ = R... |
-- Andreas, 2013-11-08
module Issue532 where
module M (A : Set) where
postulate
ax : A
P : A → Set
record R (A : Set) : Set where
open M A public
field
f : P ax
open R
-- Error WAS:
-- Not a valid let-declaration
-- when scope checking let open M A public in (f : P ax) → Set₀
S : {A : Set} → R A ... |
{-# OPTIONS --type-in-type #-} -- yes, there will be some cheating in this lecture
module Lec4Done 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
-- composi... |
data Bool : Set where
true false : Bool
{-# BUILTIN BOOL Bool #-}
{-# BUILTIN TRUE true #-}
{-# BUILTIN FALSE true #-} -- hmm, no
|
-- 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.S... |
------------------------------------------------------------------------------
-- Colist properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS... |
module _ where
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
module M (n : Nat) (m : Nat) where
foo : n ≡ 0 → Nat
foo refl = 0
module M' where
bar : Nat
bar = m
bad : Nat
bad = M'.bar -- internal error Monad.Signature:882
|
module OldBasicILP.Syntax.Translation where
open import Common.Context public
import OldBasicILP.Syntax.ClosedHilbertSequential as CHS
import OldBasicILP.Syntax.ClosedHilbert as CH
-- Translation from closed Hilbert-style sequential to closed Hilbert-style.
mutual
chsᵀ→chᵀ : CHS.Ty → CH.Ty
chsᵀ→chᵀ (CHS.α P) ... |
-- No top-level module
f : Set₁
f = Set
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Vec.Relation.Binary.Equality.Setoid directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open impor... |
useful-lemma : ∀ {a} {A : Set a} → A
useful-lemma = useful-lemma
|
------------------------------------------------------------------------
-- Very stable booleans
------------------------------------------------------------------------
{-# OPTIONS --cubical --safe #-}
-- The module is parametrised by a notion of equality. The higher
-- constructor of the HIT defining the very stabl... |
import Nat
open Nat using (Nat)
module TopLevelImport (n : Nat) where
it : Nat
it = n
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Foundations.Equiv.Reasoning where
open import Cubical.Foundations.Prelude using (refl; sym)
open import Cubical.Relation.Binary
-- Properties of equivalence
≃-reflexive : Reflexive _≃_
≃-reflexive = ?
|
------------------------------------------------------------------------
-- Context extensions with the leftmost element in the outermost
-- position
------------------------------------------------------------------------
open import Data.Universe.Indexed
module deBruijn.Context.Extension.Left
{i u e} (Uni : Index... |
{-
Macros (autoDesc, AutoStructure, AutoEquivStr, autoUnivalentStr) for automatically generating structure definitions.
For example:
autoDesc (λ (X : Type₀) → X → X × ℕ) ↦ recvar (var , constant ℕ)
We prefer to use the constant structure whenever possible, e.g., [autoDesc (λ (X : Type₀) → ℕ → ℕ)]
is [constant... |
module Preliminaries where
open import Agda.Primitive using (Level) renaming (lzero to lZ; lsuc to lS; _⊔_ to lmax)
-- ----------------------------------------------------------------------
-- functions
_o_ : {A B C : Set} → (B → C) → (A → B) → A → C
g o f = \ x → g (f x)
infixr 10 _o_
-- -----------... |
------------------------------------------------------------------------
-- Operators
------------------------------------------------------------------------
module Mixfix.Operator where
open import Data.Nat using (ℕ; zero; suc; _+_)
open import Data.Vec using (Vec)
open import Data.Product using (∃; ∃₂; _,_)
open ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Decision procedures for finite sets and subsets of finite sets
------------------------------------------------------------------------
module Data.Fin.Dec where
open import Function
import Data.Bool as Bool
op... |
open import Silica
open import HeapProperties
open import Data.List.Membership.DecSetoid ≡-decSetoid
open import Data.List.Relation.Unary.Any
open TypeEnvContext
------------ Lemmas --------------
-- If an expression is well-typed in Δ, then all locations in the expression are in Δ.
locationsInExprAreInContext : ∀ ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed binary relations
------------------------------------------------------------------------
-- This file contains some core definitions which are reexported by
-- Relation.Binary.Indexed.
module Relation.... |
{-
Product of structures S and T: X ↦ S X × T X
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Relational.Product where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open ... |
module List.Permutation.Pair (A : Set) where
open import Data.List
open import Data.Product
data _≈_ : List A → List A × List A → Set where
≈[]r : (xs : List A)
→ xs ≈ (xs , [])
≈[]l : (xs : List A)
→ xs ≈ ([] , xs)
≈xr : {x : A}{xs ys zs : List A}
→ x... |
module Semantics where
open import Data.Nat hiding (_⊔_; _⊓_)
open import Data.Product
open import Data.Sum
open import Data.String using (String)
open import Data.Unit hiding (_≟_)
open import Data.Empty
open import Relation.Nullary
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_;_≢_; refl)
ope... |
module Oscar.Class.Associativity where
open import Oscar.Class.Preservativity
open import Oscar.Function
open import Oscar.Level
open import Oscar.Relation
record Associativity
{𝔞} {𝔄 : Set 𝔞} {𝔰} {_►_ : 𝔄 → 𝔄 → Set 𝔰}
(_◅_ : ∀ {m n} → m ► n → ∀ {l} → m ⟨ l ►_ ⟩→ n)
{ℓ}
(_≤_ : ∀ {m n} → m ► n → m ... |
{-# OPTIONS --safe #-}
module Cubical.ZCohomology.Groups.Connected where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat
open impo... |
module Primitive where
|
-- Andreas, 2011-10-02
{-# OPTIONS --show-implicit #-}
module Issue483a where
data _≡_ {A : Set}(a : A) : A → Set where
refl : a ≡ a
data Empty : Set where
postulate A : Set
abort : .Empty → A
abort ()
test : let X : .Set1 → A
X = _
in (x : Empty) → X Set ≡ abort x
test x = refl
-- this shoul... |
postulate
A : Set
F : { x : A } → Set
G : ⦃ x : A ⦄ → Set
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.NAryOp where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.SIP
open import Cubical.Functions.FunExtEquiv
open import Cubical.Data.Na... |
{-# OPTIONS --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.ShapeView {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped as U
open import Definition.Typed
open import Definition.Typed.Weakening
open import Definition.Typed.Properties
open import... |
{-
Smith Normal Form
Referrences:
Guillaume Cano, Cyril Cohen, Maxime Dénès, Anders Mörtberg, Vincent Siles,
"Formalized linear algebra over Elementary Divisor Rings in Coq"
(https://arxiv.org/abs/1601.07472)
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.IntegerMatrix.Smith where
open import Cubical.Algebr... |
module API where
open import Algebra
open import Prelude
empty : ∀ {A} -> Graph A
empty = ε
vertex : ∀ {A} -> A -> Graph A
vertex = v
overlay : ∀ {A} -> Graph A -> Graph A -> Graph A
overlay = _+_
connect : ∀ {A} -> Graph A -> Graph A -> Graph A
connect = _*_
edge : ∀ {A} -> A -> A -> Graph A
ed... |
{-# OPTIONS --without-K #-}
module sets.list.properties where
open import level
open import equality.core
open import sets.list.core
module _ {i}{A : Set i} where
data all {j}(P : A → Set j) : List A → Set (i ⊔ j) where
mk-all : ∀ {x xs} → P x → all P xs → all P (x ∷ xs)
data any {j}(P : A → Set j) : List A ... |
import SOAS.Syntax.Signature as Sig
open import SOAS.Families.Core
-- Term syntax for a signature
module SOAS.Syntax.Term
{T : Set}(open Sig T)
{O : Set}(S : Signature O) where
open import SOAS.Syntax.Arguments {T}
open import SOAS.Metatheory.Syntax {T}
open import SOAS.Common
open import SOAS.Context {T}
open... |
module SingleSorted.Example where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl)
open import Data.Product using (_×_; proj₁; proj₂; <_,_>; ∃; ∃-syntax; _,_)
import Function using (_∘_)
open import SingleSorted.AlgebraicTheory
open import Categories.Category.Instance.Sets
open import Categ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Maybe type
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Maybe where
open import Data.Empty using (⊥)
open import Data.Unit using (... |
data Nat : Set where
zero : Nat
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
subst : ∀ {A : Set} (P : A → Set) {x y} → x ≡ y → P x → P y
subst P refl px = px
postulate
Eq : Set → Set
mkEq : {A : Set} (x y : A) → x ≡ y
_==_ : {A : Set} {{_ : Eq A}} (x y : A) → x ≡ y
A : Set
B : A → Set
C ... |
------------------------------------------------------------------------
-- The actual maximum stack size of the compiled program matches the
-- maximum stack size of the instrumented source-level semantics
------------------------------------------------------------------------
open import Prelude
import Lambda.Synt... |
{-# OPTIONS --without-K #-}
open import Equivalence
module PathStructure.Id.Ap {a b} {A : Set a} {B : Set b}
(f : A → B) (qi : qinv f) where
open import Functoriality
open import GroupoidStructure
open import Homotopy
open import PathOperations
open import Types
private
g = π₁ qi
α = π₁ (π₂ qi)
β = π₂ (π₂ qi... |
{-# OPTIONS --without-K #-}
open import Types
open import Paths
open import HLevel
open import Equivalences
open import Univalence
module Funext {i} {A : Set i} where
-- Naive non dependent function extensionality
module FunextNonDep {j} {B : Set j} {f g : A → B} (h : (x : A) → f x ≡ g x)
where
private
equ... |
{-# OPTIONS --without-K #-}
module sets.core where
open import equality.core
module _ {i}{A : Set i}
(_<_ : A → A → Set i) where
data Ordering (x y : A) : Set i where
lt : x < y → Ordering x y
eq : x ≡ y → Ordering x y
gt : y < x → Ordering x y
|
{-# OPTIONS --cubical --no-import-sorts --postfix-projections --safe #-}
module Cubical.Categories.Presheaf where
open import Cubical.Categories.Presheaf.Base public
open import Cubical.Categories.Presheaf.Properties public
open import Cubical.Categories.Presheaf.KanExtension public
|
open import Agda.Builtin.Reflection
open import Agda.Builtin.Unit
macro
@0 m : @0 Set → Term → TC ⊤
m A B =
bindTC (quoteTC A) λ A →
unify A B
F : @0 Set → Set
F A = m A
|
-- Andreas, 2016-10-03, issue #2233
-- Positivity check should return the same result when change
-- all involved definitions from non-abstract to abstract.
abstract
data Functor : Set where
Id : Functor
_·_ : Functor → Set → Set
Id · A = A
data ν (F : Functor) : Set where
inn : F · ν F → ν F
-- Sho... |
open import WarningOnImport.Impo
C = A
|
module Data.List.Properties.Extra {a}{A : Set a} where
open import Data.Nat
open import Data.Fin hiding (_<_)
open import Data.List
open import Data.Product hiding (map)
open import Data.Fin using (fromℕ≤; zero; suc)
open import Data.List.Relation.Unary.All hiding (map; lookup; _[_]≔_)
open import Data.List.Relation.U... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Cofiber
open import lib.types.Sigma
open import lib.types.Wedge
module lib.types.Smash {i j} (X : Ptd i) (Y : Ptd j) where
module ∨In× = WedgeRec {X = X} {Y = Y}
(λ x → (x , pt Y)) (λ y → (pt X , y)) idp
∨-in-× = ∨In×.f
∨-⊙in-× ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.GlobularSet where
open import Level
open import Data.Unit
open import Categories.Support.PropositionalEquality
open import Categories.Category
open import Categories.Globe
open import Categories.Functor
open import Categories.Presheaf
open import Categories.Ag... |
{-# OPTIONS --warning ShadowingInTelescope #-}
postulate
_ : (A A : Set) → Set
|
module BasicIS4.Metatheory.Gentzen-BasicKripkeAlechina where
open import BasicIS4.Syntax.Gentzen public
open import BasicIS4.Semantics.BasicKripkeAlechina public
-- Soundness with respect to all models, or evaluation.
mutual
eval : ∀ {A Γ} → Γ ⊢ A → Γ ⊨ A
eval (var i) γ = lookup i γ
eval (lam t) ... |
------------------------------------------------------------------------
-- Some defined parsers
------------------------------------------------------------------------
-- Note that the fixpoint combinator ensures that _⋆ can be defined
-- without any need for library grammars (c.f.
-- RecursiveDescent.Inductive.Lib)... |
module RecordConstructors (Parameter : Set) where
-- Note that the fixity declaration has to be given outside of the
-- record definition.
infix 6 _⟨_⟩_
record R (X : Set) (Y : Set) : Set₁ where
constructor _⟨_⟩_
field
{A} : Set
f : A → X
{B} D {E} : Set
g : B → Y → E
postu... |
module Relator.Equals.Proofs.Equivalence where
open import Functional
import Lvl
open import Lang.Instance
open import Logic.Propositional
open import Logic
open import Relator.Equals
open import Structure.Setoid using (Equiv) renaming (_≡_ to _≡ₛ_)
open import Structure.Function
open import Structure.Operator
op... |
{-# OPTIONS -v tc.lhs:50 #-}
{-# OPTIONS -v tc.coverage:50 #-}
open import Agda.Builtin.String
test : String → String
test x@"foo" = "bar"
test x = x
|
{-# OPTIONS --universe-polymorphism #-}
module Issue204 where
open import Issue204.Dependency
postulate
ℓ : Level
r : R ℓ
d : D ℓ
open R r
open M d
|
-- Andreas, 2014-09-09
mutual
{-# NON_TERMINATING #-}
f : Set
f = g
{-# TERMINATING #-}
g : Set
g = f
-- Expected error:
-- In a mutual block, either all functions must have the same (or no)
-- termination checking pragma.
|
import Either
open import Boolean
module Logic where
id : ∀ { A : Set } → A → A
id x = x
Rel : Set → Set₁
Rel X = X → X → Set
Decidable : ∀ { X } → Rel X → Set
Decidable R = ∀ x y → Either (R x y) (¬ (R x y))
where open Either
modusPonens : { P Q : Set } → ( P → Q ) → P → Q
modusPonens = id
|
module Data.Tuple where
import Lvl
open import Type
open import Syntax.Function
infixr 200 _⨯_ _,_
private variable ℓ ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Lvl.Level
private variable A B C A₁ A₂ B₁ B₂ : Type{ℓ}
-- Definition of a 2-tuple
record _⨯_ (A : Type{ℓ₁}) (B : Type{ℓ₂}) : Type{ℓ₁ Lvl.⊔ ℓ₂} where
constructor _,_
field
... |
------------------------------------------------------------------------
-- Experiments with Pure Type Systems (PTS)
------------------------------------------------------------------------
-- Author: Sandro Stucki
-- Copyright (c) 2015 EPFL
-- The code in this directory contains a (partial) Agda formalization
-- of ... |
-- {-# OPTIONS -v tc.meta:50 #-}
-- Andreas 2012-03-27, record pattern unification
module Issue376 where
import Common.Level
open import Common.Equality
open import Common.Irrelevance
record Sigma (A : Set)(B : A -> Set) : Set where
constructor _,_
field
fst : A
snd : B fst
open Sigma public
record Unit ... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Structures.Group where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Data.Sigma
open import Cubical.Foundations.SIP renaming (SNS-PathP to SNS)
open import Cubical.Structures.NA... |
module Text.Greek.SBLGNT.Eph where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΠΡΟΣ-ΕΦΕΣΙΟΥΣ : List (Word)
ΠΡΟΣ-ΕΦΕΣΙΟΥΣ =
word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Eph.1.1"
∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "Eph.1.1"
∷ word (... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Lattice.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.HalfAdjoint
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Cosets
open import Groups.Homomorphisms.Definition
open import Rings.Homomorphisms.Definition
open import Groups.Lemmas
open import Groups.Definition
open import Setoids.Setoids
open import Setoids.Functions.Lemmas
open i... |
open import Agda.Builtin.Bool
open import Agda.Builtin.Char
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
char : Char → Set
char 'A' with 'O'
char _ | _ = Char
char _ = Char
lit : Nat → Set
lit 5 with 0
lit _ | _ = Nat
lit _ = Nat
con : Nat → Set
con zero with zero
con _ | _ = Nat
con (suc ... |
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
macro
print : (Set → Set) → Term → TC _
print t _ = bindTC (quoteTC t) λ t →
typeError (termErr t ∷ [])
-- Prints λ { X → X }.
Test₁ : Set
Test₁ = {!print (λ { X → X })!}
module _ (A : Set) where
-- Prints λ { A₁ X → X }.
Te... |
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-}
module Number.Instances.QuoInt where
open import Cubical.Foundations.Everything hiding (⋆) renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Foundations.Logic renaming (inl to inlᵖ; inr to inrᵖ)
open import Cubical.Relation.Nullary.Base re... |
------------------------------------------------------------------------------
-- We do not know how erase a proof term in the translation
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --n... |
open import Nat
open import Prelude
open import core
open import contexts
open import lemmas-disjointness
open import exchange
open import lemmas-freshG
-- this module contains all the proofs of different weakening structural
-- properties that we use for the hypothetical judgements
module weakening where
mutual
... |
-- Bug: With abstraction depended on bound variable names!
module Issue233 where
postulate
T : (Set → Set) → Set
mkT : (F : Set → Set) → T F
foo : T (λ A → A)
foo with λ (B : Set) → B
... | F = mkT F
|
open import Data.List using ( List ; [] ; _∷_ )
open import Data.Nat using ( ℕ ; zero ; suc )
open import Data.Maybe using ( Maybe ; just ; nothing )
open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; subst )
open import Relation.Binary.PropositionalEquality.TrustMe using ( trustMe )
module AssocFr... |
{-# OPTIONS --without-K #-}
module Util.HoTT.Univalence.Axiom where
open import Util.HoTT.Equiv
open import Util.HoTT.Univalence.Statement
open import Util.Prelude
open import Util.Relation.Binary.PropositionalEquality using (Σ-≡⁻)
private
variable
α β γ : Level
A B C : Set α
postulate
univalence : ∀ {... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- IO
------------------------------------------------------------------------
module IO where
open import Coinduction
open import Data.Unit
open import Data.String
open import Data.Colist
open import Function
imp... |
-- {-# OPTIONS -v tc.cover.cover:10 -v tc.cover.splittree:100 -v tc.cover.strategy:100 -v tc.cc:100 #-}
module Issue365 where
{- Basic data types -}
data Nat : Set where
zero : Nat
succ : Nat -> Nat
data Fin : Nat -> Set where
fzero : {n : Nat} -> Fin (succ n)
fsucc : {n : Nat} -> Fin n -> Fin (succ n)
data Vec... |
module Operator.Equals {ℓ} where
import Lvl
open import Data.Boolean
open import Functional
open import Relator.Equals{ℓ}
open import Type{ℓ}
-- Type class for run-time checking of equality
record Equals(T : Type) : Type where
infixl 100 _==_
field
_==_ : T → T → Bool
field
⦃ completeness ⦄ : ∀{a b... |
open import Data.Product using ( ∃ ; _×_ ; _,_ ; proj₁ ; proj₂ )
open import Relation.Unary using ( _∈_ )
open import Web.Semantic.DL.TBox.Interp using ( Δ ; _⊨_≈_ ) renaming
( Interp to Interp′ ; emp to emp′ )
open import Web.Semantic.DL.Signature using ( Signature )
open import Web.Semantic.Util using ( False ; id... |
{-# OPTIONS --cubical #-}
module Cubical.Categories.Everything where
import Cubical.Categories.Category
import Cubical.Categories.Functor
import Cubical.Categories.NaturalTransformation
import Cubical.Categories.Presheaves
import Cubical.Categories.Sets
import Cubical.Categories.Type
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vectors defined by recursion
------------------------------------------------------------------------
-- What is the point of this module? The n-ary products below are intended
-- to be used with a fixed n, in w... |
open import Prelude
open import RW.Utils.Monads
-- Some Error monad utilities, a là Haskell.
module RW.Utils.Error where
open import Data.String
open Monad {{...}}
-- Error Typeclass
record IsError {a}(A : Set a) : Set a where
field
showError : A → String
open IsError {{...}}
instance
... |
-- Andreas, 2018-04-10, issue #3581, reported by 3abc, test case by Andrea
-- Regression in the termination checker introduced together
-- with collecting function calls also in the type signatures
-- (fix of #1556).
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
I = Bool
i0 = true
i1 = false
record Pat... |
------------------------------------------------------------------------------
-- Testing Agda internal terms: @Var Nat Args@ when @Args = []@
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Groupoid where
open import Level
open import Categories.Category
import Categories.Morphisms
record Groupoid {o ℓ e} (C : Category o ℓ e) : Set (o ⊔ ℓ ⊔ e) where
private module C = Category C
open C using (_⇒_)
open Categories.Morphisms C
field
... |
------------------------------------------------------------------------
-- Lemmas
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --exact-split #-}
module Math.Combinatorics.ListFunction.Properties.Lemma where
open import Data.List hiding (_∷ʳ_)
import Data.Li... |
module _ where
open import Agda.Builtin.Equality using (_≡_; refl)
-- First example --
module M (A : Set) where
record R : Set where
data D : Set where
open R (record {})
postulate
x : A
F : D → Set₁
F _ rewrite refl {x = x} = Set
-- Second example --
record ⊤ : Set where
no-eta-equality
... |
{-# OPTIONS --sized-types #-}
open import FRP.JS.Bool using ( Bool ; true ; false ) renaming ( _≟_ to _≟b_ )
open import FRP.JS.Nat using ( ℕ )
open import FRP.JS.Float using ( ℝ ) renaming ( _≟_ to _≟n_ )
open import FRP.JS.String using ( String ) renaming ( _≟_ to _≟s_ )
open import FRP.JS.Array using ( Array ) rena... |
-- Testing the version option on a file with errors.
--
-- N.B. It is necessary to change the Issue1244a.out file when using
-- different versions of Agda.
foo : Set → Set
foo a = b
|
module Luau.Addr where
open import Agda.Builtin.Bool using (true; false)
open import Agda.Builtin.Equality using (_≡_)
open import Agda.Builtin.Nat using (Nat; _==_)
open import Agda.Builtin.String using (String)
open import Agda.Builtin.TrustMe using (primTrustMe)
open import Properties.Dec using (Dec; yes; no)
open ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Construction.Presheaves where
-- The Category of Presheaves over a Category C, i.e.
-- the Functor Category [ C.op , Setoids ]
-- Again, the levels are made explicit to show the generality and constraints.
-- CoPreasheaves are defined here as well, for con... |
module Monads.MonadMorphs where
open import Library
open import Functors
open import Categories
open import Monads
open Fun
open Monad
record MonadMorph {a b}{C : Cat {a}{b}}(M M' : Monad C) : Set (a ⊔ b) where
constructor monadmorph
open Cat C
field morph : ∀ {X} → Hom (T M X) (T M' X)
lawη : ∀... |
-- Occurs check when unifying indices in patterns
module OccursCheck where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data _==_ {A : Set}(x : A) : A -> Set where
refl : x == x
f : {n : Nat} -> n == suc n -> Nat
f refl = zero
|
{-# OPTIONS --cubical --no-import-sorts #-}
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Function.Base using (_∋_)
import Cubical.Algebra.Group as Std
-- import Cubical.Structures.Group.Properties
open import MorePropAlgebra.Bundles
module MorePropAlgebra.Propertie... |
module BSTree {A : Set}(_≤_ : A → A → Set) where
open import BTree {A}
data _⊴*_ : A → BTree → Set where
gelf : {x : A}
→ x ⊴* leaf
gend : {x y : A}{l r : BTree}
→ x ≤ y
→ x ⊴* l
→ x ⊴* (node y l r)
data _*⊴_ : BTree → A → Set where... |
module Issue1252 where
data Bool : Set where
true false : Bool
{-# COMPILED_DATA Bool Bool True False #-}
foo : Bool → Bool
foo true = false
foo false = true
{-# COMPILED_EXPORT foo foohs #-}
|
module Hello where
open import IO using (run; putStrLn)
import IO.Primitive as Prim using (IO)
open import Data.Nat using (ℕ)
import Data.Nat.Show as Nat using (show)
open import Data.Unit using (⊤) -- This is no upper case 't'
open import Data.String using (_++_)
age : ℕ
age = 28
main : Prim.IO ⊤
main = run (putSt... |
-- Based on an example due to Thorsten Altenkirch. See "Recursion with
-- boxes", http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=104.
module SubjectReduction where
open import Common.Coinduction
Eq : {A : Set} → A → A → Set1
Eq {A} x y = (P : A → Set) → P x → P y
refl : ∀ {A} (x : A) → Eq x x
refl x P Px = Px
data ... |
module Data.List.Decidable where
import Lvl
open import Data.Boolean
import Data.Boolean.Operators
open Data.Boolean.Operators.Programming
open import Data.Tuple
open import Data.List
open import Data.List.Functions
open import Data.List.Equiv
open import Functional
open import Logic.Propositional
ope... |
module Structure.Type.Identity.Proofs where
import Lvl
open import Functional using (_→ᶠ_ ; id ; _on₂_ ; swap ; _$_ ; apply)
open import Logic
open import Logic.Propositional
open import Logic.Propositional.Proofs.Structures
open import Structure.Function
open import Structure.Setoid using (Equiv ; intro) renamin... |
-- Andreas, 2020-03-18, issue #4520, reported by Dylan Ede.
--
-- Make the error message concerning ambiguous names
-- in BUILTIN declarations more precise.
open import Agda.Primitive
open import Agda.Builtin.FromNat
open import Agda.Builtin.Nat renaming (Nat to ℕ)
private
variable
ℓ ℓ' : Level
record FromNat ... |
{-# OPTIONS --experimental-irrelevance #-}
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
data Box (A : Set) : ..(x : A) → Set where
c : (x : A) → Box A x
unbox : {A : Set} → .(x : A) → Box A x → A
unbox a (c b) = b
.b : Bool
b = true
b' : Bool
b' = unbox b (c _)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.