text stringlengths 4 690k |
|---|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Natural number division
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Nat.DivMod where
open import Agda.Builtin.Nat using (div-helper; ... |
{-# OPTIONS --cubical #-}
module Miscellaneous.CubicalInteger where
import Lvl
open import Numeral.Natural as ℕ using (ℕ)
open import Numeral.Sign as Sign using (−|+ ; −|0|+ ; ➖ ; ➕)
open import Type.Cubical
open import Type.Cubical.Path.Equality
open import Type
apply : ∀{ℓ}{T : Type{ℓ}}{x y : T} → Interval → ... |
-- simply-typed label-dependent λ-calculus w/ DeBruijn indices
-- {-# OPTIONS --show-implicit #-}
module LDLC where
open import Agda.Primitive
open import Agda.Builtin.Bool
open import Data.Bool.Properties hiding (≤-trans ; <-trans ; ≤-refl ; <-irrefl)
open import Data.Empty
open import Data.Nat renaming (_+_ to _+ᴺ... |
-- This module introduces implicit arguments.
module Id8 where
id8 : {A : Set} -> A -> A
id8 = \{A} x -> x -- this doesn't work since the type checker assumes
-- that the implicit A has been has been omitted in
-- the left-hand side (as in id6).
|
module Mask where
open import Basics
open import Ix
open import All
open import Cutting
open import Splitting
open import Perm
open import Interior
open import Recutter
module MASK {I}(C : I |> I) where
open _|>_
open INTERIOR C
open RECUTTER C
module CHOP {P}(pc : CutKit P)(rec : Recutter) where
glue ... |
{-
This file contains:
- Definition of set truncations
-}
{-# OPTIONS --safe #-}
module Cubical.HITs.SetTruncation.Base where
open import Cubical.Core.Primitives
open import Cubical.Foundations.Pointed
-- set truncation as a higher inductive type:
data ∥_∥₂ {ℓ} (A : Type ℓ) : Type ℓ where
∣_∣₂ : A → ∥ A ∥₂
sq... |
open import Categories
open import Monads
module Monads.EM {a b}{C : Cat {a}{b}}(M : Monad C) where
open import Library
open import Functors
open Cat C
open Monad M
record Alg : Set (a ⊔ b) where
constructor alg
field acar : Obj
astr : ∀ Z → Hom Z acar → Hom (T Z) acar
alaw1 : ∀ {Z}{f : Hom Z ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Sn.Properties where
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.Path
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.... |
{-# OPTIONS --safe --warning=error #-}
open import Sets.EquivalenceRelations
open import Setoids.Setoids
open import Groups.FreeGroup.Definition
open import Groups.Homomorphisms.Definition
open import Groups.Homomorphisms.Lemmas
open import Groups.Definition
open import Decidable.Sets
open import Numbers.Naturals.Orde... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
open import Categories.Object.BinaryProducts
module Categories.Object.BinaryProducts.N-ary {o ℓ e}
(C : Category o ℓ e)
(BP : BinaryProducts C)
where
open Category C
open BinaryProducts BP
open Equiv
import Categories.Object.Product
open ... |
{-# OPTIONS --cubical --no-import-sorts #-}
module Cubical.Codata.Stream where
open import Cubical.Codata.Stream.Base public
open import Cubical.Codata.Stream.Properties public
|
module Structure.Operator.Ring.Proofs where
import Data.Tuple as Tuple
open import Functional
open import Logic.IntroInstances
open import Logic.Propositional
import Lvl
open import Structure.Function
open import Structure.Function.Domain
open import Structure.Operator.Properties
open import Structure.Operat... |
module Lambda where
open import Data.Bool using (true; false)
open import Data.Nat renaming (_≟_ to _≟N_)
import Data.Stream as S
open import Data.Vec using ([]; _∷_)
open import Relation.Binary.PropositionalEquality
open import Check
open import Eval
open import Operations.Combinatorial
open impor... |
-- Andreas, 2012-06-05 let for record patterns
-- {-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.term.let.pattern:100 #-}
-- {-# OPTIONS -v tc.lhs.top:100 #-}
module LetPair where
import Common.Level
-- open import Common.Equality
data _×_ (A B : Set) : Set where
_,_ : (fst : A)(snd : B) → A × B
swap : {A ... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Library.Data.Unit where
open import Light.Level using (Level ; Setω)
record Dependencies : Setω where
record Library (dependencies : Dependencies) : Setω where
field
ℓ : Level
Unit : Set ℓ
... |
{-# OPTIONS --without-K #-}
module RepresPerm where
open import Enumeration using (Enum)
open import Equiv
using (_≃_; id≃; sym≃; trans≃; mkqinv; module qinv; _⋆_; path⊎)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong)
open import Data.Nat using (ℕ; suc)
open import Data.Fin using... |
open import Data.Product using ( ∃ ; _×_ ; _,_ ; proj₁ ; proj₂ )
open import Relation.Unary using ( _∈_ )
open import Web.Semantic.DL.ABox using ( ABox )
open import Web.Semantic.DL.ABox.Interp using ( Interp ; _*_ )
open import Web.Semantic.DL.ABox.Interp.Morphism using
( _≲_ ; ≲-trans ; _**_ ; _≋_ )
open import Web... |
module Sort where
open import Sec4
import Sec2
postulate _≤_ : {A : Set} → A → A → Prop
postulate tot-list : {A : Set} → (a b : A) → (a ≤ b) ∨ (b ≤ a)
postulate trans-list : {A : Set} → (a b c : A) → (a ≤ b) → (b ≤ c) → (a ≤ c)
-- XXX: Definition of a list
data List (A : Set) : Set where
Nil : List A... |
open import Coinduction using ( ♭ )
open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; sym ; cong ; cong₂ )
open import System.IO.Transducers using ( _⇒_ ; inp ; out ; done ; out*' ; _⟫_ ; _⟨&⟩_ ; _⟨&⟩[_]_ ; discard ; π₁ ; π₂ ; ⟦_⟧ ; _≃_ )
open import System.IO.Transducers.Session using ( [] ; _∷_ ;... |
module fold-Tree where
open import map-Tree using (Tree; leaf; node)
fold-Tree : ∀ {A B C : Set} → (A → C) → (C → B → C → C) → Tree A B → C
fold-Tree f _ (leaf a) = f a
fold-Tree f g (node treeˡ b treeʳ) = g (fold-Tree f g treeˡ) b (fold-Tree f g treeʳ)
|
module moveArg where
open import Agda.Builtin.Nat
open import Agda.Builtin.Bool
stuff : ( number : Nat) -> Bool -> Bool
stuff number bool = {! !}
stuff2 : Nat -> Bool -> Bool
stuff2 number bool = bool
nonsense : Bool
nonsense = stuff 0 true
dep : (A : Set) -> (B : A) -> Bool -> Bool
dep a b c = c
unnamedDep : ... |
{-# OPTIONS --without-K --safe #-}
-- This module defines an intermediate calculus that is set up in the D<: universe
-- which bridges F<:- and D<:. The goal here is purely technical - to simply reduce
-- duplication.
module DsubReduced where
open import Data.List as List
open import Data.List.All as All
open import ... |
{-# OPTIONS --safe #-}
module Cubical.Data.List.FinData where
open import Cubical.Foundations.Prelude
open import Cubical.Data.List
open import Cubical.Data.FinData
variable
ℓ : Level
A : Type ℓ
-- copy-paste from agda-stdlib
lookup : ∀ (xs : List A) → Fin (length xs) → A
lookup (x ∷ xs) zero = x
lookup (x ∷ ... |
-- Minimal implicational modal logic, PHOAS approach, final encoding
module Pf.BoxMp where
open import Lib using (Nat; suc)
-- Types
infixr 0 _=>_
data Ty : Set where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
BOX : Ty -> Ty
-- Context and truth judgement with modal depth
Cx : Set1
Cx = Ty -> Nat ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Equivalence closures of binary relations
--
-- This module is DEPRECATED. Please use the
-- Relation.Binary.Construct.Closure.Equivalence module directly.
---------------------------------------------------------... |
module Examples where
open import Prelude
open import T
---- some example programs
-- boy, de bruijn indexes are unreadable
w = weaken-closed
one : TNat
one = suc zero
two = suc one
three = suc two
t-plus : TCExp (nat ⇒ nat ⇒ nat)
t-plus = Λ (Λ (rec (var (S Z)) (var Z) (suc (var Z))))
t-compose : ∀{A B C} → TCExp ((... |
open import Prelude
open import Nat
open import List
module contexts where
-- helper function
diff-1 : ∀{n m} → n < m → Nat
diff-1 n<m = difference (n<m→1+n≤m n<m)
---- the core declarations ----
-- TODO move definitions
_ctx : Set → Set
A ctx = List (Nat ∧ A)
-- nil context
∅ : {A : Set} → A ctx
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Empty.Base where
open import Cubical.Core.Everything
data ⊥ : Type₀ where
rec : ∀ {ℓ} {A : Type ℓ} → ⊥ → A
rec ()
elim : ∀ {ℓ} {A : ⊥ → Type ℓ} → (x : ⊥) → A x
elim ()
|
open import Stlc hiding (⟹*-Preorder; _⟹*⟪_⟫_; example₀; example₁)
open import Relation.Binary.PropositionalEquality as P using (_≡_; _≢_; refl)
open import Relation.Binary using (Preorder)
import Relation.Binary.PreorderReasoning as PreorderReasoning
⟹*-Preorder : Preorder _ _ _
⟹*-Preorder = record
{ Carrier = ... |
{- 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.Impl.OBM.Rust.RustTypes
open import LibraBFT.ImplShared.... |
module Problem1 where
{-
If we list all the natural numbers below 10 that are multiples of 3 or
5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
-}
open import Data.Nat
open import Data.Nat.Divisibility
open import Data.Nat.DivMod
open import Data.Nat... |
-- {-# OPTIONS -v tc.cover.splittree:10 -v tc.cc:30 #-}
module Issue829 where
record ⊤ : Set where
constructor tt
data ⊥ : Set where
postulate
P : ⊥ → Set
data D : (A : Set) → A → Set where
c : ⊥ → (x : ⊤) → D ⊤ x
f : {A : Set} {x : A} → D A x → ⊥
f (c () .tt)
g : (x : ⊥) → P x
g ()
h : (A : Set) (x : A) (... |
--
-- Created by Dependently-Typed Lambda Calculus on 2019-05-15
-- one-linear-layout
-- Author: ice10
--
{-# OPTIONS --without-K --safe #-}
import Relation.Binary
variable A : Set
private variable B : Set
|
module Data.Num.Continuous where
open import Data.Num.Core
open import Data.Num.Maximum
open import Data.Num.Bounded
open import Data.Num.Next
open import Data.Num.Increment
open import Data.Nat
open import Data.Nat.Properties
open import Data.Nat.Properties.Simple
open import Data.Nat.Properties.Extra
open import D... |
module FFI.Data.HaskellString where
open import Agda.Builtin.String using (String)
{-# FOREIGN GHC import qualified Data.String #-}
{-# FOREIGN GHC import qualified Data.Text #-}
postulate HaskellString : Set
{-# COMPILE GHC HaskellString = type Data.String.String #-}
postulate pack : HaskellString → String
{-# COM... |
------------------------------------------------------------------------
-- Definitions of functions that generate list
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --exact-split #-}
module Math.Combinatorics.ListFunction where
open import Data.List
open imp... |
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.EilenbergSteenrodZ where
open import Cubical.Homotopy.EilenbergSteenrod
open import Cubical.ZCohomology.Base
open import Cubical.ZCohomology.Properties
open import Cubical.ZCohomology.GroupStructure
open im... |
module Modal where
open import Prelude
open import Star
data Progress (A : Set) : Set where
cont : A -> Progress A
stop : Progress A
record Some {A : Set}(R : Rel A) : Set where
field
a : A
b : A
edge : R a b
some : {A : Set}{R : Rel A}{a b : A} -> R a b -> Some R
some x = record {a = _; b ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Utils.Product where
open import Level
open import Data.Product using (_×_; Σ; _,_; proj₁; proj₂)
open import Relation.Binary.PropositionalEquality
-- "very dependent" versions of map and zipWith
map⁎ : ∀ {a b p q} {A : Set a} {B : A → Set b} {P : A → Set p} {Q : {x... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.SetoidDiscrete where
open import Categories.Category
open import Level
open import Relation.Binary using (Setoid)
open import Function
open import Data.Unit
{-
This is a better version of Discrete, which is more in line with
the rest of this library, an... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Sets.EquivalenceRelations
open import Setoids.Setoids
open import Rings.Definition
open import Rings.PrincipalIdealDomains.Definition
open import Rings.IntegralDomains.Definition
open import Rings.Ideals.Maximal.Definition
modu... |
module x02-842Induction where
-- Library
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; sym)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎)
open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_)
-- PLFA coverage of identity, associativity, commutativity, distributivity.
... |
{-# OPTIONS --cubical #-}
module _ where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
data Interval : Set where
left right : Interval
sq : left ≡ right
-- Agda should not loop when typechecking the following definition.
--
-- Termination checking should catch that `id left` is no... |
import cedille-options
open import general-util
module process-cmd
(options : cedille-options.options)
{mF : Set → Set}
{{mFm : monad mF}}
(progress-update : string → mF ⊤)
(write-to-log : string → mF ⊤) where
--open import cedille-find
open import cedille-types
open import classify options {mF} ⦃ mFm ⦄ wri... |
{-
This second-order signature was created from the following second-order syntax description:
syntax Naturals | Nat
type
N : 0-ary
term
ze : N
su : N -> N
nrec : N α (α,N).α -> α
theory
(zeβ) z : α s : (α,N).α |> nrec (ze, z, r m. s[r,m]) = z
(suβ) z : α s : (α,N).α n : N |>... |
{-# OPTIONS --instance-search-depth=10 #-}
data ⊥ : Set where
it : {A : Set} {{_ : A}} → A
it {{x}} = x
postulate Eq : Set → Set
instance
postulate weaken : Eq ⊥ → Eq _
loop : Eq ⊥
loop = it
|
{-# OPTIONS --universe-polymorphism #-}
module Issue228 where
postulate
Level : Set
zero : Level
suc : Level → Level
∞ : Level
_⊔_ : Level → Level → Level
{-# BUILTIN LEVEL Level #-}
{-# BUILTIN LEVELZERO zero #-}
{-# BUILTIN LEVELSUC suc #-}
{-# BUILTIN LEVELMAX _⊔_ #-}
infixl 6 _⊔_
dat... |
-- {-# OPTIONS -v tc.polarity:10 -v tc.conv.elim:25 #-}
module Issue755 where
open import Common.Prelude renaming (Nat to ℕ)
open import Common.Equality
abstract
foo : Bool → ℕ → ℕ
foo true x = 0
foo false x = 0
-- should work
works : ∀{b} → foo b 0 ≡ foo b 1 → foo b 0 ≡ foo b 1
works refl = refl
-- s... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.CohomologyRings.Coproduct where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat renaming ... |
-- {-# OPTIONS -v tc.lhs:40 #-} {-# OPTIONS -v scope.pat:40 #-}
module Issue822 where
module M₁ where
postulate [_] : Set
module M₂ where
data D : Set₁ where
[_] : Set → D
module M₃ where
data D : Set₁ where
[_] : Set → D
open M₁
open M₂
open M₃
Foo : _ → Set
Foo [ A ] = A
-- Strange error messag... |
{-# OPTIONS --no-auto-inline #-}
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit
open import Agda.Builtin.List
open import Agda.Builtin.Equality
_>>_ : {A B : Set} → TC A → TC B → TC B
m >> m' = m >>= λ _ → m'
-- Normally auto-inlined
id : {A ... |
-- Andreas, 2017-08-23, issue #2714
-- This file should compile from within the interaction mode
-- without warning about missing main function.
{-# OPTIONS --no-main #-}
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Order morphisms
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary.Core
module Relation.Binary.Morphism.Structures
{a b} {... |
module CoInf where
open import Codata.Musical.Notation
-- Check that ∞ can be used as an "expression".
test : Set → Set
test = ∞
|
{-# OPTIONS --warning=error --safe --without-K #-}
open import Groups.Definition
open import Groups.Groups
open import Groups.Homomorphisms.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Groups.Lemmas
open import Groups.Homomorphisms.Lemmas
module Groups.QuotientGroup.Definit... |
module Prolegomenon where
open import Agda.Primitive
open import Relation.Binary
open import Algebra
open import Category.Applicative.Predicate
open import Algebra
open import Algebra.Structures
open import Category.Monad.Indexed
open import Algebra.FunctionProperties.Core
open import Function
PowerRightIdentity : ... |
module Int where
open import Agda.Builtin.FromNat
open import Agda.Builtin.FromNeg
open import Data.Char hiding (fromNat)
open import Data.Integer hiding (_≤_; suc)
open import Data.Integer.Literals
open import Data.List
open import Data.Nat hiding (_≤_)
open import Data.String
open import Data.Unit hiding (_≤_)
open ... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Sigma
open import lib.NType2
open import Preliminaries
open import Truncation_Level_Criteria
module Anonymous_Existence_CollSplit where
-- CHAPTER 4
-- SECTION 4.1
-- Lemma 4.1.2, part 1
constant-implies-path-constant : ∀ {i j} {X : Type i} ... |
{-# OPTIONS --without-K #-}
module PathStructure.Unit where
open import Equivalence
open import Types
split-path : {x y : ⊤} → x ≡ y → ⊤
split-path _ = _
merge-path : {x y : ⊤} → ⊤ → x ≡ y
merge-path _ = refl
split-merge-eq : {x y : ⊤} → (x ≡ y) ≃ ⊤
split-merge-eq
= split-path
, (merge-path , λ _ → refl)
, (m... |
-- Andreas, 2017-11-01, issue #2824
-- Allow built-ins that define a new name to be in parametrized module.
module Issue2824SizeU (A : Set) where -- This is the top-level module header.
{-# BUILTIN SIZEUNIV SizeU #-}
-- Should succeed.
|
open import Agda.Builtin.Nat
data Vec (A : Set) : Nat → Set where
variable
A : Set
x : A
n : Nat
xs : Vec A n
postulate
IsNil : Vec A 0 → Set
foo : (xs : Vec A n) → IsNil xs
foo = {!!}
|
module prelude.Stream where
open import prelude
open import Data.List as L using (List)
record Stream (a : Set) : Set where
constructor _∷_
coinductive
field
hd : a
tl : Stream a
open Stream
take : ∀ {a} → ℕ → Stream a → List a
take ℕz xs = L.[]
take (ℕs n) xs = hd xs L.∷ take n (tl xs)
|
-- WARNING: This file was generated automatically by Vehicle
-- and should not be modified manually!
-- Metadata
-- - Agda version: 2.6.2
-- - AISEC version: 0.1.0.1
-- - Time generated: ???
{-# OPTIONS --allow-exec #-}
open import Vehicle
open import Vehicle.Data.Tensor
open import Data.Product
open import Data.I... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cohomology.Theory
open import groups.ExactSequence
open import groups.HomSequence
module cw.cohomology.grid.LongExactSequence {i} (CT : CohomologyTheory i)
{X Y Z : Ptd i} (n : ℤ) (f : X ⊙→ Y) (g : Y ⊙→ Z) where
open CohomologyTheory CT
open impo... |
-- Andreas, 2014-11-25, issue reported by Peter Divianski (divipp)
{-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc:10 #-}
-- {-# OPTIONS -v tc.inj:49 #-}
-- {-# OPTIONS -v tc.polarity:49 #-}
-- {-# OPTIONS -v tc.lhs:40 #-}
-- After loading the following Agda code, the last occurrence of 'one' is yellow.
-- Rema... |
open import Agda.Builtin.Equality
_∋_ : ∀ {a} (A : Set a) → A → A
A ∋ x = x
cong : ∀ {a b} {A : Set a} {B : Set b}
(f : A → B) {x y} → x ≡ y → f x ≡ f y
cong f refl = refl
record IsRG (Node : Set) (Edge : Set) : Set where
field
src : Edge → Node
tgt : Edge → Node
rfl : Node → Edge
eq-src-rf... |
{- Jesper, 2019-07-05: At first, the fix to #3859 causes the line below to
raise a type error:
Cannot instantiate the metavariable _6 to solution Set
(Agda.Primitive.lsuc (Agda.Primitive.lsuc Agda.Primitive.lzero)
Agda.Primitive.⊔ Agda.Primitive.lsuc a) since it contains the
variable a which is not in scope of... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Ints.DiffInt.Base where
open import Cubical.Foundations.Prelude
open import Cubical.HITs.SetQuotients
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Sigma
open import Cubical.Data.Nat hiding (+-comm ; +-assoc) renaming (_+_ ... |
{- 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 Level using (0ℓ)
open import Data.String
-- This module defines ... |
------------------------------------------------------------------------------
-- Distributive laws on a binary operation: Task B
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univers... |
-- Andreas, 2019-07-05, during work on issue #3889
-- Test-case for with extracted from the standard library
{-# OPTIONS --cubical-compatible #-}
open import Agda.Primitive
open import Agda.Builtin.Equality
open import Agda.Builtin.List
open import Common.Equality
open import Common.Product
data Any {a}{A : Set a} ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.CategorySolver where
open import Level
open import Categories.Category
open import Categories.Functor hiding (equiv) renaming (id to idF; _≡_ to _≡F_; _∘_ to _∘F_; ∘-resp-≡ to ∘F-resp-≡F)
open import Categories.NaturalTransformation hiding (equiv) renaming (id... |
------------------------------------------------------------------------------
-- The FOTC co-inductive lists type
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism ... |
module Eq where
infix 4 _≡_
{-
data _≡_ {A : Set} : A → A → Set where
Refl : {x : A} → x ≡ x
-}
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
Refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
{-# BUILTIN REFL Refl #-}
|
-- {-# OPTIONS -v tc.cc:30 -v tc.cover.splittree:10 #-}
-- 2013-05-03 Andreas, issue raise by Nisse.
module Issue842 where
data D : Set where
c₁ c₂ : D
F : D → Set₁
F c₁ = Set
F = λ _ → Set
-- While not unthinkable, this is not the intended use of varying arity.
-- Since we are already splitting on the first argum... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Category.Monoidal
module Experiment.Categories.Solver.Category.Monoidal
{o ℓ e} {𝒞 : Category o ℓ e} (M : Monoidal 𝒞) where
open import Level
open import Relation.Binary using (Rel; REL)
open import Data.List
open import C... |
{-# OPTIONS --without-K --exact-split --allow-unsolved-metas #-}
module 23-id-pushout where
import 22-descent
open 22-descent public
-- Section 19.1 Characterizing families of maps over pushouts
module hom-Fam-pushout
{ l1 l2 l3 l4 l5 : Level}
{ S : UU l1}
{ A : UU l2}
{ B : UU l3}
{ f : S → A}
{ g : S ... |
-- In Agda 2.5.3 the error was:
-- μ₂ is not strictly positive, because it occurs
-- in the third argument to ⟦_⟧
-- in the type of the constructor fix
-- in the definition of μ₂.
open import Data.Nat using (ℕ;zero;suc)
open import Data.Fin using (Fin;zero;suc)
open import Data.Vec
open import Data.Empty
open import ... |
{-# OPTIONS --without-K #-}
module hott.level.core where
open import level
open import sum
open import sets.nat.core
open import equality.core
open import equality.groupoid
h : ∀ {i} → ℕ → Set i → Set i
h 0 X = Σ X λ x → (x' : X) → x ≡ x'
h (suc n) X = (x x' : X) → h n (x ≡ x')
contr : ∀ {i} → Set i → Set i
contr =... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Level
open import Ordinals
module OD {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.Nat.Pr... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cw.CW
open import homotopy.DisjointlyPointedSet
open import groups.Int
open import cohomology.Theory
open import cohomology.ChainComplex
module cw.cohomology.ReconstructedCochainsIsoCellularCochains {i : ULevel}
(OT : OrdinaryTheory i) where
op... |
module Squash where
data _==_ {A : Set}(a : A) : A -> Set where
refl : a == a
data Wrap (A : Set) : Set where
wrap : A -> Wrap A
data Squash (A : Set) : Set where
squash : .A -> Squash A
postulate
A : Set
a1 a2 : A
irr : squash a1 == squash a2
irr = refl
|
module Issue2935 where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
bad : ℕ → ℕ
bad zero = zero
bad suc = zero
|
module Impure.LFRef.Syntax where
open import Prelude
open import Data.Vec hiding ([_]; map)
open import Data.List hiding ([_])
open import Data.List.All hiding (lookup)
data Term : (n : ℕ) → Set
data Type : (n : ℕ) → Set
data Term where
var : ∀ {n} → Fin n → Term n
loc : ∀ {n} → ℕ → Term n
unit : ∀ {n} → Term ... |
{-# OPTIONS --type-in-type #-}
Ty% : Set; Ty%
= (Ty : Set)
(ι : Ty)
(arr : Ty → Ty → Ty)
→ Ty
ι% : Ty%; ι% = λ _ ι% _ → ι%
arr% : Ty% → Ty% → Ty%; arr% = λ A B Ty% ι% arr% → arr% (A Ty% ι% arr%) (B Ty% ι% arr%)
Con% : Set;Con%
= (Con% : Set)
(nil : Con%)
(snoc : Con% → Ty% → Con%)
→ Con%
nil% ... |
open import FRP.JS.String using ( String ; _≟_ ; _<_ )
open import FRP.JS.Bool using ( Bool ; true ; false ; _∧_ )
open import FRP.JS.True using ( True )
open import FRP.JS.Maybe using ( Maybe ; just ; nothing )
module FRP.JS.Keys where
infixr 4 _∷_
data IKeys : Set where
[] : IKeys
_∷_ : (k : String) → (ks : IK... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Ring.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 Cubic... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Cocontinuous where
open import Level
open import Data.Product using (Σ)
open import Categories.Category
open import Categories.Functor
import Categories.Category.Construction.Cocones as Coc
import Categories.Diagram.Cocone.Properties as Cocₚ
import Categor... |
module Data.Num.Unary where
open import Data.Unit
open import Data.Empty
open import Data.List
open import Data.Nat renaming (_+_ to _⊹_)
data Digit : Set where
[1] : Digit
Unary : Set
Unary = List Digit
_⊕_ : Digit → Digit → Digit
[1] ⊕ [1] = [1]
_⊚_ : Digit → Digit → Digit
[1] ⊚ [1] = [1]
add : Digit → Unar... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Vec.Relation.Binary.Pointwise.Inductive directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module... |
-- The previous error was:
-- Auto in hole `?0` raises a typing error:
-- (zero ∷ L) != L of type (List ℕ)
-- when checking that the expression x₁ has type (foo L)
open import Agda.Builtin.List
open import Agda.Builtin.Nat
data ⊥ : Set where
foo : List Nat → Set
foo [] = ⊥
foo (zero ∷ L) = foo L
foo (... |
{-# OPTIONS --rewriting #-}
open import Common.Nat
open import Common.Equality
postulate _↦_ : ∀ {a} {A : Set a} → A → A → Set
{-# BUILTIN REWRITE _↦_ #-}
postulate
P : ∀ {a} {A : Set a} → A → Set
postulate rew₁ : (f : Nat → Nat → Nat) → P (λ (x y z : Nat) → f z x) ↦ P f
{-# REWRITE rew₁ #-}
f : Nat → Nat → Na... |
module SizedIO.Console where
open import Level using () renaming (zero to lzero)
open import Size
open import NativeIO
open import SizedIO.Base
data ConsoleCommand : Set where
putStrLn : String → ConsoleCommand
getLine : ConsoleCommand
ConsoleResponse : ConsoleCommand → Set
ConsoleResponse (putStrLn s) = Unit
... |
{-# OPTIONS --cubical-compatible #-}
module Common.Nat where
open import Agda.Builtin.Nat public
using ( Nat; zero; suc; _+_; _*_ )
renaming ( _-_ to _∸_ )
pred : Nat → Nat
pred zero = zero
pred (suc n) = n
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of permutation
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Relation.Binary.Permutation.Inductive.Properties where
ope... |
{-# OPTIONS --without-K --exact-split --rewriting #-}
open import lib.Basics
open import lib.types.Coproduct
open import lib.types.Sigma
open import lib.types.Pi
open import lib.types.Paths
open import Graphs.Definition
open import Coequalizers.Definition
open import Util.Misc
module Coequalizers.PullbackStability w... |
module WrongHidingInLambda where
f : (A : Set) -> A -> A
f = \{A} x -> x
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Universe levels
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Level where
-- Levels.
open import Agda.Primitive as Prim public
using (... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Construction.Properties.Presheaves.Complete {o ℓ e} (C : Category o ℓ e) where
open import Categories.Category.Complete
open import Categories.Category.Complete.Finitely
open import Categories.Category.Complete.Properties
o... |
------------------------------------------------------------------------
-- The parser type
------------------------------------------------------------------------
module TotalParserCombinators.Parser where
open import Algebra
open import Category.Monad
open import Codata.Musical.Notation
open import Data.List
open ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.