text stringlengths 4 690k |
|---|
module Structure.Operator.Proofs.Util where
import Lvl
open import Data
open import Data.Tuple
open import Functional hiding (id)
open import Function.Equals
import Function.Names as Names
import Lang.Vars.Structure.Operator
open Lang.Vars.Structure.Operator.Select
open import Logic.IntroInstances
ope... |
-- {-# OPTIONS -v tc.size:100 #-}
module SizedTypesMergeSort where
open import Common.Size
open import Common.Prelude using (Bool; true; false; if_then_else_)
open import Common.Product
module Old where
-- sized lists
data List (A : Set) : {_ : Size} -> Set where
[] : {size : Size} -> List A {↑ size}
... |
------------------------------------------------------------------------
-- A formalisation of one variant of the language χ, along with a
-- number of properties
--
-- Nils Anders Danielsson
------------------------------------------------------------------------
-- A description of the language χ, as well as some of... |
open import MLib.Algebra.PropertyCode
open import MLib.Algebra.PropertyCode.Structures
module MLib.Matrix.SemiTensor {c ℓ} (struct : Struct bimonoidCode c ℓ) where
open import MLib.Matrix.SemiTensor.Core struct using (_⋉_) public
open import MLib.Matrix.SemiTensor.GeneralizesMul struct public
|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Instance.Monoidals where
open import Level
open import Categories.Category
open import Categories.Category.Helper
open import Categories.Category.Monoidal
open import Categories.Functor.Monoidal
open import Categories.Functor.Monoidal.Properties
open impo... |
module Numeral.FixedPositional where
{-
FixedPositional : ℕ → Type
FixedPositional(b) = List(𝕟(b))
open import Numeral.Natural.Oper
private variable b : ℕ
to-ℕ : FixedPositional(b) → ℕ
to-ℕ {_} ∅ = 𝟎
to-ℕ {b} (n ⊰ l) = 𝕟-to-ℕ (n) + (b ⋅ to-ℕ (l))
-}
{-
module Test2 where
import Lvl
open import D... |
module Logic.Predicate.Theorems where
import Lvl
open import Functional
open import Logic
open import Logic.Propositional
open import Logic.Propositional.Theorems
open import Logic.Predicate
open import Syntax.Type
open import Type
open import Type.Properties.Inhabited using (◊ ; [◊]-existence)
-----------------... |
{-# OPTIONS --sized-types #-}
open import Relation.Binary.Core
module Quicksort.Correctness.Permutation {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import Bound.Total A
open import Bound.Total.Order _≤_
open import Data.List
open import Data.Product
open import Data... |
{-# OPTIONS --without-K --safe #-}
-- An inhabited Indiscrete category is a -2-Category
module Categories.Minus2-Category.Construction.Indiscrete where
open import Level
open import Data.Unit using (tt)
open import Data.Product using (_,_)
open import Relation.Binary.PropositionalEquality using (refl)
open import Ca... |
-- Builtin things aren't allowed inside parameterised modules. It's not clear
-- what that would mean.
module BuiltinInParameterisedModule where
module A (X : Set) where
{-# BUILTIN INTEGER X #-}
|
{-# OPTIONS --copatterns #-}
module DataRecordCoinductive where
data ⊥ : Set where
record ⊤ : Set where
constructor tt
mutual
data Stream (A : Set) : Set where
cons : Cons A → Stream A
-- since Cons is coinductive, we are creating streams
record Cons (A : Set) : Set where
coinductive
construct... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.UnivariateList.Polyn-nPoly where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
open import Cubical.Data.Vec
open import Cubical.Da... |
------------------------------------------------------------------------------
-- The Booleans
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --wi... |
module Let where
f
: {A : Set}
→ A
→ A
f x
= let
y = x
z = x
in y
|
module Sections where
open import Haskell.Prelude
test₁ : Nat → Nat
test₁ = 5 +_
test₂ : Nat → Nat
test₂ = _+ 5
test₃ : Nat → Nat
test₃ = _+_ 5
test₄ : Nat → Nat
test₄ = λ x → x + 5
test₅ : Nat → Nat
test₅ = λ x → 5 + x -- Agda eta-contracts this before we get to see it
{-# COMPILE AGDA2HS test₁ #-}
{-# COMPILE... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Equational.Theory
module Fragment.Equational.Coproduct (Θ : Theory) where
open import Fragment.Equational.Model Θ
open import Fragment.Algebra.Homomorphism (Σ Θ)
open import Level using (Level; Setω)
private
variable
a b c ℓ₁ ℓ₂ ℓ₃ : Level... |
-- Parametrised maps of families and their coalgebraic properties
module SOAS.Coalgebraic.Map {T : Set} where
open import SOAS.Common
open import SOAS.Context
open import SOAS.Variable
open import SOAS.Families.Core {T}
open import SOAS.Abstract.Hom {T}
import SOAS.Abstract.Box {T} as □ ; open □.Sorted
import SOAS.A... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Strings: builtin type and basic operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.String.Base where
open import Level using (zer... |
{-# OPTIONS --cubical --safe --postfix-projections #-}
module Data.Array where
open import Data.Binary
open import Prelude
private
variable
ns : 𝔹
record 2× {a} (A : Type a) : Type a where
eta-equality
constructor _⊛_
field
pr₁ pr₂ : A
open 2× public
infixr 5 _∷₁_ _∷₂_ _∷_
mutual
record Array0ᵇ... |
{- 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.Consensus.ConsensusTypes.VoteData as VoteData
open ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Instantiates the ring solver, using the natural numbers as the
-- coefficient "ring"
------------------------------------------------------------------------
open import Algebra
import Algebra.Operations
open im... |
------------------------------------------------------------------------
-- Definitions of combinatorial functions
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --exact-split #-}
module Math.Combinatorics.Function where
-- agda-stdlib
import Algebra.Operation... |
{-# OPTIONS --without-K --safe #-}
module Source.Size.Substitution.Canonical where
open import Source.Size
open import Util.Prelude
infix 0 Sub⊢
infixl 5 _>>_
data Sub (Δ : Ctx) : (Ω : Ctx) → Set where
[] : Sub Δ []
Snoc : (σ : Sub Δ Ω) (n : Size Δ) → Sub Δ (Ω ∙ m)
variable
σ τ σ′ τ′ ι ι′ : Sub Δ Ω
subV... |
module Algebra.Module.Normed where
open import Assume using (assume)
open import Algebra.Bundles using (CommutativeRing)
open import Algebra.Module.Bundles using (Module)
open import Level using (_⊔_; suc)
open import Relation.Nullary using (¬_)
open import Relation.Binary using (Rel)
open import Function.Metric using... |
{-# OPTIONS --cubical --no-exact-split --safe #-}
module Cubical.Data.NatPlusOne.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Data.Nat
open import Cubical.Data.NatPlusOne.Base
1+Path : ℕ ≡ ℕ₊₁
1+Path = isoToPath (iso 1+_ -1+_ (λ _ → refl) (λ ... |
module Common where
open import Level using (Level)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; sym; refl)
open import Relation.Nullary.Decidable using (False; toWitnessFalse)
open import Data.Nat using (ℕ)
open import Data.Fin using (Fin; _≟_)
private
variable
n : ℕ
l : Level
A :... |
module BTA3 where
open import Data.Nat
open import Data.Bool
open import Data.List
-- Binding times
data BT : Set where
S : BT
D : BT
-- defining a data type [BT],where two members are
-- [S] standing for "static" and [D] standing for dynamic.
-- ``subsumption'' binding times; static can be treated as dynamic,
... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Module where
open import Cubical.Algebra.Module.Base public
|
module RMonads.CatofRMonads where
open import Categories
open import Functors
open import RMonads
open import RMonads.RMonadMorphs
CatofRMonads : ∀{a b c d}{C : Cat {a}{b}}{D : Cat {c}{d}}(J : Fun C D) → Cat
CatofRMonads J = record
{ Obj = RMonad J
; Hom = RMonadMorph
... |
-- Andreas, 2014-10-09, issue reported by jesper.cockx
open import Common.Product
pattern foo x = x , x
-- Should complain about non-linearity.
test : {A : Set} → A × A → A
test (foo x) = x
|
{-# OPTIONS --safe #-}
module Cubical.HITs.FreeComMonoids.Properties where
open import Cubical.Foundations.Everything hiding (assoc; ⟨_⟩)
open import Cubical.Data.Nat hiding (_·_ ; _^_)
open import Cubical.HITs.FreeComMonoids.Base as FCM
open import Cubical.HITs.AssocList as AL
private variable
ℓ : Level
A : T... |
module CoInf where
open import Coinduction
-- Check that ∞ can be used as an "expression".
test : Set → Set
test = ∞
|
module Structure.Operator.Monoid.Proofs where
import Lvl
open import Logic
open import Logic.Propositional
open import Logic.Predicate
open import Structure.Setoid
open import Structure.Operator.Monoid
open import Structure.Operator.Properties
open import Structure.Operator.Proofs
open import Type
|
{-# OPTIONS --without-K --safe #-}
module Categories.Bicategory.Extras where
open import Data.Product using (_,_)
open import Categories.Bicategory using (Bicategory)
open import Categories.Functor using (Functor)
open import Categories.Functor.Bifunctor using (appʳ; appˡ)
open import Categories.Functor.Bifunctor.Pr... |
open import Relation.Binary.PropositionalEquality using ( refl )
open import Web.Semantic.DL.Category.Object using ( Object )
open import Web.Semantic.DL.Category.Morphism using ( _≣_ )
open import Web.Semantic.DL.Category.Composition using ( _∙_ )
open import Web.Semantic.DL.Category.Tensor using ( _⊗_ ; _⟨⊗⟩_ )
open ... |
module Tactic.Reflection.Substitute where
open import Prelude hiding (abs)
open import Builtin.Reflection
open import Tactic.Reflection.DeBruijn
patternArgsVars : List (Arg Pattern) → Nat
patternVars : Pattern → Nat
patternVars (con _ ps) = patternArgsVars ps
patternVars dot = 1
patternVars (var _) = 1
patternVars ... |
module _ where
{-# BUILTIN INTERVAL I #-}
|
import Oscar.Class.Reflexivity.Function
import Oscar.Class.Transextensionality.Proposequality -- FIXME why not use the instance here?
open import Oscar.Class
open import Oscar.Class.Category
open import Oscar.Class.HasEquivalence
open import Oscar.Class.IsCategory
open import Oscar.Class.IsPrecategory
open import Osca... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.NType2
open import lib.Equivalences2
open import lib.NConnected
open import lib.types.Nat
open import lib.types.Pi
open import lib.types.Sigma
open import lib.types.TLevel
open import lib.types.Truncation
open import lib.types.Group
open import lib.typ... |
module Issue1362 where
open import Common.Prelude
open import Common.Equality
open import Common.Reflection
module M₁ (A₁ : Set) where
data D (B : Set) : Set where
type₁ : TC Type
type₁ = getType (quote D)
module M₂ (A₂ : Set) where
open M₁ A₂
type₂ : TC Type
type₂ = getType (quote D)
open M₁ Nat
op... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.Exactness
open import cohomology.FunctionOver
module cohomology.ProductRepr where
{- Given the following commutative diagram of homomorphisms,
H₁ i₁ i₂ H₂
↘ ↙
id ↓ G ↓ id
↙ ↘
H₁ j₁ j₂ H₂
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The unit type and the total relation on unit
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Agda.Builtin.Equality using (_≡_)
module Dat... |
module _ where
import Imports.Issue1913-M as M
module _ where
import Imports.Issue1913-I as I
accepted₁ : M.D
accepted₁ = I.x
! : ⦃ _ : M.D ⦄ → M.D
! ⦃ x ⦄ = x
accepted₂ : M.D
accepted₂ = !
-- rejected : M.D
-- rejected = I.x
|
{-# OPTIONS --without-K #-}
open import Types
open import Functions
open import Paths
open import HLevel
open import Equivalences
module FiberEquivalences {i j k} {A : Set i} {P : A → Set k} {Q : A → Set j}
(f : (x : A) → (P x → Q x)) where
-- We want to prove that if [f] induces an equivalence on the total spaces... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Syntax definitions.
------------------------------------------------------------------------------
open import Data.Nat using ( ℕ )
module Data.PropFormula.Syntax ( n : ℕ ) where
----------------------------------... |
{-# OPTIONS --safe #-} -- implies --no-sized-types
module Issue3517.M where
open import Issue3517.S
f : (i : Size) (j : Size< i) → Size< j → Size< i
f i j k = k
|
module Models where
open import Data.Nat
open import Terms
-- The (complete) Herbrand universe for Σ
U' : {n m : ℕ} → (Signature n m) → Set
U' Σ = GTerm Σ
-- The (complete) μ-Herbrand base for Σ
B'μ : {n m : ℕ} → (Signature n m) → Set
B'μ Σ = GAtom Σ μ
B'ν : {n m : ℕ} → (Signature n m) → Set
B'ν Σ = GAtom Σ ν
o... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Primitive IO: simple bindings to Haskell types and functions
------------------------------------------------------------------------
module IO.Primitive where
open import Data.Char
open import Data.String
open... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Dependent product combinators for propositional equality
-- preserving functions
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Product.F... |
-- Andreas, 2018-07-22, issue #3136
-- WAS: Internal error when printing termination errors
{-# OPTIONS --postfix-projections #-}
module Issue3136 (A : Set) where
-- postulate A : Set
postulate
any : {X : Set} → X
x : A
P : A → Set
record C : Set where
field
a : A
b : P a
c : C
c = λ where
.C.a →... |
{-# OPTIONS --with-K #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Nat
single : {m n : Nat} → suc m ≡ suc n → n ≡ m
single p with refl ← p = refl
double : {m n p : Nat} → suc m ≡ n → suc n ≡ 2 + p → m ≡ p
double p q with refl ← p | refl ← q = refl
_∋_ : (A : Set) → A → A
A ∋ a = a
-- The second eq... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Divisibility
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Nat.Divisibility where
open import Algebra
open import Data.Nat.Base
open im... |
import Relation.Unary.Monotone as Mono
open import Data.List.Prefix
open import Data.List as List
module Category.Monad.Monotone.Heap.HList
(T : Set)
(V : T → List T → Set)⦃ wkV : ∀ {a} → Mono.Monotone ⊑-preorder (V a) ⦄ where
open import Level
open import Data.List.All as All
open import Data.List.All.Propertie... |
import Relation.Binary.PropositionalEquality
module Data.Bin.Multiplication where
private module PropEq = Relation.Binary.PropositionalEquality
module ℕ-lemmas where
open import Data.Nat
open import Data.Nat.Properties
open import Relation.Binary.PropositionalEquality
open SemiringSolver
*-2-... |
{-# OPTIONS --without-K #-}
module Base where
open import Types public
open import Functions public
open import Paths public
open import HLevel public
open import Equivalences public
open import Univalence public
open import Funext public
open import EquivalenceLemmas public
open import HLevelBis public
open import F... |
-- Andreas, 2013-11-07
-- Need to drop parameters not only from constructors found by
-- instance search, but also from projection(like) functions.
module Issue670b where
open import Common.Prelude
open import Common.Equality
record Wrap (A : Set) : Set where
constructor wrap
field
unwrap : A
open Wrap
modul... |
------------------------------------------------------------------------------
-- Alter: An unguarded co-recursive function
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-poly... |
{-# OPTIONS --allow-unsolved-metas #-}
-- Andreas, 2014-11-25, issue found by Christopher Jenkins
-- {-# OPTIONS -v tc.with:40 #-}
open import Common.Prelude
open import Common.Equality
infixr 5 _∷_
data Vec (A : Set) : Nat → Set where
[] : Vec A zero
_∷_ : {n : Nat} (x : A) (xs : Vec A n) → Vec A (suc n)
+-su... |
{-
Basic properties about Σ-types
- Characterization of equality in Σ-types using transport ([pathSigma≡sigmaPath])
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.Data.Sigma.Properties where
open import Cubical.Data.Sigma.Base
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open im... |
{- 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
-}
{-# OPTIONS --allow-unsolved-metas #-}
open import Optics.All
open impor... |
{-# OPTIONS --cubical-compatible #-}
module Common.Integer where
open import Agda.Builtin.Int public renaming (Int to Integer)
|
-- Andreas, 2012-03-30
module Issue593 where
import Common.Level
open import Common.Equality
open import Common.Irrelevance
record Unit : Set where
constructor unit
bla6 : (F : Unit -> Set) ->
let X : Unit -> Unit -> Set
X = _
in (z : Unit) -> X z z ≡ F z
bla6 F z = refl
-- non-linearity for singleton ty... |
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇.
-- Hilbert-style formalisation of closed syntax.
-- Sequences of terms.
module BasicIS4.Syntax.ClosedHilbertSequential where
open import BasicIS4.Syntax.Common public
-- Derivations.
infix 3 ⊦⊢_
data ⊦⊢_ : Cx Ty → Set where
nil : ⊦⊢ ∅
mp : ∀ {Ξ A... |
{-# OPTIONS --safe #-} --without-K #-}
import Data.Product as Product
import Data.Product.Properties as Productₚ
import Data.Nat as Nat
import Data.Vec as Vec
import Data.Vec.Properties as Vecₚ
import Data.Fin as Fin
import Data.Vec.Relation.Unary.All as All
open Nat using (ℕ; zero; suc)
open Vec using (Vec; []; _∷_)... |
{-# OPTIONS --without-K --safe #-}
module Categories.Functor.Equivalence where
-- A 'strict' equality relation for Functors.
open import Level
open import Data.Product using (Σ; curry) renaming (_,_ to _,,_)
open import Relation.Binary.PropositionalEquality as ≡
open import Relation.Binary using (IsEquivalence)
open ... |
------------------------------------------------------------------------------
-- Common properties for the alternating bit protocol
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-univ... |
module Text.Greek.SBLGNT.John where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΚΑΤΑ-ΙΩΑΝΝΗΝ : List (Word)
ΚΑΤΑ-ΙΩΑΝΝΗΝ =
word (Ἐ ∷ ν ∷ []) "John.1.1"
∷ word (ἀ ∷ ρ ∷ χ ∷ ῇ ∷ []) "John.1.1"
∷ word (ἦ ∷ ν ∷ []) "John.1.1"
∷ word (ὁ ∷ ... |
{-# OPTIONS --without-K #-}
open import Data.Bits.Search
open import Data.Nat.NP
open import Function.NP
import Relation.Binary.PropositionalEquality.NP as ≡
open ≡
module Data.Bits.Sum where
open SimpleSearch _+_ using (module Comm; module SearchInterchange; module SearchUnit; module Bij)
open SimpleSearch ... |
module x05isomorphism where
{-
------------------------------------------------------------------------------
Isomorphism: Isomorphism and Embedding
isomorphism
- way of asserting two types are equal
embedding
- way of asserting that one type is smaller than another
apply isomorphisms in next chapter to show 'produ... |
open import Common.Prelude
open import Common.Reflection
module TermSplicingOutOfScope where
f : Set → Set → Set → Set
f x y z = unquote (give (var 3 []))
|
{- 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 Optics.All
open import LibraBFT.Prelude
open import LibraBFT... |
open import Agda.Builtin.Nat
record _×_ (A B : Set) : Set where
constructor _,_
field fst : A
snd : B
open _×_
Δ : ∀ {A} → A → A × A
Δ x = x , x
foo : Nat → Nat
foo n = let x , y = Δ n in x + y
bar : Nat → Nat
bar n = let _!_ : Nat → Nat → Nat
x ! y = 2 * x + y
in n ! n
|
open import Data.Empty
open import Data.Maybe
open import Data.Product
open import Data.Sum
open import AEff
open import EffectAnnotations
open import Types
open import Relation.Binary.PropositionalEquality hiding ([_])
open import Relation.Nullary
open import Relation.Nullary.Negation
module AwaitingComputations wh... |
{-# OPTIONS --without-K --safe #-}
module Dodo.Binary.Immediate where
-- Stdlib imports
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; _≢_; refl; subst) renaming (sym to ≡-sym)
open import Level using (Level; _⊔_)
open import Function using (_∘_; flip)
open import Data.Empty using (⊥-elim)
ope... |
module Signature where
open import Data.Product renaming (Σ to ⨿)
open import Function
open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst)
open import Function
open import Data.Empty
open import Data.Unit hiding (_≤_)
open import Data.Product as Prod renaming (Σ to ⨿)
open import Data.Nat as Nat... |
module Lattice where
open import Prelude
open import PartialOrder as PO
open import SemiLattice as SL
import Chain
open POrder using (Dual)
record Lattice (A : Set) : Set1 where
field
sl : SemiLattice A
_⊔_ : A -> A -> A
prf : IsSemiLattice (Dual (SemiLat.po sl)) _⊔_
module Lat {A : Set}(L : Lattice ... |
open import Agda.Builtin.Nat
record R : Set₁ where
field f : Nat
open R ⦃ ... ⦄
foo : Nat → R
foo n .f = {!n!} -- C-c C-c makes clause disappear
|
{-# OPTIONS --safe #-}
module Cubical.HITs.Susp.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Path
open import Cubical.Foundations.Pointed
open import Cub... |
------------------------------------------------------------------------------
-- Testing a non-admissible property from the HALO paper
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-u... |
-- Andreas, 2011-09-13, shrunk from Data.Colist
-- {-# OPTIONS -v tc.lhs.unify:15 #-}
{-# OPTIONS --universe-polymorphism #-}
module TransColist where
open import Common.Level
open import Common.Coinduction
-- From Relation.Binary.Core:
------------------------------------------------------------------------
-- Bin... |
import Parametric.Syntax.Type as Type
module Parametric.Syntax.MType where
module Structure (Base : Type.Structure) where
open Type.Structure Base
mutual
-- Derived from CBPV
data ValType : Set where
U : (c : CompType) → ValType
B : (ι : Base) → ValType
vUnit : ValType
_v×_ : (τ₁... |
module Delay where
open import OscarPrelude
mutual
data Delay (i : Size) (A : Set) : Set where
now : A → Delay i A
later : ∞Delay i A → Delay i A
record ∞Delay (i : Size) (A : Set) : Set where
coinductive
field
force : {j : Size< i} → Delay j A
open ∞Delay public
privat... |
{-# OPTIONS --without-K #-}
{- This module serves to develop some basic theory about pointed types.
After defining the usual notions of pointed types, pointed equivalences,
and loop spaces, we derive a version of univalence for pointed equivalences
and observe that univalence between identical types is a poin... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Fancy display functions for Vec-based tables
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module Text.Tabular.Vec where
open import Data.List.Base... |
open import Agda.Builtin.Equality
postulate
A : Set
mutual
F : ((@♭ _ : A) -> A) → A → A
F f = _
testF : {f : A -> A} → F f ≡ f
testF = refl
|
-- Concrete definition of variables, context maps, and map operations
module SOAS.Variable {T : Set} where
open import SOAS.Common
open import SOAS.Context
open import SOAS.Sorting
open import SOAS.Families.Core {T}
-- Sorted family of variables, as typed, scoped de Bruijn indices
data ℐ : Familyₛ where
new : {α ... |
{-# OPTIONS --prop --without-K --rewriting #-}
open import Calf.CostMonoid
-- Upper bound on the cost of a computation.
module Calf.Types.Bounded (costMonoid : CostMonoid) where
open CostMonoid costMonoid
open import Calf.Prelude
open import Calf.Metalanguage
open import Calf.PhaseDistinction
open import Calf.Type... |
module Allto where
f : Set → Set
f = {!!}
g : Set → Set
g x = f {!!}
|
module FFI.Data.Maybe where
{-# FOREIGN GHC import qualified Data.Maybe #-}
data Maybe (A : Set) : Set where
nothing : Maybe A
just : A → Maybe A
{-# COMPILE GHC Maybe = data Data.Maybe.Maybe (Data.Maybe.Nothing|Data.Maybe.Just) #-}
|
-- 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.
foo = Set
module Issue1077 where
bar = Set
-- WAS: accepted, creating modules Issue1077 and Issue1077.Issue1077
-- with ... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Matrix where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Structure
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
open import ... |
open import Common.IO
open import Common.Nat
open import Common.String
open import Common.Unit
private
n : Nat
n = 7
{-# COMPILE OCaml n as val n : Z.t #-}
main : IO Unit
main = do
putStrLn (natToString n)
|
-- Minimal implicational logic, PHOAS approach, final encoding
module Pf.ArrMp where
-- Types
infixr 0 _=>_
data Ty : Set where
UNIT : Ty
_=>_ : Ty -> Ty -> Ty
-- Context and truth judgement
Cx : Set1
Cx = Ty -> Set
isTrue : Ty -> Cx -> Set
isTrue a tc = tc a
-- Terms
TmRepr : Set1
TmRepr = C... |
{-# OPTIONS --prop #-}
postulate
P : Prop
p : P
-- C-c C-n should print `p` as `_`
record Box (X : Prop) : Set where
constructor box
field unbox : X
open Box
test : P → Box P
test = λ x → box x
-- C-c C-n should print `test` as `λ x → box _`
|
-- Andreas, 2017-01-21, issue #2424
-- {-# OPTIONS -v tc.cover:40 #-}
-- {-# OPTIONS -v interaction.case:40 #-}
postulate Nat : Set
data List : Set₁ where
_∷_ : (x : Set) (xs : List) → List
test : (As : List) (x : Nat) → Set
test As x = {!As!} -- C-c C-c
-- Expected output:
-- test (x₁ ∷ As) 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
open import LibraBFT.Concrete.Records
open im... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
module Categories.Object.Coproducts {o ℓ e} (C : Category o ℓ e) where
open Category C
open import Level
import Categories.Object.Initial as Initial
import Categories.Object.BinaryCoproducts as BinaryCoproducts
open Initial C
open BinaryCopro... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Instance.FinCatShapes where
open import Data.Nat using (ℕ)
open import Data.Fin
open import Relation.Binary using (IsEquivalence)
open import Relation.Binary.PropositionalEquality as ≡ using (refl; _≡_; module ≡-Reasoning)
open import Categories.Category... |
(1 ∷ 4 ∷ []) ∷ (2 ∷ 5 ∷ []) ∷ (3 ∷ 6 ∷ []) ∷ []
|
{-# OPTIONS --without-K #-}
module sets.finite.core where
open import sum
open import function.isomorphism
open import sets.nat
open import sets.fin
IsOfSize : ∀ {i} → Set i → ℕ → Set i
IsOfSize A n = A ≅ Fin n
IsFinite : ∀ {i} → Set i → Set i
IsFinite A = Σ ℕ (IsOfSize A)
mk-is-finite : ∀ {i n}{A : Set i}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.