text stringlengths 4 690k |
|---|
module Properties where
import Properties.Dec
|
------------------------------------------------------------------------------
-- The alternating bit protocol (ABP)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphis... |
module HasDecidableSatisfaction where
open import OscarPrelude
open import 𝓐ssertion
open import HasSatisfaction
open import Interpretation
record HasDecidableSatisfaction (A : Set) ⦃ _ : 𝓐ssertion A ⦄ ⦃ _ : HasSatisfaction A ⦄ : Set₁
where
field
_⊨?_ : (I : Interpretation) → (x : A) → Dec (I ⊨ x)
open Has... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lifting of two predicates
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Product.Relation.Unary.All where
open import Level
open import ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Adjoint.TwoSided where
-- A "two sided" adjoint is an adjoint of two functors L and R where the
-- unit and counit are natural isomorphisms.
-- A two sided adjoint is the underlying data to an Adjoint Equivalence
open import Level
open import Categories.Adjoint
o... |
{- 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.Consensus.Types
module LibraBFT.Impl.Crypto.... |
-- Andreas, 2014-09-01 restored this test case
module ClashingImport where
postulate A : Set
import Imports.A
open Imports.A public
-- only a public import creates a clash
-- since an ambiguous identifier would be exported
|
module Types.IND1 where
open import Data.Nat
open import Data.Fin hiding (_+_)
open import Data.Product
open import Function
open import Relation.Binary.PropositionalEquality hiding (Extensionality)
open import Types.Direction
open import Auxiliary.Extensionality
open import Auxiliary.RewriteLemmas
private
varia... |
open import Oscar.Prelude
open import Oscar.Data.¶
open import Oscar.Data.Fin
open import Oscar.Data.Substitunction
open import Oscar.Data.Term
open import Oscar.Data.Maybe
open import Oscar.Data.Proposequality
open import Oscar.Data.Vec
open import Oscar.Class.Congruity
open import Oscar.Class.Thickandthin
open impor... |
------------------------------------------------------------------------------
-- Proving properties without using pattern matching on refl
------------------------------------------------------------------------------
{-# OPTIONS --no-pattern-matching #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --... |
module Syntax where
import Level
open import Data.Empty
open import Data.Unit as Unit
open import Data.Nat
open import Data.List as List renaming ([] to Ø; [_] to [_]L)
open import NonEmptyList as NList
open import Data.Vec as Vec hiding ([_]; _++_)
open import Data.Product as Prod
open import Function
open import Re... |
module Structure.Operator.Vector.FiniteDimensional.LinearMaps.ChangeOfBasis where
open import Functional
import Lvl
open import Numeral.CoordinateVector as Vec using () renaming (Vector to Vec)
open import Numeral.Finite
open import Numeral.Natural
open import Structure.Function.Multi
open import Structure.Operat... |
open import Common.Prelude hiding (tt)
instance
tt : ⊤
tt = record{}
_<_ : Nat → Nat → Set
m < zero = ⊥
zero < suc n = ⊤
suc m < suc n = m < n
instance
<-suc : ∀ {m n} {{_ : m < n}} → m < suc n
<-suc {zero} = tt
<-suc {suc m} {zero} {{}}
<-suc {suc m} {suc n} = <-suc {m} {n}
|
S : Set
S = S
|
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommMonoid where
open import Cubical.Algebra.CommMonoid.Base public
open import Cubical.Algebra.CommMonoid.Properties public
|
{-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Identity
open import HoTT.Equivalence
open import HoTT.Equivalence.Sigma
open import HoTT.Identity.Sigma
open import HoTT.Identity.Pi
open import HoTT.Transport.Identity
open import HoTT.HLevel
open import HoTT.Exercises.Chapter2.Exercise11 using (modul... |
-- {-# OPTIONS -v tc.constr.findInScope:15 -v tc.meta.new:50 #-}
-- Andreas, 2012-10-20 issue raised by d.starosud
-- solved by dropping UnBlock constraints during trial candidate assignment
module Fail.Issue723 where
import Common.Level
open import Common.Prelude using (Bool; false; zero) renaming (Nat to ℕ)
record ... |
------------------------------------------------------------------------------
-- Testing the translation of function, predicates and variables names
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# ... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Paths
open import lib.types.TwoSemiCategory
module lib.two-semi-categories.Functor where
record TwoSemiFunctor {i₁ j₁ i₂ j₂} (C : TwoSemiCategory i₁ j₁) (D : TwoSemiCategory i₂ j₂)
: Type (lmax (lmax i₁ j₁) (lmax i₂ j₂)) where
p... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Definition
open import Numbers.Naturals.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Rings.Definition
open import Rings.EuclideanDomains.Definition
open import Fields.Fields
ope... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Rings.Definition
open import Groups.Definition
open import Fields.Fields
open import Sets.EquivalenceRelations
open import LogicalFormulae
open import Rings.IntegralDomains.Definition
open import Rings.IntegralDomains.Lemmas
ope... |
{-
Product of structures S and T: X ↦ S X × T X
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Product where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Transport
open import... |
-- Andreas, 2017-01-12, issue #2386
-- Relaxing the constraints of BUILTIN EQUALITY
open import Agda.Primitive
postulate
ℓ : Level
A : Set ℓ
a b : A
P : A → Set
-- Level-polymorphic equality, living in the first universe
data _≡_ {a} {A : Set a} (x : A) : A → Set where
instance refl : x ≡ x
{-# BUILTIN E... |
{-# OPTIONS --enable-prop #-}
open import Agda.Builtin.Nat
-- You can define datatypes in Prop, even with multiple constructors.
-- However, all constructors are considered (definitionally) equal.
data TestProp : Prop where
p₁ p₂ : TestProp
-- Pattern matching on a datatype in Prop is disallowed unless the
-- targ... |
module bool where
------------------------
-- Datatypes
------------------------
data 𝔹 : Set where
true : 𝔹
false : 𝔹
----------------------
-- AND
----------------------
infixr 6 _∧_
_∧_ : 𝔹 → 𝔹 → 𝔹
true ∧ b = b
false ∧ b = false
---------------------
-- OR
---------------------
infixr 5 _∨_
_∨_ : 𝔹 ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.EilenbergMacLane1 {i} (G : Group i) where
private
module G = Group G
comp-equiv : ∀ g → G.El ≃ G.El
comp-equiv g = equiv
(λ x → G.comp x g)
(λ x → G.comp x (G.inv g))
(λ x → G.assoc x (G.inv g) g ∙ ap (G.comp x) ... |
import Level as L
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open import Data.Product
open import Data.Empty
open import Data.Nat
open import Data.Nat.Properties
open import RevMachine
module RevNoRepeat {ℓ} (M : RevMachine {ℓ}) where
infix 99 _ᵣₑᵥ
infixr 10 _∷_
infixr 10 _++↦... |
------------------------------------------------------------------------------
-- Distributive laws on a binary operation: Lemma 6
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univer... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Instance.Properties.Setoids.LCCC where
open import Level
open import Data.Product using (Σ; _,_)
open import Function.Equality as Func using (Π; _⟶_)
open import Relation.Binary using (Setoid)
import Relation.Binary.PropositionalEquality as ≡
open import ... |
{- 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.Abstract.Types.EpochCo... |
-- {-# OPTIONS --verbose tc.constr.findInScope:15 #-}
module 01-arguments where
data T : Set where
tt : T
data A : Set where
mkA : A
mkA2 : T → A
giveA : ⦃ a : A ⦄ → A
giveA {{a}} = a
test : A → T
test a = tt
test2 : T
test2 = test giveA
id : {A : Set} → A → A
id v = v
test5 : T → T
test5 = id
⋯ : {A : S... |
{-# OPTIONS --safe --without-K #-}
module Generics.Desc where
open import Data.String using (String)
open import Generics.Prelude hiding (lookup)
open import Generics.Telescope
private
variable
P : Telescope ⊤
V I : ExTele P
p : ⟦ P ⟧tel tt
ℓ : Level
n : ℕ
data ConDesc (P : Telescope ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Floats: basic types and operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Float.Base where
open import Relation.Binary.Core usin... |
-- Andreas, 2016-02-04
-- Printing of overapplied operator patterns
-- Expected results see comments.
_fun : (A : Set) → Set
_fun = {!!}
-- C-c C-c RET gives
--
-- A fun = ?
_nofun : (A : Set₁) (B : Set₁) → Set₁
_nofun = {!!}
-- C-c C-c RET gives
--
-- (A nofun) B = ?
module Works where
record Safe : Set₁ where... |
module bohm-out where
open import lib
open import general-util
open import cedille-types
open import syntax-util
{- Implementation of the Böhm-Out Algorithm -}
private
nfoldr : ℕ → ∀ {ℓ} {X : Set ℓ} → X → (ℕ → X → X) → X
nfoldr zero z s = z
nfoldr (suc n) z s = s n (nfoldr n z s)
nfoldl : ℕ → ∀ {ℓ} {... |
-- Copyright: (c) 2016 Ertugrul Söylemez
-- License: BSD3
-- Maintainer: Ertugrul Söylemez <esz@posteo.de>
module Data.Fin.Core where
open import Core
open import Data.Nat
import Data.Nat.Core as Nat
data Fin : ℕ → Set where
fzero : {n : ℕ} → Fin (suc n)
fsuc : {n : ℕ} → Fin n → Fin (suc n)
instance
Fin... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.FiniteMultiset.CountExtensionality where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat
open import Cubical.Data.Nat.Order
open import Cubical.Data.Empty as ⊥
open import Cubical.Data.S... |
module SameName where
data Stuff : Set where
mkStuff : Stuff
stuffFunc : Stuff -> (Stuff : Set) -> Stuff
stuffFunc = {! !}
|
{-# OPTIONS --without-K #-}
module FunExt where
open import Base
module _ {i j} {A : Type i} {B : A → Type j} where
happly : (f g : (x : A) → B x) → (f == g) → ((x : A) → f x == g x)
happly f g = ind== D d where
D : (f g : (x : A) → B x) → f == g → Type _
D f g _ = (x : A) → f x == g x
d : (f : (... |
{-# OPTIONS --rewriting --without-K #-}
--
-- Prelude.agda - Some base definitions
--
module Prelude where
open import Agda.Primitive public
record ⊤ : Set where
constructor tt
{-# BUILTIN UNIT ⊤ #-}
record Σ {i j} (A : Set i) (B : A → Set j) : Set (i ⊔ j) where
constructor _,_
field
fst... |
------------------------------------------------------------------------
-- Pullbacks
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- This module is partly based on code written by Guillame Brunerie in
-- a fork of the Coq HoTT library
-- (https://github.... |
open import Oscar.Class.Congruity
open import Oscar.Data.Proposequality
module Oscar.Class.Congruity.Proposextensequality where
instance
𝓒̇ongruityProposextensequality : ∀ {a b} → 𝓒̇ongruity a b Proposextensequality
𝓒̇ongruity.ċongruity 𝓒̇ongruityProposextensequality _ f≡̇g x rewrite f≡̇g x = ∅
|
-- Andreas, 2017-01-01, issue #2377
-- Warn about useless `public` in `open` statements.
-- {-# OPTIONS -v scope.decl:70 #-}
-- Warning #1
open import Agda.Builtin.Nat public
import Agda.Builtin.Bool as B
-- Warning #2
open B public
module _ where
open import Agda.Builtin.Equality public -- no warning
-- Warning... |
-- Minimal implicational logic, de Bruijn approach, final encoding
module Bf.ArrMp where
open import Lib using (List; _,_; LMem; lzero; lsuc)
-- Types
infixr 0 _=>_
data Ty : Set where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
-- Context and truth judgement
Cx : Set
Cx = List Ty
isTrue : Ty -> Cx -> Set
... |
{-# OPTIONS --universe-polymorphism --allow-unsolved-metas #-}
module Issue209 where
postulate
Level : Set
zero : Level
suc : Level → Level
_⊔_ : Level -> Level -> Level
{-# BUILTIN LEVEL Level #-}
{-# BUILTIN LEVELZERO zero #-}
{-# BUILTIN LEVELSUC suc #-}
{-# BUILTIN LEVELMAX _⊔_ #-}
data _≡_ {a}... |
-- Andreas, 2016-02-11, bug reported by sanzhiyan
module Issue610-module where
import Common.Level
open import Common.Equality
data ⊥ : Set where
record ⊤ : Set where
data A : Set₁ where
set : .Set → A
module M .(x : Set) where
.out : Set
out = x
.ack : A → Set
ack (set x) = M.out x
hah : set ⊤ ≡ set ⊥
ha... |
module _ where
open import Agda.Builtin.String
_&_ = primStringAppend
record Show (A : Set) : Set where
field
show : A → String
open Show {{...}} public
data Bin : Set where
[] : Bin
0:_ : Bin → Bin
1:_ : Bin → Bin
five : Bin
five = 1: 0: 1: []
instance
ShowBin : Show Bin
show {{ShowBin}} [] = ... |
{-# OPTIONS --cubical --safe #-}
module Data.List.Sort where
open import Data.List.Sort.InsertionSort using (insert-sort; sort-sorts; sort-perm; perm-invar)
open import Data.List.Sort.MergeSort using (merge-sort; merge≡insert-sort)
|
------------------------------------------------------------------------
-- Queue instances for the queues in Queue.Quotiented
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
import Equality.Path as P
open import Prelude
import Queue
module Queue.Quoti... |
postulate
__ : Set
|
{-# OPTIONS --cubical #-}
module Multidimensional.Data.NNat.Properties where
open import Cubical.Core.Glue
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat
open import Cub... |
open import Data.Empty using (⊥-elim)
open import Data.Fin using (Fin; _≟_)
open import Data.Nat using (ℕ)
open import Data.Vec using (lookup; _[_]≔_)
open import Data.Vec.Properties using (lookup∘update; lookup∘update′; []≔-commutes; []≔-idempotent; []≔-lookup)
open import Relation.Nullary using (yes; no; ¬_)
open imp... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed AVL trees
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (StrictTotalOrder)
module Data.AVL.Indexed
{a ℓ... |
module Function.Domains where
import Lvl
open import Structure.Setoid
open import Type
private variable ℓₒ₁ ℓₒ₂ ℓₑ₁ ℓₑ₂ : Lvl.Level
module _ {X : Type{ℓₒ₁}} {Y : Type{ℓₒ₂}} where
-- The partial domain of a function
-- Note: This is the same as the domain because all functions are total (or at least supposed... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties satisfied by preorders
------------------------------------------------------------------------
open import Relation.Binary
module Relation.Binary.Properties.Preorder
{p₁ p₂ p₃} (P : Preorde... |
{-# OPTIONS --without-K #-}
module algebra.semigroup where
open import algebra.semigroup.core public
open import algebra.semigroup.morphism public
|
{-# OPTIONS --without-K --safe #-}
module Data.Binary.Proofs.Unary where
open import Relation.Binary.PropositionalEquality
open import Data.Binary.Operations.Unary
open import Data.Binary.Definitions
open import Data.Binary.Operations.Semantics
open import Data.Nat as ℕ using (ℕ; suc; zero)
open import Relation.Binar... |
{- 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.Consensus.BlockStor... |
module Data.Num.Standard where
open import Data.Nat using (ℕ; suc; zero; _≤?_)
open import Data.Fin using (Fin; fromℕ; #_)
open import Level using () renaming (suc to lsuc)
-- renaming (zero to Fzero; suc to Fsuc; toℕ to F→N; fromℕ≤ to N→F)
open import Relation.Nullary.Decidable
infixr 2 [_]_
-- invariant: base... |
open import Prelude
open import Nat
open import core
open import contexts
open import lemmas-disjointness
module lemmas-freshness where
-- if x is fresh in an hexp, it's fresh in its expansion
mutual
fresh-elab-synth1 : ∀{x e τ d Γ Δ} →
x # Γ →
freshh x e →
... |
infix -3.14 _+_
postulate
_+_ : Set → Set → Set
|
-- Andreas, 2017-07-25, issue #2649, reported by gallais
-- Serialization killed range needed for error message.
-- {-# OPTIONS -v scope.clash:60 #-}
module Issue2649 where
open import Issue2649-1
open import Issue2649-2
id : (A : Set) → A → A
id A x = M.foo
where
module M = MyModule A x
-- Expected:
-- Duplic... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Unsigned divisibility
------------------------------------------------------------------------
-- For signed divisibility see `Data.Integer.Divisibility.Signed`
{-# OPTIONS --without-K --safe #-}
module Data.In... |
-- Binary products
{-# OPTIONS --safe #-}
module Cubical.Categories.Limits.BinProduct where
open import Cubical.Categories.Category.Base
open import Cubical.Data.Sigma.Base
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Prelude
open import Cubical.HITs.PropositionalTruncation.Base
private
... |
module _ where
open import Agda.Builtin.Cubical.Glue hiding (primGlue)
primitive
primGlue : _
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Printing Strings During Evaluation
------------------------------------------------------------------------
{-# OPTIONS --without-K --rewriting #-}
-- see README.Debug.Trace for a use-case
module Debug.Trace w... |
------------------------------------------------------------------------------
-- Common stuff used by the gcd example
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorph... |
-- Andreas, 2013-10-21 reported by Christian Sattler
{-# OPTIONS --allow-unsolved-metas #-}
module Issue922 where
import Common.Level
f : Set → Set → Set
f x _ = x -- Note: second argument is unused
module _ (_ : f ? ?) where
g = f
-- Here an instance search for the unused argument (2nd ?)
-- is triggered.
... |
-- Andreas, 2018-10-27, issue #3323, reported by Guillaume Brunerie
--
-- Mismatches between original and repeated parameter list
-- should not lead to internal errors.
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
data T .(b : Bool) : Set
data T b where -- Omission of relevance info allowed
c : ... |
{-# OPTIONS --rewriting #-}
{- Lower can be a record if using type-in-type or allowing large eliminations:
{-# OPTIONS --type-in-type #-}
record Lower (A : Set₁) : Set where
constructor lower
field raise : A
open Lower
-}
postulate
_≡_ : ∀ {A : Set₁} → A → A → Set
Lower : (A : Set₁) → Set
lower : ∀ {A} → A ... |
module bstd.bash where
|
module Cats.Category.Constructions.Product where
open import Relation.Binary.PropositionalEquality as PropEq using (_≡_ ; refl)
open import Data.Bool using (Bool ; true ; false ; not; if_then_else_)
open import Relation.Binary.Core using (IsEquivalence)
open import Level
open import Cats.Category.Base
open import Cat... |
{-# OPTIONS --without-K --safe #-}
module Experiment.Applicative where
open import Function.Base
open import Relation.Binary.PropositionalEquality
record Functor (F : Set → Set) : Set₁ where
field
fmap : ∀ {A B} → (A → B) → F A → F B
field
fmap-id : ∀ {A} (x : F A) → fmap id x ≡ x
fmap-∘ : ∀ {A B ... |
{-# OPTIONS --prop #-}
open import Agda.Builtin.Equality
postulate
A : Set
P : Prop
p : P
f : P → A
mutual
X : A
X = _
test₁ : (x : P) → X ≡ f x
test₁ x = refl
test₂ : X ≡ f p
test₂ = refl
|
-- Andreas, 2016-12-15, issue #2341
-- `with` needs to abstract also in sort of target type.
-- {-# OPTIONS -v tc.with:100 #-}
open import Agda.Primitive
data _≡_ {a}{A : Set a} (x : A) : A → Set a where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
postulate
equalLevel : (x y : Level) → x ≡ y
id : ∀ {a} {A : Set... |
module Thesis.SIRelBigStep.DSyntax where
open import Thesis.SIRelBigStep.Syntax public
-- data DType : Set where
-- _⇒_ : (σ τ : DType) → DType
-- int : DType
DType = Type
import Base.Syntax.Context
module DC = Base.Syntax.Context DType
Δτ : Type → DType
Δτ (σ ⇒ τ) = σ ⇒ Δτ σ ⇒ Δτ τ
Δτ (pair τ1 τ2) = pair (Δτ τ... |
module AbsurdPatternRequiresNoRHS where
data False : Set where
record True : Set where
f : False -> True
f () = _
|
-- Andreas, 2015-07-13 Better parse errors for illegal type signatures
(A B) : Set1
A B = Set
|
module Properties.Step where
open import Agda.Builtin.Equality using (_≡_; refl)
open import Agda.Builtin.Float using (primFloatPlus; primFloatMinus; primFloatTimes; primFloatDiv)
open import FFI.Data.Maybe using (just; nothing)
open import Luau.Heap using (Heap; _[_]; alloc; ok; function_is_end)
open import Luau.Synt... |
------------------------------------------------------------------------
-- Higher lenses
------------------------------------------------------------------------
{-# OPTIONS --cubical #-}
import Equality.Path as P
module Lens.Non-dependent.Higher
{e⁺} (eq : ∀ {a p} → P.Equality-with-paths a p e⁺) where
open P.De... |
open import Prelude
open import Nat
open import contexts
open import dom-eq
open import dynamics-core
open import lemmas-disjointness
open import statics-core
module disjointness where
-- if a hole name is new in a term, then the resultant context is
-- disjoint from any singleton context with that hole name
mut... |
open import Data.Product using ( _×_ ; _,_ )
open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ )
open import FRP.LTL.Time.Interval using ( _⊑_ ; _~_ ; _⌢_∵_ )
open import FRP.LTL.ISet.Core using ( ISet ; [_] ; _,_ ; M⟦_⟧ ; splitM⟦_⟧ ; subsumM⟦_⟧ )
module FRP.LTL.ISet.Sum where
_∨_ : ISet → ISet → ISet
A ∨ B = [ (λ i → ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Non-empty AVL trees, where equality for keys is propositional equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary usi... |
module Vec where
import Nat
import Fin
open Nat hiding (_==_; _<_)
open Fin
data Nil : Set where
vnil : Nil
data Cons (A As : Set) : Set where
vcons : A -> As -> Cons A As
mutual
Vec' : Nat -> Set -> Set
Vec' zero A = Nil
Vec' (suc n) A = Cons A (Vec n A)
data Vec (n : Nat)(A : Set) : Set where
... |
-- Andreas, 2015-11-09, issue 1710 reported by vejkse
-- {-# OPTIONS -v tc.with:20 #-}
record wrap (A : Set) : Set where
field
out : A
open wrap public
record MapsFrom (A : Set) : Set₁ where
field
cod : Set
map : A → cod
open MapsFrom public
wrapped : (A : Set) → MapsFrom A
cod (wrapped A) = wrap A
o... |
module Text.Lex where
open import Prelude
record TokenDFA {s} (A : Set) (Tok : Set) : Set (lsuc s) where
field
State : Set s
initial : State
accept : State → Maybe Tok
consume : A → State → Maybe State
instance
FunctorTokenDFA : ∀ {s} {A : Set} → Functor (TokenDFA {s = s} A)
TokenDFA.State ... |
module Common.Equality where
open import Common.Level
infix 4 _≡_
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
{-# BUILTIN REFL refl #-}
subst : ∀ {a p}{A : Set a}(P : A → Set p){x y : A} → x ≡ y → P x → P y
subst P refl t = t
cong : ∀ {a b}{A : Set a}{B : Se... |
-- Copyright: (c) 2016 Ertugrul Söylemez
-- License: BSD3
-- Maintainer: Ertugrul Söylemez <esz@posteo.de>
module Data.Int.Core where
open import Agda.Builtin.Int public
renaming (Int to ℤ)
using (pos; negsuc)
open import Agda.Builtin.TrustMe
open import Classes
open import Core
open import Data.Nat.Core
re... |
{-# OPTIONS --without-K --safe #-}
module Data.Bool where
open import Data.Bool.Base public
open import Data.Bool.Truth public
|
module WellTypedTermsNBEModel where
open import Library
open import Naturals
open import WellTypedTerms
open import RMonads.REM
open import FunctorCat
open import Categories.Sets
open NatT
open Σ
-- normal forms
mutual
data Nf (Γ : Con) : Ty → Set where
lam : ∀{σ τ} → Nf (Γ < σ) τ → Nf Γ (σ ⇒ τ)
ne : Ne Γ... |
------------------------------------------------------------------------
-- Regular expressions
------------------------------------------------------------------------
open import Setoids
module RegExps (S : Setoid) where
infix 8 _⋆
infixl 7 _⊙_
infixl 6 _∣_
infix 1 _∈‿⟦_⟧
open import Prelude
private open module... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- List membership and some related definitions
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Data.List.Membership.... |
{-# OPTIONS --without-K --safe #-}
module Mult3 where
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Binary.PropositionalEquality
data Mult3 : ℕ → Set where
0-mult : Mult3 0
SSS-mult : ∀ n → Mult3 n → Mult3 (suc (suc (suc n)))
data Mult3' : ℕ → Set where
30-mult : Mult3' 30
21-mult... |
module plfa.part1.Negation where
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
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 (_×_; _,_)
open import plfa.part1.Isomorphism using (_... |
-- Andreas 2012-07-07
module Issue674 where
record unit : Set where
constructor tt
module A ⦃ t : unit ⦄ (i : unit) where
id : unit → unit
id x = x
open A {{t = _}} tt
module N = A {{ tt }} tt
open N
open A {{tt}} tt
module M = A tt
open M
open A tt
-- the last statement caused a panic when inserting the ... |
{-# OPTIONS --cubical --safe #-}
module Chord where
open import Cubical.Core.Everything using (_≡_; Level; Type; Σ; _,_; fst; snd; _≃_; ~_)
open import Data.Fin using (Fin; toℕ) renaming (zero to fz; suc to fs)
open import Data.List using (List; map; []; _∷_; _++_; zip)
open import Data.Nat using... |
module Base.Change.Equivalence.Realizers where
open import Relation.Binary.PropositionalEquality
open import Base.Change.Algebra
open import Level
open import Data.Unit
open import Data.Product
open import Function
open import Postulate.Extensionality
open import Base.Change.Equivalence
-- Here we give lemmas about ... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Int
open import Agda.Builtin.Equality
fromNeg : Nat → Int
fromNeg zero = pos 0
fromNeg (suc x) = negsuc x
{-# BUILTIN FROMNEG fromNeg #-}
-- A negative number
neg : Int
neg = -20
-- Matching against negative numbers
lit : Int → Nat
lit -20 = 0 -- Error thr... |
module Tactic.Reflection.Equality where
open import Prelude
open import Builtin.Reflection
open import Builtin.Float
instance
EqVisibility : Eq Visibility
_==_ {{EqVisibility}} visible visible = yes refl
_==_ {{EqVisibility}} visible hidden = no (λ ())
_==_ {{EqVisibility}} visible instance′ = no (λ ()... |
module Natural where
open import Agda.Builtin.Equality
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
-- seven = suc (suc (suc (suc (suc (suc (suc zero))))))
{-# BUILTIN NATURAL ℕ #-}
_+_ : ℕ → ℕ → ℕ
infixl 6 _+_
zero + b = b
(suc a) + b = suc (a + b)
{-# BUILTIN NATPLUS _+_ #-}
+-id : ∀ (a : ℕ) → a + zero ≡ ze... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.