text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K --rewriting #-}
module Sharp where
open import Basics
open import Flat
open import lib.NType2
open import lib.Equivalence2
open import lib.types.Modality
-- --------------------------------------------------------------------------------------
-- Postulating the ♯ Modality
--... |
------------------------------------------------------------------------------
-- Example of a nested recursive function using the Bove-Capretta
-- method
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}... |
{-
Maybe structure: X ↦ Maybe (S X)
-}
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Structures.Relational.Maybe where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
op... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
{-
This file defines integers as equivalence classes of pairs of natural numbers
using a direct & untruncated HIT definition (cf. HITs.Ints.DiffInt)
and some basic operations, and the zero value:
succ : DeltaInt → DeltaInt
pred : DeltaInt → DeltaInt
zero : {a : ℕ} ... |
-- Andreas, 2014-11-01, reported by Andrea Vezzosi
-- Non-printable characters in line comments
-- Soft hyphen in comment creates lexical error:
-- (SOFT HYPHEN \- 0xAD)
-- Or parse error:
-- A
|
{-# OPTIONS --without-K --safe #-}
-- The category of Cats is Monoidal
module Categories.Category.Monoidal.Instance.Cats where
open import Level
open import Data.Product using (Σ; _×_; _,_; proj₁; proj₂; uncurry)
open import Categories.Category
open import Categories.Functor using (Functor; _∘F_) renaming (id to id... |
module VecReplicate where
open import Prelude
replicate : forall {A} -> (n : Nat) -> A -> Vec A n
replicate count x = {!!}
|
module Function where
import Lvl
open import Type
-- The domain type of a function.
domain : ∀{ℓ₁ ℓ₂} {A : Type{ℓ₁}}{B : Type{ℓ₂}} → (A → B) → Type{ℓ₁}
domain{A = A} _ = A
-- The codomain type of a function.
codomain : ∀{ℓ₁ ℓ₂} {A : Type{ℓ₁}}{B : Type{ℓ₂}} → (A → B) → Type{ℓ₂}
codomain{B = B} _ = B
|
{-# OPTIONS --without-K #-}
open import HoTT
module homotopy.HSpace where
-- This is just an approximation because
-- not all higher cells are killed.
record HSpaceStructure {i} (A : Type i) : Type i where
constructor hSpaceStructure
field
e : A
μ : A → A → A
μ-e-l : (a : A) → μ e a == a
μ-e-r : ... |
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-}
module Agda.Builtin.Float where
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
open import Agda.Builtin.Int
open import Agda.Builtin.String
postulate Float : Set
{-# BUILTIN FLOAT Float #-}
primitive
primFloatEquality : Float → Float... |
module Human.Unit where
-- Do I need a record and the built-in ⊤? Why?
data Unit : Set where
unit : Unit
|
module Data.Word.Primitive where
postulate
Word : Set
Word8 : Set
Word16 : Set
Word32 : Set
Word64 : Set
{-# IMPORT Data.Word #-}
{-# COMPILED_TYPE Word Data.Word.Word #-}
{-# COMPILED_TYPE Word8 Data.Word.Word8 #-}
{-# COMPILED_TYPE Word16 Data.Word.Word16 #-}
{-# COMPILED_TYPE Word32 Data.Word.Word32 #-}
... |
open import Mockingbird.Forest.Base using (Forest)
module Mockingbird.Forest.Birds {b ℓ} (forest : Forest {b} {ℓ}) where
open import Level using (_⊔_)
open import Data.Product using (_×_; ∃-syntax)
open import Relation.Unary using (Pred)
open import Relation.Binary using (Rel)
open Forest forest
-- TODO: consider u... |
-- WARNING: This file was generated automatically by Vehicle
-- and should not be modified manually!
-- Metadata
-- - Agda version: 2.6.2
-- - AISEC version: 0.1.0.1
-- - Time generated: ???
{-# OPTIONS --allow-exec #-}
open import Vehicle
open import Vehicle.Data.Tensor
open import Data.Nat as ℕ using (ℕ)
open im... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- The core of a category.
-- See https://ncatlab.org/nlab/show/core
module Categories.Category.Construction.Core {o ℓ e} (𝒞 : Category o ℓ e) where
open import Level using (_⊔_)
open import Function using (flip)
open import Categories.Category.Gr... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some derivable properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Algebra.Properties.AbelianGroup
{a ℓ} (G : Abe... |
------------------------------------------------------------------------
-- By indexing the program and WHNF types on a universe one can handle
-- several types at the same time
------------------------------------------------------------------------
module UniverseIndex where
open import Codata.Musical.Notation
open... |
{-# OPTIONS --without-K #-}
module hott where
open import hott.level public
open import hott.equivalence public
open import hott.loop public
open import hott.univalence public
open import hott.truncation public
|
module NamedImplicit where
postulate
T : Set -> Set
map' : (A B : Set) -> (A -> B) -> T A -> T B
map : {A B : Set} -> (A -> B) -> T A -> T B
map = map' _ _
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data Bool : Set where
true : Bool
false : Bool
id : {A : Set} -> A -> A
id x = x
const : {A... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.ZCohomology.CohomologyRings.Sn where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Transport
open import Cubical.Foundations.HLevels
ope... |
{-# OPTIONS --type-in-type #-}
data ⊥ : Set where
℘ : ∀ {ℓ} → Set ℓ → Set _
℘ {ℓ} S = S → Set
U : Set
U = ∀ (X : Set) → (℘ (℘ X) → X) → ℘ (℘ X)
{- If using two impredicative universe layers instead of type-in-type:
U : Set₁
U = ∀ (X : Set₁) → (℘ (℘ X) → X) → ℘ (℘ X)
-}
τ : ℘ (℘ U) → U
τ t = λ X f p → t (λ x → p (f... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Group where
open import Cubical.Algebra.Group.Base public
open import Cubical.Algebra.Group.Properties public
open import Cubical.Algebra.Group.Morphism public
open import Cubical.Algebra.Group.MorphismProperties public
open import Cubical.Algeb... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Signs
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Sign where
open import Relation.Binary using (Decidable)
open import Relation.Binar... |
module RAdjunctions.RAdj2RMon where
open import Function
open import Relation.Binary.HeterogeneousEquality
open import Categories
open import Functors
open import RMonads
open import RAdjunctions
open Cat
open Fun
open RAdj
Adj2Mon : ∀{a b c d e f}{C : Cat {a}{b}}{D : Cat {c}{d}}{E : Cat {e}{f}}
{J : Fun C... |
{-# OPTIONS --safe --postfix-projections #-}
module Cubical.Algebra.OrderedCommMonoid.PropCompletion where
{-
The completion of an ordered monoid, viewed as monoidal prop-enriched category.
This is used in the construction of the upper naturals, which is an idea of David
Jaz Myers presented here
https://felix-... |
-- Andreas, 2018-10-18, re issue #2757
--
-- Extracted this snippet from the standard library
-- as it caused problems during work in #2757
-- (runtime erasue using 0-quantity).
-- {-# OPTIONS -v tc.lhs.unify:65 -v tc.irr:50 #-}
open import Agda.Builtin.Size
data ⊥ : Set where
mutual
data Conat (i : Size) : Set w... |
open import MJ.Types
open import MJ.Classtable
import MJ.Syntax as Syntax
import MJ.Semantics.Values as Values
--
-- Substitution-free interpretation of welltyped MJ
--
module MJ.Semantics.Functional {c} (Σ : CT c) (ℂ : Syntax.Impl Σ) where
open import Prelude
open import Data.Vec hiding (init)
open import Data.Ve... |
{-# OPTIONS --allow-unsolved-metas #-}
module LiteralFormula where
open import OscarPrelude
open import IsLiteralFormula
open import HasNegation
open import Formula
record LiteralFormula : Set
where
constructor ⟨_⟩
field
{formula} : Formula
isLiteralFormula : IsLiteralFormula formula
open LiteralFormul... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.Bundle where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Univalence
open import Cubical.Foundations.Fibration
open import Cubical.Foundations.Structure
open import Cubical.Structures.TypeEqvTo... |
module Generic.Property.Reify where
open import Generic.Core
data ExplView : Visibility -> Set where
yes-expl : ExplView expl
no-expl : ∀ {v} -> ExplView v
explView : ∀ v -> ExplView v
explView expl = yes-expl
explView v = no-expl
ExplMaybe : ∀ {α} -> Visibility -> Set α -> Set α
ExplMaybe v A with explView... |
module Issue1760g where
data ⊥ : Set where
{-# NO_POSITIVITY_CHECK #-}
{-# NON_TERMINATING #-}
mutual
record U : Set where
constructor roll
field ap : U → U
lemma : U → ⊥
lemma (roll u) = lemma (u (roll u))
bottom : ⊥
bottom = lemma (roll λ x → x)
|
{-# OPTIONS --without-K --safe #-}
open import Algebra.Structures.Bundles.Field
module Algebra.Linear.Morphism.VectorSpace
{k ℓᵏ} (K : Field k ℓᵏ)
where
open import Level
open import Algebra.FunctionProperties as FP
import Algebra.Linear.Morphism.Definitions as LinearMorphismDefinitions
import Algebra.Morphism a... |
module helloworld where
open import IO
main = run (putStrLn "Hello World")
|
{-# OPTIONS --without-K #-}
module hott.types where
open import hott.types.nat public
open import hott.types.coproduct public
|
module README where
----------------------------------------------------------------------
-- The Agda smallib library, version 0.1
----------------------------------------------------------------------
--
-- This library implements a type theory which is described in the
-- Appendix of the HoTT book. It also contains... |
{-# 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
{- A spectrum (family (Eₙ | n : ℤ) such that ΩEₙ₊₁ = Eₙ)
- gives rise to a cohomology theory C wi... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Functions.Definition
open import Setoids.Setoids
open import Setoids.Subset
module Graphs.Definition where
record Graph {a b : _} (c : _) {V' : Set a} (V : Setoid {a} ... |
{-
A defintion of the real projective spaces following:
[BR17] U. Buchholtz, E. Rijke, The real projective spaces in homotopy type theory.
(2017) https://arxiv.org/abs/1704.05770
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.RPn.Base where
open import Cubical.Foundations.Prelude
open impo... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Agda.Builtin.Bool
postulate
A : Set
F : Bool → Set
F true = A
F false = A
data D {b : Bool} (x : F b) : Set where
variable
b : Bool
x : F b
postulate
f : D x → (P : F b → Set) → P x
|
-- {-# OPTIONS -v scope.clash:20 #-}
-- Andreas, 2012-10-19 test case for Issue 719
module ShadowModule2 where
open import Common.Size as YesDuplicate
import Common.Size as NotDuplicate
private open module YesDuplicate = NotDuplicate
-- should report:
-- Duplicate definition of module YesDuplicate.
-- NOT: Duplicate ... |
------------------------------------------------------------------------
-- Various forms of induction for natural numbers
------------------------------------------------------------------------
module Induction.Nat where
open import Data.Function
open import Data.Nat
open import Data.Fin
open import Data.Fin.Props
... |
{-# OPTIONS --prop #-}
module Issue3526-2 where
open import Agda.Builtin.Equality
record Truth (P : Prop) : Set where
constructor [_]
field
truth : P
open Truth public
data ⊥' : Prop where
⊥ = Truth ⊥'
¬ : Set → Set
¬ A = A → ⊥
unique : {A : Set} (x y : ¬ A) → x ≡ y
unique x y = refl
⊥-elim : (A : Set) ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Notation for freely adding extrema to any set
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Nullary.Construct.Add.Extrema where
ope... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Groupoid.Product where
open import Data.Product
open import Categories.Category
open import Categories.Groupoid
open import Categories.Morphisms
import Categories.Product as ProductC
Product : ∀ {o₁ ℓ₁ e₁ o₂ ℓ₂ e₂} {C : Category o₁ ℓ₁ e₁} {D : Category o₂ ℓ₂... |
------------------------------------------------------------------------------
-- Some properties of the function iter₀
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorp... |
{-# OPTIONS --safe #-}
module Cubical.HITs.Pushout.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Data.Unit
open import Cubical.Data.Sigma
open import Cubical.HITs.Su... |
{-# OPTIONS --without-K --safe --erased-cubical --no-import-sorts #-}
module SUtil where
open import Prelude
_∈_ : Name → List Name → Bool
n ∈ [] = false
n ∈ (x ∷ ns) = if n == x then true else n ∈ ns
-- treat list as set
insert : Name → List Name → List Name
insert n ns = if n ∈ ns then ns else n ∷ ns
looku... |
------------------------------------------------------------------------
-- Various parser combinator laws
------------------------------------------------------------------------
-- Note that terms like "monad" and "Kleene algebra" are interpreted
-- liberally in the modules listed below.
module TotalParserCombinato... |
{-# OPTIONS --without-K #-}
module Util.HoTT.Univalence.Beta where
open import Util.HoTT.Equiv
open import Util.HoTT.Equiv.Induction
open import Util.HoTT.Univalence.Axiom
open import Util.Prelude
open import Util.Relation.Binary.PropositionalEquality using
( Σ-≡⁻ ; cast )
private
variable
α β γ : Level
... |
------------------------------------------------------------------------------
-- Testing records
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS -... |
module Structure.Container.SetLike.Proofs where
{-
open import Data.Boolean
open import Data.Boolean.Stmt
open import Functional
open import Lang.Instance
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Container.SetLike
open import Structure.Function... |
module Issue835 where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
postulate
A : Set
x y : A
F : x ≡ y → Set
F ()
|
-- 2014-05-02
-- This looped in the epic backend after Andreas' big projection refactoring (Oct 2013)
data ℕ : Set where
zero : ℕ
suc : (n : ℕ) → ℕ
{-# BUILTIN NATURAL ℕ #-} -- Essential
f : ℕ → ℕ
f zero = zero
f (suc m) = m
postulate
IO : Set → Set
{-# COMPILED_TYPE IO IO #-}
postulate
return : ∀ ... |
module Issue4924 where
record R (T : Set) : Set where
field
f : T → T
module _ {A B : Set} (ra : R A) (rb : R B) (pri : {T : Set} → {{r : R T}} → T) where
open R ra
open R rb
instance
_ = ra
_ : A
_ = f pri
|
{-# OPTIONS --without-K --safe #-}
-- https://www.cs.bham.ac.uk/~mhe/papers/omniscient-journal-revised.pdf
module Constructive.Omniscience where
open import Level renaming (zero to lzero; suc to lsuc)
import Data.Bool as 𝔹 using (_≤_)
open import Data.Bool as 𝔹 using (Bool; true; false; T; f≤t; b≤b; _∧_; not; _∨_)... |
-- Some very simple problems just to test that things work properly.
-- If everything has been installed properly following
--
-- https://github.com/HoTT/EPIT-2020/tree/main/04-cubical-type-theory#installation-of-cubical-agda-and-agdacubical
--
-- then this file should load fine and one should get 4 holes which
-- one ... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Values for standard evaluation (Def. 3.1 and 3.2, Fig. 4c and 4f).
------------------------------------------------------------------------
import Parametric.Syntax.Type as Type
module Parametric.Denotation.Value
... |
{-# OPTIONS --safe #-}
module Cubical.Data.FinSet.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Function
open import Cubical.Foundations.Structure
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
o... |
{-# OPTIONS --safe --warning=error --without-K --guardedness #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import LogicalFormulae
open import Groups.Lemmas
open import Groups.Definition
open import Setoids.Orders.Partial.Definition
open import Setoids.Orders.Total.Definition
open import Setoids.S... |
-- Limits.
-- Heavily inspired by https://github.com/UniMath/UniMath/blob/master/UniMath/CategoryTheory/limits/graphs/limits.v
-- (except we're using categories instead of graphs to index limits)
{-# OPTIONS --safe #-}
module Cubical.Categories.Limits.Limits where
open import Cubical.Foundations.Prelude
open import C... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Object.Zero
-- Cokernels of morphisms.
-- https://ncatlab.org/nlab/show/cokernel
module Categories.Object.Cokernel {o ℓ e} {𝒞 : Category o ℓ e} (𝟎 : Zero 𝒞) where
open import Level
open import Categories.Morphism 𝒞
open im... |
{-# OPTIONS --type-in-type #-}
module DescTT where
--********************************************
-- Prelude
--********************************************
-- Some preliminary stuffs, to avoid relying on the stdlib
--****************
-- Sigma and friends
--****************
data Sigma (A : Set) (B : A -> Set) : S... |
------------------------------------------------------------------------------
-- Testing the translation of definitions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymor... |
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.ListedFiniteSet.Base where
open import Cubical.Core.Everything
open import Cubical.Foundations.Logic
open import Cubical.Foundations.Everything
private
variable
A : Type₀
infixr 20 _∷_
infix 30 _∈_
data LFSet (A : Type₀) : Type₀ where
[] : LFSet A
_... |
{- 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
-}
open import LibraBFT.ImplShared.Util.Dijkstra.RWS
open import LibraBFT.ImplSh... |
{-# OPTIONS --without-K #-}
module combination where
open import Type
open import Data.Nat.NP
open import Data.Nat.DivMod
open import Data.Fin using (Fin; Fin′; zero; suc) renaming (toℕ to Fin▹ℕ)
open import Data.Zero
open import Data.One
open import Data.Two
open import Data.Sum
open import Data.Product
open import D... |
module eq-reasoning {A : Set} where
open import eq
infix 1 begin_
infixr 2 _≡⟨⟩_ _≡⟨_⟩_
infix 3 _∎
begin_ : ∀ {x y : A}
→ x ≡ y
-----
→ x ≡ y
begin x≡y = x≡y
_≡⟨⟩_ : ∀ (x : A) {y : A}
→ x ≡ y
-----
→ x ≡ y
x ≡⟨⟩ x≡y = x≡y
_≡⟨_⟩_ : ∀ (x : A) {y z : A}
→ x ≡ ... |
{-# OPTIONS --without-K #-}
module Util.HoTT.Univalence.Statement where
open import Util.HoTT.Equiv
open import Util.Prelude
Univalence : ∀ α → Set (lsuc α)
Univalence α = {A B : Set α} → IsEquiv (≡→≃ {A = A} {B = B})
|
module Luau.Heap where
open import Agda.Builtin.Equality using (_≡_)
open import FFI.Data.Maybe using (Maybe; just)
open import FFI.Data.Vector using (Vector; length; snoc; empty)
open import Luau.Addr using (Addr)
open import Luau.Var using (Var)
open import Luau.Syntax using (Block; Expr; nil; addr; function⟨_⟩_end)... |
open import Oscar.Prelude
open import Oscar.Data.𝟘
module Oscar.Data.ProperlyExtensionNothing where
module _
{𝔵} {𝔛 : Ø 𝔵}
{𝔬} {𝔒 : 𝔛 → Ø 𝔬}
{ℓ}
{ℓ̇} {_↦_ : ∀ {x} → 𝔒 x → 𝔒 x → Ø ℓ̇}
where
record ProperlyExtensionNothing (P : ExtensionṖroperty ℓ 𝔒 _↦_) : Ø 𝔵 ∙̂ 𝔬 ∙̂ ℓ where
constructor... |
------------------------------------------------------------------------------
-- Totality properties respect to OrdTree
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymor... |
module UniverseCollapse
(down : Set₁ -> Set)
(up : Set → Set₁)
(iso : ∀ {A} → down (up A) → A)
(osi : ∀ {A} → up (down A) → A) where
anything : (A : Set) → A
anything = {!!}
|
module ctxt where
open import lib
open import cedille-types
open import ctxt-types public
open import subst
open import general-util
open import syntax-util
new-sym-info-trie : trie sym-info
new-sym-info-trie = trie-insert empty-trie compileFail-qual ((term-decl compileFailType) , "missing" , "missing")
new-qualif :... |
{-# OPTIONS --copatterns #-}
-- Andreas, 2013-11-05 Coverage checker needs clauses to reduce type!
-- {-# OPTIONS -v tc.cover:20 #-}
module Issue937a where
open import Common.Prelude
open import Common.Equality
open import Common.Product
T : (b : Bool) → Set
T true = Nat
T false = Bool → Nat
test : Σ Bool T
proj₁ ... |
module Sized.StatefulCell where
open import Data.Product
open import Data.String.Base
open import SizedIO.Object
open import SizedIO.IOObject
open import SizedIO.ConsoleObject
open import SizedIO.Console hiding (main)
open import NativeIO
open import Size
--open import StateSizedIO.Base
data CellState# : Set wh... |
{-# OPTIONS --safe #-}
module Cubical.Data.SumFin.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv renaming (_∙ₑ_ to _⋆_)
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open import Cubical.Found... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Functions.Definition
open import Lists.Definition
open import Lists.Fold.Fold
open import Lists.Length
module Lists.Map.Map where
map : {a b : _} {A : Set a} {B : Set b} (f : A → B) → List A → List B
map f [] = []
map f (x :: ... |
module Structure.Container.SetLike where
{-
open import Data.Boolean
open import Data.Boolean.Stmt
open import Functional
open import Lang.Instance
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Setoid renaming (_≡_ to _≡ₛ_ ; _≢_ to _≢ₛ_)
open import ... |
{-# OPTIONS --cubical-compatible --show-implicit #-}
-- {-# OPTIONS -v tc.data.sort:20 -v tc.lhs.split.well-formed:100 #-}
module WithoutK5 where
-- Equality defined with one index.
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
weak-K : {A : Set} {a b : A} (p q : a ≡ b) (α β : p ≡ q) → α ≡ β
weak-K refl... |
-- Andreas, 2016-02-21 issue 1862 reported by nad
-- {-# OPTIONS -v tc.decl:10 -v tc.def.where:10 -v tc.meta:10 -v tc.size.solve:100 #-}
open import Common.Size
data Nat (i : Size) : Set where
zero : Nat i
suc : (j : Size< i) (n : Nat j) → Nat i
id : ∀ i → Nat i → Nat i
id _ zero = zero
id _ (suc j n) = s
... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Span
open import lib.types.Pointed
open import lib.types.Pushout
open import lib.types.PushoutFlattening
open import lib.types.Unit
open import lib.types.Paths
open import lib.types.Lift
open import lib.cubical.Square
-- Suspension is defined as... |
module MLib.Algebra.PropertyCode.Core where
open import MLib.Prelude
open import MLib.Finite
import MLib.Finite.Properties as FiniteProps
open import MLib.Algebra.PropertyCode.RawStruct
import Relation.Unary as U using (Decidable)
open import Relation.Binary as B using (Setoid)
open List.All using (All; _∷_; [])
ope... |
open import FRP.JS.Bool using ( Bool ; not )
open import FRP.JS.Maybe using ( Maybe ; just ; nothing ; _≟[_]_ )
open import FRP.JS.Nat using ( ℕ ; _≟_ ; _+_ ; _*_ ; _∸_ ; _/_ ; _/?_ ; _≤_ ; _<_ ; show ; float )
open import FRP.JS.Float using ( ℝ ) renaming ( _≟_ to _≟r_ )
open import FRP.JS.String using () renaming ( _... |
{-# OPTIONS --cubical --safe --no-import-sorts #-}
module Cubical.Algebra.CommAlgebra.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv.HalfAdjoint
open impor... |
{-# OPTIONS --without-K --safe #-}
module Data.Binary.Relations where
open import Data.Binary.Relations.Raw
open import Data.Binary.Definitions
open import Data.Binary.Operations.Addition
open import Relation.Binary
open import Relation.Nullary
import Data.Empty.Irrelevant as Irrel
infix 4 _≤_ _<_
record _≤_ (x y : ... |
module Test where
open import Agda.Builtin.Bool
using (Bool; false; true)
open import Agda.Builtin.Unit
_∧_
: Bool
→ Bool
→ Bool
false ∧ x
= false
_ ∧ y
= y
|
------------------------------------------------------------------------------
-- The gcd program is correct
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-... |
{-# OPTIONS --without-K #-}
open import Base
module Spaces.Circle where
{-
Idea :
data S¹ : Set where
base : S¹
loop : base ≡ base
I’m using Dan Licata’s trick to have a higher inductive type with definitional
reduction rule for [base]
-}
private
data #S¹ : Set where
#base : #S¹
S¹ : Set
S¹ = #S¹
base... |
{-# OPTIONS --cubical #-}
module _ where
open import Agda.Builtin.Equality
uip : ∀ {a} {A : Set a} {x y : A} (p q : x ≡ y) → p ≡ q
uip refl refl = refl
|
{-# OPTIONS --rewriting #-}
-- 2015-02-17 Jesper and Andreas
postulate
A : Set
R : A → A → Set
f : A → A
g : A → A
r : R (f _) (g _)
{-# BUILTIN REWRITE R #-}
{-# REWRITE r #-}
|
{-# OPTIONS --cubical #-}
module Type.Cubical.Univalence where
open import Function.Axioms
open import Functional
open import Logic.Predicate
open import Logic.Propositional
import Lvl
open import Structure.Function.Domain using (intro ; Inverseₗ ; Inverseᵣ)
open import Structure.Relator.Properties
open import S... |
{-# OPTIONS --without-K #-}
module container.m.from-nat where
open import container.m.from-nat.core public
open import container.m.from-nat.cone public
open import container.m.from-nat.coalgebra public
open import container.m.from-nat.bisimulation public
|
------------------------------------------------------------------------------
-- Testing the translation of the logical constants
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univer... |
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇.
-- Tarski-style semantics with contexts as concrete worlds, and glueing for α, ▻, and □.
-- Implicit syntax.
module BasicIS4.Semantics.TarskiOvergluedImplicit where
open import BasicIS4.Syntax.Common public
open import Common.Semantics public
-- Intuitioni... |
module lib-safe where
open import datatypes-safe public
open import logic public
open import thms public
open import termination public
open import error public
|
------------------------------------------------------------------------------
-- Conversion rules for the Collatz function
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-poly... |
-- An ATP-pragma must appear in the same module where its argument is
-- defined.
-- This error is detected by TypeChecking.Monad.Signature.
module ATPImports where
open import Imports.ATP-A
{-# ATP axiom p #-}
postulate foo : a ≡ b
{-# ATP prove foo #-}
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
import homotopy.ConstantToSetExtendsToProp as ConstExt
open import homotopy.Pigeonhole
module homotopy.FinSet where
-- the explicit type of finite sets, carrying the cardinality on its sleeve
FinSet-exp : Type₁
FinSet-exp = Σ ℕ λ n → BAut (Fin n)
FinSet-prop ... |
{-# OPTIONS --sized-types #-}
module SList (A : Set) where
open import Data.List
open import Data.Product
open import Size
data SList : {ι : Size} → Set where
snil : {ι : Size}
→ SList {↑ ι}
_∙_ : {ι : Size}(x : A)
→ SList {ι}
→ SList {↑ ι}
size : List ... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.AbGroup.Instances.NProd where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat using (ℕ)
open import Cubical.Algebra.Group
open import Cubical.Algebra.Group.Instances.NProd
open import Cubical.Algebra.AbGroup
private variable
ℓ : Level
open AbGrou... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.