text stringlengths 4 690k |
|---|
module Extensions.Vec where
open import Data.Product hiding (map; zip)
open import Data.Nat
open import Data.Fin
open import Data.Vec
open import Data.Product hiding (map)
open import Relation.Binary.PropositionalEquality hiding ([_])
open import Data.List as L using ()
open import Data.List.Properties
open import Rel... |
module _ where
open import Agda.Primitive
open import Agda.Builtin.Equality
open import Agda.Builtin.Sigma
record Category {o h} : Set (lsuc (o ⊔ h)) where
no-eta-equality
constructor con
field
Obj : Set o
Hom : Obj → Obj → Set h
field
id : ∀ {X : Obj} → Hom X X
comp : ∀ {X Y Z} → Hom Y Z → ... |
-- Andreas, 2015-09-07 Issue reported by identicalsnowflake
data D : Set1 where
field
A : Set
-- WAS: Internal error (on master)
-- NOW:
-- Illegal declaration in data type definition
-- field A : Set
-- when scope checking the declaration
-- data D where
-- field A : Set
|
module Issue175b where
data _≡_ {A : Set}(x : A) : A → Set where
refl : x ≡ x
data Bool : Set where
true : Bool
false : Bool
{-# BUILTIN BOOL Bool #-}
{-# BUILTIN TRUE true #-}
{-# BUILTIN FALSE false #-}
postulate ℝ : Set
{-# BUILTIN FLOAT ℝ #-}
primitive
-- ℝ functions
primFloatMinus : ℝ -> ℝ -> ℝ
pr... |
module Nom where
open import Basics
open import Pr
data Nom : Set where
Ze : Nom
Su : Nom -> Nom
Pu : Nom -> Nom
_NomQ_ : Nom -> Nom -> Pr
Ze NomQ Ze = tt
Ze NomQ (Su y) = ff
Ze NomQ (Pu y) = ff
(Su x) NomQ Ze = ff
(Su x) NomQ (Su y) = x eq y
(Su x) NomQ (Pu y) = ff
(Pu x) NomQ Ze = ff
(Pu x) NomQ (Su y) = ff
... |
module Issue4954.M (_ : Set₁) where
|
{-
Definition of function fixpoint and Kraus' lemma
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Functions.Fixpoint where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.Path
private... |
-- Andreas, 2015-08-27 use imported rewrite rule
{-# OPTIONS --rewriting #-}
open import Common.Nat
open import Common.Equality
open import Issue1550
x+0+0+0 : ∀{x} → ((x + 0) + 0) + 0 ≡ x
x+0+0+0 = refl
|
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Fin.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Data.Empty
open import Cubical.Data.Nat
open import Cubical.Data.Nat.Order
open import Cubical.Data.Sum
ope... |
module IO.File where
open import Base
open import IO
{-# IMPORT System.IO #-}
FilePath = String
data IOMode : Set where
readMode : IOMode
writeMode : IOMode
appendMode : IOMode
readWriteMode : IOMode
{-# COMPILED_DATA IOMode ReadMode WriteMode AppendMode ReadWriteMode #-}
canRead : IOMode -> ... |
{-# OPTIONS --without-K #-}
module Data.ByteString.Primitive.Int where
open import Agda.Builtin.Nat using (Nat)
{-# FOREIGN GHC import qualified Data.Int #-}
postulate
Int : Set
Int64 : Set
IntToℕ : Int → Nat
ℕToInt : Nat → Int
int64Toℕ : Int64 → Nat
ℕToInt64 : Nat → Int64
{-# COMPILE GHC Int = type (Pre... |
-- Andreas, 2016-09-13, issue #2177, reported by Andres
--
-- Check me with -v check.ranges:100
postulate A : Set
-- Was an internal error when loading Agda.Primitive
-- (because of range outside the current file).
|
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.Equivalence2
open import lib.Function2
open import lib.NType2
open import lib.types.Group
open import lib.types.Pi
open import lib.types.Subtype
open import lib.types.Truncation
open import lib.groups.Homomorphism
open import lib.groups.Sub... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.Exactness
open import cohomology.FunctionOver
{- Splitting Lemma - Right Split
Assume an exact sequence:
φ ψ
0 → G → H → K
where H is abelian. If ψ has a right inverse χ, then H == G × K. Over
this path φ becomes the ... |
open import Oscar.Prelude
open import Oscar.Class.Symmetry
open import Oscar.Class.Symmetrical
import Oscar.Data.Proposequality
module Oscar.Class.Symmetrical.Symmetry where
module _
{𝔬} {𝔒 : Ø 𝔬}
{ℓ} {_∼_ : 𝔒 → 𝔒 → Ø ℓ}
⦃ _ : Symmetry.class _∼_ ⦄
where
instance
Symmetrical𝓢ymmetry : Symm... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some properties imply others
------------------------------------------------------------------------
module Relation.Binary.Consequences where
open import Relation.Binary.Core hiding (refl)
open import Relatio... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.RingSolver.Examples where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Int.Base hiding (_+_ ; _·_ ; _-_)
open import Cubical.Data.List
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.RingSolver.ReflectionSolving
private
variable
... |
------------------------------------------------------------------------
-- Kuratowski finite subsets
------------------------------------------------------------------------
-- Based on Frumin, Geuvers, Gondelman and van der Weide's "Finite
-- Sets in Homotopy Type Theory".
{-# OPTIONS --cubical --safe #-}
import E... |
data ⊤ : Set where
tt : ⊤
data Identity (t : Set) : Set where
MkIdentity : t → Identity t
let-example : Identity ⊤
let-example =
let x = tt
in MkIdentity x -- Parse error
do-example : Identity ⊤
do-example = do
MkIdentity tt
where
x : ⊤
x = tt
|
{-# OPTIONS --cubical --safe --guardedness #-}
module Data.PolyP where
open import Data.PolyP.RecursionSchemes public
open import Data.PolyP.Universe public
open import Data.PolyP.Composition public
open import Data.PolyP.Types public
open import Data.PolyP.Currying public
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Category.Monoidal
module Categories.Category.Monoidal.Symmetric {o ℓ e} {C : Category o ℓ e} (M : Monoidal C) where
open import Level
open import Data.Product using (Σ; _,_)
open import Categories.Functor.Bifunctor
open impor... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The type for booleans and some operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Bool.Base where
open import Data.Unit.Base usin... |
-- {-# OPTIONS --verbose tc.conv.term:40 #-}
-- {-# OPTIONS --verbose tc.conv.level:40 #-}
-- {-# OPTIONS --verbose tc.conv.atom:50 #-}
-- {-# OPTIONS --verbose tc.conv.elim:50 #-}
module Issue680-NeutralLevels where
open import Common.Level
postulate N : Set
A : N → Set
B : Set
level' ... |
module Stack where
open import Prelude public
-- Stacks, or snoc-lists.
data Stack (X : Set) : Set where
∅ : Stack X
_,_ : Stack X → X → Stack X
-- Stack membership, or de Bruijn indices.
module _ {X : Set} where
infix 3 _∈_
data _∈_ (A : X) : Stack X → Set where
top : ∀ {Γ} → A ∈ Γ , A
pop :... |
{-# OPTIONS --safe --without-K #-}
module JVM.Prelude where
open import Level public hiding (zero) renaming (suc to sucℓ)
open import Function public using (case_of_; _∘_; id; const)
open import Data.List using (List; _∷_; []; [_]) public
open import Data.Unit using (⊤; tt) public
open import Data.Nat using (ℕ; suc; ... |
module Coverage where
infixr 40 _::_
data List (A : Set) : Set where
[] : List A
_::_ : A -> List A -> List A
data D : Set where
c1 : D -> D
c2 : D
c3 : D -> D -> D -> D
c4 : D -> D -> D
f : D -> D -> D -> D -> List D
f (c3 a (c1 b) (c1 c2)) (c1 (c1 c)) d (c1 (c1 (c1 e))) = a :: b :: c :: d :: e :: []
... |
open import Data.Product using ( proj₁ ; proj₂ )
open import Relation.Binary.PropositionalEquality using ( _≡_ ; sym ; cong )
open import Relation.Unary using ( _⊆_ )
open import Web.Semantic.DL.ABox using ( ABox ; ⟨ABox⟩ ; Assertions )
open import Web.Semantic.DL.ABox.Interp using ( ⌊_⌋ ; ind )
open import Web.Semanti... |
----------------------------------------------------------------------
-- Copyright: 2013, Jan Stolarek, Lodz University of Technology --
-- --
-- License: See LICENSE file in root of the repo --
-- Repo address: https://github.com/... |
{-# OPTIONS --without-K --safe #-}
module Definition.Typed.Consequences.NeTypeEq where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Consequences.Syntactic
open import Definition.Typed.Consequences.Injectivity
open import Definition.Typed.Consequences.Substitution
open impo... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.Bouquet
open import homotopy.DisjointlyPointedSet
open import cohomology.Theory
module cohomology.DisjointlyPointedSet {i} (OT : OrdinaryTheory i) where
open OrdinaryTheory OT
open import cohomology.Bouquet OT
module _ (X : Ptd i)
... |
module tests.Forcing3 where
open import Prelude.Nat
-- {-
open import Prelude.IO
open import Prelude.Product
open import Prelude.Unit
-- -}
data _**_ (A B : Set) : Set where
_,_ : A -> B -> A ** B
data P {A B : Set} : A ** B -> Set where
_,_ : (x : A)(y : B) -> P (x , y)
data Q {A : Set} : A ** A -> Set where
... |
module Structure.Relator where
import Lvl
open import Functional using (_∘₂_)
open import Functional.Dependent
open import Lang.Instance
open import Logic
open import Logic.Propositional
open import Structure.Setoid
open import Structure.Relator.Names
open import Structure.Relator.Properties
open import Syntax.Functio... |
module IID-Proof-Test where
open import LF
open import Identity
open import IID
open import IIDr
open import DefinitionalEquality
open import IID-Proof-Setup
η : {I : Set}(γ : OPg I)(U : I -> Set) -> Args γ U -> Args γ U
η (ι i) U _ = ★
η (σ A γ) U a = < a₀ | η (γ a₀) U a₁ >
where
a₀ = π₀ a
a₁ = π₁ a
η (... |
module Nat where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
|
{-# OPTIONS --allow-unsolved-metas #-}
module StateSizedIO.GUI.BaseStateDependent where
open import Size renaming (Size to AgdaSize)
open import NativeIO
open import Function
open import Agda.Primitive
open import Level using (_⊔_) renaming (suc to lsuc)
open import Data.Product
open import Relation.Binary.Propositio... |
{-# OPTIONS --cubical --safe #-}
module Control.Monad.Levels.Definition where
open import Prelude
open import Data.Bag
data Levels (A : Type a) : Type a where
_∷_ : ⟅ A ⟆ → Levels A → Levels A
[] : Levels A
trail : [] ∷ [] ≡ []
trunc : isSet (Levels A)
|
module Issue474 where
open import Common.Level
postulate
a b c : Level
A : Set a
B : Set b
C : Set c
data Foo : Set (lsuc lzero ⊔ (a ⊔ (b ⊔ c))) where
foo : (Set → A → B) → Foo
|
{-# OPTIONS --without-K --safe #-}
-- A cartesian functor preserves products (of cartesian categories)
module Categories.Functor.Cartesian where
open import Level
open import Categories.Category.Cartesian.Structure
open import Categories.Functor using (Functor; _∘F_)
open import Categories.Functor.Properties
import... |
module Text.Greek.Bible where
open import Data.Nat
open import Data.List
open import Data.String
open import Text.Greek.Script
data Word : Set where
word : (List Token) → String → Word
|
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Groups.Definition
open import Groups.Lemmas
open import Groups.Homomorphisms.Definition
open import Groups.QuotientGroup.Definition
open import Groups.Homomorphisms.Lemmas
open import Groups.Actions.Definition
open import Sets.E... |
{-# OPTIONS --type-in-type #-}
module Primitive where
infixr 2 _,_
record Σ (A : Set)(B : A → Set) : Set where
constructor _,_
field fst : A
snd : B fst
open Σ
data ⊤ : Set where
tt : ⊤
∃ : {A : Set}(B : A → Set) → Set
∃ B = Σ _ B
infix 10 _≡_
data _≡_ {A : Set}(a : A) : {B : Set} → B → Set where
... |
module Categories.Equalizer where
|
open import Data.List
open import Data.Nat using (ℕ; zero; suc)
open import Data.Product
open import Data.Bool
open import Function using (id; _∘_)
open import Algebra
open import Level using (Level; _⊔_)
module test where
variable
a b c ℓ c₂ ℓ₂ : Level
A : Set a
B : Set b
C : Set c
... |
module slots.imports where
open import Data.Nat public using (ℕ ; zero ; suc ; _+_ ; _*_)
open import Data.Fin public using (Fin ; zero ; suc ; #_)
open import Data.List public using (List ; [] ; _∷_)
open import Data.Vec public using (Vec ; [] ; _∷_)
open import Data.Product public using (_×_ ; _,_ ; proj₁ ; proj₂)
o... |
{-# OPTIONS --rewriting --without-K #-}
open import Agda.Primitive
open import Prelude
import GSeTT.Rules
import GSeTT.Typed-Syntax
import Globular-TT.Syntax
import Globular-TT.Rules
{- Decidability of type cheking for the type theory for globular sets -}
module Globular-TT.Dec-Type-Checking {l} (index : Set l) (rule... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.List where
open import Cubical.Data.List.Base public
open import Cubical.Data.List.Properties public
|
-- Andreas, 2017-12-04, Re: issue #2862, reported by m0davis,
-- Make sure there is similar problem with functions.
open import Agda.Builtin.Equality
data Bool : Set where
true false : Bool
module N where
val : Bool -- Should fail
module M where
open N
val = true
val≡true : val ≡ true
val≡true = refl
... |
{-# OPTIONS --without-K --safe #-}
module Definition.Typed.Consequences.Inequality where
open import Definition.Untyped hiding (U≢ne; ℕ≢ne; B≢ne; U≢B; ℕ≢B)
open import Definition.Typed
open import Definition.Typed.EqRelInstance
open import Definition.LogicalRelation
open import Definition.LogicalRelation.Irrelevance
... |
{- 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
-}
module LibraBFT.Impl.Base.Types where
open import LibraBFT.Prelude
open i... |
module Category.FAM where
open import Level
open import Relation.Binary.PropositionalEquality
open import Function using (_∘_; id; _∘′_)
------------------------------------------------------------------------
-- Functors
record IsFunctor {ℓ} (F : Set ℓ → Set ℓ)
(_<$>_ : ∀ {A B} → (A → B) → F A → F ... |
-- Andreas, 2020-06-21, issue #4768
-- Problem was: @0 appearing in "Not a finite domain" message.
open import Agda.Builtin.Bool
open import Agda.Primitive.Cubical
f : (i : I) → IsOne i → Set
f i (i0 = i1) = Bool
-- EXPECTED:
-- Not a finite domain: IsOne i
-- when checking that the pattern (i0 = i1) has type IsOne ... |
module ClashingImport where
X = TODO--Can't-make-this-happen!
postulate A : Set
import Imports.A
open Imports.A
|
{-# OPTIONS --safe #-}
module Cubical.Algebra.MonoidSolver.CommSolver where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Structure
open import Cubical.Data.FinData
open import Cubical.Data.Nat using (ℕ; _+_; iter)
open import Cubical.Data.Vec
open import Cubical.Algebra.CommMonoid
open im... |
------------------------------------------------------------------------
-- The cubical identity type
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Equality.Id where
open import Equality
import Equality.Path as P
open import Prelude
import Ag... |
-- Andreas, 2012-02-24 example by Ramana Kumar
{-# OPTIONS --sized-types #-}
-- {-# OPTIONS --show-implicit -v tc.size.solve:20 -v tc.conv.size:15 #-}
module SizeInconsistentMeta4 where
open import Data.Nat using (ℕ;zero;suc) renaming (_<_ to _N<_)
open import Data.Product using (_,_;_×_)
open import Data.List using (... |
-- Andreas, 2013-12-28
-- Reported by jesper.cockx, Dec 20, 2013
-- WAS: In the following example, there is an unsolved instance
-- argument, but no part of the code is highlighted.
typeof : ∀ {{T : Set}} → T → Set
typeof {{T}} x = T
test : {A : Set} {B : Set} (y : A) → typeof y
test y = y
-- Should solve the inst... |
{-# OPTIONS --without-K --exact-split --safe #-}
module 07-finite-sets where
import 06-universes
open 06-universes public
--------------------------------------------------------------------------------
{- Section 7.1 The congruence relations -}
{- Definition 7.1.1 -}
-- We introduce the divisibility relation. --... |
-- Andreas, 2019-03-18, AIM XXIX, issue #3631 reported by rrose1
-- Performance regression in 2.5.4 due to new sort handling
{-# OPTIONS --no-universe-polymorphism #-} -- needed for the performance problem
-- {-# OPTIONS -v 10 -v tc.cc:15 -v tc.cc.type:60 -v tc.cover:100 #-}
-- {-# OPTIONS -v tc.cc.type:80 #-}
modu... |
module Source.Examples where
open import Source.Size
open import Source.Size.Substitution.Theory
open import Source.Term
open import Source.Type
open import Util.Prelude
import Source.Size.Substitution.Canonical as SC
{-
liftℕ : ∀ n < ⋆. ∀ m < n. Nat m → Nat n
liftℕ ≔ Λ n < ⋆. Λ m < n. λ i : Nat m.
caseNat[Nat n]... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Fundamental.Reducibility {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Typed
open import Definition.LogicalRelation
open import Definition.Logica... |
module MLib.Prelude.DFS.ViaNat where
open import MLib.Prelude
open import MLib.Prelude.Finite
open FE using (_⇨_; cong)
open import Data.Digit using (fromDigits; toDigits; Digit)
module _ {c p} (A-finiteSet : FiniteSet c p) where
module A = FiniteSet A-finiteSet
open A using () renaming (Carrier to A)
open L... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Implications of nullary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Nullary.Implication where
open import Data.Bool.Bas... |
{-# OPTIONS --cubical --safe #-}
module Data.Binary.PerformanceTests.Subtraction where
open import Prelude
open import Data.Binary.Definition
open import Data.Binary.Addition using (_+_)
open import Data.Binary.Subtraction using (_-_)
open import Data.Binary.Multiplication using (_*_)
sub-r : 𝔹 → 𝔹 → ℕ → 𝔹
sub-r... |
------------------------------------------------------------------------------
-- Common definitions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTION... |
------------------------------------------------------------------------
-- Convenient syntax for "equational reasoning" using a indexed preorder
------------------------------------------------------------------------
open import Relation.Binary.Indexed.Extra
module Relation.Binary.Indexed.PreorderReasoning {𝒾} {I ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Rings.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Rings.IntegralDomains.Definition
open import Rings.IntegralDomains.Lemmas
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)... |
open import Mockingbird.Forest using (Forest)
-- Curry’s Lively Bird Forest
module Mockingbird.Problems.Chapter14 {b ℓ} (forest : Forest {b} {ℓ}) where
open import Data.Product using (_×_; _,_; ∃-syntax; proj₁; proj₂)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Function using (_$_; _⇔_; Equivalence; mk⇔)... |
open import Nat
open import Prelude
open import core
open import lemmas-gcomplete
module lemmas-complete where
lem-comp-pair1 : ∀{d1 d2} → ⟨ d1 , d2 ⟩ dcomplete → d1 dcomplete
lem-comp-pair1 (DCPair h _) = h
lem-comp-pair2 : ∀{d1 d2} → ⟨ d1 , d2 ⟩ dcomplete → d2 dcomplete
lem-comp-pair2 (DCPair _ h) = h
l... |
-- Andreas, 2015-12-12, report by Ulf, 2015-12-09
{-# OPTIONS -v tc.with.40 #-}
open import Common.Equality
open import Common.Bool
T : Bool → Set
T true = Bool
T false = true ≡ false
foo : (a b : Bool) → a ≡ b → T a → T b
foo a b eq x rewrite eq = x
data _≅_ {A : Set} (x : A) : {B : Set} → B → Set where
refl :... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
open import Cubical.Core.Everything
open import Cubical.Relation.Binary
open import Cubical.Algebra.Magma
module Cubical.Algebra.Magma.Construct.Quotient {c ℓ} (M : Magma c) {R : Rel ⟨ M ⟩ ℓ} (isEq : IsEquivalence R)
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Rationals.QuoQ.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Data.Nat as ℕ using (discreteℕ)
open import Cubical.Data.NatPlusOne
open import Cubical.Data.Sigma
open import Cubical.HIT... |
module Functors.FullyFaithful where
open import Library
open import Categories
open import Functors
open import Naturals hiding (Iso)
open import Isomorphism
open Cat
open Fun
FullyFaithful : ∀{a b c d}{C : Cat {a}{b}}{D : Cat {c}{d}}
(F : Fun C D) → Set (a ⊔ b ⊔ d)
FullyFaithful {C = C}{D = D} F =
... |
-- WARNING: This file was generated automatically by Vehicle
-- and should not be modified manually!
-- Metadata
-- - Agda version: 2.6.2
-- - AISEC version: 0.1.0.1
-- - Time generated: ???
{-# OPTIONS --allow-exec #-}
open import Vehicle
open import Vehicle.Data.Tensor
open import Data.Rational as ℚ using (ℚ)
op... |
module AgdaCheatSheet where
open import Level using (Level)
open import Data.Nat
open import Data.Bool hiding (_<?_)
open import Data.List using (List; []; _∷_; length)
-- https://alhassy.github.io/AgdaCheatSheet/CheatSheet.pdf
{-
------------------------------------------------------------------------------
-- depe... |
module Issue1486 where
open import Common.Prelude
postulate
QName : Set
{-# BUILTIN QNAME QName #-}
primitive
primShowQName : QName -> String
main : IO Unit
main = putStrLn (primShowQName (quote main))
|
-- Andreas, 2014-10-05, issue reported by Stevan Andjelkovic
{-# OPTIONS --cubical-compatible #-}
postulate
IO : Set → Set
record ⊤ : Set where
constructor tt
record Container : Set₁ where
field
Shape : Set
Position : Shape → Set
open Container public
data W (A : Set) (B : A → Set) : Set where
... |
open import Coinduction using ( ∞ )
open import Data.ByteString using ( ByteString ; strict ; lazy )
open import Data.String using ( String )
module System.IO.Primitive where
infixl 1 _>>=_
-- The Unit type and its sole inhabitant
postulate
Unit : Set
unit : Unit
{-# COMPILED_TYPE Unit () #-}
{-# COMPILED unit... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Base definitions for the left-biased universe-sensitive functor and
-- monad instances for These.
--
-- To minimize the universe level of the RawFunctor, we require that
-- elements of B are "lifted" to a copy of... |
open import Data.Sum
open import Data.Fin
open import Data.Maybe
open import Signature
module MixedTest (Σ : Sig) (D : Set) where
-- Δ : Sig
-- Δ = record { ∥_∥ = D ; ar = λ x → Fin 1 }
mutual
data Term : Set where
cons : ⟪ Σ ⟫ (Term ⊎ CoTerm) → Term
record CoTerm : Set where
coinductive
field destr... |
{-# OPTIONS --safe --cubical #-}
module Erased-cubical.Cubical-again where
open import Agda.Builtin.Cubical.Path
open import Erased-cubical.Erased public
-- Code defined using --erased-cubical can be imported and used by
-- regular Cubical Agda code.
_ : {A : Set} → A → ∥ A ∥
_ = ∣_∣
-- The constructor trivialᶜ i... |
-- 2015-05-05 Bad error message
_=R_ : Rel → Rel → Set
R =R S : (R ⊆ S) × (S ⊆ R) -- here is a typo, : instead of =
ldom : Rel → Pred
ldom R a = ∃ λ b → R a b
-- More than one matching type signature for left hand side ldom R a
-- it could belong to any of: ldom R
|
module Data.Finitude.FinType where
open import Relation.Binary.PropositionalEquality as P using (_≡_)
open import Data.Nat as ℕ
open import Data.Fin as Fin using (Fin; #_)
open import Data.Finitude
open import Function.Equality using (_⟨$⟩_)
open import Function.Injection as Inj using (Injective)
open import Function.I... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Group
open import lib.types.Bool
open import lib.types.Nat
open import lib.types.Pi
open import lib.types.Sigma
open import lib.groups.Homomorphisms
open import lib.groups.Lift
open import lib.groups.Unit
module lib.groups.GroupProduct where
{-... |
postulate
f : {A B : Set₁} (C : Set) → C → C
module _ (A B C : Set) where
test : Set
test = {!!}
|
module _ where
module A where
infix 2 c
infix 1 d
syntax c x = x ↑
syntax d x y = x ↓ y
data D : Set where
● : D
c : D → D
d : D → D → D
module B where
syntax d x y = x ↓ y
data D : Set where
d : D → D → D
open A
open B
rejected : A.D
rejected = ● ↑ ↓ ●
|
{-# NON_TERMINATING #-}
mutual
data D : Set where
c : T₁ → D
T₁ : Set
T₁ = T₂
T₂ : Set
T₂ = T₁ → D
|
{-# OPTIONS --safe #-}
module Cubical.Algebra.Polynomials.Multivariate.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat renaming (_+_ to _+n_)
open import Cubical.Data.Vec
open import Cubical.Algebra.Ring
open import Cubical.Algebra.CommRing
pri... |
------------------------------------------------------------------------
-- The syntax of, and a type system for, the untyped λ-calculus with
-- constants
------------------------------------------------------------------------
module Lambda.Syntax where
open import Codata.Musical.Notation
open import Data.Nat
open i... |
{-# OPTIONS --rewriting #-}
open import Agda.Builtin.Equality
postulate _↦_ : ∀ {a} {A : Set a} → A → A → Set
{-# BUILTIN REWRITE _↦_ #-}
postulate
T : (Set → Set → Set) → Set
T₀ : Set
module _ (F : Set → Set) where
postulate rew : T (λ X Y → F X) ↦ T₀
{-# REWRITE rew #-}
test : T (λ X Y → F X) ≡ T₀
... |
module Oscar.Class.TermSubstitution.Internal {𝔣} (FunctionName : Set 𝔣) where
open import Oscar.Data.Term.Core FunctionName
open import Oscar.Data.Nat.Core
open import Oscar.Data.Fin.Core
open import Oscar.Data.Vec.Core
open import Oscar.Data.Equality.Core
open import Oscar.Data.Product.Core
open import Oscar.Funct... |
module vector where
open import bool
open import eq
open import list
open import list-to-string
open import nat
open import nat-thms
open import product
open import string
----------------------------------------------------------------------
-- datatypes
--------------------------------------------------------------... |
open import Function using (_∘_)
open import Data.Fin as Fin using (Fin; toℕ)
open import Data.Nat as Nat using (ℕ; suc; zero)
open import Data.Nat.Show using () renaming (show to showℕ)
open import Data.String
open import Data.Vec using (Vec; []; _∷_)
open import Relation.Nullary using (Dec; yes; no)
open import Relat... |
-- Andreas, 2017-08-25, issue #1611.
-- Fixed by Jesper Cockx as #2621.
open import Common.Prelude
data D : Bool → Set where
dt : D true
df : D false
Works : ∀{b} → D b → Set
Works dt = Bool
Works df = Bool
Fails : ∀{b : Bool} → D _ → Set
Fails dt = Bool
Fails df = Bool
-- WAS:
-- false != true of type Bool
--... |
import Issue2447.M
import Issue2447.Parse-error
|
{-# OPTIONS --cubical --safe #-}
module Relation.Nullary.Decidable where
open import Level
open import Data.Bool
open import Data.Empty
open import Function.Biconditional
Reflects : Type a → Bool → Type a
Reflects A true = A
Reflects A false = ¬ A
record Dec {a} (A : Type a) : Type a where
constructor _because_
... |
module Problem3 where
open import Problem1
open import Problem2
data Fin : Nat -> Set where
fzero : {n : Nat} -> Fin (suc n)
fsuc : {n : Nat} -> Fin n -> Fin (suc n)
data False : Set where
-- 3.1
empty : Fin zero -> False
empty ()
-- 3.2
_!_ : {A : Set}{n : Nat} -> Vec A n -> Fin n -> A
ε ! ()
(x ► ... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Category.Monoidal
module Categories.Category.Monoidal.Symmetric {o ℓ e} {C : Category o ℓ e} (M : Monoidal C) where
open import Level
open import Data.Product using (Σ; _,_)
open import Categories.Functor.Bifunctor
open impor... |
{-# OPTIONS --without-K #-}
module hw1 where
open import Level using (_⊔_)
open import Function using (id)
open import Data.Nat using (ℕ; suc; _+_; _*_)
open import Data.Empty using (⊥)
open import Data.Sum using (_⊎_; inj₁; inj₂)
import Level
infix 4 _≡_
recℕ : ∀ {ℓ} → (C : Set ℓ) → C → (ℕ → C → C) → ℕ → C
recℕ C ... |
module Data.Either.Equiv.Id where
import Lvl
open import Data
open import Data.Either as Either
open import Data.Either.Equiv
open import Relator.Equals
open import Relator.Equals.Proofs.Equiv
open import Structure.Setoid
open import Structure.Function.Domain
open import Type
private variable ℓ ℓₑ ℓₑ₁ ℓₑ₂ : Lvl.... |
{-# OPTIONS --universe-polymorphism #-}
module SetInf where
id : ∀ {A} → A → A
id x = x
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.