text
stringlengths
4
690k
------------------------------------------------------------------------ -- The Agda standard library -- -- A pointwise lifting of a relation to incorporate a new infimum. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- This module is designed to be used ...
-- Andreas, 2017-07-24, issue #2654 reported by rntz -- When splitting projections in an extended lambda, -- we have to print them postfix, regardless of whether -- the user chose --postfix-projections or not. -- {-# OPTIONS --postfix-projections #-} -- {-# OPTIONS -v interaction.case:60 #-} open import Common.Produc...
import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; sym; trans; cong) open Eq.≡-Reasoning open import Data.Nat using (ℕ; zero; suc) open import Data.Product using (_×_; proj₁; proj₂) renaming (_,_ to ⟨_,_⟩) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Relation.Nullary using (¬_) ope...
{-# OPTIONS --without-K --exact-split --safe #-} open import Fragment.Equational.Theory module Fragment.Equational.FreeExtension.Base (Θ : Theory) where open import Fragment.Equational.Model Θ open import Fragment.Equational.Coproduct Θ open import Level using (Level; Setω; _⊔_) open import Data.Nat using (ℕ) priv...
module Prelude.Function where id : ∀ {a} {A : Set a} → A → A id x = x {-# INLINE id #-} infixl -10 id syntax id {A = A} x = x ofType A const : ∀ {a b} {A : Set a} {B : Set b} → A → B → A const x _ = x {-# INLINE const #-} flip : ∀ {a b c} {A : Set a} {B : Set b} {C : A → B → Set c} → (∀ x y → C x y) → ∀ y x → C x ...
{- Definition of various kinds of categories. This library follows the UniMath terminology, that is: Concept Ob C Hom C Univalence Precategory Type Type No Category Type Set No Univalent Category Type Set Yes This file also contains - pathToIso ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Morphism.Lifts.Properties {o ℓ e} (𝒞 : Category o ℓ e) where open import Level open import Data.Product using (_,_; proj₁; proj₂) open import Categories.Category.Construction.Arrow 𝒞 open import Categories.Diagram.Pullback 𝒞 op...
------------------------------------------------------------------------ -- The Agda standard library -- -- Rational numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Rational.Base where open import Function using (id) open import Data.Int...
------------------------------------------------------------------------------ -- Testing the translation of logical schemata with 11-ary predicates symbols ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #...
------------------------------------------------------------------------ -- Safe modules that use --cubical ------------------------------------------------------------------------ {-# OPTIONS --safe --cubical #-} module README.Safe.Cubical where -- A proof of univalence. import Equality.Path.Univalence -- A proof...
{-# OPTIONS --without-K --safe --no-sized-types --no-guardedness --no-subtyping #-} module Agda.Builtin.Char.Properties where open import Agda.Builtin.Char open import Agda.Builtin.Equality primitive primCharToNatInjective : ∀ a b → primCharToNat a ≡ primCharToNat b → a ≡ b
{-# OPTIONS --cubical --safe #-} module Cubical.HITs.S1.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.GroupoidLaws open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univale...
-- Andreas, 2016-02-09, issue and test case by Nisse {-# OPTIONS --allow-unsolved-metas #-} open import Common.Level postulate _≡_ : ∀ {a} {A : Set a} → A → A → Set a refl : ∀ {a} {A : Set a} (x : A) → x ≡ x record R a p : Set (lsuc (a ⊔ p)) where field elim : {A : Set a} (P : {x y : A} → x ≡ y → Set p) ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.S3.Base where open import Cubical.Foundations.Prelude data S³ : Type₀ where base : S³ surf : PathP (λ j → PathP (λ i → base ≡ base) refl refl) refl refl
{-# OPTIONS --without-K #-} module hott.truncation.elim where open import sum open import equality open import function open import hott.equivalence open import hott.level open import hott.loop open import hott.truncation.core open import hott.truncation.equality open import hott.univalence open import sets.nat open i...
module Records where data Sigma (A : Set) (B : A -> Set) : Set where _,_ : (x : A) (y : B x) -> Sigma A B fst : {A : Set}{B : A -> Set} -> Sigma A B -> A fst (x , y) = x snd : {A : Set}{B : A -> Set} -> (p : Sigma A B) -> B (fst p) snd (x , y) = y data Sigma1 (A : Set1) (B : A -> Set1) : Set1 where _,_ : (x : A...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.Choice open import cohomology.FunctionOver module cohomology.Theory where -- [i] for the universe level of the group record CohomologyTheory i : Type (lsucc i) where field C : ℤ → Ptd i → Group i CEl : ℤ → P...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020, 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.Prelude open import LibraBFT.Lemmas open import Lib...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Rationals.HITQ.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Relation.Nullary open import Cubical.HITs.Ints.QuoInt open import Cubical.Data.Nat as ℕ hiding (_·_) open import Cubica...
module FFI where postulate IO : Set -> Set {-# BUILTIN IO IO #-} {-# COMPILED_TYPE IO IO #-} postulate return : {A : Set} -> A -> IO A _>>=_ : {A B : Set} -> IO A -> (A -> IO B) -> IO B {-# COMPILED return (\_ -> return :: a -> IO a) #-} {-# COMPILED _>>=_ (\_ _ -> (>>=) :: IO a -> (a -> IO b) -> IO b) #-} ...
module Numeral.CoordinateVector.Proofs where import Lvl open import Data.Boolean open import Data.Boolean.Stmt open import Data.Boolean.Stmt.Proofs import Data.Either as Either import Functional as Fn open import Function.Equals open import Function.Names open import Function.PointwiseStructure open imp...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Instances.Functors where open import Cubical.Categories.Category open import Cubical.Categories.Functor.Base open import Cubical.Categories.NaturalTransformation.Base open import Cubical.Categories.NaturalTransformation.Properties open impor...
module Issue947 where A : Set₁ A = Set where B : Set₁ B = Set module _ where C : Set₁ C = Set module M where -- Andreas, 2020-04-25, #4623 -- These empty `where` blocks now generate warnings.
module Type.Isomorphism where open import Functional import Lvl open import Structure.Setoid open import Structure.Function.Domain hiding (inverseₗ ; inverseᵣ) open import Type private variable ℓ ℓ₁ ℓ₂ ℓₑ ℓₑ₁ ℓₑ₂ : Lvl.Level module _ (A : Type{ℓ₁}) (B : Type{ℓ₂}) ⦃ equiv-A : Equiv{ℓₑ₁}(A) ⦄ ⦃ equiv-B : ...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Lists.Definition open import Lists.Length open import Numbers.Naturals.Semiring module Lists.Concat where appendEmptyList : {a : _} → {A : Set a} → (l : List A) → (l ++ [] ≡ l) appendEmptyList [] = refl appendEmptyList (x :: l...
-- Andreas, 2020-03-19, issue #4486 -- "did you mean?" now also for invalid imports record Foo : Set₁ where field Θ : Set open Foo using () renaming (θ to unwrap) -- EXPECTED: -- The module Foo doesn't export the following: -- θ (did you mean 'Θ'?) module M where private postulate S : Set open M using (S) -...
{-# OPTIONS --without-K --exact-split #-} module lists where import 17-number-theory open 17-number-theory public unit-list : {l1 : Level} {A : UU l1} → A → list A unit-list a = cons a nil {- First we introduce the functoriality of the list operation, because it will come in handy when we try to define and pro...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Reexport Data.List from the standard library. -- -- Here we expose different names, for use in Contexts. ------------------------------------------------------------------------ module Base.Data.ContextList where ...
module PatternSynonyms where data ℕ : Set where zero : ℕ suc : (n : ℕ) → ℕ {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN ZERO zero #-} {-# BUILTIN SUC suc #-} pattern z = zero pattern sz = suc z pattern ss x = suc (suc x) data _≡_ {A : Set}(x : A) : A → Set where refl : x ≡ x test : z ≡ zero test = refl tes...
{-# OPTIONS --without-K --safe #-} open import Algebra open import Data.Bool.Base using (Bool; if_then_else_) open import Function.Base using (_∘_) open import Data.Integer.Base as ℤ using (ℤ; +_; +0; +[1+_]; -[1+_]) import Data.Integer.Properties as ℤP open import Data.Integer.DivMod as ℤD open import Data.Nat as ℕ ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.RingSolver.CommRingSolver where open import Cubical.Foundations.Prelude open import Cubical.Data.FinData open import Cubical.Data.Nat using (ℕ) open import Cubical.Data.Nat.Order using (zero-≤) open import Cubical.Data.Vec.Base open import Cubi...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cohomology.Theory open import cohomology.PtdMapSequence open import groups.ExactSequence open import groups.Exactness open import groups.HomSequence open import cw.CW module cw.cohomology.FirstCohomologyGroupOnDiag {i} (OT : OrdinaryTheory i) (⊙s...
-------------------------------------------------------------------------------- -- This file provides functions for escaping -------------------------------------------------------------------------------- module Parse.Escape where open import Class.Map open import Data.SimpleMap open import Data.String using (fromL...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Indiscrete where -- Category where all arrows are inhabited by a single element open import Level open import Data.Unit open import Categories.Category open import Relation.Binary.PropositionalEquality as ≡ Indiscrete : ∀ {o ℓ} (A : Set o) → Category o ℓ...
{-# OPTIONS --copatterns #-} -- {-# OPTIONS -v term:20 #-} -- {-# OPTIONS --no-positivity-check #-} -- {-# OPTIONS -v tc.def.fun:50 #-} module CopatternNonterminating where open import Common.Equality record Stream (A : Set) : Set where coinductive field head : A tail : Stream A module S = Stream illdef...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of functions, such as associativity and commutativity ------------------------------------------------------------------------ -- This file contains some core definitions which are reexported by -- Al...
------------------------------------------------------------------------ -- An alternative (non-standard) coinductive definition of weak -- bisimilarity ------------------------------------------------------------------------ -- This definition is based on the function "wb" in Section 6.5.1 of -- Pous and Sangiorgi's ...
------------------------------------------------------------------------ -- A breadth-first backend which uses the derivative operator ------------------------------------------------------------------------ module TotalParserCombinators.BreadthFirst where open import Data.List open import Data.List.Membership.Propos...
-- Duplicate of #1984 postulate Path : {A : Set} → A → Set admit : {Z : Set} → Z X : Set Y : X → Set Y' : X → Set record Square : Set₁ where field A : Set B : Set b : B coh : Path b -- Spurious mutual block to trigger the problem mut : Set record Cocone : Set where field x : X -- ...
------------------------------------------------------------------------ -- A type for values that should be erased at run-time ------------------------------------------------------------------------ -- The definitions in this module are reexported from Erased. -- This module imports Equivalence.Erased. {-# OPTIONS...
agda --compile Ackermann.agda ./Ackermann
{-# OPTIONS --warning ShadowingInTelescope --allow-unsolved-metas #-} open import Agda.Primitive -- warning here data _~_ {a a : Level} {A : Set a} (a : A) : A -> Set where refl : a ~ a module _ {a} {A : Set a} where -- nothing: the repetition is in separate telescopes data Eq (a : A) : (a : A) → Set where ...
open import Proc module Interp (param : Param) where import Hear open import Basics private open module P = Process param open module H = Hear param open Tran data Result {a : U}(p : Proc a) : Set where speak : forall {w q} -> p -! w !-> q -> Result p refuse : Silent p -> Result p upR : {a b : U}{p : Pro...
module Issue481PonderBase where postulate List : Set as : List
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Coproduct open import lib.types.Empty open import lib.types.Pi module lib.Relation2 where module _ {i} {P : Type i} where Dec-level : ∀ {n} → has-level (S n) P → has-level (S n) (Dec P) Dec-level pP (inl p₁) (inl p₂) = equi...
module Thesis.SIRelBigStep.IlcSILR where open import Data.Unit.Base hiding (_≤_) open import Data.Product open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Thesis.SIRelBigStep.Lang public open import Thesis.SIRelBigStep.DLang public open import Thesis.SIRelBigStep.ArithExtra ...
{-# OPTIONS --without-K --rewriting #-} module PathInduction where open import Base public -- The rewriting relation {-<rewrite>-} postulate _↦_ : ∀ {i} {A : Type i} → A → A → Type i {-# BUILTIN REWRITE _↦_ #-} {-</>-} -- We redefine concatenation of paths to use induction on both paths, in order -- to make unif...
module lib where open import datatypes public open import logic public open import thms public open import termination public open import error public open import io public
{-# OPTIONS --without-K --safe #-} -- Take a relation that is already reflexive and transitive -- and make it symmetric. -- (Borrowed from Categories/Support/ZigZag from copumpkin's Categories library module Relation.Binary.Construct.Symmetrize where open import Level open import Relation.Binary open import Relatio...
open import Prelude module Implicits.Resolution.Ambiguous.Resolution where open import Data.Fin.Substitution open import Data.List open import Data.List.Any open Membership-≡ open import Implicits.Syntax open import Implicits.Substitutions data _⊢ᵣ_ {ν} (Δ : ICtx ν) : Type ν → Set where r-tabs : ∀ {r} → ictx-weak...
-- Andreas, 2015-07-20, record patterns open import Common.Prelude postulate A : Set record R : Set where field f : A T : Bool → Set T true = R T false = A test : ∀{b} → T b → A test record{f = a} = a -- Could succeed by some magic.
module AnnotatedTypes where {- -- ATypes are stratified such that that dynamically bound -- functions can only have dynamically bound parameters. -- TODO: why exactly is that necessary? -- Think about the example of the evaluation of a dynamic function with -- static components -- The following well-formedness re...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor hiding (id) -- Cocone over a Functor F (from shape category J into category C) module Categories.Diagram.Cocone {o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) where open Category C o...
module CompilingCoinduction where open import Common.Coinduction open import Common.Char open import Common.String data Unit : Set where unit : Unit {-# COMPILED_DATA Unit () () #-} postulate IO : Set → Set {-# COMPILED_TYPE IO IO #-} {-# BUILTIN IO IO #-} {-# IMPORT Data.Text.IO #-} postulate putStrLn : ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Core lemmas for division and modulus operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Nat.DivMod.Core where open import Agda.Bu...
module HostRequirements where open import Agda.Builtin.Unit open import Data.String as String using (String) open import Category.Applicative open import Category.Monad open import Category.Monad.State data Path : Set where MkPath : String -> Path data Value : Set where MkValue : String -> Value data Identifier...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommRing.DirectProd where open import Cubical.Foundations.Prelude open import Cubical.Data.Sigma open import Cubical.Algebra.Ring open import Cubical.Algebra.Ring.DirectProd open import Cubical.Algebra.CommRing.Base private variable ℓ ℓ' : Level module _ (A'@(A ,...
-- Operators for combining and building families module SOAS.Families.Build {T : Set} where open import SOAS.Common open import SOAS.Context open import SOAS.Sorting {T} open import SOAS.Families.Core {T} -- | Metavariable contexts -- Inductive construction of context- and type-indexed sets data MCtx : Set where ...
module Data.Num.Properties where open import Data.Num open import Data.Num.Core open import Data.Num.Next open import Data.Num.Continuous open import Data.Nat open import Data.Nat.Properties open import Data.Nat.Properties.Simple open import Data.Nat.Properties.Extra open import Data.Fin.Properties hiding (setoid; _≟...
-- Andreas, 2022-03-25, issue #5838, inconsistency in Cubical Agda. -- Reported by Tom Jack: variant of test/Fail/Issue5838.agda. {-# OPTIONS --safe --cubical #-} open import Agda.Builtin.Bool open import Agda.Builtin.Sigma open import Agda.Primitive.Cubical open import Agda.Primitive.Cubical public renaming ( pri...
open import Agda.Builtin.Equality -- Case splitting should not remove implicit arguments record ⊤ : Set where constructor tt test₁ : {A : Set} → ⊤ → ⊤ test₁ {A} x = {!x!} -- Case splitting on an implicit argument should make it visible test₂ : {x : ⊤} → ⊤ test₂ = {!.x!} -- Implicit variables in dot patterns should...
{-# OPTIONS --without-K --rewriting #-} module UpperNaturals where open import Basics open import lib.Basics open import lib.NType2 open import lib.types.Pi open import lib.types.Nat open import lib.types.Truncation ≤-antisymmetry : {n m : ℕ} (_ : n ≤ m) (_ : m ≤ n) → n == m ≤-antisymmetry {_} {_} (...
-- Agda program using the Iowa Agda library open import bool module TO-PROVE-evendoublecoin (Choice : Set) (choose : Choice → 𝔹) (lchoice : Choice → Choice) (rchoice : Choice → Choice) where open import eq open import nat open import list open import maybe ------------------------------------------------...
-- Andreas, 2013-10-22 -- Fixed by checking with-function-types in internal syntax! module Issue893 where postulate S : Set data Dec (Px : Set) (q : Px → S) : Set where tt : Dec Px q -- record parameter is essential to reproduce error message record Rec (P : S → Set) : Set where field prop ...
{-# OPTIONS --cubical --safe #-} module Data.Rational.SternBrocot where open import Prelude import Data.Nat as ℕ import Data.Nat.Properties as ℕ open import Data.Bits renaming (Bits to ℚ⁺; [] to 1ℚ; 0∷_ to lℚ; 1∷_ to rℚ) open import Data.Bits.Equatable -- ⟦_⇓⟧ : ℚ⁺ → (ℕ × ℕ) -- ⟦ 1ℚ ⇓⟧ = 1 , 1 -- ⟦ lℚ x ⇓⟧ = let p ,...
module _ where record ⊤ : Set where instance constructor tt data Nat : Set where suc : Nat → Nat NZ : Nat → Set NZ (suc _) = ⊤ postulate A : ∀ n → {{_ : NZ n}} → Set B : ∀ n (nz : NZ n) → Set B (suc n) nz = A (suc n)
module Nat where data Rel (A : Set) : Set1 where rel : (A -> A -> Set) -> Rel A _is_than_ : {A : Set} -> A -> Rel A -> A -> Set x is rel f than y = f x y data Acc {A : Set} (less : Rel A) (x : A) : Set where acc : ((y : A) -> x is less than y -> Acc less y) -> Acc less x data WO {A : Set} (less : Rel A) : Set w...
open import Agda.Builtin.Unit open import Agda.Builtin.Bool open import Agda.Builtin.Reflection postulate tac : {A : Set} (x : A) → Term → TC ⊤ data D : Set where con : {@(tactic tac true) y : Bool} → D -- WAS: Internal error in Serialize/Instances/Internal for MetaV case -- SHOULD: succeed
{- Pointed structure: X ↦ X -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.Relational.Pointed where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Structure open import Cubical....
-- Issue #4115 reported by Guillaume Brunerie {-# OPTIONS --prop #-} data Unit : Set where tt : Unit postulate P : Prop {-# TERMINATING #-} p : P p = p works : Unit → P works b = p -- WAS: Agda loops during injectivity analysis of `loops` loops : Unit → P loops tt = p
module Data.Boolean.Stmt.Proofs where import Lvl open import Data.Boolean open import Data.Boolean.Proofs hiding (bivalence ; disjointness) import Data.Boolean.Operators open Data.Boolean.Operators.Programming open import Data.Boolean.Stmt open import Functional open import Logic.Propositional as Logi...
-- Andreas, 2017-05-15, issue 2585, reported by Martin Stone Davis -- Information about whether a function uses copatterns -- needs to be added already while function is defines. -- Otherwise, clauses might fail to check due to missing eta. {-# OPTIONS --postfix-projections #-} open import Agda.Builtin.Equality reco...
------------------------------------------------------------------------ -- The Agda standard library -- -- Various forms of induction for natural numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Induction.Nat where open import Function open i...
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- Reasoning facilities about morphism equivalences (not necessarily 'squares') module Categories.Morphism.Reasoning {o ℓ e} (C : Category o ℓ e) where open import Categories.Morphism.Reasoning.Core C public open import Categories.Morphism.Reasoning...
{-# OPTIONS --cubical-compatible --universe-polymorphism #-} module WithoutK where open import Common.Level -- Propositional equality. data _≡_ {A : Set} : A → A → Set where refl : ∀ x → x ≡ x -- The J rule. J : {A : Set} (P : {x y : A} → x ≡ y → Set) → (∀ x → P (refl x)) → ∀ {x y} (x≡y : x ≡ y) → P x≡y...
------------------------------------------------------------------------------ -- Testing Agda internal term: @Pi _ (NoAbs _ _)@ ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe...
module Everything where import Generics.Prelude import Generics.Telescope import Generics.Telescope.Equality import Generics.Desc import Generics.All import Generics.HasDesc import Generics.Accessibility import Generics.Helpers import Generics.Reflection import Generics.Mu import Generics.Mu.All import Generics.Mu.El...
------------------------------------------------------------------------------ -- Fair properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS -...
------------------------------------------------------------------------ -- The Agda standard library -- -- Table-related properties ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Table.Properties where open import Data.Table open import Data.T...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.FinWedge open import homotopy.Bouquet open import groups.SphereEndomorphism open import cohomology.Theory module cohomology.RephraseSubFinCoboundary (OT : OrdinaryTheory lzero) where open OrdinaryTheory OT open import cohomology.SphereEndo...
------------------------------------------------------------------------ -- Pointwise products of binary relations ------------------------------------------------------------------------ module Relation.Binary.Product.Pointwise where open import Data.Function open import Data.Product open import Data.Sum open import...
open import Common.Prelude hiding (tt) instance tt : ⊤ tt = record{} NonZero : Nat → Set NonZero zero = ⊥ NonZero (suc _) = ⊤ pred′ : (n : Nat) {{_ : NonZero n}} → Nat pred′ zero {{}} pred′ (suc n) = n test : (n : Nat) {{x y : NonZero n}} → Nat test n = pred′ n
-- 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...
module +-mono-< where open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.Nat.Properties using (+-comm) open import Relations using (_<_; z<s; s<s) open import <-trans using (<-trans) +-monoʳ-< : ∀ (n p q : ℕ) → p < q ------------- → n + p < n + q +-monoʳ-< zero p q p<q = p<q +-monoʳ-< (suc n)...
{-# OPTIONS --cubical --safe #-} module Cubical.Foundations.Everything where -- Basic cubical prelude open import Cubical.Foundations.Prelude public -- Definition of Identity types and definitions of J, funExt, -- univalence and propositional truncation using Id instead of Path open import Cubical.Foundations.Id hi...
module Prelude.String where open import Agda.Primitive open import Prelude.Unit open import Prelude.Char open import Prelude.Bool open import Prelude.Nat open import Prelude.List open import Prelude.Maybe open import Prelude.Equality open import Prelude.Equality.Unsafe open import Prelude.Decidable open import Prelud...
{-# OPTIONS --cubical-compatible #-} module Common.IO where open import Agda.Builtin.IO public open import Common.Bool open import Common.Char open import Common.Nat open import Common.String open import Common.Unit open import Common.Float infixl 1 _>>=_ postulate return : ∀ {a} {A : Set a} → A → IO A _>>=_ ...
module OpenModuleShortHand where data Nat : Set where zero : Nat suc : Nat -> Nat module List (Elem : Set) where data List : Set where [] : List _::_ : Elem -> List -> List open List Nat {- This means open module _ = List Nat -} xs : List xs = zero :: (suc zero :: [])
module classify-tests where open import lib open import classify open import syntax-util test = check-beta-inequiv (mlam "a" (mlam "b" (mvar "a"))) (mlam "a" (mlam "b" (mvar "b")))
{-# OPTIONS --without-K --safe #-} module Cats.Displayed where open import Data.Product using (Σ ; Σ-syntax ; _,_) open import Level using (_⊔_ ; suc) open import Relation.Binary using (Setoid ; IsEquivalence ; Rel ; REL ; _Preserves₂_⟶_⟶_) open import Cats.Category record DisplayedCategory {lo la l≈} (C : Catego...
module EqTest where import Common.Level data _≡_ {a : Set} (x : a) : a -> Set where refl : x ≡ x data Maybe (a : Set) : Set where just : a -> Maybe a nothing : Maybe a data ℕ : Set where zero : ℕ suc : ℕ -> ℕ _≟_ : (x y : ℕ) -> Maybe (x ≡ y) suc m ≟ suc n with m ≟ n suc .n ≟ suc n | just refl = j...
module Issue477b where record D where field A : Set
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- BinaryCoproducts -- a category with all binary coproducts -- Cocartesian -- a category with all coproducts -- since most of the work is dual to Categories.Category.Cartesian, so the idea -- in this module is to make use of duality module Categorie...
{-# OPTIONS --without-K #-} data D : Set where @0 c : D data P (x : D) : Set where record R : Set where field f : P c
{-# OPTIONS --without-K --safe #-} open import Level using (Level) open import Data.List using (List; sum) renaming ([] to []ᴸ; _∷_ to _∷ᴸ_) open import Data.Nat using (ℕ; _+_; zero; suc) open import Data.Vec using (Vec; _++_; take; drop) renaming ([] to []ⱽ; _∷_ to _∷ⱽ_) open import Data.Product as Prod using (∃; ∃₂...
module Issue477 where data D where c : D
{-# OPTIONS --safe #-} -- --without-K #-} import Data.String.Base as String {-# BUILTIN FROMSTRING String.toList #-} open import Data.Nat using (ℕ; zero; suc) open import Data.Bool using (Bool; true; false) open import Data.Unit using (⊤; tt) open import Data.Fin using (Fin; zero; suc) renaming (#_ to #'_) open import...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Irrelevance {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Tools.Empty using (⊥; ⊥-elim) open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open impor...
------------------------------------------------------------------------ -- The Agda standard library -- -- Solver for equations in commutative monoids -- -- Adapted from Algebra.Monoid-solver ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Algeb...
open import Agda.Primitive postulate ℓ : Level F : Level → Set module Two where mutual α : Level α = _ G : F (α ⊔ ℓ) → F ℓ G A = A H : F (α ⊔ ℓ) → F α H A = A module Three where mutual α : Level α = _ β : Level β = _ G : F (α ⊔ β ⊔ ℓ) → F ℓ G A = A ...