text
stringlengths
4
690k
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Properties.Setoids.Extensive where open import Level open import Data.Product using (Σ; proj₁; proj₂; _,_; Σ-syntax; _×_; -,_) open import Function.Equality using (Π) open import Relation.Binary using (Setoid; Rel) open import Categories.Category ...
{-# OPTIONS --safe --erased-cubical #-} module Erased-cubical where -- Modules that use --cubical can be imported. open import Erased-cubical.Cubical-again -- Code from such modules that was originally defined in modules using -- --without-K or --erased-cubical can be used without restrictions. _ : {A : Set} → A →...
module Data.Finitude.Properties where open import Data.Fin as Fin using (Fin; #_ ) open import Data.Fin.Properties hiding (decSetoid) open import Relation.Nullary open import Relation.Unary open import Relation.Binary renaming (Decidable to Dec₂) hiding (Irrelevant) open import Relation.Binary.PropositionalEquality as...
-- Andreas, 2016-10-03, re issue #2231 -- Testing whether the musical coinduction works fine in abstract blocks {-# OPTIONS --guardedness #-} module AbstractCoinduction where {-# BUILTIN INFINITY ∞_ #-} {-# BUILTIN SHARP ♯_ #-} {-# BUILTIN FLAT ♭ #-} infixr 5 _≺_ abstract ------------------------------...
module HasVacuousDischarge where open import OscarPrelude open import HasNegation open import HasSubstantiveDischarge record HasVacuousDischarge (A : Set) : Set₁ where field ⦃ hasNegation ⦄ : HasNegation A ⦃ hasSubstantiveDischarge ⦄ : HasSubstantiveDischarge A A ◁_ : List A → Set ◁ +s = ∃ λ (s : A) ...
------------------------------------------------------------------------ -- A simplification of Hinze.Section3 ------------------------------------------------------------------------ module Hinze.Simplified.Section3 where open import Stream.Programs open import Stream.Equality open import Stream.Pointwise open impor...
module Luau.Syntax.FromJSON where open import Luau.Syntax using (Block; Stat ; Expr; nil; _$_; var; var_∈_; function_is_end; _⟨_⟩; local_←_; return; done; _∙_; maybe; VarDec; number; binexp; BinaryOperator; +; -; *; /) open import Luau.Type.FromJSON using (typeFromJSON) open import Agda.Builtin.List using (List; _∷_;...
------------------------------------------------------------------------ -- Some properties imply others ------------------------------------------------------------------------ module Relation.Binary.Consequences where open import Relation.Binary.Core hiding (refl) open import Relation.Nullary.Core open import Relat...
-- Andreas, 2019-08-07, issue #3966 -- -- Precise error location for unification problem during coverage checking. {-# OPTIONS --cubical-compatible #-} module _ {A : Set} where open import Common.Equality open import Common.List data _⊆_ : (xs ys : List A) → Set where _∷ʳ_ : ∀ {xs ys} → ∀ y → _⊆_ xs ys → _⊆_ xs (...
{-# OPTIONS --without-K #-} module Agda.Builtin.Word where open import Agda.Builtin.Nat postulate Word64 : Set {-# BUILTIN WORD64 Word64 #-} primitive primWord64ToNat : Word64 → Nat primWord64FromNat : Nat → Word64
{-# OPTIONS --safe #-} -- --without-K #-} open import Relation.Nullary.Decidable using (toWitness; fromWitness) open import Relation.Nullary using (yes; no) open import Function using (_∘_) import Data.Empty as Empty import Data.Product as Product import Data.Product.Properties as Productₚ import Data.Unit as Unit im...
{-# OPTIONS --without-K #-} module hott.loop.level where open import sets.nat.core open import hott.loop.core open import hott.level.core Ω-level : ∀ {i n}{X : Set i}(m : ℕ){x : X} → h (m + n) X → h n (Ω m x) Ω-level zero hX = hX Ω-level (suc m) hX = Ω-level m (hX _ _)
------------------------------------------------------------------------ -- The Agda standard library -- -- Finite sets ------------------------------------------------------------------------ -- Note that elements of Fin n can be seen as natural numbers in the -- set {m | m < n}. The notation "m" in comments below re...
{-# OPTIONS --rewriting --confluence-check #-} open import Agda.Builtin.Nat using (Nat; zero; suc) open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite variable k l m n : Nat postulate max : Nat → Nat → Nat max-0l : max 0 n ≡ n max-0r : max m 0 ≡ m max-diag : max m m ≡ m max-ss : m...
{-# OPTIONS --allow-unsolved-metas #-} module AgdaFeatureInstanceResolutionViaConstraint where postulate A : Set postulate y : A Appy : (A → Set) → Set Appy H = H y record Foo (T : Set) : Set where field foo : T open Foo ⦃ … ⦄ public postulate S : A → Set record Failing : Set where no-eta-equality postula...
{-# OPTIONS --cubical --no-import-sorts --guardedness --safe #-} -- Construction of M-types from -- https://arxiv.org/pdf/1504.02949.pdf -- "Non-wellfounded trees in Homotopy Type Theory" -- Benedikt Ahrens, Paolo Capriotti, Régis Spadotti module Cubical.Codata.M.AsLimit.M.Base where open import Cubical.Foundations....
{-# OPTIONS --without-K #-} module lob where open import common open import well-typed-syntax open import well-typed-quoted-syntax open import well-typed-syntax-interpreter-full module inner (‘X’ : Typ ε) (‘f’ : Term {Γ = ε ▻ (‘□’ ‘’ ⌜ ‘X’ ⌝T)} (W ‘X’)) where X : Set _ X = Typε⇓ ‘X’ f'' : (x : Typε⇓ (‘□’ ‘’ ⌜ ‘...
{-# OPTIONS --without-K #-} open import Types module J {a c} {A : Set a} (C : (x y : A) → x ≡ y → Set c) where open import GroupoidStructure open import PathOperations open import PathStructure.Sigma open import Transport γ : {x y : A} (p : x ≡ y) → Id (Σ A λ y → x ≡ y) (x , refl) (y , p) γ p = merge-path (p , tr-...
{-# OPTIONS --without-K #-} module Model.RGraph where open import Cats.Category open import Relation.Binary using (IsEquivalence) open import Util.HoTT.Equiv open import Util.HoTT.FunctionalExtensionality open import Util.HoTT.HLevel open import Util.Prelude hiding (id) renaming (_∘_ to _∘F_) open import Util.Relatio...
------------------------------------------------------------------------ -- The Agda standard library -- -- A data structure which keeps track of an upper bound on the number -- of elements /not/ in a given list ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-}...
{-# OPTIONS --without-K --safe #-} -- Restriction Functor module Categories.Functor.Restriction where open import Level using (Level; _⊔_) open import Categories.Category using (Category; _[_,_]; _[_≈_]) open import Categories.Category.Restriction using (Restriction) open import Categories.Functor using (Functor; _...
{-# OPTIONS -v treeless.opt:20 #-} module _ where open import Common.Prelude open import Common.Equality data Dec {a} (A : Set a) : Set a where yes : A → Dec A no : (A → ⊥) → Dec A decEq₂ : ∀ {a b c} {A : Set a} {B : Set b} {C : Set c} {f : A → B → C} → (∀ {x y z w} → f x y ≡ f z w → x ≡ z) → ...
-- Andreas, 2020-06-16, issue #4752 -- Disallow @-patterns in pattern synonyms. -- -- Agda 2.5.2 implemented @-patterns and accidentially -- allowed them in pattern synonyms. -- However they just lead to a panic when used. data Nat : Set where suc : Nat → Nat pattern ss x = suc x@(suc _) -- EXPECTED: -- -- @-patte...
{-# OPTIONS --sized-types #-} module SizedTypesRigidVarClash where open import Common.Size renaming (↑_ to _^) data Nat : {size : Size} -> Set where zero : {size : Size} -> Nat {size ^} suc : {size : Size} -> Nat {size} -> Nat {size ^} inc : {i j : Size} -> Nat {i} -> Nat {j ^} inc x = suc x
module StateSizedIO.GUI.WxGraphicsLib where open import SizedIO.Base open import StateSizedIO.GUI.BaseStateDependent open import Size renaming (Size to AgdaSize) open import Data.Bool.Base open import Data.List.Base open import Data.Nat open import Function open import Data.Integer open import NativeIO open impor...
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Instances.Int where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Foundations.Logic renaming (inl to inlᵖ; inr to inrᵖ)...
{-# OPTIONS --without-K #-} module higher.circle where open import higher.circle.core public open import higher.circle.properties public
{-# OPTIONS --safe #-} module Cubical.Algebra.CommAlgebra.Instances.Unit where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Structure open import Cubical.Data.Unit open import Cubical.Data.Sigma.Properties using (Σ≡Prop) open import Cubical.Algebra.Com...
-- Qualified mixfix operators module Issue597 where open import Common.Prelude as Prel hiding (if_then_else_) open import Common.Level using (lzero) lz = lzero Common.Level.⊔ lzero module A where data _×_ (A B : Set) : Set where _,_ : A → B → A × B if_then_else_ : ∀ {A : Set} → Bool → A → A → A if true ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.Group.Base where open import Cubical.Foundations.Prelude open import Cubical.Data.Sigma open import Cubical.Structures.Monoid hiding (⟨_⟩) private variable ℓ : Level record IsGroup {G : Type ℓ} (0g : G) (_+_ : G → G → G...
module Data.Maybe where data Maybe (a : Set) : Set where nothing : Maybe a just : a -> Maybe a fmap : {A B : Set} -> (A -> B) -> Maybe A -> Maybe B fmap f nothing = nothing fmap f (just a) = just (f a )
module imper-repeat where open import lib open import eq-reasoning data Singleton {a} {A : Set a} (x : A) : Set a where _with≡_ : (y : A) → x ≡ y → Singleton x inspect : ∀ {a} {A : Set a} (x : A) → Singleton x inspect x = x with≡ refl -- Unicode notes. I use: -- \Mix, \Mie, \MiF etc for meta-variables 𝑥, 𝑒, �...
{- Name: Bowornmet (Ben) Hudson --Progress and Preservation in Godel's T-- Progress: if e:τ, then either e val or ∃e' such that e=>e'. Preservation: if e:τ and e=>e', then e':τ. -} open import Preliminaries module Godel where -- nat and => data Typ : Set where nat : Typ _⇒_ : Typ → Typ → Typ --------...
{-# OPTIONS --safe #-} open import Generics.Prelude hiding (lookup) open import Generics.Telescope open import Generics.Desc open import Generics.All open import Generics.HasDesc import Generics.Helpers as Helpers module Generics.Constructions.Recursion {P I ℓ} {A : Indexed P I ℓ} (H : HasDesc A) (open HasDesc H...
module Type.WellOrdering where import Lvl open import Functional open import Logic open import Logic.Propositional open import Logic.Predicate open import Type open import Type.Dependent private variable ℓ ℓ₁ ℓ₂ : Lvl.Level -- Types with terms that are well-founded trees. -- Constructs types that are similar to...
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category) -- Defines the following properties of a Category: -- Cartesian -- a Cartesian category is a category with all products -- (for the induced Monoidal structure, see Cartesian.Monoidal) module Categories.Category.Cartesian {o ℓ e} (�...
-- Andreas, 2014-11-25, variant of Issue 1366 {-# OPTIONS --copatterns #-} open import Common.Prelude using (Nat; zero; suc; Unit; unit) data Vec (A : Set) : Nat → Set where [] : Vec A zero _∷_ : ∀ {n} → A → Vec A n → Vec A (suc n) -- Singleton type data Sg {A : Set} (x : A) : Set where sg : Sg x -- Gene...
module Ints where open import Nats public using (ℕ; zero; _∸_) renaming (suc to nsuc; _+_ to _:+:_; _*_ to _:*:_) open import Agda.Builtin.Int public renaming (Int to ℤ; negsuc to -[1+_]; pos to +_) infix 8 -_ -- infixl 7 _*_ _⊓_ infixl 6 _+_ _-_ _⊖_ ∣_∣ : ℤ → ℕ ∣ + n ∣ = n ∣ -[1+ n ] ∣ = nsuc n -_ : ℤ ...
module IlltypedPattern where data Nat : Set where zero : Nat suc : Nat -> Nat f : (A : Set) -> A -> A f A zero = zero
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Rationals.SigmaQ where open import Cubical.HITs.Rationals.SigmaQ.Base public open import Cubical.HITs.Rationals.SigmaQ.Properties public
-- -- Created by Dependently-Typed Lambda Calculus on 2019-05-15 -- private-primitive-variable -- Author: ice1000 -- {-# OPTIONS --without-K --safe #-} private variable A : Set a : A primitive primInterval : Set
-- Andreas, 2014-05-17 open import Common.Prelude open import Common.Equality test : Nat test rewrite refl = zero
{-# OPTIONS --postfix-projections #-} module StateSized.StackStateDependent where open import Data.Product open import Function open import Data.String.Base as Str open import Data.Nat.Base as N open import Data.Vec as Vec using (Vec; []; _∷_; head; tail) open import Relation.Binary using (Rel) open import Relation....
{-# OPTIONS --safe --cubical #-} module Lens.Operators where open import Prelude open import Lens.Definition infixl 4 getter setter getter : Lens A B → A → B getter l xs = get (fst l xs) syntax getter l xs = xs [ l ] setter : Lens A B → A → B → A setter l xs = set (fst l xs) syntax setter l xs x = xs [ l ]≔ x
module Properties.Product where infixr 5 _×_ _,_ record Σ {A : Set} (B : A → Set) : Set where constructor _,_ field fst : A field snd : B fst open Σ public _×_ : Set → Set → Set A × B = Σ (λ (a : A) → B)
{-# OPTIONS --without-K #-} {- Truncated higher inductive types look like higher inductive types except that they are truncated down to some fixed truncation level. This allow to define truncations (obviously) but also free algebras for algebraic theories, Eilenberg-MacLane spaces, etc. The idea is that to get an n-t...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Construction.Adjoints where open import Level open import Data.Product using (_×_ ; _,_) open import Categories.Category open import Categories.Category.Helper open import Categories.Adjoint open import Categories.Adjoint.Compose open import Categories.Ad...
-- Some basic structures and operation for dealing with non-deterministic values module nondet where open import bool open import nat open import list infixr 8 _??_ ---------------------------------------------------------------------- -- A tree datatype to represent non-deterministic value of some type. -- It is e...
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import LogicalFormulae open import Functions.Definition module Functions.Lemmas where invertibleImpliesBijection : {a b : _} {A : Set a} {B : Set b} {f : A → B} → Invertible f → Bijection f Bijection.i...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Groups.Definition module Groups.DirectSum.Definition {m n o p : _} {A : Set m} {S : Setoid {m} {o} A} {_·A_ : A → A → A} {B : Set n} {T : Setoid {n} {p} B} {_·B_ : B → B → B} (G : Group S _·A_) (H : ...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.MaybeEmb {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.LogicalRelation -- Any level can be embedded int...
{-# OPTIONS --cubical --no-import-sorts #-} module Cubical.Codata.Conat where open import Cubical.Codata.Conat.Base public open import Cubical.Codata.Conat.Properties public
-- Andreas, 2015-07-16 issue reported by G.Allais -- This ought to pass, ideally, but the lack of positivity polymorphism -- does not allow for a precise analysis of the composition operator. -- -- Subsequently, the positivity analysis for tabulate returns no -- positivity info for all arguments, leading to a rejectio...
module ReCaseSplit where data Bool : Set where true : Bool false : Bool maybe : Bool _func : Bool -> Bool maybe func = ? false func = false (true) func = true func2 : Bool -> Bool func2 = λ{false → false ; (true) → true} open import IO.Primitive func3 : IO Bool func3 = return false func4 : IO Bool func4 ...
{-# OPTIONS --without-K --exact-split --safe #-} open import Fragment.Equational.Theory module Fragment.Equational.Model.Base (Θ : Theory) where open import Fragment.Equational.Model.Satisfaction {Σ Θ} open import Fragment.Algebra.Algebra (Σ Θ) hiding (∥_∥/≈) open import Fragment.Algebra.Free (Σ Θ) open import Leve...
------------------------------------------------------------------------ -- The Agda standard library -- -- Bisimilarity for Colists ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} module Codata.Colist.Bisimilarity where open import Level usin...
{-# OPTIONS --without-K --rewriting #-} module cw.examples.Examples where open import cw.examples.Empty public open import cw.examples.Sphere public open import cw.examples.Unit public
-- Andreas, 2017-01-13, issue #2402 -- Error message: incomplete pattern matching -- {-# OPTIONS -v tc.cover:20 #-} open import Common.Bool module _ (A B C D E F G H I J K L M O P Q R S T U V W X Y Z : Set) where test : Bool → Bool test true = false -- Reports: -- Incomplete pattern matching for test. Missing case...
{-# OPTIONS --cubical --safe #-} module Relation.Nullary.Discrete.Properties where open import Relation.Nullary.Discrete open import Relation.Nullary.Stable.Properties using (Stable≡→isSet) open import Relation.Nullary.Decidable.Properties using (Dec→Stable; isPropDec) open import HLevels open import Level open impo...
-- Andreas, 2014-05-20 Triggered by Andrea Vezzosi & NAD {-# OPTIONS --copatterns #-} -- {-# OPTIONS -v tc.conv.coerce:10 #-} open import Common.Size -- Andreas, 2015-03-16: currently forbidden -- Size≤ : Size → SizeUniv -- Size≤ i = Size< ↑ i postulate Dom : Size → Set mapDom : ∀ i (j : Size< (↑ i)) → Dom i ...
{-# OPTIONS --without-K --rewriting #-} open import PathInduction module Pushout {i} {j} {k} where {-<Pushout>-} record Span : Type (lsucc (lmax (lmax i j) k)) where constructor span field A : Type i B : Type j C : Type k f : C → A g : C → B postulate Pushout : Span → Type (lmax (lmax...
{-# OPTIONS --without-K --safe #-} module Definition.Conversion.Reduction where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.RedSteps open import Definition.Conversion -- Weak head expansion of algorithmic equality of types. reducti...
-- 2011-09-15 posted by Nisse, variant of Issue292e -- {-# OPTIONS --show-implicit -v tc.lhs.unify:15 #-} module Issue292-16b where data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x postulate A : Set f : A → A data C (A : Set)(f : A → A) : A → Set where c : ∀ x → C A f (f x) record Box : Set where c...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Setoids.Setoids open import Rings.Definition open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition open import Groups.Definition open import Fields.Fie...
--2010-09-28 module AbsurdIrrelevance where data Empty : Set where absurd : {A : Set} -> .Empty -> A absurd ()
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.Int.Base where open import Cubical.Core.Everything open import Cubical.Data.Nat data ℤ : Type₀ where pos : (n : ℕ) → ℤ negsuc : (n : ℕ) → ℤ neg : (n : ℕ) → ℤ neg zero = pos zero neg (suc n) = negsuc n infix 100 -_ -_ : ℕ → ℤ -_ = neg {-...
open import Oscar.Prelude module Oscar.Class.[IsExtensionB] where record [IsExtensionB] {a} {A : Ø a} {b} (B : A → Ø b) : Ø₀ where constructor ∁ no-eta-equality
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import stash.modalities.gbm.GbmUtil module stash.modalities.gbm.PushoutMono where -- -- The goal of this file is to prove the following: -- Suppose we have a pushout -- -- g -- C ------> B -- v | -- | | ...
module Examples.Syntax where open import Agda.Builtin.Equality using (_≡_; refl) open import FFI.Data.String using (_++_) open import Luau.Syntax using (var; _$_; return; nil; function_is_end; local_←_; done; _∙_; _⟨_⟩) open import Luau.Syntax.ToString using (exprToString; blockToString) ex1 : exprToString(function "...
module general-exercises.RunningHaskellCode where -- To compile code: stack exec -- agda general-exercises/RunningHaskellCode.agda -c open import Data.String using (String) open import Agda.Builtin.Unit using (⊤) -- Working directly with Haskell code, kinda dangerous stuff -- -- This didn't actually work because all...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some algebraic structures (not packed up with sets, operations, -- etc.) ------------------------------------------------------------------------ open import Relation.Binary module Algebra.Structures where imp...
------------------------------------------------------------------------ -- A combination of the delay monad (with the possibility of crashing) -- and a kind of writer monad yielding colists ------------------------------------------------------------------------ module Lambda.Delay-crash-trace where open import Equa...
module Examples.TestCall where open import Prelude open import Libraries.SelectiveReceive open import Libraries.Call open SelRec AddReplyMessage : MessageType AddReplyMessage = ValueType UniqueTag ∷ [ ValueType ℕ ]ˡ AddReply : InboxShape AddReply = [ AddReplyMessage ]ˡ AddMessage : MessageType AddMessage = ValueTy...
module Tactic.Nat.Coprime.Problem where open import Prelude open import Prelude.List.Relations.All open import Numeric.Nat.GCD Atom = Nat infixl 7 _⊗_ infix 3 _⋈_ infix 2 _⊨_ data Exp : Set where atom : (x : Atom) → Exp _⊗_ : (a b : Exp) → Exp data Formula : Set where _⋈_ : (a b : Exp) → Formula data Prob...
------------------------------------------------------------------------------ -- Testing the erasing of the duplicate definitions required by a conjecture ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-...
{-# OPTIONS --safe --without-K #-} module Data.List.Membership.Propositional.Disjoint {ℓ} {A : Set ℓ} where import Relation.Binary.PropositionalEquality as P open import Data.List.Membership.Setoid.Disjoint (P.setoid A) public
{-# OPTIONS --type-in-type --no-pattern-matching #-} open import Spire.DarkwingDuck.Primitive module Spire.DarkwingDuck.Derived where ---------------------------------------------------------------------- subst : (A : Set) (x : A) (y : A) (P : A → Set) → P x → x ≡ y → P y subst A x y P p = elimEq A x (λ y _ → P y) p ...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.Instances.Int where open import Cubical.Foundations.Prelude open import Cubical.Algebra.CommRing open import Cubical.Data.Int as Int renaming ( ℤ to ℤ ; _+_ to _+ℤ_; _·_ to _·ℤ_; -_ to -ℤ_) open CommRingStr using (0r ; 1r ; _+_ ; _·_ ; -_ ; isCommRing) ℤCommR...
-- Andreas, 2016-10-14, issue #2257, reported by m0davis -- Bisected by Nisse. {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.ip:20 #-} -- {-# OPTIONS -v tc:20 #-} record R (A : Set) : Set₁ where field a : A F : ∀ {f} → Set foo : Set foo = ∀ {f} → {!!} field bar : Set
{-# OPTIONS --without-K #-} module sets.finite.level where open import sum open import function.isomorphism.core open import hott.level.core open import hott.level.closure open import hott.level.sets open import sets.finite.core finite-h2 : ∀ {i}{A : Set i} → IsFinite A → h 2 A finite-h2 (n , fA) = iso-level (sym≅ fA...
{- 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...
-- Andrease, 2016-12-31, issue #1975 reported by nad. -- {-# OPTIONS -v tc.lhs.split:40 #-} data ⊥ : Set where record ⊤ : Set where data Bool : Set where true false : Bool T : Bool → Set T false = ⊥ T true = ⊤ module M (b : Bool) where data D : Set where c : T b → D open M true -- The following defini...
{- This file contains: - Equivalence with the pushout definition Written by: Loïc Pujet, September 2019 - Associativity of the join Written by: Loïc Pujet, September 2019 -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.Join.Properties where open import Cubical.Core.Glue open import Cubical.Foundatio...
module plantsigma where data Tree : Set where oak : Tree pine : Tree spruce : Tree data Flower : Set where rose : Flower lily : Flower data PlantGroup : Set where tree : PlantGroup flower : PlantGroup PlantsInGroup : PlantGroup -> Set PlantsInGroup tree = Tree PlantsInGroup flower = Flower...
{-# OPTIONS --without-K #-} module TNT.Base where open import Data.Nat open import Data.Nat.DivMod open import Data.Nat.Divisibility open import Data.Nat.Properties open import Agda.Builtin.Equality open import Relation.Nullary.Decidable open import Data.Empty -- defination of congruence modulo _≡_⟨mod_⟩ : ℕ → ℕ → ...
module x01-842Naturals-hc where data ℕ : Set where zero : ℕ suc : ℕ → ℕ one : ℕ one = suc zero two : ℕ two = suc (suc zero) seven : ℕ seven = suc (suc (suc (suc (suc (suc (suc zero)))))) {-# BUILTIN NATURAL ℕ #-} import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq...
import cedille-options open import general-util module spans (options : cedille-options.options) {mF : Set → Set} {{_ : monad mF}} where open import lib open import functions open import cedille-types open import constants open import conversion open import ctxt open import is-free open import syntax-util open impor...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Semirings.Definition open import Sets.CantorBijection.Order open import Orders.Total.Definition open import Orders.WellFounded.Induction module Sets.Cant...
------------------------------------------------------------------------ -- The Agda standard library -- -- Decidable semi-heterogeneous vector equality over setoids ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Data.Vec...
-------------------------------------------------------------------------------- -- This is part of Agda Inference Systems open import Data.Nat open import Data.Fin module Examples.Lambda.Lambda where {- Terms & Values -} data Term (n : ℕ) : Set where var : Fin n → Term n lambda : Term (suc n) → Term n ...
module Spire.Type where ---------------------------------------------------------------------- data ⊥ : Set where record ⊤ : Set where constructor tt data Bool : Set where true false : Bool data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} record Σ (A : Set) (B : A → Set) : Set where constr...
module Thesis.Changes where open import Data.Product open import Data.Sum open import Data.Unit open import Relation.Binary.PropositionalEquality record IsChangeStructure (A : Set) (ChA : Set) (ch_from_to_ : (dv : ChA) → (v1 v2 : A) → Set) : Set₁ where infixl 6 _⊕_ _⊝_ field _⊕_ : A → ChA → A fromto→⊕ : ∀...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae module Monoids.Definition where record Monoid {a : _} {A : Set a} (Zero : A) (_+_ : A → A → A) : Set a where field associative : (a b c : A) → a + (b + c) ≡ (a + b) + c idLeft : (a : A) → Zero + a ≡ a idRight : (a : A) → a +...
import Lvl open import Type module Structure.Logic.Classical.NaturalDeduction {ℓₗ} {Formula : Type{ℓₗ}} {ℓₘₗ} (Proof : Formula → Type{ℓₘₗ}) where open import Functional hiding (Domain) import Structure.Logic.Constructive.NaturalDeduction private module Constructive = Structure.Logic.Constructive.NaturalDedu...
------------------------------------------------------------------------ -- Internal coding ------------------------------------------------------------------------ module Internal-coding where open import Equality.Propositional open import Prelude hiding (const) open import Tactic.By.Propositional -- To simplify th...
module Everything where import Control.Category import Control.Category.Functor import Control.Category.Product import Control.Category.SetsAndFunctions import Control.Category.Slice import Control.Decoration import Control.Functor import Control.Functor.NaturalTransformation import Control.Functor.Product import Cont...
------------------------------------------------------------------------ -- The lens type in Lens.Non-dependent.Higher.Capriotti.Variant, but -- with erased "proofs" ------------------------------------------------------------------------ {-# OPTIONS --cubical #-} import Equality.Path as P module Lens.Non-dependent....
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Fiberwise where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Data.Sigma open import Cubical.Relation.Binary.Base private variable ...
------------------------------------------------------------------------------ -- Type theory: The identity type ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-...
module Crash where data Nat : Set where zero : Nat suc : Nat -> Nat data Bool : Set where true : Bool false : Bool F : Bool -> Set F true = Nat F false = Bool not : Bool -> Bool not true = false not false = true h : ((x : F ?) -> F (not x)) -> Nat h g = g zero