text
stringlengths
4
690k
-- Decidability in the context of types means that it is possible to decide whether a type is empty or have inhabitants. -- In the case of it having inhabitants, it is possible to extract a witness of the type. -- Note: When using the types as propositions interpretation of types as a logic system, decidability is equi...
module logic where open import empty public open import eq public open import level public open import negation public open import neq public open import product public open import sum public open import unit public
module EtaBug where record ⊤ : Set where data ⊥ : Set where data Bool : Set where true : Bool false : Bool T : Bool → Set T true = ⊤ T false = ⊥ record ∃ {A : Set} (B : A → Set) : Set where constructor _,_ field proj₁ : A proj₂ : B proj₁ postulate G : Set → Set D : ∀ {A} → G A → A → Set P : ...
------------------------------------------------------------------------ -- Isomorphisms and equalities relating an arbitrary "equality with J" -- to path equality, along with a proof of extensionality for the -- "equality with J" ------------------------------------------------------------------------ {-# OPTIONS --e...
-- We define what it means to satisfy the universal property -- of localisation and show that the localisation in Base satisfies -- it. We will also show that the localisation is uniquely determined -- by the universal property, and give sufficient criteria for -- satisfying the universal property. {-# OPTIONS --cubic...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} import Light.Library.Relation.Decidable as Decidable open import Light.Package using (Package) module Light.Library.Relation.Binary.Decidable where open import Light.Library.Relation.Binary using (Binary) open import Light.Level using (S...
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Instances.QuoQ.Instance where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Foundations.Logic renaming (inl to inlᵖ; i...
{-# OPTIONS --cubical #-} module ExerciseSession2 where open import Part1 open import Part2 open import Part3 open import Part4 -- (* Construct a point if isContr A → Π (x y : A) . isContr (x = y) *) isProp→isSet : isProp A → isSet A isProp→isSet h a b p q j i = hcomp (λ k → λ { (i = i0) → h a a k ...
module #5 where open import Relation.Binary.PropositionalEquality open import Function open import Level ind₌ : ∀{a b}{A : Set a} → (C : (x y : A) → (x ≡ y) → Set b) → ((x : A) → C x x refl) → {x y : A} → (p : x ≡ y) → C x y p ind₌ C c {x}{y} p rewrite p = c y transport : ∀ {i} {A : Set i}{P : A → Set i}{x y : A} → ...
module Parity where data ℕ : Set where zero : ℕ suc : ℕ -> ℕ infixl 60 _+_ infixl 70 _*_ _+_ : ℕ -> ℕ -> ℕ n + zero = n n + suc m = suc (n + m) _*_ : ℕ -> ℕ -> ℕ n * zero = zero n * suc m = n * m + n {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN ZERO zero #-} {-# BUILTIN SUC suc #-} {-# BUILTIN NATPLUS _+_ #-} {-#...
{-# OPTIONS --sized-types #-} open import FRP.JS.Array using ( ⟨⟩ ; ⟨_ ; _,_ ; _⟩ ) open import FRP.JS.Bool using ( Bool ; true ; false ; not ) open import FRP.JS.JSON using ( JSON ; float ; bool ; string ; object ; array ; null ; parse ; _≟_ ) open import FRP.JS.Maybe using ( Maybe ; just ; nothing ; _≟[_]_ ) open im...
------------------------------------------------------------------------ -- A variant of the lens type in -- Lens.Non-dependent.Higher.Capriotti.Variant.Erased -- -- This variant uses ∥_∥ᴱ instead of ∥_∥. ------------------------------------------------------------------------ import Equality.Path as P module Lens.No...
------------------------------------------------------------------------ -- The Agda standard library -- -- Greatest Common Divisor for integers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Integer.GCD where open import Data.Integer.Base open...
{- Part 1: The interval and path types • The interval in Cubical Agda • Path and PathP types • Function extensionality • Equality in Σ-types -} -- To make Agda cubical add the following options {-# OPTIONS --cubical #-} module Part1 where -- To load an Agda file type "C-c C-l" in emacs (the notation "C-c" -- means...
{-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.polarity:10 -v tc.inj:40 -v tc.conv.irr:20 #-} -- -v tc.mod.apply:100 #-} module Issue168 where postulate X : Set open import Issue168b open Membership X postulate P : Nat → Set lemma : ∀ n → P (id n) foo : P zero foo = lemma _
------------------------------------------------------------------------ -- A definitional interpreter ------------------------------------------------------------------------ open import Prelude import Lambda.Syntax module Lambda.Interpreter {Name : Type} (open Lambda.Syntax Name) (def : Name → Tm 1) where ...
open import Agda.Builtin.Nat open import Agda.Builtin.Equality -- Should not be accepted f : (@0 n : Nat) (m : Nat) → n + 0 ≡ m → Nat f n m refl = m
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor module Categories.Adjoint.AFT.SolutionSet {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {D : Category o′ ℓ′ e′} (F : Functor C D) where open import Level private module C = Category ...
postulate Typ : Set ⊢ : Typ → Set N : Typ t : ⊢ N record TopPred : Set where constructor tp field nf : Typ postulate inv-t[σ] : (T : Typ) → ⊢ T → TopPred su-I′ : TopPred → Typ su-I′ krip = let tp _ = inv-t[σ] _ t open TopPred krip in N
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Semigroup where open import Cubical.Algebra.Semigroup.Base public
module Function.Equals.Multi where open import Data.Tuple.Raise open import Data.Tuple.RaiseTypeᵣ open import Functional open import Function.Multi.Functions open import Function.Multi open import Logic open import Logic.Predicate open import Logic.Predicate.Multi import Lvl import Lvl.MultiFunctions as Lvl ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Nat.Omniscience where open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Prelude open import Cubical.Foundations.Univalence open import Cubical.Data.Bool renaming (Bool to 𝟚; Bool→T...
{- Category of categories -} module CategoryTheory.Instances.Cat where open import CategoryTheory.Categories open import CategoryTheory.Functor open import CategoryTheory.NatTrans -- Category of categories ℂat : ∀{n} -> Category (lsuc n) ℂat {n} = record { obj = Category n ; _~>_ = Functor ; ...
module PartiallyAppliedConstructorInIndex where data Nat : Set where zero : Nat suc : Nat -> Nat plus : Nat -> Nat -> Nat data D : (Nat -> Nat) -> Set where c : D suc d : (x : Nat) -> D (plus x) e : D (\ x -> suc x) f : D suc -> Nat f c = zero f e = suc zero
{-# OPTIONS --without-K #-} module Agda.Builtin.Bool where data Bool : Set where false true : Bool {-# BUILTIN BOOL Bool #-} {-# BUILTIN FALSE false #-} {-# BUILTIN TRUE true #-} {-# COMPILE UHC Bool = data __BOOL__ (__FALSE__ | __TRUE__) #-} {-# COMPILE JS Bool = function (x,v) { return ((x)? v["true"]() :...
module _ where q : ? q = Set
module Relator.Equals.Category where import Data.Tuple as Tuple open import Functional as Fn using (_$_) open import Functional.Dependent using () renaming (_∘_ to _∘ᶠ_) open import Logic.Predicate import Lvl open import Relator.Equals open import Relator.Equals.Proofs open import Structure.Categorical.Prope...
module _ where module M where infixr 3 _!_ data D : Set₁ where _!_ : D → D → D infixl 3 _!_ data E : Set₁ where _!_ : E → E → E open M postulate [_]E : E → Set [_]D : D → Set fail : ∀ {d e} → [ (d ! d) ! d ]D → [ e ! (e ! e) ]E fail x = x -- should use the right fixity for the overloaded constructo...
{-# OPTIONS --cubical --no-import-sorts --prop #-} module Instances where open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ) open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Relation.Nullary.Base -- ¬_ open import Cubical.Relation.Binary.Base open i...
module Container.List where open import Prelude infixr 5 _∷_ data All {a b} {A : Set a} (P : A → Set b) : List A → Set (a ⊔ b) where [] : All P [] _∷_ : ∀ {x xs} (p : P x) (ps : All P xs) → All P (x ∷ xs) data Any {a b} {A : Set a} (P : A → Set b) : List A → Set (a ⊔ b) where instance zero : ∀ {x xs} (p ...
-- 2013-02-21 Andreas -- ensure that constructor-headedness works also for abstract things module Issue796 where data U : Set where a b : U data A : Set where data B : Set where abstract A' B' : Set A' = A B' = B -- fails if changed to A. [_] : U → Set [_] a = A' [_] b = B' f : ∀ u → [ u ] → U ...
module Helper.CodeGeneration where open import Agda.Primitive open import Data.Nat open import Data.Fin open import Data.List open import Function using (_∘_ ; _$_ ; _∋_) open import Reflection a : {A : Set} -> (x : A) -> Arg A a x = arg (arg-info visible relevant) x a1 : {A : Set} -> (x : A) -> Arg A a1 x = arg (ar...
import Lvl open import Structure.Operator.Vector open import Structure.Setoid open import Type module Structure.Operator.Vector.Subspace.Proofs {ℓᵥ ℓₛ ℓᵥₑ ℓₛₑ} {V : Type{ℓᵥ}} ⦃ equiv-V : Equiv{ℓᵥₑ}(V) ⦄ {S : Type{ℓₛ}} ⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄ {_+ᵥ_ : V → V → V} {_⋅ₛᵥ_ : S → V → V} {_+ₛ_ _⋅ₛ_ : S → ...
module _ where module Inner where private variable A : Set open Inner fail : A → A fail x = x
{-# OPTIONS --cubical --safe #-} open import Prelude open import Categories module Categories.Coequalizer {ℓ₁ ℓ₂} (C : Category ℓ₁ ℓ₂) where open Category C private variable h i : X ⟶ Y record Coequalizer (f g : X ⟶ Y) : Type (ℓ₁ ℓ⊔ ℓ₂) where field {obj} : Ob arr : Y ⟶ obj equality : arr ...
------------------------------------------------------------------------ -- The Agda standard library -- -- The universe polymorphic unit type and ordering relation ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Unit.Polymorphic.Base where open...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Functions.Definition open import Functions.Lemmas open import LogicalFormulae open import Numbers.Naturals.Definition open import Numbers.Naturals.Order open import Sets.FinSet.Definition open import Sets.FinSet.Lemmas open import Sets.Cardin...
module DeBruijn where open import Prelude -- using (_∘_) -- composition, identity open import Data.Maybe open import Logic.Identity renaming (subst to subst≡) import Logic.ChainReasoning module Chain = Logic.ChainReasoning.Poly.Homogenous _≡_ (\x -> refl) (\x y z -> trans) open Chain -- untyped de Bruijn terms ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some examples showing where the natural numbers and some related -- operations and properties are defined, and how they can be used ------------------------------------------------------------------------ module...
{-# OPTIONS --cubical --safe #-} module Data.Nat.Base where open import Agda.Builtin.Nat public using (_+_; _*_; zero; suc) renaming (Nat to ℕ; _-_ to _∸_) import Agda.Builtin.Nat as Nat open import Level open import Data.Bool data Ordering : ℕ → ℕ → Type₀ where less : ∀ m k → Ordering m (suc (m + k)) eq...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Functions.Definition open import Setoids.Setoids open import Setoids.Subset open import Graphs.Definition open import Sets.FinSet.Definition open import Numbers.Naturals...
module Nat1 where data ℕ : Set where zero : ℕ succ : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + b = b succ a + b = succ (a + b) open import Equality one = succ zero two = succ one three = succ two 0-is-id : ∀ (n : ℕ) → (n + zero) ≡ n 0-is-id zero = begin (zero + zero) ≈ zero by definition ∎ 0-is-id (succ y)...
module Functor where record IsEquivalence {A : Set} (_≈_ : A → A → Set) : Set where field refl : ∀ {x} → x ≈ x sym : ∀ {i j} → i ≈ j → j ≈ i trans : ∀ {i j k} → i ≈ j → j ≈ k → i ≈ k record Setoid : Set₁ where infix 4 _≈_ field Carrier : Set _≈_ : Carrier → Carrier → Set ...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.FunctionOver open import cohomology.Theory {- Useful lemmas concerning the functorial action of C -} module cohomology.Functor {i} (CT : CohomologyTheory i) where open CohomologyTheory CT open import cohomology.Unit CT open import cohomology.BaseI...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.elims.CofPushoutSection {- If f : X → Y is a section, then ΣY ≃ ΣX ∨ ΣCof(f) -} module homotopy.SuspSectionDecomp {i j} {X : Ptd i} {Y : Ptd j} (⊙f : X ⊙→ Y) (g : de⊙ Y → de⊙ X) (inv : ∀ x → g (fst ⊙f x) == x) where module SuspSecti...
module Numeral.Natural.Oper.FlooredDivision.Proofs where import Lvl open import Data open import Data.Boolean.Stmt open import Numeral.Natural open import Numeral.Natural.Oper.Comparisons open import Numeral.Natural.Oper.Comparisons.Proofs open import Numeral.Natural.Oper.FlooredDivision open import Numeral.Natur...
{-# OPTIONS --without-K --rewriting --no-sized-types --no-guardedness --no-subtyping #-} module Agda.Builtin.Equality.Rewrite where open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-}
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Transitivity module Oscar.Class.Transextensionality where module Transextensionality {𝔬} {𝔒 : Ø 𝔬} {𝔯} (_∼_ : 𝔒 → 𝔒 → Ø 𝔯) {ℓ} (_∼̇_ : ∀ {x y} → x ∼ y → x ∼ y → Ø ℓ) (let infix 4 _∼̇_ ; _∼̇_ = _∼̇_) (transitivity : Transitivity....
module AocIO where open import IO.Primitive public open import Data.String as String open import Data.List as List postulate getLine : IO Costring getArgs : IO (List String) getProgName : IO String {-# COMPILE GHC getLine = getLine #-} {-# FOREIGN GHC import qualified Data.Text as Text #-} {-# FOREIGN GHC im...
module Structure.Operator.Proofs where import Lvl open import Data open import Data.Tuple open import Functional hiding (id) open import Function.Equals import Function.Names as Names import Lang.Vars.Structure.Operator open Lang.Vars.Structure.Operator.Select open import Logic.IntroInstances open imp...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Unit.Properties where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Nat open import Cubical.Data.Unit.Base open import Cubical.Data.Prod.Base open imp...
{-# OPTIONS --cubical #-} open import Agda.Builtin.Cubical.Path open import Agda.Primitive open import Agda.Primitive.Cubical open import Agda.Builtin.Bool variable a p : Level A : Set a P : A → Set p x y : A refl : x ≡ x refl {x = x} = λ _ → x data 𝕊¹ : Set where base : 𝕊¹ ...
{-# OPTIONS --cubical --safe #-} open import Agda.Builtin.Cubical.Path data Circle1 : Set where base1 : Circle1 loop : base1 ≡ base1 data Circle2 : Set where base2 : Circle2 loop : base2 ≡ base2 test : base2 ≡ base2 test = loop
{-# OPTIONS --without-K #-} {- This file lists some basic facts about equivalences that have to be put in a separate file due to dependency. -} open import Types open import Functions open import Paths open import HLevel open import Equivalences open import Univalence open import HLevelBis module EquivalenceLemm...
{-# OPTIONS --copatterns --allow-unsolved-metas #-} module Issue942 where record Sigma (A : Set)(P : A → Set) : Set where constructor _,_ field fst : A snd : P fst open Sigma postulate A : Set x : A P Q : A → Set Px : P x f : ∀ {x} → P x → Q x ex : Sigma A Q ex = record { fst = x ...
open import Relation.Binary.Core module InsertSort.Impl2 {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Bound.Lower A open import Bound.Lower.Order _≤_ open import Data.List open import Data.Sum open import OList _≤_ insert : {b : Bound}{x : A} → LeB b (val x)...
------------------------------------------------------------------------ -- Inductive axiomatisation of subtyping ------------------------------------------------------------------------ module RecursiveTypes.Subtyping.Axiomatic.Inductive where open import Codata.Musical.Notation open import Data.Nat using (ℕ; zero; ...
open import Prelude module Implicits.Semantics.Context where open import Implicits.Syntax open import Implicits.Semantics.Type open import SystemF.Everything as F using () open import Data.Vec ⟦_⟧ctx→ : ∀ {ν n} → Ctx ν n → F.Ctx ν n ⟦ Γ ⟧ctx→ = map ⟦_⟧tp→ Γ
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Pi open import lib.types.Sigma open import lib.types.CommutingSquare module lib.types.Span where record Span {i j k : ULevel} : Type (lsucc (lmax (lmax i j) k)) where constructor span field A : Type i B : Type j C : ...
{-# OPTIONS --without-K --rewriting #-} open import HoTT module homotopy.AnyUniversalCoverIsPathSet {i} (X : Ptd i) where private a₁ = pt X path-set-is-universal : is-universal (path-set-cover X) path-set-is-universal = has-level-in ([ pt X , idp₀ ] , Trunc-elim {P = λ xp₀ → [ pt X , idp₀ ] == xp₀} (λ{(...
------------------------------------------------------------------------ -- Heterogeneous equality ------------------------------------------------------------------------ module Relation.Binary.HeterogeneousEquality where open import Relation.Nullary open import Relation.Binary open import Relation.Binary.Consequenc...
{-# OPTIONS --type-in-type #-} -- yes, there will be some cheating in this lecture module Lec3 where open import Lec1Done open import Lec2Done postulate extensionality : {S : Set}{T : S -> Set} {f g : (x : S) -> T x} -> ((x : S) -> f x == g x) -> f == g re...
{- Based on Nicolai Kraus' blog post: The Truncation Map |_| : ℕ -> ‖ℕ‖ is nearly Invertible https://homotopytypetheory.org/2013/10/28/the-truncation-map-_-ℕ-‖ℕ‖-is-nearly-invertible/ Defines [recover], which definitionally satisfies `recover ∣ x ∣ ≡ x` ([recover∣∣]) for homogeneous types Also see the follow-up ...
open import Oscar.Prelude module Oscar.Data.List where open import Agda.Builtin.List public using () renaming ([] to ∅) renaming (_∷_ to _,_) ⟨_⟩¶ = Agda.Builtin.List.List List⟨_⟩ = ⟨_⟩¶
module Oscar.Class.IsSemigroupoid where open import Oscar.Class.Associativity open import Oscar.Class.Equivalence open import Oscar.Class.Extensionality₂ open import Oscar.Function open import Oscar.Level open import Oscar.Relation record Semigroup {𝔞} {𝔄 : Set 𝔞} {𝔰} {_►_ : 𝔄 → 𝔄 → Set 𝔰} (_◅_ : ∀ {m n...
import cedille-options module communication-util (options : cedille-options.options) where open import general-util open import toplevel-state options {IO} logRopeh : filepath → rope → IO ⊤ logRopeh logFilePath r with cedille-options.options.generate-logs options ...| ff = return triv ...| tt = getCurrentTime >>= λ ...
------------------------------------------------------------------------ -- The Agda standard library -- -- A categorical view of Delay ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} module Codata.Delay.Categorical where open import Codata.De...
open import Data.Product using ( _×_ ; _,_ ) open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ ) open import FRP.LTL.RSet.Core using ( RSet ) open import FRP.LTL.Time.Bound using ( Time∞ ; fin ; _≼_ ; _≺_ ; ≼-refl ; _≼-trans_ ; _≼-asym_ ; _≼-total_ ; _≺-transˡ_ ; ≺-impl-≼ ; ≡-impl-≼ ; ≡-impl-≽ ; ≺-impl-⋡ ; src ) ope...
{- 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.ImplShared.Consensus.Types open import Optics.All import...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pointwise lifting of binary relations to sigma types ------------------------------------------------------------------------ module Relation.Binary.Sigma.Pointwise where open import Data.Product as Prod open i...
open import FRP.JS.QUnit using ( TestSuites ; suite ; _,_ ) import FRP.JS.Test.Bool import FRP.JS.Test.Nat import FRP.JS.Test.Int import FRP.JS.Test.Float import FRP.JS.Test.String import FRP.JS.Test.Maybe import FRP.JS.Test.List import FRP.JS.Test.Array import FRP.JS.Test.Object import FRP.JS.Test.JSON import FRP.JS....
{-# OPTIONS --safe #-} module STLC.Operational.Base where open import STLC.Syntax open import Data.Empty using (⊥-elim) open import Data.Nat using (ℕ; suc) open import Data.Fin using (Fin; _≟_; punchOut; punchIn) renaming (zero to fzero; suc to fsuc) open import Relation.Binary.PropositionalEquality using (_≢_; refl...
{-# OPTIONS --safe --without-K #-} module CF.Types where open import Data.Unit using (⊤; tt) open import Data.Empty using (⊥) open import Data.Product open import Data.List as L open import Data.String open import Relation.Binary open import Relation.Binary.PropositionalEquality open import Relation.Nullary.Decidable ...
{-# OPTIONS --cumulativity #-} open import Agda.Primitive open import Agda.Builtin.Nat open import Agda.Builtin.Equality module _ where variable ℓ ℓ′ ℓ₁ ℓ₂ : Level A B C : Set ℓ k l m n : Nat lone ltwo lthree : Level lone = lsuc lzero ltwo = lsuc lone lthree = lsuc ltwo set0 : Set₂ set0 = Set₀ set1 : Set₂ s...
------------------------------------------------------------------------ -- The Agda standard library -- -- Container Morphisms ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Container.Morphism where open import Data.Container.Core import Funct...
module AbstractInterfaceExample where open import Function open import Data.Bool open import Data.String -- * One-parameter interface for the type `a' with only one method. record VoiceInterface (a : Set) : Set where constructor voice-interface field say-method-of : a → String open VoiceInterface -- * An overl...
module Dave.Isomorphism where open import Dave.Equality open import Dave.Functions infix 0 _≃_ record _≃_ (A B : Set) : Set where field to : A → B from : B → A from∘to : ∀ (x : A) → from (to x) ≡ x to∘from : ∀ (x : B) → to (from x) ≡ x open _≃...
open import Relation.Binary.Core module Mergesort.Impl2.Correctness.Permutation {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Bound.Lower A open import Bound.Lower.Order _≤_ open import Data.List open import Data.Sum open import List.Permutation.Base A open im...
{-# OPTIONS --cubical --safe #-} module Data.Integer where open import Level open import Data.Nat using (ℕ; suc; zero) import Data.Nat as ℕ import Data.Nat.Properties as ℕ open import Data.Bool data ℤ : Type where ⁺ : ℕ → ℤ ⁻suc : ℕ → ℤ ⁻ : ℕ → ℤ ⁻ zero = ⁺ zero ⁻ (suc n) = ⁻suc n {-# DISPLAY ⁻suc n = ⁻ ...
------------------------------------------------------------------------ -- Some definitions related to and properties of natural numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Nat {reflexive} (eq : ∀ {a p} → Equality-...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.GradedRing.Instances.TrivialGradedRing 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 (ℕ ; ze...
{-# OPTIONS --allow-unsolved-metas #-} open import Oscar.Class open import Oscar.Class.Reflexivity open import Oscar.Class.Symmetry open import Oscar.Class.Transitivity open import Oscar.Class.Transleftidentity open import Oscar.Prelude module Test.ProblemWithDerivation-5 where module Map {𝔵₁} {𝔛₁ : Ø 𝔵₁} {𝔵...
module CS410-Vec where open import CS410-Prelude open import CS410-Nat data Vec (X : Set) : Nat -> Set where [] : Vec X 0 _::_ : forall {n} -> X -> Vec X n -> Vec X (suc n) infixr 3 _::_ _+V_ : forall {X m n} -> Vec X m -> Vec X n -> Vec X (m +N n) [] +V ys = ys (x :: xs) +V ys = x :: xs +V ys infixr ...
-- Andreas, issue 2349 -- Andreas, 2016-12-20, issue #2350 -- {-# OPTIONS -v tc.term.con:50 #-} postulate A : Set data D {{a : A}} : Set where c : D test : {{a b : A}} → D test {{a}} = c {{a}} -- WAS: complaint about unsolvable instance -- Should succeed
------------------------------------------------------------------------------ -- Discussion about the inductive approach ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymo...
open import Agda.Builtin.Equality postulate Ty Cxt : Set Var Tm : Ty → Cxt → Set _≤_ : (Γ Δ : Cxt) → Set variable Γ Δ Φ : Cxt A B C : Ty x : Var A Γ Mon : (P : Cxt → Set) → Set Mon P = ∀{Δ Γ} (ρ : Δ ≤ Γ) → P Γ → P Δ postulate _•_ : Mon (_≤ Φ) monVar : Mon (Var A) monTm : Mon (Tm A) postulate r...
module Prelude.List.Properties where open import Prelude.Function open import Prelude.Bool open import Prelude.Bool.Properties open import Prelude.Nat open import Prelude.Nat.Properties open import Prelude.Semiring open import Prelude.List.Base open import Prelude.Decidable open import Prelude.Monoid open import...
------------------------------------------------------------------------ -- The Agda standard library -- -- M-types (the dual of W-types) ------------------------------------------------------------------------ module Data.M where open import Level open import Coinduction -- The family of M-types. data M {a b} (A :...
module UnifyMguPair where open import UnifyTerm open import UnifyMgu open import UnifyMguCorrect open import Data.Fin using (Fin; suc; zero) open import Data.Nat hiding (_≤_) open import Relation.Binary.PropositionalEquality renaming ([_] to [[_]]) open import Function using (_∘_; id; case_of_; _$_) open import Rela...
open import TakeDropDec
{-# OPTIONS --omega-in-omega --no-termination-check #-} module Light.Variable.Sets where open import Light.Variable.Levels variable 𝕒 𝕒₀ 𝕒₁ 𝕒₂ 𝕒₃ 𝕒₄ 𝕒₅ : Set aℓ 𝕓 𝕓₀ 𝕓₁ 𝕓₂ 𝕓₃ 𝕓₄ 𝕓₅ : Set bℓ 𝕔 𝕔₀ 𝕔₁ 𝕔₂ 𝕔₃ 𝕔₄ 𝕔₅ : Set cℓ 𝕕 𝕕₀ 𝕕₁ 𝕕₂ 𝕕₃ 𝕕₄ 𝕕₅ : Set dℓ 𝕖 𝕖₀ 𝕖₁ ...
------------------------------------------------------------------------ -- Some Vec-related properties ------------------------------------------------------------------------ module Data.Vec.Properties where open import Algebra open import Data.Vec open import Data.Nat import Data.Nat.Properties as Nat open import ...
module Issue1691 where open import Common.Equality open import Issue1691.Nat -- works if we inline this module ∸1≗pred : ∀ n → n ∸ suc 0 ≡ pred n -- works if zero is replaced by 0 ∸1≗pred zero = refl ∸1≗pred (suc _) = refl
-- Agda supports full unicode everywhere. An Agda file should be written using -- the UTF-8 encoding. module Introduction.Unicode where module ユーニコード where data _∧_ (P Q : Prop) : Prop where ∧-intro : P -> Q -> P ∧ Q ∧-elim₁ : {P Q : Prop} -> P ∧ Q -> P ∧-elim₁ (∧-intro p _) = p ∧-elim₂ : {P Q : Prop}...
------------------------------------------------------------------------ -- Abstract grammars ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Grammar.Abstract where open import Data.Bool open import Data.Char open import Data.Empty open import Data.L...
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Instances.QuoQ where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Foundations.Logic renaming (inl to inlᵖ; inr to inrᵖ...
postulate id : {t : Set} → t → t _≡_ : {t : Set} → t → t → Set ⊤ : Set record FunctorOp (f : Set → Set) : Set₁ where record FunctorLaws (f : Set → Set) {{op : FunctorOp f}} : Set₁ where -- demand functor laws to access <*>, but promise we won't use them in our definition record ApplyOp (A : Set → Set) {{_ : Fu...
module SystemF.Substitutions.Types where open import Prelude open import SystemF.Syntax.Type open import Data.Fin.Substitution open import Data.Star hiding (map) open import Data.Vec module TypeSubst where module TypeApp {T} (l : Lift T Type) where open Lift l hiding (var) infixl 8 _/_ _/_ : ∀ {m n} →...
open import SOAS.Common open import SOAS.Families.Core open import Categories.Object.Initial open import SOAS.Coalgebraic.Strength import SOAS.Metatheory.MetaAlgebra -- Renaming structure by initiality module SOAS.Metatheory.Renaming {T : Set} (⅀F : Functor 𝔽amiliesₛ 𝔽amiliesₛ) (⅀:Str : Strength ⅀F) (𝔛 : Famil...
open import Common.IO open import Agda.Builtin.String open import Agda.Builtin.Unit open import Agda.Builtin.Nat open import Agda.Builtin.Sigma open import Agda.Builtin.Equality open import Agda.Builtin.Bool open import Agda.Builtin.Strict data ∋⋆ : Set where Z : ∋⋆ data ⊢⋆ : Set where size⋆ : Nat → ⊢⋆ ⋆Sub : S...