text stringlengths 4 690k |
|---|
------------------------------------------------------------------------
-- The Agda standard library
--
-- A pointwise lifting of a relation to incorporate new extrema.
-------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- This module is designed to be used w... |
{-# OPTIONS --cubical --no-import-sorts --allow-unsolved-metas #-}
module Number.Operations where
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Relation.Nullary.Base -- ¬_
open import Cubical.Data.Unit.Base -- Unit
open import Cubical.Data.Sigma.Base renaming ... |
{-# OPTIONS --without-K --exact-split --safe #-}
module Fragment.Extensions.CSemigroup.Monomial where
open import Fragment.Equational.Theory.Bundles
open import Fragment.Algebra.Signature
open import Fragment.Algebra.Free Σ-magma hiding (_~_)
open import Fragment.Algebra.Homomorphism Σ-magma
open import Fragment.Alg... |
-- Properties of (pre)additive categories
{-# OPTIONS --safe #-}
module Cubical.Categories.Additive.Properties where
open import Cubical.Algebra.AbGroup.Base
open import Cubical.Algebra.Group.Properties
open import Cubical.Categories.Additive.Base
open import Cubical.Foundations.Prelude
private
variable
ℓ ℓ' :... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.RingSolver.AlmostRing where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Sigma
open import Cubical.Data.Nat using (ℕ)
open import Cubical.Algebra.Semigroup
open import Cubical.Algebra.Monoid
open import Cubical.Algebra.AbGr... |
-- Andreas, 2017-10-11, issue #2769
-- Patch https://github.com/agda/agda/commit/7fc73607703e0373beaf65ba05fb1911b6d84a5e
--
-- Re #2495: make mutual info safer by distinguishing Nothing and Just []
--
-- Nothing means: never computed.
-- Just [] means: computed, but non-recursive.
--
-- These two notions were... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Pi
open import lib.types.Pointed
open import lib.types.Sigma
open import lib.types.Span
open import lib.types.Paths
import lib.types.Generic1HIT as Generic1HIT
module lib.types.Pushout {i j k} where
module _ where
private
data #Pushout-a... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Sum.Properties where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Functions.Embedding
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.I... |
module Data.Word32 where
open import Data.Bool
open import Data.Char
{-#
FOREIGN GHC
import Data.Bits
import Data.Word
data Byte = Byte Bool Bool Bool Bool Bool Bool Bool Bool
data Bytes = Bytes Byte Byte Byte Byte
byteToWord8 :: Byte -> Word8
byteToWord8 (Byte b0 b1 b2 b3 b4 b5 b6 b7) =
boolToBi... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Natural numbers defined in terms of Data.Star
------------------------------------------------------------------------
module Data.Star.Nat where
open import Data.Star
open import Data.Unit
open import Function... |
module Issue1496 where
open import Common.Unit
open import Common.String
open import Common.Char
open import Common.List
open import Common.IO
-- Agda infers that the "a" level argument to return has to be
-- Agda.Primitive.lzero.
main : IO Unit
main = return unit
|
--
-- In this module we conclude our proof: we have shown that t, derive-dterm t
-- and produce related values (in the sense of the fundamental property,
-- rfundamental3), and for related values v1, dv and v2 we have v1 ⊕ dv ≡
-- v2 (because ⊕ agrees with validity, rrelV3→⊕).
--
-- We now put these facts together via ... |
{-# OPTIONS --safe #-}
module Cubical.HITs.SetCoequalizer where
open import Cubical.HITs.SetCoequalizer.Base public
open import Cubical.HITs.SetCoequalizer.Properties public
|
module datatype-util where
open import constants
open import ctxt
open import syntax-util
open import general-util
open import type-util
open import cedille-types
open import subst
open import rename
open import free-vars
{-# TERMINATING #-}
decompose-arrows : ctxt → type → params × type
decompose-arrows Γ (TpAbs me x... |
module DSyntax where
open import Data.List
open import Data.List.All
open import Data.Nat
open import Typing
data DExpr φ : Type → Set where
var : ∀ {t}
→ (x : t ∈ φ)
→ DExpr φ t
nat : (unr-φ : All Unr φ)
→ (i : ℕ)
→ DExpr φ TInt
unit : (unr-φ : All Unr φ)
→ DExpr φ TUnit
pai... |
module Max where
open import Data.Empty using (⊥-elim)
open import Data.Fin
open import Data.Nat hiding (_≤_)
open import Function using (_∘_)
open import Relation.Nullary
variable
n : ℕ
-- from https://github.com/zmthy/recursive-types/tree/ftfjp16
-- RecursiveTypes.Inductive.Type
-- adapted to use "variable"
-... |
{-
This file contains a summary of the proof that π₄(S³) ≡ ℤ/2ℤ
The --experimental-lossy-unification flag is used to speed up type checking.
The file still type checks without it, but it's a lot slower (about 10 times).
-}
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Homotopy.Group.Pi4S3.Su... |
module BasicIS4.Metatheory.Hilbert-TarskiClosedOvergluedImplicit where
open import BasicIS4.Syntax.Hilbert public
open import BasicIS4.Semantics.TarskiClosedOvergluedImplicit public
open ImplicitSyntax (∅ ⊢_) public
-- Completeness with respect to a particular model, for closed terms only.
module _ {{_ : Model}} w... |
{-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Equivalence
open import HoTT.Identity
module HoTT.Identity.NaturalNumber where
private variable m n : ℕ
_=ℕ_ : ℕ → ℕ → 𝒰₀
zero =ℕ zero = 𝟏
zero =ℕ (succ _) = 𝟎
succ _ =ℕ zero = 𝟎
succ m =ℕ succ n = m =ℕ n
private
r : (n : ℕ) → n =ℕ n
r zero ... |
module Common.Reflect where
open import Common.Level
open import Common.Prelude renaming (Nat to ℕ)
postulate QName : Set
{-# BUILTIN QNAME QName #-}
primitive primQNameEquality : QName → QName → Bool
data Hiding : Set where
hidden visible instance : Hiding
{-# BUILTIN HIDING Hiding #-}
{-# BUILTIN HIDDEN ... |
{-# OPTIONS --cubical --safe #-}
module FreeReader where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Function.Base using (id; _$_)
open import Class
open Functor
variable
A B C : Set
-- The Reader monad, as a free monad
data FreeReader (R : Set) : Set → Set₁ where
Pu... |
module Ids where
id : {A : Set} -> A -> A
id x = x
slow : {A : Set} -> A -> A
slow = id id id id id id id id id id id id id id id id id id
-- The example above is based on one in "Implementing Typed
-- Intermediate Languages" by Shao, League and Monnier.
|
{-# OPTIONS --cubical #-}
open import 17-number-theory
open import Cubical.Core.Everything
data circle-C : UU lzero where
base : circle-C
loop : Path circle-C base base
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Modulo.FinEquiv where
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Prelude
open import Cubical.Data.Fin
open import Cubical.Data.Nat
open import Cubical.Data.Nat.Order
open ... |
{-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Identity
open import HoTT.Equivalence
open import HoTT.Homotopy
module HoTT.Identity.Identity where
ap⁻¹ : ∀ {i j} {A : 𝒰 i} {B : 𝒰 j} ((f , _) : A ≃ B) {a a' : A} →
f a == f a' → a == a'
ap⁻¹ e {a} {a'} p = η a ⁻¹ ∙ ap g p ∙ η a'
where ope... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of the membership predicate for fresh lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Rel; Setoid)... |
module Interpreter where
open import Data.Char
open import Data.Bool
open import Data.Nat
import Data.Unit as U
open import Data.Product
open import Data.Sum
open import Relation.Binary.PropositionalEquality as PropEq
open import Relation.Nullary.Core
import Data.String as Str
open import Data.Nat.Show
import Data.Lis... |
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.PropositionalEquality.Subst.Properties where
-- Properties of 'subst' onto binary relations.
open import Level
open import Function using (_$_; flip) renaming (id to idFun; _∘_ to _⊚_)
open import Relation.Binary
open import Relation.Binary.PropositionalEqual... |
{-# OPTIONS --cubical #-}
module Computability.Enumeration.Univalence where
open import Cubical.Core.Everything
open import Computability.Prelude
open import Computability.Enumeration.Base
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of the sublist relation over setoid equality.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary hiding (Decidable... |
{-# OPTIONS --cubical --prop #-}
module Issue2487.Infective where
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- An equality postulate which evaluates
------------------------------------------------------------------------
{-# OPTIONS --with-K #-}
module Relation.Binary.PropositionalEquality.TrustMe where
open import Re... |
module Issue237 where
open import Common.Equality
data Unit : Set where
unit : Unit
f : Unit → Unit
f u with u
... | unit = unit
postulate
eq : ∀ u → f u ≡ unit
foo : Unit → Set₁
foo u rewrite eq u = Set
-- Bug.agda:20,1-25
-- Not implemented: type checking of with application
-- when checking that the expre... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Monoid where
open import Cubical.Algebra.Monoid.Base public
|
-- {-# OPTIONS -v reify:100 -v syntax.reify:100 #-}
module Issue857b where
data ⊥ : Set where
⊥-elim : {A : Set} → ⊥ → A
⊥-elim ()
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
_∋_ : (A : Set) → A → A
_ ∋ x = x
foo : {A B : Set} {x : ⊥} {y : B} →
((⊥ → A) ∋ λ()) x ≡ ((⊥ → B → A) ∋ λ()) x y
foo =... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Monoid.Instances.NatPlusBis where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat
open import Cubical.Algebra.Monoid
open PlusBis
NatPlusBis-Monoid : Monoid ℓ-zero
fst NatPlusBis-Monoid = ℕ
MonoidStr.ε (snd NatPlusB... |
module Ints.Properties where
open import Ints
open import Equality
------------------------------------------------------------------------
-- internal stuffs
private
≡→≡ : ∀ {a b} → (+ a ≡ + b) → a ≡ b
≡→≡ refl = refl
≡→≡′ : ∀ {a b} → (-[1+ a ] ≡ -[1+ b ]) → a ≡ b
≡→≡′ refl = refl
≡←≡ : ∀ {a b} → a ≡ b ... |
{-# OPTIONS --no-universe-polymorphism #-}
module Issue202 where
open import Common.Level
open import Imports.Test
module Test2 {ℓ : Level} (F : Foo ℓ) where
-- Test2.agda:4,31-36
-- The metavariable _1 cannot depend on ℓ because it does not depend
-- on any variables
-- when checking that the expression Foo ℓ has ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.CircleHSpace
open import homotopy.LoopSpaceCircle
open import homotopy.Pi2HSusp
open import homotopy.IterSuspensionStable
-- This summerizes all [πₙ Sⁿ]
module homotopy.PinSn where
private
π1S¹-iso-ℤ : πS 0 ⊙S¹ ≃ᴳ ℤ-group
π1S¹-is... |
module InstanceArgumentsBraceSpaces where
postulate
A B : Set
test : {{a : A} } → B
|
module Tactic.Nat.Subtract.Auto where
open import Prelude
open import Builtin.Reflection
open import Tactic.Reflection.Quote
open import Tactic.Reflection.Meta
open import Tactic.Nat.Reflect
open import Tactic.Nat.NF
open import Tactic.Nat.Auto
open import Tactic.Nat.Simpl.Lemmas
open import Tactic.Nat.Subtract.Exp
... |
{-# FOREIGN GHC import qualified Issue223 #-}
data A : Set
data B : Set
data A where
BA : B → A
data B where
AB : A → B
BB : B
{-# COMPILE GHC A = data Issue223.A (Issue223.BA) #-}
{-# COMPILE GHC B = data Issue223.B (Issue223.AB | Issue223.BB) #-}
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- de Bruijn-aware generic traversal of reflected terms.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Category.Applicative using (RawAppli... |
{-# OPTIONS --universe-polymorphism #-}
module Reflection where
open import Common.Prelude hiding (Unit; module Unit) renaming (Nat to ℕ; module Nat to ℕ)
open import Common.Reflection
open import Common.Equality
open import Agda.Builtin.TrustMe
data Id {A : Set}(x : A) : (B : Set) → B → Set where
course : Id x A x... |
module Data.Real where
open import Data.Real.Base public
open import Data.Real.Order public
|
module MJ.Examples.While where
open import MJ.Examples.Integer
open import Prelude
open import MJ.Types
open import MJ.Classtable.Code Σ
open import MJ.Syntax Σ
open import MJ.Syntax.Program Σ
open import MJ.Semantics Σ Lib
open import MJ.Semantics.Values Σ
open import Data.List.Any
open import Data.List.Membership.P... |
{-# OPTIONS --cubical --safe #-}
module Function.Biconditional where
open import Level
open import Relation.Binary
open import Path as ≡ using (_;_; cong)
open import Function
infix 4 _↔_
record _↔_ {a b} (A : Type a) (B : Type b) : Type (a ℓ⊔ b) where
constructor _iff_
field
fun : A → B
inv : B → A
open... |
module Reflexivity where
import PolyDepPrelude
open PolyDepPrelude using(Bool; True)
-- Local reflexivity
lref : {X : Set} -> (X -> X -> Bool) -> X -> Set
lref _R_ = \x -> True (x R x)
-- Reflexive = locally reflexive everywhere
data Refl {X : Set} (r : X -> X -> Bool) : Set where
refl : ((x : X) -> lref r x) -> ... |
{-# OPTIONS --type-in-type #-}
module Reactive where
open import Prelude
infixr 9 _∘ᵗ_ _∘ᵀ_ _∘ᵇ_ _∙_
infixl 9 _∘ʷ_
infix 4 _,ᵀ_ _,ᵗ_
infix 2 _×ᵀ_
-- Coinductive trees will represent protocols of interactions
record Tree : Set where
coinductive
field
Branch : Set
child : Branch → Tree
open Tree
constᵀ :... |
import SOAS.Families.Core
-- Various properties of context map operations
module SOAS.ContextMaps.Properties {T : Set}
(open SOAS.Families.Core {T}) (𝒳 : Familyₛ) where
open import SOAS.Common
open import SOAS.Context
open import SOAS.Variable
open import SOAS.ContextMaps.CategoryOfRenamings {T}
open import SOAS.... |
open import Data.Sum
open import Data.Fin
open import Data.Product
open import Data.Maybe
open import Signature
Σ-N∞ : Sig
Σ-N∞ = record { ∥_∥ = Fin 2 ; ar = Σ-N∞-ar }
where
Σ-N∞-ar : Fin 2 → Set
Σ-N∞-ar zero = Fin 0
Σ-N∞-ar (suc zero) = Fin 1
Σ-N∞-ar (suc (suc ()))
D-N∞ : Set
D-N∞ = Fin 1
open ... |
module Base.Extensionality where
open import Level using (Level)
open import Relation.Binary.PropositionalEquality using (_≡_)
-- Postualting extensionality is consistent with agdas underlying theory.
postulate
ext : ∀ {ℓ ℓ′ : Level} {A : Set ℓ} {B : A → Set ℓ′} {f g : (x : A) → B x}... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Magma.Construct.Unit where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Algebra.Magma
open import Cubical.Data.Unit
_◯_ : Op₂ ⊤
_ ◯ _ = tt
⊤-isMagma : IsMagma ⊤ _◯_
⊤-isMagma = record { is-s... |
------------------------------------------------------------------------
-- A monad-like structure
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Delay-monad.Sized.Monad where
open import Prelude
open import Prelude.Size
open import Delay-monad.Sized
op... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Monoidal.Instance.Setoids where
open import Level
open import Data.Product
open import Data.Product.Relation.Binary.Pointwise.NonDependent
open import Function.Equality
open import Relation.Binary using (Setoid)
open import Categories.Category
open import... |
{-# OPTIONS --without-K #-}
module Data.Inductive.Higher.Interval where
open import Relation.Equality
open import Relation.Path.Operation
-- The interval, which we denote I, is perhaps an even simpler higher inductive type than the
-- circle generated by:
module Interval where
private
data #I : Set where
... |
module Haskell.Prim.Either where
open import Haskell.Prim
open import Haskell.Prim.Bool
--------------------------------------------------
-- Either
data Either (a b : Set) : Set where
Left : a → Either a b
Right : b → Either a b
either : (a → c) → (b → c) → Either a b → c
either f g (Left x) = f x
either f ... |
module Rat where
open import Data.Empty
open import Data.Unit
import Data.Sign as S
open import Data.String
open import Data.Nat as ℕ using (ℕ; zero; suc)
open import Data.Nat.Coprimality renaming (sym to symCoprime)
open import Data.Nat.GCD
open import Data.Nat.Show renaming (show to ℕshow)
open import Data.Nat.Div... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.DescendingList where
open import Cubical.Data.DescendingList.Base public
open import Cubical.Data.DescendingList.Properties public
|
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Relation.Unary where
open import Algebra.Construct.Free.Semilattice.Relation.Unary.All.Def public
open import Algebra.Construct.Free.Semilattice.Relation.Unary.All.Dec public
open import Algebra.Construct.Free.Semilattice.Relation.Unary.All.Pr... |
open import Nat
open import Prelude
open import core
open import contexts
open import progress
open import lemmas-complete
module complete-progress where
-- as in progress, we define a datatype for the possible outcomes of
-- progress for readability.
data okc : (d : iexp) (Δ : hctx) → Set where
V : ∀{d Δ} ... |
open import Nat
open import Prelude
open import dynamics-core
open import contexts
open import lemmas-consistency
open import lemmas-ground
open import progress-checks
open import canonical-boxed-forms
open import canonical-value-forms
open import canonical-indeterminate-forms
open import ground-decidable
open impor... |
{-# OPTIONS --type-in-type #-}
open import Data.Empty
open import Data.Sum.Base using (_⊎_; inj₁; inj₂)
open import Function.Base using (_∘_; id)
open import Relation.Nullary using (¬_)
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; subst; cong; sym)
record _◁_ {ℓ} (A B : Set ℓ) : Set ℓ wher... |
module Preliminaries where
-- universe levels
postulate
Level : Set
lZ : Level
lS : Level -> Level
lmax : Level -> Level -> Level
{-# BUILTIN LEVEL Level #-}
{-# BUILTIN LEVELZERO lZ #-}
{-# BUILTIN LEVELSUC lS #-}
{-# BUILTIN LEVELMAX lmax #-}
-- -----------------------------... |
{-# OPTIONS --without-K #-}
-- From nlab: FinSet is the category of finite sets and all functions
-- between them: the full subcategory of Set on finite sets. It is
-- easy (and thus common) to make FinSet skeletal; there is one object
-- for each natural number n (including n=0), and a morphism from m to
-- n is an m... |
open import Lemmachine
module Lemmachine.Lemmas (hooks : Hooks) where
import Lemmachine.Resolve
open import Data.Empty
open import Data.String
open import Data.Maybe
open import Data.Function
open import Data.Product hiding (map)
open import Data.List.Any hiding (map) renaming (any to any₂)
open import Relation.Nullary... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Equivalence.Properties where
open import Level
open import Categories.Adjoint.Equivalence using (⊣Equivalence)
open import Categories.Adjoint.TwoSided using (_⊣⊢_; withZig)
open import Categories.Category.Core
open import Categories.Category.Equivalence u... |
-- 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... |
module Lemmachine.Response.Status where
{-# IMPORT Lemmachine.FFI #-}
open import Data.Nat
data Status : Set where
-- 1xx: Informational - Request received, continuing process
-- 2xx: Success - The action was successfully received, understood, and accepted
OK Created Accepted NoContent : Status
-- 3xx: Redirec... |
open import Agda.Builtin.Equality using (_≡_; refl)
record ⊤ : Set where
no-eta-equality
constructor tt
data Box (A : Set) : Set where
[_] : A → Box A
Unit : Set
Unit = Box ⊤
F : Unit → Set → Set
F [ _ ] x = x
G : {P : Unit → Set} → ((x : ⊤) → P [ x ]) → ((x : Unit) → P x)
G f [ x ] = f x
record R : Set₁ wh... |
-- Andreas, 2015-07-13 Better parse errors for illegal type signatures
A | B : Set
|
{-
This file shows Hⁿ⁺ᵐ(Sⁿ×Sᵐ)≅ℤ for n, m ≥ 1. This can be done in several
ways (e.g. Mayer-Vietoris). We give the iso as explicitly
as possible. The idea:
Step 1: Hⁿ⁺ᵐ(Sⁿ×Sᵐ)≅H¹⁺ⁿ⁺ᵐ(S¹⁺ⁿ×Sᵐ) (i.e. some form of suspension
axiom).
Step 2: H¹⁺ᵐ(S¹×Sᵐ)≅ℤ
Step 3: Conclude Hⁿ⁺ᵐ(Sⁿ×Sᵐ)≅ℤ by induction on n.
The iso as define... |
{-# OPTIONS --cubical --safe #-}
module Function where
open import Level
open import Path
infixr 9 _∘_ _∘′_
_∘_ : ∀ {A : Type a} {B : A → Type b} {C : {x : A} → B x → Type c} →
(∀ {x} (y : B x) → C y) → (g : (x : A) → B x) →
((x : A) → C (g x))
f ∘ g = λ x → f (g x)
_∘′_ : (B → C) → (A → B) → A → C
... |
module Structure.Type.Identity.Proofs.Eliminator where
import Lvl
open import Functional using (_→ᶠ_ ; id ; _on₂_ ; swap ; apply)
open import Logic
open import Logic.Propositional
open import Logic.Propositional.Proofs.Structures
open import Structure.Categorical.Properties
open import Structure.Function
open imp... |
------------------------------------------------------------------------
-- Well-founded induction
------------------------------------------------------------------------
-- I want universe polymorphism.
open import Relation.Binary
module Induction1.WellFounded {a : Set} (_<_ : Rel a) where
open import Induction1
... |
module HasDecidableSubstantiveDischarge where
open import OscarPrelude
open import HasSubstantiveDischarge
record HasDecidableSubstantiveDischarge (A : Set) : Set₁
where
field
⦃ hasSubstantiveDischarge ⦄ : HasSubstantiveDischarge A
_≽?_ : (+ - : A) → Dec $ + ≽ -
open HasDecidableSubstantiveDischarge ⦃ … ... |
module HasDecidableVacuousDischarge where
open import OscarPrelude
--open import HasVacuousDischarge
open import HasSubstantiveDischarge
open import HasNegation
record HasDecidableVacuousDischarge (A : Set) : Set₁
where
field
-- ⦃ hasVacuousDischarge ⦄ : HasVacuousDischarge A
⦃ hasNegation ⦄ : HasNegation... |
-- Monoidal categories
{-# OPTIONS --safe #-}
module Cubical.Categories.Monoidal where
open import Cubical.Categories.Monoidal.Base public
open import Cubical.Categories.Monoidal.Enriched public
|
------------------------------------------------------------------------------
-- All the predicate logic modules
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #... |
------------------------------------------------------------------------
-- Listed finite subsets
------------------------------------------------------------------------
-- Based on Frumin, Geuvers, Gondelman and van der Weide's "Finite
-- Sets in Homotopy Type Theory".
{-# OPTIONS --cubical --safe #-}
import Equal... |
open import Common.Level
open import Common.Reflection
open import Common.Equality
open import Common.Prelude
postulate
f : ∀ a → Set a
pattern expectedType =
pi (vArg (def (quote Level) []))
(abs "a" (sort (set (var 0 []))))
ok : ⊤
ok = _
notOk : String
notOk = "not ok"
macro
isExpected : QName → Tact... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Sets.EquivalenceRelations
open import Functions
open import Lists.Definition
open import Lists.Fold.Fold
open import Lists.Concat
open import Lists.Length
open import Setoids.Setoids
open import Maybe
open import Numbers.Natural... |
module MixfixBinders where
postulate
M : Set → Set
return : ∀ {A} → A → M A
bind : ∀ {A B} → M A → (A → M B) → M B
infixr 40 bind
syntax bind m (λ x → m′) = x ← m , m′
postulate
X : Set
m₁ m₂ m₃ : M X
f : X → X → X
foo : M X
foo = x₁ ← m₁ ,
x₂ ← m₂ ,
x₃ ← m₃ ,
return (f x₁ (f x₂... |
record _ : Set where
|
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Profunctor where
open import Level
open import Categories.Category
open import Categories.Category.Instance.Setoids
open import Categories.Functor.Bifunctor
open import Categories.Functor.Hom
Profunctor : ∀ {o ℓ e} {o′ ℓ′ e′} → Category o ℓ e → Category o... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Showing booleans
------------------------------------------------------------------------
module Data.Bool.Show where
open import Data.Bool
open import Data.String hiding (show)
show : Bool → String
show true ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Discrete where
open import Level
open import Data.Unit using (⊤)
open import Function using (flip)
open import Categories.Category
open import Categories.Support.PropositionalEquality
Discrete : ∀ {o} (A : Set o) → Category o o zero
Discrete A = record
{ O... |
open import Agda.Builtin.Reflection
open import Agda.Builtin.Nat
open import Agda.Builtin.Unit
open import Agda.Builtin.List
open import Agda.Builtin.Equality
magic : Nat
magic = 666
macro
by-magic : Term → TC ⊤
by-magic hole = unify hole (def (quote magic) [])
meta-magic : Term → TC ⊤
meta-magic hole = uni... |
open import Agda.Builtin.Nat renaming (Nat to ℕ)
open import Agda.Builtin.Equality
data Vec (A : Set) : ℕ → Set where
[] : Vec A zero
_∷_ : ∀{n} (x : A) (xs : Vec A n) → Vec A (suc n)
data All₂ {A : Set} {B : Set} (R : A → B → Set) : ∀ {k} → Vec A k → Vec B k → Set where
[] : All₂ R [] []
_∷_ : ∀ {k... |
-- FNF, 2019-02-06
-- Test the difference between --ignore-interfaces and --ignore-all-interfaces
-- See Issue641-all-interfaces.flags and compare with Issue641.flags
module Issue641-all-interfaces where
-- Provoke a scope checking error.
open NoSuchModule
-- Expected output is some debug messages about importing, ... |
-- Andreas & James, 2016-04-18 pre-AIM XXIII
-- order of clauses should not matter here!
{-# OPTIONS --exact-split #-}
open import Common.Equality
open import Common.Prelude
open import Common.Product
thing : Bool → Bool × Bool
proj₁ (thing true) = false
proj₁ (thing false) = true
proj₂ (thing b) = b
test : ∀ b → p... |
open import FRP.JS.RSet using ( ⟦_⟧ )
open import FRP.JS.Behaviour using ( Beh )
open import FRP.JS.DOM using ( DOM )
module FRP.JS.Main where
postulate
Main : Set
reactimate : ⟦ Beh DOM ⟧ → Main
{-# COMPILED_JS reactimate require("agda.frp").reactimate #-}
|
------------------------------------------------------------------------------
-- Abelian group theory properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #... |
{-# OPTIONS --rewriting --prop #-}
open import common
open import syntx
open import derivability
{- Here are the structural rules, as derivation rules -}
module _ (Σ : Signature) where
{-
Γ ⊢ A (x : A) ∈ Γ
--------------------
Γ ⊢ x : A
-}
-- The version of the variable rule we use is that Γ ⊢ x : A if Γ ⊢... |
open import Agda.Builtin.Float
_ : Float
_ = 1.0xA
|
module proofs where
open import univ
open import cwf
open import Base
open import Nat
open import help
{-
lem-id∘ : {Γ Δ : Con}(σ : Γ ─→ Δ) -> id ∘ σ == σ
lem-id∘ (el < σ , pσ >) = eq \x -> ref
lem-∘id : {Γ Δ : Con}(σ : Γ ─→ Δ) -> σ ∘ id == σ
lem-∘id (el < σ , pσ >) = eq \x -> ref
lem-∘assoc : {Γ Δ Θ Ξ : Con}(σ : ... |
module Prelude.String where
open import Agda.Primitive
open import Prelude.Unit
open import Prelude.Char
open import Prelude.Bool
open import Prelude.Nat
open import Prelude.List
open import Prelude.Maybe
open import Prelude.Equality
open import Prelude.Equality.Unsafe
open import Prelude.Decidable
open import Prelude... |
------------------------------------------------------------------------
-- Streams
------------------------------------------------------------------------
module Data.Stream where
open import Coinduction
open import Data.Colist using (Colist; []; _∷_)
open import Data.Vec using (Vec; []; _∷_)
open import Data... |
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
{-# OPTIONS --sized-types #-}
open import Data.Nat
open import Data.Vec
open import Data.Fin
open import Data.Product
open import Data.Unit
open import Data.Empty
open import Relation.Nullary
ope... |
{-# OPTIONS --allow-unsolved-metas #-}
record Sg (A : Set) (B : A → Set) : Set where
constructor _,_
field
fst : A
snd : B fst
app : {A : Set} {B : A → Set} → ((x' : A) → B x') → (x : A) → B x
app f x = f x
ppa : {A : Set} {B : A → Set} → (x : A) → ((x' : A) → B x') → B x
ppa x f = f x
postulate
Bool ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.