id
stringlengths
27
136
text
stringlengths
4
1.05M
algebraic-stack_agda0000_doc_6624
module _ where open import Agda.Builtin.Equality postulate A : Set P : A → Set data Id (A : Set) : Set where id : A → Id A data Flat (@♭ A : Set) : Set where con : (@♭ x : A) → Flat A counit : {@♭ A : Set} → Flat A → A counit (con x) = x test2 : (@♭ x : Id A) → Flat A test2 (id x) = con x test3 : (@♭ x :...
algebraic-stack_agda0000_doc_6625
-- {-# OPTIONS -v 10 #-} -- {-# OPTIONS -v auto:100 #-} postulate A : Set X : Set₂ X = (P : Set₁) → (A → P) → P foo : X → X foo x P f = {!!} -- Invoke Agsy in the hole above. Result: -- -- Set != Set₁ -- when checking that the expression A has type Set₁ -- -- The error message points to A in the definition of X...
algebraic-stack_agda0000_doc_6626
module sv20.assign2.Second where -- The solution for the second task starts in line 53 open import Data.Unit using (⊤; tt) open import Data.Product using (_×_ ; ∃) renaming (_,_ to ⟨_,_⟩) open import Relation.Nullary using (¬_) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Function using (_∘_) -- For the s...
algebraic-stack_agda0000_doc_6627
module NatTactic where module _ where open import Agda.Builtin.Nat open import Agda.Builtin.List -- n .. 1 downFrom : Nat → List Nat downFrom zero = [] downFrom (suc n) = suc n ∷ downFrom n module AgdaPreludeTest where open import Prelude open import Tactic.Nat -- All tactics ...
algebraic-stack_agda0000_doc_6628
module Issue326 where open import Common.Prelude open import Common.MAlonzo using () -- see issue 561 postulate QName : Set printBool : Bool → IO Unit {-# BUILTIN QNAME QName #-} {-# COMPILED printBool print #-} primitive primQNameEquality : QName → QName → Bool main : IO Unit main = printBool (primQNameEqual...
algebraic-stack_agda0000_doc_6629
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- we use duality to prove properties about coequalizer module Categories.Diagram.Coequalizer.Properties {o ℓ e} (C : Category o ℓ e) where open Category C open import Categories.Diagram.Coequalizer C open import Categories.Morphism C open import Ca...
algebraic-stack_agda0000_doc_6630
------------------------------------------------------------------------ -- A lookahead operator cannot be defined ------------------------------------------------------------------------ -- In "Parsing with First-Class Derivatives" Brachthäuser, Rendel and -- Ostermann state that "Lookahead and [...] cannot be expres...
algebraic-stack_agda0000_doc_6631
------------------------------------------------------------------------------ -- Agda-Prop Library. -- Theorems of ⇔ connective. ------------------------------------------------------------------------------ open import Data.Nat using ( ℕ ) module Data.PropFormula.Theorems.Biimplication ( n : ℕ ) where ------------...
algebraic-stack_agda0000_doc_6632
module Logic.ChainReasoning where module Mono where module Homogenous { A : Set } ( _==_ : A -> A -> Set ) (refl : (x : A) -> x == x) (trans : (x y z : A) -> x == y -> y == z -> x == z) where infix 2 chain>_ infixl 2 _===_ infix 3 _by_ chain>_ : (x : A) -> x == x chain> x...
algebraic-stack_agda0000_doc_6633
{-# OPTIONS --without-K --no-pattern-matching #-} module Ch2-7 where open import Level hiding (lift) open import Ch2-1 open import Ch2-2 open import Ch2-3 open import Ch2-4 open import Ch2-5 open import Ch2-6 open import Data.Product open import Function using (id; _∘_) Definition-2-7-2-i : ∀ {a b} {A : Set a} {P...
algebraic-stack_agda0000_doc_6634
-- In a mutual block, either all or none must have a MEASURE declaration. module _ where open import Common.Prelude mutual {-# MEASURE n #-} f : (n : Nat) → Nat f zero = zero f (suc n) = g n {-# MEASURE n #-} g : (n : Nat) → Nat g zero = zero g (suc n) = suc (f n)
algebraic-stack_agda0000_doc_6635
{-# OPTIONS --without-K --safe #-} module README where -- Formalization for "Decidability of Conversion for Type Theory in Type Theory" -- Git repository: https://github.com/mr-ohman/logrel-mltt ------------------ -- INTRODUCTION -- ------------------ -- A minimal library necessary for formalization: -- Embedding...
algebraic-stack_agda0000_doc_6636
{-# OPTIONS --without-K --rewriting #-} open import lib.Base open import lib.PathFunctor open import lib.PathGroupoid open import lib.path-seq.Reasoning module lib.path-seq.Ap where module _ {i j} {A : Type i} {B : Type j} (f : A → B) where ap-seq : {a a' : A} → a =-= a' → f a =-= f a' ap-seq [] = [] ap-seq (...
algebraic-stack_agda0000_doc_6638
open import Common open import Global open import Projection open import Local open import Data.Fin open import Data.Product open import Data.Vec open import Relation.Binary.PropositionalEquality n = 4 Role = Fin n p : Role p = zero q : Role q = suc zero r : Role r = suc (suc zero) s : Role s = suc (suc (suc zer...
algebraic-stack_agda0000_doc_6639
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Numbers.Integers.RingStructure.Ring open import Semirings.Definition open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition ...
algebraic-stack_agda0000_doc_6637
{-# OPTIONS --without-K #-} --open import HoTT open import homotopy.3x3.PushoutPushout open import homotopy.3x3.Transpose import homotopy.3x3.To as To import homotopy.3x3.From as From open import homotopy.3x3.Common module homotopy.3x3.ToFrom2 {i} (d : Span^2 {i}) where open Span^2 d open M d hiding (Pushout^2) open...
algebraic-stack_agda0000_doc_14096
module x01naturals where {- ------------------------------------------------------------------------------ naturals : inductive datatype definition as a pair of inference rules: -- no assumptions --------- zero : ℕ -- base case m : ℕ -- assuming m is Natural --------- ...
algebraic-stack_agda0000_doc_14097
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.Groups.Connected where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.Groups.Unit open import Cubical.Foundations.HLevels open import Cubical.Foundations.Prelude open import C...
algebraic-stack_agda0000_doc_14099
module maryjohn2 where postulate Person : Set postulate john : Person postulate mary : Person postulate barbara : Person postulate IsStudent : Person -> Set postulate maryIsStudent : IsStudent mary postulate implication : IsStudent mary -> IsStudent john Lemma1 : Set Lemma1 = IsS...
algebraic-stack_agda0000_doc_14100
------------------------------------------------------------------------ -- The Agda standard library -- -- Finite sets, based on AVL trees ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (StrictTotalOrder) module Data.AVL....
algebraic-stack_agda0000_doc_14101
{-# OPTIONS --warning=error --safe --without-K --guardedness #-} open import Everything.Safe open import Numbers.Reals.Definition open import Fields.Orders.Limits.Definition open import Rings.Orders.Partial.Bounded open import Rings.Orders.Total.Bounded open import Rings.Orders.Total.BaseExpansion open import Fields....
algebraic-stack_agda0000_doc_14102
module STLC.Properties.Determinism where open import STLC.Term open import STLC.Term.Reduction open import Data.Nat using (ℕ; _+_) open import Relation.Nullary using (¬_) open import Relation.Nullary.Negation using (contradiction) open import Data.Product using (Σ; _,_; ∃; Σ-syntax; ∃-syntax) open import Relation...
algebraic-stack_agda0000_doc_14103
-- Martin-Löf identity type {-# OPTIONS --without-K --safe #-} module TypeTheory.Identity where open import Level renaming (zero to lzero; suc to lsuc) open import Relation.Binary open import Relation.Binary.PropositionalEquality as P using (refl; _≡_) renaming (trans to ≡-trans; sym to ≡-sym; cong to ≡-cong) impor...
algebraic-stack_agda0000_doc_14104
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 ; _...
algebraic-stack_agda0000_doc_14105
open import Syntax import Renaming import Instantiation module Theory (𝕊 : Signature) where open Expression 𝕊 open Instantiation open Renaming infix 5 □⦂_ infix 5 _≡_⦂type-by□ infix 5 _≡_⦂_by□ data BoundaryThesis : ∀ (cl : Class) (𝕄 : MShape) (γ : VShape) → Set where □⦂type : ∀ {𝕄 γ} → Boundar...
algebraic-stack_agda0000_doc_14106
------------------------------------------------------------------------ -- The Agda standard library -- -- Non-empty lists ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.NonEmpty where open import Category.Monad open import Data.Bool.Base...
algebraic-stack_agda0000_doc_14107
module Type.Properties.Singleton.Proofs where import Data.Tuple as Tuple open import Data.Proofs open import Function.Axioms open import Logic.Classical open import Logic import Lvl open import Type.Properties.Empty open import Type.Properties.Inhabited open import Type.Properties.MereProposition open import...
algebraic-stack_agda0000_doc_14108
-- Shadowing is allowed. module Shadow where module M (A : Set) where id : Set -> Set id A = A
algebraic-stack_agda0000_doc_14109
{-# OPTIONS --without-K #-} open import Base open import Homotopy.Connected {- Wedge is a pushout. -} module Homotopy.Wedge where import Homotopy.Pushout as P record wedge-diag i : Set (suc i) where constructor diag_,_,_,_ field A : Set i B : Set i a : A b : B f : uni...
algebraic-stack_agda0000_doc_14110
-- Patterns are parsed as expressions. That means that expressions can contain -- pattern parts. That's of course not ok. module NotAnExpression where X = x @ y -- as pattern as an expression
algebraic-stack_agda0000_doc_14111
module Data.Bin.BitListBijection where -- -- This module gives a bijection between the two setoids: -- - the set (ℕ) -- - The set (List Bit), interpreted as least-significant-bit first, -- with the equivalence relation that ignores the zeroes at the end of the list open import Data.List open import Data.List.Pr...
algebraic-stack_agda0000_doc_14098
{-# OPTIONS --without-K #-} module LeftCancellation where open import Data.Empty using (⊥; ⊥-elim) open import Data.Unit using (⊤; tt) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Product using (_,_; proj₁; proj₂) open import Function renaming (_∘_ to _○_) open import Relation.Binary.PropositionalE...
algebraic-stack_agda0000_doc_5472
module ChainRule where import Sets import Functor import Logic.ChainReasoning.Poly as CR import Isomorphism import Derivative open Derivative open Sets open Functor open Semantics open Isomorphism module Chain = CR _==_ (\x -> refl{x = x}) (\x y z -> trans{x = x}{y}{z}) open Chain chain-ru...
algebraic-stack_agda0000_doc_5473
module Data.List.Relation where import Lvl import Data open import Data.List open import Logic open import Logic.Propositional open import Structure.Setoid open import Type private variable ℓ ℓₑ ℓₑ₁ ℓₑ₂ : Lvl.Level private variable T : Type{ℓ} data Empty {ℓ}{T : Type{ℓ}} : List(T) → Stmt{Lvl.𝐒(ℓ)} where ...
algebraic-stack_agda0000_doc_5474
-- An example of something where normalization is surprisingly slow {-# OPTIONS --cubical --safe #-} module Cubical.Experiments.Problem where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Data.Int open import Cubical.HITs.S1 open import Cubical.HITs.S2 open import C...
algebraic-stack_agda0000_doc_5475
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Equivalence module HoTT.Equivalence.Coproduct where open variables private variable A' B' : 𝒰 i +-empty₁ : 𝟎 {i} + B ≃ B +-empty₁ = let open Iso in iso→eqv λ where .f (inl ()) .f (inr b) → b .g → inr .η (inl ()) .η (inr b) → refl ...
algebraic-stack_agda0000_doc_5476
module Datoid where import Equiv import Prelude open Equiv open Prelude data Datoid : Set1 where datoid : (a : Set) -> DecidableEquiv a -> Datoid El : Datoid -> Set El (datoid a _) = a datoidEq : (a : Datoid) -> DecidableEquiv (El a) datoidEq (datoid _ eq) = eq datoidRel : (a : Datoid) ->...
algebraic-stack_agda0000_doc_5477
open import MLib.Prelude.FromStdlib open import Relation.Binary using (Decidable; IsStrictTotalOrder) module MLib.Prelude.DFS {v p e} {V : Set v} (_⇒_ : V → V → Set e) {_<_ : V → V → Set p} (isStrictTotalOrder : IsStrictTotalOrder _≡_ _<_) where open import MLib.Prelude.Path open Bool using (T) open import Func...
algebraic-stack_agda0000_doc_5478
open import Oscar.Prelude open import Oscar.Class.[ExtensibleType] open import Oscar.Data.Proposequality module Oscar.Class.[ExtensibleType].Proposequality where instance [ExtensibleType]Proposequality : ∀ {a} {b} {A : Set a} {B : A → Set b} → [ExtensibleType] (λ {w} → Proposequality⟦ B w ⟧) [ExtensibleType]Pro...
algebraic-stack_agda0000_doc_5479
{-# OPTIONS --cubical --safe #-} module TreeFold where open import Prelude open import Data.List open import Algebra using (Associative) open import Data.List.Properties using (foldr-fusion; foldl-fusion; foldl′-foldl) infixr 5 _^_&_ data Spine (A : Type a) : Type a where &0 : Spine A _^_&_ : A → ℕ → Spine A → S...
algebraic-stack_agda0000_doc_5480
------------------------------------------------------------------------------ -- Testing the translation of definitions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymor...
algebraic-stack_agda0000_doc_5481
module Bound.Lower (A : Set) where data Bound : Set where bot : Bound val : A → Bound
algebraic-stack_agda0000_doc_5483
module BHeap.Order {A : Set}(_≤_ : A → A → Set) where open import BHeap _≤_ open import Bound.Lower A open import Bound.Lower.Order _≤_ open import Data.Nat _≺_ : {b b' : Bound} → BHeap b → BHeap b' → Set h ≺ h' = # h <′ # h' data Acc {b' : Bound}(h' : BHeap b') : Set where acc : (∀ {b} h → (_≺_ {b} {b'} h h') → ...
algebraic-stack_agda0000_doc_5484
open import Data.Boolean open import Type module Data.BinaryTree.Heap {ℓ} {T : Type{ℓ}} (_≤?_ : T → T → Bool) where import Lvl open import Data hiding (empty) open import Data.BinaryTree BinaryHeap = BinaryTree (Unit{Lvl.𝟎}) (T) private variable ℓᵣ : Lvl.Level private variable R : Type{ℓᵣ} open import Data.O...
algebraic-stack_agda0000_doc_5485
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} -- Thm: (∃x)A(x), (∀x)(A(x) ⇒ B(x)) ⊢ (∃x)B(x) -- From: Elliott Mendelson. Introduction to mathematical logic. Chapman & -- Hall, 4th edition, 199...
algebraic-stack_agda0000_doc_5486
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Monoidal open import Categories.Functor.Monoidal module Categories.NaturalTransformation.NaturalIsomorphism.Monoidal where open import Level open import Data.Product using (_,_) open import Relation.Binary using (IsEquivalence; Setoid) open import...
algebraic-stack_agda0000_doc_5487
postulate ∞ : ∀ {a} (A : Set a) → Set a ♯_ : ∀ {a} {A : Set a} → A → ∞ A ♭ : ∀ {a} {A : Set a} → ∞ A → A {-# BUILTIN INFINITY ∞ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} {-# COMPILE GHC ♭ as flat #-}
algebraic-stack_agda0000_doc_5482
-- 2014-05-16 Andreas: Question mark not recognized by emacs module _ where data Nat : Set where suc : Nat → Nat data Fin : Nat → Set where zero : ∀ n → Fin (suc n) test : ∀ n → Fin n → Set test .? (zero n) = Nat -- The questionmark in the dot pattern is not recognized by emacs-mode. -- This cannot be tested ...
algebraic-stack_agda0000_doc_7232
module Issue317 (A : Set) where postulate F : Set → Set -- Try evaluating F A at the top-level: -- -- 1,3-4 -- Not in scope: -- A at 1,3-4 -- when scope checking A -- -- OK, in that case the inferred type of F should be -- (A : Set) → Set → Set, right? No, it isn't, it's Set → Set. -- -- I think the parameters shou...
algebraic-stack_agda0000_doc_7233
-- In this document we'll consider various encodings of mutual data types, -- including those that are System Fω compatible. module MutualData where open import Function open import Data.Unit.Base open import Data.Sum open import Data.Product -- In the first part of this document we'll demostrate how various encodin...
algebraic-stack_agda0000_doc_7234
module Luau.RuntimeError.ToString where open import Agda.Builtin.Float using (primShowFloat) open import FFI.Data.String using (String; _++_) open import Luau.RuntimeError using (RuntimeErrorᴮ; RuntimeErrorᴱ; local; return; TypeMismatch; UnboundVariable; SEGV; app₁; app₂; block; bin₁; bin₂) open import Luau.RuntimeTyp...
algebraic-stack_agda0000_doc_7235
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Structures.SplitEpi 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 import...
algebraic-stack_agda0000_doc_7236
open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst) open import Data.Sum import SingleSorted.AlgebraicTheory as SS module SingleSorted.Combinators where module Sum {𝓈} (Σ₁ Σ₂ : SS.Signature) (T₁ : SS.Theory 𝓈 Σ₁) (T₂ : SS.Theory 𝓈 Σ₂) where -- disjoint sum of signatures S : SS.Signatu...
algebraic-stack_agda0000_doc_7237
{-# OPTIONS --cubical #-} module Type.Cubical.Path.Proofs where import Lvl open import Type open import Type.Cubical open import Type.Cubical.Path private variable ℓ ℓ₁ ℓ₂ : Lvl.Level module _ where private variable A B : Type{ℓ} private variable P : Interval → Type{ℓ} private variable x y z w : A -- ...
algebraic-stack_agda0000_doc_7238
open import lib open import eq-reas-nouni equiv = _≡_ Val = nat data Expn : Set where val : Val -> Expn plus : Expn -> Expn -> Expn eval : Expn -> Val eval (val v) = v eval (plus e1 e2) = (eval e1) + (eval e2) data evalsTo : Expn -> Val -> Set where e-val : forall {v : Val} -----------------------...
algebraic-stack_agda0000_doc_7239
{-# OPTIONS --cubical --safe #-} module Cubical.HITs.PropositionalTruncation where open import Cubical.HITs.PropositionalTruncation.Base public open import Cubical.HITs.PropositionalTruncation.Properties public
algebraic-stack_agda0000_doc_7240
-- Kleene's three-valued logic module bool-kleene where open import bool open import eq data 𝔹ₖ : Set where tt : 𝔹ₖ ff : 𝔹ₖ uu : 𝔹ₖ infix 7 ~ₖ_ infixr 6 _&&ₖ_ infixr 5 _||ₖ_ --infixr 4 _impₖ_ ~ₖ_ : 𝔹ₖ → 𝔹ₖ ~ₖ tt = ff ~ₖ ff = tt ~ₖ uu = uu -- and _&&ₖ_ : 𝔹ₖ → 𝔹ₖ → 𝔹ₖ tt &&ₖ b = b ff &&ₖ b = ff u...
algebraic-stack_agda0000_doc_7241
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Wedge.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.HITs.Pushout.Base open import Cubical.Data.Unit _⋁_ : ∀ {ℓ ℓ'} → Pointed ℓ → Pointed ℓ' → Type (ℓ-max ℓ ℓ') _⋁_ (A , ptA) (B , ptB...
algebraic-stack_agda0000_doc_7242
module Numeral.Natural.Oper.FlooredDivision.Proofs.Inverse where import Lvl open import Data open import Functional open import Logic.Propositional open import Numeral.Natural open import Numeral.Natural.Oper open import Numeral.Natural.Oper.DivMod.Proofs open import Numeral.Natural.Oper.FlooredDivision open import Nu...
algebraic-stack_agda0000_doc_7244
------------------------------------------------------------------------------ -- Totality properties respect to Bool ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphi...
algebraic-stack_agda0000_doc_7245
module Issue279 where record Unit : Set where constructor tt open Unit tt -- this no longer brings tt into scope test : Unit test = tt
algebraic-stack_agda0000_doc_7246
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Disabled to prevent warnings from deprecated monoid solver {-# OPTIONS -...
algebraic-stack_agda0000_doc_7247
open import Common.Prelude open import Common.Reflection postulate X Y : Set isX : QName → Bool isX (quote X) = true isX _ = false main : IO Unit main = putStrLn ((if isX (quote X) then "yes" else "no") +S+ (if isX (quote Y) then "yes" else "no"))
algebraic-stack_agda0000_doc_7243
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Properties.Posets where open import Level using (_⊔_; Lift; lift) open import Data.Unit using (⊤; tt) open import Data.Product as Prod using (_,_; <_,_>) renaming (_×_ to _|×|_) open import Function using (flip) open import Relation.Binary using (...
algebraic-stack_agda0000_doc_16689
-- Andreas, 2018-06-03, issue #3057 reported by nad. -- We should not allow the public import of an ambiguous identifier -- {-# OPTIONS -v scope:20 #-} module Issue3057 where module M where postulate A : Set a : A open M public renaming (a to A) -- Should fail
algebraic-stack_agda0000_doc_16690
{- This file contains: - Definition of set truncations -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.SetTruncation.Base where open import Cubical.Core.Primitives -- set truncation as a higher inductive type: data ∥_∥₂ {ℓ} (A : Type ℓ) : Type ℓ where ∣_∣₂ : A → ∥ A ∥₂ squash₂ : ∀ (x...
algebraic-stack_agda0000_doc_16691
------------------------------------------------------------------------ -- "Equational" reasoning combinator setup ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude open import Labelled-transition-system module Bisimilarity.Classical.Equation...
algebraic-stack_agda0000_doc_16692
{-# OPTIONS -v 2 #-} module Leftovers.Examples where open import Leftovers.Utils open import Leftovers.Leftovers open import Leftovers.Equality open import Data.Bool open import Relation.Binary.PropositionalEquality open import Data.Nat open import Data.Product open import Data.Unit -- notNot : ∀ b → not (not...
algebraic-stack_agda0000_doc_16693
-- This example comes from the discussion on Issue423. module SolveNeutralApplication where postulate A : Set a b : A T : A → Set mkT : ∀ a → T a phantom : A → A → A data Bool : Set where true false : Bool f : Bool → A → A f true x = phantom x a f false x = phantom x b -- Andreas, 2012-09-07: the origi...
algebraic-stack_agda0000_doc_16694
open import Coinduction using ( ∞ ; ♯_ ; ♭ ) open import Data.Bool using ( Bool ; true ; false ; if_then_else_ ) open import Data.Empty using ( ⊥ ) open import Data.Maybe using ( Maybe ; just ; nothing ) open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ ) open import Data.Unit using ( ⊤ ; tt ) open import Data.Natural usi...
algebraic-stack_agda0000_doc_16696
open import Agda.Builtin.Unit open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.Equality open import Agda.Builtin.IO open import Agda.Builtin.String postulate putStr : String → IO ⊤ {-# FOREIGN GHC import qualified Data.Text.IO #-} {-# COMPILE GHC putStr = Data.Text.IO.putStr #-} ...
algebraic-stack_agda0000_doc_16697
------------------------------------------------------------------------------ -- Elimination properties for the inequalities ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-po...
algebraic-stack_agda0000_doc_16698
data Bool : Set where true : Bool false : Bool not : Bool → Bool not true = false not false = true data ℕ : Set where O : ℕ S : ℕ → ℕ _+_ : ℕ → ℕ → ℕ O + a = a S a + b = S (a + b) _*_ : ℕ → ℕ → ℕ O * a = O S a * b = a + (a * b) _or_ : Bool → Bool → Bool true or _ = true false or b = b if_then_el...
algebraic-stack_agda0000_doc_16699
{- formatted printing like printf, except type-safe (as proposed in "Cayenne -- a language with dependent types" by Augustsson). The types of the rest of the arguments are computed from the format string. -} module string-format where open import char open import eq open import list open import nat open im...
algebraic-stack_agda0000_doc_16700
-- Andreas, 2016-02-01, reported on 2014-12-08 module Issue1388 where indented = Set not-indented = Set -- This should be a parse error.
algebraic-stack_agda0000_doc_16701
module Languages.ILL.AgdaInterface where open import nat open import Utils.HaskellTypes open import Utils.HaskellFunctions open import Utils.Exception open import Languages.ILL.Intermediate open import Languages.ILL.Syntax open import Languages.ILL.TypeSyntax open import Languages.ILL.TypeCheck {-# TERMINATING #-} t...
algebraic-stack_agda0000_doc_16702
open import Nat open import Prelude open import dynamics-core open import contexts open import binders-disjoint-checks open import exchange open import lemmas-consistency open import lemmas-disjointness open import lemmas-subst-ta open import type-assignment-unicity open import weakening module preservation where -...
algebraic-stack_agda0000_doc_16703
------------------------------------------------------------------------------ -- The relation of divisibility on partial natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no...
algebraic-stack_agda0000_doc_16688
-- Agda program using the Iowa Agda library open import bool module PROOF-evendoublecoin (Choice : Set) (choose : Choice → 𝔹) (lchoice : Choice → Choice) (rchoice : Choice → Choice) where open import eq open import nat open import list open import maybe ---------------------------------------------------...
algebraic-stack_agda0000_doc_16695
module Structure.Relator.Names where import Lvl open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional open import Lang.Instance open import Logic open import Logic.Propositional open import Logic.Propositional.Xor open import Numeral.Natural open import Type private variable ℓ ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Lv...
algebraic-stack_agda0000_doc_13088
{-# OPTIONS --cubical #-} module _ where open import Agda.Builtin.Equality uip : ∀ {a} {A : Set a} {x y : A} (p q : x ≡ y) → p ≡ q uip refl refl = refl
algebraic-stack_agda0000_doc_13089
{-# OPTIONS --rewriting #-} -- 2015-02-17 Jesper and Andreas postulate A : Set R : A → A → Set f : A → A g : A → A r : R (f _) (g _) {-# BUILTIN REWRITE R #-} {-# REWRITE r #-}
algebraic-stack_agda0000_doc_13090
{-# OPTIONS --cubical #-} module Type.Cubical.Univalence where open import Function.Axioms open import Functional open import Logic.Predicate open import Logic.Propositional import Lvl open import Structure.Function.Domain using (intro ; Inverseₗ ; Inverseᵣ) open import Structure.Relator.Properties open import S...
algebraic-stack_agda0000_doc_13092
------------------------------------------------------------------------------ -- Testing the translation of the logical constants ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-univer...
algebraic-stack_agda0000_doc_13093
-- Basic intuitionistic modal logic S4, without ∨, ⊥, or ◇. -- Tarski-style semantics with contexts as concrete worlds, and glueing for α, ▻, and □. -- Implicit syntax. module BasicIS4.Semantics.TarskiOvergluedImplicit where open import BasicIS4.Syntax.Common public open import Common.Semantics public -- Intuitioni...
algebraic-stack_agda0000_doc_13094
module lib-safe where open import datatypes-safe public open import logic public open import thms public open import termination public open import error public
algebraic-stack_agda0000_doc_13095
------------------------------------------------------------------------------ -- Conversion rules for the Collatz function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-poly...
algebraic-stack_agda0000_doc_13096
-- An ATP-pragma must appear in the same module where its argument is -- defined. -- This error is detected by TypeChecking.Monad.Signature. module ATPImports where open import Imports.ATP-A {-# ATP axiom p #-} postulate foo : a ≡ b {-# ATP prove foo #-}
algebraic-stack_agda0000_doc_13097
{-# OPTIONS --without-K --rewriting #-} open import HoTT import homotopy.ConstantToSetExtendsToProp as ConstExt open import homotopy.Pigeonhole module homotopy.FinSet where -- the explicit type of finite sets, carrying the cardinality on its sleeve FinSet-exp : Type₁ FinSet-exp = Σ ℕ λ n → BAut (Fin n) FinSet-prop ...
algebraic-stack_agda0000_doc_13098
{-# OPTIONS --sized-types #-} module SList (A : Set) where open import Data.List open import Data.Product open import Size data SList : {ι : Size} → Set where snil : {ι : Size} → SList {↑ ι} _∙_ : {ι : Size}(x : A) → SList {ι} → SList {↑ ι} size : List ...
algebraic-stack_agda0000_doc_13099
{-# OPTIONS --safe #-} module Cubical.Algebra.AbGroup.Instances.NProd where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat using (ℕ) open import Cubical.Algebra.Group open import Cubical.Algebra.Group.Instances.NProd open import Cubical.Algebra.AbGroup private variable ℓ : Level open AbGrou...
algebraic-stack_agda0000_doc_13100
module Data.Maybe where data Maybe (a : Set) : Set where nothing : Maybe a just : a -> Maybe a
algebraic-stack_agda0000_doc_13101
{-# OPTIONS --cubical-compatible --rewriting --confluence-check #-} module Issue1719.Common where ofType : ∀ {i} (A : Set i) → A → A ofType A x = x syntax ofType A x = x :> A infixr 3 ofType postulate _↦_ : ∀ {i} {A : Set i} → A → A → Set i idr : ∀ {i} {A : Set i} {a : A} → a ↦ a {-# BUILTIN REWRITE _↦_ #-} i...
algebraic-stack_agda0000_doc_13102
module A where import B import C
algebraic-stack_agda0000_doc_13103
{-# OPTIONS --without-K #-} module Util.HoTT.Univalence where open import Util.HoTT.Univalence.Axiom public open import Util.HoTT.Univalence.Beta public open import Util.HoTT.Univalence.ContrFormulation public using ( UnivalenceContr ; UnivalenceProp ; univalenceContr ; univalenceProp ) open import Util.HoTT.Univale...
algebraic-stack_agda0000_doc_13091
{-# OPTIONS --without-K #-} module container.m.from-nat where open import container.m.from-nat.core public open import container.m.from-nat.cone public open import container.m.from-nat.coalgebra public open import container.m.from-nat.bisimulation public
algebraic-stack_agda0000_doc_7264
---------------------------------------------------------------- -- This file contains the definition natural transformations. -- ---------------------------------------------------------------- module Category.NatTrans where open import Level open import Category.Category public open import Category.Funct public op...
algebraic-stack_agda0000_doc_7265
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...
algebraic-stack_agda0000_doc_7266
module aux where open import Data.Nat open import Level renaming (zero to lzero) open import Data.Fin open import Data.Fin.Properties open import Data.Fin.Subset renaming (∣_∣ to ∣_∣ˢ) open import Data.Fin.Subset.Properties open import Data.Vec open import Data.Bool open import Data.Bool.Properties open import Data.Pr...
algebraic-stack_agda0000_doc_7267
module Issue2486 where open import Common.Prelude open import Issue2486.Import open import Issue2486.ImportB open import Issue2486.HaskellB f : MyList String → String f [] = "sdf" f (x :: _) = x xs : MyList String xs = "sdfg" :: [] postulate toBList : ∀ {A} → MyList A → BList A fromBList : ∀ {A} → BList A → MyL...