text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K --rewriting #-}
open import lib.Base
module lib.Relation {i} where
Rel : ∀ (A : Type i) j → Type (lmax i (lsucc j))
Rel A j = A → A → Type j
module _ {A : Type i} {j} (rel : Rel A j) where
Decidable : Type (lmax i j)
Decidable = ∀ a₁ a₂ → Dec (rel a₁ a₂)
is-refl : Type (lmax i j)
i... |
------------------------------------------------------------------------
-- Some defined operations (multiplication by natural number and
-- exponentiation)
------------------------------------------------------------------------
open import Algebra
module Algebra.Operations (s : Semiring) where
open Semiring s hidi... |
module WellFormed where
data Nat : Set where
zero : Nat
succ : Nat -> Nat
postulate Vec : Set -> Nat -> Set
postulate _X_ : Set -> Set -> Set
postulate zip : {A B : Set} -> (n : Nat) -> Vec A n -> Vec B n -> Vec (A X B) n
|
{-# OPTIONS --prop --rewriting #-}
open import Examples.Sorting.Sequential.Comparable
module Examples.Sorting.Sequential.InsertionSort (M : Comparable) where
open Comparable M
open import Examples.Sorting.Sequential.Core M
open import Calf costMonoid
open import Calf.Types.Bool
open import Calf.Types.List
open impo... |
postulate Name : Set
{-# BUILTIN QNAME Name #-}
data ⊤ : Set where
tt : ⊤
data Term : Set where
con : Name → Term → Term
data X : ⊤ → Set where
x : {t : ⊤} → X t
data Y : Set where
y : Y
-- this type checks
g : {t : ⊤} → Term → X t
g {t} (con nm args) = x {t}
-- this doesn't
f : {t : ⊤} → Term → X t
f {... |
{-# OPTIONS --without-K #-}
module well-typed-quoted-syntax-defs where
open import common
open import well-typed-syntax
open import well-typed-syntax-helpers
open import well-typed-syntax-context-helpers
‘ε’ : Term {Γ = ε} ‘Context’
‘ε’ = ⌜ ε ⌝c
‘□’ : Typ (ε ▻ ‘Typ’ ‘’ ‘ε’)
‘□’ = ‘Term’ ‘’₁ ‘ε’
|
module Data.Fin.Map where
open import Class.Monad
open import Data.Nat
open import Data.Fin
open import Function
DepFinMap : ∀ {a} (n : ℕ) (A : Fin n -> Set a) -> Set a
DepFinMap n A = (k : Fin n) -> A k
FinMap : ∀ {a} (n : ℕ) -> Set a -> Set a
FinMap n A = DepFinMap n (λ _ -> A)
sequenceDepFinMap : ∀ {a n A} {M : ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Wedge where
open import Cubical.HITs.Wedge.Base public
|
postulate
A : Set
P : A → Set
variable
x : A
y : P x
data D₁ {x : A} : P x → Set where
z : D₁ y
s : D₁ y → D₁ y
data D₂ : {x : A} → P x → Set where
z : D₂ y
s : D₂ y → D₂ y
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Ring where
open import Cubical.Algebra.Ring.Base public
open import Cubical.Algebra.Ring.Properties public
|
module _ where
data Unit : Set where
unit : Unit
data D₁ : Set where
c₁ : D₁
module M (_ : Set₁) where
data D₂ : Set where
c₂ : D₂
open M Set
f : D₁ → D₂
f c₁ = c₂
record R (A : Set) : Set where
field a : A
open R ⦃ … ⦄ public
instance
r₁ : R D₁
r₁ = record { a = c₁ }
r₂ : ⦃ r : R D₁ ⦄ → R ... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- Properties relating Initial and Terminal Objects,
-- Product / Coproduct, Zero objects, and Kernel / Cokernel via op
module Categories.Object.Duality {o ℓ e} (C : Category o ℓ e) where
open Category C
open import Level
open import Relation.Binary.... |
{-# OPTIONS --safe --without-K #-}
open import Relation.Nullary.Decidable using (True; toWitness)
open import Function using (_∘_)
import Data.Product as Product
import Data.Unit as Unit
import Data.Fin as Fin
import Data.Nat as Nat
import Data.Vec as Vec
import Data.Vec.Relation.Unary.All as All
open Product using ... |
------------------------------------------------------------------------
-- A delimited continuation monad
------------------------------------------------------------------------
module Category.Monad.Continuation where
open import Category.Applicative
open import Category.Applicative.Indexed
open import Category.Mo... |
{-# OPTIONS --without-K --rewriting #-}
open import Basics
open import lib.Basics
open import Flat
module Axiom.C0 {@♭ i j : ULevel} (@♭ I : Type i) (@♭ R : I → Type j) where
postulate C0 : {@♭ k : ULevel} (@♭ A : Type k)
(p : (index : I) → (is-equiv (λ (a : A) → λ (r : R index) → a)))
... |
module Common.Unit where
data Unit : Set where
unit : Unit
{-# COMPILED_DATA Unit () () #-}
{-# COMPILED_DATA_UHC Unit __UNIT__ __UNIT__ #-}
|
module Classical where
open import Data.Empty using (⊥-elim)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.Product using (_×_) renaming (_,_ to ⟨_,_⟩)
open import Negation using (¬_)
-- 排中律 → 二重否定の除去
em-→-¬¬-elim :
(∀ {A : Set} → A ⊎ ¬ A)
-------------------------
→ (∀ {A : Set} → ¬ ¬ A → A... |
module PLRTree.Equality {A : Set} where
open import PLRTree {A}
data _≃_ : PLRTree → PLRTree → Set where
≃lf : leaf ≃ leaf
≃nd : {l r l' r' : PLRTree}
(x x' : A)
→ l ≃ r
→ l' ≃ r'
→ l ≃ l'
→ node perfect x l r ≃ no... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Consequences of a monomorphism between ring-like structures
------------------------------------------------------------------------
-- See Data.Nat.Binary.Properties for examples of how this and similar
-- modu... |
module builtinInModule where
module Int where
postulate I : Set
{-# BUILTIN INTEGER I #-}
primitive primIntegerPlus : I -> I -> I
|
{-
This file contains:
- Definition of set coequalizers as performed in https://1lab.dev/Data.Set.Coequaliser.html
-}
{-# OPTIONS --safe #-}
module Cubical.HITs.SetCoequalizer.Base where
open import Cubical.Core.Primitives
private
variable
ℓ ℓ' ℓ'' : Level
A : Type ℓ
B : Type ℓ'
-- Set coequalizers ... |
{- NEW TRANSLATION: notation change to avoid exponential increase in term size during translation -}
open import Preliminaries
open import Source
open import Pilot2
module Translation where
mutual
⟨⟨_⟩⟩ : Tp → CTp
⟨⟨ unit ⟩⟩ = unit
⟨⟨ nat ⟩⟩ = nat
⟨⟨ susp A ⟩⟩ = || A ||
⟨⟨ A ->s B ⟩⟩ = ⟨⟨ A ⟩⟩ ... |
{-# OPTIONS --safe --warning=error --without-K --guardedness #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
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.Ord... |
module correct where
open import cfg
open import jarsec using (Parser ; parse ; run-parser ; partial-parse ; _>>=_ ; _>>_ ; _<*>_)
open import Data.Bool
open import Data.List hiding (lookup)
open import Data.Fin hiding (_+_)
open import Data.Char
open import Agda.Builtin.Char renaming ( primCharEquality to charEq )
op... |
record R : Set where
infix 0 _+_
|
-- Mergesort
{-# OPTIONS --without-K --safe #-}
module Algorithms.List.Sort.Merge where
-- agda-stdlib
open import Level
open import Data.Bool using (true; false)
open import Data.List
import Data.List.Properties as Listₚ
open import Data.Product as Prod
import Data.Nat as ℕ
open import Data.Nat.Induction ... |
module slots.test where
open import slots.imports
open import slots.defs using (config ; game)
open import slots.bruteforce using (rtp)
c : config
c = record { n = 3 ; m = 4 }
g : game c
g = record { reels = reels ; winTable = winTable } where
open config c
reel : Reel
reel = # 1 ∷ # 1 ∷ # 1 ∷ # 0 ∷ []
reel′... |
{-# OPTIONS --without-K --safe #-}
module Categories.FreeObjects.Free where
open import Level
open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong)
open import Relation.Binary using (IsEquivalence)
open import Categories.Functor renaming (id to idF)
open import Categories.Category
open import Cate... |
{- Jesper Cockx, 26-05-2014
Issue 1023
-}
{-# OPTIONS --cubical-compatible #-}
module TerminationAndUnivalence where
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
J : ∀ {a b} {A : Set a} {x : A} (P : (y : A) → x ≡ y → Set b) →
(p : P x refl) {y : A} (e : x ≡ y) → P y e
J P p refl = p
dat... |
{-# OPTIONS --without-K #-}
module Functoriality {a} {A : Set a} where
open import PathOperations
open import Types
ap⁻¹ : ∀ {b} {B : Set b} {x y : A} (f : A → B) (p : x ≡ y) →
ap f (p ⁻¹) ≡ (ap f p) ⁻¹
ap⁻¹ f = J
(λ _ _ p → ap f (p ⁻¹) ≡ ap f p ⁻¹)
(λ _ → refl) _ _
ap· : ∀ {b} {B : Set b} {x y z : A} (f : A →... |
-- Given p : A ⟷ B do action on X
act : (A ⟷ B) ⟷ (X ⟷ X)
act = ?
|
{-# OPTIONS --safe #-}
module Cubical.Homotopy.Loopspace where
open import Cubical.Core.Everything
open import Cubical.Data.Nat
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.GroupoidLaws
open import Cubical.HIT... |
module Serializer.Vec where
open import Data.Fin hiding (_+_)
open import Data.Nat
open import Data.Vec
open import Function using (_∘_ ; _$_ ; _∋_ ; id ; const)
open import Function.Bijection
open import Function.Injection
open import Function.Surjection
open import Function.Equality using (_⟶_ ; _⟨$⟩_ ; Π )
open im... |
open import Data.List using ( [] )
open import Data.Product using ( proj₁ ; proj₂ )
open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ )
open import Relation.Binary.PropositionalEquality using ( refl )
open import Web.Semantic.DL.ABox.Interp using ( ⌊_⌋ ; ind ; _*_ )
open import Web.Semantic.DL.ABox.Interp.Morphism using (... |
module PiFrac where
open import Level
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product
infixr 20 _◎_
data <_> {A : Set} : A → Set where
singleton : (x : A) -> < x >
mutual
data B : Set₁ where
ZERO : B
ONE : B
PLUS : B → B → B
TIMES : B → B → B
... |
T-to-≡ : ∀ {x} → T x → x ≡ true
T-to-≡ {true} tx = refl
≡-to-T : ∀ {x} → x ≡ true → T x
≡-to-T {true} x≡true = tt
≤-to-→ : ∀ {x y} → x 𝔹.≤ y → T x → T y
≤-to-→ {true} {true} x≤y _ = tt
→-to-≤ : ∀ {x y} → (T x → T y) → x 𝔹.≤ y
→-to-≤ {false} {false} Tx→Ty = b≤b
→-to-≤ {false} {true} Tx→Ty = f≤t
→-to-≤ {true} {fal... |
{-# OPTIONS --universe-polymorphism #-}
module Issue354 where
------------------------------------------------------------------------
-- Preliminaries
postulate
Level : Set
zero : Level
suc : (i : Level) → Level
_⊔_ : Level → Level → Level
{-# BUILTIN LEVEL Level #-}
{-# BUILTIN LEVELZERO zero #-}
{... |
module Optics.Iso where
open import Agda.Primitive using (Level; _⊔_; lsuc)
open import Function.Equality using (Π)
open import Function.Inverse using (_↔_; inverse; Inverse; _InverseOf_)
open import Relation.Binary.PropositionalEquality using (_≡_; →-to-⟶; refl)
open import Category.Functor.Arr
open import Category.F... |
----------------------------------------------------------------
-- This file contains the definition of natural isomorphisms. --
----------------------------------------------------------------
module Category.NatIsomorphism where
open import Category.NatTrans public
open import Category.Iso public
record NatIso {l₁... |
{-# OPTIONS --cubical-compatible #-}
module Common.Prelude where
import Common.Level
open import Agda.Builtin.Unit public
open import Common.Bool public
open import Common.Char public
open import Common.Float public
open import Common.IO public
open import Common.List public
open import Common.Maybe publ... |
module NonEmptyList where
infixr 5 _∷_
open import Data.Nat
data NList (A : Set) : Set where
[_] : A → NList A
_∷_ : A → NList A → NList A
map : {A B : Set} → (f : A → B) → NList A → NList B
map f [ x ] = [ f x ]
map f (x ∷ l) = f x ∷ map f l
length : ∀ {A} → NList A → ℕ
length [ _ ] = 1
length (_ ∷ l) = suc (... |
{-# OPTIONS --without-K --safe #-}
-- Bundled version of Monoidal Category
module Categories.Category.Monoidal.Bundle where
open import Level
open import Categories.Category.Core using (Category)
open import Categories.Category.Monoidal.Core using (Monoidal)
open import Categories.Category.Monoidal.Braided using (Br... |
module Numeric.Nat.GCD where
open import Prelude
open import Control.WellFounded
open import Numeric.Nat.Properties
open import Numeric.Nat.DivMod
open import Numeric.Nat.Divide
open import Numeric.Nat.Divide.Properties
open import Tactic.Nat
--- GCD ---
record IsGCD (d a b : Nat) : Set where
no-eta-equality
co... |
primitive
ID : Set → Set
ID A = A
|
{-# OPTIONS --without-K #-}
open import lib.Basics
module lib.types.Unit where
⊤ = Unit
tt = unit
abstract
-- Unit is contractible
Unit-is-contr : is-contr Unit
Unit-is-contr = (unit , λ y → idp)
Unit-has-level : {n : ℕ₋₂} → has-level n Unit
Unit-has-level = contr-has-level Unit-is-contr
-- [Unit-has-... |
{-# OPTIONS --without-K #-}
-- Drop-in replacement for the module [Base].
module BaseOver where
-- We hide [apd] and [Σ-eq] because their type is not correct, we want to use
-- dependent paths instead
open import Base public hiding (apd; Σ-eq)
-- Notion of path over a path
path-over : ∀ {i j} {A : Set i} (B : A → Se... |
module _ where
module M (_ : Set₁) where
record R₁ (A : Set) : Set₁ where
no-eta-equality
postulate
x : A
open R₁ ⦃ … ⦄ public
record R₂ (A : Set) : Set₁ where
field
instance
r₁ : R₁ A
open R₂ ⦃ … ⦄
open module MSet = M Set
postulate
A : Set
instance
postulate
m ... |
module Tactic.Reflection.Free where
open import Prelude
open import Builtin.Reflection
open import Tactic.Reflection.DeBruijn
VarSet = List Nat -- ordered
private
_∪_ : VarSet → VarSet → VarSet
[] ∪ ys = ys
xs ∪ [] = xs
(x ∷ xs) ∪ (y ∷ ys) with compare x y
... | (less _) = x ∷ (xs ∪ (y ∷ ys... |
{-# OPTIONS --cubical-compatible --rewriting --confluence-check #-}
module _ where
{- Rewriting relation -}
postulate
_↦_ : ∀ {i} {A : Set i} → A → A → Set i
idr : ∀ {i} {A : Set i} {a : A} → a ↦ a
{-# BUILTIN REWRITE _↦_ #-}
{- Identity type -}
infixr 3 _==_
data _==_ {i} {A : Set i} (a : A) : A → Set i wher... |
{-# OPTIONS --without-K --exact-split --safe #-}
module HoTT-UF-Agda where
open import Universes public
variable
𝓤 𝓥 𝓦 𝓣 : Universe
data 𝟙 : 𝓤₀ ̇ where
⋆ : 𝟙
𝟙-induction : (A : 𝟙 → 𝓤 ̇ ) → A ⋆ → (x : 𝟙) → A x
𝟙-induction A a ⋆ = a
𝟙-recursion : (B : 𝓤 ̇ ) → B → (𝟙 → B)
𝟙-recursion B b x = 𝟙-in... |
{-# OPTIONS --cubical --safe #-}
open import Prelude
open import Relation.Binary
module Relation.Binary.Construct.LowerBound {e} {E : Type e} {r₁ r₂} (totalOrder : TotalOrder E r₁ r₂) where
open TotalOrder totalOrder renaming (refl to <-refl)
import Data.Unit.UniversePolymorphic as Poly
import Data.Empty.UniversePo... |
{-# OPTIONS --without-K --safe #-}
{-
Properties and definitions regarding Morphisms of a category:
- Monomorphism
- Epimorphism
- Isomorphism
- (object) equivalence ('spelled' _≅_ ). Exported as the module ≅
-}
open import Categories.Category
module Categories.Morphism {o ℓ e} (𝒞 : Category o ℓ e) where
... |
------------------------------------------------------------------------
-- Code related to the paper
-- "Operational Semantics Using the Partiality Monad"
--
-- Nils Anders Danielsson
------------------------------------------------------------------------
-- Several definitions and proofs in this code are closely re... |
-- 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.Integer as ℤ using (ℤ)
open import Data.Rational as ℚ usin... |
module ListTest where
import AlonzoPrelude
import PreludeList
open AlonzoPrelude
open PreludeList
mynil : {A:Set} -> List A
mynil = []
mycons : {A:Set} -> A -> List A -> List A
mycons x xs = x :: xs
head : (A:Set) -> List A -> A
head A (x :: xs) = x
|
module Prelude.Word where
import Agda.Builtin.Word as Word
open import Prelude.Nat
open import Prelude.Number
open import Prelude.Semiring
open import Prelude.Equality
open import Prelude.Equality.Unsafe
open import Prelude.Ord
open import Prelude.Unit
open import Prelude.Function
open import Prelude.Decidable
open ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Maybe where
open import Cubical.Data.Maybe.Base public
open import Cubical.Data.Maybe.Properties public
|
-- 2011-09-09, submitted by mokus.4...@gmail.com
-- This bug report wins the first price in the false golfing tournament!
-- {-# OPTIONS -v term:20 #-}
module Issue444 where
data ⊥ : Set where
relevant : .⊥ → ⊥
relevant ()
false : ⊥
false = relevant false
|
{-# OPTIONS --prop --rewriting #-}
open import Examples.Sorting.Sequential.Comparable
module Examples.Sorting.Sequential.Core (M : Comparable) where
open import Calf.CostMonoid
open CostMonoid costMonoid
hiding (zero; _+_; _≤_; ≤-refl; ≤-trans) public
open import Examples.Sorting.Core costMonoid fromℕ M public
|
module E where
t : Set -> Set
t x = x
|
module Term (Gnd : Set)(U : Set)(El : U -> Set) where
open import Basics
open import Pr
open import Nom
import Kind
open module KindGUEl = Kind Gnd U El
import Loc
open module LocK = Loc Kind
import Cxt
open module CxtK = Cxt Kind
data Jud : Set where
Term : Kind -> Jud
Args : Kind -> Gnd -> Jud
Head : Jud
dat... |
module Base.Prelude.Integer where
open import Data.Nat using (ℕ; zero; suc)
open import Data.Integer using (+_; -_) renaming (ℤ to ℤᵖ; _+_ to _+ᵖ_; _-_ to _-ᵖ_; _*_ to _*ᵖ_)
open import Data.Integer.Properties using (_≤?_; _<?_) renaming (_≟_ to _≟ᵖ_)
open import Relation.Nullary.Dec... |
------------------------------------------------------------------------
-- Partiality algebras
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Partiality-algebra where
open import Equality.Propositional.Cubical
open import Logical-equivalence u... |
------------------------------------------------------------------------------
-- Twice funcion
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --w... |
{- This example test that the order in which unification
constraints are generated doesn't matter. The pattern
matching in foo generates the unification problem
[x, zero] = [n + m, n]
with n and m flexible. The first equation can only be
solved after the second one has been solved. For completen... |
------------------------------------------------------------------------
-- Bijections
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Bijection
{reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where
open Derived-def... |
-- Andreas, 2018-08-14, re issue #1558
-- Termination checking functions over inductive-inductive types
-- {-# OPTIONS -v term:40 #-}
mutual
data Cxt : Set where
ε : Cxt
_,_ : (Γ : Cxt) (A : Ty Γ) → Cxt
data Ty : (Γ : Cxt) → Set where
u : ∀ Γ → Ty Γ
Π : ∀ Γ (A : Ty Γ) (B : Ty (Γ , A)) →... |
-- Andreas, 2018-11-23, issue #3304, report and test case by Nisse
open import Agda.Builtin.Equality
open import Agda.Builtin.Sigma
map : {A B : Set} {P : A → Set} {Q : B → Set} →
(f : A → B) → (∀ {x} → P x → Q (f x)) →
Σ A P → Σ B Q
map f g (x , y) = (f x , g y)
postulate
F : Set → Set → Set
... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Rings.Definition
open import Rings.IntegralDomains.Definition
module Rings.Associates.Lemmas {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} ... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
module Categories.Object.Products.Properties {o ℓ e}
(C : Category o ℓ e) where
open Category C
open import Level
import Categories.Object.Terminal
open Categories.Object.Terminal C
import Categories.Object.BinaryProducts
open Categories.O... |
module Check where
open import Data.Fin using (Fin)
open import Data.Nat using (ℕ; suc)
open import Data.Vec hiding (head; tail)
open import Relation.Binary.PropositionalEquality
open import Relation.Nullary using (Dec; yes; no)
open import Types
open import Utils
data Check {n} (Γ : Ctx n) :... |
data Bool : Set where
true : Bool
false : Bool
if_then_else : ∀ {l} {A : Set l} -> Bool -> A -> A -> A
if true then t else e = t
if false then t else e = e
if2_,_then_else1_else2_else_ : ∀ {l} {A : Set l} -> (b1 b2 : Bool) -> (t e1 e2 e : A) -> A
if2 true , true then t else1 e1 else2 e2 else e = t
if2 true , fals... |
{-# OPTIONS --without-K #-}
module sets.vec.properties where
open import equality.core
open import function.core
open import function.extensionality
open import function.isomorphism
open import sets.nat.core using (ℕ; zero; suc)
open import sets.fin using (Fin; zero; suc)
open import sets.vec.core
tabulate-lookup : ∀... |
------------------------------------------------------------------------
-- The two definitions of context extensions are isomorphic
------------------------------------------------------------------------
open import Data.Universe.Indexed
module deBruijn.Context.Extension.Isomorphic
{i u e} (Uni : IndexedUniverse ... |
module UniDB.Morph.Sim where
open import UniDB.Spec
open import UniDB.Subst.Core
open import UniDB.Morph.Depth
import Level
open import Relation.Binary.PropositionalEquality
--------------------------------------------------------------------------------
record Sim (T : STX) (γ₁ γ₂ : Dom) : Set where
constructor ... |
open import Nat
open import Prelude
open import dynamics-core
open import disjointness
module elaboration-generality where
mutual
elaboration-generality-synth : {Γ : tctx} {e : hexp} {τ : htyp} {d : ihexp} {Δ : hctx} →
Γ ⊢ e ⇒ τ ~> d ⊣ Δ →
Γ ⊢... |
postulate A : Set
record R : Set where
field f : A
record S : Set where
field g : A
test : R → A
test record{g = a} = a
|
open import Agda.Primitive using (lsuc; _⊔_)
open import Data.Fin using (Fin)
open import MultiSorted.AlgebraicTheory
module MultiSorted.Substitution {ℓ} {𝓈 ℴ} {Σ : Signature {𝓈} {ℴ}} (T : Theory ℓ Σ) where
open Theory T
-- an equality is preserved by the action of the identity
eq-id-action : ∀ {Γ : Context... |
{-# OPTIONS --without-K --safe #-}
------------------------------------------------------------------------
-- Lists, based on the Kleene star and plus.
--
-- These lists are exatcly equivalent to normal lists, except the "cons"
-- case is split into its own data type. This lets us write all the same
-- functions as b... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Unary.Raw where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude using (isProp)
open import Cubical.Data.Empty hiding (rec)
open import Cubical.Data.Unit.Base using (⊤)
open import Cubical.Data.Sigma
open import Cubi... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Definitions of algebraic structures like monoids and rings
-- (packed in records together with sets, operations, etc.)
------------------------------------------------------------------------
module Algebra wher... |
-- Some extra properties of integers.
{-# OPTIONS --without-K --safe #-}
module Integer.Properties where
-- imports from stdlib.
open import Relation.Nullary using (¬_)
open import Relation.Binary.PropositionalEquality as PE
using (_≡_ ; refl ; sym ; cong ; trans ; cong₂)
open import Data.Sum using (_⊎_ ; inj₁ ; ... |
module FRP.LTL.RSet where
open import FRP.LTL.RSet.Core public using ( RSet ; ⟨_⟩ ; ⟦_⟧ )
-- Propositional logic
open import FRP.LTL.RSet.Unit public using ( T )
open import FRP.LTL.RSet.Empty public using ( F )
open import FRP.LTL.RSet.Product public using ( _∧_ ; fst ; snd ; _&&&_ )
open import FRP.LTL.RSet.Sum pu... |
{-# OPTIONS --without-K #-}
module A2 where
open import Data.Nat
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product
infix 4 _≡_ -- propositional equality
infixr 10 _◎_
infixr 30 _⟷_
------------------------------------------------------------------------------
-- Our own ... |
{-
Agda Implementors' Meeting VI
Göteborg
May 24 - 3zero, 2zerozero7
Hello Agda!
Ulf Norell
-}
-- Records are labeled sigma types.
module R where
{-
A very simple record.
-}
data Nat : Set where
zero : Nat
succ : Nat
record Point ... |
open import Oscar.Prelude
module Oscar.Class.Fmap where
module _ where
open import Oscar.Data.Proposequality
open import Oscar.Class.IsFunctor
open import Oscar.Class.Reflexivity
import Oscar.Class.Reflexivity.Function
open import Oscar.Class.Surjidentity
record Fmap {𝔬₁ 𝔬₂} (𝓕 : Ø 𝔬₁ → Ø 𝔬₂) : Ø (... |
module SyntaxRaw where
import Level
open import Data.Empty
open import Data.Unit as Unit
open import Data.Nat
open import Data.List as List renaming ([] to Ø; [_] to [_]L)
open import Data.List.Properties using (++-monoid)
open import NonEmptyList as NList
open import Data.Vec as Vec hiding ([_]; _++_)
open import Dat... |
{-# OPTIONS --copatterns #-}
module CS410-Indexed where
open import CS410-Prelude
open import CS410-Nat
-- some notation for working with indexed sets
_-:>_ _*:_ _+:_ : {I : Set}(S T : I -> Set) -> I -> Set
(S -:> T) i = S i -> T i -- index-respecting functions
(S *: T) i = S i * T i -- index-matching pairs
... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Substitution.Reduction {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.LogicalRelation.Properties
open import Definition.LogicalRelation.Substitution
open import Tools.Product
... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.HSpace renaming (HSpaceStructure to HSS)
import homotopy.WedgeExtension as WedgeExt
module homotopy.Pi2HSusp {i} {X : Ptd i} {{_ : has-level 1 (de⊙ X)}}
{{_ : is-connected 0 (de⊙ X)}} (H-X : HSS X)
where
{- TODO this belongs somewher... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Object.Terminal
-- Various constructors of Product Objects
module Categories.Object.Product.Construction {o ℓ e} (C : Category o ℓ e) (T : Terminal C) where
open import Categories.Object.Exponential C hiding (repack)
open impo... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Group where
open import Cubical.Structures.Group.Base public
open import Cubical.Structures.Group.Properties public
open import Cubical.Structures.Group.Morphism public
open import Cubical.Structures.Group.MorphismProperties public
|
module Haskell.Prim.Applicative where
open import Haskell.Prim
open import Haskell.Prim.Either
open import Haskell.Prim.Foldable
open import Haskell.Prim.Functor
open import Haskell.Prim.List
open import Haskell.Prim.Maybe
open import Haskell.Prim.Monoid
open import Haskell.Prim.Tuple
------------------------------... |
module Data.FixedTree.Properties where
import Lvl
open import Data using (Unit ; <>)
open import Data.Boolean
open import Data.FixedTree
open import Data.Tuple.Raise
import Data.Tuple.Raiseᵣ.Functions as Raise
open import Functional as Fn
open import Logic.Propositional
open import Numeral.Finite
open import... |
{-# OPTIONS --without-K #-}
open import Types
open import Functions
open import Paths
open import HLevel
open import Equivalences
module Univalence {i} where
postulate -- Univalence axiom
univalence : (A B : Set i) → is-equiv (path-to-eq {i} {A} {B})
path-to-eq-equiv : {A B : Set i} → ((A ≡ B) ≃ (A ≃ B))
path-to... |
{-# OPTIONS --without-K --safe #-}
module Fragment.Tactic.Utils where
open import Reflection hiding (name; Type; _≟_)
open import Reflection.Term using (_≟_)
open import Data.Nat using (ℕ; zero; suc)
open import Data.Fin using (Fin)
open import Data.Nat.Show using (show)
open import Data.String using (String) renami... |
{- 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 Util.Prelude
-- This module defines types used in the specificat... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Substitution.Properties {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.Type... |
module Self where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; sym)
data B : Set where
T : B
F : B
_&&_ : B -> B -> B
infixl 20 _&&_
T && T = T
T && F = F
F && _ = F
_||_ : B -> B -> B
infixl 15 _||_
T || _ = T
F || T = T
F || F = F
p||p≡p : ∀ (p : B) -> p || p ≡ p
p||p≡p ... |
module my-vector where
open import nat
open import bool
open import eq
data 𝕍 {ℓ}(A : Set ℓ) : ℕ → Set ℓ where
[] : 𝕍 A 0
_::_ : {n : ℕ} (x : A) (xs : 𝕍 A n) → 𝕍 A (suc n)
infixr 6 _::_ _++𝕍_
_++𝕍_ : ∀ {ℓ} {A : Set ℓ}{n m : ℕ} →
𝕍 A n → 𝕍 A m → 𝕍 A (n + m)
[] ++𝕍 ys = ys
(x :: xs) ++𝕍 ys = x ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.