text stringlengths 4 690k |
|---|
{-# OPTIONS --cubical #-}
-- First and second species counterpoint for Frog's song
module Frog where
open import Data.Fin
open import Data.List using (List; []; _∷_; _++_; map)
open import Data.Maybe using (fromMaybe)
open import Data.Nat
open import Data.Product using (_×_; _,_; proj₁; proj₂)
open import Function us... |
open import Type
module Graph.Properties.Proofs where
open import Data.Either.Proofs
open import Functional
open import Function.Equals
open import Lang.Instance
open import Logic
open import Logic.Propositional
open import Logic.Propositional.Theorems
import Lvl
open import Graph
open import Graph.Properties
op... |
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
{-# OPTIONS --sized-types #-}
open import Data.Nat
open import Data.Vec
open import Data.Fin
open import Data.Product
open import Data.Sum
open import Data.Unit
open import Data.Empty
open import... |
{-# OPTIONS --cubical --safe #-}
module Testers where
open import Prelude
open import Data.List using (List; map; _⋯_)
open import Data.List.Sugar using (liftA2)
testIso : (fns : A ↔ B) → List A → Type _
testIso (to iff fro) xs = xs ≡ map (fro ∘ to) xs
testIsoℕ : (fns : ℕ ↔ A) → ℕ → Type _
testIsoℕ fns n = testIso ... |
open import Data.Nat
{- This is a test line ∀ , yeah it works ≡ -}
ten : ℕ
ten = 10
|
{-# OPTIONS --cubical --safe #-}
module Data.Binary.Conversion.Fast.Properties where
open import Prelude
open import Data.Binary.Conversion
open import Data.Binary.Definition
open import Data.Binary.Increment
import Data.Binary.Conversion.Fast as F
open import Data.Binary.Conversion.Fast using (⟦_⇑⟧⟨_⟩)
open import D... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Homogeneously-indexed binary relations
--
-- Indexed structures are laid out in a similar manner as to those
-- in Relation.Binary. The main difference is each structure also
-- contains proofs for the lifted ver... |
------------------------------------------------------------------------------
-- Totality properties for Tree using induction instance
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-u... |
{-# OPTIONS --cubical #-}
module Montuno where
open import Data.Fin using (#_)
open import Data.Integer using (+_)
open import Data.List using (List; _∷_; []; map; concat; _++_; replicate; zip)
open import Data.Nat using (_*_; ℕ; suc; _+_)
open import Data.Product using (_,_)
open import Function using (_∘_)
open im... |
{-# OPTIONS --safe #-}
module Cubical.HITs.S3.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open Iso
data S³ : Type₀ where
base : S³
surf : PathP (λ j → PathP (λ i → base ≡ base) refl refl) refl refl
flip₀₂S³ : S³ → S³
flip₀₂S³ base = base
flip₀₂S³ (surf j i i₁) =... |
open import Prelude hiding (id; erase)
module Implicits.WellTyped where
open import Data.Fin.Substitution
open import Data.Vec hiding ([_])
open import Data.List as List hiding ([_]; map)
open import Implicits.Syntax.Type
open import Implicits.Syntax.Term
open import Implicits.Syntax.Context
open import Implicits.Su... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Functor hiding (id)
-- Coimit of a Cocone over a Functor F : J → C
module Categories.Diagram.Colimit
{o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) where
private
module C = Category C
mo... |
-- Moved from the successfull test-suite. See Issue 1481.
module tests.Nat where
data Nat : Set where
Z : Nat
S : Nat → Nat
{-# BUILTIN NATURAL Nat #-}
_+_ : Nat → Nat → Nat
Z + m = m
S n + m = S (n + m)
{-# BUILTIN NATPLUS _+_ #-}
_*_ : Nat → Nat → Nat
Z * m = Z
S n * m = m + (n * m)
{-# BUILTIN NATTIME... |
{-# OPTIONS --safe --warning=error #-}
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Sets.FinSet.Definition
open import LogicalFormulae
open import Numbers.Naturals.WithK
open import Sets.FinSet.Lemmas
module Sets.FinSetWithK where
private
sgEq : {l m : _} {L : Set l} → {pr :... |
------------------------------------------------------------------------------
-- Totality properties respect to ListN
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorph... |
module Day5 where
open import Prelude.String as String
open import Data.Maybe
open import Foreign.Haskell using (Unit)
open import Prelude.List as List
open import Data.Nat
open import Data.Nat.DivMod
open import Data.Nat.Properties
import Data.Nat.Show as ℕs
open import Prelude.Char
open import Data.Vec as Vec rena... |
-- Andreas, 2016-01-21, issue 1791
-- With-clause stripping for copatterns with "polymorphic" field.
-- {-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.with.strip:60 #-}
postulate anything : ∀{A : Set} → A
record Wrap (A : Set) : Set where
field unwrap : A
module VisibleWorks where
-- monomorphic field
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.FinData.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat
open import Cubical.Relation.Nullary
data Fin : ℕ → Type₀ where
zero : {n : ℕ} → Fin (suc n)
suc : {n : ℕ} (i : Fin n) → Fin (suc n)
toℕ : ∀ {n} → Fin n ... |
{-# OPTIONS --allow-unsolved-metas #-}
open import bool
open import bool-thms2
open import eq
open import maybe
open import product
open import product-thms
open import bool-relations using (transitive ; total)
module z05-01-hc-sorted-list
(A : Set) -- type of elements
(_≤A_ : A → A → 𝔹) ... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Truncation where
open import Cubical.HITs.Truncation.Base public
open import Cubical.HITs.Truncation.Properties public
|
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Definition
open import Setoids.Setoids
open import Rings.Definition
open import Sets.EquivalenceRelations
open import Rings.Ideals.Definition
open import Rings.IntegralDomains.Definition
open import Rings.Ideals.Prime.Def... |
{-A
Polynomials over commutative rings
==================================
-}
{-# OPTIONS --safe #-}
----------------------------------
module Cubical.Algebra.Polynomials.Univariate.Base where
open import Cubical.HITs.PropositionalTruncation
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLev... |
-- This module gives an introduction to the module system of Agda.
module Introduction.Modules where
---------------------------------------------------------------------------
-- Simple sub-modules
---------------------------------------------------------------------------
-- As mentioned in 'Introduction.Basics' ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Morphism.Cartesian where
open import Level
open import Categories.Category
open import Categories.Functor hiding (_≡_; _∘_)
record CartesianProperties {o₀ ℓ₀ e₀} {o₁ ℓ₁ e₁}
{E : Category o₀ ℓ₀ e₀} {B : Category o₁ ℓ₁ e₁}
... |
------------------------------------------------------------------------
-- Paolo Capriotti's variant of higher lenses
------------------------------------------------------------------------
{-# OPTIONS --cubical #-}
import Equality.Path as P
module Lens.Non-dependent.Higher.Capriotti
{e⁺} (eq : ∀ {a p} → P.Equal... |
open import Common.Equality
open import Common.Prelude hiding (pred)
pred : Nat → Nat
pred = _∸ 1
T : Bool → Set
T = if_then ⊤ else ⊥
if : {A : Set} (b : Bool) → A → A → A
if b = if b then_else_
test₁ : Nat → Nat
test₁ = 5 +_
test₁-test : ∀ x → test₁ x ≡ 5 + x
test₁-test _ = refl
test₂ : Nat → Nat
test₂ = _* 5
t... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Directed acyclic multigraphs
------------------------------------------------------------------------
-- A representation of DAGs, based on the idea underlying Martin
-- Erwig's FGL. Note that this representatio... |
import cedille-options
module interactive-cmds (options : cedille-options.options) where
open import lib
open import functions
open import cedille-types
open import conversion
open import ctxt
open import general-util
open import monad-instances
open import spans options {id}
open import subst
open import syntax-util... |
open import Agda.Primitive
open import Categories.Category
module SecondOrder.IndexedCategory where
IndexedCategory : ∀ {i o l e} (I : Set i) (𝒞 : Category o l e) → Category (i ⊔ o) (i ⊔ l) (i ⊔ e)
IndexedCategory I 𝒞 =
let open Category 𝒞 in
record
{ Obj = I → Obj
; _⇒_ = λ A B → ∀ i → A i... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed applicative functors
------------------------------------------------------------------------
-- Note that currently the applicative functor laws are not included
-- here.
{-# OPTIONS --without-K --safe... |
open import Prelude
module Typed
(Name : Set)
-- Data stuff
(Datatype : Name -> List (List Name))
-- Effect stuff
(Effect : Set)
(_⊆_ : Effect -> Effect -> Set)
(Monad : Effect -> Set -> Set)
(return : forall {M A} -> A -> Monad M A)
(map : forall {M A B} -> (A -> B) -> Monad M A -> Monad... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Functions.Definition
open import Numbers.Naturals.Definition
open import Sets.FinSet.Definition
module Sets.Cardinality.Finite.Definition where
record FiniteSet {a : _} (A : Set a) : Set a where
field
size : ℕ
mapping : FinSet size → A
bij ... |
{-# OPTIONS --without-K --safe #-}
module Util.Prelude where
open import Data.Bool public using
(Bool ; true ; false)
open import Data.Empty public using
(⊥ ; ⊥-elim)
open import Data.Fin public using
(Fin ; zero ; suc)
open import Data.List public using
(List ; [] ; _∷_)
open import Data.Maybe public using
... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Adjoint
open import Categories.Category
open import Categories.Functor renaming (id to idF)
module Categories.Adjoint.Monadic.Properties {o ℓ e o′ ℓ′ e′} {𝒞 : Category o ℓ e} {𝒟 : Category o′ ℓ′ e′}
{L : Functor �... |
{-# OPTIONS --universe-polymorphism #-}
open import Common.Prelude
open import Common.Level
open import Common.Reflect
module UnquoteSetOmega where
`Level : Term
`Level = def (quote Level) []
``Level : Type
``Level = el (lit 0) `Level
-- while building the syntax of ∀ ℓ → Set ℓ (of type Setω) is harmless
`∀ℓ→Setℓ :... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Truncation
open import lib.types.Pi
module lib.types.Choice where
unchoose : ∀ {i j} {n : ℕ₋₂} {A : Type i} {B : A → Type j}
→ Trunc n (Π A B) → Π A (Trunc n ∘ B)
unchoose = Trunc-rec (Π-level λ _ → Trunc-level) (λ f → [_] ∘ f)
h... |
{-# OPTIONS --cubical --safe #-}
module Data.Binary.Multiplication where
open import Data.Binary.Definition
open import Data.Binary.Addition
double : 𝔹 → 𝔹
double 0ᵇ = 0ᵇ
double (1ᵇ xs) = 2ᵇ double xs
double (2ᵇ xs) = 2ᵇ 1ᵇ xs
infixl 7 _*_
_*_ : 𝔹 → 𝔹 → 𝔹
0ᵇ * ys = 0ᵇ
1ᵇ xs * ys = ys + double (ys * xs)
2ᵇ x... |
------------------------------------------------------------------------
-- Instantiation of Contractive for functions
------------------------------------------------------------------------
-- Taken from the paper.
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open import Contractive... |
{-# OPTIONS --rewriting #-}
{-# OPTIONS --allow-unsolved-metas #-}
open import Common.Equality
{-# BUILTIN REWRITE _≡_ #-}
postulate
A : Set
f : A → A
a b c : A
fa-to-b : f a ≡ b
fx-to-c : ∀ x → f x ≡ c
{-# REWRITE fa-to-b #-}
{-# REWRITE fx-to-c #-}
test₁ : f a ≡ b
test₁ = refl
x : A
test₂ : f x ≡ c
t... |
data Type : Set where
A B : Type
f : Type → Type → Type
f A t = t
f t = {!t!}
-- WAS: Case-splitting t yields an internal error on Agda/TypeChecking/Coverage.hs:467
-- SHOULD: produce the following definition:
-- f : Type → Type → Type
-- f A t = t
-- f B = {!!}
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.HomSequence
module cohomology.Theory where
-- [i] for the universe level of the group
record CohomologyTheory i : Type (lsucc i) where
{- functorial parts -}
field
C : ℤ → Ptd i → Group i
C-is-abelian : (n : ℤ) (X : Ptd i) → is-... |
module HyperReal where
open import Data.Nat
open import Data.Nat.Properties
open import Data.Empty
open import Relation.Nullary using (¬_; Dec; yes; no)
open import Level renaming ( suc to succ ; zero to Zero ; _⊔_ to _L⊔_ )
open import Relation.Binary.PropositionalEquality hiding ( [_] )
open import Relation.Binary.... |
module Data.Tuple.Equiv.Id where
import Lvl
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Data.Tuple.Equiv
open import Relator.Equals
open import Relator.Equals.Proofs.Equiv
open import Structure.Function
open import Structure.Function.Domain
open import Structure.Operator
open import Type
privat... |
-- Syntax of a second-order language
module SOAS.Metatheory.Syntax {T : Set} where
open import SOAS.Families.Core {T}
open import SOAS.Families.Build
open import SOAS.Common
open import SOAS.Context
open import Categories.Object.Initial
open import SOAS.Construction.Structure
open import SOAS.ContextMaps.Inductive
o... |
{-# OPTIONS --inversion-max-depth=10 #-}
open import Agda.Builtin.Nat
data _×_ (A B : Set) : Set where
_,_ : A → B → A × B
F : Nat → Set
F zero = Nat
F (suc n) = Nat × F n
f : (n : Nat) → F n
f zero = zero
f (suc n) = n , f n
mutual
n : Nat
n = _
test : F n
test = f (suc n)
|
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
-- Nils' idea about databases in the Agda mailing list.
-- http://thread.gmane.org/gmane.comp.lang.agda/2911/focus=2917
module DataBase where
inf... |
--------------------------------------------------------------------------------
-- White or blacklisting of characters
--------------------------------------------------------------------------------
module Parse.MultiChar where
import Data.List.NonEmpty as NE
open import Data.String hiding (show)
open import Prelu... |
module #4 where
open import Data.Nat
open import Data.Product
{-
Exercise 1.4. Assuming as given only the iterator for natural numbers
iter : ∏ C → (C → C) → N → C
C:U
with the defining equations
iter(C, c0, cs, 0) :≡ c0
iter(C, c0, cs, succ(n)) :≡ cs(iter(C, c0, cs, n)),
derive a function havin... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- An example showing how the Debug.Trace module can be used
------------------------------------------------------------------------
{-# OPTIONS --without-K #-}
module README.Debug.Trace where
------------------... |
open import Nat
open import Prelude
open import dynamics-core
open import lemmas-gcomplete
module lemmas-complete where
-- no term is both complete and indeterminate
lem-ind-comp : ∀{d} → d dcomplete → d indet → ⊥
lem-ind-comp DCNum ()
lem-ind-comp (DCPlus comp comp₁) (IPlus1 ind fin) = lem-ind-comp comp ind
... |
{-# OPTIONS --cubical #-}
module Issue4365 where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
open import Agda.Builtin.String
postulate
s : String
_ : primTransp (\ i → String) i0 s ≡ s
_ = \ _ → s
|
{-
An simpler definition of truncation ∥ A ∥ n from n ≥ -1
Note that this uses the HoTT book's indexing, so it will be off
from `∥_∥_` in HITs.Truncation.Base by -2
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Truncation.FromNegOne.Base where
open import Cubical.Data.NatMinusOne renami... |
module CantOpenConstructorsFromRecordModule where
module Datatypes where
record Foo : Set where
constructor foo
ok : Datatypes.Foo
ok = Datatypes.foo
open Datatypes.Foo
bad : Datatypes.Foo
bad = foo |
-- ASR (29 September 2014). Adapted from the example in issue 1269.
-- Case: quote η-reduced and quoteTerm η-reduced.
open import Common.Equality
open import Common.Level
open import Common.Prelude renaming (Nat to ℕ)
open import Common.Product
open import Common.Reflection
data Even : ℕ → Set where
isEven0 : Ev... |
-- Author: David Darais
--
-- This is a dependent de Bruijn encoding of STLC with proofs for
-- progress and preservation. This file has zero dependencies and is
-- 100% self-contained.
--
-- Because there is only a notion of well-typed terms (non-well-typed
-- terms do not exist), preservation is merely by observation... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of Rational numbers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Rational.Properties where
open import Function using (_∘_ ... |
module Common.UntypedContext where
open import Common.Context public
-- Naturals, as a projection of contexts.
ᴺ⌊_⌋ : ∀ {U} → Cx U → ℕ
ᴺ⌊ ∅ ⌋ = zero
ᴺ⌊ Γ , A ⌋ = suc ᴺ⌊ Γ ⌋
-- Inversion principle for naturals.
invsuc : ∀ {n n′} → ℕ.suc n ≡ suc n′ → n ≡ n′
invsuc refl = refl
-- Finite naturals, or nameless ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Foundations.HLevels' where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
open import Cubical.Foundation... |
{-# OPTIONS --allow-unsolved-metas #-}
module _ where
open import Agda.Primitive
postulate Applicative : ∀ {a b} (F : Set a → Set b) → Set (lsuc a ⊔ b)
record Traversable {a} (T : Set a) : Set (lsuc a) where
constructor mkTrav
field traverse : ∀ {F} {{AppF : Applicative F}} → T → F T
-- unsolved metas in typ... |
record _×_ (A B : Set) : Set where
constructor _,_
field
fst : A
snd : B
open _×_
app : {A B : Set} → (A → B) × A → B
app (f , x) = f x
data D : Set where d : D
postulate
P : {A : Set} → A → Set
p : (f : D → D) → P f → P (f d)
foo : (F : Set → Set) → F D
bar : (F : Set → Set) → P (foo F)
q... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use Data.Vec.Recursive instead.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Product.N-ary where
{-#... |
-- Andreas, 2011-04-11 adapted from Data.Nat.Properties
{-# OPTIONS --universe-polymorphism #-}
module FrozenMVar2 where
open import Imports.Level
data _≡_ {a} {A : Set a} (x : A) : A → Set a where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
{-# BUILTIN REFL refl #-}
cong : ∀ {a b} {A : Set a} {B : Set b}
... |
module Numeral.Natural.Inductions where
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Functional
open import Numeral.Natural
import Numeral.Natural.Induction
open import Numeral.Natural.Oper
open import Numeral.Natural.Oper.Proofs
open import Numeral.Natural.... |
open import Prelude
module Implicits.Resolution.Deterministic.Resolution where
open import Data.Fin.Substitution
open import Data.List
open import Data.List.All
open import Implicits.Syntax
open import Implicits.Syntax.Type.Unification
open import Implicits.Substitutions
open import Extensions.ListFirst
infixl 4 _⊢... |
module WrongNumberOfConstructorArguments where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
f : Nat -> Nat
f (zero n) = n
f suc = zero
|
{-# OPTIONS --subtyping #-}
open import Agda.Builtin.Equality
record _↠_ (A B : Set) : Set where
field
to : A → B
from : B → A
to∘from : ∀ x → to (from x) ≡ x
record Erased (@0 A : Set) : Set where
constructor [_]
field
@0 erased : A
open Erased
-- fails : {A : Set} → A ↠ Erased A
-- ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Categories where
open import Level
open import Categories.Category
open import Categories.Functor
Categories : ∀ o ℓ e → Category (suc (o ⊔ ℓ ⊔ e)) (o ⊔ ℓ ⊔ e) (o ⊔ ℓ ⊔ e)
Categories o ℓ e = record
{ Obj = Category o ℓ e
; _⇒_ = Functor
; _≡_ = _≡_
;... |
------------------------------------------------------------------------
-- A sequential colimit for which everything except for the "base
-- case" is erased
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
-- The definition of sequential colimits and th... |
open import Agda.Builtin.Nat
data Vec (A : Set) : Nat -> Set where
[] : Vec A 0
cons : {n : Nat} -> A -> Vec A n -> Vec A (suc n)
empty : Vec Nat 0
empty = []
|
------------------------------------------------------------------------------
-- The unary numbers are FOTC total natural numbers
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univer... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Equational.Theory
module Fragment.Equational.Model (Θ : Theory) where
open import Fragment.Equational.Model.Base Θ public
open import Fragment.Equational.Model.Synthetic Θ public
open import Fragment.Equational.Model.Properties Θ public
open impor... |
{-
This file contains:
- Some alternative inductive definitions of James, and they give the same results.
The most relevant one is called `𝕁Red` because it is much simpler.
It has fewer constructors, among which the 2-dimensional constructor `coh`
has a form essentially more clearer, and it avoids indexes.
... |
{-# OPTIONS --allow-unsolved-metas #-}
module Issue3256.B where
f : (a : Set) -> a -> a
f a y = {!!} y
|
module examplesPaperJFP.SpaceShipAdvanced where
open import SizedIO.Base
open import StateSizedIO.GUI.BaseStateDependent
open import Data.Bool.Base
open import Data.List.Base
open import Data.Integer
open import Data.Product hiding (map)
open import SizedIO.Object
open import SizedIO.IOObject
open import NativeIO... |
data Nat : Set where
zero : Nat
suc : Nat → Nat
pattern plus-two n = suc (suc n)
f : Nat → Nat
f (plus-two n) = f n
f (suc zero) = plus-two zero
f zero = zero
|
module chap0 where
open import Data.List
open import Data.Nat hiding (_⊔_)
-- open import Data.Integer hiding (_⊔_ ; _≟_ ; _+_ )
open import Data.Product
A : List ℕ
A = 1 ∷ 2 ∷ []
data Literal : Set where
x : Literal
y : Literal
z : Literal
B : List Literal
B = x ∷ y ∷ z ∷ []
ListProduct : {A B : Set... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
------------------------------------------------------------------------------
-- The translation from pattern matching equations to equational
-- ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Experiments.ZCohomologyOld.KcompPrelims where
open import Cubical.ZCohomology.Base
open import Cubical.Homotopy.Connected
open import Cubical.HITs.Hopf
-- open import Cubical.Homotopy.Freudenthal hiding (encode)
open import Cubical.HITs.Sn
open import C... |
------------------------------------------------------------------------
-- Unary relations
------------------------------------------------------------------------
module Relation.Unary where
open import Data.Empty
open import Data.Function
open import Data.Unit
open import Data.Product
open import Data.Sum
open imp... |
module main where
open import prelude
open import defns
open import lemmas
BackTheorem : ∀ {D} {H H′ H″ : NavigationHistory(D)} {δ δ′} →
(WellFormed(H)) →
(H traverses-by (-ve δ) to H′) →
(H′ traverses-by δ′ to H″) →
(H traverses-by (-ve δ + δ′) to H″)
BackTheorem {δ = zero} H∈WF (back nil ds∈CGB ds∈BT) H′... |
{-
This file contains:
- Properties of 2-groupoid truncations
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.2GroupoidTruncation.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.2GroupoidTruncation.Base
rec : ∀ {ℓ ℓ'} {A : Type ℓ} {B... |
------------------------------------------------------------------------
-- The structure identity principle can be used to establish that
-- isomorphism coincides with equality (assuming univalence)
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open impor... |
module Thesis.Contexts where
open import Thesis.Types
-- Instantiate generic Context support
open import Base.Syntax.Context Type public
|
-- {-# OPTIONS -v tc.meta:30 #-}
{-# OPTIONS --sized-types #-}
module GiveSize where
postulate Size : Set
postulate ∞ : Size
{-# BUILTIN SIZE Size #-}
-- {-# BUILTIN SIZEINF ∞ #-}
id : Size → Size
id i = {!i!}
|
module par-swap.union-properties where
open import par-swap
open import par-swap.union-confluent
open import par-swap.confluent
open import sn-calculus
open import sn-calculus-props
open import Esterel.Lang
open import Esterel.Lang.Binding
open import Esterel.Lang.Properties
open import Esterel.Context
open import Est... |
{-# OPTIONS --injective-type-constructors #-}
module InjectiveTypeConstructors where
data D (A : Set) : Set where
data _==_ (A : Set) : Set → Set where
refl : A == A
injD : ∀ {A B} → D A == D B → A == B
injD refl = refl
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Subsets of finite sets
------------------------------------------------------------------------
module Data.Fin.Subset where
open import Algebra
import Algebra.Properties.BooleanAlgebra as BoolAlgProp
import Al... |
module Subst where
import Level
postulate Ty : Set
data Cxt : Set where
ε : Cxt
_,_ : (Γ : Cxt) (A : Ty) → Cxt
_++_ : Cxt → Cxt → Cxt
Γ ++ ε = Γ
Γ ++ (Δ , A) = (Γ ++ Δ) , A
data Tm : Cxt → Ty → Set where
vz : ∀ {Γ A} → Tm (Γ , A) A
other : ∀ {Γ A} → Tm Γ A
data _≡_ {a}{A : Set a}(x : A) : A → Set... |
{-# OPTIONS --without-K --exact-split --safe #-}
module 07-finite-sets where
import 06-universes
open 06-universes public
--------------------------------------------------------------------------------
{- Section 7.1 The finite types -}
{- Definition 7.1.1 -}
{- We introduce the finite types as a family indexed ... |
------------------------------------------------------------------------------
-- Testing polymorphic lists using data types
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-pol... |
-- Andreas, 2020-05-27 AIM XXXII, issue 4679
-- reported by Ayberk Tosun.
{-# OPTIONS --safe --cubical #-}
-- {-# OPTIONS -v tc.def.fun:10 #-}
-- {-# OPTIONS -v tc.cover.iapply:10 #-}
open import Agda.Primitive.Cubical renaming (primTransp to transp)
open import Agda.Builtin.Cubical.Path using (_≡_)
data ⊥ : Set wh... |
------------------------------------------------------------------------------
-- Proving properties without using pattern matching on refl
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --... |
module Issue329 where
mutual
infixl 0 D Undeclared
data D : Set where
|
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
module Categories.Object.SubobjectClassifier {o ℓ e} (C : Category o ℓ e) where
open Category C
open import Level
open import Categories.Object.Terminal
open import Categories.Morphisms
open import Categories.Pullback
record SubobjectClassifi... |
import Lvl
open import Type
open import Structure.Setoid
module Type.Singleton {ℓ ℓₑ : Lvl.Level} {X : Type{ℓ}} ⦃ equiv : Equiv{ℓₑ}(X) ⦄ where
open import Functional
open import Function.Domains
open import Logic.Predicate
-- A type with only a single object
Singleton : X → Type{ℓₑ Lvl.⊔ ℓ}
Singleton(x) = ∃(Fib... |
open import SingleSorted.AlgebraicTheory
open import Agda.Primitive using (lzero; lsuc; _⊔_)
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import SingleSorted.Substitution
open import Data.Nat using (ℕ; zero; suc; _+_; _*_)
module SingleSorted.Group where
data GroupOp : Set where
e : Grou... |
module Languages.FILL.AgdaInterface where
open import nat
open import Utils.HaskellTypes
open import Utils.Exception
open import Languages.FILL.Intermediate
open import Languages.FILL.Syntax
translate : ITerm → Either Exception Term
translate = translate' 0 0
where
-- n : the next fresh bound variable name
--... |
module NotStrictlyPositiveInMutual where
mutual
data Cheat : Set where
cheat : Oops -> Cheat
data Oops : Set where
oops : (Cheat -> Cheat) -> Oops
|
{-# OPTIONS --safe #-}
module Definition.Conversion.Whnf where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Conversion
open import Tools.Product
mutual
-- Extraction of neutrality from algorithmic equality of neutrals.
ne~↑! : ∀ {t u A Γ l}
→ Γ ⊢ t ~ u ↑! A ^ l
... |
{-# OPTIONS --allow-unsolved-metas #-}
module Putil where
open import Level hiding ( suc ; zero )
open import Algebra
open import Algebra.Structures
open import Data.Fin hiding ( _<_ ; _≤_ ; _-_ ; _+_ ; _≟_)
open import Data.Fin.Properties hiding ( <-trans ; ≤-trans ; ≤-irrelevant ; _≟_ ) renaming ( <-cmp to <-fcmp ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.