text
stringlengths
4
690k
{- This file proves a variety of basic results about paths: - refl, sym, cong and composition of paths. This is used to set up equational reasoning. - Transport, subst and functional extensionality - J and its computation rule (up to a path) - Σ-types and contractibility of singletons - Converting PathP to and ...
-- Andreas, 2012-11-18: abstract record values module Issue759 where import Common.Level abstract record Wrap (A : Set) : Set where field wrapped : A open Wrap public wrap : {A : Set} → A → Wrap A wrap a = record { wrapped = a } -- caused 'Not in Scope: recCon-NOT-PRINTED' -- during eta-contraction in s...
module Structure.Operator.Group where import Lvl open import Logic open import Logic.IntroInstances open import Logic.Predicate open import Structure.Setoid open import Structure.Function open import Structure.Operator.Monoid using (Monoid) open import Structure.Operator.Properties hiding (commutativity) open imp...
------------------------------------------------------------------------ -- The Agda standard library -- -- A bunch of properties ------------------------------------------------------------------------ module Data.Bool.Properties where open import Data.Bool as Bool open import Data.Fin open import Function open impo...
module x03-842Relations-hc-2 where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym) -- added sym open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Data.Nat.Properties using (+-comm; *-comm; *-zeroʳ) ------------------------------------------------------------------...
-- Andreas, 2012-04-03, reported by pumpkingod module Issue596 where import Common.Irrelevance open import Common.Level open import Common.Equality open import Common.Prelude renaming (Nat to ℕ) infixl 7 _*_ _*_ : ℕ → ℕ → ℕ zero * n = zero suc m * n = n + (m * n) -- inlined from Data.Product record Σ {a b} (A : S...
module Structure.Categorical.Properties where import Functional.Dependent as Fn open import Lang.Instance import Lvl open import Logic open import Logic.Predicate open import Logic.Propositional open import Structure.Setoid import Structure.Categorical.Names as Names import Structure.Operator.Names...
open import Relation.Unary open import Relation.Ternary.Separation module Relation.Ternary.Separation.Monad.Error {ℓ} {A : Set ℓ} {{r : RawSep A}} {u} {{_ : IsUnitalSep r u}} where open import Level open import Function open import Data.Unit open import Data.Sum open import Relation.Unary renaming (U to True) o...
{-# OPTIONS --cubical --no-import-sorts --safe #-} {- This is inspired by/copied from: https://github.com/agda/agda-stdlib/blob/master/src/Tactic/MonoidSolver.agda -} module Cubical.Algebra.RingSolver.ReflectionSolving where open import Cubical.Foundations.Prelude hiding (Type) open import Cubical.Functions.Logic ...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Empty {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.LogicalRe...
-- Andreas, 2016-02-02 postpone type checking of extended lambda -- See also issue 480 and 1159 open import Common.Maybe open import Common.String record ⊤ : Set where record IOInterface : Set₁ where field Command : Set Response : (m : Command) → Set open IOInterface data IO I A : Set where act' ...
open import Prelude module Implicits.Semantics where open import Implicits.Syntax open import Implicits.WellTyped open import Implicits.Semantics.Type public open import Implicits.Semantics.Context public open import Implicits.Semantics.RewriteContext public open import Implicits.Semantics.Term public open import Imp...
{- 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 -} {-# OPTIONS --allow-unsolved-metas #-} -- This module provides some scaffoldi...
module _ where open import Data.Nat using (_+_ ; _≤′_ ; suc) open import Induction.Nat using (<-rec) open import Esterel.Lang.CanFunction open import Function using (_∋_ ; _∘_ ; id ; _$_) open import Data.Nat.Properties.Simple using ( +-comm ; +-assoc) open import utility open import noetherian using (noetherian ; ∥_...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.ListedFiniteSet.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Sum as ⊎ using (_⊎_; inl; inr) open import Cubical.Functions.Logic private v...
------------------------------------------------------------------------ -- Pointwise lifting of (binary) initial bag operators to parsers ------------------------------------------------------------------------ open import Data.List open import Data.List.Membership.Propositional using (_∈_) open import Data.List.Rela...
module Everything where import Library import Terms import Substitution import SN import SN.AntiRename import Reduction import SAT3 import DeclSN import Soundness
------------------------------------------------------------------------ -- Code related to the paper "Higher Inductive Type Eliminators -- Without Paths" -- -- Nils Anders Danielsson ------------------------------------------------------------------------ -- Note that the code does not follow the paper exactly, and t...
open import Prelude hiding (subst) module Implicits.Substitutions.Term where open import Implicits.Syntax.Type open import Implicits.Syntax.Term open import Data.Fin.Substitution open import Data.Star as Star hiding (map) open import Data.Star.Properties open import Data.Vec hiding ([_]) open import Implicits.Subst...
{-# OPTIONS --universe-polymorphism #-} module 13-implicitProofObligations where module Imports where module L where open import Agda.Primitive public using (Level; _⊔_) renaming (lzero to zero; lsuc to suc) -- extract from Data.Unit record ⊤ : Set where constructor tt -- extract from Data.Emp...
------------------------------------------------------------------------------ -- Testing Agda internal term: @Var Nat Args@ when @Args ≠ []@ ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-universe-polymorphism #-} ...
{-# OPTIONS --cubical --allow-unsolved-metas #-} open import Agda.Primitive.Cubical open import Agda.Builtin.Cubical.Path module _ where data D (A : Set) : Set where c : D A step : ∀ (x : D A) → c ≡ x data _~_ {A : Set} : (x y : D A) → Set record _~′_ {A : Set} (x y : D A) : Set where coinductive field...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids open import Rings.Definition open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition open import Groups.Definition open import Groups.Lem...
------------------------------------------------------------------------ -- Identity and composition for higher lenses ------------------------------------------------------------------------ {-# OPTIONS --cubical #-} import Equality.Path as P module Lens.Non-dependent.Higher.Combinators {e⁺} (eq : ∀ {a p} → P.Equ...
------------------------------------------------------------------------------ -- Common stuff used by the gcd example ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorph...
-- MIT License -- Copyright (c) 2021 Luca Ciccone and Luca Padovani -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Software"), to deal in the Software without -- restriction, including without limitation the rights to use...
{-# OPTIONS --without-K #-} module container.m.from-nat.coalgebra where open import level open import sum open import equality open import function open import sets.nat.core open import sets.nat.struct open import sets.unit open import container.core open import container.m.from-nat.core open import container.m.from-n...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of the heterogeneous prefix relation ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Prefix.Heterogeneous....
module Golden.Index where open import Agda.Builtin.Nat open import Agda.Builtin.List open import Agda.Builtin.Bool lst : List Nat lst = 1 ∷ 2 ∷ [] atDef : ∀ {a : Set} → a → List a -> Nat -> a atDef def (x ∷ l) zero = x atDef def (x ∷ l) (suc ix) = atDef def l ix atDef def _ _ = def l0 : Nat l0 = atDef 0 lst 0 l1 :...
{- This second-order term syntax was created from the following second-order syntax description: syntax TLC | Λ type N : 0-ary _↣_ : 2-ary | r30 𝟙 : 0-ary _⊗_ : 2-ary | l40 𝟘 : 0-ary _⊕_ : 2-ary | l30 term app : α ↣ β α -> β | _$_ l20 lam : α.β -> α ↣ β | ƛ_ r10 unit : 𝟙 pair ...
{-# OPTIONS --without-K #-} open import Base module Integers where succ : ℤ → ℤ succ O = pos O succ (pos n) = pos (S n) succ (neg O) = O succ (neg (S n)) = neg n pred : ℤ → ℤ pred O = neg O pred (pos O) = O pred (pos (S n)) = pos n pred (neg n) = neg (S n) abstract succ-pred : (n : ℤ) → succ (pred n) ≡ n succ-...
data Tm : Set where tzero : Tm tsucc : Tm → Tm tdiff : Tm → Tm → Tm variable m n n' : Tm data NotZero : Tm → Set where nzsucc : NotZero (tsucc n) nzdiff : NotZero (tdiff m n) data Equal : Tm → Tm → Set where esucc : NotZero n → Equal (tsucc (tdiff tzero n)) n ediff : Equal n n' → Equal (tdiff m n) (...
module Data.QuadTree.Implementation.ValidTypes 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.Implementation.Definition {-# FOREIGN AGDA2HS {-# LANGUAGE Safe #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE Rank2Types #-} import...
------------------------------------------------------------------------ -- Breadth-first labelling of trees ------------------------------------------------------------------------ module BreadthFirst where open import Codata.Musical.Notation open import Codata.Musical.Colist using ([]; _∷_; concat) open import Func...
module Compilation.Term where open import Context open import Type.Core open import Type.NbE import Term.Core as Core open import Compilation.Data open import Compilation.Encode.Core open import Function open import Data.Empty open import Data.Sum.Base open import Data.List.Base as List infix 3 _⊢_ data Recursivity...
------------------------------------------------------------------------ -- Descending lists -- -- We present some simple examples to demonstrate -- -- 1. the concatenation operation on sorted lists obtained by -- transporting the one on finite multisets, and -- -- 2. "sorting" finite multisets by converting into so...
module UniDB where open import UniDB.Morph.Depth public open import UniDB.Morph.Pair public open import UniDB.Morph.Reg public open import UniDB.Morph.Shift public open import UniDB.Morph.Shifts public open import UniDB.Morph.ShiftsPrime public open import UniDB.Morph.Sim public open import UniDB.Morph.Star public op...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module CombiningProofs.Eta where infix 7 _≡_ infix 5 ∃ postulate D : Set ∃ : (A : D → Set) → Set _≡_ : D → D → Set syntax ∃ (λ x → e) ...
module WrongDotPattern where data Nat : Set where zero : Nat suc : Nat -> Nat data NonZero : Nat -> Set where nonZ : (n : Nat) -> NonZero (suc n) f : (n : Nat) -> NonZero n -> Nat f .zero (nonZ n) = n
-- {-# OPTIONS -v tc.polarity:15 #-} module Issue166 where open import Common.Size open import Common.Prelude module M (A : Set) where data SizedNat : {i : Size} → Set where zero : {i : Size} → SizedNat {↑ i} suc : {i : Size} → SizedNat {i} → SizedNat {↑ i} module M′ = M ⊥
open import Prelude hiding (⊥) module Implicits.Resolution.Infinite.Algorithm where open import Data.Bool open import Data.Unit.Base open import Data.Maybe using (is-just; functor) open import Coinduction open import Data.Fin.Substitution open import Data.Vec hiding (_>>=_) open import Data.List hiding (monad) open i...
module RAdjunctions where open import Library open import Categories open import Functors open Cat open Fun record RAdj {a b c d e f}{C : Cat {a}{b}}{D : Cat {c}{d}} (J : Fun C D)(E : Cat {e}{f}) : Set (a ⊔ b ⊔ c ⊔ d ⊔ e ⊔ f) where constructor radjunction field L : Fun C E R : F...
------------------------------------------------------------------------ -- Some negative results related to weak bisimilarity and expansion ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude open import Prelude.Size module Delay-monad.Sized.Bis...
{-# OPTIONS --universe-polymorphism #-} -- These examples should now go through with no unsolved metavariables. -- They work since the conversion checker is a little less prone to -- abort checking when there are constraints. In particular if the -- constraints only affect the sorts of the things compared, then it kee...
------------------------------------------------------------------------ -- This file contains the definition the category of functors indexed -- -- by two categories. -- ------------------------------------------------------------------------ module Category.CatFunc wher...
open import FRP.LTL.Time using ( Time ; _≤_ ; _<_ ) module FRP.LTL.RSet.Core where -- Reactive types RSet : Set₁ RSet = Time → Set ⟨_⟩ : Set → RSet ⟨ A ⟩ t = A ⟦_⟧ : RSet → Set ⟦ A ⟧ = ∀ {t} → (A t) -- Reactive sets over an interval _[_,_] : RSet → Time → Time → Set A [ s , u ] = ∀ {t} → s ≤ t → t ≤ u → A t _[_...
module Progress where open import Prelude open import T ---- progress module Progress where -- Define a datatype representing that a term satisfies progress data TProgress : ∀{A} → TCExp A → Set where prog-val : ∀{A} {e : TCExp A} → (D : TVal e) → TProgress e prog-step : ∀{A} {e e' : TCExp A} → (D : e ~>...
module _ where postulate I : Set data P (i : I) : Set where p : P i → P i data Q (i : I) : P i → Set where q : (x : P i) → Q i (p x) module _ (i : I) (x : P i) where g : Q _ x → Set₁ g (q y) = Set
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} {-# OPTIONS --allow-unsolved-metas #-} module Light.Implementation.Data.Product where open import Light.Library.Data.Product using (Library ; Dependencies) open import Light.Variable.Levels open import Light.Level using (_⊔_) open import...
{-# OPTIONS --without-K --safe #-} open import Level using (Level) open import FLA.Algebra.Structures open import Relation.Binary.PropositionalEquality open ≡-Reasoning module FLA.Algebra.Properties.Field {ℓ : Level } {A : Set ℓ} ⦃ F : Field A ⦄ where open Field F 0ᶠ+0ᶠ≡0ᶠ : 0ᶠ + 0ᶠ ≡ 0ᶠ 0ᶠ+0ᶠ≡0ᶠ = +0ᶠ 0ᶠ 0ᶠ+ : (a...
------------------------------------------------------------------------ -- Collection of most needed import from standard library ------------------------------------------------------------------------ module Library where open import Data.Empty public open import Data.Unit hiding (_≟_; _≤_; _≤?_; decSetoid; decTo...
{-# OPTIONS --cubical-compatible --rewriting #-} module Issue1719.Pushouts where open import Issue1719.Common open import Issue1719.Spans postulate Pushout : (d : Span) → Set left : {d : Span} → (Span.A d) → Pushout d right : {d : Span} → (Span.B d) → Pushout d glue : {d : Span} → (c : Span.C d) → left (Span...
module examplesPaperJFP.Colists where -- open import Function -- Case expressions (to be used with pattern-matching lambdas, see -- README.Case). infix 0 case_return_of_ case_of_ case_return_of_ : ∀ {a b} {A : Set a} (x : A) (B : A → Set b) → ((x : A) → B x) → B x case x return B of f = f x case_of_ : ∀ {a b} ...
record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field fst : A snd : B fst postulate P : {X : Set} → X → Set H : Set R : H → Set x : H y : R x help : (f : H) (p : R f) → P {X = Σ H R} (f , p) record Category : Set₁ where field Hom : Set id : Hom comp : Hom → Hom ...
module _ where module A where infix 2 _↑ infix 1 c data D : Set where ● : D _↑ : D → D c : {x y : D} → D syntax c {x = x} {y = y} = x ↓ y module B where infix 3 c data D : Set where c : {y x : D} → D syntax c {y = y} {x = x} = y ↓ x open A open B accepted : A.D → A.D accepted (...
{-# OPTIONS --without-K #-} module Agda.Builtin.Unit where record ⊤ : Set where instance constructor tt {-# BUILTIN UNIT ⊤ #-} {-# COMPILE GHC ⊤ = data () (()) #-}
{-# OPTIONS --rewriting #-} module Properties.ResolveOverloads where open import FFI.Data.Either using (Left; Right) open import Luau.ResolveOverloads using (Resolved; src; srcⁿ; resolve; resolveⁿ; resolveᶠ; resolveˢ; target; yes; no) open import Luau.Subtyping using (_<:_; _≮:_; Language; ¬Language; witness; scalar;...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Rationals.QuoQ where open import Cubical.HITs.Rationals.QuoQ.Base public open import Cubical.HITs.Rationals.QuoQ.Properties public
{-# OPTIONS --safe #-} module Cubical.Categories.Instances.Lattice where open import Cubical.Foundations.Prelude open import Cubical.Algebra.Lattice open import Cubical.Categories.Category open import Cubical.Categories.Instances.Semilattice open Category LatticeCategory : ∀ {ℓ} (L : Lattice ℓ) → Category ℓ ℓ Latt...
module plfa-code.Bin where -- I collect code about Bin there. other definitions I use the std-lib version import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym; trans) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_; _≤_; z≤n; s≤s)...
{-# OPTIONS --cubical --safe #-} open import Algebra open import Relation.Binary open import Algebra.Monus module Data.MonoidalHeap.Monad {s} (monus : TMAPOM s) where open TMAPOM monus open import Prelude open import Data.List using (List; _∷_; []; foldr; _++_) import Data.Nat as ℕ import Data.Nat.Properties as ℕ ...
-- Integers modulo N module Numeric.Nat.Modulo where open import Prelude open import Numeric.Nat.DivMod open import Tactic.Nat data IntMod (n : Nat) : Set where modn : ∀ k → k < n → IntMod n {-# DISPLAY modn k (LessNat.diff _ refl) = k #-} negIntMod : ∀ {n} → IntMod n → IntMod n negIntMod (modn 0 lt) = modn 0 lt...
module Languages.FILL.TypeSyntax where open import Utils.HaskellTypes {-# IMPORT Languages.FILL.TypeSyntax #-} data Type : Set where TVar : String → Type Top : Type Bottom : Type Imp : Type → Type → Type Tensor : Type → Type → Type Par : Type → Type → Type {-# COMPILED_DATA Type Languages.FILL.TypeSynta...
open import Agda.Primitive variable a : Level A : Set a P : A → Set a x : A open import Agda.Builtin.Equality data Box (A : Set a) : Set a where [_] : A → Box A postulate _ : P (λ (_ : x ≡ x) → [ x ])
-- Internal monoid in a strict monoidal category {-# OPTIONS --safe #-} open import Cubical.Categories.Category.Base open import Cubical.Categories.Monoidal.Base open import Cubical.Foundations.HLevels open import Cubical.Foundations.Prelude open import Cubical.Foundations.Path open import Cubical.Categories.Functor.B...
------------------------------------------------------------------------ -- Lifting of weak equality to canonical equality ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module FOmegaInt.Kinding.Canonical.WeakEquality where open import Data.Product as Prod...
{-# OPTIONS --safe #-} module Cubical.Data.Int.MoreInts.DeltaInt where open import Cubical.Data.Int.MoreInts.DeltaInt.Base public open import Cubical.Data.Int.MoreInts.DeltaInt.Properties public
module Issue442 where postulate A : Set f : (P : A → A → Set) → (∀ {x} → P x x) → (∀ {x y z} → P y z → P x y → A) → A P : A → A → Set reflP : ∀ {x} → P x x g : ∀ {x y z} → P y z → P x y → A a : A a = f _ (λ {x} → reflP {x}) g -- Test case was: -- {-# OPTIONS --allow-unsolved-metas #-} -- a = f _ ref...
module Numeric.Rational where open import Prelude open import Numeric.Nat.GCD open import Numeric.Nat.GCD.Extended open import Numeric.Nat.GCD.Properties open import Numeric.Nat.Prime open import Numeric.Nat.Prime.Properties open import Numeric.Nat.Divide open import Numeric.Nat.Divide.Properties open import Numeric....
------------------------------------------------------------------------ -- Semantics of the simplified parsers ------------------------------------------------------------------------ module StructurallyRecursiveDescentParsing.Simplified.Semantics where open import Algebra open import Codata.Musical.Notation open im...
-- Interpretation of signature arities module SOAS.Syntax.Arguments {T : Set} where open import SOAS.Common open import SOAS.Context {T} open import SOAS.Variable open import SOAS.Families.Core {T} open import Data.List.Base using ([] ; _∷_ ; List) open import Data.Product open import Data.Unit -- List of arities a...
------------------------------------------------------------------------ -- Definitions of functions that generate list or vector ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --exact-split #-} module Math.Combinatorics.VecFunction where -- agda-stdlib open i...
module ListAppend where open import Prelude append : forall {A} -> List A -> List A -> List A append xs ys = {!!} appendP1 : forall {x l l'} -> append (cons x l) l' == cons x (append l l') appendP1 = refl appendP2 : forall {l} -> append nil l == l appendP2 = refl
{-# OPTIONS --safe --warning=error --without-K #-} module Lists.Definition where data List {a : _} (A : Set a) : Set a where [] : List A _::_ : (x : A) (xs : List A) → List A infixr 10 _::_ {-# BUILTIN LIST List #-} [_] : {a : _} {A : Set a} → (a : A) → List A [ a ] = a :: [] _++_ : {a : _} {A : Set a} → List ...
record ⊤ : Set where no-eta-equality constructor tt data D : ⊤ → Set where d : (x : ⊤) → D x test : (g : D tt) → Set test (d tt) = ⊤
{-# OPTIONS --cubical --safe #-} module Function.Fiber where open import Level open import Data.Sigma.Base open import Path open import Cubical.Foundations.Everything using (fiber) public
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym) module AKS.Nat.WellFounded where open import AKS.Nat.Base using (ℕ; _+_; _∸_; _≤_; _<_; lte) open ℕ open import AKS.Nat.Properties using (+-identityʳ; +-suc; ∸-mono-<ˡ; ∸-mono-<ʳ; suc-injective) data Acc {A : Set} (_≺_ : A → A → Set) (bound : A...
{-# OPTIONS --without-K #-} module NTypes where open import Equivalence open import FunExt open import GroupoidStructure open import NTypes.Contractible open import PathOperations open import Transport open import Types isProp : ∀ {a} → Set a → Set _ isProp A = (x y : A) → x ≡ y isSet : ∀ {a} → Set a → Set _ isSet A...
module InstanceMeta where data Bool : Set where true false : Bool data Maybe (A : Set) : Set where Nothing : Maybe A Just : A → Maybe A record Eq (A : Set) : Set where constructor eq field _==_ : A → A → Bool open Eq {{...}} public instance eq-Bool : Eq Bool eq-Bool = eq aux where aux : Bool...
------------------------------------------------------------------------------ -- The alternating bit protocol (ABP) is correct ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-...
module Sessions.Semantics.Expr where open import Prelude open import Data.Fin open import Relation.Unary.PredicateTransformer hiding (_⊔_) open import Relation.Ternary.Separation.Morphisms open import Relation.Ternary.Separation.Monad open import Relation.Ternary.Separation.Monad.Reader open import Sessions.Syntax.T...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Properties.Setoids where open import Level open import Relation.Binary using (Setoid; module Setoid; Preorder) open import Relation.Binary.PropositionalEquality as ≡ using (_≡_) import Relation.Binary.Reasoning.Setoid as RS open import Function.Eq...
module 040-monoid where -- We need semigroups. open import 030-semigroup -- The next useful structure is a monoid, which is a semigroup with -- (left and right) identity element. record Monoid {M : Set} (_==_ : M -> M -> Set) (_*_ : M -> M -> M) (id : M) : Set1 where field semigroup : SemiGroup _==...
open import Agda.Builtin.Coinduction open import Agda.Builtin.Equality record Reveal_·_is_ {A : Set} {B : A → Set} (f : (x : A) → B x) (x : A) (y : B x) : Set where constructor [_] field eq : f x ≡ y inspect : {A : Set} {B : A → Set} (f : (x : A) → B x) (x : A) → ...
import Lvl open import Structure.Setoid open import Type module Automaton.Deterministic where open import Data.List renaming (∅ to ε ; _⊰_ to _·_) open import Data.List.Setoid open import Data.List.Functions using (postpend ; _++_) open import Data.List.Proofs open import Functional open import Logic open import...
module PiFrac.AuxLemmas where open import Data.Empty open import Data.Unit hiding (_≟_) open import Data.Sum open import Data.Product open import Relation.Binary.Core open import Relation.Binary open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Function using (_∘_) open import P...
------------------------------------------------------------------------------ -- Testing anonymous module ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# ...
module Tactic.Nat.Subtract.Lemmas where open import Prelude open import Tactic.Nat.NF open import Tactic.Nat.Exp open import Container.Bag open import Tactic.Nat.Simpl open import Prelude.Nat.Properties open import Prelude.List.Properties open import Tactic.Nat.Auto.Lemmas open import Tactic.Nat.Simpl.Lemmas open impo...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Unary.Properties where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Fou...
module EffectUtil where open import Data.List open import Data.List.All open import Data.List.Any open import Level open import Relation.Binary.PropositionalEquality hiding ([_]) open import Function open import Category.Monad open import Data.Product -- open import EffectUtil open import Membership-equality hiding (...
-- Andreas, 2016-04-26 flight home from AIM XXIII module _ where module M (A : Set) where record R : Set where field f : A module H {A} = M A open M using (R) open M.R using (f) -- f : {A : Set} → R A → A open H.R using (f) -- f : {A : Set} → R A → A r : ∀ A (a : A) → R A f (r A a) = a test : ∀ A (a : A) ...
module Numeral.PositiveInteger.Oper where open import Numeral.PositiveInteger infixl 10010 _+_ infixl 10020 _⋅_ infixl 10030 _^_ -- Addition _+_ : ℕ₊ → ℕ₊ → ℕ₊ x + 𝟏 = 𝐒(x) x + 𝐒(y) = 𝐒(x + y) -- Multiplication _⋅_ : ℕ₊ → ℕ₊ → ℕ₊ x ⋅ 𝟏 = x x ⋅ 𝐒(y) = x + (x ⋅ y) -- Exponentiation _^_ : ℕ₊ → ℕ₊ → ℕ₊ x ^...
------------------------------------------------------------------------ -- Examples for modalities ------------------------------------------------------------------------ module CTL.ModalityExamples where open import Library open import FStream.Containers open import FStream.Core open import CTL.Modalities readD...
{-# OPTIONS --safe #-} module Cubical.Categories.Instances.CommRings where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Equiv open import Cubical.Foundations.Structure open import Cubical.Foundations.Isomorphism...
module DualTail where open import Data.Nat open import Data.Fin hiding (_+_) open import Data.Product open import Data.Vec hiding (map) open import Function open import Relation.Binary.PropositionalEquality hiding (Extensionality) open import Direction open import Extensionality open import DualCoinductive -- session...
{-# OPTIONS --without-K #-} module sets.nat.ordering where open import sets.nat.ordering.lt public open import sets.nat.ordering.leq public
module CompilingCoinduction where open import Common.Coinduction data List (A : Set) : Set where [] : List A _∷_ : (x : A) (xs : List A) → List A {-# BUILTIN LIST List #-} {-# BUILTIN NIL [] #-} {-# BUILTIN CONS _∷_ #-} {-# COMPILED_DATA List [] [] (:) #-} postulate Char : Set {-# BUILTIN CHAR Char #-...
------------------------------------------------------------------------ -- Indexed monads ------------------------------------------------------------------------ -- Note that currently the monad laws are not included here. module Category.Monad.Indexed where open import Data.Function open import Category.Applicati...
module Data.HSTrie where open import Class.Map open import Data.List open import Data.String open import Data.String.Instance open import Data.Maybe private variable A B : Set {-# FOREIGN GHC import Data.Trie import Data.Text.Encoding #-} postulate HSTrie : Set -> Set emptyTrie : HSTrie A insertTr...
------------------------------------------------------------------------------ -- Equivalence: N as the least fixed-point and N using Agda's data constructor ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types ...