text stringlengths 4 690k |
|---|
-- Andreas, 2012-03-08
module NoNoTerminationCheck where
{-# NO_TERMINATION_CHECK #-}
f : Set
f = f
-- the pragma should not extend to the following definition
g : Set
g = g
-- error: non-termination
|
-- {-# OPTIONS -v tc.meta:30 #-}
{-# OPTIONS --show-implicit --show-irrelevant #-}
module Issue629a where
record ∃ {A : Set} (B : A → Set) : Set where
constructor _,_
field
proj₁ : A
proj₂ : B proj₁
uncurry : {A : Set} {B : A → Set} {C : ∃ B → Set} →
((x : A) (y : B x) → C (x , y)) →
(... |
module Fin where
import Nat
import Bool
open Nat hiding (_==_; _<_)
open Bool
data FZero : Set where
data FSuc (A : Set) : Set where
fz : FSuc A
fs : A -> FSuc A
mutual
Fin' : Nat -> Set
Fin' zero = FZero
Fin' (suc n) = FSuc (Fin n)
data Fin (n : Nat) : Set where
fin : Fin' n -> Fin n
fzero ... |
{-
Definition of the Klein bottle as a HIT
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.KleinBottle.Base where
open import Cubical.Core.Everything
data KleinBottle : Type where
point : KleinBottle
line1 : point ≡ point
line2 : point ≡ point
square : PathP (λ i → line1 (~ i) ≡ li... |
{- 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
-}
-- LBFT monad used by implementation,
-- and functions to facilitate re... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.EilenbergMacLane
open import homotopy.EilenbergMacLane1
open import homotopy.SmashFmapConn
open import homotopy.IterSuspSmash
open import homotopy.EilenbergMacLaneFunctor
open import cohomology.CupProduct.OnEM.InLowDegrees
open import cohomo... |
-- Σ type (also used as existential) and
-- cartesian product (also used as conjunction).
{-# OPTIONS --safe #-}
import Tools.PropositionalEquality as PE
module Tools.Product where
infixr 4 _,_
infixr 2 _×_
-- Dependent pair type (aka dependent sum, Σ type).
record Σ (A : Set) (B : A → Set) : Set where
construc... |
{-# OPTIONS --without-K #-}
module 3to2 where
open import Type using (★; ★₁)
open import Function.NP using (id; const; _∘_; Π)
open import Data.Nat.NP
open import Data.Bool.NP renaming (Bool to 𝟚; true to 1b; false to 0b; toℕ to 𝟚▹ℕ)
open import Data.Product
open import Data.Maybe.NP
open import Relation.Binary.Prop... |
open import Relation.Binary.Core
module BBHeap.Insert.Properties {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_)
(trans≤ : Transitive _≤_) where
open import BBHeap _≤_
open import BBHeap.Insert _≤_ tot≤ trans≤
open import BBHeap.Subtyping.Properties _≤_ trans≤
o... |
{-# OPTIONS --without-K #-}
module NTypes.Empty where
open import NTypes
open import Types
0-isSet : isSet ⊥
0-isSet x = 0-elim x
|
module Lang.Instance where
import Lvl
open import Type
private variable ℓ : Lvl.Level
private variable T X Y Z : Type{ℓ}
-- Infers/resolves/(searches for) an instance/proof of the specified type/statement
resolve : (T : Type{ℓ}) → ⦃ _ : T ⦄ → T
resolve (_) ⦃ x ⦄ = x
-- Infers/resolves/(searches for) an instan... |
{-# OPTIONS --sized-types --guardedness --cubical #-}
-- Note: This module is not meant to be imported.
module All where
-- import All
import Automaton.Deterministic.Accessible
import Automaton.Deterministic.Finite
-- import Automaton.Deterministic.FormalLanguage
import Automaton.Deterministic.Oper
import Automaton.D... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- String Literals
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.String.Literals where
open import Agda.Builtin.FromString
open import Dat... |
module Logic.Predicate.Equiv where
import Lvl
open import Logic
open import Logic.Predicate
open import Structure.Setoid
open import Structure.Relator.Equivalence
open import Structure.Relator.Properties
open import Type
private variable ℓ ℓₑ : Lvl.Level
private variable Obj : Type{ℓ}
private variable Pred : Obj... |
-- Andreas, 2016-01-08 allow --type-in-type with universe polymorphism
{-# OPTIONS --type-in-type #-}
-- {-# OPTIONS --v tc:30 #-}
-- {-# OPTIONS --v tc.conv.level:60 #-}
open import Common.Level
open import Common.Equality
Type : Set
Type = Set
data E α β : Set β where
e : Set α → E α β
data D {α} (A : Set α) ... |
-- Andreas, 2014-02-17, reported by pumpkingod
{-# OPTIONS --allow-unsolved-metas #-}
data Bool : Set where true false : Bool
-- Equality
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 → Se... |
{-# OPTIONS --no-auto-inline #-}
-- Basic things needed by other primitive modules.
module Haskell.Prim where
open import Agda.Primitive
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit public
open import Agda.Builtin.List
open import Agda.Builtin.String
open import Agda... |
------------------------------------------------------------------------
-- A labelled transition system for the delay monad
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Prelude
module Labelled-transition-system.Delay-monad {a} (A : Type a) where
... |
--------------------------------------------------------------------------------
-- This file contains functions to turn the tree of parse results into the agda
-- data structures they represent.
--------------------------------------------------------------------------------
{-# OPTIONS --type-in-type #-}
module Par... |
{-
Basic properties about Σ-types
- Action of Σ on functions ([map-fst], [map-snd])
- Characterization of equality in Σ-types using dependent paths ([ΣPath{Iso,≃,≡}PathΣ], [Σ≡Prop])
- Proof that discrete types are closed under Σ ([discreteΣ])
- Commutativity and associativity ([Σ-swap-*, Σ-assoc-*])
- Distributivity ... |
{-# OPTIONS --cubical --no-import-sorts --guardedness --safe #-}
module Cubical.Codata.M.AsLimit.Container where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv using (_≃_)
open import Cubical.Foundations.Function using (_∘_)
open import Cubical.Data.Unit
open import Cubical.Data.Prod
o... |
module Issue1078.A where
open import Common.Level using (Level)
|
-- This module contains various line-ending characters in order
-- to test that they don't affect module source hash calculation.
module C where
-- CR --
--
-- LF --
--
-- CRLF --
--
-- LFCR --
--
-- FF ----
-- NEXT LINE --
--
-- LINE SEPARATOR --
--
-- PARAGRAPH SEPARATOR --
--
|
open import Oscar.Prelude
open import Oscar.Class
open import Oscar.Class.Unit
module Oscar.Class.SimilaritySingleton where
module SimilaritySingleton
{𝔞} {𝔄 : Ø 𝔞}
{𝔟} {𝔅 : Ø 𝔟}
{𝔣} {𝔉 : Ø 𝔣}
{𝔞̇ 𝔟̇}
(∼₁ : Ø 𝔞̇)
(_∼₂_ : 𝔅 → 𝔅 → Ø 𝔟̇) (let _∼₂_ = _∼₂_; infix 4 _∼₂_)
(_◃_ : 𝔉 → 𝔄 → 𝔅) ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
import homotopy.RelativelyConstantToSetExtendsViaSurjection as SurjExt
module homotopy.VanKampen {i j k l}
(span : Span {i} {j} {k})
{D : Type l} (h : D → Span.C span) (h-is-surj : is-surj h) where
open Span span
open import homotopy.vankampen.CodeAP s... |
module evenodd where
mutual
data Even : Set where
Z : Even
S : Odd -> Even
data Odd : Set where
S' : Even -> Odd
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Predicate lifting for refinement types
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Refinement.Relation.Unary.All where
open import Le... |
{- 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 Ag11 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 Ag09 using (_≃_; extensionality)
open import Relation.Nu... |
-- Andreas, Jesper, 2015-07-02 Error in copyScope
{-# OPTIONS -v tc.decl:5 #-} -- KEEP, this forced Agda to look at A.Decls and loop
-- To trigger the bug, it is important that
-- the main module is in a subdirectory of the imported module.
module Issue1597.Main2 where
open import Issue1597 -- external import is n... |
------------------------------------------------------------------------
-- Aczel's structure identity principle (for 1-categories), more or
-- less as found in "Homotopy Type Theory: Univalent Foundations of
-- Mathematics" (first edition)
------------------------------------------------------------------------
{-# O... |
module container.m.core where
open import level
open import sum
open import equality.core
open import equality.calculus
open import function.core
open import function.isomorphism
open import function.extensionality
open import container.core
open import container.equality
open import container.fixpoint
infix 1000 ♯_
... |
{-# OPTIONS --without-K --safe #-}
open import Level
record Category (o ℓ e : Level) : Set (suc (o ⊔ ℓ ⊔ e)) where
eta-equality
infix 4 _≈_ _⇒_
infixr 9 _∘_
field
Obj : Set o
_⇒_ : Obj → Obj → Set ℓ
_≈_ : ∀ {A B} → (A ⇒ B) → (A ⇒ B) → Set e
_∘_ : ∀ {A B C} → (B ⇒ C) → (A ⇒ B) → (A ⇒ C)
C... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Containers, based on the work of Abbott and others
------------------------------------------------------------------------
module Data.Container where
open import Data.M
open import Data.Product as Prod hiding... |
{-# OPTIONS --prop --rewriting #-}
module index where
-- Calf language implementation:
import Calf
-- Case studies:
import Examples
|
{-# OPTIONS --allow-unsolved-metas #-}
module AgdaFeatureNoInstanceFromHidden where
postulate
A : Set
R : A → A → Set
Alrighty : A → Set₁
Alrighty l = ∀ {r} → R l r → Set
record Foo (Q : A → Set₁) : Set₁ where field foo : ∀ {x y} → R x y → Q x → Q y
open Foo {{...}}
postulate
instance theInstance : Foo Alri... |
module Issue157 where
X : Set
X = _
error : Set
error = Set
|
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Implementation.Relation.Boolean where
open import Light.Library.Data.Boolean as Boolean using (Boolean)
open import Light.Package using (Package)
open import Light.Level using (_⊔_ ; Lifted)
open import Light.Variable.Levels
... |
------------------------------------------------------------------------
-- The syntax of, and a type system for, an untyped λ-calculus with
-- booleans and recursive unary function calls
------------------------------------------------------------------------
open import Prelude
module Lambda.Syntax (Name : Type) wh... |
open import Relation.Binary.Core
module Mergesort.Impl2 {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Bound.Lower A
open import Bound.Lower.Order _≤_
open import Data.List
open import Data.Sum
open import Function
open import LRTree {A}
open import OList _≤_ ... |
{-# OPTIONS --without-K #-}
module Hmm where
-- using the HoTT-Agda library leads to highlighting error (missing metadata)
-- open import lib.Base
-- open import lib.types.Nat
-- using this library does not, yet the code is copied/pasted from HoTT-Agda
open import Base
S= : {m n : ℕ} → m == n → S m == S... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category.Core
open import Categories.Category.Monoidal.Core
-- This module defines the category of monoids internal to a given monoidal
-- category.
module Categories.Category.Construction.Monoids {o ℓ e} {𝒞 : Category o ℓ e} (C : Monoidal 𝒞) where
open imp... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Homogeneously-indexed binary relations
------------------------------------------------------------------------
-- The contents of this module should be accessed via
-- `Relation.Binary.Indexed.Homogeneous`.
{-... |
{-# OPTIONS --rewriting #-}
module Luau.ResolveOverloads where
open import FFI.Data.Either using (Left; Right)
open import Luau.Subtyping using (_<:_; _≮:_; Language; witness; scalar; unknown; never; function-ok)
open import Luau.Type using (Type ; _⇒_; _∩_; _∪_; unknown; never)
open import Luau.TypeSaturation using ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Sum combinators for propositional equality preserving functions
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Sum.Function.Propositional... |
module product where
open import level
open import unit public
----------------------------------------------------------------------
-- types
----------------------------------------------------------------------
data Σ {ℓ ℓ'} (A : Set ℓ) (B : A → Set ℓ') : Set (ℓ ⊔ ℓ') where
_,_ : (a : A) → (b : B a) → Σ A B
da... |
open import Common.Nat
open import Common.IO
open import Common.Unit
record Test : Set where
field
a b c : Nat
f : Test -> Nat
f r = a + b + c
where open Test r
open Test
g : Nat
g = (f (record {a = 100; b = 120; c = 140})) + a m + b m + c m
where m = record {c = 400; a = 200; b = 300}
main : IO Unit
ma... |
{-# OPTIONS --without-K #-}
open import M-types.Base
module M-types.Coalg.Bisim (A : Ty ℓ) (B : A → Ty ℓ) where
open import M-types.Coalg.Core A B
TyBisim : Coalg → Ty (ℓ-suc ℓ)
TyBisim X =
∑[ coalg ∈ Coalg ]
CoalgMor coalg X × CoalgMor coalg X
coalg = pr₀
spanRel : {X : Coal... |
module STypeCongruence where
open import Data.Fin
open import DualCoinductive
open import Direction
open COI
-- holes for session types
mutual
data TypeH : Set where
TPair-l : TypeH → (T₂ : Type) → TypeH
TPair-r : (T₁ : Type) → TypeH → TypeH
TChan : (sh : STypeH) → TypeH
data STypeH : Set... |
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --termination-depth=2 #-}
module _ where
open import Common.Prelude
module A where
mutual
f : Nat → Nat
f zero = zero
f (suc zero) = suc zero
f (suc (suc x)) = g x
g : Nat → Nat
g x = f (suc ?)
-- This should not fail termination che... |
module Type.Properties.Singleton {ℓ ℓₑ} where
import Lvl
open import Lang.Instance
open import Structure.Setoid
open import Type
-- A type is a singleton type when it has exactly one inhabitant (there is only one object with this type).
-- In other words: There is an unique inhabitant of type T.
-- Also called:
... |
{-# OPTIONS --guarded #-}
module _ where
primitive
primLockUniv : _
postulate
A B : primLockUniv
c : A → B
foo : (@tick x y : B) → Set
bar2 : (@tick x : A) → Set
bar2 x = foo (c x) (c x)
|
------------------------------------------------------------------------
-- Equivalence of the two variants of declarative kinding of Fω with
-- interval kinds
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module FOmegaInt.Kinding.Declarative.Equivalence w... |
------------------------------------------------------------------------
-- Lists of identifiers
------------------------------------------------------------------------
-- This example is based on one in Swierstra and Chitil's "Linear,
-- bounded, functional pretty-printing".
{-# OPTIONS --guardedness #-}
module Ex... |
{-
Comments of the following form are parsed automatically by [extract.py] in order
to convert them to LaTeX and include them in the pdf.
{-<nameofbloc>-}
code
code
code
{-</>-}
-}
{-# OPTIONS --without-K --rewriting #-}
open import PathInduction
open import Pushout
module JamesTwoMaps {i} (A : Type i) (⋆A : A) wh... |
module Numeric.Nat.LCM where
open import Prelude
open import Numeric.Nat.Divide
open import Numeric.Nat.Divide.Properties
open import Numeric.Nat.GCD
open import Numeric.Nat.GCD.Extended
open import Numeric.Nat.GCD.Properties
open import Numeric.Nat.Properties
open import Tactic.Nat
--- Least common multiple ---
re... |
module Vector where
infixr 10 _∷_
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
{-# BUILTIN NATURAL ℕ #-}
{-# BUILTIN ZERO zero #-}
{-# BUILTIN SUC suc #-}
infixl 6 _+_
_+_ : ℕ → ℕ → ℕ
0 + n = n
suc m + n = suc (m + n)
data Vec (A : Set) : ℕ → Set where
[] : Vec A 0
_∷_ : ∀ {n} → A → Vec A n → Vec ... |
module Data.Vec.Exts where
open import Data.Fin
open import Data.Maybe
open import Data.Nat
open import Data.Vec using (Vec; []; _∷_)
open import Relation.Nullary
open import Relation.Unary
open import Data.Vec.Relation.Unary.Any
findIndex : {n : ℕ} {A : Set} {P : A -> Set} -> Decidable P -> Vec A n -> Maybe (Fin n)
... |
module Ag10 where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl)
open Eq.≡-Reasoning
open import Data.Nat using (ℕ)
open import Function using (_∘_)
open import Ag09 using (_≃_; _≲_; extensionality; _⇔_)
open Ag09.≃-Reasoning
open import Data.Product using (_×_; proj₁; proj₂) renaming (_,... |
module Issue846.Imports where
open import Data.Nat public using (ℕ; zero; suc; _≤_; _∸_)
open import Data.List public using (List; []; _∷_)
open import Data.Bool public using (Bool; true; false; not)
open import Data.Nat.DivMod public using (_mod_)
open import Data.Fin public using (Fin; toℕ; zero; suc)
open import Re... |
------------------------------------------------------------------------------
-- FOTC terms properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPT... |
-- {-# OPTIONS -v interaction.case:20 -v tc.cover:20 #-}
-- Andreas, 2015-05-29, issue reported by Stevan Andjelkovic
record Cont : Set₁ where
constructor _◃_
field
Sh : Set
Pos : Sh → Set
open Cont
data W (C : Cont) : Set where
sup : (s : Sh C) (k : Pos C s → W C) → W C
-- If I case split on w:
bogu... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Limits.Pullback where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.PropositionalTruncation.Base
open import Cubical.Data.Sigma
open import Cubical.Data.Unit
open import Cubical.Categories.Category
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.ImplShared.Base.Types
open import LibraBFT.Abstra... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax PDiff | PD
type
* : 0-ary
term
zero : * | 𝟘
add : * * -> * | _⊕_ l20
one : * | 𝟙
mult : * * -> * | _⊗_ l20
neg : * -> * | ⊖_ r50
pd : *.* * -> * | ∂_∣_
theory
(𝟘U⊕ᴸ) a ... |
{-# OPTIONS --safe #-}
module Definition.Typed.Reduction where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Properties
-- Weak head expansion of type equality
reduction : ∀ {A A′ B B′ r Γ}
→ Γ ⊢ A ⇒* A′ ^ r
→ Γ ⊢ B ⇒* B′ ^ r
→ Whnf A′
... |
open import Prelude
open import Data.Nat using (_≤?_)
open import Data.Maybe using (Maybe; just; nothing; is-just)
open import Reflection using (_≟-Lit_; _≟-Name_)
open import RW.Language.RTerm
open import RW.Utils.Monads
module RW.Language.RTermUtils where
open Monad {{...}}
-- The complexity annotations mig... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some defined operations (multiplication by natural number and
-- exponentiation)
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
... |
{-# OPTIONS --rewriting #-}
data _==_ {A : Set} (a : A) : A → Set where
idp : a == a
{-# BUILTIN REWRITE _==_ #-}
ap : {A B : Set} (f : A → B) {x y : A}
→ x == y → f x == f y
ap f idp = idp
postulate
Circle : Set
base : Circle
loop : base == base
module _ (A : Set) (base* : A) (loop* : base* == base*) whe... |
{-# OPTIONS --type-in-type --no-pattern-matching #-}
open import Spire.IDarkwingDuck.Primitive
module Spire.IDarkwingDuck.Derived where
----------------------------------------------------------------------
ISet : Set → Set
ISet I = I → Set
Enum : Set
Enum = List String
Tag : Enum → Set
Tag xs = PointsTo String xs
... |
module Relator.Equals.Proofs where
import Lvl
open import Functional as Fn using (_→ᶠ_ ; _∘_)
open import Logic
open import Logic.Propositional
open import Logic.Propositional.Theorems
open import Logic.Propositional.Proofs.Structures
open import Relator.Equals
open import Relator.Equals.Proofs.Equiv public
open ... |
module T where
open import Prelude
module GÖDEL-T where
-- Core syntax
infixr 30 _⇒_
infixl 30 _$_
data TTp : Set where
nat : TTp
_⇒_ : (A B : TTp) → TTp
Ctx = List TTp
data TExp (Γ : Ctx) : TTp → Set where
var : ∀{A} (x : A ∈ Γ) → TExp Γ A
Λ : ∀{A B} (e : TExp (A :: Γ) B) → TExp Γ (A ⇒... |
module Categories.Preorder where
|
------------------------------------------------------------------------------
-- Totality properties respect to OrdList (flatten-OrdList-helper)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTI... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Rationals.SigmaQ.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.Ints.QuoInt
open import Cubical.Data.Nat as ℕ hiding (_·_)
open import Cubical.Data.NatPlusOne
open import Cubica... |
-- Equality of terms
module Syntax.Equality where
open import Syntax.Types
open import Syntax.Context
open import Syntax.Terms
open import Syntax.Substitution.Kits
open import Syntax.Substitution.Instances
open import Syntax.Substitution.Lemmas
open Kit 𝒯erm
-- Shorthands for de Bruijn indices
x₁ : ∀{Γ A} -> Γ , A... |
module All where
open import Basics
open import Ix
All : {X : Set} -> (X -> Set) -> (List X -> Set)
All P [] = One
All P (x ,- xs) = P x * All P xs
allPu : forall {X}{T : X -> Set} -> [ T ] -> [ All T ]
allPu t [] = <>
allPu t (x ,- xs) = t x , allPu t xs
allAp : forall {X}{S T : X -> Set} -> [ All (S -:> T)... |
-- {-# OPTIONS --without-K #-}
module Evaluator where
open import Agda.Prim
open import Data.Unit
open import Data.Nat hiding (_⊔_)
open import Data.Sum
open import Data.Product
open import Function
open import Relation.Binary.PropositionalEquality
open import Paths
------------------------------------------------... |
open import Prelude
open import core
open import contexts
module synth-unicity where
-- synthesis only produces equal types. note that there is no need for an
-- analagous theorem for analytic positions because we think of
-- the type as an input
synthunicity : {Γ : tctx} {e : hexp} {t t' : htyp} →
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.MappingCones where
open import Cubical.HITs.MappingCones.Base public
open import Cubical.HITs.MappingCones.Properties public
|
module Web.Semantic.DL.Signature where
infixr 4 _,_
data Signature : Set₁ where
_,_ : (CN RN : Set) → Signature
CN : Signature → Set
CN (CN , RN) = CN
RN : Signature → Set
RN (CN , RN) = RN
|
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.Exactness
open import cohomology.FunctionOver
open import cohomology.ProductRepr
open import cohomology.Theory
open import cohomology.WedgeCofiber
{- For the cohomology group of a suspension ΣX, the group inverse has the
- explicit form Cⁿ(flip-susp... |
open import Agda.Builtin.Nat
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
open import Agda.Builtin.Sigma
open import Agda.Builtin.Equality
pattern vArg x = arg (arg-info visible relevant) x
pattern hArg x = arg (arg-info hidden relevant) x
idClause-ok : Clause
idClause-ok = clause
... |
module L.Base.Empty.Properties where
-- There are no properties yet.
|
------------------------------------------------------------------------------
-- Reasoning about a function without a termination proof
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-... |
{-# OPTIONS --without-K --safe #-}
module Categories.Bicategory where
open import Level
open import Data.Product using (Σ; _,_)
open import Relation.Binary using (Rel)
open import Categories.Category
open import Categories.Category.Monoidal.Instance.Cats using (module Product)
open import Categories.Category.Instanc... |
{-# OPTIONS --cubical #-}
module Agda.Builtin.Cubical.Id where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
postulate
Id : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ
{-# BUILTIN ID Id #-}
{-# BUILTIN CONID conid #-}
primitive
primDepIMin : _
primI... |
module FixityOutOfScopeInRecord where
record R : Set where
infixl 30 _+_
-- Should complain that _+_ is not in scope
-- in its fixity declaration.
|
------------------------------------------------------------------------------
-- Non-intuitionistic logic theorems
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism... |
module GGT.Group.Definitions
{a ℓ}
where
open import Relation.Unary using (Pred)
open import Algebra.Bundles using (Group)
open import Level
IsOpInvClosed : {l : Level} → (G : Group a ℓ) → (Pred (Group.Carrier G) l) → Set (a ⊔ l)
IsOpInvClosed G P = ∀ {x y : Carrier} → P x → P y → P (x - y) where open Group G
|
{-# OPTIONS --prop --rewriting --confluence-check #-}
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
{-# BUILTIN REWRITE _≡_ #-}
data _≐_ {ℓ} {A : Set ℓ} (x : A) : A → Prop ℓ where
refl : x ≐ x
postulate
subst : ∀ {ℓ ℓ′} {A : Set ℓ} (P : A → Set ℓ′)
→ (x y : A) → x ≐ y → P x → P y
subs... |
------------------------------------------------------------------------
-- Polymorphic and iso-recursive lambda terms
------------------------------------------------------------------------
module SystemF.Term where
open import Data.Fin using (Fin; zero; suc; inject+)
open import Data.Fin.Substitution
open import D... |
module Codata where
codata D : Set where
|
-- 2010-10-15
module DoNotEtaExpandMVarsWhenComparingAgainstRecord where
open import Common.Irrelevance
data _==_ {A : Set1}(a : A) : A -> Set where
refl : a == a
record IR : Set1 where
constructor mkIR
field
.fromIR : Set
open IR
reflIR2 : (r : IR) -> _ == mkIR (fromIR r)
reflIR2 r = refl {a = _}
-- th... |
-----------------------------------------------------------------------
-- This file defines Degenerate Dial₂(Sets) and shows that it is a --
-- CCC. --
-----------------------------------------------------------------------
module DeDial2Sets where
open i... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Functor.Hom.Properties.Contra {o ℓ e} (C : Category o ℓ e) where
private
module C = Category C
open import Level
open import Function.Equality renaming (id to idFun)
open import Categories.Category.Instance.Setoids
open import C... |
open import Type
module Graph.Walk.Functions.Proofs {ℓ₁ ℓ₂} {V : Type{ℓ₁}} where
import Data.Either as Either
open import Data.Either.Proofs
open import Logic.Propositional
import Lvl
open import Graph{ℓ₁}{ℓ₂}(V)
open import Graph.Properties
open import Graph.Walk{ℓ₁}{ℓ₂}{V}
open import Graph.Walk.Propertie... |
module BadTermination where
data N : Set where
zero : N
suc : N -> N
postulate inf : N
data D : N -> Set where
d₁ : D (suc inf)
d₂ : D inf
f : (n : N) -> D n -> N
f .inf d₂ = zero
f .(suc inf) d₁ = f inf d₂
|
{-# OPTIONS --cumulativity #-}
postulate
F : (X : Set) → X → Set
X : Set₁
a : X
shouldfail : F _ a
|
{-# OPTIONS --without-K #-}
open import M-types.Base
module M-types.Coalg.Core (A : Ty ℓ) (B : A → Ty ℓ) where
P : Ty ℓ → Ty ℓ
P X = ∑[ a ∈ A ] (B a → X)
P-Fun : {X Y : Ty ℓ} →
(X → Y) → (P X → P Y)
P-Fun f = λ (a , d) → (a , f ∘ d)
P-SpanRel : {X : Ty ℓ} →
SpanRel X → SpanRel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.