text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.HSpace where
-- This is just an approximation because
-- not all higher cells are killed.
record HSpaceStructure {i} (X : Ptd i) : Type i where
constructor hSpaceStructure
field
⊙μ : (X ⊙× X) ⊙→ X
μ : de⊙ X → de⊙ X → de⊙ X
μ = curr... |
module Examples where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data Bool : Set where
true : Bool
false : Bool
if_then_else_ : {A : Set} -> Bool -> A -> A -> A
if true then x else y = x
if false then x else y = y
not : Bool -> Bool
not x = if x then false else true
isZero : Nat -> Bool
isZero ze... |
module Foundation.Level0 where
{-
it : ∀ {a} {A : Set a} {{x : A}} → A
it {{x}} = x
{-# INLINE it #-}
-}
private
module Data where
data ⊥ : Set where
module _ where
open import Foundation.Bottom
open import Foundation.Primitive
instance isBottom-Data : ∀ {a} → IsBottom Data.⊥ a
IsBottom.⊥-elim isBo... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.AbGroup where
open import Cubical.Algebra.AbGroup.Base public
open import Cubical.Algebra.AbGroup.Properties public
|
open import Agda.Builtin.Equality
module _ (F : Set₁ → Set₁) where
f : (B : Set₁) → B ≡ F Set → Set
f B eq = {!eq!}
-- WAS: splitting on eq produces
-- f .(_ Set) refl = {!!}
-- with unsolved metavariables
-- SHOULD: instead produce
-- f .(F Set) refl = {!!}
|
{-# OPTIONS --safe #-}
module CF.Syntax.DeBruijn where
open import Level
open import Data.Bool
open import Data.Product
open import Data.Integer
open import Data.List hiding (null)
open import Data.List.Relation.Unary.All
open import Relation.Unary.PredicateTransformer using (Pt)
open import Relation.Unary hiding (_⊢... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vectors
------------------------------------------------------------------------
-- This implementation is designed for reasoning about dynamic
-- vectors which may increase or decrease in size.
-- See `Data.Ve... |
open import parse-tree
open import string
module run (ptr : ParseTreeRec) where
open import lib
open import datatypes
open ParseTreeRec ptr
module deriv where
data RunElement : 𝕃 char → Set where
Id : string → RunElement []
InputChar : (c : char) → RunElement (c :: [])
ParseTree : {l : 𝕃 char}{s : ... |
------------------------------------------------------------------------------
-- Miscellaneous properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# ... |
------------------------------------------------------------------------
-- Examples/exercises related to CCS from "Enhancements of the
-- bisimulation proof method" by Pous and Sangiorgi
--
-- Implemented using coinductive definitions of strong and weak
-- bisimilarity and expansion.
----------------------------------... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.elims.CofPushoutSection
module cohomology.MayerVietoris {i} where
{- Mayer-Vietoris Sequence: Given a span X ←f– Z –g→ Y, the cofiber space
of the natural map [reglue : X ∨ Y → X ⊔_Z Y] (defined below) is equivalent
to the suspension... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Lists.Lists
open import Numbers.Naturals.Order
open import Numbers.Naturals.Order.Lemmas
open import Numbers.Naturals.Semiring
open import Numbers.BinaryNaturals.Definition
open import Orders.Partial.Definition
open import Order... |
{-# OPTIONS --without-K --safe #-}
module Categories.Adjoint.Instance.Discrete where
-- The Discrete/Forgetful/Codiscrete adjoint triple between Sets and
-- StrictCats.
--
-- We need 'strict' functor equality to prove functionality of the
-- forgetful functor (we cannot extract a propositional equality proof
-- on ob... |
module list-simplifier where
open import level
open import bool
open import functions
open import eq
open import empty
open import level
open import list
open import list-thms
open import nat
open import neq
open import product
open import product-thms
data 𝕃ʳ : Set → Set lone where
_ʳ : {A : Set} → 𝕃 A → 𝕃ʳ A
... |
module Sized.SelfRef where
open import Data.Product
open import Data.String.Base
open import Size
open import SizedIO.Object
open import SizedIO.IOObject
open import SizedIO.ConsoleObject
open import SizedIO.Base
open import SizedIO.Console hiding (main)
open import NativeIO
data AMethod : Set where
print : ... |
module Formalization.ImperativePL where
open import Data.Boolean
open import Data.List
import Lvl
open import Numeral.Natural
open import String
open import Type
Ident : TYPE
data Lit : TYPE
data Stmt : TYPE
data Expr : TYPE
Ty : TYPE
record Context : TYPE₁
Ident = String
data Lit where
unit : Lit
bool : B... |
-- Tactic for proving coprimality.
-- Finds Coprime hypotheses in the context.
module Tactic.Nat.Coprime where
import Agda.Builtin.Nat as Builtin
open import Prelude
open import Control.Monad.Zero
open import Control.Monad.State
open import Container.List
open import Container.Traversable
open import Numeric.Nat
open... |
{-# OPTIONS --without-K #-}
module sets.int.core where
open import sum
open import equality
open import function
import sets.nat as N
open N using (ℕ; suc)
open import sets.int.definition
open import sets.int.utils
open import sets.vec
open import hott.level.closure
infixl 7 _*_
infixl 6 _+_
from-nat : ℕ → ℤ
from-n... |
-- Note that, at the time of writing, Agda does /not/ cache interfaces
-- if an internal error is encountered (at least in some cases).
import Issue2447.Internal-error
|
module Error-in-imported-module where
open import Error-in-imported-module.M
|
{- 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 Issue2639.DR (Z : Set) where
open import Agda.Builtin.Size
mutual
data D (i : Size) : Set where
a : D i
b : R i → D i
record R (i : Size) : Set where
coinductive
field
force : {j : Size< i} → D j
|
-- This code is based on "Parallel Parsing Processes" by Koen
-- Claessen.
-- This module is a variant of Parallel in which Parser uses mixed
-- induction/coinduction.
module Parallel2 {Tok : Set} where
open import Coinduction
open import Data.Bool
import Data.Bool.Properties as Bool
open import Algebra
open import ... |
module DerivedProps where
{-
open import Relation.Binary.PropositionalEquality
open import Data.Nat hiding (_>_)
-}
open import StdLibStuff
open import Syntax
open import STT
lem3 : {n : ℕ} {Γ-t : Ctx n} (F G : Form Γ-t $o) → ⊢ ((F => (F => G)) => (F => G))
lem3 F G = inf-V (inf-V ax-4-s ax-1-s) (inf-V (inf-V ax-4... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Covec type and some operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Covec where
open import Size
open imp... |
module Structure.Category.Functor.Proofs where
open import Data.Tuple as Tuple using (_,_)
open import Functional using (_$_)
open import Logic.Predicate
import Lvl
open import Structure.Category
open import Structure.Categorical.Properties
open import Structure.Category.Functor
open import Structure.Category.Fun... |
-- {-# OPTIONS -v tc.lhs:10 -v tc.lhs.split:50 #-}
postulate A : Set
record R : Set where
field f : A
test : _ → A
test record{f = a} = a
-- This could succeed, but Agda currently does not try to guess
-- the type type of the record pattern from its field names.
|
module Generic.Test.Eq where
open import Generic.Main hiding (List; []; _∷_)
open import Generic.Test.Data.Fin
open import Generic.Test.Data.List
open import Generic.Test.Data.Vec
xs : Vec (List (Fin 4)) 3
xs = (fsuc fzero ∷ fzero ∷ [])
∷ᵥ (fsuc (fsuc fzero) ∷ [])
∷ᵥ (fzero ∷ fsuc (fsuc (fsuc fzero)) ∷ [])
∷... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Nullary.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Functions.Fixpoint
open import Cubical.Data.Empty as ⊥
open import Cubical.HITs.PropositionalTruncation.Base
private
var... |
{-# OPTIONS --without-K --safe #-}
module Definition.Conversion.Symmetry where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.Conversion
open import Definition.Conversion.Stability
open import Definition.Conversion.Soundness
open import Defin... |
module Haskell.Prim.Maybe where
open import Agda.Builtin.List public
open import Haskell.Prim
open import Haskell.Prim.List
--------------------------------------------------
-- Maybe
data Maybe {ℓ} (a : Set ℓ) : Set ℓ where
Nothing : Maybe a
Just : a -> Maybe a
maybe : ∀ {ℓ₁ ℓ₂} {a : Set ℓ₁} {b : Set ℓ₂} ... |
module Nats where
open import Agda.Builtin.Nat public
renaming (Nat to ℕ; _-_ to _∸_)
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- An inductive definition of the sublist relation with respect to a
-- setoid. This is a generalisation of what is commonly known as Order
-- Preserving Embeddings (OPE).
-------------------------------------------... |
module Issue2575.M where
A : Set
A = Set
|
------------------------------------------------------------------------------
-- Testing subst using an implicit arguments for the propositional function.
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-... |
-- A variant of code reported by Andreas Abel.
-- Andreas, 2014-01-07 Issue reported by Dmitriy Traytel
-- Andreas, 2015-04-15 Issue resurrected with Pierre Hyvernat
{-# OPTIONS --guardedness --sized-types #-}
open import Common.Size
open import Common.Prelude hiding (map)
open import Common.Product
record Stream (... |
module Tactic.Reflection.Quote.Class where
open import Builtin.Reflection
record Quotable {a} (A : Set a) : Set a where
field
` : A → Term
open Quotable {{...}} public
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some properties imply others
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Consequences where
open import Relation.Binary.Co... |
{-# OPTIONS --without-K --safe #-}
-- Backwards evaluator and the fact that with eval, forms a reversible evaluator
module BackwardsEval where
open import Data.Unit using (tt)
open import Data.Sum using (inj₁; inj₂)
open import Data.Product using (_,_; proj₁; proj₂)
open import Relation.Binary.PropositionalEquality
... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Library.Data.Integer where
open import Light.Level using (Level ; Setω)
open import Light.Library.Data.Empty as Empty using (Empty)
open import Light.Library.Data.Natural as Natural using (ℕ)
open import Light.Subtyping using... |
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Quasigroup.Properties
{a ℓ} (Q : Quasigroup a ℓ) where
open Quasigroup Q
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Magma.Construct.Empty where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Algebra.Magma
open import Cubical.Data.Empty
_◯_ : Op₂ ⊥
_◯_ ()
isSet⊥ : isSet ⊥
isSet⊥ = isProp→isSet isProp⊥
⊥-isM... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Bundles of parameters for passing to the Ring Solver
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- This module packages up all the stuff that's p... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Implementation.Data.Either where
open import Light.Library.Data.Either using (Library ; Dependencies)
open import Light.Level using (_⊔_)
open import Light.Variable.Levels
instance dependencies : Dependencies
dependencies = ... |
module irreflexive where
open import Data.Nat using (ℕ; zero; suc)
open import Negation using (¬_)
infix 4 _<_
data _<_ : ℕ → ℕ → Set where
z<s : ∀ {n : ℕ}
------------
→ zero < suc n
s<s : ∀ {m n : ℕ}
→ m < n
-------------
→ suc m < suc n
-- n が非反射律 ∀ n ∈ ℕ, ¬(n < n) を満たすことの証明
<-irrefl... |
{-# OPTIONS --without-K --exact-split --safe #-}
module Identity where
open import Basic_Types
-- ------------------------------------
-- the identity type, or path type
infix 1 _≡_
data _≡_ {A : Set} : A → A → Set where
refl : ∀ (a : A) → a ≡ a
{-# BUILTIN EQUALITY _≡_ #-}
-- path induction
p-ind : ∀ {A : Se... |
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
open import Agda.Builtin.Unit
open import Agda.Builtin.Nat
-- setup
infixl 5 _>>=_
_>>=_ = bindTC
defToTerm : Name → Definition → List (Arg Term) → Term
defToTerm _ (function cs) as = pat-lam cs as
defToTerm _ (data-cons d) as = con d as
defToTerm _ ... |
open import Agda.Primitive using (lzero; lsuc; _⊔_)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; setoid; cong; trans)
import Function.Equality
open import Relation.Binary using (Setoid)
import Categories.Category
import Categories.Functor
import Categories.Category.Instance.Setoids
import C... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Functions.Definition
open import Numbers.Naturals.Semiring
open import Sets.Cardinality.Finite.Definition
module Sets.Cardinality.Countable.Definition where
record CountablyInfiniteSet {a : _} (A : Set a) : Set a where
field
counting : A → ℕ
co... |
module L.Base.Unit where
-- Reexport definitions
open import L.Base.Unit.Core public
|
{-# OPTIONS --sized-types #-}
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
module flcagl
(A : Set)
( _≟_ : (a b : A) → Dec ( a ≡ b ) ) where
open import Data.Bool hiding ( _≟_ )
-- open import Data.Maybe
open import Level renaming ( zero to Zero ; suc to succ )
open import Siz... |
-- {-# OPTIONS -v tc.cover.cover:10 -v tc.cover.strategy:20 -v tc.cover.splittree:100 #-}
-- Andreas, 2013-05-15 Reported by jesper.cockx
module Issue849 where
data Bool : Set where
true false : Bool
¬ : Bool → Bool
¬ true = false
¬ false = true
data D : Bool → Set where
d1 : (x : Bool) → D x
d2 : (x : Bool) →... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.ZCohomology.Groups.Wedge where
open import Cubical.ZCohomology.Base
open import Cubical.ZCohomology.Properties
open import Cubical.ZCohomology.MayerVietorisUnreduced
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Prelude
open im... |
{-# OPTIONS --rewriting #-}
module Properties.FunctionTypes where
open import FFI.Data.Either using (Either; Left; Right; mapLR; swapLR; cond)
open import Luau.FunctionTypes using (srcⁿ; src; tgt)
open import Luau.Subtyping using (_<:_; _≮:_; Tree; Language; ¬Language; witness; unknown; never; scalar; function; scala... |
{-# OPTIONS --universe-polymorphism #-}
-- Proof that 'Free' is a functor
module Categories.Free.Functor where
open import Categories.Support.PropositionalEquality
open import Categories.Categories
open import Categories.Category
renaming (_[_∼_] to _[_~C_])
open import Categories.Free.Core
open import Categories.... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.LoopSpaceCircle
open import homotopy.PinSn
module homotopy.SphereEndomorphism where
Sphere-endo : ∀ n → Type₀
Sphere-endo n = Sphere n → Sphere n
⊙Sphere-endo : ∀ n → Type₀
⊙Sphere-endo n = ⊙Sphere n ⊙→ ⊙Sphere n
{-
⊙LiftSphere... |
-- The debug output should include the text "Termination checking
-- mutual block MutId 0" once, not three times.
{-# OPTIONS -vterm.mutual.id:40 #-}
record R : Set₁ where
constructor c
field
A : Set
_ : A → A
_ = λ x → x
_ : A → A
_ = λ x → x
_ : A → A
_ = λ x → x
-- Included in order to make... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Decidable equality over lists parameterised by some setoid
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Data.Li... |
module Everything where
import Relation.Ternary.Separation
-- The syntax and interpreter of LTLC
import Typed.LTLC
-- The syntax and interpreter of LTLC with strong updatable references
import Typed.LTLCRef
-- The syntax of a session typed language
import Sessions.Syntax
-- ... and its semantics
import Sessions.Se... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Functions.Definition
open import Lists.Definition
open import Lists.Monad
open import Boolean.Definition
module Lists.Filter.AllTrue where
allTrue : {a b : _} {A : Set a} (f : A → Set b) (l : List A) → Set b
allTrue f [] = Tru... |
module _ (A : Set) where
record R : Set where
field f : A
test : R → R
test r = {!r!}
|
module Text.Greek.SBLGNT.Rom where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΠΡΟΣ-ΡΩΜΑΙΟΥΣ : List (Word)
ΠΡΟΣ-ΡΩΜΑΙΟΥΣ =
word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Rom.1.1"
∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "Rom.1.1"
∷ word (Χ ∷ ρ ∷ ι ∷ ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Examples showing how the case expressions can be used
------------------------------------------------------------------------
module README.Case where
open import Data.Fin hiding (pred)
open import Data.Mayb... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.FunctorCategory where
open import Data.Product
open import Categories.Category
import Categories.Functor as Cat
open import Categories.Functor hiding (equiv; id; _∘_; _≡_)
open import Categories.NaturalTransformation
open import Categories.Product
open import ... |
{-# OPTIONS --without-K #-}
open import library.Basics hiding (Type ; Σ)
open import library.types.Sigma
open import Sec2preliminaries
module Sec3hedberg where
-- Lemma 3.2
discr→pathHasConst : {X : Type} → has-dec-eq X → pathHasConst X
discr→pathHasConst dec x₁ x₂ with (dec x₁ x₂)
discr→pathHasConst dec x₁ x₂ |... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Binary.Raw where
open import Cubical.Relation.Binary.Base public
open import Cubical.Relation.Binary.Raw.Definitions public
open import Cubical.Relation.Binary.Raw.Structures public
open import Cubical.Relation.Binary.Raw.Bundles public
|
{-# OPTIONS --allow-unsolved-metas #-}
postulate
Nat : Set
variable
A : _
F : _ → _
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to Fin, and operations making use of these
-- properties (or other properties not available in Data.Fin)
------------------------------------------------------------------------
{-# OPTIONS --... |
{-# OPTIONS --without-K --rewriting #-}
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
open import homotopy.EilenbergMacLane1
module homotopy.Eilenber... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Core definitions for Characters
------------------------------------------------------------------------
module Data.Char.Core where
open import Data.Nat using (ℕ)
open import Data.Bool using (Bool; true; false... |
module Imports.Bool where
data Bool : Set where
true false : Bool
|
module AKS.Rational where
open import AKS.Rational.Base public
open import AKS.Rational.Properties public
|
-- Andreas, 2017-12-03, issue #2826, reported by Snicksi, shrunk by sattlerc
data A : Set where
a : A
data B : Set where
b : (x : A) → B
foo : B → B
foo s with a
-- WAS: case splitting produces repeated variables in pattern
foo s | x = {!s!}
-- Expected: Something like the following
-- foo (b x₁) | x = {!!}
|
{-# OPTIONS --without-K #-}
--open import HoTT
open import homotopy.3x3.PushoutPushout
open import homotopy.3x3.Transpose
import homotopy.3x3.To as To
import homotopy.3x3.From as From
open import homotopy.3x3.Common
module homotopy.3x3.FromTo2 {i} (d : Span^2 {i}) where
open Span^2 d
open M d hiding (Pushout^2)
open... |
module _ where
open import Common.Prelude
open import Common.Equality
record Functor (F : Set → Set) : Set₁ where
field
fmap : ∀ {A B} → (A → B) → F A → F B
open Functor {{...}} public
record Applicative (F : Set → Set) : Set₁ where
field
pure : ∀ {A} → A → F A
_<*>_ : ∀ {A B} → F (A → B) → F A → ... |
module _ where
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
postulate
String : Set
{-# BUILTIN STRING String #-}
primitive
@0 ⦃ primShowNat ⦄ : Nat → String
-- Wrong modality for primitive primShowNat
-- Got: instance, erased
-- Expected: visible, unrestricted
-- when checking that t... |
{-# OPTIONS --without-K #-}
module PathStructure.Sigma {a b} {A : Set a} {B : A → Set b} where
open import Equivalence
open import PathOperations
open import Transport
open import Types
ap₂-dep : ∀ {a b c} {A : Set a} {B : A → Set b} {C : Set c}
{x x′ : A} {y : B x} {y′ : B x′}
(f : (a : A) (b : B a) → C) (p : x ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Primitive IO: simple bindings to Haskell types and functions
------------------------------------------------------------------------
{-# OPTIONS --without-K #-}
module IO.Primitive where
open import Codata.Mu... |
module product where
open import Data.Nat using (ℕ; _*_)
open import lists using (List; foldr)
-- リストの要素の積
product : (List ℕ) → ℕ
product xs = foldr _*_ 1 xs
|
{-# OPTIONS --universe-polymorphism #-}
module Issue229 where
open import Common.Level
data Works a b : Set (lsuc a ⊔ lsuc b) where
w : (A : Set a)(B : Set b) → Works a b
record Doesn'tWork a b : Set (lsuc a ⊔ lsuc b) where
field
A : Set a
B : Set b
-- An internal error has occurred. Please report this... |
{-# OPTIONS --safe --cubical #-}
module Data.List.Kleene where
open import Prelude
open import Data.Fin
mutual
infixr 5 _&_ ∹_
infixl 5 _⁺ _⋆
record _⁺ {a} (A : Set a) : Set a where
inductive
constructor _&_
field
head : A
tail : A ⋆
data _⋆ {a} (A : Set a) : Set a where
[] : A ⋆... |
-- Lemma for `Constructive.Axiom.Properties.Base`
{-# OPTIONS --without-K --safe #-}
module Constructive.Axiom.Properties.Base.Lemma where
-- agda-stdlib
open import Data.Empty
open import Data.Nat
import Data.Nat.Properties as ℕₚ
open import Data.Product
open import Data.Sum as Sum
open import Data.Sum.Properties
o... |
module Dual where
open import Prelude using (flip)
open import Logic.Equivalence
open import Category
_op : Cat -> Cat
ℂ@(cat _ _ _ _ _ _ _ _ _) op = cat Obj
(\A B -> B ─→ A)
id
(\{_}{_}{_} -> flip _∘_)
(\{_}{_} -> Eq)
(\{_}{_}{_}{_}{_}{_}{_} -> flip cong)
(\{_}{_}{_} -> idR)
(\{_}{_}{_}... |
-- Andreas, 2013-03-20
-- Without termination checking disabled, the positivity checker
-- will throw an error.
module NoTerminationCheckPositivity where
open import Common.Level
module M {a}{A : Set a}(K : A → A → A) where
-- F fails the termination check
F : A → A
F X = K X (F X)
K : Set → Set → Set
K X Y =... |
{-# OPTIONS --cubical --safe --postfix-projections #-}
-- This file contains an implementation of the stack-based compiler for Hutton's
-- razor, as from:
--
-- P. Bahr and G. Hutton, “Calculating correct compilers,” Journal of
-- Functional Programming, vol. 25, no. e14, Sep. 2015,
-- doi: 10.1017/S095679681500... |
-- {-# OPTIONS --show-implicit #-} -- in case of emergency
module ldlc-algo-nosingle where
open import Data.Nat renaming (_+_ to _+ᴺ_ ; _≤_ to _≤ᴺ_ ; _≥_ to _≥ᴺ_ ; _<_ to _<ᴺ_ ; _>_ to _>ᴺ_ ; _≟_ to _≟ᴺ_)
open import Data.Nat.Properties renaming (_<?_ to _<ᴺ?_)
open import Data.Integer renaming (_+_ to _+ᶻ_ ; _≤_ to _... |
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary.PropositionalEquality using
( _≡_ ; refl ; sym ; trans ; subst ; cong )
module Cats.Category.Discrete {li} {I : Set li}
(I-set : ∀ {i j : I} (p q : i ≡ j) → p ≡ q)
where
open import Data.Product using (Σ-syntax ; _,_ ; proj₁ ; proj₂)
open import Dat... |
{-# OPTIONS --cubical --safe --guardedness #-}
module Cubical.Codata.M where
open import Cubical.Foundations.Prelude
-- TODO move
module Helpers where
module _ {ℓ ℓ'} {A : Type ℓ} {x : A} (P : ∀ y → x ≡ y → Type ℓ') (d : P x refl) where
-- A version with y as an explicit argument can be used to make Agda
--... |
-- Andreas, 2019-04-13, issue #3692, reported by xekoukou
-- Feature #1086, omission of trivially absurd clauses,
-- caused wrong polarity computation.
-- {-# OPTIONS -v tc.polarity:20 #-}
-- {-# OPTIONS -v tc.cover.missing:100 #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Nat
data _≤_ : (m n : Nat... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.Instances.IntMod where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.HLevels
open import Cubical.Data.Empty as ⊥
open import Cubical.Data.Unit
open import Cubical.Data.Bool hiding (isProp≤)
open i... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Functor.Slice {o ℓ e} (C : Category o ℓ e) where
open import Data.Product using (_,_)
open import Categories.Adjoint
open import Categories.Category.CartesianClosed
open import Categories.Category.CartesianClosed.Locally
open impor... |
module Data.Vec.Any.Properties where
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as P using (_≡_; _≢_; inspect; refl)
open import Relation.Unary renaming (_⊆_ to _⋐_) using ()
open import Data.Product as Prod hiding (map; swap)
open import Data.Vec as Vec
open import Data.Vec.Any as ... |
{-# OPTIONS -v tc.unquote.clause:30 #-}
open import Common.Reflection
open import Common.Prelude
data Box : Set → Set₁ where
box : (A : Set) → Box A
unquoteDecl test = define (vArg test) (funDef
(pi
(vArg (sort (lit 0)))
(abs "A" (pi
(vArg (def (quote Box) (vArg (var 0 []) ∷ [])))
(abs "x" (sort (li... |
-- A generic proof of confluence for a rewriting system with the diamond property.
module Confluence where
open import Prelude
postulate
Tm : Set
_=>_ : Tm -> Tm -> Set
diamond : ∀{M N P : Tm} → (M => N) → (M => P) →
Σ[ Q :: Tm ] (N => Q × P => Q)
data _=>*_ : Tm → Tm → Set where
eval-refl : {e... |
{-# OPTIONS --without-K #-}
-- The core properties behind exploration functions
module Explore.Properties where
open import Level.NP using (_⊔_; ₀; ₁; ₛ; Lift)
open import Type using (★₀; ★₁; ★_)
open import Function.NP using (id; _∘′_; _∘_; flip; const; Π; Cmp)
open import Algebra using (Semigroup; module Semigroup; ... |
module Tactic.Reflection.Telescope where
open import Prelude hiding (abs)
open import Builtin.Reflection
open import Tactic.Reflection.DeBruijn
Telescope = List (Arg Type)
telView : Type → Telescope × Type
telView (pi a (abs _ b)) = first (_∷_ a) (telView b)
telView a = [] , a
visibleArity : Type → ... |
module Common.Char where
postulate
Char : Set
{-# BUILTIN CHAR Char #-}
|
------------------------------------------------------------------------
-- Extra lemmas about substitutions
------------------------------------------------------------------------
module Data.Fin.Substitution.ExtraLemmas where
open import Data.Fin as Fin using (Fin; zero; suc)
open import Data.Fin.Substitution
open... |
open import Relation.Binary.Core
module PLRTree.DropLast.Permutation {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Data.List
open import Data.Sum
open import List.Permutation.Base A
open import List.Permutation.Base.Concatenation A
open import List.Pe... |
module Structs where
open import Data.List
open import Data.String
open import Data.Product hiding (map)
open import Relation.Binary.PropositionalEquality as PE hiding ([_])
open import Data.List.Any hiding (map)
open module M {ℓ}{X : Set ℓ} = Membership (PE.setoid X )
import Level
data StructEnd {ℓ} : Set ℓ where
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.