text stringlengths 4 690k |
|---|
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Setoids
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Groups.Definition
module Groups.Subgroups.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ : A → A → A} (G : Group S _+_) where
... |
------------------------------------------------------------------------------
-- Generic well-founded induction on trees
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymo... |
------------------------------------------------------------------------
-- Example: Right recursive expression grammar
------------------------------------------------------------------------
module TotalRecognisers.Simple.Expression where
open import Codata.Musical.Notation
open import Data.Bool
open import Data.Ch... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed universes
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Universe.Indexed where
open import Data.Product
open import Data.Univer... |
module Integer.Signed where
open import Data.Empty as ⊥
open import Data.Product as Σ
open import Data.Product.Relation.Pointwise.NonDependent
open import Data.Sum as ⊎
open import Data.Unit as ⊤
open import Equality
open import Function
open import Natural as ℕ
open import Quotient as /
open import Relation.Binary
op... |
-- 2014-02-08 Andreas
-- Eta-equality for records that are recursive via some data type
module _ where
open import Common.Equality
module Nested where
data List (A : Set) : Set where
[] : List A
_∷_ : (x : A)(xs : List A) → List A
record Tree (A : Set) : Set where
constructor tree
field
... |
module JVM.Defaults.Syntax.Instructions.Show where
open import Data.String as String hiding (show)
open import Data.Nat.Show as Nat hiding (show)
open import Relation.Binary.PropositionalEquality
open import Relation.Ternary.Structures.Syntax
open import Relation.Ternary.Monad.Weakening
open import Relation.Ternary.Da... |
{- 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.ToBool where
open import Data.Bool hiding (not)... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Logical relation for erasure with the Nehemiah plugin.
------------------------------------------------------------------------
module Nehemiah.Change.Implementation where
open import Nehemiah.Syntax.Type
open imp... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The max operator derived from an arbitrary total order
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Algebra.Con... |
module string where
open import bool
open import eq
open import char
open import list
open import nat
open import unit
open import maybe
open import product
----------------------------------------------------------------------
-- datatypes
----------------------------------------------------------------------
postu... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Monoidal where
open import Level
open import Data.Product using (Σ; _,_)
open import Categories.Category
open import Categories.Category.Product
open import Categories.Category.Monoidal
open import Categories.Functor hiding (id)
open import Categories.Nat... |
-- Andreas, 2017-01-08
-- Error range when "The name of the top level module does not match" to big
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --type-in-type #-}
-- {-# OPTIONS -v scope.checkModuleName:100 #-}
module ThisIsTheWrongName where
postulate Something : Set
-- WAS: Error range included option pr... |
{-# OPTIONS -v tc.cover.splittree:50 #-}
open import Agda.Builtin.Nat
data Vec (A : Set) : Nat → Set where
nil : Vec A zero
cons : (n : Nat) → A → Vec A n → Vec A (suc n)
append : {A : Set} (m n : Nat) → Vec A m → Vec A n → Vec A (m + n)
append .zero n nil ys = ys
append (.suc m) n (cons .m x xs) ... |
open import Agda.Primitive using (_⊔_)
import Categories.Category as Category
import Categories.Category.Cartesian as Cartesian
open import MultiSorted.AlgebraicTheory
-- Finite products indexed by contexts
module MultiSorted.Product
{o ℓ e}
(𝒞 : Category.Category o ℓ e)
{𝓈 ℴ}
{Σ : Sign... |
-- In a module instantiation 'module A = e', 'e' should have the form 'm e1 ..
-- en' where 'm' is a module name.
module NotAModuleExpr where
module Bad = \x -> x
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
import homotopy.WedgeExtension as WedgeExt
import homotopy.SuspAdjointLoop as SAL
module homotopy.Freudenthal where
{- lemma (move this where?) -}
private
move1-left-on-left : ∀ {i} {A : Type i} {x y : A} (p : x == y) (q : x == y)
→ ((! q) ∙ p == idp → p... |
module Structure.Groupoid.Functor where
open import Functional using (_on₂_)
open import Lang.Instance
import Lvl
open import Logic.Predicate
open import Structure.Category
import Structure.Category.Functor as Category
open import Structure.Function
open import Structure.Groupoid
import Structure.Relato... |
module _ where
open import Agda.Builtin.Nat using (mod-helper)
open import Common.Prelude
open import Common.Equality
_mod_ : Nat → Nat → Nat
n mod zero = 0
n mod suc m = mod-helper 0 m n m
{-# INLINE _mod_ #-}
primitive
primForce : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) → (∀ x → B x) → B x
primForc... |
module PLRTree.Complete {A : Set} where
open import PLRTree {A}
open import PLRTree.Equality {A}
data _⋗_ : PLRTree → PLRTree → Set where
⋗lf : (x : A)
→ node perfect x leaf leaf ⋗ leaf
⋗nd : {l r l' r' : PLRTree}
(x x' : A)
→ l ≃ r
→ ... |
{-
-- an ≃ equivalence of types can be lifted to a ≃S equivalence
-- (over their ≡-Setoids)
-- NOT NEEDED
lift≃ : ∀ {ℓ} → {A B : Set ℓ} → A ≃ B → (≡-Setoid A) ≃S (≡-Setoid B)
lift≃ {_} {A} {B} (f , mkqinv g α β) = equiv AS BS α' β'
where
module AA = Setoid (≡-Setoid A)
module BB = Setoid (≡-Setoid B)
AS ... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.types.Bool
open import lib.types.Empty
open import lib.types.Paths
open import lib.types.Pi
open import lib.types.Sigma
{-
This file contains various lemmas that rely on lib.types.Paths or
functional extensionality f... |
module AndOrNot where
open import Data.Bool
open import Data.Product
test : Bool → Bool → Bool × Bool × Bool
test x y = x ∧ y , x ∨ y , not x
|
open import Prelude
module Implicits.Resolution.GenericFinite.Algorithm.Soundness where
open import Induction.WellFounded
open import Induction.Nat
open import Data.List
open import Data.List.Any
open Membership-≡
open import Data.Fin.Substitution
open import Data.Nat.Base using (_<′_)
open import Data.Maybe as Maybe... |
{-# OPTIONS --without-K --safe #-}
module Categories.Adjoint.Instance.PathsOf where
-- PathsOf is adjoint to Underlying Quiver, i.e.
-- The "Underlying Graph" (of a Category) <-> "Path Category on a Quiver" Adjunction.
-- Lots of surprises here, of various level of surprisingness
-- 1. The PathCategory rises univers... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Type(s) used (only) when calling out to Haskell via the FFI
------------------------------------------------------------------------
{-# OPTIONS --without-K #-}
module Foreign.Haskell where
open import Level
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some unit types
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Unit where
open import Data.Sum
open import Relation.Nullary
open import ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Universe-sensitive functor and monad instances for the Product type.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Data.... |
module InstanceArgumentsNotFound where
postulate A B : Set
f : {{a : A}} → B
test : B
test = f
|
{-# OPTIONS --sized-types #-}
module FormalLanguage {ℓ} where
import Lvl
open import Sized.Data.List renaming (∅ to [])
open import Lang.Size
open import Data.Boolean
open import Data.Boolean.Operators
open Data.Boolean.Operators.Programming
open import Data.Boolean.Stmt
open import Functional
open import... |
module Data.Bin.Addition where
open import Data.List using ([]; _∷_)
open import Data.Bin using(addBits; addBitLists; addCarryToBitList)
open import Relation.Binary.PropositionalEquality
private
module PropEq = Relation.Binary.PropositionalEquality
open import Data.Fin using (zero; suc) renaming (toℕ to ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.DiffInt.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Univalence
open import Cubical.Data.DiffInt.Base
open import Cubical.Data.Nat as ℕ using (suc; zero; isSetℕ; discreteℕ; ℕ) renaming (_+_ to _+ⁿ_; _·_ t... |
open import Class.Listable
open import Data.List.Relation.Unary.All
open import Data.List.Relation.Unary.AllPairs
open import Data.List.Relation.Unary.Any
import Data.Vec.Recursive
import Data.Vec.Recursive.Categorical
open import Prelude
module Theory.PrimMeta where
private
variable
A B C : Set
M : Set → ... |
module UniDB.Spec where
open import UniDB.Core public
record Vr (T : STX) : Set where
field
vr : {γ : Dom} → Ix γ → T γ
vr-inj : {γ : Dom} → Inj (vr {γ})
open Vr {{...}} public
record Wk (X : STX) : Set where
field
wk₁ : {γ : Dom} (x : X γ) → X (suc γ)
wk : {γ : Dom} (δ : Dom) (x : X... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Implementation.Data.These where
open import Light.Library.Data.These using (Library ; Dependencies)
open import Light.Variable.Levels
open import Light.Level using (_⊔_)
dependencies : Dependencies
dependencies = record {}
... |
------------------------------------------------------------------------
-- 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 Equality
mo... |
module Parse where
open import Common.Unit
open import Common.Char
open import Common.String
open import Common.List
open import Common.IO
parse : List String → List Char → String
parse (e ∷ []) [] = "ha"
parse (e ∷ []) (')' ∷ xs) = "ho"
parse (e ∷ es) (a ∷ xs) ... |
module Structure.Setoid.Category where
open import Data
import Data.Tuple as Tuple
open import Functional
open import Function.Equals
open import Function.Equals.Proofs
open import Function.Proofs
open import Logic.Predicate
import Lvl
open import Structure.Category
open import Structure.Categorical.Properti... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties for Conats
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Conat.Properties where
open import Size
open import... |
------------------------------------------------------------------------
-- The semantics is deterministic
------------------------------------------------------------------------
open import Atom
module Deterministic (atoms : χ-atoms) where
open import Equality.Propositional
open import Prelude hiding (const)
open ... |
{-# OPTIONS --allow-unsolved-metas #-}
module _ where
postulate
Functor : (Set → Set) → Set₁
fmap : {F : Set → Set} {{_ : Functor F}} {A B : Set} → (A → B) → F A → F B
postulate
Id : Set → Set
bla : {A : Set} → Id A → Id A
bla = fmap {{?}} (λ x → x) -- should not fail!
|
{-
Finitely presented algebras.
An R-algebra A is finitely presented, if there merely is an exact sequence
of R-modules:
(f₁,⋯,fₘ) → R[X₁,⋯,Xₙ] → A → 0
(where f₁,⋯,fₘ ∈ R[X₁,⋯,Xₙ])
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommAlgebra.FPAlgebra where
open import Cubical.Foundations.Prelude
open im... |
{-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Equivalence
open import HoTT.Equivalence.Lift
open import HoTT.Identity.Sigma
open import HoTT.Identity.Universe
open import HoTT.HLevel
open import HoTT.Logic
module HoTT.Exercises.Chapter3.Exercise10 {i} where
postulate
lem : LEM {lsuc i}
_ : Pro... |
{-# OPTIONS --without-K #-}
module horner where
open import Type
open import Type.Identities
open import Function.NP
open import Function.Extensionality
open import Data.Fin.NP using (Fin; Fin▹ℕ)
open import Data.Product renaming (proj₁ to fst; proj₂ to snd) hiding (map)
open import Data.Zero
open import Data.One
open... |
{-# OPTIONS --without-K --safe #-}
module Data.Fin.Indexed.Properties where
open import Agda.Builtin.Nat using (_<_)
open import Data.Nat.Base
open import Data.Fin.Indexed.Base
open import Data.Bool
open import Data.Maybe.Base
private variable n m k : ℕ
weaken : ∀ {n} → Fin n → Fin (suc n)
weaken {suc n} f0 = f0
we... |
-- {-# OPTIONS -v tc.pos:100 #-}
-- Records are allowed in mutual blocks.
module RecordInMutual where
import Common.Level
open import Common.Equality
mutual
record A : Set where
field p : D
record B : Set where
field q : A
data D : Set where
c : B -> D
open A
open B
-- A and B are guarded via D, s... |
{-# OPTIONS --without-K --safe #-}
module Definition.Conversion.Weakening where
open import Definition.Untyped as U hiding (wk)
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.Typed.Weakening
open import Definition.Typed.Consequences.Syntactic
open import Definition.Conve... |
-- Instances of Gaussian integers.
{-# OPTIONS --without-K --safe #-}
module GauInt.Instances where
open import Data.Integer using (+_ ; -[1+_] ; +[1+_])
open import Data.Nat using (suc )
open import Instances
open import GauInt.Base renaming (-_ to -𝔾_ ; _-_ to _-𝔾_ ; _+_ to _+𝔾_ ; _*_ to _*𝔾_ ; NonZero to No... |
{-# OPTIONS --cubical --without-K #-}
open import Cubical.Core.Everything
open import Cubical.Foundations.Function
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Data.Sum
open import Cubical.Data.Unit
module Coequalizers wh... |
-- 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... |
module _ where
module M where
data D : Set where
d : D
private
instance
x : D
x = d
! : ⦃ _ : M.D ⦄ → M.D
! ⦃ x ⦄ = x
y : M.D
y = !
|
{-# OPTIONS --cubical #-}
open import Formalization.PredicateLogic.Signature
module Formalization.PredicateLogic.Constructive.SequentCalculus (𝔏 : Signature) where
open Signature(𝔏)
open import Data.Option
open import Data.List
open import Data.List.Functions using (map) renaming (singleton to · ; _++_ to _∪_)
ope... |
-- Andreas, 2020-09-26, issue #4946.
-- More liberal type signatures for constructors of sized types.
-- {-# OPTIONS -v tc.polarity:20 #-}
open import Agda.Builtin.Size
variable
i : Size
A : Set
data T : Size → Set → Set where
c : A → T i A → T (↑ i) A
-- The type of the constructor c is elaborated to
--
-- ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Nullary where
open import Cubical.Relation.Nullary.Base public
open import Cubical.Relation.Nullary.Properties public
|
module Pullback where
open import Logic.Equivalence
open import Logic.Relations
open import Logic.Base
open import Category
open import Unique
module Pull (ℂ : Cat) where
private open module CC = Category.Category ℂ
private open module U = Uniq ℂ
record isPull {A B C D A' : Obj}(f : A ─→ B)(g : A ─→ C)(f' : ... |
------------------------------------------------------------------------------
-- Co-inductive natural numbers
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
module Categories.Object.Initial {o ℓ e} (C : Category o ℓ e) where
open Category C
open import Level
record Initial : Set (o ⊔ ℓ ⊔ e) where
field
⊥ : Obj
! : ∀ {A} → (⊥ ⇒ A)
.!-unique : ∀ {A} → (f : ⊥ ⇒ A) → ! ≡ f
.!-unique₂... |
open import Data.Graph
module Data.Graph.Path.Cut {ℓᵥ ℓₑ} (g : FiniteGraph ℓᵥ ℓₑ) where
open import Data.Fin as Fin using (Fin; zero; suc)
open import Data.Fin.Properties as Fin-Props using (pigeonhole)
open import Data.List as List using (List; []; _∷_)
open import Data.List.Any as Any using (Any; here; there)
open ... |
open import Type
open import Structure.Relator
open import Structure.Setoid renaming (_≡_ to _≡ₑ_)
-- TODO: Organize this module
module Structure.Sets.ZFC.Inductive {ℓₛ ℓₗ ℓₑ} {S : Type{ℓₛ}} ⦃ equiv : Equiv{ℓₑ}(S) ⦄ (_∈_ : S → S → Type{ℓₗ}) ⦃ [∈]-binaryRelator : BinaryRelator(_∈_) ⦄ where
open import Functional using... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2021, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
open import LibraBFT.Base.Types
open import LibraBFT.Impl.Consensus.BlockStor... |
open import Prelude
module Nat where
-- definitions
data Nat : Set where
Z : Nat
1+ : Nat → Nat
{-# BUILTIN NATURAL Nat #-}
_+_ : Nat → Nat → Nat
Z + m = m
1+ n + m = 1+ (n + m)
infixl 60 _+_
data _≤_ : Nat → Nat → Set where
≤refl : ∀{n} → n ≤ n
≤1+ : ∀{n m} → n ≤ m → n ≤ 1+ m... |
module Prelude where
open import Agda.Primitive using (Level; lzero; lsuc) renaming (_⊔_ to lmax)
-- empty type
data ⊥ : Set where
-- from false, derive whatever
abort : ∀ {C : Set} → ⊥ → C
abort ()
-- unit
data ⊤ : Set where
<> : ⊤
-- sums
data _+_ (A B : Set) : Set where
Inl : A → A + ... |
----------------------------------------------------------------------
-- Functional big-step evaluation of terms in the partiality monad
----------------------------------------------------------------------
module SystemF.Eval where
open import Codata.Musical.Notation
open import Category.Monad
open import Category... |
------------------------------------------------------------------------------
-- Group theory properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# O... |
-- intrinsically-typed λ-calculus
module IntrinsicallyTypedLC where
open import Data.List
open import Data.List.Relation.Unary.All
open import Data.Unit
open import Data.Nat
-- definitions
data Ty : Set where
Tunit : Ty
Tfun : Ty → Ty → Ty
TEnv = List Ty
data _∈_ : Ty → TEnv → Set where
here : ∀ {t Φ} → t ∈... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Heterogeneous equality
------------------------------------------------------------------------
-- This file contains some core definitions which are reexported by
-- Relation.Binary.HeterogeneousEquality.
{-# ... |
module Problem4 where
infixr 40 _::_
data List (A : Set) : Set where
[] : List A
_::_ : A -> List A -> List A
-- 4.1
map : {A B : Set} -> (A -> B) -> List A -> List B
map f [] = []
map f (x :: xs) = f x :: map f xs
infixr 40 _++_
_++_ : {A : Set} -> List A -> List A -> List A
[] ++ ys = ys
(x... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.RingStructure.CupProduct where
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Pointed
open import Cubical.Data.Nat
open import Cubical.Data.Int hiding (_+'_ ; +'≡+ ; _+_)... |
-- https://stackoverflow.com/questions/61037572/how-to-define-the-range-function-on-a-relation-in-agda-set-theory
module range where
open import Data.Unit
open import Data.Product renaming (_,_ to ⟨_,_⟩)
open import Data.Sum
open import Function
Subset : Set → Set₁
Subset A = A → Set
_∈_ : ∀ {A} → A → Subset A → Se... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- A compilation of theorems in Propositional Logic
------------------------------------------------------------------------------
open import Data.Nat using ( ℕ )
module Data.PropFormula.Theorems ( n : ℕ ) where
---... |
------------------------------------------------------------------------------
-- Testing the translation of definitions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymor... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Unit.Polymorphic where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Relation.Nullary using (yes)
open import Cubical.Relation.Binary.Raw using (Decidable)
import Cubical.Data.Unit.Base as ⊤
⊤ : {... |
{-# OPTIONS --cubical --no-import-sorts --safe --guardedness #-}
module Cubical.Codata.Conat.Bounded where
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Prelude
open impo... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category.Core using (Category)
open import Categories.Functor.Bifunctor using (Bifunctor)
module Categories.Category.Construction.Wedges {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {D : Category o′ ℓ′ e′}
(F : Bifunctor (Category.op C) C D) where
open import Leve... |
module Text.Greek.SBLGNT.2Cor where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΠΡΟΣ-ΚΟΡΙΝΘΙΟΥΣ-Β : List (Word)
ΠΡΟΣ-ΚΟΡΙΝΘΙΟΥΣ-Β =
word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Cor.1.1"
∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "2Cor.1.1"... |
{-# OPTIONS --without-K #-}
module Agda.Builtin.Unit where
record ⊤ : Set where
instance constructor tt
{-# BUILTIN UNIT ⊤ #-}
{-# COMPILED_DATA ⊤ () () #-}
|
open import Agda.Primitive
data Foo : Setω where
foo : Foo
bar : Foo → Foo
bar foo = foo
|
{-# OPTIONS --guarded #-}
postulate
test : (@tick _ : _) → Set
|
-- ---------------------------------
-- this is the agda file implementing my own work on logic, viz. a relational
-- framework for logic.
-- These codes have been checked by Agda 2.6.0
-- ---------------------------------
module RL where
-- this file use agda standard library
open import Agda.Builtin.Equality
open... |
module ICFPPrelude where
record ⊤ : Set where
constructor ⟨⟩
data ⊥ : Set where
¬_ : Set → Set
¬_ A = A → ⊥
data Nat : Set where
zero : Nat
suc : Nat → Nat
{-# BUILTIN NATURAL Nat #-}
_+_ : Nat → Nat → Nat
zero + n = n
suc m + n = suc (m + n)
infixr 2 _∪_
data _∪_ A B : Set where
inl : A → A ∪ B
inr :... |
data D (A : Set) : Set₁ where
|
{-# OPTIONS --cubical --safe #-}
module Data.Lift where
open import Level
record Lift {a} ℓ (A : Type a) : Type (a ℓ⊔ ℓ) where
constructor lift
field lower : A
open Lift public
|
module Oscar.Category.Semigroupoid where
open import Oscar.Data.Equality
open import Oscar.Level
open import Oscar.Relation
record Semigroupoid
{𝔬} {𝔒 : Ø 𝔬}
{𝔪} (_⊸_ : 𝔒 → 𝔒 → Ø 𝔪)
: Ø 𝔬 ∙̂ 𝔪 where
infixr 9 _∙_
field
_∙_ : ∀ {m n} → m ⊸ n → ∀ {l} → l ⊸ m → l ⊸ n
∙-associativity : ∀ {k l} ... |
open import Prelude hiding (id; Bool; _∷_; [])
module Examples.Infinite where
open import Implicits.Syntax
open import Implicits.WellTyped
open import Implicits.Substitutions
open import Implicits.Syntax.Type.Unification
open import Implicits.Resolution.Infinite.Resolution
open TypingRules _⊢ᵣ_
open import Data.Maybe
... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.CartesianClosed {o ℓ e} (𝒞 : Category o ℓ e) where
open import Level
open import Function using (_$_; flip)
open import Data.Product using (Σ; _,_; uncurry)
open import Categories.Functor renaming (id to idF)
open import C... |
{-
Agda Implementors' Meeting VI
Göteborg
May 24 - 30, 2007
Hello Agda!
Ulf Norell
-}
-- Now we're getting somewhere! Inductive families of datatypes.
module Families where
-- You can import modules defined in other files.
-- More details l... |
primitive
primLevelSuc : _
|
{-# OPTIONS --without-K --safe #-}
module PiPointed where
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product renaming (map to map×)
open import Relation.Binary.PropositionalEquality
open import Singleton
open import PlainPi
infixr 90 _#_
-------------------------------------... |
{-# OPTIONS --no-universe-polymorphism #-}
open import Induction.WellFounded as WF
open import Induction.Nat
open import Relation.Binary.Core hiding (Total)
open import Relation.Unary as U using (Decidable)
open import Relation.Nullary
open import Function using (_on_)
open import Data.Nat
import Level as L using (zero... |
module Generic.Lib.Equality.Propositional where
open import Level
open import Relation.Binary
open import Data.Empty
infix 3 _≡_ _≢_ _≗_
data _≡_ {α} {A : Set α} (x : A) : A -> Set where
instance refl : x ≡ x
pattern lrefl = lift refl
_≢_ : ∀ {α} {A : Set α} -> A -> A -> Set
x ≢ y = x ≡ y -> ⊥
_≗_ : ∀ {α β} {A ... |
module agda where
open import IO
main = run (putStrLn "Happy New Year 1396")
|
module Data.QuadTree.Implementation.PublicFunctions 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.Implementation.PropDepthRelation
open import Data.QuadTree.Implementation.Definition
open import Data.QuadTree.Implementation.... |
-- Copyright: (c) 2016 Ertugrul Söylemez
-- License: BSD3
-- Maintainer: Ertugrul Söylemez <esz@posteo.de>
module Algebra.Group.Semigroup where
open import Algebra.Category
open import Core
-- A semigroup is an associative binary function.
record SemigroupOver {a r} (A : Set a) (Eq : Equiv {r = r} A) : Set (a ... |
module Categories.Sets where
open import Library
open import Categories
Sets : ∀{l} → Cat
Sets {l} = record{
Obj = Set l;
Hom = λ X Y → X → Y;
iden = id;
comp = λ f g → f ∘ g;
idl = refl;
idr = refl;
ass = refl}
|
{-# OPTIONS --type-in-type #-}
module Nested where
record Σ₁ (A : Set)(B : A → Set) : Set where
constructor _,_
field fst : A
snd : B fst
infixr 2 _,_
record Σ (A : Set)(B : A → Set) : Set where
field p : Σ₁ A B
open Σ₁ p public
open Σ
data ⊤ : Set where
tt : ⊤
∃ : {A : Set}(B : A → Set) → Set
∃ ... |
-- Andreas, 2018-10-29, issue #3246
-- More things are now allowed in mutual blocks.
-- @mutual@ just pushes the definition parts to the bottom.
-- Definitions exist for data, record, functions, and pattern synonyms.
{-# BUILTIN FLOAT Float #-} -- not (yet) allowed in mutual block
mutual
import Agda.Builtin.Boo... |
module Oscar.Property.Equivalence where
open import Oscar.Function
open import Oscar.Level
open import Oscar.Property.Reflexivity
open import Oscar.Property.Symmetry
open import Oscar.Property.Transitivity
record Equivalence {𝔬} {⋆ : Set 𝔬} {𝔮} (_≋_ : ⋆ → ⋆ → Set 𝔮) : Set (𝔬 ⊔ 𝔮) where
field
⦃ ′reflexivi... |
module Chunk where
open import Codata.Stream using (chunksOf; iterate; take)
open import Data.Nat using (ℕ; suc)
open import Data.Vec using (Vec; []; _∷_)
-- mylist 3 = [[1,2,3],[4,5,6],[7,8,9]]
myVec : (n : ℕ) → Vec (Vec ℕ n) n
myVec n = take n (chunksOf n (iterate suc 1))
|
open import Prelude
module Implicits.Resolution.Finite.Decidable where
open import Coinduction
open import Data.Fin.Substitution
open import Data.List.Any
open Membership-≡
open import Implicits.Syntax
open import Implicits.Syntax.Type.Unification
open import Implicits.Substitutions
open import Implicits.Substitution... |
{-# OPTIONS --rewriting #-}
-- {-# OPTIONS -v rewriting:100 #-}
postulate
_↦_ : ∀ {i} {A : Set i} → A → A → Set i
{-# BUILTIN REWRITE _↦_ #-}
postulate
Unit : Set
tt : Unit
module _ {i} (P : Unit → Set i) (tt* : P tt) where
postulate
Unit-elim : (x : Unit) → P x
Unit-β : Unit-elim tt ↦ tt*
{-# R... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.