text stringlengths 4 690k |
|---|
module #12 where
{-
Using the propositions as types interpretation, derive the following tautologies.
(i) If A, then (if B then A).
(ii) If A, then not (not A).
(iii) If (not A or not B), then not (A and B).
-}
open import Data.Product
open import Data.Sum
open import Relation.Nullary
const : {A B : Set} → A... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Induction over Fin
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Fin.Induction where
open import Data.Nat.Base using (ℕ)
open import Da... |
{-# OPTIONS --type-in-type #-}
module TooFewArgs where
open import AgdaPrelude
myFun : (a : Set) -> a -> a -> a
myFun a x y = x
myApp : Nat
myApp = myFun _ Zero
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Closed {o ℓ e} (C : Category o ℓ e) where
private
module C = Category C
open C
variable
A B X X′ Y Y′ Z Z′ U V : Obj
f g : A ⇒ B
open Commutation
open import Level
open import Data.Product using (Σ; _,_)
o... |
{-# OPTIONS --prop --rewriting #-}
module Examples.Gcd.Spec where
open import Calf.CostMonoid
import Calf.CostMonoids as CM
open import Calf CM.ℕ-CostMonoid
open import Calf.Types.Nat
open import Examples.Gcd.Euclid
open import Examples.Gcd.Clocked
open import Data.Nat.DivMod
open import Data.Nat
open import Relat... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The free monad construction on indexed containers
------------------------------------------------------------------------
module Data.Container.Indexed.FreeMonad where
open import Level
open import Function hi... |
{-# OPTIONS --type-in-type --no-termination-check --no-positivity-check
#-}
module Data1 where
_-_ : {A : Set}{B : A -> Set}{C : (a : A) -> B a -> Set} ->
({a : A}(b : B a) -> C a b) -> (f : (a : A) -> B a) ->
(a : A) -> C a (f a)
f - g = \ x -> f (g x)
id : {X : Set} -> X -> X
id x = x
konst : {S : Se... |
{-# OPTIONS --no-positivity-check #-}
module Generics where
data Zero : Set where
data One : Set where
∙ : One
data _+_ (A B : Set) : Set where
inl : A -> A + B
inr : B -> A + B
data _×_ (A : Set)(B : A -> Set) : Set where
<_,_> : (x : A) -> B x -> A × B
data _==_ {A : Set}(x : A) : A -> Set where
refl ... |
{-# OPTIONS --cubical-compatible --guardedness #-}
module Common.Coinduction where
open import Agda.Builtin.Coinduction public
private
my-♯ : ∀ {a} {A : Set a} → A → ∞ A
my-♯ x = ♯ x
|
module New.Changes where
open import Data.Product public hiding (map)
open import Data.Sum public hiding (map)
open import Data.Unit.Base public
open import Relation.Binary.PropositionalEquality public hiding ([_])
open import Postulate.Extensionality public
open import Level
open import Theorem.Groups-Nehemiah publ... |
module Issue620 where
module A where
postulate _+_*_ : Set → Set → Set → Set
postulate X : Set
2X : Set
2X = X A.+ X * X
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Complete.Properties {o ℓ e} (C : Category o ℓ e) where
open import Level
open import Data.Product
open import Relation.Binary
open import Categories.Category.Complete
open import Categories.Category.Complete.Finitely
open ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Papers.Synthetic where
-- Cubical synthetic homotopy theory
-- Mörtberg and Pujet, „Cubical synthetic homotopy theory“.
-- https://dl.acm.org/doi/abs/10.1145/3372885.3373825
-- 2.1
import Agda.Builtin.Cubical.Path as Path
import Cubical.Fo... |
{-# OPTIONS --without-K #-}
module well-typed-syntax-interpreter-full where
open import common public
open import well-typed-syntax
open import well-typed-syntax-interpreter
Contextε⇓ : Context⇓ ε
Contextε⇓ = tt
Typε⇓ : Typ ε → Set max-level
Typε⇓ T = Typ⇓ T Contextε⇓
Termε⇓ : {T : Typ ε} → Term T → Typε⇓ T
Termε⇓ t... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import stash.modalities.Orthogonality
module stash.modalities.Nullification where
module _ {i} where
postulate -- HIT
P⟨_⟩ : (A X : Type i) → Type i
p[_] : {A X : Type i} → X → P⟨ A ⟩ X
is-orth : {A X : Type i} → ⟦ A ⊥ P⟨ A ⟩ X ⟧
module... |
module Categories where
open import Library
record Cat {a b} : Set (lsuc (a ⊔ b)) where
field Obj : Set a
Hom : Obj → Obj → Set b
iden : ∀{X} → Hom X X
comp : ∀{X Y Z} → Hom Y Z → Hom X Y → Hom X Z
idl : ∀{X Y}{f : Hom X Y} → comp iden f ≅ f
idr : ∀{X Y}{f : Hom X Y} → co... |
module list where
module List (A : Set) where
data List : Set where
nil : List
_::_ : A -> List -> List
_++_ : List -> List -> List
nil ++ ys = ys
(x :: xs) ++ ys = x :: (xs ++ ys)
|
module x01-842Naturals-hc-2 where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
{-# BUILTIN NATURAL ℕ #-}
one : ℕ
one = suc zero
two : ℕ
two = suc (suc zero)
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎)
seven : ℕ
seven = suc (suc (suc (su... |
{-
A 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.Base where
open import Cubical.Data.NatMinusOne renaming (suc₋₁ to... |
{-# OPTIONS --guardedness-preserving-type-constructors #-}
open import Agda.Builtin.Coinduction
open import Agda.Builtin.IO
open import Agda.Builtin.Unit
data Rec (A : ∞ Set) : Set where
fold : ♭ A → Rec A
D : Set
D = Rec (♯ (∞ D))
d : D
d = fold (♯ d)
postulate
seq : {A B : Set} → A → B → B
return : {A :... |
module FlatDomInequality-2 where
postulate
A : Set
h : (@♭ x : A) → A
h x = x
q : A → A
q = h
|
module thms where
open import bool-thms public
open import bool-thms2 public
open import list-thms public
open import list-thms2 public
open import maybe-thms public
open import product-thms public
open import string-thms public
open import sum-thms public
open import nat-thms public
open import trie-thms public |
{-# OPTIONS --no-positivity-check #-}
open import Prelude hiding (id; Bool; _∷_; [])
module Examples.Bad where
data TC : Set where
tc-int : TC
tc-bool : TC
tc-char : TC
_tc≟_ : (a b : TC) → Dec (a ≡ b)
tc-int tc≟ tc-int = yes refl
tc-int tc≟ tc-bool = no (λ ())
tc-bool tc≟ tc-int = no (λ ())
tc-bool tc≟ tc-boo... |
module nouse_CollatzProof where
open import Data.Nat
-- 偽
data ⊥ : Set where
-- 真
record ⊤ : Set where
-- 選言
data _∨_ (P Q : Set) : Set where
∨Intro1 : P → P ∨ Q
∨Intro2 : Q → P ∨ Q
∨Elim : {P Q R : Set} → P ∨ Q → (P → R) → (Q → R) → R
∨Elim (∨Intro1 a) prfP _ = prfP a
∨Elim (∨Intro2 b) _ prfQ =... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Definition of and lemmas related to "true infinitely often"
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Nat.InfinitelyOften where
ope... |
-- 2010-10-14
{-# OPTIONS --universe-polymorphism #-}
module FakeProjectionsDoNotPreserveGuardedness where
-- Coinduction is only available with universe polymorphism
postulate
Level : Set
zero : Level
suc : (i : Level) → Level
_⊔_ : Level → Level → Level
{-# BUILTIN LEVEL Level #-}
{-# BUILTIN LEVELZ... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Sigma
open import lib.types.Span
open import lib.types.Pointed
open import lib.types.Pushout
module lib.types.Join where
module _ {i j} (A : Type i) (B : Type j) where
*-span : Span
*-span = span A B (A × B) fst snd
_*_ : Type _
_*_ ... |
module RandomAccessList.Redundant.Core.Properties where
open import BuildingBlock
open import BuildingBlock.BinaryLeafTree using (BinaryLeafTree; Node; Leaf)
open import RandomAccessList.Redundant.Core
open import Data.Num.Redundant
open import Data.Num.Redundant.Properties
open import Data.Nat using (ℕ; zero; suc)
... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Equational.Theory
module Fragment.Equational.Model.Synthetic (Θ : Theory) where
open import Fragment.Algebra.Signature
open import Fragment.Algebra.Algebra (Σ Θ)
open import Fragment.Algebra.Free (Σ Θ)
open import Fragment.Algebra.Homomorphism (Σ ... |
------------------------------------------------------------------------------
-- Simple example of a nested recursive function
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-... |
-- Jesper, 2015-12-18: the helper function shouldn't be accepted, since it
-- matches on a heterogeneous equality and the equation between the types
-- Box A and Box B cannot be solved without injective type constructors.
data Box (A : Set) : Set where
[_] : A → Box A
data _≡_ (A : Set) : Set → Set₁ where
refl : ... |
module sum-downFrom where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; cong)
open Eq.≡-Reasoning
open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_; _≤_; s≤s; z≤n)
open import Data.Nat.Properties using
(*-suc; *-identityʳ; *-distribʳ-+; *-distribˡ-∸; +-∸-assoc; +-∸-comm; m+n... |
open import Categories
open import Functors
open import RMonads
module RMonads.REM {a b c d}{C : Cat {a}{b}}{D : Cat {c}{d}}{J : Fun C D}
(M : RMonad J) where
open import Library
open RMonad M
open Fun
record RAlg : Set (a ⊔ c ⊔ d) where
constructor ralg
open Cat D
field acar : Obj
a... |
module Data.Bool.Instance where
open import Class.Equality
open import Class.Show
open import Data.Bool
open import Relation.Binary.PropositionalEquality
open import Relation.Nullary
instance
Bool-Eq : Eq Bool
Bool-Eq = record { _≟_ = helper }
where
helper : ∀ (x y : Bool) → Dec (x ≡ y)
helper fal... |
module Type.Properties.Empty{ℓ} where
import Lvl
open import Type
-- A type is empty when "empty functions" exists for it, which essentially means that there are no objects with this type.
-- This is an useful definition because the empty type is not unique (There are an infinite number of "empty types").
-- An ... |
{-# OPTIONS --without-K --exact-split --safe #-}
module Fragment.Equational.Theory where
open import Fragment.Equational.Theory.Base public
|
{-# OPTIONS --without-K --safe #-}
module Cats.Limit where
open import Level
open import Cats.Category.Base
open import Cats.Category.Cones as Cones using
(Cone ; Cones ; ConesF ; cone-iso→obj-iso)
open import Cats.Category.Constructions.Terminal using (HasTerminal)
open import Cats.Category.Constructions.Unique us... |
module Generic.Lib.Equality.Congn where
open import Generic.Lib.Intro
open import Generic.Lib.Equality.Propositional
open import Generic.Lib.Data.Product
open import Generic.Lib.Data.Nat
open import Generic.Lib.Data.Pow
open import Generic.Lib.Data.Sets
zip≡ : ∀ {n αs} {As : Sets {n} αs} -> HList As -> HList As -> Se... |
postulate
A : Set
a : A
data D : A → Set where
d : (a : A) → D a
f : A → (D a → Set) → Set
f a f = f (d a)
-- Bad error:
-- a != a of type A
-- when checking that the pattern d a has type D a
-- Better error:
-- a != a of type A
-- (because one is a variable and one a defined identifier)
-- when checking that... |
module TermShape where
open import Relation.Unary using (_∈_; _⊆_)
open import Size
open import Library
open import Terms
open import Substitution
-- Evaluation contexts.
data ECxt (Γ : Cxt) : (a b : Ty) → Set where
appl : ∀ {a b} (u : Tm Γ a) → ECxt Γ (a →̂ b) b
-- Ehole Et E t ~~ Et = E[t]
data Ehole {Γ : C... |
-- There was a bug with the new constraint machinery
-- where a type error could be ignored and checking
-- continued.
module LostTypeError where
postulate
Wrap : (A : Set) (P : A → Set) → A → Set
wrap : ∀ A (P : A → Set) (x : A) → P x → Wrap A P x
A : Set
data Box : Set where
box : A → Box
data Dummy : S... |
{-# OPTIONS --type-in-type #-}
-- Also called "Girard's paradox" or "Russell's paradox".
module Miscellaneous.TypeInTypeInconsistency where
data ISet : Set where
set : ∀{I : Set} → (I → ISet) → ISet
open import Functional
open import Logic.Predicate
open import Logic.Propositional
open import Relator.Equals
open i... |
{-# OPTIONS --without-K #-}
open import Base
open import Spaces.Circle
open import Integers
module Spaces.LoopSpaceCircle where
-- Path fibration
path-fib : S¹ → Set
path-fib t = (t ≡ base)
tot-path-fib : Set
tot-path-fib = Σ S¹ path-fib
tot-path-fib-is-contr : is-contr tot-path-fib
tot-path-fib-is-contr = pathto... |
open import Oscar.Prelude
open import Oscar.Class.Reflexivity
open import Oscar.Class.Symmetry
open import Oscar.Class.Transitivity
module Oscar.Class.IsEquivalence where
record IsEquivalence
{𝔬} {𝔒 : Ø 𝔬}
{ℓ} (_≈_ : 𝔒 → 𝔒 → Ø ℓ)
: Ø 𝔬 ∙̂ ℓ where
constructor ∁
field
⦃ `𝓡eflexivity ⦄ : Reflexivit... |
module AmbiguousName where
module A where
postulate X : Set
module B where
module A where
postulate X : Set
open A renaming (X to Y)
open B
Z = A.X
|
module Lib.Id where
data _≡_ {A : Set}(x : A) : A -> Set where
refl : x ≡ x
cong : {A B : Set}(f : A -> B){x y : A} -> x ≡ y -> f x ≡ f y
cong f refl = refl
subst : {A : Set}(P : A -> Set){x y : A} -> x ≡ y -> P y -> P x
subst P refl px = px
|
module inspect where
open import eq
-- From Norell's tutorial:
data Inspect {A : Set}(x : A) : Set where
it : (y : A) -> x ≡ y -> Inspect x
inspect : {A : Set}(x : A) -> Inspect x
inspect x = it x refl
|
open import HoTT
open import groups.Exactness
open import groups.HomSequence
module groups.ExactSequence where
is-exact-seq : ∀ {i} {G H : Group i}
→ HomSequence G H → Type i
is-exact-seq (_ ⊣|ᴳ) = Lift ⊤
is-exact-seq (_ →⟨ φ ⟩ᴳ _ ⊣|ᴳ) = Lift ⊤
is-exact-seq (_ →⟨ φ ⟩ᴳ _ →⟨ ψ ⟩ᴳ seq) =
is-exact φ ψ × is-exact-seq ... |
------------------------------------------------------------------------
-- The partiality monad
------------------------------------------------------------------------
module Category.Monad.Partiality where
open import Coinduction
open import Category.Monad
open import Data.Nat
open import Data.Bool
-- The partial... |
module _ (A : Set) where
open import Issue1701.ModParamsToLose
module ParamA = Param A
open ParamA
failed : (A → A) → A → A
failed G = S.F
module fails where
module S = r A G
|
{-# OPTIONS --universe-polymorphism #-}
module Reflection where
open import Common.Prelude hiding (Unit; module Unit) renaming (Nat to ℕ; module Nat to ℕ)
open import Common.Reflect
data _≡_ {a}{A : Set a}(x : A) : A → Set a where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
{-# BUILTIN REFL refl #-}
data Id {A : Se... |
module tests.Mutual where
open import Prelude.IO
open import Prelude.String
open import Prelude.Unit
mutual
data G : Set where
GA : {g : G}(f : F g) -> G
GB : G
data F : G -> Set where
FA : (g : G) -> F g
FB : F GB
mutual
incG : G -> G
incG GB = GA FB
incG (GA f) = GA (incF f)
incF ... |
data A : Set where
consA : A → A
A-false : {Y : Set} → A → Y
A-false (consA b) = A-false b
data Nat : Set where
zero : Nat
suc : Nat → Nat
A-on-Nat : A → Nat → Nat
A-on-Nat σ zero = A-false σ
A-on-Nat σ (suc t) = suc (A-on-Nat σ t)
module _
(any : {X : Set} → X)
(P : Nat → Set)
(p : (n : Nat) → P n → P... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Core.Everything where
-- Basic primitives (some are from Agda.Primitive)
open import Cubical.Core.Primitives public
-- Definition of equivalences and Glue types
open import Cubical.Core.Glue public
-- Definition of cubical Identity types
open import C... |
-- Andreas, 2019-03-02, issue #3601 reported by 3abc
{-# OPTIONS --cubical --safe #-}
open import Agda.Primitive.Cubical renaming
(primINeg to ~_; primIMin to _∧_; primTransp to transp)
open import Agda.Builtin.Cubical.Path
module _ (A : Set) (x y z t : A) (f : y ≡ z) (g : y ≡ x) (h : z ≡ t) where
test : PathP... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax STLC | Λ
type
N : 0-ary
_↣_ : 2-ary | r30
term
app : α ↣ β α -> β | _$_ l20
lam : α.β -> α ↣ β | ƛ_ r10
theory
(ƛβ) b : α.β a : α |> app (lam(x.b[x]), a) = b[a]
(ƛη) f : α ↣ β |> la... |
open import bool
open import eq using (_≡_)
open import nat
open import nat-thms
open import z05-01-hc-slist2-base
module z05-01-hc-slist2-test where
data _R≤_ : ℕ → ℕ → Set where
z≤n : ∀ {n : ℕ}
--------
→ zero R≤ n
s≤s : ∀ {m n : ℕ}
→ m R≤ n
-------------
→ suc m R≤ suc n
≤-pr... |
module Data.Maybe.Primitive where
{-# IMPORT Data.Maybe #-}
-- In Agda 2.2.10 and below, there's no FFI binding for the stdlib
-- Maybe type, so we have to roll our own. This will change.
data #Maybe (X : Set) : Set where
just : X → #Maybe X
nothing : #Maybe X
{-# COMPILED_DATA #Maybe Data.Maybe.Maybe Data.Maybe.... |
open import Agda.Builtin.Bool
open import Agda.Builtin.List
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit
open import Agda.Builtin.Reflection
macro
printType : Term → TC ⊤
printType hole = bindTC (inferType hole) λ t → typeError (termErr t ∷ [])
test1 : (a : Nat) → Nat
test1 = {! printType !}
test2... |
module naturals where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
-- 1)
seven : ℕ
seven = suc (suc (suc (suc (suc (suc (suc zero))))))
{-# BUILTIN NATURAL ℕ #-}
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
_+_ : ℕ → ℕ → ℕ
zero + n = n
(suc m) + n = suc (m + n)
-- 2)
_ : 3 + 4 ≡ 7
_ =
begi... |
{-# OPTIONS --copatterns --sized-types #-}
-- {-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.conv:10 -v tc.conv.size:15 #-}
module Delay where
--open import Library
open import Size
open import Category.Monad
open import Level renaming (zero to lzero; suc to lsuc)
open import Relation.Binary public
import Relati... |
module Cats.Adjunction where
open import Level using (suc ; _⊔_)
open import Cats.Category
open import Cats.Category.Cat.Facts.Product using (First ; Second)
open import Cats.Category.Fun using (Fun)
open import Cats.Category.Op using (_ᵒᵖ)
open import Cats.Category.Product.Binary using (_×_)
open import Cats.Categor... |
-- Example usage of solver
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Functor renaming (id to idF)
module Experiment.Categories.Solver.Functor.Example
{o ℓ e o′ ℓ′ e′} {𝒞 : Category o ℓ e} {𝒟 : Category o′ ℓ′ e′}
(F : Functor 𝒞 𝒟)
where
open Category 𝒟
open ... |
postulate
P : (A : Set) → A → Set
X : Set
x : X
P' : (A : Set) → _
R : Set
R = P' _ x
P' = P
|
open import Level using (0ℓ)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; cong; cong₂; isEquivalence; setoid)
open import Relation.Binary.PropositionalEquality.WithK using (≡-irrelevant)
open import Data.Unit using (⊤; tt)
open import Agda.Builtin.FromNat using (Number)
open import Data.Product ... |
------------------------------------------------------------------------
-- Progress of CBV reductions in pure type systems (PTS)
------------------------------------------------------------------------
-- This module contains a variant of the "progress" theorem for PTS.
-- Progress says roughly that well-typed terms ... |
module Structure where
-- Structures in meta-functions.
module Function' where -- TODO: Temporary naming fix with tick
module Properties ⦃ signature : Signature ⦄ where
Type : Domain → Domain → Function → Formula
Type(X)(Y)(f) = ∀ₛ(X)(x ↦ f(x) ∈ Y)
Closed : Domain → Function → Formula
... |
module BasicIPC.Metatheory.Hilbert-TarskiConcreteGluedImplicit where
open import BasicIPC.Syntax.Hilbert public
open import BasicIPC.Semantics.TarskiConcreteGluedImplicit public
open ImplicitSyntax (_⊢_) public
-- Completeness with respect to a particular model.
module _ {{_ : Model}} where
reify : ∀ {A w} → w ⊩... |
open import Level hiding ( suc ; zero )
open import Algebra
module sym5n where
open import Symmetric
open import Data.Unit
open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_)
open import Function
open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero)
open import Relation.Nullary
open import D... |
-- Automatic solvers for equations over Gaussian Integers.
{-# OPTIONS --without-K --safe #-}
module GauInt.Solver where
import Algebra.Solver.Ring.Simple as Solver
import Algebra.Solver.Ring.AlmostCommutativeRing as ACR
open import GauInt.Properties
------------------------------------------------------------------... |
module Agda.Builtin.Size where
{-# BUILTIN SIZEUNIV SizeU #-}
{-# BUILTIN SIZE Size #-}
{-# BUILTIN SIZELT Size<_ #-}
{-# BUILTIN SIZESUC ↑_ #-}
{-# BUILTIN SIZEINF ω #-}
{-# BUILTIN SIZEMAX _⊔ˢ_ #-}
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.SuspSmash
open import homotopy.SuspSmashComm
module homotopy.IterSuspSmash where
module _ {i j} (X : Ptd i) (Y : Ptd j) where
Σ^∧-out : (n : ℕ) → ⊙Susp^ n X ∧ Y → Susp^ n (X ∧ Y)
Σ^∧-out O = idf _
Σ^∧-out (S n) = Susp-fmap (Σ^∧-out ... |
open import Everything
{-
open import Oscar.Prelude
open import Oscar.Class.HasEquivalence
open import Oscar.Class.Symmetrical
open import Oscar.Data.Fin
open import Oscar.Data.Term
open import Oscar.Data.Substitunction
open import Oscar.Data.Proposequality
open import Oscar.Data.Surjcollation
open import Oscar.Data.S... |
-- Andreas, 2014-06-11, issue reported by Ulf
-- {-# OPTIONS -v tc.check.internal:100 -v tc.conv.elim:40 #-}
postulate
Nat : Set
zero : Nat
module Projection where
record _×_ (A B : Set) : Set where
field fst : A
snd : B
open _×_
postulate
T : (Nat × Nat → Nat) → Set
foo : T fst... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Type(s) used (only) when calling out to Haskell via the FFI
------------------------------------------------------------------------
module Foreign.Haskell where
-- A unit type.
data Unit : Set where
unit : ... |
open import Prelude
module MJ.Classtable (c : ℕ) where
open import MJ.Classtable.Core c public
|
module TermIsomorphism where
open import OscarPrelude
open import Term
open import VariableName
open import FunctionName
open import Arity
open import Vector
open import Data.Fin using (fromℕ ; toℕ ) renaming (raise to raiseFin)
open import Unify using (i ; leaf ; _fork_) renaming (Term to STerm ; AList to SAList)
... |
module _ where
open import Agda.Builtin.Unit
open import Imports.Issue5583 tt
_ : X
_ = it
|
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _≡⟨_⟩_; _∎)
open import Data.Nat using (ℕ; zero; suc)
_+_ : ℕ → ℕ → ℕ
zero + n = n
suc m + n = suc (m + n)
+-assoc′ : ∀ m n p → (m + n) + p ≡ m + (n + p)
+-assoc′ zero n p = refl
+-assoc′ (suc... |
{-# OPTIONS --guardedness #-}
open import Agda.Builtin.Coinduction
open import Agda.Builtin.IO
open import Agda.Builtin.List
open import Agda.Builtin.Nat
open import Agda.Builtin.String
open import Agda.Builtin.Unit
private
variable
A : Set
postulate
putStrLn : String → IO ⊤
{-# FOREIGN GHC import qualified... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Maybe type
------------------------------------------------------------------------
module Data.Maybe where
open import Level
------------------------------------------------------------------------
-- The... |
module Issue2762-2 where
open import Agda.Builtin.List
open import Agda.Builtin.Equality
pattern [_] x = x ∷ []
singleton : {A : Set} → A → List A
singleton x = x ∷ []
{-# DISPLAY _∷_ x [] = singleton x #-}
_ : ∀ {A} (x : A) → singleton x ≡ [ x ]
_ = {!!}
|
import Lvl
module Type.Functions.Proofs {ℓₗ : Lvl.Level} where
open import Functional
import Function.Domains
import Lang.Irrelevance
import Logic.Predicate
import Logic.Predicate.Theorems
import Relator.Equals
import Relator.Equals.Proofs
open import Type
open import Type.Properties.Emp... |
open import Agda.Builtin.Nat
record C (A : Set) : Set where
module M (X : Set) where
module Ci = C {{...}}
module CiNat = M.Ci Nat -- error: The module M.Ci is not parameterized...
|
module map-is-fold-Tree where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; trans; cong)
open Eq.≡-Reasoning
open import map-Tree using (Tree; leaf; node; map-Tree)
open import fold-Tree using (fold-Tree)
postulate
-- 外延性の公理
extensionality : ∀ {A B : Set} {f g : A → B}
→ (... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Type(s) used (only) when calling out to Haskell via the FFI
------------------------------------------------------------------------
{-# OPTIONS --without-K #-}
module Foreign.Haskell where
open import Level
... |
open import Nat
open import Prelude
open import List
open import contexts
module core where
-- types
data typ : Set where
b : typ
⦇·⦈ : typ
_==>_ : typ → typ → typ
_⊗_ : typ → typ → typ
-- arrow type constructors bind very tightly
infixr 25 _==>_
infixr 25 _⊗_
-- we use natura... |
open import Prelude
module Implicits.Resolution.Finite.Expressiveness where
open import Coinduction
open import Data.Fin.Substitution
open import Implicits.Syntax
open import Implicits.Substitutions
open import Implicits.Resolution.Deterministic.Resolution as D
open import Implicits.Resolution.Ambiguous.Resolution as... |
module Numeral.Natural.LinearSearchDecidable where -- TODO: Maybe move and rename to Numeral.Natural.Sequence.BoundedSearch
-- TODO: Maybe more natural to use 𝕟 (finite naturals) instead of ℕ (naturals)?
open import Data.Boolean
open import Data.Boolean.Stmt
open import Data.List
import Data.List.Functions as Li... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Paths
module lib.types.Unit where
pattern tt = unit
⊙Unit : Ptd₀
⊙Unit = ⊙[ Unit , unit ]
-- Unit is contractible
instance
Unit-level : {n : ℕ₋₂} → has-level n Unit
Unit-level {n = ⟨-2⟩} = has-level-in (unit , λ y → idp)
Uni... |
open import Prelude
module Implicits.Resolution.Termination.Stack
where
open import Induction.WellFounded
open import Induction.Nat
open import Data.Fin.Substitution
open import Implicits.Syntax
open import Implicits.Substitutions
open import Implicits.Substitutions.Lemmas
open import Data.Nat hiding (_<_)
open imp... |
{-# OPTIONS --cubical-compatible --rewriting --confluence-check #-}
open import Agda.Primitive using (Level; _⊔_; Setω; lzero; lsuc)
module Issue4032 where
infix 4 _≡_
data _≡_ {ℓ : Level} {A : Set ℓ} (a : A) : A → Set ℓ where
refl : a ≡ a
{-# BUILTIN REWRITE _≡_ #-}
run : ∀ {ℓ} {A B : Set ℓ} → A ≡ B → A → B
ru... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Predicate transformers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Unary.PredicateTransformer where
open import Level hiding (_⊔_... |
{-# OPTIONS --without-K #-}
-- This should really be called FinSet. From nlab:
-- FinSet is the category of finite sets and all functions between
-- them: the full subcategory of Set on finite sets. It is easy (and
-- thus common) to make FinSet skeletal; there is one object for each
-- natural number n (including n=... |
------------------------------------------------------------------------
-- Equivalences
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- Partly based on Voevodsky's work on so-called univalent
-- foundations.
open import Equality
module Equivalence
{r... |
module Data.Char.Instance where
open import Agda.Builtin.Char
open import Class.Equality
open import Class.Show
open import Data.Char renaming (_≟_ to _≟C_)
open import Data.List
open import Data.String
instance
Char-Eq : Eq Char
Char-Eq = record { _≟_ = _≟C_ }
Char-EqB : EqB Char
Char-EqB = record { _≣_ = p... |
{-# OPTIONS --without-K --rewriting #-}
module lib.types.Types where
open import lib.Basics
open import lib.types.BigWedge public
open import lib.types.Bool public
open import lib.types.Choice public
open import lib.types.Circle public
open import lib.types.Cofiber public
open import lib.types.CommutingSquare public
... |
{-# OPTIONS --without-K --safe #-}
module Algebra.Linear.Core where
open import Relation.Binary
open import Relation.Nullary using (¬_)
open import Level using (_⊔_)
open import Data.Fin using (Fin; suc; zero)
VectorAddition : ∀ {c} -> Set c -> Set c
VectorAddition V = V -> V -> V
ScalarMultiplication : ∀ {c k} -> ... |
{-# OPTIONS --cubical --safe #-}
open import Prelude
open import Relation.Binary
module Relation.Binary.Construct.LowerBound {e} {E : Type e} {r} (totalOrder : TotalOrder E r) where
open TotalOrder totalOrder renaming (refl to ≤-refl)
import Data.Unit.UniversePolymorphic as Poly
import Data.Empty.UniversePolymorphi... |
module Logic.DiagonalMethod where
open import Functional
open import Logic.Predicate
open import Logic.Propositional
import Lvl
open import Relator.Equals
open import Relator.Equals.Proofs
open import Structure.Function.Domain
open import Structure.Operator
open import Structure.Relator.Properties
open import Syn... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.