text
stringlengths
4
690k
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for reasoning with a setoid ------------------------------------------------------------------------ -- Example use: -- n*0≡0 : ∀ n → n * 0 ≡ 0 -- n*0≡0 zero = refl -- n*0≡0 (suc n) = begin...
{-# OPTIONS --without-K #-} open import Base open import Integers module Spaces.FlatteningLoopSpaceWedgeCircles {i} (A : Set i) (set : is-set A) where import Spaces.WedgeCircles import Algebra.FreeGroup import Algebra.FreeGroupProps import Algebra.FreeGroupAsReducedWords open Spaces.WedgeCircles A renaming (wedge...
{-# OPTIONS --without-K #-} --open import HoTT open import homotopy.3x3.PushoutPushout open import homotopy.3x3.Transpose import homotopy.3x3.To as To import homotopy.3x3.From as From open import homotopy.3x3.Common module homotopy.3x3.FromTo {i} (d : Span^2 {i}) where open Span^2 d open M d hiding (Pushout^2) open ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.SumFin.Properties where open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Prelude open import Cubical.Foundations.Univalence open import Cubical.Data.Empty as ⊥ import Cubical.Data.F...
{-# OPTIONS --cubical --no-import-sorts --safe #-} 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 import Cubical.Foundations.GroupoidLa...
{-# OPTIONS --without-K #-} open import library.Basics hiding (Type ; Σ) open import library.types.Sigma open import library.NType2 open import Sec2preliminaries open import Sec3hedberg module Sec4hasConstToSplit where -- Auxiliary Lemma 4.2 transport-is-comp : {X Y : Type} → {x₁ x₂ : X} → (h k : X → Y) → (t : ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Monoid.Morphism where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Functions.Embedding open import Cubical.Algebra open import Cubical.Algebra.Semigroup.Morphism private variable m n :...
open import bool module braun-tree{ℓ} (A : Set ℓ) (_<A_ : A → A → 𝔹) where open import bool-thms open import eq open import list open import nat open import nat-thms open import product open import sum -- the index n is the size of the tree (number of elements of type A) data braun-tree : (n : ℕ) → Set ℓ where bt...
open import Silica open import HeapProperties import Context open TypeEnvContext open import Data.Nat open import Relation.Nullary using (¬_; Dec; yes; no) open import Data.Empty import Relation.Binary.PropositionalEquality as Eq data Preservation : Expr → Set where pres : ∀ {e e' : Expr} → ∀ {T T' : Type...
{- Set quotients: -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.SetQuotients.Properties where open import Cubical.HITs.SetQuotients.Base open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundatio...
{-# OPTIONS --sized-types #-} open import Common.Size data Heap : (i j : Size) → Set where node : (i j : Size) → Heap (↑ i) (↑ j) postulate _∪_ : Heap ∞ ∞ → Heap ∞ ∞ → Heap ∞ ∞ mkH : ∀ i j → Heap i j merge : (i j : Size) → Heap i j → Heap ∞ ∞ merge .(↑ i) .(↑ j) (node i j) with Set merge .(↑ i) .(↑ j) (node i...
postulate A : Set module _ {{a : A}} (f : A → A) where g : {{a : A}} → A g {{a}} = a t : A t = g
{-# OPTIONS --cubical --no-import-sorts #-} module Module where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Structures.Ring open import Cubical.Structures.Group open import Cu...
{-# OPTIONS --cubical --safe #-} module Data.Tuple.UniverseMonomorphic where open import Prelude open import Data.Fin Tuple : ∀ n → (Fin n → Type) → Type Tuple zero f = ⊤ Tuple (suc n) f = f f0 × Tuple n (f ∘ fs) private variable n : ℕ U : Fin n → Type ind : Tuple n U → (i : Fin n) → U i ind {n = suc...
{- This file contains cospans, cones, pullbacks and maps of cones in precategories. -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Pullback where open import Cubical.Foundations.Prelude open import Cubical.Data.Sigma open import Cubical.Categories.Category private variable ℓ ...
module Common.Semantics where open import Common.Context public -- Special products for glueing. infix 5 _⅋_ record Glue (Syn : Set) (Sem : Set) : Set where constructor _⅋_ field syn : Syn sem : Sem open Glue public -- Contexts as concrete worlds. module ConcreteWorlds (U : Set) where record World...
data ℕ : Set where zero : ℕ succ : ℕ → ℕ data D : Set foo : ℕ → ℕ foo n = n data D where lam : (D → D) → D
module SystemF.BigStep.Intrinsic where open import Prelude hiding (⊥) open import SystemF.BigStep.Types open import Data.List hiding ([_]) open import Data.List.Any.Membership open import Data.List.Any hiding (map) open import Data.Fin.Substitution -- intrinsically typed syntax for System F infix 100 _[_] data Term...
-- Andreas, 2019-08-18, issue #1346 -- Allow fixity in renaming directive, but not for modules. module _ where open import Agda.Builtin.Equality using () renaming (module _≡_ to infix 4 _~_) -- Expected warning: -- Modules do not have fixity -- when scope checking the declaration -- open import Agda.Builtin.Eq...
{- Copyright 2019 Lisandra Silva Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
------------------------------------------------------------------------------ -- FOTC version of the domain predicate of quicksort given by the -- Bove-Capretta method ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types...
{-# OPTIONS --without-K --safe #-} module Categories.2-Functor where open import Level open import Categories.Category.Monoidal.Instance.StrictCats using (module Product) open import Categories.2-Category using (2-Category) open import Categories.Enriched.Functor using (Functor) 2-Functor : ∀ {o ℓ e c d} → ...
{-# OPTIONS --cubical --safe #-} module Cubical.Structures.Rng 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.NAr...
module Extensionality where open import Relation.Binary.PropositionalEquality hiding (Extensionality) postulate f-ext : {A : Set}{B : A → Set}{f : (x : A) → B x} {g : (x : A) → B x} → (∀ x → f x ≡ g x) → f ≡ g
_ : Set _ : Set → Set
------------------------------------------------------------------------ -- The Agda standard library -- -- Heterogeneous N-ary Functions: basic types and operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Function.Nary.NonDependent.Base where...
module par-swap.confluent where open import par-swap open import par-swap.properties open import Data.Nat using (_+_ ; _≤′_ ; _<′_ ; suc ; zero ; ≤′-refl) open import Esterel.Lang.CanFunction open import utility open import Esterel.Lang open import Esterel.Context open import Data.Product open import Data.Sum open im...
------------------------------------------------------------------------ -- Support for sized types ------------------------------------------------------------------------ {-# OPTIONS --without-K --sized-types #-} module Prelude.Size where open import Prelude -- Size primitives. open import Agda.Builtin.Size publ...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommRing.Instances.Polynomials.UnivariatePolyHIT where open import Cubical.Foundations.Prelude open import Cubical.Data.Empty as ⊥ open import Cubical.Data.Nat hiding (_·_) renaming (_+_ to _+n_) open import Cubical.Data.Nat.Order open imp...
module Data.Num.Sandbox.WF where open import Data.Nat -- open import Relation.Binary -- -- open DecTotalOrder decTotalOrder -- using (trans) -- -- data Acc (n : ℕ) : Set where -- acc : (∀ m → m < n → Acc m) → Acc n -- -- go0 : (m : ℕ) → m < 0 → Acc m -- go0 m () -- -- <-wf : ∀ n → Acc n -- <-wf n = acc (go n) --...
------------------------------------------------------------------------ -- The Agda standard library -- -- Boring lemmas used in Data.Nat.GCD and Data.Nat.Coprimality ------------------------------------------------------------------------ module Data.Nat.GCD.Lemmas where open import Data.Nat import Data.Nat.Propert...
{-# OPTIONS --safe #-} module Cubical.Displayed.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.Univalence using (pathToEquiv; univalence; ua-ungluePath-Equ...
open import Oscar.Prelude module Oscar.Class.Map where module _ {𝔬₁} {𝔒₁ : Ø 𝔬₁} {ℓ₁} (_∼₁_ : 𝔒₁ → 𝔒₁ → Ø ℓ₁) {ℓ₂} (_∼₂_ : 𝔒₁ → 𝔒₁ → Ø ℓ₂) where 𝓶ap = ∀ {x y} → x ∼₁ y → x ∼₂ y record 𝓜ap : Ø 𝔬₁ ∙̂ ℓ₁ ∙̂ ℓ₂ where field map : 𝓶ap open 𝓜ap ⦃ … ⦄ public
-- Andreas, 2016-05-04, issue 1954 module _ where module P (A : Set) where record R : Set where field f : A open module Q A = P A module M (A : Set) (r : R A) where open R A r public -- Parameter A should be hidden in R.f works : ∀{A} → R A → A works r = R.f r -- Record value should not be hidden in M.f t...
-- Andreas, 2017-12-16, issue #2868. -- Printing record fields correctly inside the record definition -- in the presence of --postfix-projections. {-# OPTIONS --postfix-projections #-} open import Agda.Builtin.Equality postulate A : Set record R : Set where field a : A same : a ≡ a test : A test = ...
module _ where open import Data.Nat using (_+_) open import Data.Nat.Properties.Simple using ( +-comm ; +-assoc) open import utility open import Esterel.Lang open import Esterel.Lang.Properties open import Esterel.Environment as Env open import Esterel.Context open import Data.Product open import Data.Sum open import ...
module Categories.Functor.Construction.Exponential where open import Categories.Category open import Categories.Category.Product using (Product) open import Categories.Category.CartesianClosed open import Categories.Category.Cartesian open import Categories.Category.BinaryProducts open import Categories.Object.Exponen...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Dagger where open import Level using (_⊔_; suc) open import Relation.Unary using (Pred) open import Categories.Category.Core using (Category) open import Categories.Functor.Core using (Functor) open import Categories.Morphism using (Iso) record HasDagger ...
-- Andreas, 2017-01-12, issue #2386 postulate A : Set -- Should be rejected: data Eq : (B : Set) (x y : B) → Set where refl : (x : A) → Eq A x x {-# BUILTIN EQUALITY Eq #-} -- Expected error: -- Wrong type of constructor of BUILTIN EQUALITY -- when checking the pragma BUILTIN EQUALITY Eq
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.ProdBetaEta {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.T...
Finite : Domain → Formula Finite(s) = ∃ₛ(ℕ)(n ↦ s ≼ 𝕟(n)) -- TODO: Now this means that there is an injection (s → 𝕟(n)), which is equivalent to the existance of an surjection (𝕟(n) → s) because stuff that follows from excluded middle (more specifically ((s ≼ 𝕟(n)) ↔ (𝕟(n) ≽ s))). Define ∑ (summation over finite s...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Semigroup where open import Cubical.Algebra.Base public open import Cubical.Algebra.Definitions public open import Cubical.Algebra.Structures public using (IsSemigroup; issemigroup) open import Cubical.Algebra.Bundles public using (Semigroup; m...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Numbers.Naturals.Order.Lemmas open import Semirings.Definition open import Orders.Total.Definition open import Lists.Lists module Vectors where data Vec ...
module Printf where import AlonzoPrelude import PreludeList import PreludeShow import PreludeString import PreludeNat open AlonzoPrelude open PreludeList hiding (_++_) open PreludeShow open PreludeString open PreludeNat data Unit : Set where unit : Unit data Format : Set where stringArg : Format natArg : F...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.List.Relation.Unary.Any.Properties directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data...
open import Function using (case_of_; _∘_) open import Data.List using (List; _++_; map) renaming (_∷_ to _,_; _∷ʳ_ to _,′_; [] to ∅) open import Data.List.Properties using (map-++-commute) open import Data.Product using () renaming (_×_ to _x'_) open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; r...
module Issue564 where postulate Level : Set zero : Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} postulate A : Level → Set module M ℓ where postulate a : A ℓ postulate P : A zero → Set open M zero p : P a p = {!!}
{-# OPTIONS --without-K --safe #-} -- This module primarily deals with expressions for pretty-printing, -- for the step-by-step output from the solver. open import Algebra open import Relation.Binary open import Relation.Binary.PropositionalEquality open import Data.String using (String) open import EqBool open impor...
module Data.Lens.Lens where open import Haskell.Prelude {-# FOREIGN AGDA2HS {-# LANGUAGE Rank2Types #-} #-} ---- Functors -- The const functor, for which fmap does not change its value data Const (a : Set) (b : Set) : Set where CConst : a -> Const a b getConst : {a : Set} {b : Set} -> Const a b -> a getConst (C...
module Postulate where postulate f : {A : Set} → A → A g : {A : Set} → A → A h : {A : Set} → A → A h x = f x
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Variable.Other {ℓ} (𝕒 : Set ℓ) where variable a b c d e f g h i j k l m : 𝕒 variable n o p q r s t u v w x y z : 𝕒
open import slots.imports open import slots.defs module slots.packed {cfg : config}(g : game cfg) where open config cfg open game g LineCombinations = Vec ℕ n ReelCombinations = Vec LineCombinations m PackedLine = Fruit × ReelNo PackedReel = Vec ℕ m PackedReels = Vec PackedReel n packReel : Reel → PackedReel packR...
module plfa.part1.Equality where data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x infix 4 _≡_ sym : ∀ {A : Set} {x y : A} → x ≡ y → y ≡ x sym refl = refl trans : ∀ {A : Set} {x y z : A} → x ≡ y → y ≡ z → x ≡ z trans refl refl = refl cong : ∀ {A B : Set} (f : A → B) {x y : A} → x ≡ y → f x ≡ f y cong f ref...
module Class.Monad.Writer where open import Class.Monad open import Data.Product open import Data.Unit.Polymorphic open import Level open import Function private variable a : Level A : Set a record MonadWriter (M : Set a → Set a) {{_ : Monad M}} (W : Set a) : Set (suc a) where field tell : W → M ⊤ ...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Snd {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed open import Def...
module plfa.part1.Naturals where import Relation.Binary.PropositionalEquality as Eq -- import Data.Nat using (ℕ; zero; suc; _+_; _*_; _^_; _∸_) open Eq using (_≡_; refl) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) -- 'refl' - the name for evidence that two terms are equal -- Agda uses underbars to indicate where...
module FunctionsInIndices where open import Prelude open import Eq data Tree (a : Set) : ℕ -> Set where leaf : a -> Tree a 1 node : forall n₁ n₂ -> Tree a n₁ -> Tree a n₂ -> Tree a (n₁ + n₂) -- This does not work: -- leftmost : forall {a} n -> Tree a (suc n) -> a -- leftmost .0 (leaf x) ...
{-# OPTIONS --experimental-irrelevance #-} -- {-# OPTIONS -v tc.lhs:20 #-} module ShapeIrrelevantIndex where data Nat : Set where Z : Nat S : Nat → Nat data Good : ..(_ : Nat) → Set where goo : .(n : Nat) → Good (S n) bad : .(n : Nat) → Good n → Nat bad .(S n) (goo n) = n
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} -- From: Peter Dybjer. Comparing integrated and external logics of -- functional programs. Science of Computer Programming, 14:59–79, -- 1990 modu...
module Ferros.Resource.CNode where open import Ferros.Resource.CNode.Base public
{-# OPTIONS --without-K --rewriting #-} module Basics where open import Base public open import PropT public open import hSet public open import lib.Basics public
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Monoidal.Structure using (SymmetricMonoidalCategory) module Categories.Functor.Monoidal.Symmetric {o o′ ℓ ℓ′ e e′} (C : SymmetricMonoidalCategory o ℓ e) (D : SymmetricMonoidalCategory o′ ℓ′ e′) where open import Level open import Data.Product u...
------------------------------------------------------------------------ -- The Agda standard library -- -- Finite sets ------------------------------------------------------------------------ -- Note that elements of Fin n can be seen as natural numbers in the -- set {m | m < n}. The notation "m" in comments below re...
{-# OPTIONS --allow-unsolved-metas #-} postulate A : Set data Unit : Set where unit : Unit F : Unit → Set F unit = A postulate P : {A : Set} → A → Set Q : ∀ {x} → F x → Set f : ∀ {x} {y : F x} (z : Q y) → P z variable x : Unit y : F x g : (z : Q y) → P z g z with f z ... | p = p
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Categories.Instances.EilenbergMoore where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism renaming (Iso to _≅_) open import Cubical...
module _ where open import Issue1839.A open import Issue1839.B X : DontPrintThis -- should display as PrintThis X = {!!}
------------------------------------------------------------------------ -- Some code suggesting that types used in "programs" might not -- necessarily be sets ------------------------------------------------------------------------ -- If lenses are only used in programs, and types used in programs are -- always sets,...
------------------------------------------------------------------------ -- The Agda standard library -- -- Examples showing how the generic n-ary operations the stdlib provides -- can be used ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module README.Nar...
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category) -- A "canonical" presentation of cartesian closed categories. -- -- This presentation is equivalent to the one in -- Categories.Category.CartesianClosed but it is easier to work with -- in some circumstances. -- -- Here, exponentials a...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Empty.Base where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude private variable ℓ : Level data ⊥ : Type₀ where ⊥* : Type ℓ ⊥* = Lift ⊥ rec : {A : Type ℓ} → ⊥ → A rec () elim : {A : ⊥ → Type ℓ} → (x : ⊥) → A ...
------------------------------------------------------------------------ -- A memoising backend for RecursiveDescent.Hybrid ------------------------------------------------------------------------ -- Following Frost/Szydlowski and Frost/Hafiz/Callaghan (but without -- the left recursion fix). An improvement has been m...
module Data.Rational where import Data.Bool as Bool import Data.Nat as Nat import Data.Integer as Int open Int renaming ( _*_ to _*'_ ; _+_ to _+'_ ; -_ to -'_ ; _-_ to _-'_ ; !_! to !_!' ; _==_ to _=='_ ; _≤_ to _≤'_ ...
{- This second-order signature was created from the following second-order syntax description: syntax Empty | E type 𝟘 : 0-ary term abort : 𝟘 -> α theory (𝟘η) e : 𝟘 c : α |> abort(e) = c -} module Empty.Signature where open import SOAS.Context -- Type declaration data ET : Set where 𝟘 : ET ope...
module Issue1245 where postulate A B : Set [_] : A -> B module M (_ : B) where module N (a : A) = M [ a ]
-- This file is the source Agda file -- Edit this file not Type.hs -- The warning below will be written to Type.hs module PlutusCore.Generators.NEAT.Type where -- warning to be written to Haskell file: {-# FOREIGN AGDA2HS {- !!! THIS FILE IS GENERATED FROM Type.agda !!! DO NOT EDIT THIS FILE. EDIT Type.agda !!! AND T...
module Fail.MultiArgumentPatternLambda where open import Agda.Builtin.Bool tooManyPats : Bool → Bool → Bool tooManyPats = λ where false false → false true true → false _ _ → true {-# COMPILE AGDA2HS tooManyPats #-}
-- Andreas, 2018-03-23: issue #3007, reported by Fabian -- An broken identifier followed by a comment and then the end of the file -- caused an internal error during error reporting. -- -- Should fail without internal error. postulate _-- This is the end of the file!
module Relator.Equals.Proofs where open import Relator.Equals open import Structure.Relator.Equivalence open import Structure.Relator.Properties open import Structure.Setoid renaming (_≡_ to _≡ₛ_) instance [≡]-reflexivity : ∀{ℓ}{A : Type{ℓ}} → Reflexivity(_≡_ {P = A}) Reflexivity.proof([≡]-reflexivity) = constant...
module New.NewNew where open import New.Changes open import New.LangChanges open import New.Lang open import New.Derive open import Data.Empty [_]τ_from_to_ : ∀ (τ : Type) → (dv : Chτ τ) → (v1 v2 : ⟦ τ ⟧Type) → Set -- This can't be a datatype, since it wouldn't be strictly positive as it -- appears on the left of an...
module Data.ListSized.Functions where import Lvl open import Data.ListSized open import Functional open import Numeral.Finite open import Numeral.Natural open import Numeral.Natural.Function open import Numeral.Natural.Oper open import Numeral.Natural.Oper.Proofs open import Type private variable ℓ ℓ₁ ℓ₂ : Lvl.L...
{-# OPTIONS --type-in-type #-} id : ∀ {A : Set} → A → A;id = λ x → x Pair : Set → Set → Set;Pair = λ A B → (P : Set) → (A → B → P) → P dup : ∀ {A : Set} → A → Pair A A;dup = λ a P p → p a a Nat : Set;Nat = (n : Set) → (n → n) → n → n zero : Nat;zero = λ n s z → z suc : Nat → Nat;suc = λ a n s z → s (a n s...
module MLib.Prelude.TransitiveProver.Test where open import MLib.Prelude.FromStdlib open import Data.Nat open import Data.Nat.Properties open import MLib.Prelude.TransitiveProver _≤_ ≤-trans open Search <-isStrictTotalOrder 1≤3 : 1 ≤ 3 1≤3 = s≤s z≤n 3≤5 : 3 ≤ 5 3≤5 = s≤s (s≤s (s≤s z≤n)) 5≤9 : 5 ≤ 9 5≤9 = s≤s (s...
------------------------------------------------------------------------ -- The Agda standard library -- -- A categorical view of Vec ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.Categorical {a n} where open import Category.Applicative us...
{- This second-order signature was created from the following second-order syntax description: syntax Monad | M type T : 1-ary term ret : α -> T α bind : T α α.(T β) -> T β | _>>=_ r10 theory (LU) a : α b : α.(T β) |> bind (ret(a), x. b[x]) = b[a] (RU) t : T α |> bind (t, x. ret(x)) = t (AS) t ...
-- Andreas, 2016-12-31, issue #1976 raised by nad -- Check for correct parameters in projection pattern -- {-# OPTIONS -v tc.lhs.split:40 #-} postulate A B : Set module M (_ : Set) where record R : Set₂ where field F : Set₁ open R public open M A wrong : M.R B F wrong = Set -- Expected error: --...
{-# OPTIONS --allow-unsolved-metas #-} open import Agda.Builtin.Nat data Tick : Nat → Set where tick : ∀ {n} → Tick (suc n) data Tensor : ∀ n → Tick n → Set where ss : ∀ {n} → Tensor (1 + n) tick tensor→a : ∀ {n s} → Tensor n s → Set tensor→a x = {!!}
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of sums (disjoint unions) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Sum.Properties where open import Data.Sum open impor...
------------------------------------------------------------------------ -- The universe used to define breadth-first manipulations of trees ------------------------------------------------------------------------ module BreadthFirst.Universe where open import Codata.Musical.Colist using (Colist; []; _∷_) open import...
module StateSizedIO.GUI.VariableList where open import Data.Product hiding (map) open import Data.List open import NativeIO open import StateSizedIO.GUI.WxBindingsFFI data VarList : Set₁ where [] : VarList addVar : (A : Set) → Var A → VarList → VarList addVar' : {A : Set} → Var A → VarList → VarList addVa...
module Measure where import Data.Nat as ℕ import Data.Nat.Coprimality as Coprimality import Data.Nat.GCD as GCD import Data.Nat.Show as ℕshow import Data.Nat.Divisibility as Divisibility open ℕ using (ℕ; suc; zero) open Coprimality using (Coprime) open Divisibility using (di...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Sets.EquivalenceRelations open import Setoids.Setoids module Setoids.Product {m n o p : _} {A : Set m} {B : Set n} (R : Setoid {m} {o} A) (S : Setoid {n} {p} B) where open Setoid productSetoid : Setoid (A && B) _∼_ (productSe...
module Issue4435-1 where record ⊤ : Set where -- Declarations. data Foo (a : Set) : Set Bar : {a : Set} → Foo a → Set -- Definitions. data Foo a : Set where c1 : Foo a c2 : (x : Foo a) (y : Bar x → Foo a) → Foo a Bar c1 = ⊤ Bar (c2 a b) = (x : Bar a) → Bar (b x)
{-# OPTIONS --cubical --safe #-} module Equality where open import Cubical.Core.Everything using (_≡_; Level; Type; Σ; _,_; fst; snd; _≃_; ~_) open import Cubical.Foundations.Prelude using (refl; sym; cong; transport; subst; funExt; transp; I; i0; i1) open import Cubical.Foundations.Function using (_∘_...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Functions open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Naturals open import Sets.FinSet open import Groups.Definition open import Groups.Lemmas open import G...
open import Data.Nat using ( ℕ ; fold ) renaming ( zero to zero' ; suc to suc' ) open import Data.String using ( String ) module Data.Natural.Primitive where infixl 6 _+_ postulate Natural : Set zero : Natural suc : Natural → Natural _+_ : Natural → Natural → Natural show : Natural → String foldl : {A ...
------------------------------------------------------------------------ -- Unary relations (variant for Set₁) ------------------------------------------------------------------------ -- I want universe polymorphism. module Relation.Unary1 where -----------------------------------------------------------------------...
-- Andreas, 2012-02-25 reported by edgmnt on behalf of xplat. module Issue574 where open import Common.Level wah : ∀ o a → Set (lsuc lzero ⊔ (lsuc a ⊔ o)) → Set ((lsuc lzero ⊔ lsuc a) ⊔ o) wah o a x = x -- should succeed -- Error message was: -- Set (suc zero ⊔ (suc a ⊔ o)) != Set (suc a ⊔ o) -- when checking that t...
module Data.Either.Setoid where import Lvl open import Data.Either as Either open import Data.Either.Equiv open import Logic open import Logic.Propositional open import Structure.Function.Domain open import Structure.Function open import Structure.Relator.Equivalence open import Structure.Relator.Properties open ...
------------------------------------------------------------------------ -- Functional semantics for a non-deterministic untyped λ-calculus -- with constants ------------------------------------------------------------------------ module Lambda.Closure.Functional.Non-deterministic where open import Category.Monad.Par...
module plfa.Induction where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎) open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_) -- associativity of addition: (m + n) + p ≡ m + (n + p) +-assoc : ∀ (m n p : ℕ) → (m + n) +...