text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.Equivalences2
open import lib.types.Paths
open import lib.types.Pi
open import lib.types.Sigma
open import lib.types.TLevel
module lib.NType2 where
module _ {i j} {A : Type i} {B : A → Type j} where
abstract
↓-level : {a b : A} {p : a == b} {u ... |
-- Record expressions are translated to copattern matches.
module _ where
record _×_ (A B : Set) : Set where
constructor _,_
field
fst : A
snd : B
open _×_
dup : ∀ {A} → A → A × A
dup x = record {fst = x; snd = x}
-- dup is translated internally to
-- dup x .fst = x
-- dup x .snd = x
-- so dup shou... |
{-# OPTIONS --without-K #-}
module hott.level.closure.core where
open import level
open import decidable
open import equality
open import function.isomorphism.core
-- open import function.isomorphism.properties
open import sum
open import hott.level.core
open import hott.equivalence.core
open import hott.univalence
op... |
{-# OPTIONS --safe #-}
-- This is a file for dealing with Monuses: these are monoids that are like the
-- positive half of a group. Much of my info on them comes from these papers:
--
-- * Wehrung, Friedrich. ‘Injective Positively Ordered Monoids I’. Journal of
-- Pure and Applied Algebra 83, no. 1 (11 November 1992... |
------------------------------------------------------------------------
-- Fixpoint combinators
------------------------------------------------------------------------
{-# OPTIONS --cubical --safe #-}
module Partiality-monad.Inductive.Fixpoints where
open import Equality.Propositional.Cubical
open import Logical-e... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cw.CW
open import cw.FinCW
open import cw.FinBoundary
open import cohomology.ChainComplex
open import cohomology.Theory
module cw.cohomology.AxiomaticIsoCellular (OT : OrdinaryTheory lzero) where
open OrdinaryTheory OT
open import cw.cohomology... |
open import System.IO using ( _>>_ ; putStr ; commit )
module System.IO.Examples.HelloWorld where
main = putStr "Hello, World\n" >> commit
|
------------------------------------------------------------------------
-- Grammars defined as functions from non-terminals to productions
------------------------------------------------------------------------
{-# OPTIONS --safe #-}
module Grammar.Non-terminal where
open import Algebra
open import Category.Monad
... |
{-# OPTIONS --without-K #-}
module hott.truncation.const where
open import sum
open import equality
open import function.overloading
open import hott.truncation.core
open import hott.level
const-factorisation : ∀ {i j}{A : Set i}{B : Set j}
→ h 2 B
→ (f : A → B)
... |
{-# OPTIONS --without-K #-}
module algebra where
open import algebra.semigroup public
open import algebra.monoid public
open import algebra.group public
|
{-# OPTIONS --safe #-}
module Cubical.HITs.SequentialColimit where
open import Cubical.HITs.SequentialColimit.Base public
open import Cubical.HITs.SequentialColimit.Properties public
|
open import Prelude
open import Nat
open import core
open import contexts
open import disjointness
-- this module contains lemmas and properties about the holes-disjoint
-- judgement that double check that it acts as we would expect
module holes-disjoint-checks where
-- these lemmas are all structurally recursive ... |
{-# OPTIONS --without-K --safe #-}
module Dodo.Binary.Disjoint where
-- Stdlib imports
open import Level using (Level; _⊔_) renaming (suc to ℓsuc)
open import Data.Empty using (⊥)
open import Data.Product using (_,_)
open import Relation.Unary using (Pred)
open import Relation.Binary using (REL)
open import Data.List... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommAlgebra.Instances.Pointwise where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Algebra.CommRing.Base
open import Cubical.Algebra.CommRing.Instances.Pointwise
open import Cubical.Algebra.CommAlgebra.Base
private
... |
{-# OPTIONS --safe #-}
module Cubical.Experiments.Brunerie where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Univalence
open import... |
module StalinSort where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl)
open import Data.Nat using (ℕ; _≤_; _≤?_)
open import Data.List using (List; _∷_; [])
open import Relation.Nullary using (Dec; yes; no)
-- Implementation of Stalin Sort
stalinSort : List ℕ → List ℕ
sta... |
module Data.Bin.Utils where
open import Data.Digit
open import Data.Bin hiding (suc)
open import Data.Fin
open import Data.List
_%2 : Bin → Bin
0# %2 = 0#
([] 1#) %2 = [] 1#
((zero ∷ _) 1#) %2 = 0#
((suc zero ∷ _) 1#) %2 = [] 1#
((suc (suc ()) ∷ _) 1#) %2
bitToBin : Bit → Bin
bitToBin zero = ... |
module Properties where
open import Data.Bool
open import Data.Empty
open import Data.Maybe hiding (Any ; All)
open import Data.Nat
open import Data.List
open import Data.List.All
open import Data.List.Any
open import Data.Product
open import Data.Sum
open import Data.Unit
open import Relation.Nullary
open import Rel... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- obtain free properties from duality
module Categories.Diagram.Pushout.Properties {o ℓ e} (C : Category o ℓ e) where
open Category C
open import Data.Product using (∃; _,_)
open import Categories.Category.Cocartesian C
open import Categories.Mor... |
module Categories.Monad.Algebras where
|
module x02induction where
-- prove properties of inductive naturals and operations on them via induction
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; sym)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; step-≡; _∎)
open import Data.Nat using (ℕ; zer... |
-- Helper operations to construct and build signatures
module SOAS.Syntax.Build (T : Set) where
open import SOAS.Common
open import SOAS.Families.Build {T}
open import SOAS.Context {T}
open import Data.List.Base
open import SOAS.Syntax.Signature T
-- Syntactic sugar to construct arity - sort mappings
⟼₀_ : T → List... |
module ANF where
open import Data.Nat
open import Data.Vec
open import Data.Fin
open import Data.String
open import Data.Rational
open import Data.Sum
open import Data.Unit
open import Binders.Var
record DataConApp (universe a : Set) : Set where
constructor _#_◂_
-- theres probably room for a... |
{-# OPTIONS --postfix-projections #-}
module StateSized.cellStateDependent where
open import Data.Product
open import Data.String.Base
{-
open import SizedIO.Object
open import SizedIO.ConsoleObject
-}
open import SizedIO.Console hiding (main)
open import SizedIO.Base
open import NativeIO
open import StateSizedI... |
module Logic.Propositional.Xor where
open import Logic.Propositional
open import Logic
import Lvl
-- TODO: Is it possible write a general construction for arbitrary number of xors? Probably by using rotate₃Fn₃Op₂?
data _⊕₃_⊕₃_ {ℓ₁ ℓ₂ ℓ₃} (P : Stmt{ℓ₁}) (Q : Stmt{ℓ₂}) (R : Stmt{ℓ₃}) : Stmt{ℓ₁ Lvl.⊔ ℓ₂ Lvl.⊔ ℓ₃} w... |
module _ where
open import Agda.Builtin.Bool
postulate Eq : Set → Set
it : {A : Set} → ⦃ A ⦄ → A
it ⦃ x ⦄ = x
module M1 (A : Set) ⦃ eqA : Eq A ⦄ where
postulate B : Set
variable n : B
postulate P : B → Set
module M2 (A : Set) ⦃ eqA : Eq A ⦄ where
open M1 A
postulate
p₁ : P n
p₂ : P ⦃ it ⦄ n
... |
record R : Set₁ where
field
A : Set
module _ (r : R) where
open R r
data D : Set where
c : A → D
data P : D → Set where
d : (x : A) → P (c x)
postulate
f : D → A
g : (x : D) → P x → D
g x (d y) with Set
g x (d y) | _ = x
|
postulate
A : Set
f : A → A → A → A → A → A → A → A → A → A → A
test : A
test = {!f!}
|
{-# OPTIONS --without-K --safe #-}
open import Level
open import Categories.Category using (Category; _[_,_])
-- Various conclusions that can be drawn from Yoneda
-- over a particular Category C
module Categories.Yoneda.Properties {o ℓ e : Level} (C : Category o ℓ e) where
open import Function using (_$_; Inverse) -... |
------------------------------------------------------------------------
-- A virtual machine
------------------------------------------------------------------------
open import Prelude
import Lambda.Virtual-machine.Instructions
module Lambda.Virtual-machine
{Name : Type}
(open Lambda.Virtual-machine.Instructio... |
module Rewrite where
open import Common.Equality
data _≈_ {A : Set}(x : A) : A → Set where
refl : ∀ {y} → x ≈ y
lem : ∀ {A} (x y : A) → x ≈ y
lem x y = refl
thm : {A : Set}(P : A → Set)(x y : A) → P x → P y
thm P x y px rewrite lem x y = {!!}
|
module Issue3818.M where
|
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.Multivariate.EquivCarac.An[Am[X]]-Anm[X] where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
open import Cubical.Data.Vec
op... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some defined operations (multiplication by natural number and
-- exponentiation)
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
... |
{-# OPTIONS --cubical --safe --postfix-projections #-}
open import Prelude
open import Relation.Binary
module Data.AVLTree.Internal {k} {K : Type k} {r₁ r₂} (totalOrder : TotalOrder K r₁ r₂) where
open import Relation.Binary.Construct.Bounded totalOrder
open import Data.Nat using (_+_)
open TotalOrder totalOrder usi... |
{-# OPTIONS --guardedness #-}
module Stream where
import Lvl
open import Data.Boolean
open import Data.List as List using (List)
import Data.List.Functions as List
import Data.List.Proofs as List
import Data.List.Equiv.Id as List
open import Functional
open import Function.Iteration
open import Fu... |
module Oscar.Data.AList.properties {𝔣} (FunctionName : Set 𝔣) where
open import Oscar.Category.Category
open import Oscar.Category.Functor
open import Oscar.Category.Morphism
open import Oscar.Category.Semigroupoid
open import Oscar.Category.Semifunctor
open import Oscar.Category.Setoid
open import Oscar.Class.Thic... |
{-# OPTIONS --without-K --safe #-}
-- Formalization of internal relations
-- (=congruences: https://ncatlab.org/nlab/show/congruence)
open import Categories.Category
module Categories.Object.InternalRelation {o ℓ e} (𝒞 : Category o ℓ e) where
open import Level hiding (zero)
open import Data.Unit
open import Data.Fi... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module experimental.CubicalTypes where
data access : ℕ → ℕ → Type₀ where
[] : access O O
_#up : ∀ {n} {k} → access n k → access (S n) k
_#down : ∀ {n} {k} → access n k → access (S n) k
_#keep : ∀ {n} {k} → access n k → access (S n) (S k)
_a∙_ : ∀ {n k... |
module Prelude.List where
open import Prelude.List.Base public
|
-- We can infer the type of a record by comparing the given
-- fields against the fields of the currently known records.
module InferRecordTypes where
data Nat : Set where
zero : Nat
suc : Nat → Nat
record _×_ (A B : Set) : Set where
field
fst : A
snd : B
pair = record { fst = zero; snd = zero }
reco... |
{- 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
-}
-- This module contains properties that are only about the behavior of the ha... |
module unit where
open import level
open import eq
data ⊤ {ℓ : Level} : Set ℓ where
triv : ⊤
{-# COMPILE GHC ⊤ = data () (()) #-}
single-range : ∀{ℓ}{U : Set ℓ}{g : U → ⊤ {ℓ}} → ∀{u : U} → g u ≡ triv
single-range {_}{U}{g}{u} with g u
... | triv = refl
|
-- Andreas, 2020-04-15, issue #4586
-- An unintended internal error.
test : Set₁
test = let ... | _ = Set
in Set
-- WAS:
-- An internal error has occurred. Please report this as a bug.
-- Location of the error: src/full/Agda/Syntax/Translation/ConcreteToAbstract.hs:1417
-- EXPECTED:
-- Could not parse the le... |
{-# OPTIONS --copatterns #-}
module Control.Category.Slice where
open import Level using (suc; _⊔_)
open import Relation.Binary hiding (_⇒_)
open import Control.Category
open Category using () renaming (Obj to obj)
-- Given a category C and an object Tgt in C we can define a new category
-- whose objects S are pair... |
open import Nat
open import Prelude
open import core
open import judgemental-erase
open import moveerase
module sensibility where
mutual
-- if an action transforms a ê in a synthetic posistion to another ê,
-- they have the same type up erasure of the cursor
actsense-synth : {Γ : ·ctx} {e e' : ê} {e◆ ... |
open import Agda.Primitive
open import Agda.Builtin.List
open import Agda.Builtin.Maybe
data Coercible (A : Set) (B : Set) : Set where
TrustMe : Coercible A B
postulate coerce : {A B : Set} {{_ : Coercible A B}} → A → B
instance
coerce-fun : {A B : Set} {{_ : Coercible A B}}
→ {C D : Set} {{_ : Coe... |
------------------------------------------------------------------------
-- Monotone functions
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
module Partiality-monad.Inductive.Monotone where
open import Equality.Propositional
open import Prelude
open... |
{-# OPTIONS --without-K --safe #-}
module SDG.Extra.OrderedAlgebra where
open import Relation.Binary
open import Algebra.FunctionProperties
open import Level
open import SDG.Extra.OrderedAlgebra.Structures
record OrderedCommutativeRing c ℓ : Set (suc (c ⊔ ℓ)) where
infix 8 -_
infixl 7 _*_
infixl 6 _+_
infix... |
module Imports.ImportedDisplayForms where
open import Agda.Builtin.Nat
postulate
_plus_ : Set
{-# DISPLAY _+_ a b = a plus b #-}
|
module CP where
open import Level
open import Data.Nat
open import Relation.Nullary
-- open import Data.String using (String)
TypeVar : Set
TypeVar = ℕ
infixl 10 _⨂_
infixl 10 _⅋_
data Type : Set where
-- ‵_ : TypeVar → Type
-- _^ : Type → Type
_⨂_ : Type → Type → Type
_⅋_ : Type → Type →... |
-- Currently modules are not allowed in mutual blocks.
-- This might change.
module ModuleInMutual where
mutual
module A where
T : Set -> Set
T A = A
module B where
U : Set -> Set
U B = B
|
module lang-text where
open import Data.List
open import Data.String
open import Data.Char
open import Data.Char.Unsafe
open import Relation.Binary.PropositionalEquality
open import Relation.Nullary
open import logic
split : {Σ : Set} → (List Σ → Bool)
→ ( List Σ → Bool) → List Σ → Bool
split x y [] = x [] /\ ... |
open import Tutorials.Monday-Complete
module Tutorials.Tuesday-Complete where
-----------
-- Pi and Sigma types
-----------
module Product where
-- The open keyword opens a given module in the current namespace
-- By default all of the public names of the module are opened
-- The using keyword limits the import... |
{-# OPTIONS --two-level --no-sized-types --no-guardedness #-}
module Issue2487.e where
postulate admit : {A : Set} -> A
|
module Type.Size.Finite where
import Lvl
open import Functional
open import Logic
open import Logic.Predicate
open import Numeral.Finite
open import Numeral.Finite.Equiv
open import Numeral.Natural
open import Structure.Setoid
open import Type
open import Type.Size
private variable ℓ ℓₑ : Lvl.Level
-- A finitel... |
module Interior where
open import Basics
open import Ix
open import All
open import Cutting
module INTERIOR {I}(C : I |> I) where
open _|>_ C
data Interior (P : I -> Set)(i : I) : Set where
tile : P i -> Interior P i
<_> : Cutting C (Interior P) i -> Interior P i
ifold : forall {P Q} ->
[... |
-- Andreas, 2021-12-22, issue #5706 reported by Trebor-Huang
-- In Agda <= 2.6.2.1, Int overflow can be exploited.
-- Basically just a modified version of Russell's paradox found at
-- http://liamoc.net/posts/2015-09-10-girards-paradox.html.
-- -- This 64bit Int overflow got us Set:Set.
-- WTF : Set₀
-- WTF = Set₁₈₄₄... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Construction.Elements where
-- Category of Elements -- given a functor into Sets, construct the category of elements 'above' each object
-- see https://ncatlab.org/nlab/show/category+of+elements
open import Level
open import Data.Product using (Σ; _,_; Σ-s... |
{-# OPTIONS --without-K --rewriting #-}
open import Base using (Type; Type₀; _==_; idp)
module PathInductionSimplified where
{-<pathinduction>-}
record Coh {i} (A : Type i) : Type i where
field & : A
open Coh public
instance
J : ∀ {i j} {A : Type i} {a : A} {B : (a' : A) → a == a' → Type j}
→ Coh (B a idp)
... |
open import Data.Bool using (Bool; false; true; _∧_)
open import Data.Maybe
open import Data.Nat
open import Data.Nat.Properties --using (_≟_; _<?_)
open import Data.Product
open import Relation.Binary.PropositionalEquality --using (_≡_; refl)
open import Relation.Nullary --using (Dec; yes; no)
--open import Relation.N... |
{-# OPTIONS --without-K #-}
open import library.Basics hiding (Type ; Σ ; S)
open import library.types.Sigma
open import library.types.Bool
open import Sec2preliminaries
open import Sec3hedberg
open import Sec4hasConstToSplit
open import Sec5factorConst
open import Sec6populatedness
module Sec7taboos where
-- Sub... |
-- Andreas, 2017-08-23, issue #2712
--
-- GHC Pragmas like LANGUAGE have to appear at the top of the Haskell file.
{-# OPTIONS --no-main #-} -- Recognized as pragma option since #2714
module Issue2712 where
{-# FOREIGN GHC {-# LANGUAGE TupleSections #-} #-}
postulate
Pair : (A B : Set) → Set
pair : {A B : Set}... |
-- Andreas, 2016-02-02, issues 480, 1159, 1811
data Unit : Set where
unit : Unit
-- To make it harder for Agda, we make constructor unit ambiguous.
data Ambiguous : Set where
unit : Ambiguous
postulate
f : ∀{A : Set} → (A → A) → A
test : Unit
test = f \{ unit → unit }
-- Extended lambda checking should be po... |
-- The sole purpose of this module is to ease compilation of everything.
module Everything where
import Generic
import Structures
import Instances
import FinMap
import CheckInsert
import GetTypes
import FreeTheorems
import BFF
import Bidir
import LiftGet
import Precond
import Examples
import BFFPlug
|
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Library.Relation.Binary.Equality.Decidable where
open import Light.Library.Relation using (Base)
open import Light.Library.Relation.Binary.Equality using (Equality)
open import Light.Level using (Setω)
import Light.Library.Re... |
{-# OPTIONS --type-in-type #-}
module z where
{-
Generic Programming with Dependent Types
Stephanie Weirich and Chris Casinghino, University of Pennsylvania, {sweirich,ccasin}@cis.upenn.edu
ccasin@cis.upenn.edu
2010 : https://www.seas.upenn.edu/~sweirich/papers/aritygen.pdf
2012 : https://www.cis.upenn.edu/~sweiri... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Implementation.Standard.Data.Empty where
open import Light.Library.Data.Empty using (Library ; Dependencies)
instance dependencies : Dependencies
dependencies = record {}
instance library : Library dependencies
library = re... |
module Tactic.Nat.Induction where
open import Prelude
nat-induction : (P : Nat → Set) → P 0 → (∀ n → P n → P (suc n)) → ∀ n → P n
nat-induction P base step zero = base
nat-induction P base step (suc n) = step n (nat-induction P base step n)
|
open import Agda.Primitive using (lzero; lsuc; _⊔_ ;Level)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; setoid; cong; trans)
import Function.Equality
open import Relation.Binary using (Setoid)
import Categories.Category
import Categories.Functor
import Categories.Category.Instance.Setoids
i... |
------------------------------------------------------------------------
-- The figure of eight
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
-- The module is parametrised by a notion of equality. The higher
-- constructor of the HIT defining the circ... |
open import Prelude
module Implicits.Resolution.Infinite.Algorithm.Soundness where
open import Data.Vec hiding (_∈_)
open import Data.List hiding (map)
open import Data.List.Any hiding (tail)
open Membership-≡
open import Data.Bool
open import Data.Unit.Base
open import Data.Maybe as Maybe hiding (All)
open import Co... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
{-
This file contains a proof that the generator of Π₃S² has
hopf invariant ±1.
-}
module Cubical.Homotopy.HopfInvariant.HopfMap where
open import Cubical.Homotopy.HopfInvariant.Base
open import Cubical.Homotopy.Hopf
open S¹Hopf
open import Cubical.Homotopy.Conne... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Lift where
open import Level
open import Categories.Category
liftC : ∀ {o ℓ e} o′ ℓ′ e′ → Category o ℓ e → Category (o ⊔ o′) (ℓ ⊔ ℓ′) (e ⊔ e′)
liftC o′ ℓ′ e′ C = record
{ Obj = Lift o′ Obj
; _⇒_ = λ X Y → Lift ℓ′ (lower X ⇒ lower Y)
; _≈... |
-- Andreas, 2012-03-13
module Issue585t where
postulate
A : Set
a : A -- just so that A is not empty and the constraints are solvable
-- however, Agda picks the wrong solution
data B : Set where
inn : A -> B
out : B -> A
out (inn a) = a
postulate
P : (y : A) (z : B) → Set
p : (x : B) → P (ou... |
postulate
ℤ : Set
n : ℤ
-_ _! : ℤ → ℤ
-- Note that an unrelated prefix/postfix operator can be combined with
-- itself:
ok : ℤ
ok = n ! ! ! !
also-ok : ℤ
also-ok = - - - - - - - n
|
open import Prelude
module Implicits.Resolution.Infinite.Resolution where
open import Coinduction
open import Data.Fin.Substitution
open import Data.List
open import Data.List.Any.Membership using (map-mono)
open import Data.List.Any
open Membership-≡
open import Implicits.Syntax
open import Implicits.Substitutions
... |
{-# OPTIONS --safe #-}
module Cubical.Data.NatMinusOne where
open import Cubical.Data.NatMinusOne.Base public
open import Cubical.Data.NatMinusOne.Properties public
|
module Lang.Irrelevance where
open import Type
postulate .axiom : ∀{ℓ}{T : Type{ℓ}} -> .T -> T
|
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Library.Data.Both where
open import Light.Level using (Level ; Setω)
open import Light.Variable.Sets
open import Light.Variable.Levels
open import Light.Library.Relation.Binary
using (SelfTransitive ; SelfSymmetric ; Re... |
module Cats.Category.Fun where
open import Cats.Trans public using (Trans ; component ; natural ; id ; _∘_)
open import Relation.Binary using (Rel ; IsEquivalence ; _Preserves₂_⟶_⟶_)
open import Level
open import Cats.Category
open import Cats.Functor using (Functor)
module _ {lo la l≈ lo′ la′ l≈′}
(C : Category... |
{-
Theory about isomorphisms
- Definitions of [section] and [retract]
- Definition of isomorphisms ([Iso])
- Any isomorphism is an equivalence ([isoToEquiv])
-}
{-# OPTIONS --safe #-}
module Cubical.Foundations.Isomorphism where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open impor... |
{-# OPTIONS --sized-types #-}
open import Relation.Binary.Core
module SelectSort.Correctness.Order {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_)
(trans≤ : Transitive _≤_) where
open import Data.List
open import Data.Product
open import Data.Sum
open import Fu... |
------------------------------------------------------------------------------
-- tptp4X yields an error because a duplicate formula
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univ... |
{-# OPTIONS --universe-polymorphism #-}
-- Check that unification can handle levels
module LevelUnification where
open import Common.Level
data _≡_ {a}{A : Set a}(x : A) : ∀ {b}{B : Set b} → B → Set where
refl : x ≡ x
sym₁ : ∀ a b (A : Set a)(B : Set b)(x : A)(y : B) → x ≡ y → y ≡ x
sym₁ a .a A .A x .x refl = ref... |
{-# OPTIONS --type-in-type #-} -- DANGER!
postulate HOLE : {A : Set} -> A -- MORE DANGER!
infixr 6 _\\ _/quad/
infixr 6 _\\&\indent
infixl 2 &_
infixr 3 [_
infixr 5 _,_
infixr 7 _]
infixr 5 _/xor/_ _/land/_ _/lor/_ _+_ _/ll/_ _/gg/_
infixr 5 /Sigma/ /Sigmap/ /Pi/ /Pip/ lambda tlambda
infixr 2 id
infixl 1 WHEN
infixl... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Graphs.Underlying where
open import Categories.Support.PropositionalEquality
open import Categories.Category
hiding (module Heterogeneous)
open import Categories.Categories
open import Categories.Graphs
open import Categories.Functor
using (Functor; module... |
import Algebra.FunctionProperties using (LeftZero; RightZero; _DistributesOverˡ_;_DistributesOverʳ_; Idempotent)
import Function using (_on_)
import Level
import Relation.Binary.EqReasoning as EqReasoning
import Relation.Binary.On using (isEquivalence)
import Algebra.Structures using (module IsCommutativeMonoid; IsComm... |
{-# OPTIONS --cubical-compatible #-}
module NewWithoutK where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
infixl 20 _+_
_+_ : ℕ → ℕ → ℕ
zero + n = n
(suc m) + n = suc (m + n)
infixl 30 _*_
_*_ : ℕ → ℕ → ℕ
zero * n = zero
(suc m) * n = n + (m * n)
infixl 5 _⊎_
data _⊎_ (A B : Set) : Set where
inj₁ : A → A ⊎ B
... |
module Structure.Function.Domain where
import Lvl
open import Functional
import Structure.Function.Names as Names
open import Structure.Function
open import Lang.Instance
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Setoid
open import Type
private varia... |
module TYPE where
data Pair (a b : Set1) : Set1 where
pair : a -> b -> Pair a b
data Unit : Set1 where
unit : Unit
|
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Experiments.NatMinusTwo.Base where
open import Cubical.Core.Primitives
open import Cubical.Data.Nat
open import Cubical.Data.Empty
record ℕ₋₂ : Type₀ where
constructor -2+_
field
n : ℕ
pattern neg2 = -2+ zero
pattern neg1 = -2... |
{- Formal verification of authenticated append-only skiplists in Agda, version 1.0.
Copyright (c) 2020 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 Data.Unit.NonEta
open import Data.Empty
open import Data... |
------------------------------------------------------------------------
-- Characters
------------------------------------------------------------------------
module Data.Char where
open import Data.Nat using (ℕ)
open import Data.Bool using (Bool; true; false)
open import Relation.Nullary
open import Relation.Binar... |
------------------------------------------------------------------------
-- A virtual machine
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Lambda.Simplified.Delay-monad.Virtual-machine where
open import Equality.Propositional
open import Prelude
open ... |
{-# OPTIONS --safe #-}
module Cubical.Data.Maybe.Base where
open import Cubical.Core.Everything
private
variable
ℓ ℓA ℓB : Level
A : Type ℓA
B : Type ℓB
data Maybe (A : Type ℓ) : Type ℓ where
nothing : Maybe A
just : A → Maybe A
caseMaybe : (n j : B) → Maybe A → B
caseMaybe n _ nothing = n
cas... |
module Issue833-2 where
-- Arbitrary data type
record unit : Set where
constructor tt
module Test ⦃ m : unit ⦄ { n : unit } where
open Test { tt }
|
{-# OPTIONS --without-K #-}
module sets.fin.universe where
open import level
open import sum
open import decidable
open import equality.core
open import equality.calculus
open import equality.inspect
open import function.isomorphism
open import function.core
open import function.extensionality
open import function.fi... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Instance.Properties.Setoids.Extensive where
open import Level
open import Data.Product using (∃; Σ; proj₁; proj₂; _,_; _×_)
open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂)
open import Data.Sum.Relation.Binary.Pointwise using (inj₁; inj₂; _⊎ₛ_; dro... |
module A4 where
-- open import Data.Nat
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product
open import Groupoid
------------------------------------------------------------------------------
-- Level 0:
-- types are collections of points
-- equivalences are between points
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.