text stringlengths 4 690k |
|---|
module Issue1280 where
open import Common.Prelude
open import Common.Reflection
infixr 5 _∷_
data Vec (A : Set) : Nat → Set where
[] : Vec A 0
_∷_ : ∀ {n} → A → Vec A n → Vec A (suc n)
test : Vec _ _
test = 0 ∷ []
quoteTest : Term
quoteTest = quoteTerm test
unquoteTest = unquote (give quoteTest)
data Foo (A ... |
module Control.Monad.Zero where
open import Prelude
record MonadZero {a b} (M : Set a → Set b) : Set (lsuc a ⊔ b) where
instance constructor mkMonadZero
field overlap {{super-zero}} : FunctorZero M
overlap {{super-monad}} : Monad M
open MonadZero public
|
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Data.NatPlusOne.Base where
open import Cubical.Core.Primitives
open import Cubical.Data.Nat
open import Cubical.Data.Empty
record ℕ₊₁ : Type₀ where
constructor 1+_
field
n : ℕ
pattern one = 1+ zero
pattern 2+_ n = 1+ (suc n)
... |
------------------------------------------------------------------------------
-- Arithmetic properties (using induction on the FOTC natural numbers type)
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}... |
module Bootstrap.SimpleInductive where
open import Data.List using (applyUpTo)
open import Prelude
data ConstrData' : Set where
Self : ConstrData'
Other : String → ConstrData'
ConstrData = String × List ConstrData'
InductiveData = String × List ConstrData
private
ℕ⊎Sshow : ℕ ⊎ String → String
ℕ⊎Sshow (inj₁... |
{-# OPTIONS --without-K #-}
module Examples.Traced where
open import Data.Empty using (⊥)
open import Data.Unit using (⊤; tt)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.Product
open import Relation.Binary.PropositionalEquality
using (_≡_; refl; sym; trans; cong; cong₂; subst; module ≡-Reasoning)
... |
{-
This file proves the higher groupoid structure of types
for homogeneous and heterogeneous paths
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.GroupoidLaws where
open import Cubical.Foundations.Prelude
private
variable
ℓ : Level
A : Type ℓ
x y z w : A
_⁻¹ : (x ≡ y) → (y ≡ x)
x≡y ⁻¹... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Bool
-- A function that requires call-by-need
f : Nat → Nat → Nat
f a 0 = a
f a (suc b) = f (a + a) b
even : Nat → Bool
even n = mod-helper 0 1 n 1 == 0
data ⊥ : Set where
record ⊤ : Set where
IsTrue : Bool → Set
IsTrue false = ⊥
IsTrue true = ⊤
-- Prev... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Homotopy.Group.Pi4S3.S3PushoutIso2 where
open import Cubical.Homotopy.Group.Base
open import Cubical.Homotopy.Group.Pi4S3.S3PushoutIso
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.... |
-- 2012-03-08 Andreas
module NoTerminationCheck where
postulate A : Set
-- Skipping a single definition: before type signature
{-# NO_TERMINATION_CHECK #-}
a : A
a = a
-- Skipping a single definition: before first clause
b : A
{-# NO_TERMINATION_CHECK #-}
b = b
-- Skipping an old-style mutual block (placed before... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Ints.HAEquivInt where
open import Cubical.HITs.Ints.HAEquivInt.Base public
|
module plfa-exercises.weird where
open import Data.Nat using (ℕ; zero; suc; _+_; _*_)
open import Data.Bool.Base using (Bool; true; false; _∧_; _∨_; not)
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; sym; trans; cong; subst)
data ℕ∨Bool : Set where
N B : ℕ∨Bool
-- Idea taken from pap... |
open import Relation.Binary
open import Level
module Experiments.Infer {c ℓ₁ ℓ₂}(PO : Preorder c ℓ₁ ℓ₂) where
open Preorder PO renaming (_∼_ to _⊑_)
record IsIncluded (W W' : Carrier) : Set ℓ₂ where
field
is-included : W ⊑ W'
record IsIncludedOnce (W W' : Carrier) : Set ℓ₂ where
field
is-included-once :... |
{-# OPTIONS --cubical --safe #-}
module Data.List.Indexing where
open import Data.List.Base
open import Data.Fin
open import Prelude
infixl 6 _!_
_!_ : (xs : List A) → Fin (length xs) → A
(x ∷ xs) ! f0 = x
(x ∷ xs) ! fs i = xs ! i
tabulate : ∀ n → (Fin n → A) → List A
tabulate zero f = []
tabulate (suc n) f = f f0 ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of the extensional sublist relation over setoid equality.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary hidin... |
postulate Ty : Set
data Cxt : Set where
ε : Cxt
sg : (A : Ty) → Cxt
_∙_ : (Γ₁ Γ₂ : Cxt) → Cxt
variable Γ Γ₁ Γ₂ Δ : Cxt
postulate Ren : (Δ Γ : Cxt) → Set
<_,_> : (f₁ : Ren Δ Γ₁) (f₂ : Ren Δ Γ₂) → Ren Δ (Γ₁ ∙ Γ₂)
<_,_> = {!!}
<_,_>₁ : (f₁ : Ren Δ Γ₁) (f₂ : Ren Δ Γ₂) → Cxt → Ren Δ (Γ₁ ∙ Γ₂)
< f₁ , f₂ >₁ x = {!... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lists with fast append
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.DifferenceList where
open import Level using (Level)
open import D... |
----------------------------------------------------------------------------------
-- The contents of this file is based on the work in "Setoids in Type --
-- Theory" by Barthe et al. and Capretta's "Universal Algebra in Type Theory." --
-- ... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.Multivariate.EquivCarac.Poly0-A where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
... |
-- Andreas, 2017-07-28, issue #1077
-- Agda's reconstruction of the top-level module can be confusing
-- in case the user puts some illegal declarations before the
-- top level module in error.
-- Thus, Agda now rejects the following if the anon. module is omitted.
-- If the user writes the anon. module, it should be... |
module DefinitionalEquality where
postulate
_≡_ : {A B : Set} -> A -> B -> Set
refl-≡ : {A : Set}{x : A} -> x ≡ x
subst-≡ : {A : Set}{x y : A}(C : A -> Set) -> x ≡ y -> C y -> C x
subst-≡¹ : {A : Set}{x y : A}(C : A -> Set1) -> x ≡ y -> C y -> C x
subst-≡' : {A B : Set}{x : A}{y : B}(C : {X : Set} ... |
-- Andreas, 2016-06-16 Issue #2045
-- Size solver should be called before checking extended lambda
-- {-# OPTIONS -v tc.term.exlam:100 #-}
open import Common.Size
postulate anything : ∀{a}{A : Set a} → A
data Exp : Size → Set where
abs : ∀ i (t : Exp i) → Exp (↑ i)
data Val : ∀ i (t : Exp i) → Set where
valAbs... |
module Issue23 where
postulate
ℝ : Set
r₀ : ℝ
_+_ : ℝ → ℝ → ℝ
-_ : ℝ → ℝ
_-_ : ℝ → ℝ → ℝ
x - y = x + (- y)
infixl 4 _≡_
-- Equality.
data _≡_ : ℝ → ℝ → Set where
refl : (x : ℝ) → x ≡ x
postulate ─-neut : {x : ℝ} → r₀ - x ≡ - x
{-# ATP prove ─-neut #-}
|
{-# OPTIONS --safe --warning=error --without-K #-}
open import Functions.Definition
open import Functions.Lemmas
open import LogicalFormulae
open import Numbers.Naturals.Definition
open import Numbers.Naturals.Order
open import Sets.Cardinality.Infinite.Definition
open import Sets.FinSet.Definition
open import Sets.Fi... |
module Issue642 where
module M₁ (X : Set) where
postulate F : X → Set
module M₂ (X : Set) where
open M₁ X public
postulate
A : Set
x : A
open M₂ A
foo : F x
foo = {!!}
-- The goal was displayed as M₁.F A x rather than F x. If "open M₂ A"
-- is replaced by "open M₁ A", then the goal is displayed correctly... |
-- Andreas, 2021-04-19, fixed #5236, regression introduced by #2858.
-- In record declarations, `constructor` should not be a layout keyword,
-- in order to be compatible with Agda 2.6.1.
record Works : Set₁ where
eta-equality; field
W : Set
record Test : Set₁ where
constructor c; field
F : Set -- Shoul... |
{-# OPTIONS --without-K #-}
module F1a where
open import Data.Unit
open import Data.Sum hiding (map)
open import Data.Product hiding (map)
open import Data.List
open import Data.Nat
open import Data.Bool
{--
infixr 90 _⊗_
infixr 80 _⊕_
infixr 60 _∘_
infix 30 _⟷_
--}
-----------------------------------------------... |
open import Agda.Primitive using (lzero; lsuc; _⊔_)
open import Relation.Binary.PropositionalEquality
open import Relation.Binary using (Setoid)
import SecondOrder.Arity
import SecondOrder.Signature
import SecondOrder.Metavariable
import SecondOrder.Renaming
import SecondOrder.Term
import SecondOrder.Substitution
impo... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lexicographic ordering of lists
------------------------------------------------------------------------
-- The definition of lexicographic ordering used here is suitable if
-- the argument order is a strict par... |
open import Relation.Binary.PropositionalEquality
module Experiments.STLCRef
(funext : ∀ {a b} → Extensionality a b) where
open import Level
open import Data.Nat
open import Data.Unit as Unit
open import Data.List
open import Data.List.Most
open import Data.Product
open import Data.Maybe as Maybe hiding (All)
... |
module BTree.Heap {A : Set}(_≤_ : A → A → Set) where
open import BTree {A}
data Heap : BTree → Set where
leaf : Heap leaf
single : (x : A)
→ Heap (node x leaf leaf)
left : {l r : BTree}{x y : A}
→ x ≤ y
→ Heap (node y l r)
→ Heap (n... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax PropLog | PR
type
* : 0-ary
term
false : * | ⊥
or : * * -> * | _∨_ l20
true : * | ⊤
and : * * -> * | _∧_ l30
not : * -> * | ¬_ r50
theory
(⊥U∨ᴸ) a |> or (false, a) = a
(⊥U∨... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2021, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
import LibraBFT.Impl.Types.LedgerInfoWithSignatures as LedgerInfoWithSig... |
module cfg where
open import Level renaming ( suc to succ ; zero to Zero )
open import Data.Nat hiding ( _≟_ )
open import Data.Fin
open import Data.Product
open import Data.List
open import Data.Maybe
open import Data.Bool using ( Bool ; true ; false ; _∧_ ; _∨_ )
open import Relation.Binary.PropositionalEquality h... |
{-# OPTIONS --cubical --safe #-}
module Data.Sum where
open import Level
open import Cubical.Data.Sum using (_⊎_; inl; inr) public
open import Data.Bool using (Bool; true; false)
open import Function using (const)
either : ∀ {ℓ} {C : A ⊎ B → Type ℓ} → ((a : A) → C (inl a)) → ((b : B) → C (inr b))
→ (x : A ⊎... |
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_)
open import Agda.Builtin.Sigma
open import Agda.Builtin.List
open import Agda.Builtin.Unit
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
infixr 0 _$_
_$_ : ∀ {a b}{A : Set a}{B : Set b} → (A → B) → (A → B)
f $ x = f x
map : {A B : Set} → ... |
module Text.Greek.SBLGNT.1Tim where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΠΡΟΣ-ΤΙΜΟΘΕΟΝ-Α : List (Word)
ΠΡΟΣ-ΤΙΜΟΘΕΟΝ-Α =
word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.1.1"
∷ word (ἀ ∷ π ∷ ό ∷ σ ∷ τ ∷ ο ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Tim.1.1"
∷... |
{-
Copyright 2019 Lisandra Silva
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... |
module Oscar.Class.Transitivity where
open import Oscar.Level
open import Oscar.Relation
record Transitivity {a} {A : Set a} {ℓ} (_≤_ : A → A → Set ℓ) : Set (a ⊔ ℓ) where
field
transitivity : ∀ {x y} → x ≤ y → ∀ {z} → y ⟨ _≤ z ⟩→ x
open Transitivity ⦃ … ⦄ public
|
open import Algebra using (CommutativeRing)
module Algebra.Module.Vec.Recursive {r ℓ} {CR : CommutativeRing r ℓ} where
open CommutativeRing CR
open import Algebra.Module using (Module)
open import Data.Vec.Recursive
open import Data.Product using (_×_; _,_)
open import Data.Product.Relation.Binary.Pointwise.NonDepen... |
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import Data.Unit using (⊤; tt)
open import Agda.Builtin.FromNat using (Number)
module AKS.Test where
open import AKS.Nat using ()
open import AKS.Rational using (show-ℚ)
open import AKS.Rational.Properties using (+-*-/-decField)
open import AKS... |
module Structure.Operator.Names where
open import Functional.Dependent
open import Function.Names
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Function.Names
open import Structure.Setoid
open import Syntax.Function
open import Syntax.Transitivity
o... |
postulate
F G : (Set → Set) → Set
!_ : Set → Set
infix 2 F
infix 1 !_
syntax F (λ X → Y) = X , Y
syntax G (λ X → Y) = Y , X
-- This parsed when default fixity was 'unrelated', but with
-- an actual default fixity (of any strength) in place it really
-- should not.
Foo : Set
Foo = ! X , X
|
data D : Set where
record R : Set where
constructor d
field x : D
record R′ : Set where
coinductive
constructor d
field r : R′
f : R → D
f r = let d x = r in x
|
{-# OPTIONS --cubical-compatible #-}
module Common.Float where
open import Agda.Builtin.Float public
open import Common.String
floatToString : Float -> String
floatToString = primShowFloat
|
{-# OPTIONS --no-universe-polymorphism #-}
open import Data.Product hiding (map)
open import Relation.Binary.Core hiding (Total)
open import Relation.Nullary
open import Data.Nat
import Level as L using (zero)
open import Data.List
open import Data.Unit using (⊤)
open import Data.Empty
open import DivideEtImpera
open... |
------------------------------------------------------------------------
-- Normalization of raw terms in Fω with interval kinds
------------------------------------------------------------------------
{-# OPTIONS --safe --exact-split --without-K #-}
module FOmegaInt.Syntax.Normalization where
open import Data.Conte... |
------------------------------------------------------------------------------
-- Inductive PA properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# O... |
module WithApp where
f
: {A : Set}
→ A
→ A
f x
with x
... | y
= y
g
: {A : Set}
→ A
→ A
→ A
g x y
with x
... | _
with y
... | _
= x
|
open import Data.Product using ( ∃ ; _×_ )
open import FRP.LTL.RSet.Core using ( RSet ; _[_,_] ; ⟦_⟧ )
open import FRP.LTL.RSet.Stateless using ( _⇒_ )
open import FRP.LTL.RSet.Globally using ( □ ; [_] )
open import FRP.LTL.Time using ( _≤_ ; ≤-refl ; _≤-trans_ )
module FRP.LTL.RSet.Causal where
infixr 2 _⊵_
infixr 3... |
module STLC.Kovacs.Embedding where
open import STLC.Syntax public
open import Category
--------------------------------------------------------------------------------
-- Embeddings (OPE ; ∙ ; drop ; keep)
infix 4 _⊇_
data _⊇_ : 𝒞 → 𝒞 → Set
where
done : ∅ ⊇ ∅
wkₑ : ∀ {Γ Γ′ A} → (η : Γ′ ⊇ Γ)
... |
module Prelude.Functor where
open import Agda.Primitive
open import Prelude.Function
open import Prelude.Equality
record Functor {a b} (F : Set a → Set b) : Set (lsuc a ⊔ b) where
infixl 4 _<$>_ _<$_
field
fmap : ∀ {A B} → (A → B) → F A → F B
_<$>_ = fmap
_<$_ : ∀ {A B} → A → F B → F A
x <$ m = fmap (... |
module Cats.Util.Logic.Classical where
open import Cats.Util.Logic.Constructive public
-- (Strong) law of the excluded middle
postulate lem : ∀ {p} (P : Set p) → P ∨ ¬ P
-- Double negation elimination
¬¬-elim : ∀ {p} {P : Set p} → ¬ ¬ P → P
¬¬-elim {P = P} ¬¬p with lem P
... | ∨-introl p = p
... | ∨-intror ¬p = ⊥... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Finding the maximum/minimum values in a list
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (TotalOrder; Setoid)
m... |
------------------------------------------------------------------------------
-- Fair properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS -... |
open import Agda.Primitive
open import Data.Unit
open import Data.Nat hiding (_⊔_ ; _^_)
open import Data.Integer hiding (_⊔_)
open import Data.List
open import Data.List.Relation.Unary.Any
open import Data.List.Relation.Unary.All as All
open import Data.List.Membership.Propositional
open import Data.Product
open impor... |
open import MLib.Algebra.PropertyCode
open import MLib.Algebra.PropertyCode.Structures
module MLib.Matrix.SemiTensor.GeneralizesMul {c ℓ} (struct : Struct bimonoidCode c ℓ) where
open import MLib.Prelude
open import MLib.Matrix.Core
open import MLib.Matrix.Equality struct
open import MLib.Matrix.Mul struct
open impor... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Vectors with fast append
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.DifferenceVec where
open import Data.DifferenceNat
open import D... |
{-# OPTIONS --safe #-}
module Cubical.HITs.S2 where
open import Cubical.HITs.S2.Base public
open import Cubical.HITs.S2.Properties public
|
module Nat where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
_+_ : ℕ → ℕ → ℕ
zero + a = a
suc a + b = suc (a + b)
data _≡_ {A : Set} : A → A → Set where
refl : {a : A} → a ≡ a
infix 4 _≡_
cong : {A B : Set} {a b : A} (f : A → B) → a ≡ b → f a ≡ f b
cong f refl = refl
+-assoc : (a b c : ℕ) → (a + b) + c ≡ a + (... |
module ModuleReexport where
open import Common.Unit
open import Common.Nat
open import Common.IO
module A (B : Set) (b : B) where
data X : Set where
Con1 : B -> X
Con2 : X
f : X -> B
f (Con1 x) = x
f Con2 = b
module X = A Nat 10
main = printNat (A.f Nat 10 (X.Con1 20)) ,,
putStrLn "" ,,
printN... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Symmetric closures of binary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Construct.Closure.Symmetric where
open ... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Library.Relation where
open import Light.Level using (Level ; Setω)
open import Light.Variable.Sets
record Kind : Setω where
field
iℓ : Level
Index : Set iℓ
ℓf : Index → Level
... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Definition
open import Numbers.Naturals.Addition
open import Numbers.Naturals.Multiplication
open import Numbers.Naturals.Order
module Numbers.Naturals.Exponentiation where
_^N_ : ℕ → ℕ → ℕ
a ^N zero = 1
a ^N ... |
module Issue296 where
postulate
Unit : Set
IO : Set → Set
foo : ((A B : Set) → Unit) → IO Unit
bar : (A B : Set) → Unit
{-# BUILTIN IO IO #-}
{-# COMPILED_TYPE IO IO #-}
{-# COMPILED_TYPE Unit () #-}
{-# COMPILED bar undefined #-}
main : IO Unit
main = foo bar
|
------------------------------------------------------------------------------
-- Testing nested axioms
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPT... |
-- Andreas, 2016-11-02, issue #2285 raised by effectfully, found by dnkndnts
-- {-# OPTIONS -v tc.data.fits:15 #-}
-- {-# OPTIONS -v tc.conv.sort:30 #-}
-- {-# OPTIONS -v tc.meta.assign:50 #-}
-- {-# OPTIONS -v tc.meta.new:50 #-}
-- {-# OPTIONS -v tc:10 #-}
-- {-# OPTIONS -v tc.data:100 #-}
mutual
Type = _
data ... |
-- Andreas, 2019-03-18, AIM XXIX, performance regression in 2.5.4
-- The following was quick in 2.5.3
postulate
Bool : Set
Foo : Bool → Bool → Bool → Bool → Bool → Bool → Bool → Bool → Bool → Set
data FooRel
: (x1 x1' : Bool)
(x2 x2' : Bool)
(x3 x3' : Bool)
(x4 x4' : Bool)
(x5 x5' : Bool)
(x... |
{-# OPTIONS --universe-polymorphism #-}
module Categories.Monoidal.Symmetric where
open import Level
open import Categories.Category
open import Categories.Monoidal
open import Categories.Monoidal.Braided
open import Categories.Monoidal.Helpers
open import Categories.Monoidal.Braided.Helpers
open import Categories.Na... |
open import Common.Prelude
open import Common.Reflect
id : {A : Set} → A → A
id x = x
idTerm : Term
idTerm = lam visible (def (quote id) (arg₁ ∷ arg₂ ∷ []))
where
arg₁ = arg (arginfo hidden relevant) (def (quote Nat) [])
arg₂ = arg (arginfo visible relevant) (var 0 [])
-- Should fail since idTerm "λ z → i... |
-- Andreas, 2022-03-07, issue #5809 reported by jamestmartin
-- Regression in Agda 2.6.1.
-- Not reducing irrelevant projections lead to non-inferable elim-terms
-- and consequently to internal errors.
--
-- The fix is to treat irrelevant projections as just functions,
-- retaining their parameters, so that they remain... |
module PatternSynonymParameterisedModule where
data ℕ : Set where
zero : ℕ
suc : ℕ -> ℕ
module M (A : Set) where
pattern sss x = suc (suc (suc x))
open M ℕ
na : ℕ
na = sss 3
|
{- 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.Types.LedgerInfoWit... |
{-# OPTIONS --cubical-compatible --safe #-}
open import Agda.Primitive as Prim public
using (Level; _⊔_; Setω)
renaming (lzero to zero; lsuc to suc)
open import Agda.Builtin.Sigma public
renaming (fst to proj₁; snd to proj₂)
hiding (module Σ)
infixr 2 _×_
variable
a b c p q r : Level
A B C : Set a
_... |
{-# OPTIONS --cubical #-}
module propositional-equality where
open import Cubical.Foundations.Prelude
open import Agda.Primitive
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Some properties of reflexive transitive closures.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Construct.Closure.ReflexiveTr... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
{-
Various lemmas that will be used in cohomology.DisjointlyPointedSet.
Many of them, for example the choice lemma about coproducts, should be
put into core/.
-}
module homotopy.DisjointlyPointedSet where
module _ {i} where
is-separable : (X : Ptd i) → Typ... |
module Haskell.Prim.List where
open import Agda.Builtin.List public
open import Agda.Builtin.Nat
open import Haskell.Prim
open import Haskell.Prim.Tuple
open import Haskell.Prim.Bool
open import Haskell.Prim.Int
--------------------------------------------------
-- List
map : (a → b) → List a → List b
map f [] ... |
module Type.Properties.Homotopy.Proofs where
import Data.Tuple as Tuple
open import Functional
open import Function.Axioms
open import Logic
open import Logic.Classical
open import Logic.Predicate
open import Logic.Propositional
import Lvl
open import Numeral.Natural
open import Type
open import Type.Depende... |
--
-- Created by Dependently-Typed Lambda Calculus on 2019-05-15
-- records
-- Author: ice10
--
{-# OPTIONS --without-K --safe #-}
record List (A : Set) : Set where
coinductive
field
head : A
tail : List A
open List
-- | Bisimulation as equality
record _==_ (x : List A) (y : List A) : Set where
coinduc... |
-- This module introduces implicit arguments.
module Implicit where
-- In Agda you can omit things that the type checker can figure out for itself.
-- This is a crucial feature in a monomorphic language, since you would
-- otherwise be overwhelmed by type arguments.
-- Let's revisit the identity function from 'Intr... |
------------------------------------------------------------------------------
-- FOTC looping (error) combinator
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
module Categories.Functor.Hom.Properties {o ℓ e} (C : Category o ℓ e) where
open import Categories.Functor.Hom.Properties.Covariant C public
open import Categories.Functor.Hom.Properties.Contra C public
|
{-# OPTIONS --safe #-}
module Cubical.Data.FinData.DepFinVec where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat using (ℕ; zero; suc; _+_; _·_; +-assoc)
open import Cubical.Data.FinData.Base
open import Cubical.Data.FinData.Properties
private
variable
ℓ ℓ' : Level
{-
WARNING : If so... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.HSpace renaming (HSpaceStructure to HSS)
open import homotopy.WedgeExtension
module homotopy.Pi2HSusp where
module Pi2HSusp {i} {X : Ptd i}
{{_ : has-level 1 (de⊙ X)}}
{{_ : is-connected 0 (de⊙ X)}}
(H-X : HSS X) where
{- TODO thi... |
module Ex2 where
----------------------------------------------------------------------------
-- EXERCISE 2 -- STRUCTURE WITH VECTORS
--
-- VALUE: 15%
-- DEADLINE: 5pm, Friday 23 October (week 5)
--
-- DON'T SUBMIT, COMMIT!
--
-- The purpose of this exercise is to introduce you to some useful
-- mathematical stru... |
module Data.Vec.Membership where
open import Data.Vec as Vec
open import Data.Vec.Any
open import Data.Vec.Any.Membership.Propositional
open import Data.Product as Prod hiding (map)
open import Function using (_∘_; id)
find : ∀ {a p}{A : Set a}{P : A → Set p}{n}{xs : Vec A n} →
Any P xs → ∃ λ x → x ∈ xs × P x
-- fi... |
-- Andreas, 2022-03-02, issue #5784, reported by Trebor-Huang
-- Test case by Ulf Norell
-- primEraseEquality needs to normalized the sides of the equation,
-- not just reduce them.
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Erase
data Wrap : Set where
wrap : N... |
{-# OPTIONS --without-K --exact-split #-}
module group-completion where
import 15-groups
open 15-groups public
|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.WithFamilies where
-- Category With Families (as model of dependent type theory)
-- see https://ncatlab.org/nlab/show/categorical+model+of+dependent+types#categories_with_families
-- for more details.
open import Level
open import Relation.Binary.Propositi... |
------------------------------------------------------------------------
-- Some properties about integers
------------------------------------------------------------------------
module Data.Integer.Properties where
open import Algebra
import Algebra.Morphism as Morphism
open import Data.Empty
open import Data.Funct... |
{-# OPTIONS --cubical --no-import-sorts --safe --postfix-projections #-}
module Cubical.Data.FinSet.Binary.Large where
open import Cubical.Functions.Embedding
open import Cubical.Functions.Involution
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorp... |
module Avionics.SafetyEnvelopes.Properties where
open import Data.Bool using (Bool; true; false; _∧_; T)
open import Data.Empty using (⊥; ⊥-elim)
open import Data.List as List using (List; []; _∷_; any)
open import Data.List.Relation.Unary.Any as Any using (Any; here; there; satisfied)
open import Data.Maybe using (Ma... |
postulate
_+_ : Set₁ → Set₁ → Set₁
_+ : Set₁ → Set₁ → Set₁
Foo : Set₁ → Set₁
Foo = _+ Set
|
{-# OPTIONS --safe --erased-cubical #-}
module Erased-cubical.Erased where
open import Agda.Builtin.Cubical.Glue
open import Agda.Builtin.Cubical.Path
open import Agda.Primitive
open import Agda.Primitive.Cubical
-- Glue can be used in erased contexts.
@0 _ : SSet (lsuc lzero)
_ =
(φ : I) (A : Set) (B : Partial φ... |
module Structure.Setoid.Size.Proofs where
open import Data
open import Data.Proofs
import Data.Either as Either
import Data.Either.Proofs as Either
import Lvl
open import Functional
open import Function.Proofs
open import Function.Inverseₗ
open import Function.Inverse
open import Function.Iterati... |
------------------------------------------------------------------------------
-- Testing the conjectures inside a @where@ clause
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univers... |
-- Andreas, 2017-07-28, issue #883
-- Was fixed by making rewrite not go through abstract syntax.
open import Agda.Builtin.Equality
test : (A : Set) → (a : A) → A
test A a rewrite refl {x = a} = a
-- WAS:
-- Setω !=< Level of type Setω
-- when checking that the type
-- (A : Set) (a w : A) →
-- _≡_ {_6 A w} {_A_9 A w... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The Colist type and some operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Colist where
open import Level using ... |
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- The syntax of function types (Fig. 1a).
------------------------------------------------------------------------
module Parametric.Syntax.Type where
open import Base.Data.DependentList
-- This is a module in the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.