text stringlengths 4 690k |
|---|
module Numeral.Finite.Sequence where
import Lvl
open import Data.Either as Either using (_โ_)
open import Data.Either.Equiv as Either
open import Data.Either.Equiv.Id
open import Data.Either.Proofs as Either
open import Data.Tuple as Tuple using (_โจฏ_ ; _,_)
open import Data.Tuple.Equiv as Tuple
open import Data.T... |
open import Agda.Primitive
open import Data.Nat using (โ)
data โ {nโ : Level} {nโ : Level} (A : Set nโ) (P : A โ Set nโ) : Set (nโ โ nโ) where
sum : (a : A) โ (pa : P a) โ โ A P
data List {n : Level} (t : Set n) : Set n where
_::_ : t โ List t โ List t
[] : List t
data Unit {n : Level} : Set n where
## ... |
module AbsurdLam where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data Fin : Nat -> Set where
fzero : forall {n} -> Fin (suc n)
fsuc : forall {n} -> Fin n -> Fin (suc n)
data False : Set where
elimFalse : (A : Set) -> False -> A
elimFalse A = \()
data _==_ {A : Set}(x : A) : A -> Set where
refl ... |
module UnequalRelevance where
postulate
A : Set
f : .A -> A
g : (A -> A) -> A -> A
-- this should fail because
-- cannot use irrelevant function where relevant is needed
h : A -> A
h = g f -- error: function types are not equal because one is relevant and the other not |
{-# OPTIONS --rewriting #-}
module Properties.TypeSaturation where
open import Agda.Builtin.Equality using (_โก_; refl)
open import FFI.Data.Either using (Either; Left; Right)
open import Luau.Subtyping using (Tree; Language; ยฌLanguage; _<:_; _โฎ:_; witness; scalar; function; function-err; function-ok; function-okโ; fu... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Patterns used in the reflection machinery
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Reflection.Pattern where
open import Data.List.Base ... |
module sum-thms where
open import eq
open import sum
open import list
open import product
open import empty
open import negation
injโ-inj : โ{โ โ'}{A : Set โ}{B : Set โ'}{x : A}{x'} โ injโ{โ}{โ'}{A}{B} x โก injโ x' โ x โก x'
injโ-inj refl = refl
โ-assoc-isoโ : โ{โ}{U V W : Set โ}{x : U โ V โ W} โ โ-assoc-inv (โ-assoc ... |
module Imports.Unsolved where
X : Set
X = ?
|
open import Agda.Primitive
postulate
F : (a : Level) โ Set a โ Set a
P : (a : Level) (A : Set a) โ F a A โ Set a
p : (a : Level) (A : Set a) (x : F a A) โ P a A x
Q : (a : Level) (A : Set a) โ A โ Set a
variable
a : Level
A : Set a
postulate
q : (x : F _ A) โ Q a _ (p a A x)
q' : {a : Level} {A : Set... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Vec.Relation.Unary.All directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.All whe... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Functor
open import Categories.Adjoint
-- Right Adjoint Preserves Limits.
module Categories.Adjoint.RAPL {o oโฒ โ โโฒ e eโฒ} {C : Category o โ e} {D : Category oโฒ โโฒ eโฒ}
{L : Functor C D} {R : Functor D C} (LโฃR : L โฃ R) where
op... |
module Convertibility where
open import Syntax public
-- ฮฒ-ฮท-equivalence.
infix 4 _โกแตแต_
data _โกแตแต_ : โ {A ฮ} โ ฮ โข A โ ฮ โข A โ Set where
reflโกแตแต : โ {A ฮ} {d : ฮ โข A} โ d โกแตแต d
transโกแตแต : โ {A ฮ} {d dโฒ dโณ : ฮ โข A} โ d โกแตแต dโฒ โ dโฒ โกแตแต dโณ โ d โกแตแต dโณ
symโกแตแต : โ {A ฮ} {d dโฒ : ฮ โข A} โ d โกแตแต dโฒ โ dโฒ โกแตแต d
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to propositional list membership, that rely on
-- the K rule
------------------------------------------------------------------------
{-# OPTIONS --with-K --safe #-}
module Data.List.Membersh... |
{-# OPTIONS --without-K --rewriting #-}
module Bool where
open import Basics
open import lib.Basics
open import lib.types.Bool public
_โคb_ : Bool โ Bool โ PropTโ
true โคb true = True
true โคb false = False
false โคb true = True
false โคb false = True
โคb-refl : (b : Bool) โ (b โคb b) holds
โคb-refl tru... |
{-# OPTIONS --without-K #-}
module sets.int.properties where
open import equality
open import function.core
import sets.nat as N
open N using (โ; suc)
open import sets.int.definition
open import sets.int.utils
import sets.int.core as Z
private
module _ where
open N
add-right-unit : โ n n' โ (n + 0) [-] (n... |
{-# OPTIONS --safe #-}
module Issue2487.B where
import Issue2487.A
|
{-# OPTIONS --safe --warning=error --without-K #-}
open import Rings.Definition
open import Rings.Orders.Partial.Definition
open import Rings.Orders.Total.Definition
open import Setoids.Setoids
open import Setoids.Orders.Partial.Definition
open import Setoids.Orders.Total.Definition
open import Functions.Definition
op... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Package where
open import Light.Level using (Setฯ)
record Meta : Setฯ where
field Dependencies : Setฯ
field Library : Dependencies โ Setฯ
record Package (meta : Meta) : Setฯ where
instance constructor pack... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.SuspSectionDecomp
open import homotopy.CofiberComp
open import homotopy.SmashIsCofiber
module homotopy.SuspProduct where
module SuspProduct {i} {j} (X : Ptd i) (Y : Ptd j) where
private
iโ : X โโ X โร Y
iโ = ((ฮป x โ (x , pt Y)) ... |
module Structure.Operator.Monoid.Invertible.Proofs where
import Data.Tuple as Tuple
import Lvl
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Operator
open import Structure.Operator.Monoid
open import Structure.Operator.Monoid.Invertible
open import Structure.Operator.Prope... |
module PiQ.SAT where
open import Data.Unit
open import Data.Sum
open import Data.Product
open import Data.Nat
open import Data.Nat.Properties
open import Data.List as L
open import Data.Maybe
open import Relation.Binary.PropositionalEquality
open import PiQ.Syntax
open import PiQ.Eval
open import PiQ.Examples
-- Given... |
-- Andreas, 2019-03-25, issue #3640, reported by gallais
{-# OPTIONS --sized-types #-}
-- {-# OPTIONS -v tc.polarity:40 #-}
module _ where
open import Agda.Builtin.Size
module M (_ : Set) where
data U : Size โ Set where
node : โ {i} โ U (โ i)
module L (A B : Set) where
open M A
-- WAS: crash because of n... |
open import FRP.JS.Delay using ( Delay )
module FRP.JS.Time.Core where
record Time : Set where
constructor epoch
field toDelay : Delay
{-# COMPILED_JS Time function(x,v) { return v.epoch(x); } #-}
{-# COMPILED_JS epoch function(d) { return d; } #-}
|
module Shallow where
open import Level using (_โ_) renaming (suc to lsuc)
open import Function
open import Data.Unit
open import Data.Empty
open import Data.Product
open import Data.Sum
open import Data.Nat hiding (_โ_)
open import Data.Fin
open import Relation.Binary.PropositionalEquality as PE hiding ([_]; subst)
ฮ ... |
-- ฮฃ type (also used as existential) and
-- cartesian product (also used as conjunction).
{-# OPTIONS --without-K --safe #-}
module Tools.Product where
open import Agda.Primitive
infixr 4 _,_
infixr 2 _ร_
-- Dependent pair type (aka dependent sum, ฮฃ type).
record ฮฃ {โ โโฒ : Level} (A : Set โ) (B : A โ Set โโฒ) : Se... |
-- Andreas, 2012-11-22 issue #729, abstract aliases
-- Andreas, 2016-07-19 issue #2102, better fix of #418 helps!
module Issue729 where
abstract
B = Set
Bโ = B
Bโ = Set
abstract
foo : Setโ
foo = x
where x = B
mutual
abstract
D = C
C = B
abstract
mutual
F = E
E = D
-- other stuff
... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Site {o โ e} (C : Category o โ e) where
open import Level
open import Data.Product using (ฮฃ; _,_; โโ)
open Category C
private
variable
X Y Z : Obj
record Coverage {i} j {I : Obj โ Set i}
(coveringโ ... |
module JVM.Model.Properties where
open import Data.List
open import Data.List.Properties
open import Data.List.Relation.Binary.Permutation.Propositional
open import Data.List.Relation.Binary.Permutation.Propositional.Properties
open import Data.Product hiding (map)
open import Relation.Unary using (Pred)
open import... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Functors
------------------------------------------------------------------------
-- Note that currently the functor laws are not included here.
{-# OPTIONS --without-K --safe #-}
module Category.Functor where... |
module Naturals where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
infixl 60 _+_
infixl 80 _*_
_+_ : Nat -> Nat -> Nat
zero + m = m
suc n + m = suc (n + m)
_*_ : Nat -> Nat -> Nat
zero * m = zero
suc n * m = m + n * m
{-# BUILTIN NATURAL Nat #-}
{-# BUILTIN ZERO zero #-}
{-# BUILTIN SUC suc ... |
-- Two fun examples of generic programming using univalence
{-# OPTIONS --cubical --safe #-}
module Cubical.Experiments.Generic where
open import Agda.Builtin.String
open import Agda.Builtin.List
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open i... |
{- 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
import LibraBFT.Impl.OBM.ConfigHardCoded... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Data.Vec.OperationsNat where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Empty as โฅ
open import Cubical.Data.Nat renaming (_+_ to _+n_; _ยท_ to _ยทn_)
open import Cubical.Data.Nat.Order
open import Cubical.Data.Vec.Base
open imp... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cohomology.Theory
module cohomology.Coproduct {i} (CT : CohomologyTheory i)
(n : โค) (X Y : Ptd i) where
open CohomologyTheory CT
open import cohomology.Sigma CT
private
P : Bool โ Ptd i
P true = X
P false = Y
C-โ : C n (X โโ Y) โแดณ C n (X ... |
open import Agda.Builtin.Unit
open import Agda.Builtin.Bool
open import Agda.Builtin.Sigma
data โฅ : Set where
type : Bool โ Set
type true = โค
type false = โฅ
record Bad : Set where
constructor b
field
.f : ฮฃ Bool type
test : Bad โ Bool
test (b (x , y)) = x
|
module Negative3 where
data Mu (F : Set -> Set) : Set where
inn : F (Mu F) -> Mu F
|
module Ethambda.Position
import Eth.Prelude -- using (bool)
import Prelude.Bool -- using (bool)
import Data.List -- using (intercalate)
import Prelude.Monad -- using ((>=>))
import Control.Monad.Identity
import Control.Monad.Writer -- using
-- (MonadWriter, WriterT, Writer, execWriterT, execWriter, tell)
import Contr... |
{-# OPTIONS --erased-cubical --safe #-}
module Pitch where
open import Cubical.Core.Everything using (_โก_; Level; Type; ฮฃ; _,_; fst; snd; _โ_; ~_)
open import Cubical.Foundations.Prelude using (refl; sym; _โ_; cong; transport; subst; funExt; transp)
--open import Cubical.Foundations.Function using (_โ_)
open ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Strings
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.String where
open import Data.Vec as Vec using (Vec)
open import Data.Char as Cha... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.Groups.Torus where
open import Cubical.ZCohomology.Base
open import Cubical.ZCohomology.Properties
open import Cubical.ZCohomology.GroupStructure
open import Cubical.ZCohomology.Groups.Connected
open import Cubical.ZCohomology.MayerViet... |
{-# OPTIONS --without-K --safe #-}
-- In this module, we define the subtyping relation of D<: according to Lemma 2.
module Dsub where
open import Data.List as List
open import Data.List.All as All
open import Data.Nat as โ
open import Data.Maybe as Maybe
open import Data.Product as ฮฃ
open import Data.Sum
open import ... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax Sum | S
type
_โ_ : 2-ary | l30
term
inl : ฮฑ -> ฮฑ โ ฮฒ
inr : ฮฒ -> ฮฑ โ ฮฒ
case : ฮฑ โ ฮฒ ฮฑ.ฮณ ฮฒ.ฮณ -> ฮณ
theory
(lฮฒ) a : ฮฑ f : ฮฑ.ฮณ g : ฮฒ.ฮณ |> case (inl(a), x.f[x], y.g[y]) = f[a]
(rฮฒ) b... |
open import Relation.Binary.Core
module BBHeap.Subtyping {A : Set}
(_โค_ : A โ A โ Set)
(transโค : Transitive _โค_) where
open import BBHeap _โค_
open import Bound.Lower A
open import Bound.Lower.Order _โค_
open import Bound.Lower.Order.Properties _โค_ transโค
subtyping : {b b' : Bound... |
-- Andreas, 2016-12-22, issue #2354
-- Interaction between size solver, constraint solver, and instance search.
-- The instance search fails initially because of a non rigid meta.
-- Before freezing, there is another attempt.
-- The instance search succeeds and instantiates the meta for M.
-- Then, a size constraint i... |
{-# OPTIONS --allow-unsolved-metas #-}
module TermByFunctionNames where
open import OscarPrelude
open import VariableName
open import FunctionName
data TermByFunctionNames : Nat โ Set
where
variable : VariableName โ TermByFunctionNames zero
function : FunctionName โ {arity : Nat} โ (ฯs : Vec (ฮฃ Nat TermByFunctio... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.RingStructure.CohomologyRing where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Transport
open import Cubical.Data.Nat renaming (_+_ to _+n_ ; _ยท_ to _ยทn_)
open imp... |
module Setoid where
module Logic where
infix 4 _/\_
-- infix 2 _\/_
data True : Set where
tt : True
data False : Set where
data _/\_ (P Q : Set) : Set where
andI : P -> Q -> P /\ Q
-- Not allowed if we have proof irrelevance
-- data _\/_ (P Q : Set) : Set where
-- orIL : P -> P \/ Q
-- ... |
{-# OPTIONS --rewriting --confluence-check -v rewriting:80 #-}
open import Agda.Builtin.Equality
postulate
decorate : โ{a} (A : Set a) โ Set a
rewriteMe : โ{a b} {A : Set a} {B : A โ Set b}
โ decorate ((x : A) โ B x) โก (decorate A โ โ x โ decorate (B x))
{-# BUILTIN REWRITE _โก_ #-}
{-# R... |
module interactiveProgramsAgda where
open import NativeIO
open import Function
open import Size
open import Data.Maybe.Base
record IOInterface : Setโ where
field Command : Set
Response : (c : Command) โ Set
open IOInterface public
mutual
record IO (I : IOInterface) (i : Size) (A : Set) : Set where
... |
module _ where
open import Common.Prelude hiding (_>>=_)
open import Common.Reflection
open import Common.Equality
open import Imports.StaleMetaLiteral
macro
unquoteMeta : Meta โ Tactic
unquoteMeta m = give (meta m [])
thm : unquoteMeta staleMeta โก 42
thm = refl
|
{-# OPTIONS --cubical #-}
module Data.Option.Equiv.Path where
import Lvl
open import Data
open import Data.Option
open import Data.Option.Functions
open import Data.Option.Equiv
open import Functional
open import Structure.Function.Domain
open import Structure.Operator
open import Structure.Relator
open import T... |
module Cats.Category.Cat.Facts.Terminal where
open import Cats.Category
open import Cats.Category.Cat using (Cat)
open import Cats.Category.One using (One)
instance
hasTerminal : โ lo la lโ โ HasTerminal (Cat lo la lโ)
hasTerminal lo la lโ = record
{ One = One lo la lโ
; isTerminal = _
}
|
{-# OPTIONS --safe #-}
module Cubical.Homotopy.WedgeConnectivity where
open import Cubical.Foundations.Everything
open import Cubical.Data.Nat
open import Cubical.Data.Sigma
open import Cubical.HITs.Susp
open import Cubical.HITs.Truncation as Trunc
open import Cubical.Homotopy.Connected
module WedgeConnectivity {โ โ'... |
module #13 where
{-
Using propositions-as-types, derive the double negation of the principle of excluded
middle, i.e. prove not (not (P or not P)).
-}
open import Data.Sum
open import Relation.Nullary
excluded-middle : (P : Set) โ ยฌ (ยฌ (P โ (ยฌ P)))
excluded-middle P z = z (injโ (ฮป x โ z (injโ x)))
|
-- Andreas, 2015-06-24 Parsing of forall should be like lambda
open import Common.Prelude
open import Common.Product
test : โค ร โ (B : Set) โ B โ B -- should parse
test = _ , ฮป B b โ b
test1 : โค ร forall (B : Set) โ B โ B -- should parse
test1 = _ , ฮป B b โ b
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cohomology.Theory
open import cw.CW
module cw.cohomology.ZerothCohomologyGroupOnDiag {i} (OT : OrdinaryTheory i)
(โskel : โSkeleton {i} 0) (ac : โhas-cells-with-choice 0 โskel i) where
open OrdinaryTheory OT
open import cw.cohomology.TipAndAugme... |
module Data.Nat.Properties.Extra where
open import Data.Nat.Base
open import Data.Nat.Properties
open import Relation.Binary.PropositionalEquality
open โก-Reasoning
open import Data.Empty
โคโฒ-unique : โ {i u} (p q : i โคโฒ u) โ p โก q
โคโฒ-unique โคโฒ-refl โคโฒ-refl = refl
โคโฒ-unique โคโฒ-refl (โคโฒ-step q) = โฅ-elim (1+nโฐn (โคโฒโโค q)... |
module Data.List.First {โ}{A : Set โ} where
open import Data.Product
open import Data.List
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Level
open import Function
open import Data.Empty
-- proof that an element is the first in a vector to satisfy the predicate B
data Firs... |
------------------------------------------------------------------------
-- Example: Left recursive expression grammar
------------------------------------------------------------------------
module TotalRecognisers.LeftRecursion.Expression where
open import Codata.Musical.Notation
open import Data.Bool hiding (_โง_; ... |
{-# OPTIONS --without-K --safe #-}
module Math.NumberTheory.Summation.Generic.Properties.Lemma where
-- agda-stdlib
open import Data.Nat
open import Data.Nat.Properties
open import Data.Nat.Solver
open import Relation.Binary.PropositionalEquality
open import Function.Base
lemmaโ : โ m n โ 2 + m + n โก suc m + suc n
l... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.Logic where
import Cubical.Data.Empty as โฅ
open import Cubical.Data.Prod as ร using (_ร_; _,_; projโ; projโ)
open import Cubical.Data.Sum as โ using (_โ_)
open import Cubical.Data.Unit
open import Cubical.Foundations.Prelude
open import Cubical.HITs.Propos... |
module Monads.WriterT where
open import Class.Monad
open import Class.MonadTrans
open import Class.Monad.Except
open import Class.Monad.State
open import Class.Monad.Writer
open import Class.Monoid
open import Data.Product
open import Data.Unit.Polymorphic
open import Function
open import Level
private
variable
... |
{-# OPTIONS --without-K #-}
module Pi1Cat where
-- Proving that Pi with one level of interesting 2 path structure is a
-- symmetric rig 2-groupoid
open import Level using () renaming (zero to lzero)
open import Data.Unit using (tt)
open import Data.Product using (_,_)
open import Function using (flip)
open import C... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Sums of nullary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Nullary.Sum where
open import Data.Sum
open import Data.Emp... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to addition of integers
------------------------------------------------------------------------
module Data.Integer.Addition.Properties where
open import Algebra
import Algebra.FunctionPrope... |
module Structure.Operator.Vector.Proofs where
open import Data.Tuple
open import Functional
open import Function.Equals
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Setoid
open import Structure.Operator
open import Structure.Operator.Field
open imp... |
-- ASR (2016-02-15). In the Makefile in test/compiler founded in the
-- 2.4.2.3 tag, this test used the options `+RTS -H1G -M1.5G -RTS`.
module AllStdLib where
-- Ensure that the entire standard library is compiled.
import README
open import Data.Unit.Base
open import Data.String
open import IO
import IO.Primitive a... |
module maybe where
open import level
open import eq
open import bool
----------------------------------------------------------------------
-- datatypes
----------------------------------------------------------------------
data maybe {โ}(A : Set โ) : Set โ where
just : A โ maybe A
nothing : maybe A
-----------... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Properties.Reduction {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.Typed.RedSteps
open import Definition.Lo... |
module Preliminary where
open import Prelude public
โ_ : โ {a b} {A : Set a} (B : A โ Set b) โ Set (a โ b)
โ_ = ฮฃ _
data IsYes {a} {P : Set a} : Dec P โ Set a where
yes : (p : P) โ IsYes (yes p)
getProof : โ {a} {P : Set a} โ {d : Dec P} โ IsYes d โ P
getProof (yes p) = p
add-zero : โ n โ n โก n ... |
-- Andreas, 2014-08-19, issue reported by zcarterc
-- {-# OPTIONS -v tc.meta.assign:10 -v tc.constr.findInScope:10 #-}
-- {-# OPTIONS -v tc.constr.findInScope:49 #-}
-- {-# OPTIONS --show-implicit #-}
module Issue1254 where
open import Agda.Primitive
record Inhabited {i : Level} (carrier : Set i) : Set i where
fiel... |
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Group.EilenbergMacLane1 where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.HalfAdjoint
open impo... |
data A (B : Set) : Set where
module C where
record D : Set where
module E (F : Set) (G : A F) where
open C public using (module D)
module H (I : Set) (J : A I) where
open E I J using ()
|
module noetherian where
open import sn-calculus
open import Esterel.Lang
open import Esterel.Lang.Properties
open import Esterel.Context
open import Esterel.Context.Properties
open import Esterel.Environment
open import Esterel.Variable.Signal as Signal using (Signal)
open import Esterel.Variable.Shared as SharedVar ... |
{- 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
-}
-- This is a selection of useful functions and definitions
-- from the s... |
{-
Please do not move this file. Changes should only be made if
necessary.
This file contains pointers to the code examples and main results from
the paper:
Synthetic Cohomology Theory in Cubical Agda
-}
-- The "--safe" flag ensures that there are no postulates or
-- unfinished goals
{-# OPTIONS --cubical --no-imp... |
{-# OPTIONS --cubical --safe #-}
module Data.List.Mapping.StringMap where
open import Data.String using (String; stringOrd)
open import Data.List.Mapping stringOrd public
open import Prelude
open import Data.Maybe
-- example : Record (โ
[ "name" ]๏ธ String [ "age" ]๏ธ โ [ "occ" ]๏ธ Bool)
-- example =
-- โ
[ "age" ]โ... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Data.NatMinusOne.Base where
open import Cubical.Core.Primitives
open import Cubical.Data.Nat
open import Cubical.Data.Empty
open import Cubical.Data.Int.Base using (โค; pos; negsuc; -_)
record โโโ : Typeโ where
constructor -1+_
fiel... |
module Luau.Syntax where
open import Agda.Builtin.Equality using (_โก_)
open import Agda.Builtin.Float using (Float)
open import Properties.Dec using (โฅ)
open import Luau.Var using (Var)
open import Luau.Addr using (Addr)
open import Luau.Type using (Type)
infixr 5 _โ_
data Annotated : Set where
maybe : Annotated
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Component functions of permutations found in `Data.Fin.Permutation`
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Fin.Permutation.Compon... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.Embedding where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Transport
open... |
module ModuleDoesntExport where
module A where
postulate C : Set
open A using (B; module P) renaming (D to C)
|
{-# OPTIONS --without-K --safe #-}
open import Level using (Level)
open import Relation.Binary.PropositionalEquality hiding (Extensionality)
open โก-Reasoning
open import Data.Nat using (โ; suc; zero; _+_)
open import Data.Nat.Properties
open import Data.Product using (_,_)
open import Data.Vec using (Vec; foldr; zi... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed M-types (the dual of indexed W-types aka Petersson-Synek
-- trees).
------------------------------------------------------------------------
module Data.M.Indexed where
open import Level
open import Coi... |
{-# OPTIONS --without-K #-}
module function.isomorphism.two-out-of-six where
open import sum
open import equality
open import function.core
open import function.isomorphism.core
open import function.overloading
open import hott.equivalence.core
open import hott.equivalence.biinvertible
module two-out-of-six
... |
module _ {I : Set} where
postulate
f : โ {T : I โ Set} {i} โ T i โ Set
variable
i : I
T : I โ Set
v : T i
t : f v
t = {!!}
|
{-
Definition of finite sets
A set is finite if it is merely equivalent to `Fin n` for some `n`. We
can translate this to code in two ways: a truncated sigma of a nat and
an equivalence, or a sigma of a nat and a truncated equivalence. We
prove that both formulations are equivalent.
-}
{-# OPTIONS --cubical --no-im... |
module Data.Collection.Core where
open import Data.List public using (List; []; _โท_)
open import Data.String public using (String; _โ_)
open import Level using (zero)
open import Function using (flip)
open import Relation.Nullary
open import Relation.Nullary.Negation
open import Relation.Nullary.Decidable renaming (m... |
------------------------------------------------------------------------
-- Parser monad
------------------------------------------------------------------------
open import Relation.Binary
open import Relation.Binary.OrderMorphism
open import Relation.Binary.PropositionalEquality hiding (poset)
import Relation.Binary... |
module Prelude where
infixr 50 _,_
infixl 40 _โ_
infix 30 _โ_
data _ร_ (A B : Set) : Set where
_,_ : A -> B -> A ร B
data List (A : Set) : Set where
ฮต : List A
_โ_ : List A -> A -> List A
data _โ_ {A : Set}(x : A) : List A -> Set where
hd : forall {xs} -> x โ xs โ x
tl : forall {y xs} -> x... |
-- This module introduces the basic structure of an Agda program.
{- Every Agda file contains a single top-level module. To make it possible to
find the file corresponding to a particular module, the name of the file
should correspond to the name of the module. In this case the module
'Introduction.Basics' i... |
module nat-division where
open import bool
open import bool-thms
open import eq
open import neq
open import nat
open import nat-thms
open import product
open import product-thms
open import sum
{- a div-result for dividend x and divisor d consists of the quotient q, remainder r, and a proof that q * d + r = x -}
div-... |
-- You can't use the same name more than once in the same scope.
module ClashingDefinition where
postulate
X : Set
X : Set
Y = X
|
------------------------------------------------------------------------
-- An LTS from Sectionย 6.2.5 of "Enhancements of the bisimulation
-- proof method" by Pous and Sangiorgi
------------------------------------------------------------------------
{-# OPTIONS --safe #-}
open import Prelude
module Labelled-transit... |
-- Tests unreachable clause detection
module Unreachable where
data C : Set where
cโ : C
cโ : C -> C
data Bool : Set where
t : Bool
f : Bool
maj : Bool -> Bool -> Bool -> Bool
maj f f f = f
maj t f x = x
maj f x t = x
maj x t f = x
maj t t t = t
unreachable : C -> C
unreachable (cโ x) = cโ
unreachable ... |
{-# OPTIONS --guardedness #-}
record _โ_ {A : Set} (xs : Stream A) (ys : Stream A) : Set where
coinductive
field
hd-โ : hd xs โก hd ys
tl-โ : tl xs โ tl ys
even : โ {A} โ Stream A โ Stream A
hd (even x) = hd x
tl (even x) = even (tl (tl x))
odd : โ {A} โ Stream A โ Stream A
odd x = even (tl x)
split : โ ... |
module exampleTypeAbbreviations where
postulate A : Set
A2 : Set
A2 = A -> A
A3 : Set
A3 = A2 -> A2
a2 : A2
a2 = \x -> x
a3 : A3
a3 = \x -> x |
------------------------------------------------------------------------
-- Theorems relating the coinductive definition of the delay
-- monad to the alternative one and to another type
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --sized-types #-}
open import ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Object.NaturalNumber.Properties.F-Algebras where
open import Level
open import Function using (_$_)
open import Categories.Category
open import Categories.Category.Construction.F-Algebras
open import Categories.Category.Cocartesian
open import Categories.Functor
op... |
{-
This file contains:
- Properties of set truncations
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.SetTruncation.Properties where
open import Cubical.HITs.SetTruncation.Base
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundation... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.