text stringlengths 4 690k |
|---|
-- Andreas, 2012-10-02
-- {-# OPTIONS -v tc.conv.level:100 -v tc.constr.add:40 -v tc.meta:50 -v tc.inj.use:30 -v 80 #-}
module Issue689 where
open import Common.Level
data Bad : Set₁ where
c : Set₁ → Bad
-- this should not leave unsolvable constraints, but report an error
|
------------------------------------------------------------------------
-- The sequential colimit HIT with an erased higher constructor
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
-- The definition of sequential colimits and the statement of the
--... |
module _ where
record Pair (A B : Set) : Set where
field
π₁ : A
π₂ : B
open Pair
foo : {A B : Set} → Pair A B → Pair A B
foo = λ { x → {!x!} }
{- Case splitting on x produces:
foo = λ { record { π₁ = π₃ ; π₂ = π₃ } → ? }
Repeated variables in pattern: π₃
-}
|
open import Prelude hiding (id; Bool)
module Implicits.Resolution.Undecidable.Expressiveness where
open import Implicits.Syntax
open import Implicits.Substitutions
open import Extensions.ListFirst
open import Implicits.Resolution.Ambiguous.Resolution as A
open import Implicits.Resolution.Deterministic.Resolution as ... |
{-# OPTIONS --cubical --safe #-}
module Hyper where
open import Prelude hiding (⊥)
open import Data.Empty.UniversePolymorphic
open import Data.List using (List; _∷_; [])
open import Data.Vec.Iterated
open import Data.Nat using (_*_; _+_)
open import Data.Nat.Properties using (Even; Odd)
private
variable n m : ℕ
... |
open import Agda.Builtin.Char
open import Agda.Builtin.List
open import Agda.Builtin.Equality
open import Agda.Builtin.String
open import Agda.Builtin.String.Properties
data ⊥ : Set where
∷⁻¹ : ∀ {A : Set} {x y : A} {xs ys} → x ∷ xs ≡ y ∷ ys → x ≡ y
∷⁻¹ refl = refl
xD800 = primNatToChar 0xD800
xD801 = primNatToChar... |
module CTL.Modalities.AN where
open import FStream.Core
open import Library
-- Always (in) Next : p ⊧ φ ⇔ p[1] ⊧ φ
AN' : ∀ {ℓ₁ ℓ₂} {C : Container ℓ₁}
→ FStream' C (Set ℓ₂) → Set (ℓ₁ ⊔ ℓ₂)
AN' props = APred head (inF (tail props))
AN : ∀ {ℓ₁ ℓ₂} {C : Container ℓ₁}
→ FStream C (Set ℓ₂) → Set (ℓ₁ ⊔ ℓ₂)
AN props ... |
{-# OPTIONS --without-K --exact-split --safe #-}
module Fragment.Algebra.Signature where
open import Data.Nat using (ℕ)
record Signature : Set₁ where
field
ops : ℕ → Set
open Signature public
data ExtendedOp (Σ : Signature) (O : ℕ → Set) : ℕ → Set where
newₒ : ∀ {n} → O n → ExtendedOp Σ O n
oldₒ : ∀ {n} ... |
-- Andreas, 2017-08-10, issue #2664, reported by csetzer
-- Test case by Ulf
-- {-# OPTIONS -v tc.rec:40 #-}
-- {-# OPTIONS -v tc.cc:60 #-}
open import Agda.Builtin.IO
open import Agda.Builtin.String
open import Agda.Builtin.Unit
open import Agda.Builtin.Nat
mutual
-- Error WAS:
-- The presence of mutual affecte... |
module OList {A : Set}(_≤_ : A → A → Set) where
open import Data.List
open import Bound.Lower A
open import Bound.Lower.Order _≤_
data OList : Bound → Set where
onil : {b : Bound}
→ OList b
:< : {b : Bound}{x : A}
→ LeB b (val x)
→ OList (val x)
... |
------------------------------------------------------------------------
-- Formalisation of subtyping for recursive types
--
-- Nils Anders Danielsson
------------------------------------------------------------------------
-- This formalisation is explained in "Subtyping, Declaratively—An
-- Exercise in Mixed Induct... |
{-# OPTIONS --prop --rewriting #-}
module Examples.Sorting.Parallel.Comparable where
open import Calf.CostMonoid
open import Calf.CostMonoids
parCostMonoid = ℕ²-ParCostMonoid
costMonoid = ParCostMonoid.costMonoid parCostMonoid
open import Data.Nat using (ℕ)
open ParCostMonoid parCostMonoid using (ℂ)
open import Dat... |
module Highlighting where
Set-one : Set₂
Set-one = Set₁
record R (A : Set) : Set-one where
constructor con
field X : Set
F : Set → Set → Set
F A B = B
field P : F A X → Set
-- highlighting of non-terminating definition
Q : F A X → Set
Q = Q
postulate P : _
open import Highlighting.M using (ℕ) re... |
------------------------------------------------------------------------
-- This module proves that the recognisers correspond exactly to
-- decidable predicates of type List Bool → Bool (when the alphabet is
-- Bool)
------------------------------------------------------------------------
-- This result could be gene... |
-- {-# OPTIONS --show-implicit #-}
module Issue89 where
open import Common.Coinduction renaming (∞ to ∞_)
------------------------------------------------------------------------
-- Streams
infixr 5 _≺_
data Stream A : Set where
_≺_ : (x : A) (xs : ∞ (Stream A)) -> Stream A
head : forall {A} -> Stream A -> A
he... |
import Relation.Binary.Reasoning.Setoid as SetoidR
open import MultiSorted.AlgebraicTheory
import MultiSorted.Interpretation as Interpretation
import MultiSorted.Model as Model
import MultiSorted.UniversalInterpretation as UniversalInterpretation
import MultiSorted.Substitution as Substitution
import MultiSorted.Synta... |
module InstanceArgumentsModNotParameterised where
postulate A : Set
a : A
record B : Set where
field bA : A
b : B
b = record {bA = a}
module C = B b
open C {{...}}
|
{-# OPTIONS --without-K #-}
open import Types
module Functions where
-- Identity functions
id : ∀ {i} (A : Set i) → (A → A)
id A = λ x → x
-- Constant functions
cst : ∀ {i j} {A : Set i} {B : Set j} (b : B) → (A → B)
cst b = λ _ → b
-- Composition of dependent functions
_◯_ : ∀ {i j k} {A : Set i} {B : A → Set j} ... |
module Peano where
open import IPL
data ℕ : Set where
zero : ℕ -- Axiom 2.1. 0 is a natural number
_++ : ℕ → ℕ -- Axiom 2.2. If n is a natural number, then n++ is also a natural number
data _≡_ : ℕ → ℕ → Set where
refl : {a : ℕ} → a ≡ a
axiom23 : {n : ℕ} → ¬ (zero ≡ (n ++))
axiom23 = λ ()
ax... |
{-# OPTIONS --without-K #-}
open import Type
open import Data.Bits using (Bits)
open import Data.Bit using (Bit)
open import Data.Zero using (𝟘)
open import Data.Fin using (Fin)
open import Data.Maybe using (Maybe)
open import Data.Nat using (ℕ)
open import Data.Product using (Σ; _×_)
open import Da... |
{-# OPTIONS --no-termination-check #-}
module Pi-abstract-machine where
open import Data.Empty
open import Data.Unit
open import Data.Sum hiding (map)
open import Data.Product hiding (map)
infixr 30 _⟷_
infixr 30 _⟺_
infixr 20 _◎_
------------------------------------------------------------------------------
-- A u... |
------------------------------------------------------------------------------
-- Well-founded induction on the lexicographic order on natural numbers
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-#... |
{-# OPTIONS --without-K #-}
module Circuits where
open import PiLevel0
using (U; ZERO; ONE; PLUS; TIMES; BOOL; BOOL²;
_⟷_;
unite₊; uniti₊; swap₊; assocl₊; assocr₊;
unite⋆; uniti⋆; swap⋆; assocl⋆; assocr⋆;
absorbr; absorbl; factorzr; factorzl; dist; factor;
id⟷; _◎_; _⊕_; _⊗_... |
{-# OPTIONS --without-K --safe #-}
module Fragment.Examples.CSemigroup.Arith.Functions where
open import Fragment.Examples.CSemigroup.Arith.Base
-- Fully dynamic associativity
+-dyn-assoc₁ : ∀ {f : ℕ → ℕ} {m n o} → (f m + n) + o ≡ f m + (n + o)
+-dyn-assoc₁ = fragment CSemigroupFrex +-csemigroup
+-dyn-assoc₂ : ∀ {... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax QIO
type
T : 0-ary
P : 0-ary
term
new : P.T -> T
measure : P T T -> T
applyX : P P.T -> T
applyI2 : P P.T -> T
applyDuv : P P (P,P).T -> T
applyDu : P P.T -> T
... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
import homotopy.ConstantToSetExtendsToProp as ConstExt
module homotopy.RelativelyConstantToSetExtendsViaSurjection
{i j k} {A : Type i} {B : Type j} {C : B → Type k}
(C-is-set : ∀ b → is-set (C b))
(f : A → B) (f-is-surj : is-surj f)
(g : (a : A) → C (f... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Ints.IsoInt where
open import Cubical.HITs.Ints.IsoInt.Base public
|
------------------------------------------------------------------------------
-- Testing an alternative definition of subtraction
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univer... |
module Issue2579.Import where
record Wrap A : Set where
constructor wrap
field wrapped : A
|
{-# OPTIONS --show-implicit #-}
module PragmasRespected where
postulate
Foo : {A : Set₁} → Set
Bar : Foo {A = Set}
-- Andreas, 2014-10-20, AIM XX:
-- This test used to check that the --show-implicit option
-- is turned on even if the module is just reloaded from
-- an interface file.
-- However, as we now always... |
------------------------------------------------------------------------------
-- Totality of Boolean conjunction
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #... |
{-# OPTIONS --without-K --exact-split #-}
module 16-sets where
import 15-groups
open 15-groups public
{- Equivalence relations -}
Rel-Prop :
(l : Level) {l1 : Level} (A : UU l1) → UU ((lsuc l) ⊔ l1)
Rel-Prop l A = A → (A → UU-Prop l)
type-Rel-Prop :
{l1 l2 : Level} {A : UU l1} (R : Rel-Prop l2 A) → A → A → UU ... |
{-# OPTIONS --universe-polymorphism #-}
module Issue311 where
open import Common.Level
postulate
A : Set
C : (b : Level) (B : A → Set b) → Set b
f : (b : Level) (B : A → Set b) → C b B → A
g : (b : Level) (B : A → Set b) (d : C b B) → B (f b B d)
P : (c : Level) → Set c
Q : A → Set
checkQ : ∀ a → Q a →... |
{-# OPTIONS --safe #-}
{-
This uses ideas from Floris van Doorn's phd thesis and the code in
https://github.com/cmu-phil/Spectral/blob/master/spectrum/basic.hlean
-}
module Cubical.Homotopy.Spectrum where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Unit.Pointed
open import Cubical.Foundations.... |
------------------------------------------------------------------------
-- Example: Left recursive expression grammar
------------------------------------------------------------------------
module TotalParserCombinators.Recogniser.Expression where
open import Codata.Musical.Notation
open import Data.Bool
open impor... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of the binary representation of natural numbers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Bin.Properties where
open impo... |
open import Prelude
open import Nat
open import List
open import Bij
module delta-lemmas (K : Set) {{bij : bij K Nat}} where
-- abbreviations for conversion between K and Nat
key : Nat → K
key = convert-inv {{bij}}
nat : K → Nat
nat = bij.convert bij
-- another bij-related convenience functions
inj-cp... |
module Issue335 where
postulate
A : Set
k : (.A -> Set) -> A
bla = k (\ .(x : A) -> A)
-- syntax for irrelevant typed lambda now exists |
module Data.Nat.Etc where
open import Data.Nat
open import Data.Nat.Properties.Simple
open import Function
open import Relation.Nullary.Negation using (contradiction; contraposition)
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as PropEq
using (_≡_; _≢_; refl; cong; trans; sym)
op... |
-- Concrete definition of contexts over a sort T
module SOAS.Context {T : Set} where
open import SOAS.Common
open import Data.List using (List; []; _∷_; _++_)
-- Context: a list of types
data Ctx : Set where
∅ : Ctx
_∙_ : (α : T) → (Γ : Ctx) → Ctx
infixr 50 _∙_
-- Singleton context
pattern _⌋ τ = τ ∙ ∅
patt... |
-- Andreas, 2017-03-21, issue #2466
-- The unifier should not turn user-written variable patterns into
-- dot patterns.
-- {-# OPTIONS -v reify.implicit:100 -v interaction.case:100 #-}
-- {-# OPTIONS -v tc.lhs.unify:40 #-}
postulate
A B : Set
module Explicit where
data D : A → B → Set where
c : ∀ p {p'} x ... |
module InstanceArgs where
data UnitMonoid : Set where
u : UnitMonoid
p : UnitMonoid → UnitMonoid → UnitMonoid
record Plus (A : Set) : Set where
infixl 6 _+_
field
_+_ : A → A → A
open Plus {{...}}
instance
plus-unitMonoid : Plus UnitMonoid
plus-unitMonoid = record { _+_ = p }
bigValue : UnitMonoid
... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category using (Category)
open import Categories.Category.Monoidal.Core using (Monoidal)
open import Categories.Category.Monoidal.Symmetric using (Symmetric)
module Categories.Category.Monoidal.Star-Autonomous {o ℓ e} {C : Category o ℓ e} (M : Monoidal C) wher... |
------------------------------------------------------------------------
-- Recognisers built on top of the parsers
------------------------------------------------------------------------
-- Note that these recognisers are different from the ones in
-- TotalRecognisers.LeftRecursion: these allow the use of fewer shar... |
{-# OPTIONS --rewriting #-}
--
-- 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 : A
... |
-- Andreas, 2021-08-19, issue #5291 reported by gergoerdi
-- https://stackoverflow.com/q/66816547/477476
open import Agda.Builtin.Char
open import Agda.Builtin.String
works : Char
works = '\SOH'
-- This used to fail as the matcher was committed to finding SOH after SO.
-- (Worked only for prefix-free matching.)
tes... |
{-# OPTIONS --without-K --safe #-}
module Categories.Bicategory.Monad.Properties where
open import Categories.Category
open import Categories.Bicategory.Instance.Cats
open import Categories.NaturalTransformation using (NaturalTransformation)
open import Categories.Functor using (Functor)
import Categories.Bicategory.... |
module vtv where
open import Function.Base
open import Data.Unit.Base
open import Agda.Builtin.Nat
open import Data.Integer
open import Data.Product
open import Agda.Builtin.String
open import Data.List
open import Data.Bool
open import Data.Maybe.Base
using (just)
using (nothing)
open import Agda.Builtin.Coin... |
------------------------------------------------------------------------
-- Pushouts, defined using a HIT
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
-- This module follows the HoTT book rather closely.
-- The module is parametrised by a notion of ... |
open import MJ.Types
import MJ.Classtable.Core as Core
module MJ.Syntax.Program {c}(Ct : Core.Classtable c) where
open import Prelude
open import Data.List
open import MJ.Classtable.Code Ct
open import MJ.Syntax Ct
Prog : Ty c → Set
Prog a = Code × (Body [] a)
|
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Unit.Properties where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat
open import Cubical.Data.Unit.Base
isPropUnit : isProp Unit
isPropUnit _ _ i = tt
isContrUnit :... |
------------------------------------------------------------------------------
-- FOCT terms properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPT... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Properties.Escape {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Weakening
open import Definition.Typed.Propert... |
{-# OPTIONS --safe #-}
module Cubical.HITs.CumulativeHierarchy where
open import Cubical.HITs.CumulativeHierarchy.Base public
hiding (elim; elimProp)
open import Cubical.HITs.CumulativeHierarchy.Properties public
open import Cubical.HITs.CumulativeHierarchy.Constructions public
|
-- Andreas, 2018-06-18, problem surfaced with issue #3136
-- Correct printing of a pattern lambda that has no patterns.
-- {-# OPTIONS -v extendedlambda:50 #-}
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
record R : Set where
no-eta-equality
field w : Bool
f : R
f = λ where
.R.w → λ where
... |
{-# OPTIONS --cubical --allow-unsolved-metas #-}
open import Prelude
open import Relation.Binary
module Data.AVLTree.Mapping {k} {K : Type k} {r₁ r₂} (totalOrder : TotalOrder K r₁ r₂) where
open import Relation.Binary.Construct.Bounded totalOrder
open import Data.Nat using (_+_)
open TotalOrder totalOrder using (_<?... |
open import Base
open import Homotopy.Connected
module Homotopy.Extensions.ProductPushoutToProductToConnected.Magic
{i j} {D E : Set i} (h : E → D) where
{-
k
E ---> F x
| /^
| ≃ /
| / l?
v /
(x : D)
-}
-- The mapping l and the coherence data.
extension : (F ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Functorial where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.Transport
open import Cubical.Foundations.Univalence
open import Cubical.F... |
module Numeral.Natural.Oper.Modulo where
import Lvl
open import Data
open import Data.Boolean.Stmt
open import Logic.Propositional.Theorems
open import Numeral.Natural
open import Numeral.Natural.Oper.Comparisons
open import Relator.Equals
infixl 10100 _mod_
-- Modulo is defined using this.
-- This, unlike (_mod_) i... |
------------------------------------------------------------------------
-- A parametrised coinductive definition that can be used to define
-- various forms of similarity
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Prelude
open import Labelled-t... |
open import Relation.Binary.Core
module BBHeap.Subtyping.Properties {A : Set}
(_≤_ : A → A → Set)
(trans≤ : Transitive _≤_) where
open import BBHeap _≤_
open import BBHeap.Subtyping _≤_ trans≤
open import BBHeap.Properties _≤_
open import Bound.Lower A
open import Bound.Lower.... |
{-# OPTIONS --without-K #-}
-- Finished 6pm Th, March 24! yay!
-- Bit thanks to tzaikin for posting his work online (some of his macros
-- were essential for this proof for me) and to the code we saw in class today.
module EH where
open import Level using (_⊔_)
open import Data.Product using (Σ; _,_)
open import Fu... |
module rename where
open import lib
open import cedille-types
open import ctxt-types
open import is-free
open import syntax-util
renamectxt : Set
renamectxt = stringset × trie string {- the trie maps vars to their renamed versions,
and the stringset stores all those rename... |
------------------------------------------------------------------------------
-- Streams (unbounded lists)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-#... |
module Interpretation where
open import VariableName
open import FunctionName
open import PredicateName
open import Element
open import Elements
open import TruthValue
record Interpretation : Set
where
field
μ⟦_⟧ : VariableName → Element
𝑓⟦_⟧ : FunctionName → Elements → Element
𝑃⟦_⟧ : PredicateName ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Terms used in the reflection machinery
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Reflection.Term where
open import Data.List.Base hiding... |
module Category where
open import Logic.Equivalence
open import Logic.Relations
open Equivalence using () renaming (_==_ to eq)
record Cat : Set2 where
field
Obj : Set1
_─→_ : Obj -> Obj -> Set
id : {A : Obj} -> A ─→ A
_∘_ : {A B C : Obj} -> B ─→ C -> A ─→ B -> A ─→ C
Eq :... |
{-# OPTIONS --cumulativity #-}
open import Agda.Primitive
data Unit : Set where unit : Unit
record Container a : Set (lsuc a) where
constructor _◁_
field
Shape : Set a
Pos : Shape → Set a
open Container public
data Free {a : Level} (C : Container a) (A : Unit → Set a) : Set a where
pure : A unit ... |
module Prelude.List.Relations.All where
open import Prelude.Equality
open import Prelude.Nat
open import Prelude.Empty
open import Prelude.Unit
open import Prelude.Product
open import Prelude.Number
open import Prelude.List.Base
open import Prelude.Applicative
open import Agda.Primitive
infixr 5 _∷_
data All {a b} ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Rational numbers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Rational.Base where
open import Function using (id)
open import Data.Int... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Ring.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.HalfAdjoint
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import... |
-- Andreas, 2017-01-12, issue #2386
id : {A : Set} → A → A
id x = x
data Eq (A : Set) : (x y : A) → Set where
refl : (x : A) → Eq A x (id x)
{-# BUILTIN EQUALITY Eq #-}
-- Should be accepted.
|
{-# OPTIONS --allow-unsolved-metas #-}
data ⊤ : Set where
tt : ⊤
data _≡_ (a : ⊤) : {B : Set} → B → Set where
refl : a ≡ a
foo : ⊤
foo = (λ (z : ⊤) (q : bar ≡ {!!}) → tt) bar refl
where
bar : ⊤
bar = {!!}
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed W-types aka Petersson-Synek trees
------------------------------------------------------------------------
module Data.W.Indexed where
open import Level
open import Data.Container.Indexed.Core
open impo... |
module SystemF.Syntax.Type.Constructors where
open import Prelude
open import SystemF.Syntax.Type
open import SystemF.Substitutions.Types
-- church numerals
tnat : Type 0
tnat = ∀' (((tvar zero) →' (tvar zero)) →' (tvar zero) →' (tvar zero))
-- Type of the polymorphic identity
tid' : ∀ {n} → Type n
tid' = ∀' ((tvar ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Finite.Fin.Construction.Discrete where
open import Data.Product using (∃; _,_)
open import Data.Nat using (ℕ)
open import Data.Fin
open import Data.Fin.Patterns
open import Function using (case_of_)
open import Relation.Nullary using (Dec; yes; no)
open i... |
-- Andreas, 2016-05-10, issue 1848, reported by Nisse
-- {-# OPTIONS -v tc.lhs.top:20 #-}
data D : Set where
c : D → D
postulate
P : D → Set
foo : (x : D) → P x
foo _ = {!!}
-- checked lhs:
-- ps = _
-- delta = (x : D)
-- qs = [r(x = VarP (0,"x"))]
-- The unnamed variable is part of the context... |
open import GGT
-- Throughout the following assume A is a (right) Action
module GGT.Theory
{a b ℓ₁ ℓ₂}
(A : Action a b ℓ₁ ℓ₂)
where
open import Level
open import Relation.Unary hiding (_\\_; _⇒_)
open import Relation.Binary
open import Algebra
open import Data.Product
open Action A renaming (setoid to Ω')
open... |
{-# OPTIONS --without-K #-}
module Ch1-5 where
open import Data.Product
open import Ch2-1
uniq : ∀ {a b} {A : Set a} {B : Set b}
→ (x : A × B)
→ ((proj₁ x , proj₂ x) ≡ x)
uniq (fst , snd) = refl
ind : ∀ {a b c} {A : Set a} {B : Set b}
→ (C : A × B → Set c)
→ ((x : A) → (y : B) → C (x , y))
→ (p : A × B)
... |
{-# OPTIONS --safe #-}
open import Generics.Prelude hiding (lookup; pi; curry)
open import Generics.Telescope
open import Generics.Desc
open import Generics.All
open import Generics.HasDesc
import Generics.Helpers as Helpers
open import Relation.Binary.HeterogeneousEquality.Core using (_≅_; refl)
module Generics.Con... |
{-# OPTIONS --without-K #-}
module VectorLemmas where
open import Level using (Level)
open import Data.Vec
using (Vec; tabulate; []; _∷_; lookup; allFin)
renaming (_++_ to _++V_; map to mapV; concat to concatV)
open import Data.Vec.Properties
using (lookup-++-≥; lookup∘tabulate; tabulate-∘; tabulate... |
import Lvl
open import Type
module Structure.Logic.Constructive.BoundedPredicate
{ℓₗ} {Formula : Type{ℓₗ}}
{ℓₘₗ} (Proof : Formula → Type{ℓₘₗ})
{ℓₚ} {Predicate : Type{ℓₚ}}
{ℓₒ} {Domain : Type{ℓₒ}}
(_$_ : Predicate → (x : Domain) → ∀{B : Domain → Formula} → Proof(B(x)) → Formula)
where
import L... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module groups.Pointed where
infix 60 ⊙[_,_]ᴳˢ ⊙[_,_]ᴳ
record ⊙GroupStructure {i : ULevel} (GEl : Type i) : Type (lsucc i) where
constructor ⊙[_,_]ᴳˢ
field
de⊙ᴳˢ : GroupStructure GEl
ptᴳˢ : GEl
open GroupStructure de⊙ᴳˢ public
open ⊙GroupStructur... |
data Nat : Set where
nohana : Nat
kibou : Nat -> Nat
one = kibou nohana
two = kibou one
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.EilenbergMacLane1
open import homotopy.EilenbergMacLane
{- Given sequence of groups (Gₙ : n ≥ 1) such that Gₙ is abelian for n > 1,
- we can construct a space X such that πₙ(X) == Gₙ.
- (We can also make π₀(X) whatever we want but this is... |
{-# OPTIONS --rewriting #-}
module Examples.OpSem where
open import Luau.OpSem using (_⊢_⟶ᴱ_⊣_; _⊢_⟶ᴮ_⊣_; subst)
open import Luau.Syntax using (Block; var; val; nil; local_←_; _∙_; done; return; block_is_end)
open import Luau.Heap using (∅)
ex1 : ∅ ⊢ (local (var "x") ← val nil ∙ return (var "x") ∙ done) ⟶ᴮ (return (... |
module BasicIS4.Metatheory.DyadicGentzenSpinalNormalForm-HereditarySubstitution where
open import BasicIS4.Syntax.DyadicGentzenSpinalNormalForm public
-- Hereditary substitution and reduction.
mutual
[_≔_]ⁿᶠ_ : ∀ {A B Γ Δ} → (i : A ∈ Γ) → Γ ∖ i ⁏ Δ ⊢ⁿᶠ A → Γ ⁏ Δ ⊢ⁿᶠ B → Γ ∖ i ⁏ Δ ⊢ⁿᶠ B
[ i ≔ s ]ⁿᶠ neⁿᶠ (spⁿᵉ j ... |
{-# OPTIONS --without-K #-}
open import Base
open import Algebra.Groups
{-
The definition of G-sets. Thanks to Daniel Grayson.
-}
module Algebra.GroupSets {i} (grp : group i) where
private
module G = group grp
-- The right group action with respect to the group [grp].
-- [Y] should be some set, but ... |
------------------------------------------------------------------------------
-- Proving properties without using pattern matching on refl
------------------------------------------------------------------------------
{-# OPTIONS --no-pattern-matching #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-si... |
{-# OPTIONS --rewriting #-}
module Duality where
open import Data.Bool
open import Data.Nat hiding (compare)
open import Data.Nat.Properties
open import Data.Fin hiding (_+_)
open import Data.Product
open import Function
open import Relation.Binary.PropositionalEquality hiding (Extensionality)
open import Agda.Bui... |
open import Type
module Graph.Oper {ℓ₁ ℓ₂} {V : Type{ℓ₁}} where
open import Logic.Propositional
open import Graph{ℓ₁}{ℓ₂}(V)
_∪_ : Graph → Graph → Graph
(g₁ ∪ g₂) v₁ v₂ = g₁ v₁ v₂ ∨ g₂ v₁ v₂ -- TODO: lift1On2
|
module Eval where
open import Data.Empty
open import Data.Unit
open import Data.Unit.Core
open import Data.Nat renaming (_⊔_ to _⊔ℕ_)
open import Data.Sum renaming (map to _⊎→_)
open import Data.Product renaming (map to _×→_)
open import Data.Vec
open import Relation.Binary.PropositionalEquality
open import FT -- Fin... |
open import Formalization.PredicateLogic.Signature
module Formalization.PredicateLogic.Minimal.NaturalDeduction.NegativeTranslations (𝔏 : Signature) where
open Signature(𝔏)
open import Data.Either as Either using (Left ; Right)
open import Data.ListSized using (List)
import Logic.Propositional as Meta
import ... |
module Cats.Category where
open import Level
import Cats.Category.Base as Base
import Cats.Category.Constructions.CCC as CCC
import Cats.Category.Constructions.Epi as Epi
import Cats.Category.Constructions.Equalizer as Equalizer
import Cats.Category.Constructions.Exponential as Exponential
import Cats.Category.Constr... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.Multivariate.Equiv.Comp-Poly where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
open import Cubical.Data.Vec
open import Cu... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use the
-- Relation.Binary.Construct.Closure.ReflexiveTransitive.Properties
-- module directly.
------------------------------------------------------------------------
{-# OPTI... |
------------------------------------------------------------------------
-- The "always true" predicate, □
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Delay-monad.Sized.Always where
open import Prelude
open import Prelude.Size
open import Delay-monad... |
open import Prelude
open import Level using (_⊔_; Lift; lift) renaming (suc to ls; zero to lz)
open import Data.String using (String)
open import Data.Maybe using (Maybe; nothing; just)
open import Data.Nat using (_≤_)
module RW.Data.RTrie.Insert
where
open import Relation.Binary.PropositionalEquality
usin... |
-- Andreas, 2020-03-18, issue 4518, reported by strangeglyph
-- Better error message when parsing of LHS fails
open import Agda.Builtin.Nat using (Nat) -- forgot to import constructors
postulate
foo : Nat
test : Set₁
test with foo
... | zero = Set
... | suc n = Set
-- ERROR:
-- Could not parse the left-hand sid... |
{-# OPTIONS --without-K --exact-split #-}
module abelian-subgroups where
import abelian-groups
import subgroups
open abelian-groups public
open subgroups public
{- Subsets of abelian groups -}
subset-Ab :
(l : Level) {l1 : Level} (A : Ab l1) → UU ((lsuc l) ⊔ l1)
subset-Ab l A = subset-Group l (group-Ab A)
is-set... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.