text stringlengths 4 690k |
|---|
{-# OPTIONS --cubical #-}
open import Agda.Primitive.Cubical
|
-- Andreas, 2016-09-08, issue #2167 reported by effectfully
loop : Set₁
loop = .Set
-- WAS: looping of type checker
-- NOW: proper error about invalid dotted expression
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Category.Cartesian.Properties {o ℓ e} (C : Category o ℓ e) where
open import Level using (_⊔_)
open import Function using (_$_)
open import Data.Nat using (ℕ; zero; suc)
open import Data.Product using (Σ; _,_; proj₁) renaming (_×_ t... |
{-# OPTIONS --rewriting --confluence-check #-}
open import Agda.Primitive
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
postulate
A : Set
a b : A
f : Level → A
g h : Level
f-g : f (lsuc g) ≡ a
f-h : f (lsuc h) ≡ b
g-h : g ≡ h
{-# REWRITE f-g f-h g-h #-}
|
open import Relation.Binary using (Rel; Reflexive; Trans)
open import Level using (Level; _⊔_; suc)
open import Data.Product using (Σ; _×_; _,_; Σ-syntax; ∃-syntax; proj₁; proj₂)
data Star {t r} {T : Set t} (R : Rel T r) : Rel T (t ⊔ r) where
ε : Reflexive (Star R)
_▻_ : Trans (Star R) R (Star R)
_▻▻_ : ∀ {t ... |
module Basic.EqvSemantics where
open import Data.Vec
open import Function
open import Data.Product
open import Data.Maybe
open import Utils.Decidable
open import Basic.AST
open import Basic.BigStep
open import Basic.SmallStep
{-
Equivalence of big step and small step semantics (Theorem 2.26 in the book).
The main... |
module Categories.Comonad where
open import Level using (_⊔_)
open import Categories.Category using (Category)
open import Categories.Functor hiding (_≡_; assoc; identityˡ; identityʳ)
open import Categories.NaturalTransformation renaming (id to idN)
record Comonad {o ℓ e} (C : Category o ℓ e) : Set (o ⊔ ℓ ⊔ e) where... |
-- A module which imports every Web.Semantic module.
module Web.Semantic.Everything where
import Web.Semantic.DL.ABox
import Web.Semantic.DL.ABox.Interp
import Web.Semantic.DL.ABox.Interp.Meet
import Web.Semantic.DL.ABox.Interp.Morphism
import Web.Semantic.DL.ABox.Model
import Web.Semantic.DL.ABox.Skolemization
impor... |
{-# OPTIONS --safe --without-K #-}
module Generics.Mu where
open import Generics.Prelude hiding (lookup)
open import Generics.Telescope
open import Generics.Desc
private
variable
P : Telescope ⊤
V I : ExTele P
p : ⟦ P ⟧tel tt
ℓ : Level
n : ℕ
⟦_⟧IndArgω : ConDesc P V I → (⟦ P , I ⟧xtel... |
{-# OPTIONS --cubical --no-import-sorts --safe --postfix-projections #-}
module Cubical.Data.FinSet.Binary.Small.Properties where
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Found... |
{-# OPTIONS --without-K #-}
module FinEquivEquivTimes where
open import Data.Product using (_×_; proj₁; proj₂)
open import Equiv using (refl∼; sym∼; sym≃; _⊎≃_; id≃; _≃_; _●_; _×≃_; qinv)
open import FinEquivPlusTimes using (F0≃⊥; Fin1≃⊤; module Plus; module Times)
open Plus using (⊎≃+; +≃⊎)
open Times using (×≃*; ... |
-- Now you don't need a mutual keyword anymore!
module Issue162 where
data Odd : Set
data Even : Set where
zero : Even
suc : Odd → Even
data Odd where
suc : Even → Odd
-- This means you can have all kinds of things in
-- mutual blocks.
-- Like postulates
_o+e_ : Odd → Even → Odd
_e+e_ : Even → Even → Even
z... |
module Data.Tuple.Proofs where
import Lvl
open import Data using (Unit ; <>)
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Data.Tuple.Equiv
open import Function.Equals
open import Logic.Predicate
open import Logic.Propositional
open import Structure.Function.Domain
open import Structure.Function.D... |
{-# OPTIONS --without-K #-}
open import HoTT
module homotopy.JoinComm where
module _ {i j} {A : Type i} {B : Type j} where
swap : A * B → B * A
swap = Swap.f module _ where
swap-glue : (a : A) (b : B) → right a == left b
swap-glue a b = ! (glue (b , a))
module Swap = PushoutRec right left (uncurr... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties satisfied by bounded lattice
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary.Lattice
module Relation.Binary.Pr... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
module Boolean.Definition where
data Bool : Set where
BoolTrue : Bool
BoolFalse : Bool
{-# BUILTIN BOOL Bool #-}
{-# BUILTIN TRUE BoolTrue #-}
{-# BUILTIN FALSE BoolFalse #-}
if_then_else_ : {a : _}... |
module root2 where
open import Data.Nat
open import Data.Nat.Properties
open import Data.Empty
open import Data.Unit using (⊤ ; tt)
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Relation.Binary.Definitions
import gcd as GCD
open import even
open import nat
open import log... |
module Data.List.Proofs where
import Lvl
open import Functional
open import Data.Option using (Option ; Some ; None)
open import Data.List
open import Data.List.Equiv
open import Data.List.Functions
open import Logic
open import Numeral.Natural
open import Numeral.Natural.Oper
open import Numeral.Natural.Oper.Proofs
o... |
{-# OPTIONS --safe #-}
{-# OPTIONS --sized-types #-}
module ++-Identity where
open import Size
-- +-identityʳ : ∀ (n : ℕ) → n + 0 ≅ n
-- +-identityʳ zero = refl
-- +-identityʳ (suc n) = cong suc (+-identityʳ n)
-- ∷-≅ : ∀ {m n : ℕ} {A : Set} (x : A) (xs : Vec A m) (ys : Vec A n) → m ≅ n → xs ≅ ys → (x ∷ xs) ≅ (x ∷ y... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import Boolean.Definition
open import LogicalFormulae
open import Decidable.Lemmas
module Numbers.Naturals.Definition where
data ℕ : Set where
zero : ℕ
succ : ℕ → ℕ
infix 100 succ
{-# BUILTIN NATURAL ℕ #-}
succInjective : {a b : ℕ} → (succ a ≡ succ b) → ... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2021, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
open import LibraBFT.Base.Types
open import LibraBFT.Impl.OBM.Rust.Duration ... |
module AllTests where
import Issue14
import LanguageConstructs
import Numbers
import Pragmas
import Sections
import Test
import Tuples
import Where
{-# FOREIGN AGDA2HS
import Issue14
import LanguageConstructs
import Numbers
import Pragmas
import Sections
import Test
import Tuples
import Where
#-}
|
-- Task:
-- Try to compile a function that requires a proof as input.
-- It should be similar to what exportSqrt does in the ℝ but
-- for Nats (ℕ)
|
{-# OPTIONS --universe-polymorphism #-}
module Categories.NaturalTransformation where
open import Categories.Category
open import Categories.Functor hiding (equiv) renaming (id to idF; _≡_ to _≡F_; _∘_ to _∘F_)
open import Categories.NaturalTransformation.Core public
infixr 9 _∘ˡ_ _∘ʳ_
_∘ˡ_ : ∀ {o₀ ℓ₀ e₀ o₁ ℓ₁ e₁ o₂... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.CofiberSequence
open import cohomology.Exactness
open import cohomology.ExactPairIso
open import cohomology.FunctionOver
open import cohomology.MayerVietoris
open import cohomology.SplitExactRight
open import cohomology.Theory
module cohomology.Copro... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Binary.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
|
------------------------------------------------------------------------
-- Indexed containers
------------------------------------------------------------------------
-- Partly based on "Indexed containers" by Altenkirch, Ghani, Hancock,
-- McBride and Morris, and partly based on "Non-wellfounded trees in
-- Homotopy... |
module Data.List.Relation.Membership.Proofs where
import Lvl
open import Functional
open import Data.Boolean
open import Data.Boolean.Stmt
open import Data.List
open import Data.List.Functions hiding (skip)
open import Data.List.Relation.Membership
open import Data.List.Relation.Quantification hiding (use ; skip)
open... |
module Base.Free.Instance.Maybe where
open import Data.Unit using (⊤; tt)
open import Data.Empty using (⊥)
open import Base.Free using (Free; pure; impure)
open import Base.Partial using (Partial)
open Partial
-- Representation of the `Maybe` monad using Free.
Shape : Set
Shape = ⊤
Position : Shape ... |
open import Nat
open import Prelude
open import List
open import judgemental-erase
open import lemmas-matching
open import statics-core
open import synth-unicity
module moveerase where
-- type actions don't change the term other than moving the cursor
-- around
moveeraset : {t t' : ztyp} {δ : direction} →
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some code related to indexed AVL trees that relies on the K rule
------------------------------------------------------------------------
{-# OPTIONS --with-K --safe #-}
open import Relation.Binary
open import ... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Semigroup where
open import Cubical.Algebra.Semigroup.Base public
|
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.types.Empty
open import lib.types.Group
open import lib.types.Int
open import lib.types.List
open import lib.types.Nat
open import lib.types.Pi
open import lib.types.Sigma
module lib.types.Word {i} where
module _ (A... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cw.CW
open import cw.FinCW
open import cw.FinBoundary
open import cohomology.Theory
open import cohomology.ChainComplex
module cw.cohomology.ReconstructedCochainsEquivCellularCochains
(OT : OrdinaryTheory lzero) where
open OrdinaryTheory OT
o... |
{- This file describes properties of computable relations. -}
open import bool
open import level
open import eq
open import product
open import product-thms
open import negation
module relations where
-- Decidable relations.
-- This was taken from the Agda STDLIB.
data Dec {p} (P : Set p) : Set p where
yes... |
-- Andreas, 2016-09-20 test whether --no-eta-equality is respected
{-# OPTIONS --no-eta-equality #-}
record ⊤ : Set where
test : ⊤
test = _ -- should remain unsolved
|
module BasicIPC.Metatheory.ClosedHilbert-BasicTarski where
open import BasicIPC.Syntax.ClosedHilbert public
open import BasicIPC.Semantics.BasicTarski public
-- Soundness with respect to all models, or evaluation, for closed terms only.
eval₀ : ∀ {A} → ⊢ A → ⊨ A
eval₀ (app t u) = eval₀ t $ eval₀ u
eval₀ ci =... |
{-# OPTIONS --without-K #-}
open import Base
open import Homotopy.PushoutDef
open import Homotopy.PushoutUP as PushoutUP
open import Homotopy.Truncation
open import Homotopy.PullbackDef
open import Homotopy.PullbackInvariantEquiv
module Homotopy.TruncationRightExact {i} (n : ℕ₋₂) (d : pushout-diag i) where
open push... |
{-# OPTIONS --cubical --safe #-}
module Container.Stream where
open import Prelude
open import Data.Fin
open import Container
Stream : Type a → Type a
Stream = ⟦ ⊤ , const ℕ ⟧
|
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Setoids
open import Functions
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Numbers.Naturals.Naturals
open import Sets.FinSet
open import Groups.Groups
open import Groups.Definition
open import S... |
module Structure.Setoid.Proofs where
import Lvl
open import Functional
open import Logic
open import Logic.Propositional
open import Structure.Setoid
open import Structure.Function
open import Structure.Relator.Equivalence
open import Structure.Relator.Properties
{-
module _ where
private variable ℓ ℓ₁ ℓ₂ ℓ₃ : Le... |
module Data.NDTrie where
open import Class.Map
open import Data.Char
open import Data.Char.Instance
open import Data.List
open import Data.List.Instance
open import Data.AVL.Value
open import Data.Product
import Data.Char.Properties as Char
import Data.Trie Char.<-strictTotalOrder-≈ as T
NDTrie : Set -> Set
NDTrie A... |
-- New feature by Jesper Cockx in commit be89d4a8b264dd2719cb8c601a2c7f45a95ba220 :
-- disabling the universe check for a data or record type.
-- Andreas, 2018-10-27, re issue #3327: restructured test cases.
-- Andreas, 2019-07-16, issue #3916:
-- {-# NO_UNIVERSE_CHECK #-} should also disable the index sort check
-- ... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module CombiningProofs.CommDisjunction where
open import Common.FOL.FOL
postulate
A B : Set
∨-comm : A ∨ B → B ∨ A
{-# ATP prove ∨-comm #-}
|
-- Andreas, 2016-08-04, issue #964
-- Allow open metas and interaction points in imported files
-- {-# OPTIONS -v import:100 #-}
-- {-# OPTIONS -v meta.postulate:20 #-}
-- {-# OPTIONS -v tc.conv.level:50 #-}
open import Common.Level
open import Common.Equality
postulate something : Set₁
open import Common.Issue964.... |
{-# OPTIONS --cubical #-}
module Agda.Primitive.Cubical where
{-# BUILTIN INTERVAL I #-} -- I : Setω
{-# BUILTIN IZERO i0 #-}
{-# BUILTIN IONE i1 #-}
infix 30 primINeg
infixr 20 primIMin primIMax
primitive
primIMin : I → I → I
primIMax : I → I → I
primINeg : I → I
{-# BUILTIN ISONE ... |
module Sessions.Semantics.Expr where
open import Prelude
open import Data.Fin
open import Relation.Unary.PredicateTransformer hiding (_⊔_)
open import Relation.Ternary.Separation.Morphisms
open import Relation.Ternary.Separation.Monad
open import Relation.Ternary.Separation.Monad.Reader
open import Sessions.Syntax.T... |
{- 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.Prelude
open import LibraBFT.Impl.Consensus.Types
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Natural numbers
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Nat where
---------------------------------------------------------------... |
-- https://personal.cis.strath.ac.uk/conor.mcbride/PolyTest.pdf
module Sandbox.PolyTest where
open import Data.Nat
open import Data.Nat.Properties.Extra
open import Relation.Binary.PropositionalEquality
_^_ : ℕ → ℕ → ℕ
x ^ zero = suc zero
x ^ suc y = x * (x ^ y)
-- data Poly : ℕ → Set where
-- κ : ℕ → Poly 0
--... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Experiments.NatMinusTwo.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat
open import Cubical.Data.NatMinusOne using (ℕ₋₁)
open import Cubical.Experiments.N... |
{-# OPTIONS --safe #-}
open import Generics.Prelude hiding (lookup; pi; curry)
open import Generics.Telescope
open import Generics.Desc
open import Generics.All
open import Generics.HasDesc
import Generics.Helpers as Helpers
module Generics.Constructions.Fold
{P I ℓ} {A : Indexed P I ℓ} (H : HasDesc {P} {I} {ℓ} A)... |
module Either where
data Either (A : Set) (B : Set) : Set where
left : A → Either A B
right : B → Either A B
[_,_] : ∀ {A B} {C : Set} → (A → C) → (B → C) → Either A B → C
[ f , g ] (left x) = f x
[ f , g ] (right x) = g x
|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Instance.Properties.Cats where
open import Data.Product using (_,_)
open import Categories.Category
open import Categories.Category.Construction.Functors
using (Functors; eval; module curry)
open import Categories.Category.Cartesian using (Cartesian)
im... |
module Data.QuadTree.LensProofs.Valid-LensLeaf where
open import Haskell.Prelude renaming (zero to Z; suc to S)
open import Data.Lens.Lens
open import Data.Logic
open import Agda.Primitive
open import Data.Lens.Proofs.LensLaws
open import Data.Lens.Proofs.LensPostulates
open import Data.Lens.Proofs.LensComposition
ope... |
{-# OPTIONS --without-K #-}
-- Borrowed from OldUnivalence/Equivalences.agda, without HoTT
-- and then upgraded to work on Setoid rather than just on ≡
module SetoidEquiv where
open import Level using (Level; zero; _⊔_)
open import Data.Empty using (⊥)
open import Data.Sum using (_⊎_; inj₁; inj₂)
impor... |
------------------------------------------------------------------------------
-- Well-founded induction on the natural numbers
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-... |
module Prelude.Ord.Properties where
open import Prelude.Ord
open import Prelude.Empty
open import Prelude.Equality
open import Prelude.Equality.Inspect
open import Prelude.Function
open import Prelude.Decidable
open import Prelude.Bool
open import Prelude.Bool.Properties
-- Ord/Laws extra lemmas
module _ {ℓ} {A : ... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.ZariskiLattice.BasicOpens where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
o... |
-- NB. This test fail if Agda is called with the --no-sharing option.
module Issue1351 where
open import Common.Equality
open import Common.Prelude
f1 : Nat → Nat
f1 x = x + x
f2 : Nat → Nat
f2 x = f1 (f1 x)
f4 : Nat → Nat
f4 x = f2 (f2 x)
f8 : Nat → Nat
f8 x = f4 (f4 x)
f16 : Nat → Nat
f16 x = f8 (f8 x)
f32 : ... |
-- {-# OPTIONS --without-K #-}
module kripke where
open import common
infixl 2 _▻_
infixl 3 _‘’_
infixr 1 _‘→’_
infixr 1 _‘‘→’’_
infixr 1 _ww‘‘‘→’’’_
infixl 3 _‘’ₐ_
infixl 3 _w‘‘’’ₐ_
infixr 2 _‘∘’_
infixr 2 _‘×’_
infixr 2 _‘‘×’’_
infixr 2 _w‘‘×’’_
mutual
data Context : Set where
ε : Context
_▻_ : (Γ : Conte... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Which Maybe type which calls out to Haskell via the FFI
------------------------------------------------------------------------
{-# OPTIONS --without-K #-}
module Foreign.Haskell.Maybe where
open import Level... |
-- Andreas, 2017-01-18, issue #5 is fixed
-- reported by Ulf 2007-10-24
data Nat : Set where
zero : Nat
data Vec : Nat -> Set where
[] : Vec zero
f : (n : Nat) -> Vec n -> Nat
f n@._ [] = n
|
{-# OPTIONS --without-K #-}
module function.extensionality.core where
open import level using (lsuc; _⊔_)
open import equality.core
Extensionality : ∀ i j → Set (lsuc (i ⊔ j))
Extensionality i j = {X : Set i}{Y : Set j}
→ {f g : X → Y}
→ ((x : X) → f x ≡ g x)
→... |
-- This file gives the definition of Gaussian Integers, and common
-- operations on them.
{-# OPTIONS --without-K --safe #-}
module GauInt.Base where
open import Data.Bool using (Bool ; true ; false ; T ; not ; _∧_)
open import Data.Nat using (ℕ ; _≡ᵇ_)
open import Data.Integer renaming (-_ to -ℤ_ ; _-_ to _-ℤ_ ; _... |
module Category.Instance where
open import Level
open import Category.Core
𝟙 : Category _ _
𝟙 = record
{ Objects = record
{ Carrier = ⊤
; _≈_ = λ _ _ → ⊤
; isEquivalence = _
}
; Morphisms = record
{ Carrier = λ x → ⊤
; _≈_ = λ _ _ → ⊤
; isEquivalence =... |
{-# OPTIONS --enable-prop #-}
data TestProp : Prop where
p₁ p₂ : TestProp
data _≡Prop_ {A : Prop} (x : A) : A → Set where
refl : x ≡Prop x
p₁≢p₂ : {P : Prop} → p₁ ≡Prop p₂ → P
p₁≢p₂ ()
|
------------------------------------------------------------------------
-- Up-to techniques for the standard coinductive definition of weak
-- bisimilarity
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
open import Labelled-transition-system
module Bisimilarit... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.CommAlgebra.FGIdeal where
open import Cubical.Foundations.Prelude
open import Cubical.Data.FinData
open import Cubical.Data.Nat
open import Cubical.Data.Vec
open import Cubical.Algebra.CommRing
open import Cubical.Algebra.CommRing.FGIdeal renaming (generatedIdeal to gener... |
{-# OPTIONS --allow-unsolved-metas #-}
record ⊤ : Set where
constructor tt
data I : Set where
i : ⊤ → I
data D : I → Set where
d : D (i tt)
postulate
P : (x : I) → D x → Set
foo : (y : _) → P _ y
foo d = {!!}
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Semigroup.Construct.Unit where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Algebra.Semigroup
open import Cubical.Data.Unit
import Cubical.Algebra.Magma.Construct.Unit as ⊤Magma
open ⊤Magma pu... |
------------------------------------------------------------------------
-- Some properties that hold for Erased do not hold for every
-- accessible modality
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
import Equality.Path as P
module Erased.Counte... |
data U : Set
T : U → Set
{-# NO_UNIVERSE_CHECK #-}
data U where
pi : (A : Set)(b : A → U) → U
T (pi A b) = (x : A) → T (b x)
|
module Examples.TrafficLight where
open import Data.Bool
open import Data.Empty
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.Unit
open import Relation.Binary.PropositionalEquality
open import Library
open import FStream.Core
open import FStream.FVec
open import FStream.Containers
open import CTL.Mod... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.S2.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
data S² : Type₀ where
base : S²
surf : PathP (λ i → base ≡ base) refl refl
S²ToSetRec : ∀ {ℓ} {A : S² → Type ℓ}
→ ((x : S²) → isSet (A x)... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2021, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
open import LibraBFT.Base.Types
import LibraBFT.Impl.OBM.ECP-LBFT-OBM-Dif... |
{-# OPTIONS --safe #-}
module Cubical.Data.FinSet.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Function
open import Cubical.Foundations.Structure
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
o... |
open import Data.Boolean
open import Type
module Data.List.Sorting.SelectionSort {ℓ} {T : Type{ℓ}} (_≤?_ : T → T → Bool) where
import Lvl
open import Data.List
open import Data.List.Functions as List using (_++_)
import Data.List.Functions.Multi as List
open import Data.List.Sorting.Functions(_≤?_)
open imp... |
module Induct where
open import Data.Nat
open import Data.Sum
open import Relation.Binary.PropositionalEquality
{- The downward closure of a set. -}
data downset : (ℕ → Set) → ℕ → Set where
downset-lit : {φ : ℕ → Set} → {x : ℕ} → φ x → downset φ x
downset-pred : {φ : ℕ → Set} → {x : ℕ} → downset φ (suc x) → downs... |
{-# OPTIONS --cubical --safe #-}
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Path
open import Cubical.Foundations.Isomorphism renaming (Iso to _≅_)
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Univalence
open import Cubical.F... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_; Setω)
open import Setoids.Setoids
open import Setoids.Subset
open import Setoids.Functions.Definition
open import LogicalFormulae
open import Functions
open import Lists.Lists
open import Setoids.Orders
open ... |
-- Andreas, 2017-08-13, issue #2686
-- Overloaded constructor where only one alternative is not abstract.
-- Not ambiguous, since abstract constructors are not in scope!
-- {-# OPTIONS -v tc.check.term:40 #-}
abstract
data A : Set where
c : A
data D : Set where
c : D
test = c
match : D → D
match c = c
|
module Prelude.Nat where
open import Prelude.Unit
open import Prelude.Empty
open import Prelude.Bool
open import Prelude.Decidable
open import Prelude.Equality
open import Prelude.Equality.Unsafe using (eraseEquality)
open import Prelude.Ord
open import Prelude.Number
open import Prelude.Semiring
open import Prelude.... |
open import Oscar.Prelude
open import Oscar.Data.Proposequality
open import Oscar.Class.Congruity
module Oscar.Class.Congruity.Proposequality where
instance
𝓒ongruityProposequality : ∀ {a b} → 𝓒ongruity Proposequality a b
𝓒ongruityProposequality .𝓒ongruity.congruity _ ∅ = !
𝓒ongruity₂Proposequality : ∀ ... |
module Data.DynamicTree where
import Lvl
open import Data.List
open import Data.Option
open import Functional as Fn
open import Type
private variable ℓ ℓᵢ : Lvl.Level
private variable T A B : Type{ℓ}
data Node (T : Type{ℓ}) : Type{ℓ} where
node : T → List(Node(T)) → Node(T)
DynamicTree : Type{ℓ} → Type{ℓ}
Dy... |
{-# OPTIONS --copatterns #-}
-- {-# OPTIONS -v tc.pos:20 -v tc.meta.eta:100 #-}
-- {-# OPTIONS -v tc.lhs:100 #-}
module LinearTemporalLogic where
import Common.Level
record Stream (A : Set) : Set where
coinductive
field head : A
tail : Stream A
-- Stream properties
Proposition : Set → Set₁
Proposition A... |
module HC-Lec1 where
-- ==============================================================================
-- Lecture 1 : Programs and Proofs
-- https://www.youtube.com/watch?v=O4oczQry9Jw&t=1412s
------------------------------------------------------------------------------
-- some basic logical types
-- 13:22 -- like ... |
module Tait where
-- Boilerplate for contexts and substitutions inspired by:
-- https://plfa.github.io/DeBruijn/
-- Proof technique from "How to (Re)Invent Tait's Method":
-- http://www.cs.cmu.edu/~rwh/courses/chtt/pdfs/tait.pdf
open import Data.Sum
open import Data.Product
open import Function using (_∘_)
open impo... |
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.Extensionality where
open import Prelude
open import Algebra.Construct.Free.Semilattice.Definition
open import Algebra.Construct.Free.Semilattice.Eliminators
open import Algebra.Construct.Free.Semilattice.Relation.Unary
open import Algebra.Co... |
{-
My first Proof in Agda
-}
-- define Natural numbers
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
-- Simply defining 1
one : ℕ
one = suc(zero)
two : ℕ
two = suc(suc(zero))
-- define addition of natural numbers
_+_ : ℕ → ℕ → ℕ
zero + n = n
(suc m) + n = suc (m + n)
-- Define equality
data _≡_ {A : Set} (a : ... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Agda.Primitive using (lzero; lsuc; _⊔_)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong; subst; setoid)
open import Data.Product using (_×_; Σ; _,_; proj₁; proj₂; zip; map; <_,_>; swap)
import Function.Equality
-- open import Relat... |
module STLC3 where
open import Data.Nat
open import Data.Nat.Properties using (≤-antisym; ≤-trans; ≰⇒>)
-- open import Data.List
open import Data.Empty using (⊥-elim)
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong; cong₂; subst)
open import Relation.Nullary.Decidable using (map)
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vector equality over propositional equality
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Data.Vec.Relation.Bina... |
module Issue589 where
data N : Set where
zero : N
suc : N -> N
_+_ : N -> N -> N
zero + y = y
suc x + y = suc ?
|
module neq where
open import eq
open import negation
----------------------------------------------------------------------
-- syntax
----------------------------------------------------------------------
infix 4 _≢_
----------------------------------------------------------------------
-- defined types
----------... |
{-# OPTIONS --without-K --safe #-}
module Cats.Functor.Const where
open import Function using (const)
open import Cats.Category
open import Cats.Functor using (Functor)
module _ {lo la l≈ lo′ la′ l≈′}
(C : Category lo la l≈) {D : Category lo′ la′ l≈′}
where
open Category D
Const : Obj → Functor C D
Con... |
module Epic where
data Nat : Set where
Z : Nat
S : Nat -> Nat
_+_ : Nat -> Nat -> Nat
Z + m = m
S n + m = S (n + m)
_*_ : Nat -> Nat -> Nat
Z * m = Z
S n * m = m + (n * m)
{-# BUILTIN NATURAL Nat #-}
{-# BUILTIN NATPLUS _+_ #-}
{-# BUILTIN NATTIMES _*_ #-}
data Unit : Set where
unit : Unit
postulate
IO ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some properties about signs
------------------------------------------------------------------------
module Data.Sign.Properties where
open import Data.Empty
open import Function
open import Data.Sign
open impo... |
module Cats.Category.Constructions.Mono where
open import Level
open import Cats.Category.Base
module Build {lo la l≈} (Cat : Category lo la l≈) where
private open module Cat = Category Cat
open Cat.≈-Reasoning
IsMono : ∀ {A B} → A ⇒ B → Set (lo ⊔ la ⊔ l≈)
IsMono {A} f = ∀ {C} {g h : C ⇒ A} → f ∘ g ≈ f ∘ ... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Functor where
open import Level
open import Relation.Binary using (IsEquivalence)
open import Relation.Binary.PropositionalEquality
using ()
renaming (_≡_ to _≣_)
open import Relation.Nullary using (¬_)
open import Data.Product using (Σ; _×_; ∃; proj₁)
open... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.