text
stringlengths
4
690k
module bstd.bign where
-- {-# OPTIONS -v tc.lhs.unify:100 #-} -- Reported by project member adamgundry, 2012-10-26 -- I was trying to extend Conor's KIPLING technique (Outrageous but -- Meaningful Coincidences, WGP 2010) which depends on indexing a -- syntax by functions, when I hit this problem: module Issue738 where open import Common.E...
module Functors where open import Library open import Categories open Cat record Fun {a b c d} (C : Cat {a}{b})(D : Cat {c}{d}) : Set (a ⊔ b ⊔ c ⊔ d) where constructor functor field OMap : Obj C → Obj D HMap : ∀{X Y} → Hom C X Y → Hom D (OMap X) (OMap Y) fid : ∀{X} → HMap (iden C {X}) ≅ ide...
open import Oscar.Prelude open import Oscar.Class.Successor₀ open import Oscar.Class.Injectivity open import Oscar.Data.¶ open import Oscar.Data.Vec open import Oscar.Data.Proposequality import Oscar.Property.Thickandthin.FinFinProposequalityMaybeProposequality module Oscar.Class.Injectivity.Vec where instance 𝓘...
{-# OPTIONS --without-K --safe #-} -- Exact category (https://ncatlab.org/nlab/show/exact+category) -- is a regular category -- in which every internal equivalence is a kernel pair module Categories.Category.Exact where open import Level open import Categories.Category.Core open import Categories.Diagram.Pullback o...
module VecS where open import Data.Empty open import Data.Product hiding (map) open import Data.Sum open import Data.Vec open import Data.Nat open import Data.Bool open import Data.Nat.Properties import Homotopy as Pi ------------------------------------------------------------------------------ data B : Set where...
------------------------------------------------------------------------ -- The Agda standard library -- -- Finite sets ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Fin where -------------------------------------------------------------------...
------------------------------------------------------------------------ -- The Agda standard library -- -- Function setoids and related constructions ------------------------------------------------------------------------ module Function.Equality where open import Function as Fun using (_on_) open import Level impo...
{- Eilenberg–Mac Lane type K(G, 1) -} {-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-} module Cubical.HITs.EilenbergMacLane1.Properties where open import Cubical.HITs.EilenbergMacLane1.Base open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import ...
------------------------------------------------------------------------ -- An up-to technique for CCS ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude hiding (step-→) module Bisimilarity.Weak.Up-to.CCS {ℓ} {Name : Type ℓ} where open import E...
-- Andreas, 2016-11-11 issue #2301, -- reported by stedolan and fredrikNorvallForsberg: -- compareTelescope ignored relevance. -- Faulty behavior probably existed since 2011. module Issue2301 where data Box (A : Set) : Set where wrap : A → Box A weird : ∀ A → .A → Box A weird A = wrap -- SHOULD FAIL with error: -...
mutual _ : Set _ : Set → Set
module Dipsy.Example.CLL where open import Data.Nat using (ℕ) open import Data.Vec using (Vec; _∷_; []) open import Dipsy.Polarity using (Polarity; flip) renaming (pos to +; neg to -) mutual Op₀ : (r : Polarity) → Set Op₀ r = Op [] r Op₁ : (a r : Polarity) → Set Op₁ a r = Op (a ∷ []) r Op₂ : (a₁ a₂ r : Pola...
-- Andreas, 2016-09-28, solve _ <= lzero. -- {-# OPTIONS -v tc.conv.nat:40 #-} open import Common.Level data C : Set₁ where c : Set _ → C -- This meta should be solved to lzero. -- ERROR WAS: -- Failed to solve the following constraints: -- [0] lsuc _0 =< lsuc lzero -- REASON: -- Non-canonical lzero in level c...
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Coalgebra where -- Co-algebras of a Functor open import Level open import Function using (_$_) open import Categories.Category using (Category) open import Categories.Functor using (Functor; Endofunctor) record F-Coalgebra {o ℓ e} {C : Category o ℓ e} (F :...
{-# OPTIONS --without-K --safe #-} module Data.Quiver where -- A Quiver, also known as a multidigraph, is the "underlying graph" of -- a category. Note how a Quiver has a *setoid* of edges. open import Level open import Relation.Binary using (Rel; IsEquivalence; Setoid) import Relation.Binary.Reasoning.Setoid as EqR...
------------------------------------------------------------------------ -- Some definitions related to Dec ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Dec where open import Logical-equivalence hiding (_∘_) open import Prelude private variable...
module System.Environment.Primitive where open import IO.Primitive open import Agda.Builtin.String open import Agda.Builtin.List open import Agda.Builtin.Unit import Foreign.Haskell as FFI open import System.FilePath.Posix postulate getArgs : IO (List String) getProgName : IO String getExecut...
module bool-thms where open import bool open import eq open import sum open import empty open import level ~~-elim : ∀ (b : 𝔹) → ~ ~ b ≡ b ~~-elim tt = refl ~~-elim ff = refl &&-idem : ∀ {b} → b && b ≡ b &&-idem{tt} = refl &&-idem{ff} = refl ||-idem : ∀{b} → b || b ≡ b ||-idem{tt} = refl ||-idem{ff} = refl ||≡ff₁...
{-# OPTIONS --without-K #-} module Data.Bits.Count where open import Type hiding (★) open import Data.Two hiding (_==_) open import Data.Bits open import Data.Bits.OperationSyntax import Data.Bits.Search as Search open Search.SimpleSearch open import Data.Bits.Sum open import Data.Bool.Properties using (not-involut...
module Pi.Interp where open import Data.Unit open import Data.Product open import Data.Sum open import Pi.Syntax open import Pi.Opsem -- Big-step intepreter interp : {A B : 𝕌} → (A ↔ B) → ⟦ A ⟧ → ⟦ B ⟧ interp unite₊l (inj₂ v) = v interp uniti₊l v = inj₂ v interp swap₊ (inj₁ v) = inj₂ ...
module Oscar.Data.Unit where open import Agda.Builtin.Unit public using (⊤; tt)
{-# OPTIONS --without-K #-} module hott.loop.core where open import sum open import equality open import function.core open import function.isomorphism.core open import function.overloading open import pointed.core open import sets.nat.core Ω₁ : ∀ {i} → PSet i → PSet i Ω₁ (X , x) = ((x ≡ x) , refl) ΩP : ∀ {i} → ℕ → ...
{-# OPTIONS --without-K --rewriting --exact-split #-} open import lib.Basics open import lib.types.PushoutFmap open import lib.types.Span open import lib.types.Coproduct open import lib.types.Paths open import Graphs.Definition open import Coequalizers.Definition open import Util.Coproducts {- We show that given equ...
{- Normalize Integer Matrices -} {-# OPTIONS --safe #-} module Cubical.Experiments.IntegerMatrix where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat open import Cubical.Data.Int open import Cubical.Data.FinData open import Cubical.Data.List open import Cubical.Algebra.CommRing open import C...
------------------------------------------------------------------------ -- Some properties related to the const function ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Const {reflexive} (eq : ∀ {a p} → Equality-with-J a p ref...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of membership of vectors based on propositional equality. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.Membership.Propos...
{-# OPTIONS --without-K --exact-split --safe #-} module Fragment.Algebra.Free.Atoms where open import Level using (Level; _⊔_) open import Data.Nat using (ℕ) open import Data.Fin using (Fin) open import Relation.Binary using (Setoid; IsEquivalence) open import Relation.Binary.PropositionalEquality as PE using (_≡_)...
------------------------------------------------------------------------ -- Validity of declarative kinding of Fω with interval kinds ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module FOmegaInt.Kinding.Declarative.Validity where open import Data.Fin us...
{-# OPTIONS --cubical #-} module _ where module _ where import Agda.Primitive open import Agda.Primitive.Cubical public postulate Path' : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ PathP : ∀ {ℓ} (A : I → Set ℓ) → A i0 → A i1 → Set ℓ {-# BUILTIN PATH Path' #-} {-# BUILTIN PATHP P...
open import Relation.Binary using (IsDecEquivalence) open import Agda.Builtin.Equality module UnifyMguF (FunctionName : Set) ⦃ isDecEquivalenceA : IsDecEquivalence (_≡_ {A = FunctionName}) ⦄ where {- module UnifyMguF where postulate FunctionName : Set instance isDecEquivalenceA : IsDecEquivalence (_≡_ {A = Funct...
open import FRP.JS.Nat using ( ℕ ; zero ; suc ; _≤_ ; _<_ ; _≟_ ; _+_ ) open import FRP.JS.Nat.Properties using ( ≤-impl-≯ ; <-impl-s≤ ; ≤≠-impl-< ; ≤-bot ) open import FRP.JS.Bool using ( Bool ; true ; false ; _∧_ ) open import FRP.JS.Maybe using ( Maybe ; just ; nothing ) open import FRP.JS.True using ( True ; contr...
module main where import parse open import lib open import huffman-types import huffman module parsem = parse huffman.gratr2-nt ptr open parsem open parsem.pnoderiv huffman.rrs huffman.huffman-rtn open import run ptr open noderiv {- from run.agda -} {- imports for Huffman trees and also Braun trees specialized t...
{-# OPTIONS --safe #-} -- --without-K #-} open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; sym; refl; subst; trans; cong) open import Relation.Nullary using (Dec; yes; no) open import Relation.Nullary.Decidable using (True; toWitness; fromWitness) open import Function using (_∘_) import Data.Maybe a...
module Examples where open import Data.List using ([]; _∷_) open import Data.Fin using () renaming (zero to fzero) open import Relation.Binary using (Rel) open import Level using () renaming (zero to lzero) open import Syntax open import Theory module NatBool where data Gr : Set where nat : Gr bool : Gr ...
{-# OPTIONS --rewriting #-} {-# OPTIONS --allow-unsolved-metas #-} module NfCBPVLaws where open import Library hiding (_×̇_) open import NfCBPV -- NB: mon⁺ is a comonad coalgebra module MonIsComonadCoalgebra where mon-id : ∀ (P : Ty⁺) {Γ} (a : ⟦ P ⟧⁺ Γ) → mon⁺ P a ⊆-refl ≡ a mon-id (base o) x = {!mon...
{-# OPTIONS --rewriting #-} open import FFI.Data.Either using (Either; Left; Right) open import Luau.Type using (Type; nil; number; string; boolean; never; unknown; _⇒_; _∪_; _∩_) open import Luau.TypeNormalization using (normalize) module Luau.FunctionTypes where -- The domain of a normalized type srcⁿ : Type → Typ...
{-# OPTIONS --without-K --safe #-} module Data.List.Kleene.Syntax where open import Data.List hiding ([_]) open import Data.List.Kleene.Base open import Data.Product infixr 4 _,_ infixr 5 _] data ListSyntax {a} (A : Set a) : Set a where _] : A → ListSyntax A _,_ : A → ListSyntax A → ListSyntax A infixr 4 ⋆[_ ⁺...
{-# OPTIONS --without-K #-} module sets.int where open import sets.int.definition public open import sets.int.utils public open import sets.int.core public open import sets.int.properties public
module Issue2959.M (_ : Set₁) where record R : Set₁ where field A : Set
{-# OPTIONS --prop #-} postulate f : Prop → Prop P : Prop₁ x : Prop x = f P -- WAS: -- Set₁ != Set -- when checking that the expression P has type Prop -- SHOULD BE: -- Prop₁ != Prop -- when checking that the expression P has type Prop
{-# OPTIONS --inversion-max-depth=10 #-} open import Agda.Builtin.Nat open import Agda.Builtin.Equality data ⊥ : Set where double : Nat → Nat double zero = zero double (suc n) = suc (suc (double n)) postulate doubleSuc : (x y : Nat) → double x ≡ suc (double y) → ⊥ diverge : ⊥ diverge = doubleSuc _ _ refl {- ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category; module Definitions) -- Definition of the "Twisted" Functor between certain Functor Categories module Categories.Functor.Instance.Twisted {o ℓ e o′ ℓ′ e′} (𝒞 : Category o ℓ e) (𝒟 : Category o′ ℓ′ e′) where import Categories.Category....
module ModusPonens where modusPonens : {P Q : Set} → (P → Q) → P → Q modusPonens = {!!}
module hello-world-dep-lookup where open import Data.Nat using (ℕ) open import Data.Vec using (Vec; _∷_) open import Data.Fin using (Fin; zero; suc) variable A : Set n : ℕ lookup : Vec A n → Fin n → A lookup (a ∷ as) zero = a lookup (a ∷ as) (suc i) = lookup as i
--{-# OPTIONS --allow-unsolved-metas #-} module StateSizedIO.GUI.WxGraphicsLibLevel3 where open import StateSizedIO.GUI.Prelude data GuiLev1Command : Set where putStrLn : String → GuiLev1Command createFrame : GuiLev1Command addButton : Frame → Button → GuiLev1Command createTextCtrl : Frame ...
module Tactic.Monoid where open import Prelude open import Tactic.Reflection open import Tactic.Reflection.Quote open import Structure.Monoid.Laws open import Tactic.Monoid.Exp open import Tactic.Monoid.Reflect open import Tactic.Monoid.Proofs monoidTactic : ∀ {a} {A : Set a} {MonA : Monoid A} {{_ : MonoidLaws A {...
{-# OPTIONS --guardedness #-} module Cubical.Codata.Conat where open import Cubical.Codata.Conat.Base public open import Cubical.Codata.Conat.Properties public
-- Linear monoidal closed structure for families module SOAS.Families.Linear {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} open import Categories.Category.Monoidal open import Categories....
open import Nat open import Prelude open import contexts module core where -- types data htyp : Set where b : htyp ⦇-⦈ : htyp _==>_ : htyp → htyp → htyp -- arrow type constructors bind very tightly infixr 25 _==>_ -- external expressions data hexp : Set where c : hexp _·...
{-# OPTIONS --rewriting #-} module Luau.TypeCheck where open import Agda.Builtin.Equality using (_≡_) open import FFI.Data.Maybe using (Maybe; just) open import Luau.Syntax using (Expr; Stat; Block; BinaryOperator; yes; nil; addr; number; bool; string; val; var; var_∈_; _⟨_⟩∈_; function_is_end; _$_; block_is_end; bin...
module Pi.Syntax where open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Product infixr 12 _×ᵤ_ infixr 11 _+ᵤ_ infixr 50 _⨾_ infixr 10 _↔_ infix 99 !_ -- Types data 𝕌 : Set where 𝟘 : 𝕌 𝟙 : 𝕌 _+ᵤ_ : 𝕌 → 𝕌 → 𝕌 _×ᵤ_ : 𝕌 → 𝕌 → 𝕌 ⟦_⟧ : (A : 𝕌) → Set ...
module Automata.Nondeterministic where -- Standard libraries imports ---------------------------------------- open import Level using () renaming (zero to ℓ₀) open import Data.Nat using (ℕ) open import Data.Product using (_×_) open import Data.Vec using (Vec ; [] ; _∷_) open import Relation.Unary using (Pred) open...
module ByteCount where open import Agda.Builtin.Word {-# FOREIGN GHC import Foreign.C.Types #-} postulate CSize : Set mkCSize : Word64 → CSize {-# COMPILE GHC CSize = type CSize #-} {-# COMPILE GHC mkCSize = CSize #-} ByteCount : Set ByteCount = CSize
------------------------------------------------------------------------ -- Primitive IO: simple bindings to Haskell types and functions ------------------------------------------------------------------------ module IO.Primitive where open import Data.String hiding (Costring) open import Data.Char open import Foreig...
{-# OPTIONS --cubical -van-extra-option-just-to-test-a-hack:0 #-}
open import Function using (_$_) open import Relation.Nullary using (yes; no) open import Relation.Binary using (Decidable; Irrelevant; Antisymmetric; Setoid) open import AKS.Algebra.Bundles using (NonZeroCommutativeRing; Field) module AKS.Algebra.Consequences {c ℓ} (R : NonZeroCommutativeRing c ℓ) where open import...
------------------------------------------------------------------------------ -- Natural numbers (PCF version) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-}...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module CombiningProofs.Erasing where postulate D : Set succ₁ : D → D data N : D → Set where nsucc₁ : ∀ {n} → N n → N (succ₁ n) nsucc₂...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Functions.Definition open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Numbers.Naturals.Order.WellFounded open import Semirings.Definition open import Orders.Total.Definition open import Order...
module Basic.Axiomatic.Partial where open import Data.Bool hiding (not; if_then_else_; _∧_) open import Data.Vec hiding ([_]; _++_; split) open import Function open import Relation.Binary.PropositionalEquality open import Data.Product import Level as L open import Utils.Decidable open import Basic.AST open imp...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Construction.LT-Models where -- Given a fixed Lawvere Theory LT and a fixed category C, -- the Functors [LT , C] form a category. -- The proof is basically the same as that of Functors. open import Level open import Categories.Category.Core using (Catego...
module Auto-Modules where open import Auto.Prelude hiding (cong; trans) module NonemptySet (X : Set) (x : X) where h0 : (P : X → Set) → (∀ x → P x) → Σ X P h0 = {!!} -- h0 = λ P h → Σ-i x (h x) module WithRAA (RAA : ∀ A → ¬ (¬ A) → A) where h1 : ∀ A → A ∨ ¬ A h1 = {!!} --h1 = λ A → RAA (A ∨ ((x : A) → ⊥)) (λ z...
module Base where data True : Set where T : True data False : Set where infix 20 _*_ data _*_ (A : Set)(B : A -> Set) : Set where <_,_> : (x : A) -> B x -> A * B rel : Set -> Set1 rel A = A -> A -> Set pred : Set -> Set1 pred A = A -> Set Refl : {A : Set} -> rel A -> Set Refl {A} R = {x : A} -> R x x Sym...
------------------------------------------------------------------------ -- Pointers to results from the paper ------------------------------------------------------------------------ -- Note that the code has evolved after the paper was published. For -- code that is closer to the paper, see the version of the code t...
{-# OPTIONS --type-in-type #-} -- yes, I will let you cheat in this exercise {-# OPTIONS --allow-unsolved-metas #-} -- allows import, unfinished ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- CS410 2017/...
-- A predicate transformer allowing one to express that -- some value definitely does /not/ own some resource infixl 9 _◇_ data _◇_ {p} (P : SPred p) (Φᵢ : Carrier) : SPred (p ⊔ a) where ⟪_,_⟫ : ∀ {Φₚ Φ} → P Φₚ → Φᵢ ⊎ Φₚ ≣ Φ → (P ◇ Φᵢ) Φ -- | This gives another wand like thing module _ {p q} (P : SP...
-- This file is ported from a part of Martin Escardó's HoTT lecture notes -- (https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html). {-# OPTIONS --without-K --safe #-} module Util.HoTT.Section where open import Util.HoTT.HLevel.Core open import Util.Prelude open import Util.Relation.Binary.P...
module TimeSpace where open import Data.Product open import Data.Sum open import Data.List open import Data.Nat open import Data.Nat.Properties open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Pi.Syntax open import Pi.Opsem open import Pi.Eval open import Pi.Examples -- 𝔹+ n ...
open import Oscar.Prelude open import Oscar.Class.Smap open import Oscar.Data.Proposequality open import Oscar.Class.Surjection module Oscar.Data.Surjcollation where 𝓼urjcollation : ∀ {𝔵₁ 𝔵₂ 𝔞 𝔟} {𝔛₁ : Ø 𝔵₁} {𝔛₂ : Ø 𝔵₂} (surjection : Surjection.type 𝔛₁ 𝔛₂) 𝔟̇ (𝔅 : 𝔛₂ → Ø 𝔟) (𝔄 : π̂² 𝔞 𝔛₁) ...
{-# OPTIONS --without-K #-} -- Finished half of the proof! -- - functions between Bool * A and ∑ A are written -- - One direction of the inverse proof is done! -- -- Wrapping up the camera ready version of our -- PLDI paper took more time than I thought it would and so -- I got a late start on this. I think by class...
-- Properties involving susbets and membership -- between sets. module sv20.assign2.SetTheory.Subset where open import sv20.assign2.SetTheory.Logic open import sv20.assign2.SetTheory.ZAxioms memberEq : (x y z : 𝓢) → x ∈ y ∧ y ≡ z → x ∈ z memberEq x y z (x₁ , x₂) = subs _ x₂ x₁ -- Theorem 1, p. 21 (Suppes 1960) not...
module NaturalAndLevelDifferent where data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN LEVEL ℕ #-}
{-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.rewrite:25 -v tc.with:40 --show-implicit #-} -- {-# OPTIONS -v tc:100 #-} -- Andreas, 2014-05-17, reported by Fabien Renaud. -- Error in reification of interaction metas -- leading to strange error messages for rewrite. module _ where open import Common.Pr...
{-# OPTIONS --without-K #-} open import Type open import Type.Identities open import Level.NP open import Data.Two open import Function open import Function.Extensionality open import Data.Product open import Data.Sum open import Data.Fin open import Relation.Binary.PropositionalEquality.NP using (_≡_; refl; !_; _∙_) o...
------------------------------------------------------------------------ -- The Agda standard library -- -- Membership for containers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Container.Membership where open import Level using (_⊔_) open i...
{-# OPTIONS --cubical --safe #-} module Data.Maybe.Properties where open import Data.Maybe.Base open import Prelude fromMaybe : A → Maybe A → A fromMaybe x = maybe x id just-inj : ∀ {x y : A} → just x ≡ just y → x ≡ y just-inj {x = x} = cong (fromMaybe x) just≢nothing : {x : A} → just x ≢ nothing just≢nothing p = ...
{-# OPTIONS --without-K #-} open import Base import Homotopy.TruncationHIT as T {- The definition of the truncation is in TruncationHIT, here I just make some arguments implicit, define easier to use helper functions and prove the universal property -} module Homotopy.Truncation {i} where τ : (n : ℕ₋₂) → (Set i → S...
module Lists where open import Nats open import Bools open import Agda.Builtin.List public using (List; []; _∷_) infixr 5 _++_ _∷ʳ_ [_] : ∀ {a} {A : Set a} → A → List A [ x ] = x ∷ [] _++_ : ∀ {a} {A : Set a} → List A → List A → List A [] ++ ys = ys (x ∷ xs) ++ ys = x ∷ (xs ++ ys) _∷ʳ_ : ∀ {a} {A : Set a}...
module HelloWorld where open import IO open import Data.String open import Data.Unit main = run (putStrLn "Hello World!")
open import MJ.Types as Types import MJ.Classtable.Core as Core module MJ.Semantics.Environments {c}(Ct : Core.Classtable c) where open import Prelude open import Data.List open import Data.List.Membership.Propositional open import Data.List.Relation.Unary.All as All open import Data.List.Relation.Unary.Any open imp...
------------------------------------------------------------------------------ -- ABP Lemma 2 ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --wit...
{-# OPTIONS --universe-polymorphism #-} module Rewrite-with-doubly-indexed-equality where open import Common.Level infix 4 _≡_ data _≡_ {a} {A : Set a} : A → A → Set a where refl : ∀ {x} → x ≡ x {-# BUILTIN EQUALITY _≡_ #-} {-# BUILTIN REFL refl #-} sym : {A : Set}{x y : A} → x ≡ y → y ≡ x sym refl = refl ...
-- | The core type system. module Ethambda.System where open import Ethambda.Common using () -- ((<.>), (<.)) data Tp : Type -> Type where Var : a -> Tp a Fun : Tp a -> Tp a -> Tp a Show a => Show (Tp a) where show t = case t of -- Var a => ?foo Var a => show a Fun a0 b0 => mbrackets a0 <+> "→" <+>...
------------------------------------------------------------------------------ -- Properties for the relation _◁_ ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #...
{-# OPTIONS --universe-polymorphism #-} module Issue256 where open import Imports.Level const : ∀ {a b} {A : Set a} {B : Set b} → A → B → A const x = λ _ → x level : ∀ {ℓ} → Set ℓ → Level level {ℓ} _ = ℓ -- termination check should fail for the following definition ℓ : Level ℓ = const zero (Set ℓ) -- A : Set (suc...
open import Prelude open import core module lemmas-ground where -- not ground types aren't hole to hole ground-arr-not-hole : ∀{τ} → (τ ground → ⊥) → (τ ≠ (⦇-⦈ ==> ⦇-⦈)) ground-arr-not-hole notg refl = notg GHole -- not ground types either have to be hole or an arro...
------------------------------------------------------------------------ -- Traditional non-dependent lenses with erased lens laws ------------------------------------------------------------------------ import Equality.Path as P module Lens.Non-dependent.Traditional.Erased {e⁺} (eq : ∀ {a p} → P.Equality-with-path...
{- This second-order equational theory was created from the following second-order syntax description: syntax Lens | L type S : 0-ary A : 0-ary term get : S -> A put : S A -> S theory (PG) s : S a : A |> get (put (s, a)) = a (GP) s : S |> put (s, get(s)) = s (PP) s : S a b : A |...
{-# OPTIONS --without-K --exact-split --safe #-} open import Fragment.Algebra.Signature module Fragment.Algebra.Homomorphism (Σ : Signature) where open import Fragment.Algebra.Homomorphism.Base Σ public open import Fragment.Algebra.Homomorphism.Definitions Σ public open import Fragment.Algebra.Homomorphism.Propertie...
module sv20.exam1 where open import Data.Product using (∃-syntax) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Function.Base using (_∘_) record _⇔_ (A B : Set) : Set where field to : A → B from : B → A -- An idiom that makes things slightly more readable (sometimes) ca...
{-# OPTIONS --without-K --safe #-} -- https://personal.cis.strath.ac.uk/conor.mcbride/pub/DepRep/DepRep.pdf module Experiment.Outrageous.#02 where data Zero : Set where magic : Zero → (X : Set) → X magic () record 𝟏 : Set where constructor void data 𝟐 : Set where tt : 𝟐 ff : 𝟐 If : 𝟐 → Set → Set → Set If ...
{-# OPTIONS --without-K --safe #-} -- Monadic Adjunctions -- https://ncatlab.org/nlab/show/monadic+adjunction module Categories.Adjoint.Monadic where open import Level open import Categories.Adjoint open import Categories.Adjoint.Properties open import Categories.Category open import Categories.Category.Equivalence ...
open import Agda.Builtin.Nat open import Agda.Builtin.FromNat open import Agda.Builtin.FromNeg open import Agda.Builtin.FromString open import Agda.Builtin.String open import Agda.Builtin.Unit open import Agda.Builtin.List open import Agda.Builtin.Char open import Agda.Builtin.Int instance NumberNat : Number Nat ...
module _ where module _ (A : Set) where postulate F : Set₁ → Set {-# POLARITY F ++ #-} data D : Set where d : F D Set → D
-- {-# OPTIONS -v interaction.give:30 -v 10 #-} -- {-# OPTIONS -v tc.conv.irr:20 #-} module GiveInSpiteOfUnsolvedIrr where postulate .irrAxiom : ∀ {a}{A : Set a} → .A → A {-# BUILTIN IRRAXIOM irrAxiom #-} postulate _≡_ : {A : Set} → A → A → Set funExt : ∀ {A : Set}{B : A → Set}{f g : (x : A) → B x} → (∀ x...
-- Andreas, 2017-01-12, issue #2386 open import Agda.Primitive data _≡_ {a b} {A : Set (a ⊔ b)} : (x y : A) → Set where refl : (x : A) → x ≡ x {-# BUILTIN EQUALITY _≡_ #-} -- Should be accepted -- The type of primTrustMe has to match the flavor of EQUALITY primitive primTrustMe : ∀ {a b}{A : Set _} {x y : A} → ...
{-# OPTIONS --erased-cubical --safe #-} module Canon where open import Data.Fin using (Fin; #_; toℕ) open import Data.Integer using (ℤ; +_; -[1+_]; _-_) open import Data.List using (List; _∷_; []; map; concat; _++_; replicate; zip; length; take; drop) open import Data.Nat using (_*_; ℕ; suc; _+...
{-# OPTIONS --without-K --safe #-} -- https://ncatlab.org/nlab/show/span -- The colimit of a functor from this category is a pushout in the target category. module Categories.Category.Instance.Span where open import Level open import Categories.Category open import Relation.Binary.PropositionalEquality data SpanObj ...
module ctxt-types where open import cedille-types open import general-util open import syntax-util location : Set location = string × posinfo -- file path and starting position in the file -- file path and starting / ending position in file span-location = string × posinfo × posinfo -- missing locations missing-lo...