text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Discrete where
open import Categories.Category
open import Function
open import Relation.Binary.PropositionalEquality as ≡
Discrete : ∀ {a} (A : Set a) → Category a a a
Discrete A = record
{ Obj = A
; _⇒_ = _≡_
; _≈_ = _≡_
; id ... |
{- 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.ImplShared.Base.Types
open import LibraBFT.Abstract.Typ... |
module Issue249 where
postulate
A B : Set
module A where
X = A
Y = B
open A renaming (X to C; Y to C)
-- open A using (X) renaming (Y to X)
|
module Relator.Equals where
open import Logic
import Lvl
open import Type
open import Type.Cubical
open import Type.Cubical.Path
open import Type.Cubical.Path.Proofs
infix 15 _≡_
_≡_ = Path
-- _≢_ : ∀{ℓ}{T} → T → T → Stmt{ℓ}
-- _≢_ a b = ¬(a ≡ b)
{-# BUILTIN REWRITE _≡_ #-}
data Id {ℓ}{T : Type{ℓ}} : T → T... |
{-# OPTIONS --type-in-type #-}
open import Data.Empty
open import Data.Unit
open import Data.Bool hiding ( T )
open import Data.Product hiding ( curry ; uncurry )
open import Data.Nat
open import Data.String
open import Relation.Binary.PropositionalEquality using ( refl ; _≢_ ; _≡_ )
open import Function
module ClosedT... |
------------------------------------------------------------------------
-- A README directed towards readers of the paper
-- "Correct-by-Construction Pretty-Printing"
--
-- Nils Anders Danielsson
------------------------------------------------------------------------
{-# OPTIONS --guardedness #-}
module README.Corr... |
module HC-Lec2 where
open import HC-Lec1
-- ==============================================================================
-- Lecture 4 : Sigma, Difference, Vector Take
-- https://www.youtube.com/watch?v=OZeDRtRmgkw
-- 43:14
data Vec (X : Set) : Nat -> Set where
[] : Vec X zero
_... |
module Generic.Main where
open import Generic.Core public
open import Generic.Function.FoldMono public
open import Generic.Property.Eq public
open import Generic.Reflection.ReadData public
open import Generic.Reflection.DeriveEq public
|
{-# OPTIONS --universe-polymorphism #-}
module Issue441 where
open import Common.Level
postulate
C : ∀ ℓ → Set ℓ → Set ℓ
I : ∀ a b (A : Set a) (B : Set b) → (A → B) → B → Set (a ⊔ b)
E : ∀ a b (A : Set a) → (A → Set b) → Set (a ⊔ b)
c : ∀ a (A : Set a) → ((B : A → Set a) → E a a A B) → C a A
foo : (∀ a b (A... |
{-# OPTIONS --without-K --exact-split #-}
module 00-preamble where
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) public
UU : (i : Level) → Set (lsuc i)
UU i = Set i
|
module Everything where
open import Oscar.Prelude public
-- meta-class
open import Oscar.Class public
-- classes
open import Oscar.Class.Amgu public
open import Oscar.Class.Apply public
open import Oscar.Class.Bind ... |
open import Relation.Nullary.Decidable using (False; map)
open import Relation.Nullary.Negation using (contradiction)
open import Relation.Binary using (Decidable)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; sym; cong; module ≡-Reasoning)
open ≡-Reasoning
open import Function.Equivalence as... |
-- Jesper, 2016-11-04
-- Absurd patterns should *not* be counted as a UnusedArg.
open import Common.Equality
data ⊥ : Set where
data Bool : Set where
true false : Bool
abort : (A : Set) → ⊥ → A
abort A ()
test : (x y : ⊥) → abort Bool x ≡ abort Bool y
test x y = refl
|
postulate
[_…_] : Set → Set → Set
|
module Issue1494.Helper where
record Record : Set₁ where
field _≡_ : {A : Set} → A → A → Set
module Module (r : Record) where
open Record r public
|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Finite.Fin.Instance.Span where
open import Data.Nat using (ℕ)
open import Data.Fin
open import Data.Fin.Patterns
open import Relation.Binary.PropositionalEquality using (_≡_ ; refl)
open import Categories.Category.Finite.Fin
open import Categories.Categor... |
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇.
-- Gentzen-style formalisation of syntax, after Bierman-de Paiva.
-- Simple terms.
module BasicIS4.Syntax.Gentzen where
open import BasicIS4.Syntax.Common public
-- Derivations.
mutual
infix 3 _⊢_
data _⊢_ (Γ : Cx Ty) : Ty → Set where
var : ∀... |
module Not-named-according-to-the-Haskell-lexical-syntax where
postulate
IO : Set -> Set
{-# BUILTIN IO IO #-}
{-# COMPILED_TYPE IO IO #-}
postulate
return : {A : Set} -> A -> IO A
{-# COMPILED return (\_ -> return :: a -> IO a) #-}
{-# COMPILED_EPIC return (u1 : Unit, a : Any) -> Any = ioreturn(a) #-}
data Un... |
module examplesPaperJFP.NativeIOSafe where
open import Data.Maybe.Base using (Maybe; nothing; just) public
open import Data.String.Base using (String) public
record Unit : Set where
constructor unit
{-# COMPILE GHC Unit = () #-}
postulate
NativeIO : Set → Set
nativeReturn : {A : Set} → A → NativeIO A
_n... |
module Data.String.Instance where
open import Agda.Builtin.String
open import Class.Equality
open import Class.Monoid
open import Class.Show
open import Data.String renaming (_≟_ to _≟S_)
instance
String-Eq : Eq String
String-Eq = record { _≟_ = _≟S_ }
String-EqB : EqB String
String-EqB = record { _≣_ = prim... |
module Numeral.Natural.Function.Proofs where
import Lvl
open import Data.Tuple
open import Functional
open import Logic.Propositional
open import Logic.Propositional.Theorems
open import Numeral.Natural
open import Numeral.Natural.Function
open import Numeral.Natural.Relation.Order as ≤ using (_≤_ ; _≥_)
open imp... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.DStructures.Equivalences.XModPeifferGraph 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
... |
{-# OPTIONS --universe-polymorphism #-}
open import Level
open import Categories.Category
module Categories.Power.NaturalTransformation {o ℓ e : Level} (C : Category o ℓ e) where
open import Function using () renaming (_∘_ to _∙_)
open import Data.Fin using (Fin; inject+; raise)
open import Data.Sum using (_⊎_; [_,_]′... |
{-# OPTIONS --erased-cubical #-}
open import Erased-cubical-Pattern-matching.Cubical
-- The following definition should be rejected. Matching on a
-- non-erased constructor that is treated as erased because it was
-- defined in a module that uses --cubical should not on its own make
-- it possible to use erased defin... |
-- Andreas, 2014-09-01
-- This module exports a module M
module Imports.Module where
module M where
|
{-# OPTIONS --allow-unsolved-metas #-}
module Avionics.Probability where
open import Data.Nat using (ℕ; zero; suc)
open import Relation.Unary using (_∈_)
open import Avionics.Real using (
ℝ; _+_; _-_; _*_; _÷_; _^_; √_; 1/_; _^2;
-1/2; π; e; 2ℝ;
⟨0,∞⟩; [0,∞⟩; [0,1])
--postulate
-- Vec : Set → ℕ → Set
-... |
module Isos.TreeLike where
open import Isos.Isomorphism
open import Trees
open import Tuples
open import Equality
open import Data.Product
open import Data.Unit
------------------------------------------------------------------------
-- internal stuffs
private
pattern ∅ = Empty tt
∅′ : BareBinTree
∅′ = Empt... |
module Categories.Category.CartesianClosed.Bundle where
open import Categories.Category using (Category)
open import Categories.Category.CartesianClosed using (CartesianClosed)
open import Level
record CartesianClosedCategory o ℓ e : Set (suc (o ⊔ ℓ ⊔ e)) where
field
U : Category o ℓ e
cartesianClosed : Ca... |
module String where
open import Common.IO
open import Common.List
open import Common.String
open import Common.Unit
testString : String
testString = "To boldly go where no man gone before"
printList : {A : Set} -> (A -> IO Unit) -> List A -> IO Unit
printList p [] = return unit
printList p (x ∷ xs) =
p x ,,
... |
module SafetyProof where
open import Algebra
import Algebra.Properties.CommutativeSemigroup as CommutativeSemigroupProperties
open import Data.List
open import Data.List.Relation.Unary.All using (All; []; _∷_)
open import Data.Fin.Patterns using (0F; 1F)
open import Data.Nat using (z≤n; s≤s)
open import Data.Integer... |
------------------------------------------------------------------------------
-- First-order Peano arithmetic
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use `Data.Vec.Functional` instead.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- Disabled to prevent warnings f... |
-- Andreas, 2012-01-11
module Issue551b where
data Box (A : Set) : Set where
[_] : .A → Box A
implicit : {A : Set}{{a : A}} -> A
implicit {{a}} = a
postulate
A : Set
.a : A
a' : Box A
a' = [ implicit ]
-- this should succeed
f : {X : Set} → Box X → Box (Box X)
f [ x ] = [ [ implicit ] ]
-- this as well
|
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.GradedRing.Instances.CohomologyRing where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat
open import Cubical.Data.Sigma
open import Cubical.Algebra.Monoid
open import Cubical.Algebra.Monoid.Instances.NatPlusBis
open ... |
module RandomAccessList.Redundant where
open import RandomAccessList.Redundant.Core
open import RandomAccessList.Redundant.Core.Properties
open import BuildingBlock.BinaryLeafTree using (BinaryLeafTree; Node; Leaf)
import BuildingBlock.BinaryLeafTree as BLT
-- open import Data.Fin
open import Data.Num.Nat
open import... |
module examplesPaperJFP.Object where
open import Data.Product
open import Data.String.Base
open import examplesPaperJFP.NativeIOSafe
open import examplesPaperJFP.BasicIO hiding (main)
open import examplesPaperJFP.Console hiding (main)
record Interface : Set₁ where
field Method : Set
Result : (m :... |
--
-- Created by Dependently-Typed Lambda Calculus on 2019-05-15
-- imports
-- Author: ice1000
--
{-# OPTIONS --without-K --safe #-}
import Relation.Binary.PropositionalEquality
open import Relation.Binary.PropositionalEquality
import Relation.Binary.PropositionalEquality using ()
import Relation.Binary.Propositional... |
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module FOT.FOTC.Data.List.PostulatesVersusDataTypes where
-- See Agda mailing list.
-- Subject: Agda's ... |
------------------------------------------------------------------------
-- Some tactics aimed at making equational reasoning proofs more
-- readable for path equality
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Tactic.By.Path where
import A... |
{-# OPTIONS --without-K --safe #-}
open import Polynomial.Simple.AlmostCommutativeRing
open import Relation.Binary
open import Data.Bool using (Bool; false; true ; _∧_; _∨_; not; if_then_else_)
open import Data.String using (String)
open import EqBool
module Relation.Traced
{c ℓ}
(base : AlmostCommutativeRing c ℓ... |
module Pi-1 where
open import Data.Empty
open import Data.Unit
open import Data.Product
open import Relation.Binary.PropositionalEquality
open import Groupoid
import Pi-2 as P
--infixr 10 _◎_
--infixr 30 _⟷_
------------------------------------------------------------------------------
-- Level -1:
-- Types are -... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cohomology.ChainComplex
open import cohomology.Theory
open import groups.KernelImage
open import cw.CW
module cw.cohomology.ReconstructedZerothCohomologyGroup {i : ULevel} (OT : OrdinaryTheory i) where
open OrdinaryTheory OT
import cw.cohomolog... |
{-# OPTIONS --prop --without-K --rewriting #-}
module Calf.Types.Sum where
open import Calf.Prelude
open import Calf.Metalanguage
open import Data.Sum using (_⊎_; inj₁; inj₂) public
sum : tp pos → tp pos → tp pos
sum A B = U (meta (val A ⊎ val B))
sum/case : ∀ A B (X : val (sum A B) → tp neg) → (s : val (sum A B))... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.FiniteMultiset.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.FiniteMultiset.Base
private
variable
A : Type₀
infixr 30 _++_
_++_ : ∀ (xs ys : FMSet A) → FMSet A
[] ++ ys = ys
(x ∷ x... |
{-# OPTIONS --allow-unsolved-metas #-}
data C (A : Set) : Set where
c : (x : A) → C A
data D : Set where
data E (A : Set) : Set where
e : A → E A
postulate
F : {A : Set} → A → Set
G : {A : Set} → C A → Set
G (c x) = E (F x)
postulate
H : {A : Set} → (A → Set) → C A → Set
f : {A : Set} {P : A → Set} {y :... |
{-# OPTIONS --guardedness #-}
import Tutorials.Monday-Complete
import Tutorials.Tuesday-Complete
import Tutorials.Wednesday-Complete
import Tutorials.Thursday-Complete
|
open import Agda.Builtin.Equality
postulate
A : Set
B : A → Set
variable
a : A
b : B a
postulate
C : B a → Set
postulate
f : (b : B a) → {!!}
g : (c : C b) → {!!}
module _ (a′ : A) where
postulate
h : (b : B a) (b′ : B a′) → {!!}
j : (b′ : B a) (c : C b) (c′ : C b′) → {!!}
|
{-# OPTIONS --copatterns --sized-types --without-K #-}
module Poly where
open import Level using (Level)
open import Data.Product
open import Data.Nat
open import Data.Fin
open import Data.Unit
open import Data.Empty
open import Data.Vec hiding (_∈_; [_])
open import Relation.Binary.PropositionalEquality
open import F... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- An abstraction of various forms of recursion/induction
------------------------------------------------------------------------
-- The idea underlying Induction.* comes from Epigram 1, see Section 4
-- of "The v... |
-- {-# OPTIONS -v tc.constr.add:45 #-}
module _ where
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
==_] : ∀ {a} {A : Set a} (x : A) → x ≡ x
== x ] = refl
[ : ∀ {a} {A : Set a} (x : A) {y : A} → x ≡ y → A
[ x refl = x
case_of_ : ∀ {a b} {A : Set a} {B : Set b} → A → (A → B) → B
case x of f = f x
... |
{-# OPTIONS --without-K #-}
module FT-Fin where
import Data.Fin as F
import Data.Nat as N
open import FT
open import FT-Nat using (toℕ)
------------------------------------------------------------------
-- Finite Types and the natural numbers are intimately related.
--
toFin : (b : FT) → F.Fin (N.suc (toℕ b))
toFin ... |
module Cats.Category.Cat.Facts where
open import Cats.Category.Cat.Facts.Initial public using (hasInitial)
open import Cats.Category.Cat.Facts.Terminal public using (hasTerminal)
open import Cats.Category.Cat.Facts.Product public using (hasBinaryProducts)
open import Cats.Category.Cat.Facts.Exponential public using (h... |
open import Preliminaries
module Focusing where
data Tp : Set where
b : Tp
_⇒'_ : Tp → Tp → Tp
_×'_ : Tp → Tp → Tp
Ctx = List Tp
data _∈_ : Tp → Ctx → Set where
i0 : ∀ {Γ τ} → τ ∈ τ :: Γ
iS : ∀ {Γ τ τ1} → τ ∈ Γ → τ ∈ τ1 :: Γ
-- datatype of focused proofs for negative fragment of intuiti... |
{-# 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.Lemmas
open import Rings.Orders.Partial.Definition
open import Rings.Orders.Total.Definition
open import Groups.Definiti... |
{-# OPTIONS --cubical-compatible --show-implicit #-}
-- {-# OPTIONS -v tc.data:100 #-}
module WithoutK9 where
module Eq {A : Set} (x : A) where
data _≡_ : A → Set where
refl : _≡_ x
open Eq
module Bad {A : Set} {x : A} where
module E = Eq x
weak-K : {y : A} (p q : E._≡_ y) (α β : p ≡ q) → α ≡ β
weak-K... |
module Generate where
open import Data.List
open import Data.Fin hiding (_+_)
open import Data.Nat
open import Data.Product
open import Data.Bool
open import Function using (_∘_ ; _$_ ; _∋_ ; id ; case_return_of_ ; flip )
open import Function.Injection hiding (_∘_)
open import Function.Surjection hiding (_∘_)
open imp... |
{-# OPTIONS --without-K #-}
module library.Basics where
open import library.Base public
open import library.PathGroupoid public
open import library.PathFunctor public
open import library.NType public
open import library.Equivalences public
open import library.Univalence public
open import library.Funext public
open i... |
open import FRP.JS.Nat using ( ℕ ; _*_ )
open import FRP.JS.Bool using ( Bool )
open import FRP.JS.String using ( String )
open import FRP.JS.RSet using ( ⟦_⟧ ; ⟨_⟩ )
open import FRP.JS.Behaviour using ( Beh )
open import FRP.JS.Delay using ( Delay ) renaming
( _≟_ to _≟d_ ; _≠_ to _≠d_ ; _≤_ to _≤d_ ; _<_ to _<d_ ;... |
module Lib.Logic where
infix 30 _∨_
infix 40 _∧_
infix 50 ¬_
data _∨_ (A B : Set) : Set where
inl : A -> A ∨ B
inr : B -> A ∨ B
data _∧_ (A B : Set) : Set where
_,_ : A -> B -> A ∧ B
data False : Set where
record True : Set where
¬_ : Set -> Set
¬ A = A -> False |
------------------------------------------------------------------------
-- Lexicographic induction
------------------------------------------------------------------------
module Induction.Lexicographic where
open import Induction
open import Data.Product
-- The structure of lexicographic induction.
_⊗_ : ∀ {a b} ... |
------------------------------------------------------------------------
-- Products (variants for Set₁)
------------------------------------------------------------------------
-- I want universe polymorphism.
module Data.Product1 where
open import Data.Function
open import Relation.Nullary
infixr 4 _,_
infixr 2 _... |
module Categories.Pushout where
|
open import Prelude
module Implicits.Syntax.MetaType where
open import Implicits.Syntax.Type
mutual
data MetaSimpleType (m ν : ℕ) : Set where
tvar : Fin ν → MetaSimpleType m ν
mvar : Fin m → MetaSimpleType m ν
_→'_ : (a b : MetaType m ν) → MetaSimpleType m ν
tc : ℕ → MetaSimpleType m ν
data Me... |
{-# OPTIONS --cubical --safe #-}
module Subtyping where
open import Cubical.Core.Everything hiding (Type)
open import Cubical.Foundations.Prelude using (refl; sym; symP; cong; _∙_; transport; subst; transportRefl; transport-filler; toPathP; fromPathP; congP)
open import Cubical.Foundations.Transport using (transport⁻T... |
postulate
I : Set
D : I → Set
T : Set
record R : Set where
field
t0 : T
{i0} : I
t1 : T
d0 : D i0
{i1} : I
d1 : D i1
t2 : T
module M0 where
postulate
t0 t1 : T
module MI where
postulate
i1 : I
d1 : D i1
module MD {i0 : I} where
postulate
d0 : D i0
... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Functions.Definition
module Orders.WellFounded.Definition {a b : _} {A : Set a} (_<_ : Rel {a} {b} A) where
data Accessible (x : A) : Set (lsuc a ⊔ b) where
access : (∀ y → y < x → Accessible y... |
------------------------------------------------------------------------------
-- Quicksort using the Bove-Capretta method
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polym... |
------------------------------------------------------------------------------
-- Totality properties respect to Tree
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphi... |
{-
Theory about equivalences
Definitions are in Core/Glue.agda but re-exported by this module
- isEquiv is a proposition ([isPropIsEquiv])
- Any isomorphism is an equivalence ([isoToEquiv])
There are more statements about equivalences in Equiv/Properties.agda:
- if f is an equivalence then (cong f) is an equivalen... |
module Scratch where
open import OutsideIn.Prelude
open import OutsideIn.X
open import OutsideIn.Instantiations.Simple as Simple
import OutsideIn
data DCs : ℕ → Set where
True : DCs 0
False : DCs 0
data TCs : Set where
BoolT : TCs
open OutsideIn(Simple DCs)
data ⊥ : Set where
imp... |
-- -----------------------------
-- Equality
module Homogenous.Equality where
import Homogenous.Base
import EqBase
import PolyDepPrelude
open PolyDepPrelude using ( Datoid
; Bool; true; false; _&&_
; Pair; pair
; Either; left; right
; suc; ze... |
module Structure.Monoid.Laws where
open import Prelude
record MonoidLaws {a} (A : Set a) {{Mon : Monoid A}} : Set a where
field
idLeft : (x : A) → mempty <> x ≡ x
idRight : (x : A) → x <> mempty ≡ x
<>assoc : (x y z : A) → x <> (y <> z) ≡ (x <> y) <> z
open MonoidLaws {{...}} public
{-# DISP... |
module _ where
import DummyModule Set Set
|
module Data.HVec where
open import Data.Fin using (Fin; zero; suc)
open import Data.Nat using (ℕ; zero; suc; _+_)
open import Function using (const)
open import Data.Vec as V using (Vec; []; _∷_; _[_]≔_)
open import Level as L using (Level; suc)
-- -----------------------------------------------------------------... |
open import Oscar.Prelude
open import Oscar.Data.Proposequality
module Oscar.Class.Symmetrical where
private
module _
{𝔞} {𝔄 : Ø 𝔞}
{𝔟} {𝔅 : Ø 𝔟}
where
module Visible
(_∼_ : 𝔄 → 𝔄 → 𝔅)
{ℓ} (_↦_ : 𝔅 → 𝔅 → Ø ℓ)
where
𝓼ymmetrical = λ x y → (x ∼ y) ↦ (y ∼ x)
�... |
-- Andreas, 2012-06-07
-- {-# OPTIONS --show-implicit -v tc.rec:100 -v tc.meta.assign:15 #-}
module Issue387 where
import Common.Level
mutual
record R' (A : Set) : Set where
field f : _
c' : {A : Set} -> A -> R' A
c' a = record { f = a }
-- previous to fix of 387, this had an unresolved meta
-- because t... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category.Core using (Category)
module Categories.Diagram.Pushout {o ℓ e} (C : Category o ℓ e) where
open Category C
open HomReasoning
open Equiv
open import Categories.Morphism.Reasoning C as Square
renaming (glue to glue-square) hiding (id-unique)
open i... |
module Basic.Compiler.Machine where
open import Basic.AST
open import Basic.BigStep
open import Basic.Compiler.Code
open import Utils.Decidable
open import Data.Product
open import Relation.Nullary
open import Relation.Nullary.Decidable
open import Data.List hiding (unfold)
open import Data.Bool
open import Data.Nat
... |
{-# OPTIONS --safe --without-K #-}
module Generics.All where
open import Generics.Prelude
open import Generics.Telescope
open import Generics.Desc
open import Generics.Mu
private
variable
P : Telescope ⊤
p : ⟦ P ⟧tel tt
V I : ExTele P
ℓ c : Level
n : ℕ
levelAllIndArg : ConDesc P V I → Le... |
module OList.Properties {A : Set}(_≤_ : A → A → Set) where
open import Data.List
open import Bound.Lower A
open import Bound.Lower.Order _≤_
open import List.Sorted _≤_
open import OList _≤_
lemma-olist-sorted : {b : Bound} → (xs : OList b) → Sorted (forget xs)
lemma-olist-sorted onil = nils
lemma-olist-sorted (:< {x... |
{-# OPTIONS --without-K #-}
module LeqLemmas where
open import Data.Nat
using (ℕ; zero; suc; _+_; _*_; _<_; _≤_; _≤?_; z≤n; s≤s;
module ≤-Reasoning)
open import Data.Nat.Properties.Simple
using (*-comm; +-right-identity; +-comm; +-assoc)
open import Data.Nat.Properties
using (cancel-+-left-≤; n≤m+n)
open im... |
------------------------------------------------------------------------
-- Non-dependent and dependent lenses
-- Nils Anders Danielsson
------------------------------------------------------------------------
{-# OPTIONS --cubical --safe #-}
module README where
-- Non-dependent lenses.
import Lens.Non-dependent
im... |
{-
Transferring properties of terms between equivalent structures
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Transfer where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.SIP
open import Cubical.Foundations.Transport
... |
module Relations where
open import Level as Level using (zero)
open import Size
open import Function
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as P
open ≡-Reasoning
RelTrans : Set → Set₁
RelTrans B = Rel B Level.zero → Rel B Level.zero
Monotone : ∀{B} → RelTrans B → Set₁
Monotone ... |
{-# OPTIONS --cubical --safe --postfix-projections #-}
module Algebra.Construct.Free.Semilattice.Direct where
open import Algebra
open import Prelude
open import Path.Reasoning
infixl 6 _∪_
data 𝒦 (A : Type a) : Type a where
η : A → 𝒦 A
_∪_ : 𝒦 A → 𝒦 A → 𝒦 A
∅ : 𝒦 A
∪-assoc : ∀ xs ys zs → (xs ∪ ys) ∪ z... |
-- Andreas, 2017-08-10, issue #2667, reported by xekoukou,
-- test case by gallais
-- {-# OPTIONS -v tc.with.split:40 #-}
data Bot : Set where
data A : Set where
s : A → A
data P : A → Set where
p : ∀ {a} → P (s a)
poo : ∀{b} → P b → Set
poo p with Bot
poo {b = s c} p | _ = P c
-- Error WAS (2.5.3): Panic, u... |
{-# OPTIONS --cubical --safe --guardedness #-}
module Container.Fixpoint where
open import Container
open import Prelude
data μ {s p} (C : Container s p) : Type (s ℓ⊔ p) where
sup : ⟦ C ⟧ (μ C) → μ C
record ν {s p} (C : Container s p) : Type (s ℓ⊔ p) where
coinductive
field inf : ⟦ C ⟧ (ν C)
open ν public
|
{- 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
-- This module contains a model of a key-value st... |
module 747Negation where
-- Library
open import Relation.Binary.PropositionalEquality using (_≡_; refl) -- added last
open import Data.Nat using (ℕ; zero; suc)
open import Data.Empty using (⊥; ⊥-elim)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.Product using (_×_; proj₁; proj₂)
-- Negation is defi... |
------------------------------------------------------------------------
-- Simple regular expression matcher
------------------------------------------------------------------------
open import Eq
open import Setoids
open import Prelude
import RegExps
module SimpleMatcher (D : Datoid) where
private
open module D'... |
module Issue353 where
data Func : Set₁ where
K : (A : Set) → Func
-- Doesn't work.
module M where
const : ∀ {A B : Set₁} → A → B → A
const x = λ _ → x
⟦_⟧ : Func → Set → Set
⟦ K A ⟧ X = const A X
data μ (F : Func) : Set where
⟨_⟩ : ⟦ F ⟧ (μ F) → μ F
-- Error: μ is not strictly positive, because... |
{-
A couple of general facts about equivalences:
- if f is an equivalence then (cong f) is an equivalence ([equivCong])
- if f is an equivalence then pre- and postcomposition with f are equivalences ([preCompEquiv], [postCompEquiv])
- if f is an equivalence then (Σ[ g ] section f g) and (Σ[ g ] retract f g) are contr... |
module Printf where
_∘_ : {A : Set}{B : A -> Set}{C : {x : A} -> B x -> Set} ->
(f : {x : A}(y : B x) -> C y)(g : (x : A) -> B x)(x : A) -> C (g x)
(f ∘ g) x = f (g x)
infixr 10 _::_
data List (A : Set) : Set where
nil : List A
_::_ : A -> List A -> List A
{-# BUILTIN LIST List #-}
{-# BUILTIN NIL ... |
-- Basic intuitionistic propositional calculus, without ∨ or ⊥.
-- Kripke-style semantics with abstract worlds.
-- Gödel embedding.
module BasicIPC.Semantics.KripkeGodel where
open import BasicIPC.Syntax.Common public
-- Kripke models.
record Model : Set₁ where
infix 3 _⊩ᵅ_
field
World : Set
-- Intuit... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Cost where
open import Cubical.HITs.Cost.Base
|
{-# OPTIONS --without-K #-}
-- Constructions on top of exploration functions
open import Level.NP
open import Type hiding (★)
open import Type.Identities
open import Function.NP
open import Function.Extensionality
open import Algebra.FunctionProperties.NP
open import Data.Two.Base
open import Data.Indexed
open import ... |
module Data.Num.Bijective.Properties where
open import Data.Num.Bijective
open import Data.Nat
open import Data.Nat.DM
open import Data.Nat.Properties
open import Data.Nat.Properties.Simple
open import Data.Nat.Properties.Extra
open import Data.Fin as Fin using (Fin)
open import Data.Fin.Extra
open... |
-- Andreas, 2011-04-11 adapted from Data.Nat.Properties
module FrozenMVar2 where
open import Common.Level
open import Common.Equality
Rel : ∀ {a} → Set a → (ℓ : Level) → Set (a ⊔ lsuc ℓ)
Rel A ℓ = A → A → Set ℓ
Op₂ : ∀ {ℓ} → Set ℓ → Set ℓ
Op₂ A = A → A → A
module FunctionProperties
{a ℓ} {A : Set a} (_≈_ ... |
open import Agda.Primitive
Type : (i : Level) → Set (lsuc i)
Type i = Set i
postulate
T : (i : Level) (A : Type i) → Set
-- Give 'T lzero ?', then give '? → ?'.
-- An internal error has occurred. Please report this as a bug.
-- Location of the error: src/full/Agda/TypeChecking/Rules/Term.hs:178
Bug : Set
Bug = {!... |
{-# OPTIONS --without-K #-}
module pointed where
open import pointed.core public
open import pointed.equality public
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.