text
stringlengths
4
690k
{-# OPTIONS --without-K --rewriting #-} module lib.groupoids.Groupoids where open import lib.groupoids.FundamentalPreGroupoid public
module Luau.Syntax where open import Agda.Builtin.Equality using (_≡_) open import Agda.Builtin.Bool using (Bool; true; false) open import Agda.Builtin.Float using (Float) open import Agda.Builtin.String using (String) open import Luau.Var using (Var) open import Luau.Addr using (Addr) open import Luau.Type using (Typ...
------------------------------------------------------------------------------ -- All the common modules ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OP...
module Structure.Category.Monoidal where import Lvl open import Data.Tuple as Tuple using (_,_ ; _⨯_) open import Data.Tuple.Category open import Data.Tuple.Equivalence import Functional as Fn open import Logic.Predicate open import Structure.Setoid open import Structure.Category open import Structure.Catego...
{-# OPTIONS --universe-polymorphism #-} module Categories.Adjunction where open import Level open import Relation.Binary using (Rel; IsEquivalence) open import Data.Sum open import Data.Product open import Function using (flip) open import Categories.Category open import Categories.Functor hiding (equiv; assoc; iden...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids open import Rings.Definition open import Rings.Lemmas open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition open import Groups.Definiti...
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import LogicalFormulae open import Functions.Definition open import Numbers.Naturals.Definition open import Numbers.Naturals.Order open import Sets.FinSet.Definition open import Sets.FinSet.Lemmas open im...
module SystemF.BigStep.Extrinsic.Semantics where open import Prelude hiding (⊥; id) open import Function as Fun using () open import Data.List hiding ([_]; monad) open import Data.List.Properties as ListProp using () open import Data.Fin.Substitution open import Extensions.List open import SystemF.BigStep.Types open ...
{-# OPTIONS --allow-unsolved-metas #-} open import Level open import Ordinals module ODUtil {n : Level } (O : Ordinals {n} ) where open import zf open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) open import Relation.Binary.PropositionalEquality hiding ( [_] ) open import Data.Na...
{-# OPTIONS --sized-types #-} module SNat.Order.Properties where open import Data.Sum renaming (_⊎_ to _∨_) open import Relation.Binary.PropositionalEquality open import Size open import SNat open import SNat.Order tot≤ : {ι ι' : Size} → (m : SNat {ι}) → (n : SNat {ι'}) → m ≤ n ∨ n ≤ m tot≤ zero n = inj₁ (z≤n n) tot≤...
------------------------------------------------------------------------ -- Modules that can (perhaps) not be type-checked in safe mode, and -- do not use --sized-types ------------------------------------------------------------------------ {-# OPTIONS --without-K #-} module README.Unsafe where -- Strings. import ...
-- Issue #1842, __IMPOSSIBLE__ showed up in debug output {-# OPTIONS -v interaction.case:65 #-} -- KEEP data Bool : Set where true false : Bool test : Bool → Bool test x = {!x!} -- C-c C-c -- Splitting here with debug output turned on -- should not crash.
{-# OPTIONS --safe #-} module Cubical.Algebra.CommMonoid.CommMonoidProd where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Algebra.CommMonoid.Base open CommMonoidStr private variable ℓ ℓ' : Level CommMonoidProd : CommMono...
open import Common.Prelude test : List Char → Char test [] = 'a' test ('a' ∷ []) = 'b' -- test (c ∷ cs) = c
{-# OPTIONS --rewriting --allow-unsolved-metas #-} open import Agda.Builtin.Equality using (_≡_) open import Agda.Builtin.Equality.Rewrite postulate cast : (A B : Set) → A → B cast-rew : (A : Set) (x : A) → cast A A x ≡ x {-# REWRITE cast-rew #-} postulate A : Set x y : A data D (B : A → Set) (b : B y) : Se...
module ShowNat where open import IO open import Data.Unit open import Data.Nat.Show main = run (putStrLn (Data.Nat.Show.show 10))
module nat where open import product open import bool open import maybe open import eq ---------------------------------------------------------------------- -- datatypes ---------------------------------------------------------------------- data ℕ : Set where zero : ℕ suc : ℕ → ℕ nat = ℕ ---------------------...
module ctxt where open import cedille-types open import ctxt-types public open import subst open import general-util open import syntax-util open import type-util open import free-vars new-sym-info-trie : trie sym-info new-sym-info-trie = trie-insert empty-trie compileFail-qual ((term-decl compileFailType) , "missing...
module nat-division-wf where open import bool open import bool-thms open import eq open import neq open import nat open import nat-thms open import product open import product-thms open import sum open import termination ---------------------------------------------------------------------- -- syntax ----------------...
------------------------------------------------------------------------------ -- Agda-Prop Library. -- Useful views. ------------------------------------------------------------------------------ open import Data.Nat using (ℕ) module Data.PropFormula.Views (n : ℕ) where ---------------------------------------------...
open import Agda.Builtin.Nat f : Nat → Nat f 0 = zero f 0 = 0 -- All -- But Only f (suc n) = n -- These f 0 = 0 -- Lines -- These Two -- Used to be highlighted -- Should be! g : Nat → Nat g 0 = zero g 0 -- The highlihting should still = 0 ...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NType2 open import lib.types.Empty open import lib.types.Group open import lib.types.Int open import lib.types.List open import lib.types.Nat open import lib.types.Pi open import lib.types.SetQuotient open import lib.types.Sigma open import...
open import Agda.Builtin.IO open import Agda.Builtin.Reflection open import Agda.Builtin.String open import Agda.Builtin.Unit _>>=_ : {A B : Set} → TC A → (A → TC B) → TC B _>>=_ = λ x f → bindTC x f postulate putStr : String → IO ⊤ {-# FOREIGN GHC import qualified Data.Text.IO #-} {-# COMPILE GHC putStr = Data.Te...
{- trying (and failing) to create a univesal "successor" -} -- types with and without payloads defined dependently, those w/o payloads in terms of those with (using ⊤ as a trivial payload) -- this complicates the successor constructor, `!`, so we use use pattern (OR function?), `¡` module Oscar.Data3 where record ⊤ : ...
module SimpleTT where data 𝟘 : Set where absurd : ∀ {ℓ} {A : Set ℓ} → 𝟘 → A absurd () data _⁺ (A : Set) : Set where Z : A ⁺ S : A → A ⁺ record Signature : Set₁ where field ty-op : Set tm-op : Set ty-ty-arg : ty-op → Set -- ty-tm-arg : ty-op → Set -- tm-ty-arg ...
-- Copyright: (c) 2016 Ertugrul Söylemez -- License: BSD3 -- Maintainer: Ertugrul Söylemez <esz@posteo.de> module Algebra.Category.Category where open import Algebra.Category.Semigroupoid open import Core -- A category is a semigroupoid with an identity morphism on every -- object. record Category {c h r} : Se...
{-# OPTIONS --safe #-} {- Properties of nullary relations, i.e. structures on types. Includes several results from [Notions of Anonymous Existence in Martin-Löf Type Theory](https://lmcs.episciences.org/3217) by Altenkirch, Coquand, Escardo, Kraus. -} module Cubical.Relation.Nullary.Properties where open import Cub...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Properties.Setoids where open import Categories.Category.Instance.Properties.Setoids.Complete using (Setoids-Complete) public open import Categories.Category.Instance.Properties.Setoids.Cocomplete using (Setoids-Cocomplete) public open i...
open import Relation.Binary.PropositionalEquality using ( refl ) open import Web.Semantic.DL.ABox.Interp using ( _*_ ; ⌊_⌋ ; ind ) open import Web.Semantic.DL.ABox.Interp.Morphism using ( _,_ ) open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ; on-bnode ; bnodes ; ⊨a-resp-≲ ; ⊨a-resp-≡³ ; _,_ ) open import Web.Sem...
module Esterel.Variable.Shared where open import Data.Nat using (ℕ) renaming (_≟_ to _≟ℕ_) open import Function using (_∘_) open import Relation.Nullary using (Dec ; yes ; no ; ¬_) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality using (_≡_ ; refl ; cong ; trans...
open import Relation.Binary using (IsDecEquivalence) open import Agda.Builtin.Equality module UnifyMguL (A : Set) ⦃ isDecEquivalenceA : IsDecEquivalence (_≡_ {A = A}) ⦄ where open import UnifyTermL A open import Data.Product using (∃; _,_) open import Data.Maybe using (Maybe; just; nothing) open import Category.Mona...
module Proof.Setup where import LF import IIRD import IIRDr import DefinitionalEquality import Identity open LF open IIRD open IIRDr open DefinitionalEquality open Identity -- Given a code for a general IIRD we should give a code for a restricted IIRD. ε : {I : Set}{D : I -> Set1} -> OPg I D -> OPr I D ε {I}{D} (ι ...
-- I decided that I wanted my Eq development to be separate from my HT one, -- which means that I prove Kleene is reflexive through logical equivalence -- being reflexive module Eq.KleeneTheoryEarly where open import Prelude open import T open import DynTheory open import Eq.Defs -- Theory about Kleene equality kle...
open import Functional hiding (Domain) import Structure.Logic.Classical.NaturalDeduction import Structure.Logic.Classical.SetTheory.ZFC module Structure.Logic.Classical.SetTheory.ZFC.FunctionSet {ℓₗ} {Formula} {ℓₘₗ} {Proof} {ℓₒ} {Domain} ⦃ classicLogic : _ ⦄ (_∈_ : Domain → Domain → Formula) ⦃ signature : _ ...
import AssocFree.STLambdaC.Typ import AssocFree.STLambdaC.Exp module AssocFree.STLambdaC.NF (TConst : Set) (Const : AssocFree.STLambdaC.Typ.Typ TConst → Set) where open module Typ = AssocFree.STLambdaC.Typ TConst using ( Typ ; Ctxt ; const ; _⇝_ ; [_] ; [] ; _∷_ ; _++_ ; case ; singleton ; _≪_ ) open module ...
{-# OPTIONS --warning=error #-} module Issue278 where open import Agda.Builtin.Equality abstract module A where Foo : Set₁ Foo = Set module B where open A Foo≡Set : Foo ≡ Set Foo≡Set = refl
{-# OPTIONS --rewriting --confluence-check #-} open import Agda.Builtin.Nat using (Nat; zero; suc) open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite variable k l m n : Nat postulate max : Nat → Nat → Nat max-0l : max 0 n ≡ n max-0r : max m 0 ≡ m max-diag : max m m ≡ m max-ss : m...
module Text.Greek.SBLGNT where open import Data.List open import Text.Greek.Bible open import Text.Greek.SBLGNT.Matt open import Text.Greek.SBLGNT.Mark open import Text.Greek.SBLGNT.Luke open import Text.Greek.SBLGNT.John open import Text.Greek.SBLGNT.Acts open import Text.Greek.SBLGNT.Rom open import Text.Greek.SBLGN...
{-# OPTIONS --with-K #-} open import Axiom.UniquenessOfIdentityProofs.WithK using (uip) open import Relation.Binary.PropositionalEquality hiding (Extensionality) open ≡-Reasoning open import Level using (Level) open import Data.Nat using (ℕ) open import Data.Vec using (Vec) open import FLA.Axiom.Extensionality.Pro...
open import Relation.Binary open import Relation.Binary.PropositionalEquality module Category.Monad.Monotone.Identity {i}(pre : Preorder i i i) where open Preorder pre renaming (Carrier to I; _∼_ to _≤_; refl to ≤-refl) open import Relation.Unary.PredicateTransformer using (Pt) open import Category.Monad.Monotone pr...
-- A variant of LostTypeError. module LostTypeError2 where postulate Wrap : (A : Set) → (A → Set) → A → Set wrap : (A : Set) (P : A → Set) (x : A) → P x → Wrap A P x rewrap : (A : Set) (P : A → Set) (x : A) → Wrap A P x → Wrap A P x postulate A : Set data Box : Set where box : A → Box data Dummy : Set w...
module InstanceMetaType where ⟨⟩ : {A : Set} {{a : A}} → A ⟨⟩ {{a}} = a postulate A : Set instance a : A f : (a : A) → Set test₁ : Set test₁ = f ⟨⟩ postulate B : Set b : B g : (b : B) → Set instance b' : _ b' = b test₂ : Set test₂ = g ⟨⟩
{-# OPTIONS --safe --without-K #-} open import Algebra.Bundles using (Group) module Categories.Category.Construction.GroupAsCategory o {c ℓ} (G : Group c ℓ) where open import Level open import Categories.Category.Groupoid open Group G -- A group is a groupoid with a single object open import Categories.Category.Co...
open import Agda.Builtin.IO open import Agda.Builtin.String open import Agda.Builtin.Unit postulate putStr : String → IO ⊤ {-# FOREIGN GHC import qualified Data.Text.IO #-} {-# COMPILE GHC putStr = Data.Text.IO.putStr #-} {-# COMPILE JS putStr = function (x) { return function(cb) { process.stdout....
-- Andreas, 2015-08-27, issue reported by Jesper Cockx -- {-# OPTIONS -v tc.lhs:10 #-} -- {-# OPTIONS -v tc:10 #-} -- {-# OPTIONS -v tc.lhs.imp:100 #-} data Bool : Set where true false : Bool T : Set → Bool → Set T A true = {x : A} → A T A false = (x : A) → A test : (A : Set) (b : Bool) → T A b test A true {x} = x ...
module _ where postulate A : Set data Box : Set where box : A → Box unbox : Box → A unbox (box {x}) = x
module rename where open import cedille-types open import constants open import ctxt-types open import free-vars open import syntax-util open import general-util renamectxt : Set renamectxt = stringset × trie string {- the trie maps vars to their renamed versions, and the s...
------------------------------------------------------------------------ -- Rice's theorem ------------------------------------------------------------------------ open import Equality.Propositional open import Prelude hiding (const; Decidable) -- To simplify the development, let's work with actual natural numbers --...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some Vec-related properties ------------------------------------------------------------------------ module Data.Vec.Properties where open import Algebra open import Category.Applicative.Indexed open import Cat...
module Numeral.Finite.Relation.Order where import Lvl open import Data open import Data.Boolean.Stmt open import Functional open import Numeral.Finite open import Numeral.Finite.Oper.Comparisons open import Numeral.Natural open import Type private variable an bn cn n : ℕ private variable a : 𝕟(an) private varia...
-- This file just tests that the options --no-save-metas and -- --save-metas are parsed correctly. {-# OPTIONS --no-save-metas --save-metas #-}
module Type.Category.IntensionalFunctionsCategory.LvlUpFunctor where import Lvl open import Relator.Equals open import Relator.Equals.Proofs.Equiv open import Structure.Category open import Structure.Category.Functor open import Type open import Type.Category.IntensionalFunctionsCategory private variable ℓ₁ ℓ₂ : Lvl....
------------------------------------------------------------------------ -- Some results related to expansion for the delay monad ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude module Expansion.Delay-monad {a} {A : Type a} where open import...
module Data.Proofs where import Lvl open import Data open import Logic open import Logic.Propositional open import Structure.Setoid renaming (_≡_ to _≡ₛ_) open import Structure.Function open import Structure.Function.Domain open import Structure.Function.Domain.Proofs open import Structure.Relator.Equivalence ope...
{- 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.ImplShared.Consensus.T...
{-# OPTIONS --without-K #-} module README where -- This is a self-contained repository of basic results and utilities for -- Homotopy Type Theory. -- -- Modules are structured in a hierarchy, where all top-level modules are -- imported in this file, and each module only imports and re-exports all -- sub-modules. The m...
{-# OPTIONS --cubical --guarded -W ignore #-} module combinations-of-lift-and-multiset where open import Clocked.Primitives open import Cubical.Foundations.Everything open import Cubical.Data.List as List open import Cubical.Data.List.Properties open import Cubical.Data.Sum using (_⊎_; inl; inr) open import combinatio...
{-# OPTIONS --without-K --safe #-} open import Relation.Binary.Core module Magma.Definitions {a ℓ} {A : Set a} -- The underlying set (_≈_ : Rel A ℓ) -- The underlying equality where open import Algebra.Core open import Data.Product Alternativeˡ : Op₂ A → Set _ Alternativeˡ _∙_ = ∀ x y → ((x ∙ x) ∙ y) ...
module Luau.Type.FromJSON where open import Luau.Type using (Type; nil; _⇒_; _∪_; _∩_; any; number) open import Agda.Builtin.List using (List; _∷_; []) open import FFI.Data.Aeson using (Value; Array; Object; object; array; string; fromString; lookup) open import FFI.Data.Bool using (true; false) open import FFI.Data...
-- Andreas, 2015-05-06 issue reported by Jesper Cockx {-# OPTIONS --copatterns #-} record Foo (A : Set) : Set where field foo : A open Foo {{...}} public record ⊤ : Set where instance Foo⊤ : Foo ⊤ foo Foo⊤ = {!!} -- foo {{Foo⊤}} = {!!} -- Error WAS: -- An internal error has occurred. Please report thi...
{-# OPTIONS --safe #-} module Cubical.Data.Vec.DepVec where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism import Cubical.Data.Empty as ⊥ open import Cubical.Data.Unit open import Cubical.Data.Nat open import Cubical.Data.Sigma open import Cub...
{-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.record.eta:20 -v tc.eta:100 -v tc.constr:50 #-} -- Andreas, 2013-05-15 reported by nomeata module Issue846 where open import Issue846.Imports opt-is-opt2 : ∀ n s → n mod 7 ≡ 1' → winner n s opt ≡ false opt-is-opt2 0 s () opt-is-opt2 (suc n) s eq = let (...
module DecidableOrder where open import Logic.Relations open import Logic.Identity using (_≡_) open module Antisym = PolyEq _≡_ using (Antisymmetric) record DecidableOrder (A : Set) : Set1 where field _≤_ : Rel A refl : Reflexive _≤_ antisym : Antisymmetric _≤_ trans : Transitive _≤_ t...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties, related to products, that rely on the K rule ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Data.Product.Properties.WithK where open...
-- Andreas, 2022-06-14, issue #5953 reported by Szumi Xi -- Cubical Agda switches dot-pattern termination off (#4606). -- However, this breaks also some benign cases. -- -- In this example with inductive-inductive types, -- dotted variables should still be recognized -- as variable patterns for termination certificatio...
open import Nat open import Prelude open import dynamics-core open import contexts module htype-decidable where arr-lemma : ∀{t1 t2 t3 t4} → t1 ==> t2 == t3 ==> t4 → t1 == t3 × t2 == t4 arr-lemma refl = refl , refl sum-lemma : ∀{t1 t2 t3 t4} → t1 ⊕ t2 == t3 ⊕ t4 → t1 == t3 × t2 == t4 sum-lemma refl = refl , r...
module Sets.PredicateSet.Filter {ℓₒ} {ℓₒₗ} where import Lvl open import Functional open import Logic.Propositional -- open import Sets.PredicateSet open import Type{ℓₒ Lvl.⊔ ℓₒₗ} -- An element in Filter(T) is in the subset of T. -- Something of type Filter(T) is of a restricted part of T. -- Note: The level of S...
------------------------------------------------------------------------ -- "Equational" reasoning combinator setup ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Labelled-transition-system module Bisimilarity.Weak.Alternative.Equational-reasoning-i...
module monad where open import eq open import functor open import functions record Triple (T : Set → Set) : Set₁ where constructor MkTriple field η : ∀{A : Set} → A → T A μ : ∀{A : Set} → T (T A) → T A η-inv : ∀{A : Set} → T A → A -- triple-func : Functor T -- triple-assoc : ∀{A : Set} → μ {...
open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ; trans ; cong ) open import AssocFree.DList using ( List ) open import AssocFree.DNat using ( ℕ ) module AssocFree.STLambdaC.Typ (TConst : Set) where infixr 2 _⇝_ data Typ : Set where const : TConst → Typ _⇝_ : Typ → Typ → Typ Var : Se...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some derivable properties ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Algebra module Algebra.Properties.Semilattice {l₁ l₂} (L : Semi...
module lambdasyntax where open import Data.Nat using (ℕ) open import Data.Bool using (Bool; true; false) open import Data.Vec using (Vec; []; lookup) open import Relation.Nullary open import Data.Empty hiding (⊥) open import Relation.Binary.PropositionalEquality data Label : Set where ⊤ ⊥ ✭ : Label data GType : ...
module examplesPaperJFP.StackBisim where open import Data.Product open import Function open import Data.Nat.Base as N open import Data.Vec as Vec using (Vec; []; _∷_; head; tail) open import Relation.Binary.PropositionalEquality open import examplesPaperJFP.StatefulObject module _ {S : Set} {M : S → Set} {R : (s :...
module STLC.Semantics where -- This file contains the definitional interpreter for STLC described -- in Section 2 of the paper. open import Data.Nat open import Data.Integer open import Data.List open import Data.List.Membership.Propositional open import Data.List.Relation.Unary.All as All open import Data.Maybe.Base...
{-# OPTIONS --without-K --safe #-} open import Categories.Adjoint open import Categories.Category open import Categories.Functor renaming (id to idF) -- The crude monadicity theorem. This proof is based off of the version -- provided in "Sheaves In Geometry and Logic" by Maclane and Moerdijk. module Categories.Adjoin...
open import Categories open import Monads module Monads.Kleisli {a b}{C : Cat {a}{b}}(M : Monad C) where open import Library open Cat C open Monad M Kl : Cat Kl = record{ Obj = Obj; Hom = λ X Y → Hom X (T Y); iden = η; comp = λ f g → comp (bind f) g; idl = λ{X}{Y}{f} → proof comp (bind η) f ...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Construction.SetoidDiscrete where open import Data.Unit using (⊤; tt) open import Function using (flip) open import Level using (Lift; lift) open import Relation.Binary using (Setoid; IsEquivalence) open import Categories.Category.Core using (Category) ope...
-- Reported by nils.anders.danielsson, Feb 7 2014 -- The code below is accepted by Agda 2.3.2.2. module Issue1048 where module M (_ : Set) where data D : Set where c₁ : D c₂ : D → D postulate A : Set open M A postulate ♭ : D → D ♯ : D → D data S : D → Set where s : (d : D) → S (♭ d) → S (c₂ d) p...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Nat.Coprime where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Data.Sigma open import Cubical.Data.NatPlusOne open import Cubical.HITs.PropositionalTruncation as PropTrunc open import Cubic...
{-# OPTIONS --cubical #-} module Issue4606 where open import Agda.Builtin.Cubical.Path open import Agda.Primitive.Cubical -- Test case from Andrew Pitts. ---------------------------------------------------------------------- -- Well-Founded Recursion ------------------------------------------------------------------...
module Type.Lemmas where open import Context open import Type.Core open import Function open import Data.Unit.Base open import Relation.Binary.PropositionalEquality foldlᶜ-▻-ε : ∀ {α} {A : Set α} -> (Θ : Con A) -> foldlᶜ _▻_ ε Θ ≡ Θ foldlᶜ-▻-ε ε = refl foldlᶜ-▻-ε (Γ ▻ σ) = cong (_▻ σ) (foldlᶜ-▻-ε Γ) -- Same a...
module FunctionProofs where open FunctionSet ⦃ signature ⦄ [∃]-unrelatedᵣ-[→]ᵣ-inside-[∀ₛ] : ∀{D : Domain}{P : BinaryRelator} → Proof(∀ₗ(x ↦ ∃ₗ(y ↦ (x ∈ D) ⟶ P(x)(y))) ⟷ ∀ₛ(D)(x ↦ ∃ₗ(y ↦ P(x)(y)))) [∃]-unrelatedᵣ-[→]ᵣ-inside-[∀ₛ] {D}{P} = [↔]-with-[∀] ([∃]-unrelatedᵣ-[→]) [∀ₛ∃!]-to[∀ₛ∃] : ∀{P : BinaryRelator}{D : Dom...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Dependently typed changes (Def 3.4 and 3.5, Fig. 4b and 4e) ------------------------------------------------------------------------ import Parametric.Syntax.Type as Type import Parametric.Denotation.Value as Value...
------------------------------------------------------------------------ -- Various constants ------------------------------------------------------------------------ open import Atom module Constants (atoms : χ-atoms) where open χ-atoms atoms c-zero : Const c-zero = C.name 0 c-suc : Const c-suc = C.name 1 c-nil ...
open import Function using () renaming ( _∘′_ to _∘_ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ; cong ; cong₂ ; subst ) open import AssocFree.Util using ( subst-natural ) import AssocFree.STLambdaC.Typ open Relation.Binary.PropositionalEquality.≡-Reasoning using ( begin_ ; _≡⟨_⟩...
{-# OPTIONS --without-K --safe #-} open import Level using (Level) open import Relation.Binary.PropositionalEquality open ≡-Reasoning open import Data.Nat using (ℕ) open import Data.Vec using (Vec; foldr; zipWith; map) open import FLA.Algebra.Structures open import FLA.Algebra.Properties.Field module FLA.Algebra.L...
{-# OPTIONS --safe --without-K #-} module Generics.HasDesc where open import Data.String.Base open import Generics.Prelude hiding (lookup ; pi) open import Generics.Telescope open import Generics.Desc import Generics.Accessibility as Accessibility private variable P : Telescope ⊤ I : ExTele P pi :...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some properties about subsets ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Fin.Subset.Properties where open import Algebra import Alge...
module Haskell.Prim.Functor where open import Haskell.Prim open import Haskell.Prim.Either open import Haskell.Prim.List open import Haskell.Prim.Maybe open import Haskell.Prim.Tuple -------------------------------------------------- -- Functor record Functor (f : Set → Set) : Set₁ where field fmap : (a → b) ...
{-# OPTIONS --without-K #-} open import lib.Base module test.succeed.Test0 where module _ where private data #I : Type₀ where #zero : #I #one : #I I : Type₀ I = #I zero : I zero = #zero one : I one = #one postulate seg : zero == one I-elim : ∀ {i} {P : I → Type i} (zero* :...
{-# OPTIONS --rewriting #-} data FALSE : Set where CONTRADICTION : ∀ {A : Set} → FALSE → A CONTRADICTION () record TRUE : Set where {-# BUILTIN UNIT TRUE #-} data Bool : Set where false true : Bool {-# BUILTIN BOOL Bool #-} {-# BUILTIN TRUE true #-} {-# BUILTIN FALSE false #-} data Nat : Set where zero : N...
{-# OPTIONS --safe --without-K #-} module Categories.Examples.Functor.Sets where import Data.List as List import Data.List.Properties open import Data.Nat using (ℕ) import Data.Product as Product import Data.Vec as Vec import Data.Vec.Properties open import Function using (id; λ-; _$-) open import Relation.Binary.Prop...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties {{eqrel : EqRelSet}} where open import Definition.LogicalRelation.Properties.Reflexivity public open import Definition.LogicalRelation.Properties.Symmetry public open import Definition.LogicalRelation.P...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.Theory module cohomology.Unit {i} (CT : CohomologyTheory i) where open CohomologyTheory CT private ⊙LU = ⊙Lift {j = i} ⊙Unit G : fst (⊙CEl O (⊙Cof (⊙idf _)) ⊙→ ⊙CEl O ⊙LU) G = CF O (⊙cfcod (⊙idf _)) Cof-Un...
{- This file contains a proof of the fact that the Brunerie number, i.e. absolute value of the Hopf invariant of [e , e] : π₃S², is 2. Here, e is the generator of π₂S² and [_,_] denotes the Whitehead product. The proof follows Proposition 5.4.4. in Brunerie (2016) closely, but, for simplicity, considers only the case n...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pointwise equality over lists parameterised by a setoid ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Setoid) mo...
{-# OPTIONS --without-K --safe #-} {- Useful notation for Epimorphisms, Mononmorphisms, and isomorphisms -} module Categories.Morphism.Notation where open import Level open import Categories.Category.Core open import Categories.Morphism private variable o ℓ e : Level _[_↣_] : (𝒞 : Category o ℓ e) → (A B :...
open import Agda.Builtin.Nat data V : (n : Nat) → Set where cons : (n : Nat) → V (suc n) -- ^ this n is forced -- v and this n is marked shape irrelevant g : ..(n : Nat) → V n → Nat g _ (cons n) = n -- ^ so we can't return n here, since we're really -- returning the shape irrel...
module Numbers where open import Haskell.Prelude open import Agda.Builtin.Nat posNatural : Nat posNatural = 14 posInteger : Integer posInteger = 52 negInteger : Integer negInteger = -1001 natToPos : Nat → Integer natToPos n = fromNat n natToNeg : Nat → Integer natToNeg n = fromNeg n {-# COMPILE AGDA2HS posNatur...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} -- Type classes following Kettelhoit's approach. module Kettelhoit where open import Data.Bool.Base open import Data.Nat hiding ( equal ) renamin...