text
stringlengths
4
690k
{-# OPTIONS --cubical --no-exact-split --safe #-} module Cubical.Data.Nat.Base where open import Cubical.Core.Primitives open import Agda.Builtin.Nat public using (zero; suc; _+_; _*_) renaming (Nat to ℕ) predℕ : ℕ → ℕ predℕ zero = 0 predℕ (suc n) = n caseNat : ∀ {ℓ} → {A : Type ℓ} → (a0 aS : A) → ℕ → A case...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Universe {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.LogicalRelation open import Definition.LogicalRela...
module ExtInterface.Data.Product where -- TODO: Write to Agda team about the lack of compilability of Sigma. -- I assumed that the builtin flag would allow to compile Σ into (,) -- but it doesn't. That's why this microfile exists infixr 4 ⟨_,_⟩ infixr 2 _×_ data _×_ (A B : Set) : Set where ⟨_,_⟩ : A → B → A × B {...
module #16 where {- Show that addition of natural numbers is commutative: ∏(i,j:N)(i + j = j + i). -} open import Data.Nat open import Relation.Binary.PropositionalEquality open Relation.Binary.PropositionalEquality.≡-Reasoning l-commut₀ : (n : ℕ) → n + 0 ≡ n l-commut₀ zero = refl l-commut₀ (suc n) = cong suc (l-c...
{-# OPTIONS --without-K #-} module function.isomorphism where open import function.isomorphism.core public open import function.isomorphism.properties public open import function.isomorphism.coherent public open import function.isomorphism.lift public open import function.isomorphism.utils public open import function....
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Library.Action where open import Light.Level using (Level ; Setω) open import Light.Library.Data.Unit as Unit using (Unit) open import Light.Library.Data.Natural as Natural using (ℕ) open import Light.Variable.Sets open impor...
module Issue858 where module _ (A B : Set) (recompute : .B → .{{A}} → B) where _$_ : .(A → B) → .A → B f $ x with .{f} | .(f x) | .{{x}} ... | y = recompute y module _ (A B : Set) (recompute : ..B → ..{{A}} → B) where _$'_ : ..(A → B) → ..A → B f $' x with ..{f} | ..(f x) | ..{{x}} ... | y = recompute y...
{-# OPTIONS --universe-polymorphism #-} module AutoMisc where -- prelude postulate Level : Set lzero : Level lsuc : (i : Level) → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO lzero #-} {-# BUILTIN LEVELSUC lsuc #-} data _≡_ {a} {A : Set a} (x : A) : A → Set where refl : x ≡ x trans : ∀...
module UnSized.SelfRef where open import Data.Unit.Base open import Data.Product open import Data.String.Base open import Data.Sum using (_⊎_) renaming (inj₁ to inl; inj₂ to inr) open import Size --open import SimpleCell open import SizedIO.Object open import SizedIO.IOObject open import SizedIO.ConsoleObject -- open...
{-# OPTIONS --without-K #-} module HoTT.Identity.Coproduct where open import HoTT.Base open import HoTT.Equivalence open variables private variable x y : A + B _=+_ : {A : 𝒰 i} {B : 𝒰 j} (x y : A + B) → 𝒰 (i ⊔ j) _=+_ {j = j} (inl a₁) (inl a₂) = Lift {j} (a₁ == a₂) _=+_ (inl _) (inr _) = 𝟎 _=+_ (inr _) (inl _) =...
{-# OPTIONS --safe #-} module Cubical.HITs.SequentialColimit.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat private variable ℓ : Level record Sequence (ℓ : Level) : Type (ℓ-suc ℓ) where field space : ℕ → Type ℓ map : {n : ℕ} → space n → space (1 + n) open Sequence d...
open import Oscar.Prelude open import Oscar.Class.IsPrecategory open import Oscar.Class.Reflexivity open import Oscar.Class.Transleftidentity open import Oscar.Class.Transrightidentity open import Oscar.Class.Transitivity module Oscar.Class.IsCategory where module _ {𝔬} {𝔒 : Ø 𝔬} {𝔯} (_∼_ : 𝔒 → 𝔒 → Ø 𝔯) ...
module logic where open import Level open import Relation.Nullary open import Relation.Binary hiding (_⇔_ ) open import Data.Empty data One {n : Level } : Set n where OneObj : One data Two : Set where i0 : Two i1 : Two data Bool : Set where true : Bool false : Bool record _∧_ {n m : Level} (A : Se...
------------------------------------------------------------------------ -- The Agda standard library -- -- Heterogeneous N-ary Relations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Nary where --------------------------------------------...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Nullary.DecidableEq where open import Cubical.Relation.Nullary.Properties using (Dec→Stable; Discrete→isSet) public
{-# OPTIONS --erased-cubical --safe #-} module Util where open import Cubical.Core.Everything using (_≡_; Level; Type; Σ; _,_; fst; snd; _≃_; ~_) open import Cubical.Foundations.Prelude using (refl; sym; _∙_; cong; transport; subst; funExt; transp; I; i0; i1) --open import Cubical.Foundations.Function using (...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Susp.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Data.Bool open import Cubical.HITs.Join ope...
{-# OPTIONS --without-K #-} module container.m.from-nat.bisimulation where open import level open import sum open import equality open import function open import container.core open import container.m.coalgebra as MC hiding (IsMor ; _⇒_) open import container.m.from-nat.coalgebra hiding (X) open import hott.level mo...
{-# OPTIONS --without-K #-} module M-types.Base.Core where open import Agda.Primitive public using (Level) renaming ( lzero to ℓ-zero ; lsuc to ℓ-suc ; _⊔_ to ℓ-max ) variable ℓ ℓ₀ ℓ₁ ℓ₂ : Level Ty : (ℓ : Level) → Set (ℓ-suc ℓ) Ty ℓ = Set...
module _ where -- Ulf's example of why removing abstract may -- cause a proof that used to work to now fail -- Agda mailing list, 16 May 2018 open import Agda.Builtin.Nat open import Agda.Builtin.Bool open import Agda.Builtin.Equality module WithAbstract where abstract f : Nat → Nat f zero = zero ...
postulate A : Set module _ where {-# POLARITY A #-}
module UniDB.Subst where open import UniDB.Subst.Core public open import UniDB.Subst.Pair public open import UniDB.Subst.Inst public
{-# OPTIONS --without-K --rewriting --allow-unsolved-metas #-} open import HoTT renaming (pt to pt⊙) open import homotopy.DisjointlyPointedSet open import lib.types.Nat open import lib.types.Vec module simplicial.Base where -- HELPERS combinations : ℕ → List ℕ -> List (List ℕ) combinations 0 _ = nil :: nil combinati...
-- If we try to naively extend the Kripke structure used for NbE of STLC, -- we find that it is sound, but not complete. -- -- The definition of semantic objects, which represent terms in normal form, -- is not big enough to represent neutral terms of the coproduct types. -- The problem is visible in the definition of ...
{-# OPTIONS --without-K --rewriting #-} module Base where {- With the HoTT-Agda library, the following import can be used instead: open import HoTT using (Type; lmax; lsucc; _==_; idp; !; ap; apd; Square; ids; vid-square; hid-square; SquareOver; ↓-ap-in; apd-square; app=; λ=; app=-β; transport; ℕ...
module Type.Category.IntensionalFunctionsCategory.HomFunctor where import Functional as Fn open import Function.Proofs open import Logic.Predicate import Lvl open import Relator.Equals open import Relator.Equals.Proofs import Relator.Equals.Proofs.Equiv open import Structure.Category open import Structu...
{-# OPTIONS --without-K #-} module Util where open import Agda.Primitive using (Level) open import Data.Fin using (Fin; #_) renaming (suc to fsuc) open import Data.Bool using (Bool; true; false; if_then_else_) open import Data.List using (List; concat; replicate; []; _∷_) open ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Homomorphism proofs for negation over polynomials ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Tactic.RingSolver.Core.Polynomial.Parame...
------------------------------------------------------------------------ -- Some simple substitution combinators ------------------------------------------------------------------------ -- Given a term type which supports weakening and transformation of -- variables to terms various substitutions are defined and vario...
{- This second-order equational theory was created from the following second-order syntax description: syntax Empty | E type 𝟘 : 0-ary term abort : 𝟘 -> α theory (𝟘η) e : 𝟘 c : α |> abort(e) = c -} module Empty.Equality where open import SOAS.Common open import SOAS.Context open import SOAS.Variable ...
{-# OPTIONS --guardedness-preserving-type-constructors #-} module Issue602 where infixl 6 _⊔_ postulate Level : Set zero : Level suc : Level → Level _⊔_ : Level → Level → Level {-# BUILTIN LEVEL Level #-} {-# BUILTIN LEVELZERO zero #-} {-# BUILTIN LEVELSUC suc #-} {-# BUILTIN LEVELMAX _⊔_ #-}...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor.Bifunctor module Categories.Diagram.End {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {D : Category o′ ℓ′ e′} (F : Bifunctor (Category.op C) C D) where private module D = Category D open D open HomReasoning open Equiv...
{-# OPTIONS --without-K --safe #-} -- A "canonical" presentation of limits in Setoid. -- -- These limits are obviously isomorphic to those created by -- the Completeness proof, but are far less unweildy to work with. -- This isomorphism is witnessed by Categories.Diagram.Pullback.up-to-iso module Categories.Category....
module Scratch (FunctionName : Set) where open import Oscar.Data.Fin using (Fin; zero; suc; thick?) open import Data.Nat using (ℕ; suc; zero) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂; cong; sym; trans) open import Function using (_∘_; flip) open import Relation.Nullary using (¬_; Dec;...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Operations.Semantics where open import Data.Nat as ℕ using (ℕ; suc; zero) open import Data.Binary.Definitions open import Data.Binary.Operations.Unary import Data.List as List 2* : ℕ → ℕ 2* x = x ℕ.+ x {-# INLINE 2* #-} _∷⇓_ : Bit → ℕ → ℕ O ∷⇓ xs = 2* xs I ∷⇓ xs...
module Support.Nat where open import Support data _<_ : (n m : ℕ) → Set where Z<Sn : {n : ℕ} → zero < suc n raise< : {n m : ℕ} (n<m : n < m) → suc n < suc m infix 5 _>_ _>_ : (m n : ℕ) → Set _>_ = flip _<_ infixr 7 _+_ _+_ : (n m : ℕ) → ℕ zero + m = m suc n + m = suc (n + m) infixr 9 _*_ _*_ : (n m : ℕ) → ℕ ze...
module _ where A : Set₁ A = Set
------------------------------------------------------------------------------ -- Conat properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS ...
module Everything where -- The development can almost entirely be type-checked using --safe, -- We mark modules that use the TERMINATING pragma with (**) -- And one module that uses --rewriting with (*). -- These are the only modules that Agda does not accept ass --safe. -- # First we summarize the library we use by ...
{-# OPTIONS --cubical --safe #-} module Data.Fin.Injective where open import Prelude open import Data.Fin.Base open import Data.Fin.Properties using (discreteFin) open import Data.Nat open import Data.Nat.Properties using (+-comm) open import Function.Injective private variable n m : ℕ infix 4 _≢ᶠ_ _≡ᶠ_ _≢ᶠ_ ...
module _ where open import Agda.Builtin.Nat open import Agda.Builtin.Equality postulate C : Set → Set record R (F : Nat → Set) : Set where field n : Nat ⦃ iC ⦄ : C (F n) postulate T : Nat → Set instance iCT5 : C (T 5) module _ (n m : Nat) where foo : n ≡ suc m → Nat → Set foo refl p = Nat ...
module Text.Greek.SBLGNT.Jas where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΙΑΚΩΒΟΥ : List (Word) ΙΑΚΩΒΟΥ = word (Ἰ ∷ ά ∷ κ ∷ ω ∷ β ∷ ο ∷ ς ∷ []) "Jas.1.1" ∷ word (θ ∷ ε ∷ ο ∷ ῦ ∷ []) "Jas.1.1" ∷ word (κ ∷ α ∷ ὶ ∷ []) "Jas.1.1" ∷ ...
module Logic.Equivalence where import Logic.Relations open Logic.Relations record Equivalence (A : Set) : Set1 where field _==_ : Rel A refl : Reflexive _==_ sym : Symmetric _==_ trans : Transitive _==_
{-# OPTIONS --cubical --no-import-sorts #-} module MorePropAlgebra where open import MorePropAlgebra.Definitions public open import MorePropAlgebra.Structures public open import MorePropAlgebra.Bundles public open import MorePropAlgebra.Consequences public
module _ where primitive primGlue : _
open import Relation.Binary using (Preorder) open import Relation.Binary.PropositionalEquality module Category.Monad.Monotone {ℓ}(pre : Preorder ℓ ℓ ℓ) where open Preorder pre renaming (Carrier to I; _∼_ to _≤_; refl to ≤-refl) open import Function open import Level open import Relation.Unary open import Relation.Un...
module my-bool-test where open import bool open import eq open import level ~~tt : ~ ~ tt ≡ tt ~~tt = refl ~~ff : ~ ~ ff ≡ ff ~~ff = refl {- ~~-elim : ∀ (b : 𝔹) → ~ ~ b ≡ b ~~-elim tt = refl ~~-elim ff = refl -} ~~-elim2 : ∀ (b : 𝔹) → ~ ~ b ≡ b ~~-elim2 tt = ~~tt ~~-elim2 ff = ~~ff ~~tt' : ~ ~ tt ≡ tt ~~tt' = ref...
module PatternSynonymAmbiguousParse where data X : Set where if_then_else_ : X -> X -> X -> X if_then_ : X -> X -> X x : X pattern bad x = if x then if x then x else x
------------------------------------------------------------------------ -- Laws related to D ------------------------------------------------------------------------ module TotalParserCombinators.Laws.Derivative where open import Algebra open import Codata.Musical.Notation open import Data.List import Data.List.Cate...
------------------------------------------------------------------------------ -- Properties of streams of total natural numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe...
{- 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 -} {-# OPTIONS --allow-unsolved-metas #-} open import LibraBFT.Prelude open import...
module lists where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; trans; cong) open Eq.≡-Reasoning open import Data.Bool using (Bool; true; false; T; _∧_; _∨_; not) open import Data.Nat using (ℕ; zero; suc; _+_; _*_; _∸_; _≤_; s≤s; z≤n) open import Data.Nat.Properties using (+-asso...
{-# OPTIONS --universe-polymorphism #-} module Categories.Monoidal.IntConstruction where open import Level open import Data.Fin open import Data.Product open import Categories.Category open import Categories.Product open import Categories.Monoidal open import Categories.Functor hiding (id; _∘_; identityʳ; assoc) ope...
module Reright where open import Prelude open import Tactic.Reflection.Reright open import Agda.Builtin.Reflection -- for better pretty-printing of error messages -- 'reright' presents the user with changed context variabes, to mimic that done by 'rewrite'. simple-reright-test₁ : (A B : Set) (F : Set → Set) ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lists made up entirely of unique elements (setoid equality) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Rel; Se...
------------------------------------------------------------------------ -- The Agda standard library -- -- Equality over lists using propositional equality ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Data.List.Relatio...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.List.Relation.Unary.Any.Properties directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.RibbonCover module experimental.CoverClassification2 {i} (X : Ptd i) (A-conn : is-connected 0 (de⊙ X)) where private A = de⊙ X a = pt X open Cover open import homotopy.CoverClassification X A-conn {- Universality ...
-- Andreas, 2015-02-07 postulate X Y : Set fix : (X → X) → X g : Y → X → X y : Y P : X → Set yes : (f : X → X) → P (f (fix f)) test : P (g y (fix (g y))) test with g y test | f = yes f -- should be able to abstract (g y) twice -- and succeed
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor module Categories.Diagram.Limit.Properties {o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} where open import Categories.Diagram.Cone.Properties open import Categories.NaturalTransformation.Natura...
open import lib open import sum module grammar (form : Set)(_eq_ : form → form → 𝔹)(drop-form : (x y : form) → x ≡ y → x eq y ≡ tt)(rise-form : (x y : form) → x eq y ≡ tt → x ≡ y) where infix 7 _⇒_ data production : Set where _⇒_ : form → 𝕃 (form ⊎ char) → production record grammar {numprods : ℕ} : Set where ...
module Issue203 where open import Common.Level -- shouldn't work data Bad {a b} (A : Set a) : Set b where [_] : (x : A) → Bad A
module Eq.KleeneTheory where open import Prelude open import T open import Eq.Defs open import Eq.LogicalTheory open import Eq.KleeneTheoryEarly public -- Harper says that Kleene equality is "evidently reflexive", -- but this requires/implies termination! -- We pick it directly from the consistency and reflexivity of...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Irreflexive where -- Stdlib imports open import Level using (Level) open import Relation.Binary using (Rel; Irreflexive) -- Local imports open import Dodo.Binary.Equality module _ {a ℓ₁ ℓ₂ ℓ₃ : Level} {A : Set a} {≈ : Rel A ℓ₁} {P : Rel A ℓ₂} {Q : Rel A ℓ₃} ...
-- Andreas, 2017-01-20, issue #1817 is fixed open import Agda.Builtin.Size open import Agda.Builtin.Nat renaming (Nat to ℕ) -- Function _$_ : ∀{a b}{A : Set a}{B : Set b} →(A → B) → A → B f $ x = f x case_of_ : ∀{a b}{A : Set a}{B : Set b} → A → (A → B) → B case x of f = f x -- Size data SizeLt (i : Size) : Set ...
{- This second-order equational theory was created from the following second-order syntax description: syntax CTLC | ΛC type N : 0-ary _↣_ : 2-ary | r30 ¬_ : 1-ary | r30 term app : α ↣ β α -> β | _$_ l20 lam : α.β -> α ↣ β | ƛ_ r10 throw : α ¬ α -> β callcc : ¬ α.α -> α theory (ƛ...
{-# OPTIONS --cubical-compatible #-} postulate A : Set B : A → Set -- fine record R₀ : Set where field @0 x : A @0 y : B x -- bad record R : Set where field @0 x : A y : B x
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.NaturalTransformation.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Univalence open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism renaming (iso to iIso) open import Cubica...
{-# OPTIONS --copatterns --sized-types #-} open import Common.Size module Issue1038 (A : Set) where record S (i : Size) : Set where field force : ∀ (j : Size< i) → A head : ∀ i → S i → (j : Size< i) → A head i s j = S.force s _ -- Problem was: -- Cannot solve size constraints -- (↑ _9 A i s j) =< (_i_8 A i s...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Conversion.Fast where -- This module provides a conversion function from -- nats which uses built-in functions. -- It is dramatically faster than the normal conversion -- even at smaller numbers. open import Data.Binary.Definition open import Data.Nat.DivMod open...
module Isos.NatLike where open import Isos.Isomorphism open import Nats open import Data.Product open import Equality open import Data.Unit ------------------------------------------------------------------------ -- internal stuffs private module WithList where open import Lists list→ℕ : List ⊤ → ℕ list...
open import Signature import Program module Rewrite (Σ : Sig) (V : Set) (P : Program.Program Σ V) where open import Terms Σ open import Program Σ V open import Data.Empty renaming (⊥ to ∅) open import Data.Unit open import Data.Product as Prod renaming (Σ to ⨿) open import Data.Sum as Sum open import Data.Fin open im...
module Loc (K : Set) where open import Basics open import Pr open import Nom data Loc : Set where EL : Loc _*_ : Loc -> K -> Loc infixl 50 _*_ data _!_ : Loc -> K -> Set where top : {L : Loc}{S : K} -> (L * S) ! S pop : {L : Loc}{S T : K} -> L ! S -> (L * T) ! S _<*_ : K -> Loc -> Loc S <* EL = EL * S S <*...
{-# OPTIONS --cubical #-} module cubical where open import Cubical.Core.Primitives --- Sharp of a type: you can raise any term of type A to the sharp to get a term of type sharp-A data ♯_ {ℓ : Level} (A : Type ℓ) : Type ℓ where _↑♯ : A → ♯ A -- do we need a duplicate of sharp-on-Types for crisp types? -- data ♯c_...
module Data.Nat.Properties where import Prelude import Logic.Base import Logic.Relations import Logic.Equivalence import Logic.Operations as Operations import Logic.Identity import Logic.ChainReasoning import Data.Nat import Data.Bool open Prelude open Data.Nat open Logic.Base open Logic.Relations open Logic.Identit...
module Structure.Category.NaturalTransformation.NaturalTransformations where open import Functional using () renaming (id to idᶠⁿ) open import Functional.Dependent using () renaming (_∘_ to _∘ᶠⁿ_) open import Logic open import Logic.Predicate import Lvl open import Structure.Category open import Structu...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of disjoint lists (setoid equality) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Disjoint.Setoid.Proper...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.EilenbergMacLane open import homotopy.EilenbergMacLaneFunctor open import groups.ToOmega open import cohomology.Theory open import cohomology.SpectrumModel module cohomology.EMModel where module _ {i} (G : AbGroup i) where open EMExplic...
module BTree.Complete.Base.Properties {A : Set} where open import BTree {A} open import BTree.Complete.Base {A} open import BTree.Equality {A} open import BTree.Equality.Properties {A} lemma-≃-⋗ : {l l' r' : BTree} → l ≃ l' → l' ⋗ r' → l ⋗ r' lemma-≃-⋗ (≃nd x x' ≃lf ≃lf ≃lf) (⋗lf .x') = ⋗lf x lemma-≃-⋗ (≃nd {r = r}...
module plfa-exercises.Practice5 where open import Data.Nat using (ℕ; zero; suc) open import Data.String using (String; _≟_) open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; cong) open import Relation.Nullary using (Dec; yes; no; ¬_) open import plfa.part1.Isomorphism using (_≲_) Id : Set Id = ...
module Ag13 where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq.≡-Reasoning open import Data.Nat using (ℕ; zero; suc) open import Data.Product using (_×_) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Relation.Nullary using (¬_) open import Rela...
{-# OPTIONS --safe #-} useful-lemma : ∀ {a} {A : Set a} → A useful-lemma = useful-lemma
{-# OPTIONS --without-K --copatterns --sized-types #-} open import lib.Basics open import lib.PathGroupoid open import lib.types.Paths open import lib.Funext open import Size {- -- | Coinductive delay type. This is the functor νπ̂ : Set → Set arising -- as the fixed point of π̂(H) = π ∘ ⟨Id, H⟩, where π : Set × Set → ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Group where open import Cubical.Algebra.Group.Base public open import Cubical.Algebra.Group.Properties public open import Cubical.Algebra.Group.Morphism public open import Cubical.Algebra.Group.MorphismProperties public open import Cubical.Algeb...
{-# OPTIONS --without-K #-} module Sigma {a b} {A : Set a} {B : A → Set b} where open import Equivalence open import Types -- Projections for the positive sigma. π₁′ : (p : Σ′ A B) → A π₁′ p = split (λ _ → A) (λ a _ → a) p π₂′ : (p : Σ′ A B) → B (π₁′ p) π₂′ p = split (λ p → B (π₁′ p)) (λ _ b → b) p -- Induction pri...
{-# OPTIONS --cubical #-} module Multidimensional.Data.NNat.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Unit open import Cubical.Data.Nat open import Cubical.Data.Prod open import Cubical.Data.Bool open import Cubical.Relation.Nullary open import Multidimensional.Data.Extra.Nat open...
{-# OPTIONS --safe #-} module Cubical.Homotopy.HSpace where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.Foundations.HLevels open import Cubical.HITs.S1 open import Cubical.HITs.Sn record HSpace {ℓ : Level} (A : Pointed ℓ) : Type ℓ where constructor HSp field...
module Prelude.Equality.Unsafe where open import Prelude.Equality open import Prelude.Empty open import Prelude.Erased open import Agda.Builtin.TrustMe -- unsafeEqual {x = x} {y = y} evaluates to refl if x and y are -- definitionally equal. unsafeEqual : ∀ {a} {A : Set a} {x y : A} → x ≡ y unsafeEqual = primTrustMe...
{-# OPTIONS --without-K --safe #-} module Definition.Conversion.Lift where open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Weakening open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definit...
{-# OPTIONS --without-K #-} open import Types open import Functions module Paths where -- Identity type infix 4 _≡_ -- \equiv data _≡_ {i} {A : Set i} (a : A) : A → Set i where refl : a ≡ a _==_ = _≡_ _≢_ : ∀ {i} {A : Set i} → (A → A → Set i) x ≢ y = ¬ (x ≡ y) -- -- This should not be provable -- K : {A : Set...
-- Andreas, 2016-10-09, issue #2223 -- The level constraint solver needs to combine constraints -- from different contexts and modules. -- The parameter refinement broke this test case. -- {-# OPTIONS -v tc.with.top:25 #-} -- {-# OPTIONS -v tc.conv.nat:40 #-} -- {-# OPTIONS -v tc.constr.add:45 #-} open import Common...
{-# OPTIONS --cubical --safe --postfix-projections #-} module Data.Nat.Order where open import Prelude open import Data.Nat.Properties open import Relation.Binary <-trans : Transitive _<_ <-trans {zero} {suc y} {suc z} x<y y<z = tt <-trans {suc x} {suc y} {suc z} x<y y<z = <-trans {x} {y} {z} x<y y<z <-asym : Asymm...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2021, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Base.Types import LibraBFT.Impl.Consensus.Consensus...
open import Relation.Binary.Core module BubbleSort.Everything {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) (trans≤ : Transitive _≤_) where open import BubbleSort.Correctness.Order _≤_ tot≤ trans≤ open import BubbleSort.Correctness.Permutation _≤_ tot≤
{-# OPTIONS --universe-polymorphism #-} module Categories.Equivalence.Strong where -- Strong equivalence of categories. Same as ordinary equivalence in Cat. -- May not include everything we'd like to think of as equivalences, namely -- the full, faithful functors that are essentially surjective on objects. open impo...
{-# OPTIONS --cubical --safe #-} module Cubical.HITs.S1 where open import Cubical.HITs.S1.Base public -- open import Cubical.HITs.S1.Properties public
module Sets.IterativeSet.Relator.Proofs where import Lvl open import Data open import Data.Boolean open import Data.Boolean.Proofs open import Data.Boolean.Stmt open import Data.Boolean.Stmt.Proofs open import Data.Either as Either using (_‖_) open import Data.Tuple as Tuple using () open import Functional open i...
module Pi-Calculus where -- Local modules --------------------------------------------------------------- open import Common using (Id) -- π-process definition -------------------------------------------------------- data π-process : Set where recv_from_∙_ : Id → Id → π-process → π-process -- Rec...
------------------------------------------------------------------------ -- Properties of combinatorial functions on integers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --exact-split #-} module Math.Combinatorics.IntegerFunction.Properties where open impor...
data Unit : Set where unit : Unit F : Unit → Set₁ F unit = Set data D (u : Unit) (f : F u) : Set where variable u : Unit f : F u d : D u f postulate P : {u : Unit} {f : F u} → D u f → Set p : P d p' : (u : Unit) (f : F u) (d : D u f) → P d p' u f d = p {u} {f} {d}