text stringlengths 4 690k |
|---|
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED, please use `Data.Record` directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Decid... |
{-# OPTIONS --rewriting --confluence-check #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
record Box (A : Set) : Set where
constructor box
field
unbox : A
open Box
postulate
A : Set
a b : A
f : (X : Set) → X → A
g : (X : Set) → X
rewf₁ : f (Box A) (box a) ≡ a
re... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Construction.Diagonal where
-- A variety of Diagonal functors
open import Level
open import Data.Product using (_,_)
open import Categories.Category
open import Categories.Functor
open import Categories.Category.Product
open import Categories.Category.Cons... |
{-# OPTIONS --cubical --no-exact-split --safe #-}
module Cubical.Data.NatMinusOne.Base where
open import Cubical.Core.Primitives
open import Cubical.Data.Nat
data ℕ₋₁ : Set where
neg1 : ℕ₋₁
suc : (n : ℕ₋₁) → ℕ₋₁
_+₋₁_ : ℕ → ℕ₋₁ → ℕ₋₁
0 +₋₁ n = n
suc m +₋₁ n = suc (m +₋₁ n)
ℕ→ℕ₋₁ : ℕ → ℕ₋₁
ℕ→ℕ₋₁ n = suc (n +₋₁ ... |
module fib1 where
data ℕ : Set where
Z : ℕ
S : ℕ -> ℕ
_+_ : ℕ -> ℕ -> ℕ
n + Z = n
n + S m = S (n + m)
one : ℕ
one = S Z
fib : ℕ -> ℕ
fib Z = one
fib (S Z) = one
fib (S (S n)) = fib n + fib (S n)
|
import Lvl
open import Structure.Operator.Vector
open import Structure.Setoid
open import Type
module Structure.Operator.Vector.Eigen
{ℓᵥ ℓₛ ℓᵥₑ ℓₛₑ}
{V : Type{ℓᵥ}} ⦃ equiv-V : Equiv{ℓᵥₑ}(V) ⦄
{S : Type{ℓₛ}} ⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄
(_+ᵥ_ : V → V → V)
(_⋅ₛᵥ_ : S → V → V)
(_+ₛ_ _⋅ₛ_ : S → S → S)
⦃... |
{-# OPTIONS --without-K #-}
open import Base
open import Homotopy.Truncation
open import Homotopy.Connected
open import Spaces.Suspension
open import Homotopy.PushoutDef
import Homotopy.PushoutUP as PushoutUP
-- In this file I prove that if [A] is n-connected and its (n+1)-truncation is
-- inhabited, then [suspension... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.types.Bool
open import lib.types.FunctionSeq
open import lib.types.Paths
open import lib.types.Pointed
open import lib.types.Suspension.Core
open import lib.types.Suspension.Trunc
open import lib.types.Truncation
mod... |
module Oscar.Class.Congruity where
open import Oscar.Class.Extensionality
open import Oscar.Level
record Congruity {a} {A : Set a} {ℓ₁} (_≋₁_ : A → A → Set ℓ₁)
{b} {B : Set b} {ℓ₂} (_≋₂_ : B → B → Set ℓ₂)
: Set (a ⊔ ℓ₁ ⊔ b ⊔ ℓ₂) where
field
congruity : ∀ (μ : A → B) {x y} → x ≋₁ y → μ x... |
-- 2014-07-27 Andreas, issue reported by phadei
module _ where
-- trait A { type T <: A }
record A (self : Set) (T : Set) : Set₁ where
inductive
field
T⊂A : T → A T self
-- trait C extends A with B { type T <: C }
record C (self : Set) (T : Set) : Set₁ where
inductive
field
a : A T self
T⊂C : T →... |
∙_ : Set₁ → Set₁
∙ X = X
Foo : Set
Foo = ∙ Set
|
open import Agda.Builtin.List
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit
open import Agda.Builtin.Reflection
pattern vArg x = arg (arg-info visible (modality relevant quantity-ω)) x
macro
macaroo : Term → TC ⊤
macaroo hole = unify hole (con (quote suc) (vArg unknown ∷ []))
test : Nat
test = macar... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Instances.RingAlgebras where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Algebra.Ring
open import Cubical.Algebra.Algebra
open import Cubical.Categories.Category
open Category
open AlgebraHoms
private
variabl... |
open import Signature
module Program (Σ : Sig) (V : Set) where
open import Function
open import Data.Empty
open import Data.Unit
open import Data.Product as Prod renaming (Σ to ⨿)
open import Data.Nat
open import Data.Fin
open import Data.List
open import Terms Σ
FinFam : Set → Set
FinFam X = ⨿ ℕ λ n → (Fin n → X)
... |
-- Andreas, 2017-04-24, issue #2552
-- Let bindings in top-level module telescope
-- make top-level interactive commands crash.
-- {-# OPTIONS -v interaction.top:20 #-}
open import Agda.Primitive
module _ (let foo = lzero) (A : Set) where
-- C-c C-n A
-- WAS:
-- An internal error has occurred. Please report this a... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.RingSolver.RawAlgebra where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat using (ℕ)
open import Cubical.Data.Int renaming (_+_ to _+ℤ_ ; _·_ to _·ℤ_ ; -_ to -ℤ_ ; _-_ to _-ℤ_ ; +Assoc to +ℤAssoc ; +Comm to +ℤComm ; -DistL· to -ℤDistL·ℤ)
open import ... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Simply-typed changes (Fig. 3 and Fig. 4d)
------------------------------------------------------------------------
import Parametric.Syntax.Type as Type
module Parametric.Change.Type
(Base : Type.Structure)
wh... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.ModalWedgeExtension {i} (M : Modality i)
{A : Type i} {a₀ : A} {B : Type i} {b₀ : B} where
open Modality M
private
X = ⊙[ A , a₀ ]
Y = ⊙[ B , b₀ ]
open import homotopy.FiberOfWedgeToProduct X Y
record args : Type (lsucc i) wh... |
{-# OPTIONS --without-K --safe #-}
open import Level
-- This is really a degenerate version of Categories.Category.Instance.Zero
-- Here EmptySet is not given an explicit name, it is an alias for Lift o ⊥
module Categories.Category.Instance.EmptySet where
open import Data.Unit
open import Data.Empty using (⊥; ⊥-elim... |
open import Data.Nat using ( ℕ )
module README ( n : ℕ ) where
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Deep Embedding for Propositional Logic.
------------------------------------------------------------------------------
open import Data.PropFormula n ... |
{-
Technical results about elementary transformations
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.Matrix.Elementaries where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Data.Nat hiding (_+_ ; _·_)
open import Cubical.Data.Nat.Order
open import Cubical.Dat... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Coproduct
open import lib.types.Paths
open import lib.types.Pointed
open import lib.types.Pushout
open import lib.types.PushoutFlattening
open import lib.types.Span
open import lib.types.Unit
-- Wedge of two pointed types is defined as a particu... |
open import Categories
open import Monads
module Monads.Kleisli.Adjunction {a b}{C : Cat {a}{b}}(M : Monad C) where
open Cat C
open Monad M
open import Library
open import Functors
open import Monads.Kleisli M
open import Adjunctions
open import Monads.Kleisli.Functors M
open Fun
KlAdj : Adj C Kl
KlAdj = record {
... |
------------------------------------------------------------------------------
-- Conversion rules for the Collatz function
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-poly... |
module Untyped.Main where
open import Function
open import Data.Nat
open import Data.Unit
open import Data.Product
open import Data.List
open import Data.Sum
open import Category.Monad
open import Strict
open import Untyped.Monads
open import Untyped.Abstract
open M
-- the monad in which we interpret expressions ... |
module _ where
data Sigma (A : Set)(B : A → Set) : Set where
_,_ : (x : A) → B x → Sigma A B
record Top : Set where
_o_ : {A B : Set}{C : Set1} →
(f : B → C) → (g : A → B) → (A → C)
f o g = \ x → f (g x)
mutual
data U : Set where
top : U
sig : (X : U) → (T X → U) → U
T : U → Set
T top = Top... |
open import Agda.Builtin.IO
open import Agda.Builtin.Unit
record Box (A : Set) : Set where
field
unbox : A
open Box public
record R : Set where
coinductive
field
force : Box R
open R public
r : R
unbox (force r) = r
postulate
seq : {A B : Set} → A → B → B
return : {A : Set} → A → IO A
{-# CO... |
module Selective.Examples.ChatAO where
open import Selective.ActorMonad
open import Selective.Libraries.Channel
open import Selective.Libraries.Call2
open import Selective.Libraries.ActiveObjects
open import Prelude
hiding (Maybe)
open import Data.Maybe as Maybe
hiding (map)
open import Data.List.Prope... |
------------------------------------------------------------------------
-- Laws related to _∣_ and fail
------------------------------------------------------------------------
module TotalParserCombinators.Laws.AdditiveMonoid where
open import Algebra
open import Codata.Musical.Notation
import Data.List.Relation.Bi... |
module Web.URI.Scheme where
open import Web.URI.Scheme.Primitive public using ( Scheme? ; http: ; https: ; ε )
|
module PreludeBool where
import AlonzoPrelude
open AlonzoPrelude
-- import Logic.Base
infixr 20 _||_
infixr 30 _&&_
data Bool : Set where
false : Bool
true : Bool
{-# BUILTIN BOOL Bool #-}
{-# BUILTIN TRUE true #-}
{-# BUILTIN FALSE false #-}
_&&_ : Bool -> Bool -> Bool
true && x = x
false && _ = false... |
module Examples where
open import LF
open import IIRD
open import IIRDr
-- Some helper functions
infixl 50 _+OP_
_+OP_ : {I : Set}{D : I -> Set1}{E : Set1} -> OP I D E -> OP I D E -> OP I D E
γ₀ +OP γ₁ = σ Two (\x -> case₂ x γ₀ γ₁)
-- First something simple.
bool : OPr One (\_ -> One')
bool _ = ι★r +OP ι★r
Bool... |
{-
This second-order signature was created from the following second-order syntax description:
syntax Prod | P
type
_⊗_ : 2-ary | l40
term
pair : α β -> α ⊗ β | ⟨_,_⟩
fst : α ⊗ β -> α
snd : α ⊗ β -> β
theory
(fβ) a : α b : β |> fst (pair(a, b)) = a
(sβ) a : α b : β |> snd (pair(a, b)) ... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.List
open import Agda.Builtin.Sigma
open import Agda.Builtin.Equality
open import Agda.Primitive
record X {a} (A : Set a) : Set a where
field fld : A
d : X Nat
d = recor... |
{- Category of reactive types -}
module CategoryTheory.Instances.Reactive where
open import CategoryTheory.Categories
open import CategoryTheory.BCCCs
open import Data.Nat using (ℕ ; zero ; suc ; _+_) public
open import Data.Unit using () renaming (⊤ to top) public
open import Data.Product
open import Data.Empty usi... |
------------------------------------------------------------------------------
-- Testing the translation of definitions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymor... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax Prod | P
type
_⊗_ : 2-ary | l40
term
pair : α β -> α ⊗ β | ⟨_,_⟩
fst : α ⊗ β -> α
snd : α ⊗ β -> β
theory
(fβ) a : α b : β |> fst (pair(a, b)) = a
(sβ) a : α b : β |> snd (pair(a... |
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Relation.Unary.All.Properties where
open import Prelude hiding (⊥; ⊤)
open import Algebra.Construct.Free.Semilattice.Eliminators
open import Algebra.Construct.Free.Semilattice.Definition
open import Cubical.Foundations.HLevels
open import Data... |
module Example where
loop : Set
loop = loop
_∞_ : Set -> Set -> Set
x ∞ y = x ∞ y
data Nat : Set where
zero : Nat
succ : Nat -> Nat
id : Nat -> Nat
id zero = zero
id (succ n) = succ (id n)
bad : Nat -> Nat
bad n = bad n
_+_ : Nat -> Nat -> Nat
zero + n = n
(succ m) + n = succ (m + n)
bad2 : Nat -> N... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Adjunction.Composition where
open import Level
open import Categories.Category
open import Categories.Functor hiding (equiv; assoc; identityˡ; identityʳ; ∘-resp-≡) renaming (id to idF; _≡_ to _≡F_; _∘_ to _∘F_)
open import Categories.NaturalTransformation hidi... |
module Lec7 where
open import Lec1Done
data List (X : Set) : Set where
[] : List X
_,-_ : X -> List X -> List X
foldrL : {X T : Set} -> (X -> T -> T) -> T -> List X -> T
foldrL c n [] = n
foldrL c n (x ,- xs) = c x (foldrL c n xs)
data Bwd (X : Set) : Set where
[] : Bwd X
_-,_ : Bwd X -> X -> Bwd X
infi... |
module lambda.vec where
open import Data.Nat
open import Data.Fin hiding (_+_)
infixr 40 _▸_
data vec (T : Set) : ℕ → Set where
ε : vec T 0
_▸_ : ∀ {n} → vec T n → T → vec T (suc n)
lookup : ∀ {n} → {T : Set} → Fin n → vec T n → T
lookup zero (Γ ▸ x) = x
lookup (suc i) (Γ ▸ x) = lookup i Γ
|
{-# OPTIONS --without-K #-}
module PiIter where
open import Level using (_⊔_) renaming (zero to l0; suc to lsuc)
open import Universe using (Universe)
open import Categories.Category using (Category)
open import Categories.Groupoid using (Groupoid)
open import Categories.Functor using (Functor)
open import Data.Emp... |
-- An ATP conjecture must be used with postulates.
-- This error is detected by TypeChecking.Rules.Decl.
module ATPBadConjecture2 where
data Bool : Set where
false true : Bool
{-# ATP prove Bool #-}
|
{-# OPTIONS --sized-types #-}
module Automaton.Deterministic.FormalLanguage where
open import Automaton.Deterministic.Finite
open import Automaton.Deterministic
open import Data.Boolean
import Data.Boolean.Operators
open Data.Boolean.Operators.Programming
open import Data.List renaming (∅ to [])
open impo... |
module Array.Repr where
open import Array.Base
open import Data.Nat
open import Data.Vec as V
open import Data.Fin using (Fin; zero; suc; raise)
open import Relation.Binary.PropositionalEquality
open import Function
-- This is a function that inductively generates a Vec-based type
-- for the given arguments of Ar.... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Cost.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.HITs.PropositionalTruncation
open import Cubical.Data.Nat
open import Cubical.Data.Sigma
private
variable
ℓ : Level
A B ... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Structures.MultiSet where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.SIP
open import Cub... |
{-# OPTIONS --without-K --exact-split --rewriting #-}
open import lib.Basics
open import lib.PathOver
open import lib.PathGroupoid
open import lib.types.Pushout
open import lib.types.Span
open import lib.types.Coproduct
open import lib.types.Sigma
open import Graphs.Definition hiding (π₀ ; π₁)
open import Util.Misc
... |
{-# OPTIONS --sized-types #-}
module SNat.Properties where
open import Size
open import SNat
open import SNat.Order
open import SNat.Order.Properties
open import SNat.Sum
lemma-≅subtyping : {ι ι' : Size}{m : SNat {ι}}{n : SNat {ι'}} → m ≅ n → m ≅ subtyping n
lemma-≅subtyping z≅z = z≅z
lemma-≅subtyping (s≅s m≅n) = s≅s... |
module FreeTheorems where
open import Level using () renaming (zero to ℓ₀)
open import Data.Nat using (ℕ)
open import Data.List using (List ; map)
open import Data.Vec using (Vec) renaming (map to mapV)
open import Function using (_∘_)
open import Relation.Binary.PropositionalEquality using (_≗_)
import GetTypes
mod... |
module SyntaxForOperators where
postulate _+_ : Set → Set → Set
syntax _+_ A B = A ⊎ B
|
module Formalization.LambdaCalculus.Terms.Combinators where
import Lvl
open import Data
open import Formalization.LambdaCalculus
open import Numeral.Natural
open import Numeral.Finite
open import Syntax.Number
open import Type
module _ where
open ExplicitLambdaSyntax
I = 𝜆 0 0 ... |
open import Common.Prelude
postulate
foo_bar_ : (b : Bool) → if b then Nat else Bool → Set
Test : Set
Test = foo_bar 5
|
module AbstractModuleMacro where
import Common.Issue481Parametrized as P
abstract
module M = P Set
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.ZCohomology.Properties where
open import Cubical.ZCohomology.Base
open import Cubical.HITs.S1
open import Cubical.HITs.Sn
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Prelude
open import C... |
------------------------------------------------------------------------
-- Some partiality algebra properties
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
open import Prelude hiding (T)
open import Partiality-algebra as PA hiding (id; _∘_)
module ... |
-- You can use _ in a binding position in notation.
module WildcardNotation where
data Σ (A : Set) (B : A → Set) : Set where
_,_ : ∀ x → B x → Σ A B
syntax Σ A (λ _ → B) = A × B
swap : ∀ {A B} → A × B → B × A
swap (x , y) = y , x
syntax compose (λ _ → x) (λ _ → y) = x instead-of y
compose : {A B C : Set} → (B → C... |
module Data.Either.Proofs where
import Lvl
open import Data
open import Data.Either as Either
open import Data.Either.Equiv
open import Function.Equals
open import Functional
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Setoid
open import Structure.Function
open import Structu... |
{-# OPTIONS --guardedness #-}
open import Agda.Builtin.Equality
open import Data.Empty
-- base : Size
-- next : Delay → Size
-- later : Size → Delay
record Delay : Set
data Size : Set
record Delay where
coinductive
constructor later
field now : Size
open Delay
data Size where
base : Size
next : Delay → Si... |
{-# OPTIONS --without-K #-}
open import BaseOver
module Spaces.FlatteningTypes {i j k}
(A : Set i) (B : Set j) (f g : B → A)
(C : A → Set k) (D : (b : B) → C (f b) ≃ C (g b)) where
ijk = max i (max j k)
module BaseHIT where
{-
data W : Set where
cc : A → W
pp : (b : B) → cc (f b) ≡ cc (g b)
... |
{-# OPTIONS -v treeless.opt:20 #-}
module _ where
open import Agda.Builtin.Nat renaming (_<_ to _<?_)
open import Common.Prelude
open import Common.Equality
data _<_ (a b : Nat) : Set where
diff : (k : Nat) → b ≡ suc k + a → a < b
data Comparison {a} {A : Set a} (_<_ : A → A → Set a) (x y : A) : Set a where
less... |
{-# OPTIONS --without-K #-}
module hott.equivalence.inverse where
open import level
open import sum
open import function.core
open import function.isomorphism.core
open import function.isomorphism.utils
open import function.isomorphism.properties
open import function.extensionality
open import function.overloading
ope... |
{-# OPTIONS --cubical --allow-unsolved-metas #-}
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
module _ where
data D {ℓ} (A : Set ℓ) : Set ℓ where
c : PathP _ _ _
|
{-# OPTIONS --without-K --safe #-}
-- Pi combinators inspired by duals and traced monoidal categories
module Trace where
open import Data.Product using (Σ; _,_; proj₁; proj₂)
open import Relation.Binary.PropositionalEquality
using (_≡_; subst)
open import PiFrac
--------------------------------------------------... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The unit type
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Unit where
import Relation.Binary.PropositionalEquality as PropEq
--------... |
module Logic where
data True : Set where
tt : True
data False : Set where
|
module Data.Option.Equiv where
import Lvl
open import Data.Option
open import Structure.Function
open import Structure.Function.Domain
open import Structure.Setoid
open import Type
private variable ℓ ℓₑ ℓₑₐ : Lvl.Level
private variable A : Type{ℓ}
record Extensionality ⦃ equiv-A : Equiv{ℓₑₐ}(A) ⦄ (equiv : Equiv... |
{-# OPTIONS --copatterns --sized-types --experimental-irrelevance #-}
-- {-# OPTIONS --show-implicit --show-irrelevant #-}
-- {-# OPTIONS -v tc.polarity:10 -v tc.pos:15 -v tc.size.solve:100 #-}
module SizedCoinductiveRecords where
open import Common.Size
{- THIS WOULD BE A BETTER TYPING FOR sizeSuc, but it requires ... |
module Validation where
open import OscarPrelude
open import 𝓐ssertion
open import HasSatisfaction
open import Interpretation
module _ {A} ⦃ _ : HasSatisfaction A ⦄
where
⊨_ : A → Set
⊨ x = (I : Interpretation) → I ⊨ x
⊭_ : A → Set
⊭_ = ¬_ ∘ ⊨_
|
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Homotopy.HopfInvariant.Base where
open import Cubical.Homotopy.Connected
open import Cubical.Homotopy.Group.Base
open import Cubical.Homotopy.Group.SuspensionMap
open import Cubical.Relation.Nullary
open import Cubical.ZCohomology.Base
open impor... |
module Truncation where
open import Cubical.Foundations.Prelude
private
variable
ℓ ℓ₁ : Level
data Susp (A : Type ℓ) : Type ℓ where
north : Susp A
south : Susp A
merid : A → north ≡ south
SuspF : {A : Type ℓ} {B : Type ℓ₁} → (A → B) → Susp A → Susp B
SuspF f north = north
SuspF f south = south
SuspF f... |
{- 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
-}
module Haskell.Modules.Either where
open import Data.Bool using (Bool;... |
------------------------------------------------------------------------------
-- The Booleans properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# O... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Concepts from rewriting theory
-- Definitions are based on "Term Rewriting Systems" by J.W. Klop
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
modul... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Semirings.Definition
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Numbers.Integers.RingStructure.Ring
open import Groups.Orders.Archimedean
open import Rings.Orders.Partial.Definition
open... |
------------------------------------------------------------------------
-- Subject reduction for typing in Fω with interval kinds
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
-- This module proves a variant of subject reduction (aka the
-- "preservation"... |
module Unsolved-meta-in-module-telescope (A : _) where
|
module Categories.Category.Construction.CartesianClosedFunctors where
open import Categories.Category
open import Categories.Category.CartesianClosed.Bundle
open import Categories.Functor.CartesianClosed
open import Categories.NaturalTransformation using (NaturalTransformation; id; _∘ᵥ_)
import Categories.NaturalTrans... |
module #4 where
open import Relation.Binary.PropositionalEquality
open import Data.Product
open import Data.Nat
{-
Exercise 2.4. Define, by induction on n, a general notion of n-dimensional path in a
type A, simultaneously with the type of boundaries for such paths.
-}
-- We need pointed sets for this part
Set•... |
module Function.Iteration where
open import Data
open import Functional
open import Numeral.Natural
open import Type
open import Syntax.Number
module _ {ℓ} {T : Type{ℓ}} where
-- Repeated function composition
-- Example:
-- f ^ 0 = id
-- f ^ 1 = f
-- f ^ 2 = f ∘ f
-- f ^ 3 = f ∘ f ∘ f
-- f ^ 4... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Properties.Conversion {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.RedSteps
open import Definition.Typed.Prop... |
-- Reported by Andrea, 2014-05-xx
-- We cannot prune from a meta if one of its arguments is a lambda.
-- (In some cases we could, but it is hard to get this right,
-- probably needs a flow analysis.)
-- {-# OPTIONS -v tc.meta.assign:25 -v tc.meta.kill:40 #-}
open import Common.Equality
open import Common.Product
pos... |
module Type.Size where
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Setoid
open import Structure.Function.Domain
open import Type
private variable ℓ ℓ₁ ℓ₂ ℓₑ ℓₑ₁ ℓₑ₂ : Lvl.Level
_≍_ : (A : Type{ℓ₁}) → ⦃ _ : Equiv{ℓₑ₁}(A) ⦄ → (B : Type{ℓ₂}) → ⦃ _ ... |
------------------------------------------------------------------------
-- Definitional interpreters can model systems with unbounded space
------------------------------------------------------------------------
-- As a follow-up to the development in Bounded-space I asked Ancona,
-- Dagnino and Zucca for further ex... |
{-# OPTIONS --without-K #-}
open import HoTT
open import homotopy.SuspSectionDecomp
open import homotopy.CofiberComp
module homotopy.SuspProduct where
module SuspProduct {i} {j} (X : Ptd i) (Y : Ptd j) where
private
i₁ : fst (X ⊙→ X ⊙× Y)
i₁ = ((λ x → (x , snd Y)) , idp)
i₂ : fst (Y ⊙→ X ⊙× Y)
i₂... |
open import Data.Product using ( ∃ ; _×_ ; _,_ )
open import Data.Sum using ( inj₁ ; inj₂ )
open import Relation.Nullary using ( Dec ; yes ; no )
open import Relation.Unary using ( _∈_ ; _∉_ ; ∅ ; U ; _∪_ ; _∩_ ; ∁ )
open import Web.Semantic.DL.Concept using ( Concept ; ⟨_⟩ ; ¬⟨_⟩ ; ⊤ ; ⊥ ; _⊓_ ; _⊔_ ; ∀[_]_ ; ∃⟨_⟩_ ; ... |
{-# OPTIONS --universe-polymorphism --no-irrelevant-projections --without-K #-}
module SafeFlagSafePragmas where
|
module *-assoc where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; cong)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; step-≡; _∎)
open import Data.Nat using (ℕ; zero; suc; _+_; _*_)
open import *-distrib-+ using (*-distrib-+)
-- 積の結合律 (associativity)
*-assoc : ∀ (m n p : ℕ) → (m * n) * p ≡ m * ... |
open import Agda.Primitive using (Level; lsuc)
variable
ℓ p : Level
A B : Set ℓ
x y z : A
postulate
easy : A
record R a : Set (lsuc a) where
field
_≡_ : {A : Set a} → A → A → Set a
module _ (r : ∀ ℓ → R ℓ) where
open module R′ {ℓ} = R (r ℓ)
postulate
refl : (x : A) → x ≡ x
cong ... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.CommRing.Instances.Polynomials.MultivariatePoly-notationZ where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat
open import Cubical.Data.FinData
open import Cubical.Relation.Nullary
open import Cubical.Algebra.Ring
o... |
{-# OPTIONS --without-K --safe #-}
-- a categorical (i.e. non-skeletal) version of Lawvere Theory,
-- as per https://ncatlab.org/nlab/show/Lawvere+theory
module Categories.Theory.Lawvere where
open import Data.Nat using (ℕ)
open import Data.Product using (Σ; _,_)
open import Level
open import Categories.Category.Ca... |
{- 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.Duration as Duration
open import LibraBFT.... |
-- 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.Unit
open import Data.Nat ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Bool where
open import Cubical.Data.Bool.Base public
open import Cubical.Data.Bool.Properties public
|
{-# OPTIONS --safe #-}
module Cubical.Categories.Limits.Limits where
open import Cubical.Foundations.Prelude
open import Cubical.Categories.Category
open import Cubical.Categories.Functor
open import Cubical.Categories.NaturalTransformation
private
variable
ℓJ ℓJ' ℓC ℓC' : Level
ℓ ℓ' ℓ'' : Level
module _ ... |
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Relation.Unary.Any.Map where
open import Prelude hiding (⊥; ⊤)
open import Algebra.Construct.Free.Semilattice.Eliminators
open import Algebra.Construct.Free.Semilattice.Definition
open import Cubical.Foundations.HLevels
open import Data.Empty.... |
open import Prelude
module Implicits.Substitutions.Lemmas.Type where
open import Implicits.Syntax.Type
open import Implicits.Substitutions
open import Data.Fin.Substitution
open import Data.Fin.Substitution.Lemmas
open import Data.Vec.Properties
open import Extensions.Substitution
open import Data.Star using (Star; ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Coinductive lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --sized-types --guardedness #-}
module Codata.Musical.Colist where
open import Category.Monad
... |
data ⊥ : Set where
data Maybe : Set where
just : ⊥ → Maybe
nothing : Maybe
test : Set → Set
test x with nothing
test x | just ()
test x | nothing = test x
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.