id
stringlengths
27
136
text
stringlengths
4
1.05M
algebraic-stack_agda0000_doc_17412
{-# OPTIONS --cubical --safe #-} module Data.List.Properties where open import Data.List open import Prelude open import Data.Fin map-length : (f : A → B) (xs : List A) → length xs ≡ length (map f xs) map-length f [] _ = zero map-length f (x ∷ xs) i = suc (map-length f xs i) map-ind : (f : A → B) (xs : L...
algebraic-stack_agda0000_doc_17413
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} import LibraBFT.Impl.Types.CryptoProxies as CryptoProxies i...
algebraic-stack_agda0000_doc_17414
module PreludeInt where open import AlonzoPrelude import RTP int : Nat -> Int int = RTP.primNatToInt _+_ : Int -> Int -> Int _+_ = RTP.primIntAdd _-_ : Int -> Int -> Int _-_ = RTP.primIntSub _*_ : Int -> Int -> Int _*_ = RTP.primIntMul div : Int -> Int -> Int div = RTP.primIntDiv mod : Int -> Int -> Int mod = RT...
algebraic-stack_agda0000_doc_17415
------------------------------------------------------------------------ -- Some theory of equivalences with erased "proofs", defined in terms -- of partly erased contractible fibres, developed using Cubical Agda ------------------------------------------------------------------------ -- This module instantiates and r...
algebraic-stack_agda0000_doc_17416
module Integer.Difference where open import Data.Product as Σ open import Data.Product.Relation.Pointwise.NonDependent open import Data.Unit open import Equality open import Natural as ℕ open import Quotient as / open import Relation.Binary open import Syntax infixl 6 _–_ pattern _–_ a b = _,_ a b ⟦ℤ⟧ = ℕ × ℕ ⟦ℤ²⟧ =...
algebraic-stack_agda0000_doc_17417
module MissingTypeSignature where data Nat : Set where zero : Nat suc : Nat -> Nat pred zero = zero pred (suc n) = n
algebraic-stack_agda0000_doc_17418
module ProofUtilities where -- open import Data.Nat hiding (_>_) open import StdLibStuff open import Syntax open import FSC mutual hn-left-i : {n : ℕ} {Γ-t : Ctx n} {Γ : FSC-Ctx n Γ-t} {α β : Type n} (m : ℕ) (S : Form Γ-t β → Form Γ-t α) (F : Form Γ-t β) (G : Form Γ-t α) → Γ ⊢ α ∋ S (headNorm m F) ↔ G → Γ ⊢ α ∋ S...
algebraic-stack_agda0000_doc_17419
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.Choice module cohomology.Theory where record CohomologyTheory i : Type (lsucc i) where field C : ℤ → Ptd i → Group i CEl : ℤ → Ptd i → Type i CEl n X = Group.El (C n X) Cid : (n : ℤ) (X : Ptd i) → CEl n...
algebraic-stack_agda0000_doc_17420
{-# OPTIONS --cubical --safe #-} module Relation.Nullary.Discrete.FromBoolean where open import Prelude open import Relation.Nullary.Discrete module _ {a} {A : Type a} (_≡ᴮ_ : A → A → Bool) (sound : ∀ x y → T (x ≡ᴮ y) → x ≡ y) (complete : ∀ x → T (x ≡ᴮ x)) where from-bool-...
algebraic-stack_agda0000_doc_17421
module calculus-examples where open import Data.List using (List ; _∷_ ; [] ; _++_) open import Data.List.Any using (here ; there ; any) open import Data.List.Any.Properties open import Data.OrderedListMap open import Data.Sum using (inj₁ ; inj₂ ; _⊎_) open import Data.Maybe.Base open import Data.Empty using (⊥ ; ⊥-el...
algebraic-stack_agda0000_doc_17422
interleaved mutual -- we don't do `data A : Set` data A where -- you don't have to actually define any constructor to trigger the error, the "where" is enough data B where b : B
algebraic-stack_agda0000_doc_17423
module getline where -- https://github.com/alhassy/AgdaCheatSheet#interacting-with-the-real-world-compilation-haskell-and-io open import Data.Nat using (ℕ; suc) open import Data.Nat.Show using (show) open import Data.Char using (Char) open import Data.List as L...
algebraic-stack_agda0000_doc_8720
module plfa.part1.Induction where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym) open Eq.≡-Reasoning open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_) +-assoc : ∀ (m n p : ℕ) → (m + n) + p ≡ m + (n + p) +-assoc zero n p = begin (zero + n) + p ≡⟨⟩ n + p ≡⟨...
algebraic-stack_agda0000_doc_8721
module ProjectingRecordMeta where data _==_ {A : Set}(a : A) : A -> Set where refl : a == a -- Andreas, Feb/Apr 2011 record Prod (A B : Set) : Set where constructor _,_ field fst : A snd : B open Prod public testProj : {A B : Set}(y z : Prod A B) -> let X : Prod A B X = _ -- Solution: ...
algebraic-stack_agda0000_doc_8722
------------------------------------------------------------------------ -- The Agda standard library -- -- "Finite" sets indexed on coinductive "natural" numbers ------------------------------------------------------------------------ module Data.Cofin where open import Coinduction open import Data.Conat as Conat us...
algebraic-stack_agda0000_doc_8723
module Pi1r where open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Product open import Relation.Binary.PropositionalEquality open ≡-Reasoning open import Groupoid -- infix 2 _∎ -- equational reasoning for paths -- infixr 2 _≡⟨_⟩_ -- equational reasoning for paths infixr 1...
algebraic-stack_agda0000_doc_8724
{-# OPTIONS --without-K --safe #-} -- A Categorical WeakInverse induces an Adjoint Equivalence module Categories.Category.Equivalence.Properties where open import Level open import Data.Product using (Σ-syntax; _,_; proj₁) open import Categories.Adjoint.Equivalence using (⊣Equivalence) open import Categories.Adjoi...
algebraic-stack_agda0000_doc_8725
-- Andreas, 2019-08-08, issue #3972 (and #3967) -- In the presence of an unreachable clause, the serializer crashed on a unsolve meta. -- It seems this issue was fixed along #3966: only the ranges of unreachable clauses -- are now serialized. open import Agda.Builtin.Equality public postulate List : Set → Set da...
algebraic-stack_agda0000_doc_8726
{-# OPTIONS --type-in-type #-} module functors where open import prelude record Category {O : Set} (𝒞[_,_] : O → O → Set) : Set where constructor 𝒾:_▸:_𝒾▸:_▸𝒾: infixl 8 _▸_ field 𝒾 : ∀ {x} → 𝒞[ x , x ] _▸_ : ∀ {x y z} → 𝒞[ x , y ] → 𝒞[ y , z ] → 𝒞[ x , z ] 𝒾▸ : ∀ {x y} (f : 𝒞[ x , y ]) → (...
algebraic-stack_agda0000_doc_8727
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Neutral {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.Weake...
algebraic-stack_agda0000_doc_8728
{-# OPTIONS --without-K #-} -- Define all the permutations that occur in Pi -- These are defined by transport, using univalence module Permutation where open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Data.Nat using (_+_;_*_) open import Data.Fin using ...
algebraic-stack_agda0000_doc_8729
module PreludeShow where import RTP -- magic module import AlonzoPrelude as Prelude open import PreludeNat open import PreludeString import PreludeList open import PreludeBool open Prelude -- open Data.Integer, using (Int, pos, neg) open PreludeList hiding (_++_) showInt : Int -> String showInt = RTP.primShowInt ...
algebraic-stack_agda0000_doc_8730
-- | Trailing inductive copattern matches on the LHS can be savely -- translated to record expressions on RHS, without jeopardizing -- termination. -- {-# LANGUAGE CPP #-} module Agda.TypeChecking.CompiledClause.ToRHS where -- import Control.Applicative import Data.Monoid import qualified Data.Map as Map import Da...
algebraic-stack_agda0000_doc_8731
module _ where open import Agda.Builtin.Bool module M (b : Bool) where module Inner where some-boolean : Bool some-boolean = b postulate @0 a-postulate : Bool @0 A : @0 Bool → Set A b = Bool module A where module M′ = M b bad : @0 Bool → Bool bad = A.M′.Inner.some-boolean
algebraic-stack_agda0000_doc_8732
-- MIT License -- Copyright (c) 2021 Luca Ciccone and Luca Padovani -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Software"), to deal in the Software without -- restriction, including without limitation the rights to use...
algebraic-stack_agda0000_doc_8733
-- Andreas, 2016-10-11, AIM XXIV -- We cannot bind NATURAL to an abstract version of Nat. abstract data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-}
algebraic-stack_agda0000_doc_8734
-- Jesper, 2018-10-29 (comment on #3332): Besides for rewrite, builtin -- equality is also used for primErase and primForceLemma. But I don't -- see how it would hurt to have these use a Prop instead of a Set for -- equality. {-# OPTIONS --prop #-} data _≡_ {A : Set} (a : A) : A → Prop where refl : a ≡ a {-# BUILTI...
algebraic-stack_agda0000_doc_8735
open import Agda.Builtin.Nat open import Agda.Builtin.Reflection open import Agda.Builtin.Unit macro five : Term → TC ⊤ five hole = unify hole (lit (nat 5)) -- Here you get hole = _X (λ {n} → y {_n}) -- and fail to solve _n. yellow : ({n : Nat} → Set) → Nat yellow y = five -- Here you get hole = _X ⦃ n ⦄ (λ ⦃ n...
algebraic-stack_agda0000_doc_8704
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness #-} module Agda.Builtin.Reflection where open import Agda.Builtin.Unit open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.Word open import Agda.Builtin.List open import Agda.Builtin.String open import Agda.Builtin.Char o...
algebraic-stack_agda0000_doc_8705
module Where where {- id : Set -> Set id a = a -} -- x : (_ : _) -> _ x = id Set3000 where id = \x -> x y = False where data False : Set where
algebraic-stack_agda0000_doc_8706
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.CircleHSpace open import homotopy.JoinAssocCubical open import homotopy.JoinSusp module homotopy.Hopf where import homotopy.HopfConstruction module Hopf = homotopy.HopfConstruction S¹-conn ⊙S¹-hSpace Hopf : S² → Type₀ Hopf = Hopf.H.f Hop...
algebraic-stack_agda0000_doc_8707
module Relations where open import Agda.Builtin.Equality open import Natural data _≤_ : ℕ → ℕ → Set where z≤n : ∀ {n : ℕ} → zero ≤ n s≤s : ∀ {m n : ℕ} → m ≤ n → (suc m) ≤ (suc n) infix 4 _≤_ -- example : finished by auto mode _ : 3 ≤ 5 _ = s≤s {2} {4} (s≤s {1} {3} (s≤s {0} {2} (z≤n {...
algebraic-stack_agda0000_doc_8708
-- cj-xu and fredriknordvallforsberg, 2018-04-30 open import Common.IO data Bool : Set where true false : Bool data MyUnit : Set where tt : MyUnit -- no eta! HiddenFunType : MyUnit -> Set HiddenFunType tt = Bool -> Bool notTooManyArgs : (x : MyUnit) -> HiddenFunType x notTooManyArgs tt b = b {- This should no...
algebraic-stack_agda0000_doc_8709
module Data.Num.Nat where open import Data.Num.Core renaming ( carry to carry' ; carry-lower-bound to carry-lower-bound' ; carry-upper-bound to carry-upper-bound' ) open import Data.Num.Maximum open import Data.Num.Bounded open import Data.Num.Next open import Data.Num.Increment open import Data....
algebraic-stack_agda0000_doc_8710
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.List.Relation.Binary.BagAndSetEquality directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module ...
algebraic-stack_agda0000_doc_8711
open import Categories open import Monads module Monads.EM.Functors {a b}{C : Cat {a}{b}}(M : Monad C) where open import Library open import Functors open import Monads.EM M open Cat C open Fun open Monad M open Alg open AlgMorph EML : Fun C EM EML = record { OMap = λ X → record { acar = T X; astr = λ...
algebraic-stack_agda0000_doc_8712
{-# OPTIONS --no-positivity-check #-} open import Prelude module Implicits.Resolution.Undecidable.Resolution where open import Data.Fin.Substitution open import Implicits.Syntax open import Implicits.Syntax.MetaType open import Implicits.Substitutions open import Extensions.ListFirst infixl 4 _⊢ᵣ_ _⊢_↓_ _⟨_⟩=_ mutu...
algebraic-stack_agda0000_doc_8713
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Library.Data.Natural where open import Light.Level using (Level ; Setω) open import Light.Library.Arithmetic using (Arithmetic) open import Light.Package using (Package) open import Light.Library.Relation.Binary using (...
algebraic-stack_agda0000_doc_8714
------------------------------------------------------------------------ -- The Agda standard library -- -- An either-or-both data type ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.These where open import Level open import Data.Maybe.Base usi...
algebraic-stack_agda0000_doc_8715
module Formalization.ClassicalPropositionalLogic.NaturalDeduction where open import Data.Either as Either using (Left ; Right) open import Formalization.ClassicalPropositionalLogic.Syntax open import Functional import Lvl import Logic.Propositional as Meta open import Logic open import Relator.Equals open im...
algebraic-stack_agda0000_doc_8716
{-# OPTIONS --without-K #-} open import Base module Homotopy.Skeleton where private module Graveyard {i} {A B : Set i} {f : A → B} where private data #skeleton₁ : Set i where #point : A → #skeleton₁ skeleton₁ : Set i skeleton₁ = #skeleton₁ point : A → skeleton₁ point = #point ...
algebraic-stack_agda0000_doc_8717
{-# OPTIONS --cubical-compatible --rewriting --local-confluence-check #-} open import Agda.Primitive using (Level; _⊔_; Setω; lzero; lsuc) infix 4 _≡_ data _≡_ {ℓ : Level} {A : Set ℓ} (a : A) : A → Set ℓ where refl : a ≡ a {-# BUILTIN REWRITE _≡_ #-} run : ∀ {ℓ} {A B : Set ℓ} → A ≡ B → A → B run refl x = x ap :...
algebraic-stack_agda0000_doc_8718
module conversion where open import lib open import cedille-types open import ctxt open import is-free open import lift open import rename open import subst open import syntax-util open import general-util open import to-string {- Some notes: -- hnf{TERM} implements erasure as well as normalization. -- hnf{T...
algebraic-stack_agda0000_doc_8719
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Paths open import lib.types.Sigma open import lib.types.Span open import lib.types.Pointed open import lib.types.Pushout module lib.types.Join where module _ {i j} (A : Type i) (B : Type j) where *-span : Span *-span = span A B (A × B) fs...
algebraic-stack_agda0000_doc_8736
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Category.Monoidal.Core using (Monoidal) open import Categories.Category.Monoidal.Symmetric open import Data.Sum module Categories.Category.Monoidal.CompactClosed {o ℓ e} {C : Category o ℓ e} (M : Monoidal C) where open import L...
algebraic-stack_agda0000_doc_8737
{-# OPTIONS --rewriting #-} data Unit : Set where unit : Unit _+_ : Unit → Unit → Unit unit + x = x data _≡_ (x : Unit) : Unit → Set where refl : x ≡ x {-# BUILTIN REWRITE _≡_ #-} postulate f : Unit → Unit fu : f unit ≡ unit {-# REWRITE fu #-} g : Unit → Unit g unit = unit data D (h : Unit → Unit) (x :...
algebraic-stack_agda0000_doc_8738
module Yoneda where open import Level open import Data.Product open import Relation.Binary import Relation.Binary.SetoidReasoning as SetR open Setoid renaming (_≈_ to eqSetoid) open import Basic open import Category import Functor import Nat open Category.Category open Functor.Functor open Nat.Nat open Nat.Export y...
algebraic-stack_agda0000_doc_8739
------------------------------------------------------------------------ -- "Equational" reasoning combinator setup ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude open import Labelled-transition-system module Similarity.Weak.Equational-reas...
algebraic-stack_agda0000_doc_8740
{-# OPTIONS --safe --warning=error --without-K #-} open import Numbers.Naturals.Semiring open import Functions open import LogicalFormulae open import Groups.Definition open import Rings.Definition open import Rings.IntegralDomains.Definition open import Setoids.Setoids open import Sets.EquivalenceRelations open impor...
algebraic-stack_agda0000_doc_8741
------------------------------------------------------------------------ -- Vectors parameterised on types in Set₁ ------------------------------------------------------------------------ -- I want universe polymorphism. module Data.Vec1 where infixr 5 _∷_ open import Data.Nat open import Data.Vec using (Vec; []; _...
algebraic-stack_agda0000_doc_8742
open import Common.Prelude open import Common.Reflection open import Common.Equality postulate trustme : ∀ {a} {A : Set a} {x y : A} → x ≡ y magic : List (Arg Type) → Term → Tactic magic _ _ = give (def (quote trustme) []) id : ∀ {a} {A : Set a} → A → A id x = x science : List (Arg Type) → Term → Tactic science ...
algebraic-stack_agda0000_doc_8743
module Issue274 where -- data ⊥ : Set where record U : Set where constructor roll field ap : U → U -- lemma : U → ⊥ -- lemma (roll u) = lemma (u (roll u)) -- bottom : ⊥ -- bottom = lemma (roll λ x → x)
algebraic-stack_agda0000_doc_8744
{-# OPTIONS --without-K #-} open import HoTT module cohomology.Choice where unchoose : ∀ {i j} {n : ℕ₋₂} {A : Type i} {B : A → Type j} → Trunc n (Π A B) → Π A (Trunc n ∘ B) unchoose = Trunc-rec (Π-level (λ _ → Trunc-level)) (λ f → [_] ∘ f) has-choice : ∀ {i j} (n : ℕ₋₂) (A : Type i) (B : A → Type j) → Type (lmax ...
algebraic-stack_agda0000_doc_8745
{-# OPTIONS --without-K #-} module Data.Tuple where open import Data.Tuple.Base public import Data.Product as P Pair→× : ∀ {a b A B} → Pair {a} {b} A B → A P.× B Pair→× (fst , snd) = fst P., snd ×→Pair : ∀ {a b A B} → P._×_ {a} {b} A B → Pair A B ×→Pair (fst P., snd) = fst , snd
algebraic-stack_agda0000_doc_8746
module Type.NbE where open import Context open import Type.Core open import Function open import Data.Empty open import Data.Sum.Base infix 3 _⊢ᵗⁿᵉ_ _⊢ᵗⁿᶠ_ _⊨ᵗ_ infixl 9 _[_]ᵗ mutual Starⁿᵉ : Conᵏ -> Set Starⁿᵉ Θ = Θ ⊢ᵗⁿᵉ ⋆ Starⁿᶠ : Conᵏ -> Set Starⁿᶠ Θ = Θ ⊢ᵗⁿᶠ ⋆ data _⊢ᵗⁿᵉ_ Θ : Kind -> Set where ...
algebraic-stack_agda0000_doc_8747
postulate _→_ : Set
algebraic-stack_agda0000_doc_8748
{-# OPTIONS --safe --no-termination-check #-} module Issue2442-conflicting where
algebraic-stack_agda0000_doc_8749
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NType2 open import lib.Function2 open import lib.types.Group open import lib.types.Sigma open import lib.types.Truncation open import lib.groups.Homomorphism open import lib.groups.Isomorphism open import lib.groups.SubgroupProp module lib...
algebraic-stack_agda0000_doc_8750
module Lemmachine.Resource.Configure where open import Lemmachine.Request open import Lemmachine.Response open import Lemmachine.Resource open import Lemmachine.Resource.Universe open import Data.Bool open import Data.Maybe open import Data.Product open import Data.List open import Data.Function using (const) private ...
algebraic-stack_agda0000_doc_8751
------------------------------------------------------------------------ -- The Agda standard library -- -- Finite sets, based on AVL trees ------------------------------------------------------------------------ open import Relation.Binary open import Relation.Binary.PropositionalEquality using (_≡_) module Data.AVL...
algebraic-stack_agda0000_doc_16640
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import Function open import Data.Unit open import Data.List as List open i...
algebraic-stack_agda0000_doc_16641
{- This second-order signature was created from the following second-order syntax description: syntax CommRing | CR type * : 0-ary term zero : * | 𝟘 add : * * -> * | _⊕_ l20 one : * | 𝟙 mult : * * -> * | _⊗_ l30 neg : * -> * | ⊖_ r50 theory (𝟘U⊕ᴸ) a |> add (zero, a) = a (𝟘U⊕ᴿ) a |> ...
algebraic-stack_agda0000_doc_16642
module examplesPaperJFP.Console where open import examplesPaperJFP.NativeIOSafe open import examplesPaperJFP.BasicIO hiding (main) open import examplesPaperJFP.ConsoleInterface public IOConsole : Set → Set IOConsole = IO ConsoleInterface --IOConsole+ : Set → Set --IOConsole+ = IO+ ConsoleInterface translateIOCon...
algebraic-stack_agda0000_doc_16643
open import Signature import Program -- | Herbrand model that takes the distinction between inductive -- and coinductive clauses into account. module Herbrand (Σ : Sig) (V : Set) (P : Program.Program Σ V) where open import Function open import Data.Empty open import Data.Product as Prod renaming (Σ to ⨿) open import ...
algebraic-stack_agda0000_doc_16644
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Bool.Base where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Data.Empty open import Cubical.Relation.Nullary open import Cubical.Relation.Nullary.DecidableEq -- Obtain the booleans open import Agda.Builtin.Bool ...
algebraic-stack_agda0000_doc_16645
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.QuotientRing where open import Cubical.Foundations.Prelude open import Cubical.HITs.SetQuotients hiding (_/_) open import Cubical.Algebra.CommRing open import Cubical.Algebra.CommRing.Ideal open import Cubical.Algebra.Ring open import Cubical.Algebra.Ring.Quotie...
algebraic-stack_agda0000_doc_16646
{-# OPTIONS --rewriting #-} module RingSolving where open import Data.Nat hiding (_≟_) open import Data.Nat.Properties hiding (_≟_) import Relation.Binary.PropositionalEquality open Relation.Binary.PropositionalEquality open import Agda.Builtin.Equality.Rewrite open import Function import Relation.Binary.Propositiona...
algebraic-stack_agda0000_doc_16647
import Lvl open import Data.Boolean open import Type module Data.List.Sorting.Functions {ℓ} {T : Type{ℓ}} (_≤?_ : T → T → Bool) where open import Data.List import Data.List.Functions as List -- Inserts an element to a sorted list so that the resulting list is still sorted. insert : T → List(T) → List(T) in...
algebraic-stack_agda0000_doc_16648
{-# OPTIONS --without-K #-} module Types where -- Universe levels postulate -- Universe levels Level : Set zero : Level suc : Level → Level max : Level → Level → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} {-# BUILTIN LEVELMAX max #-} -- Empty type data ⊥...
algebraic-stack_agda0000_doc_16649
------------------------------------------------------------------------------ -- Auxiliary properties of the McCarthy 91 function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-univer...
algebraic-stack_agda0000_doc_16650
{-# OPTIONS --allow-unsolved-metas #-} module ExtractFunction where open import Agda.Builtin.Nat open import Agda.Builtin.Bool plus : Nat -> Nat -> Nat plus = {! !} function1 : (x : Nat) -> (y : Nat) -> Nat function1 x y = plus x y pickTheFirst : Nat -> Bool -> Nat pickTheFirst x y = x function2 : Nat -> Bool ...
algebraic-stack_agda0000_doc_16651
{-# OPTIONS --without-K #-} open import Base open import Algebra.Groups open import Integers open import Homotopy.Truncation open import Homotopy.Pointed open import Homotopy.PathTruncation open import Homotopy.Connected -- Definitions and properties of homotopy groups module Homotopy.HomotopyGroups {i} where -- Loo...
algebraic-stack_agda0000_doc_16652
{-# OPTIONS -W ignore #-} module Issue2596b where -- This warning will be ignored {-# REWRITE #-} -- but this error will still be raised f : Set f = f
algebraic-stack_agda0000_doc_16653
{-# OPTIONS --without-K #-} module hott.level.sets.core where open import sum open import equality.core open import sets.unit open import sets.empty open import hott.level.core ⊤-contr : ∀ {i} → contr (⊤ {i}) ⊤-contr = tt , λ { tt → refl } ⊥-prop : ∀ {i} → h 1 (⊥ {i}) ⊥-prop x _ = ⊥-elim x
algebraic-stack_agda0000_doc_16654
{-# OPTIONS --without-K #-} module equality.core where open import sum open import level using () open import function.core infix 4 _≡_ data _≡_ {a} {A : Set a} (x : A) : A → Set a where refl : x ≡ x sym : ∀ {i} {A : Set i} {x y : A} → x ≡ y → y ≡ x sym refl = refl _·_ : ∀ {i}{X : Set i}{x y z : X} → x ≡...
algebraic-stack_agda0000_doc_16655
-- The ATP pragma with the role <hint> can be used with functions. module ATPHint where postulate D : Set data _≡_ (x : D) : D → Set where refl : x ≡ x sym : ∀ {m n} → m ≡ n → n ≡ m sym refl = refl {-# ATP hint sym #-}
algebraic-stack_agda0000_doc_224
module Ord where data Nat : Set where Z : Nat S : Nat -> Nat data Ord : Set where z : Ord lim : (Nat -> Ord) -> Ord zp : Ord -> Ord zp z = z zp (lim f) = lim (\x -> zp (f x))
algebraic-stack_agda0000_doc_225
-- 2018-11-02, Jesper: -- Problem reported by Martin Escardo -- Example by Guillaume Brunerie -- C-c C-s was generating postfix projections -- even with --postfix-projections disabled. open import Agda.Builtin.Equality record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B open _×_ post...
algebraic-stack_agda0000_doc_226
module Lib.IO where open import Lib.List open import Lib.Prelude {-# IMPORT System.Environment #-} FilePath = String postulate IO : Set -> Set getLine : IO String putStrLn : String -> IO Unit putStr : String -> IO Unit bindIO : {A B : Set} -> IO A -> (A -> IO B) -> IO B returnIO : {A :...
algebraic-stack_agda0000_doc_227
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Nat where -- Skeleton of FinSetoid as a Category open import Level open import Data.Fin.Base using (Fin; inject+; raise; splitAt; join) open import Data.Fin.Properties open import Data.Nat.Base using (ℕ; _+_) open import Data.Sum using (inj₁; inj...
algebraic-stack_agda0000_doc_228
-- Path induction {-# OPTIONS --without-K --safe #-} module Experiment.PropositionalEq where open import Level renaming (zero to lzero; suc to lsuc) open import Relation.Binary.PropositionalEquality import Relation.Binary.Reasoning.Setoid as SetoidReasoning open import Relation.Binary private variable a c : L...
algebraic-stack_agda0000_doc_229
------------------------------------------------------------------------ -- The Agda standard library -- -- Characters ------------------------------------------------------------------------ module Data.Char where open import Data.Nat using (ℕ) import Data.Nat.Properties as NatProp open import Data.Bool using (Bool;...
algebraic-stack_agda0000_doc_230
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for "equational reasoning" in multiple Setoids ------------------------------------------------------------------------ -- Example use: -- -- open import Data.Maybe -- import Relation.Binar...
algebraic-stack_agda0000_doc_231
{-# OPTIONS --without-K #-} open import Base open import Homotopy.Pushout open import Homotopy.VanKampen.Guide module Homotopy.VanKampen.Code {i} (d : pushout-diag i) (l : legend i (pushout-diag.C d)) where open pushout-diag d open legend l open import Homotopy.Truncation open import Homotopy.PathTruncati...
algebraic-stack_agda0000_doc_232
open import Prelude open import core module lemmas-consistency where -- type consistency is symmetric ~sym : {t1 t2 : typ} → t1 ~ t2 → t2 ~ t1 ~sym TCRefl = TCRefl ~sym TCHole1 = TCHole2 ~sym TCHole2 = TCHole1 ~sym (TCArr p1 p2) = TCArr (~sym p1) (~sym p2) ~sym (TCProd h h₁) = TCProd (~sym h) (~sym h₁) ...
algebraic-stack_agda0000_doc_233
{-# OPTIONS --cubical --safe #-} module Relation.Nullary.Discrete where open import Relation.Nullary.Decidable open import Path open import Level Discrete : Type a → Type a Discrete A = (x y : A) → Dec (x ≡ y)
algebraic-stack_agda0000_doc_234
-- Andreas, 2017-10-04, issue #689, test case by stevana -- {-# OPTIONS -v tc.data:50 #-} -- {-# OPTIONS -v tc.force:100 #-} -- {-# OPTIONS -v tc.constr:50 #-} -- {-# OPTIONS -v tc.conv.sort:30 #-} -- {-# OPTIONS -v tc.conv.nat:30 #-} open import Agda.Primitive data L {a} (A : Set a) : Set a where _∷_ : A → L A → ...
algebraic-stack_agda0000_doc_235
module Data.Num.Injection where open import Data.Num.Core open import Data.Nat hiding (compare) open import Data.Nat.Properties open import Data.Nat.Properties.Simple open import Data.Nat.Properties.Extra open import Data.Fin as Fin using (Fin; fromℕ≤; inject≤) renaming (zero to z; suc to s) open import Data...
algebraic-stack_agda0000_doc_236
module Lambda where open import Prelude open import Star open import Examples open import Modal -- Environments record TyAlg (ty : Set) : Set where field nat : ty _⟶_ : ty -> ty -> ty data Ty : Set where <nat> : Ty _<⟶>_ : Ty -> Ty -> Ty freeTyAlg : TyAlg Ty freeTyAlg = record { nat = <nat>; _⟶_ = _<...
algebraic-stack_agda0000_doc_237
{-# OPTIONS --allow-unsolved-metas #-} module regex1 where open import Level renaming ( suc to succ ; zero to Zero ) open import Data.Fin open import Data.Nat hiding ( _≟_ ) open import Data.List hiding ( any ; [_] ) -- import Data.Bool using ( Bool ; true ; false ; _∧_ ) -- open import Data.Bool using ( Bool ; true ...
algebraic-stack_agda0000_doc_238
------------------------------------------------------------------------ -- Labelled transition systems ------------------------------------------------------------------------ {-# OPTIONS --safe #-} module Labelled-transition-system where open import Equality.Propositional import Logical-equivalence open import Pre...
algebraic-stack_agda0000_doc_239
{- following Johnstone's book "Stone Spaces" we define semilattices to be commutative monoids such that every element is idempotent. In particular, we take every semilattice to have a neutral element that is either the maximal or minimal element depending on whether we have a join or meet semilattice. -} {-# OPTI...
algebraic-stack_agda0000_doc_48
module ShouldBeApplicationOf where data One : Set where one : One data Two : Set where two : Two f : One -> Two f two = two
algebraic-stack_agda0000_doc_49
-- Andreas, bug found 2011-12-31 {-# OPTIONS --irrelevant-projections #-} module Issue543 where open import Common.Equality data ⊥ : Set where record ⊤ : Set where constructor tt data Bool : Set where true false : Bool T : Bool → Set T true = ⊤ T false = ⊥ record Squash {ℓ}(A : Set ℓ) : Set ℓ where cons...
algebraic-stack_agda0000_doc_50
{-# OPTIONS --without-K --exact-split --safe #-} module HoTT.Ident where data Id (X : Set) : X → X → Set where refl : (x : X) → Id X x x _≡_ : {X : Set} → X → X → Set x ≡ y = Id _ x y 𝕁 : {X : Set} → (A : (x y : X) → x ≡ y → Set) → ((x : X) → A x x (refl x)) → (x y : X) → (p : x ≡ y) → A x y p 𝕁 A f x x (...
algebraic-stack_agda0000_doc_51
------------------------------------------------------------------------ -- Compiler correctness ------------------------------------------------------------------------ open import Prelude import Lambda.Syntax module Lambda.Compiler-correctness {Name : Type} (open Lambda.Syntax Name) (def : Name → Tm 1) whe...
algebraic-stack_agda0000_doc_52
{-# OPTIONS --cubical-compatible #-} data Bool : Set where true : Bool false : Bool data ℕ : Set where zero : ℕ suc : (n : ℕ) → ℕ data Fin : ℕ → Set where zero : {n : ℕ} → Fin (suc n) suc : {n : ℕ} (i : Fin n) → Fin (suc n) infixr 5 _∷_ data Vec {a} (A : Set a) : ℕ → Set a where [] : Vec A zero ...
algebraic-stack_agda0000_doc_53
module STLC1.Kovacs.Soundness where open import STLC1.Kovacs.Convertibility public open import STLC1.Kovacs.PresheafRefinement public -------------------------------------------------------------------------------- infix 3 _≈_ _≈_ : ∀ {A Γ} → Γ ⊩ A → Γ ⊩ A → Set _≈_ {⎵} {Γ} M₁ M₂ = M₁ ≡ M₂ _≈_ {A ⇒ B} {Γ} f...
algebraic-stack_agda0000_doc_54
------------------------------------------------------------------------ -- The Agda standard library -- -- Decision procedures for finite sets and subsets of finite sets -- -- This module is DEPRECATED. Please use the Data.Fin.Properties -- and Data.Fin.Subset.Properties directly. -------------------------------------...
algebraic-stack_agda0000_doc_55
module ial where open import ial-datatypes public open import logic public open import thms public open import termination public open import error public open import io public