text
stringlengths
4
690k
module Sets.IterativeSet.Relator where import Lvl open import Logic.Propositional open import Logic.Predicate open import Numeral.Natural open import Sets.IterativeSet open import Syntax.Function open import Type module _ where private variable {ℓ ℓ₁ ℓ₂} : Lvl.Level private variable {A B} : Iset{ℓ} open Is...
module SizedIO.Object where open import Data.Product record Interface : Set₁ where field Method : Set Result : (m : Method) → Set open Interface public -- A simple object just returns for a method the response -- and the object itself record Object (i : Interface) : Set where coinductive field ob...
A : Set B : Set₁ B = Set C : Set
-- Andreas, AIM XXIII, 2016-04-26 flight EDI-GOT home -- {-# OPTIONS -v impossible:10 #-} -- Parameter arguments of overloaded projection applications -- should not be skipped! record R A : Set where field f : A open R record S A : Set where field f : A open S module _ (A B : Set) (a : A) where r : R A f ...
-- Andreas, 2011-10-03 {-# OPTIONS --experimental-irrelevance #-} module MatchOnIrrelevantData1 where data Nat : Set where zero : Nat suc : Nat -> Nat -- the index does not determine the constructor data Fin : Nat -> Set where zero : (n : Nat) -> Fin (suc n) suc : (n : Nat) -> Fin n -> Fin (suc n) -- shou...
module Ints.Add.Comm where open import Ints open import Nats.Add.Comm open import Equality ------------------------------------------------------------------------ -- internal stuffs private a+b=b+a : ∀ a b → a + b ≡ b + a a+b=b+a (+ a) (+ b) = + (a :+: b) ≡⟨ cong +_ (nat-add-comm a b) ⟩ + (b :+: a) QED ...
-- 2010-09-07 Andreas -- 2011-10-04 may not work even in the presence of experimental irr. {-# OPTIONS --experimental-irrelevance #-} module SplitOnIrrelevant where data Bool : Set where true false : Bool not : .Bool -> Bool not true = false -- needs to fail not false = true
{-# OPTIONS --cubical --safe #-} module Cubical.Algebra.BasicProp where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Structures.Group private variable ℓ ℓ' : Level --------------------...
{-# OPTIONS --without-K #-} module overloading where -- An overloading system based on instance arguments. See `overloading.core` for -- more details and documentation. open import overloading.bundle public open import overloading.core public open import overloading.level public
-- Raw terms, weakening (renaming) and substitution. {-# OPTIONS --without-K --safe #-} module Definition.Untyped where open import Tools.Fin open import Tools.Nat open import Tools.Product open import Tools.List import Tools.PropositionalEquality as PE infixl 30 _∙_ infix 30 Π_▹_ infixr 22 _▹▹_ infix 30 Σ_▹_ infi...
module A.Issue1635 (A : Set₁) where data Foo : Set where foo : Foo
module _ where import Agda.Builtin.Equality open import Agda.Builtin.Sigma open import Agda.Builtin.Unit open import Agda.Primitive open import Common.IO data ⊥ : Set where record R₁ a : Set (lsuc a) where field R : {A : Set a} → A → A → Set a r : {A : Set a} (x : A) → R x x P : Set a → Set a P A = (x...
module kripke-semantics where open import level open import bool open import closures open import empty open import eq open import level open import list open import list-thms open import nat open import product open import relations open import string open import sum open import unit data formula : Set where $ : s...
{-# OPTIONS --without-K #-} open import HoTT hiding (_::_) module algebra.DecidableFreeGroupIsReducedWord {i} (A : Type i) (dec : has-dec-eq A) where open import algebra.Word A open import algebra.ReducedWord A dec -- Some helper functions. tail-is-reduced : (x : A) (w : Word) → is-reduced (x :: w) → is-re...
module GotoDefinition where data ℕ : Set where Z : ℕ S : ℕ → ℕ _+_ : ℕ → ℕ → ℕ x + y = {! !}
{-# OPTIONS --no-unicode #-} module Issue2937.NoUnicode where foo : _ -> _ -> Set foo bar x = \x -> foo (bar x {!!}) x
-- Possible improvements: -- * Parts of the code are not reachable from main. -- * The following primitives are not used at all: primPOr, primComp, -- primHComp, prim^glueU and prim^unglueU. {-# OPTIONS --erased-cubical --save-metas #-} -- The code from Agda.Builtin.Cubical.Glue should not be compiled. open import...
{-# OPTIONS --prop --rewriting #-} module Examples.Gcd.Euclid where open import Calf.CostMonoid import Calf.CostMonoids as CM {- This file defines the parameters of the analysis of Euclid's algorithm for gcd and its cost recurrence relation. -} open import Calf CM.ℕ-CostMonoid open import Calf.Types.Nat open impo...
data Bin : Set where ⟨⟩ : Bin _O : Bin → Bin _I : Bin → Bin inc : Bin → Bin inc n = ?
module Generic where import Category.Functor import Category.Monad open import Data.List using (List ; length ; replicate) renaming ([] to []L ; _∷_ to _∷L_) open import Data.Maybe using (Maybe ; just ; nothing) renaming (setoid to MaybeEq) open import Data.Nat using (ℕ ; zero ; suc) open import Data.Product using (_×...
-- WARNING: This file was generated automatically by Vehicle -- and should not be modified manually! -- Metadata -- - Agda version: 2.6.2 -- - AISEC version: 0.1.0.1 -- - Time generated: ??? {-# OPTIONS --allow-exec #-} open import Vehicle open import Vehicle.Data.Tensor open import Data.Product open import Data.I...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Group.Higher where open import Cubical.Core.Everything open import Cubical.Data.Nat open import Cubical.Data.Sigma open import Cubical.Data.Unit open import Cubical.Foundations.HLevels open import Cubical.Foundations.Prelude hiding (comp) open...
module Type.Properties.MereProposition {ℓ ℓₑ} where import Lvl open import Lang.Instance open import Structure.Setoid open import Type -- A type is a mere proposition type when there is at most one inhabitant (there is at most one object with this type). -- In other words: If there is an inhabitant of type T, it...
{-# OPTIONS --sized-types #-} open import Relation.Binary.Core module SelectSort.Correctness.Permutation {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_ ) where open import Data.List open import Data.Product open import Data.Sum open import List.Permutation.Base A open import List....
import Structure.Logic.Classical.NaturalDeduction -- TODO: Seems like Constructive does not work, but why? module Structure.Logic.Constructive.Syntax.Algebra {ℓₗ} {Formula} {ℓₘₗ} {Proof} {ℓₒ} {Domain} ⦃ classicalLogic : _ ⦄ where open Structure.Logic.Classical.NaturalDeduction.ClassicalLogic {ℓₗ} {Formula} {ℓₘₗ} ...
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Hom where -- The Hom Functor from C.op × C to Setoids, -- the two 1-argument version fixing one object -- and some notation for the version where the category must be made explicit open import Data.Product open import Function using () renaming (_∘_ to _∙_)...
{-# OPTIONS --without-K --safe #-} module Quasigroup where open import Quasigroup.Bundles public open import Quasigroup.Definitions public open import Quasigroup.Structures public
{- 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 --cubical --no-import-sorts --safe #-} {- This file defines deltaIntSec : ∀ b → toInt (fromInt b) ≡ b succPred : ∀ n → succ (pred n) ≡ n predSucc : ∀ n → pred (succ n) ≡ n and proved DeltaInt ≡ DeltaInt by the above functions succPredEq : DeltaInt ≡ DeltaInt along with some interval-relevant lemmas c...
-- Andreas, 2017-03-08 -- Impredicative data types are incompatible with structural recursion -- (Coquand, Pattern Matching with Dependent Types, 1992) {-# OPTIONS --type-in-type #-} data ⊥ : Set where -- An impredicative data type data D : Set where c : (f : (A : Set) → A → A) → D -- Structural recursion with ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} {-# OPTIONS --allow-unsolved-metas #-} open import Optics.All open import Libra...
{- The module CanThetaContinuation contains the continuation-passing variant of Canθ, which is used as a tool to simplify Canθ-Can expressions. The lemmas are mainly about the function Canθ' defined by the equation unfold : ∀ sigs S'' p θ → Canθ sigs S'' p θ ≡ Canθ' sigs S'' (Can p) θ The main property...
module Structure.Relator.Apartness where import Lvl open import Logic open import Logic.Propositional open import Structure.Relator.Properties hiding (irreflexivity ; symmetry ; cotransitivity) open import Type private variable ℓ₁ ℓ₂ : Lvl.Level -- An apartness relation is a irreflexive, symmetric and cotrans...
module Issue852 where open import Common.Level const : ∀ {a b} {A : Set a} {B : Set b} → A → B → A const x = λ _ → x ℓ : Level ℓ = const lzero (Set ℓ) ℓ′ : Level ℓ′ = const lzero (Set ℓ′) -- Error message using Agda 2.3.2 (the batch-mode command, not the -- Emacs interface): -- -- Termination checking failed for...
open import IO using ( run ; putStrLn ) open import Data.String using ( _++_ ) open import Data.Natural using ( # ; _+_ ; toString ) module Data.Bindings.Examples.HelloFour where main = run (putStrLn ("Hello, " ++ toString (#(2) + #(2)) ++ "."))
-- Import all the material (useful to check that everything typechecks) {-# OPTIONS --cubical #-} module Everything where import Warmup import Part1 import Part2 import Part3 import Part4 import ExerciseSession1 import ExerciseSession2 import ExerciseSession3
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cw.CW module cw.examples.Unit where cw-unit-skel : Skeleton {lzero} 0 cw-unit-skel = Unit , Unit-is-set CWUnit = ⟦ cw-unit-skel ⟧ CWUnit-equiv-Unit : CWUnit ≃ Unit CWUnit-equiv-Unit = ide _
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Structures.ReflGraph 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.Structure open impo...
------------------------------------------------------------------------ -- The Agda standard library -- -- Floating point numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Float where ------------------------------------------------------...
{-# OPTIONS --without-K --exact-split #-} module 1-type-theory where import 00-preamble open 00-preamble public -- Exercise 1.1 (From ../02-pi.agda) _∘-1-1_ : {i j k : Level} {A : UU i} {B : UU j} {C : UU k} → (B → C) → ((A → B) → (A → C)) (g ∘-1-1 f) a = g (f a) import 04-inductive-types open 04-inductive-type...
{-# OPTIONS --universe-polymorphism #-} module Categories.Lan where open import Level open import Categories.Category open import Categories.Functor hiding (_≡_) open import Categories.NaturalTransformation record Lan {o₀ ℓ₀ e₀} {o₁ ℓ₁ e₁} {o₂ ℓ₂ e₂} {A : Category o₀ ℓ₀ e₀} {B : Category o₁ ℓ₁ e₁} {C : Ca...
open import FRP.JS.Bool using ( Bool ; not ) open import FRP.JS.Event using ( Evt ; accumBy ) open import FRP.JS.RSet using ( RSet ; _⇒_ ; ⟦_⟧ ; ⟨_⟩ ) module FRP.JS.Behaviour where postulate Beh : RSet → RSet map : ∀ {A B} → ⟦ A ⇒ B ⟧ → ⟦ Beh A ⇒ Beh B ⟧ map2 : ∀ {A B C} → ⟦ A ⇒ B ⇒ C ⟧ → ⟦ Beh A ⇒ Beh B ⇒ Beh ...
module Records where open import Common.Nat open import Common.IO open import Common.Unit record Test : Set where constructor mkTest field a b c : Nat f : Test -> Nat f (mkTest a b c) = a + b + c open Test g : Nat g = (f (mkTest 34 12 54)) + (f (record {a = 100; b = 120; c = 140})) + a m + b m + c m wher...
------------------------------------------------------------------------ -- A depth-first backend ------------------------------------------------------------------------ -- Based on the parser combinators in Wadler's "How to Replace Failure -- by a List of Successes". module StructurallyRecursiveDescentParsing.Depth...
------------------------------------------------------------------------------ -- Arithmetic properties using instances of the induction principle ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPT...
postulate A : Set data B (a : A) : Set where conB : B a → B a → B a data C (a : A) : B a → Set where conC : {bl br : B a} → C a bl → C a br → C a (conB bl br) -- Second bug, likely same as first bug. {- An internal error has occurred. Please report this as a bug. Location of the error: src/full/Agda/TypeChecki...
------------------------------------------------------------------------ -- CCS ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude module Labelled-transition-system.CCS {ℓ} (Name : Type ℓ) where open import Equality.Propositional open import Pr...
True : Prop True = {P : Prop} → P → P
{-# OPTIONS --keep-pattern-variables #-} open import Agda.Builtin.Nat open import Agda.Builtin.Equality test₁ : (m : Nat) → m ≡ 0 → Set test₁ m eq = {!eq!} test₂ : (A B : Set) → A ≡ B → Set test₂ A B eq = {!eq!}
module Logic where data Bool : Set where true : Bool false : Bool _∧_ : Bool → Bool → Bool false ∧ _ = false true ∧ b = b _∨_ : Bool → Bool → Bool true ∨ _ = true false ∨ b = b
{-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --rewriting #-} module CBVNTranslations where open import Library open import Polarized -- Intuitionistic propositional logic data IPL : Set where Atom : (P : Atoms) → IPL True False : IPL _∨_ _∧_ _⇒_ : (A B : IPL) → IPL module CallByName where _⁻...
module UniDB.Morph.SubsPrime where open import UniDB.Spec open import Function open import Data.Product -------------------------------------------------------------------------------- mutual data Subs* (T : STX) : MOR where refl : {γ : Dom} → Subs* T γ γ incl : {γ₁ γ₂ : Dom} (ξ : Subs+ T γ₁ γ₂) → Subs* T...
------------------------------------------------------------------------ -- Brzozowski-style derivatives of parsers ------------------------------------------------------------------------ module TotalParserCombinators.Derivative.Definition where open import Category.Monad open import Codata.Musical.Notation open imp...
{-# OPTIONS --universe-polymorphism #-} module Categories.Cone where open import Level open import Relation.Binary using (IsEquivalence; Setoid; module Setoid) open import Categories.Support.PropositionalEquality open import Categories.Category open import Categories.Functor hiding (_≡_; _∘_) module ConeOver {o ℓ e...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Empty open import lib.types.Group open import lib.types.Word open import lib.groups.GeneratedGroup open import lib.groups.Homomorphism module lib.groups.FreeGroup where module FreeGroup {i} (A : Type i) where private module G...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NConnected open import lib.NType2 open import lib.types.Span open import lib.types.Pointed open import lib.types.Pushout open import lib.types.PushoutFlip open import lib.types.PushoutFmap open import lib.types.PushoutFlattening open import...
-- {-# OPTIONS -v tc.meta:25 #-} module Issue418 where data _≡_ (A : Set₁) : Set₁ → Set₂ where refl : A ≡ A abstract A : Set₁ A = Set unfold-A : A ≡ _ unfold-A = refl -- I don't think we should solve the meta-variable corresponding to -- the underscore above. We have two obvious choices, A and Set, and -...
module _ where id : (A B : Set₁) → (A → B) → A → B id _ _ f = f postulate P : (A : Set₁) → A → Set₁ cong : (A B : Set₁) (f : A → B) (x : A) → P A x → P B (f x) A : Set record R₀ (B : Set) : Set₁ where constructor mkR₀ no-eta-equality field proj₁ : Set proj₂ : B record R₁ (_ : Set) : Set₁ ...
-- Jesper, 2018-12-04, Issue #3431 reported by François Thiré on the -- Agda mailing list -- (https://lists.chalmers.se/pipermail/agda/2018/010686.html) -- The instance of the Reduce typeclass for pairs did not have an -- implementation for reduceB' (only reduce'), which made it default -- to the standard implementati...
open import Agda.Builtin.Equality open import Agda.Builtin.List open import Agda.Builtin.Reflection renaming (bindTC to _>>=_) open import Agda.Builtin.Unit macro pickWhatever : Term → TC ⊤ pickWhatever hole@(meta m _) = do (cand ∷ _) ← getInstances m where [] -> typeError (strErr "No candidates!" ∷ [])...
module Definitions where data ℕ : Set where zero : ℕ suc : (n : ℕ) → ℕ data _≡_ (x : ℕ) : ℕ → Set where refl : x ≡ x data _≢_ : ℕ → ℕ → Set where z≢s : ∀ {n} → zero ≢ suc n s≢z : ∀ {n} → suc n ≢ zero s≢s : ∀ {m n} → m ≢ n → suc m ≢ suc n data Equal? (m n : ℕ) : Set where yes : m ≡ n → Equal? m n no...
module STLC where open import Data.Nat open import Data.Empty open import Relation.Binary.PropositionalEquality -- infix 4 _⊢_ -- infix 4 _∋_∶_ -- infixl 5 _,_ infixr 7 _⟶_ infix 5 ƛ_ infixl 7 _∙_ -- infix 9 `_ infixl 10 _∶_ -- infix 5 μ_ -- infix 8 `suc_ -- infix 9 S_ -- infix 9 #_ data Type : Set whe...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Categories.Instances.CommAlgebras where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.Powerset open import Cubical.Foundations.HLevels open import Cubical.Data.Unit open import Cub...
module HT where open import Prelude open import T open import SubstTheory open import DynTheory module HT where ---- Halting and Hereditary Termination -- An old comment about lhs-halt -- Mostly for fun, I didn't want to include "and it halts" as part -- of the definition of HT for arrows, and I didn't wan...
{-# OPTIONS --copatterns --sized-types #-} module Copatterns where open import Size record Stream {i : Size} (A : Set) : Set where coinductive constructor _::_ field head : A tail : {j : Size< i} -> Stream {j} A open Stream map : ∀ {i A B} (f : A -> B) -> (s : Stream {i} A) -> Stream {i} B head (map ...
-- Kit instances and generic term traversals module Syntax.Substitution.Instances where open import Syntax.Types open import Syntax.Context open import Syntax.Terms open import Syntax.Substitution.Kits open import Data.Sum open import Relation.Binary.PropositionalEquality as ≡ using (_≡_ ; refl ; sym ; cong ; su...
module Terminal where open import Base open import Category open import Unique open import Dual import Iso module Term (ℂ : Cat) where private ℂ' = η-Cat ℂ private open module C = Cat ℂ' private open module U = Uniq ℂ' private open module I = Iso ℂ' Terminal : (A : Obj) -> Set1 Terminal A = (B : Obj) -...
module Ual.Eq where open import Agda.Primitive open import Ual.Void record Eq {a} (A : Set a) : Set (lsuc a) where infix 30 _==_ infix 30 _≠_ field _==_ : A → A → Set self : {x : A} → x == x sym : {x y : A} → x == y → y == x trans : {x y z : A} → x == y → y == z → x == z _≠_ : A → A → Set...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Sets.EquivalenceRelations open import Functions open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Definition open import Numbers.Integers.Integers open import Num...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.Ring where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical...
{-# OPTIONS --no-positivity-check #-} {- This file gives a standard example showing that if arguments to constructors can use the datatype in a negative position (to the left of one or an odd number of arrows), then termination and logical consistency is lost. -} module neg-datatype-nonterm where open impo...
import PiCalculus.Utils import PiCalculus.Syntax import PiCalculus.Syntax.Properties import PiCalculus.Semantics import PiCalculus.Semantics.Properties import PiCalculus.LinearTypeSystem import PiCalculus.LinearTypeSystem.Algebras import PiCalculus.LinearTypeSystem.Algebras.Graded import PiCalculus.LinearTypeSystem.Alg...
module UnifyMgu where open import UnifyTerm open import Data.Product using (∃; _,_) open import Data.Maybe using (Maybe; just; nothing) open import Category.Monad using (RawMonad) import Level open RawMonad (Data.Maybe.monad {Level.zero}) amgu : ∀ {m} (s t : Term m) (acc : ∃ (AList m)) -> Maybe (∃ (AList m)) amgu l...
module examplesPaperJFP.StatefulObject where open import Data.Product open import Data.String.Base as Str open import Data.Nat.Base as N open import Data.Vec as Vec using (Vec; []; _∷_; head; tail) open import SizedIO.Console hiding (main) open import Size open import NativeIO open import SizedIO.Base StackStateˢ...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Coproduct open import lib.types.Fin open import lib.types.Pi open import lib.types.Truncation module lib.types.Choice where unchoose : ∀ {i j} {n : ℕ₋₂} {A : Type i} {B : A → Type j} → Trunc n (Π A B) → Π A (Trunc n ∘ B) unchoose ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} -- This module defines Outputs produced by handlers, as well as functio...
---------------------------------------------------------------------- -- Copyright: 2013, Jan Stolarek, Lodz University of Technology -- -- -- -- License: See LICENSE file in root of the repo -- -- Repo address: https://github.com/...
module Example where open import Data.List -- reverse rev : ∀ {a} {A : Set a} → List A → List A rev [] = [] rev (x ∷ xs) = rev xs ++ [ x ] -- https://code.google.com/p/agda/issues/detail?id=1252 暫定対策 rev' = rev {-# COMPILED_EXPORT rev' rev' #-} private open import Relation.Binary.PropositionalEquality -- rever...
module Issue4373.A where postulate T : Set instance t : T
module Languages.ILL.TypeSyntax where open import bool open import Utils.HaskellTypes {-# IMPORT Languages.ILL.TypeSyntax #-} data Type : Set where TVar : String → Type Top : Type Imp : Type → Type → Type Tensor : Type → Type → Type Bang : Type → Type {-# COMPILED_DATA Type Languages.ILL.TypeSyntax.Type ...
-- Andreas, 2017-01-21, issue #2422 overloading inherited projections -- {-# OPTIONS -v tc.proj.amb:100 #-} -- {-# OPTIONS -v tc.mod.apply:100 #-} postulate A : Set record R : Set where field f : A record S : Set where field r : R open R r public -- The inherited projection (in the eyes of the scope check...
{- Type class for functors. -} module CategoryTheory.Functor where open import CategoryTheory.Categories open import Relation.Binary -- Functor between two categories record Functor {n} (ℂ : Category n) (𝔻 : Category n) : Set (lsuc n) where private module ℂ = Category ℂ private module 𝔻 = Category 𝔻 f...
module Issue3579 where open import Agda.Builtin.String open import Agda.Builtin.Reflection data _==_ {A : Set} (a : A) : A → Set where refl : a == a {-# BUILTIN EQUALITY _==_ #-}
{-# OPTIONS --safe --without-K #-} module Literals.Number where open import Agda.Builtin.FromNat public
module BTree.Complete.Alternative.Properties {A : Set} where open import BTree {A} open import BTree.Equality {A} open import BTree.Equality.Properties {A} open import BTree.Complete.Alternative {A} open import Data.Sum renaming (_⊎_ to _∨_) lemma-⋗-≃ : {t t' t'' : BTree} → t ⋗ t' → t' ≃ t'' → t ⋗ t'' lemma-⋗-≃ (⋗l...
open import Relation.Binary.PropositionalEquality using ( refl ) open import Web.Semantic.DL.ABox.Interp using ( Interp ; ⌊_⌋ ; ind ; _*_ ) open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ; ⊨a-resp-≡³ ; ⊨a-impl-⊨b ; ⊨b-impl-⊨a ; _,_ ; inb ; on-bnode ; bnodes ) open import Web.Semantic.DL.Category.Object using (...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some properties imply others ------------------------------------------------------------------------ -- This file contains some core definitions which are reexported by -- Relation.Binary.Consequences. module ...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Addition where open import Data.Binary.Definition open import Data.Binary.Increment add₁ : 𝔹 → 𝔹 → 𝔹 add₂ : 𝔹 → 𝔹 → 𝔹 add₁ 0ᵇ ys = inc ys add₁ (1ᵇ xs) 0ᵇ = 2ᵇ xs add₁ (2ᵇ xs) 0ᵇ = 1ᵇ inc xs add₁ (1ᵇ xs) (1ᵇ ys) = 1ᵇ add₁ xs ys add₁ (1ᵇ ...
-- -- Created by Dependently-Typed Lambda Calculus on 2020-09-24 -- Equal -- Author: dplaindoux -- module Equal where open import Data.Nat using (ℕ; zero; suc) open import Data.Bool using (Bool; true; false) infix 30 _=?_ data Type : Set where nat : Type ▲_ : Type → Set ▲ nat = ℕ _=?_ : { a : Type } → ▲ a →...
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for "equational reasoning" in multiple Setoids ------------------------------------------------------------------------ -- Example use: -- -- open import Data.Maybe -- open import Relation....
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Lists.Lists open import Numbers.Naturals.Semiring open import Numbers.Naturals.Naturals open import Numbers.Naturals.Order open import Numbers.BinaryNaturals.Definition open import Numbers.BinaryNaturals.Addition open import Num...
import Lvl open import Structure.Category module Structure.Category.Functor.Equiv {ℓₗₒ ℓᵣₒ ℓₗₘ ℓᵣₘ ℓₗₑ ℓᵣₑ : Lvl.Level} {catₗ : CategoryObject{ℓₗₒ}{ℓₗₘ}{ℓₗₑ}} {catᵣ : CategoryObject{ℓᵣₒ}{ℓᵣₘ}{ℓᵣₑ}} where open import Functional.Dependent as Fn using (_$_) import Function.Equals open Function.E...
open import Agda.Builtin.Nat open import Agda.Builtin.Unit data ⊥ : Set where data _⊎_ (A B : Set) : Set where inj₁ : A → A ⊎ B inj₂ : B → A ⊎ B Fin : Nat → Set Fin zero = ⊥ Fin (suc n) = ⊤ ⊎ Fin n n = 49 postulate P : Nat → Set Q : Set → Set f : (n : Nat) → Q (Fin n) → P n q : Q (Fin n) p : P n p...
-- Andreas, 2018-10-17 -- -- Cannot branch on erased argument. open import Agda.Builtin.Bool T : @0 Bool → Set T true = Bool T false = Bool → Bool -- Should fail with error like: -- -- Cannot branch on erased argument of datatype Bool -- when checking the definition of T
module MLib where import MLib.Prelude import MLib.Fin.Parts import MLib.Fin.Parts.Simple import MLib.Finite import MLib.Finite.Properties import MLib.Algebra.PropertyCode import MLib.Matrix
{-# OPTIONS --without-K #-} module sets.nat where open import sets.nat.core public open import sets.nat.properties public open import sets.nat.ordering public open import sets.nat.solver public open import sets.nat.struct public
module _<?_ where open import Data.Nat using (ℕ; zero; suc) open import Relation.Nullary using (¬_) open import decidable using (Dec; yes; no) -- 厳密な不等式 (strict inequality) infix 4 _<_ data _<_ : ℕ → ℕ → Set where z<s : ∀ {n : ℕ} ------------ → zero < suc n s<s : ∀ {m n : ℕ} → m < n ---------...
-- Andrea & Andreas, 2014-11-12 -- Pruning projected vars during solving open import Common.Product open import Common.Equality postulate A : Set works1 : {q1 : Set} {q2 : Set → Set} -> let M : Set -> Set; M = _ in {z : Set} -> q1 ≡ M (q2 z) works1 = refl works2 : {q1 : Set} {q2 : Set → Set} -> let ...
module Syntax where open import Data.Fin open import Data.List hiding (reverse) open import Data.List.All open import Data.Nat open import Data.Product open import Typing hiding (send ; recv) -- expressions data Expr Φ : Type → Set where var : ∀ {t} → (x : t ∈ Φ) → Expr Φ t nat : (unr-Φ : All Unr Φ)...
{-# OPTIONS --without-K --safe --no-universe-polymorphism --sized-types --no-guardedness --no-subtyping #-} module Agda.Builtin.Size where {-# BUILTIN SIZEUNIV SizeUniv #-} {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZELT Size<_ #-} {-# BUILTIN SIZESUC ↑_ #-} {-# BUILTIN SIZEINF ∞ #...