text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K #-}
module WithoutK7 where
data I : Set where
i : I
data D (x : I) : Set where
d : D x
data P (x : I) : D x โ Set where
Foo : โ x โ P x (d {x = x}) โ Set
Foo x ()
|
module Issue249-2 where
postulate
A B : Set
module A where
X = A
Y = B
-- open A renaming (X to C; Y to C)
open A using (X) renaming (Y to X)
|
open import Relation.Binary.PropositionalEquality using (_โก_; _โข_; refl)
open import Data.Fin using (Fin)
open import Data.Nat using (โ)
open import Data.Product using (_ร_; _,_)
open import Data.Vec using (Vec; lookup; _[_]โ_)
open import Common
data Local (n : โ) : Set where
endL : Local n
sendSingle recvSingle... |
module Test where
open import Algebra using (CommutativeRing; IsCommutativeRing)
open import Assume using (assume)
import Data.Nat as โ
open โ using (โ; zero; suc)
import Data.Fin as F
open F using (Fin)
open import Relation.Binary using (Rel; Setoid; _Preserves_โถ_)
open import Function using (Inverse; _on_; _โ_; _... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.CofiberSequence
open import cohomology.FunctionOver
module cohomology.MayerVietoris {i} where
{- Mayer-Vietoris Sequence: Given a span X โfโ Z โgโ Y, the cofiber space
of the natural map [reglue : X โจ Y โ X โ_Z Y] (defined below) is equivalent
... |
module Id1 where
import Level
open import Data.Empty using (โฅ)
open import Data.Unit using (โค)
open import Data.Bool using (Bool)
open import Data.Sum using (_โ_)
open import Data.Nat
open import Data.Product
open import Data.Vec
open import Function using (id)
-- Study identity types from first principles
-- As w... |
module automaton where
open import Data.Nat
open import Data.List
open import Relation.Binary.PropositionalEquality hiding ( [_] )
open import logic
record Automaton ( Q : Set ) ( ฮฃ : Set )
: Set where
field
ฮด : Q โ ฮฃ โ Q
aend : Q โ Bool
open Automaton
accept : { Q : Set } { ฮฃ : Set }
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- All library modules, along with short descriptions
------------------------------------------------------------------------
-- Note that core modules are not included.
module Everything where
-- Definitions of... |
open import Oscar.Prelude
open import Oscar.Class
open import Oscar.Class.Surjection
open import Oscar.Class.Smap
open import Oscar.Class.Transitivity
module Oscar.Class.Surjtranscommutativity where
module Surjtranscommutativity
{๐ฌโ} {๐โ : ร ๐ฌโ}
{๐ฏโ} (_โผโ_ : ๐โ โ ๐โ โ ร ๐ฏโ)
{๐ฌโ} {๐โ : ร ๐ฌโ}
{๐ฏโ} (... |
record Unit : Set where
instance
constructor tt
|
module TimeSpace where
open import Prelude as P
hiding
( [_]
; id
; _โ_
; _***_
)
open import Container.List
open import Pi.Util
{-
A universe of finite types.
-}
data U : Set where
๐ ๐ : U
_โ_ _โ_ : U โ U โ U
infixr 6 _โ_
infixr 7 _โ_
{-
A collection of "primi... |
-- Was: test/Fail/Issue493
-- Andreas, 2020-06-08, issue #4737
-- Warn instead of hard error on useless hiding.
module _ where
module M where
postulate A B C : Set
data D : Set where
open M using (A) hiding (B; module D)
|
{-# OPTIONS --cubical #-}
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
data Interval : Set where
left right : Interval
path : left โก right
swap : Interval โ Interval
swap left = right
swap right = left
swap (path i) = {!!}
|
{-# OPTIONS --rewriting #-}
module Issue4048 where
data _==_ {i} {A : Set i} : (x y : A) โ Set i where
refl : {a : A} โ a == a
{-# BUILTIN REWRITE _==_ #-}
postulate
ฮ : (A : Set) (B : A โ Set) โ Set
lam : {A : Set} {B : A โ Set} (b : (a : A) โ B a) โ ฮ A B
app : {A : Set} {B : A โ Set} (f : ฮ A B) (a : A) โ ... |
module _ where
open import Common.Prelude hiding (_>>=_; _<$>_)
open import Common.Reflection
infixl 8 _<$>_
_<$>_ : โ {a b} {A : Set a} {B : Set b} โ (A โ B) โ TC A โ TC B
f <$> m = m >>= ฮป x โ returnTC (f x)
macro
default : Tactic
default hole =
inferType hole >>= ฮป
{ (def (quote Nat) []) โ unify hole... |
module MLib.Fin.Parts.Simple where
open import MLib.Prelude
open import MLib.Fin.Parts.Core
open import MLib.Fin.Parts
open import MLib.Fin.Parts.Nat
import MLib.Fin.Parts.Nat.Simple as PNS
open Nat using (_*_; _+_; _<_)
open Fin using (toโ; fromโโค)
open Table
open PNS using (sum-replicate-*; repl)
asParts : โ {a b... |
open import Agda.Builtin.List
open import Agda.Builtin.Char
open import Agda.Builtin.Equality
postulate
A B : Set
b : B
f : List A โ Char โ B
f _ 'a' = b
f [] _ = b
f _ _ = b
test : โ xs โ f xs 'a' โก b
test _ = refl
|
{-# OPTIONS --sized-types #-}
module Builtin.Size where
open import Agda.Builtin.Size public
|
{-# OPTIONS --without-K --safe #-}
------------------------------------------------------------------------
-- Re-exports of the Data.List.Kleene module, renamed to duplicate the
-- Data.List API.
module Data.List.Kleene.AsList where
import Data.List.Kleene.Base as Kleene
open import Data.List.Kleene.Base
using
... |
-- some examples for structural order in the termination checker
module StructuralOrder where
data Nat : Set where
zero : Nat
succ : Nat -> Nat
-- c t > t for any term t
-- e.g., succ (succ y) > succ y
plus : Nat -> Nat -> Nat
plus x (succ (succ y)) = succ (plus x (succ y))
plus x (succ zero) = succ x
plus x ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to โ
------------------------------------------------------------------------
module Data.Container.Any where
open import Algebra
open import Data.Container as C
open import Data.Container.Co... |
-- Andreas, 2019-08-20, issue #4012
-- unquoteDef and unquoteDecl should also work in abstract blocks.
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.List
open import Agda.Builtin.Equality
abstract
data D : Set where
c : D
f : D
unquoteDef f = do
qc โ quoteTC c... |
-- Andreas, 2019-10-21, issue #4049
-- reported and test case by andy-morris
open import Agda.Builtin.Size
data A : Size โ Set
B = A
data A where
a : โ i โ B i
-- WAS (2.6.0): internal error in Polarity.hs
-- Should succeed.
|
module SystemF.BigStep.Types where
open import Prelude
open import Data.List as List
-- types are indexed by the number of open tvars
infixl 10 _โ_
data Type (n : โ) : Set where
Unit : Type n
ฮฝ : (i : Fin n) โ Type n
_โ_ : Type n โ Type n โ Type n
โ' : Type (suc n) โ Type n
open import Data.Fin.Substit... |
module Tactic.Nat.Auto.Lemmas where
open import Prelude
open import Tactic.Nat.NF
open import Tactic.Nat.Exp
open import Container.Bag
open import Prelude.Nat.Properties
map++ : โ {a b} {A : Set a} {B : Set b} (f : A โ B) (xs ys : List A) โ
map f (xs ++ ys) โก map f xs ++ map f ys
map++ f [] ys = refl
map++... |
postulate A : Set
|
module Rec1 where
import Rec2
y : โ
y = x
|
module plfa-code.Naturals where
data โ : Set where
zero : โ
suc : โ โ โ
{-# BUILTIN NATURAL โ #-}
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_โก_; refl)
open Eq.โก-Reasoning using (begin_; _โกโจโฉ_; _โ)
_+_ : โ โ โ โ โ
zero + n = n
suc m + n = suc (m + n)
_ : 2 + 3 โก 5
_ = refl
_*_ : โ โ โ ... |
{-# OPTIONS --without-K --safe #-}
module Definition.Typed.Consequences.Syntactic 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.Substitut... |
{-# OPTIONS --without-K --safe #-}
module Categories.Morphism.Universal where
open import Level
open import Categories.Category
open import Categories.Category.Construction.Comma
open import Categories.Functor
open import Categories.Object.Initial
record UniversalMorphism {o โ e oโฒ โโฒ eโฒ} {C : Category o โ e} {D : C... |
{-# OPTIONS --without-K --safe #-}
module Util.HoTT.HLevel.Core where
open import Data.Nat using (_+_)
open import Level using (Lift ; lift ; lower)
open import Util.Prelude
open import Util.Relation.Binary.LogicalEquivalence using (_โ_ ; forth ; back)
open import Util.Relation.Binary.PropositionalEquality using
( ... |
{-# OPTIONS --cubical --safe #-}
module Data.Binary.Subtraction where
open import Data.Binary.Definition
open import Data.Nat
double : ๐น โ ๐น
double 0แต = 0แต
double (1แต xs) = 2แต double xs
double (2แต xs) = 2แต 1แต xs
dec : ๐น โ ๐น
dec 0แต = 0แต
dec (2แต xs) = 1แต xs
dec (1แต xs) = double xs
ones : โ โ ๐น โ ๐น
ones ze... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Groupoid where
open import Level
open import Categories.Category
open import Categories.Category.Groupoid using (Groupoid; IsGroupoid)
open import Categories.Functor
import Categories.Morphism.Reasoning as MR
private
variable
o โ e : Level
C D :... |
{-# OPTIONS --cubical --safe #-}
module Data.Probability where
open import Prelude
import Data.Nat as โ
import Data.Nat.Properties as โ
open import Data.Bits renaming (Bits to โโบ; [] to 1โ; 0โท_ to lโ; 1โท_ to rโ)
open import Data.Bits.Equatable
open import Data.Bits.Fold
euclidian : โ โ โ โ โ โ โโบ
euclidian n m zero... |
{-# OPTIONS --safe #-}
module Relation.Ternary.Separation.Construct.List {a} (A : Set a) where
open import Level
open import Data.Product
open import Data.List
open import Data.List.Properties using (++-isMonoid)
open import Data.List.Relation.Ternary.Interleaving.Propositional as I public
open import Data.List.Relati... |
{-# OPTIONS --without-K --exact-split #-}
module quotient-groups where
import subgroups
open subgroups public
{- The left and right coset relation -}
left-coset-relation :
{l1 l2 : Level} (G : Group l1) (H : Subgroup l2 G) โ
(x y : type-Group G) โ UU (l1 โ l2)
left-coset-relation G H x =
fib ((mul-Group G x) ... |
-- Andreas, May - July 2016, implementing postfix projections
module Issue1963 where
module Prod where
record ฮฃ (A : Set) (B : A โ Set) : Set where
field fst : A
snd : B fst
open ฮฃ
test : โ{A} โ A โ ฮฃ A ฮป _ โ A
test = ฮป where
x .fst โ x
x .snd โ x
module Stream where
record Stream... |
-- Omniscience principles
-- https://ncatlab.org/nlab/show/principle+of+omniscience
-- http://math.fau.edu/lubarsky/Separating%20LLPO.pdf
-- https://arxiv.org/pdf/1804.05495.pdf
-- https://www.cs.bham.ac.uk/~mhe/papers/omniscient-journal-revised.pdf
-- https://www.jaist.ac.jp/~t-nemoto/WMP.pdf
-- http://math.fau.edu/l... |
{-# OPTIONS --without-K --safe #-}
module Cats.Category.Fun.Facts.Terminal where
open import Cats.Category.Base
open import Cats.Category.Constructions.Terminal using (HasTerminal)
open import Cats.Category.Fun using (_โ_ ; โ-intro)
open import Cats.Functor using (Functor)
open import Cats.Functor.Const using (Const)
... |
open import Common.Bool
open import Common.Nat
data cheesy : Bool โ Set where
chocolate : cheesy false
cheese : cheesy true
bread : โ x โ cheesy x
foo : โ {x : Bool} โ cheesy x โ cheesy x โ Bool
foo x chocolate = {!!}
foo x cheese = {!!}
foo x (bread false) = {!x!}
foo x (bread true) = {!!}
|
module Sessions.Syntax where
open import Sessions.Syntax.Types public
open import Sessions.Syntax.Expr public
open import Sessions.Syntax.Values public
|
module Data.Num.Bij.Convert where
open import Data.Num.Bij
open import Data.Num.Bij.Properties
open import Data.List hiding ([_])
open import Relation.Binary
open import Data.Nat using (โ; zero; suc; _+_; _*_)
open import Data.Product
open import Data.Nat.Properties
open import Data.Nat.Properties.Simple
open import ... |
open import Relation.Binary.Core
module PLRTree.Heap.Properties {A : Set}
(_โค_ : A โ A โ Set)
(transโค : Transitive _โค_) where
open import PLRTree {A}
open import PLRTree.Heap _โค_
lemma-โค-โค* : {x y : A}{t : PLRTree} โ x โค y โ y โค* t โ x โค* t
lemma-โค-โค* {x = x} _ (lfโค* _) ... |
module Functional where
import Lvl
open import Type
infixl 10000 _โ_
infixl 10000 _โฉบ_
infixl 10000 _โฉน_
infixl 30 _โแถ _ _โ_ _โแถ _
infixr 0 _$_
private variable โ โโ โโ : Lvl.Level
private variable T X Xโ Xโ Xโ Xโ Y Yโ Yโ Yโ Yโ Z : Type{โ}
-- Converse of a function type
_โ_ : Type{โโ} โ Type{โโ} โ Type{โโ Lvl.โ โโ... |
------------------------------------------------------------------------
-- Properties related to negation
------------------------------------------------------------------------
module Relation.Nullary.Negation where
open import Relation.Nullary
open import Relation.Unary
open import Data.Empty
open import Data.Fun... |
open import Common.Prelude
open import Common.Reflection
open import Common.Equality
` : Term โ Term
` (def f []) = con (quote def) (vArg (lit (qname f)) โท vArg (con (quote []) []) โท [])
` _ = lit (string "other")
macro
primQNameType : QName โ Tactic
primQNameType f hole =
bindTC (getType f) ฮป a โ
bindTC ... |
-- Andreas, 2017-11-01, issue #2824
-- allow built-in pragmas in parametrized modules
{-# OPTIONS --rewriting #-}
open import Agda.Builtin.Equality
module _ (A : Set) where -- This is the top-level module header.
{-# BUILTIN REWRITE _โก_ #-}
postulate
P : A โ Set
a b : A
aโb : a โก b
{-# REWRITE aโb #-}
tes... |
-- Andreas, 2019-11-06 issue #4168, version with shape-irrelevance.
-- Eta-contraction of records with all-irrelevant fields is unsound.
-- In this case, it lead to a compilation error.
{-# OPTIONS --irrelevant-projections #-}
-- {-# OPTIONS -v tc.cc:20 #-}
open import Agda.Builtin.Unit
open import Common.IO using ... |
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
open import Agda.Builtin.List
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.Unit
postulate
@0 A : Set
@0 _ : @0 Set โ (Set โ Set) โ Set
_ = ฮป @0 where
A G โ G A
@0 _ : @0 Set โ (Set โ Set) โ Set
_ = ฮป @0 { A... |
-- Category of โก-coalgebras
module SOAS.Abstract.Coalgebra {T : Set} where
open import SOAS.Common
open import SOAS.Construction.Structure as Structure
open import SOAS.Context
open import SOAS.ContextMaps.Combinators
open import SOAS.ContextMaps.CategoryOfRenamings {T}
open import SOAS.Sorting
open import SOAS.Famil... |
{-# OPTIONS --without-K --safe #-}
-- The identity pseudofunctor
module Categories.Pseudofunctor.Identity where
open import Data.Product using (_,_)
open import Categories.Bicategory using (Bicategory)
import Categories.Bicategory.Extras as BicategoryExt
open import Categories.Category using (Category)
open import ... |
{-# OPTIONS --cubical --safe #-}
module Data.Binary.Equatable where
open import Prelude
open import Data.Binary.Definition
open import Data.Bits.Equatable public
|
-- Andreas, 2012-02-14, issue reported by Wolfram Kahl
-- {-# OPTIONS -v scope.top:10 #-}
module Issue562 where
data Bool : Set where true false : Bool
f : Bool โ Bool
f b with b
f true | _ = b
-- WAS: panic unbound variable b
-- should be: Not in scope: b |
-- 2010-11-21
-- testing correct implementation of eta for records with higher-order fields
module Issue366 where
data Bool : Set where
true false : Bool
record R (A : Set) : Set where
constructor r
field
unR : A
open R
foo : Bool
foo = unR (r (unR (r (ฮป (_ : Bool) โ false))
true))
-- befor... |
module TerminationMixingTupledCurried where
data Nat : Set where
zero : Nat
succ : Nat -> Nat
data _ร_ (A B : Set) : Set where
_,_ : A -> B -> A ร B
good : Nat ร Nat -> Nat -> Nat
good (succ x , y) z = good (x , succ y) (succ z)
good (x , succ y) z = good (x , y) x
good xy (succ z) = good xy z
good _ _ =... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group where
open import Cubical.Algebra.Group.Base public
open import Cubical.Algebra.Group.Properties public
|
data Nat : Set where
zero : Nat
suc : Nat โ Nat
test : โ{N M : Nat} โ Nat โ Nat โ Nat
test N M = {!.N N .M!}
-- Andreas, 2016-07-10, issue 2088
-- Changed behavior:
-- The hidden variables .N and .M are made visible
-- only the visible N is split.
|
postulate
A : Set
f : A โ A
mutual
F : A โ Set
F x = D (f x)
data D : A โ Set where
c : (x : A) โ F x
G : (x : A) โ D x โ Setโ
G _ (c _) = Set
|
{-# OPTIONS --copatterns #-}
module Issue950b where
postulate
A : Set
record R : Set where
field
x : A
record S : Set where
field
y : A
open R
f : ?
x f = ?
-- Good error:
-- Cannot eliminate type ?0 with projection pattern x
-- when checking that the clause x f = ? has type ?0
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module groups.KernelSndImageInl {i j k}
(G : Group i) {H : Group j} {K : Group k}
-- the argument [ฯ-snd], which is intended to be [ฯ โแดณ ร-snd],
-- gives the possibility of making the second part
-- (the proof of being a group homomorphism) abstract.
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Unit.Base where
-- Obtain Unit
open import Agda.Builtin.Unit public
renaming ( โค to Unit )
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Bisimilarity for Cowriter
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Cowriter.Bisimilarity where
open import Level u... |
{-# OPTIONS --without-K #-}
module Ch2-3 where
open import Level hiding (lift)
open import Ch2-1
open import Ch2-2
-- p
-- x ~~~~~~~~~ y
--
--
-- P x --------> P y
--
-- Lemma 2.3.1 (transport)
transport : โ {a b} {A : Set a} {x y : A}
โ (P : A โ Set b)
โ (p : x โก y)
โ P x โ P y
transport {a} {b... |
module Rationals.Multiply.Comm where
open import Equality
open import Rationals
open import Nats.Multiply.Comm
------------------------------------------------------------------------
-- internal stuffs
private
a*b=b*a : โ x y โ x * y โก y * x
a*b=b*a (a รท c) (b รท d)
rewrite nat-multiply-comm a b
|... |
open import MLib.Algebra.PropertyCode
open import MLib.Algebra.PropertyCode.Structures
module MLib.Matrix {c โ} (struct : Struct bimonoidCode c โ) where
open import MLib.Prelude
open Struct struct
open import MLib.Algebra.Operations struct
open Table using (head; tail; rearrange; fromList; toList; _โ_)
open import ... |
-- This file serves to aggregate all the top-level dependencies in the Silica project.
open import preservation
open import progress
|
{-# OPTIONS --without-K --exact-split #-}
module 07-equivalences where
import 06-universes
open 06-universes public
-- Section 7.1 Homotopies
-- Definition 7.1.1
_~_ :
{i j : Level} {A : UU i} {B : A โ UU j} (f g : (x : A) โ B x) โ UU (i โ j)
f ~ g = (x : _) โ Id (f x) (g x)
-- Definition 7.1.2
refl-htpy :
{... |
module Tactic.Nat.Coprime.Reflect where
import Agda.Builtin.Nat as Builtin
open import Prelude
open import Control.Monad.State
open import Control.Monad.Zero
open import Control.Monad.Transformer
open import Container.Traversable
open import Numeric.Nat.GCD
open import Tactic.Reflection
open import Tactic.Reflectio... |
-- Andreas, 2012-06-05 let for record patterns
-- {-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.term.let.pattern:100 #-}
-- {-# OPTIONS -v tc.lhs.top:100 #-}
module LetPair where
import Common.Level
open import Common.Equality
infixl 6 _ร_
infixl 0 _,_
record _ร_ (A B : Set) : Set where
constructor _,_
... |
{-# OPTIONS --cubical #-}
module ExerciseSession1 where
open import Part1 hiding (B)
-- We redefine B to be a family of types in this file
variable
B : A โ Type โ
-- Exercise 1: state and prove funExt for dependent functions f g : (x : A) โ B x
-- Exercise 2: generalize the type of cong to dependent function f :... |
module Tabs where
-- Tabs are not treated as white space.
tab: : Setโ
tab: = Set
|
module Logic.Propositional.Theorems where
open import Data
open import Data.Either as Either using (_โ_)
open import Data.Tuple as Tuple using (_โจฏ_ ; _,_)
open import Functional
open import Logic
open import Logic.Propositional
import Lvl
open import Syntax.Type
open import Type
---------------------------------... |
module Two where
open import Relation.Binary.PropositionalEquality
open โก-Reasoning
import Data.Nat as โ
import Data.Nat.Properties as โโ
open โ using (โ; zero; suc; _+_)
-- Our language consists of constants and addition
data Expr : Set where
const : โ โ Expr
plus : Expr โ Expr โ Expr
-- Straightforward seman... |
-- Opening this module allows lists to be written using "list notation".
-- Examples:
-- [] = โ
-- [ a ] = a โฐ โ
-- [ a , b ] = a โฐ b โฐ โ
-- [ a , b , c ] = a โฐ b โฐ c โฐ โ
module Syntax.List where
open import Data.List
{-
infixl 1 [_
infixr 1000 _,_
infixl 100000 _]
pattern [] ... |
{-# OPTIONS --without-K #-}
module sets.int.definition where
open import sum
open import equality
open import function
open import sets.nat.core
open import hott.level
private
data Z : Set where
mk-int : โ โ โ โ Z
โค : Set
โค = Z
_[-]_ : โ โ โ โ โค
_[-]_ = mk-int
postulate
eq-โค : (n m d : โ) โ n [-] m โก (d +... |
module Files where
open import Prelude
open import System.File
open import System.FilePath
open import Prelude.Equality
fileIsEqual : โ {k} โ Path k โ Path k โ IO Unit
fileIsEqual a b = _โ_ <$> readBinaryFile a <*> readBinaryFile b >>= ฮป x โ
if x then return unit else exitWith (Failure 1)
where
-- Move this t... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.ZCohomology.Properties where
open import Cubical.ZCohomology.Base
open import Cubical.HITs.S1
open import Cubical.HITs.Sn
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import ... |
{-# OPTIONS --warning=error #-}
-- Useless private
module Issue476a where
A : Setโ
private
A = Set
|
open import Relation.Binary.Core
module BBHeap.Push {A : Set}
(_โค_ : A โ A โ Set)
(totโค : Total _โค_)
(transโค : Transitive _โค_) where
open import BBHeap _โค_
open import BBHeap.Equality _โค_
open import BBHeap.Equality.Properties _โค_
open import Bound.Lower A
open ... |
{-# OPTIONS --allow-unsolved-metas #-}
module Problem where
open import OscarPrelude
open import Sequent
infix 13 _ยถ_
record Problem : Set
where
constructor _ยถ_
field
inferences : List Sequent
interest : Sequent
open Problem public
instance EqProblem : Eq Problem
EqProblem = {!!}
open import ๐ssertio... |
-- Andreas, 2015-06-29 constructors should be covariant.
-- They are already treated as strictly positive in the positivity checker.
-- {-# OPTIONS -v tc.polarity:20 -v tc.proj.like:10 #-}
-- {-# OPTIONS -v tc.conv.elim:25 -v tc.conv.atom:30 -v tc.conv.term:30 --show-implicit #-}
open import Common.Size
open import C... |
{-# OPTIONS --copatterns #-}
module Copatterns where
open import Common.Equality
record _ร_ (A B : Set) : Set where
constructor _,_
field
fst : A
snd : B
open _ร_
pair : {A B : Set} โ A โ B โ A ร B
fst (pair a b) = a
snd (pair a b) = b
swap : {A B : Set} โ A ร B โ B ร A
fst (swap p) = snd p
snd (swap p)... |
{-# OPTIONS --universe-polymorphism #-}
module TrustMe where
open import Common.Equality
postulate
A : Set
x y : A
eq : x โก y
eq = primTrustMe
does-not-evaluate-to-refl : sym (sym eq) โก eq
does-not-evaluate-to-refl = refl
|
{-# OPTIONS --allow-unsolved-metas #-}
module TermCode where
open import OscarPrelude
open import VariableName
open import FunctionName
open import Arity
open import Term
open import Vector
data TermCode : Set
where
variable : VariableName โ TermCode
function : FunctionName โ Arity โ TermCode
termCode-function-... |
{-# OPTIONS --without-K --safe #-}
module Definition.Conversion.Stability where
open import Definition.Untyped
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.Typed.Weakening
open import Definition.Conversion
open import Definition.Conversion.Soundness
open import Definit... |
------------------------------------------------------------------------
-- Some lemmas used by the other modules in this directory
------------------------------------------------------------------------
module Hinze.Lemmas where
open import Stream.Programs
open import Stream.Equality
open import Codata.Musical.Not... |
module MultipleIdentifiersOneSignature where
data Bool : Set where
false true : Bool
not : Bool โ Bool
not true = false
not false = true
data Suit : Set where
โฅ โข โ โฃ : Suit
record R : Setโ where
field
A B C : Set
postulate
A : Set
B C : Set
{-# BUILTIN CHAR Char #-}
{-# BUILTIN BOOL Bool #-}... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Examples of pretty printing of rose trees
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module README.Text.Tree where
open import Dat... |
-- The ATP pragma with the role <definition> can be used with functions.
module ATPDefinition where
postulate
D : Set
zero : D
succ : D โ D
one : D
one = succ zero
{-# ATP definition one #-}
|
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 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 LibraBFT.Base.Types
open import LibraBFT.Concrete.System.Paramete... |
module Hello where
data Bool : Set where
true : Bool
false : Bool
data Unit : Set where
one : Unit
unit : Unit
unit = ?
test : Bool โ Bool
test x = ?
unicodeTestโ : Bool โ Bool
unicodeTestโ x = ?
slap : Bool โ Bool
slap = ฮป { x โ ? }
module _ where
testIndent : Bool โ Bool
testIndent true = ?
testInd... |
-- Andreas, 2012-01-13
module Issue555b where
data Empty : Set where
record Unit : Set where
constructor tt
-- Do we want to allow this?
data Exp (A : Set) : Set1
data Exp where -- ? needs to report that too few parameters are given
var : Exp Empty
app : {A B : Set} โ Exp (A โ B) โ Exp A โ Exp B
-- Basically, ... |
{-# OPTIONS --without-K --safe #-}
module Data.Binary.Bits where
open import Data.Bool
as Bool
using (not; _โจ_; _โง_; _xor_; T)
renaming (Bool to Bit; true to I; false to O)
public
_xnor_ : Bit โ Bit โ Bit
O xnor y = not y
I xnor y = y
sumแต : Bit โ Bit โ Bit โ Bit
sumแต O = _xor_
sumแต I = _xnor_
carryแต : Bit... |
module Span where
open import Prelude
open import Star
open import Modal
data SpanView {A : Set}{R : Rel A}(p : {a b : A} -> R a b -> Bool) :
EdgePred (Star R) where
oneFalse : {a b c d : A}(xs : Star R a b)(pxs : All (\x -> IsTrue (p x)) xs)
(x : R b c)(ยฌpx : IsFalse (p x))(ys : Star R ... |
module Issue396 where
record โค : Set where
constructor tt
foo : (P : โค โ Set) โ
((x : โค) โ P x โ P x) โ
(x y : โค) โ P x โ P y
foo P hyp x y = hyp x
-- Error was:
-- x != y of type โค
-- when checking that the expression hyp x has type P x โ P y
|
{-# OPTIONS --universe-polymorphism #-}
module Categories.Bifunctor.NaturalTransformation where
open import Level
open import Categories.Category
open import Categories.Bifunctor
open import Categories.Product
open import Categories.NaturalTransformation public
-- just for completeness ...
BiNaturalTransformation :... |
module plfa-code.Connectives where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_โก_; refl)
open Eq.โก-Reasoning
open import Data.Nat using (โ)
open import Function using (_โ_)
open import plfa-code.Isomorphism using (_โ_; _โฒ_; extensionality)
open plfa-code.Isomorphism.โ-Reasoning
data _ร_ (A B : ... |
-- This file tests that record constructors are used in error
-- messages, if possible.
-- Andreas, 2016-07-20 Repaired this long disfunctional test case.
module RecordConstructorsInErrorMessages where
record R : Setโ where
constructor con
field
{A} : Set
f : A โ A
{B C} D {E} : Set... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of Rational numbers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Rational.Properties where
open import Algebra.Consequences... |
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Relation.Unary.Any.Dec where
open import Prelude hiding (โฅ; โค)
open import Algebra.Construct.Free.Semilattice.Eliminators
open import Algebra.Construct.Free.Semilattice.Definition
open import Cubical.Foundations.HLevels
open import Data.Empty.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.