text
stringlengths
4
690k
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Comonad -- verbatim dual of Categories.Category.Construction.EilenbergMoore module Categories.Category.Construction.CoEilenbergMoore {o ℓ e} {C : Category o ℓ e} (M : Comonad C) where open import Level open import Categories.M...
module CategoryTheory.Linear where open import CategoryTheory.Categories open import CategoryTheory.Functor open import CategoryTheory.BCCCs open import CategoryTheory.Monad open import CategoryTheory.Instances.Kleisli module L {n} {ℂ : Category n} (ℂ-BCCC : BicartesianClosed ℂ) (Mo : Monad ℂ) where open Categor...
-- {-# OPTIONS --cubical -vtc.lhs.split.partial:20 #-} {-# OPTIONS --cubical #-} module _ where open import Agda.Primitive.Cubical open import Agda.Builtin.Equality postulate X : Set P : I → Set p : P i1 module Test (A : Set) (i : I) (B : Set) where j = i R = P j module Z (r s : A) where a0 : I → Par...
{-# OPTIONS --without-K --safe #-} module Experiment.ListRelationProperties where open import Level open import Data.Bool hiding (_≤_; _≤?_; _<_) open import Data.Empty using (⊥; ⊥-elim) open import Data.List import Data.List.Properties as Listₚ import Data.Nat as ℕ import Data.Nat.Properties as ℕₚ open import ...
module ExtractFunction where open import Data.List open import ParseTree open import Data.Nat open import Data.String hiding (_++_) open import ScopeState using (ScopeState ; ScopeEnv ; replaceID ; liftIO ; getUniqueIdentifier) open import ScopeParseTree open import AgdaHelperFunctions open import Typing open import Da...
-- Andreas, James, 2011-11-24 -- trigger error message 'NeedOptionCopatterns' module NeedOptionCopatterns where record Bla : Set2 where field bla : Set1 open Bla f : Bla bla f = Set -- should request option --copatterns
-- Copyright: (c) 2016 Ertugrul Söylemez -- License: BSD3 -- Maintainer: Ertugrul Söylemez <esz@posteo.de> module Data.Int where open import Algebra.Group open import Classes open import Core open import Data.Int.Core open import Data.Int.Core public using (ℤ; ℤ-Negative; ℤ-Number; negsuc; pos) ℤ,+ : Group ℤ,...
module Luau.Syntax.ToString where open import Agda.Builtin.Float using (primShowFloat) open import Luau.Syntax using (Block; Stat; Expr; VarDec; FunDec; nil; var; var_∈_; addr; _$_; function_is_end; return; local_←_; _∙_; done; block_is_end; _⟨_⟩; _⟨_⟩∈_; number; BinaryOperator; +; -; *; /; binexp) open import FFI.Dat...
module MJ.Examples.DynDispatch where open import Prelude import Data.Vec.All as Vec∀ open import Data.Star open import Data.Bool open import Data.List open import Data.List.Any open import Data.List.Membership.Propositional open import Data.List.All hiding (lookup) open import Data.Product hiding (Σ) open import Relat...
-- Andreas, 2017-09-09 -- Don't allow pattern synonyms where builtin constructor is expected data Bool : Set where true : Bool false : Bool pattern You = false {-# BUILTIN BOOL Bool #-} {-# BUILTIN TRUE true #-} {-# BUILTIN FALSE You #-} -- This should be rejected. -- Expected error: ;-) -- You must be a c...
{-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude import GSeTT.Typed-Syntax import Globular-TT.Syntax {- Disk and Sphere contexts - properties -} module Globular-TT.Disks {l} (index : Set l) (rule : index → GSeTT.Typed-Syntax.Ctx × (Globular-TT.Syntax.Pre-Ty index)) (eqdec-index :...
{-# OPTIONS --cubical --no-import-sorts #-} module NumberSecondAttempt where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) private variable ℓ ℓ' ℓ'' : Level open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Data.Unit.Ba...
------------------------------------------------------------------------ -- The Agda standard library -- -- Consequences of a monomorphism between orders ------------------------------------------------------------------------ -- See Data.Nat.Binary.Properties for examples of how this and similar -- modules can be use...
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Consequences.Reduction where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definition.LogicalRelation open import Definition.LogicalRelation.Propertie...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Groups.Definition open import Groups.Abelian.Definition open import Setoids.Setoids open import Rings.Definition open import Modules.Definition module Modules.DirectSum {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+R_ : A → ...
------------------------------------------------------------------------ -- There is a term without a corresponding syntactic type (given some -- assumptions) ------------------------------------------------------------------------ import Level open import Data.Universe module README.DependentlyTyped.Term-without-typ...
module Scope where {- So this goes through (we don't actually check scope). But what could really go wrong? This actually isn't captured by the main theorem, since we're type checking multiple definitions. Maybe it should be strengthened. Still nothing _bad_ happens here. Could we get some weird circular th...
{-# OPTIONS --without-K --exact-split --rewriting #-} open import Coequalizers.Definition open import lib.Basics open import lib.types.Paths open import Graphs.Definition module Coequalizers.EdgeCoproduct where module CoeqCoprodEquiv {i j k : ULevel} (V : Type i) (E₁ : Type j) (E₂ : Type k) ⦃ gph : Graph (E₁ ⊔ E₂)...
module RMonads where open import Library open import Categories open import Functors record RMonad {a b c d}{C : Cat {a}{b}}{D : Cat {c}{d}}(J : Fun C D) : Set (a ⊔ b ⊔ c ⊔ d) where constructor rmonad open Cat open Fun field T : Obj C → Obj D η : ∀{X} → Hom D (OMap J X) (T X) bind :...
{-# OPTIONS --safe --without-K #-} module Data.Fin.Subset.Properties.Dec where open import Data.Nat as ℕ open import Data.Fin as Fin open import Data.Empty using (⊥-elim) open import Data.Fin.Subset open import Data.Fin.Subset.Dec open import Data.Fin.Subset.Properties using (⊆⊤; p⊆p∪q; q⊆p∪q ; p∩q⊆p ; p∩q⊆q ; ⊆-pose...
{-# OPTIONS --safe --without-K #-} module Generics.Prelude where open import Function.Base public open import Data.Product public hiding (map; uncurry; uncurry′; curry′) open import Level public using (Setω; Level; _⊔_; Lift; lift) renaming (zero to lzero; suc ...
open import Prelude open import Nat open import dynamics-core module binders-disjoint-checks where -- these are fairly mechanical lemmas that show that the -- judgementally-defined binders-disjoint is really a type-directed -- function -- numbers lem-bdσ-num : ∀{σ n} → binders-disjoint-σ σ (N n) lem-bdσ-...
{- This file proves a variety of basic results about paths: - refl, sym, cong and composition of paths. This is used to set up equational reasoning. - Transport, subst and functional extensionality - J and its computation rule (up to a path) - Σ-types and contractibility of singletons - Converting PathP to and ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Structures.Group where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Structure open import Cu...
-- Hilbert-style formalisation of closed syntax. -- Nested terms. module OldBasicILP.UntypedSyntax.ClosedHilbert where open import OldBasicILP.UntypedSyntax.Common public -- Closed, untyped representations. data Rep : Set where APP : Rep → Rep → Rep CI : Rep CK : Rep CS : Rep BOX : Rep → Rep...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pairs of lists that share no common elements (setoid equality) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Dat...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids open import Setoids.Subset open import Setoids.Functions.Definition open import Sets.EquivalenceRelations module Setoids.Functions.Lemmas {a b c d : _} ...
------------------------------------------------------------------------------ -- FOT (First-Order Theories) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-...
open import Type module Graph.Walk.Proofs {ℓ₁ ℓ₂} {V : Type{ℓ₁}} where open import Lang.Instance open import Logic import Lvl open import Graph{ℓ₁}{ℓ₂}(V) open import Graph.Walk{ℓ₁}{ℓ₂}{V} open import Relator.Equals.Proofs.Equiv import Structure.Relator.Names as Names open import Structure.Relator.Propertie...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Fundamental.Variable {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Properties ...
------------------------------------------------------------------------ -- Unambiguity ------------------------------------------------------------------------ module TotalParserCombinators.Unambiguity where open import Data.Product open import Function using (_$_) open import Function.Equivalence open import Relati...
module Data.Num.Standard where -- Standard positional notations open import Data.Nat open ≤-Reasoning renaming (begin_ to start_; _∎ to _□) -- using (≰⇒>; +-∸-assoc; ∸-mono) open import Data.Nat.Properties open import Data.Fin using (Fin) renaming (zero to Fzero; suc to Fsuc; toℕ to F→N; fromℕ≤ to N→F) open i...
open import Prelude open import Nat open import dynamics-core open import contexts open import lemmas-disjointness module lemmas-freshness where -- if x is fresh in an hexp, it's fresh in its expansion mutual fresh-elab-synth1 : ∀{x e τ d Γ Δ} → x # Γ → freshh ...
module SN where open import Relation.Unary using (_∈_; _⊆_) open import Library open import Terms open import Substitution open import TermShape public -- Inductive definition of strong normalization. infix 7 _⟨_⟩⇒_ _⇒ˢ_ mutual -- Strongly normalizing evaluation contexts SNhole : ∀ {i : Size} {Γ : Cxt} {a b ...
-- This module is used to illustrate how to import a parameterised module. module examples.syntax.ModuleB (A : Set) ((==) : A -> A -> Prop) (refl : (x : A) -> x == x) where infix 5 /\ module SubModule where postulate dummy : A data True : Prop where tt : True data False : Prop where data ...
module NatEquality where open import Definitions _≟_ : (m n : ℕ) → Equal? m n _≟_ = {!!} equality-disjoint : (m n : ℕ) → m ≡ n → m ≢ n → ⊥ equality-disjoint = {!!}
------------------------------------------------------------------------ -- This module proves that the parser combinators correspond exactly -- to functions of type List Tok → List R (if bag equality is used for -- the lists of results) ------------------------------------------------------------------------ module T...
module Everything where import Records import Basics import Modules import With import Families import Datatypes import Bool import Naturals
------------------------------------------------------------------------ -- Definitional interpreters can model systems with bounded space ------------------------------------------------------------------------ -- In "Reasoning on Divergent Computations with Coaxioms" Ancona, -- Dagnino and Zucca write the following:...
open import Coinduction using ( ♯_ ; ♭ ) open import Data.Strict using ( Strict ; ! ) open import Data.Natural using ( Natural ; # ; _+_ ) open import Data.Bool using ( Bool ; true ; false ) open import System.IO.Transducers.Session using ( I ; Σ ; ⟨_⟩ ; * ; _&*_ ; ¿ ) open import System.IO.Transducers.Lazy using ( _⇒...
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category) open import Categories.Category.Monoidal using (Monoidal) module Categories.Category.Monoidal.Reasoning {o ℓ e} {C : Category o ℓ e} (M : Monoidal C) where open import Data.Product using (_,_) open import Categories.Functor renaming...
-- Export only the experiments that are expected to compile (without -- any holes) {-# OPTIONS --cubical #-} module Cubical.Experiments.Everything where open import Cubical.Experiments.Brunerie public open import Cubical.Experiments.Generic public open import Cubical.Experiments.Problem open import Cubical.Experiments...
-- Andreas, 2017-09-16, issue #2759 -- Allow empty declaration blocks in the parser. open import Agda.Builtin.Nat x0 = zero mutual x1 = suc x0 abstract x2 = suc x1 private x3 = suc x2 instance x4 = suc x3 macro x5 = suc x4 postulate x6 = suc x5 -- Expected: 6 warnings about empty blocks mutual postulate -- Empty...
module plfa-code.Reasoning-legacy where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; trans) infixr 2 _≡⟨_⟩_ infix 3 _∎ _≡⟨_⟩_ : ∀ {A : Set} (x : A) {y z : A} → x ≡ y → y ≡ z ------- → x ≡ z x ≡⟨ x≡y ⟩ y≡z = trans x≡y y≡z _∎ : ∀ {A : Set} (x : A) ------ → x ≡ x x ∎ ...
module Oscar.Property.Symmetry where open import Oscar.Level record Symmetry {𝔬} {⋆ : Set 𝔬} {𝔮} (_≒_ : ⋆ → ⋆ → Set 𝔮) : Set (𝔬 ⊔ 𝔮) where field symmetry : ∀ {x y} → x ≒ y → y ≒ x open Symmetry ⦃ … ⦄ public
-- Reported by Christian Sattler on 2019-12-7 postulate A B : Set barb : Set barb = (A → (_ : B) → _) _ -- WAS: unsolved constraints. -- SHOULD: throw an error that A → ... is not a function.
{-# OPTIONS --type-in-type #-} data IBool : Set where itrue ifalse : IBool Bool : Set; Bool = (B : Set) → B → B → B toIBool : Bool → IBool toIBool b = b _ itrue ifalse true : Bool; true = λ B t f → t and : Bool → Bool → Bool; and = λ a b B t f → a B (b B t f) f Nat : Set; Nat = (n : Set) → (n → n) → n → n ...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Proofs where open import Data.Binary.Proofs.Multiplication using (*-homo) open import Data.Binary.Proofs.Addition using (+-homo) open import Data.Binary.Proofs.Unary using (inc-homo) open import Data.Binary.Proofs.Bijection using (𝔹↔ℕ)
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Functions open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Semiring open import Sets.FinSet open import Groups.Groups open import Groups.Definition open import S...
open import SOAS.Common import SOAS.Families.Core -- Families with syntactic structure module SOAS.Metatheory.MetaAlgebra {T : Set} (open SOAS.Families.Core {T}) (⅀F : Functor 𝔽amiliesₛ 𝔽amiliesₛ) (𝔛 : Familyₛ) where open import SOAS.Context {T} open import SOAS.Variable {T} open import SOAS.Construction.St...
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Weakening where open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed import Tools.PropositionalEquality as PE -- Weakening type data _∷_⊆_ : Wk → Con Term → Con Term → Set where id : ∀ ...
module Pi-.Examples where open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Product open import Relation.Binary.Core open import Relation.Binary open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Data.Nat open import Data.Nat.Properties open impor...
-- Agda program using the Iowa Agda library open import bool module PROOF-appendAddLengths (Choice : Set) (choose : Choice → 𝔹) (lchoice : Choice → Choice) (rchoice : Choice → Choice) where open import eq open import nat open import list open import maybe -------------------------------------------------...
{-# OPTIONS --without-K #-} module algebra.group.core where open import level open import algebra.monoid.core open import equality.core open import function.isomorphism open import sum record IsGroup {i} (G : Set i) : Set i where field instance mon : IsMonoid G open IsMonoid mon public field inv : G → G ...
-- Andreas, 2015-09-18, issue reported by Guillaume Brunerie {-# OPTIONS --rewriting #-} data _==_ {A : Set} (a : A) : A → Set where idp : a == a {-# BUILTIN REWRITE _==_ #-} postulate A : Set a b : A r : a == b {-# REWRITE r #-} r = idp -- Should not work, as this behavior is confusing the users. -- Instead...
------------------------------------------------------------------------ -- The Agda standard library -- -- A delimited continuation monad ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Category.Monad.Continuation where open import Category.Applicat...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Semigroup.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import ...
module STLC1.Kovacs.Convertibility where open import STLC1.Kovacs.Substitution public -------------------------------------------------------------------------------- -- Convertibility (_~_ ; ~refl ; _~⁻¹ ; lam ; app ; β ; η) infix 3 _∼_ data _∼_ : ∀ {Γ A} → Γ ⊢ A → Γ ⊢ A → Set where refl∼ : ∀ {Γ A} → {M : Γ...
module Perm where open import Basics open import All open import Splitting data _~_ {X : Set} : List X -> List X -> Set where [] : [] ~ [] _,-_ : forall {x xs ys zs} -> (x ,- []) <[ ys ]> zs -> xs ~ zs -> (x ,- xs) ~ ys permute : {X : Set}{xs ys : List X} -> xs ~ ys -> {P : X -> Set} -> All P xs -> All...
-- Andreas, 2012-09-19 propagate irrelevance info to dot patterns {-# OPTIONS --experimental-irrelevance #-} -- {-# OPTIONS -v tc.lhs:20 #-} module ShapeIrrelevantIndex where data Nat : Set where Z : Nat S : Nat → Nat data Good : ..(_ : Nat) → Set where goo : .(n : Nat) → Good (S n) good : .(n : Nat) → Good n...
module Pi.Examples where open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Product open import Relation.Binary.PropositionalEquality open import Data.Nat open import Data.Vec as V hiding (map) open import Pi.Syntax open import Pi.Opsem open import Pi.Eval pattern 𝔹 = 𝟙 +ᵤ 𝟙 pattern ...
------------------------------------------------------------------------ -- A correct implementation of tree sort ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- The algorithm and the treatment of ordering information is taken -- from Conor McBride's talk...
module Issue734a where module M₁ (Z : Set₁) where postulate P : Set Q : Set → Set module M₂ (X Y : Set) where module M₁′ = M₁ Set open M₁′ p : P p = {!!} -- Previous and current agda2-goal-and-context: -- Y : Set -- X : Set -- --------- -- Goal: P q : Q X q = {!!} -- Previous ...
{-# OPTIONS --prop --rewriting #-} module Examples.Gcd where open import Examples.Gcd.Euclid public open import Examples.Gcd.Clocked public open import Examples.Gcd.Spec public open import Examples.Gcd.Refine public
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.GradedRing.Instances.Polynomials where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Data.Unit open import Cubical.Data.Nat using (ℕ) open impo...
module std-lib where open import IO using (IO; run; putStrLn; _>>_) open import Data.Unit using (⊤) open import Codata.Musical.Notation using (♯_) import Agda.Builtin.IO using (IO) open import Function using (_$_) main1 : Agda.Builtin.IO.IO ⊤ main1 = run (♯ putStrLn "hallo" >> ♯ putStrLn "welt") main2 : Agda.Builtin...
module Sessions.Syntax.Values where open import Prelude hiding (both) open import Relation.Unary open import Data.Maybe open import Data.List.Properties using (++-isMonoid) import Data.List as List open import Sessions.Syntax.Types open import Sessions.Syntax.Expr open import Relation.Ternary.Separation.Morphisms d...
-- Jesper, 2018-10-16: When solving constraints produces a term which -- contains the same unsolved metavariable twice, only the first -- occurrence should be turned into an interaction hole. open import Agda.Builtin.Equality postulate Id : (A : Set) → A → A → Set allq : (∀ m n → Id _ m n) ≡ {!!} allq = refl
------------------------------------------------------------------------ -- The Agda standard library -- -- Products ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Product where open import Function open import Level open import Relation.Nullar...
module New where module _ where open import Agda.Primitive record IsBottom {ℓ-⊥} (⊥ : Set ℓ-⊥) ℓ-elim : Set (lsuc ℓ-elim ⊔ ℓ-⊥) where field ⊥-elim : ⊥ → {A : Set ℓ-elim} → A open IsBottom ⦃ … ⦄ public record Bottom ℓ-⊥ ℓ-elim : Set (lsuc (ℓ-elim ⊔ ℓ-⊥)) where field ⊥ : Set ℓ-⊥ ins...
-- Andreas, 2022-06-10 -- A failed attempt to break Prop ≤ Set. -- See https://github.com/agda/agda/issues/5761#issuecomment-1151336715 {-# OPTIONS --prop --cumulativity #-} data ⊥ : Set where record ⊤ : Set where constructor tt data Fool : Prop where true false : Fool Bool : Set Bool = Fool True : Bool → Se...
{-# OPTIONS --without-K --safe #-} -- | Exclusive option. Exactly one of the options holds at the same time. module Dodo.Nullary.XOpt where -- Stdlib imports open import Level using (Level; _⊔_) open import Data.Empty using (⊥; ⊥-elim) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Product using (_×_;...
module Issue2486.Haskell where {-# FOREIGN GHC data MyList a = Nil | Cons a (MyList a) #-}
------------------------------------------------------------------------------ -- Property <→◁ ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --wi...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Group.EilenbergMacLane.GroupStructure where open import Cubical.Algebra.Group.EilenbergMacLane.Base open import Cubical.Algebra.Group.EilenbergMacLane.WedgeConnectivity open import Cubical.Algebra.Group.Base open import Cubical.Algebra.Gro...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of functions, such as associativity and commutativity ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Level open import Relatio...
module AbsToConDecl where x where data D (A : Set) : Set where c : D A
{-# OPTIONS --copatterns #-} module Tree where data Bool : Set where true false : Bool record Tree (A : Set) : Set where field label : A child : Bool -> Tree A open Tree -- corecursive function defined by copattern matching alternate : {A : Set}(a b : A) -> Tree A -- deep copatterns: label (child (alte...
{-# OPTIONS --copatterns #-} module SizedPolyIO.Base where open import Data.Maybe.Base open import Data.Sum renaming (inj₁ to left; inj₂ to right; [_,_]′ to either) open import Function open import Level using (_⊔_) renaming (suc to lsuc) open import Size open import NativePolyIO record IOInterface γ ρ : Set (lsuc...
module Negative2 where data Tree (A : Set) : Set where leaf : Tree A node : (A -> Tree A) -> Tree A data Bad : Set where bad : Tree Bad -> Bad
module Issue312 where record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field proj₁ : A proj₂ : B proj₁ syntax Σ A (λ x → B) = Σ[ x ∶ A ] B _×_ : Set → Set → Set A × B = Σ[ _ ∶ A ] B postulate T : Set → Set → Set equal : ∀ {A} → T A A _and_are_ : (A B : Set) → T A B → Set -- Check t...
module sv20.class-exercise where open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _≤_; s≤s; z≤n) -- Subset definition taken from: https://agda.readthedocs.io/en/v2.6.1/language/irrelevance.html -- Notice that irrelevance is not the same as function dot-pattern: https://agda.readthedocs.io/en/v2.6.1/language/functi...
{-# OPTIONS --without-K --safe #-} module Data.List.Kleene.Properties where open import Data.List.Kleene.Base open import Relation.Binary open import Relation.Unary open import Function module _ {a r} {A : Set a} {R : Rel A r} where infix 4 _≈_ _≈_ = R open import Algebra.FunctionProperties _≈_ foldr-uni...
------------------------------------------------------------------------------ -- Unary naturales numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# O...
module Category.Profunctor.Joker where open import Agda.Primitive using (Level; _⊔_; lsuc) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Category.Functor using (RawFunctor; module RawFunctor) open import Category.Functor.Lawful open import Category.Profunctor open import Category.Choice open import Relation....
------------------------------------------------------------------------ -- The Agda standard library -- -- M-types (the dual of W-types) ------------------------------------------------------------------------ {-# OPTIONS --without-K --guardedness --sized-types #-} module Codata.Musical.M where open import Codata.M...
-- Andreas, 2013-03-15 issue reported by Nisse -- {-# OPTIONS -v tc.proj:40 -v tc.conv.elim:40 #-} -- {-# OPTIONS -v tc.inj.check:45 #-} -- {-# OPTIONS -v tc.proj.like:45 #-} module Issue821 where import Common.Level data D (A : Set) : Set where c : D A → D A -- f is projection like, but could also be injective!...
module Examples where -- The terms of AExp assign a binding time to each subterm. For -- program specialization, we interpret terms with dynamic binding -- time as the programs subject to specialization, and their subterms -- with static binding time as statically known inputs. A partial -- evaluation function (or spe...
open import Numeral.Natural open import Type module Formalization.ClassicalPredicateLogic.Syntax {ℓₚ ℓᵥ ℓₒ} (Prop : ℕ → Type{ℓₚ}) (Var : Type{ℓᵥ}) (Obj : ℕ → Type{ℓₒ}) where open import Data.ListSized import Lvl open import Functional using (_∘_ ; _∘₂_ ; swap) open import Sets.PredicateSet using (PredSet) priva...
-- Andreas, 2018-06-14, issue #2513, do not allow conflicting relevance info. postulate Foo : {A : Set} → ..(@irrelevant A) → A -- Should fail. (Currently: parse error)
{- This second-order signature was created from the following second-order syntax description: syntax Inception | IA type L : 0-ary P : 0-ary A : 0-ary term rec : L P -> A inc : L.A P.A -> A theory (S) p : P a : P.A |> inc (l. rec (l, p[]), x. a[x]) = a[p[]] (E) a : L.A |> k : L |- inc (l. a[...
module Oscar.Data.Equality where open import Agda.Builtin.Equality public using (_≡_; refl) public open import Relation.Binary.PropositionalEquality public using (_≢_) public open import Relation.Binary.PropositionalEquality public using (cong; cong₂; cong-app; subst; subst₂; sym; trans) public open import Oscar.Lev...
module Example where open import Base open import Nat open import univ -- Application _#_ : {A : S}{F : El A -> S}{pF : Map _==_ _=S_ F} -> El (pi A F pF) -> (x : El A) -> El (F x) el < f , pf > # x = f x -- Projection π₀ : {A : S}{F : El A -> S}{pF : Map _==_ _=S_ F} -> El (sigma A F pF) -> El A π₀ (e...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Groups.Definition open import Setoids.Setoids open import Functions.Definition open import Sets.EquivalenceRelations open import Rings.Definition open import Lists.Lists module Rings.Polynomial.Multiplication {a b : _} {A : Set...
module Relation.Binary.Lattice.Residuated where open import Level open import Algebra.FunctionProperties using (Op₂) open import Algebra.Structures using (IsMonoid) open import Algebra using (Monoid) open import Relation.Binary open import Relation.Binary.Core open import Relation.Binary.Lattice using (Lattice; IsLatt...
{- An induction principle for paths in a pushout, described in Kraus and von Raumer, "Path Spaces of Higher Inductive Types in Homotopy Type Theory" https://arxiv.org/abs/1901.06022 -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.Pushout.KrausVonRaumer where open import Cubical.Foundations.Everything open i...
record R₁ : Set₂ where field _≡_ : {A : Set₁} → A → A → Set postulate A B : Set record R₂ (r₁ : R₁) : Set₂ where open R₁ r₁ field cong : (A : Set₁) (x y : A) (F : A → Set) → x ≡ y → F x ≡ F y subst : (P : Set → Set₁) → A ≡ B → P A → P B postulate _≡_ : {A : Set₁} → A → A → Set r₁ : R₁ r₁ .R₁....
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Paths module lib.types.Unit where pattern tt = unit ⊙Unit : Ptd₀ ⊙Unit = ⊙[ Unit , unit ] abstract -- Unit is contractible Unit-is-contr : is-contr Unit Unit-is-contr = (unit , λ y → idp) Unit-is-prop : is-prop Unit Uni...
open import Syntax module Categories.Category.Construction.Renaming {ℓ₁ ℓ₂} (Sg : Signature ℓ₁ ℓ₂) where open import Relation.Binary using (Rel) open import Data.List using (List; []; [_]; _∷_; length; _++_) open import Level using (zero; _⊔_) open import Categories.Category open Signature Sg data ren : Rel Contex...
{-# OPTIONS --without-K #-} module NTypes.Unit where open import Equivalence open import NTypes open import PathStructure.Unit open import Types 1-isProp : isProp ⊤ 1-isProp _ _ = merge-path _ 1-isSet : isSet ⊤ 1-isSet _ _ = prop-eq (sym-equiv split-merge-eq) 1-isProp