text stringlengths 4 690k |
|---|
{- Name: Bowornmet (Ben) Hudson
-- define the source language from the paper
-}
open import Preliminaries
open import Preorder-withmax
module Proofs where
-- define the source language from the paper
-- we want to focus on arrow, cross, and nat types
data Tp : Set where
unit : Tp
nat : Tp
susp : ... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommSemiring.Instances.UpperNat where
{-
based on:
https://github.com/DavidJaz/Cohesion/blob/master/UpperNaturals.agda
and the slides here (for arithmetic operation):
https://felix-cherubini.de/myers-slides-II.pdf
-}
open import Cubical.Foundations.Prelude
open im... |
{-# OPTIONS --without-K #-}
open import HoTT
{- Proof that if [A] and [B] are two propositions, then so is [A * B]. -}
module homotopy.PropJoinProp
{i} (A : Type i) {pA : (a a' : A) → a == a'}
{j} (B : Type j) {pB : (b b' : B) → b == b'} where
{-
We first prove that [left a == y] for all [a : A] and [y : A * B]... |
module Issue448 where
postulate
Unit : Set
unit : Unit
D : Set → Set
d : (A : Set) → A → D A
record R : Set₁ where
field F : Set
r : _
r = record { F = Unit }
postulate
D′ : R.F r → D (R.F r) → Set
d′ : ∀ f τ → D′ f (d _ τ)
data D″ (f : Unit) : D′ f (d Unit unit) → Set where
d″ : ∀ (x : Unit) → D″ ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Names used in the reflection machinery
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Reflection.Name where
open import Data.List.Base
import... |
import Agda.Builtin.FromNat as FromNat -- not opened
open import Agda.Builtin.Nat
-- Since fromNat is not in scope unqualified this should work without
-- a Number instance for Nat.
x : Nat
x = 0
-- Renaming fromNat should not make a difference
open FromNat renaming (fromNat to fromℕ)
open import Agda.Builtin.Unit
... |
-- Andreas, 2020-06-23, issue #4773
-- reported by gallais, originally reported on mailing list by mechvel
-- Regression in 2.5.1:
-- import directives applied to modules no longer warn
-- when private names are mentioned
-- {-# OPTIONS -v scope:40 #-}
module _ where
-- MWE:
-------
module M where
private
X ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties satisfied by strict partial orders
------------------------------------------------------------------------
open import Relation.Binary
module Relation.Binary.Properties.StrictTotalOrder
{s₁ s... |
open import Nat
open import Prelude
open import core
module lemmas-progress-checks where
-- boxed values don't have an instruction transition
boxedval-not-trans : ∀{d d'} → d boxedval → d →> d' → ⊥
boxedval-not-trans (BVVal VConst) ()
boxedval-not-trans (BVVal VLam) ()
boxedval-not-trans (BVArrCast x bv) (IT... |
module UnderscoresAsDataParam where
data List (A : Set) : Set where
nil : List _
cons : A -> List A -> List _
|
module PartialOrder where
open import Prelude
record PartialOrder (A : Set) : Set1 where
field
_==_ : A -> A -> Set
_≤_ : A -> A -> Set
==-def : forall {x y} -> (x == y) ⇐⇒ (x ≤ y) ∧ (y ≤ x)
≤-refl : forall {x} -> x ≤ x
≤-trans : forall {x y z} -> x ≤ y -> y ≤ z -> x ≤ z
module POrder... |
------------------------------------------------------------------------
-- Type checing of polymorphic and iso-recursive lambda terms
------------------------------------------------------------------------
module SystemF.TypeCheck where
open import Data.Fin using (Fin; suc; zero; pred)
open import Data.Nat as Nat u... |
{-# OPTIONS --without-K --safe #-}
open import Polynomial.Parameters
open import Algebra
module Polynomial.NormalForm.Operations
{a ℓ}
(coeffs : RawCoeff a ℓ)
where
open import Polynomial.Exponentiation (RawCoeff.coeffs coeffs)
open import Data.Nat as ℕ using (ℕ; suc; zero; compare)
open import Data.... |
{-
Constructing List ErrorPart from format strings. Supported formats
%s : String
%d : Nat
%t : Term
%n : Name
%e : List ErrorPart
Examples at the bottom.
-}
module Tactic.Reflection.Printf where
open import Prelude
open import Prelude.Variables
open import Builtin.Reflection
private
data Format (A ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Bundles for homogeneous binary relations
------------------------------------------------------------------------
-- The contents of this module should be accessed via `Relation.Binary`.
{-# OPTIONS --without-K... |
------------------------------------------------------------------------
-- Indexed containers
------------------------------------------------------------------------
-- Some parts are based on "Indexed containers" by Altenkirch, Ghani,
-- Hancock, McBride and Morris (JFP, 2015).
{-# OPTIONS --sized-types #-}
modul... |
module Utilities.ExistsSyntax where
open import Level using (Level ; _⊔_)
open import Data.Product using (Σ)
variable
a b : Level
A : Set a
B : Set b
∃-syntax : (A : Set a) → (A → Set b) → Set (a ⊔ b)
∃-syntax = Σ
syntax ∃-syntax A (λ x → B) = ∃ x ∶ A • B
|
------------------------------------------------------------------------
-- An example showing how Container.Tree-sort can be used
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Container.Tree-sort.Example
{c⁺} (eq : ∀ {a p} →... |
------------------------------------------------------------------------
-- Inversion of (sub)typing in Fω with interval kinds
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module FOmegaInt.Typing.Inversion where
open import Data.Product using (_,_; proj₁... |
{-# OPTIONS --safe #-}
module Cubical.Data.FinSet.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Structure
open import Cubical.Foundations.Equiv
open import Cubical.HITs.PropositionalTruncation
open import Cubical.Data.Nat
open import Cubic... |
open import Haskell.Prim
open import Agda.Builtin.Nat
data _≤_ : Nat → Nat → Set where
instance
zero-≤ : ∀ {n} → zero ≤ n
suc-≤ : ∀ {m n} → @0 {{m ≤ n}} → suc m ≤ suc n
data Tree {l u : Nat} : Set where
Leaf : @0 {{l ≤ u}} → Tree {l} {u}
Node : (x : Nat) → Tree {l} {x} → Tree {x} {u} → Tree {l} {u}
{-... |
module Serializer.Bool where
open import Data.Bool
open import Data.Fin hiding (_+_)
open import Data.Nat
open import Relation.Binary
open import Relation.Binary.EqReasoning
open import Relation.Binary.PropositionalEquality using (_≡_ ; refl ; cong ; setoid )
import Relation.Binary.Indexed as I
open import Function.Eq... |
module Fail.QualifiedRecordProjections where
record Test (a : Set) : Set where
field
one : a
{-# COMPILE AGDA2HS Test #-}
|
{-# OPTIONS --instance-search-depth=10 #-}
module _ where
module _
{A : Set}
(B₁ : A → Set)
(B₂ : A → Set)
(f : A → A)
where
type = ∀ {x : A} → B₁ x → B₂ (f x)
record Class : Set where field method : type
method : {{_ : Class}} → type
method {{I}} = Class.method I
id : ∀ {A : Set} → A → A
id x = x
... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Setoids
open import Rings.Definition
open import Rings.Ideals.Definition
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
module Rings.Ideals.Maximal.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_... |
module Utilities.VecSplit where
-- Standard libraries imports ----------------------------------------
open import Data.Nat using (ℕ ; _+_)
open import Data.Vec using (Vec ; _++_)
open import Relation.Binary.PropositionalEquality
using (_≡_)
open import Relation.Binary.HeterogeneousEquality
using (_≅_)
----------... |
{-# OPTIONS --allow-unsolved-metas #-}
module x05-842Isomorphism-hc where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; cong-app; sym; subst) -- added last
open Eq.≡-Reasoning
open import Data.Nat u... |
module 010-false-true where
-- In Agda, types are theorems, and instances of types are proofs. The
-- simplest theorem is the theorem which has no proof, and is useful
-- to represent any contradictory situation. We declare False as an
-- algebraic data type without constructors. If "False" has no
-- constructors, the... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.Groups.KleinBottle where
open import Cubical.ZCohomology.Base
open import Cubical.ZCohomology.GroupStructure
open import Cubical.ZCohomology.Properties
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Prelude
open... |
{-# OPTIONS --cubical #-}
module Cubical.Codata.Everything where
open import Cubical.Codata.EverythingSafe public
--- Modules making assumptions that might be incompatible with other
-- flags or make use of potentially unsafe features.
-- Assumes --guardedness
open import Cubical.Codata.Stream public
open import C... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Instances.Poset where
open import Cubical.Foundations.Prelude
open import Cubical.Relation.Binary.Poset
open import Cubical.Categories.Category
open Category
private
variable
ℓ ℓ' : Level
module _ (P : Poset ℓ ℓ') where
open PosetStr (snd P)
PosetCatego... |
open import FRP.JS.Bool using ( Bool ; true ; false )
module FRP.JS.Maybe where
-- Data.Maybe doesn't have bindings for JavaScript, so we define Maybe here.
-- We'd like to use JavaScript's built-in null as the
-- representation of nothing, and use x as the representation of just
-- x. Unfortunately this doens't wo... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Algebra.Signature
module Fragment.Algebra.Homomorphism.Base (Σ : Signature) where
open import Fragment.Algebra.Algebra Σ
open import Fragment.Algebra.Homomorphism.Definitions Σ
open import Fragment.Setoid.Morphism as Morphism
hiding (id; ∣_∣; ∣... |
module CategoryTheory.CartesianStrength where
open import CategoryTheory.Categories
open import CategoryTheory.Functor
open import CategoryTheory.BCCCs.Cartesian
open import CategoryTheory.Monad
open import CategoryTheory.Comonad
-- Type class for Cartesian functors
record CartesianFunctor {n}
{ℂ : Category ... |
module Example where
open import Agda.Builtin.Nat
open import Agda.Builtin.List
open import Agda.Builtin.Equality
downFrom : Nat → List Nat
downFrom zero = []
downFrom (suc n) = n ∷ downFrom n
sum-rec : List Nat → Nat
sum-rec [] = 0
sum-rec (x ∷ xs) = x + sum-rec xs
sum-acc : Nat → List Nat → Nat
sum-acc ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Agda.ISetoids.Cocomplete where
open import Level
open import Relation.Binary using (Setoid; module Setoid; Preorder; module Preorder; Rel; _=[_]⇒_)
open import Data.Product using (Σ; _,_)
-- import Relation.Binary.EqReasoning as EqReasoning
open import Categor... |
{-# OPTIONS --without-K #-}
module distinct where
open import Type
open import Type.Identities
open import Algebra.FunctionProperties.Eq
renaming (Injective to is-injective)
open import Function.NP
open import Function.Extensionality
open import Data.Fin.NP using (Fin; Fin▹ℕ; _==_)
open import Data.Vec.N... |
unquoteDef x = ?
|
module Helper.Fin where
open import Data.Fin hiding (_+_)
open import Data.Nat
open import Relation.Binary.PropositionalEquality
open import Relation.Nullary
open import Relation.Nullary.Negation
------------------------------------------------------------------------
-- Fin magic
------------------------------------... |
{-
Copyright 2019 Lisandra Silva
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
-- [Subtype] is defined in lib.NType.
module lib.types.Subtype where
infix 40 _⊆_
_⊆_ : ∀ {i j₁ j₂} {A : Type i} → SubtypeProp A j₁ → SubtypeProp A j₂
→ Type (lmax i (lmax j₁ j₂))
P₁ ⊆ P₂ = ∀ a → SubtypeProp.prop P₁ a → SubtypeP... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Foundations.Pointed.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Sigma
open import Cubical.Foundat... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category using (Category; module Commutation)
open import Categories.Category.Monoidal.Core using (Monoidal)
open import Categories.Category.Monoidal.Symmetric using (Symmetric)
-- Extra identities that hold only for symmetric monoidal categories.
module Cate... |
-- This code is based on https://github.com/agda/agda-stdlib/pull/800/files
{-# OPTIONS --without-K --safe #-}
module Experiment.Categories.Solver.Category.Reflection where
open import Data.Nat
open import Data.List
open import Data.Maybe using (Maybe; nothing; just; maybe)
open import Data.Product
open import Data.... |
-- Basic intuitionistic propositional calculus, without ∨ or ⊥.
-- Hilbert-style formalisation of closed syntax.
-- Nested terms.
module BasicIPC.Syntax.ClosedHilbert where
open import BasicIPC.Syntax.Common public
-- Derivations.
infix 3 ⊢_
data ⊢_ : Ty → Set where
app : ∀ {A B} → ⊢ A ▻ B → ⊢ A → ⊢ B
ci ... |
{-# OPTIONS --without-K #-}
module algebra.monoid.core where
open import level
open import algebra.semigroup
open import equality.core
open import sum
record IsMonoid {i} (M : Set i) : Set i where
field
instance sgrp : IsSemigroup M
open IsSemigroup sgrp public
field
e : M
lunit : (x : M) → e * x ... |
module Nats.Add.Assoc where
open import Equality
open import Nats
open import Function
------------------------------------------------------------------------
-- internal stuffs
private
a+/b+c/=/a+b/+c : ∀ a b c → a + b + c ≡ a + (b + c)
a+/b+c/=/a+b/+c zero b c = refl
a+/b+c/=/a+b/+c (suc a) b c = cong s... |
{- 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 Optics.All
open import LibraBFT.Prelude
open import LibraBFT... |
{-# OPTIONS --without-K #-}
data D : Set where
@0 c : D
data P : D → Set where
d : P c
|
------------------------------------------------------------------------
-- Unary relations
------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K ... |
open import Prelude
open import Nat
module contexts where
-- variables are named with naturals in ė. therefore we represent
-- contexts as functions from names for variables (nats) to possible
-- bindings.
_ctx : Set → Set
A ctx = Nat → Maybe A
-- convenient shorthand for the (unique up to fun. ext.) emp... |
{-# OPTIONS --cubical --safe #-}
open import Algebra
module Algebra.Construct.OrderedMonoid {ℓ} (monoid : Monoid ℓ) where
open import Prelude
open import Relation.Binary
open import Path.Reasoning
open Monoid monoid
infix 4 _≤_ _≥_ _<_ _>_
_≤_ : 𝑆 → 𝑆 → Type ℓ
x ≤ y = ∃ z × (y ≡ x ∙ z)
_<_ : 𝑆 → 𝑆 → Type ℓ
x ... |
{-# OPTIONS --without-K #-}
open import lib.Basics
module lib.types.Empty where
⊥ = Empty
⊥-elim : ∀ {i} {A : ⊥ → Type i} → ((x : ⊥) → A x)
⊥-elim = Empty-elim
Empty-rec : ∀ {i} {A : Type i} → (Empty → A)
Empty-rec = Empty-elim
⊥-rec : ∀ {i} {A : Type i} → (⊥ → A)
⊥-rec = Empty-rec
Empty-is-prop : is-prop Empty
... |
module UnequalSorts where
data One : Set where one : One
data One' : Set1 where one' : One'
err : One
err = one'
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Functor.Bifunctor
module Categories.Diagram.Wedge {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {D : Category o′ ℓ′ e′}
(F : Bifunctor (Category.op C) C D) where
private
module C = Category C
module D = Category D
open D
open... |
-- Andreas, 2016-10-11, AIM XXIV, issue #2248
-- COMPILED_TYPE should only work on postulates
data Unit : Set where
unit : Unit
postulate
IO : Set → Set
{-# BUILTIN IO IO #-}
{-# COMPILE GHC IO = type IO #-}
abstract
IO' : Set → Set
IO' A = A
doNothing : IO' Unit
doNothing = unit
{-# COMPILE GHC IO' =... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Numbers.Naturals.Naturals
open import Numbers.Naturals.EuclideanAlgorithm
open import Semirings.Definition
open import Orders.Total.Definition
module Numb... |
-- 2011-09-15 by Nisse
-- {-# OPTIONS -v tc.lhs.unify:15 #-}
module Issue292-17 where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
record Σ (A : Set) (B : A → Set) : Set where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σ
postulate
I : Set
U : I → Set
El : ∀ {i} → U i → Set... |
{-# OPTIONS --safe --cubical #-}
module Prelude where
open import Level public
open import Data.Sigma public
open import Function.Fiber public
open import Data.Empty public
open import Data.Unit public
open import Data.Nat public
using (ℕ; suc; zero)
open import Data.Bool public
using (Bool; true; false; bool; if... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Various forms of induction for natural numbers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Nat.Induction where
open import Function
o... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
import Categories.Category.Monoidal as M
-- Properties of Monoidal Categories
module Categories.Category.Monoidal.Properties
{o ℓ e} {C : Category o ℓ e} (MC : M.Monoidal C) where
open import Data.Product using (_,_; Σ; uncurry′)
open Category C
o... |
module NoSuchBuiltinName where
postulate X : Set
{-# BUILTIN FOOBAR X #-}
|
-- Andreas, 2020-06-24, issue #4775 reported by JakobBruenker
-- Non-record patterns in lets and lambdas lead to internal error
-- {-# OPTIONS -v tc.term.lambda:30 #-}
-- {-# OPTIONS -v tc.lhs:15 #-}
-- {-# OPTIONS -v tc.term.let.pattern:30 #-}
-- -- {-# OPTIONS -v tc.term.let.pattern:80 #-}
open import Agda.Builtin.... |
-- This file defines the Euclidean Domain structure.
{-# OPTIONS --without-K --safe #-}
module EuclideanDomain where
-- We comply to the definition format in stdlib, i.e. define an
-- IsSomething predicate then define the bundle.
open import Relation.Binary using (Rel; Setoid; IsEquivalence)
module Structures
... |
------------------------------------------------------------------------
-- Some results related to an LTS from Section 6.2.5 of "Enhancements
-- of the bisimulation proof method" by Pous and Sangiorgi,
-- implemented using the coinductive definition of bisimilarity
-----------------------------------------------------... |
open import Relation.Binary.Core
module SelectSort.Everything {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_)
(trans≤ : Transitive _≤_) where
open import SelectSort.Correctness.Order _≤_ tot≤ trans≤
open import SelectSort.Correctness.Permutation _≤_ tot≤
|
------------------------------------------------------------------------
-- Trees
------------------------------------------------------------------------
-- This example is based on one in Wadler's "A prettier printer".
{-# OPTIONS --guardedness #-}
module Examples.Tree where
open import Codata.Musical.Notation
op... |
open import Agda.Primitive
open import Agda.Builtin.Equality renaming (_≡_ to _==_) --(( If I want to rename the built-in equality ))
-- What follows is an attempt to formalize multicategories. For this purpose, we also need to define lists, since the source of a multimap in a multicategory is a list.
-- For the mom... |
module NotLinearPat where
data Nat : Set where
zero : Nat
succ : Nat -> Nat
bad : Nat -> Nat -> Nat
bad x x = zero
bad x y = succ zero
|
------------------------------------------------------------------------
-- agda-misc
-- All modules
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module AgdaMiscEverything where
------------------------------------------------------------------------
-- ... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommAlgebra.Ideal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Powerset
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.CommRing.Ideal renaming (IdealsIn to IdealsInCommRing;
... |
-- Copyright: (c) 2016 Ertugrul Söylemez
-- License: BSD3
-- Maintainer: Ertugrul Söylemez <esz@posteo.de>
module Algebra.Group.Monoid where
open import Algebra.Category
open import Algebra.Group.Semigroup
open import Core
-- A monoid is a semigroup with an identity element.
record IsMonoid {a r} (S : Semigrou... |
open import Agda.Primitive
open import Semigroup
module Monoid where
record Σ {a b} (A : Set a) (B : A → Set b) : Set (a ⊔ b) where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
Σ-syntax : ∀ {a b} (A : Set a) → (A → Set b) → Set (a ⊔ b)
Σ-syntax = Σ
syntax Σ-syntax A (λ x → B) = Σ[ x ∈... |
{-# OPTIONS --cubical-compatible --rewriting --confluence-check #-}
open import Issue1719.Common
open import Issue1719.Spans
open import Issue1719.Pushouts
module _ {d : Span} {l} {P : Pushout d → Set l}
(left* : (a : Span.A d) → P (left a))
(right* : (b : Span.B d) → P (right b))
(glue* : (c : Span.C d) → lef... |
-- Andreas, 2017-05-17, issue #2574 reported by G. Allais
-- This module is intentionally without name.
module _ where
private
postulate A : Set
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Instantiates the ring solver with two copies of the same ring with
-- decidable equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import A... |
import Lvl
open import Structure.Operator.Vector
open import Structure.Setoid
open import Type
module Structure.Operator.Vector.Subspaces.DirectSum
{ℓᵥ ℓₛ ℓᵥₑ ℓₛₑ}
{V : Type{ℓᵥ}} ⦃ equiv-V : Equiv{ℓᵥₑ}(V) ⦄
{S : Type{ℓₛ}} ⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄
{_+ᵥ_ : V → V → V}
{_⋅ₛᵥ_ : S → V → V}
{_+ₛ_ _⋅ₛ_ : ... |
-- {-# OPTIONS -v tc.with:100 #-}
module Issue818 where
data ⊤ : Set where
tt : ⊤
Foo : {x : ⊤} → Set₁
Foo with tt
Foo {x = _} | tt = Set
-- Panic: wrong number of arguments in with clause: given 1, expected
-- 0
-- when checking that the clause
-- Foo with tt
-- Foo {x = _} | tt = Set
-- has type {⊤} → Set₁
-- T... |
open import Algebra.Apartness using (HeytingField)
module Data.Real.Abstract.Structures {c ℓ₁ ℓ₂} (f : HeytingField c ℓ₁ ℓ₂) where
open HeytingField f
open import Relation.Binary using (Rel; IsStrictTotalOrder)
open import Level using (_⊔_)
open import Data.Product using (_×_; ∃-syntax)
import Data.Nat as ℕ
open ℕ ... |
-- Proof of: ∀ (x : ND ℕ) → always (even (double (eo x))) ≡ tt
module even-double-eo where
open import bool
open import nat
open import eq
open import nat-thms
open import nondet
open import nondet-thms
open import functions
----------------------------------------------------------------------
-- A definition of d... |
{-# OPTIONS --without-K --safe #-}
open import Polynomial.Parameters
module Polynomial.Solver
{c r₁ r₂ r₃}
(homo : Homomorphism c r₁ r₂ r₃)
where
open import Data.Vec as Vec using (Vec)
open import Polynomial.Expr public
open import Algebra.Solver.Ring.AlmostCommutativeRing
open Homomorphism homo
open Eval ho... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Product.Relation.Binary.Pointwise.Dependent directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
mo... |
module WellScopedTerms where
open import Library
open import Categories
open import Functors
open import Categories.Sets
open import Functors.Fin hiding (lift)
open import RMonads
open import Relation.Binary.HeterogeneousEquality
open Cat
open Fun
data Tm : ℕ → Set where
var : ∀{n} → Fin n → Tm n
lam : ∀{n} → Tm ... |
{-# OPTIONS --rewriting #-}
{-# OPTIONS --confluence-check #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
record R : Set where
eta-equality
constructor c
R' = R
postulate
D : Set
d : D
f : R' → D -- = R → D
x : R
r : f x ≡ d
{-# REWRITE r #-}
-- SUCCEEDS:
_ : ... |
------------------------------------------------------------------------
-- "Lenses" defined using bijections
------------------------------------------------------------------------
{-# OPTIONS --cubical --safe #-}
import Equality.Path as P
module Lens.Non-dependent.Bijection
{e⁺} (eq : ∀ {a p} → P.Equality-with-... |
module STLCRef.Semantics where
-- This file contains the definitional interpreter for STLC+Ref
-- described in Section 3 of the paper.
open import Agda.Primitive
open import Data.Unit
open import Data.Nat hiding (_⊔_ ; _^_)
open import Data.Integer hiding (_⊔_)
open import Data.List
open import Data.List.Properties.E... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Functions.Definition
open import Groups.Definition
open import Sets.EquivalenceRelations
open import Groups.Homomorphisms.Definition
module Groups.Homomorphisms.Examples where
identityHom : {a b : _} {A : Set a} {S : Setoid {a... |
module RMonads.Restriction where
open import Library
open import Categories
open import Functors
open import Naturals
open import Monads
open import RMonads
open Cat
open Fun
restrictM : ∀{a b c d}{C : Cat {a}{b}}{D : Cat {c}{d}}(J : Fun C D) →
Monad D → RMonad J
restrictM J M = record {
T = T ∘ OM... |
------------------------------------------------------------------------
-- Pure type systems (PTS)
------------------------------------------------------------------------
-- This file contains some core definitions which are reexported by
-- Pts.Typing
module Pts.Core where
open import Data.Fin.Substitution.Typed
... |
-- Andreas, 2016-02-09, issue reported by Anton Setzer
-- {-# OPTIONS -v tc.conv.infer:30 -v tc.deftype:30 #-}
{-# OPTIONS --allow-unsolved-metas #-}
data ⊥ : Set where
data MaybeSet : Set₁ where
nothing : MaybeSet
just : Set → MaybeSet
-- not injective
FromJust : MaybeSet → Set
FromJust nothing = ⊥
FromJust (j... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Cocones where
open import Level
open import Categories.Category
open import Categories.Functor hiding (_∘_; _≡_; equiv; id; assoc; identityˡ; identityʳ; ∘-resp-≡)
open import Categories.Cocone
record CoconeMorphism {o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J :... |
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
record R : Set₁ where
field
fun : (A : Set) → A → Bool → A ≡ Bool → Bool
rule : ∀ x → fun Bool false x refl ≡ false
open R
test : R
fun test .Bool true true refl = true
fun test _ _ _ _ = false
rule test x = refl
|
module Data.Vec.Any.Membership.Properties where
open import Relation.Binary
open import Data.Vec
module SingleSetoid {a ℓ} (S : Setoid a ℓ) where
open Setoid S renaming (Carrier to A)
open import Data.Vec.Any
open import Data.Vec.Any.Membership S
open import Function using (flip)
open import Data.... |
open import MLib.Algebra.PropertyCode
open import MLib.Algebra.PropertyCode.Structures
module MLib.Matrix.Pow {c ℓ} (struct : Struct bimonoidCode c ℓ) where
open import MLib.Prelude
open import MLib.Matrix.Core
open import MLib.Matrix.Equality struct
open import MLib.Matrix.Mul struct
open import MLib.Matrix.Plus str... |
------------------------------------------------------------------------------
-- Common stuff used by the gcd example
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorph... |
{-# OPTIONS --without-K #-}
open import HoTT
open import lib.cubical.elims.CubeMove
module lib.cubical.elims.CofWedge where
cof-wedge-path-rec : ∀ {i j k l}
{X : Ptd i} {Y : Ptd j} {C : Type k} {D : Type l}
{f : X ∨ Y → C} {d₁ d₂ : D}
→ (p : d₁ == d₂)
→ (q : C → d₁ == d₂)
→ ((x : fst X) → p == q (f (winl x... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Functor.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Sigma
open import Cubical.Categories.Category
private
variable
ℓC ℓC' ℓD ℓD' : Level
record Functor (C : Category ℓC ℓC') (D : Category ℓD ℓD') :
Type (ℓ-max (ℓ-max ℓC... |
module STLC.Kovacs.PresheafRefinement where
open import STLC.Kovacs.Substitution public
open import STLC.Kovacs.Normalisation public
open import Category
--------------------------------------------------------------------------------
-- (Tyᴺ-idₑ)
idacc : ∀ {A Γ} → (a : Γ ⊩ A)
→ acc idₑ a ≡ a
idacc... |
------------------------------------------------------------------------
-- A combinator for running two (independent) computations in sequence
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Delay-monad.Sequential where
open import Equality.Propositional... |
{-# OPTIONS --universe-polymorphism --guardedness #-}
-- {-# OPTIONS --verbose tc.constr.findInScope:15 #-}
-- {-# OPTIONS --verbose tc.meta.eta:20 #-}
-- {-# OPTIONS --verbose tc.conv.term:20 #-}
-- {-# OPTIONS --verbose tc.meta.assign:70 #-}
-- {-# OPTIONS --verbose tc.eta.rec:70 #-}
-- {-# OPTIONS --verbose tc.sig.i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.