text stringlengths 4 690k |
|---|
{-# OPTIONS --with-K -vtc.lhs.unify:50 #-}
open import Agda.Primitive using (Setω)
open import Agda.Builtin.Equality using (_≡_; refl)
-- change `Set` to `Setω` breaks `seq`
data RecD (I : Set) : Setω where
ι : (i : I) → RecD I
data RecO {I J : Set} (e : I → J) : RecD I → RecD J → Setω where
ι : (i : I) ... |
{-# OPTIONS --cubical --no-import-sorts --postfix-projections --safe #-}
module Cubical.Categories.Presheaf.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.HITs.PropositionalTruncation
open import Cubical.Categor... |
module UniqueFloatNaN where
-- See Issue: Inconsistency: Rounding op differentiates NaNs #3749
-- https://github.com/agda/agda/issues/3749
open import Agda.Builtin.Float
renaming ( primRound to round
; primFloor to floor
; primCeiling to ceiling
; primFloatNegate to -_
; ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some properties about integers
------------------------------------------------------------------------
module Data.Integer.Properties where
open import Algebra
import Algebra.FunctionProperties
import Algebra.... |
open import Nat
open import Prelude
open import List
open import contexts
open import judgemental-erase
open import moveerase
open import sensibility
open import statics-checks
open import statics-core
module examples where
-- actions must always specify enough names to name all inserted holes. depending on
-- th... |
module 050-group where
-- We need monoids.
open import 040-monoid
-- A group is a monoid where every element has an inverse. This is
-- equivalent to saying that we have a function mapping every element
-- to an inverse of that element: this function is called "invert"
-- below.
record Group
{M : Set}
(_==_ : M... |
------------------------------------------------------------------------------
-- Some properties of the function iter₀
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorp... |
{-# OPTIONS --without-K #-}
{- After a few preliminary lemmata about representing dependent functions,
this module will derive the dependent universal property of
our truncations (defined later) from the non-dependent one. -}
module Universe.Trunc.Universal where
open import lib.Basics
open import lib.Equivalen... |
-- notes-03-wednesday.agda
open import mylib
{-
Classical vs intuitionistic logic
In classical logica, we assume that each proposition is either true or false.
Excluded middle, tertium non datur (the third is not given).
To prove P, assume not P and derive a contradiction: indirect proof, reduction
ad absu... |
------------------------------------------------------------------------
-- Substitutions
------------------------------------------------------------------------
module RecursiveTypes.Substitution where
open import Data.Fin.Substitution
open import Data.Fin.Substitution.Lemmas
import Data.Fin.Substitution.List as Li... |
-- A tactic that applies congruence and symmetry of equality proofs.
-- Given a hole and a lemma it tries (in order)
-- - refl
-- - lemma
-- - sym lemma
-- - f $≡ X₁ *≡ .. *≡ Xₙ and recurses on Xᵢ
-- if the goal is f us ≡ f vs
-- Hidden and instance arguments of f are left alone.
module Tactic.Cong whe... |
------------------------------------------------------------------------
-- A definitional interpreter
------------------------------------------------------------------------
{-# OPTIONS --cubical --sized-types #-}
module Lambda.Partiality-monad.Inductive.Interpreter where
open import Equality.Propositional.Cubical... |
import Issue953
g : Set₁
g = Issue953.f
|
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
open import Agda.Builtin.Equality
open import Data.Product
open import Data.Sum
open import Data.Vec using (Vec; fromList; length) renaming (lookup to get)
open import Data.Fin using (Fin)
open i... |
open import Functional hiding (Domain)
import Structure.Logic.Classical.NaturalDeduction
import Structure.Logic.Classical.SetTheory.ZFC
module Structure.Logic.Classical.SetTheory.ZFC.Proofs {ℓₗ} {Formula} {ℓₘₗ} {Proof} {ℓₒ} {Domain} ⦃ classicLogic : _ ⦄ (_∈_ : Domain → Domain → Formula) ⦃ signature : _ ⦄ ⦃ a... |
open import FRP.JS.Bool using ( Bool ; not )
open import FRP.JS.Maybe using ( Maybe ; just ; nothing ; _≟[_]_ )
open import FRP.JS.Float using ( ℝ ; _≟_ ; -_ ; _+_ ; _*_ ; _-_ ; _/_ ; _/?_ ; _≤_ ; _<_ ; show )
open import FRP.JS.String using () renaming ( _≟_ to _≟s_ )
open import FRP.JS.QUnit using ( TestSuite ; ok ; ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cohomology.Theory
open import homotopy.PushoutSplit
open import homotopy.DisjointlyPointedSet
open import cw.CW
module cw.cohomology.WedgeOfCells {i} (OT : OrdinaryTheory i)
{n} (⊙skel : ⊙Skeleton {i} (S n)) where
open OrdinaryTheory OT
open impo... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
module Maybe where
data Maybe {a : _} (A : Set a) : Set a where
no : Maybe A
yes : A → Maybe A
joinMaybe : {a : _} → {A : Set a} → Maybe (Maybe A) → Maybe A
joinMaybe no = no
joinMaybe (yes s) = s
bindMaybe : {a b : _} → {A : Set a}... |
{-# OPTIONS --cubical --safe --no-import-sorts #-}
{-
Implements the monadic interface of propositional truncation, for reasoning in do-syntax.
-}
module Cubical.HITs.PropositionalTruncation.Monad where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Str... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Applicative functors on indexed sets (predicates)
------------------------------------------------------------------------
-- Note that currently the applicative functor laws are not included
-- here.
{-# OPTIO... |
-- Parameter arguments of overloaded projection applications
-- should not be skipped!
record R A : Set where
field f : A → A
open R
record S A : Set where
field f : A → A
open S
r : ∀{A} → R A
f r x = x
test : ∀{A : Set} → A → A
test a = f r a
|
module Issue4022.Import where
open import Agda.Builtin.Nat
Binary : Set
Binary = Nat → Nat → Nat
-- Search should be able to find `plus` if:
-- * either we do not normalise the type and look for `Binary`
-- * or we do normalise the type and look for `Nat`
plus : Binary
plus = _+_
|
{-
Functions building UARels and DUARels on function types
-}
{-# OPTIONS --no-exact-split --safe #-}
module Cubical.Displayed.Function where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open impor... |
-- AIM XXXV, 2022-05-06, issue #5891.
-- When checking that the sort of a data type admits data definitions
-- (checkDataSort), we need to handle the case of PiSort.
mutual
Univ1 = _
Univ2 = _
Univ3 = _
postulate
A1 : Univ1
A2 : Univ2
A : Univ3
A = A1 → A2
-- This demonstrates that the sort of... |
module Human.Equality where
data _==_ {A : Set} (x : A) : A -> Set where
refl : x == x
{-# BUILTIN EQUALITY _==_ #-}
sym : {A : Set} (x : A) (y : A) -> x == y -> y == x
sym x .x refl = refl
cong : {A : Set} {B : Set} (x : A) (y : A) (f : A -> B) -> x == y -> f x == f y
cong x y f refl = refl
|
module Issue271 where
data D (A : Set) : Set where
d : D A → D A
f : {A : Set} → D A → D A
f x = d {!!}
|
{-# OPTIONS --prop --rewriting #-}
open import Examples.Sorting.Parallel.Comparable
module Examples.Sorting.Parallel.MergeSortPar.Merge (M : Comparable) where
open Comparable M
open import Examples.Sorting.Parallel.Core M
open import Calf costMonoid
open import Calf.ParMetalanguage parCostMonoid
open import Calf.Ty... |
module Data.List.Instance where
open import Category.FAM
open import Data.List
open import Data.List.Properties
open import Function using (_$_)
open import Relation.Binary.PropositionalEquality hiding ([_])
instance
ListFunctor : ∀ {ℓ} → Functor {ℓ} List
ListFunctor = record
{ _<$>_ = map
; i... |
{-# OPTIONS --cubical --no-import-sorts #-}
module NumberFirstAttempt where
open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero)
private
variable
ℓ ℓ' ℓ'' : Level
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Relation.Bina... |
module Nat where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
one : Nat
one = suc zero
|
------------------------------------------------------------------------
-- A variant of the propositional truncation operator with an erased
-- truncation constructor
------------------------------------------------------------------------
-- Partly following the HoTT book, but adapted for erasure.
{-# OPTIONS --era... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Functor hiding (id)
module Categories.Diagram.Colimit.Properties
{o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) where
private
module F = Functor F
module C = Category C
open C
o... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.HomotopyGroup where
open import Cubical.Data.HomotopyGroup.Base public
|
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Nat
open import lib.types.Group
open import lib.types.TLevel
module lib.types.Int where
data ℤ : Type₀ where
O : ℤ
pos : (n : ℕ) → ℤ
neg : (n : ℕ) → ℤ
Int = ℤ
succ : ℤ → ℤ
succ O = pos O
succ (pos n) = pos (S n)
succ (neg O) = O
succ (n... |
module Numeral.Sign.Oper.Proofs where
|
{-# OPTIONS --cubical #-}
module _ where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
open import Agda.Builtin.Cubical.Sub
open import Agda.Primitive renaming (_⊔_ to ℓ-max)
open import Agda.Builtin.Sigma
private
internalFiber : ∀ {ℓ ℓ'} {A : Set ℓ} {B : Set ℓ'} (f : A → B) (y : B) → Set ... |
open import Structures
open import Data.String using (String)
open import Data.Nat
open import Data.Nat.Show renaming (show to showNat)
open import Data.Vec as V using (Vec; []; _∷_)
open import Data.List as L using (List; []; _∷_)
open import Data.Sum
open import Data.Product
open import Relation.Nullary
open import F... |
------------------------------------------------------------------------
-- The delay monad, defined coinductively, with a sized type parameter
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Delay-monad.Sized where
open import Equality.Propositional
open... |
{-# OPTIONS -v term.with.inline:20 -v term.with.call:30 #-}
data Nat : Set where
zero : Nat
suc : Nat → Nat
_+_ : Nat → Nat → Nat
zero + m = m
suc n + m = suc (n + m)
data [_] : Nat → Set where
⟨_⟩ : ∀ n → [ n ]
f : Nat → Nat
g : Nat → Nat
h : ∀ n → [ f n ]
f zero = zero
f (suc n) with f n
f (suc n) | zero... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.SuspAdjointLoopIso
open import cohomology.WithCoefficients
open import cohomology.Theory
open import cohomology.Exactness
open import cohomology.Choice
module cohomology.SpectrumModel
{i} (E : ℤ → Ptd i) (spectrum : (n : ℤ) → ⊙Ω (E (succ n)) == E n... |
{-# OPTIONS --without-K #-}
open import Prelude
import GSeTT.Syntax
import GSeTT.Rules
open import CaTT.Ps-contexts
open import CaTT.Relation
open import CaTT.Uniqueness-Derivations-Ps
open import CaTT.Decidability-ps
open import CaTT.Fullness
import GSeTT.Typed-Syntax
module CaTT.CaTT where
J : Set₁
J = Σ (ps... |
module Issue1494 where
open import Issue1494.Helper
module M (r : Record) where
open Module r
postulate
A : Set
a b : A
Foo : a ≡ b
Foo = {!!}
|
{-# OPTIONS --without-K #-}
open import M-types.Base.Core
module M-types.Base.Sum where
infixr 4 _,_
record ∑ (X : Ty ℓ₀) (Y : X → Ty ℓ₁) : Ty (ℓ-max ℓ₀ ℓ₁) where
constructor _,_
field
pr₀ : X
pr₁ : Y pr₀
open ∑ public
{-# BUILTIN SIGMA ∑ #-}
∑-syntax :... |
module WellTypedTerms where
open import Library
open import Categories
open import Functors
open import RMonads
open import FunctorCat
open import Categories.Sets
open import Categories.Families
data Ty : Set where
ι : Ty
_⇒_ : Ty → Ty → Ty
data Con : Set where
ε : Con
_<_ : Con → Ty → Con
data Var : Co... |
module Ag04 where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
infix 4 _≡_
≡-sym : ∀ {A : Set} {x y : A} → x ≡ y → y ≡ x
≡-sym refl = refl
trans : ∀ {A : Set} {x y z : A} → x ≡ y → y ≡ z → x ≡ z
trans refl refl = refl
cong : ∀ {A B : Set} (f : A → B) {x y : A} → x ≡ y → f x ≡ f y
cong f refl = refl
... |
------------------------------------------------------------------------------
-- Definition of FOTC Conat using Agda's co-inductive combinators
------------------------------------------------------------------------------
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIO... |
module DuplicateBuiltinBinding where
{-# BUILTIN STRING String #-}
{-# BUILTIN STRING String #-}
|
data Nat : Set where
succ : Nat → Nat
data Fin : Nat → Set where
zero : (n : Nat) → Fin (succ n)
data Tm (n : Nat) : Set where
var : Fin n → Tm n
piv : Fin (succ n) → Tm n
data Cx : Nat → Set where
succ : (n : Nat) → Tm n → Cx (succ n)
data CxChk : ∀ n → Cx n → Set where
succ : (n : Nat) (T : Tm n) → C... |
module Common.Coinduction where
open import Common.Level
infix 1000 ♯_
postulate
∞ : ∀ {a} (A : Set a) → Set a
♯_ : ∀ {a} {A : Set a} → A → ∞ A
♭ : ∀ {a} {A : Set a} → ∞ A → A
{-# BUILTIN INFINITY ∞ #-}
{-# BUILTIN SHARP ♯_ #-}
{-# BUILTIN FLAT ♭ #-}
private
my-♯ : ∀ {a} {A : Set a} → A → ∞ A
... |
{-# OPTIONS --without-K #-}
open import HoTT
module cw.Attached {i j k : ULevel} where
-- The type of attaching maps.
-- In intended uses, [B] is the type of cells and [C] is the [Sphere]s.
Attaching : (A : Type i) (B : Type j) (C : Type k) → Type (lmax i (lmax j k))
Attaching A B C = B → C → A
module _ {A : Type i... |
module Tactic.Nat.Subtract.By where
open import Prelude hiding (abs)
open import Builtin.Reflection
open import Tactic.Reflection.Quote
open import Tactic.Reflection.DeBruijn
open import Tactic.Reflection.Substitute
open import Tactic.Reflection
open import Control.Monad.State
open import Tactic.Nat.Reflect
open imp... |
{-# OPTIONS --without-K --safe --erased-cubical --no-import-sorts #-}
module Prelude where
open import Agda.Primitive renaming (Set to Type) public
open import Agda.Builtin.Reflection hiding (Type) renaming (primQNameEquality to _==_) public
open import Reflection using (_>>=_) public
open import Agda.Builtin.String... |
------------------------------------------------------------------------------
-- Totality properties respect to ListN
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorph... |
module FSM where
open import Sec4
open import Relation.Binary.PropositionalEquality
open import Data.Nat
open import Data.Bool
-- open import Data.Rational
-- open import Data.Integer
-- open import Relation.Nullary.Decidable
data Loc : Set where
A : Loc
DONE : Loc
record Values : Set where
field
x : ℕ
... |
module Issue719 where
import Common.Size as A
module M where
private open module A = M
-- NOT NICE:
-- Duplicate definition of module A. Previous definition of module A
-- at /Users/abel/cover/alfa/Agda2-clean/test/Common/Size.agda:7,15-19
-- when scope checking the declaration
-- open module A = M
|
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Monoidal.Construction.Product where
-- The functors associated with the product A × B of
-- (braided/symmetric) monoidal categories A and B are again
-- (braided/symmetric) monoidal.
open import Level using (Level)
open import Data.Product using (_,_; <_,_... |
module Tuple where
import Level
import Data.List as List
open import Data.List hiding (_++_; [_]; _∷ʳ_)
open import Data.Fin
open import Relation.Binary.PropositionalEquality hiding ([_])
infixr 5 _∷_
data Tuple {a} : List (Set a) → Set a where
[] : Tuple []
_∷_ : ∀ {A As} → A → Tuple As → Tuple (A ∷ As)
[_] :... |
module builtinInModule where
module Str where
postulate S : Set
{-# BUILTIN STRING S #-}
primitive primStringAppend : S → S → S
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Functor hiding (id)
-- Also defines the category of cocones "over a Functor F"
module Categories.Category.Construction.Cocones
{o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) where
open Categ... |
-- Andreas, 2015-08-26
{-# OPTIONS --rewriting #-} -- Should give error
open import Common.Equality
{-# BUILTIN REWRITE _≡_ #-}
{-# REWRITE refl #-}
|
{-# OPTIONS --without-K #-}
open import M-types.Base.Core
open import M-types.Base.Sum
open import M-types.Base.Prod
module M-types.Base.Eq where
infix 4 _≡_
data _≡_ {X : Ty ℓ} : X → X → Ty ℓ where
refl : {x : X} → x ≡ x
open _≡_ public
infix 10 _⁻¹
_⁻¹ : {X : Ty ℓ} {x₀ x₁ : X} →
... |
module Issue3545 where
open import Agda.Builtin.Nat
open import Agda.Builtin.List
open import Common.IO
createElem : Nat → Set
createElem n = Nat
{-# NOINLINE createElem #-}
{-# COMPILE JS createElem = function (x0) {
return x0;
} #-}
-- WAS: silently accepted
-- WANT: `createElem` is going to be erased; don't... |
open import Prelude hiding (id; Bool; _∷_; [])
module Examples.CompleteResolution where
data TC : Set where
tc-int : TC
tc-bool : 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-bool = yes refl
open import Implicits.Sy... |
module Section1 where
-- 1. Introduction
-- ===============
--
-- 1.1. Outline of the formalisation
-- ---------------------------------
--
-- - We formalize terms-in-context, `Γ ⊢ t ∷ A`, as a calculus of proof trees, `Γ ⊢ A`, for
-- implicational logic, i.e., term `t` is seen as a proof tree that derives `A` ... |
module Dissect where
import Functor
import Sets
import Isomorphism
open Sets
open Functor
open Functor.Semantics
open Functor.Recursive
infixr 40 _+₂_
infixr 60 _×₂_
∇ : U -> U₂
∇ (K A) = K₂ [0]
∇ Id = K₂ [1]
∇ (F + G) = ∇ F +₂ ∇ G
∇ (F × G) = ∇ F ×₂ ↗ G +₂ ↖ F ×₂ ∇ G
diagonal : ... |
{-# OPTIONS --without-K --safe #-}
module Math.NumberTheory.Summation.Nat where
-- agda-stdlib
open import Algebra
open import Data.Nat.Properties
-- agda-misc
open import Math.NumberTheory.Summation.Generic
-- DO NOT change this line
open MonoidSummation (Semiring.+-monoid *-+-semiring) public
|
{-
Theory about path split equivalences.
They are convenient to construct localization HITs as in
(the "modalities paper")
https://arxiv.org/abs/1706.07526
- there are construction from and to equivalences ([pathSplitToEquiv] , [equivToPathSplit])
- the structure of a path split equivalence is actually a proposition ... |
module Type.Size.Countable where
import Data.Either as Type
import Data.Either.Equiv as Either
import Data.Tuple as Type
import Data.Tuple.Equiv as Tuple
import Lvl
open import Logic
open import Logic.Predicate
open import Numeral.Natural
open import Numeral.Natural.Sequence
open import Numera... |
module regular-concat where
open import Level renaming ( suc to Suc ; zero to Zero )
open import Data.List
open import Data.Nat hiding ( _≟_ )
open import Data.Fin hiding ( _+_ )
open import Data.Empty
open import Data.Unit
open import Data.Product
-- open import Data.Maybe
open import Relation.Nullary
open import... |
open import Categories
open import Monads
module Monads.CatofAdj.InitAdj {a b}{C : Cat {a}{b} }(M : Monad C) where
open import Library
open import Functors
open import Naturals hiding (Iso; module Iso)
open import Adjunctions
open import Monads.CatofAdj M
open import Categories.Initial
open import Monads.Kleisli M
op... |
{-# OPTIONS --cubical --no-sized-types --no-guardedness #-}
module Issue2487.c where
postulate admit : {A : Set} -> A
|
------------------------------------------------------------------------
-- Tactics for proving instances of Σ-cong (and Surjection.Σ-cong)
-- with "better" computational behaviour
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module ... |
module #3 where
open import Relation.Binary.PropositionalEquality
{-
Exercise 2.3 Give a fourth, different, proof of Lemma 2.1.2, and prove that it is equal to the others.
-}
based-ind₌ : ∀ {i} {A : Set i}{a : A} → (C : (x : A) → (a ≡ x) → Set i) → C a refl → {x : A} → (p : a ≡ x) → C x p
based-ind₌ C c p rewrite ... |
module plfa-code.Isomorphism where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; cong-app)
open Eq.≡-Reasoning
open import Data.Nat using (ℕ; zero; suc; _+_)
open import Data.Nat.Properties using (+-comm)
_∘_ : ∀ {A B C : Set} → (B → C) → (A → B) → (A → C)
(g ∘ f) x = g (f x)
_... |
module Base where
open import Relation.Binary.PropositionalEquality
is-prop : Set → Set
is-prop X = (x y : X) → x ≡ y
_∼_ : {A B : Set} → (f g : A → B) → Set
f ∼ g = ∀ a → f a ≡ g a
|
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Algebra.Signature
module Fragment.Algebra.Free (Σ : Signature) where
open import Fragment.Algebra.Free.Base Σ public
open import Fragment.Algebra.Free.Properties Σ public
open import Fragment.Algebra.Free.Monad Σ public
open import Fragment.Algebr... |
{-
Half adjoint equivalences ([HAEquiv])
- Iso to HAEquiv ([iso→HAEquiv])
- Equiv to HAEquiv ([equiv→HAEquiv])
- Cong is an equivalence ([congEquiv])
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.HAEquiv where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import ... |
module monad-instances where
open import lib
open import general-util
instance
IO-monad : monad IO
IO-monad = record {returnM = return; bindM = _>>=_}
instance
id-monad : monad id
id-monad = record {returnM = id; bindM = λ a f → f a}
|
{-# OPTIONS --cubical --safe #-}
module Relation.Nullary.Discrete where
open import Relation.Nullary.Discrete.Base public
|
{-# OPTIONS --cubical-compatible #-}
module Issue712 where
data _≡_ {A : Set} : A → A → Set where
refl : (x : A) → x ≡ x
record _×_ (A B : Set) : Set where
field
p1 : A
p2 : B
open _×_
lemma : {A B : Set} {u v : A × B} (p : u ≡ v) → p1 u ≡ p1 v
lemma (refl _) = refl _
|
data ⊥ : Set where
_ : @0 ⊥ → Set
_ = λ @0 { () }
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Zero-cost coercion to cross the FFI boundary
------------------------------------------------------------------------
{-# OPTIONS --without-K #-}
module Foreign.Haskell.Coerce where
---------------------------... |
------------------------------------------------------------------------------
-- The gcd program is correct
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Basic types related to coinduction
------------------------------------------------------------------------
module Coinduction where
import Level
---------------------------------------------------------------... |
module tree-test where
open import tree
open import nat
open import bool
open import bool-to-string
open import list
test-tree = node 2 ( (leaf 3) :: (node 4 ( (leaf 5) :: (leaf 7) :: [] )) :: (leaf 6) :: (leaf 7) :: [])
perfect3 = perfect-binary-tree 3 tt
perfect3-string = 𝕋-to-string 𝔹-to-string perfect3 |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Bool
open import lib.types.Coproduct
open import lib.types.Paths
open import lib.types.Span
open import lib.types.Pushout
open import lib.types.Cofiber
open import lib.types.Sigma
open import lib.types.Wedge
module lib.types.Smash {i... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Foundations.Structure where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
private
variable
ℓ ℓ' ℓ'' : Level
S : Type ℓ → Type ℓ'
-- A structure is a type-family S : Type ℓ → Type ℓ', i.e. for X : Type ℓ and s : ... |
{-# OPTIONS --type-in-type #-}
open import Agda.Primitive
test : Set
test = Setω
|
open import Oscar.Prelude
open import Oscar.Class
module Oscar.Class.Transitivity where
module Transitivity'
{𝔬} {𝔒 : Ø 𝔬}
{𝔯} (_∼_ : 𝔒 → 𝔒 → Ø 𝔯)
x y z
= ℭLASS (x ,, y ,, z ,, _∼_) (x ∼ y → y ∼ z → x ∼ z)
module Transitivity
{𝔬} {𝔒 : Ø 𝔬}
{𝔯} (_∼_ : 𝔒 → 𝔒 → Ø 𝔯)
where
class = ∀ {x y z... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Machine words
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Word where
----------------------------------------------------------------... |
{-# OPTIONS --safe --without-K #-}
module Level where
open import Agda.Primitive
using (Level)
renaming ( _⊔_ to _ℓ⊔_
; lzero to ℓzero
; lsuc to ℓsuc
; Set to Type
)
public
variable
a b c : Level
A : Type a
B : Type b
C : Type c
|
module negation where
open import level
open import empty
----------------------------------------------------------------------
-- syntax
----------------------------------------------------------------------
infix 7 ¬
----------------------------------------------------------------------
-- defined types
--------... |
{-# OPTIONS --without-K #-}
module hott.loop.properties where
open import sum
open import equality
open import function.core
open import function.extensionality
open import function.isomorphism.core
open import function.overloading
open import pointed
open import sets.nat.core
open import hott.loop.core
mapΩ₁-const :... |
------------------------------------------------------------------------
-- Containers, including a definition of bag equivalence
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Container {c⁺} (eq : ∀ {a p} → Equality-with-J a p ... |
{-
Descriptor language for easily defining structures
-}
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Structures.Macro where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.E... |
{-# OPTIONS --sized-types #-}
module SNat.Order where
open import Size
open import SNat
data _≤_ : {ι ι' : Size} → SNat {ι} → SNat {ι'} → Set where
z≤n : {ι ι' : Size}
→ (n : SNat {ι'})
→ _≤_ (zero {ι}) n
s≤s : {ι ι' : Size}{m : SNat {ι}}{n : SNat {ι'}}
... |
module Oscar.Data.List where
open import Agda.Builtin.List public using (List; []; _∷_)
|
module FinMap where
open import Level using () renaming (zero to ℓ₀)
open import Data.Nat using (ℕ ; zero ; suc)
open import Data.Maybe using (Maybe ; just ; nothing ; maybe′)
open import Data.Fin using (Fin ; zero ; suc)
open import Data.Fin.Properties using (_≟_)
open import Data.Vec using (Vec ; [] ; _∷_ ; _[_]≔_ ;... |
module HasDecidableValidation where
open import OscarPrelude
open import 𝓐ssertion
open import HasSatisfaction
open import Validation
record HasDecidableValidation (A : Set) ⦃ _ : HasSatisfaction A ⦄ : Set₁
where
field
⊨?_ : (x : A) → Dec $ ⊨ x
open HasDecidableValidation ⦃ … ⦄ public
|
-- Andreas, 2015-06-29, issue reported by Nisse
-- {-# OPTIONS -v tc.polarity:20 -v tc.pos:10 #-}
-- {-# OPTIONS -v tc.conv.elim:25 --show-implicit #-}
data ⊥ : Set where
data _≡_ {a} {A : Set a} : A → A → Set a where
refl : ∀ x → x ≡ x
subst : ∀ {a p} {A : Set a} (P : A → Set p) {x y : A} →
x ≡ y → P x →... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.