text
stringlengths
4
690k
module _ where open import Common.Prelude renaming (_+_ to _+N_) open import Common.Integer diff : Nat → Nat → Integer diff a zero = pos a diff zero (suc b) = negsuc b diff (suc a) (suc b) = diff a b _+_ : Integer → Integer → Integer pos a + pos b = pos (a +N b) pos a + negsuc b = diff a (suc b...
{-# OPTIONS --without-K --rewriting #-} open import HoTT renaming (pt to pt⊙) open import cw.CW module cw.FinCW where record AttachedFinSkeleton n (Skel : Type₀) (Real : Skel → Skeleton n) : Type₀ where constructor attached-fin-skeleton field skel : Skel numCells : ℕ attaching : Attaching ⟦ Real skel...
-- binary search trees (not balanced) open import bool open import bool-thms2 open import eq open import maybe open import product open import product-thms open import bool-relations using (transitive ; total) module bst (A : Set) (_≤A_ : A → A → 𝔹) (≤A-trans : transitive _≤A_) (≤A-total : tot...
{- https://github.com/mietek/hilbert-gentzen An Agda formalisation of IPC, IS4, ICML, and ILP. Work in progress. Made by Miëtek Bak. Published under the MIT X11 license. -} module Everything where import Common import Common.Context import Common.ContextPair import Common.Predicate import Common.PredicateBasedC...
module IPL where data _∧_ (P : Set) (Q : Set) : Set where ∧-intro : P → Q → (P ∧ Q) proof₁ : {P Q : Set} → (P ∧ Q) → P proof₁ (∧-intro p q) = p proof₂ : {P Q : Set} → (P ∧ Q) → Q proof₂ (∧-intro p q) = q _⇔_ : (P : Set) → (Q : Set) → Set a ⇔ b = (a → b) ∧ (b → a) ∧-comm′ : (P Q : Set) → (P ∧ Q) → (Q ∧ P) ∧-c...
------------------------------------------------------------------------ -- The Agda standard library -- -- Conversion of ≤ to <, along with a number of properties ------------------------------------------------------------------------ -- Possible TODO: Prove that a conversion ≤ → < → ≤ returns a -- relation equivale...
-- This module is used to illustrate how to import a non-parameterised module. module examples.syntax.ModuleA where data Nat : Set where zero : Nat suc : Nat -> Nat plus : Nat -> Nat -> Nat eval : Nat -> Nat eval zero = zero eval (suc x) = suc (eval x) eval (plus zero y) = eva...
-- Andreas, 2012-09-24 Ensure that size successor is monotone {-# OPTIONS --sized-types #-} module SizeSucMonotone where open import Common.Size data Bool : Set where true false : Bool -- T should be monotone in its second arg T : Bool → Size → Set T true i = Size< i T false i = Size< (↑ i) test : {x : Bool}{i :...
module Data.String.Exts where open import Data.Bool hiding (_<?_) open import Data.Char hiding (_<?_) open import Data.String hiding (_<?_) open import Data.Maybe open import Data.Nat open import Relation.Nullary.Decidable {-# FOREIGN GHC import Data.Text #-} postulate strHead : String -> Maybe Char strNull...
{-# OPTIONS --without-K --rewriting #-} open import HoTT import homotopy.RelativelyConstantToSetExtendsViaSurjection as SurjExt module homotopy.vankampen.Code {i j k l} (span : Span {i} {j} {k}) {D : Type l} (h : D → Span.C span) (h-is-surj : is-surj h) where open Span span open import homotopy.vankampen.Cod...
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Relation.Binary.Raw module Cubical.Relation.Binary.Reasoning.Preorder {c ℓ} {A : Type c} (P : Preorder A ℓ) where open Preorder P ------------------------------------------------------------------------ -- Pub...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use the -- Relation.Binary.Construct.Closure.Reflexive module directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Prod.Properties where open import Cubical.Core.Everything open import Cubical.Data.Prod.Base open import Cubical.Data.Sigma open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Fo...
{-# OPTIONS --cubical #-} open import Agda.Primitive.Cubical open import Agda.Builtin.Cubical.Path data S1 : Set where base : S1 loop : base ≡ base postulate weird : S1 → I bad : (x : S1) → I bad base = {!!} bad (loop x) = {!!}
module Structure.Categorical.Multi where open import Data open import Data.Boolean open import Data.Tuple using (_⨯_ ; _,_) open import Data.Tuple.Raiseᵣ import Data.Tuple.Raiseᵣ.Functions as Raise open import Data.Tuple.RaiseTypeᵣ import Data.Tuple.RaiseTypeᵣ.Functions as RaiseType open import Function.Mult...
{- 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.LedgerRecoveryData as LedgerRecoveryData o...
{-# OPTIONS --without-K #-} module Circle where open import Agda.Prim open import Data.Product open import Function renaming (_∘_ to _○_) infixr 8 _∘_ -- path composition infix 4 _≡_ -- propositional equality infix 4 _∼_ -- homotopy between two functions infix 4 _≃_ -- type of equivalences...
-- Andreas, 2015-03-17 -- Andreas, 2020-10-26 conform to Issue1428a open import Agda.Builtin.Size data ⊥ : Set where data SizeLt (i : Size) : Set where wrap : Size< i → SizeLt i -- This definition of size predecessor should be forbidden... module _ (i : Size) where postulate pred : Size< i -- ...otherwise ...
------------------------------------------------------------------------------ -- Note on the equality type class using Kettelhoit's approach ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS ...
-- 2014-03-05 Andreas, issue reported by James -- {-# OPTIONS -v tc.with.strip:60 -v:impossible:10 #-} data Nat : Set where zero : Nat pattern pzero = zero f : Nat → Nat f pzero with pzero f pzero | pzero = pzero -- ERROR WAS: -- With clause pattern pzero is not an instance of its parent pattern -- when checking...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Functional where -- Stdlib imports open import Level using (Level; _⊔_) open import Relation.Binary using (Rel; REL) -- Local imports open import Dodo.Binary.Equality -- # Definitions # Functional : ∀ {a b ℓ₁ ℓ₂ : Level} {A : Set a} {B : Set b} → Rel B ℓ₁ →...
module Data.Environment {a} {A : Set a} where open import Algebra open import Data.Nat open import Data.Empty using (⊥-elim) open import Data.Pos using (ℕ⁺; suc; replicate⁺) open import Data.List as L using (List; []...
module x06-747Connectives-hc where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq.≡-Reasoning open import Data.Nat using (ℕ) open import Function using (_∘_) ------------------------------------------------------------------------------ -- BEGIN : Copied from 747Isomorphism. pos...
module PLDI14-List-of-Theorems where -- List of theorems in PLDI submission -- -- For hints about installation and execution, please refer -- to README.agda. -- -- Agda modules corresponding to definitions, lemmas and theorems -- are listed here with the most important names. For example, -- after this file type check...
open import Data.Product using ( proj₁ ; proj₂ ) open import Data.Sum using ( inj₁ ; inj₂ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ; cong ) open import Relation.Unary using ( _⊆_ ) open import Web.Semantic.DL.ABox using ( ABox ; ⟨ABox⟩ ; Assertions ) open import Web.Semantic.DL.ABo...
module ParserC where {- import Prelude import Equiv import Eq import Datoid import List import Bag open Prelude open Equiv open Eq open Datoid open List open Bag parserDatoid : (a, s : Datoid) -> Datoid parserDatoid a s = Bag (pairDatoid a (listDatoid s)) -- We use the following dataty...
{-# OPTIONS --without-K #-} module Test where open import Level infixl 4 _≡_ data _≡_ {a} {A : Set a} (x : A) : A → Set a where refl : x ≡ x J : {a b : Level} (A : Set a) (C : (x y : A) → x ≡ y → Set b) → ((x : A) → C x x refl) → (x y : A) (P : x ≡ y) → C x y P J A C b x .x refl = b x -- K : (A : Se...
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Consequences.Equality where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definition.LogicalRelation open import Definition.LogicalRelation.Irrelevanc...
{- Cubical Agda - A Dependently Typed PL with Univalence and HITs ============================================================== Anders Mörtberg Every Proof Assistant - September 17, 2020 Link to slides: https://staff.math.su.se/anders.mortberg/slides/EPA2020.pdf Link to video: https://vi...
module Structure.Sets.Relators where
module Prelude.Monoid where open import Prelude.Function open import Prelude.Maybe open import Prelude.List open import Prelude.Semiring open import Prelude.Applicative open import Prelude.Functor record Monoid {a} (A : Set a) : Set a where infixr 6 _<>_ field mempty : A _<>_ : A → A → A open Monoid {...
{-# OPTIONS --safe #-} module Cubical.Algebra.Group.Instances.NProd where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Nat using (ℕ) open import Cubical.Algebra.Group private variable ℓ : Level open GroupStr NProd-Group : (G : (n : ℕ) → Type ℓ) → (Gstr...
------------------------------------------------------------------------ -- An abstraction: term-like things ------------------------------------------------------------------------ open import Data.Universe.Indexed module deBruijn.Context.Term-like {i u e} (Uni : IndexedUniverse i u e) where import Axiom.Extensio...
module Logic.Propositional.Proofs.Structures where import Data.Tuple as Tuple import Lvl open import Functional open import Logic open import Logic.Propositional import Logic.Propositional.Theorems as Theorems open import Structure.Operator.Properties open import Structure.Relator.Equivalence open impor...
{-# OPTIONS --prop --rewriting #-} module Examples.Sorting.Parallel where open import Examples.Sorting.Parallel.Comparable open import Calf costMonoid open import Calf.Types.Nat open import Calf.Types.List open import Relation.Binary.PropositionalEquality as Eq using (_≡_) open import Data.Product using (_,_) open ...
module Day3 where open import Data.String as String open import Data.Maybe open import Foreign.Haskell using (Unit) open import Data.List as List hiding (fromMaybe) open import Data.Nat open import Data.Nat.DivMod open import Data.Nat.Properties import Data.Nat.Show as ℕs open import Data.Char open import Data.Vec a...
{-# OPTIONS --without-K --rewriting #-} open import HoTT module experimental.NConnected where lemma₁ : ∀ {i j} {A : Type i} {B : Type j} (f : A → B) {n : ℕ₋₂} → is-connected n A → is-connected (S n) B → has-conn-fibers n f lemma₁ f cA cB = λ b → Σ-conn cA (λ a → path-conn cB) lemma₂ : ∀ {i} {A B C : T...
------------------------------------------------------------------------ -- The Agda standard library -- -- The basic code for equational reasoning with a single relation ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Rel...
{-# OPTIONS --universe-polymorphism #-} module Issue227 where open import Common.Level data D (a p b : Level) (A : Set a) (P : A → Set p) : Set (p ⊔ a ⊔ b) where d : ((x : A) → P x) → D a p b A P -- Unsolved trivial constraint: Set (a ⊔ p) =< Set (p ⊔ a). OK : ∀ {a} {A : Set a} → (A → Set) → A → Set _ OK P = P N...
------------------------------------------------------------------------------ -- Induction principles for the total natural numbers inductive predicate ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {...
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Identity module HoTT.Homotopy where open variables private variable f g : A → B -- Lemma 2.4.3 ~-natural : (α : f ~ g) {x y : A} (p : x == y) → α x ∙ ap g p == ap f p ∙ α y ~-natural α {x} refl rewrite α x = refl ~-natural-id : (α : f ~ id) {x y : A...
module UniDB.Morph.Unit where open import UniDB.Spec -------------------------------------------------------------------------------- data Unit : MOR where unit : {γ : Dom} → Unit γ γ instance iUpUnit : Up Unit _↑₁ {{iUpUnit}} unit = unit _↑_ {{iUpUnit}} unit δ = unit ↑-zero {{iUpUnit}} unit = refl ↑-s...
{-# OPTIONS --safe #-} module Cubical.Categories.Functor.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Sigma open import Cubical.Categories.Category private variable ℓC ℓC' ℓD ℓD' : Level record Functor (C : Category ℓC ℓC') (D : Category ℓD ℓD') : Type (ℓ-max (ℓ-max ℓC...
module Prelude.Monoid where open import Prelude.Function open import Prelude.Maybe open import Prelude.List open import Prelude.Semiring open import Prelude.Semigroup public open import Prelude.Applicative open import Prelude.Functor open import Prelude.Equality open import Prelude.Variables record Monoid {a} (A ...
{-# OPTIONS --without-K #-} module T where open import Level open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong; subst; module ≡-Reasoning) open import Data.Nat using (ℕ; _+_) open import Data.Fin using (Fin) data Exp : Set where ONE : Exp PLUS : Exp → Exp → Exp val : Ex...
{- This file contains: - Some basic properties of Rijke finite types. -} {-# OPTIONS --safe #-} module Cubical.Data.FinType.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.Properties ope...
{-# OPTIONS --universe-polymorphism #-} module Categories.Monoidal.Braided where open import Level open import Level using (_⊔_) open import Categories.Category open import Categories.Bifunctor using (Bifunctor) open import Categories.NaturalIsomorphism open import Categories.NaturalTransformation using (_∘₁_) renam...
module DaraisPhoas where open import Agda.Primitive using (_⊔_) module Prelude where infixr 3 ∃𝑠𝑡 infixl 5 _∨_ infixr 20 _∷_ data 𝔹 : Set where T : 𝔹 F : 𝔹 data _∨_ {ℓ₁ ℓ₂} (A : Set ℓ₁) (B : Set ℓ₂) : Set (ℓ₁ ⊔ ℓ₂) where Inl : A → A ∨ B Inr : B → A ∨ B syntax ∃𝑠𝑡 A (λ x → B) =...
module All where open import Prelude open import T open import SubstTheory open import DynTheory open import Progress open import HT open import Examples open import Eq open import DenotCommutes
{- Problem #53 Given premises: (all x)[(F x) -> (some y)((F y) & (G x y))] justification = 1.0 Ultimate epistemic interests: (all x)[(F x) -> (some y)(some z)((G x y) & (G y z))] interest = 1.0 -} open import Prelude postulate U : Set F : U → Set G : U → U → Set record Premise {x : U} (Fx : F x)...
module Issue384 where postulate D : (A : Set) → A → Set data I : Set where i : I D′ : (A : Set) → A → I → Set D′ A x i = D A x postulate Q : (A : Set) → A → Set q : ∀ j A (x : A) → D′ A x j → Q A x A : Set x : A d : D A x P : (A : Set) → A → Set p : P (Q _ _) (q _ _ _ d)
module Issue168 where postulate X : Set open import Issue168b open Membership X postulate P : Nat → Set lemma : ∀ n → P (id n) foo : P zero foo = lemma _
------------------------------------------------------------------------ -- The Agda standard library -- -- List Literals ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Literals where open import Agda.Builtin.FromString open import Data.Un...
------------------------------------------------------------------------------ -- The relation of divisibility on partial natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no...
------------------------------------------------------------------------ -- Compiler correctness ------------------------------------------------------------------------ {-# OPTIONS --cubical --sized-types #-} module Lambda.Partiality-monad.Inductive.Compiler-correctness where open import Equality.Propositional.Cubi...
module BHeap.Properties {A : Set}(_≤_ : A → A → Set) where open import Bound.Lower A open import Bound.Lower.Order _≤_ open import BHeap _≤_ open import Data.List open import Data.Nat open import Data.Sum open import Nat.Sum open import List.Permutation.Base A open import List.Permutation.Base.Concatenation A ope...
-- Andreas, 2012-10-30 Sections -- Reported by guillaume.brunerie, Oct 24 2012 module Issue735 where import Common.Level open import Common.Prelude using (Nat; zero; suc) {- I often want to use something like sections in Coq. I usually use parametrized modules but this has at least two issues that Coq does not have: ...
module ImpossiblePattern where f : ? f (_ _) = ?
open import Issue2959.M Set r : R r = ?
------------------------------------------------------------------------------ -- Example of a nested recursive function using the Agda standard -- library ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-...
-- Andreas, 2022-03-09, issue #5819, reported by Zilin Chen -- -- This test uncovered an unsound optimization (8e0fca895b9c6740d9d6c1751ed1e0ecefe63473) -- in the termination checker which replaced a (stripAllProjections . normalize) -- by a (iteratively reduce . stripAllProjections). -- Those reductions on now ill-for...
{-# OPTIONS --without-K #-} open import HoTT open import homotopy.HSpace module homotopy.EM1HSpace where module EM₁HSpace {i} (A : Group i) (A-abelian : is-abelian A) where module A = Group A open EM₁ A mult-loop : (g : A.El) (x : EM₁) → x == x mult-loop g = EM₁-elim {P = λ x → x == x} (λ _ → =-pre...
------------------------------------------------------------------------ -- The Agda standard library -- -- Format strings for Printf and Scanf ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Text.Format where open import Level using (0ℓ) open import...
------------------------------------------------------------------------------ -- Testing Agsy *without* using the Agda standard library ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --exact-split #-} {-# OPTIONS --no-...
module Tactic.Nat.Subtract.Simplify where open import Prelude hiding (abs) open import Builtin.Reflection open import Tactic.Reflection.Quote open import Tactic.Reflection open import Control.Monad.State open import Tactic.Nat.Reflect open import Tactic.Nat.NF open import Tactic.Nat.Exp open import Tactic.Nat.Auto o...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.ZCohomology.Groups.WedgeOfSpheres where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Data.Sigma.Base open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.GroupStructure ope...
------------------------------------------------------------------------ -- Vectors, defined as functions from finite sets ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Vec.Function {reflexive} (eq : ∀ {a p} → Equality-with-J...
{-# OPTIONS --without-K --rewriting #-} open import HoTT import homotopy.ConstantToSetExtendsToProp as ConstExt {- q[_]ᴳ G/Q ↞------ G ↑ ↑ φ₂ ╎ ╎ inject ↑ ↑ H ↞------- P φ₁ Then, H ≃ᴳ P/Q. -} module groups.PropQuotUniqueFactorization {...
{-# OPTIONS --safe --without-K #-} open import Generics.Prelude open import Generics.Telescope open import Generics.Desc open import Agda.Builtin.Reflection module Generics.Helpers P I {levelArgRel : Level → Level} (ArgRel : ∀ {a} → Set a → Set (levelArgRel a)) {levelArgIrr : L...
open import Common.Prelude hiding (_>>=_) open import Common.Reflection open import Common.Equality set₀ = sort (lit 0) set! = sort unknown -- Definitions added by tactics always use the original context, and thus are not -- affected by inContext and extendContext. The reason for this is that they are added -- to th...
{-# OPTIONS --universe-polymorphism #-} module Categories.NaturalTransformation.Core where open import Level open import Relation.Binary using (Rel; IsEquivalence) open import Categories.Support.Equivalence open import Categories.Category open import Categories.Functor.Core renaming (id to idF; _∘_ to _∘F_) record ...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Incrementalization as term-to-term transformation with the Nehemiah plugin. ------------------------------------------------------------------------ module Nehemiah.Change.Derive where open import Nehemiah.Syntax....
module InferrableFields where data ℕ : Set where zero : ℕ suc : ℕ → ℕ data Vec A : ℕ → Set where [] : Vec A zero _∷_ : ∀ {n} → A → Vec A n → Vec A (suc n) record SomeVec A : Set where field n : ℕ unpack : Vec A n open SomeVec using (unpack) pack : ∀ {A n} → Vec A n -> SomeVec A pack xs = ...
-- {-# OPTIONS -v scope.operators:100 #-} module Issue675 where data D : Set where d : D → D Foo : {x : D} → Set₁ Foo {x = D.d x} = Set -- qualified constructors should also work in hidden arguments
module Functor where open import Level import Data.Nat as N open import Basic open import Category open Category.Category record Functor {c₀ c₁ ℓ c₀′ c₁′ ℓ′} (C : Category c₀ c₁ ℓ) (D : Category c₀′ c₁′ ℓ′) : Set (suc (c₀ ⊔ c₀′ ⊔ c₁ ⊔ c₁′ ⊔ ℓ ⊔ ℓ′)) where field fobj : Obj C → Obj D fmapsetoid : {A B : Obj ...
-- Bi-Cartesian closed structure of families module SOAS.Families.BCCC {T : Set} where open import SOAS.Common open import SOAS.Context {T} open import SOAS.Sorting {T} open import SOAS.Families.Core {T} open import SOAS.Families.Isomorphism {T} import Categories.Category.CartesianClosed.Canonical as Canonical impor...
module test where open import Relation.Binary.PropositionalEquality module NewCodata where open import Data.Nat open import Data.List open import Data.Maybe record Pair (A B : Set) : Set where field fst : A snd : B record Stream (A : Set) : Set where coinductive field hd : A ...
{-# OPTIONS --show-implicit #-} module BottomUp1 where record R (_ : Set) : Set where no-eta-equality record S (F : Set → Set) ⦃ _ : {A : Set} → R (F A) ⦄ : Set where module M0 where private postulate F : Set → Set instance Ri : {A : Set} → R (F A) instance Si : S F module...
open import Data.ByteString using ( lazy ; strict ) open import System.IO using ( _>>_ ; _>>=_ ; getBytes ; putStr ; commit ) module System.IO.Examples.DevNull where main = getBytes {lazy} >>= λ bs → putStr "Done.\n" >> commit
module Data.Fin.Substitution.Lemmas.Extra where import Function as Fun open import Data.Nat open import Data.Fin hiding (_+_) open import Data.Fin.Substitution open import Data.Fin.Substitution.Lemmas open import Data.Vec.Properties open import Data.Vec open import Data.Star using (_◅_ ; ε) open import Function hiding...
module Ual.Either where infix 10 _∨_ data _∨_ (A B : Set) : Set where orL : A → A ∨ B orR : B → A ∨ B
------------------------------------------------------------------------------ -- Group theory congruence proofs using pattern matching ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-u...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lists where at least one element satisfies a given property ------------------------------------------------------------------------ module Data.List.Any where open import Data.Empty open import Data.Fin open i...
------------------------------------------------------------------------ -- The Agda standard library -- -- Well-founded induction ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Induction.WellFounded where open import Da...
open import FRP.LTL.RSet.Core using ( RSet ) module FRP.LTL.RSet.Stateless where infixr 1 _⇒_ _⇒_ : RSet → RSet → RSet (A ⇒ B) t = A t → B t
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of binary trees ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Tree.Binary.Properties where open import Level using (Level) o...
{-# OPTIONS --without-K --exact-split #-} module ideals where import abelian-subgroups import rings open abelian-subgroups public open rings public {- Subsets of rings -} subset-Ring : (l : Level) {l1 : Level} (R : Ring l1) → UU ((lsuc l) ⊔ l1) subset-Ring l R = type-Ring R → UU-Prop l is-set-subset-Ring : (l ...
open import Auto.Prelude -- using a type argument as a proof h0 : (x₁ x₂ : ⊥) → x₁ ≡ x₂ h0 = {!!} --h0 = λ x₁ → λ () -- using dependent pair to define non-dep pair module DND where _×_ : Set → Set → Set A × B = Σ A (λ _ → B) h1-2 : ∀ {A B} → A × B → B × A -- h1-2 = {!!} -- no solution found h1-2 = λ h → Σ-...
{-# OPTIONS --safe --without-K #-} open import Relation.Binary module Data.List.Membership.Setoid.Distinct where open import Data.List as List using (List; []; _∷_; _++_) open import Data.List.Any as Any hiding (map; head; tail) open import Data.List.Any.Properties open import Relation.Binary.PropositionalEquality...
module StateSized.GUI.BitMaps where open import StateSizedIO.GUI.WxBindingsFFI ship : Bitmap ship = bitmap "./StateSized/GUI/ship.ico" rock : Bitmap rock = bitmap "./StateSized/GUI/rock.ico"
-- Andreas, 2020-04-15, issue #4586 -- Better error message when `let` contains a `where` clause. foo : Set₁ foo = let x = Set where y = Set in Set -- WAS: -- Not a valid let-declaration -- when scope checking -- let x = Set -- where -- y = Set -- in Set -- EXPECTED: -- No `where' ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Least common multiple ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Nat.LCM where open import Algebra open import Data.Nat.Base open im...
_ : (@0 Set → Set) → (@ω Set → Set) _ = λ f → f
-- Andreas, 2012-04-18, bug reported by pumpkingod on 2012-04-16 module Issue610 where import Common.Level open import Common.Equality data ⊥ : Set where record ⊤ : Set where record A : Set₁ where constructor set field .a : Set .get : A → Set get x = helper x module R where helper : .A -> Set helper x...
module Relation.Path where open import Relation.Path.Operation
open import Mockingbird.Forest using (Forest) module Mockingbird.Forest.Combination {b ℓ} (forest : Forest {b} {ℓ}) where open import Mockingbird.Forest.Combination.Base public
{-# OPTIONS --without-K #-} module Path2Equiv where -- nothing for the standard library needed directly! open import FT open import Equivalences open import TypeEquivalences -- We now have enough to map each Pi combinator to the corresponding type equivalence path2equiv : {B₁ B₂ : FT} → (B₁ ⇛ B₂) → (⟦ B₁ ⟧ ≃ ⟦ B₂ ⟧...
------------------------------------------------------------------------ -- Recursive types and potentially infinite trees ------------------------------------------------------------------------ module RecursiveTypes.Syntax where open import Data.Nat open import Data.Fin open import Function.Base open import Data.Pr...
module _ where module M₁ where record R : Set₂ where field _A : Set₁ open R -- The following code used to be syntactically incorrect, because -- the left-hand side could be parsed either as the function r -- applied to a pattern variable, or as the copattern _A applied -- to r. Now the former ...
{-# OPTIONS --without-K #-} open import HoTT hiding (_::_) module algebra.Word {i} (A : Type i) where data Word : Type i where nil : Word _::_ : A → Word → Word _inv::_ : A → Word → Word infixr 60 _::_ _inv::_ -- The following six functions prove things like if [x ∷ v ≡ y ∷ w], -- then [x ≡ y]. ...