text stringlengths 4 690k |
|---|
-- Andreas, May-July 2016, implementing postfix projections
{-# OPTIONS --postfix-projections #-}
open import Common.Product
open import Common.Bool
pair : ∀{A : Set}(a : A) → A × A
pair a = {!!} -- C-c C-c here outputs postfix projections
record BoolFun : Set where
field out : Bool → Bool
open BoolFun
neg : Boo... |
module _ where
open import Issue1278.A Set
open import Agda.Builtin.Equality
test : (c : D) -> (c ≡ c)
test d = {!!} -- goal ".#A-60005532.d ≡ .#A-60005532.d"
|
------------------------------------------------------------------------
-- Eliminators and initiality
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Partiality-algebra.Eliminators where
open import Equality.Propositional.Cubical
open import Lo... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.NaturalIsomorphism where
open import Level
open import Relation.Binary using (IsEquivalence)
open import Categories.Support.PropositionalEquality
open import Categories.Support.Equivalence
open import Categories.Category
open import Categories.Functor hiding ... |
{-# OPTIONS --sized-types #-}
module SizedTypesVarSwap where
open import Common.Size renaming (↑_ to _^)
data Nat : {size : Size} -> Set where
zero : {size : Size} -> Nat {size ^}
suc : {size : Size} -> Nat {size} -> Nat {size ^}
bad : {i j : Size} -> Nat {i} -> Nat {j} -> Nat {∞}
bad (suc x) y = bad (suc y) x... |
module Sessions.Semantics.Communication {E : Set} (delay : E) where
open import Prelude
open import Data.List.Relation.Ternary.Interleaving
open import Data.List.Relation.Ternary.Interleaving.Propositional
open import Data.List.Relation.Equality.Propositional
open import Data.List.Properties
import Data.List as L
op... |
-- MIT License
-- Copyright (c) 2021 Luca Ciccone and Luca Padovani
-- Permission is hereby granted, free of charge, to any person
-- obtaining a copy of this software and associated documentation
-- files (the "Software"), to deal in the Software without
-- restriction, including without limitation the rights to use... |
open import Level hiding ( suc ; zero )
open import Algebra
module sym5a where
open import Symmetric
open import Data.Unit using (⊤ ; tt )
open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_)
open import Function hiding (flip)
open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero)
open import ... |
-- Andreas, 2016-02-11, bug reported by sanzhiyan
module Issue610-module-alias-with where
import Common.Level
open import Common.Equality
data ⊥ : Set where
record ⊤ : Set where
data A : Set₁ where
set : .Set → A
module M .(x : Set) where
.out : _
out = x
.ack : A → Set
ack (set x) = M.out x
hah : set ⊤ ≡... |
{-
Agda Implementors' Meeting VI
Göteborg
May 24 - 30, 2007
Hello Agda!
Ulf Norell
-}
-- Something which is rather useful is the ability to pattern match
-- on intermediate computations. That's where the with-construct comes
-- in.
module Te... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Abelian where
open import Cubical.Categories.Abelian.Base public
|
{-# OPTIONS --cubical --safe #-}
module Categories.Product where
open import Prelude hiding (_×_)
open import Categories
module _ {ℓ₁ ℓ₂} (C : Category ℓ₁ ℓ₂) where
open Category C
module _ (X Y : Ob) where
record Product : Type (ℓ₁ ℓ⊔ ℓ₂) where
field
obj : Ob
proj₁ : C [ obj , X ]
... |
{-
This file contains:
- Definition of groupoid quotients
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.GroupoidQuotients.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Relation.Binary.Base
-- Groupoid quotients as a higher inductive type:
-- For the definition, ... |
module Bee2.Crypto.Belt where
open import Data.ByteString
open import Data.ByteVec
open import Data.Nat using (ℕ)
open import Data.Product using (_,_)
open import Agda.Builtin.TrustMe using (primTrustMe)
import Bee2.Crypto.Defs
open Bee2.Crypto.Defs
open Bee2.Crypto.Defs using (Hash) public
{-# FOREIGN GHC import qu... |
module Structure.Sets.Operator where
open import Data.Boolean
open import Data.Boolean.Stmt
open import Functional
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Function
open import Structure.Relator
open import Structure.Setoid using (Equiv) renami... |
module Base.Change.Sums where
open import Data.Sum
open import Data.Product
open import Relation.Binary.PropositionalEquality
open import Level
open import Base.Ascription
open import Base.Change.Algebra
open import Base.Change.Equivalence
open import Base.Change.Equivalence.Realizers
open import Postulate.Extensiona... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Product.Relation.Binary.Lex.Strict directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Functor.Hom.Properties.Covariant {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Function.Equality using (Π)
open import Relation.Binary using (Setoid)
open import Categories.Category.Construction.Cones
open import... |
module Issue947 where
A : Set₁
A = Set
where
B : Set₁
B = Set
module _ where
C : Set₁
C = Set
module M where
|
{-# OPTIONS --safe #-}
module Cubical.Algebra.Module.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 Cubical.Foundations.SIP
open i... |
{-# OPTIONS --without-K --safe #-}
open import Level using (Level)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_)
open import Data.Nat using (ℕ; suc; zero)
open import Data.Empty using (⊥)
open import Data.Vec using (Vec)
renaming ([] to []ⱽ; _∷_ to _∷ⱽ_)
module FLA.Data.Vec+.... |
{-
This file contains:
- The inductive construction of James.
-}
{-# OPTIONS --safe #-}
module Cubical.HITs.James.Inductive.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubica... |
{-# OPTIONS --erased-cubical --safe #-}
module Note where
open import Data.Integer using (ℤ)
open import Data.Nat using (ℕ; _+_; _*_; ⌊_/2⌋)
open import Function using (_∘_)
open import Pitch using (Pitch; transposePitch)
open import Interval using (Upi; Opi; transposePitchInterval)
Duration : Se... |
------------------------------------------------------------------------
-- A solution to a problem posed by Venanzio Capretta
------------------------------------------------------------------------
module VenanziosProblem where
open import Codata.Musical.Notation
open import Codata.Musical.Stream as Stream
using ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.KernelImage
module groups.KernelImageEmap where
module _ {i₀ i₁ j₀ j₁ k₀ k₁}
{G₀ : Group i₀} {H₀ : Group j₀} {K₀ : Group k₀}
{G₁ : Group i₁} {H₁ : Group j₁} {K₁ : Group k₁}
{ψ₀ : H₀ →ᴳ K₀} {φ₀ : G₀ →ᴳ H₀} (H₀-ab : is-abelian H₀)
{ψ₁ ... |
module WErrorOverride where
postulate
IO : Set → Set
{-# COMPILED_TYPE IO IO #-}
{-# BUILTIN IO IO #-}
infixl 1 _>>=_
postulate
return : {A : Set} → A → IO A
_>>=_ : {A : Set} {B : Set} → IO A → (A → IO B) → IO B
{-# COMPILED return (\_ -> return) #-}
{-# COMPILED _>>=_ (\_ _ -> (>>=)) #-}
------------... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Vec.Relation.Unary.All.Properties directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.... |
{-# OPTIONS --prop --rewriting #-}
module Examples where
-- Sequential
import Examples.Id
import Examples.Gcd
import Examples.Queue
-- Parallel
import Examples.TreeSum
import Examples.Exp2
-- Hybrid
import Examples.Sorting
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
import homotopy.ConstantToSetExtendsToProp as ConstExt
open import homotopy.RibbonCover
module homotopy.GroupSetsRepresentCovers {i} (X : Ptd i)
{{_ : is-connected 0 (de⊙ X)}} where
open Cover
private
A : Type i
A = de⊙ X
a₁ : A
a₁ = pt ... |
{-# OPTIONS --sized-types #-}
open import Relation.Binary.Core
module Quicksort.Correctness.Order {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_)
(trans≤ : Transitive _≤_) where
open import Data.List
open import Function using (_∘_)
open import List.Sorted _≤_
o... |
------------------------------------------------------------------------
-- Adjunctions and monads (for 1-categories)
------------------------------------------------------------------------
-- The code is based on the presentation in the HoTT book (but might
-- not follow it exactly).
{-# OPTIONS --without-K --safe ... |
open import Common.Equality
data Bool : Set where
true false : Bool
data IsTrue : Bool → Set where
itis : IsTrue true
module M (u : Bool) where
foo bar : (p : IsTrue u) → Bool
foo = \ { itis → true }
bar = \ { itis → false }
test : ∀ u → M.foo u ≡ M.bar u
test u = refl
-- Trigger printing of the extende... |
module MultipleFixityDecl where
infixl 40 _+_
infixr 60 _+_
_+_ : Set -> Set -> Set
A + B = A
|
module Tactic.Reflection.Meta where
open import Prelude
open import Builtin.Reflection
open import Tactic.Reflection.DeBruijn
ensureNoMetas : Term → TC ⊤
noMetaArg : Arg Term → TC ⊤
noMetaArg (arg _ v) = ensureNoMetas v
noMetaArgs : List (Arg Term) → TC ⊤
noMetaArgs [] = pure _
noMetaArgs (v ∷ vs) = noMetaArg v *>... |
--------------------------------------------------------------------------------
-- This file provides the generateCFG function that turns a list of strings of
-- the current syntax for grammars into a grammar as defined in Parser.agda
--------------------------------------------------------------------------------
{-... |
-- 2010-10-05 Andreas
module TerminationRecordPatternLie where
data Empty : Set where
record Unit : Set where
data Bool : Set where
true false : Bool
T : Bool -> Set
T true = Unit
T false = Empty
-- Thorsten suggests on the Agda list thread "Coinductive families"
-- to encode lists as records
record List (A : ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lexicographic products of binary relations
------------------------------------------------------------------------
-- The definition of lexicographic product used here is suitable if
-- the left-hand relation i... |
{-
Verified Koopa Troopa Movement
Toon Nolten
-}
module koopa where
open import Data.Nat
open import Data.Fin renaming (_+_ to _F+_; _<_ to _F<_; suc to fsuc;
zero to fzero)
open import Data.Vec renaming (map to vmap; lookup to vlookup;
replicate to vre... |
module Equality where
open import Agda.Builtin.Equality public
open import Relation.Nullary
infix 4 _≅_ _≢_
infixr 2 _≡⟨_⟩_
infix 3 _QED
data _≅_ {ℓ} {A : Set ℓ} (x : A) : {B : Set ℓ} → B → Set ℓ where
refl : x ≅ x
≡→≅ : ∀ {ℓ} {A : Set ℓ} {a b : A} → a ≡ b → a ≅ b
≡→≅ refl = refl
sym : ∀ {ℓ} {A : Set ℓ} {a b :... |
{-# OPTIONS --safe #-}
module JVM.Model {ℓ} (T : Set ℓ) where
open import Level hiding (Lift)
open import Data.Product
open import Data.Unit
open import Data.List
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import Relation.Ternary.Core
open import Relation.Ternary.Structures
open import ... |
open import OutsideIn.Prelude
open import OutsideIn.X
module OutsideIn.Environments(x : X) where
open import Data.Vec hiding (map)
import OutsideIn.TypeSchema as TS
import OutsideIn.Expressions as E
open TS(x)
open E(x)
open X(x)
private
module TS-f {x} = Functor(type-schema-is-functor {x})
Env... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- An inductive definition of the sublist relation. This is commonly
-- known as Order Preserving Embeddings (OPE).
------------------------------------------------------------------------
{-# OPTIONS --without-K -... |
module Verifier where
open import Definitions
open import DeMorgan using (deMorgan)
check : {A B : Set} → ¬ A ∧ ¬ B → ¬ (A ∨ B)
check = deMorgan
|
-- Let's play with agda.
-- Am i having fun doing this? @KMx404
module intro where --load the file with C-c - like that
data Bool: Set where
true : Bool
false : Bool
data Empty: Set Empty
Empty : Empty -- I'm gonna leave this here. Moving to tests
|
module Issue2858-nbe where
open import Agda.Builtin.List
data Ty : Set where
α : Ty
_↝_ : Ty → Ty → Ty
variable
σ τ : Ty
Γ Δ Θ : List Ty
Scoped : Set₁
Scoped = Ty → List Ty → Set
data Var : Scoped where
z : Var σ (σ ∷ Γ)
s : Var σ Γ → Var σ (τ ∷ Γ)
record Ren (Γ Δ : List Ty) : Set where
field lookup... |
{-# OPTIONS --without-K #-}
-- Rending the Program Runner
-- A proof of Lӧb′s theorem: quoted interpreters are inconsistent
-- Jason Gross
{- Title and some comments inspired by and drawn heavily from
"Scooping the Loop Sniffer: A proof that the Halting Problem is
undecidable", by Geoffrey K. Pullum
(http://w... |
open import Data.Product using ( _,_ ; proj₁ ; proj₂ )
open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ )
open import Relation.Binary.PropositionalEquality using ( refl )
open import Relation.Unary using ( _∈_ )
open import Web.Semantic.DL.ABox using ( ABox ; _,_ ; ⟨ABox⟩ )
open import Web.Semantic.DL.ABox.Interp using (... |
open import Relation.Ternary.Separation
module Relation.Ternary.Separation.Monad.CompleteUpdate
{a} {A : Set a} {{r : RawSep A}} {u} {{ s : IsUnitalSep r u }}
where
open import Function
open import Level hiding (Lift)
open import Data.Product
open import Data.Unit using (⊤)
open import Relation.Unary
open import... |
--{-# OPTIONS --verbose 10 #-}
open import ExtractSac as ES using ()
open import Extract (ES.kompile-fun)
open import Data.Nat as N using (ℕ; zero; suc; _≤_; _≥_; _<_; s≤s; z≤n)
import Data.Nat.DivMod as N
open import Data.Nat.Properties as N
open import Data.List as L using (List; []; _∷_)
open import Data.Vec a... |
module New.Unused where
open import New.Changes
module _ {ℓ₁} {ℓ₂}
{A : Set ℓ₁} {B : Set ℓ₂} {{CA : ChAlg A}} {{CB : ChAlg B}} where
open ≡-Reasoning
open import Postulate.Extensionality
module _ (f : A → B) where
nil-is-derivative : IsDerivative f (nil f)
nil-is-derivative a da v =
begin
... |
{-# OPTIONS --safe --without-K #-}
open import Relation.Binary.PropositionalEquality using (refl)
open import Relation.Nullary using (yes)
open import Data.Unit using (⊤; tt)
open import Data.Product using (_,_)
open import Data.Sum using (inj₁)
open import PiCalculus.LinearTypeSystem.Algebras
module PiCalculus.Lin... |
{-# OPTIONS --without-K #-}
open import container.core
module container.w.fibration
{li la lb}(c : Container li la lb) where
open import sum
open import equality
open import function
open import container.w.core
open import container.w.algebra c
open import hott.level
open Container c
AlgFib : ∀ ℓ → Set _
AlgFib ... |
open import FRP.JS.String using ( _≟_ )
open import FRP.JS.Bool using ( Bool ; true ; false ; if_then_else_ ; _∧_ ; _∨_ ; not ; _xor_ )
open import FRP.JS.QUnit using ( TestSuite ; ok ; test ; _,_ )
module FRP.JS.Test.Bool where
tests : TestSuite
tests =
( test "true"
( ok "true" true )
, test "false"
... |
{-# OPTIONS --without-K --exact-split #-}
import 05-identity-types
open 05-identity-types public
-- Inversion is uninteresting and comes from:
inversion-proof :
{i : Level} {A : UU i} (x : A) → (y : A) → Id x y → Id y x
inversion-proof x y = ind-Id x (λ y' p' → Id y' x) refl y
lemma-2-2-2-i :
{i j : Level} {A : ... |
module Semantics.Substitution where
open import Semantics.Substitution.Kits public
open import Semantics.Substitution.Traversal public
open import Semantics.Substitution.Instances public
open import Semantics.Substitution.Soundness public
|
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module Verification.CorruptFormalisations where
open import FOTC.Base
open import FOTC.Base.List
open import FOTC.Base.Loop
open import FOTC.Progr... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Span
open import lib.types.Pointed
open import lib.types.Pushout
open import lib.types.PushoutFlattening
open import lib.types.Unit
open import lib.types.Paths
open import lib.cubical.Square
-- Suspension is defined as a particular case of pusho... |
module BBHeap.Properties {A : Set}(_≤_ : A → A → Set) where
open import BBHeap _≤_
open import BBHeap.Perfect _≤_
open import Bound.Lower A
open import Bound.Lower.Order _≤_
open import Data.Empty
sym≃ : {b b' : Bound}{h : BBHeap b}{h' : BBHeap b'} → h ≃ h' → h' ≃ h
sym≃ ≃lf = ≃lf
sym≃ (≃nd b≤x b'≤x' l⋘r l'⋘r' l≃r ... |
module IncompletePatternMatching where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data True : Set where
tt : True
data False : Set where
_==_ : Nat -> Nat -> Set
zero == zero = True
suc n == suc m = n == m
thm : zero == suc zero
thm = tt
|
-- Idiom bracket notation.
module Syntax.Idiom where
import Lvl
open import Type
private variable ℓ ℓ₁ ℓ₂ : Lvl.Level
private variable A B : Type{ℓ}
private variable F : Type{ℓ₁} → Type{ℓ₂}
-- The notation `⦇ f x₁ x₂ x₃ ⦈` will automatically be translated to `((pure f <*> x₁) <*> x₂) <*> x₃`.
record IdiomBracke... |
open import Prelude
open import Nat
open import dynamics-core
open import contexts
open import lemmas-disjointness
module exchange where
-- exchanging just two disequal elements produces the same context
swap-little : {A : Set} {x y : Nat} {τ1 τ2 : A} → (x ≠ y) →
((■ (x , τ1)) ,, (y , τ2)) == ((■ (y , τ2)) ,, ... |
{-# OPTIONS --safe #-}
module Cubical.Relation.Nullary where
open import Cubical.Relation.Nullary.Base public
open import Cubical.Relation.Nullary.Properties public
|
-- Andreas, 2018-10-16, erased lambda-arguments
open import Agda.Builtin.List
open import Common.Prelude
sum : List Nat → Nat
sum (x ∷ xs) = x + sum xs
sum [] = 0
zipWith : {A B C : Set} (f : A → B → C) → List A → List B → List C
zipWith f (x ∷ xs) (y ∷ ys) = f x y ∷ zipWith f xs ys
zipWith _ _ _ = []
-- Shorten th... |
-- Andreas, 2014-09-23
syntax bla (λ x → e) = blub e
-- Should trigger error:
-- malformed syntax declaration: syntax must use binding holes exactly once
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some unit types
------------------------------------------------------------------------
-- The definitions in this file are reexported by Data.Unit.
module Data.Unit.Core where
open import Level
------------... |
{-# OPTIONS --warning=error #-}
module UselessAbstractPrimitive where
postulate Int : Set
{-# BUILTIN INTEGER Int #-}
abstract
primitive
primIntegerPlus : Int -> Int -> Int
|
------------------------------------------------------------------------------
-- Distributive laws properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
... |
module Data.Vec.All.Properties.Extra {a p}{A : Set a}{P : A → Set p} where
open import Data.List using (List)
import Data.List.Relation.Unary.All as All
open import Data.Vec hiding (_[_]≔_)
open import Data.Vec.Relation.Unary.All hiding (lookup)
open import Data.Fin
all-fromList : ∀ {xs : List A} → All.All P xs → All... |
open import Relation.Unary using ( ∅ ; _∪_ )
open import Web.Semantic.DL.Concept using ( Concept )
open import Web.Semantic.DL.Role using ( Role )
open import Web.Semantic.DL.Signature using ( Signature )
open import Web.Semantic.Util using ( Subset ; ⁅_⁆ )
module Web.Semantic.DL.TBox where
infixl 5 _⊑₁_ _⊑₂_
infixr ... |
----------------------------------------------------------------------------------
-- Types for parse trees
----------------------------------------------------------------------------------
module cws-types where
open import lib
open import parse-tree
posinfo = string
{-# FOREIGN GHC import qualified CedilleCommen... |
module Cats.Profunctor where
open import Data.Product using (_,_)
open import Level using (suc ; _⊔_)
open import Cats.Category
open import Cats.Category.Op using (_ᵒᵖ)
open import Cats.Category.Product.Binary using (_×_)
open import Cats.Category.Setoids using (Setoids)
open import Cats.Functor
import Cats.Category... |
-- There was a rare bug in display form generation for with functions
-- in local blocks.
module WithInWhere where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data Z? : Nat -> Set where
yes : Z? zero
no : forall {n} -> Z? (suc n)
z? : (n : Nat) -> Z? n
z? zero = yes
z? (suc n) = no
bug : Nat -> N... |
module Cats.Category.Preorder.Facts.PreorderAsCategory where
open import Data.Bool using (true ; false)
open import Relation.Binary using (Preorder)
import Level
open import Cats.Category
open import Cats.Category.Preorder using (preorderAsCategory)
open import Cats.Util.Logic.Constructive
module _ {lc l≈ l≤} (P :... |
{-# OPTIONS --safe #-}
module Cubical.Data.FinType where
open import Cubical.Data.FinType.Base public
open import Cubical.Data.FinType.Properties public
|
{-# OPTIONS --cubical --safe --postfix-projections #-}
open import Prelude
open import Relation.Binary
module Data.List.Mapping {kℓ} {K : Type kℓ} {r₁ r₂} (totalOrder : TotalOrder K r₁ r₂) where
open import Relation.Binary.Construct.Decision totalOrder
open import Relation.Binary.Construct.LowerBound dec-ord
open im... |
{-# OPTIONS --rewriting #-}
module Interpreter where
open import Agda.Builtin.IO using (IO)
open import Agda.Builtin.Int using (pos)
open import Agda.Builtin.Unit using (⊤)
open import FFI.IO using (getContents; putStrLn; _>>=_; _>>_)
open import FFI.Data.Aeson using (Value; eitherDecode)
open import FFI.Data.Either... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.PtdMapSequence
module homotopy.CofiberSequence {i} where
{- Useful abbreviations -}
module _ {X Y : Ptd i} (f : X ⊙→ Y) where
⊙Cofiber² = ⊙Cofiber (⊙cfcod' f)
⊙cfcod²' = ⊙cfcod' (⊙cfcod' f)
⊙Cofiber³ = ⊙Cofiber ⊙cfcod²'
⊙cfcod³' ... |
open import FRP.JS.Behaviour using ( Beh ; [_] ; hold )
open import FRP.JS.Event using ( tag )
open import FRP.JS.DOM using ( DOM ; text ; element ; listen ; click ; _++_ )
open import FRP.JS.RSet using ( ⟦_⟧ )
module FRP.JS.Demo.Button where
main : ∀ {w} → ⟦ Beh (DOM w) ⟧
main = text lab ++ but where
but = element... |
module _ where
module A where
infixr 5 _∷_
data D : Set₂ where
[] : D
_∷_ : Set₁ → D → D
module B where
infix 5 _∷_
data D : Set₂ where
_∷_ : Set₁ → Set₁ → D
open A
open B
foo : A.D
foo = Set ∷ []
bar : B.D
bar = Set ∷ Set
|
{-# OPTIONS --without-K --exact-split --safe #-}
module Basic_Types where
-- Already in the builtin's of agda, there are Π types, which is ∀, and lambda
-- abstraction, which is λ{ } and function types, which is →.
-- ------------------------------------
-- Some operations for function types
-- The curly brackts ∀{... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of products
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Product.Properties where
open import Data.Product
open import Func... |
module Options-in-right-order where
data Unit : Set where
unit : Unit
postulate
IO : Set → Set
{-# COMPILE GHC IO = type IO #-}
{-# BUILTIN IO IO #-}
postulate
return : {A : Set} → A → IO A
{-# COMPILE GHC return = \_ -> return #-}
main = return unit
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Object.Subobject {o ℓ e} (𝒞 : Category o ℓ e) where
open import Level
open import Data.Product
open import Data.Unit
open import Relation.Binary using (Poset)
open import Categories.Functor
open import Categories.Category.Slice
o... |
{-# OPTIONS --cubical --save-metas #-}
-- The code in this module should not be compiled. However, the
-- following re-exported code should be compiled.
open import Agda.Builtin.Bool public
postulate
easy : {A : Set} → A
data Not-compiled : Set where
|
module Bee2.Crypto.Defs where
open import Data.ByteString
open import Data.ByteVec
open import Agda.Builtin.Nat renaming (Nat to ℕ)
{-# FOREIGN GHC import qualified Bee2.Defs #-}
postulate
SizeT : Set
SizeFromℕ : ℕ → SizeT
{-# COMPILE GHC SizeT = type (Bee2.Defs.Size) #-}
{-# COMPILE GHC SizeFromℕ =
( Prel... |
module std-reduction.Properties where
open import std-reduction
open import sn-calculus
open import Relation.Binary.PropositionalEquality using (_≡_)
open _≡_
{-
std-redution-deterministic : ∀{p q r} →
p ⇁ q →
p ⇁ r →
q ≡ r
std-re... |
open import Agda.Builtin.Size
record R (A : Size → Set) (i : Size) : Set where
field
force : (j : Size< i) → A j
data D (A : Size → Set) (i : Size) : Set where
c : R A i → D A i
postulate
P : (A : Size → Set) → D A ∞ → D A ∞ → Set
F : (Size → Set) → Set
F A = (x : A ∞) (y : D A ∞) →
P _ (c (record {... |
module Screen where
import Data.Nat
import Data.Bool
import Data.List
import Logic.Base
open Data.Bool
open Data.List
open Data.Nat
open Logic.Base
-- Ranges -----------------------------------------------------------------
data Range : Set where
range : Nat -> Nat -> Range
inRange : Range -> Nat -> Bool
inRang... |
{-# OPTIONS --without-K #-}
-- Approx. 15-20 min are required to typecheck this file (for Agda 2.6.1) on
-- my MacBook 13-inch 2017 with 3.5 GHz Core i7 CPU and 16 GB memory.
--
-- Since most of the time was spent for termination analysis, please
-- uncomment {-# TERMINATING #-} before evalR and eval to remove the
-... |
module Oscar.Data.Equality.properties where
-- open import Relation.Binary.PropositionalEquality public using (cong; cong₂; cong-app; subst; subst₂; sym; trans)
-- open import Oscar.Data.Equality
-- open import Oscar.Function
-- open import Oscar.Level
-- open import Oscar.Relation
-- -- ≡̇-refl : ∀ {a} {A : Set a}... |
{-# OPTIONS --with-K #-}
module Agda.Builtin.Equality.Erase where
open import Agda.Builtin.Equality
primitive primEraseEquality : ∀ {a} {A : Set a} {x y : A} → x ≡ y → x ≡ y
|
module Data.Num.Bounded where
open import Data.Num.Core
open import Data.Num.Maximum
open import Data.Nat
open import Data.Nat.Properties
open import Data.Nat.Properties.Simple
open import Data.Nat.Properties.Extra
open import Data.Fin as Fin
using (Fin; fromℕ≤; inject≤)
renaming (zero to z; suc to s)
open ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some derivable properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra.Bundles
module Algebra.Properties.DistributiveLattice
... |
data ⊥ : Set where
postulate
M : Set → Set
A : Set
_>>=_ : ∀ {A B} → M A → (A → M B) → M B
ma : M A
f : A → M ⊥
pure : ∀ {A} → A → M A
absurd-do : ∀ {A} → M A
absurd-do = do
x ← ma
() ← f x
atabsurd-do : ∀ {A} → M A
atabsurd-do = do
x ← ma
(y@()) ← f x -- I don't know why you would do that... |
-- Andreas, 2017-03-27, issue #2183
-- Better error message for splitting on non-visible dot pattern.
open import Agda.Builtin.Equality
open import Agda.Builtin.Nat
data Fin : Nat → Set where
fzero : ∀ n → Fin (suc n)
test : ∀ n (i : Fin n) → Set
test n (fzero m) = {!n!} -- C-c C-c
-- Current error:
-- Cannot s... |
module Formalization.ClassicalPropositionalLogic.Place where
open import Data.Boolean
open import Data.Tuple as Tuple using (_,_ ; _⨯_)
import Lvl
open import Formalization.ClassicalPropositionalLogic.Syntax
open import Functional as Fn using (_∘_ ; const)
open import Sets.PredicateSet using (PredSet)
open import... |
---------------------------------------------------------------------------
-- Normalization by Evaluation for Intuitionistic Propositional Logic
--
-- We employ a monadic interpreter for the soundness part,
-- and a special class of monads, called cover monads,
-- for the completeness part.
--
-- Normalization is comp... |
module M where
Foo : Set
Foo = Set
|
{-# OPTIONS --safe --without-K #-}
module Data.List.Membership.Propositional.Distinct where
open import Data.List using (List)
import Relation.Binary.PropositionalEquality as P
open import Data.List.Membership.Setoid.Distinct as D hiding (Distinct) public
Distinct : ∀ {a} {A : Set a} → List A → Set a
Distinct {A = A}... |
module Inst (Gnd : Set)(U : Set)(El : U -> Set) where
open import Basics
open import Pr
open import Nom
import Kind
open Kind Gnd U El
import Cxt
open Cxt Kind
import Loc
open Loc Kind
import Term
open Term Gnd U El
import Shift
open Shift Gnd U El
mutual
winst : {G : Cxt}{C : Kind}{L : Loc}{I : Kind}
(x ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.