text
stringlengths
4
690k
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.Groups.Sn where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.MayerVietorisUnreduced open import Cubical.ZCohomology.Groups.Unit open import Cubical.ZCohomology.Groups.Connect...
open import Agda.Builtin.Nat foo : Nat → Nat → Nat foo 0 m = {!m!} foo (suc n) m = {!!}
{-# OPTIONS --without-K #-} open import lib.Base open import lib.NType open import lib.Relation open import lib.types.Bool open import lib.types.Int module lib.types.List where infixr 80 _::_ data List {i} (A : Type i) : Type i where nil : List A _::_ : A → List A → List A data HList {i} : List (Type i) → Type...
{-# 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.Orders.Partial.Definition open import Sets.EquivalenceRelations open import Sequences open import Setoids.Orders.Partia...
------------------------------------------------------------------------ -- The Agda standard library -- -- Transitive closures -- -- This module is DEPRECATED. Please use the -- Relation.Binary.Construct.Closure.Transitive module directly. ------------------------------------------------------------------------ {-# O...
module LiftGet where open import Data.Unit using (⊤ ; tt) open import Data.Nat using (ℕ ; suc) open import Data.Vec using (Vec ; toList ; fromList) renaming ([] to []V ; _∷_ to _∷V_ ; map to mapV) open import Data.List using (List ; [] ; _∷_ ; length ; replicate ; map) open import Data.List.Properties using (length-ma...
module TestQuote where {- test of reflection, implementing a trivial prover. -} open import Common.Reflection open import Common.Prelude open import Common.Level _==_ : Term → Term → Bool def x [] == def y [] = primQNameEquality x y _ == _ = false data Thm : Set where triv : Thm `Thm = def (quote T...
{-# OPTIONS --without-K --safe #-} module Cham.Context where open import Cham.Name open import Cham.Label open import Data.Product infix 5 _⊢_ data Context : Set where ∅ : Context _⊢_ : Context → Label → Context _,_ : Context → Context → Context rename : (Name → Label) → Context → Context rename ϕ ∅ ...
{-# OPTIONS --safe #-} module Cubical.Algebra.Group.Exact where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Function open import Cubical.Data.Unit open import Cubical.Algebra.Group.Base open import Cubical.Algebra.Group.Morphisms open import Cubical.A...
module _ where open import Agda.Primitive open import Agda.Builtin.Equality open import Agda.Builtin.Nat variable ℓ : Level A B C : Set ℓ infixr 1 _×_ _,_ record _×_ {ℓ₁ ℓ₂} (A : Set ℓ₁) (B : Set ℓ₂) : Set (ℓ₁ ⊔ ℓ₂) where constructor _,_ field fst : A snd : B module _ (x : A) (y : B) where f : C ...
{-# OPTIONS --warning=error --safe --without-K #-} -- This file contains everything that can be compiled in --safe mode. open import Numbers.Naturals.Naturals open import Numbers.Naturals.Division open import Numbers.BinaryNaturals.Definition open import Numbers.BinaryNaturals.Multiplication open import Numbers.Binar...
module Issue2756 where module M where postulate A : Set module M′ = M B : Set B = M′.A
------------------------------------------------------------------------ -- A variant of Nat.Wrapper.Cubical, defined using --erased-cubical ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} open import Equality.Path as P open import Prelude hiding (zero;...
module reverse-++-distrib where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; cong) open Eq.≡-Reasoning open import lists using (List; []; _∷_; [_]; _++_; ++-assoc; ++-identityʳ; reverse) -- 結合したリストの逆順は、逆順にしたリストの逆順の結合と等しいことの証明 reverse-++-distrib : ∀ {A : Set} → (xs ys : List A) →...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.ProofIrrelevance {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties using (wkSingleSubstId) open import Definitio...
{-# OPTIONS --without-K --safe #-} module Tools.List where infixr 30 _∷_ data List (A : Set) : Set where [] : List A _∷_ : A → List A → List A
-- Andreas, 2014-07-02 wondering about the ETA pragma (legacy?) open import Common.Equality data Prod (A B : Set) : Set where pair : A → B → Prod A B {-# ETA Prod #-} -- The ETA pragma does not exist anymore. fst : {A B : Set} → Prod A B → A fst (pair a b) = a snd : {A B : Set} → Prod A B → B snd (pair a b) = b...
{-# POLARITY F #-} {-# POLARITY G #-}
---------------------------------------------------------------------- -- Copyright: 2013, Jan Stolarek, Lodz University of Technology -- -- -- -- License: See LICENSE file in root of the repo -- -- Repo address: https://github.com/...
module Numeral.Natural.Oper.Comparisons where import Lvl open import Data.Boolean import Data.Boolean.Operators open Data.Boolean.Operators.Programming open import Numeral.Natural open import Numeral.Sign ℕbool : Bool → ℕ ℕbool = if_then 1 else 0 -- Compare _⋚?_ : ℕ → ℕ → (−|0|+) 𝟎 ⋚? 𝟎 = 𝟎...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties satisfied by preorders ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Relation.Binary.Properties.Preor...
module Data.List.Functions.Multi where import Lvl open import Data open import Data.List open import Data.List.Functions hiding (separate) open import Data.Option open import Data.Tuple open import Data.Tuple.Raise import Data.Tuple.Raiseᵣ.Functions as Raise open import Numeral.Finite open import Numeral.Nat...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.SuspSmash module homotopy.SuspSmashComm where module Σ∧Σ-PathElim {i} {j} {k} {A : Type i} {B : Type j} {C : Type k} (f g : ⊙Susp A ∧ ⊙Susp B → C) (n-n : f (smin north north) == g (smin north north)) (n-s : f (smin north south) == ...
{-# OPTIONS --type-in-type #-} open import Data.Unit open import Data.Product hiding ( curry ; uncurry ) open import Data.List hiding ( concat ) open import Data.String open import Relation.Binary.PropositionalEquality module Spire.Examples.PropositionalDesc where ------------------------------------------------------...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import LogicalFormulae open import Orders.Total.Definition open import Orders.Partial.Definition open import Setoids.Setoids open import Functions.Definition open import Sequen...
open import Level using (Level; suc; zero; _⊔_) open import Function using (const) open import Algebra open import Algebra.Structures open import Algebra.OrderedMonoid open import Algebra.Pregroup open import Algebra.FunctionProperties as FunctionProperties using (Op₁; Op₂) open import Data.Product using (_×_; _,_; pro...
-- Everything is strictly positive, but Agda doesn't see this. {-# OPTIONS --no-positivity-check #-} module Generic.Core where open import Generic.Lib.Prelude public infix 4 _≤ℓ_ infixr 5 _⇒_ _⊛_ _≤ℓ_ : Level -> Level -> Set α ≤ℓ β = α ⊔ β ≡ β mutual Binder : ∀ {ι} α β γ -> ArgInfo -> ι ⊔ lsuc (α ⊔ β) ≡ γ -> Se...
{-# OPTIONS --cubical --safe --postfix-projections #-} module Data.Rational.Unnormalised where open import Prelude open import Data.Integer using (ℤ; ⁺) import Data.Integer as ℤ import Data.Nat as ℕ open import Data.Nat.DivMod using (nonZero) infixl 7 _/_ _/suc_ record ℚ : Type where constructor _/suc_ field ...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.List.Relation.Binary.Permutation.Propositional.Properties -- directly. ------------------------------------------------------------------------ {-# OPTIONS --without...
-- This example comes from the discussion on Issue423. module SolveNeutralApplication where postulate A : Set a b : A T : A → Set mkT : ∀ a → T a data Bool : Set where true false : Bool f : Bool → A → A f true x = a f false x = b -- We can solve the constraint -- f x _4 == f x y -- with -- _4 := y --...
-- ASR (31 December 2015). The error message for this test was changed -- by fixing Issue 1763. module Issue586 where {-# NO_TERMINATION_CHECK #-} Foo : Set Foo = Foo
-- Andreas, 2017-07-29, issue and test case by Nisse {-# OPTIONS --profile=interactive #-} A : Set A = {!Set!} -- Give to provoke error -- This issue concerns the AgdaInfo buffer, -- the behavior on the command line might be different. -- ERROR WAS (note the "Total 0ms"): -- Set₁ != Set -- when checking that the ex...
import cedille-options open import general-util module untyped-spans (options : cedille-options.options) {F : Set → Set} {{monadF : monad F}} where open import lib open import ctxt open import cedille-types open import conversion open import spans options {F} open import syntax-util open import to-string options open...
module Builtin where open import Agda.Primitive data Bool : Set where false : Bool true : Bool not : Bool -> Bool not true = false not false = true _||_ : Bool -> Bool -> Bool true || _ = true false || x = x _&&_ : Bool -> Bool -> Bool true && x = x false && _ = false {-# BUILTIN BOOL Bool #-} {-# BUILTI...
module PiFrac.Interp where open import Data.Empty open import Data.Unit hiding (_≟_) open import Data.Sum open import Data.Product open import Data.Maybe open import Relation.Binary.Core open import Relation.Binary open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Function using...
------------------------------------------------------------------------------ -- Elimination properties for the inequalities ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-po...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cohomology.Theory module cohomology.Sphere {i} (OT : OrdinaryTheory i) where open OrdinaryTheory OT abstract C-Sphere-≠-is-trivial : (n : ℤ) (m : ℕ) → (n ≠ ℕ-to-ℤ m) → is-trivialᴳ (C n (⊙Lift (⊙Sphere m))) C-Sphere-≠-is-trivial n O n≠0 = C...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.Theory {- Cohomology functor sends constant functions to constant functions -} module cohomology.ConstantFunction {i} (CT : CohomologyTheory i) where open import cohomology.Unit CT open CohomologyTheory CT module _...
-- Andreas, 2018-10-29, issue #3331 -- Document that using and renaming lists cannot overlap. open import Agda.Builtin.Bool using (true) renaming (true to tt) -- Expected error: -- Repeated name in import directive: true
------------------------------------------------------------------------ -- The Agda standard library -- -- Many properties which hold for _∼_ also hold for _∼_ on f ------------------------------------------------------------------------ open import Relation.Binary module Relation.Binary.On where open import Functi...
module options where open import lib open import options-types public ---------------------------------------------------------------------------------- -- Run-rewriting rules ---------------------------------------------------------------------------------- data gratr2-nt : Set where _ws-plus-34 : gratr2-nt _ws...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Prelude open import LibraBFT.Lemmas open import Lib...
{-# OPTIONS --without-K --rewriting #-} open import HoTT -- an attempt to speed up [QuotGroup (im-nprop ...)] -- which removes most intermediate constructions module groups.Cokernel {i j} {G : Group i} {H : Group j} (φ : G →ᴳ H) (H-ab : is-abelian H) where -- G ---φ--→ᴳ H private module G = Group G ...
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import LogicalFormulae open import Sets.EquivalenceRelations open import Setoids.Setoids module Setoids.Intersection.Definition {a b : _} {A : Set a} (S : Setoid {a} {b} A) where open Setoid S open Equi...
{-# OPTIONS --cubical --safe #-} module Control.Monad.State where open import Prelude record StatePair {s a} (S : Type s) (A : Type a) : Type (a ℓ⊔ s) where constructor state-pair field value : A state : S open StatePair public State : ∀ {s a} → Type s → Type a → Type (s ℓ⊔ a) State S A = S → StatePair ...
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Unit module Oscar.Class.SimilarityM where module SimilarityM {𝔞} {𝔄 : Ø 𝔞} {𝔟} {𝔅 : Ø 𝔟} {𝔣} {𝔉 : Ø 𝔣} {𝔞̇ 𝔟̇} (_∼₁_ : 𝔄 → 𝔄 → Ø 𝔞̇) (_∼₂_ : 𝔅 → 𝔅 → Ø 𝔟̇) (let _∼₂_ = _∼₂_; infix 4 _∼₂_) (_◃_ : 𝔉 → 𝔄 → 𝔅) (let...
{- Definition of a homogeneous pointed type, and proofs that pi, product, path, and discrete types are homogeneous Portions of this file adapted from Nicolai Kraus' code here: https://bitbucket.org/nicolaikraus/agda/src/e30d70c72c6af8e62b72eefabcc57623dd921f04/trunc-inverse.lagda -} {-# OPTIONS --safe #-} module C...
module tests.PrintBool where open import Prelude.IO open import Prelude.Bool open import Prelude.Char open import Prelude.List open import Prelude.Unit open import Prelude.String isNewline : Char -> Bool isNewline '\n' = true isNewline _ = false sequence : {A : Set} -> List (IO A) -> IO (List A) sequence [] = ret...
{-# OPTIONS --prop --type-in-type #-} open import Agda.Primitive data Squash (A : Setω) : Prop where squash : A → Squash A
------------------------------------------------------------------------------ -- Testing the translation of higher-order functions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTION...
module IO where open import Base postulate IO : Set -> Set getLine : IO String putStrLn : String -> IO Unit mapM₋ : {A : Set} -> (A -> IO Unit) -> List A -> IO Unit bindIO : {A B : Set} -> IO A -> (A -> IO B) -> IO B returnIO : {A : Set} -> A -> IO A {-# COMPILED putStrLn putStrLn #-} {-# CO...
module Oscar.Data.Fin.ThickAndThin where open import Oscar.Data.Fin open import Oscar.Class.ThickAndThin import Data.Fin as F import Data.Fin.Properties as F instance ThickAndThinFin : ThickAndThin Fin ThickAndThin.thin ThickAndThinFin = F.thin ThickAndThin.thick ThickAndThinFin = F.thick ThickAndThin.thin-injectiv...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Base.Types open import LibraBFT.ImplShared.Base.Types op...
module Dummy where -- Run this in Acme: go build && ./acme-agda -v data ℕ : Set where zero : ℕ succ : ℕ -> ℕ _+_ : ℕ → ℕ → ℕ m + n = {!!} _*_ : ℕ → ℕ → ℕ m * n = {!m !}
{-# OPTIONS --cubical --safe #-} module Label where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude using (isProp; transport) open import Cubical.Data.Nat using (ℕ; zero; suc; isSetℕ) open import Cubical.Data.Nat.Order using (_<_; _≤_; ≤-refl; <-weaken; ≤<-trans; m≤n-isProp; <-asym) open i...
{-# OPTIONS --cubical --no-import-sorts --safe #-} {- This file defines sucPred : ∀ (i : Int) → sucInt (predInt i) ≡ i predSuc : ∀ (i : Int) → predInt (sucInt i) ≡ i discreteInt : discrete Int isSetInt : isSet Int addition of Int is defined _+_ : Int → Int → Int as well as its commutativity and associativity +-co...
module *-distrib-+ where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; cong; sym) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; step-≡; _∎) open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Induction′ using (+-assoc; +-comm; +-suc) -- 積が和に対して分配的であることの証明 *-distrib-+ : ∀ (m n p : ℕ) ...
{-# OPTIONS --cubical --safe #-} module Data.List.Kleene.Relation.Unary where open import Data.List.Kleene open import Prelude open import Data.Fin open import Relation.Nullary private variable p : Level ◇⁺ : ∀ {A : Type a} (P : A → Type p) → A ⁺ → Type _ ◇⁺ P xs = ∃[ i ] P (xs !⁺ i) ◇⋆ : ∀ {A : Type a} (P :...
------------------------------------------------------------------------------ -- Totality properties respect to OrdList (flatten-OrdList-helper) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTI...
{-# OPTIONS --universe-polymorphism #-} module Categories.Functor.Product where open import Categories.Category open import Categories.Functor using (Functor) import Categories.Object.Product as Product import Categories.Object.BinaryProducts as BinaryProducts -- Ugh, we should start bundling things (categories with ...
module Sodium where open import Category.Functor open import Category.Applicative open import Category.Monad open import Data.Unit open import Data.Bool open import Data.Maybe open import Data.Product open import IO.Primitive postulate -- Core. Reactive : Set → Set sync : ∀ {A} → Reactive A → IO A Even...
postulate F : (Set → Set) → Set syntax F (λ x → y) = [ x ] y X : Set X = [ ? ] x
{-# OPTIONS --safe #-} module SafeFlagPostulate where data Empty : Set where postulate inhabitant : Empty
{-# OPTIONS --cubical --safe --guardedness #-} module Cubical.Codata.Stream.Properties where open import Cubical.Core.Everything open import Cubical.Data.Nat open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univa...
#-}
module Monoids where open import Library record Monoid {a} : Set (lsuc a) where field S : Set a ε : S _•_ : S → S → S lid : ∀{m} → ε • m ≅ m rid : ∀{m} → m • ε ≅ m ass : ∀{m n o} → (m • n) • o ≅ m • (n • o) infix 10 _•_ Nat+Mon : Monoid Nat+Mon = record { S = ℕ;...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Species where -- The Category of Species, as the Functor category from Core (FinSetoids) to Setoids. -- Setoids used here because that's what fits best in this setting. -- The constructions of the theory of Species are in Species.Construction open import L...
module Issue451 where infix 10 _==_ data _==_ {A : Set} (x : A) : (y : A) -> Set where refl : x == x postulate Nat : Set data G : Nat -> Nat -> Set where I : (place : Nat) -> G place place s : (n m : Nat) -> G n m mul : (l m n : Nat) -> G m n -> G l m -> G l n mul a b .b (I .b) x = x mul a .a b x ...
module guarded-recursion where import guarded-recursion.prelude import guarded-recursion.model import guarded-recursion.model.Agda import guarded-recursion.embedding import guarded-recursion.compute import guarded-recursion.clocks
open import Oscar.Prelude open import Oscar.Class.Successor₀ open import Oscar.Class.Successor₁ open import Oscar.Class.Injectivity open import Oscar.Class.Thickandthin open import Oscar.Class.Congruity open import Oscar.Class.Fmap open import Oscar.Data.¶ open import Oscar.Data.Fin open import Oscar.Data.Proposequalit...
module UniDB.Subst.Subs where open import UniDB.Subst.Core open import UniDB.Morph.Subs -------------------------------------------------------------------------------- module _ {T : STX} {{vrT : Vr T}} {{wkT : Wk T}} {{apTT : Ap T T}} where instance iCompSubs : Comp (Subs T) _⊙_ {{iCompSubs}} (refl) ...
{-# OPTIONS --safe --warning=error --without-K #-} open import Numbers.ClassicalReals.RealField open import LogicalFormulae open import Setoids.Subset open import Setoids.Setoids open import Sets.EquivalenceRelations open import Rings.Orders.Total.Definition open import Rings.Orders.Partial.Definition open import Ring...
{-# OPTIONS --safe #-} module Cubical.Algebra.Field where open import Cubical.Algebra.Field.Base public
module _ where import Agda.Primitive.Cubical as C -- Cannot alias module exporting primitives with typechecking constraints. module M = C
{-# OPTIONS --without-K --exact-split --safe #-} module Fragment.Setoid.Morphism where open import Fragment.Setoid.Morphism.Base public open import Fragment.Setoid.Morphism.Setoid public open import Fragment.Setoid.Morphism.Properties public
------------------------------------------------------------------------------ -- Totality properties respect to Tree ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphi...
{-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --show-implicit #-} open import Oscar.Prelude open import Oscar.Class -- classes open import Oscar.Class.Transitivity -- data open import Oscar.Data.Substitunction open import Oscar.Data.Term module Test.EquivalentCandidates-2 where module _ {a} where insta...
{-# OPTIONS --without-K #-} open import lib.Base module test.fail.Test1 where module _ where private data #I-aux : Type₀ where #zero : #I-aux #one : #I-aux data #I : Type₀ where #i : #I-aux → (Unit → Unit) → #I I : Type₀ I = #I zero : I zero = #i #zero _ one : I one = #i ...
data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} _+_ : ℕ → ℕ → ℕ zero + b = b suc a + b = suc (a + b) infix 100 _+_ data _≡_ : ℕ → ℕ → Set where refl : {n : ℕ} → n ≡ n sym : {n m : ℕ} → n ≡ m → m ≡ n sym refl = refl trans : {m n o : ℕ} → m ≡ n → n ≡ o → m ≡ o trans refl p₂ = p₂ suc-inj : {m...
module UnifyTermF (FunctionName : Set) where open import Data.Fin using (Fin; suc; zero) open import Data.Nat using (ℕ; suc; zero) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂; cong; sym; trans) open import Function using (_∘_; flip) open import Relation.Nullary using (¬_; Dec; yes; no) o...
module L.Base.Sigma.Core where -- Import the Σ record with constructors fst, snd open import Agda.Builtin.Sigma public split : ∀{a b c} {A : Set a} {B : A → Set b} (C : Σ A B → Set c) → ((x : A)(y : B x) → C (x , y)) → (p : Σ A B) → C p split C g (a , b) = g a b
module Prelude.List where open import Prelude.Bool open import Prelude.Nat open import Prelude.Fin infixr 40 _::_ data List (A : Set) : Set where [] : List A _::_ : A -> List A -> List A {-# BUILTIN LIST List #-} {-# BUILTIN NIL [] #-} {-# BUILTIN CONS _::_ #-} infixr 30 _++_ _++_ : {A : Set} -> List A -> L...
{-# OPTIONS --without-K --safe #-} -- Monoidal natural isomorphisms between lax and strong braided -- monoidal functors. -- -- NOTE. Braided monoidal natural isomorphisms are really just -- monoidal natural isomorphisms that happen to go between braided -- monoidal functors. No additional conditions are necessary. --...
module Bool where data Bool : Set where true : Bool false : Bool {-# BUILTIN BOOL Bool #-} {-# BUILTIN TRUE true #-} {-# BUILTIN FALSE false #-}
{-# OPTIONS --sized-types #-} open import Relation.Binary.Core module SelectSort {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Data.List open import Data.Product open import Data.Sum open import Size open import SList open import SList.Order _≤_ select : {ι :...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Monoidals where open import Level open import Categories.Category open import Categories.Category.Helper open import Categories.Category.Monoidal open import Categories.Functor.Monoidal open import Categories.Functor.Monoidal.Properties open impo...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module LogicalFramework.Disjunction where module LF where postulate _∨_ : Set → Set → Set inj₁ : {A B : Set} → A → A ∨ B inj₂ : {A ...
------------------------------------------------------------------------ -- A type soundness result ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} module Lambda.Delay-monad.Type-soundness where open import Equality.Propositional open import Prelude open import ...
module _ where module Test₁ where postulate id : {X : Set} → X → X A : Set x : A record S : Set where field a : A postulate B : S → Set record T : Set where field s : S b : B s -- Agda hangs here t : T t = λ { .T.s .S.a → x ; .T.b → id {!!} ...
{-# OPTIONS --cubical --safe #-} module Data.Maybe.Sugar where open import Prelude open import Data.Maybe _>>=_ : Maybe A → (A → Maybe B) → Maybe B nothing >>= f = nothing just x >>= f = f x pure : A → Maybe A pure = just _<*>_ : Maybe (A → B) → Maybe A → Maybe B nothing <*> xs = nothing just f <*> nothing = nothi...
------------------------------------------------------------------------ -- The Agda standard library -- -- Automatic solvers for equations over booleans ------------------------------------------------------------------------ -- See README.Nat for examples of how to use similar solvers {-# OPTIONS --without-K --safe...
module WithInParModule (A : Set) where data Nat : Set where zero : Nat suc : Nat -> Nat data Bool : Set where true : Bool false : Bool isZero : Nat -> Bool isZero zero = true isZero (suc _) = false f : Nat -> Nat f n with isZero n f n | true = zero f n | false = suc zero g : Nat -> Nat g zero = zero g (s...
module Issue348 where import Common.Irrelevance data _==_ {A : Set1}(a : A) : A -> Set where refl : a == a record R : Set1 where constructor mkR field .fromR : Set reflR : (r : R) -> r == r reflR r = refl {a = _} -- issue: unsolved metavars resolved 2010-10-15 by making eta-expansion -- more lazy (do no...
module Cats.End where open import Level using (_⊔_) open import Cats.Category open import Cats.Category.Wedges using (Wedge ; Wedges) open import Cats.Profunctor module _ {lo la l≈ lo′ la′ l≈′} {C : Category lo la l≈} {D : Category lo′ la′ l≈′} where IsEnd : {F : Profunctor C C D} → Wedge F → Set (lo ⊔ la ⊔ ...
------------------------------------------------------------------------ -- The Agda standard library -- -- An example of how Algebra.IdempotentCommutativeMonoidSolver can be -- used ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Algebra.Solver.Idemp...
{-# OPTIONS --allow-unsolved-metas #-} open import Agda.Builtin.Equality open import Agda.Builtin.List postulate A : Set nilA : A consA : A → List A → A w/e : {x y : A} → x ≡ y data D : List A → Set where nil : D [] cons : (x : A) (xs : List A) → D (x ∷ xs) foo : ∀ {xs} (d : D xs) (let f : D xs → ...
{-# OPTIONS --without-K --exact-split --safe #-} module mwe where open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) public -------------------------------------------------------------------------------- data ℕ : Set lzero where zero-ℕ : ℕ succ-ℕ : ℕ → ℕ add-ℕ : ℕ → ℕ → ℕ add-ℕ x zero-ℕ = x add-ℕ x (s...
-- Andreas, 2012-09-13 -- (The signature on the previous line does not apply to all of the -- text in this file.) module RelevanceSubtyping where -- this naturally type-checks: one : {A B : Set} → (.A → B) → A → B one f x = f x -- Subtyping is no longer supported for irrelevance, so the following -- code is no longer...
{-# OPTIONS --without-K --safe #-} module Definition.Typed.EqualityRelation where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Weakening using (_∷_⊆_) -- Generic equality relation used with the logical relation record EqRelSet : Set₁ where constructor eqRel field ...
module Agda.Builtin.FromNeg where open import Agda.Primitive open import Agda.Builtin.Nat record Negative {a} (A : Set a) : Set (lsuc a) where field Constraint : Nat → Set a fromNeg : ∀ n → {{_ : Constraint n}} → A open Negative {{...}} public using (fromNeg) {-# BUILTIN FROMNEG fromNeg #-} {-# DISPLAY N...