text stringlengths 4 690k |
|---|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some properties about subsets
------------------------------------------------------------------------
module Data.Fin.Subset.Properties where
open import Algebra
import Algebra.Properties.BooleanAlgebra as Boo... |
{-
- UARel given by a universe and equivalences
- SubstRel and DUARel for the element family over the universe
-}
{-# OPTIONS --no-exact-split --safe #-}
module Cubical.Displayed.Universe where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphi... |
module nodcap.Show where
open import Coinduction
open import Category.Monad.State using (State; StateMonadState; module RawMonadState)
open import Data.Nat as ℕ using (ℕ; suc; zero)
open import Data.Nat.Show as ℕS using ()
open import Data.Fin as F using (Fin; suc; zero)
open import Data.Pos as ℕ⁺
open import Data.Lis... |
-- Andreas, 2016-12-20, issue #2348
-- {-# OPTIONS -v tc.proj.like:100 #-}
{-# OPTIONS --show-implicit #-} -- NEEDED
-- something projection like
record Wrap (A : Set) : Set where
field out : A
proj-like : {{A : Set}} {{r : Wrap A}} → A
proj-like {{r = r}} = Wrap.out r
-- display term with projection like thing... |
module Syntax.Function where
import Lvl
open import Type
open import Syntax.Type
private variable ℓ : Lvl.Level
private variable T A B C : Type{ℓ}
infix 2 [↦] [⤠] [⤇]
-- Custom syntax for an anonymous function
-- Example:
-- f : A → A
-- f = a ↦ a
--
-- g : (A → A → A) → (A → A → A)
-- g(_▫_) = a₁ ↦ a₂... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.List
open import Agda.Builtin.Sigma
open import Agda.Builtin.Equality
infixr -1 _$_
_$_ : ∀ {a b}{A : Set a}{B : Set b} → (A → B) → A → B
f $ x = f x
map : ∀ {a b}{A : Set... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of constructions over unary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Unary.Properties where
open import D... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Truncation.Base where
open import Cubical.Data.NatMinusOne
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.Sn
data ∥_∥_ {ℓ} (A : Type ℓ) (n : ℕ₋₁) : Type ℓ where
∣_∣ : A → ∥ A ∥ n
hub : (f : S (1+ n) → ... |
module _ where
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat renaming (_==_ to _==N_; _<_ to _<N_)
record Eq (A : Set) : Set where
field
_==_ : A → A → Bool
open Eq {{...}}
record Ord (A : Set) : Set where
constructor mkOrd
field
_<_ : A → A → Bool
overlap {{eqA}} : Eq A
open Ord {{... |
{-# OPTIONS --rewriting #-}
module GSeTT.GSeTT where
open import GSeTT.Syntax
open import GSeTT.Rules
import GSeTT.CwF-structure
import GSeTT.Dec-Type-Checking
import GSeTT.Uniqueness-Derivations
open import GSeTT.Typed-Syntax
|
------------------------------------------------------------------------
-- Code related to the paper "Isomorphism Is Equality" by Thierry
-- Coquand and Nils Anders Danielsson
--
-- The code is written by Nils Anders Danielsson
------------------------------------------------------------------------
-- Note that the ... |
{-# OPTIONS --copattern --safe --no-sized-types --guardedness #-}
module Copattern where
open import Data.Nat
open import Relation.Binary.PropositionalEquality
record Stream (A : Set) : Set where
coinductive
field
head : A
tail : Stream A
open Stream public
-- | Bisimulation as equality
record _==_ {A : ... |
module safe where
-- Note that if every module listed here is safe in isolation, it does
-- not mean that they are using compatible options. As a consequence,
-- importing a combination of some of the modules listed may lead to
-- an unsafe result.
|
module sv20.assign2.Second where
open import sv20.assign2.SetTheory.Logic using (_⇔_; ¬_; _∧_; _∨_) renaming (_,_ to ⟨_,_⟩)
open import sv20.assign2.SetTheory.ZAxioms using (𝓢; _⊆_; _∈_; _∉_; _≡_; _⊂_; sym; cong; subs; trans;
proj₁; proj₂;
... |
{-# OPTIONS --without-K #-}
module FiniteTypeEquiv where
open import Level
open import Data.Nat using (ℕ)
open import Data.Fin using (Fin)
open import Data.Product
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open import Function.Equality using (_∘_; _⟶_; _⟨$⟩_)
open ≡-Reasoning
open... |
module Issue857 where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
data ⊤ : Set where
tt : ⊤
data ⊥ : Set where
⊥-elim : {A : Set} → ⊥ → A
⊥-elim = λ ()
bad : (x : ⊥) → ⊥-elim x ≡ tt
bad x = {!!} -- Goal type: x ≡ tt, with x : ⊥.
|
module Oscar.Property where
open import Oscar.Builtin.Numbatural
open import Oscar.Builtin.Objectevel
𝑴 : ℕ → ∀ {𝔬} → Ø 𝔬 → ∀ 𝔪 → Ø 𝔬 ∙̂ ↑̂ 𝔪
𝑴 ∅ 𝔒 𝔪 = 𝔒 → Ø 𝔪
𝑴 (↑ n) 𝔒 𝔪 = 𝔒 → 𝑴 n 𝔒 𝔪
𝑴² : ∀ (m : ℕ) n {𝔬} {𝔒 : Ø 𝔬} {𝔪} → 𝑴 n 𝔒 𝔪 → ∀ 𝔮 → Ø 𝔬 ∙̂ 𝔪 ∙̂ ↑̂ 𝔮
𝑴² m ∅ 𝔒 𝔮 = ∀ {o} → 𝑴 m (... |
-- Andreas, 2015-06-29 fixed handling of projections in positivity checker
-- {-# OPTIONS -v tc.polarity:20 -v tc.proj.like:10 -v tc.pos:10 --show-implicit #-}
-- {-# OPTIONS -v tc.pos.occ:70 #-}
open import Common.Prelude
open import Common.Product
dup : (b : Bool) (X : Set) → Set × Set
dup true X = (X → X) , X
... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Normal Forms.
------------------------------------------------------------------------------
open import Data.Nat
using (suc; zero; _+_;_*_)
renaming (_⊔_ to max; ℕ to Nat )
module Data.PropFormula.NormalForms ... |
module Tactic.Nat.Simpl.Lemmas where
open import Prelude
open import Tactic.Nat.NF
open import Tactic.Nat.Exp
open import Container.Bag
open import Tactic.Nat.Auto
open import Prelude.Nat.Properties
open import Container.List.Properties
open import Tactic.Nat.Auto.Lemmas
product1-sound : ∀ xs → product1 xs ≡ product... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Extension Theorems of the Syntax definitions.
------------------------------------------------------------------------------
open import Data.Nat using ( ℕ )
module Data.PropFormula.Theorems.Weakening ( n : ℕ ) whe... |
-- Andreas, 2016-07-08, issue reported by Nisse
module Issue2081 where
module M where
private
Private : Set₁
Private = Set
-- The local module should be private as well!
module Public where
-- The definitions inside this module should not be private
-- unless declared so expli... |
{-
Macros (autoDesc, AutoStructure, AutoEquivStr, autoUnivalentStr) for automatically generating structure definitions.
For example:
autoDesc (λ (X : Type₀) → X → X × ℕ) ↦ function+ var (var , constant ℕ)
We prefer to use the constant structure whenever possible, e.g., [autoDesc (λ (X : Type₀) → ℕ → ℕ)]
is [c... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
module LogicalFormulae where
infix 5 _≡_
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
data False : Set where
data False' {a : _} : Set a where
record Tr... |
------------------------------------------------------------------------
-- A variant of set quotients with erased higher constructors
------------------------------------------------------------------------
-- This module contains some basic definitions with few dependencies
-- (in particular, not Quotient). See Quot... |
module conversion where
open import lib
open import cedille-types
open import ctxt
open import is-free
open import lift
open import rename
open import subst
open import syntax-util
open import general-util
open import erase
{- Some notes:
-- hnf{TERM} implements erasure as well as normalization.
-- hnf{TYPE}... |
-- | In this module we show that the substream relation is transitive.
open import Streams
open import Relation.Binary.PropositionalEquality as P
open import Data.Product
open import Function.Equivalence
mutual
record F : Set where
coinductive
field out : Fμ
data Fμ : Set where
pres : F → Fμ
drop... |
{-# OPTIONS --without-K --safe #-}
module Definition.Conversion.Conversion where
open import Definition.Untyped
open import Definition.Untyped.Properties
open import Definition.Typed
open import Definition.Typed.RedSteps
open import Definition.Typed.Properties
open import Definition.Conversion
open import Definition.... |
module z05-00-internal-verification where
open import bool
open import eq
open import nat
open import nat-thms
open import product
open import sum
{-
------------------------------------------------------------------------------
so far: EXTERNAL VERIFICATION
- written programs (e.g., 'length')
- proved properties (e.... |
{-# OPTIONS --erased-cubical #-}
-- Modules that use --cubical can be imported when --erased-cubical is
-- used.
open import Erased-cubical-Open-public.Cubical
-- However, re-exports from such modules, made using module
-- application, can only be used in erased contexts.
_ : Set
_ = A
|
{-# OPTIONS --without-K --safe #-}
open import Level
-- ⊥ is Initial
module Categories.Category.Instance.Zero where
open import Data.Empty using (⊥; ⊥-elim)
open import Function renaming (id to idf)
open import Categories.Category
open import Categories.Functor
open import Categories.Category.Instance.Cats
import ... |
module Issue113 where
module X where
postulate D : Set
open X public
postulate x : D
-- Should give the proper error message, not __IMPOSSIBLE__ from Highlight.Generate
typeIncorrect : Set
typeIncorrect = Set1
|
{-# OPTIONS --without-K --safe #-}
module Data.Binary.Relations.Raw where
-- This module defines the "raw" relations on the binary types. In other words,
-- these relations are all functions which return either ⊤ or ⊥.
--
-- Each relation is generic of its strictness: if its first argument is O, it's a
-- strict rela... |
{-# OPTIONS --rewriting #-}
module Properties.Step where
open import Agda.Builtin.Equality using (_≡_; refl)
open import Agda.Builtin.Float using (primFloatPlus; primFloatMinus; primFloatTimes; primFloatDiv; primFloatEquality; primFloatLess)
open import Agda.Builtin.Bool using (true; false)
open import Agda.Builtin.S... |
-- Andreas, 2015-11-24, reported by Wolfram Kahl
{-# OPTIONS -v impossible:60 #-}
-- {-# OPTIONS -v tc.section:60 #-}
-- {-# OPTIONS -v scope:10 #-}
-- -- {-# OPTIONS -v tc.mod.apply:100 #-}
postulate N : Set
module A (O : Set) where
record R : Set where
field f : O
module L where
open R public
module ... |
{-# OPTIONS --copatterns #-}
module InstantiatedRecordModuleNoCopattern where
module M (A : Set1) where
open M -- underapplied open
open M Set -- fully applied open
record R : Set2 where
constructor inn
field
out : Set1
r : R
r = inn Set
open R r -- fully applied open
bla = out
-- This is an ill-f... |
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Rel)
module Algebra.Structures.Field
{a ℓ} {A : Set a}
(_≈_ : Rel A ℓ)
where
open import Algebra.Linear.Core
open import Relation.Nullary using (¬_)
open import Algebra.Structures _≈_
open import Algebra.FunctionProperties _≈_
open import... |
{-# OPTIONS --without-K --exact-split #-}
module integers where
import rings-with-properties
open rings-with-properties public
--------------------------------------------------------------------------------
{- We give a self-contained proof that ℤ is the initial pointed type with an
automorphism. -}
-- We firs... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
open import Cubical.Categories.Category
open import Cubical.Categories.Morphism renaming (isIso to isIsoC)
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open Iso
open import Cubical.Foundation... |
module Reals where
-- (a set with properties of) the reals
data ℝ : Set where
r0 : ℝ
r1 : ℝ
_+_ : ℝ → ℝ → ℝ
-- equality
data _==_ : ℝ → ℝ → Set where
AXrefl== : ∀ {r} → r == r
AXsymm== : ∀ {r s} → r == s → s == r
AXtrans== : ∀ {r s t} → r == s → s == t → r == t
AX+0 : ∀ {r} → (r + ... |
-- Andreas, 2017-01-21, issue #2423 overloading inherited projections
-- {-# OPTIONS -v tc.lhs.split:30 #-}
-- {-# OPTIONS -v tc.proj.amb:100 #-}
-- {-# OPTIONS -v tc.mod.apply:100 #-}
postulate
A : Set
record R : Set where
field f : A
record S : Set where
field r : R
open R r public
-- The inherited proj... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Morphisms between algebraic structures
------------------------------------------------------------------------
module Algebra.Morphism where
open import Relation.Binary
open import Algebra
open import Algebra.... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Nullification.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.PathSplitEquiv
open isPathSplitEquiv
isNull : ∀ {ℓ ℓ'} (S : Type ℓ) (A : Type ℓ') → Type (ℓ-max ℓ ℓ')
isNull S A = isPathSplitE... |
module Numeral.Natural.Prime.Proofs.Representation where
import Lvl
open import Data.Either as Either using ()
open import Data.Tuple as Tuple using ()
open import Functional
open import Function.Equals
open import Lang.Instance
open import Logic.Predicate
open import Logic.Propositional
open import Numeral.Coord... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some defined operations over Rings
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- This module gives the definition of _^_ which is used throughout... |
{- 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 Optics.All
open import LibraBFT.Prelude
open import LibraBFT... |
module Plain.Models where
open import Data.Nat
open import Plain.Terms
-- The (complete) Herbrand universe for Σ
U' : {n : ℕ} → (Signature n) → Set
U' Σ = GTerm Σ
open import Relation.Unary as U
open import Level
-- a (complete) Herbrand interpretation
record Interp {n : ℕ} (Σ : Signature n) : Set₁ where
field
... |
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; trans; cong)
open Eq.≡-Reasoning
open import Data.Nat using (ℕ; zero; suc; _+_; _*_)
open import Data.Nat.Properties.Simple using (+-suc)
open import Data.Product using (∃; ∃-syntax; _,_)
data even : ℕ → Set
data odd : ℕ → Set
data eve... |
{-# OPTIONS --allow-unsolved-metas #-}
case_of_ : {A B : Set} → A → (A → B) → B
case x of f = f x
data D : Set where
c : D → D
postulate
d : D
A : Set
P : A → Set
record R : Set where
no-eta-equality
field
f : A
-- R : Set
-- Rf : R → A
data Box : Set where
box : R → Box
postulate
f : D →... |
{-# OPTIONS --safe #-}
module Definition.Typed.Decidable where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.Typed.Consequences.Syntactic
open import Definition.Conversion
open import Definition.Conversion.Decidable
open import Definition.Co... |
open import Relation.Binary using (IsDecEquivalence)
open import Agda.Builtin.Equality
-- module UnifyMguFTerminationHunt (FunctionName : Set) ⦃ isDecEquivalenceA : IsDecEquivalence (_≡_ {A = FunctionName}) ⦄ where
module UnifyMguFTerminationHunt where
postulate
FunctionName : Set
instance isDecEquivalenceA : Is... |
{-# OPTIONS --without-K #-}
module SEquivSCPermEquiv where
open import Level using (Level; _⊔_)
open import Data.Fin using (Fin)
open import Data.Product using (_,_; proj₁; proj₂)
open import Data.Vec using (tabulate)
open import Function using (_∘_; id)
open import Data.Vec.Properties ... |
{-# OPTIONS --without-K #-}
open import Base
{-
This file contains the lemma that
a point (1 -> A) has n-connected fibers
if A is (S n)-connected.
The other direction will be added whenever
it is needed.
-}
module Homotopy.PointConnected {i} (A : Set i) (a : A) where
open import Homotopy.Conn... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Morphisms between algebraic structures
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary.Core
module Algebra.Morphism.Struc... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.SmashProduct.Base where
open import Cubical.Foundations.Prelude
-- This should be upstreamed to Basics when we develop some theory
-- about pointed types
ptType : Type₁
ptType = Σ[ A ∈ Type₀ ] A
pt : ∀ (A : ptType) → A .fst
pt A = A .snd
data Smash (A B : ptType)... |
module ListThms where
open import Sec4
import Sec2
{-
Definition of a list
-}
data List (A : Set) : Set where
[] : List A -- Empty list
_∷_ : A → List A → List A -- Cons
infixr 4 _∷_
-- Proposition stating what is a non empty list
nelist : {A : Set} → (List A) → Prop
nelist [] = ⊥
nelis... |
{-# OPTIONS --cubical --safe #-}
module Data.Empty.Properties where
open import Data.Empty.Base
open import Cubical.Data.Empty using (isProp⊥) public
open import Level
open import HLevels
isProp¬ : (A : Type a) → isProp (¬ A)
isProp¬ _ f g i x = isProp⊥ (f x) (g x) i
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Topos {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Categories.Category.CartesianClosed C
open import Categories.Category.Complete.Finitely C
open import Categories.Diagram.Equalizer C
open import Catego... |
------------------------------------------------------------------------------
-- Axiomatic PA propositional equality
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphi... |
{-# OPTIONS --without-K #-}
module Lecture7 where
import Lecture6
open Lecture6 public
-- Section 7.1 Fiberwise equivalences
tot : {i j k : Level} {A : UU i} {B : A → UU j} {C : A → UU k} → ((x : A) → B x → C x) → ( Σ A B → Σ A C)
tot f (dpair x y) = dpair x (f x y)
-- There is a function from the fibers of the ind... |
{-# OPTIONS --rewriting #-}
module Luau.StrictMode.ToString where
open import Agda.Builtin.Nat using (Nat; suc)
open import FFI.Data.String using (String; _++_)
open import Luau.Subtyping using (_≮:_; Tree; witness; scalar; function; function-ok; function-err)
open import Luau.StrictMode using (Warningᴱ; Warningᴮ; Un... |
{-# OPTIONS --cubical-compatible #-}
module WithoutK-PatternSynonyms1 where
-- Equality defined with one index.
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
pattern r = refl
-- The --cubical-compatible option works with pattern synonyms.
K : (A : Set) (x : A) (P : x ≡ x → Set) → P refl → (p : x ≡ x ) →... |
module BetterExampleOfDot where
open import Data.Nat
open import Agda.Builtin.Equality
data CannotContruct : ℕ → Set where
test : ∀ a b →
((a b : ℕ) → a + b ≡ b + a) →
CannotContruct (a + b) →
CannotContruct (b + a)
test a b theory p with a + b | theory a b
... | .(b + a) | refl = p... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Heterogeneously-indexed binary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Indexed.Heterogeneous where
---------... |
module Text.Greek.SBLGNT.2John where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΙΩΑΝΝΟΥ-Β : List (Word)
ΙΩΑΝΝΟΥ-Β =
word (Ὁ ∷ []) "2John.1.1"
∷ word (π ∷ ρ ∷ ε ∷ σ ∷ β ∷ ύ ∷ τ ∷ ε ∷ ρ ∷ ο ∷ ς ∷ []) "2John.1.1"
∷ word (ἐ ∷ κ ∷ ∙λ ∷ ε ∷... |
{-# OPTIONS --safe #-}
module Cubical.HITs.FreeComMonoids where
open import Cubical.HITs.FreeComMonoids.Base public
open import Cubical.HITs.FreeComMonoids.Properties public
|
{-# OPTIONS --cubical --safe #-}
module Data.Bits.Order.Reverse where
open import Prelude
open import Data.Bits
-- Least significant bit first
infix 4 _≲ᴮ_&_
_≲ᴮ_&_ : Bits → Bits → Bool → Bool
[] ≲ᴮ ys & true = true
[] ≲ᴮ [] & false = false
[] ≲ᴮ 0∷ ys & false = true
[] ≲ᴮ 1∷ ys & false = true
0∷... |
module LanguageConstructs where
open import Haskell.Prelude
{-# FOREIGN AGDA2HS {-# LANGUAGE LambdaCase #-} #-}
--------------------------------------------------
-- Lists
oneTwoThree : List Int
oneTwoThree = 1 ∷ 2 ∷ 3 ∷ []
{-# COMPILE AGDA2HS oneTwoThree #-}
exactlyTwo : List a → Maybe (a × a)
exactlyTwo (x ∷ y ... |
{-# OPTIONS --without-K #-}
open import lib.Base
module lib.Coinduction where
infix 1000 ♯_
postulate -- Coinduction
∞ : ∀ {i} (A : Type i) → Type i
♯_ : ∀ {i} {A : Type i} → A → ∞ A
♭ : ∀ {i} {A : Type i} → ∞ A → A
{-# BUILTIN INFINITY ∞ #-}
{-# BUILTIN SHARP ♯_ #-}
{-# BUILTIN FLAT ♭ #-}
|
open import Agda.Builtin.Bool
record ⊤ : Set where constructor tt
data ⊥ : Set where
record Σ (A : Set) (B : A → Set) : Set where
field
fst : A
snd : B fst
open Σ
T : Bool → Set
T false = ⊥
T true = ⊤
Foo : Bool → Set
Foo false = Bool → Bool
Foo true = Σ Bool T
foo : (x : Bool) → Foo x
foo false x ... |
{-# OPTIONS --without-K --safe #-}
open import Algebra.Structures.Bundles.Field
module Algebra.Linear.Category.Vect
{k ℓᵏ} (K : Field k ℓᵏ)
{a ℓ}
where
open import Relation.Binary using (Setoid)
open import Algebra.Linear.Structures.Bundles
open import Algebra.Linear.Morphism.Bundles K
open import Categories.C... |
-- Andreas, 2017-07-11, issue #2637, reported by nad.
--
-- This error was triggered by a meta m in a constraint UnBlock m
-- which is solved to infinity by the size solver.
-- The constraint printer did not expect such a situation
-- and crashed when printing the UnBlock constraint.
{-# OPTIONS --allow-unsolved-meta... |
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Magma.Properties
{a ℓ} (M : Magma a ℓ) where
open Magma M
|
module RationalUtils where
open import Algebra
import Algebra.Morphism.RingMonomorphism as RingMonomorphisms
open import Data.Rational
open import Data.Rational.Properties
open import Data.Nat using (z≤n; s≤s)
open import Data.Integer using (+≤+; +<+; +_; -[1+_])
open import Data.Product using (_×_; _,_)
open import... |
module _ where
open import Common.Prelude
open import Common.String
record IsString {a} (A : Set a) : Set a where
field
fromString : String → A
open IsString {{...}} public
{-# BUILTIN FROMSTRING fromString #-}
instance
StringIsString : IsString String
StringIsString = record { fromString = λ s → s }
... |
module maybe-thms where
open import eq
open import level
open import maybe
open import product
open import sum
maybe-dec : ∀ {ℓ}{A : Set ℓ}(x : maybe A) → x ≡ nothing ∨ Σ A (λ a → x ≡ just a)
maybe-dec nothing = inj₁ refl
maybe-dec (just a) = inj₂ (a , refl) |
open import SOAS.Metatheory.Syntax
-- Unit law of metasubstitution
module SOAS.Metatheory.SecondOrder.Unit {T : Set}(Syn : Syntax {T}) where
open Syntax Syn
open import SOAS.Metatheory.FreeMonoid Syn
open import SOAS.Metatheory.SecondOrder.Metasubstitution Syn
open import SOAS.Families.Core {T}
open import SOAS.C... |
module RandomAccessList.Zeroless.Properties where
open import BuildingBlock
open import BuildingBlock.BinaryLeafTree using (BinaryLeafTree; Node; Leaf; split)
open import RandomAccessList.Zeroless.Core
open import RandomAccessList.Zeroless.Core.Properties
open import RandomAccessList.Zeroless
open import Data.Unit us... |
{-# OPTIONS --cubical --safe #-}
module HITs.PropositionalTruncation where
open import Cubical.HITs.PropositionalTruncation
using (squash; ∥_∥; ∣_∣)
renaming (recPropTrunc to rec; recPropTrunc→Set to rec→set)
public
|
{- 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 Util.Prelude
----------------------------------------------------... |
-- Andreas, 2014-07-02 Documenting the ETA pragma
open import Common.Equality
mutual
data Colist (A : Set) : Set where
[] : Colist A
_∷_ : A → ∞Colist A → Colist A
record ∞Colist (A : Set) : Set where
eta-equality
coinductive
constructor delay
field force : Colist A
open ∞Colist
-... |
record Foo : Set where
cppattern -- Typo here
no-eta-equality
|
-- Andreas, 2016-12-30, issue #1886, reported by nad
-- {-# OPTIONS -v tc.data:40 -v scope.data.def:40 -v tc.decl:10 #-}
data D (X : Set) : Set
data D (X : Set Set) where
|
------------------------------------------------------------------------
-- The "terminates" relation
------------------------------------------------------------------------
open import Atom
module Termination (atoms : χ-atoms) where
open import Equality.Propositional
open import Logical-equivalence using (_⇔_)
ope... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.types.Pi
open import lib.types.Group
open import lib.types.Int
open import lib.types.List
open import lib.types.Word
open import lib.types.SetQuotient
open import lib.groups.Homomorphism
module lib.groups.GeneratedGr... |
module Nat.Class where
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
record Nat (ℕ : Set) : Set₁ where
field
zero : ℕ
succ : ℕ → ℕ
ind : (P : ℕ → Set) → P zero → (∀ {k} → P k → P (succ k)) → ∀ n → P n
_+_ : ℕ → ℕ → ℕ
+-zero : ∀ {n} → zero + n ≡ n
+-succ : ∀ {m n} → suc... |
------------------------------------------------------------------------
-- Small parser combinator library used by Mixfix.Cyclic.Grammar
------------------------------------------------------------------------
module Mixfix.Cyclic.Lib where
open import Algebra
open import Codata.Musical.Notation
open import Function... |
{-# OPTIONS --cubical #-}
module Demos.AgdaBasics where
open import Level
open import Data.Nat
open import Data.String
data Bool : Type where
false : Bool
true : Bool
_,not! : Bool → Bool
false ,not! = true
true ,not! = false
_∧_ : Bool → Bool → Bool
false ∧ y = false
true ∧ y = y
infixr 1 if_then_else_
if... |
module PairUnifier where
record PairUnifier {t} {T : Set t} (t₁ t₂ : T) : Set t where
field
|
------------------------------------------------------------------------
-- Weak bisimilarity
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --sized-types #-}
open import Prelude hiding (module W)
module Delay-monad.Alternative.Weak-bisimilarity {a} {A : Type a}... |
-- This code is closely based on code due to Andy Morris.
data _≡⁰_ {A : Set} (@0 x : A) : @0 A → Set where refl : x ≡⁰ x
data _≡ʷ_ {A : Set} (@ω x : A) : @ω A → Set where refl : x ≡ʷ x
works : ∀ {A} {@0 x y : A} → x ≡⁰ y → x ≡ʷ y
works refl = refl
also-works : ∀ {A} {@0 x y : A} → x ≡⁰ y → x ≡ʷ y
also-works {x = x}... |
{-
Definition of various kinds of categories.
This library follows the UniMath terminology, that is:
Concept Ob C Hom C Univalence
Precategory Type Type No
Category Type Set No
Univalent Category Type Set Yes
This file also contains
- pathToIso ... |
open import Coinduction using ( ♭ ; ♯_ )
open import Data.Unit using ( ⊤ ; tt )
open import System.IO.Transducers.Syntax
using ( lazy ; strict ; _⇒_is_ ; inp ; out ; done )
renaming ( _⟫_ to _⟫'_ ; _[&]_ to _[&]'_ ; _⟨&⟩_ to _⟨&⟩'_ ;
discard to discard' ; π₁ to π₁' ; π₂ to π₂' ;
⟦_⟧ to ⟦_⟧' )
open import S... |
{-# OPTIONS --without-K #-}
open import HoTT
open import homotopy.HSpace renaming (HSpaceStructure to HSS)
open import homotopy.Freudenthal
open import homotopy.IterSuspensionStable
open import homotopy.Pi2HSusp
open import homotopy.EM1HSpace
module homotopy.EilenbergMacLane where
-- EM(G,n) when G is π₁(A,a₀)
modul... |
------------------------------------------------------------------------
-- An example
------------------------------------------------------------------------
module RecursiveTypes.Subtyping.Example where
open import Codata.Musical.Notation
open import Data.Fin
open import Data.Nat
open import RecursiveTypes.Syntax... |
module Sigma.Subst.Properties where
open import Data.Nat using (ℕ; _+_; zero; suc)
open import Data.Fin using (Fin; zero; suc)
open import Sigma.Subst.Core
open import Sigma.Renaming.Base
open import Function using (_∘_)
open import Data.Product using (∃₂; _×_) renaming ( _,_ to ⟨_,_⟩ )
open import Relation.Bina... |
------------------------------------------------------------------------
-- Parsing of mixfix operators
------------------------------------------------------------------------
-- This module defines a grammar for the precedence graph g.
open import Mixfix.Expr
module Mixfix.Cyclic.Grammar
(i : PrecedenceGr... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax PCF
type
N : 0-ary
_↣_ : 2-ary | r30
B : 0-ary
term
app : α ↣ β α -> β | _$_ l20
lam : α.β -> α ↣ β | ƛ_ r10
tr : B
fl : B
ze : N
su : N -> N
pr : N -> N
iz : N -> ... |
{-
This file contains:
- Definition of propositional truncation
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.PropositionalTruncation.Base where
open import Cubical.Core.Primitives
-- Propositional truncation as a higher inductive type:
data ∥_∥ {ℓ} (A : Type ℓ) : Type ℓ where
∣_∣ : A → ∥ A ∥
squash... |
-- Andreas, 2017-01-18, issue #2408
-- DLubs were not serialized, thus, there was a problem with
-- level dependent on unused values.
{-# OPTIONS --show-irrelevant #-}
-- {-# OPTIONS -v tc:20 #-}
open import Agda.Primitive
data ⊥ : Set where
data Unit : Set where
unit : Unit
-- Argument a is unused in l
l : (u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.