text
stringlengths
4
690k
{-# OPTIONS --without-K #-} module M-types.Base where open import M-types.Base.Core public open import M-types.Base.Sum public open import M-types.Base.Prod public open import M-types.Base.Eq public open import M-types.Base.Equi public open import M-types.Base.Rel public open import M-type...
module Injections where open import Data.Product open import Relation.Nullary open import Data.Empty open import Data.Sum open import Support.Equality open ≡-Reasoning open import Vars public open import Injections.Type public invert : ∀ {A : Set} {xs ys : List A} (i : Inj xs ys) → ∀ {t} (y : ys ∋ t) → Dec (∃ \ x →...
{-# OPTIONS --without-K --safe #-} module Polynomial.Simple.Reflection where open import Agda.Builtin.Reflection open import Reflection.Helpers open import Polynomial.Simple.Solver renaming (solve to solve-fn) open AlmostCommutativeRing open import Data.Nat.Table open import Data.Fin as Fin using (Fin) open im...
open import Relation.Binary.PropositionalEquality using (_≡_) module AKS.Primality.Base where open import AKS.Nat using (ℕ; _<_) open import AKS.Nat.GCD using (_∣_; _∤_) record IsPrime (p : ℕ) : Set where constructor IsPrime✓ field 1<p : 1 < p ∀i∣p[i≡p] : ∀ {i} → 1 < i → i ∣ p → i ≡ p record IsComposite...
module Properties.StepBeta where open import Data.List open import Data.List.All open import Data.Product open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Typing open import Syntax open import Global open import Channel open import Values open import Session open import Sche...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Restriction.Instance.PartialFunctions where -- The Category of partial functions is a restriction category -- The proof is straightforward in the sense that it's all unwinding definitions, -- but also no-trivial in that they need to be unwound with care (a...
{-# OPTIONS --cubical --safe #-} module Data.Maybe.Sugar where open import Prelude open import Data.Maybe infixl 4 _<*>_ _>>=_ : Maybe A → (A → Maybe B) → Maybe B nothing >>= f = nothing just x >>= f = f x pure : A → Maybe A pure = just _<*>_ : Maybe (A → B) → Maybe A → Maybe B nothing <*> ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Structures.Universe where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalence open impor...
------------------------------------------------------------------------ -- The Agda standard library -- -- Property related to Grouped ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Unary.Grouped.Properties where open import Data...
------------------------------------------------------------------------------ -- Properties related with the forest type ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymo...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some theory for commutative semigroup ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Algebra using (CommutativeSemigroup) module Algebra...
open import Relation.Binary.Core module TreeSort.Impl2 {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import BBSTree _≤_ open import Bound.Total A open import Bound.Total.Order _≤_ open import Data.List open import Data.Sum insert : {x : A}{b t : Bound} → LeB b (va...
open import Oscar.Prelude open import Oscar.Class.Successor₀ open import Oscar.Class.Successor₁ open import Oscar.Class.Injectivity open import Oscar.Class.Pure module Oscar.Class.Thickandthin where module _ {x} {X : Ø x} {a} (A : X → Ø a) {b} (B : X → Ø b) where record [𝓣hin] : Ø₀ where no-eta-equality ...
-- simply-typed λ-calculus w/ DeBruijn indices module LC where open import Agda.Primitive open import Agda.Builtin.Bool open import Data.Bool.Properties hiding (≤-trans ; <-trans ; ≤-refl ; <-irrefl) open import Data.Empty open import Data.Nat renaming (_+_ to _+ᴺ_ ; _≤_ to _≤ᴺ_ ; _≥_ to _≥ᴺ_ ; _<_ to _<ᴺ_ ; _>_ to ...
module subst where open import lib open import cedille-types open import ctxt-types open import is-free open import rename open import general-util open import syntax-util substh-ret-t : Set → Set substh-ret-t T = ∀ {ed} → ctxt → renamectxt → trie ⟦ ed ⟧ → T → T substh : ∀ {ed} → substh-ret-t ⟦ ed ⟧ substh-term : s...
module Iff where infix 20 _⇔_ record _⇔_ (A B : Set) : Set where field to : A → B from : B → A
module Data.BitVector.Peano where open import Data.BitVector open import Algebra.FunctionProperties.Core open import Data.Nat hiding (pred) renaming (suc to Nsuc; zero to Nzero) open import Data.Vec hiding (fromList) open import Relation.Binary.PropositionalEquality open import Data.Digit hiding (Bit) open import Dat...
{- 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 -} open import Optics.All open import LibraBFT.Prelude open import LibraBFT...
{-# OPTIONS --no-unicode #-} open import Agda.Builtin.Nat pred : Nat -> Nat pred = \ { n -> {!!} }
module SizedPoly.Console where open import SizedPolyIO.Base open import SizedPolyIO.Console hiding (main) open import NativePolyIO open import Level using () renaming (zero to lzero) {-# TERMINATING #-} myProgram : ∀{i} → IOConsole i (Unit {lzero}) myProgram = exec getLine λ line → exec...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Transitivity {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Logica...
module Text.Greek.SBLGNT.1Pet where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΠΕΤΡΟΥ-Α : List (Word) ΠΕΤΡΟΥ-Α = word (Π ∷ έ ∷ τ ∷ ρ ∷ ο ∷ ς ∷ []) "1Pet.1.1" ∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Pet.1.1" ∷ word (Ἰ ∷ η ∷ ...
data Unit : Set where unit : Unit F : Unit → Set₁ F {x = unit} = Set
{-# OPTIONS --cubical --safe #-} module Control.Applicative.Levels where
module PLRTree.Order.Properties {A : Set} where open import Data.Nat open import Data.Nat.Properties open import Data.Sum open import Function open import Induction.Nat open import Induction.WellFounded open import PLRTree {A} open import PLRTree.Order {A} open import Relation.Binary open import Relation.Binary.Propo...
module Holes.Prelude where open import Agda.Primitive public using (Level; _⊔_; lzero; lsuc) open import Agda.Builtin.List public using (List; _∷_; []) open import Agda.Builtin.Unit public using (⊤; tt) open import Agda.Builtin.Bool public using (Bool; true; false) open import Agda.Builtin.Nat public using (...
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Reflexivity open import Oscar.Class.Smap open import Oscar.Class.Surjextensionality open import Oscar.Class.Surjidentity open import Oscar.Class.Surjtranscommutativity open import Oscar.Class.HasEquivalence open import Oscar.Class.Transitivity o...
{-# OPTIONS --without-K #-} module Substream (A : Set) where open import Relation.Binary open import Relation.Binary.PropositionalEquality as PE open import PropsAsTypes open import Stream open Bisim A open ~-Reasoning mutual record Sel : Set where coinductive field out : Selμ data Selμ : Set where ...
module Structure.Category.Functor.Functors.Proofs where import Functional as Fn import Function.Equals open Function.Equals.Dependent open import Function.Equals.Proofs open import Logic.Predicate open import Logic.Propositional import Lvl open import Relator.Equals.Proofs.Equivalence open import...
-- Andreas, 2015-06-28, issue reported by Nisse {-# OPTIONS -vtc.pos.occ:20 #-} -- KEEP!, this triggered the __IMPOSSIBLE__ -- {-# OPTIONS -vtc.pos.occ:70 -v tc.rec:80 --show-implicit #-} data ⊥ : Set where F : ⊥ → Set F () record R (i : ⊥) : Set₁ where constructor c field P Q : F i → Set -- An internal e...
open import Agda.Builtin.Nat f : Nat f with zero ... | n with (suc n) ... | m = m
data Li : (a : Set) -> Set where Ni : {a : Set} -> Li a Co : {a : Set} -> a -> Li a -> Li a {-# BUILTIN NATURAL name #-} t : Li (Set 2) -> Set 1 t li = Set 1
------------------------------------------------------------------------ -- Recognisers form a Kleene algebra ------------------------------------------------------------------------ module TotalRecognisers.LeftRecursion.KleeneAlgebra (Tok : Set) where open import Algebra import Algebra.Properties.BooleanAlgebra open...
{- FP Lunch, Nottingham July 27, 2007 Conor McBride -} module Binary where data Bit : Set where O : Bit I : Bit infixl 80 _◃_ data Pos : Set where ◃I : Pos _◃_ : Pos -> Bit -> Pos bsuc : Pos -> Pos bsuc ◃I = ◃I ◃ O bsuc (n ◃ O) = n ◃ I bsuc (n ◃ I) = bsuc n ◃ O data Peano : Pos -> Set wher...
module Chain {A : Set}(_==_ : A -> A -> Set) (refl : (x : A) -> x == x) (trans : (x y z : A) -> x == y -> y == z -> x == z) where infix 2 chain>_ infixl 2 _===_by_ infix 1 _qed private data _≃_ (x y : A) : Set where prf : x == y -> x ≃ y chain>_ : (x : A) -> x ≃ x chain> x = prf (refl x) _===...
module Languages.FILL.Syntax where open import level open import bool open import nat open import unit open import empty open import list open import eq open import sum open import Utils.HaskellTypes open import Utils.HaskellFunctions open import Languages.FILL.TypeSyntax True : Set True = ⊤{lzero} False : Set Fals...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions {{eqrel : EqRelSet}} where open import Definition.LogicalRelation.Substitution.Introductions.Application public open import Definition.LogicalRelation.Substitution.Introductio...
open import Agda.Builtin.Equality cong : ∀{a b} {A : Set a} {B : Set b} (f : A → B) {x y : A} (eq : x ≡ y) → f x ≡ f y cong f refl = refl record Category : Set₂ where field Ob : Set₁ _⇒_ : Ob → Ob → Set _∘_ : ∀ {O P Q} → P ⇒ Q → O ⇒ P → O ⇒ Q -- Moving this out of the record fixes the problem. ide...
-- Andreas, 2012-01-11, bug reported by Adam Gundry module Issue551 where data Bool : Set where true false : Bool data _≡_ {A : Set}(a : A) : A → Set where refl : a ≡ a cong : {A B : Set}(f : A → B){a a' : A} → a ≡ a' → f a ≡ f a' cong f refl = refl implicit : {A : Set}{{a : A}} -> A implicit {{a}} = a record ...
module Issue936 where -- The highlighting generated for this file should not contain -- any references to Agda.Primitive.
-- Andreas, 2017-01-18, issue #57 -- reported by Nisse 2008-03-26 data Unit : Set where unit : Unit foo : Unit → Unit foo m with m foo _ | x@unit with x foo _ | x@unit | _ = x test : Unit → Unit test m with m test _ | x@unit with x ... | _ = x
------------------------------------------------------------------------ -- Rational numbers ------------------------------------------------------------------------ module Data.Rational where open import Data.Bool.Properties open import Data.Function open import Data.Integer hiding (suc) renaming (_*_ to _ℤ*_) open ...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Group open import lib.types.Unit open import lib.groups.SubgroupProp open import lib.groups.Homomorphism open import lib.groups.Isomorphism open import lib.groups.Lift module lib.groups.Unit where Unit-group-structure : GroupStructu...
data Nat : Set where zero : Nat suc : Nat → Nat plus : Nat → Nat → Nat plus zero b = b plus (suc a) b = suc (plus a b) infixl 6 _+_ _+_ = plus {-# DISPLAY suc n = 1 + n #-} {-# DISPLAY plus a b = a + b #-} postulate T : {A : Set} → A → Set test₁ : ∀ a b → T (plus (suc a) b) test₁ a b = {!!} data Vec (A : S...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Reducibility {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped hiding (_∷_) open import Definition.Untyped.Properties open import Definition.Typed open import ...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Construction.Properties.Comma where open import Level open import Data.Product using (Σ; _,_; proj₁; proj₂; zip; map; swap; <_,_>; -,_) open import Categories.Category open import Categories.Category.Instance.One open import Categories.Category.Equivalence...
module FlatUnderscore where postulate A : Set f : (@♭ X : A → Set) → ∀ a → X a @♭ B : A → Set -- The undescore should be solved to B. g : ∀ a → B a g = f _
{-# OPTIONS --safe --no-qualified-instances #-} module CF.Syntax where open import Level open import Data.Integer open import Data.Bool open import Data.String open import Data.Product open import Data.List hiding (null) open import Data.List.Relation.Unary.All open import Relation.Unary hiding (_⊢_) open import Rel...
-- Andreas, 2019-11-06, issue #4173, reported and testcase by nad. -- Allow pattern matching on erased arguments in erased context. -- {-# OPTIONS -v tc.cover.split:60 #-} open import Agda.Builtin.Bool @0 F : @0 Bool → Set₁ F true = Set F false = Set -- Should succeed. @0 G : @0 Bool → Set₁ G x = {! x !} -- spli...
module Class.Monad where open import Class.Functor open import Data.Unit.Polymorphic open import Category.Monad renaming (RawMonad to Monad) public open Monad {{...}} using (return; _>>=_; _=<<_; _>>_) public module _ {a} {M : Set a → Set a} {{m : Monad M}} where instance _ = Monad.rawIApplicative m monad...
{-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude open import GSeTT.Syntax open import GSeTT.Rules {- Categorical structure of the type theory for globular sets -} module GSeTT.CwF-structure where {- cut-admissibility : action of substitutions preserves derivability -} []T : ...
{- With Agda's current sized types, we have a size ∞ with ∞ < ∞. That's obviously troublesome if we want to interpret sizes as ordinals and < as the less-than relation, and indeed we can use this rule to prove false (in multiple different ways). This file is an experiment to see whether we could still work...
module Data.List.Functions where import Lvl open import Data.Boolean import Data.Boolean.Operators open Data.Boolean.Operators.Programming open import Data.List open import Data.Option as Option using (Option) import Data.Option.Functions as Option open import Data.Tuple as Tuple using (_⨯_ ; _,_...
{-# OPTIONS --universe-polymorphism --no-positivity-check #-} module Alg-IIR where data Level : Set where zero : Level suc : Level -> Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} max : Level -> Level -> Level max zero m = m max (suc n) ...
{-# OPTIONS --without-K --safe #-} open import Level open import Categories.Category using () renaming (Category to Setoid-Category) open import Categories.Category.Monoidal using (Monoidal) module Categories.Pseudofunctor.Instance.EnrichedUnderlying {o ℓ e} {V : Setoid-Category o ℓ e} (M : Monoidal V) (v : Level) ...
{- 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.Consensus.Consensus...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Application {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.L...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Literals.Definition.Negative where open import Light.Library.Data.Natural as ℕ using (ℕ ; zero ; successor) renaming (ℓ to nℓ) open import Light.Level using (++_ ; _⊔_) open import Light.Variable.Sets open import Light.Variab...
module Cats.Category.Setoids.Facts.Exponentials where open import Data.Product using (_,_) open import Relation.Binary using (Setoid) open import Cats.Category open import Cats.Category.Setoids as Setoids using (Setoids ; ≈-intro ; ≈-elim) open import Cats.Category.Setoids.Facts.Products as Products using (hasBinar...
------------------------------------------------------------------------------ -- Testing the function FOL.Translation.Terms.termToFOLTerm: Con term ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# O...
module Numeral.Matrix.Relations where open import Data.Tuple as Tuple using (_,_) open import Logic.Predicate open import Logic open import Numeral.Matrix hiding (module SquareMatrix) open import Numeral.Matrix.OverField import Relator.Equals as Eq open import Structure.Operator.Field open import Structure.Operat...
module Text.Parse (Tok : Set) where open import Prelude private data P′ (A : Set) : Set where symbolBind : (Tok → P′ A) → P′ A fail′ : P′ A returnPlus : A → P′ A → P′ A _+++′_ : ∀ {A} → P′ A → P′ A → P′ A symbolBind f +++′ symbolBind g = symbolBind λ x → f x +++′ g x fail′ +++′ q = q p +++′ fa...
module json where open import general-util data json : Set where json-null : json json-raw : rope → json json-string : string → json json-nat : nat → json json-array : 𝕃 json → json json-object : 𝕃 (string × json) → json json-escape-string : string → string json-escape-string str = 𝕃char-to-string $ r...
{- 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 -} module Dijkstra.EitherD.Syntax where open import Dijkstra.EitherD open impor...
_ : @ω Set → Set₁ _ = λ (@0 _) → Set
------------------------------------------------------------------------ -- The Eilenberg-MacLane space K(G, 1) ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} -- The module is parametrised by a notion of equality. The higher -- constructors of the HIT ...
------------------------------------------------------------------------ -- The equality can be turned into a groupoid which is sometimes -- commutative ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Equality.Groupoid {reflexi...
module Implicits.Syntax.Type.Unification.Lemmas where open import Prelude open import Data.Nat.Properties.Simple open import Data.Maybe as Maybe open import Data.Vec open import Extensions.Vec open import Implicits.Syntax open import Implicits.Syntax.Type.Unification hiding (open-meta) open import Implicits.Substitut...
-- Andreas, 2017-01-13, issue #2402 -- Error message: incomplete pattern matching open import Common.Bool module _ (A B C D E F G H I J K L M O P Q R S T U V W X Y Z : Set) where test2 : Bool → Bool test2 x with true test2 true | x = ? -- WAS: Reports: -- Incomplete pattern matching for .IncompletePattern.with-56. ...
{-# OPTIONS --safe #-} module Cubical.Algebra.Ring.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open...
------------------------------------------------------------------------ -- The Agda standard library -- -- Operations on and properties of decidable relations -- -- This file contains some core definitions which are re-exported by -- Relation.Nullary.Decidable ----------------------------------------------------------...
------------------------------------------------------------------------ -- Digits and digit expansions ------------------------------------------------------------------------ module Data.Digit where open import Data.Nat open import Data.Nat.Properties open SemiringSolver open import Data.Fin as Fin using (Fin; zero...
-- Adding forcing to functions (f in this case) leaves -- an unsolved meta of type I (for the argument to f). module Issue330 where postulate I : Set i : I data D (n : I) : Set where d : D n f : ∀ n → D n → D n f n d = d data P : D i → Set where c : ∀ v → P (f i v) p : P d p = c _
module Language.Greek where data Maybe A : Set where none : Maybe A just : A → Maybe A data Unicode : Set where Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ′ μ ν ξ ο π ρ σ ς τ υ φ χ ψ ω : Unicode grave acute diaeresis smooth rough circumflex iotaSubscript : Unicode postulate Char :...
module Issue481Record where record Issue481Record : Set where
{-# OPTIONS --without-K --safe #-} open import Level open import Categories.Category using (Category) module Categories.NaturalTransformation.Hom {o ℓ e : Level} (C : Category o ℓ e) where open import Categories.Category.Instance.Setoids open import Categories.Functor.Hom using (module Hom; Hom[_][-,_]; Hom[_][_,-]; ...
module Comments where {- Single-line comments cannot be started inside multi-line ones: -- -} postulate foo-- : Set -- Note that -- does not start a comment when -- located inside or at the end of an identifier. -- The following comment marker is followed by an alphabetic -- character: -...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pairs of lists that share no common elements (propositional equality) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary mod...
{- 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 -} import LibraBFT.Impl.OBM.Crypto as Crypto open import Libra...
------------------------------------------------------------------------ -- The Agda standard library -- -- A bunch of properties about natural number operations ------------------------------------------------------------------------ -- See README.Nat for some examples showing how this module can be -- used. {-# OPT...
{-# OPTIONS --cubical #-} open import 17-number-theory public {- streams -} record stream (A : Set) : Set where coinductive field hd : A tl : stream A open stream public from : ℕ → stream ℕ hd (from n) = n tl (from n) = from (succ-ℕ n) map-stream : {A B : Set} → (A → B) → stream A → stream B hd (map-s...
module BasicIS4.Metatheory.DyadicGentzen-TarskiGluedDyadicImplicit where open import BasicIS4.Syntax.DyadicGentzen public open import BasicIS4.Semantics.TarskiGluedDyadicImplicit public open ImplicitSyntax (_⊢_) public -- Soundness with respect to all models, or evaluation. -- FIXME postulate reify⋆ : ∀ {{_ : Mo...
module Adjunctions.Adj2Mon where open import Library open import Categories open import Functors open import Monads open import Adjunctions open Cat open Fun Adj2Mon : ∀{a b}{C D : Cat {a}{b}} → Adj C D → Monad C Adj2Mon {C = C}{D} A = record{ T = OMap R ∘ OMap L; η = left (iden D); bind = HMap R ∘ right...
{- Definition of subfinite sets A set is subfinite if it is merely a subset of `Fin n` for some `n`. This definition is weaker than `isFinSet` if we don't assume LEM, but they are equivalent if we do. Every subfinite set is guaranteed to be a set and discrete. -} {-# OPTIONS --cubical --no-import-sorts --safe #-} ...
module Haskell.Prim.Maybe where -------------------------------------------------- -- Maybe data Maybe {ℓ} (a : Set ℓ) : Set ℓ where Nothing : Maybe a Just : a -> Maybe a maybe : ∀ {ℓ₁ ℓ₂} {a : Set ℓ₁} {b : Set ℓ₂} → b → (a → b) → Maybe a → b maybe n j Nothing = n maybe n j (Just x) = j x
module _ where open import Agda.Builtin.Nat open import Agda.Builtin.String open import Common.IO open import Common.Unit data ⊥ : Set where record Pair : Set where constructor _,_ field fst snd : String open Pair record ERing : Set where constructor ering field divRem : (⊥ → ⊥) → Pair open ERing eRing :...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Construction.Properties.Presheaves.CartesianClosed where open import Level open import Data.Unit open import Data.Product using (_,_) open import Data.Product.Relation.Binary.Pointwise.NonDependent open import Function.Equality using (Π) renaming (_∘_ to _...
{-# OPTIONS --universe-polymorphism #-} module SetOmega where open import Imports.Level postulate IsType : ∀ {a} → Set a → Set Bad : IsType ((a : Level) → Set a)
------------------------------------------------------------------------ -- Higher lenses, defined using the requirement that the remainder -- function should be surjective ------------------------------------------------------------------------ {-# OPTIONS --cubical #-} import Equality.Path as P module Lens.Non-dep...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Bool open import lib.types.Empty open import lib.types.Lift open import lib.types.Sigma open import lib.types.Pi module lib.types.Coproduct where module _ {i j} {A : Type i} {B : Type j} where Coprod= : Coprod A B → Coprod A B → ...
open import Data.Empty open import Data.List hiding ([_]) renaming (_∷_ to _∷ₗ_) open import Data.Maybe open import Data.Product open import Data.Sum open import Data.Unit open import AEff open import AwaitingComputations open import EffectAnnotations open import Preservation open import Progress open import Renamings...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.BinNat where open import Cubical.Data.BinNat.BinNat public
{-# OPTIONS --safe #-} module Cubical.Algebra.MonoidSolver.MonoidExpression where open import Cubical.Foundations.Prelude open import Cubical.Data.FinData open import Cubical.Data.Nat open import Cubical.Data.Vec open import Cubical.Algebra.CommMonoid private variable ℓ : Level infixl 7 _⊗_ -- Expression in...
{- The equivalent "goodness" of can-θ w.r.t. the rmerge reduction. The main properties of the Can function proved in this file are: canθₛ-mergeˡ : ∀ {E θ' r p BV FV} sigs θ → CorrectBinding p BV FV → p ≐ E ⟦ ρ θ' · r ⟧e → ∀ S' → Signal.unwrap S' ∉ SigMap.keys (Env.sig θ') → Signal.unwrap S' ∈...
------------------------------------------------------------------------------ -- Conversion rules for the nest function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymor...
module Structure.Relator.Function where import Lvl open import Lang.Instance open import Logic open import Logic.Propositional open import Logic.Predicate open import Functional open import Structure.Setoid open import Structure.Setoid.Uniqueness open import Structure.Relator open import Type private variable ℓₒ...
data ⊥ : Set where record ⊤ : Set where data Bool : Set where false : Bool true : Bool True : Bool → Set True false = ⊥ True true = ⊤ Foo : (b : Bool) → True b → Set Foo true _ = ⊤ -- The problem rises because I have removed this impossible case. -- Foo false () test : (b : Bool) (t : True b) → Foo b t →...
------------------------------------------------------------------------------ -- Testing nested axioms ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPT...
module LearnYouAn where data ℕ : Set where zero : ℕ suc : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + n = n (suc n) + m = suc (n + m) -- if_then_else_ : ∀ { a } → Bool → a → a → a data _even : ℕ → Set where ZERO : zero even STEP : ∀ {x} → x even → suc (suc x) even proof₁ : suc (suc (suc (suc zero))) ...
{-# OPTIONS --warning=error #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Vectors open import Semirings.Definition open import Categories.Definition open import Orders open import Categorie...