text
stringlengths
4
690k
module Issue152 where data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN ZERO zero #-} {-# BUILTIN SUC suc #-} f : ℕ → ℕ f 0 with zero f 0 | n = n f 1 with zero f 1 | n = n f n = n g : ℕ → ℕ g 0 with zero g zero | n = n g 1 with zero g (suc zero) | n = n g n = n h ...
module Structure.Operator.Vector where open import Functional using (swap) import Lvl open import Logic open import Logic.Propositional open import Structure.Setoid open import Structure.Operator.Field open import Structure.Operator.Group open import Structure.Operator.Monoid import Structure.Operator.Names ...
module Data.Char.Ranges where open import Data.Char open import Data.List open import Data.Nat open import Function charRange : ℕ -> ℕ -> List Char charRange start amount = applyUpTo (λ x -> fromℕ $ x + start) amount UCletters : List Char UCletters = charRange 65 26 LCletters : List Char LCletters = charRange 97 26...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Category.Complete.Properties {o ℓ e} (C : Category o ℓ e) where open import Level open import Data.Product open import Relation.Binary open import Categories.Category.Complete open import Categories.Category.Complete.Finitely open ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Wedge.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.HITs.Pushout.Base open import Cubical.Data.Unit _⋁_ : ∀ {ℓ ℓ'} → Pointed ℓ → Pointed ℓ' → Type (ℓ-max ℓ ℓ') _⋁_ (A , ptA) (B , ptB...
open import Agda.Builtin.Nat data Tm : Nat → Set where UP : ∀ {n} → Tm n → Tm n !_ : ∀ {n} → Tm n → Tm (suc n) ! UP t = UP (! t) data Ty : Nat → Set where ⊥ : ∀ {n} → Ty n _∶_ : ∀ {n} → Tm n → Ty n → Ty (suc n) data Cx : Set where ∅ : Cx _,_ : ∀ {n} → Cx → Ty n → Cx data _⊇_ : Cx → Cx → Set where base ...
-- {-# OPTIONS --allow-unsolved-metas #-} module Issue2369.OpenIP where test : Set test = {!!} -- unsolved interaction point -- postulate A : {!!}
module Generic.Lib.Equality.Coerce where open import Generic.Lib.Intro open import Generic.Lib.Equality.Propositional open import Generic.Lib.Decidable open import Generic.Lib.Data.Product Coerce′ : ∀ {α β} -> α ≡ β -> Set α -> Set β Coerce′ refl = id coerce′ : ∀ {α β} {A : Set α} -> (q : α ≡ β) -> A -> Coerce′ q A ...
module Function.Equals where import Lvl open import Functional import Function.Names as Names open import Logic open import Logic.Propositional open import Structure.Setoid open import Structure.Relator.Equivalence open import Structure.Relator.Properties open import Type module Dependent {ℓ₁ ℓ₂ ℓₑ₂} {A : T...
------------------------------------------------------------------------------ -- Proving mirror (mirror t) = t using a list of trees ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-uni...
module NativeIO where open import Unit public open import Data.List open import Data.Nat open import Data.String.Base using (String) public {-# FOREIGN GHC import qualified Data.Text #-} {-# FOREIGN GHC import qualified System.Environment #-} postulate NativeIO : Set → Set nativeReturn : {A : Set} → A → Nat...
-- {-# OPTIONS -v tc.lhs.top:15 #-} -- {-# OPTIONS -v term:20 #-} -- Andreas, 2014-11-08, following a complaint by Francesco Mazzoli open import Common.Prelude data Subst : (d : Nat) → Set where c₁ : ∀ {d} → Subst d → Subst d c₂ : ∀ d₁ d₂ → Subst d₁ → Subst d₂ → Subst (suc d₁ + d₂) postulate com...
-- Evidence producing divmod. module Numeric.Nat.DivMod where open import Prelude open import Control.WellFounded open import Tactic.Nat open import Tactic.Nat.Reflect open import Tactic.Nat.Exp open import Numeric.Nat.Properties private lemModAux′ : ∀ k m b j → modAux k m (suc j + b) j ≡ modAux 0 m b m lemModAux...
-- Positivity for functions in instantiated parameterised modules. module Issue421 where module Foo (_ : Set₁) where Id : Set → Set Id n = n module FooApp = Foo Set data ⊤ : Set where tt : ⊤ ⟦_⟧₁ : ⊤ → Set → Set ⟦ tt ⟧₁ x = FooApp.Id x -- works: ⟦ tt ⟧ x = Foo.Id Set x data μ₁ x : Set where fix : ⟦ x ⟧₁ (μ...
module ObsEq2 where data Nat : Set where zero : Nat suc : Nat -> Nat data Fin : Nat -> Set where fz : {n : Nat} -> Fin (suc n) fs : {n : Nat} -> Fin n -> Fin (suc n) infixr 40 _::_ _,_ data List (X : Set) : Set where ε : List X _::_ : X -> List X -> List X record One : Set where Π : (S : Set)(T : S ->...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Group.EilenbergMacLane.Properties where open import Cubical.Algebra.Group.EilenbergMacLane.Base renaming (elim to EM-elim) open import Cubical.Algebra.Group.EilenbergMacLane.WedgeConnectivity open import Cubical.Algebra.Group.EilenbergMacL...
------------------------------------------------------------------------ -- Representation-independent results for non-dependent lenses ------------------------------------------------------------------------ import Equality.Path as P module Lens.Non-dependent {e⁺} (eq : ∀ {a p} → P.Equality-with-paths a p e⁺) wher...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Prelude open import LibraBFT.Concrete.System.Parame...
-- Andreas, 2018-05-11, issue #3051 -- Allow pattern synonyms in mutual blocks open import Agda.Builtin.Sigma open import Agda.Builtin.Equality id : ∀ {a} {A : Set a} → A → A id x = x _∘′_ : ∀ {a b c} {A : Set a} {B : Set b} {C : Set c} → (B → C) → (A → B) → (A → C) f ∘′ g = λ x → f (g x) _×̇_ : ∀{A C : Se...
{-# OPTIONS --without-K #-} module Everything where open import AC open import Equivalence open import Fiber open import Functoriality open import FunExt open import GroupoidStructure open import HIT.Interval open import Homotopy open import J open import K open import NTypes open import NTypes.Contractible open impor...
-- Jesper, 2019-07-27. Cut down this example from a latent bug in -- @antiUnify@, which was using @unAbs@ instead of @absBody@. {-# OPTIONS --double-check #-} open import Agda.Primitive postulate I : Set T : ∀ {p} → Set (lsuc p) → Set (lsuc p) t : ∀ {p} → (B : Set (lsuc p)) → (I → I → Set) → B → T B x0 : I ...
module UnknownNameInFixityDecl where infix 40 _+_ infixr 60 _*_
open import Nat open import Prelude open import List open import contexts open import core open import lemmas-env module lemmas-progress where typ-inhabitance-pres : ∀{Δ Σ' Γ E e τ} → Δ , Σ' , Γ ⊢ E → Δ , Σ' , Γ ⊢ e :: τ → Σ[ r ∈ resu...
{- 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.Crypto.Crypto.Hash ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Prelude open import LibraBFT.Lemmas -- TODO-2: The f...
import Categories.2-Category import Categories.2-Functor import Categories.Adjoint import Categories.Adjoint.Construction.EilenbergMoore import Categories.Adjoint.Construction.Kleisli import Categories.Adjoint.Equivalence import Categories.Adjoint.Instance.0-Truncation import Categories.Adjoint.Instance.01-Truncation i...
module Membership where open import Data.Sum open import Data.List open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Data.List.Any as Any open Any.Membership-≡ -- _∈_ ∈-++-pos : ∀ {A : Set} {x : A} xs ys → x ∈ xs ++ ys → (x ∈ xs) ⊎ (x ∈ ys) ∈-++-pos [] ys x∈ = inj...
{-# OPTIONS --without-K #-} module hott.loop where open import hott.loop.core public open import hott.loop.properties public open import hott.loop.level public open import hott.loop.sum public
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.DiffInt.Base where open import Cubical.Foundations.Prelude open import Cubical.HITs.SetQuotients.Base open import Cubical.Data.Sigma open import Cubical.Data.Nat rel : (ℕ × ℕ) → (ℕ × ℕ) → Type₀ rel (a₀ , b₀) (a₁ , b₁) = x ≡ y where x = a₀ ...
module Structure.Category.Functor.Contravariant where open import Logic.Predicate import Lvl open import Structure.Category.Functor open import Structure.Category.Dual open import Structure.Category open import Structure.Setoid open import Type private variable ℓ ℓₒ ℓₘ ℓₗₒ ℓₗₘ ℓᵣₒ ℓᵣₘ ℓₑ ℓₗₑ ℓᵣₑ : Lvl.Level priv...
{-# OPTIONS --rewriting --allow-unsolved-metas #-} postulate _↦_ : Set → Set → Set {-# BUILTIN REWRITE _↦_ #-} postulate X : Set P : Set → Set → Set P-rewr : (A : Set) → (P A A ↦ X) {-# REWRITE P-rewr #-} f : (B : Set → Set) {x y : Set} → P (B x) (B y) f = {!!}
------------------------------------------------------------------------ -- The Agda standard library -- -- Sublist-related properties ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Sublist.Propositional.Properties {a} {A : ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Properties where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function using (_∘_; _$_; flip; id) open import Cubical.Foundations.Logic hiding (_⇒_; _⇔_) renaming (⇔toPath t...
------------------------------------------------------------------------ -- The Agda standard library -- -- "Finite" sets indexed on coinductive "natural" numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --sized-types --guardedness #-} module Codata.Musical.Cofi...
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-} module Number.Coercions where open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Relation.Nullary.Base -- ¬_ open import Cubical.Data.Unit.Base -- Unit open import Cubical.Data.Empty -- ⊥ open impo...
module Control.Exception where open import IO import Control.Exception.Primitive as Prim bracket : ∀ {a b c} {A : Set a} {B : Set b} {C : Set c} → IO A → (A → IO B) → (A → IO C) → IO C bracket io final body = lift (Prim.bracket (run io) (λ a1 → run (final a1)) (λ a2 → run (body a2)))
open import Oscar.Prelude module Oscar.Class.Bind where module _ (𝔉 : ∀ {𝔣} → Ø 𝔣 → Ø 𝔣) 𝔬₁ 𝔬₂ where 𝓫ind = ∀ {𝔒₁ : Ø 𝔬₁} {𝔒₂ : Ø 𝔬₂} → 𝔉 𝔒₁ → (𝔒₁ → 𝔉 𝔒₂) → 𝔉 𝔒₂ record 𝓑ind : Ø ↑̂ (𝔬₁ ∙̂ 𝔬₂) where infixl 6 bind field bind : 𝓫ind syntax bind m f = f =<< m open 𝓑ind ⦃ … ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.ImplShared.Base.Types open import LibraBFT.Abstra...
open import Agda.Builtin.Equality open import Agda.Builtin.Nat data ⊥ : Set where data Zero : Set where zero : Zero data One : Set where suc : Zero → One data _≤_ : One → Zero → Set where _≤?_ : ∀ m n → m ≤ n → ⊥ suc m ≤? zero = λ () thm : (f : suc zero ≤ zero → ⊥) → suc zero ≤? zero ≡ f thm f = refl -- (λ...
{-# OPTIONS --without-K --safe #-} module Categories.Diagram.End.Properties where open import Level open import Data.Product using (Σ; _,_) open import Function using (_$_) open import Categories.Category open import Categories.Category.Product open import Categories.Category.Construction.Functors open import Catego...
{-# OPTIONS --cubical --safe #-} open import Relation.Binary open import Prelude hiding (Decidable) module Data.List.Relation.Binary.Lexicographic {e ℓ₁ ℓ₂} {E : Type e} (ord : TotalOrder E ℓ₁ ℓ₂) where open import Data.List import Path as ≡ open TotalOrder ord renaming (refl to ≤-refl) import Data.Empty.UniverseP...
------------------------------------------------------------------------ -- Equivalence between omniscience principles ------------------------------------------------------------------------ -- http://math.fau.edu/lubarsky/Separating%20LLPO.pdf -- https://pdfs.semanticscholar.org/deb5/23b6078032c845d8041ee6a5383fec41...
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-} {- This file shows that the property of the natural numbers being a homotopy-initial algebra of the functor (1 + _) is equivalent to fulfilling a closely related inductive elimination principle. Proofing the latter is trivial, since the typechecker ...
------------------------------------------------------------------------ -- A variant of Paolo Capriotti's variant of higher lenses ------------------------------------------------------------------------ {-# OPTIONS --cubical #-} import Equality.Path as P module Lens.Non-dependent.Higher.Capriotti.Variant {e⁺} (e...
module README where ------------------------------------------------------------------------ -- The Agda standard library, version 1.3 -- -- Authors: Nils Anders Danielsson, Matthew Daggitt, Guillaume Allais -- with contributions from Andreas Abel, Stevan Andjelkovic, -- Jean-Philippe Bernardy, Peter Berry, Bradley Ha...
-- Note: out of order true and false. Confuses the -- values if we mess up and compile it to a fresh -- datatype instead of Haskell Bool. data Two : Set where tt ff : Two {-# BUILTIN BOOL Two #-} {-# BUILTIN FALSE ff #-} {-# BUILTIN TRUE tt #-} -- Note: out of order nil and cons. Causes segfault -- if we mess up an...
module ch1 where data 𝔹 : Set where tt : 𝔹 ff : 𝔹 _||_ : 𝔹 -> 𝔹 -> 𝔹 tt || _ = tt ff || b = b data day : Set where monday : day tuesday : day wednesday : day thursday : day friday : day saturday : day sunday : day nextday : day -> day nextday monday = tuesday nextday tuesday = wednesday next...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lexicographic products of binary relations ------------------------------------------------------------------------ -- The definition of lexicographic product used here is suitable if -- the left-hand relation i...
-- Andreas, 2013-03-22 -- {-# OPTIONS -v tc.lhs:40 #-} module Issue279-3 where module M (X : Set) where data R : Set where r : X → R postulate P Q : Set open M P shouldn't-check : M.R Q → Q shouldn't-check (r q) = q -- Agda uses the type of the original constructor -- -- M.r {X : Set} : X → R X -- -- in...
module BasicIS4.Metatheory.DyadicHilbert-TarskiOvergluedDyadicImplicit where open import BasicIS4.Syntax.DyadicHilbert public open import BasicIS4.Semantics.TarskiOvergluedDyadicImplicit public open ImplicitSyntax (_⊢_) (mono²⊢) public -- Completeness with respect to a particular model. module _ {{_ : Model}} wher...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties related to bag and set equality ------------------------------------------------------------------------ -- Bag and set equality are defined in Data.List.Any. module Data.List.Any.BagAndSetEquality w...
-- Issue 3536 reported by Malin Altenmüller -- The problem was that the Treeless compiler reruns the clause -- compiler, but without the split tree from the coverage -- checker. However, the split tree is necessary to direct the clause -- compiler. data Unit : Set where true : Unit record R : Set where coinductive...
{-# OPTIONS --termination-depth=2 #-} module TerminationWithMerge where data List (a : Set) : Set where [] : List a _∷_ : a -> List a -> List a -- infix postulate a : Set Bool : Set _≤?_ : a -> a -> Bool merge : List a -> List a -> List a merge xs [] = xs merge [] ys ...
postulate F : Set → Set {-# POLARITY F ⚄ #-}
data ⊥ : Set where record ⊤ : Set where constructor unit data T : ⊥ → Set where con : (i : ⊥) → T i module M (x : ⊤) where bar : (i : ⊥) → T i → ⊥ bar .i (con i) = i module N where foo : ⊥ foo = i -- Should not be accepted. -- Type signature should be `test : ⊥ → ⊥` test : ⊥ → ⊥ tes...
module sn-calculus-confluence.potrec where open import utility open import sn-calculus open import context-properties using (->pot-view ; ->E-view) open import sn-calculus-confluence.helper open import Esterel.Lang open import Esterel.Lang.Binding open import Esterel.Lang.Properties open import Esterel.Lang.CanFunc...
open import Agda.Builtin.Equality open import Agda.Builtin.Sigma module _ {X : Set} {x : X} where test : (p q : Σ X (x ≡_)) → p ≡ q test (.x , refl) (z , q) = {!q!} -- C-c C-c q RET: -- WAS: test (_ , refl) (_ , refl) -- WANT: preserved user-written pattern -- test (.x , refl) (_ , refl) test' : (p q ...
open import Agda.Builtin.Unit open import Agda.Builtin.List open import Agda.Builtin.Reflection id : ∀ {a} {A : Set a} → A → A id x = x macro my-macro : Term → TC ⊤ my-macro goal = bindTC (getType (quote id)) λ idType → bindTC (reduce idType) λ _ → returnTC _ fails? : ⊤ fails? = my-macro
----------------------------------------------------------------------- -- The Agda standard library -- -- Properties of the heterogeneous sublist relation ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Sublist.Heterogeneous...
{-# OPTIONS --without-K #-} open import HoTT open import homotopy.JoinComm open import homotopy.JoinAssocCubical module homotopy.JoinSusp where module _ {i} {A : Type i} where private module Into = PushoutRec {d = *-span (Lift {j = i} Bool) A} {D = Suspension A} (λ {(lift true) → north _; ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Simple implementation of sets of ℕ. -- -- Since ℕ is represented as unary numbers, simply having an ordered list of -- numbers to represent a set is quite inefficient. For instance, to see if -- 6 is in the set {...
module Numeral.Natural.Relation.DivisibilityWithRemainder where import Lvl open import Logic open import Logic.Propositional open import Numeral.Finite open import Numeral.Natural open import Numeral.Natural.Oper open import Type -- Divisibility with a remainder. -- `(y ∣ x)(r)` means that `y` is divisible by `x...
open import Type open import Logic.Classical as Logic using (Classical) open import Logic.Predicate as Logic using () module Formalization.ClassicalPropositionalLogic.NaturalDeduction.Tree ⦃ classical : ∀{ℓ} → Logic.∀ₗ(Classical{ℓ}) ⦄ where import Lvl open import Logic open import Sets.PredicateSet using (PredSe...
record R (A : Set) : Set where field f : A → A open module R′ (@0 A : Set) (r : R A) = R {A = A} r
module Impure.LFRef.Properties.Confluence where open import Prelude open import Data.List open import Extensions.List open import Extensions.Nat open import Impure.LFRef.Syntax open import Impure.LFRef.Eval private val-lemma : ∀ {t} → (v v₁ : Val t) → v ≡ v₁ val-lemma loc loc = refl val-lemma unit unit = refl...
{- Basic theory about transport: - transport is invertible - transport is an equivalence ([transportEquiv]) -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Foundations.Transport where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Is...
module TestVec where open import PreludeNatType open import PreludeShow infixr 40 _::_ data Vec (A : Set) : Nat -> Set where [] : Vec A zero _::_ : {n : Nat} -> A -> Vec A n -> Vec A (suc n) head : {A : Set}{n : Nat} -> Vec A (suc n) -> A head (x :: _) = x -- no need for a [] case length : {A : Set}{n : ...
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_; Setω) open import Boolean.Definition open import Setoids.Setoids open import Setoids.Subset open import Setoids.Functions.Definition open import LogicalFormulae open import Functions.Definition open import Li...
------------------------------------------------------------------------ -- Truncated queues: any two queues representing the same sequence are -- equal, and things are set up so that at compile-time (but not at -- run-time) some queue operations compute in roughly the same way as -- the corresponding list operations -...
{-# OPTIONS --without-K #-} {- INDEX: Some constructions with non-recursive HITs, and related results. This formalization covers the hardest results of my paper titled "Constructions with non-recursive HITs". To be precise: I have formalized the result that all functions in the sequence of approximati...
{-# OPTIONS --cubical --safe #-} open import Prelude hiding (A; B) open import Categories module Categories.Pushout {ℓ₁ ℓ₂} (C : Category ℓ₁ ℓ₂) where open Category C private variable A B : Ob h₁ h₂ j : A ⟶ B record Pushout (f : X ⟶ Y) (g : X ⟶ Z) : Type (ℓ₁ ℓ⊔ ℓ₂) where field {Q} : Ob i₁ : Y ⟶...
-- Andreas, 2016-02-02 module _ where data Q : Set where a : Q data Overlap : Set where a : Overlap postulate helper : ∀ {T : Set} → (T → T) → Set test₃ : Set test₃ = helper λ { a → a } -- Does not succeed, as the type of the extended lambda is ambiguous. -- It should fail with an error or unsol...
module Issue756a where data Nat : Set where zero : Nat suc : Nat → Nat data T : Nat → Set where [_] : ∀ n → T n bad : ∀ n → T n → Nat bad .zero [ zero ] = zero bad .(suc (let x = n in x)) [ suc n ] = zero
{-# OPTIONS --without-K #-} module Agda.Builtin.List where infixr 5 _∷_ data List {a} (A : Set a) : Set a where [] : List A _∷_ : (x : A) (xs : List A) → List A {-# BUILTIN LIST List #-} {-# BUILTIN NIL [] #-} {-# BUILTIN CONS _∷_ #-} {-# HASKELL type AgdaList a b = [b] #-} {-# COMPILED_DATA List MAlonzo....
-- Andreas, 2015-07-07 continuation of issue 665 {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.with.strip:60 -v tc.lhs:10 #-} postulate C : Set anything : C record I : Set where constructor c field f : C data Wrap : (j : I) → Set where wrap : ∀ {j} → Wrap j works1 : ∀ {j} → Wrap j → C works1 {...
open import Prelude hiding (begin_; step-≡; _∎) module MJ.Classtable.Core (c : ℕ) where open import Data.Product.Relation.Binary.Pointwise.NonDependent using (_×-≟_) open import Data.List open import Data.List.Membership.Propositional open import Data.List.Relation.Binary.Pointwise using (decidable-≡) open import Rel...
------------------------------------------------------------------------ -- The Agda standard library -- -- Homogeneously-indexed binary relations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Binary.Indexed.Homogeneous where -------------...
{-# OPTIONS --without-K #-} open import HoTT {- The pseudo-adjoint functors F,G : Ptd → Ptd - It stops at composition and ignores - all the higher associahedrons. -} module homotopy.PtdAdjoint where record PtdFunctor i j : Type (lsucc (lmax i j)) where field obj : Ptd i → Ptd j arr : {X Y : Ptd i} → fs...
module test.IntegerLiteral where open import Type open import Declarative open import Builtin open import Builtin.Constant.Type open import Builtin.Constant.Term Ctx⋆ Kind * # _⊢⋆_ con size⋆ open import Agda.Builtin.Sigma open import Data.Integer open import Data.Nat -- zerepoch/zerepoch-core/test/data/integerLiteral...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Base where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function using (_on_) open import Cubical.Foundations.HLevels open import Cubical.Classes using (Cast; [_]) public ...
------------------------------------------------------------------------ -- Some results/examples related to CCS, implemented using the -- coinductive definition of bisimilarity ------------------------------------------------------------------------ -- Unless anything else is stated the results (or statements, in the...
{-# OPTIONS --verbose tc.constr.findInScope:15 #-} module InstanceArguments.03-classes where open import Algebra open import Algebra.Structures open import Algebra.FunctionProperties open import Data.Nat.Properties as NatProps open import Data.Nat open import Data.Bool.Properties using (isCommutativeSemiring-∧-∨) ope...
{-# OPTIONS --universe-polymorphism #-} module Categories.Yoneda where open import Level open import Data.Product open import Categories.Support.Equivalence open import Categories.Support.EqReasoning open import Categories.Category import Categories.Functor as Cat open import Categories.Functor using (Functor; modul...
module Common where open import Data.String using (String) -- Basic sorts ----------------------------------------------------------------- Id : Set Id = String
{-# OPTIONS --cubical #-} module Multidimensional.Data.DirNum where open import Multidimensional.Data.DirNum.Base public open import Multidimensional.Data.DirNum.Properties public
module Data.List.Equiv.Id where import Lvl open import Functional open import Function.Names as Names using (_⊜_) import Function.Equals as Fn open import Data.Boolean open import Data.Option open import Data.Option.Equiv.Id open import Data.Option.Proofs using () open import Data.List open import Data.List.Equiv...
{-# OPTIONS --rewriting #-} -- {-# OPTIONS -v rewriting:30 #-} open import Agda.Builtin.Nat open import Agda.Builtin.Equality renaming (_≡_ to _≡≡_) record Eq (t : Set) : Set₁ where field _≡_ : t → t → Set open Eq {{...}} {-# BUILTIN REWRITE _≡_ #-} instance eqN : Eq Nat eqN = record { _≡_ = _≡≡_ } pos...
module MLib.Algebra.PropertyCode.RawStruct where open import MLib.Prelude open import MLib.Fin.Parts open import MLib.Finite open import Relation.Binary as B using (Setoid) open import Data.List.Any using (Any; here; there) open import Data.List.Membership.Propositional using (_∈_) open import Data.Vec.N-ary open ...
{-# OPTIONS --universe-polymorphism #-} module Issue293a where open import Agda.Primitive using (Level; _⊔_) renaming (lzero to zero; lsuc to suc) ------------------------------------------------------------------------ record RawMonoid c ℓ : Set (suc (c ⊔ ℓ)) where infixl 7 _∙_ infix 4 _≈_ field Carri...
---------------------------------------------------------------------- -- Copyright: 2013, Jan Stolarek, Lodz University of Technology -- -- -- -- License: See LICENSE file in root of the repo -- -- Repo address: https://github.com/...
{-# OPTIONS --without-K --rewriting #-} open import lib.Base open import lib.PathGroupoid module lib.PathFunctor where {- Nondependent stuff -} module _ {i j} {A : Type i} {B : Type j} (f : A → B) where !-ap : {x y : A} (p : x == y) → ! (ap f p) == ap f (! p) !-ap idp = idp ap-! : {x y : A} (p : x == y) ...
{-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.constr.findInScope:10 #-} -- -v tc.conv.elim:25 #-} -- Andreas, 2012-07-01 module Issue670a where import Common.Level open import Common.Equality findRefl : {A : Set}(a : A){{p : a ≡ a}} → a ≡ a findRefl a {{p}} = p uip : {A : Set}{a : A} → findRefl a ≡ refl uip =...
module BasicIO where open import Agda.Builtin.IO public open import Data.Char open import Data.List {-# FOREIGN GHC import Control.Exception #-} {-# FOREIGN GHC import System.Environment #-} -- This is easier than using the IO functions in the standard library, -- but it's technically not as type-safe. And it bypass...
-- Andreas, 2016-12-20, issue #2350 -- Agda ignores a wrong instance parameter to a constructor data D {{a}} (A : Set a) : Set a where c : A → D A test : ∀ ℓ {ℓ'} (A : Set ℓ') {B : Set ℓ} (a : A) → D A test ℓ A a = c {{ℓ}} a -- Expected Error: -- .ℓ' != ℓ of type .Agda.Primitive.Level -- when checking that the exp...
{-# OPTIONS --universe-polymorphism #-} module Categories.Free where open import Categories.Category open import Categories.Free.Core open import Categories.Free.Functor open import Categories.Graphs.Underlying open import Categories.Functor using (Functor) open import Graphs.Graph open import Graphs.GraphMorphism ...
{-# OPTIONS --rewriting #-} module DualContractive where open import Data.Fin open import Data.Maybe open import Data.Nat hiding (_≤_ ; compare) renaming (_+_ to _+ℕ_) open import Data.Nat.Properties open import Data.Sum hiding (map) open import Data.Product open import Relation.Nullary open import Relation.Binary.Pr...
{- In this file we apply the cubical machinery to Martin Hötzel-Escardó's structure identity principle: https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#sns -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Foundations.SIP where open import Cubical.Foundations.Prelud...
-- Andreas, 2016-07-25, issue #2108 -- test case and report by Jesper {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.pos.occ:70 #-} open import Agda.Primitive open import Agda.Builtin.Equality lone = lsuc lzero record Level-zero-or-one : Set where field level : Level is-lower : (level ⊔ lone...
module Base.Prelude where open import Base.Prelude.Bool public open import Base.Prelude.Integer public open import Base.Prelude.List public open import Base.Prelude.Pair public open import Base.Prelude.Unit public
module Holes.Test.Limited where open import Holes.Prelude hiding (_⊛_) open import Holes.Util open import Holes.Term open import Holes.Cong.Limited open import Agda.Builtin.Equality using (_≡_; refl) module Contrived where infixl 5 _⊕_ infixl 6 _⊛_ infix 4 _≈_ -- A type of expression trees for natural numbe...