text stringlengths 4 690k |
|---|
{- reported by Guillaume Brunerie on 2015-09-17 -}
{-# OPTIONS --rewriting #-}
data _==_ {A : Set} (a : A) : A → Set where
idp : a == a
{-# BUILTIN REWRITE _==_ #-}
postulate
A B : Set
f g : A → B
module M (x : A) where
postulate
rx : f x == g x
{-# REWRITE rx #-}
-- This shouldn't work
test : (... |
module NF {A : Set} where
open import Relation.Binary.PropositionalEquality
record Sing (a : A) : Set where
field
unpack : A
eq : unpack ≡ a
{-# INLINE Sing.unpack #-}
record NF (v : A) : Set where
field !! : Sing v
{-# INLINE NF.!! #-}
open NF {{...}}
open import Function.Reasoning
nf : (v : A){{nf... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Construction.Constant where
open import Level
open import Categories.Category
open import Categories.Category.Instance.One
open import Categories.Category.Product
open import Categories.Functor renaming (id to idF)
open import Categories.NaturalTransformati... |
module Structure.Relator.Equivalence where
import Lvl
open import Logic
open import Logic.Propositional
open import Structure.Relator.Properties
hiding (reflexivity ; symmetry ; transitivity)
open import Type
private variable ℓ₁ ℓ₂ : Lvl.Level
-- An equivalence relation is a reflexive, symmetric and transitiv... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.Exactness
open import homotopy.CofiberSequence
open import cohomology.Theory
{- Finite additivity is provable (and in a stronger form) without using
- the additivity axiom. We have
Cⁿ(X ∨ Y) == Cⁿ(X) × Cⁿ(Y)
- and over this path
... |
-- Test case extracted from The Agda standard library
-- Properties related to Any
{-# OPTIONS --show-implicit #-}
module ProjectionNotNormalized where
open import Common.Level renaming (lsuc to suc)
record Setoid c ℓ : Set (suc (c ⊔ ℓ)) where
infix 4 _≈_
field
Carrier : Set c
_≈_ : Carr... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2020, 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.Consensus.Types.EpochIndep
open import ... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Diagram.Pullback.Properties {o ℓ e} (C : Category o ℓ e) where
open import Function using (_$_)
open import Categories.Category.BinaryProducts C
open import Categories.Category.Cartesian C
open import Categories.Diagram.Pullback C
... |
module Sandbox.Pred where
open import Data.Num
open import Data.Num.Properties
open import Data.Nat
open import Data.Fin using (Fin; suc; zero; #_)
open import Data.Vec
open import Relation.Nullary.Decidable using (True; fromWitness)
open import Relation.Binary.PropositionalEquality hiding ([_])
-- open import Relati... |
{-# OPTIONS --show-implicit #-}
{-# OPTIONS --sized-types #-}
module Issue298 where
postulate
Size : Set
↑_ : Size → Size
∞ : Size
{-# BUILTIN SIZE Size #-}
{-# BUILTIN SIZESUC ↑_ #-}
{-# BUILTIN SIZEINF ∞ #-}
data BTree : {i : Size} → Set where
leaf : ∀ {i} → BTree {↑ i}
node : ∀ {i} → BT... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- Reasoning facilities about morphism equivalences (not necessarily 'squares')
module Categories.Morphism.Reasoning {o ℓ e} (C : Category o ℓ e) where
-- some items are defined in sub-modules
open import Categories.Morphism.Reasoning.Core C public
... |
module Prelude where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
{-# BUILTIN NATURAL Nat #-}
data _==_ {A : Set} (x : A) : A → Set where
refl : x == x
data Vec (A : Set) : Nat -> Set where
nil : Vec A 0
cons : forall {n} -> A -> Vec A n -> Vec A (suc n)
data List (A : Set) : Set where
nil : List A... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Everything where
open import Cubical.Data.BinNat public
open import Cubical.Data.Bool public
open import Cubical.Data.Empty public
open import Cubical.Data.Fin public
open import Cubical.Data.Nat public
open import Cubical.Data.Int public renaming (_+_ to _+Int_ ; +... |
{-
This second-order term syntax was created from the following second-order syntax description:
syntax Inception | IA
type
L : 0-ary
P : 0-ary
A : 0-ary
term
rec : L P -> A
inc : L.A P.A -> A
theory
(S) p : P a : P.A |> inc (l. rec (l, p[]), x. a[x]) = a[p[]]
(E) a : L.A |> k : L |- inc (l. ... |
-- The unit type; also used as proposition ``Truth''.
{-# OPTIONS --without-K --safe #-}
module Tools.Unit where
-- We reexport Agda's built-in unit type.
open import Agda.Builtin.Unit public using (⊤; tt)
open import Agda.Primitive
record ⊤′ : Setω where
instance constructor tt
|
import Lvl
open import Structure.Category
open import Structure.Setoid
open import Type
module Structure.Category.Morphism.Transport
{ℓₒ ℓₘ ℓₑ : Lvl.Level}
(cat : CategoryObject{ℓₒ}{ℓₘ}{ℓₑ})
where
import Functional.Dependent as Fn
import Function.Equals
open Function.Equals.Dependent
open ... |
module ModuleArityMismatch where
module M (A : Set) where
postulate
A : Set
module M′ = M A A
|
module Prelude where
-- Function composition
_∘_ : ∀ {x y z : Set} -> (y -> z) -> (x -> y) -> (x -> z)
(f ∘ g) x = f (g x)
-- Product type
data _×_ (A B : Set) : Set where
_,_ : A -> B -> A × B
uncurry : ∀ {x y z : Set} -> (x -> y -> z) -> (x × y) -> z
uncurry f (a , b) = f a b
-- Lists
data List ... |
module Issue49 where
module Dummy {A : Set1} where
postulate D : Set
T : Set
T = Dummy.D {Set}
T' : Set
T' = Dummy.D {A = Set} |
module NatCat where
open import Relation.Binary.PropositionalEquality
-- If you can show that a relation only ever has one inhabitant
-- you get the category laws for free
module
EasyCategory
(obj : Set)
(_⟶_ : obj → obj → Set)
(_∘_ : ∀ {x y z} → x ⟶ y → y ⟶ z → x ⟶ z)
(id : ∀ x → x ⟶ x)
(single-inhabitan... |
module Structure.Relator.Properties where
open import Functional
import Lvl
open import Lang.Instance
open import Logic
import Structure.Relator.Names as Names
open import Type
private variable ℓ ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Lvl.Level
private variable T A B C D E : Type{ℓ}
-- Definition of a reflexive binary relation
mod... |
module Issue2486.ImportB where
open import Issue2486.Haskell
{-# FOREIGN GHC data BBool = BTrue | BFalse #-}
data BBool : Set where
BTrue BFalse : BBool
{-# COMPILE GHC BBool = data BBool ( BTrue | BFalse ) #-}
postulate BList : Set → Set
{-# FOREIGN GHC import MAlonzo.Code.Issue2486.Haskell (MyList) #-}
{-# COMP... |
{-
This is mostly for convenience, when working with ideals
(which are defined for general rings) in a commutative ring.
-}
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommRing.Ideal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
ope... |
------------------------------------------------------------------------------
-- Equality reasoning on inductive PA
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphis... |
------------------------------------------------------------------------
-- One can construct combinators which do not preserve equality
------------------------------------------------------------------------
module TotalParserCombinators.NotACongruence where
open import Codata.Musical.Notation
open import Data.Bool... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.AssocList.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat using (ℕ; _+_)
private
variable
ℓ : Level
A : Type ℓ
infixr 5 ⟨_,_⟩∷_
data AssocList (A : Type ℓ) : Ty... |
{-# OPTIONS --without-K --safe #-}
module Categories.Diagram.Finite where
open import Level
open import Categories.Category
open import Categories.Category.Finite renaming (Finite to FiniteC)
open import Categories.Functor
private
variable
o ℓ e : Level
J C : Category o ℓ e
record Finite (F : Functor J C... |
-- Exercises for session 2
--
-- If unsure which exercises to do start with those marked with *
--
{-# OPTIONS --cubical --allow-unsolved-metas #-}
module ExerciseSession2 where
open import Part1
open import Part2
open import ExerciseSession1
open import Cubical.Foundations.Equiv
-- Exercises about Part 2:
-- Exerc... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Homotopy.PointedFibration where
open import Cubical.Core.Everything
open import Cubical.Data.Nat
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.GroupoidLaws
op... |
{-# OPTIONS --without-K #-}
module Wow-It-is-FV where
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
open import Agda.Primitive
levelEq : lzero ≡ lzero
levelEq = refl
levelEq′ : lsuc lzero ≡ lsuc lzero
levelEq′ = refl
trans : {l : Level} {Q : Set l} {a b c : Q}
→ a ≡ b → b ≡ c → a ≡ c
trans re... |
open import Nat
open import Prelude
open import List
open import contexts
open import core
module lemmas-general where
Coerce-unicity : ∀{r ex1 ex2} →
Coerce r := ex1 →
Coerce r := ex2 →
ex1 == ex2
Coerce-unicity CoerceUnit CoerceUnit = refl
Coerce-... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lexicographic ordering of lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Relation.Binary.Lex.Core where
open import Data.Empt... |
-- ----------------------------------------------------------------------
-- The Agda σ-library
--
-- Substitutions
-- ----------------------------------------------------------------------
-- A substitution on T is defined as a mapping from
-- indices to T (w/ explicit bounds).
--
-- Since the domain is bounded, we... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Binary where
open import Cubical.Relation.Binary.Base public
open import Cubical.Relation.Binary.Properties public
open import Cubical.Relation.Binary.Fiberwise public
|
module RewriteAndWhere where
open import Common.Equality
data ℕ : Set where
zero : ℕ
good : (a b : ℕ) → a ≡ b → b ≡ a
good a b eq with a | eq
... | .b | refl = foo
where
foo : b ≡ b
foo = refl
mutual
aux : (a b : ℕ)(w : ℕ) → w ≡ b → b ≡ w
aux a b .b refl = foo
where
foo : b ≡ b
foo = r... |
{-# OPTIONS --cubical --safe #-}
module Strict.Properties where
open import Path
open import Level
open import Strict
open import Agda.Builtin.Strict
open import Function
$!-≡ : {A : Type a} {B : A → Type b} → (f : ∀ x → B x) → ∀ x → (f $! x) ≡ f x
$!-≡ f x = builtin-eq-to-path (primForceLemma x f)
$!≡$ : {A : Type... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some derivable properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Algebra.Properties.Group {g₁ g₂} (G : Group g₁ g... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to All
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.Relation.Unary.All.Properties where
open import Data.List u... |
{- 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 Haskell.Modules.RWS.Lens where
open import Haskell.Modules.RWS
open i... |
module Nat where
open import Base
data Nat : Set where
zero : Nat
suc : Nat -> Nat
_=N_ : Nat -> Nat -> Set
zero =N zero = True
zero =N suc _ = False
suc _ =N zero = False
suc n =N suc m = n =N m
refN : Refl _=N_
refN {zero} = T
refN {suc n} = refN {n}
symN : Sym _=N_
symN {zero}{zero} p = p
symN {suc... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- Power Functors, Exponentials over a Category C
-- Mainly categories where the objects are functions (Fin n -> Obj) considered pointwise
-- and then upgraded to Functors.
module Categories.Functor.Power {o ℓ e} (C : Category o ℓ e) where
open Ca... |
------------------------------------------------------------------------
-- Possibly infinite binary trees
------------------------------------------------------------------------
module Tree where
open import Codata.Musical.Notation
import Relation.Binary.PropositionalEquality as PropEq
open PropEq using (_≡_)
data... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- N-ary products
------------------------------------------------------------------------
-- Vectors (as in Data.Vec) also represent n-ary products, so what is
-- the point of this module? The n-ary products below... |
module Properties.Equality where
open import Agda.Builtin.Equality using (_≡_; refl)
open import Properties.Contradiction using (¬)
sym : ∀ {A : Set} {a b : A} → (a ≡ b) → (b ≡ a)
sym refl = refl
trans : ∀ {A : Set} {a b c : A} → (a ≡ b) → (b ≡ c) → (a ≡ c)
trans refl refl = refl
cong : ∀ {A B : Set} {a b : A} (f :... |
{-# OPTIONS --without-K #-}
{-
Ribbon is an explicit covering space construction.
This construction is given by Daniel Grayson, Favonia
and Guillaume Brunerie together.
-}
open import HoTT
-- A is the pointed base space.
-- El is intended to be a (group-)set,
module homotopy.RibbonCover {i : ULevel} where
... |
{-# OPTIONS --cubical #-}
module Equality where
import Algebra.FunctionProperties
import Algebra.Structures
open import Cubical.Core.Everything public hiding (module Σ)
open import Data.Empty
open import Data.Nat as ℕ
open import Data.Nat.Properties
open import Data.Product as Σ
open import Data.Unit
open import Func... |
open import Level
module ordinal where
open import logic
open import nat
open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
open import Data.Empty
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.Definitions
open import Data.Nat.Properties
open import R... |
{-# OPTIONS --sized-types #-}
-- {-# OPTIONS -v tc.size.solve:20 -v tc.decl.ax:10 #-}
module SizeUnsolvedConstraintsInTypeSignature where
open import Common.Size
data Nat : (i : Size) -> Set where
Z : {i : Size} -> Nat (↑ i)
S : {i : Size} -> Nat i → Nat (↑ i)
one1 : (i : Size) → Nat (↑ (↑ i))
one1 i = S Z
one2... |
module Section3 where
open import Section1 public
-- 3. The calculus of proof trees
-- ==============================
--
-- We define the set of proof trees of implicational logic in the ordinary style à la Church,
-- except that we use explicit substitutions.
-- 3.1. Definition of types
-- -----------------------... |
-- Andreas, 2015-07-07 Let _ pattern be instantiable by an inaccessible pattern
module _ where
open import Common.Equality
-- These used to work and should still work:
transV1 : ∀{A : Set} (a b c : A) → a ≡ b → b ≡ c → a ≡ c
transV1 _ ._ ._ refl refl = refl
transV2 : ∀{A : Set} (a b c : A) → a ≡ b → b ≡ c → a ≡ c
... |
module PatternShadowsConstructor2 where
module A where
data A (X : Set) : Set where
c : A X → A X
x : A X
open A using (A; c)
f : ∀ {X} → A X → A X → A X
f (c y) x = x
f A.x _ = A.x
|
------------------------------------------------------------------------
-- All library modules, along with short descriptions
------------------------------------------------------------------------
-- Note that core modules are not included.
module Everything where
-- Definitions of algebraic structures like monoi... |
{-# OPTIONS --sized-types #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Size
mutual
data D (i : Size) : Set where
c : D′ i → D i
record D′ (i : Size) : Set where
coinductive
field
force : (j : Size< i) → D j
data R (i : Size) : D ∞ → D ∞ → Set where
c₁ : ∀ x y → R i (c x) (... |
{-# OPTIONS --allow-unsolved-metas #-}
-- Andreas, 2014-05-17 reported by Fabien Renaud
open import Common.Equality
data Nat : Set where
zero : Nat
suc : Nat → Nat
{-# BUILTIN NATURAL Nat #-}
data List {a} (A : Set a) : Set a where
[] : List A
_∷_ : A → List A → List A
length : ∀{a}{A : Set a} → List A →... |
module _ (A : Set) where
data A where
|
------------------------------------------------------------------------
-- The classical definition of (strong) bisimilarity
------------------------------------------------------------------------
-- This module is largely based on "Enhancements of the bisimulation
-- proof method" by Pous and Sangiorgi.
{-# OPTION... |
{-# OPTIONS --without-K --safe #-}
module Data.Binary.Definitions where
open import Function
open import Data.Binary.Bits public
open import Data.List using (_∷_) renaming ([] to 1ᵇ) public
open import Data.Maybe
open import Data.Product
𝔹⁺ : Set
𝔹⁺ = Data.List.List Bit
𝔹 : Set
𝔹 = Maybe 𝔹⁺
infixr 5 0<_
patte... |
------------------------------------------------------------------------
-- The delay monad quotiented by weak bisimilarity
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --sized-types #-}
module Partiality-monad.Coinductive where
open import Equality.Propositio... |
module _ where
record R : Set₁ where
constructor c
open R {{...}}
|
-- Andreas, 2019-10-01, continuing issue #3855 (erasure modality @0)
-- Test case by Nisse at https://github.com/agda/agda/issues/3855#issuecomment-527164352
-- Occurs check needs to take erasure status of definitions
-- (here: postulates) into account.
postulate
P : Set → Set
p : (A : Set) → P A
@0 A : S... |
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Rel; Setoid; IsEquivalence)
module Loop.Structures
{a ℓ} {A : Set a} -- The underlying set
(_≈_ : Rel A ℓ) -- The underlying equality relation
where
open import Algebra.Core
open import Level using (_⊔_)
open import Data.Product using (_,... |
-- Andreas, 2015-07-21 Issue 1612
-- Error "D is not strictly positive" should appear immediately.
-- (There was a performance problem due to the use of Utils.Graph.....allPaths).
{-# NON_TERMINATING #-}
mutual
data D : Set where
c0 : A0 → D
c1 : A1 → D
c2 : A2 → D
c3 : A3 → D
c4 : A4 → D
c... |
open import Relation.Nullary using (Dec; yes; no; ¬_)
open import Relation.Nullary.Decidable using (from-yes)
open import Relation.Nullary.Negation using (contradiction)
open import Relation.Binary using (Tri)
open Tri
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; sym; trans)
open import Dat... |
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇.
-- Common syntax.
module BasicIS4.Syntax.Common where
open import Common.ContextPair public
-- Types, or propositions.
infixr 10 □_
infixl 9 _∧_
infixr 7 _▻_
data Ty : Set where
α_ : Atom → Ty
_▻_ : Ty → Ty → Ty
□_ : Ty → Ty
_∧_ : Ty → Ty → Ty
... |
-- 2011-09-15 posted by Nisse
-- {-# OPTIONS --show-implicit -v tc.lhs.unify:15 #-}
module Issue292-16 where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
postulate
A : Set
f : A → A
data C : A → Set where
c : ∀ x → C (f x)
record Box : Set where
constructor box
field
a : A
b : C a
te... |
{-# OPTIONS --without-K --safe --overlapping-instances #-}
module Interpreter where
open import Data.Char hiding (_≤_)
open import Data.Bool hiding (_≤_)
open import Data.Nat hiding (_≤_)
open import Data.Unit
import Data.Nat as N
open import Data.Product
open import Data.Sum
open import Relation.Binary.PropositionalE... |
-- Andreas, 2016-10-23 issue #2280:
-- Solver throws away meta arguments.
-- (Issue discovered by code review.)
open import Common.Equality
open import Common.Product
data Bool : Set where
true false : Bool
postulate
not : Bool → Bool
data D (f : Bool → Bool) : Set where
c : ∀ x → x ≡ not (f true) → D f
test... |
module Lib.Prelude where
infixr 90 _∘_
infixr 1 _,_
id : {A : Set} -> A -> A
id x = x
_∘_ : {A : Set}{B : A -> Set}{C : {x : A} -> B x -> Set}
(f : {x : A}(y : B x) -> C y)(g : (x : A) -> B x)(x : A) ->
C (g x)
(f ∘ g) x = f (g x)
data Unit : Set where
unit : Unit
{-# COMPILED_DATA Unit () () #-}
p... |
------------------------------------------------------------------------
-- Up-to techniques for the delay monad and the alternative
-- coinductive definition of weak bisimilarity
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Prelude
module Bisimil... |
-- TODO
-- Gentzen-style formalisation of syntax.
-- Simple terms.
module BasicT.Syntax.Gentzen where
open import BasicT.Syntax.Common public
-- Derivations.
infix 3 _⊢_
data _⊢_ (Γ : Cx Ty) : Ty → Set where
var : ∀ {A} → A ∈ Γ → Γ ⊢ A
lam : ∀ {A B} → Γ , A ⊢ B → Γ ⊢ A ▻ B
app : ∀ {A B} → Γ ⊢ A ▻ B →... |
-- Andreas, 2015-05-01
-- With clauses for functions with flexible arity.
-- {-# OPTIONS -v tc.with:40 #-}
open import Common.Prelude
open import Common.Equality
mutual
even : Nat → Bool
even 0 = true
even (suc n) = odd n
odd : Nat → Bool
odd 0 = false
odd (suc n) = even n
NPred : Nat → Set
NPre... |
module par-swap.dpg where
open import par-swap
open import par-swap.properties
open import par-swap.confluent
open import par-swap.dpg-pot
open import par-swap.dpg-e-view
open import noetherian using (noetherian ; ∥_∥s)
open import Esterel.Lang
open import Esterel.Lang.Properties
open import Esterel.Lang.Binding
open ... |
module UnSizedIO.Console where
open import NativeIO
open import UnSizedIO.Base hiding (main)
data ConsoleCommand : Set where
putStrLn : String → ConsoleCommand
getLine : ConsoleCommand
ConsoleResponse : ConsoleCommand → Set
ConsoleResponse (putStrLn s) = Unit
ConsoleResponse getLine = String
ConsoleInterf... |
module Base.Free.Instance.Maybe.Properties where
open import Relation.Binary.PropositionalEquality using (refl; cong)
open import Base.Free using (Free; pure; impure; _>>=_)
open import Base.Free.Instance.Maybe using (Just; Nothing) renaming (Maybe to MaybeF)
open... |
-- MIT License
-- Copyright (c) 2021 Luca Ciccone and Luca Padovani
-- Permission is hereby granted, free of charge, to any person
-- obtaining a copy of this software and associated documentation
-- files (the "Software"), to deal in the Software without
-- restriction, including without limitation the rights to use... |
{-# OPTIONS --sized-types --show-implicit #-}
module WrongSizeAssignment where
postulate
Size : Set
_^ : Size -> Size
∞ : Size
{-# BUILTIN SIZE Size #-}
{-# BUILTIN SIZESUC _^ #-}
{-# BUILTIN SIZEINF ∞ #-}
data Empty : Set where
data N : {_ : Size} -> Set where
zero : N {∞}
suc : forall {i} -> N ... |
{-# OPTIONS --cubical --no-import-sorts #-}
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Function.Base using (_∋_; _$_)
import Cubical.Algebra.Monoid as Std
open import MorePropAlgebra.Bundles
module MorePropAlgebra.Properties.Monoid {ℓ} (assumptions : Monoid {ℓ}) w... |
module _ (C Dummy : Set) where
data Maybe : Set where
nothing : Maybe
IfJust : Maybe → Set → Set
IfJust nothing P = P
postulate
qCtx : C
inferRes : Maybe
-- v-- Implicit is important here
inferResBest : IfJust inferRes ({G : Maybe} → C)
inferResBest with inferRes
inferResBest... |
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --no-double-check #-}
-- {-# OPTIONS -v impossible:70 #-}
-- {-# OPTIONS -v tc.interaction:30 #-}
-- {-# OPTIONS -v tc.check.internal:20 #-}
open import Agda.Builtin.Sigma
record R1 (A : Set) : Set where
instance
prodR1 : {A : Set} {B : A → Set} → ⦃ {a : A} → R1 ... |
module DeclSN where
open import Data.Sum
open import Library
open import Terms
open import Substitution
open import TermShape
open import SN
open import Reduction
-- SN as accessibility
data sn {Γ} {a} (t : Tm Γ a) : Set where
acc : (∀ {t'} → t ⇒β t' → sn t') → sn t
sn⇒β : ∀ {Γ} {a} {t t' : Tm Γ a} → sn t → t ⇒β... |
{-# OPTIONS --safe #-}
module Definition.Typed.Consequences.TypeUnicity where
open import Definition.Untyped hiding (U≢ℕ; U≢Π; U≢ne; ℕ≢Π; ℕ≢ne; Π≢ne; U≢Empty; ℕ≢Empty; Empty≢Π; Empty≢ne)
open import Definition.Untyped.Properties using (subst-Univ-either)
open import Definition.Typed
open import Definition.Typed.Prope... |
import Data.Empty
import Data.Unit
import Data.Bool
import Data.Nat
import Data.Fin
module SecondOrder.Arity where
-- A notion of arity is given by a set of possible arities, and a mapping which to each arity assings a set of
-- argument positions.
record Arity : Set₁ where
field
arity : Set -- the s... |
------------------------------------------------------------------------------
-- Paradoxical combinator properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism... |
--------------------------------------------------------------------------------
-- Strings with markers, used for parsing
--------------------------------------------------------------------------------
{-# OPTIONS --type-in-type #-}
module Parse.MarkedString where
open import Data.String using (fromList; fromChar;... |
{-# OPTIONS --without-K #-}
module well-typed-syntax where
infixl 2 _▻_
infixl 3 _‘’_
infixl 3 _‘’₁_
infixl 3 _‘’₂_
infixl 3 _‘’₃_
infixl 3 _‘’ₐ_
infixr 1 _‘→’_
infixl 3 _‘‘’’_
infixl 3 _w‘‘’’_
infixr 1 _‘‘→'’’_
infixr 1 _w‘‘→'’’_
mutual
data Context : Set where
ε : Context
_▻_ : (Γ : Context) → Typ Γ → Con... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommRing.QuotientRing where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat
open import Cubical.Data.FinData
open import Cubical.HITs.SetQuotients as SQ renaming (_/_ to _/sq_)
open import Cubical.HITs.PropositionalTruncation as PT
open import Cubic... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.Logic where
import Cubical.Data.Empty as D
import Cubical.Data.Prod as D
import Cubical.Data.Sum as D
import Cubical.Data.Unit as D
open import Cubical.Foundations.Prelude
open import Cubical.HITs.PropositionalTruncation
open import Cubical.Foundation... |
------------------------------------------------------------------------
-- Propositional equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Equality.Propositional where
open import Equality
open import Logical-equivalence hiding (_∘_)
open imp... |
-- Andreas, 2011-04-11
-- taken from test/succeed/HereditarilySingletonRecord.agda
module FrozenMVar where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
data ℕ : Set where
zero : ℕ
suc : (n : ℕ) → ℕ
one : ℕ
one = _
force : one ≡ suc zero
force = refl
-- this tries to instantiate the frozen metavar... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module groups.KernelCstImage {i j k}
{G : Group i} {H : Group j} (K : Group k)
(φ : G →ᴳ H) (H-ab : is-abelian H) where
open import groups.KernelImage {K = K} cst-hom φ H-ab
open import groups.Cokernel φ H-ab
Ker-cst-quot-Im : Ker/Im ≃ᴳ Coker
Ker-... |
{-
Pointed structure: X ↦ X
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Structures.Relational.Pointed where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Structure
open import Cubical.Foundations.RelationalStructure
open import ... |
open import Oscar.Prelude
open import Oscar.Class
open import Oscar.Data.𝟙
module Oscar.Class.Unit where
module Unit {𝔞} (𝔄 : Ø 𝔞) = ℭLASS 𝟙 𝔄
module _ {𝔞} {𝔄 : Ø 𝔞} where ‼ = Unit.method 𝔄
|
------------------------------------------------------------------------
-- A proof of univalence
------------------------------------------------------------------------
-- The code is based on code by Anders Mörtberg from Agda's reference
-- manual or the cubical library.
{-# OPTIONS --cubical --safe #-}
module Eq... |
-- 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 Data.Product
open import Data.Integer as ℤ using (ℤ)
open impor... |
{-# OPTIONS --without-K #-}
module VecHelpers where
open import Data.Nat
import Data.Fin as F
open import Data.Vec
open import Function renaming (_∘_ to _○_)
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
infixl 10 _∘̬_ -- vector composition
------------------------------------------------... |
open import Data.Unit
open import Data.Product
open import Relation.Binary.PropositionalEquality
module Spire.Examples.ComputationalDesc where
----------------------------------------------------------------------
data Desc (I : Set) : Set₁ where
`⊤ : Desc I
`X : (i : I) → Desc I
`Σ `Π : (A : Set) (B : A → Desc... |
{-# OPTIONS --sized-types #-}
open import Relation.Binary.Core
module BBHeap.Height.Log {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_ ) where
open import BBHeap _≤_ hiding (#)
open import BBHeap.Height _≤_
open import BBHeap.Properties _≤_
open import Bound.Lower A
open import... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Sigma
open import lib.types.Pi
open import lib.types.Paths
open import lib.types.Unit
open import lib.types.Empty
module lib.Equivalence2 where
{- Pre- and post- composition with equivalences are equivalences -}
module _ {i j k} {A ... |
-- This file defines instances for natural numbers and integers to
-- overload various operations.
{-# OPTIONS --without-K --safe #-}
module Instances where
-- imports from stdlib.
import Data.Nat as Nat
import Data.Integer as Int
import Data.Integer.DivMod as IDM
import Data.Nat.DivMod as NDM
-- imports from local... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.Instances.Unit where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Structure
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv
open import Cubical.Data.Unit renaming (Un... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.