text
stringlengths
4
690k
{-# OPTIONS --cubical --safe #-} module Cubical.Data.NatMinusTwo where open import Cubical.Data.NatMinusTwo.Base public open import Cubical.Data.NatMinusTwo.Properties public open import Cubical.Data.NatMinusTwo.ToNatMinusOne using (1+_; ℕ₋₁→ℕ₋₂; -1+Path) public
------------------------------------------------------------------------------ -- Mendelson's substitution ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# ...
{-# OPTIONS --cubical-compatible #-} postulate A : Set P : A → Set Q : {x : A} → P x → P x → Set variable B : Set @0 q : B postulate F : ∀ p → Q p q → Set Test : {@0 x : A} ({q} p : P x) (q′ : Q p q) → Set Test = F
{-# OPTIONS --prop --rewriting #-} open import Calf.CostMonoid module Calf (costMonoid : CostMonoid) where open CostMonoid costMonoid open import Calf.Prelude public open import Calf.Metalanguage public open import Calf.PhaseDistinction public open import Calf.Step costMonoid public open import Calf.Noninterferenc...
open import MLib.Finite module MLib.Finite.Properties {c ℓ} (finiteSet : FiniteSet c ℓ) where open import MLib.Prelude import Data.Fin.Permutation as Perm import Relation.Binary as B open FE using (cong) open LeftInverse using () renaming (_∘_ to _ⁱ∘_) open Algebra using (IdempotentCommutativeMonoid) open Table hi...
open import Common.Prelude hiding (_>>=_) open import Common.Reflection open import Common.Equality module Issue2782 where module Interval where private data I' : Set where Izero' : I' Ione' : I' I : Set I = I' Izero : I Izero = Izero' Ione : I Ione = Ione' {-- postulate Ise...
open import Agda.Builtin.Reflection using (Name) -- See Tactic.Nat for a description of the various tactics. module Tactic.Nat.Generic (`≤ `toLeq `fromLeq : Name) where open import Prelude open import Tactic.Reflection open import Tactic.Nat.Induction using (nat-induction) open import Tactic.Nat.Subtract using (aut...
module Issue550 where data Box (A : Set) : Set where [_] : A → Box A postulate A : Set B : Set b : B f : B -> A ⋯ : {{a : A}} → A ⋯ {{a = a}} = a test : Box A test = let a : A a = f b in [ ⋯ ] -- should succeed. Old message: -- No variable of type A was found in scope. -- when checking that th...
{-# OPTIONS --without-K #-} open import Base open import HLevel module Homotopy.Extensions.ToPropToConstSet {i} {A B : Set i} ⦃ B-is-set : is-set B ⦄ (f : A → B) (f-is-const : ∀ a₁ a₂ → f a₁ ≡ f a₂) where open import Homotopy.Truncation open import Homotopy.Skeleton private skel : Set i skel = π₀ ...
-- The ATP pragma with the role <axiom> can be used with postulates. module ATPAxiomPostulates where postulate D : Set zero : D succ : D → D N : D → Set postulate zN : N zero sN : ∀ {n} → N n → N (succ n) {-# ATP axiom zN #-}
{-# OPTIONS --without-K --safe #-} module Tools.List where open import Data.List public using (List; []; _∷_) module L where open import Data.List public
------------------------------------------------------------------------------ -- Conversion rules for the greatest common divisor ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-univer...
-- Andreas, 2019-06-25, issue #3855 reported by nad -- Constraint solver needs to respect erasure. open import Agda.Builtin.Bool module _ where record RB (b : Bool) : Set where bPar : Bool bPar = b myBPar : (@0 b : Bool) → RB b → Bool myBPar b r = RB.bPar {b = {!b!}} r -- should be rejected
{-# OPTIONS --cubical #-} module Type.Cubical.Quotient where open import Functional import Lvl open import Structure.Type.Identity open import Type.Cubical open import Type.Cubical.Path.Equality open import Type open import Syntax.Function private variable ℓ ℓₗ : Lvl.Level private variable T A B : Type{ℓ} priva...
-- Solver for Category {-# OPTIONS --without-K --safe #-} open import Categories.Category module Experiment.Categories.AnotherSolver.Category {o ℓ e} (𝒞 : Category o ℓ e) where open import Level open import Relation.Binary using (Rel) import Function.Base as Fun open import Categories.Functor renaming (id to id...
module Luau.TypeNormalization where open import Luau.Type using (Type; nil; number; string; boolean; never; unknown; _⇒_; _∪_; _∩_) -- Operations on normalized types _∪ᶠ_ : Type → Type → Type _∪ⁿˢ_ : Type → Type → Type _∩ⁿˢ_ : Type → Type → Type _∪ⁿ_ : Type → Type → Type _∩ⁿ_ : Type → Type → Type -- Union of functio...
-- Andreas, 2013-10-21 -- There was a bug in Rules/Builtin such that NATEQUALS' equations -- would be checked at type Nat instead of Bool. -- This bug surfaced only because of today's refactoring in Conversion, -- because then I got a strange unsolved constraint true == true : Nat. module NatEquals where import Comm...
{-# OPTIONS --cubical --safe #-} module Data.List.Sugar where open import Data.List.Base open import Prelude [_] : A → List A [ x ] = x ∷ [] pure : A → List A pure = [_] _>>=_ : List A → (A → List B) → List B _>>=_ = flip concatMap _>>_ : List A → List B → List B xs >> ys = xs >>= const ys _<*>_ : List (A → B) →...
{-# OPTIONS --cubical --safe --postfix-projections #-} module Data.Dyck.Payload where open import Prelude open import Data.Nat using (_+_) open import Data.Vec.Iterated using (Vec; _∷_; []; foldlN; head) private variable n : ℕ -------------------------------------------------------------------------------- --...
-- Andreas, 2019-11-08, issue #4154 reported by Yashmine Sharoda. -- Warn if a `renaming` clause clashes with an exported name -- (that is not mentioned in a `using` clause). module _ where module M where postulate A B : Set -- These produce warnings (#4154): module N = M renaming (A to B) open M renaming (A...
{-# OPTIONS --safe #-} module Issue2442-postulate where postulate A : Set
{-# OPTIONS --without-K #-} module FT-Nat where open import Data.Empty open import Data.Unit open import Data.Nat renaming (_⊔_ to _⊔ℕ_) open import Data.Sum renaming (map to _⊎→_) open import Data.Product import Data.Fin as F open import Data.Vec import Data.List as L open import Function renaming (_∘_ to _○_) open ...
-- Andreas, 2016-12-31, re issue #1976 -- Allow projection pattern disambiguation by parameters {-# OPTIONS --allow-unsolved-metas #-} postulate A B : Set module M (_ : Set) where record R : Set₂ where field F : Set₁ open R public module Succeeds where open M _ open M B test : M.R B F tes...
module 747Connectives where -- Library import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq.≡-Reasoning open import Data.Nat using (ℕ) open import Function using (_∘_) -- Copied from 747Isomorphism. postulate extensionality : ∀ {A B : Set} {f g : A → B} → (∀ (x : A) → f x ≡ g x...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.DunceCap.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.GroupoidLaws open import Cubical.HITs.S1 using (S¹; base) import Cubical.HITs.S1 as S¹ open import Cubical.HITs.MappingCones -- definition of the dunce ...
module agda where open import IO main = run (putStrLn "Fuck You Github")
module MLib.Fin.Parts.Nat.Simple where open import MLib.Prelude open import MLib.Fin.Parts.Core open import MLib.Fin.Parts.Nat open Nat using (_*_; _+_; _<_) open Fin using (toℕ; fromℕ≤) open Table repl : ∀ n → ℕ → Table ℕ n repl _ = replicate -- abstract -- TODO: why does this break reduction later? sum-replicate-...
module RandomAccessList.Zeroless.Core where open import BuildingBlock.BinaryLeafTree using (BinaryLeafTree; Node; Leaf) open import Data.Nat open import Data.Nat.Etc -- parameterized by the level of the least significant digit data 1-2-RAL (A : Set) : ℕ → Set where [] : ∀ {n} ...
------------------------------------------------------------------------ -- Second-order abstract syntax -- -- Formalisation of second-order abstract syntax with variable binding. ------------------------------------------------------------------------ module Everything where -- Public exports of modules and defini...
open import Coinduction using ( ∞ ; ♭ ; ♯_ ) open import Data.Empty using ( ⊥ ) open import Data.Bool using ( Bool ; true ; false ; if_then_else_ ) open import Data.Product using ( ∃ ; _×_ ; _,_ ; ,_ ) open import Data.Strict using ( Strict ; ! ) open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ ) open import Data.Unit us...
{-# OPTIONS --safe #-} module Definition.Conversion.Weakening where open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Weakening open import Definition.Conversion import Tools.PropositionalEquality as PE mutual -- Wea...
-- {-# OPTIONS --show-implicit --show-irrelevant #-} module Data.QuadTree.LensProofs.Valid-LensAtLocation where open import Haskell.Prelude renaming (zero to Z; suc to S) open import Data.Lens.Lens open import Data.Logic open import Data.QuadTree.InternalAgda open import Agda.Primitive open import Data.Lens.Proofs.Len...
open import Relation.Binary using (Rel) open import Algebra.Bundles using (CommutativeRing) open import Algebra.Module.Morphism.Structures open import Algebra.Module.Normed using (NormedModule) module Algebra.Module.Limit {r ℓr} {CR : CommutativeRing r ℓr} (open CommutativeRing CR using () renaming (Carrier to X)...
open import FRP.JS.Geolocation.Angle using ( Angle ) renaming ( toString to toString° ) open import FRP.JS.String using ( String ; _++_ ) module FRP.JS.Geolocation.Coords where -- Not including the optional fields yet. record Coords : Set where field latitude : Angle longitude : Angle open Coords public ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Non-dependent product combinators for setoid equality preserving -- functions ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Product.Func...
{-# OPTIONS --cubical-compatible #-} open import Agda.Builtin.Equality postulate A : Set B : A → Set data H (@0 A : Set) : Set where con : (@0 x : A) → H A data G : Set where con : (@0 x : A) → (@0 b : B x) → G data D : Set where con : (@0 x : A) → B x → D
module Graph (Node : Set) where open import Basics data Edge : Set where edge : Node -> Node -> Edge Graph : Set Graph = List Edge Step : Graph -> Node -> Node -> Set Step G x y = Elem (edge x y) G infixr 40 _<>_ data Path (G : Graph) : Node -> Node -> Set where nul : forall {x} -> Path G x x _<>_ : f...
module Golden.Insertion where open import Agda.Builtin.Nat open import Agda.Builtin.List open import Agda.Builtin.Bool insert : Nat -> List Nat -> List Nat insert a [] = a ∷ [] insert x (a ∷ b) with x < a ... | true = x ∷ a ∷ b ... | false = a ∷ (insert x b) lst : List Nat lst = 2 ∷ [] slst : List Nat slst = insert...
module Spire.Examples.Standard where ---------------------------------------------------------------------- data ℕ : Set where zero : ℕ suc : (n : ℕ) → ℕ data Vec (A : Set) : ℕ → Set where nil : Vec A zero cons : (n : ℕ) (a : A) (xs : Vec A n) → Vec A (suc n) ------------------------------------------------...
{-# OPTIONS --safe --warning=error --without-K #-} open import Functions.Definition open import Functions.Lemmas open import LogicalFormulae open import Numbers.Naturals.Definition open import Numbers.Naturals.Order open import Sets.FinSet.Definition module Sets.FinSet.Lemmas where fneSymmetric : {n : ℕ} → {a b : Fi...
{-# OPTIONS --without-K --rewriting #-} module C1.LEM where open import Basics open import Bool open import LEM open import NotNot open import Flat open import Sharp open import C1.Base open import lib.NType2 -- UNFINISHED due to ♯-ptwise problems ♯-prop-is-¬¬ : ∀ {i}(P : PropT i) (p : (P...
------------------------------------------------------------------------ -- Products implemented using records ------------------------------------------------------------------------ -- It it ever becomes convenient to pattern match on records I might -- make this the default implementation of products. module Data....
------------------------------------------------------------------------ -- The Agda standard library -- -- Usage examples of the categorical view of the Sum type ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Sum.Categorical.Examples where ope...
{-# OPTIONS --without-K --safe #-} module Data.Empty.Base where open import Level data ⊥ : Type where infix 4.5 ¬_ ¬_ : Type a → Type a ¬ A = A → ⊥ ⊥-elim : ⊥ → A ⊥-elim ()
module btls-certs where open import Data.Word8 using (Word8) renaming (primWord8fromNat to to𝕎) open import Data.ByteString using (ByteString; Strict; Lazy; pack) open import Data.ByteString.Primitive using (∣List∣≡∣Strict∣) open import Data.ByteVec using (ByteVec) open import Data.Nat using (ℕ; zero; suc; _<_; z≤n; ...
module Functor where open import Category as Cat record Functor (ℂ ⅅ : Cat) : Set1 where field F : Cat.Obj ℂ -> Cat.Obj ⅅ map : {A B : Cat.Obj ℂ} -> Cat._─→_ ℂ A B -> Cat._─→_ ⅅ (F A) (F B) mapEq : {A B : Cat.Obj ℂ}{f g : Cat._─→_ ℂ A B} -> Category._==_ ℂ f g -> C...
-- Andreas, 2015-07-22 -- {-# OPTIONS -v tc.term:20 -v tc.meta.assign:10 -v tc.conv.coerce:10 #-} open import Common.Size data Nat (i : Size) : Set where suc : (j : Size< i) → Nat j → Nat i min : ∀ i → Nat i → Nat i → Nat i min i (suc j n) (suc k m) = suc i' (min i' n m) where i' = _ -- Size consistency check...
open import FRP.JS.Nat using ( ℕ ) open import FRP.JS.String using ( String ) module FRP.JS.Geolocation.Angle where postulate Angle : Set _° : ℕ → Angle _′ : ℕ → Angle _″ : ℕ → Angle _+_ : Angle → Angle → Angle toString : Angle → String {-# COMPILED_JS _° function(x) { return ((x + 180) % 360) - 180; } #...
-- Andreas, 2018-11-03, issue #3361 -- -- Empty variable blocks should trigger warning rather than parse error. variable -- Expected warning: -- Empty variable block.
------------------------------------------------------------------------ -- The Agda standard library -- -- Booleans ------------------------------------------------------------------------ module Data.Bool where open import Function open import Data.Unit using (⊤) open import Data.Empty open import Level open import...
{-# OPTIONS --safe #-} module Definition.Typed.Consequences.Inversion where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.Consequences.Syntactic open import Definition.Typed.Consequences.Substitution open import Tools.Product import ...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Unit {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definitio...
module z03-natural-numbers where open import bool open import bool-thms using (𝔹-contra) open import eq open import level -- p 50 data ℕ : Set where zero : ℕ suc : ℕ → ℕ -- p 51 {-# BUILTIN NATURAL ℕ #-} ------------------------- _+_ : ℕ → ℕ → ℕ zero + n = n suc m + n = suc (m + n) -- recursiv...
{- Denotational semantics of the contexts in the category of temporal types. -} module Semantics.Context where open import CategoryTheory.Categories open import CategoryTheory.Instances.Reactive open import CategoryTheory.Functor open import CategoryTheory.Comonad open import CategoryTheory.NatTrans open import Tempo...
module Examples where open import Prelude open import Star open import Modal El : Set -> Rel True El A _ _ = A List : Set -> Set List A = Star (El A) _ _ Nat = List True zero : Nat zero = ε suc : Nat -> Nat suc n = _ • n -- Vectors Vec : Set -> Nat -> Set Vec A = All (\_ -> A) infixr 40 _::_ _::_ : {A : Set}{...
module Control.Monad.Maybe where open import Prelude open import Control.Monad.Zero open import Control.Monad.Transformer record MaybeT {a} (M : Set a → Set a) (A : Set a) : Set a where no-eta-equality constructor maybeT field runMaybeT : M (Maybe A) open MaybeT public module _ {a} {M : Set a → Set a} where ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020 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 Data.Nat open import Data.Maybe open import Data.Char open import D...
{-# 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 Numeral.Natural.Oper.Modulo.Proofs where import Lvl open import Data open import Data.Boolean.Stmt open import Functional open import Logic open import Logic.Propositional open import Logic.Predicate open import Numeral.Natural open import Numeral.Natural.Oper open import Numeral.Natural.Oper.Comparisons open i...
{-# OPTIONS --universe-polymorphism #-} module Categories.Category where open import Level open import Relation.Binary using (Rel; IsEquivalence; module IsEquivalence; Reflexive; Symmetric; Transitive) renaming (_⇒_ to _⊆_) open import Function using (flip) open import Categories.Support.PropositionalEquality open im...
-- Andreas, 2016-07-20 -- With clauses should follow the parent clause -- what copattern style (prefix/postfix) concerns. record R : Set₂ where field f : Set₁ test : R test .R.f with R -- post-fix here R.f test | _ = Set -- pre-fix there -- That's not nice, thus, it is an error.
------------------------------------------------------------------------------ -- Testing the translation of definitions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymor...
open import Level using (_⊔_) open import Algebra using (module CommutativeSemiring; module DistributiveLattice) open import Function using (id; const; _∘_; _$_) open import Coinduction using (∞; ♯_; ♭) ...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.HomotopyGroup.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels import Cubical.Foundations.GroupoidLaws as GL open import Cubical.Data.Nat open import Cubical.Data.Group.Base open import Cubical.HITs.SetTruncation Pointed ...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Bool open import lib.types.FunctionSeq open import lib.types.Pointed open import lib.types.Suspension.Core open import lib.types.Suspension.Flip open import lib.types.Suspension.Iterated open import lib.types.Suspension.IteratedEquivs...
open import Agda.Builtin.Bool open import Agda.Builtin.Equality open import Agda.Builtin.Float NaN : Float NaN = primFloatDiv 0.0 0.0 -NaN : Float -NaN = primFloatNegate NaN NaN≮NaN : primFloatNumericalLess NaN NaN ≡ false NaN≮NaN = refl -NaN≮-NaN : primFloatNumericalLess -NaN -NaN ≡ false -NaN≮-NaN = refl NaN≮-N...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Monoid.Submonoid where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Algebra open import Cubical.Algebra.Monoid.Morphism op...
open import Preliminaries open import Source-lang module Examples-Source where ----- examples nexp = [] |- nat dbl-test4 : nexp dbl-test4 = app dbl (suc (suc z)) four : nexp four = suc (suc (suc (suc z))) eqs4 : evals dbl-test4 four ((0c +c 0c) +c (0c +c (1c +c (0c +c (0c +c (1c +c (0c +c (0c +c (1c +c ...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.FunctionSeq open import lib.types.Nat open import lib.types.Pointed open import lib.types.Suspension.Core open import lib.types.Suspension.Iterated module lib.types.Suspension.IteratedEquivs where Susp^-+ : ∀ {i} (m n : ℕ) {A : Type...
open import Issue481PonderBase using (List) module Issue481PonderImportMe (as bs : List) where
-- Andreas, 2018-06-19, issue #3130 -- Produce parenthesized dot pattern .(p) instead of .p -- when is a projection. -- {-# OPTIONS -v reify.pat:80 #-} record R : Set₁ where field p : Set open R data D : (R → Set) → Set₁ where c : D p test : (f : R → Set) (x : D f) → Set₁ test f x = {!x!} -- split on x -- Exp...
-- 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.Base where open import Cubical.Core.Everything open import Cubical.Data.Bool open import Cubical.Data.Nat hiding (_+_ ; _·_) renaming (isEven to isEv...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core using (Category) -- Defines BinaryProducts -- for when a Category has all Binary Products module Categories.Category.BinaryProducts {o ℓ e} (𝒞 : Category o ℓ e) where open import Level hiding (suc) open import Data.Product using (uncurry) ope...
open import Data.Nat using (ℕ) renaming (_+_ to _+ᵢ_; _≤?_ to _≤?ᵢ_) open import Agda.Builtin.Float renaming (primFloatPlus to _+ᵣ_; primFloatLess to _≤?ᵣ_) open import Data.Bool using (Bool; true; false; not; _∧_) open import Data.Sum using (inj₁; inj₂; _⊎_) open import Data.Product using (_×_; _,_; -,_; _-...
module Test where open import Agda.Primitive f : Level -> Level f x = x
{-# OPTIONS --without-K #-} module container where import container.core import container.fixpoint import container.equality import container.m import container.w
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.EilenbergMacLane open import homotopy.EilenbergMacLaneFunctor open import cohomology.CupProduct.OnEM.CommutativityInLowDegrees module cohomology.CupProduct.OnEM.CommutativityInLowDegrees2 {i} {j} (G : AbGroup i) (H : AbGroup j) where priva...
------------------------------------------------------------------------ -- Modules that are not safe because they use --sized-types ------------------------------------------------------------------------ {-# OPTIONS --without-K --sized-types #-} module README.Unsafe.Sized-types where -- Support for sized types. i...
module unit where open import level open import eq data ⊤ : Set where triv : ⊤ {-# COMPILED_DATA ⊤ () () #-} single-range : ∀{U : Set}{g : U → ⊤} → ∀{u : U} → g u ≡ triv single-range {U}{g}{u} with g u ... | triv = refl
-- Reported by nad, 2018-12-13. -- The option --no-sized-types should turn off sized types {-# OPTIONS --no-sized-types #-} {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZELT Size<_ #-} record Stream (A : Set) (i : Size) : Set where coinductive field head : A tail : {j : Size< i} → Stream A j open Stream ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Operations on nullary relations (like negation and decidability) ------------------------------------------------------------------------ -- Some operations on/properties of nullary relations, i.e. sets. {-# OP...
{-# OPTIONS --sized-types #-} open import Relation.Binary.Core module Quicksort {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Bound.Total A open import Bound.Total.Order _≤_ open import Data.List open import Data.Product open import Data.Sum open import SBList ...
{-# OPTIONS --safe #-} module Confluence where open import Relation.Binary.PropositionalEquality using (_≡_; refl) cong : ∀ {A B : Set} {x y : A} (f : A → B) → x ≡ y → f x ≡ f y cong f refl = refl data ℕ : Set where Z : ℕ S : ℕ → ℕ add : ℕ → ℕ → ℕ add n Z = n add n (S m) = S (add n m) _ : ∀ {a : ℕ} → add a ...
module Prelude.Nat.Core where open import Prelude.Unit open import Prelude.Empty open import Prelude.Number open import Prelude.Semiring open import Agda.Builtin.Nat public renaming ( _+_ to _+N_ ; _*_ to _*N_ ; _-_ to _-N_ ; _==_ to eqNat ; _<...
import Lvl module Function.Names where open import Functional.Dependent open import Logic.Predicate open import Structure.Setoid open import Type private variable ℓ ℓₒ ℓₒ₁ ℓₒ₂ ℓₒ₃ ℓₗ ℓₗ₁ ℓₗ₂ ℓₗ₃ : Lvl.Level module _ {A : Type{ℓₒ₁}} {B : A → Type{ℓₒ₂}} ⦃ _ : ∀{a} → Equiv{ℓₗ₃}(B(a)) ⦄ where -- Extensional equa...
{-# OPTIONS --cubical #-} module Data.Boolean.Equiv.Path where open import Data open import Data.Boolean open import Data.Boolean.Stmt open import Functional open import Logic.Propositional open import Structure.Relator.Properties open import Structure.Relator open import Type.Cubical.Path.Equality open import Type.C...
{- 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.Impl.OBM.Logging.Logging...
open import Level using (_⊔_; suc) open import Data.Empty using (⊥) open import Relation.Binary using (Rel; Decidable; DecSetoid) module AKS.Algebra.Bundles where open import AKS.Nat using (ℕ) open import Algebra.Core using (Op₁; Op₂) open import Algebra.Bundles using (CommutativeRing) public open import AKS.Algeb...
module Languages.ILL.Syntax where open import level open import bool open import nat open import unit open import empty open import eq open import sum open import product open import Utils.HaskellTypes open import Utils.HaskellFunctions open import Languages.ILL.TypeSyntax True : Set True = ⊤{lzero} False : Set Fal...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.PtdAdjoint module homotopy.SuspAdjointLoop {i} where private SuspFunctor : PtdFunctor i i SuspFunctor = record { obj = ⊙Susp; arr = ⊙Susp-fmap; id = ⊙Susp-fmap-idf; comp = ⊙Susp-fmap-∘} LoopFunctor : PtdFunctor i i ...
------------------------------------------------------------------------ -- Code related to the paper Beating the Productivity Checker Using -- Embedded Languages -- -- Nils Anders Danielsson ------------------------------------------------------------------------ module Productivity where ---------------------------...
-- Andreas, 2011-04-14 -- {-# OPTIONS -v tc.cover:20 -v tc.lhs.unify:20 #-} module Issue291a where open import Imports.Coinduction data _≡_ {A : Set}(a : A) : A -> Set where refl : a ≡ a data RUnit : Set where runit : ∞ RUnit -> RUnit j : (u : ∞ RUnit) -> ♭ u ≡ runit u -> Set j u () -- needs to fail (reports a ...
open import Agda.Primitive using (_⊔_ ; lsuc ; Level) import Categories.Category as Category import Categories.Category.Cartesian as Cartesian open import Categories.Object.Terminal using (Terminal) open import Categories.Object.Product using (Product) open import MultiSorted.AlgebraicTheory import MultiSorted.Produc...
{-# OPTIONS --cubical --safe #-} module Interpreter where open import Function.Base using (_$_) open import FreeReader -- Runs it in the reader monad runFree : ∀ {R A} → R → FreeReader R A → A runFree r (Pure x) = x runFree r (Bind x f) = runFree r $ f $ runFree r x runFree r Ask = r -- Since it's so simple, all the...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Object.Initial {o ℓ e} (C : Category o ℓ e) where open import Level open import Relation.Binary.PropositionalEquality as ≡ using (_≡_) open Category C open import Categories.Morphism C using (Epi; _≅_) open import Categories.Morphis...
module BTA-ken where -- specialize two-level typed terms to untyped lambda calculus open import Data.Nat hiding (_<_) open import Data.Bool open import Data.Fin hiding (_≤_ ; pred; _+_) open import Data.List open import Data.Product open import Function open import Algebra.FunctionProperties using (Commutative; Ident...
{-# OPTIONS --universe-polymorphism #-} module Graphs.GraphMorphism where open import Data.Product open import Level open import Relation.Binary renaming (_⇒_ to _⊆_) open import Relation.Binary.PropositionalEquality using () renaming (_≡_ to _≣_ ; refl to ≣-refl ; sym to ≣-sym ; trans to ≣-tr...
------------------------------------------------------------------------ -- Library stuff data ⊥ : Set where record ⊤ : Set where constructor tt data Bool : Set where true false : Bool if_then_else_ : ∀ {A : Set} → Bool → A → A → A if true then t else f = t if false then t else f = f data ℕ : Set where zer...
module Cats.Category.One where open import Data.Unit using (⊤ ; tt) open import Level open import Cats.Category One : ∀ lo la l≈ → Category lo la l≈ One lo la l≈ = record { Obj = Lift lo ⊤ ; _⇒_ = λ _ _ → Lift la ⊤ ; _≈_ = λ _ _ → Lift l≈ ⊤ ; id = lift tt ; _∘_ = λ _ _ → lift tt ; equiv ...
module regex where data Regex ( Σ : Set) : Set where ε : Regex Σ -- empty φ : Regex Σ -- fail _* : Regex Σ → Regex Σ _&_ : Regex Σ → Regex Σ → Regex Σ _||_ : Regex Σ → Regex Σ → Regex Σ <_> : Σ → Regex Σ infixr 40 _&_ _||_