text stringlengths 4 690k |
|---|
{-# OPTIONS --safe #-}
{-
Builds bismulation for the cumulative hierarchy and shows that it
is equivalent to equality though it lives in a lower universe.
-}
module Cubical.HITs.CumulativeHierarchy.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Univalence
open import Cubical.... |
module PiFrac.Properties where
open import Data.Empty
open import Data.Unit hiding (_≟_)
open import Data.Sum
open import Data.Product
open import Relation.Binary.Core
open import Relation.Binary
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Data.Maybe
open import PiFrac.Syn... |
{-# OPTIONS --no-irrelevant-projections #-}
module ScopeIrrelevantRecordField where
record Bla : Set1 where
constructor mkBla
field
.bla0 bla1 .{bla2 bla3} {bla4 .bla5} : Set
bla0' : Bla -> Set
bla0' = Bla.bla0 -- should fail with bla0 not in scope
|
open import FRP.JS.Behaviour using ( Beh ; [_] ; map )
open import FRP.JS.Event using ( Evt ; tag )
open import FRP.JS.DOM using
( DOM ; click ; element ; text ; _++_ ; element+ ; text+ ; listen+ ; _+++_ )
open import FRP.JS.RSet using ( RSet ; ⟦_⟧ ; ⟨_⟩ ; _⇒_ )
open import FRP.JS.Product using ( _∧_ ; _,_ )
open imp... |
{-# OPTIONS --without-K --safe #-}
----------------------------------------------------------------------
-- Gaps
----------------------------------------------------------------------
-- Polynomials can be represented as lists of their coefficients,
-- stored in increasing powers of x:
--
-- 3 + 2x² + 4x⁵ + 2x⁷
-- ... |
open import cedille-types
import spans
open import ctxt
import cedille-options
open import general-util
module type-inf
(options : cedille-options.options)
{mF : Set → Set}
⦃ _ : monad mF ⦄
(check-term : ctxt → ex-tm → (T? : maybe type) →
spans.spanM options {mF} (spans.check-ret options {mF} T... |
module LocalChoice where
open import IO using (run; putStrLn; mapM′; _>>_)
open import Coinduction using (♯_)
open import Data.Nat as ℕ using (ℕ; suc; zero)
open import Data.Pos as ℕ⁺ using (ℕ⁺; suc)
open import Data.String using (String)
open import Data.List using (List; []; _∷_; map)
open import Data.Colist using (... |
module SN where
open import Library
open import Syntax
open import RenamingAndSubstitution
-- Reduction
data _↦_ {Γ} : ∀{a} (t t' : Tm Γ a) → Set where
β : ∀{a b} {t : Tm (Γ , a) b} {u} → app (abs t) u ↦ sub0 t u
abs : ∀{a b} {t t' : Tm (Γ , a) b} (r : t ↦ t') → abs t ↦ abs t'
appl : ∀{a b} {t t' : Tm Γ (a... |
{-# OPTIONS --two-level --cubical-compatible #-}
open import Agda.Primitive
data D₁ : SSet → SSet (lsuc lzero) where
c : (@0 A : SSet) → A → D₁ A
data D₂ : Set → SSet (lsuc lzero) where
c : (@0 A : Set) → A → D₂ A
|
{- 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 Haskell.Modules.RWS.RustAnyHow
open import LibraBFT.Base.Types
op... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Sum.Base where
open import Cubical.Relation.Nullary
open import Cubical.Core.Everything
private
variable
ℓ ℓ' : Level
A B C D : Type ℓ
data _⊎_ (A : Type ℓ)(B : Type ℓ') : Type (ℓ-max ℓ ℓ') where
inl : A → A ⊎ B
inr : B → A ⊎ B
re... |
-- Generated by src/templates/TemplatesCompiler
module templates where
open import cedille-types
{-# FOREIGN GHC import qualified Templates #-}
-- src/templates/Mendler.ced
postulate
templateMendler : start
{-# COMPILE GHC templateMendler = Templates.templateMendler #-}
-- src/templates/MendlerSimple.ced
postulat... |
module Relation.Ternary.Separation.Monad.Reader where
open import Level
open import Function using (_∘_; case_of_)
open import Relation.Binary.PropositionalEquality using (refl)
open import Relation.Unary
open import Relation.Unary.PredicateTransformer using (PT)
open import Relation.Ternary.Separation
open import Rel... |
{-# OPTIONS --safe --without-K #-}
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; trans; sym; cong)
open import Relation.Nullary using (_because_; ofʸ; ofⁿ)
open import Data.Unit using (⊤; tt)
open import Data.Empty using (⊥; ⊥-elim)
open import Data.Nat.Base
open import Data.Bool.Base using... |
module datatypes where
open import bool public
open import bool-to-string public
open import char public
open import integer public
open import list public
open import list-to-string public
open import level public
open import maybe public
open import nat public
open import nat-division public
open import nat-to-strin... |
-- Andreas, 2014-05-03 Test case by Andrea Vezzosi
data Two : Set where
a b : Two
-- This example of varying arity crashed Epic before.
f : Two → {eq : Two} → Two
f a {x} = a
f b = b
postulate
IO : Set → Set
{-# COMPILED_TYPE IO IO #-}
postulate
return : ∀ {A} → A → IO A
{-# COMPILED_EPIC return (u... |
{-# OPTIONS --type-in-type #-}
module poly0 where
open import prelude
open import functors
open import poly.core public
variable
A B C X Y : ∫
I A⁺ B⁺ C⁺ X⁺ Y⁺ : Set
A⁻ : A⁺ → Set
B⁻ : B⁺ → Set
C⁻ : C⁺ → Set
X⁻ : X⁺ → Set
Y⁻ : Y⁺ → Set
∃⊤ ∃⊥ ⊤∫ ∫∫ : Set → ∫
∃⊤ a = a , λ _ → ⊤
∃⊥ a = a , λ _ → ⊥
⊤∫ a ... |
module Prelude.Monad where
open import Agda.Primitive
open import Prelude.Function
open import Prelude.Functor
open import Prelude.Unit
open import Prelude.Applicative
open import Prelude.Monad.Indexed {I = ⊤} as Indexed
Monad : ∀ {a b} (M : Set a → Set b) → Set (lsuc a ⊔ b)
Monad M = Indexed.IMonad (λ _ _ → M)
Mo... |
{-# OPTIONS --without-K #-}
open import Type
open import Type.Identities
open import Level.NP
open import Explore.Core
open import Explore.Properties
open import Explore.Explorable
open import Data.Zero
open import Function.NP
open import Function.Extensionality
open import Data.Product
open import Relation.Binary.Prop... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Conat Literals
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Cofin.Literals where
open import Data.Nat
open import Agda... |
open import Data.Product
open import Relation.Binary.PropositionalEquality hiding ([_] ; Extensionality)
open import Relation.Nullary
open import Relation.Nullary.Negation
open import EffectAnnotations
module Types where
-- BASE AND GROUND TYPES
postulate BType : Set -- set of base types
postulate dec-bty : (B B'... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Diagram.Coequalizer {o ℓ e} (C : Category o ℓ e) where
open Category C
open HomReasoning
open import Level
private
variable
A B : Obj
h i : A ⇒ B
record Coequalizer (f g : A ⇒ B) : Set (o ⊔ ℓ ⊔ e) where
field
{obj... |
-- {-# OPTIONS --without-K #-}
module F2a where
open import Agda.Prim
open import Data.Unit
open import Data.Nat hiding (_⊔_)
open import Data.Sum
open import Data.Product
open import Function
open import Relation.Binary.PropositionalEquality
open import Paths
open import Evaluator
--------------------------------... |
postulate
A : Set
P : A → Set
a : A
T : Set → Set
proj : (X : Set) → T X → X
t : T (∀ {x} → P x)
-- Checking target types first would prematurely solve the underscore
-- with `P a` instead of the correct `∀ {x} → P x`
fail : P a
fail = proj _ t
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- First generalizes the idea that an element is the first in a list to
-- satisfy a predicate.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Da... |
-- {-# OPTIONS -v tc.meta.assign:15 #-}
-- Ulf, 2011-10-04
-- I still don't quite believe in irrelevant levels. In part because I just proved ⊥:
module IrrelevantLevelHurkens where
open import Imports.Level
data _≡_ {a}{A : Set a}(x : A) : A → Set where
refl : x ≡ x
data Irr .(i : Level)(A : Set i) : Set where
... |
------------------------------------------------------------------------------
-- Streams properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTION... |
open import Agda.Primitive public using (lzero)
{-# BUILTIN LEVELZERO lzero #-}
|
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Algorithms.List.Sort.Common
{c l₁ l₂} (DTO : DecTotalOrder c l₁ l₂)
where
-- agda-stdlib
open import Data.List
import Data.List.Relation.Binary.Equality.Setoid as ListSetoidEquality
open import Data.List.Relation.Unary.AllPairs
open import Dat... |
------------------------------------------------------------------------------
-- First-order logic base
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OP... |
module Thesis.RelateToValidity where
open import Relation.Binary.PropositionalEquality public hiding ([_])
open import Thesis.Changes
open import Thesis.Lang
module _ {A : Set} {{CA : ChangeStructure A}} where
fromto→valid fromto→valid-2 : ∀ da (a1 a2 : A) (daa : ch da from a1 to a2) → valid a1 da
fromto→valid d... |
module Issue553a where
data D : Set where
d₁ d₂ : D
data E : Set where
module M (A : Set) where
data B : Set where
b : D → B
T : B → Set
T (b d₁) = E
T (b d₂) = E
open M E
g : (d : D) → T (b d) → D
g d t with d₁
g d t | d′ = d′ -- Unsolved meta-variable, no constraints.
|
module Data.Tuple.Raise where
open import Data.Tuple.Raiseᵣ public
|
------------------------------------------------------------------------
-- Some counterexamples
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Bisimilarity.Up-to.Counterexamples where
open import Equality.Propositional
open import Logical-equivalence us... |
-- Copyright: (c) 2016 Ertugrul Söylemez
-- License: BSD3
-- Maintainer: Ertugrul Söylemez <esz@posteo.de>
module Classes where
record Plus {a} (A : Set a) : Set a where
field
_+_ : A → A → A
infixl 6 _+_
open Plus {{...}} public
record Times {a} (A : Set a) : Set a where
field
{{plus}} : Plus ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Lemmas
open import Groups.Definition
open import Setoids.Setoids
open import Rings.Definition
open import Sets.EquivalenceRelations
open import Rings.IntegralDomains.Definition
module Rings.IntegralDomains.Lemmas {m n : ... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Reexport Data.List.All from the standard library.
--
-- At one point, we reinvented Data.List.All from the Agda
-- standard library, under the name dependent list. We later
-- replaced our reinvention by this adapte... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Algebra.Signature
module Fragment.Algebra.Free.Properties (Σ : Signature) where
open import Level using (Level)
open import Function using (_∘_)
open import Fragment.Algebra.Algebra Σ
open import Fragment.Algebra.Free.Base Σ
open import Fragment.... |
{-# OPTIONS --copatterns #-}
module Issue906 where
{- Globular types as a coinductive record -}
record Glob : Set1 where
coinductive
field
Ob : Set
Hom : (a b : Ob) → Glob
open Glob public
record Unit : Set where
data _==_ {A : Set} (a : A) : A → Set where
refl : a == a
{- The terminal globular type ... |
open import Agda.Builtin.Nat
data Vec (A : Set) : Nat → Set where
variable
A : Set
x : A
n : Nat
xs : Vec A n
postulate
IsHead : A → Vec A (suc n) → Set
-- The `n` should be generalized over since the generalizable n in the type of xs
-- is solved with suc n.
foo : IsHead {n = _} x xs → Nat
foo h = 0
... |
module Pi-.Interp where
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product
open import Pi-.Syntax
open import Pi-.Opsem
open import Pi-.Eval
{-# TERMINATING #-}
mutual
interp : {A B : 𝕌} → (A ↔ B) → Val A B → Val B A
-- Forward
interp unite₊l (inj₂ y ⃗) = y ⃗
int... |
{-# OPTIONS --without-K --safe #-}
module Dodo.Unary where
open import Dodo.Unary.Dec public
open import Dodo.Unary.Disjoint public
open import Dodo.Unary.Empty public
open import Dodo.Unary.Equality public
open import Dodo.Unary.Intersection public
open import Dodo.Unary.Union public
open import Dodo.Unary.Unique pu... |
module Properties.Dec where
open import Properties.Contradiction using (¬)
data Dec(A : Set) : Set where
yes : A → Dec A
no : ¬ A → Dec A
|
{-# OPTIONS --rewriting #-}
-- 2014-05-27 Jesper and Andreas
postulate
A B : Set
R : A → B → Set
{-# BUILTIN REWRITE R #-}
-- Expected error:
-- R does not have the right type for a rewriting relation
-- because the types of the last two arguments are different
-- when checking the pragma BUILTIN REWRITE R
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.JoinComm
open import homotopy.JoinAssocCubical
module homotopy.JoinSusp where
module _ {i} (A : Type i) where
private
module Into = JoinRec {A = Bool} {B = A}
{C = Susp A}
(Bool-rec north south)
(λ _ → sou... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Category.Monoidal
open import Categories.Category.Monoidal.Closed
module Categories.Category.Monoidal.Closed.IsClosed.Diagonal
{o ℓ e} {C : Category o ℓ e} {M : Monoidal C} (Cl : Closed M) where
open import Data.Product using... |
{- Type class for monads. -}
module CategoryTheory.Monad where
open import CategoryTheory.Categories
open import CategoryTheory.Functor
open import CategoryTheory.NatTrans
-- A monad on a category
record Monad {n} (ℂ : Category n) : Set (lsuc n) where
open Category ℂ
field
-- Underlying endofunctor
... |
-- Andreas, 2015-03-16
-- Andreas, 2020-10-26 removed loop during injectivity check
open import Agda.Builtin.Size
-- Note: the assumption of pred is absurd,
-- but still should not make Agda loop.
module _ (pred : ∀ i → Size< i) where
data ⊥ : Set where
data SizeLt (i : Size) : Set where
wrap : (j : Size< i) → S... |
--
-- open import Relation.Binary using (Rel; Setoid; IsEquivalence)
-- open import Level as Lvl using ()
module Structures
{G F : Set}
(_≈G_ : G → G → Set)
(_≈F_ : F → F → Set)
where
-- import M as M’
open import Algebra.Structures _≈G_
using (IsAbelianGroup)
open import Algebra.Structures _≈F_
using (I... |
module OlderBasicILP.Direct.Gentzen where
open import Common.Context public
-- Propositions of intuitionistic logic of proofs, without ∨, ⊥, or +.
mutual
infixr 10 _⦂_
infixl 9 _∧_
infixr 7 _▻_
data Ty : Set where
α_ : Atom → Ty
_▻_ : Ty → Ty → Ty
_⦂_ : Box → Ty → Ty
_∧_ : Ty → Ty → Ty
... |
------------------------------------------------------------------------
-- "Equational" reasoning combinator setup
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Labelled-transition-system
module Expansion.Equational-reasoning-instances {ℓ} {lts : ... |
module Structure.Numeral.Integer where
import Lvl
open import Structure.Setoid
open import Structure.Operator.Properties
open import Structure.Operator.Ring
open import Structure.OrderedField
open import Structure.Relator
open import Type
private variable ℓₒ ℓₗ ℓₑ ℓₗ₁ ℓₗ₂ : Lvl.Level
private variable Z : Type{ℓₒ... |
-- Datatype modules weren't added as sections properly.
module Issue263b where
module M (A : Set) where
data D : Set where
postulate A : Set
open M.D A
-- The module M.D is not parameterized, but is being applied to
-- arguments
-- when checking the module application module _ = M.D A
|
{-# OPTIONS --cubical --safe #-}
module Control.Monad.Weighted.Functor.TypeDef where
open import Level
data 𝔚-F {r w a p} (R : Type r) (W : Type w) (A : Type a) (P : W → Type p) : Type (r ℓ⊔ a ℓ⊔ p ℓ⊔ w) where
[] : 𝔚-F R W A P
_◃_∷_⟨_⟩ : ∀ (w : R) (x : A) (xs : W) (P⟨xs⟩ : P xs) → 𝔚-F R W A P
|
module examplesPaperJFP.Equality where
infix 4 _≡_
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
-- obsolete, now in Agda.Builtin.Equality: {-# BUILTIN EQUALITY _≡_ #-}
-- No longer exists in Agda: {-# BUILTIN REFL refl #-}
|
-- {-# OPTIONS -v tc.inj:100 -v tc.reduce:100 #-}
module Issue801 where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
data _≡_ {A : Set}(x : A) : A → Set where
refl : x ≡ x
cong : ∀ {A : Set} {B : Set}
(f : A → B) {x y} → x ≡ y → f x ≡ f y
cong f refl = refl
lem : (n : ℕ) → n ≡ n
lem zero = refl
lem (suc... |
------------------------------------------------------------------------
-- Partial functions, computability
------------------------------------------------------------------------
open import Atom
module Computability (atoms : χ-atoms) where
open import Equality.Propositional.Cubical
open import Logical-equivalenc... |
open import Oscar.Prelude
open import Oscar.Class
open import Oscar.Class.Symmetry
module Oscar.Class.Symmetry.ToSym where
private
test-class :
⦃ _ : ∀ {𝔬} {𝔒 : Ø 𝔬} {𝔯} {_∼_ : 𝔒 → 𝔒 → Ø 𝔯} → Symmetry.class _∼_ ⦄
→ ∀ {𝔬} {𝔒 : Ø 𝔬} {𝔯} {_∼_ : 𝔒 → 𝔒 → Ø 𝔯} → Symmetry.class _∼_
test-class = !... |
{-# OPTIONS --universe-polymorphism #-}
module RawFunctor where
open import Common.Level
postulate RawFunctor : ∀ {ℓ} (F : Set ℓ → Set ℓ) → Set (lsuc ℓ)
-- Broken occurs check for levels made this not infer properly
postulate
sequence⁻¹ : ∀ {F}{A} {P : A → Set} → RawFunctor F →
F (∀ i → P i) → ∀ ... |
module ImportWarningsB where
-- all of the following files have warnings, which should be displayed
-- when loading this file
import Issue1988
import Issue2243
import Issue708quote
import OldCompilerPragmas
import RewritingEmptyPragma
import Unreachable
-- this warning will be ignored
{-# REWRITE #-}
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of fresh lists and functions acting on them
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Fresh.Properties where
open i... |
{-
Definition of a homogeneous pointed type, and proofs that pi, product, path, and discrete types are homogeneous
Portions of this file adapted from Nicolai Kraus' code here:
https://bitbucket.org/nicolaikraus/agda/src/e30d70c72c6af8e62b72eefabcc57623dd921f04/trunc-inverse.lagda
-}
{-# OPTIONS --cubical --safe #-... |
module Data.Bin.Bijection where
open import Relation.Binary.PropositionalEquality as PropEq hiding (inspect)
open import Function.Inverse renaming (_∘_ to _∙_)
import Function.Surjection
open Function.Surjection using (module Surjection; module Surjective)
open import Function.Equality using (_⟶_)
open imp... |
module Issue690a where
data ℕ : Set where
zero : ℕ
succ : ℕ → ℕ
-- A negative type.
data T : Set → Set where
c : T (T ℕ)
-- From Andreas (2012-09-07) message on Agda mailing list "Forget
-- Hurken's paradox ..."
--
-- Trying to make sense of T in terms of inductive types, explaining
-- indices via equalities, ... |
open import Common.IO
header = putStrLn "foo"
main : IO _
main = putStrLn "42"
|
{-# OPTIONS --cubical --no-import-sorts #-}
module Hit where
-- open import Cubical.Core.Everything
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ)
-- open import Cubical.Foundations.Equiv.HalfAdjoint
-- open import Cubical.Data.Sigma.Properties
-- https://en.wikipedia.org/wiki/Inductive_type#Highe... |
open import Relation.Nullary using (yes; no; ¬_)
open import Relation.Nullary.Decidable using (True; False)
open import Relation.Nullary.Negation using (contradiction)
open import Relation.Binary using (Antisymmetric; Irrelevant; Decidable)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; sym; c... |
-- Andreas, 2016-09-12 issue #2172
--
-- Instance search should succeed also when instance meta is supplied by the user.
--
-- This test case is not minimal, but illustrates the point.
-- {-# OPTIONS -v tc.term.args:30 -v tc.term.args.ifs:15 -v tc.meta.new:50 -v tc.meta.name:100 -v tc.term.args.named:75 #-}
module Is... |
id : {A : Set} → A → A
id x = x
syntax id {A} x = x ∈ A
data Nat : Set where
zero : Nat
suc : Nat → Nat
data Fin : Nat → Set where
zero : Fin zero
suc : ∀ {n} → Fin n → Fin (suc n)
z = zero ∈ Fin zero
postulate
hiddenFun : ∀ {f : Nat → Nat} {n} → Fin (f n)
syntax hiddenFun {λ x → y} = hide[ x ] y
z′... |
-- New NO_POSITIVITY_CHECK pragma for data definitions and mutual
-- blocks
-- Skipping a new-style mutual block: Anywhere before the declaration
-- or the definition of a data type in the block (case: before first
-- declaration).
{-# NO_POSITIVITY_CHECK #-}
data Cheat₁ : Set
data Oops₁ : Set
data Cheat₁ where
c... |
module DuplicateFields where
postulate X : Set
record D : Set where
field x : X
d : X -> X -> D
d x y = record {x = x; x = y}
|
-- Andreas, 2018-10-23, issue #3309 reported by G. Brunerie
--
-- Check that we can use irrelevant record fields in copattern matching.
--
-- (A refactoring broke the correct relevances of pattern variables
-- after matching on an irrelevant projection pattern.)
record Σ (A : Set) (B : A → Set) : Set where
construct... |
------------------------------------------------------------------------------
-- Axiomatic Peano arithmetic using Agsy
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types ... |
module LinkedList where
open import Data.Unit using (⊤; tt)
open import Data.Empty using (⊥)
open import Data.Nat
import Data.Fin as Fin
open import Data.Fin
using (Fin)
renaming (zero to Fzero; suc to Fsuc)
open import Relation.Binary.PropositionalEquality as PropEq
using (_≡_; refl; cong)
open import Rela... |
{-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Identity
open import HoTT.Equivalence
open import HoTT.Identity.Sigma
module HoTT.Equivalence.Sigma where
open variables
Σ-equiv₁ : ((f , _) : A ≃ B) → Σ A (P ∘ f) ≃ Σ B P
Σ-equiv₁ {A = A} {B} {P = P} (f , e) = iso→eqv iso
where
open ishae (qinv→... |
module MGU where
--open import Agda.Builtin.Nat using () renaming (Nat to ℕ)
open import Agda.Primitive
open import Agda.Builtin.Equality
open import Prelude.Product using (Σ; _,_; fst; snd; _×_; curry; uncurry)
open import Prelude.Equality using (_≡_; eqReasoningStep; _∎; sym; trans; cong)
open import Prelude.Funct... |
{-# OPTIONS --without-K --safe #-}
module Experiment.ListConstruction where
open import Level renaming (zero to lzero; suc to lsuc)
data ⊥ : Set where
record ⊤ : Set where
constructor tt
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
module Inductive where
data List (A : Set) : Set where
[] : List A
_∷_... |
module Cats.Ditrans where
open import Level using (Level ; _⊔_)
open import Cats.Category
open import Cats.Category.Setoids using (Setoids)
open import Cats.Profunctor
module _ {lo la l≈ lo′ la′ l≈′}
{C : Category lo la l≈} {D : Category lo′ la′ l≈′}
where
private
module C = Category C
open Category ... |
-- {-# OPTIONS --sized-types #-} -- no longer necessary
-- {-# OPTIONS --termination-depth=2 #-} -- not necessary!
-- {-# OPTIONS -v tc.size.solve:60 --show-implicit #-}
-- {-# OPTIONS -v term:5 #-}
module Issue709 where
open import Common.Size
data Bool : Set where true false : Bool
postulate
A : Set
_<=_ : A →... |
-- Andreas and James, Nov 2011 and Oct 2012
-- {-# OPTIONS --no-coverage-check #-}
-- {-# OPTIONS -v tc.lhs:20 -v tc.cover.top:20 #-}
module FlexInterpreter where
open import Common.MAlonzo
data Ty : Set where
nat : Ty
arr : Ty -> Ty -> Ty
data Exp : Ty -> Set where
zero : Exp nat
suc : Exp (arr nat nat)
... |
{-# OPTIONS --allow-unsolved-metas #-}
-- The option is supplied to force a real error to pass the regression test.
module MetaOccursInItself where
data List (A : Set) : Set where
nil : List A
_::_ : A -> List A -> List A
data One : Set where one : One
postulate
f : (A : Set) -> (A -> List A) -> One
err : On... |
module HelloWorldPrim where
open import IO.Primitive
open import Data.String
main = putStrLn (toCostring "Hello World!")
|
module Category.Monad.Either {i}(Exc : Set i)(I : Set i) where
open import Level hiding (lift)
open import Data.Sum
open import Category.Monad
open import Category.Monad.Predicate
open import Relation.Unary
open import Relation.Unary.PredicateTransformer
pattern left x = inj₁ x
pattern right x = inj₂ x
EitherT : P... |
{-# OPTIONS --without-K --safe #-}
module Categories.Kan.Duality where
open import Level
open import Categories.Category
open import Categories.Functor
open import Categories.NaturalTransformation
open import Categories.Kan
private
variable
o ℓ e : Level
C D E : Category o ℓ e
F G : Functor C D
modul... |
open import Type
module Relator.ReflexiveTransitiveClosure {ℓ₁ ℓ₂} {T : Type{ℓ₁}} (_▫_ : T → T → Type{ℓ₂}) where
open import Graph.Walk
open import Graph.Walk.Proofs
import Lvl
open import Logic
open import Logic.Propositional
import Structure.Relator.Names as Names
open import Structure.Relator.Properties
... |
{-# OPTIONS --without-K #-}
open import HoTT
module homotopy.AnyUniversalCoverIsPathSet {i} (A : Type i)
-- (A-conn : is-connected 0 A)
where
open Cover
module _
(a₁ : A)
-- A universal covering (defined as being simply connected).
{j} (univ-cov : Cover A j)
(univ-cov-univ : is-universal uni... |
open import Nat
open import Prelude
open import core
open import contexts
open import synth-unicity
open import lemmas-matching
module elaboration-unicity where
mutual
elaboration-unicity-synth : {Γ : tctx} {e : hexp} {τ1 τ2 : htyp} {d1 d2 : ihexp} {Δ1 Δ2 : hctx} →
Γ ⊢ e ⇒ τ1 ~> d1 ⊣ ... |
module Esterel.Lang where
open import Esterel.Environment as Env
using (Env)
open import Esterel.Variable.Signal as Signal
using (Signal)
open import Esterel.Variable.Shared as SharedVar
using (SharedVar)
open import Esterel.Variable.Sequential as SeqVar
using (SeqVar)
open import Data.List
using (List)
ope... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lists where every pair of elements are related (symmetrically)
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Rel)... |
------------------------------------------------------------------------------
-- From inductive PA to standard axiomatic PA
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-pol... |
{-# OPTIONS --without-K --safe #-}
open import Level
open import Categories.Category using (Category)
module Categories.NaturalTransformation.Hom {o ℓ e : Level} (C : Category o ℓ e) where
-- open import Function using (_$_; Inverse) -- else there's a conflict with the import below
-- open import Function.Equality us... |
open import Relation.Binary.Core
module BBHeap.Push.Properties {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_)
(trans≤ : Transitive _≤_) where
open import BBHeap _≤_
open import BBHeap.Equality.Properties _≤_
open import BBHeap.Push _≤_ tot≤ trans≤
open import B... |
{- 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 LibraBFT.Prelude
open import LibraBFT.Lemmas
open import Libr... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Agda.Primitive
infixr 5 _,_
record Pair
{a} (A : Set a) {b} (B : Set b)
: Set (a ⊔ b) where
constructor _,_
field
fst : A
snd : B
data Constraint
{a} {A : Set a} (x : A)
: Set where
instance _ : Constraint x
record Outer
l {a} {A : Set a} (x... |
module FRP.LTL.ISet where
open import FRP.LTL.ISet.Core public using ( ISet ; ⟨_⟩ ; ⟦_⟧ )
-- Propositional logic
open import FRP.LTL.ISet.Unit public using ( T )
open import FRP.LTL.ISet.Empty public using ( F )
open import FRP.LTL.ISet.Product public using ( _∧_ ; fst ; snd ; _&&&_ )
open import FRP.LTL.ISet.Sum pu... |
------------------------------------------------------------------------
-- Propositional equality, with some extra bells and whistles
-- definable in Cubical Agda
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Equality.Propositional.Cubical whe... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Finite.Fin where
open import Level
open import Data.Nat using (ℕ)
open import Data.Vec as Vec using (Vec)
open import Data.List
open import Data.Fin
open import Data.Fin.Properties
open import Axiom.UniquenessOfIdentityProofs
open import Relation.Binary us... |
postulate
T : Set → Set
X : Set
Class : Set → Set
member : ∀ {A} {{C : Class A}} → A → A
iX : Class X
iT : ∀ {A} {{CA : Class A}} → Class (T A)
-- Should get type Class (T X),
-- not {{_ : Class X}} → Class (T X)
iTX = iT {A = X}
-- Fails if not expanding instance argument in iTX
f : T X → T X
f = memb... |
{-# OPTIONS --safe #-}
module Cubical.Data.NatPlusOne.MoreNats.AssocNat.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Empty
open import Cubical.Data.Unit
open import Cubical.Data.Nat hiding (_+_)
infixl 6 _+₁_
data ℕ₊₁ : Type where
one : ℕ₊₁
... |
open import Common.Prelude
data Wrap (A : Set) : Set where wrap : A → Wrap A
appWrap : ∀ {A B : Set} → (A → B) → Wrap A → B
appWrap f (wrap a) = f a
app : ∀ {A B : Set} → (A → B) → A → B
app f a = appWrap f (wrap a)
works : Nat
works = (λ _ → 42) ((λ _ → tt) 13)
-- (λ _ → tt) is erased but `app` tries to apply it... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.