text stringlengths 4 690k |
|---|
------------------------------------------------------------------------
-- Non-dependent and dependent lenses
-- Nils Anders Danielsson
------------------------------------------------------------------------
{-# OPTIONS --cubical --guardedness #-}
module README where
-- Non-dependent lenses.
import Lens.Non-depen... |
------------------------------------------------------------------------
-- A library of parser combinators
------------------------------------------------------------------------
module RecursiveDescent.Coinductive.Lib where
open import Utilities
open import RecursiveDescent.Coinductive
import RecursiveDescent.Coin... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
open import Cubical.Core.Everything
open import Cubical.Relation.Binary
open import Cubical.Algebra.Semigroup
module Cubical.Algebra.Semigroup.Construct.Quotient {c ℓ} (S : Semigroup c) {R : Rel (Semigroup.Carrier S) ℓ} (isEq : IsEquivalence R)
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Fin.Properties where
open import Cubical.Core.Everything
open import Cubical.Functions.Embedding
open import Cubical.Functions.Surjection
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundatio... |
import Lvl
open import Structure.Setoid
open import Type
module Structure.Operator.Vector.Subspaces.Kernel
{ℓₛ ℓₛₑ}
{S : Type{ℓₛ}}
⦃ equiv-S : Equiv{ℓₛₑ}(S) ⦄
{_+ₛ_ _⋅ₛ_ : S → S → S}
where
open import Logic.Predicate
open import Sets.ExtensionalPredicateSet as PredSet using (PredSet ; _∈_ ; [∋]-binaryR... |
-- Andreas and James, Nov 2011 and Oct 2012
-- function with flexible arity
-- {-# OPTIONS -v tc.cover:20 #-}
module FlexibleInterpreter where
open import Common.Equality
open import Common.IO
open import Common.Nat renaming (zero to Z; suc to S) hiding (pred)
data Ty : Set where
nat : Ty
arr : Ty -> Ty -> Ty
da... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Nat.Coprime where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Data.Sigma
open import Cubical.Data.NatPlusOne
open import Cubical.HITs.PropositionalTruncation as PropTrunc
open import Cubical.Data.Nat.Base
o... |
-- Andreas, 2015-02-24
data Wrap (A : Set) : Set where
wrap : A → Wrap A
data D : Set → Set1 where
c : (A : Set) → D (Wrap A)
test : (A : Set) → D A → Set
test .(Wrap A) (c A) = A
-- this should crash Epic as long as A is considered forced in constructor c
-- should succeed now
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Comonads
------------------------------------------------------------------------
-- Note that currently the monad laws are not included here.
{-# OPTIONS --without-K --safe #-}
module Category.Comonad where
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- A pointwise lifting of a relation to incorporate an additional point.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- This module is designed to be... |
module _ where
module A where
postulate
_∷_ _∙_ bind : Set
infixr 5 _∷_
infixr 5 _∙_
infix 1 bind
syntax bind c (λ x → d) = x ← c , d
module B where
postulate
_∷_ _∙_ bind : Set
infix 5 _∷_
infixr 4 _∙_
infixl 2 bind
syntax bind c d = c ∙ d
module C where
postulate
bind : S... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Lemmas
open import Groups.Definition
open import Setoids.Orders.Partial.Definition
open import Setoids.Setoids
open import Functions.Definition
open import Sets.EquivalenceRelations
open import Rings.Definition
open impor... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Endomorphisms on a Setoid
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Function.Endomorphism.Setoid {c e} (S : ... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.NType2
open import lib.types.TLevel
open import lib.types.Sigma
open import lib.types.Pi
module lib.types.Groupoid where
record GroupoidStructure {i j} {El : Type i} (Arr : El → El → Type j)
(_ : ∀ x y → has-level 0 (Arr x y)) : Type (lmax i j) whe... |
{-# OPTIONS --without-K #-}
module Data.ByteString.Primitive where
open import Data.Word8.Primitive using (Word8)
open import Data.Nat using (ℕ; _<_)
open import Data.Colist using (Colist)
open import Data.List using (List; length)
open import Agda.Builtin.String using (String)
open import Agda.Builtin.Bool using (Bo... |
------------------------------------------------------------------------
-- Integers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Integer {e⁺} (eq : ∀ {a p} → Equality-with-J a p e⁺) where
open Derived-definitions-and-propert... |
open import Coinduction using ( ♯_ )
open import Data.Bool using ( Bool ; true ; false ; not )
open import Data.ByteString using ( null ) renaming ( span to #span )
open import Data.Natural using ( Natural )
open import Data.Product using ( _×_ ; _,_ )
open import Data.Word using ( Byte )
open import System.IO.Transduc... |
-- Andreas, 2016-02-02 added Ambiguous
module Issue480 where
module Simple where
data Q : Set where
a : Q
f : _ → Q
f a = a
postulate helper : ∀ {T : Set} → (T → T) → Q
test₁ : Q → Q
test₁ = λ { a → a }
test₂ : Q
test₂ = helper test₁
-- Same as test₂ and test₁, but stuck together.
test₃ ... |
{-# OPTIONS --guardedness #-}
module Builtin.Coinduction where
open import Agda.Builtin.Coinduction public
|
module FFI.Data.Either where
{-# FOREIGN GHC import qualified Data.Either #-}
data Either (A B : Set) : Set where
Left : A → Either A B
Right : B → Either A B
{-# COMPILE GHC Either = data Data.Either.Either (Data.Either.Left|Data.Either.Right) #-}
swapLR : ∀ {A B} → Either A B → Either B A
swapLR (Left x) = Rig... |
-- Andreas, 2018-10-27, issue #3324 reported by Guillaume Brunerie
-- Missing 'reduce' leads to arbitrary rejection of pattern matching on props
{-# OPTIONS --prop #-}
-- {-# OPTIONS -v tc.cover:60 #-}
data Unit : Prop where
tt : Unit
-- Works
f : {A : Set} → Unit → Unit
f tt = tt
-- Should work
g : Unit → Unit
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Transitive closures
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Construct.Closure.Transitive where
open import Function
op... |
------------------------------------------------------------------------
-- Imports every module so that it is easy to see if everything builds
------------------------------------------------------------------------
module Everything where
import Parallel
import Parallel.Examples
import Parallel.Index
import Paralle... |
open import Prelude
open import Prelude.List.Relations.Any
open import Prelude.List.Relations.Properties
open import Tactic.Deriving.Eq
open import Tactic.Reflection
module DeriveEqTest where
module Test₀ where
eqVec : deriveEqType Vec
unquoteDef eqVec = deriveEqDef eqVec (quote Vec)
module Test₁ where
... |
{-# OPTIONS --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Properties.MaybeEmb {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Typed
open import Definition.LogicalRelation
import Tools.PropositionalEquality as PE
impo... |
{-
Descriptor language for easily defining relational structures
-}
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Structures.Relational.Macro where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Structure
open impor... |
infix 50 _∼_
postulate
A : Set
x : A
_∼_ : A → A → Set
record T : Set where
-- This fixity declaration should not be ignored.
infix 60 _∘_
_∘_ : A → A → A
_∘_ _ _ = x
field
law : x ∘ x ∼ x
-- Some more examples
record R : Set₁ where
infixl 6 _+_
field
_+_ : Set → Set → Set
Times :... |
{-# OPTIONS --prop --rewriting #-}
open import Examples.Sorting.Sequential.Comparable
module Examples.Sorting.Sequential.MergeSort.Merge (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.Nat
open imp... |
-- Andreas, 2014-10-18 AIM XX
module EvalInTopLevel where
data Bool : Set where true false : Bool
not : Bool → Bool
not true = false
not false = true
-- Evaluate @not false@ in top level.
|
{-# OPTIONS --without-K #-}
module PathStructure.UnitNoEta where
open import Equivalence
open import Types
split-path : {x y : Unit} → x ≡ y → Unit
split-path _ = tt
merge-path : {x y : Unit} → Unit → x ≡ y
merge-path _ = 1-elim
(λ x → ∀ y → x ≡ y)
(1-elim (λ y → tt ≡ y) refl) _ _
split-merge-eq : {x y : Unit} ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.EilenbergMacLane
open import homotopy.EilenbergMacLane1
open import homotopy.EilenbergMacLaneFunctor
open import homotopy.EM1HSpaceAssoc
open import lib.types.TwoSemiCategory
open import lib.two-semi-categories.FunCategory
open import lib.tw... |
------------------------------------------------------------------------
-- Strings
------------------------------------------------------------------------
module Data.String where
open import Data.List as List using (List)
open import Data.Vec as Vec using (Vec)
open import Data.Colist as Colist using (Colist)
open... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2020 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.Prelude
open import LibraBFT.Base.ByteString
module Libra... |
data U : Set
T : U -> Set
record V u (t : T u) : Set -- note that u's Set is found by unification
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Categories.Functor.Compose where
open import Cubical.Foundations.Prelude
open import Cubical.Categories.Category
open import Cubical.Categories.Functor.Base
open import Cubical.Categories.NaturalTransformation.Base
open import Cubical.Categories.Inst... |
module NoSuchModule where
open X
|
{-
Mapping cones or the homotopy cofiber/cokernel
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.MappingCones.Base where
open import Cubical.Foundations.Prelude
private
variable
ℓ ℓ' ℓ'' : Level
data Cone {X : Type ℓ} {Y : Type ℓ'} (f : X → Y) : Type (ℓ-max ℓ ℓ') where
inj : Y... |
module Util.Equality where
open import Relation.Binary.PropositionalEquality
app-≡ : ∀ {A : Set} {B : A → Set} {f g : (x : A) → B x} (x : A) → f ≡ g → f x ≡ g x
app-≡ x refl = refl
|
{-# OPTIONS --without-K --exact-split --safe #-}
module Fragment.Setoid.Morphism.Properties where
open import Fragment.Setoid.Morphism.Base
open import Fragment.Setoid.Morphism.Setoid
open import Level using (Level)
open import Relation.Binary using (Setoid)
private
variable
a b c d ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Level
A ... |
module Thesis.SIRelBigStep.OpSem where
open import Data.Nat
open import Thesis.SIRelBigStep.Syntax public
data Val : Type → Set
import Base.Denotation.Environment
open Base.Denotation.Environment Type Val public
open import Base.Data.DependentList public
data Val where
closure : ∀ {Γ σ τ} → (t : Term (σ • Γ) τ) →... |
{-# OPTIONS --safe #-}
module Extraction where
open import Data.Empty
open import Data.Unit
open import Data.Product
open import Data.Sum
open import Data.Maybe
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.HeterogeneousEquality
open import Relation.Nullary
open import PiPointedFrac as P... |
module UnquoteDef where
open import Common.Reflection
open import Common.Prelude
module Target where
mutual
even : Nat → Bool
even zero = true
even (suc n) = odd n
odd : Nat → Bool
odd zero = false
odd (suc n) = even n
pattern `false = con (quote false) []
pattern `true = con (quot... |
{-
Basic properties about Σ-types
- Characterization of equality in Σ-types using transport ([pathSigma≡sigmaPath])
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Sigma.Properties where
open import Cubical.Data.Sigma.Base
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open im... |
-- Andreas, 2016-06-20 issue #2051
-- Try to preserve rhs when splitting a clause
data D : Set where
d : D
c : D → D
-- A simple RHS that should be preserved by splitting:
con : (x : D) → D
con x = c {!x!} -- C-c C-c
-- More delicate, a meta variable applied to something:
-- This means the hole is not at the r... |
module Prelude where
open import Agda.Builtin.IO public
using (IO)
open import Data.Empty public using ()
renaming (⊥ to 𝟘 ; ⊥-elim to elim𝟘)
open import Data.Nat public
using (ℕ ; zero ; suc ; decTotalOrder ; _⊔_)
renaming (_≤_ to _⊑_ ; z≤n to z⊑n ; s≤s to n⊑m→sn⊑sm ;
_≤′_ to _≤_ ; ≤′-refl to ... |
{-# OPTIONS --without-K --safe #-}
-- Define Strong Monad; use the Wikipedia definition
-- https://en.wikipedia.org/wiki/Strong_monad
-- At the nLab, https://ncatlab.org/nlab/show/strong+monad
-- there are two further definitions; the 2-categorical version is too complicated
-- and the Moggi definition is a special ca... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
open import Cubical.Core.Everything
open import Cubical.Relation.Binary.Raw
module Cubical.Relation.Binary.Reasoning.Base.Single {a ℓ} {A : Type a}
(_∼_ : RawRel A ℓ) (isPreorder : IsPreorder _∼_)
where
open IsPreorder isPreorder
-------------------------------... |
module PatternSyn where
data ⊤
: Set
where
tt
: ⊤
data D
(A : Set)
: Set
where
d
: A
→ A
→ D A
pattern p
= tt
pattern q
= tt
pattern _,_ x y
= d x y
f
: ⊤
→ ⊤
f p
= tt
g
: {A : Set}
→ D A
→ A
g (x , _)
= x
|
open import Agda.Primitive using (_⊔_)
import Categories.Category as Category
import Categories.Category.Cartesian as Cartesian
open import MultiSorted.AlgebraicTheory
import MultiSorted.Product as Product
module MultiSorted.Interpretation
{o ℓ e}
{𝓈 ℴ}
(Σ : Signature {𝓈} {ℴ})
{... |
-- Andreas, 2018-10-18, issue #3289 reported by Ulf
-- Andreas, 2021-02-10, fix rhs occurrence
--
-- For postfix projections, we have no hiding info
-- for the eliminated record value.
-- Thus, contrary to the prefix case, it cannot be
-- taken into account (e.g. for projection disambiguation).
open import Agda.Built... |
open import Nat
open import Prelude
open import dynamics-core
open import contexts
module type-assignment-unicity where
-- type assignment only assigns one type
type-assignment-unicity : {Γ : tctx} {d : ihexp} {τ' τ : htyp} {Δ : hctx} →
Δ , Γ ⊢ d :: τ →
Δ... |
{-# OPTIONS --without-K #-}
open import SDG.Extra.OrderedAlgebra
module SDG.SDG {r₁ r₂} (R : OrderedCommutativeRing r₁ r₂) where
open OrderedCommutativeRing R renaming (Carrier to Rc)
open import Data.Product
open import Data.Sum
open import Algebra
-- note: SDG should probably be a record if i need to
-- u... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.FinData where
open import Cubical.Data.FinData.Base public
open import Cubical.Data.FinData.Properties public
|
module Extensions.Fin where
open import Prelude
open import Data.Fin hiding (_<_)
open import Data.Nat
|
------------------------------------------------------------------------------
-- Arithmetic properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPT... |
-- Sometimes we can't infer a record type
module InferRecordTypes-3 where
postulate A : Set
record R : Set₁ where
field
x₁ : Set
x₂ : Set
record R′ : Set₁ where
field
x₁ : Set
x₃ : Set
bad = record { x₂ = A; x₃ = A }
|
{-# OPTIONS --without-K #-}
open import Base
open import Algebra.Groups
open import Integers
module Algebra.GroupIntegers where
_+_ : ℤ → ℤ → ℤ
O + m = m
pos O + m = succ m
pos (S n) + m = succ (pos n + m)
neg O + m = pred m
neg (S n) + m = pred (neg n + m)
-_ : ℤ → ℤ
- O = O
- (pos m) = neg m
- (neg m) = pos m
+-... |
------------------------------------------------------------------------------
-- Testing the erasing of proof terms
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphis... |
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 : slow ℕ 1000 ≡ y... |
module _ where
open import Agda.Primitive
open import Agda.Builtin.List
open import Agda.Builtin.Nat hiding (_==_)
open import Agda.Builtin.Equality
open import Agda.Builtin.Unit
open import Agda.Builtin.Bool
infix -1 _,_
record _×_ {a b} (A : Set a) (B : Set b) : Set (a ⊔ b) where
constructor _,_
field fst : A
... |
{-# OPTIONS --cubical --safe #-}
module Multidimensional.Data.Extra.Nat where
open import Multidimensional.Data.Extra.Nat.Base public
open import Multidimensional.Data.Extra.Nat.Properties public
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.CircleCover {j} where
record S¹Cover : Type (lsucc j) where
constructor s¹cover
field
El : Type j
{{El-level}} : is-set El
El-auto : El ≃ El
S¹cover-to-S¹-cover : S¹Cover → Cover S¹ j
S¹cover-to-S¹-cover sc = record {
Fiber =... |
-- This module closely follows a section of Martín Escardó's HoTT lecture notes:
-- https://www.cs.bham.ac.uk/~mhe/HoTT-UF-in-Agda-Lecture-Notes/HoTT-UF-Agda.html#equivalenceinduction
{-# OPTIONS --without-K #-}
module Util.HoTT.Equiv.Induction where
open import Util.HoTT.HLevel.Core
open import Util.HoTT.Equiv
open i... |
{-# OPTIONS --warning=error #-}
A : Set₁
A = Set
{-# POLARITY A #-}
|
module UnSized.Console where
open import UnSizedIO.Base hiding (main)
open import UnSizedIO.Console hiding (main)
open import NativeIO
{-# TERMINATING #-}
myProgram : IOConsole Unit
force myProgram = exec' getLine λ line →
delay (exec' (putStrLn line) λ _ →
d... |
module Prelude.Variables where
open import Agda.Primitive
open import Agda.Builtin.Nat
variable
ℓ ℓ₁ ℓ₂ ℓ₃ : Level
A B : Set ℓ
x y : A
n m : Nat
|
open import core
module focus-formation where
-- every ε is an evaluation context -- trivially, here, since we don't
-- include any of the premises in red brackets about finality
focus-formation : ∀{d d' ε} → d == ε ⟦ d' ⟧ → ε evalctx
focus-formation FHOuter = ECDot
focus-formation (FHAp1 sub) = ECAp1 (focus... |
{-# OPTIONS --without-K #-}
open import HoTT
open import homotopy.PtdAdjoint
open import homotopy.SuspAdjointLoop
open import cohomology.Exactness
open import cohomology.FunctionOver
open import cohomology.MayerVietoris
open import cohomology.Theory
{- Standard Mayer-Vietoris exact sequence (algebraic) derived from
... |
--- Sample Sit file
{-# OPTIONS --experimental-irrelevance #-}
{-# OPTIONS --sized-types #-}
open import Base
--; --- Leibniz-equality
Eq : forall (A : Set) (a b : A) -> Set1 --;
Eq = \ A a b -> (P : A -> Set) -> (P a) -> P b
--; --- Reflexivity
refl : forall (A : Set) (a : A) -> Eq A a a --;
refl = \ A a P pa ->... |
module PosNat where
open import Nats
open import Data.Product
open import Equality
data ℕ⁺ : Set where
psuc : ℕ → ℕ⁺
_→ℕ : ℕ⁺ → ℕ
psuc zero →ℕ = suc zero
psuc (suc x) →ℕ = suc (psuc x →ℕ)
_⟨_⟩→ℕ⁺ : (a : ℕ) → ∃ (λ x → a ≡ suc x) → ℕ⁺
.(suc x) ⟨ x , refl ⟩→ℕ⁺ = psuc x
|
module _ where
module M where
postulate
[_] : Set → Set
Foo = [ M.undefined ]
|
open import Common.Prelude
record Number (A : Set) : Set where
field fromNat : Nat → A
record Negative (A : Set) : Set where
field fromNeg : Nat → A
open Number {{...}} public
open Negative {{...}} public
{-# BUILTIN FROMNAT fromNat #-}
{-# BUILTIN FROMNEG fromNeg #-}
instance
NumberNat : Number Nat
Numbe... |
import Lvl
open import Type
module Type.Functions.Inverse.Proofs {ℓₗ : Lvl.Level}{ℓₒ₁}{ℓₒ₂} {X : Type{ℓₒ₁}} {Y : Type{ℓₒ₂}} where
open import Function.Domains
open import Relator.Equals
open import Type.Functions {ℓₗ}
open import Type.Functions.Inverse {ℓₗ}
open import Type.Properties.Empty
open import Type.Prop... |
{-# OPTIONS --without-K #-}
open import Types
open import Functions
open import Paths
open import HLevel
module Equivalences where
hfiber : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) (y : B) → Set (max i j)
hfiber {A = A} f y = Σ A (λ x → f x ≡ y)
is-equiv : ∀ {i j} {A : Set i} {B : Set j} (f : A → B) → Set (max i... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Functor.Construction.SubCategory {o ℓ e} (C : Category o ℓ e) where
open import Categories.Category.SubCategory C
open Category C
open Equiv
open import Level
open import Function.Base using () renaming (id to id→)
open import Dat... |
-- Andreas, 2014-10-05
{-# OPTIONS --cubical-compatible --sized-types #-}
-- {-# OPTIONS -v tc.size:20 #-}
open import Agda.Builtin.Size
data Nat : {size : Size} -> Set where
zero : {size : Size} -> Nat {↑ size}
suc : {size : Size} -> Nat {size} -> Nat {↑ size}
-- subtraction is non size increasing
sub : {si... |
module FlatDomInequality-1 where
postulate
A : Set
g : A → A
g x = x
h : (@♭ x : A) → A
h = g
|
{-# OPTIONS --universe-polymorphism #-}
module Categories.Object.BinaryProducts.Abstract where
open import Categories.Support.PropositionalEquality
open import Categories.Category
open import Categories.Object.BinaryProducts
open import Categories.Morphisms
module AbstractBinaryProducts {o ℓ e} (C : Category o ℓ e) (... |
------------------------------------------------------------------------------
-- Inequalities on partial natural numbers
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymo... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Definitions for types of functions.
------------------------------------------------------------------------
-- The contents of this file should usually be accessed from `Function`.
{-# OPTIONS --without-K --sa... |
-- Andreas, 2015-07-16, issue reported by Nisse
postulate
A : Set₁
P : A → Set₁
T : Set₁ → Set₁
Σ : (A : Set₁) → (A → Set₁) → Set₁
T-Σ : {A : Set₁} {B : A → Set₁} → (∀ x → T (B x)) → T (Σ A B)
t : T (Σ Set λ _ → Σ (A → A) λ f → Σ (∀ x₁ → P (f x₁)) λ _ → Set)
t = T-Σ λ _ → T-Σ λ _ → T-Σ {!!}
-- WAS:... |
module Successor where
open import OscarPrelude
record Successor {ℓᴬ} (A : Set ℓᴬ) {ℓᴮ} (B : Set ℓᴮ) : Set (ℓᴬ ⊔ ℓᴮ)
where
field
⊹ : A → B
open Successor ⦃ … ⦄ public
instance SuccessorNat : Successor Nat Nat
Successor.⊹ SuccessorNat = suc
instance SuccessorLevel : Successor Level Level
Successor.⊹ Success... |
open import Nat
open import Prelude
open import core
open import judgemental-erase
open import aasubsume-min
module determinism where
-- the same action applied to the same type makes the same type
actdet-type : {t t' t'' : τ̂} {α : action} →
(t + α +> t') →
(t + α +> t'') →
(t'... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommRing.RadicalIdeal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.Powerset
open import Cubical.Foundations.HLevels
open import Cubical.Data.Sigma
open import C... |
{-# OPTIONS --cubical --allow-unsolved-metas #-}
open import Agda.Primitive.Cubical
module _ where
postulate
PathP : ∀ {ℓ} (A : I → Set ℓ) → A i0 → A i1 → Set ℓ
{-# BUILTIN PATHP PathP #-}
data D {ℓ} (A : Set ℓ) : Set ℓ where
c : PathP _ _ _
|
-- "Ordinal notations via simultaneous definitions"
module Experiment.Ord where
open import Level renaming (zero to lzero; suc to lsuc)
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open import Data.Sum
data Ord : Set
data _<_ : Rel Ord lzero
_≥_ : Rel Ord lzero
fst : Ord → Ord
data O... |
module list where
open import level
open import bool
open import eq
open import maybe
open import nat
open import unit
open import product
open import empty
open import sum
----------------------------------------------------------------------
-- datatypes
-------------------------------------------------------------... |
{-
Joseph Eremondi
Utrecht University Capita Selecta
UU# 4229924
July 22, 2015
-}
module SemiLinRE where
open import Data.Vec
open import Data.Nat
import Data.Fin as Fin
open import Data.List
import Data.List.All
open import Data.Bool
open import Data.Char
open import Data.Maybe
open import Data.Product
open impor... |
open import Level
open import Ordinals
module cardinal {n : Level } (O : Ordinals {n}) where
open import zf
open import logic
import OD
import ODC
import OPair
open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
open import Relation.Binary.PropositionalEquality
open import Data.Nat.... |
{-# OPTIONS --without-K #-}
import Level as L
open import Type
open import Function
open import Algebra
open import Algebra.FunctionProperties.NP
open import Data.Nat.NP hiding (_^_)
open import Data.Nat.Properties
open import Data.One hiding (_≤_)
open import Data.Sum
open import Data.Maybe.NP
open import Data.Product... |
open import Agda.Primitive
open import Equality
module Quotient where
is-prop : ∀ {ℓ} (A : Set ℓ) → Set ℓ
is-prop A = ∀ (x y : A) → x ≡ y
record is-equivalence {ℓ k} {A : Set ℓ} (E : A → A → Set k) : Set (ℓ ⊔ k) where
field
equiv-prop : ∀ {x y} → is-prop (E x y)
equiv-refl : ∀ {x} → E x x
... |
{-# OPTIONS --without-K #-}
open import HoTT
open import lib.cubical.elims.CubeMove
open import lib.cubical.elims.CofWedge
module lib.cubical.elims.SuspSmash where
module _ {i j k} {X : Ptd i} {Y : Ptd j} {C : Type k}
(f : Suspension (X ∧ Y) → C) (g : Suspension (X ∧ Y) → C)
(north* : f (north _) == g (north _))... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vectors where at least one element satisfies a given property
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.Relation.Unary.Any {a} {... |
{-# OPTIONS --sized-types #-}
module BBHeap.Height {A : Set}(_≤_ : A → A → Set) where
open import BBHeap _≤_ hiding (#)
open import Bound.Lower A
open import Bound.Lower.Order _≤_
open import SNat
# : {b : Bound} → BBHeap b → SNat
# leaf = zero
# (left {l = l} {r = r} _ _) = succ (# l + # r)
# (right {l = l} {r = r}... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Relation.Binary.Base where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.SetQuotients.Base
module BinaryRelation {ℓ ℓ' : Level} {A : Type ℓ} (R : A → A → Type ℓ') where
is... |
{-# OPTIONS --rewriting #-}
module Properties where
import Properties.Contradiction
import Properties.Dec
import Properties.DecSubtyping
import Properties.Equality
import Properties.Functions
import Properties.Remember
import Properties.Step
import Properties.StrictMode
import Properties.Subtyping
import Properties.T... |
{-# OPTIONS --rewriting #-}
{-# OPTIONS --confluence-check #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
module _ (A : Set) where
postulate
D : Set
f : D → D → D
r : (x y z : D) → f x (f y z) ≡ f x z
{-# REWRITE r #-}
-- WAS:
-- Confluence check failed: f ... |
{- 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
-}
open import Util.PKCS
open import Util.Prelude
open import Yasm.Types
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Nullary.HLevels where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Function
open import Cubical.Functions.Fixpoint
open import Cubical.Relation.Nullary
private
variable
... |
module _ where
open import Agda.Builtin.Bool
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
open import Agda.Builtin.Unit
module Test₁ where
macro
Unify-with-⊤ : Term → TC ⊤
Unify-with-⊤ goal = unify goal (quoteTerm ⊤)
⊤′ : Set
⊤′ = Unify-with-⊤
unit-test : ⊤′
unit-test = tt
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.