text stringlengths 4 690k |
|---|
{-# OPTIONS --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Properties.Symmetry {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Weakening hiding (wk)
open import Definition.Typed.Prope... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Bifunctor.Properties where
open import Level
open import Data.Product using (Σ; _,_)
open import Categories.Category
open import Categories.Functor
open import Categories.Functor.Bifunctor
import Categories.Morphism.Reasoning as MR
private
variable
... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
open import Categories.Monad
module Categories.Adjoint.Construction.Kleisli {o ℓ e} {C : Category o ℓ e} (M : Monad C) where
open import Categories.Category.Construction.Kleisli
open import Categories.Adjoint
open import Categories.Functor
open impor... |
------------------------------------------------------------------------
-- A coinductive definition of the expansion ordering
------------------------------------------------------------------------
-- The definition of expansion is based on the one in "Enhancements of
-- the bisimulation proof method" by Pous and Sa... |
{- 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
-}
import LibraBFT.Impl.OBM.Crypto as Crypto
open import Libra... |
module Alg where
open import Data.Bool
open import Data.Fin hiding (_+_ ; fold)
open import Data.List hiding (lookup ; [_] ; map)
open import Data.Nat
open import Data.Product hiding (map)
open import Data.Vec hiding (_++_)
open import Size
RankedAlphabet : ℕ → Set
RankedAlphabet = Vec ℕ
-- natural numbers = { zero... |
{-
This file contains:
- Properties of set truncations
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.SetTruncation.Properties where
open import Cubical.Core.Glue
open import Cubical.HITs.SetTruncation.Base
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cu... |
-- Andreas, 2020-06-21, issue #4769
-- Name and hiding ignored in subsequent face constraint patterns.
-- Instead, we should throw a warning.
open import Agda.Primitive.Cubical
data S : Set where
base : S
foo : ∀ i j → Partial _ S
foo i j (i = i0) {{agdaDoesNotSeeThisName = (j = i1)}} = base
-- Expect: warning ab... |
open import Prelude hiding (subst)
module Implicits.Substitutions.MetaType where
open import Implicits.Syntax.Type
open import Implicits.Syntax.MetaType
open import Data.Fin.Substitution
open import Data.Star as Star hiding (map)
open import Data.Star.Properties
open import Data.Nat.Properties.Simple
open import Dat... |
------------------------------------------------------------------------
-- Many properties which hold for _∼_ also hold for flip₁ _∼_
------------------------------------------------------------------------
open import Relation.Binary
module Relation.Binary.Flip where
open import Data.Function
open import Data.Prod... |
module spaceShipCell where
open import Unit
open import Data.List.Base hiding ([])
open import Data.Bool.Base
open import Data.Integer
open import Data.Product hiding (map)
open import NativeIO
open import SizedIO.Object
open import SizedIO.IOObject
open import StateSizedIO.GUI.WxBindingsFFI
open import StateSizedIO.... |
module FFI where
open import Common.Prelude
_+'_ : Nat → Nat → Nat
zero +' y = y
suc x +' y = suc (x +' y)
{-# COMPILE GHC _+'_ = (+) :: Integer -> Integer -> Integer #-}
-- on-purpose buggy haskell implementation!
_+''_ : Nat → Nat → Nat
zero +'' y = y
suc x +'' y = suc (x +'' y)
{-# COMPILE GHC _+''_ = (-) :: Int... |
module Spire.IDarkwingDuck.Primitive where
----------------------------------------------------------------------
infixr 4 _,_
infixr 5 _∷_
----------------------------------------------------------------------
postulate String : Set
{-# BUILTIN STRING String #-}
---------------------------------------------------... |
-- Andreas, 2015-07-13 Better parse errors for illegal type signatures
A rewrite B : Set
|
module Category where
open import Function hiding (_∘_; id)
open import Level
open import Data.Product
open import Relation.Binary
open import Relation.Binary.Core using (_≡_)
open Setoid renaming (_≈_ to eqSetoid)
open import Basic
record Category (C₀ C₁ ℓ : Level) : Set (suc (C₀ ⊔ C₁ ⊔ ℓ)) where
field
Obj : ... |
module Cats.Util.Simp where
open import Data.List using (List ; [] ; _∷_)
open import Data.Nat using (ℕ ; zero ; suc)
open import Data.Product using (_×_ ; _,_ ; ∃-syntax)
open import Data.Unit using (⊤)
open import Function using () renaming (_∘_ to _⊚_)
open import Level using (_⊔_) renaming (zero to lzero)
open imp... |
{-
This file contains:
- The first Eilenberg–Mac Lane type as a HIT
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.EilenbergMacLane1.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.GroupoidLaws
renaming (assoc to assoc∙)
open import Cubical.Algebra.Gro... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Paths
open import lib.types.Pi
open import lib.types.Unit
open import lib.types.Nat
open import lib.types.TLevel
open import lib.types.Pointed
open import lib.types.Sigma
open import lib.NType2
open import lib.types.PathSeq
open import nicolai.... |
module Excercises where
open import Library
open import Core/Category
SmallType : Category (mk (ℓ-suc ℓ-zero) ℓ-zero)
SmallType = record
{ Obj = Set
; _⇒_ = λ (X Y : Set) → (X → Y)
; id = λ (X : Set) → (λ x → x)
; _∘_ = λ {X Y Z : Set} (g : Y → Z) (f : X → Y) → (λ x → g (f x))
; idl = ≡-refl
; ... |
{-# OPTIONS --allow-unsolved-metas #-}
module Issue203 where
open import Common.Level
-- Should work but give unsolved metas (type of b)
data ↓ {a b} (A : Set a) : Set a where
[_] : (x : A) → ↓ A
mutual -- avoid freezing
-- Shouldn't instantiate the level of Σ to a
data Σ {a b} (A : Set a) (B : A → Set b) : ... |
-- Test unquoteTC and quoteTC primitives.
module _ where
open import Common.Prelude hiding (_>>=_)
open import Common.Reflection
open import Common.Equality
open import Common.Product
sum : List Nat → Nat
sum [] = 0
sum (x ∷ xs) = x + sum xs
pattern `Bool = def (quote Bool) []
pattern `true = con (quote true) []
pat... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Monoid.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.HalfAdjoint
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubica... |
{-# OPTIONS --without-K #-}
module PathStructure.Nat where
open import Equivalence
open import PathOperations
open import Types
F : ℕ → ℕ → Set
F = ind (λ _ → ℕ → Set)
(λ _ r → ind (λ _ → Set) (λ n-1 _ → r n-1) ⊥)
( ind (λ _ → Set) (λ _ _ → ⊥) ⊤)
F-lemma : ∀ n → F n n
F-lemma = ind (λ n → F n n) (λ ... |
module PiFrac.Everything where
open import PiFrac.Syntax -- Syntax of PiFrac
open import PiFrac.Opsem -- Abstract machine semantics of PiFrac
open import PiFrac.AuxLemmas -- Some auxiliary lemmas about opsem for forward/backward deterministic proof
open import PiFrac.NoRepeat -- Forward/backward determinist... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Delta-observational equivalence - support for equational reasoning
------------------------------------------------------------------------
module Base.Change.Equivalence.EqReasoning where
open import Relation.Bina... |
{-# OPTIONS --no-qualified-instances #-}
postulate
A : Set
f : {{A}} → A
module M where postulate instance a : A
test : A
test = f
|
-- P: <E[fork e]> --> <E[()]> | <e>
module Properties.StepFork where
open import Data.List
open import Data.List.All
open import Data.Product
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import Typing
open import Syntax
open import Global
open import Channel
open import Values
... |
-- Andreas, 2019-07-07, issue #3892
postulate Foo : Set
data Foo where
-- WAS: internal error
-- EXPECTED:
-- Multiple definitions of Foo. Previous definition at ...
|
module Structure.Setoid {ℓₑ ℓₒ} where
import Lvl
open import Functional.Dependent
open import Lang.Instance
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Relator.Equivalence
open import Syntax.Function
import Type
module _ where
open Type
-- An instance of `Equiv(T)` is t... |
{-# OPTIONS --without-K --exact-split #-}
module subrings where
import rings
open rings public
--------------------------------------------------------------------------------
{- Subrings -}
subset-Ring :
(l : Level) {l1 : Level} → Ring l1 → UU ((lsuc l) ⊔ l1)
subset-Ring l R = type-Ring R → UU-Prop l
is-additi... |
open import Relation.Binary.Core
module BSTree.Properties {A : Set}
(_≤_ : A → A → Set)
(trans≤ : Transitive _≤_) where
open import BTree {A}
open import BSTree _≤_
open import List.Order.Simple _≤_
open import List.Order.Simple.Properties _≤_ trans≤
open import List.Sorted _≤_
lemma... |
{-# OPTIONS --universe-polymorphism #-}
module Issue203 where
open import Imports.Level
-- shouldn't work
data Bad {a b} (A : Set a) : Set b where
[_] : (x : A) → Bad A
|
module Issue395 where
foo : Set → Set₁
foo foo with Set
... | _ = Set
|
{-# OPTIONS --without-K #-}
module sum-properties-setoid where
open import Type
import Level as L
open import Algebra
import Algebra.FunctionProperties as FP
open import Data.Zero using (𝟘)
open import Data.Bool.NP
open Data.Bool.NP.Indexed
open import Data.Fin using (Fin)
open import Data.Nat.NP
open import Data.N... |
module Common.Integer where
open import Agda.Builtin.Int public renaming (Int to Integer)
|
-- Andreas, 2017-02-15, issue #2462
-- Overloaded postfix projection should resolve
postulate
A : Set
record R : Set where
constructor mkR
field f : A
open R
record S : Set where
field f : R
open S
test : S → A
test s = let mkR x = s .f in x
-- Error WAS:
-- Cannot resolve overloaded projection f because i... |
module FFI.MachineWord where
import Lvl
open import Data.Boolean
open import Numeral.Natural
open import String
open import Syntax.Number
open import Type
postulate Word64 : Type{Lvl.𝟎}
{-# BUILTIN WORD64 Word64 #-}
private
module Primitives where
primitive primWord64ToNat : Word64 → ℕ
primitive pr... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.Exactness
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
- ∙ Cⁿ(winl) corresponds to fst : ... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.DirectSum.DirectSumFun.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat renaming (_+_ to _+n_ ; _·_ to _·n_)
open import Cubical.Data.Nat.Order
open import Cubical.Data.Sigma
open import Cubical.HITs.... |
------------------------------------------------------------------------
-- Functors
------------------------------------------------------------------------
-- Note that currently the functor laws are not included here.
module Category.Functor where
open import Data.Function
record RawFunctor (f : Set → Set) : Set... |
{-# OPTIONS --without-K --safe #-}
--------------------------------------------------------------------------------
-- A simple reflection based solver for categories.
--
-- Based off 'Tactic.MonoidSolver' from 'agda-stdlib'
--------------------------------------------------------------------------------
open import ... |
module Category.Test where
open import Equality.Eq
postulate A : Set
postulate o : A → A
postulate x : A
postulate y : A
postulate h : A → A → Set
postulate f : h x y
postulate I : A
postulate i : h I I
postulate m : h x y → h (o x) (o y)
postulate pf₁ : o x ≅ I
postulate pf₂ : o y ≅ I
subs... |
module Impure.STLCRef.Syntax where
open import Prelude hiding (subst)
open import Data.Vec
open import Data.List
open import Function
data Type : Set where
Unit : Type
_⇒_ : (a b : Type) → Type
Ref : Type → Type
infixl 10 _·_
data Exp : (n : ℕ) → Set where
unit : ∀ {n} → Exp n
var : ∀ {n} → Fin n → Exp ... |
------------------------------------------------------------------------
-- Finite sets, based on AVL trees
------------------------------------------------------------------------
open import Relation.Binary
module Data.AVL.Sets (OrderedKeySet : StrictTotalOrder) where
import Data.AVL as AVL
open StrictTotalOrder O... |
-- Andreas, 2013-10-26, reported by Jesper Cockx
{-# OPTIONS --cubical-compatible #-}
module Issue920a where
import Common.Level
open import Common.Equality
record ⊥ : Set where
data Bool : Set where
true false : Bool
-- Standard eliminator for ≡
J : ∀ {a b} {A : Set a} {x : A} {Φ : (y : A) → x ≡ y → Set b} →
... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Standard evaluation (Def. 3.3 and Fig. 4i)
------------------------------------------------------------------------
import Parametric.Syntax.Type as Type
import Parametric.Syntax.Term as Term
import Parametric.Deno... |
-- Andreas, 2012-03-15, example by Nisse
-- {-# OPTIONS --show-implicit -v tc.meta:20 #-}
module Issue585-17 where
data List (A : Set) : Set where
[] : List A
_∷_ : A → List A → List A
data ″ℕ″ : Set where
suc : ″ℕ″ → ″ℕ″
replicate : {A : Set} → ″ℕ″ → A → List A
replicate (suc n) x = x ∷ replicate n x
data P... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Theorems of ⊃ connective.
------------------------------------------------------------------------------
open import Data.Nat using ( ℕ )
module Data.PropFormula.Theorems.Implication ( n : ℕ ) where
--------------... |
module Luau.Substitution where
open import Luau.Syntax using (Expr; Stat; Block; nil; addr; var; function⟨_⟩_end; _$_; block_is_end; local_←_; _∙_; done; function_⟨_⟩_end; return)
open import Luau.Value using (Value; val)
open import Luau.Var using (Var; _≡ⱽ_)
open import Properties.Dec using (Dec; yes; no)
_[_/_]ᴱ :... |
module Issue1691.Nat where
data ℕ : Set where
zero : ℕ
suc : (n : ℕ) → ℕ
{-# BUILTIN NATURAL ℕ #-}
_∸_ : ℕ → ℕ → ℕ
m ∸ zero = m
zero ∸ suc n = zero
suc m ∸ suc n = m ∸ n
pred : ℕ → ℕ
pred zero = zero
pred (suc n) = n
|
module Issue2579.Instance (A : Set) (a : A) where
open import Issue2579.Import
instance
w : Wrap A
w = wrap a
|
module BuiltinMustBeConstructor where
data Bool : Set where
true : Bool
other : Bool
false : Bool
false = true
{-# BUILTIN BOOL Bool #-}
{-# BUILTIN TRUE true #-}
{-# BUILTIN FALSE false #-}
|
open import Relation.Binary.Core
module PLRTree.DropLast.Complete {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Data.Sum renaming (_⊎_ to _∨_)
open import PLRTree {A}
open import PLRTree.Drop _≤_ tot≤
open import PLRTree.Complete {A}
open import PLRTr... |
module Direction where
open import Relation.Binary.PropositionalEquality hiding (Extensionality)
----------------------------------------------------------------------
-- direction
data Dir : Set where
SND RCV : Dir
variable
d d₁ d₂ d₃ : Dir
-- dual
dual-dir : Dir → Dir
dual-dir SND = RCV
dual-dir RCV = SND
d... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Groups.Definition
open import Groups.Abelian.Definition
module Groups.Abelian.DirectSum {a b c d : _} {A : Set a} {B : Set b} {S : Setoid {a} {c} A} {T : Setoid {b} {d} B} {_+1_ : A → A → A} {_+2_ : B → B → B} {G1' : Group S _+... |
open import Nat
open import Prelude
open import contexts
open import core
module canonical-value-forms where
canonical-value-forms-b : ∀{Δ d} →
Δ , ∅ ⊢ d :: b →
d val →
d == c
canonical-value-forms-b TAConst VConst = refl
canonic... |
{-# OPTIONS --cubical #-}
open import Agda.Builtin.Equality
data Unit : Set where
unit : Unit
f : (x : Unit) → _ -- x ≡ x
g : (x : Unit) → x ≡ x
f unit = refl
g x = f x
|
open import Level
open import Ordinals
module generic-filter {n : Level } (O : Ordinals {n}) where
import filter
open import zf
open import logic
-- open import partfunc {n} O
import OD
open import Relation.Nullary
open import Relation.Binary
open import Data.Empty
open import Relation.Binary
open import Relat... |
-- Andreas, 2015-07-13 Better parse errors for illegal type signatures
A with B : Set
|
-- You are not allowed to export the same name twice from a
-- module. However, if the name is only exported once, ambiguity
-- is allowed.
module Issue154 where
module A where
postulate X : Set
module B where
postulate X : Set
module C where
open A public
-- X is ambiguous here, but only exported once... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.NatSolver.NatExpression where
open import Cubical.Foundations.Prelude
open import Cubical.Data.FinData
open import Cubical.Data.Nat
open import Cubical.Data.Nat.Order using (zero-≤)
open import Cubical.Data.Vec.Base
infixl 6 _+'_
infixl 7 _·'_
-- Expression in a ring on... |
{-# OPTIONS --safe #-}
module Cubical.Relation.Nullary.DecidableEq where
open import Cubical.Relation.Nullary.Properties
using (Dec→Stable; Discrete→isSet) public
|
module Listy where
open import Measure
open import Data.List as List using (List; []; _∷_)
open import Data.Product using (_,_; _×_; proj₁; proj₂)
open import Data.Nat as ℕ using (ℕ; suc; zero)
open import Function
record Prob (A : Set) : Set where
constructor weighted
field
runProb : List (A × ℙ)
open Prob... |
open import FRP.JS.Behaviour using ( Beh ; [_] )
open import FRP.JS.DOM using ( DOM ; text )
open import FRP.JS.RSet using ( ⟦_⟧ )
module FRP.JS.Demo.Hello where
main : ∀ {w} → ⟦ Beh (DOM w) ⟧
main = text ["Hello, world."]
|
module Luau.TypeSaturation where
open import Luau.Type using (Type; _⇒_; _∩_; _∪_)
open import Luau.TypeNormalization using (_∪ⁿ_; _∩ⁿ_)
-- So, there's a problem with overloaded functions
-- (of the form (S_1 ⇒ T_1) ∩⋯∩ (S_n ⇒ T_n))
-- which is that it's not good enough to compare them
-- for subtyping by comparing a... |
module Base.Change.Products where
open import Relation.Binary.PropositionalEquality
open import Level
open import Base.Change.Algebra
open import Base.Change.Equivalence
open import Base.Change.Equivalence.Realizers
-- Also try defining sectioned change structures on the positives halves of
-- groups? Or on arbitrar... |
-- This file gives the definition of Gaussian Integers, the addition
-- and multiplication on them, and shows that they form a commutative
-- ring, and other properties. All the proofs are straightforward.
{-# OPTIONS --without-K --safe #-}
module GauInt.Properties where
-- imports from local.
open import GauInt.In... |
{-# OPTIONS --erased-cubical --safe #-}
module FarmFugue where
open import Data.Bool using (Bool; true; false; if_then_else_)
open import Data.Fin using (#_)
open import Data.List using (List; _∷_; []; map; _++_)
open import Data.Nat using (ℕ; _*_; _+_)
open import Data.Sign using () r... |
module PatternShadowsConstructor where
module A where
data B : Set where
x : B
data C : Set where
c : B → C
open A using (C; c)
f : C → C
f (c x) = x
|
module STLCRef.Readme where
open import STLCRef.Syntax
open import STLCRef.Welltyped
open import STLCRef.Eval
open import STLCRef.Properties.Soundness
|
{-# OPTIONS --type-in-type #-}
module prelude.io where
open import prelude
open import functors
open import Agda.Builtin.IO public using (IO)
open import Data.String
open import prelude.Stream as Stream using (Stream)
open import Data.List as L using (List)
IO[_,_] : Set → Set → Set
IO[ A , B ] = A → IO B
infixl 1 _>... |
-- 2014-05-26 Andrea & Andreas
-- hasBadRigids (in pruning) should reduce term before checking.
open import Common.Equality
postulate
Fence : Set → Set
id : ∀{a}{A : Set a}(x : A) → A
id x = x
test : let H : Set; H = _; M : Set → Set; M = _ in
(A : Set) → H ≡ Fence (M (id A))
test A = refl
-- Expected out... |
{-# OPTIONS --without-K --safe #-}
module Reflection.Helpers where
open import Agda.Builtin.Reflection
open import Function
open import Data.List as List using (List; _∷_; [])
open import Data.Nat as ℕ using (ℕ; suc; zero)
open import Data.Nat.GeneralisedArithmetic using (fold)
open import Data.Fin as Fin using (Fin)... |
{-# OPTIONS --cubical --no-import-sorts #-}
module Bundles where
open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero)
private
variable
ℓ ℓ' ℓ'' : Level
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Structures.CommRing
open... |
------------------------------------------------------------------------
-- Soundness of normalization w.r.t. to declarative kinding of Fω with
-- interval kinds
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module FOmegaInt.Kinding.Declarative.Normalizati... |
-- Andreas, 2017-10-04, issue #2752, report and test case by nad
--
-- Problem was: instance does not distribute into mutual blocks.
open import Agda.Builtin.List
open import Agda.Builtin.Size
mutual
data Rose (i : Size) (A : Set) : Set where
node : List (Rose′ i A) → Rose i A
data Rose′ (i : Size) (A : Set... |
module RecordDef where
data ⊤
: Set
where
tt
: ⊤
data ⊤'
(x : ⊤)
: Set
where
tt
: ⊤' x
record R
{y : ⊤}
(y' : ⊤' y)
: Set
record R {z} _ where
postulate
r
: R {tt} tt
|
------------------------------------------------------------------------
-- Extra definitions related to simultaneous substitutions
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module Data.Fin.Substitution.Extra where
open import Data.Fin using (Fin)
ope... |
module Prelude.Float where
open import Prelude.String
postulate
Float : Set
floatToString : Float -> String
stringToFloat : String -> Float
{-# BUILTIN FLOAT Float #-}
{-# COMPILED_EPIC floatToString (f : Float) -> String = frString(floatToStr(f)) #-}
{-# COMPILED_EPIC stringToFloat (s : Any) -> Float = strTo... |
module List.Order.Simple {A : Set}(_≤_ : A → A → Set) where
open import Data.List
data _*≤_ : List A → A → Set where
lenx : {x : A}
→ [] *≤ x
lecx : {x y : A}{ys : List A}
→ y ≤ x
→ ys *≤ x
→ (y ∷ ys) *≤ x
data _≤*_ : A → List A → S... |
{-# OPTIONS --rewriting --confluence-check --double-check #-}
data _==_ {A : Set} : (x y : A) → Set where
refl : {a : A} → a == a
{-# BUILTIN REWRITE _==_ #-}
postulate
copy : ∀ {X : Set} → X → X
A : Set
a : A
uip : (p : a == a) → p == refl
record S : Set where
field
x : A
x-β : x == a
open S
mo... |
{-# OPTIONS --without-K --safe #-}
module Definition.Typed.EqRelInstance where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Weakening
open import Definition.Typed.Reduction
open import Definition.Typed.EqualityRelation
open import Tools.Function
-- Judgmental instance of... |
-- A minor variant of code reported by Andreas Abel. The code below
-- should be rejected.
open import Agda.Builtin.Size
data ⊥ : Set where
data SizeLt (i : Size) : Set where
size : (j : Size< i) → SizeLt i
data D {i : Size} : SizeLt i → Set where
c : ∀{i' : Size< i} → ((j : SizeLt i') → D j) → D (size i')
f :... |
{- 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.Base.Types
open import LibraBFT.Concrete.System.Pa... |
------------------------------------------------------------------------
-- Empty type (in Set₁)
------------------------------------------------------------------------
module Data.Empty1 where
data ⊥₁ : Set₁ where
|
module erase where
open import syntax-util
open import lib
open import cedille-types
open import general-util
open import constants
open import is-free
{-# TERMINATING #-}
erase : { ed : exprd } → ⟦ ed ⟧ → ⟦ ed ⟧
erase-term : term → term
erase-type : type → type
erase-kind : kind → kind
erase-lterms : term → lterms →... |
{-# OPTIONS --allow-unsolved-metas #-}
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- CS410 2017/18 Exercise 1 VECTORS AND FRIENDS (worth 25%)
--------------------------------------------------------------... |
------------------------------------------------------------------------
-- A general grammar and pretty-printer for binary operators of
-- various (not necessarily linearly ordered) precedences
------------------------------------------------------------------------
-- The code below uses a variant of the operator gr... |
module sets.fin.core where
open import decidable
open import equality.core
open import sets.empty
open import sets.unit public
open import sets.nat.core
hiding (_≟_; pred)
open import sets.empty
data Fin : ℕ → Set where
zero : {n : ℕ} → Fin (suc n)
suc : {n : ℕ} → Fin n → Fin (suc n)
raise : ∀ {n} → Fin n → F... |
open import Agda.Primitive.Cubical
data BadData : IUniv where
|
------------------------------------------------------------------------
-- A variant of declarative kinding in Fω with interval kinds
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module FOmegaInt.Kinding.Declarative where
open import Data.Context.WellFo... |
open import Prelude
open import Container.List
open import Ataca.Utils
open import Ataca.Core
open import Ataca.Tactics
module Ataca.Demo where
test₁ : Nat
test₁ = {! exact 42 !}
test₂ : Nat → Bool → Nat
test₂ x y = {! assumption !}
test₃ : Nat → Bool → Bool
test₃ x y = {! assumption !}
test₄ : Nat → Bool → Nat
... |
module NaturalTransFacts where
open import Level
open import Categories.Support.Equivalence
open import Categories.Category
open import Categories.Functor
open import Categories.NaturalTransformation
renaming (id to natId; _≡_ to _≡N_; setoid to natSetoid)
hiding (_∘ˡ_; _∘ʳ_)
open import Categories.Support.EqReaso... |
module Data.List.SizeOrdering where
open import Data.List
|
{-# OPTIONS --without-K #-}
open import lib.Basics hiding (_⊔_)
open import lib.types.Sigma
open import lib.NType2
open import Preliminaries
open import Truncation_Level_Criteria
open import Anonymous_Existence_CollSplit
open wtrunc
open with-weak-trunc
module Weakly_Constant_Functions where
-- Definition 5.1.1
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Maybe.Base where
open import Cubical.Core.Everything
private
variable
ℓ : Level
A B : Type ℓ
data Maybe (A : Type ℓ) : Type ℓ where
nothing : Maybe A
just : A → Maybe A
caseMaybe : (n j : B) → Maybe A → B
caseMaybe n _ nothing ... |
module nodcap.Norm where
open import Category.Monad
open import Data.Nat as ℕ using (ℕ; suc; zero)
open import Data.Pos as ℕ⁺ using (ℕ⁺; suc; _+_)
open import Data.List as L using (List; []; _∷_; _++_)
open import Data.List.Any as LA using (Any; here; there)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Fun... |
-- 2018-01-05, Jesper: having a `rewrite` after a `with` caused problems
-- because the patterns stripped by with-desugaring were not propagated
-- to the generated rewrite-clause. This should now be fixed.
open import Agda.Builtin.Equality
postulate
lem : Set ≡ Set
simple-test : {A : Set₁} → A ≡ Set → Set₁
simple... |
module Curry5 where
open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; subst)
open import Function using (id)
lemma1 : {X Y : Set} → (X ≡ (X → Y)) → X
lemma1 p rewrite p = (λ x → let f = subst id p x in f x)
curry : {X Y : Set} → (X ≡ (X → Y)) → Y
curry p = (let f = subst id p (lemma1 p... |
{-# OPTIONS --cubical-compatible --rewriting #-}
open import Agda.Primitive using (Level; _⊔_; Setω; lzero; lsuc)
module Issue4020b where
data _≡_ {ℓ : Level} {A : Set ℓ} (a : A) : A → Set ℓ where
refl : a ≡ a
{-# BUILTIN REWRITE _≡_ #-}
ap : ∀ {a b} {A : Set a} {B : Set b} (f : A → B) {a₁ a₂} → a₁ ≡ a₂ → f a₁ ≡... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.