text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Object.Terminal.Limit {o โ e} (C : Category o โ e) where
open import Categories.Category.Lift
open import Categories.Category.Finite.Fin.Construction.Discrete
open import Categories.Object.Terminal C
open import Categories.Diagram.L... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Booleans
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Bool where
open import Relation.Nullary
open import Relation.Binary
open import ... |
-- 2010-09-29
module IllegalUseOfIrrelevantDeclaration where
import Common.Irrelevance
record Subset (A : Set) (P : A -> Set) : Set where
constructor _#_
field
elem : A
.certificate : P elem
postulate
.irrelevant : {A : Set} -> .A -> A
certificate : {A : Set}{P : A -> Set} -> (x : Subset A ... |
{-# OPTIONS --without-K #-}
open import lib.Base
open import lib.PathGroupoid
open import lib.cubical.Square
module lib.cubical.Cube where
{- Coordinates are yzx, where
x : left -> right
y : back -> front
z : top -> bottom
-}
data Cube {i} {A : Type i} {aโโโ : A} :
{aโโโ aโโโ aโโโ aโโโ aโโโ aโโโ ... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Monad
module Categories.Adjoint.Construction.EilenbergMoore {o โ e} {C : Category o โ e} (M : Monad C) where
open import Categories.Category.Construction.EilenbergMoore M
open import Categories.Adjoint
open import Categories.Fu... |
open import Data.Product using ( _ร_ ; _,_ )
open import Relation.Binary.PropositionalEquality using ( refl )
open import Relation.Unary using ( _โ_ )
open import Web.Semantic.DL.ABox using ( ABox ; โจABoxโฉ )
open import Web.Semantic.DL.ABox.Interp using ( Interp ; Surjective ; _,_ ; โ_โ ; ind ; _*_ ; emp )
open import ... |
-- The natural numbers.
{-# OPTIONS --without-K --safe #-}
module Tools.Nat where
open import Tools.PropositionalEquality
open import Tools.Nullary
-- We reexport Agda's built-in type of natural numbers.
open import Agda.Builtin.Nat using (zero; suc)
open import Agda.Builtin.Nat using (Nat) public
pattern 1+ n = ... |
------------------------------------------------------------------------
-- A counterexample: The number of steps taken by the uninstrumented
-- interpreter is not, in general, linear in the number of steps taken
-- by the virtual machine for the corresponding compiled program
------------------------------------------... |
open import Common.Prelude
test : Bool โ Nat
test = if_then 4 Common.Prelude.else 5
|
------------------------------------------------------------------------------
-- Totality properties of the division
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphi... |
module sn-calculus where
open import utility
open import Esterel.Lang
open import Esterel.Lang.Binding
open import Esterel.Lang.Properties
open import Esterel.Lang.CanFunction
using (Canฮธโ ; Canฮธโโ ; [S]-env)
open import Esterel.Environment as Env
using (Env ; ฮ ; _โ_ ; sig ; []env ; module SigMap ; module ShrMap... |
module Lambda where
open import Prelude
-- Simply typed ฮป-calculus
infixr 70 _โถ_
data Type : Set where
ฮน : Type
_โถ_ : Type -> Type -> Type
Ctx : Set
Ctx = List Type
infixl 80 _โข_
infix 20 ฦ_
data Term : Ctx -> Type -> Set where
vz : forall {ฮ ฯ } -> Term (ฮ , ฯ) ฯ
wk : forall {ฮ ฯ ฯ} -> Term ฮ ฯ ... |
-- Andreas, 2016-06-13 issue #2027: Unbound variables in pattern synonyms
-- Quiz by Ulf
postulate Nat : Set
pattern hm = x
-- This pattern synonym should fail with a message like
-- Unbound variables in pattern synonym: x
quizโ : Nat โ Nat โ Nat
quizโ hm hm = hm
quizโ : Nat โ Nat
quizโ x = hm
quizโ : Nat โ Nat
q... |
-- This is the preferred version of the integers in the library. Other
-- versions can be found in the MoreInts directory.
{-# OPTIONS --safe #-}
module Cubical.Data.Int where
open import Cubical.Data.Int.Base public
open import Cubical.Data.Int.Properties public
|
-- Andreas, 2014-05-08
-- Reported by guillaume.brunerie, Yesterday
{-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.cc:25 -v reduce.compiled:95 #-}
-- {-# OPTIONS --show-implicit -v tc.inj:30 -v tc.conv:20 -v tc.meta.assign:10 #-}
-- The code below gives the following odd error:
-- > Incomplete pattern matching... |
module Equality where
postulate _==_ : {A : Set} -> A -> A -> Set
refl : {A : Set}{x : A} -> x == x
{-# BUILTIN EQUAL _==_ #-}
{-# BUILTIN REFL refl #-}
private
primitive
primEqElim : {A : Set}(x : A)(C : (y : A) -> x == y -> Set) ->
C x refl -> (y : A) -> (p : x == y) -> C y p
elim-== = ... |
{-
Proof of the standard formulation of the univalence theorem and
various consequences of univalence
- Re-exports Glue types from Cubical.Core.Glue
- The ua constant and its computation rule (up to a path)
- Proof of univalence using that unglue is an equivalence ([EquivContr])
- Equivalence induction ([EquivJ], [el... |
open import Data.Sum using (_โ_; injโ; injโ)
open import Data.List using (List; []; _โท_; [_]; _++_)
open import Data.List.Any using (Any; here; there)
open import Data.List.Any.Membership.Propositional using (_โ_)
open import Data.Nat using (โ)
open import Relation.Binary.PropositionalEquality using (_โก_; refl)
-- open... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Unsafe Float operations
------------------------------------------------------------------------
{-# OPTIONS --with-K #-}
module Data.Float.Unsafe where
open import Data.Float
open import Data.Bool.Base using ... |
------------------------------------------------------------------------
-- Subsets of finite sets
------------------------------------------------------------------------
module Data.Fin.Subset where
open import Data.Nat
open import Data.Vec hiding (_โ_)
open import Data.Fin
open import Data.Product
open import Rela... |
------------------------------------------------------------------------
-- Operations on nullary relations (like negation and decidability)
------------------------------------------------------------------------
-- Some operations on/properties of nullary relations, i.e. sets.
module Relation.Nullary where
open im... |
-- Andreas, 2019-09-13, AIM XXX, test for #4050 by gallais
-- Jesper, 2019-12-19, moved to test/Fail after unfix of #3823
record Wrap : Setโ where
field wrapped : Setโ
f : Wrap
f = record { M }
module M where
wrapped : Setโ
wrapped = Set
-- Should be accepted.
|
{-# OPTIONS --without-K #-}
module SimpleHoTT where
open import Data.Empty
open import Data.Sum renaming (map to _โโ_)
open import Function renaming (_โ_ to _โ_)
infixr 8 _โ_ -- path composition
infix 4 _โก_ -- propositional equality
infix 2 _โ -- equational reasoning for paths
infixr 2 _โกโจ_โฉ_ -- equ... |
module Oscar.Class.ThickAndThin where
open import Oscar.Data.Fin
open import Oscar.Data.Equality
open import Oscar.Data.Nat
open import Oscar.Data.Maybe
record ThickAndThin {a} (A : Nat โ Set a) : Set a where
field
thin : โ {m} โ Fin (suc m) โ A m โ A (suc m)
thin-injective : โ {m} (x : Fin (suc m)) {yโ yโ... |
open import Mockingbird.Forest using (Forest)
module Mockingbird.Forest.Combination.Base {b โ} (forest : Forest {b} {โ}) where
open import Level using (Level; _โ_)
open import Relation.Unary using (Pred; _โ_)
open Forest forest
private
variable
p : Level
x y z : Bird
P : Pred Bird p
-- If P is a set ... |
{-# OPTIONS --without-K --safe #-}
-- In this module, we define the syntax of D<:
module DsubDef where
open import Data.List as List
open import Data.List.All
open import Data.Nat as โ
open import Data.Maybe as Maybe
open import Data.Product
open import Data.Sum
open import Data.Empty renaming (โฅ to False)
open impor... |
{-# OPTIONS --safe --cubical-compatible --no-universe-polymorphism --no-sized-types --no-guardedness #-}
module Issue2487-1 where
import Issue2487.Coinfective
|
-- Andreas, 2012-01-11
module Issue551b where
data Box (A : Set) : Set where
[_] : .A โ Box A
implicit : {A : Set}{{a : A}} -> A
implicit {{a}} = a
postulate
A B : Set
instance a : A
a' : Box A
a' = [ implicit ]
-- this should succeed
f : Box B โ Box (Box B)
f [ x ] = [ [ x ] ]
-- this as well
|
------------------------------------------------------------------------
-- Yet another implementation of the Fibonacci sequence using tail
------------------------------------------------------------------------
module LargeCombinators where
open import Codata.Musical.Notation
open import Codata.Musical.Stream as S ... |
------------------------------------------------------------------------------
-- Inductive PA properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# O... |
open import Relation.Binary.Core
open import Level using (Level; _โ_; suc)
open import Data.Product using (ฮฃ; _ร_; _,_; ฮฃ-syntax; โ-syntax; projโ; projโ)
open import Function
open import DeBruijn
open import Beta
open import Takahashi
open import Z
open import ConfluenceTakahashi using (lemma3-3; lemma3-5)
star-lef... |
------------------------------------------------------------------------
-- INCREMENTAL ฮป-CALCULUS
--
-- Values for standard evaluation with the Nehemiah plugin.
------------------------------------------------------------------------
module Nehemiah.Denotation.Value where
open import Nehemiah.Syntax.Type public
open... |
import Everything
open import Prelude
open import Container.Traversable
open import Container.Foldable
open import Container.List
open import Text.Parse
open import Text.Lex
open import Text.Printf
open import Control.Monad.State
open import Control.Monad.Transformer
open import Control.WellFounded
open import Builti... |
module Syntax.Number where
import Lvl
open import Logic.Propositional
open import Numeral.Natural
open import Type
record Numeral {โ} (T : Type{โ}) : Typeฯ where
field
{restriction-โ} : Lvl.Level
restriction : โ โ Type{restriction-โ}
num : (n : โ) โ โฆ _ : restriction(n) โฆ โ T
open Numeral โฆ ... โฆ p... |
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-}
module Number.Operations.Specification where
open import Cubical.Foundations.Everything renaming (_โปยน to _โปยนแต; assoc to โ-assoc)
open import Cubical.Data.Unit.Base -- Unit
open import Number.Postulates
open import Number.Base
open โโฟ
open โคแถป
open โแถ ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Equivalence where
-- Strong equivalence of categories. Same as ordinary equivalence in Cat.
-- May not include everything we'd like to think of as equivalences, namely
-- the full, faithful functors that are essentially surjective on objects.
open import... |
module nodcap.LocalChoice where
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 u... |
-- In this file we consider the special of localising at a single
-- element f : R (or rather the set of powers of f). This is also
-- known as inverting f.
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-}
module Cubical.Algebra.CommRing.Localisation.InvertingElements where
open imp... |
module IIDg where
open import LF
-- Codes for indexed inductive types
data OPg (I : Set) : Set1 where
ฮน : I -> OPg I
ฯ : (A : Set)(ฮณ : A -> OPg I) -> OPg I
ฮด : (H : Set)(i : H -> I)(ฮณ : OPg I) -> OPg I
-- The top-level structure of values in an IIDg
Args : {I : Set}(ฮณ : OPg I)(U : I -> Set) -> Set
Args (ฮน _) ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Fresh lists, a proof relevant variant of Catarina Coquand's contexts in
-- "A Formalised Proof of the Soundness and Completeness of a Simply Typed
-- Lambda-Calculus with Explicit Substitutions"
-----------------... |
{-
This file contains:
- Definition of propositional truncation
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.PropositionalTruncation.Base where
open import Cubical.Core.Primitives
-- Propositional truncation as a higher inductive type:
data โฅ_โฅ {โ} (A : Type โ) : Type โ where
โฃ_โฃ : A โ โฅ A โฅ
squash... |
-- Reported by stevan.andjelkovic, 2014-10-23
-- Case splitting on n in the goal g produces the wrong output, it
-- seems like {n} in f is the problem...
data โ : Set where
zero : โ
suc : โ โ โ
f : {_ : โ} โ Setโ
f {n} = Set
where
g : โ โ Set
g n = {!n!}
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Foundations.Equiv.Base where
open import Cubical.Foundations.Function
open import Cubical.Foundations.Prelude
open import Cubical.Core.Glue public
using ( isEquiv ; equiv-proof ; _โ_ ; equivFun ; equivProof )
fiber : โ {โ โ'} {A : Type โ} {B : Type ... |
module par-swap.properties where
open import par-swap
open import Esterel.Lang
open import Esterel.Lang.Binding
open import Esterel.Context
open import Data.List using ([] ; [_] ; _โท_ ; List ; _++_)
open import Data.Product
Context1-โฅR : โ{p p'} โ (C1 : Context1) โ p โฅR p' โ ((C1 โท []) โฆ p โงc) โฅR ((C1 โท []) โฆ p' โงc)
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Quotients for Heterogeneous equality
------------------------------------------------------------------------
{-# OPTIONS --with-K --safe #-}
module Relation.Binary.HeterogeneousEquality.Quotients where
open i... |
-- Reasoning with both a strict and non-strict relation.
{-# OPTIONS --cubical --no-import-sorts --safe #-}
open import Cubical.Core.Everything
open import Cubical.Relation.Binary.Raw
module Cubical.Relation.Binary.Reasoning.Base.Double {a โโ โโ} {A : Type a}
{_โค_ : RawRel A โโ} {_<_ : RawRel A โโ}
(โค-isPreorder ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Propertiers of any for containers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Container.Relation.Unary.Any.Properties where
open impo... |
module Highlighting.M where
|
module Sized.CounterCell where
open import Data.Product
open import Data.Nat.Base
open import Data.Nat.Show
open import Data.String.Base using (String; _++_)
open import SizedIO.Object
open import SizedIO.IOObject
open import SizedIO.Base
open import SizedIO.Console hiding (main)
open import SizedIO.ConsoleObject
o... |
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.Groups.Wedge where
open import Cubical.ZCohomology.Base
open import Cubical.ZCohomology.Properties
open import Cubical.ZCohomology.MayerVietorisUnreduced
open import Cubical.Foundations.HLevels
open import Cu... |
module Generic.Test.Data.W where
open import Generic.Main
data Wโฒ {ฮฑ ฮฒ} (A : Set ฮฑ) (B : A -> Set ฮฒ) : Set (ฮฑ โ ฮฒ) where
supโฒ : โ {x} -> (B x -> Wโฒ A B) -> Wโฒ A B
W : โ {ฮฑ ฮฒ} -> (A : Set ฮฑ) -> (A -> Set ฮฒ) -> Set (ฮฑ โ ฮฒ)
W = readData Wโฒ
pattern sup x g = !#โ (relv x , g , lrefl)
elimW : โ {ฮฑ ฮฒ ฯ} {A : Set ฮฑ} {B ... |
{-# OPTIONS --safe --warning=error #-}
open import Agda.Primitive using (Level; lzero; lsuc; _โ_)
open import LogicalFormulae
open import Logic.PropositionalLogic
module ExampleSheets.LogicAndSets.Sheet1 where
q1i : {a : _} {A : Set a} โ (p1 p2 p3 : Propositions A) โ Tautology (implies (implies p1 (implies p2 p3))... |
module Numeral.Natural.Oper.Modulo.Proofs.Elim where
import Lvl
open import Data.Boolean.Stmt
open import Logic.Propositional
open import Numeral.Natural
open import Numeral.Natural.Inductions
open import Numeral.Natural.Oper
open import Numeral.Natural.Oper.Comparisons
open import Numeral.Natural.Oper.DivMod.Proofs
o... |
module Structure.Container.Iterable where
import Lvl
open import Data
open import Data.Boolean
open import Data.Option
open import Data.Tuple as Tuple using (_โจฏ_ ; _,_)
open import Functional
import Structure.Container.IndexedIterable
open import Type
private variable โ โโ โโโ โโโ : Lvl.Level
private variab... |
-- Private signatures
module Issue476d where
module M where
private
record R : Setโ
record R where
field X : Set
Q : Setโ
Q = M.R |
-- {-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v term:20 -v term.function:30 #-}
-- Andreas, 2015-05-31, issue reported by Bruno Bianchi
module Issue1530 {A : Set}(_<=_ : A -> A -> Set) where
open import Common.List
open import Issue1530.Bound _<=_
data OList : Bound -> Set where
nil : {b : Bound} -> OList b
... |
-- Andreas, 2019-08-17, issue #1346
open import Issue1346
-- Repeating the definitions of Issue1346.agda
private
testโ : Listโบ Bool
testโ = true โท false โท [] -- mixing _โท_ of _ร_ and List
testโ : โ{A : Set} โ A โ List A ร Listโบ A ร Listโบ A
testโ a = [] , a โท [] , a โท a โท [] -- mixing _,_ and _โท_ of _ร_
|
firstTrue : (f : โ โ Bool) โ โ (ฮป n โ f n โก true) โ โ
firstTrue f prf = mp-โ
firstTrue-true : firstTrue f prf โก n โ f n โก true
firstTrue-true = ?
firstTrue-false : firstTrue f prf โก n โ โ m โ m < n โ f m โก false
firstTrue-false = ?
|
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.Groups.RP2 where
open import Cubical.ZCohomology.Base
open import Cubical.ZCohomology.GroupStructure
open import Cubical.ZCohomology.Properties
open import Cubical.ZCohomology.Groups.KleinBottle
open import C... |
{-# OPTIONS --without-K --safe #-}
module Definition.Typed.Consequences.Consistency where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.Typed.EqRelInstance
open import Definition.LogicalRelation
open import Definition.LogicalRelation.Irrelev... |
{-# OPTIONS --cubical #-}
open import Agda.Builtin.Nat
open import Agda.Builtin.Cubical.Path
postulate
admit : โ {A : Set} โ A
data Z : Set where
pos : Nat โ Z
neg : Nat โ Z
sameZero : pos 0 โก neg 0
_+Z_ : Z โ Z โ Z
pos x +Z pos y = admit
pos x +Z neg y = admit
pos x +Z sa... |
module Stable where
open import Data.Product using (_ร_; projโ; projโ) renaming (_,_ to โจ_,_โฉ)
open import Negation using (ยฌ_; ยฌยฌยฌ-elim)
Stable : Set โ Set
Stable A = ยฌ ยฌ A โ A
ยฌ-stable : โ {A : Set} โ Stable (ยฌ A)
ยฌ-stable = ฮป ยฌยฌยฌa โ (ฮป a โ ยฌยฌยฌa (ฮป ยฌa โ ยฌa a))
-- ยฌ-stable = ยฌยฌยฌ-elim
ร-stable : โ {A B : Set} โ Sta... |
data Term (V : Set) : Set where
App : Term V -> Term V -> Term V
Abs : (V -> Term V) -> Term V -- ouch, posititity. |
{-# OPTIONS --without-K --safe #-}
module Fragment.Examples.Semigroup.Arith.Atomic where
open import Fragment.Examples.Semigroup.Arith.Base
-- Fully dynamic associativity
dyn-assocโ : โ {m n o} โ (m + n) + o โก m + (n + o)
dyn-assocโ = fragment SemigroupFrex +-semigroup
dyn-assocโ : โ {m n o p} โ ((m + n) + o) + p ... |
-- Andreas, 2012-11-18 see issue 761
module AbstractMutual where
module MA where
mutual
abstract -- accepted
S : Setโ
S = T
T : Setโ
T = Set
module AM where
abstract -- rejected before, should also be accepted
mutual
S : Setโ
S = T
T : Setโ
T = Set
|
{-# OPTIONS --safe --warning=error #-}
open import LogicalFormulae
open import Orders
open import Groups.Groups
open import Numbers.Naturals.Naturals
open import Numbers.Naturals.WithK
open import Numbers.Primes.PrimeNumbers
open import Rings.Definition
open import Setoids.Setoids
open import Numbers.Modulo.IntegersMo... |
open import Type
module Graph.Properties where
open import Functional
open import Function.Equals
open import Lang.Instance
open import Logic
open import Logic.Propositional
import Lvl
open import Graph
open import Relator.Equals
open import Relator.Equals.Proofs.Equiv
open import Structure.Setoid.Uniqueness
ope... |
open import Oscar.Prelude
open import Oscar.Class
open import Oscar.Class.Unit
module Oscar.Class.Surjection where
module Surjection
{๐ฌโ} (๐โ : ร ๐ฌโ)
{๐ฌโ} (๐โ : ร ๐ฌโ)
= โญLASS (๐โ , ๐โ) (๐โ โ ๐โ)
module _
{๐ฌโ} {๐โ : ร ๐ฌโ}
{๐ฌโ} {๐โ : ร ๐ฌโ}
where
surjection = Surjection.method ๐โ ๐โ
i... |
-- 2014-09-19
-- Reported by Mateusz Kowalczyk.
good : Setโ
good = let -- F : _ -- worked if you added the type signature
F X = X
in F Set
-- Now works without the type signature. |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.CommRing.Instances.MultivariatePoly where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat renaming(_+_ to _+n_; _ยท_ to _ยทn_)
open import Cubical.Data.Vec
open import Cubical.Algebra.Ring
open import Cubical.Algebra.Co... |
test = forall _0_ โ Set
|
module Human.List where
open import Human.Nat
infixr 5 _,_
data List {a} (A : Set a) : Set a where
end : List A
_,_ : (x : A) (xs : List A) โ List A
{-# BUILTIN LIST List #-}
{-# COMPILE JS List = function(x,v) { if (x.length < 1) { return v["[]"](); } else { return v["_โท_"](x[0], x.slice(1)); } } #-}
{-# COMP... |
module Auxiliary where
open import Agda.Primitive
open import Data.List
open import Data.Nat renaming (_+_ to _+แดบ_ ; _โค_ to _โคแดบ_ ; _โฅ_ to _โฅแดบ_ ; _<_ to _<แดบ_ ; _>_ to _>แดบ_)
open import Data.Nat.Properties
open import Data.Integer renaming (_+_ to _+แถป_ ; _โค_ to _โคแถป_ ; _โฅ_ to _โฅแถป_ ; _<_ to _<แถป_ ; _>_ to _>แถป_)
import Dat... |
{-# OPTIONS --experimental-irrelevance #-}
module ShapeIrrelevantParameterNoBecauseOfRecursion where
data โฅ : Set where
record โค : Set where
data Bool : Set where
true false : Bool
True : Bool โ Set
True false = โฅ
True true = โค
data D ..(b : Bool) : Set where
c : True b โ D b -- should fail
-- Jesper, 2017-0... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- Definition of Monoidal Category
-- Big design decision that differs from the previous version:
-- Do not go through "Functor.Power" to encode variables and work
-- at the level of NaturalIsomorphisms, instead work at the object/morphism
-- level, v... |
module Prelude.Show where
open import Prelude.Unit
open import Prelude.String
open import Prelude.Char
open import Prelude.Nat
open import Prelude.Int
open import Prelude.Word
open import Prelude.Function
open import Prelude.List
open import Prelude.Fin
open import Prelude.Vec
open import Prelude.Maybe
open import Pr... |
{-# OPTIONS --prop #-}
open import Agda.Builtin.Reflection
open import Agda.Builtin.List
open import Agda.Builtin.Unit
_>>=_ = bindTC
return = returnTC
postulate
X : Prop
xโ : X
f : X
f = xโ
macro
getValue : Name โ Term โ TC โค
getValue s _ = do
function (clause _ _ t โท []) โ getDefinition s
where ... |
------------------------------------------------------------------------------
-- Equality on Conat
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.Equivalence2
open import lib.path-seq.Rotations
open import lib.types.Unit
open import lib.types.Nat
open import lib.types.Pi
open import lib.types.Pointed
open import lib.types.Sigma
open import lib.types.Paths
open ... |
{-# OPTIONS --without-K #-}
module FiniteType where
open import Equiv using (_โ_)
open import Data.Product using (ฮฃ; _,_)
open import Data.Nat using (โ)
open import Data.Fin using (Fin)
--------------------------------------------------------------------------
--
-- A finite type is a type which is equivalent to Fin... |
{-# OPTIONS --copatterns #-}
module IOExampleGraphicsDrawingProgramWhenJust where
open import Data.Bool.Base
open import Data.Char.Base renaming (primCharEquality to charEquality)
open import Data.Nat.Base hiding (_โ_;_โ_; _+_; _*_)
open import Data.List.Base hiding (_++_)
open import Data.Integer.Base hiding (suc)
... |
module Miscellaneous.associative-side where
private variable T : Set
private variable _โซ_ : T โ T โ T
private variable id : T
data _โก_ {โ}{T : Set(โ)} : T โ T โ Set(โ) where
[โก]-intro : โ{x : T} โ (x โก x)
Associativity : (T โ T โ T) โ Set
Associativity(_โซ_) = โ{a b c} โ ((a โซ (b โซ c)) โก ((a โซ b) โซ c))
Identityโ :... |
open import Common.Level
postulate
โ : Level
data D : Set (lsuc โ) where
c : (โ : Level) โ Set โ โ D
-- Bad error:
-- The type of the constructor does not fit in the sort of the
-- datatype, since Set (lsuc โ) is not less or equal than Set (lsuc โ)
-- when checking the constructor c in the declaration of D
|
------------------------------------------------------------------------
-- Typing of pure type systems (PTS)
------------------------------------------------------------------------
module Pts.Typing where
open import Data.Fin using (Fin; zero)
open import Data.Fin.Substitution
open import Data.Fin.Substitution.Lemm... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Complete.Finitely {o โ e} (C : Category o โ e) where
open import Level
open import Categories.Category.Cartesian C
open import Categories.Diagram.Equalizer C
open import Categories.Diagram.Pullback C
open Category C
reco... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor where
open import Level
open import Data.Product using (_ร_; ฮฃ)
open import Function.Surjection using (Surjective)
open import Function.Equality using (_โถ_)
open import Relation.Nullary
open import Categories.Category
open import Categories.Functor.Core pub... |
{-# OPTIONS --safe --without-K #-}
open import Relation.Binary.PropositionalEquality using (_โก_; refl; sym; cong)
open import Relation.Nullary using (Dec; yes; no)
import Data.Product as Product
import Data.Sum as Sum
import Data.Nat as โ
import Data.Nat.Properties as โโ
open Product using (โ-syntax; _,_)
open Sum u... |
{-
Types Summer School 2007
Bertinoro
Aug 19 - 31, 2007
Agda
Ulf Norell
-}
module Parity where
open import Nat
-- Parity n tells us whether n is even or odd.
data Parity : Nat -> Set where
even : (k : Nat) -> Parity (2 * k)
odd : ... |
{-# OPTIONS --without-K #-}
module Util.HoTT.HLevel where
open import Util.HoTT.HLevel.Core public
open import Util.HoTT.Equiv
open import Util.HoTT.FunctionalExtensionality
open import Util.HoTT.Homotopy
open import Util.HoTT.Univalence.Axiom
open import Util.Prelude
open import Util.Relation.Binary.PropositionalEqu... |
{-# OPTIONS --without-K --safe #-}
module Experiment.FingerTree where
open import Level renaming (zero to lzero ; suc to lsuc)
open import Algebra
open import Experiment.FingerTree.Common
data Digit {a} (A : Set a) : Set a where
one : (a : A) โ Digit A
two : (a b : A) โ Digit A
three : (a b c :... |
module string where
open import bool
open import eq
open import char
open import list
open import nat
open import unit
----------------------------------------------------------------------
-- datatypes
----------------------------------------------------------------------
postulate
string : Set
{-# BUILTIN STRIN... |
-- Andreas, 2019-02-23, issue #3586, reported by mcoblenz shrunk by G. Allais
-- WAS: Internal error in ConcreteToAbstract.
-- {-# OPTIONS -v scope.pat:60 #-}
infixl 5 ^_
data D : Set where
^_ : D โ D
postulate
_^_ : D โ D โ D
foo : D โ Set
foo x@(y ^ z) = D
-- The term "y ^ z" is parsed as operator pattern (... |
------------------------------------------------------------------------------
-- Lists
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K... |
-- Andrea(s), 2018-11-23, issue #3378
--
-- WAS: internal error in coverage checker and clause compiler
-- for missing hcomp clauses triggered by non-exact splitting.
{-# OPTIONS --cubical #-}
-- {-# OPTIONS -v tc.cover:10 #-}
open import Agda.Builtin.Cubical.Path
open import Agda.Builtin.Unit
data Interval : Set w... |
{-# OPTIONS --show-implicit #-}
data Bool : Set where
true : Bool
false : Bool
data D : Set where
d : D
data E : Set where
e : E
HSet : Setโ
HSet = {b : Bool} โ Set
-- Here HA is HSet
-- The output of this function is the set E, for input HSet G.
โจ_ : HSet โ Set
โจ_ HA = HA {true}
G : HSet
G {true} = E
G {... |
{-# OPTIONS --without-K #-}
module Perm where
-- Definitions for permutations in the Cauchy representation
open import Level using (Level; _โ_) renaming (zero to lzero; suc to lsuc)
open import Relation.Unary using (Pred)
renaming (Decidable to UnaryDecidable)
open import Relation.Binary.PropositionalEquality
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Pointwise lifting of relations to lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Relation.Binary.Pointwise where
open import ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Functions.Definition
open import Orders.WellFounded.Definition
module Orders.WellFounded.Induction {a b : _} {A : Set a} {_<_ : Rel {a} {b} A} (wf : WellFounded _<_) where
private
foldAcc :
{c : _}
(P : A โ Set c) โ
(โ x โ (โ y โ y < x โ P ... |
module DecidableMembership where
open import OscarPrelude
open import Membership
open import Successor
record DecidableMembership {โ} (m : Set โ) (M : Set โ) โฆ _ : Membership m M โฆ : Set (โน โ)
where
field _โ?_ : (x : m) โ (X : M) โ Dec $ x โ X
field _โ?_ : (x : m) โ (X : M) โ Dec $ x โ X
open DecidableMembersh... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Delay type and some operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Delay where
open import Size
open impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.