id
stringlengths
27
136
text
stringlengths
4
1.05M
algebraic-stack_agda0000_doc_16836
{-# OPTIONS --rewriting #-} open import FFI.Data.Either using (Either; Left; Right) open import Luau.Type using (Type; nil; number; string; boolean; never; unknown; _⇒_; _∪_; _∩_) open import Luau.TypeNormalization using (normalize) module Luau.FunctionTypes where -- The domain of a normalized type srcⁿ : Type → Typ...
algebraic-stack_agda0000_doc_16837
{-# OPTIONS --without-K --safe #-} module Data.List.Kleene.Syntax where open import Data.List hiding ([_]) open import Data.List.Kleene.Base open import Data.Product infixr 4 _,_ infixr 5 _] data ListSyntax {a} (A : Set a) : Set a where _] : A → ListSyntax A _,_ : A → ListSyntax A → ListSyntax A infixr 4 ⋆[_ ⁺...
algebraic-stack_agda0000_doc_16838
{-# OPTIONS --without-K #-} module sets.int where open import sets.int.definition public open import sets.int.utils public open import sets.int.core public open import sets.int.properties public
algebraic-stack_agda0000_doc_16839
module Issue2959.M (_ : Set₁) where record R : Set₁ where field A : Set
algebraic-stack_agda0000_doc_16840
{-# OPTIONS --prop #-} postulate f : Prop → Prop P : Prop₁ x : Prop x = f P -- WAS: -- Set₁ != Set -- when checking that the expression P has type Prop -- SHOULD BE: -- Prop₁ != Prop -- when checking that the expression P has type Prop
algebraic-stack_agda0000_doc_16841
{-# OPTIONS --inversion-max-depth=10 #-} open import Agda.Builtin.Nat open import Agda.Builtin.Equality data ⊥ : Set where double : Nat → Nat double zero = zero double (suc n) = suc (suc (double n)) postulate doubleSuc : (x y : Nat) → double x ≡ suc (double y) → ⊥ diverge : ⊥ diverge = doubleSuc _ _ refl {- ...
algebraic-stack_agda0000_doc_16842
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category; module Definitions) -- Definition of the "Twisted" Functor between certain Functor Categories module Categories.Functor.Instance.Twisted {o ℓ e o′ ℓ′ e′} (𝒞 : Category o ℓ e) (𝒟 : Category o′ ℓ′ e′) where import Categories.Category....
algebraic-stack_agda0000_doc_16843
module ModusPonens where modusPonens : {P Q : Set} → (P → Q) → P → Q modusPonens = {!!}
algebraic-stack_agda0000_doc_16844
module hello-world-dep-lookup where open import Data.Nat using (ℕ) open import Data.Vec using (Vec; _∷_) open import Data.Fin using (Fin; zero; suc) variable A : Set n : ℕ lookup : Vec A n → Fin n → A lookup (a ∷ as) zero = a lookup (a ∷ as) (suc i) = lookup as i
algebraic-stack_agda0000_doc_16845
--{-# OPTIONS --allow-unsolved-metas #-} module StateSizedIO.GUI.WxGraphicsLibLevel3 where open import StateSizedIO.GUI.Prelude data GuiLev1Command : Set where putStrLn : String → GuiLev1Command createFrame : GuiLev1Command addButton : Frame → Button → GuiLev1Command createTextCtrl : Frame ...
algebraic-stack_agda0000_doc_16847
{-# OPTIONS --guardedness #-} module Cubical.Codata.Conat where open import Cubical.Codata.Conat.Base public open import Cubical.Codata.Conat.Properties public
algebraic-stack_agda0000_doc_16846
module Tactic.Monoid where open import Prelude open import Tactic.Reflection open import Tactic.Reflection.Quote open import Structure.Monoid.Laws open import Tactic.Monoid.Exp open import Tactic.Monoid.Reflect open import Tactic.Monoid.Proofs monoidTactic : ∀ {a} {A : Set a} {MonA : Monoid A} {{_ : MonoidLaws A {...
algebraic-stack_agda0000_doc_8480
{-# OPTIONS --rewriting --confluence-check #-} open import Agda.Builtin.Bool open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite variable A : Set postulate f : (A → A) → Bool f-id : f {A} (λ x → x) ≡ true f-const : (c : A) → f (λ x → c) ≡ false {-# REWRITE f-id #-} ...
algebraic-stack_agda0000_doc_8481
module ShouldBePi where data One : Set where one : One err1 : One err1 = \x -> x err2 : One err2 = one one err3 : One err3 x = x
algebraic-stack_agda0000_doc_8482
module Numeral.Natural.Oper.Modulo.Proofs.Algorithm where import Lvl open import Logic open import Numeral.Natural open import Numeral.Natural.Oper open import Numeral.Natural.Oper.Modulo open import Numeral.Natural.Oper.Proofs open import Numeral.Natural.Oper.Proofs.Order open import Numeral.Natural.Relation open imp...
algebraic-stack_agda0000_doc_8483
{-# OPTIONS --without-K --safe #-} module Categories.Adjoint.Relative where -- Relative Adjoints, in their biased, level-restricted version -- In other words, this uses the Hom-Setoid equivalent variant -- of the adjoint formulation because relative adjoints don't -- have a natural unit/counit formulation. -- W...
algebraic-stack_agda0000_doc_8484
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Functions.Definition open import Sets.EquivalenceRelations open import Rings.Definition module Rings.Divisible.Definition {a b : _} {A : Set a} {S : Setoid {a} {b} A} {_+_ _*_ : A → A → A} (R : Ring ...
algebraic-stack_agda0000_doc_8486
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Consequences.Inversion where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.Consequences.Syntactic open import Definition.Typed.Consequences.Substitution open import Tools.Pro...
algebraic-stack_agda0000_doc_8487
------------------------------------------------------------------------------ -- Totality properties for Tree ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} ...
algebraic-stack_agda0000_doc_8488
------------------------------------------------------------------------ -- A universe for stream programs ------------------------------------------------------------------------ module Stream.Programs where open import Codata.Musical.Notation renaming (∞ to ∞_) import Stream as S open S using (Stream; _≈_; _≺_; hea...
algebraic-stack_agda0000_doc_8489
{- Examples by Twan van Laarhoven -} {-# OPTIONS --rewriting #-} module _ where open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-} const : ∀ {a b} {A : Set a} {B : Set b} → A → B → A const x _ = x _∘_ : ∀ {a b c} {A : Set a} {B : A → Set b} {C : {x : A} → B x → Set c} → (f : ∀ {x} (y : B x) → C y) (g...
algebraic-stack_agda0000_doc_8490
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.PtdAdjoint module homotopy.SuspAdjointLoopLadder where import homotopy.SuspAdjointLoop as A step : ∀ {i} {X Y Z : Ptd i} (f : Y ⊙→ Z) → CommSquareEquiv ((f ⊙∘_) :> ((⊙Susp X ⊙→ Y) → (⊙Susp X ⊙→ Z))) (⊙Ω-fmap f ⊙∘_)...
algebraic-stack_agda0000_doc_8491
{-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude open import GSeTT.Syntax open import GSeTT.Rules open import GSeTT.CwF-structure open import GSeTT.Uniqueness-Derivations {- Typed syntax for type theory for globular sets -} module GSeTT.Typed-Syntax where Ctx : Set₁ Ctx = Σ P...
algebraic-stack_agda0000_doc_8492
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module Issue15 where infix 7 _≡_ infixr 5 _∧_ infix 5 ∃ infixr 4 _∨_ data _∨_ (A B : Set) : Set where inj₁ : A → A ∨ B inj₂ : B → A ∨ B da...
algebraic-stack_agda0000_doc_8493
module Category.Comma where open import Level open import Data.Product open import Category.Core open import Relation.Binary as B using () open import Relation.Binary.Indexed open import Relation.Binary.Indexed.Extra open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl) _/_ : ∀ {𝒸 ℓ} → (C : ...
algebraic-stack_agda0000_doc_8494
{-# OPTIONS --cubical --no-import-sorts #-} module Utils where -- thing that currently do not belong anywhere and do not have many dependencies open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) private variable ℓ ℓ' ℓ'' : Level open import Cubical.Foundations.Everything renam...
algebraic-stack_agda0000_doc_8495
{-# OPTIONS --allow-unsolved-metas #-} module _ where open import Agda.Builtin.Nat open import Agda.Builtin.List open import Agda.Builtin.Unit open import Agda.Builtin.Sigma _×_ : Set → Set → Set A × B = Σ A λ _ → B data Vec (A : Set) : Nat → Set where [] : Vec A 0 _∷_ : ∀ {n} → A → Vec A n → Vec A (suc n) dat...
algebraic-stack_agda0000_doc_8485
module Scratch.Subset where open import Level renaming (zero to lzero; suc to lsuc) open import Relation.Unary using (Pred; Satisfiable) renaming (Decidable to Dec₁) open import Relation.Binary renaming (Decidable to Dec₂) open import Relation.Binary.PropositionalEquality as Eq using (_≡_ ; _≢_; refl; cong; sym; trans...
algebraic-stack_agda0000_doc_8576
-- Andreas, 2011-05-30 -- {-# OPTIONS -v tc.lhs.unify:50 #-} module Issue292 where data Bool : Set where true false : Bool data Bool2 : Set where true2 false2 : Bool2 data ⊥ : Set where infix 3 ¬_ ¬_ : Set → Set ¬ P = P → ⊥ infix 4 _≅_ data _≅_ {A : Set} (x : A) : ∀ {B : Set} → B → Set where refl : x ≅ x r...
algebraic-stack_agda0000_doc_8577
module Structure.Relator.Equivalence.Proofs where import Lvl open import Functional open import Structure.Relator.Equivalence open import Structure.Relator.Properties.Proofs open import Type private variable ℓ : Lvl.Level private variable T A B : Type{ℓ} private variable _▫_ : T → T → Type{ℓ} private variable f ...
algebraic-stack_agda0000_doc_8578
{-# OPTIONS --universe-polymorphism #-} module Categories.Category.Construction.F-Algebras where open import Level open import Data.Product using (proj₁; proj₂) open import Categories.Category open import Categories.Functor hiding (id) open import Categories.Functor.Algebra open import Categories.Object.Initial impor...
algebraic-stack_agda0000_doc_8579
-- ---------------------------------------------------------------------- -- The Agda Descriptor Library -- -- (Open) Descriptors -- ---------------------------------------------------------------------- module Data.Desc where open import Data.List using (List; []; _∷_) open import Data.List.Relation.Unary.All using...
algebraic-stack_agda0000_doc_8580
module _ where module M where F : Set → Set F A = A open M infix 0 F syntax F A = [ A ] G : Set → Set G A = [ A ]
algebraic-stack_agda0000_doc_8581
{-# OPTIONS --without-K --safe #-} -- Composition of pseudofunctors module Categories.Pseudofunctor.Composition where open import Data.Product using (_,_) open import Categories.Bicategory using (Bicategory) import Categories.Bicategory.Extras as BicategoryExt open import Categories.Category using (Category) open i...
algebraic-stack_agda0000_doc_8582
-- notes-01-monday.agda open import Data.Nat open import Data.Bool f : ℕ → ℕ f x = x + 2 {- f 3 = = (x + 2)[x:=3] = = 3 + 2 = = 5 -} n : ℕ n = 3 f' : ℕ → ℕ f' = λ x → x + 2 -- λ function (nameless function) {- f' 3 = = (λ x → x + 2) 3 = = (x + 2)[x := 3] = -- β-reduction = 3 + 2 = = 5 -} g ...
algebraic-stack_agda0000_doc_8583
------------------------------------------------------------------------ -- Strict ω-continuous functions ------------------------------------------------------------------------ {-# OPTIONS --cubical --safe #-} module Partiality-monad.Inductive.Strict-omega-continuous where open import Equality.Propositional.Cubica...
algebraic-stack_agda0000_doc_8584
-- The positivity checker should not be run twice for the same mutual -- block. (If we decide to turn Agda into a total program, then we may -- want to revise this decision.) {-# OPTIONS -vtc.pos.graph:5 #-} module Positivity-once where A : Set₁ module M where B : Set₁ B = A A = Set
algebraic-stack_agda0000_doc_8585
-- This module introduces built-in types and primitive functions. module Introduction.Built-in where {- Agda supports four built-in types : - integers, - floating point numbers, - characters, and - strings. Note that strings are not defined as lists of characters (as is the case in Haskell). ...
algebraic-stack_agda0000_doc_8587
module <-trans where open import Data.Nat using (ℕ) open import Relations using (_<_; z<s; s<s) <-trans : ∀ {m n p : ℕ} → m < n → n < p ----- → m < p <-trans z<s (s<s _) = z<s <-trans (s<s a) (s<s b) = s<s (<-trans a b)
algebraic-stack_agda0000_doc_8588
module BTree {A : Set} where open import Data.List data BTree : Set where leaf : BTree node : A → BTree → BTree → BTree flatten : BTree → List A flatten leaf = [] flatten (node x l r) = (flatten l) ++ (x ∷ flatten r)
algebraic-stack_agda0000_doc_8589
module FunctorCat where open import Categories open import Functors open import Naturals FunctorCat : ∀{a b c d} → Cat {a}{b} → Cat {c}{d} → Cat FunctorCat C D = record{ Obj = Fun C D; Hom = NatT; iden = idNat; comp = compNat; idl = idlNat; idr = idrNat; ass = λ{_}{_}{_}{_}{α}{β}{η} → assNat {α = α...
algebraic-stack_agda0000_doc_8590
module agdaFunction where addOne : N -> N addOne Z = suc Z addOne (suc a) = suc (suc a)
algebraic-stack_agda0000_doc_8591
{- modified from a bug report given to me by Ulf Norell, for a previous, incorrect version of bt-remove-min. -} module braun-tree-test where open import nat open import list open import product open import sum open import eq import braun-tree open braun-tree nat _<_ test : braun-tree 4 test = bt-node 2 ...
algebraic-stack_agda0000_doc_8586
{- Example by Andreas (2015-09-18) -} {-# OPTIONS --rewriting --local-confluence-check #-} open import Common.Prelude open import Common.Equality {-# BUILTIN REWRITE _≡_ #-} module _ (A : Set) where postulate plus0p : ∀{x} → (x + zero) ≡ x {-# REWRITE plus0p #-}
algebraic-stack_agda0000_doc_8912
module Agda.Builtin.Int where open import Agda.Builtin.Nat open import Agda.Builtin.String infix 8 pos -- Standard library uses this as +_ data Int : Set where pos : (n : Nat) → Int negsuc : (n : Nat) → Int {-# BUILTIN INTEGER Int #-} {-# BUILTIN INTEGERPOS pos #-} {-# BUILTIN INTEGERNEGSUC ...
algebraic-stack_agda0000_doc_8913
module Stack where open import Prelude public -- Stacks, or snoc-lists. data Stack (X : Set) : Set where ∅ : Stack X _,_ : Stack X → X → Stack X -- Stack membership, or de Bruijn indices. module _ {X : Set} where infix 3 _∈_ data _∈_ (A : X) : Stack X → Set where top : ∀ {Γ} → A ∈ Γ , A pop :...
algebraic-stack_agda0000_doc_8914
module examplesPaperJFP.loadAllOOAgdaPart2 where -- This is a continuation of the file loadAllOOAgdaPart1 -- giving the code from the ooAgda paper -- This file was split into two because of a builtin IO which -- makes loading files from part1 and part2 incompatible. -- Note that some files which are directly in the ...
algebraic-stack_agda0000_doc_8915
-- {-# OPTIONS -v tc.meta:20 #-} -- Andreas, 2011-04-21 module PruneLHS where data _≡_ {A : Set}(a : A) : A -> Set where refl : a ≡ a data Bool : Set where true false : Bool test : let X : Bool -> Bool -> Bool -> Bool X = _ in (C : Set) -> (({x y : Bool} -> X x y x ≡ x) -> ({...
algebraic-stack_agda0000_doc_8917
module constants where open import lib cedille-extension : string cedille-extension = "ced" self-name : string self-name = "self" pattern ignored-var = "_" pattern meta-var-pfx = '?' pattern qual-local-chr = '@' pattern qual-global-chr = '.' meta-var-pfx-str = 𝕃char-to-string [ meta-var-pfx ] qual-local-str = �...
algebraic-stack_agda0000_doc_8918
open import Agda.Builtin.Char open import Agda.Builtin.String open import Agda.Builtin.Maybe open import Agda.Builtin.Sigma open import Common.IO printTail : String → IO _ printTail str with primStringUncons str ... | just (_ , tl) = putStr tl ... | nothing = putStr "" main : _ main = printTail "/test/Compiler/...
algebraic-stack_agda0000_doc_8919
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Char where open import Agda.Builtin.Nat open import Agda.Builtin.Bool open import Agda.Builtin.Equality postulate Char : Set {-# BUILTIN CHAR Char #-} primitive primIsLower primIsDigit primIsAlpha primIsSpace primIsAscii ...
algebraic-stack_agda0000_doc_8920
open import Oscar.Prelude module Oscar.Class.Amgu where record Amgu {𝔵} {X : Ø 𝔵} {𝔱} (T : X → Ø 𝔱) {𝔞} (A : X → Ø 𝔞) {𝔪} (M : Ø 𝔞 → Ø 𝔪) : Ø 𝔵 ∙̂ 𝔱 ∙̂ 𝔞 ∙̂ 𝔪 where field amgu : ∀ {x} → T x → T x → A x → M (A x) open Amgu ⦃ … ⦄ public
algebraic-stack_agda0000_doc_8921
module FOLsequent where open import Data.Empty open import Data.Nat open import Data.Nat.Properties open import Data.String using (String) open import Data.Sum open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; _≢_; refl; sym; cong; subst) open import Relation.Nullary open import Data.List.Base ...
algebraic-stack_agda0000_doc_8922
open import Agda.Builtin.Nat open import Agda.Builtin.Sigma open import Agda.Builtin.Equality data Maybe {a} (A : Set a) : Set a where just : A → Maybe A nothing : Maybe A record RawRoutingAlgebra : Set₁ where field PathWeight : Set module _ (A : RawRoutingAlgebra) where open RawRoutingAlgebra A Pat...
algebraic-stack_agda0000_doc_8923
module Data.Boolean where import Lvl open import Type -- Boolean type data Bool : Type{Lvl.𝟎} where 𝑇 : Bool -- Represents truth 𝐹 : Bool -- Represents falsity {-# BUILTIN BOOL Bool #-} {-# BUILTIN TRUE 𝑇 #-} {-# BUILTIN FALSE 𝐹 #-} elim : ∀{ℓ}{T : Bool → Type{ℓ}} → T(𝑇) → T(𝐹) → ((b : Bool) → T(b)) el...
algebraic-stack_agda0000_doc_8924
{-# OPTIONS --erased-cubical --safe #-} module FarmCanon where open import Data.List using (List; _∷_; []) open import Data.Nat using (ℕ) open import Data.Sign renaming (+ to s+ ; - to s-) open import Data.Vec using (Vec; _∷_; []; map) open import Canon using (makeCanon2) open imp...
algebraic-stack_agda0000_doc_8925
------------------------------------------------------------------------------ -- ABP Lemma 2 ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --wit...
algebraic-stack_agda0000_doc_8926
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.CoHSpace module homotopy.Cogroup where record CogroupStructure {i} (X : Ptd i) : Type i where field co-h-struct : CoHSpaceStructure X ⊙inv : X ⊙→ X open CoHSpaceStructure co-h-struct public inv : de⊙ X → de⊙ X inv = fst ⊙i...
algebraic-stack_agda0000_doc_8927
{-# OPTIONS --without-K #-} module Common.Integer where open import Agda.Builtin.Int public renaming (Int to Integer)
algebraic-stack_agda0000_doc_8916
{- This file contains a diagonalization procedure simpler than Smith normalization. For any matrix M, it provides two invertible matrices P, Q, one diagonal matrix D and an equality M = P·D·Q. The only difference from Smith is, the numbers in D are allowed to be arbitrary, instead of being consecutively divisible. But...
algebraic-stack_agda0000_doc_97
-- Andreas, 2016-11-02, issue #2285 -- double check for record types record Big : _ where field any : ∀{a} → Set a
algebraic-stack_agda0000_doc_98
{-# OPTIONS --allow-unsolved-metas --no-positivity-check --no-termination-check --type-in-type --sized-types --injective-type-constructors --guardedness-preserving-type-constructors --experimental-irrelevance #-} module SafeFlagPragmas ...
algebraic-stack_agda0000_doc_99
-- Andreas, 2020-09-26, issue #4944. -- Size solver got stuck on projected variables which are left over -- in some size constraints by the generalization feature. -- {-# OPTIONS --sized-types #-} -- {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.conv.size:60 -v tc.size:30 -v tc.meta.assign:10 #-} open import A...
algebraic-stack_agda0000_doc_100
{-# OPTIONS --without-K #-} module ConcretePermutation where import Level using (zero) open import Data.Nat using (ℕ; _+_; _*_) open import Data.Fin using (Fin) open import Data.Product using (proj₁; proj₂) open import Data.Vec using (tabulate) open import Algebra using (CommutativeSemiring) open import Algebra.Str...
algebraic-stack_agda0000_doc_101
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} open import Light.Library.Data.Natural as ℕ using (ℕ) open import Light.Package using (Package) module Light.Literals.Natural ⦃ package : Package record { ℕ } ⦄ where open import Light.Literals.Definition.Natural using (FromNatural) open...
algebraic-stack_agda0000_doc_102
------------------------------------------------------------------------ -- The Agda standard library -- -- Decorated star-lists ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Data.Star.Decoration where open import Data.Unit open import Function open i...
algebraic-stack_agda0000_doc_103
module Category.Fibration where open import Data.Product open import Category.Category open import Category.Subcategory open import Category.Funct
algebraic-stack_agda0000_doc_104
-- 2010-10-04 -- termination checker no longer counts stripping off a record constructor -- as decrease module Issue334 where data Unit : Set where unit : Unit record E : Set where inductive constructor mkE field fromE : E spam : Unit f : E -> Set f (mkE e unit) = f e -- the record pattern translati...
algebraic-stack_agda0000_doc_105
open import Relation.Binary.PropositionalEquality open import Data.Unit using (⊤ ; tt) open import Data.Product renaming (_×_ to _∧_ ; proj₁ to fst ; proj₂ to snd) open import Data.Sum renaming (_⊎_ to _∨_ ; inj₁ to left ; inj₂ to right) open import Data.Nat using (ℕ ; zero ; suc) open import Data.Product renaming (pro...
algebraic-stack_agda0000_doc_106
record R : Set₁ where X = Y -- should get error here field A : Set
algebraic-stack_agda0000_doc_107
------------------------------------------------------------------------ -- The Agda standard library -- -- Simple combinators working solely on and with functions ------------------------------------------------------------------------ -- The contents of this file can be accessed from `Function`. {-# OPTIONS --witho...
algebraic-stack_agda0000_doc_108
open import Relation.Binary.Core module PLRTree.Insert {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Data.Sum open import PLRTree {A} insert : A → PLRTree → PLRTree insert x leaf = node perfect x leaf leaf insert x (node perfect y l r) with tot≤ x...
algebraic-stack_agda0000_doc_109
open import Common.Prelude open import Common.Equality infixr 5 _∷_ data Vec (A : Set) : Nat → Set where [] : Vec A zero _∷_ : ∀ {n} → A → Vec A n → Vec A (suc n) record Eq (A : Set) : Set where field _==_ : (x y : A) → Maybe (x ≡ y) open Eq {{...}} data Σ (A : Set) (B : A → Set) : Set where _,_ : (x ...
algebraic-stack_agda0000_doc_110
-- Quotient category {-# OPTIONS --safe #-} module Cubical.Categories.Constructions.Quotient where open import Cubical.Categories.Category.Base open import Cubical.Categories.Functor.Base open import Cubical.Categories.Limits.Terminal open import Cubical.Foundations.HLevels open import Cubical.Foundations.Prelude ope...
algebraic-stack_agda0000_doc_111
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Foundations.Pointed.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed.Base open import Cubical.Foundations.Function open import Cubical.Foundations.GroupoidLaws open import Cubical.Foundations.Isomorphism ...
algebraic-stack_agda0000_doc_96
{-# OPTIONS --without-K --safe #-} -- The 'Identity' instance, with all of Setoids as models module Categories.Theory.Lawvere.Instance.Identity where open import Data.Fin using (splitAt) open import Data.Sum using ([_,_]′) open import Data.Unit.Polymorphic using (⊤; tt) open import Level open import Relation.Binary....
algebraic-stack_agda0000_doc_16544
module Oscar.Property.Symmetry where open import Oscar.Level record Symmetry {𝔬} {⋆ : Set 𝔬} {𝔮} (_≒_ : ⋆ → ⋆ → Set 𝔮) : Set (𝔬 ⊔ 𝔮) where field symmetry : ∀ {x y} → x ≒ y → y ≒ x open Symmetry ⦃ … ⦄ public
algebraic-stack_agda0000_doc_16545
-- Reported by Christian Sattler on 2019-12-7 postulate A B : Set barb : Set barb = (A → (_ : B) → _) _ -- WAS: unsolved constraints. -- SHOULD: throw an error that A → ... is not a function.
algebraic-stack_agda0000_doc_16546
{-# OPTIONS --type-in-type #-} data IBool : Set where itrue ifalse : IBool Bool : Set; Bool = (B : Set) → B → B → B toIBool : Bool → IBool toIBool b = b _ itrue ifalse true : Bool; true = λ B t f → t and : Bool → Bool → Bool; and = λ a b B t f → a B (b B t f) f Nat : Set; Nat = (n : Set) → (n → n) → n → n ...
algebraic-stack_agda0000_doc_16547
{-# OPTIONS --without-K --safe #-} module Data.Binary.Proofs where open import Data.Binary.Proofs.Multiplication using (*-homo) open import Data.Binary.Proofs.Addition using (+-homo) open import Data.Binary.Proofs.Unary using (inc-homo) open import Data.Binary.Proofs.Bijection using (𝔹↔ℕ)
algebraic-stack_agda0000_doc_16548
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Functions open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Numbers.Naturals.Semiring open import Sets.FinSet open import Groups.Groups open import Groups.Definition open import S...
algebraic-stack_agda0000_doc_16549
open import SOAS.Common import SOAS.Families.Core -- Families with syntactic structure module SOAS.Metatheory.MetaAlgebra {T : Set} (open SOAS.Families.Core {T}) (⅀F : Functor 𝔽amiliesₛ 𝔽amiliesₛ) (𝔛 : Familyₛ) where open import SOAS.Context {T} open import SOAS.Variable {T} open import SOAS.Construction.St...
algebraic-stack_agda0000_doc_16550
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Weakening where open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed import Tools.PropositionalEquality as PE -- Weakening type data _∷_⊆_ : Wk → Con Term → Con Term → Set where id : ∀ ...
algebraic-stack_agda0000_doc_16551
module Pi-.Examples where open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Product open import Relation.Binary.Core open import Relation.Binary open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Data.Nat open import Data.Nat.Properties open impor...
algebraic-stack_agda0000_doc_16552
-- Agda program using the Iowa Agda library open import bool module PROOF-appendAddLengths (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_16553
{-# OPTIONS --without-K #-} module algebra.group.core where open import level open import algebra.monoid.core open import equality.core open import function.isomorphism open import sum record IsGroup {i} (G : Set i) : Set i where field instance mon : IsMonoid G open IsMonoid mon public field inv : G → G ...
algebraic-stack_agda0000_doc_16554
-- Andreas, 2015-09-18, issue reported by Guillaume Brunerie {-# OPTIONS --rewriting #-} data _==_ {A : Set} (a : A) : A → Set where idp : a == a {-# BUILTIN REWRITE _==_ #-} postulate A : Set a b : A r : a == b {-# REWRITE r #-} r = idp -- Should not work, as this behavior is confusing the users. -- Instead...
algebraic-stack_agda0000_doc_16556
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Semigroup.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import ...
algebraic-stack_agda0000_doc_16557
module STLC1.Kovacs.Convertibility where open import STLC1.Kovacs.Substitution public -------------------------------------------------------------------------------- -- Convertibility (_~_ ; ~refl ; _~⁻¹ ; lam ; app ; β ; η) infix 3 _∼_ data _∼_ : ∀ {Γ A} → Γ ⊢ A → Γ ⊢ A → Set where refl∼ : ∀ {Γ A} → {M : Γ...
algebraic-stack_agda0000_doc_16558
module Perm where open import Basics open import All open import Splitting data _~_ {X : Set} : List X -> List X -> Set where [] : [] ~ [] _,-_ : forall {x xs ys zs} -> (x ,- []) <[ ys ]> zs -> xs ~ zs -> (x ,- xs) ~ ys permute : {X : Set}{xs ys : List X} -> xs ~ ys -> {P : X -> Set} -> All P xs -> All...
algebraic-stack_agda0000_doc_16559
-- Andreas, 2012-09-19 propagate irrelevance info to dot patterns {-# OPTIONS --experimental-irrelevance #-} -- {-# OPTIONS -v tc.lhs:20 #-} module ShapeIrrelevantIndex where data Nat : Set where Z : Nat S : Nat → Nat data Good : ..(_ : Nat) → Set where goo : .(n : Nat) → Good (S n) good : .(n : Nat) → Good n...
algebraic-stack_agda0000_doc_16555
------------------------------------------------------------------------ -- The Agda standard library -- -- A delimited continuation monad ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Category.Monad.Continuation where open import Category.Applicat...
algebraic-stack_agda0000_doc_8496
postulate A : Set record R : Set where field a : A b : A b = a open R test : A test = b
algebraic-stack_agda0000_doc_8497
module IsFormula where open import Formula data IsFormula : Formula → Set where ⟨_⟩ : (φ : Formula) → IsFormula φ
algebraic-stack_agda0000_doc_8498
module LC.Parallel where open import LC.Base open import LC.Subst open import LC.Reduction open import Data.Nat open import Relation.Binary.Construct.Closure.ReflexiveTransitive -- parallel β-reduction infix 3 _β⇒_ data _β⇒_ : Term → Term → Set where β-var : {n : ℕ} → var n β⇒ var n β-ƛ : ∀ {M M'} → (M⇒M' :...
algebraic-stack_agda0000_doc_8499
------------------------------------------------------------------------------ -- Conversion functions i, j and k. ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism ...
algebraic-stack_agda0000_doc_8500
------------------------------------------------------------------------ -- The Agda standard library -- -- Bounded vectors ------------------------------------------------------------------------ -- Vectors of a specified maximum length. {-# OPTIONS --without-K --safe #-} module Data.BoundedVec where open import D...
algebraic-stack_agda0000_doc_8501
primitive data D : Set where -- Bad error message WAS: -- A postulate block can only contain type signatures or instance blocks
algebraic-stack_agda0000_doc_8502
-- Andreas, 2016-07-29 issue #707, comment of 2012-10-31 open import Common.Nat data Vec (A : Set) : Nat → Set where [] : Vec A zero _∷_ : ∀ {n} (x : A) (xs : Vec A n) → Vec A (suc n) v0 v1 v2 : Vec Nat _ v0 = [] v1 = 0 ∷ v0 v2 = 1 ∷ v1 -- Works, but maybe questionable. -- The _ is triplicated into three diffe...
algebraic-stack_agda0000_doc_8504
{- The trivial resource -} module Relation.Ternary.Separation.Construct.Unit where open import Data.Unit open import Data.Product open import Relation.Unary open import Relation.Binary hiding (_⇒_) open import Relation.Binary.PropositionalEquality as P open import Relation.Ternary.Separation open RawSep instance uni...