text stringlengths 4 690k |
|---|
module Oscar.Data.Proposextensequality where
open import Oscar.Data.Proposequality using (_≡_)
open import Oscar.Level
infix 4 _≡̇_
_≡̇_ : ∀ {a} {A : Set a} {b} {B : A → Set b} → ((x : A) → B x) → ((x : A) → B x) → Set (a ⊔ b)
f ≡̇ g = ∀ x → f x ≡ g x
|
module _ where
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
macro
easy : Term → TC _
easy t =
bindTC (freshName "A") λ A →
bindTC (declarePostulate (arg (arg-info visible relevant) A)
(agda-sort (lit 0))) λ _ →
unify (def A []) t
B : Set
B = {!easy!}... |
-- There was a bug which caused the type checker to forget
-- the name of implicit arguments which weren't used in the
-- return type.
module UnusedNamedImplicits where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
-- Simple example
f : {n m : Nat} -> Nat
f {m = m} = m
data _==_ {A : Set}(x : A) : A -> Set ... |
-- Andreas, 2018-10-27, issue #3323, reported by Guillaume Brunerie
--
-- Mismatches between original and repeated parameter list
-- should not lead to internal errors.
open import Agda.Builtin.Bool
open import Agda.Builtin.Equality
record R ..(b : Bool) : Set
record R .b where -- Cannot change relevance
field foo... |
------------------------------------------------------------------------
-- Bag equivalence for lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Bag-equivalence
{c⁺} (eq : ∀ {a p} → Equality-with-J a p c⁺) where
open Deri... |
module Numeric.Nat.Prime.Properties where
open import Prelude
open import Control.WellFounded
open import Numeric.Nat.Properties
open import Numeric.Nat.Divide
open import Numeric.Nat.Divide.Properties
open import Numeric.Nat.GCD
open import Numeric.Nat.GCD.Extended
open import Numeric.Nat.GCD.Properties
open import ... |
open import Agda.Builtin.Bool public
open import Agda.Builtin.Nat public
data IsTrue : Bool → Set where
instance truth : IsTrue true
postulate
foo : {{IsTrue (3 < 2)}} → Nat
test : Nat
test = foo
|
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Naturals
open import Numbers.Naturals.Order
open import Numbers.Naturals.Order.Lemmas
open import Numbers.Naturals.Order.WellFounded
open import Orders.WellFounded.Induction... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.DStructures.Structures.PeifferGraph where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Structure
open i... |
open import FRP.JS.Behaviour using ( Beh ; [_] ; map ; accumHoldBy )
open import FRP.JS.Event using ( Evt ; tag )
open import FRP.JS.DOM using ( DOM ; element ; text ; listen ; click ; _++_ ; element+ ; _+++_ )
open import FRP.JS.RSet using ( RSet ; ⟦_⟧ ; ⟨_⟩ ; _⇒_ )
open import FRP.JS.Nat using ( ℕ ; _+_ ; _*_ ; _∸_ ;... |
module _ where
open import DeadCodePatSyn.Lib
-- Check that pattern synonyms count when computing dead code
f : _ → Set₁
f not-hidden = Set
|
module Eq where
import Prelude
open Prelude
abstract
data _=^=_ {a : Set} (x y : a) : Set1 where
leibniz : ((P : a -> Set) -> P x <-> P y) -> x =^= y
leibnizSubst : {a : Set} -> {x y : a}
-> x =^= y -> (P : a -> Set) -> P x -> P y
leibnizSubst (leibniz f) P p = iffLeft (f P... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Maybes where one of the elements satisfies a given property
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Maybe.Relation.Unary.Any where... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Data.NatPlusOne.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Univalence
open import Cubical.Data.Nat
open import Cubical.Data.NatPlusOne.Base
open import Cubical.Reflection.StrictEquiv
1+Pat... |
-- Quotients of additive categories
{-# OPTIONS --safe #-}
module Cubical.Categories.Additive.Quotient where
open import Cubical.Algebra.AbGroup.Base
open import Cubical.Categories.Additive.Base
open import Cubical.Categories.Additive.Properties
open import Cubical.Categories.Category.Base
open import Cubical.Categor... |
module sn-calculus-compatconf.same where
open import sn-calculus-compatconf.base
open import sn-calculus
open import sn-calculus-confluence.helper
using (ready-irr-on-irr-θʳ)
open import utility renaming (_U̬_ to _∪_)
open import context-properties
using (get-view ; wrap-rho
; ->E-view ; ->pot-view ; wrap-... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The lifting of a strict order to incorporate a new supremum
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- This module is designed to be used with... |
-- The SIP applied to groups
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.GroupPath where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function using (_∘_)
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open im... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Data.List.Properties where
open import Agda.Builtin.List
open import Cubical.Core.Everything
open import Cubical.Foundations.GroupoidLaws
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Prelude
open import Cubical.Data.Empty as ⊥... |
open import Data.Product using ( ∃ ; _×_ ; _,_ ; proj₁ ; proj₂ )
open import Relation.Unary using ( _∈_ )
open import Web.Semantic.DL.ABox using ( ABox ; ⟨ABox⟩ ; _,_ )
open import Web.Semantic.DL.ABox.Interp using
( Interp ; _,_ ; ⌊_⌋ ; ind ; _*_ )
open import Web.Semantic.DL.ABox.Interp.Morphism using
( _≲_ ; _... |
module Utility.Bool where
open import Agda.Builtin.Bool using (Bool; true; false)
not : Bool → Bool
not false = true
not true = false
_or_ : Bool → Bool → Bool
true or _ = true
_ or true = true
_ or _ = false
_and_ : Bool → Bool → Bool
true and true = true
_ and _ = false
|
{-# OPTIONS --no-pattern-matching #-}
id : {A : Set} (x : A) → A
id x = x
const : {A B : Set} (x : A) (y : B) → A
const x y = x
happ : {A B C : Set} (f : A → B → C) (g : A → B) (x : A) → C
happ f g x = f x (g x)
K = const
S = happ
I : {A : Set} (x : A) → A
I = S K K
-- Mmh, pretty boring...
|
-- Andreas, 2013-11-07
-- Instance candidates are now considered module judgemental equality.
module Issue899 where
postulate
A B : Set
f : {{ x : A }} → B
instance a : A
instance
a' : A
a' = a
test : B
test = f
{- The previous code fails with the following message:
Resolve implicit argument _x_257 : A... |
{-# OPTIONS --cubical --no-import-sorts #-}
module Test3 where
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Cubical.Foundations.Logic
abstract
!_ : ∀{ℓ} {X : Type ℓ} → X → X
! x = x
!-≡ : ∀{ℓ} {X : Type ℓ} → (! X) ≡ X
!-≡ = refl -- makes use of the definiti... |
module Oscar where
import Everything
import Test
-- journals
import $RequiredForInstanceResolution
import AbstractStrictlyPositive
import AgdaErrorDisplayForm197
import AgdaFeatureInstanceResolutionViaConstraint
import AgdaFeatureNeedHiddenVariableTypeConstructorWrapper
import AgdaFeatureNoInstanceFromHidden
import ... |
module Coirc where
open import Coinduction
open import IO
open import Data.String
open import Data.Maybe
data SP (A B : Set) : Set where
get : (A → SP A B) → SP A B
put : B → ∞ (SP A B) → SP A B
data Event : Set where
notice mode numeric ping : Event
privmsg : (source text : String) → Event
data Action : Set... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import Functions.Definition
open import Groups.Definition
open import Rings.Homomorphisms.Definition
open import Setoids.Setoids
open import Rings.Definition
open import Sets.EquivalenceRelations
open import Groups.Lemmas
open import Rings.Ideals.Definition
modu... |
module BasicIPC.Metatheory.Hilbert-TarskiGluedClosedImplicit where
open import BasicIPC.Syntax.Hilbert public
open import BasicIPC.Semantics.TarskiGluedClosedImplicit public
open ImplicitSyntax (∅ ⊢_) public
-- Completeness with respect to a particular model, for closed terms only.
module _ {{_ : Model}} where
r... |
------------------------------------------------------------------------
-- Code related to the paper draft "Structurally Recursive Descent
-- Parsing"
--
-- Nils Anders Danielsson and Ulf Norell
------------------------------------------------------------------------
module StructurallyRecursiveDescentParsing where
... |
module IrrelevantRecordField where
import Common.Irrelevance
record R (A : Set) : Set where
constructor inn
field
.out : A
proj : {A : Set} -> R A -> A
proj (inn a) = a
-- needs to fail, since a is irrelevant under inn |
{-# OPTIONS --without-K --rewriting #-}
module Base where
open import lib.Basics
open import lib.Funext
open import lib.NType2
open import lib.types.Truncation
open import lib.types.Bool
quodlibet : {i : ULevel} {A : Type i} → ⊥ → A
quodlibet = ⊥-elim
-- infix notation for piping a term argument i... |
record R : Set where
a : R
a = r -- r should not ever be in scope
|
-- Andreas, 2021-07-14, issue #5470, reported by HarrisonGrodin
--
-- Importing a rewrite rule that was declared private
-- at the point of definition caused an internal error.
{-# OPTIONS --rewriting #-}
-- {-# OPTIONS -v impossible:10 #-}
-- {-# OPTIONS -v rewriting:100 #-}
module Issue5470 where
open import Agda... |
------------------------------------------------------------------------
-- Connectedness for pointed types
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe #-}
import Equality.Path as P
module Pointed-type.Connected
{e⁺} (eq : ∀ {a p} → P.Equality-with-p... |
-- Example:
-- postulate ℓ : Lvl.Level
-- postulate A B C D : Type{ℓ}
-- postulate a : A
-- postulate ab : A → B
-- postulate bc : B → C
-- postulate cd : C → D
--
-- ad : A → D
-- ad =
-- A ⇒-[ ab ]
-- B ⇒-[ bc ]
-- C ⇒-[ cd ]
-- D ⇒-end
--
-- d : D
-- d =
-- a ⇒
-- A ⇒-[ ab... |
{-
This file contains:
- Definitions equivalences
- Glue types
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Core.Glue where
open import Cubical.Core.Primitives
open import Agda.Builtin.Cubical.Glue public
using ( isEquiv -- ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (f : A → B) → Type (ℓ ... |
module Tactic.Nat.Subtract.Reflect where
open import Prelude
import Agda.Builtin.Nat as Builtin
open import Builtin.Reflection
open import Control.Monad.State
open import Control.Monad.Transformer
open import Tactic.Reflection
open import Tactic.Reflection.Quote
open import Tactic.Nat.Reflect
open import Tactic.Nat.... |
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
record R₁ (F : Set → Set) : Set₁ where
constructor mkR₁
field
f₁ : ∀ {A} → A → F A
open R₁ {{...}}
record R₂ (F : Set → Set) : Set₁ where
constructor mkR₂
field
instance
r₁ : R₁ F
record R₃ (_ : Set) : Set where
constructor mkR₃
pos... |
open import Relation.Binary.Core
module PLRTree.DropLast.Heap {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import PLRTree {A}
open import PLRTree.Drop _≤_ tot≤
open import PLRTree.Heap _≤_
lemma-dropLast-≤* : {x : A}{t : PLRTree} → x ≤* t → x ≤* dropLast t
... |
data D : Set where
@0 c : D
postulate
P : D → Set
p : (x : D) → P x
bad : P c
bad = p _
|
module Datalog where
open import Data.Nat as ℕ
open import Data.List
open import Data.Integer as ℤ
open import Relation.Binary.PropositionalEquality
open import Data.List.Any
module Term where
data tt : Set where
τ-int : tt
open Membership (setoid tt)
ctx = List tt
data Lit : tt → Set where
int : ℤ ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Well-founded induction
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary
module Induction.WellFounded where
open import Da... |
-- Andreas, 2016-02-02 postpone type checking of extended lambda
-- See also issue 480 and 1159
open import Common.Maybe
open import Common.String
record ⊤ : Set where
record IOInterface : Set₁ where
field Command : Set
Response : (m : Command) → Set
open IOInterface
data IO I A : Set where
do' ... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.FunctionOver
open import homotopy.elims.CofPushoutSection
module cohomology.MayerVietoris {i} where
{- Mayer-Vietoris Sequence: Given a span X ←f– Z –g→ Y, the cofiber space
of the natural map [reglue : X ∨ Y → X ⊔_Z Y] (defined below) is equival... |
module hnf-tests where
open import bool
open import list
open import nat
open import product
open import string
open import cedille-types
open import conversion
open import ctxt
open import is-free
open import rename
open import subst
open import syntax-util
open import to-string
S : term
S = mlam "n" (mlam "s" (m... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Bicategory
-- The two Hom 2-functors from (op C) and C to Cats.
module Categories.Pseudofunctor.Hom {o ℓ e t} (C : Bicategory o ℓ e t) where
open import Data.Product using (_,_)
import Categories.Bicategory.Extras as BicategoryExtras
open import Categories.... |
------------------------------------------------------------------------
-- A counterexample: The trace of stack sizes produced by the virtual
-- machine is not necessarily bisimilar to that produced by the
-- instrumented interpreter
------------------------------------------------------------------------
module Lamb... |
{-# OPTIONS --without-K --safe #-}
module Categories.2-Category where
open import Level
open import Categories.Category.Monoidal.Instance.StrictCats using (module Product)
open import Categories.Enriched.Category using (Category)
2-Category : (o ℓ e t : Level) → Set (suc (o ⊔ ℓ ⊔ e ⊔ t))
2-Category o ℓ e t = Catego... |
-- {-# OPTIONS -v tc.with:40 #-}
module RewriteAndWhere where
open import Common.Equality
data ℕ : Set where
zero : ℕ
-- good : (a b : ℕ) → a ≡ b → b ≡ a
-- good a b eq with a | eq
-- ... | .b | refl = foo
-- where
-- foo : b ≡ b
-- foo = refl
mutual
aux : (a b : ℕ)(w : ℕ) → w ≡ b → b ≡ w
aux a b .... |
{-# OPTIONS --type-in-type #-} -- yes, I will let you cheat in this exercise
{-# OPTIONS --allow-unsolved-metas #-} -- allows import, unfinished
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- CS410 2017/... |
------------------------------------------------------------------------------
-- Totality properties for Forest
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-... |
module Oscar.Builtin.Objectevel where
open import Agda.Primitive public
using ()
renaming (Level to Ł̂; lzero to Ø̂; lsuc to ↑̂_; _⊔_ to _∙̂_)
infix 0 Ø_
Ø_ : ∀ 𝔬 → Set (↑̂ 𝔬)
Ø_ 𝔬 = Set 𝔬
|
module DigitsInNames where
data 1D : Set where
1d : 1D
2d : 1D -> 1D
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Consequences of a monomorphism between monoid-like structures
------------------------------------------------------------------------
-- See Data.Nat.Binary.Properties for examples of how this and similar
-- mo... |
------------------------------------------------------------------------------
-- Testing the --without-K flag
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
... |
open import Level
open import Data.Unit
open import Data.Bool
open import Data.Nat
open import Data.Fin
open import Data.Sum
open import Data.Maybe
open import Data.Product
open import Data.Vec using (Vec; _∷_; [])
import Data.Vec as Vec
open import Data.List
open import Relation.Binary.PropositionalEquality
---------... |
module Binding where
open import Agda.Primitive
data Freer {ℓ} (F : Set ℓ → Set (lsuc ℓ)) (A : Set (lsuc ℓ)) : Set (lsuc ℓ) where
pure : A → Freer F A
free : ∀ {a : Set ℓ} → (a → Freer F A) → F a → Freer F A
|
{- LEMMAS FOR BOUNDING THEOREM WITH NEW COMPLEXITY LANGUAGE -}
open import Preliminaries
open import Source
open import Pilot
open import Translation-New
module Bounding-Lemmas-New where
mutual
valBound : ∀{τ} → (e : [] Source.|- τ) → val e → [] Pilot.|- ⟨⟨ τ ⟩⟩ → Set
valBound .z z-isval E = z ≤s E
val... |
module StateSizedIO.Object where
open import Data.Product
open import StateSizedIO.Base public
{-
-- This definition was probably moved to StateSizedIO.Base
-- and by accident left here. Delete this.
record Interfaceˢ : Set₁ where
field
Stateˢ : Set
Methodˢ : Stateˢ → Set
Resultˢ : (s : Stateˢ) ... |
{-# OPTIONS --type-in-type #-}
open import Data.Unit
open import Data.Product
open import Data.List hiding ( concat )
open import Data.String
open import Relation.Binary.PropositionalEquality
module Spire.Examples.InferredPropositionalDesc where
----------------------------------------------------------------------
e... |
{-# OPTIONS --without-K #-}
module Midi where
open import Agda.Builtin.String using (String)
open import Data.Fin using (toℕ)
open import Data.Nat using (ℕ)
open import Data.List
open import Data.Product using (_,_)
open import Note
open import Pitch
open import MidiEvent
open import Music
{-# FOREIGN GHC
import ... |
-- | In this module we show that the substream relation is transitive.
open import Size
open import Streams
open import Relation.Binary.PropositionalEquality as P
open import Data.Product
open import Function
tl' : ∀{A} → Stream A → Stream A
tl' s = tl s {∞}
{-
data Reachable {A : Set} (P : A → Set) : Stream A → Set... |
module Bools where
open import Agda.Builtin.Bool public
renaming (Bool to 𝔹)
not : 𝔹 → 𝔹
not true = false
not false = true
-- T : 𝔹 → Set
-- T true = ⊤
-- T false = ⊥
if_then_else_ : ∀ {a} {A : Set a} → 𝔹 → A → A → A
if true then t else _ = t
if false then _ else f = f
_∧_ : 𝔹 → 𝔹 → 𝔹
true ∧ b = b
fa... |
{-
Definition of finitely indexed types
A type is finitely indexed if, for some `n`, there merely exists a
surjective function from `Fin n` to it. Note that a type doesn't need
to be a set in order for it to be finitely indexed. For example, the
circle is finitely indexed.
This definition is weaker than `isFinSet`.
... |
{-# OPTIONS --without-K #-}
module higher.circle.core where
open import equality
data S¹ : Set where
base : S¹
postulate loop : base ≡ base
private
module Eliminators' {i}(B : S¹ → Set i)
(m : B base)
(l : subst B loop m ≡ m) where
elim' : (x : S¹) → B x
elim'... |
open import Type
open import Logic.Classical as Logic using (Classical)
open import Logic.Predicate as Logic using ()
module Formalization.ClassicalPropositionalLogic.SequentCalculus ⦃ classical : ∀{ℓ} → Logic.∀ₗ(Classical{ℓ}) ⦄ where
import Lvl
open import Data
open import Data.Boolean
import Data.Boolean.... |
open import Prelude
module Bij where
record bij (From To : Set) : Set where
field
convert : From → To
inj : ∀{f1 f2} → convert f1 == convert f2 → f1 == f2
surj : (t : To) → Σ[ f ∈ From ] (convert f == t)
convert-inv : ∀{F T : Set} {{bijFT : bij F T}} → T → F
convert-inv {{bijFT}} t ... |
module Control.Monad.Identity where
open import Prelude
open import Container.Foldable
open import Container.Traversable
record Identity {a} (A : Set a) : Set a where
constructor mkIdentity
field
runIdentity : A
open Identity public
instance
FunctorId : ∀ {a} → Functor (Identity {a})
runIdentity (fmap ... |
------------------------------------------------------------------------
-- Well-typed substitutions
-- From
------------------------------------------------------------------------
module Extensions.Fin.TypedSubstitution where
import Category.Applicative.Indexed as Applicative
open import Data.Fin using (Fin; zero;... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed applicative functors
------------------------------------------------------------------------
-- Note that currently the applicative functor laws are not included
-- here.
{-# OPTIONS --without-K --safe... |
import Fragment.Algebra.Algebra
import Fragment.Algebra.Free
import Fragment.Algebra.Free.Atoms
import Fragment.Algebra.Free.Base
import Fragment.Algebra.Free.Evaluation
import Fragment.Algebra.Free.Monad
import Fragment.Algebra.Free.Properties
import Fragment.Algebra.Free.Syntax
import Fragment.Algebra.Homomorphism
im... |
open import Agda.Builtin.Bool
open import Agda.Builtin.List
data Singleton : List Bool → Set where
singleton : ∀ b → Singleton (b ∷ [])
Works : (bs : List Bool) → Singleton bs → Set₁
Works bs s with s
... | singleton b with Set
Works .(b ∷ []) s | singleton b | _ = Set
Fails : (bs : List Bool) → Singleton bs → Set... |
{-# OPTIONS --without-K --safe #-}
open import Level
open import Categories.Category using (Category; _[_,_])
-- Various conclusions that can be drawn from Yoneda
-- over a particular Category C
module Categories.Yoneda.Properties {o ℓ e : Level} (C : Category o ℓ e) where
open import Function.Base using (_$_)
open ... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category using (Category; module Commutation)
open import Categories.Category.Cartesian using (Cartesian)
-- Defines the following properties of a Category:
-- Cartesian.SymmetricMonoidal
-- a Cartesian category is Symmetric Monoidal if its induced monoidal... |
module plfa-exercises.Practice4 where
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; cong)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.Product using (_×_ ; ∃-syntax; ∃; _,_) -- renaming (_,_ to ⟨_,_⟩)
open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_; _≤_; _≤?_; _≟_; s... |
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇.
-- Translation between different formalisations of syntax.
module BasicIS4.Syntax.Translation where
open import BasicIS4.Syntax.Common public
import BasicIS4.Syntax.ClosedHilbertSequential as CHS
import BasicIS4.Syntax.ClosedHilbert as CH
import BasicIS4.Sy... |
module PiQ.AuxLemmas where
open import Data.Empty
open import Data.Unit hiding (_≟_)
open import Data.Sum
open import Data.Product
open import Data.Maybe
open import Relation.Binary.Core
open import Relation.Binary
open import Relation.Nullary
open import Relation.Binary.PropositionalEquality
open import PiQ.Syntax
ope... |
{-# OPTIONS --universe-polymorphism #-}
module NiceGoals where
------------------------------------------------------------------------
postulate
Level : Set
zero : Level
suc : (i : Level) → Level
_⊔_ : Level → Level → Level
{-# BUILTIN LEVEL Level #-}
{-# BUILTIN LEVELZERO zero #-}
{-# BUILTIN LEVEL... |
open import FRP.JS.Nat using ( ℕ ; suc ; _+_ ; _≟_ ; _<_ )
open import FRP.JS.Array using ( Array ; IArray ; [] ; _∷_ ; array ; ⟨⟩ ; ⟨_ ; _,_ ; _⟩ ; lookup ; lookup? ; map ; filter ; _≟[_]_ ; _⊆[_]_ ; _++_ )
open import FRP.JS.Bool using ( Bool ; not )
open import FRP.JS.Maybe using ( Maybe ; just ; nothing ) renaming ... |
variable
S : Set
data D (A : Set) : Set1 where
d : S → D A
|
-- Andreas, 2020-04-19, issue #4560, raised by Andrea
-- Having both matching on constructor and copattern matching
-- for non-eta records leads to loss of subject reduction.
open import Agda.Builtin.Equality
postulate
A : Set
a : A
record R : Set where
constructor con
no-eta-equality
field
X Y : A
fo... |
open import Prelude
open import core
open import contexts
module lemmas-freshG where
-- the def above buries the sort of obvious pattern matching we'd like to
-- do on the freshness in the conclusion, so we need lemmas that extract
-- it for each constructor
freshΓ-asc : {A : Set} → {Γ : A ctx} → ∀{e τ} → fres... |
open import Data.Nat --using (ℕ; suc; zero; _≤?_; _≤_; s≤s; z≤n)
open import Data.Bool using (true; false)
--open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import Relation.Nullary -- using (Dec; yes; no; _because_)
open import Relation.Nullary.Decidable --using (True; fromWitness)
--open impor... |
module dependentProduct2 where
postulate A : Set
postulate B : A -> Set
data AB : Set where
p : (a : A) -> B a -> AB
π0 : AB -> A
π0 (p a b) = a
π1 : (ab : AB) -> B (π0 ab)
π1 (p a b) = b
postulate a : A
postulate b : B a
ab : AB
ab = p a b
postulate ab' : AB
a' : A
a' = π0 ab'
b' : B a'
b' = π1 ab'
|
------------------------------------------------------------------------
-- M-types for indexed containers, defined coinductively (in Cubical
-- Agda)
------------------------------------------------------------------------
{-# OPTIONS --erased-cubical --safe --guardedness #-}
import Equality.Path as P
module Contai... |
module Data.Strict.Primitive where
data Strict (A : Set) : Set where
! : A → Strict A
{-# IMPORT Data.Strict.AgdaFFI #-}
{-# COMPILED_DATA Strict Data.Strict.AgdaFFI.Strict Data.Strict.AgdaFFI.Strict #-}
|
------------------------------------------------------------------------------
-- Definition of FOTC streams using the Agda co-inductive combinators
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# O... |
module Numeral.Rational.SternBrocot where
|
module FFI.Data.Aeson where
open import Agda.Builtin.Bool using (Bool)
open import Agda.Builtin.String using (String)
open import FFI.Data.ByteString using (ByteString)
open import FFI.Data.HaskellString using (HaskellString; pack)
open import FFI.Data.Maybe using (Maybe)
open import FFI.Data.Either using (Either; ma... |
------------------------------------------------------------------------
-- Various utility functions
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Utilities where
open import Data.Bool
open import Data.Bool.Properties using (T-∧)
open import Data.... |
------------------------------------------------------------------------
-- Booleans
------------------------------------------------------------------------
{-# OPTIONS --guardedness #-}
module Examples.Bool where
open import Codata.Musical.Notation
open import Data.Bool
open import Relation.Binary.PropositionalEqu... |
{-# OPTIONS --safe #-}
module Cubical.Categories.Additive.Instances.Terminal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Categories.Category
open import Cubical.Categories.Additive.Base
open import Cubical.Categories.Instances.Discrete
open import Cubica... |
------------------------------------------------------------------------
-- A view of the syntax
------------------------------------------------------------------------
module RecursiveTypes.Syntax.UnfoldedOrFixpoint where
open import RecursiveTypes.Syntax
open import RecursiveTypes.Substitution
-- Unfolded types, ... |
-- We define ZigZag-complete relations and prove that quasi equivalence relations
-- give rise to equivalences on the set quotients.
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.ZigZag.Base where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubic... |
{-# OPTIONS --without-K #-}
module equality where
open import equality.core public
open import equality.reasoning public
open import equality.groupoid public
open import equality.calculus public
open import equality.inspect public
|
module Productivity (char : Set) where
open import Common.Coinduction
infix 50 _⋆ _+
infixl 40 _⊛_
infixl 30 _∣_
data P : Set where
ε : P
sym : char -> P
_⊛_ : ∞ P -> ∞ P -> P
_∣_ : ∞ P -> ∞ P -> P
mutual
_⋆ : P -> P
p ⋆ = ♯ ε ∣ ♯ (p +)
_+ : P -> P
p + = ♯ p ⊛ ♯ (p ⋆... |
-- 2012-10-20 Andreas
module Issue721a where
data Bool : Set where
false true : Bool
record Foo (b : Bool) : Set where
field
_*_ : Bool → Bool → Bool
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
test : (F : Foo false) (x : Bool) → let open Foo F in _*_ x ≡ (λ x → x)
test F x = x
-- Don't want t... |
module ExtractCaseSplit where
open import Data.Maybe
open import Agda.Builtin.Bool
not : Bool -> Bool
not true = false
not false = true
func : Maybe Bool -> Bool
func nothing = false
func (just x) = not x
open import Data.List
func2 : List Bool -> Bool
func2 [] = true
func2 (x ∷ x₁) = not (func2 x₁)
|
open import Data.Product using ( ∃ ; _×_ ; _,_ )
open import Relation.Binary.PropositionalEquality using
( _≡_ ; refl ; trans ; cong₂ )
open import Relation.Unary using ( ∅ ; _∪_ )
open import Web.Semantic.DL.Signature using ( Signature ; CN ; RN )
open import Web.Semantic.Util using ( id ; _∘_ ; Subset ; ⁅_⁆ )
modu... |
-- Andreas, 2014-05-02 Negative fixities allow now.
module _ where
infix -1 _+_
infix 0 _*_
postulate
_+_ : Set1 → Set2 → Set1
_*_ : Set2 → Set2 → Set2
test = Set + Set1 * Set1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.