text stringlengths 4 690k |
|---|
module _ where
data Bool : Set where
false true : Bool
{-# COMPILED_DATA Bool Bool False True #-}
postulate
IO : Set → Set
return : {A : Set} → A → IO A
{-# COMPILED_TYPE IO IO #-}
{-# COMPILED return \ _ -> return #-}
{-# COMPILED_UHC return \ _ x -> UHC.Agda.Builtins.primReturn x #-}
{-# COMPILED_JS return... |
open import Nat
open import Prelude
open import List
open import contexts
open import core
open import lemmas-env
open import lemmas-progress
open import decidability
open import results-checks
-- TODO we're forced to prove this weaker version, since the strong version is
-- unprovable. That said, this weak ver... |
{-# OPTIONS --rewriting --without-K #-}
open import Prelude
open import GSeTT.Syntax
open import GSeTT.Rules
open import GSeTT.Uniqueness-Derivations
open import Sets ℕ eqdecℕ
open import GSeTT.Dec-Type-Checking
open import CaTT.Ps-contexts
{- PS-contexts -}
module CaTT.Relation where
-- The relation ◃ generating ... |
{-# OPTIONS --rewriting --without-K #-}
open import Prelude
open import GSeTT.Syntax
open import GSeTT.Rules
open import GSeTT.Uniqueness-Derivations
open import Sets ℕ eqdecℕ
open import GSeTT.Dec-Type-Checking
open import CaTT.Ps-contexts
open import CaTT.Relation
{- PS-contexts -}
module CaTT.Uniqueness-Derivation... |
module LateMetaVariableInstantiation where
data ℕ : Set where
zero : ℕ
suc : (n : ℕ) → ℕ
{-# BUILTIN NATURAL ℕ #-}
postulate
yippie : (A : Set) → A
slow : (A : Set) → ℕ → A
slow A zero = yippie A
slow A (suc n) = slow _ n
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
foo... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Monad
module Categories.Category.Construction.EilenbergMoore {o ℓ e} {C : Category o ℓ e} (M : Monad C) where
open import Level
open import Categories.Morphism.Reasoning C
private
module C = Category C
module M = Monad M
... |
-- A variant of code reported by Andreas Abel.
{-# OPTIONS --guardedness --sized-types #-}
open import Agda.Builtin.Size
data ⊥ : Set where
mutual
data D : Size → Set where
inn : ∀ i → D' i → D (↑ i)
record D' (i : Size) : Set where
coinductive
constructor ♯
field ♭ : D i
open D'
iter : ∀{i... |
-- data construction, disproving
module Auto-DataConstruction where
open import Auto.Prelude
module Disproving where
h0 : {X : Set} → (xs ys : List X) → (xs ++ ys) ≡ (ys ++ xs)
h0 = {!-d Fin!}
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Sum.Relation.Binary.LeftOrder directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Sum.... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.ListedFiniteSet.Base where
open import Cubical.Core.Everything
open import Cubical.Foundations.Logic
open import Cubical.Foundations.Everything
private
variable
A : Type₀
infixr 20 _∷_
infix 30 _∈_
data LFSet (A : Type₀) : Type₀ where
[] : LFSet A
_... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Nat
open import lib.types.Sigma
module lib.types.PathSeq where
{-
This is a library on reified equational reasoning.
When you write the following (with the usual equational reasoning combinators):
t : a == e
t = a =⟨ p ⟩
... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
open import Categories.Object.Terminal
open import Level
module Categories.Object.Terminal.Exponentials {o ℓ e : Level}
(C : Category o ℓ e)
(T : Terminal C) where
open Category C
open Terminal T
import Categories.Object.Exponential
imp... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Groups.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Groups.Subgroups.Normal.Definition
module Groups.Subgroups.Normal.Examples {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ : A → A → A} (G : Group S _+_) wh... |
module Isomorphism where
import Sets
open Sets
infix 20 _≅_
data _≅_ (A B : Set) : Set where
iso : (i : A -> B)(j : B -> A) ->
(forall x -> j (i x) == x) ->
(forall y -> i (j y) == y) ->
A ≅ B
refl-≅ : (A : Set) -> A ≅ A
refl-≅ A = iso id id (\x -> refl) (\x -> refl)
iso[×] : {A₁ A₂ B₁ ... |
{-# OPTIONS --cubical --no-import-sorts #-}
module MoreLogic where -- hProp logic
open import MoreLogic.Reasoning public
open import MoreLogic.Definitions public
open import MoreLogic.Properties public
|
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Properties.Reflexivity {{eqrel : EqRelSet}} where
open import Definition.Untyped
open import Definition.Typed
open import Definition.LogicalRelation
open import Tools.Embedding
open import Tools.Produc... |
open import Oscar.Prelude
open import Oscar.Class.IsPrecategory
open import Oscar.Class.Transitivity
module Oscar.Class.Precategory where
record Precategory 𝔬 𝔯 ℓ : Ø ↑̂ (𝔬 ∙̂ 𝔯 ∙̂ ℓ) where
constructor ∁
infix 4 _∼̇_
field
{𝔒} : Ø 𝔬
_∼_ : 𝔒 → 𝔒 → Ø 𝔯
_∼̇_ : ∀ {x y} → x ∼ y → x ∼ y → Ø ℓ
... |
------------------------------------------------------------------------
-- Fixity and associativity
------------------------------------------------------------------------
module RecursiveDescent.Hybrid.Mixfix.Fixity where
open import Data.Fin using (Fin; zero; suc; #_)
open import Data.Fin.Props using (eq?)
open i... |
module logic where
open import Level
open import Relation.Nullary
open import Relation.Binary hiding (_⇔_ )
open import Data.Empty
data Bool : Set where
true : Bool
false : Bool
record _∧_ {n m : Level} (A : Set n) ( B : Set m ) : Set (n ⊔ m) where
constructor ⟪_,_⟫
field
proj1 : A
proj... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Instances.Semilattice where
open import Cubical.Foundations.Prelude
open import Cubical.Algebra.Semilattice
open import Cubical.Categories.Category
open import Cubical.Categories.Instances.Poset
open Category
module _ {ℓ} (L : Semilattice ℓ) where
open MeetSemila... |
-- Andreas, 2013-03-22
module Issue473a where
data D : Set where
d : D
data P : D → Set where
p : P d
record Rc : Set where
constructor c
field f : D
works : {r : Rc} → P (Rc.f r) → Set
works p = D
works' : (r : Rc) → P (Rc.f r) → Set
works' (c .d) p = D
-- We remove the constructor:
record R : Set where... |
-- Ad-hoc monoid typeclass module
module Utils.Monoid where
open import Data.List
open import Data.String
record Monoid {α}(A : Set α) : Set α where
constructor rec
field
append : A → A → A
identity : A
infixr 5 _<>_
_<>_ : ∀ {α}{A : Set α} ⦃ _ : Monoid A ⦄ → A → A → A
_<>_ ⦃ dict ⦄ a b = Monoid.appe... |
{-# OPTIONS --without-K #-}
-- Exposes the core of hott
module hott.core where
-- The basic types of hott
open import hott.core.equality public -- Equality type
open import hott.core.sigma public -- Dependent pairs
open import hott.core.universe public -- Universes
open import hott.core.universe.pointed public... |
-- 2016-01-14 Andreas, issue reported by Martin Stone Davis
open import Common.Equality
module _ {K : Set} where
record Map : Set where
field
unmap : K
record _∉_ (k : K) (m : Map) : Set where
field
un∉ : Map.unmap m ≡ k
pattern ∉∅ = record { un∉ = refl }
not-here : ∀ {k : K} {m : Map} (k∉m : k ∉ m) →... |
open import Theory
open import Categories.Category using (Category)
open import Categories.Category.CartesianClosed
module Soundness {o ℓ e}
(𝒞 : Category o ℓ e)
(CC : CartesianClosed 𝒞)
{ℓ₁ ℓ₂ ℓ₃}
(Th : Theory ℓ₁ ℓ₂ ℓ₃)
where
open Theory.Theory Th
open import Semantics 𝒞 CC Sg
open import Syntax
... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
module lib.types.TwoSemiCategory where
module _ {i j} {El : Type i} (Arr : El → El → Type j)
(_ : ∀ x y → has-level 1 (Arr x y)) where
record TwoSemiCategoryStructure : Type (lmax i j) where
field
comp : ∀ {x y z} → Arr x y → Arr y z → Arr... |
open import Categories
open import Functors
open import RMonads
module RMonads.REM.Adjunction {a b c d}{C : Cat {a}{b}}{D : Cat {c}{d}}
{J : Fun C D}(M : RMonad J) where
open import Library
open import RAdjunctions
open import RMonads.REM M
open import RMonads.REM.Functors J M
open Fun... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Rings.Definition
open import Rings.Homomorphisms.Definition
open import Rings.Ideals.Definition
module Rings.Homomorphisms.Kernel {a b c d : _} {A : Set a} {B : Set c} {S : Setoid {a} {b} ... |
-- Andreas, 2017-07-28, issue #776 reported by p.giarusso on 30 Dec 2012
open import Agda.Primitive
-- Note Set₁ instead of Set (suc l)
data _:=:_ {l : Level} (A : Set l) (B : Set l) : Set₁ where
proof : {F : Set l → Set l} → F A → F B → A :=: B
-- WAS: no error message
-- Expected:
-- The type of the constructor... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Sn.Base where
open import Cubical.HITs.Susp
open import Cubical.Data.Nat
open import Cubical.Data.NatMinusOne
open import Cubical.Data.Empty
open import Cubical.Foundations.Prelude
S₊ : ℕ₋₁ → Type₀
S₊ neg1 = ⊥
S₊ (suc n) = Susp (S₊ n)
S : ℕ → Type₀
S n = S₊ (ℕ→ℕ₋₁... |
{-# OPTIONS -v treeless:20 #-}
module _ where
data N : Set where
zero : N
suc : N → N
_+_ : N → N → N
zero + n = n
suc m + n = suc (m + n)
record P A B : Set where
constructor _,_
field fst : A
snd : B
open P
{-# INLINE fst #-}
{-# INLINE snd #-}
-- Without handling repeated cases:
-- g = λ a → ca... |
import Structure.Logic.Classical.NaturalDeduction
-- TODO: MAybe rename to SetBoundedQuantification
module Structure.Logic.Classical.SetTheory.SetBoundedQuantification {ℓₗ} {Formula} {ℓₘₗ} {Proof} {ℓₒ} {Domain} ⦃ classicLogic : _ ⦄ (_∈_ : Domain → Domain → Formula) where
open Structure.Logic.Classical.NaturalDeduction... |
-- Andreas, AIM XXIII 2016-04-21 Overloaded projections
-- Milestone 1: Check overloaded projections on rhs (without postponing).
module _ (A : Set) (a : A) where
module RecDefs where
record R B : Set where
field f : B
open R public
record S B : Set where
field f : B
open S public
record T B : S... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Non-empty lists
------------------------------------------------------------------------
module Data.List.NonEmpty where
open import Category.Monad
open import Data.Bool
open import Data.Bool.Properties
open im... |
open import Relation.Binary using (IsDecEquivalence)
open import Agda.Builtin.Equality
module UnifyWith (FunctionName : Set) ⦃ isDecEquivalenceA : IsDecEquivalence (_≡_ {A = FunctionName}) ⦄ where
open import UnifyTermF FunctionName
open import UnifyMguF FunctionName
open import UnifyMguCorrectF FunctionName
open i... |
{-# OPTIONS --without-K --safe #-}
module Data.Quiver.Morphism where
-- Morphism of Quivers, as well as some useful kit (identity, composition, equivalence)
-- also define map on paths, and that it behaves well wrt morphisms and morphism equivalence.
-- See the further comments around the definition of equivalence, ... |
module Highlighting where
Set-one : Set₂
Set-one = Set₁
record R (A : Set) : Set-one where
constructor con
field X : Set
F : Set → Set → Set
F A B = B
field P : F A X → Set
-- Note: we cannot check highlighting of non-termination
-- any more (Andreas, 2014-09-05), since termination failure
-- is a... |
module SecondOrder.MContext {ℓ} (arity : Set ℓ) (sort : Set ℓ) where
data MContext : Set ℓ where
ctx-empty : MContext
ctx-slot : arity → sort → MContext
_,,_ : MContext → MContext → MContext
infixl 5 _,,_
infix 4 [_,_]∈_
-- the meta-variables of a given type in a context
data [_,_]∈_ (Λ : ari... |
module _ where
open import Common.Prelude hiding (_>>=_)
open import Common.Reflection
open import Common.Equality
module _ (A : Set) where
record R : Set where
`R₀ : Type
`R₀ = def (quote R) []
`R₁ : Term → Type
`R₁ a = def (quote R) (vArg a ∷ [])
`Nat : Type
`Nat = def (quote Nat) []
_`→_ : Type... |
------------------------------------------------------------------------
-- Well-typed substitutions
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module Data.Fin.Substitution.Typed where
open import Data.Context as Ctx hiding (map)
open import Data.Conte... |
-- {-# OPTIONS --verbose tc.records.ifs:15 #-}
-- {-# OPTIONS --verbose tc.constr.findInScope:15 #-}
-- {-# OPTIONS --verbose tc.term.args.ifs:15 #-}
-- {-# OPTIONS --verbose cta.record.ifs:15 #-}
-- {-# OPTIONS --verbose tc.section.apply:25 #-}
-- {-# OPTIONS --verbose tc.mod.apply:100 #-}
-- {-# OPTIONS --verbose sco... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Field.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.SIP
open import Cub... |
{-# OPTIONS --without-K --safe #-}
open import Agda.Builtin.Bool
open import Data.Maybe.Base using (Maybe; just; nothing)
open import Relation.Nullary
open import Data.Rational.Unnormalised.Base using (ℚᵘ; 0ℚᵘ; _≃_)
open import Data.Rational.Unnormalised.Properties using (+-*-commutativeRing; _≃?_)
isZero? : ∀ (p : ℚ... |
------------------------------------------------------------------------
-- Conatural numbers
------------------------------------------------------------------------
{-# OPTIONS --without-K --sized-types #-}
open import Equality
module Conat {c⁺} (eq : ∀ {a p} → Equality-with-J a p c⁺) where
open Derived-definitio... |
open import Data.Product using ( ∃ ; _×_ ; _,_ ; proj₁ ; proj₂ )
open import Relation.Unary using ( _∈_ )
open import Web.Semantic.DL.ABox using ( ABox )
open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ; _⊨b_ ; ⊨a-resp-≲ ; ⊨b-resp-≲ )
open import Web.Semantic.DL.ABox.Interp using ( Interp ; ⌊_⌋ ; _*_ )
open import ... |
module x03-842Relations-hc where
-- Library
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; sym) -- added sym
open import Data.Nat using (ℕ; zero; suc; _+_)
open import Data.Nat.Properties using (+-comm)
-- The less-than-or-equal-to relation.
data _≤_ : ℕ → ℕ → Set where
z≤n : ... |
{-# OPTIONS --cubical --no-import-sorts #-}
module Test4 where
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Foundations.Logic
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
record !_ {ℓ} (X : Type ℓ) : Type ℓ where
induct... |
----------------------------------------------------------------
-- This file contains the definition of categories. --
----------------------------------------------------------------
module Category.Category where
open import Level public renaming (suc to lsuc)
open import Data.Product
open import Setoid.... |
------------------------------------------------------------------------
-- The "circle"
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
-- Partly following the HoTT book.
-- The module is parametrised by a notion of equality. The higher
-- constructor... |
------------------------------------------------------------------------
-- Properties related to stability for Erased
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Erased.Stability
{c⁺} (eq : ∀ {a p} → Equality-with-J a p c⁺... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
record Eq (A : Set) : Set₁ where
field
_≈_ : A → A → Set
open Eq {{...}} public
record Setoid : Set₁ where
field
∣_∣ : Set
{{eq}} : Eq ∣_∣
open Setoid public
instance
EqNat : Eq Nat
_≈_ {{EqNat}} = _≡_
NatSetoid : Setoid
∣ NatS... |
module Numeral.Integer.Function where
open import Numeral.Integer
open import Numeral.Integer.Oper
open import Numeral.Natural as ℕ using (ℕ)
|
{-# OPTIONS --allow-unsolved-metas #-}
module AgdaIssue2557 where
record Superclass : Set₁ where field super : Set
open Superclass ⦃ … ⦄ public
record Subclass : Set₁ where
field
⦃ iSuperclass ⦄ : Superclass
sub : super
open Subclass
postulate A : Set
instance
SuperclassA : Superclass
Superclass.s... |
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-}
module Test.Number where
open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero)
private
variable
ℓ ℓ' ℓ'' : Level
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubic... |
open import Prelude
open import core
open import contexts
open import lemmas-matching
module synth-unicity where
-- synthesis only produces equal types. note that there is no need for an
-- analagous theorem for analytic positions because we think of
-- the type as an input
synthunicity : {Γ : tctx} {e : hexp}... |
-- Minimal logic, PHOAS approach, initial encoding
module Pi.M (Indiv : Set) where
-- Types
data Ty : Set
Pred : Set
Pred = Indiv -> Ty
infixl 2 _&&_
infixl 1 _||_
infixr 0 _=>_
data Ty where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
_&&_ : Ty -> Ty -> Ty
_||_ : Ty -> Ty -> Ty
FALSE : ... |
module _ where
open import Agda.Builtin.Bool
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
open import Agda.Builtin.Unit
record R : Set₁ where
field
_≡_ : {A : Set} → A → A → Set
refl : {A : Set} (x : A) → x ≡ x
record R′ (_ : Set) : Set where
module _ (r : R) (_ : {A : Set} → R′ A) w... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.Relation
open import lib.NType2
open import lib.types.Pi
module lib.types.SetQuotient {i} {A : Type i} {j} where
postulate -- HIT
SetQuot : (R : Rel A j) → Type (lmax i j)
module _ {R : Rel A j} where
postulate -- HIT
q[_] : (... |
module Issue4022 where
open import Common.Prelude
open import Agda.Builtin.Equality
open import Agda.Builtin.Char.Properties
open import Agda.Builtin.String.Properties
open import Agda.Builtin.Float.Properties
open import Issue4022.Import
|
{-# OPTIONS --cubical --no-import-sorts --guardedness --safe #-}
module Cubical.Codata.M.AsLimit.M where
open import Cubical.Codata.M.AsLimit.M.Base public
open import Cubical.Codata.M.AsLimit.M.Properties public
|
module Main where
import Proof
|
{-# OPTIONS --copatterns --sized-types #-}
-- {-# OPTIONS -v tc.size.solve:30 #-}
-- {-# OPTIONS -v term:40 -v term.proj:60 --show-implicit #-}
-- Andreas, 2013-10-01 Make sure trailing implicit insertion
-- works with copatterns
module CopatternTrailingImplicit where
import Common.Level
open import Common.Size
open i... |
{-# OPTIONS --without-K #-}
-- The universe of all types
module hott.core.universe where
open import Agda.Primitive public using (Level; lzero; lsuc; _⊔_)
-- We give an new name for Set
Type : (ℓ : Level) → Set (lsuc ℓ)
Type ℓ = Set ℓ
lone : Level; lone = lsuc lzero
ltwo : Level; ltwo = lsuc lone
lthree : L... |
{-# OPTIONS --no-positivity-check #-}
module STLC.Coquand.Normalisation where
open import STLC.Coquand.Substitution public
--------------------------------------------------------------------------------
record 𝔐 : Set₁ where
field
𝒲 : Set
𝒢 : 𝒲 → Set
_⊒_ : 𝒲 → 𝒲 → Set
idₐ ... |
module Haskell.RangedSets.Boundaries where
open import Agda.Builtin.Nat as Nat hiding (_==_; _<_; _+_; _-_)
open import Agda.Builtin.Char
open import Agda.Builtin.Int using (pos; negsuc)
open import Haskell.Prim
open import Haskell.Prim.Ord
open import Haskell.Prim.Bool
open import Haskell.Prim.Char
open import Haske... |
open import Prelude
module Implicits.Resolution.Termination.Lemmas.Stack
where
open import Induction.WellFounded
open import Induction.Nat
open import Data.Fin.Substitution
open import Implicits.Syntax
open import Implicits.Substitutions
open import Implicits.Substitutions.Lemmas
open import Data.Nat hiding (_<_)
o... |
module Issue555c where
import Common.Level
record R {a} (A : Set a) : Set
record R A where
field f : A |
------------------------------------------------------------------------------
-- Inductive PA properties using the induction principle
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-u... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Pointwise sum
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Sum.Relation.Binary.Pointwise where
open import Data.Product using (_,_)
op... |
module Human.IO where
postulate IO : ∀ {a} → Set a → Set a
{-# BUILTIN IO IO #-}
|
module Data.Fin.Subset.Disjoint where
open import Data.Nat
open import Data.Vec hiding (_∈_)
open import Data.Fin
open import Data.List as List hiding (zipWith)
open import Data.Fin.Subset
-- disjointness and relational specifiation of disjoint union
module _ {n} where
_◆_ : Subset n → Subset n → Set
l ◆ r = Emp... |
module natThms where
open import lib
-- this function divides a natural number by 2, dropping any remainder
div2 : ℕ → ℕ
div2 0 = 0
div2 1 = 0
div2 (suc (suc x)) = suc (div2 x)
div2-double : ∀(x : ℕ) → (div2 (x * 2)) ≡ x
div2-double zero = refl
div2-double (suc x) rewrite div2-double (x) = refl
{- Hi... |
-- Reported by nad 2018-01-23
{-# OPTIONS --sized-types #-}
module Issue3517 where
import Issue3517.S
import Issue3517.M
|
module Lang.Vars.Structure.Operator where
import Lvl
open import Data
open import Logic.Predicate
open import Structure.Setoid
open import Structure.Function.Domain
open import Structure.Operator.Properties
open import Structure.Operator
open import Type
-- TODO: These are to make the generalized variables work when ... |
{-# OPTIONS --without-K #-}
open import HoTT
open import homotopy.elims.Lemmas
{- Given a span [A ←f– C –g→ B] and a map [h : A ⊔_C B → D] where
- [g] has a left inverse:
- To define a fundction [Π (Cof h) P], one can give only the [cfbase],
- [cfcod], [cfglue∘left], and [cfglue∘right] cases, and construct a map... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Substitution.Introductions.Universe {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.LogicalRelation
open import Definition.LogicalRelation.Properti... |
-- Andreas, 2018-06-09, issue #2513, parsing attributes
postulate
@0 @ω A : Set
-- Should fail with error:
-- Conflicting attributes: 0 ω
|
module Data.FixedTree where
import Lvl
open import Data hiding (empty)
open import Data.List
open import Data.Tuple using (_⨯_ ; _,_)
open import Data.Tuple.Raise
open import Functional as Fn
open import Numeral.Natural
open import Type
private variable ℓ ℓᵢ ℓₗ ℓₙ ℓₒ : Lvl.Level
private variable n : ℕ
private va... |
{-# OPTIONS --cubical --safe #-}
module HITs.PropositionalTruncation.Sugar where
open import Cubical.HITs.PropositionalTruncation
open import Level
_=<<_ : ∀ {a} {A : Type a} {b} {B : ∥ A ∥ → Type b}
→ ((x : A) → ∥ B ∣ x ∣ ∥) → (xs : ∥ A ∥) → ∥ B xs ∥
_=<<_ = elimPropTrunc (λ _ → squash)
_>>=_ : ∀ {a} {A : Ty... |
{-
Part 3: Univalence and the SIP
• Univalence from ua and uaβ
• Transporting with ua
• The SIP as a consequence of ua
-}
{-# OPTIONS --cubical #-}
module Part3 where
open import Cubical.Core.Glue public
using ( Glue ; glue ; unglue ; lineToEquiv )
open import Cubical.Foundations.Equiv
open import Cubical.Founda... |
{-# OPTIONS --copatterns #-}
open import Common.Prelude
record R : Set where
field
f1 : Nat
f2 : String
r : R
R.f1 r = 5
R.f2 r = "yes"
main = putStrLn (R.f2 r)
|
{- 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
import LibraBFT.Impl.OBM.ECP-LBFT-OBM-Di... |
-- Andreas, 2012-10-18 wish granted
module Issue481 where
-- Use case:
open import Common.Issue481ParametrizedModule Set using () renaming (id to idSet)
open import Common.Issue481ParametrizedModule (Set → Set) using () renaming (id to idSetToSet)
open import Common.Issue481ParametrizedModule
-- With 'as' clause:
... |
module Haskell.Prim.Word where
open import Agda.Builtin.Nat
open import Agda.Builtin.Bool
open import Agda.Builtin.List
open import Agda.Builtin.Char
open import Agda.Builtin.String
open import Agda.Builtin.Unit
open import Agda.Builtin.Int using (pos; negsuc)
import Agda.Builtin.Word renaming (Word64 to Word; primW... |
{-# OPTIONS --universe-polymorphism #-}
module Issue232 where
open import Common.Level
data T {ℓ} : {α : Set ℓ} → α → Set (lsuc ℓ) where
c : {α : Set ℓ} {x : α} → T x
|
{-# OPTIONS --without-K --safe #-}
module Reader where
-- The reader monad (mainly used for nice syntax with idiom brackets)
open import Level
Reader : ∀ {r a} → Set r → Set a → Set (a ⊔ r)
Reader R A = R → A
module _ {r} {R′ : Set r} where
R : ∀ {a} → Set a → Set (a ⊔ r)
R = Reader R′
pure : ∀ {a} {A : Set... |
module AbstractTermination where
data Nat : Set where
zero : Nat
suc : Nat → Nat
mutual
f : Nat → Nat
f n = g n
where
abstract
g : Nat → Nat
g n = f n
-- Andreas, 2016-10-03 re issue #2231.
-- Should give termination error.
-- Wrong behavior with Agda-2.3.2.
-- Correct behavior fro... |
module TypesMore where
open import Basics
open import Types4
module DESC (I : Set) where
data Desc : Set1 where
inx : I -> Desc
sg : (A : Set)(D : A -> Desc) -> Desc
_!_ : I -> Desc -> Desc
Node : Desc -> (I -> Set) -> I -> Set
Node (inx x) R i = x == i
Node (sg A D) R i = Sg A \ a -> Node (D a... |
-- 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... |
-- Andreas, 2015-03-10, issue reported by Andrea Vezzosi
postulate
X : Set
data D p : X → Set p where
c : ∀ i → D _ i
-- WAS: internal error in Substitute.hs due to negative De Bruijn index
-- should work now
|
{- Name: Bowornmet (Ben) Hudson
--Preorders 2: Electric Boogaloo--
-}
open import Preliminaries
module Preorder-withmax where
{- Doing the same thing as we did in Preorder.agda but this
time we want to keep our end goal in mind and extend the
notion of preorders to include information about maximums
... |
module Text.Greek.SBLGNT.Jude where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΙΟΥΔΑ : List (Word)
ΙΟΥΔΑ =
word (Ἰ ∷ ο ∷ ύ ∷ δ ∷ α ∷ ς ∷ []) "Jude.1.1"
∷ word (Ἰ ∷ η ∷ σ ∷ ο ∷ ῦ ∷ []) "Jude.1.1"
∷ word (Χ ∷ ρ ∷ ι ∷ σ ∷ τ ∷ ο ∷ ῦ ∷ [])... |
open import Level
import Categories.Category
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; subst; cong)
open import Syntax
open import Renaming
open import Substitution
open import Instantiation
module SyntaxMap where
open Signature
open Expression
open Equality
infix 5 _→ᵐ... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
module Categories.Object.BinaryCoproducts {o ℓ e} (C : Category o ℓ e) where
open Category C
open Equiv
open import Level
import Categories.Object.Coproduct as Coproduct
open import Categories.Morphisms C
open module CP = Coproduct C hiding (m... |
-- Andreas, 2014-12-02, issue reported by Jesper Cockx
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
subst : ∀ (A : Set)(P : A → Set)(x y : A) → x ≡ y → P x → P y
subst A P x .x refl t = t
mutual
Type : Set
postulate
type : Type
Term : Type → Set
Type = Term type
mutual
weakenType : Typ... |
------------------------------------------------------------------------
-- Half adjoint equivalences
------------------------------------------------------------------------
-- This development is partly based on the presentation of half
-- adjoint equivalences in the HoTT book, and partly based on
-- Voevodsky's wor... |
module Prelude where
open import Agda.Primitive public
open import Prelude.Unit public
open import Prelude.Empty public
open import Prelude.Function public
open import Prelude.Char public
open import Prelude.String public
open import Prelude.Bool public
open import Prelude.Nat... |
module MUniverse where
-- This is universe polymorphism and extensional equality module
open import Sec2
-- import Data.List
data _≃₀_ {A : Set} (a : A) (b : A) : Set where
a≃b : (a ≡ b) → a ≃₀ b
data _≃₁_ {A : Set} (f : A → A) (g : A → A) : Set where
f≃g : ((x y : A) → (x ≃₀ y) → (f x ≃₀ g y)) → f ≃₁ g
B==B : ... |
-- Andreas, 2014-05-21, reported and test case by Fabien Renaud
module Issue1138 where
open import Common.Equality
postulate
Var : Set
Varset : Set
_∖_ : Varset -> Var -> Varset
_⊆_ : Varset -> Varset -> Set
data Expression : Set where
abs : Var -> Expression -> Expression
FV : Expression -> Var... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of the polymorphic unit type
-- Defines Decidable Equality and Decidable Ordering as well
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.