text stringlengths 4 690k |
|---|
{-# OPTIONS --safe #-}
module STLC.Syntax where
open import Data.Nat using (ℕ; suc)
open import Data.Fin using (Fin) renaming (zero to fzero; suc to fsuc)
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import Relation.Nullary using (Dec; yes; no)
private
variable
n : ℕ
data Type : Set... |
------------------------------------------------------------------------------
-- Totality properties of the gcd
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-... |
{-# OPTIONS --rewriting #-}
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
{-# BUILTIN REWRITE _≡_ #-}
data D (A : Set) : Set where
c c' : D A
module M (A : Set) where
postulate rew : c {A} ≡ c' {A}
{-# REWRITE rew #-}
test : ∀ {B} → c {B} ≡ c' {B}
test = refl
|
{-
This second-order term syntax was created from the following second-order syntax description:
syntax QIO
type
T : 0-ary
P : 0-ary
term
new : P.T -> T
measure : P T T -> T
applyX : P P.T -> T
applyI2 : P P.T -> T
applyDuv : P P (P,P).T -> T
applyDu : P P.T -> T
applyD... |
module Context where
open import Level using (_⊔_)
open import Function
open import Data.List.Base
-- | `ifix`. Check `docs/fomega/deep-isorecursive/README.md` for details.
{-# NO_POSITIVITY_CHECK #-}
data IFix {ι φ} {I : Set ι} (F : (I -> Set φ) -> I -> Set φ) (i : I) : Set φ where
Wrap : F (IFix F) i -> IFix F i
... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Limits.Terminal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.HITs.PropositionalTruncation.Base
open import Cubical.Data.Sigma
open import Cubical.Categories.Category
private
variable
ℓ ℓ' : Level
mod... |
{-# OPTIONS --without-K #-}
module Simplify where
open import FT
open import HoTT
-- just flip. It is he caller's responsibility to do other things
flip : {b₁ b₂ : FT} → b₂ ⇛ b₁ → b₁ ⇛ b₂
flip unite₊⇛ = uniti₊⇛
flip uniti₊⇛ = unite₊⇛
flip swap₊⇛ = swap₊⇛
flip assocl₊⇛ = assocr₊⇛
flip assocr₊⇛ = assocl₊⇛
flip unite⋆⇛... |
open import Prelude
open import dynamics-core
module lemmas-ground where
-- not ground types aren't just a type constructor filled with holes
ground-not-holes : ∀{τ} →
(τ ground → ⊥) →
(τ ≠ (⦇-⦈ ==> ⦇-⦈)) × (τ ≠ (⦇-⦈ ⊕ ⦇-⦈)) × (τ ≠ (⦇-⦈ ⊠ ⦇-⦈))
ground-not-holes notg = (λ... |
module _ where
open import utility
open import Esterel.Lang
open import Esterel.Lang.Properties
open import Esterel.Environment as Env
open import Esterel.Context
open import Data.Product
open import Data.Sum
open import Data.Bool
open import Data.List
open import Relation.Nullary
open import Relation.Binary.Propositi... |
module ShowNat where
open import IO
open import Data.Unit
open import Data.Nat.Show
open import Level using (0ℓ)
main = run {0ℓ} (putStrLn (Data.Nat.Show.show 10))
|
module Avionics.SafetyEnvelopes.ExtInterface where
open import Data.Bool using (Bool)
open import Data.Float using (Float)
open import Data.List using (List; map)
open import Data.Maybe using (Maybe; just; nothing)
open import Data.Product using (_×_; _,_)
open import Avionics.Probability using (Dist; NormalDist; ND)... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Monad where
open import Level
open import Categories.Category
open import Categories.Functor hiding (_≡_; assoc; identityˡ; identityʳ)
open import Categories.NaturalTransformation renaming (id to idN)
record Monad {o ℓ e} (C : Category o ℓ e) : Set (o ⊔ ℓ ⊔ e... |
module Cats.Category.Lift where
open import Relation.Binary using (IsEquivalence)
open import Level as L using (Level ; suc ; _⊔_ ; lift ; lower)
open import Cats.Category.Base
open IsEquivalence
LCategory : (l : Level) → Set (suc l)
LCategory l = Category l l l
Lift : ∀ {lo la l≈ lo′ la′ l≈′} → Category lo la l... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Instance.Simplex where
open import Level
open import Data.Product
open import Data.Fin.Base using (Fin; _≤_)
open import Data.Nat.Base using (ℕ; z≤n; s≤s)
open import Function renaming (id to idF; _∘_ to _∙_)
open import R... |
-- Andreas, AIM XXIII, 2016-04-23
-- Issue 1944
-- Milestone 2.0: overload projection by fields (does not affect matching)
-- {-# OPTIONS -v tc.lhs.split:20 #-}
record R : Set2 where
field out : Set1
r : R
R.out r = Set
s = r
open R r -- fully applied open
open R
open R s
-- Now out is overloaded. It is both ... |
module neq where
open import eq
open import negation
----------------------------------------------------------------------
-- syntax
----------------------------------------------------------------------
infix 4 _≢_
----------------------------------------------------------------------
-- defined types
----------... |
-- Product of two functors
{-# OPTIONS --safe #-}
module Cubical.Categories.Functor.BinProduct where
open import Cubical.Categories.Category.Base
open import Cubical.Categories.Constructions.BinProduct
open import Cubical.Categories.Functor.Base
open import Cubical.Data.Sigma.Properties
open import Cubical.Foundation... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Heterogeneous equality
------------------------------------------------------------------------
module Relation.Binary.HeterogeneousEquality where
open import Data.Product
open import Function
open import Funct... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Lists.Definition
module Lists.Fold.Fold {a b : _} {A : Set a} {B : Set b} where
fold : (f : A → B → B) → B → List A → B
fold f default [] = default
fold f default (x :: l) = f x (fold f default l)
|
module DelayMishMash where
open import Level --public
using (Level) renaming (zero to lzero; suc to lsuc)
open import Size public
open import Prelude.Monad renaming (Monad to RawMonad)
--open import Category.Monad public
-- using (RawMonad; module RawMonad)
open import Data.Empty --public
usin... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Bisimilarity for Conats
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Conat.Bisimilarity where
open import Level using ... |
{-
This second-order equational theory was created from the following second-order syntax description:
$sig_string
-}
module $syn_name.Equality where
open import SOAS.Common
open import SOAS.Context
open import SOAS.Variable
open import SOAS.Families.Core
open import SOAS.Families.Build
open import SOAS.ContextMaps.... |
{-# OPTIONS --allow-unsolved-metas #-}
module nat where
open import Data.Nat
open import Data.Nat.Properties
open import Data.Empty
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.Core
open import Relation.Binary.Definitions
open import logic
open import ... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Fin.Properties where
open import Cubical.Core.Everything
open import Cubical.Foundations.Embedding
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Prelude
... |
-- Displayed SIP
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.DStructures.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.Properties
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open ... |
------------------------------------------------------------------------
-- Convenient syntax for "equational reasoning" using a strict partial
-- order
------------------------------------------------------------------------
open import Relation.Binary
module Relation.Binary.StrictPartialOrderReasoning
(p :... |
-- Andreas, 2013-05-16, raised by Andrea 2015-02-10
open import Common.Size
open import Common.Prelude
data Wrap (A : SizeUniv) : SizeUniv where
-- data Wrap (A : Set) : Set where
wrap : A → Wrap A
module M (f : ∀ i → Wrap (Size< i)) where
test : ∀ i → Wrap (Size< i) → ⊥
test i (wrap j) = test j (f j)
module... |
{-# OPTIONS --without-K #-}
module NTypes.Universe where
open import Equivalence
open import NTypes
open import PathOperations
open import PathStructure.Coproduct
open import Types
open import Univalence
Bool : Set
Bool = ⊤ ⊎ ⊤
not : Bool → Bool
not = case (λ _ → Bool) (λ _ → inr _) (λ _ → inl _)
not-not : ∀ x → no... |
-- Basic intuitionistic propositional calculus, without ∨ or ⊥.
-- Translation between different formalisations of syntax.
module BasicIPC.Syntax.Translation where
open import BasicIPC.Syntax.Common public
import BasicIPC.Syntax.ClosedHilbertSequential as CHS
import BasicIPC.Syntax.ClosedHilbert as CH
import BasicIP... |
module Numeral.Natural.Relation.Order.Category where
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Functional
open import Logic
open import Logic.Propositional
open import Logic.IntroInstances
import Lvl
open import Numeral.Natural
open import Numeral.Natural.Relation.Order
open import Numeral.Nat... |
{-# OPTIONS --without-K --safe #-}
module Cats.Category.Constructions.Exponential where
open import Level
open import Cats.Category.Base
open import Cats.Category.Constructions.Product as Product using
(HasBinaryProducts)
open import Cats.Util.Conv
import Cats.Category.Constructions.Iso as Iso
import Cats.Category... |
{-# OPTIONS --cubical --safe #-}
module Control.Monad.Levels.Eliminators where
open import Prelude
open import Data.Bag
open import Control.Monad.Levels.Definition
record Eliminator {a p} (A : Type a) (P : Levels A → Type p) : Type (a ℓ⊔ p) where
constructor elim
field
⟦_⟧-set : ∀ {xs} → isSet (P xs)
⟦_⟧... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Groups
open import Functions.Definition
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Numbers.Integers.Integers
open import Numbers.Modulo.Group
open import Numbers.Modulo.Definition... |
open import Common.Reflection
open import Common.Unit
open import Common.Prelude
macro
t1 : (A : Set) -> Term -> Term -> Tactic
t1 x y z = give y
t2 : Term -> (A : Set) -> Term -> Tactic
t2 x y z = give x
t3 : Term -> Term -> (A : Set) -> QName -> Tactic
t3 x y z n = give x
t4 : Term -> Term -> (A :... |
module lambda.untyped where
open import Data.Nat
open import Data.Fin hiding (lift)
data term (n : ℕ) : Set where
lam : term (suc n) → term n
var : Fin n → term n
app : term n → term n → term n
data norm {n : ℕ} : term n → Set
data neut {n : ℕ} : term n → Set
data norm {n} where
lam : {x : term (suc n)} → n... |
{-# OPTIONS --without-K --no-pattern-matching #-}
module Ch2-6 where
open import Level hiding (lift)
open import Ch2-1
open import Ch2-2
open import Ch2-3
open import Ch2-4
open import Ch2-5
open import Data.Product
open import Function using (id; _∘_)
-- Definition 2.6.1
Definition-2-6-1 : ∀ {a b} {A : Set a} {B ... |
module L.Base.Empty.Core where
open import Agda.Primitive
-- Introducing the empty type
data ⊥ : Set where
exfalso : ∀{c} (C : ⊥ → Set c) → (a : ⊥) → C a
exfalso = λ C ()
|
-- Andreas, 2020-03-26, issue #4481, reported by gallais
-- #952 unintentionally added named lambdas; tests here.
-- {-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.term.expr.top:15 #-}
-- {-# OPTIONS -v tc.term.lambda:30 #-}
open import Agda.Primitive
-- Named lambdas:
postulate f : ({A : Set} → Set) → Set
_... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT renaming (pt to ⊙pt)
open import cw.CW
open import cw.FinCW
open import cohomology.Theory
open import groups.Int
open import groups.DisjointlyPointedSet
module cw.cohomology.cochainequiv.AugmentCommSquare (OT : OrdinaryTheory lzero)
(⊙fin-skel : ⊙FinSkeleton ... |
module WErrorOverride where
postulate
IO : Set → Set
{-# COMPILE GHC IO = type IO #-}
{-# BUILTIN IO IO #-}
infixl 1 _>>=_
postulate
return : {A : Set} → A → IO A
_>>=_ : {A : Set} {B : Set} → IO A → (A → IO B) → IO B
{-# COMPILE GHC return = \_ -> return #-}
{-# COMPILE GHC _>>=_ = \_ _ -> (>>=) #-}
---... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Limits.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Unit
open import Cubical.Data.Sigma using (ΣPathP)
open import Cubical.Categories.Category
open import Cubical.Categories.Functor
open import Cubi... |
{-# OPTIONS --cubical --safe --no-import-sorts #-}
module Cubical.Data.Fin.Recursive.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Empty as Empty hiding (rec; elim)
open import Cubical.Data.Nat hiding (elim)
data FinF (X : Type₀) : Type₀ where
zero : FinF X
suc : X → FinF X
Fin : ... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Bool where
open import Cubical.Data.Bool.Base public
open import Cubical.Data.Bool.Properties public
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Propositional (intensional) equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.PropositionalEquality where
import Axiom.... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Substitution.Introductions.SingleSubst {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Untyped.Properties
open import Definition.Typed
open import ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Decidable equality over lists using propositional equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
open import Rel... |
module Data.Real.Base where
open import Data.Float renaming (Float to ℝ) public
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Semigroup.Morphism where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Functions.Embedding
open import Cubical.Algebra
open import Cubical.Algebra.M... |
{-# OPTIONS --without-K #-}
module Ch2-5 where
open import Level hiding (lift)
open import Ch2-1
open import Ch2-2
open import Ch2-3
open import Ch2-4
open import Data.Product
open import Function using (_∘_; id)
-- Example 2.5.1 (equivalence)
Example-2-5-1 : ∀ {a b} {A : Set a} {B : Set b}
→ (a a' : A) (b b' : ... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
module Categories.Slice {o ℓ e} (C : Category o ℓ e) where
open Category C
open Equiv
open import Level
open import Relation.Binary using (Rel)
record SliceObj (X : Obj) : Set (o ⊔ ℓ) where
constructor sliceobj
field
{Y} : Obj
arr ... |
module Formalization.LambdaCalculus.Semantics.CallByName where
import Lvl
open import Data
open import Formalization.LambdaCalculus
open import Formalization.LambdaCalculus.Semantics
open import Formalization.LambdaCalculus.SyntaxTransformation
open import Logic.Predicate
open import Numeral.Natural
open import S... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some derivable properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Algebra
module Algebra.Properties.AbelianGroup
{g₁ g₂}... |
import Relation.Binary.Reasoning.Setoid as SetoidR
open import SingleSorted.AlgebraicTheory
import SingleSorted.Interpretation as Interpretation
import SingleSorted.Model as Model
import SingleSorted.UniversalInterpretation as UniversalInterpretation
import SingleSorted.Substitution as Substitution
import SingleSorted... |
{-# OPTIONS --without-K #-}
open import lib.Base
module lib.Relation where
Rel : ∀ {i} (A : Type i) j → Type (lmax i (lsucc j))
Rel A j = A → A → Type j
Decidable : ∀ {i} {A : Type i} {j} → Rel A j → Type (lmax i j)
Decidable rel = ∀ a₁ a₂ → Dec (rel a₁ a₂)
|
{-# OPTIONS --without-K #-}
module Data.Word8.FromNat where
open import Data.Word8.Primitive
-- open import Agda.Builtin.Bool using (Bool; true)
-- open import Agda.Builtin.Nat using (Nat; _<_)
open import Agda.Builtin.Unit using (⊤)
open import Agda.Builtin.FromNat using (Number)
{-
instance
NumberNat : Number N... |
module PiQ.Invariants where
open import Data.Empty
open import Data.Unit
open import Data.Sum
open import Data.Product
open import Relation.Binary.Core
open import Relation.Binary
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Data.Nat
open import Data.Nat.Properties
open imp... |
module Pi-.Dir where
open import Relation.Binary.PropositionalEquality
data Dir : Set where
◁ : Dir
▷ : Dir
-ᵈⁱʳ_ : Dir → Dir
-ᵈⁱʳ ▷ = ◁
-ᵈⁱʳ ◁ = ▷
_×ᵈⁱʳ_ : Dir → Dir → Dir
◁ ×ᵈⁱʳ ◁ = ▷
◁ ×ᵈⁱʳ ▷ = ◁
▷ ×ᵈⁱʳ ◁ = ◁
▷ ×ᵈⁱʳ ▷ = ▷
identˡᵈⁱʳ : ∀ d → ▷ ×ᵈⁱʳ d ≡ d
identˡᵈⁱʳ ◁ = refl
identˡᵈⁱʳ ▷ = refl
assoclᵈⁱʳ : ∀ d₁ ... |
{-# OPTIONS --safe #-}
module Parametrized where
open import Generics
open import Agda.Primitive
open import Function.Base
open import Data.Nat.Base hiding (pred)
open import Data.Fin.Base hiding (pred; _+_)
open import Data.List.Base hiding (sum; length)
open import Relation.Nullary
open import Relation.Nullary.De... |
{-# OPTIONS --without-K --safe #-}
-- Constructions of a Cocone from the Twisted Arrow function from a Cowedge
-- and vice-versa, by Duality.
-- Note that the proper functioning of this relies crucially on
-- Functor.op (Functor.op F) being definitionally equal to F.
open import Categories.Category using (Category)
o... |
module InstanceArgumentsSections where
postulate A : Set
module Basic where
record B : Set where
field bA : A
open B {{...}}
bA' : B → A
bA' _ = bA
module Parameterised (a : A) where
record C : Set where
field cA : A
open C {{...}}
cA' : C → A
cA' _ = cA
module RecordFromParameterised ... |
-- 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 Data.List.Relation.Quantification.Proofs where
import Lvl
open import Data.List
open import Data.List.Functions
open import Data.List.Equiv.Id
open import Data.List.Relation.Permutation
open import Data.List.Relation.Quantification
open import Functional
open import Logic.Propositional
open import Logic
op... |
{-# OPTIONS --safe #-}
module Cubical.Data.Int.MoreInts.QuoInt where
open import Cubical.Data.Int.MoreInts.QuoInt.Base public
open import Cubical.Data.Int.MoreInts.QuoInt.Properties public
|
-- Andreas, 2012-01-11
module Issue551a where
data Box (A : Set) : Set where
[_] : A → Box A
implicit : {A : Set}{{a : A}} -> A
implicit {{a}} = a
postulate
A : Set
.a : A -- this irrelevant definition needs to be ignored by instance search
a' : Box A
a' = [ implicit ]
-- this should fail
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Dependent product combinators for setoid equality preserving
-- functions
------------------------------------------------------------------------
{-# OPTIONS --with-K --safe #-}
module Data.Product.Function.De... |
{-# OPTIONS --cubical --safe #-}
module Categories.Functor where
open import Prelude
open import Categories
record Functor {ℓ₁ ℓ₂ ℓ₃ ℓ₄} (C : PreCategory ℓ₁ ℓ₂) (D : PreCategory ℓ₃ ℓ₄) : Type (ℓ₁ ℓ⊔ ℓ₂ ℓ⊔ ℓ₃ ℓ⊔ ℓ₄) where
private module C = PreCategory C
private module D = PreCategory D
field
F₀ : C.Ob → D.... |
------------------------------------------------------------------------
-- Raw terms
------------------------------------------------------------------------
import Level
open import Data.Universe
module README.DependentlyTyped.Raw-term
(Uni₀ : Universe Level.zero Level.zero)
where
open import Data.Nat
import R... |
module FStream.Bisimulation where
open import Library
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.PropositionalEquality.Core as Core
-- open ≡-Reasoning
open import FStream.Core
mutual
record _~_ {i} {ℓ₁ ℓ₂} {X : Set ℓ₁} {C : Container ℓ₂} (s₁ s₂ : FSt... |
data Maybe (A : Set) : Set where
just : A → Maybe A
nothing : Maybe A
data Is-nothing {A} : Maybe A → Set where
nothing : Is-nothing nothing
record ℕ∞ : Set where
coinductive
field
prd∞ : Maybe ℕ∞
open ℕ∞
f : ℕ∞ → ℕ∞
prd∞ (f m) with prd∞ m
prd∞ (f m) | just pm with f pm
prd∞ (f m) | just pm | x = prd... |
-- Pattern matching on a (decidably) empty type allows you to omit the
-- right-hand side.
module AbsurdPattern where
data Empty : Set where
elim-Empty : {A : Set} -> Empty -> A
elim-Empty ()
|
{-# OPTIONS --without-K --safe #-}
-- Polynomials over a commutative ring in sparse Horner normal form.
--
-- Much of the implementation is inspired by:
--
-- B. Grégoire and A. Mahboubi, ‘Proving Equalities in a Commutative
-- Ring Done Right in Coq’, in Theorem Proving in Higher Order
-- Logics, Berlin, Heidel... |
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary.Core
module Definitions
{a ℓ} {A : Set a} -- The underlying set
(_≈_ : Rel A ℓ) -- The underlying equality
where
open import Algebra.Core
open import Data.Product
open import Algebra.Definitions
-- (x²y)x = x²(yx)
JordanIdentity: : Op₂ A → S... |
-- We use instance argument to overload the algebraic operations + and
-- * etc.. For example, Ring record here is like what Num class in
-- Haskell. Also like Haskell, we don't require the operations abide
-- by any laws (we can use the algebraic definitions in stdlib if
-- needed).
{-# OPTIONS --without-K --safe #-}... |
module Tactic.Nat.Subtract where
open import Tactic.Nat.Subtract.Auto public using (autosub-tactic)
open import Tactic.Nat.Subtract.Simplify public using (simplifysub-tactic; simplifygoal-tactic)
open import Tactic.Nat.Subtract.By public using (by-tactic)
open import Tactic.Nat.Subtract.Refute public using (refutesub... |
module Acme.Data.Nat where
open import Acme.Type
ℕ : Type
isZ : Type
isS : Type
ℕ cs = isZ cs || isS cs
isZ [] = false
isZ (c ∷ cs) = c == 'Z' && isNil cs
isS [] = false
isS (c ∷ cs) = c == 'S' && ℕ cs
zero = ℕ ∋ "Z"
suc : Elt ℕ → Elt ℕ
suc [ n ] = [ 'S' ∷ n ]
one = ℕ ∋ "SZ"
two = suc (suc zero)
three ... |
module Agda.Builtin.List where
infixr 5 _∷_
data List {a} (A : Set a) : Set a where
[] : List A
_∷_ : (x : A) (xs : List A) → List A
{-# BUILTIN LIST List #-}
{-# BUILTIN NIL [] #-}
{-# BUILTIN CONS _∷_ #-}
{-# HASKELL type AgdaList a b = [b] #-}
{-# COMPILED_DATA List MAlonzo.Code.Agda.Builtin.List.AgdaL... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.DStructures.Structures.Strict2Group where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Functions.FunExtEquiv
open i... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.Cokernel
open import cohomology.Theory
open import cw.CW
module cw.cohomology.HigherCoboundary {i} (OT : OrdinaryTheory i)
{n} (⊙skel : ⊙Skeleton {i} (S (S n))) where
open OrdinaryTheory OT
open import cw.cohomology.WedgeOfCells OT
open i... |
-- The "intro" command manages to refine goals of type ∞ A with the
-- term ♯ ?.
module IntroSharp where
postulate
∞ : ∀ {a} (A : Set a) → Set a
♯_ : ∀ {a} {A : Set a} → A → ∞ A
♭ : ∀ {a} {A : Set a} → ∞ A → A
{-# BUILTIN INFINITY ∞ #-}
{-# BUILTIN SHARP ♯_ #-}
{-# BUILTIN FLAT ♭ #-}
Foo : ∞ Set
Fo... |
module par-swap.dpg-e-view where
open import par-swap
open import par-swap.properties
open import par-swap.confluent
open import par-swap.dpg-pot
open import utility
open import Esterel.Lang
open import Esterel.Lang.Binding
open import Esterel.Lang.Properties
open import Esterel.Lang.CanFunction
open import Esterel.La... |
module Fixities where
open import Haskell.Prelude
leftAssoc : Int → List Int
leftAssoc n = 2 * n + 1
∷ 2 * (n + 1)
∷ 1 + n * 2
∷ (1 + n) * 2
∷ (n + n) + n
∷ n + (n + n)
∷ []
rightAssoc : List Int → List Int
rightAssoc xs = xs ++ xs ++ ((xs ++ x... |
-- Nils' suggestion
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; trans; cong)
open Eq.≡-Reasoning
open import Data.Nat using (ℕ; zero; suc; _+_; _*_)
open import Data.Nat.Properties.Simple using (+-suc)
open import Relation.Nullary using (¬_)
open import Function using (_∘_; id)
op... |
-- Andreas, 2014-03-03, report and test case by Nisse.
-- {-# OPTIONS -v tc.lhs.unify:60 #-}
module Issue1071 where
postulate
F : Set → Set
module M (_ : Set₁) where
postulate A : Set
open M Set
data P : Set → Set₁ where
c : (R : Set) → P (F R)
data Q : (R : Set) → R → P R → Set₁ where
d : (R : Set) (f :... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module CombiningProofs.CommDisjunctionSchema where
open import Common.FOL.FOL
postulate ∨-comm : {A B : Set} → A ∨ B → B ∨ A
{-# ATP prove ∨-comm... |
-- Andreas, 2018-08-14, issue #1556
-- Rule out very dependent types by looking for recursive calls
-- in the types of definitions.
-- {-# OPTIONS -v term:20 -v rec.graph:80 #-}
A : Set
data D : A → Set -- D --> A (new!)
a : A -- a --> A (new!)
A = D a -- A --> D, a
data D where ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Monoidal.Traced where
open import Level
open import Data.Product
open import Data.Fin
open import Categories.Category
open import Categories.Monoidal
open import Categories.Functor hiding (id; _∘_; identityʳ; assoc)
open import Categories.Monoidal.Braided
ope... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use the
-- Relation.Binary.Reasoning.Setoid module directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open im... |
open import LibraBFT.Impl.Consensus.MetricsSafetyRules
open import LibraBFT.Impl.OBM.Logging.Logging
open import LibraBFT.Impl.Properties.Util
open import LibraBFT.ImplShared.Consensus.Types
open import LibraBFT.ImplShared.Consensus.Types.EpochIndep
open import LibraBFT.ImplShared.Util.Dijkstra.All
open import Optics.A... |
{-# OPTIONS --without-K --safe #-}
module Fragment.Prelude where
open import Fragment.Tactic.Fragment using (fragment) public
open import Fragment.Equational.Theory.Bundles public
open import Fragment.Equational.Structures public
open import Fragment.Extensions.Semigroup using (SemigroupFrex) public
open import Fra... |
module Cats.Category.Arrow where
open import Level
open import Relation.Binary using (IsEquivalence ; _Preserves₂_⟶_⟶_)
open import Cats.Category
module _ {lo la l≈} (C : Category lo la l≈) where
infixr 9 _∘_
infixr 4 _≈_
private
module C = Category C
module ≈ = C.≈
record Obj : Set (lo ⊔ la) wh... |
module _ where
open import Agda.Builtin.Nat
module M (n : Nat) where
postulate A : Set
module M₁ (m : Nat) where
open module Mm = M m
-- bar : M.A (m + 1)
-- bar = m -- Nat !=< M.A (m + 1)
postulate
n : Nat
foo : M.A n
foo = n -- Nat !=< M.A n
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category using () renaming (Category to Setoid-Category)
open import Categories.Category.Monoidal
module Categories.Category.Construction.EnrichedFunctors
{o ℓ e} {V : Setoid-Category o ℓ e} (M : Monoidal V) where
-- The (enriched) functor category for a gi... |
module RandomAccessList.General.Core where
open import Data.List
open import Data.Nat
open import Data.Vec
open import Relation.Binary.PropositionalEquality as PropEq
using (_≡_)
data General (A : Set) : ℕ → ℕ → ℕ → Set where
[] : ∀ {a b n} → General A a b n
∺ : ∀ {v a a' b b' n}
→ Vec A v
... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Theorems of ∨ connective.
------------------------------------------------------------------------------
open import Data.Nat using ( ℕ )
module Data.PropFormula.Theorems.Disjunction ( n : ℕ ) where
--------------... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.elims.Lemmas where
fill-upper-right : ∀ {i j} {A : Type i} {B : A → Type j}
{a₀₀ a₀₁ a₁₀ a₁₁ : A}
{p₀₋ : a₀₀ == a₀₁} {p₋₀ : a₀₀ == a₁₀} {p₋₁ : a₀₁ == a₁₁} {p₁₋ : a₁₀ == a₁₁}
(sq : Square p₀₋ p₋₀ p₋₁ p₁₋)
{b₀₀ : B a₀₀} {b₀₁ : B a₀₁} {b₁₀... |
open import Common.Equality
open import Common.Prelude
NaN : Float
NaN = primFloatDiv 0.0 0.0
NaN≢-NaN : primFloatEquality NaN (primFloatNegate NaN) ≡ true
NaN≢-NaN = refl
NaN≢N-NaN : primFloatNumericalEquality NaN (primFloatNegate NaN) ≡ false
NaN≢N-NaN = refl
|
{-# OPTIONS --safe #-}
module Cubical.Categories.Category.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Equiv
private
variable
ℓ ℓ' : Level
-- Categories with hom-sets
record Category ℓ ℓ' : Type (ℓ-suc (ℓ-max ℓ ℓ')) where
-- no-eta... |
{-# OPTIONS --without-K #-}
-- Two equivalent approached to define the advantage in
-- a (bit) guessing game
open import Data.Two
open import Data.Nat.NP hiding (_==_)
open import Data.Nat.Distance
open import Data.Product.NP
open import Function
open import Explore.Core
open import Explore.Properties
open import Exp... |
{-# OPTIONS --profile=interactive #-}
open import Common.Prelude
open import Common.Equality
`1 = suc zero
`2 = `1 + `1
`4 = `2 + `2
`8 = `4 + `4
`16 = `8 + `8
`32 = `16 + `16
`64 = `32 + `32
`128 = `64 + `64
`256 = `128 + `128
`512 =... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Standard evaluation with the Nehemiah plugin.
------------------------------------------------------------------------
module Nehemiah.Denotation.Evaluation where
open import Nehemiah.Syntax.Type
open import Nehem... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.