text stringlengths 4 690k |
|---|
{-# OPTIONS --safe #-}
module Generics.Constructions.Show where
open import Generics.Prelude hiding (lookup)
open import Generics.Telescope
open import Generics.Desc
open import Generics.All
open import Generics.HasDesc
import Generics.Helpers as Helpers
import Data.Vec.Base as Vec
import Data.String as String
open... |
------------------------------------------------------------------------------
-- Natural numbers (added for the Collatz function example)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --n... |
module plfa-code.Equality where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
infix 4 _≡_
sym : ∀ {A : Set} {x y : A}
→ x ≡ y
-------
→ y ≡ x
sym refl = refl
trans : ∀ {A : Set} {x y z : A}
→ x ≡ y
→ y ≡ z
-------
→ x ≡ z
trans refl refl = refl
cong : ∀ {A B : Set} (f : A → B) {x y : ... |
{-# OPTIONS --cubical --safe #-}
module Test where
open import Cubical.Core.Everything using (_≡_; Level; Type; Σ; _,_; fst; snd; _≃_; ~_)
open import Cubical.Foundations.Prelude using (refl; sym; _∙_; cong; transport; subst; funExt; transp; I; i0; i1)
open import Cubical.Foundations.Function using (_∘... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- A generalisation of the arithmetic operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Nat.GeneralisedArithmetic where
open import... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- About the group structure of integers and bags for Nehemiah plugin.
------------------------------------------------------------------------
module Theorem.Groups-Nehemiah where
open import Structure.Bag.Nehemiah ... |
------------------------------------------------------------------------------
-- Properties related with the forest type
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymo... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.AbGroup.TensorProduct where
open import Cubical.Algebra.AbGroup.Base
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Function hiding (f... |
open import Preliminaries
module Preorder where
record Preorder-str (A : Set) : Set1 where
constructor preorder
field
≤ : A → A → Set
refl : ∀ x → ≤ x x
trans : ∀ x y z → ≤ x y → ≤ y z → ≤ x z
prop : ∀ x y → (p q : ≤ x y) → p == q
------------------------------------------
-- Tas... |
module Common.Level where
open import Agda.Primitive public
|
open import Relation.Binary.Core
module PLRTree.Drop.Permutation {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Data.List hiding (drop)
open import Data.Sum
open import List.Permutation.Base A
open import List.Permutation.Base.Equivalence A
open import ... |
-- Classical propositional logic, PHOAS approach, initial encoding
module Pi.Cp where
-- Types
infixl 2 _&&_
infixl 1 _||_
infixr 0 _=>_
data Ty : Set where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
_&&_ : Ty -> Ty -> Ty
_||_ : Ty -> Ty -> Ty
FALSE : Ty
infixr 0 _<=>_
_<=>_ : Ty -> Ty -... |
module Inductions where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; sym)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎)
open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_)
open import Data.Nat using (ℕ; _+_; _*_; _∸_) hiding (zero) renaming (suc to succ)
|
------------------------------------------------------------------------
-- Properties satisfied by decidable total orders
------------------------------------------------------------------------
open import Relation.Binary
module Relation.Binary.Props.DecTotalOrder (dt : DecTotalOrder) where
open Relation.Binary.De... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Algebra.Signature
module Fragment.Algebra.Free.Evaluation (Σ : Signature) where
open import Fragment.Algebra.Free.Monad Σ
open import Fragment.Algebra.Algebra Σ
open import Fragment.Algebra.Free.Base Σ
open import Fragment.Algebra.Homomorphism Σ
o... |
{-# OPTIONS --safe #-}
module Definition.Typed.EqualityRelation where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Weakening using (_∷_⊆_)
-- Generic equality relation used with the logical relation
record EqRelSet : Set₁ where
constructor eqRel
field
-----------... |
{-# OPTIONS --without-K #-}
open import container.core
module container.m.coalgebra {li la lb}
(c : Container li la lb) where
open import level
open import sum
open import function as F hiding (_∘_ ; module _≅_ ; _≅_ ; iso ; ≅⇒≡)
open import equality
open import hott
------------------------------------------------... |
{-# OPTIONS --without-K --safe #-}
-- https://personal.cis.strath.ac.uk/conor.mcbride/pub/DepRep/DepRep.pdf
module Experiment.Outrageous.#01 where
open import Data.Unit using (⊤)
open import Data.Product using (_×_) renaming (_,_ to _,,_)
open import Data.Nat using (ℕ)
infixl 30 _,_
infixr 40 _:→_
-- Star
data St ... |
------------------------------------------------------------------------
-- Alternative functional semantics for an untyped λ-calculus with
-- constants
------------------------------------------------------------------------
-- I noted that the compiler correctness proof in
-- Lambda.Closure.Functional might be easie... |
{-
Reported by sattler.christian, Oct 10 (3 days ago)
This is a funny one. The below code snippet produces the following error under the current Agda development version:
An internal error has occurred. Please report this as a bug.
Location of the error: src/full/Agda/TypeChecking/Eliminators.hs:85
Note the spurious... |
{-# OPTIONS --rewriting #-}
module Luau.RuntimeError where
open import Agda.Builtin.Equality using (_≡_)
open import Luau.Heap using (Heap; _[_])
open import FFI.Data.Maybe using (just; nothing)
open import FFI.Data.String using (String)
open import Luau.Syntax using (BinaryOperator; Block; Expr; nil; var; val; addr;... |
module Numeral.Natural.Oper.Modulo.Proofs.DivisibilityWithRemainder where
open import Data
open import Functional
open import Numeral.Finite
import Numeral.Finite.Proofs as 𝕟
open import Numeral.Natural
open import Numeral.Natural.Oper
open import Numeral.Natural.Oper.Modulo
open import Numeral.Natural.Oper.Modu... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Definition
open import Rings.Definition
open import Setoids.Setoids
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
module Fields.Fields where
record Field {m n : _} {A : Set m} {S : Setoid {m} {n} A} {_+_ :... |
{-# OPTIONS --without-K #-}
module PiEquiv where
open import Data.Empty
open import Data.Unit
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.Product using (_×_; Σ; _,_; proj₁; proj₂)
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; sym; trans; cong; cong₂)
open import Function usin... |
module _ where
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
data ⊥ : Set where
T : Nat → Set
T zero = ⊥
T (suc n) = Nat
module M (n : Nat) where
foo : n ≡ 0 → T n → Nat
foo refl t = 0
module M' where
bar : ⊥
bar = t
bad : ⊥
bad = M'.bar
loop : ⊥
loop = M.bad 0
|
module PigeonHole where
open import Prelude
open import Data.Nat hiding (_==_; _<_)
open import Data.Fin
open import Data.Vec as Vec
open import Logic.Base
open import Logic.Identity
open Vec.Elem
tooManyPigeons : {n : Nat}(xs : Vec (Fin (suc n)) n) -> ∃ \p -> p ∉ xs
tooManyPigeons {zero} [] = ∃-I fzero nl
tooMany... |
module Data.Vec.Extra where
open import Data.Product hiding (map; zip)
open import Data.Nat
open import Data.Fin
open import Data.Vec
open import Relation.Binary.PropositionalEquality
open import Function
map-with-∈ : ∀ {a}{A : Set a}{b n}{B : Set b}
(xs : Vec A n) → (∀ i {x} → lookup i xs ≡ x → B) → Vec... |
record R : Set₁ where
field
X : Set
data Δ (A : Set) : Set where
_,_ : A → A → Δ A
foo : (A : Set) → R → Δ A → Set
foo A = λ { r (x , y) → let open R r in X }
-- (y₁ : r) → Set !=< Set of type Set₁
-- when checking that the expression .Foo.X has type Set
|
-- Andreas, 2017-12-01, issue #2859 introduced by parameter-refinement
-- In Agda 2.5.2 any definition by pattern matching in a module
-- with a parameter that shadows a constructor will complain
-- about pattern variables with the same name as a constructor.
-- These are pattern variables added by the parameter-refi... |
{-# OPTIONS --without-K --safe #-}
-- | Functions for the composition of binary relations.
module Dodo.Binary.Composition where
-- Stdlib imports
open import Level using (Level; _⊔_)
open import Data.Product using (_,_; _×_; ∃-syntax)
open import Function.Base using (flip)
open import Relation.Binary using (... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Agda.Builtin.Unit
open import Agda.Builtin.Equality
postulate
A : Set
u₁ u₂ : ⊤
mutual
X : (⊤ → ⊤) → A
X = _
test : X (λ x → u₁) ≡ X (λ x → u₂)
test = refl
|
{- 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
-}
-- RWS monad implementation, and functionality for proving properties a... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import LogicalFormulae
open import Functions.Definition
module Orders.Total.Definition {a : _} (carrier : Set a) where
open import Orders.Partial.Definition carrier
record TotalOrder {b : _} : Set (a ... |
{-# OPTIONS --safe #-}
open import Generics.Prelude
open import Generics.Telescope
open import Generics.Desc
open import Generics.HasDesc
open import Generics.All
module Generics.Constructions.Mu
{P I ℓ} (A : Indexed P I ℓ) (H : HasDesc A)
(open HasDesc H)
{p} where
private
variable
V : ExTele P
i : ... |
------------------------------------------------------------------------------
-- A simple network using the Agda standard library
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univer... |
postulate
F : Set₂ → Set₃
#_ : Set₁ → Set₂
!_ : Set₀ → Set₁
infix 1 F
infix 2 #_
infix 3 !_
syntax F x = ! x
ok₁ : Set₁ → Set₃
ok₁ X = ! # X
ok₂ : Set₀ → Set₂
ok₂ X = # ! X
|
{- Category of sets -}
module CategoryTheory.Instances.Sets where
open import CategoryTheory.Categories
open import CategoryTheory.BCCCs
import Function as F using (_∘_)
open import Data.Unit using () renaming (⊤ to top) public
open import Data.Product public
open import Data.Empty using (⊥-elim) renaming (⊥ to bot)... |
------------------------------------------------------------------------------
-- First-order Peano arithmetic
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module Parameters where
data List (A : Set) : Set where
[] : List A
_∷_ : A → List A → List A
-- Error: The type of the constructor does not... |
open import Agda.Builtin.Reflection
open import Agda.Builtin.String
open import Agda.Builtin.List
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit
open import Agda.Builtin.Equality
open import Agda.Builtin.Sigma
data Wrap (A : Set) : Set where
[_] : A → Wrap A
macro
give : Wrap Term → Term → TC ⊤
giv... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some derivable properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Algebra.Properties.CommutativeMonoid {g₁ g₂} (M ... |
{-# OPTIONS --without-K #-}
module Cauchy where
-- Definitions for permutations in the Cauchy representation
open import Relation.Binary.PropositionalEquality using (subst)
open import Data.Nat.Properties.Simple
using (+-right-identity; +-suc; +-assoc; +-comm;
*-assoc; *-comm; *-right-zero; distribʳ-*-+;... |
module Issue329c where
private
infixl 0 D Undeclared
data D : Set where
|
{-# OPTIONS --cubical --safe --guardedness --postfix-projections #-}
module Codata.Stream where
open import Prelude
open import Data.List using (List; _∷_; [])
open import Data.List.Kleene
import Data.List.Kleene.Membership as Kleene
open import Data.Fin
infixr 5 _◃_
record Stream (A : Type a) : Type a where
const... |
------------------------------------------------------------------------------
-- Axiomatic Peano arithmetic base
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Bool.Base where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Data.Empty
open import Cubical.Data.Sum.Base
open import Cubical.Data.Unit.Base
open import Cubical.Relation.Nullary
open import Cubi... |
{-# OPTIONS --without-K #-}
module #1 where
open import Relation.Binary.PropositionalEquality
{-
Exercise 2.1. Show that the three obvious proofs of Lemma 2.1.2 are pairwise equal.
-}
ind₌ : ∀{a b}{A : Set a} → (C : (x y : A) → (x ≡ y) → Set b) → ((x : A) → C x x refl) → {x y : A} → (p : x ≡ y) → C x y p
ind₌ C c {... |
module Pi-2 where
open import Data.Unit
open import Data.Product
open import Relation.Binary.PropositionalEquality
open import Groupoid
infixr 10 _◎_
infixr 30 _⟷_
------------------------------------------------------------------------------
-- Level -2
-- Types are -2 groupoids or equivalently all types are contr... |
{-# OPTIONS --allow-unsolved-metas #-}
module Imports.Issue3730 where
X : _
X = _
|
----------------------------------------------------------------------
-- Copyright: 2013, Jan Stolarek, Lodz University of Technology --
-- --
-- License: See LICENSE file in root of the repo --
-- Repo address: https://github.com/... |
-- This was accepted, since we didn't fail on mismatched sorts when
-- comparing types.
module Issue485 where
ap : ((A : Set) → A → A) → Set → Set
ap f A = f _ A
|
{-# OPTIONS --without-K --safe #-}
module Data.Nat.Reasoning where
open import Data.Nat
import Data.Nat.Properties as ℕ-Prop
open import Relation.Binary.PropositionalEquality
infixr 3 _*≫_ _≪*_ _+≫_ _≪+_
_*≫_ : ∀ {x y} z → x ≡ y → z * x ≡ z * y
_*≫_ _ = cong _
_+≫_ : ∀ {x y} z → x ≡ y → z + x ≡ z + y
_+≫_ _ = cong ... |
------------------------------------------------------------------------
-- The state monad transformer
------------------------------------------------------------------------
-- The interface is based on that used by the "mtl" package on
-- Hackage.
{-# OPTIONS --without-K --safe #-}
open import Equality
module M... |
module Records where
variable
a b : Set
-- parametrized record type exported as an Haskell record
record Pair (a b : Set) : Set where
constructor MkPair
field
proj₁ : a
proj₂ : b
open Pair public
{-# COMPILE AGDA2HS Pair #-}
-- no named constructor means we reuse the record name
record Wrap (a : Set... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.ZariskiLattice.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
open im... |
------------------------------------------------------------------------
-- The semantics in Lambda.Closure.Relational and
-- Lambda.Closure.Functional are equivalent
------------------------------------------------------------------------
module Lambda.Closure.Equivalence where
open import Axiom.ExcludedMiddle
open ... |
module sn-calculus-compatconf.eview where
open import sn-calculus-compatconf.base
open import sn-calculus-compatconf.in-lift using (1-steplρ-E-view-ecin-lift)
open import sn-calculus-compatconf.split using (1-steplρ-E-view-ecsplit)
open import sn-calculus-compatconf.same using (1-steplρ-E-view-ecsame)
open im... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Union of two binary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Construct.Union where
open import Data.Product
o... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Core algebraic definitions
------------------------------------------------------------------------
-- The contents of this module should be accessed via `Algebra`.
{-# OPTIONS --without-K --safe #-}
module Al... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to AllPairs
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Relation.Unary.AllPairs.Properties where
open import ... |
record R₁ (M : Set → Set) : Set₁ where
field
return : ∀ {A} → A → M A
map : ∀ {A B} → (A → B) → M A → M B
open R₁ ⦃ … ⦄ public
record R₂ (M : Set → Set) : Set₁ where
field
instance
r₁ : R₁ M
data Wrap₁ (A : Set) : Set where
box : A → Wrap₁ A
instance
r₁ : R₁ Wrap₁
R₁.return r₁ x ... |
open import Algebra
open import Data.Nat as ℕ using (ℕ; suc; zero)
open import Data.Pos as ℕ⁺
open import Data.List as L using (List; []; _∷_; _++_)
open import Data.List.Any as LA using (Any; here; there)
open import Data.List.Any.BagAndSetEquality as B
open import Data.Product as PR using (∃; _×_; _,_; proj₁; proj₂)
... |
open import Type
module Graph {ℓ₁ ℓ₂} (V : Type{ℓ₁}) where
-- A graph is represented by a binary relation which states whether there is an edge from one vertex to another.
-- In other words, a graph is here defined by only its adjacency relation.
-- This is by default (without any assumptions) a directed multigraph w... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- Definition of Terminal object and some properties
module Categories.Object.Terminal {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Relation.Binary using (IsEquivalence; Setoid)
open import Relation.Binary.PropositionalEquality a... |
------------------------------------------------------------------------
-- Non-empty lists
------------------------------------------------------------------------
module Data.List.NonEmpty where
open import Data.Product hiding (map)
open import Data.Nat
open import Data.Function
open import Data.Vec as Vec using (V... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- The syntax of terms (Fig. 1a and 1b).
------------------------------------------------------------------------
-- The syntax of terms depends on the syntax of simple types
-- (because terms are indexed by types in ... |
{-# OPTIONS --type-in-type --no-pattern-matching #-}
open import Spire.IDarkwingDuck.Primitive
open import Spire.IDarkwingDuck.Derived
module Spire.IDarkwingDuck.Examples where
----------------------------------------------------------------------
ℕR : Data
ℕR = Decl End End
("zero" ∷ "suc" ∷ [])
(End tt , Rec tt... |
module 08-higherOrder where
explicitize : ∀ {A : Set} {B : A → Set} → ({{x : A}} → B x) → (x : A) → B x
explicitize f x = f {{x}}
implicitize : ∀ {A : Set} {B : A → Set} → ((x : A) → B x) → {{x : A}} → B x
implicitize f {{x}} = f x
data T : Set where
tt : T
test = explicitize (λ {{t : T}} → t)
|
-- Andreas, 2018-11-23, issue #3404, regression in Agda 2.5.4
--
-- The positivity checker judged postulates in mutual blocks
-- as constants, since it found no uses of its arguments.
--
-- The natural cure is to not unleash the positivity checker
-- onto things that do not have a definition, such as postulates.
open ... |
-- Andreas, 2014-09-02, reported by Nisse
-- {-# OPTIONS -v scope.mod.inst:30 #-}
record R : Set₁ where
field
A : Set
-- works : (A : R) → let open R A renaming (A to B) in B → B
-- works _ a = a
test : (A : R) → let open R A in A → A
test _ a = a
-- WAS:
-- Either the A introduced by the let should shadow t... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Monoid.BigOp where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.SIP
open import Cubical.Data.Nat using (ℕ ; zero ; suc)
open import Cubical.Data.FinData
open import Cubical.Algebra.Monoid.Base
private
... |
module _ {A : Set} (P : A → Set) where
postulate
bla : {x : A} {{_ : P x}} → Set → Set
test : {x : A} {{_ : P x}} → Set → Set
test B = bla B
|
module Issue4408 where
comp :
(A : Set)
(B : A → Set)
(C : (x : A) → B x → Set) →
((x : A) (y : B x) → C x y) →
(g : (x : A) → B x) →
((x : A) → C x (g x))
comp _ _ _ f g x = f x (g x)
data Unit : Set where
unit : Unit
P : Unit → Set
P unit = Unit
Q : Unit → Set → Set
Q unit = λ _ → Unit
f : (x : Uni... |
import Lvl
open import Type
module Type.Functions {ℓₗ : Lvl.Level}{ℓₒ₁}{ℓₒ₂} {X : Type{ℓₒ₁}} {Y : Type{ℓₒ₂}} where
open import Function.Domains
open import Type.Properties.Empty
open import Type.Properties.Singleton
record Bijective (f : X → Y) : Type{ℓₗ Lvl.⊔ ℓₒ₁ Lvl.⊔ ℓₒ₂} where
constructor intro
field
... |
------------------------------------------------------------------------
-- Parallel substitutions (defined using an inductive family)
------------------------------------------------------------------------
open import Data.Universe.Indexed
module deBruijn.Substitution.Data.Basics
{i u e} {Uni : IndexedUniverse i ... |
-- Andreas, 2019-08-19, issue #4007 reported by nad
-- The scope checker was not run in the TCEnv of the interaction meta.
-- Thus, the extended lambda was not inheriting the IsAbstract from
-- the AbstractMode of the meta, leading to checking the
-- extended lambda in the wrong ConcreteMode.
-- {-# OPTIONS -v intera... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Lemmas
open import Groups.Definition
open import Rings.Definition
open import Rings.Orders.Partial.Definition
open import Rings.Orders.Total.Definition
open import Rings.Lemmas
open import Setoids.Setoids
open import Seto... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Tutorials.Monday-Complete
open import Tutorials.Tuesday
open List using (List; []; _∷_; _++_)
open Vec using (Vec; []; _∷_; _!_)
open Fin using (Fin; zero; suc)
module Tutorials.Wednesday where
-----------
-- Interfaces, isomorphisms
-----------
module Isomorphism w... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- List-related properties
------------------------------------------------------------------------
-- Note that the lemmas below could be generalised to work with other
-- equalities than _≡_.
module Data.List.Pr... |
module container.m.extensionality where
open import sum
open import equality
open import container.core
open import container.fixpoint
open import container.equality
open import container.m.core
module Extensionality {li la lb}(c : Container li la lb) where
private
module C where
open Definition c public
... |
{-# OPTIONS --allow-unsolved-metas #-}
module fin where
open import Data.Fin hiding (_<_ ; _≤_ ; _>_ ; _+_ )
open import Data.Fin.Properties hiding (≤-trans ; <-trans ; ≤-refl ) renaming ( <-cmp to <-fcmp )
open import Data.Nat
open import Data.Nat.Properties
open import logic
open import nat
open import Relation... |
open import Level using (Level; suc; zero; _⊔_)
open import Function using (const)
open import Algebra
open import Algebra.Structures
open import Algebra.OrderedMonoid
open import Algebra.FunctionProperties as FunctionProperties using (Op₁; Op₂)
open import Data.Product using (_×_; _,_; proj₁; proj₂)
open import Relati... |
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
{-# OPTIONS --sized-types --guardedness #-}
open import Data.Nat
open import Data.Vec
open import Data.Product
open import Data.Sum
open import Data.Fin
open import Relation.Binary.PropositionalE... |
------------------------------------------------------------------------
-- A stream equality universe
------------------------------------------------------------------------
module Stream.Equality where
open import Codata.Musical.Notation
open import Stream hiding (_⋎_)
open import Stream.Programs
open import Relat... |
module sbconst2 where
open import Level renaming ( suc to succ ; zero to Zero )
open import Data.Nat
open import Data.Fin
open import Data.List
open import automaton
open import nfa
open import logic
open NAutomaton
open Automaton
open import Relation.Binary.PropositionalEquality hiding ( [_] )
open Bool
δconv : {... |
{-# OPTIONS --without-K #-}
module function where
open import function.core public
open import function.overloading public
open import function.isomorphism public
open import function.extensionality public
open import function.fibration public
|
{-# OPTIONS --copatterns #-}
{-# IMPORT Ex4Haskell #-}
{-# IMPORT System.IO #-}
module Ex4 where -- Conor: 8/20
{- I'm sorry I haven't quite finished setting this exercise yet, but by
the joy of version control, the rest of it can be merged in later
(quite soon). At least you can get cracking: I promise not to ... |
------------------------------------------------------------------------------
-- The gcd program is correct
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-... |
-- When checking pattern coverage we might end up having to split
-- on a dot pattern (if the individual clauses split differently).
-- This is fine as long as the dot pattern is on constructor form.
module SplitOnDotPattern where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data Vec (A : Set) : Nat -> Set ... |
{-# OPTIONS --safe #-}
module Issue2487-3 where
import Issue2487.B
|
{-# OPTIONS --without-K #-}
module Common.Unit where
open import Agda.Builtin.Unit public renaming (⊤ to Unit; tt to unit)
|
-- Andreas, 2017-03-01 issue #2480, reported by nad, discovered by simonhu
-- Exploit by Jesper Cockx
-- {-# OPTIONS -v tc.lhs.split:60 #-}
open import Agda.Builtin.Equality
data Bool : Set where
tt ff : Bool
const : Bool → (Bool → Bool)
const = λ x _ → x
ap : {A : Set} {B : Set} (f : A → B) {a b : A} (p : a ≡ b... |
-- Andreas, 2014-05-02
-- Epic issue by Nisse and Andrea Vezzosi
record R : Set₁ where
field
A : Set
postulate
X : R
x : R.A X
Y : R
Y = X
record S : Set where
field
G : R.A Y -- Works if Y is replaced by X.
s : S
s = record { G = x }
-- This crashed epic with an internal error.
-- Expected beha... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Abelian.Instances.Terminal where
open import Cubical.Foundations.Prelude
open import Cubical.Categories.Abelian.Base
open import Cubical.Categories.Additive.Instances.Terminal
open import Cubical.Data.Unit
private
variable
ℓ : Level
private
open PreAbCategor... |
{-# OPTIONS --safe --warning=error #-}
open import Sets.EquivalenceRelations
open import Functions.Definition
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_; Setω)
open import Setoids.Setoids
open import Groups.Definition
open import LogicalFormulae
open import Orders.WellFounded.Definition
open import Numb... |
------------------------------------------------------------------------------
-- Conversion rules for the greatest common divisor
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univer... |
module sortedLists where
open import lib
{- we use internal verification to define a datatype of sorted lists
of natural numbers, where typing ensures that the lists are truly
sorted in non-decreasing order.
A list of type (sortedList n) is sorted and guaranteed to have
all its data greater tha... |
-- Andreas, 2016-06-01, issue 1997 reported by Andres
{-# OPTIONS --rewriting #-}
infix 4 _≡_
infixl 6 _+_
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
{-# BUILTIN REWRITE _≡_ #-}
cong : ∀ {a b} {A : Set a} {B : Set b}
(f : A → B) {x y} → x ≡ y → f x ≡ f y
cong f refl = refl
data ℕ : ... |
open import Relation.Binary.Core
module Mergesort.Impl2.Correctness.Order {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Data.List
open import Function using (_∘_)
open import List.Sorted _≤_
open import Mergesort.Impl2 _≤_ tot≤
open import OList _≤_
open impor... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Functor
module Categories.Diagram.Limit.Properties
{o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} where
open import Function.Equality using (Π)
open import Relation.Binary using (Setoid)
open import Ca... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.