text stringlengths 4 690k |
|---|
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Numbers.Naturals.Semiring
open import Numbers.Integers.Integers
open import Numbers.Integers.Addition
open import Groups.Lemmas
open import Groups.Definition
open... |
import cedille-options
module rkt (options : cedille-options.options) where
open import string
open import char
open import io
open import maybe
open import ctxt
open import list
open import trie
open import general-util
open import monad-instances
open import toplevel-state options {IO}
open import unit
open import ... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
open import Agda.Builtin.Sigma
open import Agda.Builtin.List
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
data Fin : Nat → Set where
zero : {n : Nat} → Fin (suc n)
suc : {n : Nat} → Fin n → Fin (suc n)
test : (x : Nat) (y : Fin x) {... |
open import Structure.Setoid
open import Structure.Category
open import Type
module Structure.Category.CoMonad
{ℓₒ ℓₘ ℓₑ}
{cat : CategoryObject{ℓₒ}{ℓₘ}{ℓₑ}}
where
import Function.Equals
open Function.Equals.Dependent
open import Functional.Dependent using () renaming (_∘_ to _∘ᶠⁿ_)
import Lvl
o... |
{-# OPTIONS --no-termination-check #-}
module SafeFlagNoTermination where
data Empty : Set where
inhabitant : Empty
inhabitant = inhabitant |
open import Agda.Primitive using (_⊔_)
import Categories.Category as Category
import Categories.Category.Cartesian as Cartesian
open import SingleSorted.AlgebraicTheory
import SingleSorted.Power as Power
module SingleSorted.Interpretation
{o ℓ e}
(Σ : Signature)
{𝒞 : Category.Category o ℓ... |
{-# OPTIONS --without-K --safe #-}
module Data.Binary.Proofs.Bijection where
open import Relation.Binary.PropositionalEquality
open import Data.Binary.Operations.Unary
open import Data.Binary.Proofs.Unary
open import Data.Binary.Definitions
open import Data.Binary.Operations.Semantics
open import Data.Nat as ℕ using ... |
record Foo : Set where
field
record A : Set₂ where
B : Set₁
B = Set
field
record C : Set₂ where
field
B : Foo
B = _
record D : Set₂ where
B : Set₁
B = Set
field
F : Foo
F = _
|
{-# OPTIONS --without-K #-}
module ScaleDegree where
open import Data.Fin using (Fin; toℕ; #_)
open import Data.Nat using (ℕ; suc; _+_)
open import Data.Nat.DivMod using (_mod_; _div_)
open import Data.Product using (_×_; _,_)
open import Data.Vec using (lookup)
open import Pitch
data ScaleD... |
module Data.Maybe.Instance where
open import Class.Equality
open import Class.Monad
open import Data.Maybe
open import Data.Maybe.Properties
instance
Maybe-Monad : ∀ {a} -> Monad (Maybe {a})
Maybe-Monad = record { _>>=_ = λ x f → maybe f nothing x ; return = just }
Maybe-Eq : ∀ {A} {{_ : Eq A}} → Eq (Maybe A)
... |
module _ where
data Bool : Set where
true false : Bool
{-# BUILTIN BOOL Bool #-}
{-# BUILTIN TRUE true #-}
{-# BUILTIN FALSE false #-}
-- Not allowed:
{-# COMPILED_DATA Bool Bool True False #-}
|
module proofs where
open import lambdasyntax
open import static
open import dynamic
open import Data.Empty
open import Data.Nat
open import Function
open import Data.Vec using (Vec; [])
open import Data.Bool using (Bool; true; false)
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
-- l... |
------------------------------------------------------------------------
-- Properties of combinatorial functions
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --exact-split #-}
module Math.Combinatorics.Function.Properties where
-- agda-stdlib
open import Da... |
------------------------------------------------------------------------
-- Coinductive higher lenses
------------------------------------------------------------------------
-- Paolo Capriotti came up with these lenses, and provided an informal
-- proof showing that this lens type is pointwise equivalent to his
-- hi... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Comma where
open import Categories.Category
open import Categories.Functor
open import Data.Product using (_×_; ∃; _,_; proj₁; proj₂; zip; map)
open import Level
open import Relation.Binary using (Rel)
open import Categories.Support.EqReasoning
Comma :
{o₁... |
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Union where
open import Prelude
open import Path.Reasoning
open import Algebra
open import Algebra.Construct.Free.Semilattice.Definition
open import Algebra.Construct.Free.Semilattice.Eliminators
infixr 5 _∪_
_∪_ : 𝒦 A → 𝒦 A → 𝒦 A
_∪_ = λ... |
module Properties.Contradiction where
data ⊥ : Set where
¬ : Set → Set
¬ A = A → ⊥
CONTRADICTION : ∀ {A : Set} → ⊥ → A
CONTRADICTION ()
|
{-# OPTIONS --without-K #-}
module container.core where
open import level
open import sum
open import equality
open import function
module _ {li}{I : Set li} where
-- homsets in the slice category
_→ⁱ_ : ∀ {lx ly} → (I → Set lx) → (I → Set ly) → Set _
X →ⁱ Y = (i : I) → X i → Y i
-- identity of the slice ca... |
-- TODO: Move these to stuff related to metric spaces
module Continuity where
open Limit
-- Statement that the point x of function f is a continous point
ContinuousPoint : (ℝ → ℝ) → ℝ → Stmt
ContinuousPoint f(x) = (⦃ limit : Lim f(x) ⦄ → (lim f(x)⦃ limit ⦄ ≡ f(x)))
-- Statement that the function f is conti... |
-- Andreas, 2021-08-17, issue #5508, reported by james-smith-69781
-- On a case-insensitive file system, an inconsistency slipped into
-- the ModuleToSource map, leading to a failure in getting the module
-- name from the file name, in turn leading to a crash for certain errors.
module Issue5508 where -- case variant ... |
{- 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 Introduction.Universes where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
postulate IsEven : Nat -> Prop
data Even : Set where
even : (n : Nat) -> IsEven n -> Even
|
module Nat.Unary where
open import Data.Sum
open import Function
open import Nat.Class
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
data ℕ₁ : Set where
zero : ℕ₁
succ : ℕ₁ → ℕ₁
ind : (P : ℕ₁ → Set) → P zero → (∀ {k} → P k → P (succ k)) → ∀ n → P n
ind P z s zero = z
ind P z s (succ n) = ind... |
module Relation.Ternary.Separation.Monad.Delay where
open import Level
open import Function
open import Function using (_∘_; case_of_)
open import Relation.Binary.PropositionalEquality
open import Relation.Unary
open import Relation.Unary.PredicateTransformer hiding (_⊔_)
open import Relation.Ternary.Separation
open i... |
module Cats.Trans where
open import Level using (_⊔_)
open import Cats.Category.Base
open import Cats.Functor using (Functor)
open Functor
module _ {lo la l≈ lo′ la′ l≈′}
{C : Category lo la l≈} {D : Category lo′ la′ l≈′}
where
infixr 9 _∘_
private
module C = Category C
module D = Category D
... |
module IID-New-Proof-Setup where
open import LF
open import Identity
open import IID
open import IIDr
open import DefinitionalEquality
OPg : Set -> Set1
OPg I = OP I I
-- Encoding indexed inductive types as non-indexed types.
ε : {I : Set}(γ : OPg I) -> OPr I
ε (ι i) j = σ (i == j) (\_ -> ι ★)
ε (σ A γ) j = σ... |
module Data.Collection.Equivalence where
open import Data.Collection.Core
open import Function using (id; _∘_)
open import Function.Equality using (_⟨$⟩_)
open import Function.Equivalence using (_⇔_; equivalence)
open Function.Equivalence.Equivalence
open import Relation.Binary.PropositionalEquality
open import Lev... |
{-# OPTIONS --universe-polymorphism #-}
-- Free category generated by a directed graph.
-- The graph is given by a type (Obj) of nodes and a (Obj × Obj)-indexed
-- Setoid of (directed) edges. Every inhabitant of the node type is
-- considered to be a (distinct) node of the graph, and (equivalence
-- classes of) inh... |
-- 2010-10-06 Andreas
module TerminationRecordPatternListAppend where
data Empty : Set where
record Unit : Set where
constructor unit
data Bool : Set where
true false : Bool
T : Bool -> Set
T true = Unit
T false = Empty
-- Thorsten suggests on the Agda list thread "Coinductive families"
-- to encode lists as... |
{-# OPTIONS --without-K #-}
module Pif where
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; sym; trans; subst; subst₂; cong; cong₂; setoid;
proof-irrelevance; module ≡-Reasoning)
open import Data.Nat.Properties using (m≢1+m+n; i+j≡0⇒i≡0; i+j≡0⇒j≡0)
open import Data.Nat.Properties.Simp... |
{-# OPTIONS --cubical #-}
open import Agda.Builtin.Cubical.Path
data D : Set where
c : (@0 x y : D) → x ≡ y
|
{-
Axiom of Finite Choice
- Yep, it's a theorem actually.
-}
{-# OPTIONS --safe #-}
module Cubical.Data.FinSet.FiniteChoice where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv renaming (_∙ₑ_ to _⋆_)
open import Cubical.HITs.PropositionalTrunca... |
module CS410-Monoid where
open import CS410-Prelude
record Monoid (M : Set) : Set where
field
-- OPERATIONS ----------------------------------------
e : M
op : M -> M -> M
-- LAWS ----------------------------------------------
lunit : forall m -> op e m == m
runit : forall m -> op m e... |
------------------------------------------------------------------------
-- A combinator for running two computations in parallel
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Delay-monad.Parallel where
import Equality.Propositional as Eq
open import Pr... |
{-# OPTIONS --allow-exec #-}
open import Agda.Builtin.FromNat
open import Data.Bool.Base using (T; Bool; if_then_else_)
open import Data.String using (String; _++_; lines)
open import Data.Nat.Base using (ℕ)
open import Data.Fin using (Fin)
import Data.Fin.Literals as Fin
import Data.Nat.Literals as Nat
open import D... |
module Theory where
open import Data.List using (List; []; _∷_; _++_)
open import Data.Fin using () renaming (zero to fzero; suc to fsuc)
open import Relation.Binary using (Rel)
open import Level using (suc; _⊔_)
open import Syntax
record Theory ℓ₁ ℓ₂ ℓ₃ : Set (suc (ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃)) where
field
Sg : Signature ... |
module Prelude.Unit where
data Unit : Set where
unit : Unit
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Bounded vectors (inefficient implementation)
------------------------------------------------------------------------
-- Vectors of a specified maximum length.
module Data.Star.BoundedVec where
open import Dat... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.SmashFmapConn where
module _ {i} {j} {A : Type i} (B : A → Type j) where
custom-assoc : {a₀ a₁ a₂ a₃ : A}
{b₀ : B a₀} {b₁ b₁' b₁'' : B a₁} {b₂ : B a₂} {b₃ : B a₃}
{p : a₀ == a₁} (p' : b₀ == b₁ [ B ↓ p ])
(q' : b₁ == b₁')
(r' ... |
{-# OPTIONS --allow-unsolved-metas #-}
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- CS410 2017/18 Exercise 1 VECTORS AND FRIENDS (worth 25%)
--------------------------------------------------------------... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- A categorical view of Vec
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.Categorical {a n} where
open import Category.Applicative us... |
-- A placeholder module so that we can write a main. Agda compilation
-- does not work without a main so batch compilation is bound to give
-- errors. For travis builds, we want batch compilation and this is
-- module can be imported to serve that purpose. There is nothing
-- useful that can be achieved from this modul... |
open import Mockingbird.Forest using (Forest)
import Mockingbird.Forest.Birds as Birds
-- The Master Forest
module Mockingbird.Problems.Chapter18 {b ℓ} (forest : Forest {b} {ℓ})
⦃ _ : Birds.HasStarling forest ⦄
⦃ _ : Birds.HasKestrel forest ⦄ ... |
-- Andreas, 2017-01-12, re #2386
-- Correct error message for wrong BUILTIN UNIT
data Bool : Set where
true false : Bool
{-# BUILTIN UNIT Bool #-}
-- Error WAS:
-- The builtin UNIT must be a datatype with 1 constructors
-- when checking the pragma BUILTIN UNIT Bool
-- Expected error:
-- Builtin UNIT must be a sin... |
open import FRP.JS.Bool using ( not )
open import FRP.JS.Nat using ( ) renaming ( _≟_ to _≟n_ )
open import FRP.JS.String using ( _≟_ ; _≤_ ; _<_ ; length )
open import FRP.JS.QUnit using ( TestSuite ; ok ; test ; _,_ )
module FRP.JS.Test.String where
tests : TestSuite
tests =
( test "≟"
( ok "abc ≟ abc" ("ab... |
-- Andreas, 2017-11-06, issue #2840 reported by wenkokke
Id : (F : Set → Set) → Set → Set
Id F = F
data D (A : Set) : Set where
c : Id _ A
-- WAS: internal error in positivity checker
-- EXPECTED: success, or
-- The target of a constructor must be the datatype applied to its
-- parameters, _F_2 A isn't
-- when ch... |
------------------------------------------------------------------------
-- This module proves that the context-sensitive language aⁿbⁿcⁿ can
-- be recognised
------------------------------------------------------------------------
-- This is obvious given the proof in
-- TotalRecognisers.LeftRecursion.ExpressiveStren... |
postulate
Nat : Set
Fin : Nat → Set
Finnat : Nat → Set
fortytwo : Nat
finnatic : Finnat fortytwo
_==_ : Finnat fortytwo → Finnat fortytwo → Set
record Fixer : Set where
field fix : ∀ {x} → Finnat x → Finnat fortytwo
open Fixer {{...}}
postulate
Fixidentity : {{_ : Fixer}} → Set
instance
fixiden... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Automatic solvers for equations over lists
------------------------------------------------------------------------
-- See README.Nat for examples of how to use similar solvers
{-# OPTIONS --without-K --safe #-... |
{-# OPTIONS --allow-unsolved-metas #-}
module Cat.Categories.Cube where
open import Cat.Prelude
open import Level
open import Data.Bool hiding (T)
open import Data.Sum hiding ([_,_])
open import Data.Unit
open import Data.Empty
open import Relation.Nullary
open import Relation.Nullary.Decidable
open import Cat.Catego... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
open import Cubical.Core.Everything
open import Cubical.Algebra.Magma
module Cubical.Algebra.Magma.Construct.Opposite {ℓ} (M : Magma ℓ) where
open import Cubical.Foundations.Prelude
open Magma M
_•ᵒᵖ_ : Op₂ Carrier
y •ᵒᵖ x = x • y
Op-isMagma : IsMagma Carrier _•... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Algebra.Signature
module Fragment.Algebra.Homomorphism.Setoid (Σ : Signature) where
open import Fragment.Algebra.Algebra Σ
open import Fragment.Algebra.Homomorphism.Base Σ
open import Level using (Level; _⊔_)
open import Relation.Binary using (Re... |
{-# OPTIONS --guardedness #-}
module Prelude where
open import Class.Equality public
open import Class.Functor public
open import Class.Monad public
open import Class.Monoid public
open import Class.Show public
open import Class.Traversable public
open import Data.Bool hiding (_≟_; _<_; _<?_; _≤_; _≤?_) public
open ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Bundles for types of functions
------------------------------------------------------------------------
-- The contents of this file should usually be accessed from `Function`.
-- Note that these bundles differ... |
module NF.Product where
open import NF
open import Data.Product
open import Relation.Binary.PropositionalEquality
instance
nf, : {A : Set}{B : A -> Set}{a : A}{b : B a}{{nfa : NF a}}{{nfb : NF b}} -> NF {Σ A B} (a , b)
Sing.unpack (NF.!! (nf, {B = B} {a = a} {b = b} {{nfa}})) = nf a , subst B (sym nf≡) (nf b)
S... |
module Tactic.Nat.Coprime.Decide where
open import Prelude
open import Prelude.Equality.Unsafe
open import Prelude.List.Relations.Any
open import Prelude.List.Relations.All
open import Prelude.List.Relations.Properties
open import Numeric.Nat
open import Tactic.Nat.Coprime.Problem
private
infix 4 _isIn_
_isIn_ :... |
module Network.Primitive where
open import Data.Nat
open import Data.String
open import Data.Unit
open import Foreign.Haskell
open import IO.Primitive
postulate
withSocketsDo : ∀ {a} {A : Set a} → IO A → IO A
connectTo : String → Integer → IO Handle
{-# IMPORT Network #-}
{-# IMPORT Text.Read #-}
{-# COMPILE... |
open import Nat
open import Prelude
open import List
open import contexts
open import core
module results-checks where
Coerce-preservation : ∀{Δ Σ' r v τ} →
Δ , Σ' ⊢ r ·: τ →
Coerce r := v →
Σ' ⊢ v ::ⱽ τ
Coerce-preservation (TAFix x x₁)... |
module Nats.Add.Invert where
open import Equality
open import Nats
open import Nats.Add.Comm
open import Function
------------------------------------------------------------------------
-- internal stuffs
private
lemma′ : ∀ a b → (suc a ≡ suc b) → (a ≡ b)
lemma′ _ _ refl = refl
lemma : ∀ a b → (suc (a + suc... |
-- Minimal propositional logic, vector-based de Bruijn approach, initial encoding
module Vi.Mp where
open import Lib using (Nat; suc; _+_; Fin; fin; Vec; _,_; proj; VMem; mem)
-- Types
infixl 2 _&&_
infixl 1 _||_
infixr 0 _=>_
data Ty : Set where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
_&&_ : Ty -> Ty... |
module Auto-EqualityReasoning where
-- equality reasoning, computation and induction
open import Auto.Prelude
module AdditionCommutative where
lemma : ∀ n m → (n + succ m) ≡ succ (n + m)
lemma n m = {!-c!} -- h0
{-
lemma zero m = refl
lemma (succ x) m = cong succ (lemma x m)
-}
lemma' : ∀ n m → (n + succ m)... |
open import Category
module Iso (ℂ : Cat) where
private open module C = Cat (η-Cat ℂ)
data _≅_ (A B : Obj) : Set where
iso : (i : A ─→ B)(j : B ─→ A) ->
i ∘ j == id -> j ∘ i == id ->
A ≅ B
|
module Tactic.Nat.Refute where
open import Prelude
open import Builtin.Reflection
open import Tactic.Reflection.Quote
open import Tactic.Reflection
open import Tactic.Nat.Reflect
open import Tactic.Nat.NF
open import Tactic.Nat.Exp
open import Tactic.Nat.Auto
open import Tactic.Nat.Auto.Lemmas
open import Tactic.Nat... |
------------------------------------------------------------------------
-- Up-to techniques for CCS
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Prelude
module Bisimilarity.Up-to.CCS {ℓ} {Name : Type ℓ} where
open import Equality.Propositional
o... |
-- Minimal propositional logic, de Bruijn approach, initial encoding
module Bi.Mp where
open import Lib using (List; _,_; LMem; lzero; lsuc)
-- Types
infixl 2 _&&_
infixl 1 _||_
infixr 0 _=>_
data Ty : Set where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
_&&_ : Ty -> Ty -> Ty
_||_ : Ty -> Ty -> Ty
F... |
{-
Function types
A , B : Set -- Set = Type
A → B : Set
Products and sums
A × B : Set
A ⊎ B : Set -- disjoint union
Don't have A ∪ B : Set! And neither A ∩ B : Set.
These are evil operations, because they depend on elements.
-}
record _×_ (A B : Set) : Set where
constructor _,_
field
proj₁ : ... |
module Structure.Function.Domain.Proofs where
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
import Lvl
open import Functional
open import Function.Domains
open import Function.Equals
import Function.Names as Names
open import Lang.Instance
open import Logic
open import Logic.Classical
open import Logic.P... |
module Eval where
open import Coinduction
open import Data.Bool
open import Data.Fin using (Fin)
import Data.Fin as F
open import Data.Product using (Σ; _,_)
import Data.Product as P
open import Data.Stream using (Stream; _∷_)
import Data.Stream as S
open import Data.Vec using (Vec; []; _∷... |
open import MLib.Algebra.PropertyCode
open import MLib.Algebra.PropertyCode.Structures
module MLib.Matrix.Mul {c ℓ} (struct : Struct bimonoidCode c ℓ) where
open import MLib.Prelude
open import MLib.Matrix.Core
open import MLib.Matrix.Equality struct
open import MLib.Matrix.Plus struct
open import MLib.Algebra.Operat... |
import Parametric.Syntax.Type as Type
import Parametric.Syntax.Term as Term
import Parametric.Syntax.MType as MType
module Parametric.Syntax.MTerm
{Base : Type.Structure}
(Const : Term.Structure Base)
where
open Type.Structure Base
open MType.Structure Base
open Term.Structure Base Const
-- Our extension p... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some derivable properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra.Bundles
module Algebra.Properties.Lattice {l₁ l₂} (L : ... |
postulate
A : Set
works : Set
works = let B : {X : Set} → Set
B = let _ = Set in A
in A
fails : Set
fails = let B : {X : Set} → Set
B = A -- Set !=< {X : Set} → Set
in A
|
{-# OPTIONS --safe #-}
module Cubical.Data.Int.MoreInts.DiffInt where
open import Cubical.Data.Int.MoreInts.DiffInt.Base public
open import Cubical.Data.Int.MoreInts.DiffInt.Properties public
|
----------------------------------------------------------------------
-- Copyright: 2013, Jan Stolarek, Lodz University of Technology --
-- --
-- License: See LICENSE file in root of the repo --
-- Repo address: https://github.com/... |
module PiQ.Examples where
open import Data.Empty
open import Data.Unit hiding (_≟_)
open import Data.Sum
open import Data.Product
open import Data.Maybe
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Binary.PropositionalEquality
open import PiQ.Syntax
open import PiQ.Opsem
open import PiQ.Eva... |
{-# OPTIONS -v treeless.opt:20 -v treeless.opt.unused:30 #-}
module _ where
open import Common.Prelude
-- First four arguments are unused.
maybe : ∀ {a b} {A : Set a} {B : Set b} → B → (A → B) → Maybe A → B
maybe z f nothing = z
maybe z f (just x) = f x
mapMaybe : ∀ {a b} {A : Set a} {B : Set b} → (A → B) → Maybe A... |
open import Agda.Builtin.Nat
data D : Nat → Set where
c : (n : Nat) → D n
foo : (m : Nat) → D (suc m) → Nat
foo m (c (suc n)) = m + n
|
open import Agda.Builtin.Char
open import Agda.Builtin.List
open import Agda.Builtin.Equality
data ⊥ : Set where
infix 4 _≢_
_≢_ : {A : Set} → A → A → Set
x ≢ y = x ≡ y → ⊥
<?> = '\xFFFD'
infix 0 _∋_
_∋_ : (A : Set) → A → A
A ∋ x = x
_ = primNatToChar 0xD7FF ≢ <?> ∋ λ ()
_ = primNatToChar 0xD800 ≡ <?> ∋ refl
_ = ... |
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
data Irr (A : Set) : Set where
irr : .(x : A) → Irr A
data D {A : Set} : Irr A → Set where
-- x is mistakenly marked as forced here!
d : (x : A) → D (irr x)
unD : ∀ {A i} → D i → A
unD (d x) = x
dtrue=dfalse : d true ≡ d false
dtrue=dfalse = ref... |
open import Numeral.Natural
open import Relator.Equals
open import Type.Properties.Decidable
open import Type
module Formalization.ClassicalPredicateLogic.Syntax.Substitution
{ℓₚ ℓᵥ ℓₒ}
(Prop : ℕ → Type{ℓₚ})
(Var : Type{ℓᵥ}) ⦃ var-eq-dec : Decidable(2)(_≡_ {T = Var}) ⦄
(Obj : ℕ → Type{ℓₒ})
where
open import... |
-- The (pre)category of (small) categories
{-# OPTIONS --safe #-}
module Cubical.Categories.Instances.Categories where
open import Cubical.Categories.Category.Base
open import Cubical.Categories.Category.Precategory
open import Cubical.Categories.Functor.Base
open import Cubical.Categories.Functor.Properties
open imp... |
{-# OPTIONS --without-K #-}
module Pi0Semiring where
import Level
open import PiU
open import PiLevel0
open import Algebra using (CommutativeSemiring)
open import Algebra.Structures
using (IsSemigroup; IsCommutativeMonoid; IsCommutativeSemiring)
-----------------------------------------------------------------... |
module NF.List {A : Set} where
open import NF
open import Data.List
open import Relation.Binary.PropositionalEquality
instance
nf[] : NF {List A} []
Sing.unpack (NF.!! nf[]) = []
Sing.eq (NF.!! nf[]) = refl
{-# INLINE nf[] #-}
nf∷ : {x : A}{{nfx : NF x}}{t : List A}{{nft : NF t}} -> NF (x ∷ t)
Sing.unpa... |
module Sessions.Semantics.Process where
open import Level
open import Size
open import Data.Nat
open import Data.Sum
open import Data.Product
open import Data.Unit
open import Data.Bool
open import Debug.Trace
open import Function
open import Relation.Unary hiding (Empty)
open import Relation.Unary.PredicateTransform... |
module nat-log where
open import bool
open import eq
open import nat
open import nat-thms
open import nat-division
open import product
data log-result (x : ℕ)(b : ℕ) : Set where
pos-power : (e : ℕ) → (s : ℕ) → b pow e + s ≡ x → log-result x b
no-power : x < b ≡ tt → log-result x b
-- as a first version, we do no... |
module Data.Vec where
open import Prelude
open import Data.Nat
open import Data.Fin hiding (_==_; _<_)
open import Logic.Structure.Applicative
open import Logic.Identity
open import Logic.Base
infixl 90 _#_
infixr 50 _::_
infixl 45 _!_ _[!]_
data Vec (A : Set) : Nat -> Set where
[] : Vec A zero
_::_ : {n : Na... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of products
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Product.Properties where
open import Data.Product
open import Func... |
{-# OPTIONS --rewriting --cubical #-}
open import Common.Prelude
open import Common.Path
{-# BUILTIN REWRITE _≡_ #-}
postulate is-refl : ∀ {A : Set} {x : A} → (x ≡ x) → Bool
postulate is-refl-true : ∀ {A}{x} → is-refl {A} {x} refl ≡ true
{-# REWRITE is-refl-true #-}
test₁ : ∀ {x} → is-refl {Nat} {x} refl ≡ true
te... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Definition
open import Rings.Definition
open import Rings.IntegralDomains.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
module Fields.FieldOfFractions.Addition {a b : _} {A : Set a} {S : S... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Groups.Definition
module Groups.Actions.Definition where
record GroupAction {m n o p : _} {A : Set m} {S : Setoid {m} {o} A} {_·_ : A → A → A} {B : Set n} (G : Group S... |
-- A minor variant of code reported by Andreas Abel.
-- Andreas, 2011-10-04
--
-- Agda's coinduction is incompatible with initial algebras
--
-- Sized types are needed to formulate initial algebras in general:
--
{-# OPTIONS --sized-types #-}
--
-- We need to skip the positivity check since we cannot communicate
-- to... |
module Prelude where
id : {a : Set} -> a -> a
id x = x
infixr 0 _$_
_$_ : {a b : Set} -> (a -> b) -> a -> b
f $ x = f x
data Bool : Set where
True : Bool
False : Bool
_&&_ : Bool -> Bool -> Bool
True && b = b
False && _ = False
data Pair (a b : Set) : Set where
pair : a -> b -> ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Construction.PathsOf where
-- "Free Category on a Quiver" Construction, i.e. the category of paths of the quiver.
-- Note the use of Categories.Morphism.HeterogeneousIdentity as well as
-- Relation.Binary.PropositionalEquality.Subst.Properties which are ne... |
{-# OPTIONS --cubical --safe #-}
module Data.Binary.Conversion.Strict where
open import Data.Binary.Definition
open import Data.Binary.Increment.Strict
import Data.Nat as ℕ
import Data.Nat.Properties as ℕ
open import Data.Nat using (ℕ; suc; zero)
open import Data.Nat.Fold
open import Strict
open import Data.Nat.DivMo... |
-- Module for BCCs, CCCs and BCCCs
module CategoryTheory.BCCCs where
open import CategoryTheory.Categories
open import CategoryTheory.BCCCs.Cartesian public
open import CategoryTheory.BCCCs.Cocartesian public
open import CategoryTheory.BCCCs.Closed public
-- Bicartesian categories
record Bicartesian {n} (ℂ : Categor... |
{-
Copyright 2019 Lisandra Silva
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... |
module Interaction-and-input-file where
|
-- Reported and fixed by Andrea Vezzosi.
module Issue898 where
id : {A : Set} -> A -> A
id = ?
|
module Data.Word.Primitive where
postulate
Word : Set
Word8 : Set
Word16 : Set
Word32 : Set
Word64 : Set
{-# FOREIGN GHC import qualified Data.Word #-}
{-# COMPILE GHC Word = type Data.Word.Word #-}
{-# COMPILE GHC Word8 = type Data.Word.Word8 #-}
{-# COMPILE GHC Word16 = type Data.Word.Word16 #-}
{-# COMPI... |
module Numeral.FixedPositional where
import Lvl
open import Data using (<>)
open import Data.List
open import Data.Boolean hiding (elim)
open import Data.Boolean.Stmt
open import Numeral.Finite
open import Numeral.Natural
open import Functional
open import Syntax.Number
open import Type
private variable ℓ : Lvl.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.