text stringlengths 4 690k |
|---|
-- Andreas, fixed #1349 on 2016-06-08
-- {-# OPTIONS -v tc.term.exlam:50 -v scope.extendedLambda:10 #-}
module Issue1349 where
open import Common.Prelude
module Logic {s} (F : Set s) (arF : F → Nat) where
data Term : Nat → Set s where
var : ∀ n → Term (suc n)
d : Unit → Nat
d = \ {unit → zero} -- fails
-- ... |
open import Data.Bool using ( Bool ; true ; false ; _∨_ )
open import Data.List.Primitive using ( #List ; [] ; _∷_ )
open import Data.Maybe using ( Maybe ; just ; nothing )
open import Data.Maybe.Primitive using ( #Maybe ; just ; nothing )
open import Data.String using ( String )
open import Web.URI.Primitive using ( #... |
open import Oscar.Prelude
open import Oscar.Data.Constraint
module Oscar.Class where
record InnerClass {ℓ} {𝔢} {CONSTRAINTS : Ø 𝔢} (constraints : CONSTRAINTS) (_ : Constraint constraints) (SET-METHOD : Ø ℓ) : Ø ℓ where
constructor ∁
field
⋆ : SET-METHOD
open InnerClass public
module ℭLASS
{ℓ}
{𝔢}
... |
{-# OPTIONS --without-K #-}
module algebra.group.morphism where
open import level
open import algebra.group.core
open import algebra.monoid.morphism
module _ {i}{j}
{X : Set i}⦃ sX : IsGroup X ⦄
{Y : Set j}⦃ sY : IsGroup Y ⦄ where
open IsGroup ⦃ ... ⦄
IsGroupMorphism : (X → Y) → Set (i ⊔ j)
... |
-- Andreas, 2016-07-21 adapted from MagicWith.agda
-- Testing correct printing of postfix projections.
{-# OPTIONS --postfix-projections #-}
-- {-# OPTIONS -v tc.cc:60 #-}
-- {-# OPTIONS -v tc.conv.elim:50 #-}
open import Common.Product
open import Common.Nat
record True : Set where
data False : Set where
IsZer... |
{-# OPTIONS --allow-unsolved-metas --no-termination-check #-}
module TT where
module Prelude where
-- Props ------------------------------------------------------------------
data True : Set where
tt : True
data False : Set where
postulate
falseE : (A : Set) -> False -> A
infix 3 _/\_
data _/\... |
module Data.BinaryTree where
import Lvl
open import Type
private variable ℓ ℓᵢ ℓₗ ℓₙ ℓₒ : Lvl.Level
private variable N N₁ N₂ L T A B : Type{ℓ}
data BinaryTree (L : Type{ℓₗ}) (N : Type{ℓₙ}) : Type{ℓₗ Lvl.⊔ ℓₙ} where
Leaf : L → BinaryTree L N
Node : N → BinaryTree L N → BinaryTree L N → BinaryTree L N
elim :... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Vec.NAry where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univalence
open import Cubical.Data.Nat
open import Cubical.Data.Vec.Base
pri... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Dagger.Construction.Discrete where
open import Relation.Binary.PropositionalEquality
open import Categories.Category.Dagger
open import Categories.Category.Discrete
Discrete-HasDagger : ∀ {a} (A : Set a) → HasDagger (Discrete A)
Discrete-HasDagger A = rec... |
{-# OPTIONS --without-K --safe #-}
module Categories.Diagram.Colimit.Lan where
open import Level
open import Categories.Category
open import Categories.Category.Cocomplete
open import Categories.Diagram.Duality
open import Categories.Diagram.Limit.Ran
open import Categories.Functor
open import Categories.Kan
open imp... |
-- Possible improvements:
-- * Most of the code below is not reachable from main.
-- * The following primitives are not used at all: primPOr, primComp,
-- primHComp, prim^glueU and prim^unglueU.
{-# OPTIONS --erased-cubical #-}
-- The code from Agda.Builtin.Cubical.Glue should not be compiled.
open import Agda.Bui... |
{-
This second-order signature was created from the following second-order syntax description:
syntax Unit | U
type
𝟙 : 0-ary
term
unit : 𝟙
theory
(𝟙η) u : 𝟙 |> u = unit
-}
module Unit.Signature where
open import SOAS.Context
-- Type declaration
data UT : Set where
𝟙 : UT
open import SOAS.Syntax.... |
module Numeric.Nat.Sqrt where
open import Prelude hiding (_<?_)
open import Numeric.Nat.Properties
open import Tactic.Nat
open import Numeric.Nat.BinarySearch
data Sqrt (n : Nat) : Set where
root : ∀ r → r ^ 2 ≤ n → n < suc r ^ 2 → Sqrt n
getSqrt : ∀ {n} → Sqrt n → Nat
getSqrt (root r _ _) = r
private
infix 4 ... |
module Issue561.Core where
postulate Char : Set
{-# BUILTIN CHAR Char #-}
open import Agda.Builtin.IO public
postulate
return : ∀ {a} {A : Set a} → A → IO A
{-# COMPILE GHC return = \_ _ -> return #-}
{-# COMPILE UHC return = \_ _ x -> UHC.Agda.Builtins.primReturn x #-}
{-# COMPILE JS return =
function(u0) ... |
{-# OPTIONS --no-termination-check #-}
module Data.Bits where
import Prelude
import Logic.Base
import Data.List as List
import Data.Nat as Nat
import Data.Bool as Bool
open Prelude
open Nat
open Bool
open List
Bit = Bool
shiftL : Nat -> Nat -> Nat
shiftL n i = n * 2 ^ i
sucBits : List Bit -> List Bit
sucBits [] ... |
data A : Set where
a : A
data T : A → Set where
t : T a
postulate
f : ∀ x → T x → Set
stuff : Set
stuff = f {!!} t
-- There should not be a (Checked) status for this module! |
module Data.Tuple where
data _×_ (A B : Set) : Set where
<_,_> : A -> B -> A × B
fst : {A B : Set} -> A × B -> A
fst < x , y > = x
snd : {A B : Set} -> A × B -> B
snd < x , y > = y
|
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇.
-- Hilbert-style formalisation of syntax with context pairs.
-- Nested terms.
module BasicIS4.Syntax.DyadicHilbert where
open import BasicIS4.Syntax.Common public
-- Derivations.
infix 3 _⊢_
data _⊢_ : Cx² Ty Ty → Ty → Set where
var : ∀ {A Γ Δ} → ... |
{-# OPTIONS --safe --without-K #-}
open import Relation.Binary
module Data.List.Membership.Setoid.Disjoint {a p} (S : Setoid a p) where
open Setoid S renaming (Carrier to A)
open import Data.List using (List ; [])
open import Data.List.Membership.Setoid (S)
open import Data.List.Membership.Setoid.Trans (S)
open import... |
module Monads.Except where
open import Class.Monad
open import Class.Monad.Except
open import Monads.ExceptT
open import Monads.Identity
open import Level
private
variable
a : Level
A : Set a
Except : Set a -> Set a -> Set a
Except = ExceptT Id
instance
Except-Monad : Monad (Except A)
Except-Monad = E... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import groups.SumOfSubIndicator
open import cohomology.Theory
{- It should be possible to prove lemmas for arbitrary universe levels,
but this file is only used for [FinSkeleton], which is in the zeroth
universe. -}
module cohomology.SubFinWedge (CT... |
module hierarchy where
data Bool : Set where
true : Bool
false : Bool
_and_ : Bool → Bool → Bool
true and true = true
true and false = false
false and true = false
false and false = false
_or_ : Bool → Bool → Bool
true or true = true
true or false = true
false or true = true
false or false = false
data ℕ : Se... |
module Lang.Inspect where
open import Type
open import Structure.Setoid
open import Structure.Relator.Properties
{-
module _ {ℓ₁ ℓ₂} {A : Type{ℓ₁}} {B : A → Type{ℓ₂}} ⦃ eqB : ∀{x} → Equiv(B(x)) ⦄ (f : ∀(x) → B(x)) (x : A) where
data Inspect (y : B(x)) : Type{ℓ₂} where
intro : (f(x) ≡ y) → Inspect(y)
inspect ... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT hiding (left; right)
module homotopy.BlakersMassey {i j k}
{A : Type i} {B : Type j} (Q : A → B → Type k)
m (f-conn : ∀ a → is-connected (S m) (Σ B (λ b → Q a b)))
n (g-conn : ∀ b → is-connected (S n) (Σ A (λ a → Q a b)))
where
open import homotopy.bla... |
-- An ATP conjecture must be used with postulates.
-- This error is detected by Syntax.Translation.ConcreteToAbstract.
module ATPBadConjecture1 where
data Bool : Set where
false true : Bool
{-# ATP prove false #-}
|
{-# OPTIONS --without-K #-}
module function.surjective where
open import sum
open import equality
open import function.isomorphism.core
open import hott.level.core
open import hott.equivalence.core
open import hott.truncation
surjective : ∀ {i j}{A : Set i}{B : Set j} → (A → B) → Set _
surjective f = ∀ b → ∥ f ⁻¹ b ... |
------------------------------------------------------------------------------
-- The Booleans properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# O... |
{-
This second-order term syntax was created from the following second-order syntax description:
syntax Sum | S
type
_⊕_ : 2-ary | l30
term
inl : α -> α ⊕ β
inr : β -> α ⊕ β
case : α ⊕ β α.γ β.γ -> γ
theory
(lβ) a : α f : α.γ g : β.γ |> case (inl(a), x.f[x], y.g[y]) = f[a]
(rβ) b : β ... |
module LibB where
import LibC
|
{-# OPTIONS --safe #-}
module Cubical.Experiments.IsoInt where
open import Cubical.Experiments.IsoInt.Base public
|
{-# OPTIONS --without-K #-}
module lib.cubical.Cubical where
open import lib.cubical.Square public
open import lib.cubical.Cube public
|
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
open import Data.Nat
open import Relation.Binary.PropositionalEquality
open import Data.Sum
module Examples.Colists.Auxiliary.MaxOf where
max : ℕ → ℕ → ℕ
max zero zero = zero
max zero (suc... |
data Unit : Set where
unit : Unit
mutual
data D : Unit → Set where
c : (x : Unit) → F x x → D x
F : Unit → Unit → Set
F unit x = D x
Works : (x : Unit) → D x → Set₁
Works .x (c x p) with x
Works .x (c x p) | _ = Set
Fails : (x : Unit) → D x → Set₁
Fails y = Fails′ y
where
Fails′ : (x : Unit) → D ... |
{-# OPTIONS --without-K --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.ShapeView {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.LogicalRelation
open... |
open import Prelude hiding (id; Bool; _∷_; [])
module Examples.PartialResolution where
data TC : Set where
tc-int : TC
tc-bool : TC
_tc≟_ : (a b : TC) → Dec (a ≡ b)
tc-int tc≟ tc-int = yes refl
tc-int tc≟ tc-bool = no (λ ())
tc-bool tc≟ tc-int = no (λ ())
tc-bool tc≟ tc-bool = yes refl
open import Implicits.Syn... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of operations on characters
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Char.Properties where
open import Data.Bool using ... |
-- This module is copied from Agda's standard library. It has been
-- renamed (original name is Size) to avoid name clash in case you
-- have the standard library installed.
------------------------------------------------------------------------
-- The Agda standard library
--
-- Sizes for Agda's sized types
--------... |
{-# OPTIONS --safe #-}
module Cubical.HITs.Sn.Properties where
open import Cubical.Foundations.Pointed
open import Cubical.Foundations.Path
open import Cubical.Foundations.Function
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubi... |
module Numeral.Finite.Oper where
open import Data
open import Data.Boolean.Stmt
open import Data.Option
open import Logic.Propositional
open import Logic.Predicate
import Lvl
open import Numeral.Finite as 𝕟 using (𝕟 ; 𝕟₌ ; 𝕟-to-ℕ)
open import Numeral.Finite.Bound
open import Numeral.Natural hiding (𝟎 ; 𝐒 ; ... |
------------------------------------------------------------------------
-- The circle with an erased higher constructor
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
-- Partly following the HoTT book.
-- The module is parametrised by a notion of equ... |
module _ (_ : Set) where
open import Imports.Issue5198 Set
data D : Set where
r : D
F : D → Set₂
F r = R
f : {d : D} → F d → F d
f x = x
_ : R
_ = f record {A = Set}
|
-- Andreas, 2017-01-12, issue #2386
postulate
A : Set
data _≡_ (x : A) : A → Set where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
-- Monomorphic equality is not accepted.
-- If needed, this could change in the future.
|
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-}
module Light.Library.Data.These where
open import Light.Level using (Setω ; Level)
open import Light.Variable.Levels
open import Light.Variable.Sets
record Dependencies : Setω where
record Library (dependencies : Dependencies) : Setω wh... |
-- {-# OPTIONS --show-implicit #-}
-- {-# OPTIONS -v tc.meta:25 #-}
module NoBlockOnLevel where
open import Common.Level
open import Common.Product
BSetoid : ∀ c → Set (lsuc c)
BSetoid c = Set c
infixr 0 _⟶_
postulate
_⟶_ : ∀ {f t} → BSetoid f → BSetoid t → Set (f ⊔ t)
→-to-⟶ : ∀ {a b} {A : Set a} {B : BSetoid ... |
-- {-# OPTIONS -v term:20 -v tc.term:20 #-}
-- {-# OPTIONS -v tc.def.alias:100 -v tc.term.expr.coind:100 #-}
module Issue807 where
open import Common.Coinduction
data Stream : Set where
cons : ∞ Stream → Stream
mutual
-- s : Stream
s = cons s′
-- s′ : ∞ _
s′ = ♯ s
-- Under 2.3.0.1: The code is accepted... |
{-# OPTIONS --erased-cubical --save-metas #-}
module Erased-cubical-Pattern-matching-Erased where
open import Agda.Builtin.String
open import Erased-cubical-Pattern-matching-Cubical
-- If c₁ and c₂ are treated as erased, then f might be compiled to
-- something akin to ⊥-elim. However, the main module uses
-- --cubi... |
{-# OPTIONS --cubical #-}
module Type.Cubical.InductiveInterval where
open import Functional
import Lvl
open import Type
import Type.Cubical as Cubical
import Type.Cubical.Path as Cubical
import Type.Cubical.Path.Proofs as Cubical
private variable ℓ ℓ₁ ℓ₂ : Lvl.Level
private va... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties related to negation
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Nullary.Negation where
open import Category.Monad
open... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Strings
------------------------------------------------------------------------
module Data.String where
open import Data.List as List using (_∷_; []; List)
open import Data.Vec as Vec using (Vec)
open import ... |
{-# OPTIONS --no-auto-inline #-}
-- Agda doesn't have an Int type (only Word64). With some work we
-- can represent signed ints using Word64.
module Haskell.Prim.Int where
open import Agda.Builtin.Nat
open import Agda.Builtin.Word renaming (primWord64ToNat to w2n; primWord64FromNat to n2w)
open import Agda.Builtin.L... |
module Vecs.Reverse where
open import Vecs
open import Nats
open import Equality
open import Function
------------------------------------------------------------------------
-- internal stuffs
private
-- rev$v:a=a:rev$v : ∀ {n m} {A : Set n} (a : A) (v : Vec A m) →
-- rev (v ∷ʳ a) ≡ a ∷ rev v
... |
-- This file needs to be rewritten so that Rng's are defined as a
-- record (as is the case for other algebraic structures like
-- rings). As this file isn't used for anything at the moment this
-- rewrite has been postponed.
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Experiments.Rng where
open... |
module Issue27 where
infix 4 _≡_
infixl 4 _>_ _<_
infixr 1 _∨_
postulate ℝ : Set
------------------------------------------------------------------------------
-- Logic stuff
-- The identity type on the universe of discourse.
data _≡_ (x : ℝ) : ℝ → Set where
refl : x ≡ x
data _∨_ (A B : Set) : Set where
inj₁... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The identity function
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Function.Construct.Identity where
open import Data.Product using (_,_)
o... |
------------------------------------------------------------------------
-- Coinductive axiomatisation of subtyping
------------------------------------------------------------------------
module RecursiveTypes.Subtyping.Axiomatic.Coinductive where
import Data.Empty as E
open import Data.Fin using (Fin; zero; suc)
op... |
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇.
-- Hilbert-style formalisation of syntax with context pairs.
-- Sequences of terms.
module BasicIS4.Syntax.DyadicHilbertSequential where
open import BasicIS4.Syntax.Common public
-- Derivations.
infix 3 _⊦⊢_
data _⊦⊢_ : Cx² Ty Ty → Cx Ty → Set where
nil... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
open import Cubical.Core.Everything
open import Cubical.Foundations.HLevels
module Cubical.Algebra.Monoid.Construct.Free {ℓ} (Aˢ : hSet ℓ) where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Univa... |
module SolveAll-Norm where
open import Common.Equality
open import Common.List
open import Common.Nat
example = 0 ∷ 1 ∷ 2 ∷ []
test1 : length example ≡ {!!}
test1 = refl
reverse : {A : Set} → List A → List A
reverse = go [] where
go : {A : Set} → List A → List A → List A
go acc [] = acc
go acc (x ∷ xs)... |
open import Agda.Primitive
open import Agda.Builtin.Equality
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
testQuote : quoteTerm Setω ≡ agda-sort (inf 0)
testQuote = refl
macro
doUnquote : Term → Term → TC _
doUnquote t hole = bindTC (unquoteTC t) (unify hole)
testUnquote : doUnquote (agda-so... |
module Issue62 where
module A where
data A : Set where
a : A
module B where
open A
data B : Set where
a : B
open B
-- Note that a : A.A is not in scope here, so the following should not
-- type check.
foo : A.A -> A.A
foo a = a
|
{- 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.Consensus.Consensus... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Semirings.Definition
module Semirings.Lemmas {a : _} {A : Set a} {Zero One : A} {_+_ _*_ : A → A → A} (S : Semiring Zero One _+_ _*_) where
open Semiring S
doubleIsAddTwo : (a : A) → (a + a) ≡ (One + One) * a
doubleIsAddTwo a... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Integers
------------------------------------------------------------------------
module Data.Integer where
open import Data.Nat as ℕ
using (ℕ) renaming (_+_ to _ℕ+_; _*_ to _ℕ*_)
import Data.Nat.Show as ℕ
op... |
{-# OPTIONS --without-K #-}
{-
Imports everything that is not imported by something else.
This is not supposed to be used anywhere, this is just a simple way to
do `make all'
This file is intentionally named index.agda so that
Agda will generate index.html.
-}
module index where
import Base
import Spaces.IntervalPr... |
data M : Set where
m : (I : _) → (I → M) → M
-- inferred
-- m : (I : Set) → (I → M) → M
|
{-# OPTIONS --cubical --no-import-sorts --guardedness --safe #-}
module Cubical.Codata.M.AsLimit.itree where
open import Cubical.Data.Unit
open import Cubical.Data.Prod
open import Cubical.Data.Nat as ℕ using (ℕ ; suc ; _+_ )
open import Cubical.Data.Sum
open import Cubical.Data.Empty
open import Cubical.Data.Bool
o... |
-- Andreas, 2017-01-12
data D {A : Set} : A → Set where
c : (a : A) → D {!!} -- fill with a
d : (a : A) → {!!} -- fill with D a
|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Finite.Fin.Instance.Triangle where
open import Data.Nat using (ℕ)
open import Data.Fin
open import Data.Fin.Patterns
open import Relation.Binary.PropositionalEquality as ≡
open import Categories.Category.Finite.Fin
open import Categories.Category
private... |
module Nats.Multiply.Assoc where
open import Nats
open import Equality
open import Function
open import Nats.Multiply.Comm
open import Nats.Multiply.Distrib
------------------------------------------------------------------------
-- internal stuffs
private
a*1+b=a+a*b : ∀ a b → a * suc b ≡ a + a * b
a*1+b=a+a*... |
open import Reflection hiding (return; _>>=_)
open import Data.List renaming (_++_ to _++l_)
open import Data.Vec as V using (Vec; updateAt)
open import Data.Unit
open import Data.Nat as N
open import Data.Nat.Properties
open import Data.Fin using (Fin; #_; suc; zero)
open import Data.Maybe hiding (_>>=_; map)
open im... |
{-# OPTIONS --without-K #-}
module hott.equivalence.logical where
open import sum
open import function.isomorphism.core
open import hott.level.core
_↔_ : ∀ {i j} → Set i → Set j → Set _
X ↔ Y = (X → Y) × (Y → X)
module _ {i j}{X : Set i}{Y : Set j} where
≅⇒↔ : X ≅ Y → X ↔ Y
≅⇒↔ φ = to , from
where open _≅_ φ... |
open import FRP.JS.Level using ( Level ; _⊔_ ) renaming ( zero to o ; suc to ↑ )
open import FRP.JS.Time using ( Time ; _≤_ ; _<_ )
open import FRP.JS.Bool using ( Bool ; true ; false ; not ; _≟_ )
open import FRP.JS.True using ( True ; tt )
module FRP.JS.Model where
-- This model is essentially System F-omega with ... |
module x00-playpen where
-- prove properties of inductive naturals and operations on them via induction
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_≡_; refl; cong; sym)
open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; step-≡; _∎)
open import Data.Nat using (ℕ; zero... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.Queue where
open import Cubical.Data.Queue.Base public
open import Cubical.Data.Queue.Finite public
|
module Numeral.CoordinateVector where
import Lvl
open import Data.Boolean
open import Functional
open import Lang.Instance
open import Numeral.Finite
open import Numeral.Finite.Bound
open import Numeral.Finite.Oper
open import Numeral.Finite.Oper.Comparisons
open import Numeral.Natural
import Numeral.Natural... |
{-# OPTIONS --cubical #-}
module Issue4365 where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
postulate
A : Set
a : A
_ : primTransp (\ i → A) i0 a ≡ a
_ = \ _ → a
|
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Instance.Cats where
-- The (large) category of (small) categories.
-- Even though Agda can figure out the levels, it is worth making them explicit,
-- to see the large level jumps involved.
open import Level
open import Categories.Category using (Category)... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.HITs.InfNat where
open import Cubical.HITs.InfNat.Base public
open import Cubical.HITs.InfNat.Properties public
|
module LFRef.Readme where
open import LFRef.Syntax
open import LFRef.Welltyped
open import LFRef.Eval
open import LFRef.Properties.Soundness
open import LFRef.Properties.Confluence
|
open import Prelude
open import dynamics-core
module lemmas-consistency where
-- type consistency is symmetric
~sym : {t1 t2 : htyp} → t1 ~ t2 → t2 ~ t1
~sym TCRefl = TCRefl
~sym TCHole1 = TCHole2
~sym TCHole2 = TCHole1
~sym (TCArr p1 p2) = TCArr (~sym p1) (~sym p2)
~sym (TCSum p1 p2) = TCSum (~sym p1) (... |
module Operator.Equals {ℓ ℓₑ} where
open import Data.Boolean
open import Logic
open import Structure.Setoid
open import Type.Properties.Decidable
open import Type
DecidableEquiv : (T : Type{ℓ}) ⦃ equiv : Equiv{ℓₑ}(T) ⦄ → Stmt
DecidableEquiv(T) = Decidable(2)(_≡_)
_==_ : ∀{T : Type{ℓ}} ⦃ equiv : Equiv{ℓₑ}(T) ⦄ ⦃ _ : ... |
module Issue175 where
data List (A : Set) : Set where
[] : List A
_∷_ : A → List A → List A
{-# BUILTIN LIST List #-}
{-# BUILTIN NIL [] #-}
{-# BUILTIN CONS _∷_ #-}
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
postulate
Char : Set
String : Set
{-# BUILTIN CHAR Char #-}
{-# BUILTIN ... |
import Issue2447.Operator-error
|
{-# OPTIONS --rewriting --prop --confluence-check #-}
open import Agda.Primitive
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
open import Agda.Builtin.List
open import Agda.Builtin.Equality
open import Agda.Builtin.Equality.Rewrite
open import Agda.Builtin.Sigma
open import Agda.Builtin.Unit
open import ... |
------------------------------------------------------------------------
-- A parser for PBM images; illustrates "essential" use of bind
------------------------------------------------------------------------
-- Note that I am using the simple "Plain PBM" format, and I try to
-- adhere to the following statement from... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Setoids.Setoids
open import Rings.Definition
open import Rings.IntegralDomains.Definition
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
module Rings.PrincipalIdealDomains.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A →... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Lists.Definition
open import Lists.Concat
module Lists.Reversal.Reversal where
rev : {a : _} → {A : Set a} → List A → List A
rev [] = []
rev (x :: l) = (rev l) ++ [ x ]
revIsHom : {a : _} → {A : Set a} → (l1 : List A) → (l2 :... |
{-# OPTIONS --without-K --safe --exact-split #-}
module Experiment.Omniscience where
open import Level using () renaming (zero to lzero)
open import Data.Nat using (ℕ; zero; suc; _≤_; _+_)
open import Data.Nat.Properties using (≤-refl; +-identityʳ)
open import Data.Product using (Σ; _,_; proj₁; proj₂; ∃; _×_)
open im... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Monoid.Construct.Unit where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Algebra.Monoid
open import Cubical.Data.Prod using (_,_)
open import Cubical.Data.Unit
import Cubical.Algebra.Semigroup... |
module Data.List.All.Properties.Extra {a}{A : Set a} where
open import Relation.Binary.PropositionalEquality
open import Data.Nat
open import Data.Fin
open import Data.List as List hiding (reverse)
open import Data.List.Relation.Unary.Any hiding (tail)
open import Data.List.Membership.Propositional
open import Data.Li... |
module Examples.OpSem where
open import Luau.OpSem using (_⊢_⟶ᴱ_⊣_; _⊢_⟶ᴮ_⊣_; subst)
open import Luau.Syntax using (Block; var; nil; local_←_; _∙_; done; return; block_is_end)
open import Luau.Heap using (∅)
ex1 : ∅ ⊢ (local (var "x") ← nil ∙ return (var "x") ∙ done) ⟶ᴮ (return nil ∙ done) ⊣ ∅
ex1 = subst
|
------------------------------------------------------------------------------
-- Testing Agda internal term: @Con@
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism... |
open import Prelude
open import Data.Maybe using (Maybe; just; nothing)
open import RW.Language.RTerm
open import RW.Language.RTermUtils using (hole2Abs)
open import RW.Language.Instantiation using (RSubst)
open import RW.Utils.Error
open import RW.Strategy
module RW.Strategy.PropEq where
pattern pat-≡ = (rdef (q... |
module Id where
id : {A : Set} -> A -> A
id x = {!!}
|
------------------------------------------------------------------------------
-- Proving mirror (mirror t) = t using mutual data types
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-u... |
module Data.Tree.Instance where
open import Class.Functor
open import Class.Monad
open import Class.Monoid
open import Class.Show
open import Class.Traversable
open import Data.List
open import Data.List.Instance
open import Data.String using (String)
open import Data.String.Instance
open import Data.Tree.Base
instan... |
-- Getting projection like functions right was a little tricky.
-- Here are the cases that didn't work and weren't caught by
-- existing test cases.
module ProjectionLikeFunctions where
record Wrap (A : Set) : Set where
constructor [_]
field unwrap : A
postulate
Nat : Set
n : Nat
Thm : Nat → Set
p... |
module IsPropositionalFormula where
open import OscarPrelude
open import Formula
open import Term
open import PredicateName
open import HasNeitherNor
data IsPropositionalFormula : Formula → Set
where
atomic : (𝑃 : PredicateName) → (τs : Terms) → IsPropositionalFormula $ 𝑃[ 𝑃 ♭ τs ]
logical : {φ₁ : Formula} ... |
open import Agda.Builtin.Reflection
open import Agda.Builtin.List
open import Agda.Builtin.Unit
macro
m-0 : Term → TC ⊤
m-0 goal =
bindTC (inferType goal) λ where
(pi (arg (arg-info _ (modality _ quantity-0)) _) _) →
bindTC (quoteTC (λ (_ : Set) → Set))
(unify goal)
type → t... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Functions.Definition
open import Setoids.Setoids
open import Setoids.Subset
open import Graphs.Definition
open import Sets.FinSet.Definition
open import Numbers.Naturals... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.