text stringlengths 4 690k |
|---|
open import Common.Reflection
open import Common.Prelude
open import Common.Equality
open import Agda.Builtin.Sigma
pattern `Nat = def (quote Nat) []
pattern _`→_ a b = pi (vArg a) (abs "_" b)
pattern `Set = sort (lit 0)
pattern `⊥ = def (quote ⊥) []
pattern `zero = con (quote zero) []
pattern `suc n = co... |
{- 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.ImplShared.Base.Types
open import LibraBFT.Abstra... |
module _ where
open import Common.Prelude hiding (_>>=_)
open import Common.Reflection
open import Common.Equality
infix 0 case_of_
case_of_ : ∀ {a b} {A : Set a} {B : Set b} → A → (A → B) → B
case x of f = f x
blockOnFresh : TC ⊤
blockOnFresh =
checkType unknown unknown >>= λ
{ (meta m _) → blockOnMeta m
; _... |
-- There was a bug with the open M es syntax.
module Issue31 where
record M : Set1 where
field
A : Set
module MOps (m : M) where
open M m public
postulate m : M
open MOps m hiding (A)
open MOps m using (A)
postulate foo : A -> Set
module AnotherBug where
postulate Z : Set
module A (X : Set) where
... |
module Control.Monad.Reader where
open import Prelude
open import Control.Monad.Zero
open import Control.Monad.Identity
open import Control.Monad.Transformer
record ReaderT {a} (R : Set a) (M : Set a → Set a) (A : Set a) : Set a where
no-eta-equality
constructor readerT
field runReaderT : R → M A
open ReaderT... |
module BasicT.Metatheory.GentzenNormalForm-Unknown where
open import BasicT.Syntax.GentzenNormalForm public
-- Forcing. (In a particular model?)
infix 3 _⊩_
_⊩_ : Cx Ty → Ty → Set
Γ ⊩ α P = Γ ⊢ⁿᶠ α P
Γ ⊩ A ▻ B = Γ ⊢ⁿᵉ A ▻ B ⊎ ∀ {Γ′} → Γ ⊆ Γ′ → Γ′ ⊩ A → Γ′ ⊩ B
Γ ⊩ A ∧ B = Γ ⊢ⁿᵉ A ∧ B ⊎ Γ ⊩ A × Γ ⊩ B
Γ ⊩ ⊤ = Γ ... |
module Logics.And where
open import Function
------------------------------------------------------------------------
-- definitions
infixl 5 _∧_
infixl 4 _⇔_
data _∧_ (P Q : Set) : Set where
∧-intro : P → Q → P ∧ Q
_⇔_ : (P Q : Set) → Set
p ⇔ q = (p → q) ∧ (q → p)
----------------------------------------------... |
module NoQualifiedInstances.ParameterizedImport.A (T : Set) where
record I : Set where
postulate instance i : I
|
module Data.Tuple.List{ℓ} where
import Lvl
open import Data using (Unit ; <>)
open import Data.Tuple using (_⨯_ ; _,_)
import Data.List
open Data.List using (List)
open import Type{ℓ}
-- Constructs a tuple from a list
Tuple : List(Type) → Type
Tuple(List.∅) = Unit
Tuple(T List.⊰ List.∅) = T
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Empty.Properties where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Data.Empty.Base
isProp⊥ : isProp ⊥
isProp⊥ ()
isContr⊥→A : ∀ {ℓ} {A : Type ℓ} → isContr (⊥ → A)
fst isContr⊥→A ()
snd isContr... |
{- 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.Impl.Consensus.EpochManagerTypes
import LibraBFT.Im... |
{-# OPTIONS --without-K --safe #-}
module Dodo.Unary.Intersection where
-- Stdlib imports
import Relation.Binary.PropositionalEquality as Eq
open Eq using (refl; _≡_)
open import Level using (Level; _⊔_)
open import Function using (_∘₂_)
open import Data.Product using (_×_; _,_; swap; proj₁; proj₂)
open import Relati... |
{-# OPTIONS --cubical #-}
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
open import Agda.Builtin.Unit
data S : Set where
base : S
foo : ∀ i j k → Partial _ S
foo i j k (i = i0)(k = i1) = base
foo i j k (j = i1) = base
-- Testing that fallthrough patterns get expanded when compi... |
module Relation.Unary.Membership {a} (A : Set a) where
open import Level
open import Data.Product using (_×_; _,_; proj₁; proj₂)
open import Relation.Unary
open import Relation.Binary
infixl 4 _≋_
_≋_ : Rel (Pred A a) _
P ≋ Q = P ⊆′ Q × Q ⊆′ P
⊆-refl : Reflexive (_⊆′_ {a} {A} {a})
⊆-refl {pred} x P = P
≋-refl : Ref... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Sums of binary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Sum.Relation.Binary.LeftOrder where
open import Data.Sum as Sum
... |
module Golden where
open import Basics
open import Vec
open import Ix
open import Cutting
open import Interior
open import Tensor
open RECTANGLE
open INTERIOR RectCut
ind : (n : Nat)(P : Nat -> Set) -> P zero ->
((k : Nat) -> P k -> P (suc k)) -> P n
ind zero P pz ps = pz
ind (suc n) P pz ps = ps n (ind n P ... |
{-# OPTIONS --without-K --safe #-}
module Experiment.Categories.Category.Monoidal.Strict where
|
{-# OPTIONS --rewriting --prop #-}
open import common
open import syntx as N
open import derivability as N2
open import typingrules
open import structuralrules
open import typetheories
open import examples
open import traditional as T
Σ : Signature
Σ = TTSig ΠUEl-TT
{- Maps between expressions -}
T→N : {n : ℕ} {... |
{-# OPTIONS --rewriting --confluence-check #-}
open import Agda.Builtin.List
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
variable
A B : Set
x y z : A
xs ys zs : List A
f : A → B
m n : Nat
cong : (f : A → B) → x ≡ y → f x ≡ f y
cong f refl = refl
... |
module Luau.Var.ToString where
open import Agda.Builtin.String using (String)
open import Luau.Var using (Var)
varToString : Var → String
varToString x = x
|
module Issue739 where
record ⊤ : Set where
constructor tt
record Σ (A : Set) (B : A → Set) : Set where
constructor _,_
field
fst : A
snd : B fst
uncurry : {A : Set} {B : A → Set} →
((x : A) → B x → Set) →
Σ A B → Set
uncurry f (x , y) = f x y
data U : Set₁
El : U → Set
infixl 5 ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Setoids
open import Groups.Definition
open import Sets.EquivalenceRelations
open import Groups.Abelian.Definition
open import Groups.Homomorphisms.Definition
open import Groups.DirectSum.Definition
open import Groups.Iso... |
open import Agda.Primitive
variable
a : Level
postulate
works : Set a → {a : Set} → a
fails : Set a → {a : Set} → {!a!}
module _ (A : Set a) (a : A) where
x : A
x = a
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.ZCohomology.KcompPrelims where
open import Cubical.ZCohomology.Base
open import Cubical.Homotopy.Connected
open import Cubical.HITs.Hopf
open import Cubical.Homotopy.Freudenthal hiding (encode)
open import Cubical.HITs.Sn
open import Cubical.HITs.S1
ope... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Sigma
open import lib.types.Bool
open import lib.types.Int
module lib.types.List where
infixr 60 _::_
data List {i} (A : Type i) : Type i where
nil : List A
_::_ : A → List A → List A
module _ {i} {A : Type i} where
infixr 8... |
-- Andreas, 2016-01-18, Issue1778, reported by mechvel
-- record pattern elimination must preserve hiding information
-- {-# OPTIONS --show-implicit #-}
open import Common.Prelude using (⊤)
open import Common.Equality
open import Common.Product
-- assuming _×_ is a record type (not data type)
module _ (A : Set) (let... |
{-# OPTIONS --without-K --safe #-}
-- Given a predicate on the objects of a Category C, build another category
-- with just those that satisfy a pr
module Categories.Category.Construction.ObjectRestriction where
open import Level
open import Data.Product using (Σ; proj₁)
open import Relation.Unary using (Pred)
open ... |
module Cats.Category.Setoids.Facts.Terminal where
open import Data.Unit using (⊤)
open import Level
open import Cats.Category
open import Cats.Category.Setoids using (Setoids)
module Build {l} {l≈} where
open Category (Setoids l l≈)
One : Obj
One = record
{ Carrier = Lift l ⊤
; _≈_ = λ _ _ → Li... |
module BTA6 where
----------------------------------------------
-- Preliminaries: Imports and List-utilities
----------------------------------------------
open import Data.Nat hiding (_<_)
open import Data.Bool
open import Function using (_∘_)
open import Data.List
open import Relation.Nullary
open import Relation.... |
module Prelude where
id : {A : Set} -> A -> A
id x = x
_·_ : {A B C : Set} -> (B -> C) -> (A -> B) -> (A -> C)
f · g = \ x -> f (g x)
flip : {A B C : Set} -> (A -> B -> C) -> B -> A -> C
flip f x y = f y x
Rel : Set -> Set1
Rel X = X -> X -> Set
data False : Set where
record True : Set where
tt : True
tt = _
! ... |
postulate
@0 A : Set
_ : (@0 B : Set) .(C : Set) → Set
_ = λ B C → ?
|
import Common.Level
open import Common.Equality
record Sigma (A : Set)(B : A -> Set) : Set where
constructor _,_
field
fst : A
snd : B fst
open Sigma
-- projected bound var
fail : (A : Set) (B : A -> Set) ->
let X : A -> Sigma A B
X = _
in (z : Sigma A B) -> X (fst z) ≡ z
fail A B z = refl
|
------------------------------------------------------------------------
-- Another definition of indexed containers
------------------------------------------------------------------------
-- Partly based on "Indexed containers" by Altenkirch, Ghani, Hancock,
-- McBride and Morris, and partly based on "Non-wellfounde... |
import Lvl
-- TODO: Just testing how it goes with creating an axiomatic system
module Geometry.Test (Point : Set(Lvl.𝟎)) where
open import Functional
open import Logic.Propositional{Lvl.𝟎}
open import Logic.Predicate{Lvl.𝟎}{Lvl.𝟎}
open import Relator.Equals{Lvl.𝟎}{Lvl.𝟎}
-- open import Structure.Setoid.Uniquene... |
module Oscar.Data.Permutation where
--open import Data.Permutation public
import Data.Permutation as P
open import Data.Permutation renaming (delete to deleteP; _∘_ to _∘P_; enum to allInj)
open import Oscar.Data.Vec renaming (delete to deleteV; map to mapV)
open import Relation.Binary.PropositionalEquality
open i... |
module Type.Quotient where
open import Logic
open import Relator.Equals
open import Type
open import Lvl
private variable ℓ₁ : Lvl.Level
private variable ℓ₂ : Lvl.Level
data _/_ (T : Type{ℓ₁}) (_≅_ : T → T → Stmt{ℓ₂}) : Type{ℓ₁ Lvl.⊔ ℓ₂} where
[_] : T → (T / (_≅_))
[/]-equiv-to-eq : ∀{x y : T} → (x ≅ y) → ([ x ... |
module Issue292-27 where
postulate A : Set
data D : Set → Set where
d₁ : D A
d₂ : D (A → A)
data P : (B : Set) → B → D B → Set₁ where
p₁ : (x : A) → P A x d₁
p₂ : (f : A → A) → P (A → A) f d₂
Foo : (x : A) → P A x d₁ → Set₁
Foo x (p₁ .x) = Set
-- Cannot decide whether there should be a case for ... |
{-# OPTIONS --cubical --safe #-}
module Algebra.Construct.Free.Semilattice.FromList 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 Data.List
import ... |
------------------------------------------------------------------------
-- Integers
------------------------------------------------------------------------
-- This module contains some basic definitions with few dependencies
-- (in particular, not Groupoid). See Integer for more definitions.
-- The definitions below... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Categories.Limits.RightKan where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Structure
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Powerset
open import Cubical.Data.Sigma
open import Cubical.... |
-- Andreas, 2012-09-13
module RelevanceSubtyping where
-- this naturally type-checks:
one : {A B : Set} → (.A → B) → A → B
one f x = f x
-- this type-checks because of subtyping
one' : {A B : Set} → (.A → B) → A → B
one' f = f
|
-- also importing warnings from A
import A
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.S1.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.F... |
{-# OPTIONS --safe #-}
open import Data.List as List hiding ([_])
module JVM.Compiler.Monad (T : Set) (⟨_⇒_⟩ : T → T → List T → Set) (nop : ∀ {τ} → ⟨ τ ⇒ τ ⟩ []) where
open import Level
open import Function using (_∘_)
open import Data.Product hiding (_<*>_)
open import Relation.Unary
open import Relation.Unary.Predi... |
open import MLib.Prelude.FromStdlib
module MLib.Prelude.TransitiveProver {a p} {A : Set a} (_⇒_ : A → A → Set p) (trans : Transitive _⇒_) where
import MLib.Prelude.DFS as DFS
open import MLib.Prelude.Path
open List using ([]; _∷_)
open import Relation.Nullary using (yes; no)
open import Relation.Binary using (Deci... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The unit type and the total relation on unit
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Unit.Base where
----------------------------... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Properties.
------------------------------------------------------------------------------
open import Data.Nat using ( ℕ )
module Data.PropFormula.Properties ( n : ℕ ) where
--------------------------------------... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use `Algebra` or
-- `Algebra.Definitions` instead.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relat... |
{-# OPTIONS --type-in-type #-}
module Lec6 where
open import Lec1Done
ListF : Set -> Set -> Set
ListF X T = One + (X * T)
data List (X : Set) : Set where
<_> : (ListF X) (List X) -> (List X)
infixr 4 _,-_
listF : {X T U : Set} -> (T -> U) -> (ListF X) T -> (ListF X) U
listF g (inl <>) = inl <>
listF g (inr ... |
{-# OPTIONS --safe #-}
module Cubical.Functions.Surjection where
open import Cubical.Core.Everything
open import Cubical.Data.Sigma
open import Cubical.Data.Unit
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.E... |
module Prelude where
-- Simple data
open import Data.Bool public
using (Bool ; false ; true ; not)
open import Data.Empty public
using (⊥ ; ⊥-elim)
open import Data.Nat public
using (
ℕ ; zero ; suc
; _+_ ; _*_
; _≤_ ; z≤n ; s≤s
; _<_ ; _≟_ ; pred
)
open import Data.Maybe public
using (Maybe ; just ;... |
{-# OPTIONS --without-K #-}
module Model.Size where
open import Relation.Binary using (Rel ; Preorder ; IsPreorder)
import Data.Nat as ℕ
import Data.Nat.Induction as ℕ
import Data.Nat.Properties as ℕ
import Relation.Binary.Construct.On as On
open import Model.RGraph as RG using (RGraph)
open import Source.Size as S ... |
open import Nat
open import Prelude
open import contexts
open import core
open import type-assignment-unicity
module canonical-indeterminate-forms where
-- this type gives somewhat nicer syntax for the output of the canonical
-- forms lemma for indeterminates at base type
data cif-base : (Δ : hctx) (d : ihexp) ... |
module Cats.Util.SetoidReasoning where
open import Relation.Binary.SetoidReasoning public
open import Relation.Binary using (Setoid)
open import Relation.Binary.EqReasoning as EqR using (_IsRelatedTo_)
infixr 2 _≡⟨⟩_
_≡⟨⟩_ : ∀ {c l} {S : Setoid c l} → ∀ x {y} → _IsRelatedTo_ S x y → _IsRelatedTo_ S x y
_≡⟨⟩_ {S ... |
{-# OPTIONS --without-K --exact-split --safe #-}
module Fragment.Extensions.CSemigroup.Base where
open import Fragment.Equational.Theory.Bundles
open import Fragment.Algebra.Signature
open import Fragment.Algebra.Free Σ-magma hiding (_~_)
open import Fragment.Algebra.Homomorphism Σ-magma
open import Fragment.Algebra... |
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
open import Light.Library.Data.Natural as ℕ using (ℕ ; predecessor ; zero)
open import Light.Package using (Package)
module Light.Literals.Level ⦃ natural‐package : Package record { ℕ } ⦄ where
open import Light.Literals.Definition.Natur... |
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Paths
open import lib.types.Pi
open import lib.types.Unit
module lib.types.Circle where
{-
Idea :
data S¹ : Type₀ where
base : S¹
loop : base == base
I’m using Dan Licata’s trick to have a higher inductive type with definitional
reduction... |
-- Andreas, 2015-06-24
{-# OPTIONS --copatterns #-}
-- {-# OPTIONS -v tc.with.strip:20 #-}
module _ where
open import Common.Equality
open import Common.Product
module SynchronousIO (I O : Set) where
F : Set → Set
F S = I → O × S
record SyncIO : Set₁ where
field
St : Set
tr : St → F St
m... |
-- MIT License
-- Copyright (c) 2021 Luca Ciccone and Luca Padovani
-- Permission is hereby granted, free of charge, to any person
-- obtaining a copy of this software and associated documentation
-- files (the "Software"), to deal in the Software without
-- restriction, including without limitation the rights to use... |
------------------------------------------------------------------------
-- A type for values that should be erased at run-time
------------------------------------------------------------------------
-- Most of the definitions in this module are reexported, in one way
-- or another, from Erased.
-- This module impor... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Instances.FunctorAlgebras where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism renaming (Iso to _≅_)
open import Cubical.Foundations.Univalence
open im... |
module Prelude where
--------------------------------------------------------------------------------
open import Agda.Primitive public
using (Level ; _⊔_)
renaming (lzero to ℓ₀)
id : ∀ {ℓ} → {X : Set ℓ}
→ X → X
id x = x
_◎_ : ∀ {ℓ ℓ′ ℓ″} → {X : Set ℓ} {P : X → Set ℓ′} {Q : ∀ {x} → P x → Set ℓ″}
... |
-- Andreas, 2013-11-23
-- checking that postulates are allowed in new-style mutual blocks
open import Common.Prelude
-- new style mutual block
even : Nat → Bool
postulate
odd : Nat → Bool
even zero = true
even (suc n) = odd n
-- No error
|
module Data.Num.Bijective where
open import Data.Nat
open import Data.Fin as Fin using (Fin; #_; fromℕ≤)
open import Data.Fin.Extra
open import Data.Fin.Properties using (bounded)
open ≤-Reasoning renaming (begin_ to start_; _∎ to _□; _≡⟨_⟩_ to _≈⟨_⟩_)
open import Level using () renaming (suc to lsuc)
open import Func... |
module z-06 where
open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _<?_; _<_; ≤-pred)
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
import Relation.Binary.PropositionalEquality.Core as PE
{-
--------------------------------------------------------------------... |
module TrustMe where
open import Data.String
open import Data.String.Unsafe
open import Data.Unit.Polymorphic using (⊤)
open import IO
import IO.Primitive as Prim
open import Relation.Binary.PropositionalEquality
open import Relation.Nullary
-- Check that trustMe works.
testTrustMe : IO ⊤
testTrustMe with "apa" ≟ "a... |
-- Mapping of Haskell types to Agda Types
module Foreign.Haskell.Types where
open import Prelude
open import Builtin.Float
{-# FOREIGN GHC import qualified GHC.Float #-}
{-# FOREIGN GHC import qualified Data.Text #-}
HSUnit = ⊤
HSBool = Bool
HSInteger = Int
HSList = List
HSChar = Char
HSString = HSList HSChar
HSTe... |
open import Prelude
module Implicits.Resolution.Termination.Lemmas
where
open import Induction.WellFounded
open import Induction.Nat
open import Data.Fin.Substitution
open import Implicits.Syntax
open import Implicits.Syntax.Type.Unification
open import Implicits.Substitutions
open import Implicits.Substitutions.Le... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Groups.Definition
open import Setoids.Orders.Partial.Definition
open import Setoids.Orders.Total.Definition
open import Setoids.Setoids
open import Functions.Definition
open import Rings.Definition
open import Rings.Orders.Partial.Definition
open import A... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.FunctionOver
open import cohomology.FlipPushout
module cohomology.CofiberSequence {i} where
{- Lemma: pushing flip-susp through susp-fmap -}
flip-susp-fmap : {A B : Type i} (f : A → B)
→ ∀ σ → flip-susp (susp-fmap f σ) == susp-fmap f (flip-susp σ)... |
-- Andreas, 2016-06-20
-- Issue #436 fixed by Ulf's instantiating parameters sprint
-- (Agda meeting April 2016 Strathclyde)
data _==_ {A : Set} (x : A) : A -> Set where
refl : x == x
foo : {A : Set} (x y : A) -> x == y -> A
foo x y = \ { eq → {!eq!} } -- load and do C-c C-c in the shed
-- Should work now (and is ... |
{-# OPTIONS --safe --warning=error --without-K #-}
-- These are explicitly with-K, because we currently encode an element of Zn as
-- a natural together with a proof that it is small.
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Semirings.Definition
o... |
module Prelude where
infixr 90 _∘_
infixr 0 _$_
id : {A : Set} -> A -> A
id x = x
_∘_ : {A B C : Set} -> (B -> C) -> (A -> B) -> A -> C
(f ∘ g) x = f (g x)
_$_ : {A B : Set} -> (A -> B) -> A -> B
f $ x = f x
flip : {A B C : Set} -> (A -> B -> C) -> B -> A -> C
flip f x y = f y x
const : {A B : Set} -> A -> B -> ... |
{-# OPTIONS --without-K #-}
module HoTT.Sigma.Transport where
open import HoTT.Base
open import HoTT.Identity
open import HoTT.Identity.Sigma
Σ-transport : ∀ {i j k} {A : 𝒰 i} {P : A → 𝒰 j} {Q : (Σ A λ x → P x) → 𝒰 k} {x y : A} →
(p : x == y) (uz : Σ (P x) λ u → Q (x , u)) →
transport (... |
-- Andreas, 2015-01-19 Forced constructor arguments should not
-- give rise to unification constraints.
-- Andreas, 2015-02-27 Forcing analysis is too fragile to have
-- such a huge impact. The problem has to be addressed by
-- putting heterogeneous unification on a solid foundation.
-- Jesper, 2015-12-18 The ne... |
open import Relation.Binary.Core
module BBSTree.Properties {A : Set}
(_≤_ : A → A → Set)
(trans≤ : Transitive _≤_) where
open import BBSTree _≤_
open import Bound.Total A
open import Bound.Total.Order.Properties _≤_ trans≤
open import List.Order.Simple _≤_
open import List.... |
{-# OPTIONS --without-K #-}
open import hott.core
open import hott.core.theorems
open import hott.functions
-- An important theorem in topology is to show the 2-dimensional loop
-- space is abelian. To avoid notational clutter we parameterize the
-- common variables as module parameters.
module hott.topology.loopspa... |
module Issue512 where
open import Common.Equality
data A : Set where
a b : A
proof : a ≡ a
proof = refl
f : A → A → A
f x y rewrite proof = {!!}
-- gave error below (now complains about LEVELZERO instead of STRING):
-- No binding for builtin thing STRING, use {-# BUILTIN STRING name #-} to bind it to 'name'
-- ... |
{-# OPTIONS --allow-unsolved-metas #-}
open import Tutorials.Monday-Complete
module Tutorials.Tuesday where
-----------
-- Pi and Sigma types
-----------
module Product where
-- The open keyword opens a given module in the current namespace
-- By default all of the public names of the module are opened
-- The ... |
{-# OPTIONS --no-termination-check #-}
module AC where
import Nat
import Bool
import List
import Fin
import Logic
import Vec
import EqProof
open Nat hiding (_<_) renaming (_==_ to _=Nat=_)
open Bool
open List hiding (module Eq)
open Fin renaming (_==_ to _=Fin=_)
open Logic
open Vec
infix 20 _○_
infix 10 _≡_
ForAl... |
{-# OPTIONS --type-in-type #-}
module _ where
Set' : ∀ i → Set _
Set' i = Set i
postulate
A : Set
a : A
T : Set → Set
comp : (P : A → Set) (g : (a : A) → P a) → P a
foo : ∀ i (Q : A → Set' i) → T (comp _ Q)
-- (no issue if Set' is replaced by Set)
bar : T {!_!} -- Try to give _
bar = foo _ _
-- WAS:
--... |
-- New NO_POSITIVITY_CHECK pragma for data definitions and mutual
-- blocks
-- Skipping a single data definition in an abstract block.
abstract
{-# NO_POSITIVITY_CHECK #-}
data D : Set where
lam : (D → D) → D
|
-- Andreas, 2017-03-23, issue #2510
-- Error message in case of --no-pattern-matching
{-# OPTIONS --no-pattern-matching #-}
test : Set
test x = x
-- Expected error:
-- Cannot eliminate type Set with pattern x (did you supply too many arguments?)
|
record ⊤ : Set where
abstract
a : ⊤
a = {!!}
|
------------------------------------------------------------------------------
-- From ListP as the least fixed-point to ListP using data
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no... |
-- 2011-08-22 Andreas (reported and fixed by Dominique Devriese)
{-# OPTIONS --no-universe-polymorphism #-}
module Issue427 where
data ⊥ : Set where
postulate f : {I : ⊥} (B : _) → ⊥
data A : Set where a : {x y : ⊥} → A
test : A → Set
test (a {x = x} {y = y}) with f {_}
test (a {x = x} {y = y}) | _ = A
{- old erro... |
module InstanceArgumentsSections where
postulate A : Set
module Basic where
record B : Set where
field bA : A
open B {{...}}
bA' : {{_ : B}} → A
bA' = bA
module Parameterised (a : A) where
record C : Set where
field cA : A
open C {{...}}
cA' : {{_ : C}} → A
cA' = cA
module RecordFromPar... |
open import Algebra.Bundles using (Group)
module GGT.Group.Facts
{a b ℓ}
(G : Group a ℓ)
where
open import Relation.Unary using (Pred)
open import Relation.Binary
open import GGT.Group.Structures
open import Algebra.Bundles using (Group)
open import Algebra.Properties.Group G
open Group G
open import Relation.B... |
open import Data.Bool as Bool using (Bool; false; true; if_then_else_; not)
open import Data.String using (String)
open import Data.Nat using (ℕ; _+_; _≟_; suc; _>_; _<_; _∸_)
open import Relation.Nullary.Decidable using (⌊_⌋)
open import Data.List as l using (List; filter; map; take; foldl; length; []; _∷_)
open impor... |
module AmbiguousConstructor where
module Foo where
data D : Set where
c0 : D
c1 : D
module Bar where
open Foo public
data B : Set where
tt : B
ff : B
open Foo renaming (c0 to c2)
open Bar renaming (c1 to c2)
foo : D -> B
-- c2 is ambiguous: it could refer to c0 or c1.
foo c2 = tt
foo _ = ff
|
module List where
import Bool
open Bool
infixr 15 _::_
data List (A : Set) : Set where
[] : List A
_::_ : A -> List A -> List A
module Eq {A : Set}(_=A=_ : A -> A -> Bool) where
infix 10 _==_
_==_ : List A -> List A -> Bool
[] == [] = true
x :: xs == y :: ys = (x =A= y) && xs == ys
[] ... |
-- Andreas, 2014-09-09
{-# TERMINATING #-}
Foo : Set
Foo = Foo
|
-- Reported by Nisse on 2018-03-13
-- The `x` in the parent pattern was eta-expanded to `record{}`,
-- but with-abstraction didn't like this.
open import Agda.Builtin.Equality
record R : Set where
postulate
easy : (A : Set) → A
F : (x : R) → Set₁
F x with easy (x ≡ x)
F x | refl with Set
F x | refl | _ = Set
--... |
-- {-# OPTIONS -vtc.with.strip:60 -v tc.lhs.top:50 #-}
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
postulate trustMe : {A : Set} (x y : A) → x ≡ y
data Fin : Nat → Set where
fzero : ∀ n → Fin (suc n)
fsuc : ∀{n} → Fin n → Fin (suc n)
test1 : ∀{n} → Fin n → Nat
test1 (fzero _) = 0
test1 {.(s... |
open import Prelude
open import core
module grounding where
grounding : ∀{ τ1 τ2} →
τ1 ▸gnd τ2 →
((τ2 ground) × (τ1 ~ τ2) × (τ1 ≠ τ2))
grounding (MGArr x) = GHole , TCArr TCHole1 TCHole1 , x
grounding (MGProd x) = GProd , TCProd TCHole1 TCHole1 , x
|
------------------------------------------------------------------------
-- The unit type
------------------------------------------------------------------------
module Data.Unit where
open import Data.Sum
open import Relation.Nullary
open import Relation.Binary
open import Relation.Binary.PropositionalEquality as P... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Empty type
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Empty where
open import Level
data ⊥ : Set where
⊥-elim : ∀ {w} {Whatever : ... |
{-# OPTIONS --universe-polymorphism #-}
open import Categories.Category
open import Categories.Object.Terminal
open import Level
module Categories.Object.Terminal.Products {o ℓ e : Level}
(C : Category o ℓ e)
(T : Terminal C) where
open import Categories.Object.Product
open Category C
open Terminal T
[⊤×⊤]... |
module everything where
open import lib public
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.SetQuotients where
open import Cubical.HITs.SetQuotients.Base public
open import Cubical.HITs.SetQuotients.Properties public
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.