text stringlengths 4 690k |
|---|
-- {-# OPTIONS -v tc.meta:20 #-}
-- Agdalist 2010-09-24 David Leduc
module Issue323 where
data Sigma (A : Set)(B : A -> Set) : Set where
_,_ : (a : A) -> B a -> Sigma A B
data Trivial {A : Set}(a : A) : Set where
trivial : Trivial a
lemma : (A : Set)(x y : A) -> Trivial (x , y)
lemma A x y = trivial |
import Lvl
open import Type
module Type.Functions.Inverse {ββ : Lvl.Level}{βββ}{βββ} {X : Type{βββ}} {Y : Type{βββ}} where
open import Function.Domains
open import Type.Functions {ββ}{βββ}{βββ} {X}{Y}
open import Type.Properties.Empty
open import Type.Properties.Singleton {βββ}{βββ}
inv : (f : X β Y) β β¦ _ : Bi... |
module Issue2486.HaskellB where
{-# FOREIGN GHC import qualified MAlonzo.Code.Issue2486.ImportB as B #-}
{-# FOREIGN GHC
data Test = Con B.BBool
#-}
|
module FreeVarPresheaves where
open import Data.Nat as Nat
import Level
open import Categories.Category
open import Categories.Presheaf
open import Relation.Binary.Core
open import Relation.Binary
open import Function using (flip)
module DTO = DecTotalOrder Nat.decTotalOrder
data β-β€-eq {n m : β} : Rel (n β€ m) Level... |
-- Andreas, 2015-08-27 Allow rewrite rules for symbols defined in other file
{-# OPTIONS --rewriting #-}
open import Common.Nat
open import Common.Equality
{-# BUILTIN REWRITE _β‘_ #-}
x+0 : β x β x + 0 β‘ x
x+0 zero = refl
x+0 (suc x) rewrite x+0 x = refl
{-# REWRITE x+0 #-} -- adding rewrite rule for + is ok
x+0... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- A universe which includes several kinds of "relatedness" for sets,
-- such as equivalences, surjections and bijections
------------------------------------------------------------------------
{-# OPTIONS --witho... |
{-
An experiment of transporting rev-++-distr from lists to lists where
the arguments to cons have been flipped inspired by section 2 of
https://arxiv.org/abs/2010.00774
Note that Agda doesn't care about the order of constructors so we
can't do exactly the same example.
-}
{-# OPTIONS --cubical --no-import-sorts --s... |
-- {-# OPTIONS -v tc.meta:100 #-}
-- Andreas, 2011-04-20
-- see Abel Pientka TLCA 2011
module PruningNonMillerPattern where
data _β‘_ {A : Set}(a : A) : A -> Set where
refl : a β‘ a
data Nat : Set where
zero : Nat
suc : Nat -> Nat
-- bad variable y in head position
test : let X : Nat -> Nat -> Nat
X ... |
module BTree.Equality.Properties {A : Set} where
open import BTree {A}
open import BTree.Equality {A}
open import Relation.Binary.Core
transβ : Transitive _β_
transβ βlf βlf = βlf
transβ (βnd x x' lβr lβl' l'βr') (βnd .x' x'' _ l'βl'' l''βr'') = βnd x x'' lβr (transβ lβl' l'βl'') l''βr''
symmβ : Symmetric _β_
sym... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Ring where
open import Cubical.Algebra.Ring.Base public
open import Cubical.Algebra.Ring.Properties public
|
{-# OPTIONS --cubical --safe #-}
open import Prelude
open import Algebra
module Data.Maybe.Monoid {β} (sgr : Semigroup β) where
open import Data.Maybe
open Semigroup sgr
_Β«βΒ»_ : Maybe π β Maybe π β Maybe π
nothing Β«βΒ» y = y
just x Β«βΒ» nothing = just x
just x Β«βΒ» just y = just (x β y)
maybeMonoid : Monoid β
may... |
{- Copyright Β© 2015 Benjamin Barenblat
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 writing, so... |
postulate
foo : Set
bar : Set
baz : Set β Set
baz fooo = Fooo
|
{-# OPTIONS --without-K --safe #-}
module Dodo.Unary.Union where
-- Stdlib imports
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_β‘_; cong)
open import Level using (Level; _β_)
open import Function using (_β_; _ββ_)
open import Data.Sum using (_β_; injβ; injβ; swap)
open import Data.Product using ... |
module Recutter where
open import Basics
open import All
open import Cutting
open import Perm
module RECUTTER {I}(C : I |> I) where
open _|>_
CutKit : (I -> Set) -> Set
CutKit P = (i : I)(c : Cuts C i) -> P i -> All P (inners C c)
Subs : List I -> Set
Subs = All (\ i -> One + Cuts C i)
subCollect : (is... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Substitution.Conversion {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.LogicalRelation.Irrelevance
open import Definition.LogicalRelation.Properties
open import Definition.Logic... |
module Abstract where
abstract
f
: {A : Set}
β A
β A
f x
= x
g
: {A : Set}
β A
β A
g x
= x
h
: {A : Set}
β A
β A
h x
= f x
_
: {A : Set}
β A
β A
_
= Ξ» x β x
|
-- 2012-03-06 Andreas
-- Errors during printing of debug messages should not propagate to the
-- top level
{-# OPTIONS -v tc.meta.assign:10 #-}
module Issue578 where
-- Skipping import of Level will leave us with no level builtins
-- import Level
data D : Set where
-- This will generate a debug message, but it cann... |
-- Andreas, 2017-01-19, issue #2416, probably regression
-- Give failed for constrained size
-- {-# OPTIONS -v interaction.give:40 #-}
-- {-# OPTIONS -v tc.conv:10 #-}
-- {-# OPTIONS -v tc.conv.coerce:70 #-}
-- {-# OPTIONS -v tc.size:40 #-}
-- {-# OPTIONS -v tc.check.internal:40 #-}
open import Common.Size
open impor... |
open import Auto
open import Function using (const)
open import Data.Bool using (Bool; true; false)
open import Data.Bool.Show as Bool using ()
open import Data.List using (_β·_; [])
open import Data.Maybe
open import Data.Nat using (β; suc; zero)
open import Data.Nat.Show as Nat using ()
open import Data.String using (... |
module Peano where
data β : Set where
zero : β
suc : β β β
_+_ : β β β β β
zero + zero = zero
zero + n = n
(suc n) + m = suc (n + m)
data _even : β β Set where
ZERO : zero even
STEP : β x β x even β suc (suc x) even
proofβ : suc (suc (suc (suc zero))) even
proofβ = STEP (suc (suc z... |
{- Name: Bowornmet (Ben) Hudson
-- define the source language from the paper
-}
open import Preliminaries
open import Preorder-withmax
module Source-lang 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
su... |
------------------------------------------------------------------------
-- Lemmas related to application of substitutions
------------------------------------------------------------------------
open import Data.Universe.Indexed
module deBruijn.Substitution.Data.Application.Application222
{i u e} {Uni : IndexedUni... |
------------------------------------------------------------------------
-- Convenient syntax for relational reasoning using transitive
-- relations
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module Relation.Binary.TransReasoning where
open import Leve... |
open import Relation.Binary using (Preorder)
open import Relation.Binary.PropositionalEquality
open import Level
module Category.Monad.Monotone.State {β}(pre : Preorder β β β)(H : Preorder.Carrier pre β Set β) where
open Preorder pre renaming (Carrier to I; _βΌ_ to _β€_; refl to β€-refl; trans to β€-trans)
open import D... |
data Bool : Set where
true : Bool
false : Bool
record Eq (t : Set) : Set where
field _==_ : t β t β Bool
open Eq {{...}}
-- Now package this into a record type for "sets with boolean equality":
record EqSet : Setβ where
field
set : Set
instance eq : Eq set
open EqSet
equality : {{A : EqSet}} (x y... |
{-
Constant structure: _ β¦ A
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Relational.Constant where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.HLevels
open import Cubical.... |
{-# OPTIONS --without-K --exact-split --allow-unsolved-metas #-}
module 12-univalence where
import 11-function-extensionality
open 11-function-extensionality public
-- Section 10.1 Type extensionality
equiv-eq : {i : Level} {A : UU i} {B : UU i} β Id A B β A β B
equiv-eq {A = A} refl = pair id (is-equiv-id A)
UNIV... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Group.MorphismProperties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.HalfAdjoint
open import Cubical.Foundations.HLevels
op... |
module Bad where
data Bool : Set where
false : Bool
true : Bool
data Nat : Set where
zero : Nat
suc : Nat -> Nat
F : Bool -> Set
F false = Bool
F true = Nat
cast : {x : Bool} -> F x -> F x
cast a = a
not : Bool -> Bool
not true = false
not false = true
oops : Bool
oops = not (cast zero)
|
module _ where
open import Agda.Builtin.Reflection
open import Agda.Builtin.Bool
open import Agda.Builtin.Unit
open import Agda.Builtin.String
open import Common.Prelude
_<_ = primQNameLess
True : Bool β Set
True true = β€
True false = β₯
zzz aaa : β€
zzz = _
aaa = _
β₯-elim : {A : Set} β β₯ β A
β₯-elim ()
check : (x... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The reflexive, symmetric and transitive closure of a binary
-- relation (aka the equivalence closure).
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
... |
module Prelude.Int.Properties where
open import Prelude.Unit
open import Prelude.Nat
open import Prelude.Nat.Properties
open import Prelude.Number
open import Prelude.Equality
open import Prelude.Int.Core
open import Prelude.Smashed
open import Prelude.Ord
open import Prelude.Semiring
open import Prelude.Function
--... |
module Luau.Type where
open import FFI.Data.Maybe using (Maybe; just; nothing)
data Type : Set where
nil : Type
_β_ : Type β Type β Type
none : Type
any : Type
number : Type
_βͺ_ : Type β Type β Type
_β©_ : Type β Type β Type
src : Type β Type
src nil = none
src (S β T) = S
src none = none
src any = any
... |
module NumeralNaturalProofs where
open NumeralNatural
open Structure
open Structure.Function'.Properties
open Structure.Relator
open Structure.Relator.Properties
[β©]-inductive : Proof(ββ(a β¦ ββ(b β¦ (Inductive(a) β§ Inductive(b)) βΆ Inductive(a β© b))))
[β©]-inductive =
([β].intro (\{a}... |
module Cats.Category.Sets where
open import Data.Product using (Ξ£ ; _Γ_ ; projβ ; projβ)
open import Level
open import Relation.Binary using (Rel ; IsEquivalence ; _Preservesβ_βΆ_βΆ_)
open import Relation.Binary.PropositionalEquality as β‘ using (_β‘_)
open import Cats.Category.Base
open import Cats.Util.Function
open im... |
module Bughunting2 where
data Nat : Set where zero : Nat -- Comment which gets eaten
suc : Nat -> Nat --Comment which is preserved
plus :
Nat -> Nat -> Nat
plus2 : Nat -> Nat -> Nat
plus2 = plus
plus zero m = m
plus m n = {! !}
|
module Categories.WithFamilies where
open import Level
import Relation.Binary.HeterogeneousEquality as Het
open Het using (_β
_)
open import Categories.Support.PropositionalEquality
open import Categories.Support.Experimental
open import Categories.Category
open import Categories.Functor
open import Categories.Natura... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Concrete where
open import Level
open import Categories.Category.Core using (Category)
open import Categories.Category.Instance.Setoids using (Setoids)
open import Categories.Functor.Core using (Functor)
open import Categories.Functor.Representable using ... |
{- Name: Bowornmet (Ben) Hudson
--Complexity : "Playing The Game"--
-}
open import Preliminaries
open import Preorder-withmax
module Complexity-lang where
data Typ : Set where
nat : Typ
_Γ'_ : Typ β Typ β Typ
_β_ : Typ β Typ β Typ
unit : Typ
------------------------------------------
-- repre... |
------------------------------------------------------------------------------
-- Well-founded induction on natural numbers
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-poly... |
module Golden.Constructor where
open import Agda.Builtin.Nat
f : (Nat -> Nat) -> Nat
f g = g zero
fsuc = suc
fzero = zero
one = f suc
a = fsuc fzero
|
{-# OPTIONS --safe --cubical #-}
module Data.Product.NAry where
open import Data.Sigma
open import Prelude hiding (β€; tt)
open import Data.Unit.UniversePolymorphic
open import Path.Reasoning
private
variable
n : β
β : Level
Levels : β β Type
Levels zero = β€
Levels (suc n) = Level Γ Levels n
private
var... |
-- Andreas, 2017-04-10, issue #2537 reported by xekoukou
-- Preserve named args when splitting in a where clause.
-- {-# OPTIONS -v reify:100 #-}
data Bool : Set where
true false : Bool
fun : {a b c d e f g : Bool} β Bool β Bool
fun {g = g} x with x
... | r = {!g!} -- C-c C-c g
-- Expected result:
-- fun {g = tru... |
module Numeral.Natural.Oper.Comparisons.Proofs where
open import Data.Boolean.Stmt
open import Data.Boolean
open import Logic.Propositional
open import Numeral.Natural
open import Numeral.Natural.Oper.Comparisons
open import Numeral.Natural.Oper.Proofs
open import Relator.Equals
[β€?]-π : β{n} β IsTrue(π β€? n)
[β€?]-... |
open import Relation.Binary.Core
module InsertSort.Impl1.Correctness.Permutation.Alternative {A : Set}
(_β€_ : A β A β Set)
(totβ€ : Total _β€_) where
open import Data.List
open import Data.Sum
open import Function
open import InsertSort.Impl1 _β€_ totβ€
open import List.Permutation.Alt... |
module NF.Sum where
open import NF
open import Data.Sum
open import Relation.Binary.PropositionalEquality
instance
nfInjβ : {A B : Set}{a : A}{{nfa : NF a}} -> NF {A β B} (injβ a)
Sing.unpack (NF.!! (nfInjβ {a = a})) = injβ (nf a)
Sing.eq (NF.!! (nfInjβ {{nfa}})) rewrite nfβ‘ {{nfa}} = refl
{-# INLINE nfInjβ ... |
module Category.Universality where
open import Level
open import Category.Core
open import Category.Comma
open import Category.Instance
-- something is universal from c to S when it's an initial object in c / S
universal : {πΈβ ββ πΈβ ββ : Level}
β {C : Category πΈβ ββ} {D : Category πΈβ ββ}
β {c : Category.O... |
------------------------------------------------------------------------------
-- Operations on and with functions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism ... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Truncation.Properties 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.HLevels
open import Cubical.Foundations.Pat... |
module Numeric.Nat.Divide.Properties where
open import Prelude
open import Numeric.Nat.Properties
open import Numeric.Nat.DivMod
open import Numeric.Nat.Divide
open import Tactic.Nat
divides-add : β {a b d} β d Divides a β d Divides b β d Divides (a + b)
divides-add (factor! q) (factor! qβ) = factor (q + qβ) auto
d... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Maybe type and some operations
------------------------------------------------------------------------
-- The definitions in this file are reexported by Data.Maybe.
{-# OPTIONS --without-K --safe #-}
modu... |
-- Solver for Category
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Experiment.Categories.Solver.Category {o β e} (π : Category o β e) where
open import Level
open import Relation.Binary using (Rel)
import Categories.Morphism.Reasoning as MR
open Category π
open HomReasoning
open MR... |
module even where
open import Data.Nat
open import Data.Nat.Properties
open import Data.Empty
open import Data.Unit using (β€ ; tt)
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.Definitions
open import nat
open import logic
even : (n : β ) β Set
even zero =... |
{-# OPTIONS --without-K --termination-depth=2 #-}
open import HoTT
open import cw.CW
module cw.Sphere where
CWSphere-skel : β n β Skeleton {lzero} n
CWSphere : β β Typeβ
CWSphere n = β¦ CWSphere-skel n β§
Sphere-to-CWSphere : (n : β) β Sphere n β CWSphere n
CWSphere-skel O = Bool
CWSphere-skel (S n) =
(CWSphere-s... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Weakening {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped as U hiding (wk)
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.T... |
{-# OPTIONS --copatterns #-}
open import Common.Prelude
open import Common.Product
postulate
A : Set
B : A β Set
f : β a β B a
bla : β B
{-# NON_TERMINATING #-}
projβ bla = projβ bla
projβ bla = f (projβ bla)
T : Bool β Set
T true = Bool
T false = Bool
test : (β b β T b) β β T
{-# NON_TERMINATING #-}
projβ ... |
module Common.Sum where
open import Common.Level
data _β_ {a b} (A : Set a) (B : Set b) : Set (a β b) where
injβ : (x : A) β A β B
injβ : (y : B) β A β B
[_,_] : β {a b c} {A : Set a} {B : Set b} {C : A β B β Set c} β
((x : A) β C (injβ x)) β ((x : B) β C (injβ x)) β
((x : A β B) β C x)
[ f , g ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
module Numbers.Modulo.Definition where
record β€n (n : β) .(pr : 0 <N n) : Set where
field
x : β
.xLess : x <N n
equalityZn : {n : β} .{pr : 0 <N n} β {a b... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Structures.Monoid 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.P... |
-- TODO
-- Common syntax.
module BasicT.Syntax.Common where
open import Common.Context public
-- Types, or propositions.
infixl 9 _β§_
infixr 7 _β»_
data Ty : Set where
Ξ±_ : Atom β Ty
_β»_ : Ty β Ty β Ty
_β§_ : Ty β Ty β Ty
β€ : Ty
BOOL : Ty
NAT : Ty
-- Additional useful types.
infix 7 _β»β
_
_β»β
_ :... |
{-# OPTIONS --safe #-}
module Cubical.Data.Bool.Properties where
open import Cubical.Core.Everything
open import Cubical.Functions.Involution
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import C... |
module Adjoint where
import Category
import Functor
open Category
open Functor using (Functor)
module Adj where
open Functor.Projections using (Map; map)
data _β’_ {β β
: Cat}(F : Functor β β
)(G : Functor β
β) : Set1 where
adjunction :
(_* : {X : Obj β}{Y : Obj β
} -> Map F X ββ Y -> X ββ Map G Y)
... |
{-
This is mostly for convenience, when working with ideals
(which are defined for general rings) in a commutative ring.
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommRing.Ideal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Powerset
op... |
-- Jesper, 2018-11-29: Instances with explicit arguments will never be
-- used, so declaring them should give a warning.
postulate
X : Set
instance _ : Set β X -- this should give a warning
it : {{_ : X}} β X
it {{x}} = x
-- OTOH, this is fine as the instance can be used inside the module
module _ (A : Set) wher... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor where
open import Level
open import Function renaming (id to idβ; _β_ to _β_) using ()
open import Categories.Category
open import Categories.Functor.Core public
private
variable
o β e oβ² ββ² eβ² oβ³ ββ³ eβ³ : Level
Endofunctor : Category o β e β Set _
E... |
module Type.Properties.Inhabited{β} where
import Lvl
open import Type
-- An inhabited type, which essentially means non-empty (there exists objects with this type), and this object is pointed out/specified/chosen.
-- This means that there exists objects with such an type, and such an object is extractable constr... |
{-
β is a Commutative Ring
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommRing.Instances.QuoQ where
open import Cubical.Foundations.Prelude
open import Cubical.Algebra.CommRing
open import Cubical.HITs.Rationals.QuoQ
renaming (β to βType ; _+_ to _+β_; _Β·_ to _Β·β_; -_ to -β_)
open CommRingStr
βCommRing :... |
{-# OPTIONS --prop --rewriting #-}
open import Calf.CostMonoid
open import Data.Nat using (β)
module Examples.Sorting.Comparable
(costMonoid : CostMonoid) (fromβ : β β CostMonoid.β costMonoid) where
open CostMonoid costMonoid using (β)
open import Calf costMonoid
open import Calf.Types.Bool
open import Calf.Types... |
{- Name: Bowornmet (Ben) Hudson and Theodore (Ted) Kim
-- COMP360 Final Project: Group Theory in Agda --
In this project, we define some fundamental ideas of group theory and
prove a few basic theorems about the topic using Agda. For example, we
define what a group is, and give several elementary examples of grou... |
module PiQ.Eval where
open import Data.Empty
open import Data.Unit hiding (_β_)
open import Data.Sum
open import Data.Product
open import Data.Maybe
open import Data.Nat hiding (_β_)
open import Data.List as L hiding (_β·_)
open import Relation.Binary.Core
open import Relation.Binary
open import Relation.Nullary
open im... |
import Lvl
open import Structure.Operator.Vector
open import Structure.Setoid
open import Type
module Structure.Operator.Vector.LinearCombination.Proofs
{βα΅₯ ββ βα΅₯β βββ}
{V : Type{βα΅₯}} β¦ equiv-V : Equiv{βα΅₯β}(V) β¦
{S : Type{ββ}} β¦ equiv-S : Equiv{βββ}(S) β¦
{_+α΅₯_ : V β V β V}
{_β
βα΅₯_ : S β V β V}
{_+β_ _β
... |
{-# OPTIONS --without-K #-}
module hott.equivalence.properties where
open import sum
open import equality.core
open import equality.calculus
open import function.core
open import function.isomorphism
open import function.extensionality
open import hott.equivalence.core
open import hott.equivalence.alternative
open im... |
module FFI.Data.HaskellInt where
open import Agda.Builtin.Int using (Int)
{-# FOREIGN GHC import qualified Data.Int #-}
postulate HaskellInt : Set
{-# COMPILE GHC HaskellInt = type Data.Int.Int #-}
postulate
intToHaskellInt : Int β HaskellInt
haskellIntToInt : HaskellInt β Int
{-# COMPILE GHC intToHaskellInt = ... |
{-# OPTIONS -v tc.unquote:30 #-}
open import Common.Prelude
open import Common.Reflection
data Box : Bool β Set where
box : (b : Bool) β Box b
works : (b : Bool) β Box b β Bool
works b (box .b) = unquote (give (var 0 []))
worksβ : (b : Bool) β Box b β Bool
unquoteDef worksβ = defineFun worksβ (clause
( arg (argI... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Maybe type
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Maybe where
open import Data.Unit using (β€)
open import Data.Empty using (... |
module OldBasicILP.Syntax.Projection where
open import Common.UntypedContext public
import OldBasicILP.UntypedSyntax.ClosedHilbertSequential as CHS
import OldBasicILP.UntypedSyntax.ClosedHilbert as CH
-- Projection of types and derivations to a form parametrised by a closed, untyped representation of syntax.
modul... |
-- Andreas, 2016-07-19 revisiting issue #418
module Issue418private where
open import Common.Equality
abstract
A : Setβ
A = Set
private
works : A β‘ A
works = refl
test : A β‘ _
test = refl
-- Since test is private, abstract definitions are transparent in its type.
-- The meta should be solve... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.NType2
open import lib.PathFunctor
open import lib.PathGroupoid
open import lib.types.Bool
open import lib.types.IteratedSuspension
open import lib.types.LoopSpace
open import lib.types.Nat
open import lib.types.Paths
open import lib.types.Pi
open imp... |
{-# 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.Pentagon
{o β e} {C : Category o β e} {M : Monoidal C} (Cl : Closed M) where
open import Data.Product using... |
-- Andreas, 2019-06-17, LAIM 2019, issue #3855
-- Only allow erased definitions (such as projections of erased fields)
-- in erased context.
open import Common.IO
open import Common.Unit
open import Common.String
open import Common.Bool
record Erased (A : Set) : Set where
constructor erase
field
@0 gone : A
... |
module Structure.Relator.Apartness.Proofs where
open import Data
open import Data.Either as Either
open import Data.Tuple as Tuple
open import Functional
open import Logic.Classical
open import Logic.Propositional
open import Logic.Propositional.Theorems
import Lvl
open import Structure.Relator.Apartness
open imp... |
import Lvl
open import Logic
open import Type
module Data.List.Relation.Pairwise {ββ ββ} {T : Type{ββ}} where
open import Data.List
import Data.List.Functions as List
open import Data.List.Relation.Quantification
open import Functional
open import Logic.Propositional
-- Whether a list's elements pairwise s... |
open import Agda.Builtin.Nat
-- split on m
-- WAS: m = zero or m = suc m
-- WANT: m = suc m because 2nd clause already covers m = zero
f : Nat -> Nat -> Nat
f m zero = {!!}
f zero zero = zero
f _ _ = zero
-- However for g, we still get m = zero or m = suc m
-- because the other splits are orthogonal / catchalls
g ... |
module _ where
open import Common.Prelude hiding (_>>=_)
open import Common.Reflection
pattern `Nat = def (quote Nat) []
unquoteDecl f =
declareDef (vArg f) `Nat
|
module _ where
postulate D : Set
module A where
infixr 5 _β·_
postulate
_β·_ : Setβ β D β D
module B where
infix 5 _β·_
postulate
_β·_ : Setβ β Setβ β D
open A
open B
foo : D
foo = Set β· Set
|
module Cats.Category.Setoids where
open import Cats.Util.SetoidMorphism public using
(_β_ ; _β_ ; β-intro ; β-elim ; β-elimβ² ; equiv ; _β_ ; id ; β-resp ; assoc ; id-l
; id-r)
open import Level using (_β_ ; suc)
open import Relation.Binary using (Setoid)
open import Cats.Category.Base
open import Cats.Category.S... |
{-# OPTIONS --sized-types #-}
module Ex where
open import Size
open import Data.Empty
open import Data.Unit
open import Data.Nat
open import Data.Product
open import Data.Sum
open import Data.Fin
open import Function
open import Relation.Binary.PropositionalEquality
open import Relation.Nullary
β’ : Set
β’ = β€
-- | C... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Subset
open import Setoids.Setoids
open import Setoids.Orders.Partial.Definition
open import Setoids.Orders.Total.Definition
open import Sets.EquivalenceRelations
open import Rings.Orders.Total.Definition
open import Rin... |
-- Andreas, 2020-04-15, issue #4586
-- Better error message when `let` contains an absurd pattern.
test : Setβ
test = let f ()
in Set
-- WAS:
-- Not a valid let-declaration
-- when scope checking let f () in Set
-- EXPECTED:
-- Missing right hand side in let binding
-- when scope checking let f () in Set
|
-- Andreas, 2014-05-02
-- As of now, we have no negative integer literals, and these parse as identifiers.
module _ where
open import Common.Prelude
n : Nat
n = -1
-- Should give error "not in scope: -1"
|
module UnSizedIO.ConsoleObject where
open import UnSizedIO.Console
open import UnSizedIO.Object
open import UnSizedIO.IOObject
-- A console object is an IO object for the IO interface of console
ConsoleObject : (iface : Interface) β Set
ConsoleObject iface = IOObject ConsoleInterface iface
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Propertiers of any for containers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Container.Morphism.Properties where
open import Level u... |
module Issue488 where
open import Data.Product using (β-syntax; -,_; _Γ_; _,_)
open import Relation.Nullary using (Β¬_)
open import Relation.Binary.PropositionalEquality using (_β‘_; refl; sym; trans)
module CounterExample where
data Term : Set where
A B C D : Term
data _ββ_ : (M N : Term) β Set where
Bββ... |
module SizedPolyIO.Console where
open import Level using () renaming (zero to lzero)
open import Size
open import NativePolyIO
open import SizedPolyIO.Base
data ConsoleCommand : Set where
putStrLn : String β ConsoleCommand
getLine : ConsoleCommand
ConsoleResponse : ConsoleCommand β Set
ConsoleResponse (putStrL... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Lists.Lists
open import Agda.Primitive using (Level; lzero; lsuc; _β_)
open import Decidable.Sets
open import Numbers.Naturals.Definition
open import Numbers.Naturals.Semiring
module Computability.LambdaCalculus.Definition wher... |
module StateSizedIO.Base where
open import Size
open import SizedIO.Base
open import Data.Product
record IOInterfaceΛ’ : Setβ where
field
IOStateΛ’ : Set
CommandΛ’ : IOStateΛ’ β Set
ResponseΛ’ : (s : IOStateΛ’) β (m : CommandΛ’ s) β Set
IOnextΛ’ : (s : IOStateΛ’) β (m : CommandΛ’ s) β (ResponseΛ’ ... |
open import Categories
open import Functors
import RMonads
module RMonads.RKleisli
{a b c d}
{C : Cat {a}{b}}
{D : Cat {c}{d}}
{J : Fun C D}
(M : RMonads.RMonad J) where
open import Library
open RMonads.RMonad M
open Cat
open Fun
Kl : Cat
Kl = record{
Obj = Obj C;
Hom = Ξ» X Y β Hom D (OMap J X) (T... |
----------------------------------------------------------------------
-- --
-- Author : Jan Stolarek <jan.stolarek@p.lodz.pl> --
-- License : Public Domain --
-- ... |
-- Andreas, 2019-04-10, issue #3687, name mayhem when printing module contents (C-c C-o)
-- {-# OPTIONS -v interaction.contents.record:20 #-}
record Cat : Setβ where
field
Obj : Set
Hom : (A B : Obj) β Set
Eq : β{A B} (f g : Hom A B) β Set
id : (A : Obj) β Hom A A
comp : β{A B C} (f :... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.