text stringlengths 4 690k |
|---|
module All where
data List (A : Set) : Set where
[] : List A
_::_ : A -> List A -> List A
map : {A B : Set} -> (A -> B) -> List A -> List B
map f [] = []
map f (x :: xs) = f x :: map f xs
_++_ : {A : Set} -> List A -> List A -> List A
[] ++ ys = ys
(x :: xs) ++ ys = x :: (xs ++ ys)
foldr : {A B... |
------------------------------------------------------------------------------
-- Properties related with the totality of the rose tree type
------------------------------------------------------------------------------
{-# OPTIONS --injective-type-constructors #-}
{-# OPTIONS --exact-split #-}
{-# OPTION... |
module L.Base.Id where
-- Reexport definitions
open import L.Base.Id.Core public
|
{-# OPTIONS --cubical #-}
module Agda.Builtin.Cubical.Sub where
open import Agda.Primitive.Cubical
{-# BUILTIN SUB Sub #-}
postulate
inc : ∀ {ℓ} {A : Set ℓ} {φ} (x : A) → Sub A φ (λ _ → x)
{-# BUILTIN SUBIN inc #-}
primitive
primSubOut : ∀ {ℓ} {A : Set ℓ} {φ : I} {u : Partial φ A} → Sub _ φ u → A... |
{-# OPTIONS --safe #-}
module TEST where
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Binary.PropositionalEquality
arith-sum : ℕ → ℕ
arith-sum zero = zero
arith-sum (suc n) = suc n + arith-sum n
arith-formula : ℕ → ℕ
arith-formula n = ⌊ n * (n + 1) /2⌋
silly : ∀ (n m : ℕ) → ⌊ n + n + m... |
{-# OPTIONS --safe --warning=error --without-K --guardedness #-}
open import Setoids.Setoids
open import Rings.Definition
open import Rings.Orders.Partial.Definition
open import Rings.Orders.Total.Definition
open import Groups.Definition
open import Groups.Lemmas
open import Fields.Fields
open import Sets.EquivalenceR... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Rings.Definition
open import Rings.IntegralDomains.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
module Fields.FieldOfFractions.Multiplication {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ : ... |
module Structure.Operator.Monoid.Category where
open import Data
open import Data.Tuple as Tuple using (_,_)
open import Functional
import Lvl
open import Structure.Setoid
open import Structure.Category
open import Structure.Categorical.Properties
open import Structure.Operator.Monoid
open import Structure.Operat... |
------------------------------------------------------------------------------
-- Totality properties respect to OrdList (flatten-OrdList-helper)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTI... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Conversion from naturals to universe levels
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Level.Literals where
open import Agda.Builtin.Nat ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties satisfied by posets
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Relation.Binary.Properties.Poset
... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Structures.Poset where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Logic
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv hiding (_■)
open import Cubical.Foundations.SIP renaming (SNS-≡ to SN... |
-- An ATP axiom must be used with postulates or data constructors.
-- This error is detected by TypeChecking.Rules.Decl.
module ATPBadAxiom where
foo : Set → Set
foo A = A
{-# ATP axiom foo #-}
|
open import Issue623.A
|
open import FRP.JS.Nat using ( ℕ )
open import FRP.JS.String using ( String )
module FRP.JS.Geolocation.Distance where
postulate
Distance : Set
_m : ℕ → Distance
toString : Distance → String
{-# COMPILED_JS _m function(x) { return x; } #-}
{-# COMPILED_JS toString function(x) { return x.toString(); } #-}
|
-- Using do-notation to implement a type checker for simply-typed
-- lambda-calculus.
module _ where
open import Agda.Builtin.Nat hiding (_==_)
open import Agda.Builtin.List
open import Agda.Builtin.Equality
open import Agda.Builtin.String
-- Preliminaries --
--- Decidable equality ---
data ⊥ : Set where
¬_ : Set ... |
{-# OPTIONS --without-K --safe #-}
module Data.String.Printf where
open import Data.List using (List; []; _∷_; foldr)
open import Data.String hiding (show)
open import Data.Nat hiding (_≟_)
open import Data.Char as Char using (Char)
import Level
open import Relation.Nullary
infixr 6 _%_
record FormatUnit : Set (Leve... |
-- Andreas, 2014-06-27 test case by Ulf
-- {-# OPTIONS -v tc.lhs:40 #-}
{-# OPTIONS --copatterns #-}
record Coind : Set where
coinductive
field ind : Coind
open Coind
loop : Set -> Coind
ind A loop = ind (loop A)
-- WAS: Internal error.
-- NOW: Proper error.
-- Ill-formed projection pattern ind A
-- when check... |
{-# OPTIONS --without-K #-}
module function.isomorphism.properties where
open import level
open import sum
open import sets.nat.core
open import equality.core
open import equality.calculus
open import equality.reasoning
open import function.core
open import function.fibration
open import function.overloading
open impo... |
------------------------------------------------------------------------------
-- Arithmetic properties (added for the Collatz function example)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIO... |
open import Relation.Binary
using (Decidable)
open import Relation.Binary.PropositionalEquality
using (_≡_ ; _≢_ ; refl ; subst ; subst₂)
open import Data.Nat as Nat
using (ℕ ; _≤′_ ; _+_)
open import Relation.Binary.PropositionalEquality using (sym)
import Relation.Unary as U
open import Function
using (_∘_)... |
-- {-# OPTIONS --show-implicit --show-irrelevant #-}
module Data.QuadTree.LensProofs.Valid-LensGo where
open import Haskell.Prelude renaming (zero to Z; suc to S)
open import Data.Lens.Lens
open import Data.Logic
open import Data.QuadTree.InternalAgda
open import Agda.Primitive
open import Data.Lens.Proofs.LensLaws
op... |
-- open import Data.List
-- open import Data.Fin
open import Agda.Builtin.Nat public
using (Nat; zero; suc)
open import Agda.Builtin.List public
using (List; []; _∷_)
data Fin : Nat → Set where
fzero : {n : Nat} → Fin (suc n)
fsuc : {n : Nat} (i : Fin n) → Fin (suc n)
foldr : ∀ {a b} {A : Set a} {B : Set b... |
------------------------------------------------------------------------
-- A delay monad with the possibility of crashing
------------------------------------------------------------------------
module Lambda.Delay-crash where
import Equality.Propositional as E
open import Logical-equivalence using (_⇔_)
open import... |
module test where
open import Data.Sum.Base
postulate
X : Set
a : X
b : X
p : X → X → Set
φ : (x : X) → (p x a ⊎ p x b)
example : (x : X) →
|
{-# OPTIONS --cubical --safe --guardedness #-}
module Data.PolyP.Currying where
open import Prelude hiding (_⟨_⟩_)
open import Data.Vec.Iterated
open import Data.PolyP.Universe
Curriedⁿ : ℕ → Type₁
Curriedⁿ zero = Type
Curriedⁿ (suc n) = Type → Curriedⁿ n
_~_ : ∀ {n} → (Params n → Type) → Curriedⁿ n
_~_ {n = ze... |
{-# OPTIONS --universe-polymorphism #-}
open import FRP.JS.Bool using ( Bool ; true ; false ; if_then_else_ ; not ; _∧_ )
module FRP.JS.True where
record ⊤ : Set where
constructor tt
data ⊥ : Set where
contradiction : ∀ {α} {A : Set α} → ⊥ → A
contradiction ()
True : Bool → Set
True true = ⊤
True false = ⊥
Fal... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Sizes for Agda's sized types
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Size where
open import Agda.Builtin.Size public
r... |
{-# OPTIONS --without-K --exact-split --rewriting #-}
open import lib.Basics
open import lib.types.Truncation
open import lib.Function2
open import lib.NType2
open import Graphs.Definition
open import Coequalizers.Definition
open import Util.Misc
module Coequalizers.Misc where
module _ {i j : ULevel} {E : Type i} ... |
-- Andreas, 2016-10-09, re issue #2223
-- The front matter or module telescope of the top-level module
-- may generate level constraints that live in no module!
{-# OPTIONS -v tc.constr.add:45 #-} -- KEEP!
open import Common.Level
open import Issue2223.Setoids -- import necessary!
module _ (S : Setoid lzero lzero) ... |
module objectsInAgdaUnsized where
open import Data.Product
open import interactiveProgramsAgdaUnsized hiding (main)
open import NativeIO
open import Data.String.Base
record Interface : Set₁ where
field Method : Set
Result : (m : Method) → Set
open Interface public
record Object (I : Interface) :... |
{-
This is a rather literal translation of Martin Hötzel-Escardó's structure identity principle into cubical Agda. See
https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#sns
All the needed preliminary results from the lecture notes are stated and proven in this file.
It would be interesting... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.ZCohomology.Base where
open import Cubical.Data.Int.Base
open import Cubical.Data.Nat.Base
open import Cubical.Data.Sigma
open import Cubical.Foundations.Pointed.Base
open import Cubical.HITs.Nullification.Base
open import Cubical.HITs.SetTruncation.B... |
module Unsolved-meta-in-postulate where
postulate P : _
|
{-# OPTIONS --without-K --safe #-}
module Data.Bits where
open import Level
infixr 8 0∷_ 1∷_
data Bits : Type where
[] : Bits
0∷_ : Bits → Bits
1∷_ : Bits → Bits
|
module RecordPatternMatching where
-- Sigma type.
record Σ (A : Set) (B : A → Set) : Set where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
open Σ
_×_ : Set → Set → Set
A × B = Σ A λ _ → B
-- Curry and uncurry with pattern matching.
curry : ∀ {A : Set} {B : A → Set} {C : Σ A B → Set} →
((p ... |
module L.Base.Coproduct where
-- Reexport definitions
open import L.Base.Coproduct.Core public
|
module #5 where
open import Level
open import Data.Product
open import Data.Bool
open import Relation.Binary.PropositionalEquality
{-
Exercise 1.5. Show that if we define A + B :≡ ∑(x:2) rec2(U, A, B, x), then we can give a definition
of indA+B for which the definitional equalities stated in §1.7 hold.
-}
rec₂ : ∀{c... |
{-# OPTIONS --cubical --safe #-}
module Categories.Exponential where
open import Prelude hiding (_×_)
open import Categories
open import Categories.Product
module _ {ℓ₁ ℓ₂} (C : Category ℓ₁ ℓ₂) (hasProducts : HasProducts C) where
open Category C
open HasProducts hasProducts
module _ (Y Z : Ob) where
recor... |
------------------------------------------------------------------------
-- Some negative results related to weak bisimilarity and expansion
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Prelude
module Delay-monad.Bisimilarity.Negative {a} {A : Typ... |
module CF.Examples.Ex2 where
open import Function
open import Data.Bool
open import Data.Product
open import Data.List
open import Data.Integer
open import Data.String
open import Relation.Binary.PropositionalEquality using (refl)
open import Relation.Ternary.Core
open import Relation.Ternary.Structures
open import R... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.List.Relation.Binary.Lex.Core directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List... |
---------------------------------------------------------------------------------
-- Equality
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
infix 4 _≡_
------------------------------------------------------------------------------
-- Equality is an equivalence relation : refl... |
module zfc where
open import Level
open import Relation.Binary
open import Relation.Nullary
open import logic
record IsZFC {n m : Level }
(ZFSet : Set n)
(_∋_ : ( A x : ZFSet ) → Set m)
(_≈_ : Rel ZFSet m)
(∅ : ZFSet)
(Select : (X : ZFSet ) → ( ψ : (x : ZFSet ) → Set m ) → ZFSet )
... |
{-# OPTIONS --without-K --safe #-}
{-
Properties regarding Morphisms of a category:
- Regular Monomorphism
- Regular Epimorphism
https://ncatlab.org/nlab/show/regular+epimorphism
These are defined here rather than in Morphism, as this
might cause import cycles (and make the dependency graph
very odd).
... |
module Forcing where
open import Common.IO
open import Common.Unit
open import Lib.Vec
open import Common.Nat
len : {A : Set}{n : Nat} → Vec A n → Nat
len {A} .{zero} [] = zero
len {A} .{suc n} (_∷_ {n} x xs) = suc n
len2 : {A : Set}{n : Nat} → Vec A n → Nat
len2 [] = 0
len2 (_∷_ {n} x xs) = suc (len2 {... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lists, basic types and operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Base where
open import Data.Nat.Base as ℕ using (ℕ... |
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
{-# OPTIONS --sized-types #-}
open import Agda.Builtin.Equality
open import Data.Product
open import Size
open import Codata.Thunk
open import Level
open import Relation.Unary using (_⊆_)
modul... |
{-# OPTIONS --cubical --no-exact-split --safe #-}
module Cubical.Structures.Queue where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.FunExtEquiv
open import Cubical.Foundations.Equiv
open import Cubical.Foundati... |
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness
--no-subtyping #-}
module Agda.Builtin.String.Properties where
open import Agda.Builtin.String
open import Agda.Builtin.Equality
primitive
primStringToListInjective : ∀ a b → primStringToList a ≡ primStringToList b → a ≡ b
|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Instance.SimplicialSet where
open import Level
open import Categories.Category
open import Categories.Category.Instance.Simplex
open import Categories.Category.Construction.Presheaves
SimplicialSet : ∀ o ℓ → Category (suc (o ⊔ ℓ)) (o ⊔ ℓ) (o ⊔ ℓ)
Simplic... |
-- 2010-10-05 Andreas
module TerminationRecordPatternCoerce where
data Empty : Set where
record Unit : Set where
constructor unit
data Bool : Set where
true false : Bool
T : Bool -> Set
T true = Unit
T false = Empty
data _==_ {A : Set}(a : A) : A -> Set where
refl : a == a
subst : forall {A a b} -> a == b ... |
{-# OPTIONS --cubical #-}
module Multidimensional.Data.Dir where
open import Multidimensional.Data.Dir.Base public
open import Multidimensional.Data.Dir.Properties public
|
-- Intuitionistic propositional calculus.
-- Kripke-style semantics with exploding abstract worlds.
module IPC.Semantics.KripkeExploding where
open import IPC.Syntax.Common public
-- Intuitionistic Kripke-CPS models, with exploding worlds.
record Model : Set₁ where
infix 3 _⊪ᵅ_
field
World : Set
-- In... |
module erasure where
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import decidable using (Dec; yes; no; Bool; true; false; ⌊_⌋; _∧_; _×-dec_; _∨_; _⊎-dec_; not; ¬?)
-- erasureを使うことで真偽値の論理積とdecidableの論理積が等しくなることの証明
∧-× : ∀ {A B : Set} (x : Dec A) (y : Dec B) → ⌊ x ⌋ ∧ ⌊ y ⌋ ≡ ⌊ x ×-dec y ⌋
... |
open import Issue2229Reexport1
B = A
|
{-# OPTIONS --cubical #-}
open import Agda.Primitive.Cubical
postulate
Id : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ
Path : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ
PathP : ∀ {ℓ} (A : I → Set ℓ) → A i0 → A i1 → Set ℓ
{-# BUILTIN PATH Path #-}
{-# BUILTIN PATHP PathP #-}
{-# BUILTIN ID Id #-}
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Divisibility and coprimality
------------------------------------------------------------------------
module Data.Integer.Divisibility where
open import Function
open import Data.Integer
open import Data.Intege... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Closures of a unary relation with respect to a binary one.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Relatio... |
module Base.Prelude.List where
open import Size using (Size; ↑_)
open import Base.Free using (Free; pure)
data List (Shape : Set) (Pos : Shape → Set) (A : Set) : {Size} → Set where
cons : ∀ {i : Size} → Free Shape Pos A → Free Shape Pos (List Shape Pos A {i}) → List Shape Pos A {↑ i}
nil : List Shape Pos A
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Maybe type and some operations
------------------------------------------------------------------------
-- The definitions in this file are reexported by Data.Maybe.
{-# OPTIONS --without-K --safe #-}
modu... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Pushout where
open import Cubical.HITs.Pushout.Base public
open import Cubical.HITs.Pushout.Properties public
|
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Hopf where
open import Cubical.Core.Glue
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Int
open import Cubical.Data.Prod
o... |
-- Partial Agda bindings for the W3C Geolocation API
-- http://dev.w3.org/geo/api/spec-source.html
-- Not supporting the "read once" API or any of the options yet.
open import FRP.JS.Behaviour using ( Beh ; map )
open import FRP.JS.Geolocation.Coords using ( Coords )
open import FRP.JS.Maybe using ( Maybe )
open impor... |
module Numeral.Finite.Functions where
import Lvl
open import Syntax.Number
open import Lang.Instance
open import Logic.Propositional
open import Logic.Predicate
open import Numeral.Finite
open import Numeral.Finite.Bound
open import Numeral.Natural hiding (𝐏)
import Numeral.Natural.Function as ℕ
import Nume... |
import Lvl
open import Structure.Operator.Vector
open import Structure.Setoid
open import Type
module Structure.Operator.Vector.FiniteDimensional
{ℓᵥ ℓₛ ℓᵥₑ ℓₛₑ}
{V : Type{ℓᵥ}} ⦃ equiv-V : Equiv{ℓᵥₑ}(V) ⦄
{S : Type{ℓₛ}} ⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄
{_+ᵥ_ : V → V → V}
{_⋅ₛᵥ_ : S → V → V}
{_+ₛ_ _⋅ₛ_ : S ... |
-- Andreas, 2012-04-20
{-# OPTIONS --show-implicit #-}
module SkipParametersInConstructorReification where
data Bool : Set where
true false : Bool
data D (A : Set) : Set where
c : {regArg : A} -> D A
data P : {A : Set} → D A → Set where
p : P (c {regArg = true})
bla : Set
bla with c {regArg = true}
bla | _ = ... |
module BBHeap.Equality {A : Set}(_≤_ : A → A → Set) where
open import BBHeap _≤_
open import Bound.Lower A
open import Bound.Lower.Order _≤_
data _≈_ {b b' : Bound} : BBHeap b → BBHeap b' → Set where
≈leaf : leaf {b} ≈ leaf {b'}
≈left : {x x' : A}{l r : BBHeap (val x)}{l' r' : BBHeap (val x')}
... |
-- Plump ordinals as presented by Shulman
-- https://homotopytypetheory.org/2014/02/22/surreals-plump-ordinals/
--
-- Implementation based on an implementation of Aczel sets by Andreas Abel.
module Ordinal.Shulman where
open import Data.Sum using ([_,_]′)
open import Induction.WellFounded as WfRec using (Acc ; acc ; W... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Monoid where
open import Cubical.Algebra.Monoid.Base public
|
open import Oscar.Prelude
module Oscar.Class.Injectivity where
module _ where
module _ -- Arity=1
{𝔬₁} {𝔒₁ : Ø 𝔬₁}
{𝔬₂} (𝔒₂ : 𝔒₁ → Ø 𝔬₂)
where
𝓲njection₁ = (x : 𝔒₁) → 𝔒₂ x
record 𝓘njection₁ : Ø 𝔬₁ ∙̂ 𝔬₂ where field injection₁ : 𝓲njection₁
open 𝓘njection₁ ⦃ … ⦄ public
mod... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Example of a Quotient: ℤ as (ℕ × ℕ / ∼)
------------------------------------------------------------------------
{-# OPTIONS --with-K --safe #-}
module Relation.Binary.HeterogeneousEquality.Quotients.Examples w... |
{-# OPTIONS --cubical --safe --postfix-projections #-}
module Data.Fin.Properties where
open import Prelude
open import Data.Fin.Base
import Data.Nat.Properties as ℕ
open import Data.Nat.Properties using (+-comm)
open import Data.Nat
open import Function.Injective
open import Agda.Builtin.Nat renaming (_<_ to _<ᵇ_)
... |
open import Level
open import Relation.Binary.PropositionalEquality
import Categories.Category
open import Syntax
module Renaming where
open Equality
-- the set of renamings
infix 5 _→ʳ_
_→ʳ_ : VShape → VShape → Set
γ →ʳ δ = var γ → var δ
-- equality of renamings
infix 5 _≡ʳ_
_≡ʳ_ : ∀ {γ δ} → ... |
{-
Equalizer of functions f g : S X ⇉ T X such that f and g act on relation structures
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Relational.Equalizer where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.RelationalS... |
{-# 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.EquivalenceRelations
module Graphs.Complement... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.Instances.Bool where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Structure
open import Cubical.Relation.Nullary
open import Cubical.Data.Bool
open import Cubical.Data.Empty as ⊥
open import Cub... |
-- Andreas, 2012-10-30 Sections
-- Reported by guillaume.brunerie, Oct 24 2012
module Issue735 where
import Common.Level
open import Common.Prelude using (Nat; zero; suc)
module _ {a} (A : Set a) where
data List : Set a where
[] : List
_∷_ : (x : A) (xs : List) → List
module _ {a} {A : Set a} where
... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Sigma
open import lib.types.Pi
open import lib.types.Paths
open import lib.types.Unit
open import lib.types.Empty
module lib.Equivalences2 where
{- Pre- and post- composition with equivalences are equivalences -}
module _ {i j k} {A : Type i} {... |
open import Agda.Builtin.Coinduction
open import Agda.Builtin.Nat
open import Agda.Builtin.List
open import Agda.Builtin.Equality
data Colist (A : Set) : Set where
[] : Colist A
_∷_ : A → ∞ (Colist A) → Colist A
from : Nat → Colist Nat
from n = let sn = suc n in n ∷ ♯ (from sn)
take : {A : Set} → Nat → Colist A... |
module Issue308a where
data D : Set where
d : D → D
syntax d x = d d x
f : D → D
f x = d d x
|
{-
A counterexample from Section 5.1 of Andreas Abel's dissertation [1],
showing that the types of recursive functions must be (semi-)continuous,
i.e. `loop` below should be disallowed.
In the example, `loop` is not used as-is, but rather the size involved
is instantiated to the infinite size in order to pass... |
module Esterel.Lang.CanFunction.Properties where
{-
Basic properties of the Can function and utilities used in the reasoning,
such as Can does not look at shared variables and sequential variables; Can can
only output free variables; Can will capture free emit S and s ⇐ e (and more).
-}
open import Esterel.Lang.CanFun... |
module io-test2 where
open import io
open import list
open import string
open import unit
main : IO ⊤
main = getArgs >>= cont
where cont : 𝕃 string → IO ⊤
cont [] = return triv
cont (x :: xs) = (readFiniteFile x) >>= putStr
|
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Semirings.Definition
module Semirings.Solver {a : _} {A : Set a} {Zero One : A} {_+_ : A → A → A} {_*_ : A → A → A} (S : Semiring Zero One _+_ _*_) (comm : (a b : A) → a * b ≡ b * a) where
open Semiring S
-- You can see how t... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Homogeneously-indexed binary relations
------------------------------------------------------------------------
-- This file contains some core definitions which are reexported by
-- Relation.Binary.Indexed.Homo... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Oscar.Class
open import Oscar.Class.Hmap
open import Oscar.Class.Leftunit
open import Oscar.Class.Reflexivity
open import Oscar.Class.Smap
open import Oscar.Class.Symmetry
open import Oscar.Class.Transextensionality
open import Oscar.Class.Transitivity
open import Osc... |
open import FRP.JS.Nat using ( ℕ ; suc ; _+_ ; _≟_ )
open import FRP.JS.RSet
open import FRP.JS.Time using ( Time ; epoch )
open import FRP.JS.Delay using ( _ms )
open import FRP.JS.Behaviour
open import FRP.JS.Event using ( ∅ )
open import FRP.JS.Bool using ( Bool ; not ; true )
open import FRP.JS.QUnit using ( TestSu... |
-- Andreas, 2016-07-17 issue 2101
-- It should be possible to place a single function with a where block
-- inside `abstract`.
-- This will work if type signatures inside a where-block
-- are considered private, since in private type signatures,
-- abstract definitions are transparent.
-- (Unlike in public type signa... |
-- 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 Data.Unit
open import Data.Empty
open import Data.Product
open ... |
module Test where
open import Data.List
open import Data.List.Instance
open import Data.Nat
open import Category.FAM
f : List ℕ → List ℕ
f = fmap suc
|
------------------------------------------------------------------------
-- Simple queues, implemented in the usual way using two lists
-- (following Hood and Melville)
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Queue.Simple... |
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Relation.Unary.All.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.... |
module LC.Reasoning where
open import LC.Base
open import LC.Reduction
open import Relation.Binary.Construct.Closure.ReflexiveTransitive
open import Relation.Binary.Construct.Closure.ReflexiveTransitive.Properties using (preorder)
open import Relation.Binary.Reasoning.Preorder (preorder _β→_)
open import Relation.B... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Machine-checked formalization of the theoretical results presented
-- in the paper:
--
-- Yufei Cai, Paolo G. Giarrusso, Tillmann Rendel, Klaus Ostermann.
-- A Theory of Changes for Higher-Order Languages:
-- ... |
data Nat : Set where
zero : Nat
suc : Nat → Nat
data Id (A : Set) : Set where
mkId : A → Id A
data Monad (M : Set → Set) : Set where
postulate
return : ∀ {M} {{Mon : Monad M}} {A} → A → M A
_>>=_ : ∀ {M} {{Mon : Monad M}} {A B} → M A → (A → M B) → M B
State : (S A : Set) → Set
instance
MonadSta... |
------------------------------------------------------------------------
-- Simple recognisers
------------------------------------------------------------------------
open import Relation.Binary
open import Relation.Binary.PropositionalEquality hiding ([_])
-- The recognisers are parametrised on the alphabet.
modul... |
-- Andreas, 2011-09-11
module Issue392 where
import Common.Irrelevance
-- Create an non-irrelevant record R1 (at least one field relevant).
record R1 : Set1 where
field
.f1 : Set
f1' : Set
{- This creates a module with an relevant record parameter
module R1 (r : R1) where
.f1 : Set -- = R1.f1 r
... |
module Generic.Lib.Equality.Heteroindexed where
open import Data.Product
open import Generic.Lib.Equality.Propositional
data [_]_≅_ {ι α} {I : Set ι} {i} (A : I -> Set α) (x : A i) : ∀ {j} -> A j -> Set where
irefl : [ A ] x ≅ x
inds : ∀ {ι α} {I : Set ι} {A : I -> Set α} {i j} {x : A i} {y : A j}
-> [ A ] x... |
module IndentedCheckingMessages where
import A.M
Foo : Set
Foo = Foo
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.