text
stringlengths
4
690k
-- Andreas, 2019-03-27 -- Do not run checkIApplyConfluence unless --cubical -- The following verbosity options triggers a crash -- in case checkIApplyConfluence_ runs. -- {-# OPTIONS --cubical #-} -- Trigges the crash. {-# OPTIONS -v tc.cover.iapply.confluence.crash:666 #-} -- Activate crashing program point. ope...
{-# OPTIONS --without-K --safe #-} module Util.Data.Product where open import Data.Product public hiding (map₂) map₂ : ∀ {α β γ} {A : Set α} {B : A → Set β} {C : A → Set γ} → (∀ a → B a → C a) → Σ A B → Σ A C map₂ f (a , b) = a , f a b
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Strict2Group.Explicit.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Group.Base open import Cubical.Data.Strict2Group.Explicit.Notation record Strict2GroupExp ℓ : Type (ℓ-suc ℓ) where constructor strict2groupexp field -- a gro...
------------------------------------------------------------------------ -- An example showing that transitivity-like proofs that are not -- size-preserving can sometimes be used in a compositional way ------------------------------------------------------------------------ -- One can use the technique from "Beating t...
{-# OPTIONS --without-K --exact-split #-} module 10-truncation-levels where import 09-fundamental-theorem open 09-fundamental-theorem public -- Section 8.1 Propositions is-prop : {i : Level} (A : UU i) → UU i is-prop A = (x y : A) → is-contr (Id x y) {- We introduce the universe of all propositions. -} UU-Prop :...
module RevMachine where open import Level open import Relation.Nullary open import Relation.Binary open import Relation.Binary.PropositionalEquality open import Data.Product record RevMachine {ℓ} : Set (suc ℓ) where field State : Set ℓ _↦_ : Rel State ℓ deterministic : ∀ {st st₁ st₂} → st ↦ st₁ → st ↦ st...
module Structure.Numeral.Natural where open import Lang.Instance import Lvl open import Logic.Predicate open import Logic.Propositional open import Structure.Setoid open import Structure.Function.Domain open import Structure.Function open import Structure.Operator open import Structure.Relator open import Structu...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} -----------------------------------------------------------------------------...
module UniDB.Subst.Reg where open import UniDB.Spec open import UniDB.Subst.Core open import UniDB.Morph.Reg open import UniDB.Morph.WeakenPrime module _ {T : STX} {{vrT : Vr T}} {{wkT : Wk T}} {{apTT : Ap T T}} where instance iCompReg : Comp (Reg T) _⊙_ {{iCompReg}} (baseR ξ) ζ = ξ ⊡ ζ _⊙...
{-# OPTIONS --safe --without-K #-} module JVM.Builtins where open import Data.List open import JVM.Types Object = "java/lang/Object" Str = "java/lang/String" jre : Constantpool jre = staticref ("java/lang/System" / "out" ∶ ref "java/io/PrintStream") ∷ virtual ("java/io/PrintStream" / "println" :⟨ [ ...
------------------------------------------------------------------------ -- Paolo Capriotti's variant of higher lenses ------------------------------------------------------------------------ {-# OPTIONS --cubical --safe #-} import Equality.Path as P module Lens.Non-dependent.Higher.Capriotti {e⁺} (eq : ∀ {a p} → ...
module parse-test where import parse open import lib open import cedille-types import cedille module parsem = parse cedille.gratr2-nt ptr open parsem open parsem.pnoderiv cedille.rrs cedille.cedille-rtn open import run ptr open noderiv {- from run.agda -} process-start : start → string process-start s = "" process ...
-- Andreas, 2019-03-18, issue #3122, AIM XXIX -- Also pick up hidden record fields from a module. record R : Set₂ where field {f} : Set₁ module M where f : Set₁ f = Set r : R r = record { M } -- WAS: yellow -- Should check.
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Semirings.Definition open import Numbers.Naturals.Definition open import Numbers.Naturals.Semiring open import Orders.Total.Definition open import Orders.Partial.Definition module Numbers.Naturals.Order where open Semiring ℕSem...
open import Common.List open import Common.Equality map-append : ∀{A B : Set}(f : A → B) (xs {ys} : List A) → map f (xs ++ ys) ≡ map f xs ++ map f ys map-append f [] = refl map-append f (x ∷ xs) = {!cong (f x ∷_)!} -- Keep section on C-c C-r map-append₂ : ∀{A B : Set}(f : A → B) (xs {ys} : List A) → ...
-- Normalization by Evaluation for Intuitionistic Predicate Logic (IPL) module Everything where -- Imports from the standard library and simple definitions import Library -- Types and terms of IPL import Formulas import Derivations -- Beth model import TermModel import NfModel -- A variant where Cover : PSh → P...
module HasNeitherNor where record HasNeitherNor (A : Set) : Set where field _⊗_ : A → A → A open HasNeitherNor ⦃ … ⦄ public
{-# OPTIONS --guardedness #-} module ky where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; _≢_; refl; cong; cong₂; sym) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎) open import Data.Rational using (ℚ; _+_; _*_; _-_) open import Data.Bool open import Data.Bool.Properties open import...
{-# OPTIONS --without-K --safe #-} module Tools.Bool where open import Data.Bool using (Bool; true; false; _∧_; if_then_else_) public
module Text.Greek.Script where open import Data.Maybe open import Data.Vec open import Relation.Nullary using (¬_) open import Relation.Binary.PropositionalEquality using (_≢_) data Case : Set where lower upper : Case data Letter : Set where α′ β′ γ′ δ′ ε′ ζ′ η′ θ′ ι′ κ′ λ′ μ′ ν′ ξ′ ο′ π′ ρ′ σ′ τ′ υ′ φ′ χ′ ψ′ ω′...
module Partiality where {- port from http://www.soimort.org/posts/programs-and-proofs/ -} open import Data.Bool using (Bool; false; true) open import Data.Maybe using (Maybe; just; nothing) open import Data.Char using (_==_) renaming (Char to Symbol) open import Coinduction using (∞; ♯_; ♭) -- open import Category.Mo...
module Selective.Examples.Main-generated where import Selective.Examples.PingPong as PingPong import Selective.Examples.TestCall as Call import Selective.Examples.TestCall2 as Call2 import Selective.Examples.Fibonacci as Fib import Selective.Examples.Chat as Chat import Selective.Examples.Bookstore as Bookstore import ...
open import Agda.Primitive record Functor {a b} (F : Set a → Set b) : Set (lsuc a ⊔ b) where field fmap : ∀ {A B} → (A → B) → F A → F B open Functor {{...}} public module _ {a b} (F : Set a → Set b) where record FunctorZero : Set (lsuc a ⊔ b) where field empty : ∀ {A} → F A overlap {{super}}...
module Issue251 where record Foo : Set₁ where field A : Set B : Set foo : Set → Set → Foo foo = λ A B → record {A = A; B = B}
{-# OPTIONS --without-K #-} module PathLemmas where open import Relation.Binary.PropositionalEquality using (_≡_; sym; refl) ------------------------------------------------------------------------------ -- These also follow from irrelevance, but this is nicer sym-sym : {A : Set} {x y : A} {p : x ≡ y} → sym (sy...
{-# OPTIONS --erased-cubical --safe #-} module Interval 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 usi...
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Equivalence open import HoTT.Identity.Pi open import HoTT.Identity.Product module HoTT.Product.Universal where ×-univ : ∀ {i j k} {X : 𝒰 i} (A : X → 𝒰 j) (B : X → 𝒰 k) → ((c : X) → A c × B c) ≃ Π X A × Π X B ×-univ {X = X} A B = let open I...
{-# OPTIONS --without-K #-} module Spaces.Spheres where open import Base open import Spaces.Suspension public -- [Sⁿ n] is the sphere of dimension n Sⁿ : ℕ → Set Sⁿ 0 = bool Sⁿ (S n) = suspension (Sⁿ n) ⋆Sⁿ : (n : ℕ) → Sⁿ n ⋆Sⁿ 0 = true ⋆Sⁿ (S n) = north (Sⁿ n)
-- Properties of natural number {-# OPTIONS --without-K --safe #-} -- agad-stdlib open import Relation.Binary.PropositionalEquality module TypeTheory.Nat.Properties {a} (N : Set a) (zero : N) (suc : N → N) (ind : ∀ {p} (P : N → Set p) → P zero → (∀ k → P k → P (suc k)) → ∀ n → P n) (ind-base : ∀ {p} (P :...
-- Andreas, 2012-07-31 no eager introduction of hidden abstractions {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.conv.coerce:100 #-} -- {-# OPTIONS -v tc.with:100 #-} module Issue679 where data Unit : Set where unit : Unit -- works also now: test : {u : Unit} → Unit test = λ {u} → u T : Unit → Set T unit =...
------------------------------------------------------------------------ -- The two definitions of substitutions are isomorphic (assuming -- extensionality) ------------------------------------------------------------------------ open import Data.Universe.Indexed module deBruijn.Substitution.Isomorphic {i u e} {Uni...
------------------------------------------------------------------------ -- Overloaded "equational" reasoning combinators ------------------------------------------------------------------------ {-# OPTIONS --safe #-} module Equational-reasoning where open import Equality.Propositional open import Prelude infix -1...
open import Prelude hiding (Bool) module Implicits.Oliveira.Improved.Deterministic (TC' : Set) (_tc≟'_ : (a b : TC') → Dec (a ≡ b)) where {- open import Data.Fin.Substitution open import Implicits.Oliveira.Types open import Implicits.Oliveira.Types.Unification open import Implicits.Oliveira.Terms open import Implicit...
{-# OPTIONS --rewriting #-} module DualLM where open import Data.Bool open import Data.Nat hiding (compare) open import Data.Nat.Properties open import Data.Fin hiding (_+_) open import Data.Product open import Function open import Relation.Binary.PropositionalEquality hiding (Extensionality) open import Agda.Builtin....
------------------------------------------------------------------------------ -- Axiomatic PA properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# O...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness module cohomology.ExactPairIso where {- An exact sequence 0 → G → H → 0 implies that G == H -} module _ {i} {G H K L : Group i} {φ : H →ᴳ K} (ex : is-exact-seq (G ⟨ cst-hom ⟩→ H ⟨ φ ⟩→ K ⟨ cst-hom ⟩→ L ⊣|)) where private inj : (h...
{-# OPTIONS --copatterns --sized-types #-} {- | The purpose of this module is to demonstrate how observational type theory can be implemented for arbitrary types in Agda through the use of tests and a corresponding bisimulation proof method. To use the equivalence for a type A, the type has to be made _testable...
{-# OPTIONS --safe #-} open import Generics.Prelude hiding (lookup) open import Generics.Telescope open import Generics.Desc open import Generics.All open import Generics.HasDesc import Generics.Helpers as Helpers module Generics.Constructions.Elim {P I ℓ} {A : Indexed P I ℓ} where module _ (H : HasDesc A) (open Ha...
open import Theory module Categories.Functor.Construction.Inclusion {ℓ₁ ℓ₂ ℓ₃} (Th : Theory ℓ₁ ℓ₂ ℓ₃) where open import Syntax open Theory.Theory Th open Signature Sg open Term Sg open import Categories.Category.Construction.Renaming Sg as Renaming using (Ren; ren; _≐_) open import Categories.Category.Construction....
module Haskell.Prim.Double where open import Agda.Builtin.Nat open import Agda.Builtin.Unit open import Agda.Builtin.Float public renaming (Float to Double) open import Agda.Builtin.FromNat open import Agda.Builtin.FromNeg instance iNumberDouble : Number Double iNumberDouble .Number.Constraint _ = ⊤ iNumberDou...
module Structure.Numeral.Integer.Proofs where open import Data.Either as Either using (Left ; Right) import Data.Tuple as Tuple open import Functional open import Function.Proofs open import Logic.IntroInstances open import Logic.Predicate open import Logic.Propositional import Lvl open import Structure.Func...
{-# OPTIONS --without-K --safe #-} module Data.Sum where open import Level open import Data.Bool.Base using (Bool; true; false) open import Function using (const) data _⊎_ (A : Type a) (B : Type b) : Type (a ℓ⊔ b) where inl : A → A ⊎ B inr : B → A ⊎ B either : ∀ {ℓ} {C : A ⊎ B → Type ℓ} → ((a : A) → C (inl a))...
-- Written by P. Hausmann module Vec where open import IO open import Data.Vec open import Data.Nat open import Data.Nat.Show open import Level using (0ℓ) Matrix : Set -> ℕ -> ℕ -> Set Matrix a n m = Vec (Vec a m) n madd : {n m : ℕ} -> Matrix ℕ m n -> Matrix ℕ m n -> Matrix ℕ m n madd a b = map (λ x → \y -> map _+_ ...
open import Oscar.Prelude open import Oscar.Class.IsCategory open import Oscar.Class.Reflexivity open import Oscar.Class.Transitivity module Oscar.Class.Category where record Category 𝔬 𝔯 ℓ : Ø ↑̂ (𝔬 ∙̂ 𝔯 ∙̂ ℓ) where constructor ∁ infix 4 _∼̇_ field {𝔒} : Ø 𝔬 _∼_ : 𝔒 → 𝔒 → Ø 𝔯 _∼̇_ : ∀ {x ...
open import Common.Prelude open import Common.Reflection module TermSplicingLooping where mutual f : Set -> Set f = unquote (give (def (quote f) [])) -- Expected error: -- -- Termination checking failed for the following functions: -- f -- Problematic calls: -- f
module _ where open import Common.Prelude renaming (_∸_ to _-_) -- work-around for #1855 _<_ : Nat → Nat → Bool a < b with b - a ... | zero = false ... | suc _ = true insert : Nat → List Nat → List Nat insert x [] = x ∷ [] insert x (y ∷ xs) = if x < y then x ∷ y ∷ xs else (y ∷ insert x xs) sort : List Nat → List ...
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Definitions 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.Foundations.Logic open import Utils open import MoreLo...
open import Agda.Primitive open import Empty open import Logic open import Boolean module Peano where data ℕ : Set where zero : ℕ succ : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} pred : ℕ → ℕ pred zero = zero pred (succ x) = x _+_ : ℕ → ℕ → ℕ zero + m = m (succ n) + m = succ (n + m) {-# BUILTIN NATP...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cw.CW module cw.examples.Empty where cw-empty-skel : Skeleton {lzero} 0 cw-empty-skel = Empty , Empty-is-set CWEmpty = ⟦ cw-empty-skel ⟧ CWEmpty-equiv-Empty : CWEmpty ≃ Empty CWEmpty-equiv-Empty = ide _
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Category.Construction.Pullbacks {o ℓ e} (C : Category o ℓ e) where open import Level using (_⊔_) open import Function using (_$_) open import Data.Product using (_×_; _,_) open import Categories.Diagram.Pullback C open import Categ...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.GradedRing.Instances.PolynomialsFun 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 import Cubical.D...
postulate List : Set List-like : Set → Set instance postulate List-is-list-like : List-like List postulate to-List : ∀ {F : Set} ⦃ list-like : ∀ {X : Set} → List-like F ⦄ → F → List F : Set f : ⦃ list-like : List-like F ⦄ → List f = to-List _
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRingSolver.Utility where open import Cubical.Foundations.Prelude open import Cubical.Data.Bool open import Cubical.Data.Empty using (⊥) renaming (rec to recEmpty) open import Cubical.Data.Sigma open import Cubical.Relation.Nullary.Base private variable ℓ ℓ' : ...
{- This file contains: - Homotopy natural equivalences of pushout spans Written by: Loïc Pujet, September 2019 - 3×3 lemma for pushouts Written by: Loïc Pujet, April 2019 -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.Pushout.Properties where open import Cubical.Core.Glue open import Cubical.Founda...
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for "equational reasoning" using a strict partial -- order ------------------------------------------------------------------------ open import Relation.Binary module Relation.Binary.StrictPar...
{-# OPTIONS --rewriting #-} open import ExtractSac as ES using () open import Extract (ES.kompile-fun) open import Data.Nat open import Data.Nat.Properties open import Data.List as L using (List; []; _∷_) open import Data.Vec as V using (Vec; []; _∷_) open import Data.Fin using (Fin; zero; suc; #_) open import Relati...
{-# OPTIONS --cubical --safe #-} module ScaleDegree where open import Data.Fin using (Fin; toℕ; #_) open import Data.Nat using (ℕ; suc; _+_) open import Data.Nat.DivMod using (_mod_; _div_) open import Data.Product using (_×_; _,_) open import Data.Vec using (lookup) open import Pitch ScaleD...
open import Data.Product using ( _,_ ; proj₁ ; proj₂ ) open import Web.Semantic.DL.ABox.Interp using ( Interp ; _*_ ; ⌊_⌋ ; ind ) open import Web.Semantic.DL.ABox.Interp.Morphism using ( _≲_ ; _**_ ; ≲-refl ) open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ; _⊨b_ ; *-resp-⟨ABox⟩ ; ⊨a-resp-≲ ) open import Web....
{-# OPTIONS --rewriting --confluence-check #-} module Issue4333.N0 where open import Issue4333.M {-# REWRITE p₀ #-} b₀' : B a₀' b₀' = b
module Relation.Relation where open import Level renaming (suc to lsuc) open import Data.Product -- Partial equivalence relations. record ParRel {l l' : Level}{A : Set l}(R : A → A → Set l') : Set (l ⊔ l') where field symPf : ∀{x y} → R x y → R y x transPf : ∀{x y z} → R x y → R y z → R x z -- (Total) eq...
open import Agda.Primitive public variable ℓ ℓ' : Level data _≡_ {X : Set ℓ} : X → X → Set ℓ where refl : {x : X} → x ≡ x ap : {X : Set ℓ} {Y : Set ℓ'} (f : X → Y) {x x' : X} → x ≡ x' → f x ≡ f x' ap f refl = refl _∙_ : {X : Set ℓ} {x y z : X} → x ≡ y → y ≡ z → x ≡ z p ∙ refl = p yoneda-elem-lc : {X : Set ℓ} {...
{-# OPTIONS --type-in-type #-} module Generic.Test.Experiment where open import Generic.Lib.Prelude data Desc (I : Set) : Set₁ where ret : I -> Desc I π : (A : Set) -> (A -> Desc I) -> Desc I _⊕_ : Desc I -> Desc I -> Desc I data RecDesc (I : Set) : Set₁ where rec : ((I -> Set) -> Desc I) -> RecDesc I ⟦_...
{-# OPTIONS --universe-polymorphism #-} open import Categories.Category open import Categories.Object.Products open import Categories.Object.Terminal open import Level module Categories.Object.Terminal.Exponentiating {o ℓ e : Level} (C : Category o ℓ e) (P : Products C) where open Category C open Products P ...
{-# OPTIONS --safe #-} module Cubical.Data.FinSet.Binary.Small where open import Cubical.Data.FinSet.Binary.Small.Base public open import Cubical.Data.FinSet.Binary.Small.Properties public
{-# OPTIONS --without-K --safe #-} module Fragment.Examples.CSemigroup.Arith.Atomic where open import Fragment.Examples.CSemigroup.Arith.Base -- Fully dynamic associativity +-dyn-assoc₁ : ∀ {m n o} → (m + n) + o ≡ m + (n + o) +-dyn-assoc₁ = fragment CSemigroupFrex +-csemigroup +-dyn-assoc₂ : ∀ {m n o p} → ((m + n)...
------------------------------------------------------------------------ -- The Agda standard library -- -- Inductive pointwise lifting of relations to vectors ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.Relation.Binary.Pointwise.Inductiv...
module map-++-distribute where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong) open Eq.≡-Reasoning open import lists using (List; []; _∷_; _++_; map) -- リストの結合に関するmapの分配法則の証明 map-++-distribute : {A B : Set} → (f : A → B) → (xs ys : List A) → map f (xs ++ ys) ≡ map f xs ++ map f ys...
------------------------------------------------------------------------ -- The Agda standard library -- -- Floats ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Float where open import Data.String.Base using (String) -------------------------...
{- This file contains: - Properties of set truncations -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.SetTruncation.Properties where open import Cubical.HITs.SetTruncation.Base open import Cubical.Foundations.Prelude open import Cubical.Foundations.GroupoidLaws open import Cubical.Founda...
{- Finite Structures over Finite Set In short, the type of structures should be finite set itself. This file contains: - Definition and properties of finite sets equipped with finite structures; - The type of finitely-structured finite sets is Rijke finite, so that we can count their number up to equivalence/isom...
open import List open import Nat open import Prelude open import contexts open import core module statics-core where open core public -- zippered form of types data ztyp : Set where ▹_◃ : htyp → ztyp _==>₁_ : ztyp → htyp → ztyp _==>₂_ : htyp → ztyp → ztyp _⊕₁_ : ztyp → htyp → ztyp _⊕...
------------------------------------------------------------------------------ -- PA properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --w...
{-# OPTIONS --prop --without-K --rewriting #-} -- Definition of a cost monoid. open import Relation.Binary using (Rel; _Preserves_⟶_; _Preserves₂_⟶_⟶_) module Calf.CostMonoid where open import Level using (Level; 0ℓ; suc; _⊔_) open import Algebra.Core open import Relation.Binary.PropositionalEquality using (_≡_; re...
-- Minimal implicational logic, PHOAS approach, initial encoding module Pi.ArrMp where -- Types infixr 0 _=>_ data Ty : Set where UNIT : Ty _=>_ : Ty -> Ty -> Ty -- Context and truth judgement Cx : Set1 Cx = Ty -> Set isTrue : Ty -> Cx -> Set isTrue a tc = tc a -- Terms module ArrMp where i...
{-# OPTIONS --without-K #-} module container.m where open import container.m.coalgebra public open import container.m.from-nat public -- open import container.m.core public -- open import container.m.extensionality public -- open import container.m.level public
{-# OPTIONS --guardedness-preserving-type-constructors #-} module TypeConstructorsWhichPreserveGuardedness2 where record ⊤ : Set where data _⊎_ (A B : Set) : Set where inj₁ : A → A ⊎ B inj₂ : B → A ⊎ B -- This should not be allowed. ℕ : Set ℕ = ⊤ ⊎ ℕ
{-# OPTIONS --without-K #-} open import BaseOver module Spaces.Flattening {i j k} (A : Set i) (B : Set j) (f g : B → A) (C : A → Set k) (D : (b : B) → C (f b) ≃ C (g b)) where open import Spaces.FlatteningTypes A B f g C D -- The family of paths used in the definition of [flatten] paths-flatten : (b : B) → (cct...
{-# OPTIONS --cubical #-} open import Agda.Primitive.Cubical open import Agda.Builtin.Cubical.Path postulate A : Set B : Set b : B f : (\ {a : A} (x : B) → b) ≡ (\ _ → b) f i x = b
module RandomAccessList.Zeroless where open import RandomAccessList.Zeroless.Core open import RandomAccessList.Zeroless.Core.Properties open import BuildingBlock.BinaryLeafTree using (BinaryLeafTree; Node; Leaf; split) import BuildingBlock.BinaryLeafTree as BLT open import Data.Fin using (Fin; fromℕ; fromℕ≤; reduce≥;...
open import Nat open import Prelude open import Hazelnut-core -- the obvious small step dynamics for complete expressions. module Hazelnut-complete-dynamics where value : (e : ė) (p : ecomplete e) (t : τ̇) (q : ∅ ⊢ e => t) → Set value ._ _ _ (SAsc _) = ⊥ value ._ _ _ (SVar x) with x ... | () value ._ _ _ (S...
module Data.Fin where open import Data.Nat hiding (_==_; _<_) open import Data.Bool open import Logic.Identity open import Logic.Base data Fin : Nat -> Set where fzero : {n : Nat} -> Fin (suc n) fsuc : {n : Nat} -> Fin n -> Fin (suc n) pred : {n : Nat} -> Fin (suc (suc n)) -> Fin (suc n) pred fzero = fzero ...
-- Andreas, 2016-09-12 -- -- Underscores should also get meaningful names -- (not just metas from omitted hidden arguments) -- {-# OPTIONS -v tc.meta.name:100 #-} postulate F : (A : Set) → Set G : {B : Set} → Set test1 : Set test1 = F _ -- name of this meta should be _A_0 test2 : Set test2 = G -- creates me...
open import Agda.Primitive open import Agda.Primitive.Cubical record Wrap : Set (lsuc lzero) where field A : IUniv
{- Basic theory about h-levels/n-types: - Basic properties of isContr, isProp and isSet (definitions are in Prelude) - Hedberg's theorem can be found in Cubical/Relation/Nullary/DecidableEq -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Foundations.HLevels where open import Cubical.Foundation...
-- Andreas, 2017-03-10, issue #2493, reported by nad -- {-# OPTIONS -v tc.meta.assign:10 -v tc.size:90 -v tc:30 #-} A : Set A = {!!} P : A → Set P = {!λ _ → ?!} -- give -- Giving this made Agda loop as it solved ?0 := A. -- Solution: don't assign metas during CheckInternal!
{- 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 Haskell.Modules.RWS.RustAnyHow import LibraBFT.Impl.Consensu...
open import Prelude module Implicits.Oliveira.Deterministic.Decidable where open import Data.Fin.Substitution open import Implicits.Oliveira.Types open import Implicits.Oliveira.Terms open import Implicits.Oliveira.Contexts open import Implicits.Oliveira.Substitutions open import Implicits.Oliveira.Substitutions.Lemm...
-- Basic intuitionistic logic of proofs, without ∨, ⊥, or +. -- Common syntax. module BasicILP.Syntax.Common where open import Common.ContextPair public
-- https://github.com/bitonic/tog/wiki/Implicit-Arguments -- aj s popisom checkingu od Andreasa Abela module ImplArg where data Nat : Set where zero : Nat suc : Nat -> Nat data Vec (A : Set) : Nat -> Set where vnil : Vec A zero vcons : {n : Nat} -> A -> Vec A n -> Vec A (suc n) Cons = {A : Set} (a : A) {n ...
open import Relation.Binary.PropositionalEquality using (_≡_; refl) module Dipsy.Polarity where data Polarity : Set where pos : Polarity neg : Polarity open import Algebra.FunctionProperties {A = Polarity} _≡_ flip : Polarity → Polarity flip pos = neg flip neg = pos flip-inv : Involutive flip flip-inv pos = re...
postulate A B C : Set module M where infixl 4 _+_ infixl 6 _*_ postulate _+_ _*_ : Set → Set → Set T : Set T = A + B * C open M renaming (_*_ to infix 2 _*_) test : T → A + B * C test x = x -- should use the updated fixity when printing the value of T !
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Definition open import Numbers.Naturals.Addition module Numbers.Naturals.Multiplication where infix 25 _*N_ _*N_ : ℕ → ℕ → ℕ zero *N y = zero (succ x) *N y = y +N (x *N y) {-# BUILTIN NATTIMES _*N_ #-} produc...
open import Nat open import Prelude open import List open import judgemental-erase open import moveerase open import sensibility open import statics-checks open import statics-core module reachability where -- algorithmically, we break reachability into two halves: first you -- produce a list of actions that are a...
module UniDB.Morph.Star where open import UniDB.Spec infixl 4 _▻_ data Star (Ξ : MOR) : MOR where ε : {γ : Dom} → Star Ξ γ γ _▻_ : {γ₁ γ₂ γ₃ : Dom} (ξs : Star Ξ γ₁ γ₂) (ξ : Ξ γ₂ γ₃) → Star Ξ γ₁ γ₃ module _ {Ξ : MOR} where instance iIdmStar : Idm (Star Ξ) idm {{iIdmStar}} _ = ε iCompStar : Comp ...
module NoParseForLHS where data X : Set where _! : X -> X z : X right : X -> X right (x !) = x right z = z ! wrong : X -> X wrong (! x) = x wrong z = z !
module par-swap where open import Esterel.Lang open import Esterel.Lang.Binding open import Esterel.Context open import sn-calculus data _∥R_ : Term -> Term -> Set where ∥Rstep : ∀ {C p q d} -> (d≐C⟦p∥q⟧c : d ≐ C ⟦ (p ∥ q) ⟧c) -> d ∥R (C ⟦ (q ∥ p) ⟧c) data _∥R*_ : Term -> Term -> Set where ∥R...
-- DontCares shouldn't end up in the generated with functions. module Issue337 where data ℕ : Set where zero : ℕ suc : (n : ℕ) → ℕ {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN ZERO zero #-} {-# BUILTIN SUC suc #-} data _≡_ {A : Set}(x : A) : A → Set where refl : x ≡ x postulate _≤_ : ℕ → ℕ → Set p₁ ...
open import Categories.Category module Categories.End {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {V : Category o′ ℓ′ e′} where private module C = Category C module V = Category V open import Categories.Bifunctor using (Bifunctor; Functor; module Functor) open import Categories.DinaturalTransformation open import Catego...
module Lemmachine.Request where {-# IMPORT Hack #-} {-# IMPORT Lemmachine.FFI #-} open import Data.Product open import Data.List open import Data.Maybe open import Data.Bool open import Data.Nat open import Data.String data Method : Set where HEAD GET PUT DELETE POST : Method TRACE CONNECT OPTIONS : Method {-# CO...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Functions.Definition open import Sets.EquivalenceRelations open import Rings.Definition open import Rings.IntegralDomains.Definition module Rings.Associates.Definition {a b : _} {A : Set a} {S : Seto...