text
stringlengths
4
690k
-- Andreas, 2014-04-12, Order of declaration mattered in the presence -- of meta variables involving sizes -- {-# OPTIONS -v tc.meta:10 -v tc.meta.assign:10 #-} -- Error persists without option sized-types {-# OPTIONS --sized-types #-} module _ where open import Common.Size -- different error if we do not use the bui...
module Luau.OpSem where open import Agda.Builtin.Equality using (_≡_) open import FFI.Data.Maybe using (just) open import Luau.Heap using (Heap; _≡_⊕_↦_; lookup; function_⟨_⟩_end) open import Luau.Substitution using (_[_/_]ᴮ) open import Luau.Syntax using (Expr; Stat; Block; nil; addr; var; function⟨_⟩_end; _$_; block...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Groups.Definition open import Numbers.Naturals.Definition open import Numbers.Naturals.Order open import Setoids.Setoids open import Sets.EquivalenceRelations open import Rings.Definition open import Rings.IntegralDomains.Defini...
module Logic.Classical.Propositional where open import Boolean open import Data open import Functional import Lvl -- Propositional logic. Working with propositions and their truth (whether they are true or false). module ProofSystems {ℓ₁} {ℓ₂} {Proposition : Set(ℓ₁)} {Formula : Set(ℓ₁) → Set(ℓ₂)} (symbols : S...
------------------------------------------------------------------------ -- The Agda standard library -- -- Coprimality ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Disabled to prevent warnings from deprecated names {-# OPTIONS --warn=noUserWarning #-}...
{- 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 LibraBFT.ImplShared.Base.Types open import LibraBFT.Abstr...
open import Data.Product using ( _×_ ; _,_ ) open import Data.Sum using ( _⊎_ ) open import Relation.Unary using ( _∈_ ; _∉_ ) open import Web.Semantic.DL.FOL using ( Formula ; true ; false ; _∧_ ; _∈₁_ ; _∈₁_⇒_ ; _∈₂_ ; _∈₂_⇒_ ; _∼_ ; _∼_⇒_ ; ∀₁ ) open import Web.Semantic.DL.Signature using ( Signature ) open import ...
data Cx (U : Set) : Set where ∅ : Cx U _,_ : Cx U → U → Cx U data _∈_ {U : Set} (A : U) : Cx U → Set where top : ∀ {Γ} → A ∈ (Γ , A) pop : ∀ {B Γ} → A ∈ Γ → A ∈ (Γ , B) infixr 3 _⇒_ data Ty : Set where ι : Ty _⇒_ : Ty → Ty → Ty □_ : Ty → Ty infix 1 _⊢_ data _⊢_ : Cx Ty → Ty → Set where var : ∀...
module Numeral.Integer.Relation.Divisibility where open import Functional open import Logic.Propositional import Numeral.Natural.Relation.Divisibility as ℕ open import Numeral.Integer open import Type _∣_ = (ℕ._∣_) on₂ absₙ _∤_ = (¬_) ∘₂ (_∣_)
module Oscar.Data.Product where open import Data.Product public using (Σ; _,_; proj₁; proj₂; ∃; ∃₂; _×_)
module BasicIPC.Metatheory.Gentzen-TarskiGluedClosedImplicit where open import BasicIPC.Syntax.Gentzen public open import BasicIPC.Semantics.TarskiGluedClosedImplicit public open ImplicitSyntax (∅ ⊢_) public -- Completeness with respect to a particular model. module _ {{_ : Model}} where reify : ∀ {A} → ⊩ A → ∅ ...
------------------------------------------------------------------------ -- Operations on and properties of decidable relations ------------------------------------------------------------------------ module Relation.Nullary.Decidable where open import Data.Empty open import Data.Function open import Data.Bool open i...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Induction.WellFounded where open import Cubical.Foundations.Everything Rel : ∀{ℓ} → Type ℓ → ∀ ℓ' → Type _ Rel A ℓ = A → A → Type ℓ module _ {ℓ ℓ'} {A : Type ℓ} (_<_ : A → A → Type ℓ') where WFRec : ∀{ℓ''} → (A → Type ℓ'') → A → Type _ WFRec P x ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Algebra.Monoid module Cubical.Algebra.Monoid.Construct.Opposite {ℓ} (M : Monoid ℓ) where open import Cubical.Foundations.Prelude open import Cubical.Data.Prod using (_,_) open Monoid M import Cubical.Algebra....
module Structure.Operator.Vector.LinearMap.Equiv where open import Functional open import Function.Proofs open import Logic.Predicate import Lvl open import Structure.Category open import Structure.Function open import Structure.Function.Multi open import Structure.Operator.Properties open import Structure.Operat...
data D (X : Set) : Set data D (X : Set) where -- Should complain about repeated type signature for X
------------------------------------------------------------------------ -- Streams ------------------------------------------------------------------------ module Stream where open import Codata.Musical.Stream public renaming (_∷_ to _≺_)
open import Data.Product using ( _×_ ; _,_ ) open import Relation.Unary using ( _∈_ ) open import Web.Semantic.DL.ABox using ( ABox ; ε ; _,_ ; _∼_ ; _∈₁_ ; _∈₂_ ) open import Web.Semantic.DL.ABox.Interp using ( ⌊_⌋ ; ind ) open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ) open import Web.Semantic.DL.Concept.Model ...
module Control.Monad.Transformer where open import Prelude record Transformer {a b} (T : (Set a → Set b) → (Set a → Set b)) : Set (lsuc a ⊔ lsuc b) where field lift : {M : Set a → Set b} {{_ : Monad M}} {A : Set a} → M A → T M A open Transformer {{...}} public
{-# OPTIONS --without-K #-} module Computability.Enumeration.Base where open import Computability.Prelude open import Computability.Function record Enumerable (A : Set) : Set where field enum : ℕ → A bijective : Bijective enum open Enumerable ℕ-Enumerable : Enumerable ℕ enum ℕ-Enumerable n = n proj₁ (bije...
{-# OPTIONS --rewriting #-} open import Common.Prelude open import Common.Equality {-# BUILTIN REWRITE _≡_ #-} postulate f g : Nat → Nat f-zero : f zero ≡ g zero f-suc : ∀ n → f n ≡ g n → f (suc n) ≡ g (suc n) r : (n : Nat) → f n ≡ g n r zero = f-zero r (suc n) = f-suc n refl where rn : f n ≡ g n ...
{-# OPTIONS --cubical-compatible #-} module Common.Equality where open import Agda.Builtin.Equality public open import Common.Level subst : ∀ {a p}{A : Set a}(P : A → Set p){x y : A} → x ≡ y → P x → P y subst P refl t = t cong : ∀ {a b}{A : Set a}{B : Set b}(f : A → B){x y : A} → x ≡ y → f x ≡ f y cong f refl = refl...
module _ {T : Type{ℓₒ}} ⦃ equiv : Equiv{ℓₑ}(T) ⦄ where instance PredSet-setLike : SetLike{C = PredSet{ℓ}(T) ⦃ equiv ⦄} (_∈_) SetLike._⊆_ PredSet-setLike = _⊆_ SetLike._≡_ PredSet-setLike = _≡_ SetLike.[⊆]-membership PredSet-setLike = [↔]-intro intro _⊆_.proof SetLike.[≡]-membership PredSet-setLik...
{-# OPTIONS --cubical --safe #-} module Cubical.Structures.CommRing where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Foundations.SIP renaming (SNS-PathP to SNS) open import Cubical.Structures...
{-# OPTIONS --cubical #-} open import Cubical.Core.Glue open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Univalence open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat open import Cubical.Data.Empty open import Cubical.Data.Unit open imp...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use `Data.Vec.Functional` instead. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Disabled to prevent warnings f...
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Unit open import Oscar.Class.Leftunit module Oscar.Class.Leftunit.ToUnit where module _ {𝔞} {𝔄 : Ø 𝔞} {𝔢} {𝔈 : Ø 𝔢} {ℓ} {_↦_ : 𝔄 → 𝔄 → Ø ℓ} (let _↦_ = _↦_; infix 4 _↦_) {ε : 𝔈} {_◃_ : 𝔈 → 𝔄 → 𝔄} (let _◃_ = _◃_; infix 16 _◃_...
module Lectures.One where -- Check background color -- Check fontsize -- Ask questions at *any* time data ⊤ : Set where tt : ⊤ data ⊥ : Set where absurd : ⊥ → {P : Set} → P absurd () -- Introduce most common key bindings -- C-c C-l load -- C-c C-, show context -- C-c C-. show context + type -- C-c C-...
{-# OPTIONS --without-K --exact-split --allow-unsolved-metas #-} module 13-propositional-truncation where import 12-univalence open 12-univalence public -- Section 13 Propositional truncations, the image of a map, and the replacement axiom -- Section 13.1 Propositional truncations -- Definition 13.1.1 type-hom-Pr...
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for reasoning with a partial setoid ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Relation.Bin...
module Issue1232.Fin where data Fin : Set where zero : Fin
{- 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.Consensus.ConsensusTypes.Vote as Vote ...
{-# OPTIONS --without-K --safe #-} module Polynomial.Simple.AlmostCommutativeRing where import Algebra.Solver.Ring.AlmostCommutativeRing as Complex open import Level open import Relation.Binary open import Algebra open import Algebra.Structures open import Algebra.FunctionProperties import Algebra.Morphism as Morphis...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NType2 open import lib.types.Bool open import lib.types.Empty open import lib.types.Paths open import lib.types.Pi open import lib.types.Sigma {- This file contains various lemmas that rely on lib.types.Paths or functional extensionality f...
open import Signature -- | One signature for terms and one for predicates. module Logic (Σ Δ : Sig) (V : Set) where open import Data.Empty renaming (⊥ to Ø) open import Data.Unit open import Data.Sum open import Data.Product renaming (Σ to ∐) open import Data.Nat open import Data.Fin FinSet : Set → Set FinSet X = ∃ ...
-- Andreas, 2017-01-24, issue #2429 -- Respect subtyping also for irrelevant lambdas! -- Subtyping: (.A → B) ≤ (A → B) -- Where a function is expected, we can put one which does not use its argument. id : ∀{A B : Set} → (.A → B) → A → B id f = f test : ∀{A B : Set} → (.A → B) → A → B test f = λ .a → f a -- Should w...
{-# OPTIONS --cubical --safe #-} module Data.Empty.Properties where open import Data.Empty.Base open import Level open import HLevels isProp⊥ : isProp ⊥ isProp⊥ () isProp¬ : (A : Type a) → isProp (¬ A) isProp¬ _ f g i x = isProp⊥ (f x) (g x) i
------------------------------------------------------------------------ -- The Agda standard library -- -- The type for booleans and some operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Bool.Base where open import Data.Unit.Base usin...
open import prelude open import ch6 using (Term ; var ; fun ; _$_ ; two ; four) -- A stack is a list of values -- Values are either closures or errors data Value : Set where error : Value closure : List(Value) → Term → Value Stack = List(Value) lookup : (s : Stack) → (x : Nat) → Value lookup nil x = error look...
------------------------------------------------------------------------------ -- Agda-Prop Library. -- Normal Forms. ------------------------------------------------------------------------------ open import Data.Nat using (ℕ) module Data.PropFormula.NormalForms (n : ℕ) where ---------------------------------------...
module Prelude.Equality.Inspect where open import Prelude.Function using (id) open import Prelude.Equality open import Prelude.Product module _ {a b} {A : Set a} {B : A → Set b} (f : ∀ x → B x) (x : A) where -- The Graph idiom is more powerful than the old Inspect idiom -- (defined in terms of Graph below), in ...
module Issue2492 where open import Agda.Builtin.Nat infix 0 _! data Singleton {A : Set} : A → Set where _! : (a : A) → Singleton a _ : Singleton 10 _ = {!!}
------------------------------------------------------------------------ -- Application of substitutions ------------------------------------------------------------------------ open import Data.Universe.Indexed module deBruijn.Substitution.Data.Application.Application {i u e} {Uni : IndexedUniverse i u e} where i...
-- Andreas, 2021-10-08, first test case for unsupported generalization variable X : Set Y = X -- Expected: -- Generalizable variable GeneralizeRHS.X is not supported here -- when scope checking X
module Text.XML.Everything where -- Imported packages import Web.URI.Everything
open import bool open import list open import nat _⇒_ : 𝕃 Set → Set → Set [] ⇒ rettp = rettp (x :: inputtps) ⇒ rettp = x → inputtps ⇒ rettp _⇒𝕃_ : 𝕃 Set → Set → Set inputtps ⇒𝕃 rettp = (map 𝕃 inputtps) ⇒ (𝕃 rettp) eatInputs : {inputtps : 𝕃 Set}{rettp : Set} → inputtps ⇒𝕃 rettp eatInputs {[]} {rettp₁} = [] e...
module Data.Tuple.Equiv where import Lvl open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Structure.Function open import Structure.Operator open import Structure.Setoid open import Type private variable ℓ ℓₑ ℓₑ₁ ℓₑ₂ : Lvl.Level private variable A B : Type{ℓ} record Extensionality ⦃ equiv-A : Equiv{...
module PosFunction where data Functor : Set1 where |Id| : Functor |K| : Set -> Functor _|+|_ : Functor -> Functor -> Functor _|x|_ : Functor -> Functor -> Functor data _⊕_ (A B : Set) : Set where inl : A -> A ⊕ B inr : B -> A ⊕ B data _×_ (A B : Set) : Set where _,_ : A -> B -> A × B -- The positiv...
module UniDB.Subst.Star where open import UniDB.Subst.Core open import UniDB.Morph.Star module _ {T : STX} {{vrT : Vr T}} {{apTT : Ap T T}} {Ξ : MOR} {{lkTΞ : Lk T Ξ}} {{upΞ : Up Ξ}} where instance iLkStar : Lk T (Star Ξ) lk {{iLkStar}} ε i = vr i lk {{iLkStar}} (ξs ▻ ξ) i = ap {T} ξ (lk ...
module Formalization.RecursiveFunction where import Lvl open import Data open import Data.ListSized open import Numeral.Finite open import Numeral.Natural open import Syntax.Number open import Type{Lvl.𝟎} -- Function(n) is a syntactic representation of recursive functions of type (ℕⁿ → ℕ). -- The syntax data Fu...
{-# OPTIONS --without-K #-} module FinEquiv where -- The goal is to establish that finite sets and equivalences form a -- commutative semiring. import Level using (zero) open import Data.Empty using (⊥; ⊥-elim) open import Data.Unit using (⊤; tt) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Produc...
-- {-# OPTIONS -v tc.meta:30 --show-irrelevant #-} -- Andreas, 2013-10-29 submitted by sanzhiyan -- Documents need for different treating of DontCare in -- linearity analysis of Miller unification. -- Now, there can be DontCares stemming from irrelevant projections. module Issue927 where import Common.Level module F...
module Issue630 where Test = (A : Set) → A → A g : Test g = λ _ x → {!!} -- the goal should be displayed as ?1 : A -- not ?1 : _
-- Here is a smaller test case. The error message is produced using -- the latest (at the time of writing) development version of Agda. module Issue183 where postulate A : Set T : Set T = A → A data L (A : Set) : Set where data E (x : T) : T → Set where e : E x x foo : (f : A → A) → L (E f (λ x → f x)) foo = λ ...
{-# OPTIONS --cubical --postfix-projections --safe #-} open import Relation.Binary open import Prelude hiding (tt) module Data.List.Sort.Sorted {e} {E : Type e} {r₁ r₂} (totalOrder : TotalOrder E r₁ r₂) where open import Relation.Binary.Construct.LowerBound totalOrder open TotalOrder totalOrder renaming (refl to re...
module Holey where open import Basics open import Ix open import All open import Cutting open import Interior open import Recutter open import Mask module HOLEY {I}(C : I |> I) where open _|>_ C open INTERIOR C open RECUTTER C open MASK C data Holey {I : Set}(P : I -> Set)(i : I) : Set where hole : Ho...
-- Andreas, 2019-10-13, issue 4125 -- Avoid unnecessary normalization in type checker. -- Print to the user what they wrote, not its expanded form. -- {-# OPTIONS -v tc:25 #-} postulate We-do-not-want-to : Set → Set see-this-in-the-output : Set A = We-do-not-want-to see-this-in-the-output postulate P : A → Se...
module Numeric.Rational.Properties where open import Prelude open import Numeric.Rational open import Numeric.Nat.Properties open import Numeric.Nat.Divide open import Numeric.Nat.Divide.Properties open import Numeric.Nat.Prime open import Numeric.Nat.Prime.Properties open import Numeric.Nat.GCD open import Numeric.N...
-- BEGIN prelude.agda -- the Haskell $ and . ($) (A::Set) (B::Set) (f :: A -> B) (a :: A) :: B = f a compose (B,C,A::Set)(f :: B -> C)(g :: A -> B) :: A -> C = \ (x::A) -> f (g x) {- hardwired into Agda Integer :: Set = ? Bool :: Set = data True | False -} not (b::Bool) :: Bool = case b of { (Tr...
------------------------------------------------------------------------------ -- Addition as a function constant ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #...
module sv20.assign2.SetTheory.Algebra where open import sv20.assign2.SetTheory.Subset open import sv20.assign2.SetTheory.Logic open import sv20.assign2.SetTheory.ZAxioms infix 6 _∪_ infix 6 _-_ infix 6 _∩_ -- Properties involving operations between sets, algebra of sets. -- In this module some properties involving ...
{-# OPTIONS --without-K #-} module Types where open import Level using (_⊔_; Lift; lift; lower) public infix 1 _≡_ infixr 1 _⊎_ infixr 2 _×_ infix 3 ¬_ infixr 4 _,_ infixr 9 _∘_ -- The negative fragment. Π : ∀ {a b} (A : Set a) → (A → Set b) → Set _ Π A B = (x : A) → B x record Σ {a b} (A : Set a) (B : A → Se...
-- notes-04-thursday.agda open import mylib {- Infinite datastructure - streams, Stream A 0 ,1 , 2 ,3 ,4, ... : Stream ℕ 1, 1 , 2, 3 ,5 ,.. 2, 3, 5, 7, 11,.. duality, categorical mirror _×_ (products) and _⊎_ (coproducts, sums) Inductive datatypes: finite datastructures Coinductive datatypes: Stre...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Pi open import lib.types.Pointed module lib.types.Span where record Span {i j k : ULevel} : Type (lsucc (lmax (lmax i j) k)) where constructor span field A : Type i B : Type j C : Type k f : C → A g : C → B private sp...
module Data.Real.Order where open import Assume open import Data.Real.Base open import Data.Bool using (T; T?) open import Data.Unit using (⊤; tt) open import Relation.Nullary using (Dec; yes; no; ¬_) open import Relation.Binary.PropositionalEquality using (_≡_) open import Relation.Binary open import Level using (0ℓ...
------------------------------------------------------------------------ -- Various definitions of "true infinitely often", and some proofs -- showing that this property commutes with binary sums (in the -- double-negation monad, and sometimes with extra assumptions) ----------------------------------------------------...
import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; subst₂; cong) open import Data.Nat.Base open import Data.Fin hiding (_+_; #_) open import Data.Product using (∃; _×_; _,_; ∃-syntax) open import DeBruijn open import Substitution using (rename-subst-commute; subst-commute) open import Beta ...
-- Basic intuitionistic propositional calculus, without ∨ or ⊥. -- Hilbert-style formalisation of closed syntax. -- Sequences of terms. module BasicIPC.Syntax.ClosedHilbertSequential where open import BasicIPC.Syntax.Common public -- Derivations. infix 3 ⊦⊢_ data ⊦⊢_ : Cx Ty → Set where nil : ⊦⊢ ∅ mp : ∀ ...
{-# OPTIONS --safe #-} module Cubical.Algebra.Semigroup.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.SIP open import Cubical.Data.Sigma open import Cubical.R...
{-# OPTIONS --copatterns --show-implicit #-} module Issue940 where module _ (A : Set) where record Box : Set where constructor box field unbox : A open Box postulate x : A ex : Box ex = box x -- works ex' : Box unbox ex' = x -- Error WAS: -- An internal error has occurred. Pleas...
module Issue558b where data Nat : Set where Z : Nat S : Nat → Nat data _≡_ {A : Set} (a : A) : A → Set where Refl : a ≡ a plus : Nat → Nat → Nat plus Z n = n plus (S n) m = S (plus n m) data Addable (τ : Set) : Set where addable : (τ → τ → τ) → Addable τ plus' : {τ : Set} → Addable τ → τ → τ → τ plus' (add...
-- Andreas, 2017-01-01, issue 2372, reported by m0davis -- This file is imported by Issue2372ImportInst. module Issue2372Inst where postulate D : Set record R : Set₁ where field r : Set open R {{ ... }} public instance iR = record { r = D }
{-# OPTIONS --rewriting #-} module Examples.Run where open import Agda.Builtin.Equality using (_≡_; refl) open import Luau.Syntax using (nil; var; _$_; function_⟨_⟩_end; return; _∙_; done) open import Luau.Value using (nil) open import Luau.Run using (run; return) open import Luau.Heap using (emp; lookup-next; next-e...
module Issue5563 where F : (@0 A : Set) → A → A F A x = let y : A y = x in y
module Cats.Category.Fun.Facts where open import Cats.Category open import Cats.Category.Cat using (_≈_) open import Cats.Category.Fun using (Trans ; Fun ; ≈-intro ; ≈-elim) open import Cats.Functor using (Functor) open import Cats.Trans.Iso using (NatIso ; iso ; forth-natural ; back-natural) open import Level using ...
{-# OPTIONS --without-K --rewriting #-} module Classifying where open import Basics open import Flat open import lib.types.Sigma open import lib.Equivalence2 open import lib.types.Truncation BAut : ∀ {i} {X : Type i} (x : X) → Type i BAut {X = X} x = Σ X $ (\y → ∥ x == y ∥) ♭-commutes-with-BAut : {...
module Section8 where open import Section7 public -- 8. Correctness of conversion between terms -- ========================================== -- -- The conversion rules for terms are sound: -- Theorem 9. postulate thm₉ : ∀ {Γ A t₀ t₁} → (M N : Γ ⊢ A) → t₀ 𝒟 M → t₁ 𝒟 N → Γ ⊢ t₀ ≊ t₁ ∷ A → M...
open import Agda.Primitive using (lzero; lsuc; _⊔_) import SecondOrder.Arity import SecondOrder.Signature import SecondOrder.Metavariable import SecondOrder.Renaming import SecondOrder.Term module SecondOrder.Theory {ℓ} {𝔸 : SecondOrder.Arity.Arity} (Σ : SecondOrder.Signature.Signature ℓ 𝔸) where open Se...
------------------------------------------------------------------------------ -- Properties for the bisimilarity relation ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polym...
{-# OPTIONS --cubical --safe #-} module Data.Binary.PerformanceTests.Multiplication where open import Prelude open import Data.Binary.Definition open import Data.Binary.Addition using (_+_) open import Data.Binary.Multiplication using (_*_) open import Data.Binary.Increment using (inc) one-thousand : 𝔹 one-thousand...
{-# OPTIONS --without-K #-} module Data.Tuple.Base where open import Level using (_⊔_) -- non-dependent pair; failed to reuse _×_ record Pair {a b} (A : Set a) (B : Set b) : Set (a ⊔ b) where constructor _,_ field fst : A snd : B {-# FOREIGN GHC type AgdaPair a b c d = (c , d) #-} -- {-# COMPILE GHC Pair...
------------------------------------------------------------------------------ -- Group theory ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --wi...
{-# OPTIONS --safe --warning=error --without-K #-} open import Setoids.Setoids open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Semiring open import Sets.Cardinality.Finite.Definition open import Groups.Definition module Groups.FiniteGroups.Definition where record FiniteGroup {...
------------------------------------------------------------------------ -- A tiny library of derived combinators ------------------------------------------------------------------------ module TotalRecognisers.LeftRecursion.Lib (Tok : Set) where open import Codata.Musical.Notation open import Data.Bool hiding (_∧_; ...
-- Andreas, 2016-06-08 issue #2006 (actually #289) open import Common.Reflection open import Common.Prelude bla : Term → Term bla = {!!} -- Splitting here should be fine macro comp : Term → Term → TC ⊤ comp x t = bindTC (quoteTC (bla x)) (λ y → unify t y) foo : Term foo = comp Set
{-# OPTIONS --rewriting #-} module Luau.StrictMode where open import Agda.Builtin.Equality using (_≡_) open import FFI.Data.Maybe using (just; nothing) open import Luau.Syntax using (Expr; Stat; Block; BinaryOperator; yes; nil; addr; var; binexp; var_∈_; _⟨_⟩∈_; function_is_end; _$_; block_is_end; local_←_; _∙_; done...
open import FRP.JS.RSet using ( RSet ; _⇒_ ; ⟦_⟧ ; ⟨_⟩ ) module FRP.JS.Event where infixr 4 _∪_ postulate Evt : RSet → RSet map : ∀ {A B} → ⟦ A ⇒ B ⟧ → ⟦ Evt A ⇒ Evt B ⟧ ∅ : ∀ {A} → ⟦ Evt A ⟧ _∪_ : ∀ {A} → ⟦ Evt A ⇒ Evt A ⇒ Evt A ⟧ accumBy : ∀ {A B} → ⟦ ⟨ B ⟩ ⇒ A ⇒ ⟨ B ⟩ ⟧ → B → ⟦ Evt A ⇒ Evt ⟨ B ⟩ ⟧ {-# ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Relation.Binary.Raw module Cubical.Relation.Binary.Raw.Construct.NonStrictToStrict {a ℓ} {A : Type a} (_≤_ : RawRel A ℓ) where open import Cubical.Relation.Binary.Raw.Properties open import Cubical.Foundation...
{-# OPTIONS --erased-cubical #-} module Common.Path where open import Agda.Builtin.Cubical.Path public open import Agda.Builtin.Cubical.HCompU open import Agda.Primitive.Cubical renaming (primINeg to ~_; primIMax to _∨_; primIMin to _∧_; primHComp to hcomp; primTransp to tr...
open import Agda.Primitive using (lzero; lsuc; _⊔_) import SecondOrder.Arity import SecondOrder.VContext module SecondOrder.Signature ℓ (𝔸 : SecondOrder.Arity.Arity) where open SecondOrder.Arity.Arity 𝔸 -- a second-order algebraic signature record Signature : Set (lsuc ℓ) where -- a signature con...
-------------------------------------------------------------------------------- -- This is part of Agda Inference Systems open import Agda.Builtin.Equality open import Data.Product open import Level open import Relation.Unary using (_⊆_) module is-lib.InfSys.Induction {𝓁} where private variable U : Se...
module SizedPolyIO.ConsoleObject where open import Size open import Level using (_⊔_) renaming (suc to lsuc) open import SizedPolyIO.Console open import SizedPolyIO.Object open import SizedPolyIO.IOObject -- A console object is an IO object for the IO interface of console ConsoleObject : ∀{μ ρ}(i : Size) → (iface...
module _ where open import Common.Equality postulate _def_ _more_ _less_ : Set → Set → Set X : Set infix 21 _more_ -- default fixity should be 20 infix 19 _less_ test : (X more X def X less X) ≡ _less_ (_def_ (_more_ X X) X) X test = refl module NoFix where data NoFix : Set₁ where _+_ : Set → Set → NoFi...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Rings.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Rings.Units.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring S _+_ _*_) wher...
------------------------------------------------------------------------------ -- Properties of the iter₀ function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism ...
module Common where open import Data.Bool open import Data.Maybe open import Data.Sum open import Data.Product BoolQ : Set₁ BoolQ = (A : Set) -> A -> A -> A unBoolQ : {A : Set} -> A -> A -> BoolQ -> A unBoolQ a a' q = q _ a a' trueQ : BoolQ trueQ = \_ a a' -> a falseQ : BoolQ falseQ = \_ a a' -> a' fromBoolQ : B...
{-# OPTIONS --without-K #-} module Music where open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Data.Integer using (ℤ; +_) open import Data.List using (List; foldr; []; _∷_; reverse) open import Data.Product using (_×_; _,_) open import Data.Vec using (Vec; []; _∷_; replicate; concat; map; z...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Inverse where open import Level using (Level; suc; _⊔_) open import Categories.Category open import Data.Product import Categories.Morphism record pseudo-iso {o ℓ e} (C : Category o ℓ e) : Set (o ⊔ ℓ ⊔ e) where open Category C open Definitions C ope...
module Human.Char where open import Human.Nat open import Human.Bool postulate Char : Set {-# BUILTIN CHAR Char #-} primitive primIsLower : Char → Bool primIsDigit : Char → Bool primIsAlpha : Char → Bool primIsSpace : Char → Bool primIsAscii : Cha...
-- Andreas, 2019-12-03, issue #4200 reported and testcase by nad open import Agda.Builtin.Bool data D : Set where c₁ : D @0 c₂ : D f : D → Bool f c₁ = true f c₂ = false @0 _ : D _ = c₂ -- OK. _ : D _ = c₂ -- Not allowed. -- Expected error: -- Identifier c₂ is declared erased, so it cannot be used here -- w...