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...