text
stringlengths
4
690k
{- This second-order term syntax was created from the following second-order syntax description: syntax Sub | S type L : 0-ary T : 0-ary term vr : L -> T sb : L.T T -> T theory (C) x y : T |> sb (a. x[], y[]) = x[] (L) x : T |> sb (a. vr(a), x[]) = x[] (R) a : L x : L.T |> sb (b. x[b], vr(a[])) ...
{-# OPTIONS --without-K --allow-unsolved-metas --exact-split #-} module 16-pushouts where import 15-pullbacks open 15-pullbacks public -- Section 14.1 {- We define the type of cocones with vertex X on a span. Since we will use it later on, we will also characterize the identity type of the type of cocones wit...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of unique lists (setoid equality) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Unary.Unique.Setoid.Properties ...
{-# OPTIONS --no-positivity-check #-} module Section5 where open import Section4b public -- 5. Normal form -- ============== -- -- As we have seen above it is not necessary to know that `nf` actually gives a proof tree in -- η-normal form for the results above. This is however the case. We can mutually inductivel...
{-# OPTIONS --no-positivity-check #-} module Section4b where open import Section4a public -- 4.4. The inversion function -- --------------------------- -- -- It is possible to go from the semantics back to the proof trees by an inversion function, `reify` -- that, given a semantic object in a particular Kripke mode...
module CombinatoryLogic.Forest where open import Data.Product using (_,_) open import Function using (_$_) open import Mockingbird.Forest using (Forest) open import CombinatoryLogic.Equality as Equality using (isEquivalence; cong) open import CombinatoryLogic.Semantics as ⊢ using (_≈_) open import CombinatoryLogic.Sy...
{-# OPTIONS --cubical --safe #-} module Cubical.Foundations.TotalFiber where open import Cubical.Core.Everything open import Cubical.Data.Prod open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Surjection open import Cubical.Foundations.Isomorphism open impo...
module LC.Simultanuous where open import LC.Base open import LC.Subst open import LC.Reduction open import Data.Nat open import Relation.Binary.Construct.Closure.ReflexiveTransitive -- open import Relation.Binary.PropositionalEquality hiding ([_]; preorder) -- infixl 4 _* -- data _* : Term → Set where -- *-v...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Sets where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Categories.Category open import Cubical.Categories.Functor open import Cubical.Categor...
module Relator.Equals where import Lvl open import Logic open import Logic.Propositional open import Type infixl 15 _≢_ open import Type.Identity public using() renaming(Id to infixl 15 _≡_ ; intro to [≡]-intro) _≢_ : ∀{ℓ}{T} → T → T → Stmt{ℓ} a ≢ b = ¬(a ≡ b)
------------------------------------------------------------------------ -- Strictly descending lists ------------------------------------------------------------------------ {-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything module Cubical.Data.DescendingList.Strict (A : Type₀) ...
-- Andreas, 2019-12-08, issue #4267, reported and test case by csattler -- Problem: definitions from files (A1) imported by a module -- (Issue4267) may leak into the handling of an independent module -- (B). -- The root issue here is that having a signature stImports that -- simply accumulates the signatures of all v...
------------------------------------------------------------------------ -- Some results related to the For-iterated-equality predicate -- transformer ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module For-iterated-equality {c⁺} (...
{-# OPTIONS --sized-types --without-K #-} module DepM where open import Level using (Level) open import Data.Product open import Data.Nat open import Data.Fin open import Data.Unit open import Data.Empty open import Data.Vec hiding (_∈_; [_]) open import Relation.Binary.PropositionalEquality open import Function open ...
{-# OPTIONS --without-K --safe #-} module Util.Vec where open import Data.Vec public open import Data.Vec.Relation.Unary.All as All public using (All ; [] ; _∷_) open import Data.Vec.Relation.Unary.Any as Any public using (Any ; here ; there) open import Data.Vec.Membership.Propositional public using (_∈_) open impor...
{-# OPTIONS --safe #-} module Cubical.Functions.Implicit where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism implicit≃Explicit : ∀ {ℓ ℓ'} {A : Type ℓ} {B : A → Type ℓ'} → ({a : A} → B a) ≃ ((a : A) → B a) implicit≃Explicit = isoToEquiv isom...
module hello-world-dep where open import Data.Nat using (ℕ; zero; suc) data Vec (A : Set) : ℕ → Set where [] : Vec A zero _∷_ : ∀ {n} (x : A) (xs : Vec A n) → Vec A (suc n) infixr 5 _∷_
{-# OPTIONS --without-K #-} open import Base module Homotopy.PushoutDef where record pushout-diag (i : Level) : Set (suc i) where constructor diag_,_,_,_,_ field A : Set i B : Set i C : Set i f : C → A g : C → B pushout-diag-raw-eq : ∀ {i} {A A' : Set i} (p : A ≡ A') {B B' : Set i} (q : B ...
-- {-# OPTIONS -v tc.term.exlam:100 -v extendedlambda:100 -v int2abs.reifyterm:100 -v tc.with:100 -v tc.mod.apply:100 #-} module Issue778b (Param : Set) where open import Issue778M Param data D : (Nat → Nat) → Set where d : D pred → D pred -- Ulf, 2013-11-11: With the fix to issue 59 that inlines with functions, -...
{-# OPTIONS --exact-split #-} module ExactSplitParity where data Bool : Set where true false : Bool data ℕ : Set where zero : ℕ suc : ℕ → ℕ parity : ℕ → ℕ → Bool parity zero zero = true parity zero (suc zero) = false parity zero (suc (suc n)) = parity zero n parity (suc...
module Data.Fin.Subset.Disjoint.Properties where open import Data.Nat open import Data.Vec as Vec hiding (_++_; _∈_) open import Data.List as List hiding (zipWith; foldr) open import Data.Bool open import Data.Bool.Properties open import Data.Product open import Data.Sum open import Data.Empty hiding (⊥) open import R...
------------------------------------------------------------------------------ -- The FOTC streams of total natural numbers type ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe...
{-# OPTIONS --without-K --safe #-} module Data.Bool.Truth where open import Data.Empty open import Data.Unit open import Level open import Data.Bool.Base T : Bool → Type T true = ⊤ T false = ⊥
------------------------------------------------------------------------ -- Examples involving simple λ-calculi ------------------------------------------------------------------------ {-# OPTIONS --cubical --sized-types #-} module README.Lambda where -----------------------------------------------------------------...
module powerset where open import level open import list open import bool open import product open import empty open import unit open import sum open import eq open import functions renaming (id to id-set) public -- Extensionality will be used when proving equivalences of morphisms. postulate ext-set : ∀{l1 l2 : leve...
module Numeral.Integer.Relation.Order where open import Functional import Lvl import Numeral.Natural.Relation.Order as ℕ open import Numeral.Integer open import Numeral.Integer.Oper open import Relator.Ordering open import Type -- Inequalities/Comparisons data _≤_ : ℤ → ℤ → Type{Lvl.𝟎} where neg-neg : ∀{...
module Data.Real.Base where import Prelude import Data.Rational import Data.Nat as Nat import Data.Bits import Data.Bool import Data.Maybe import Data.Integer import Data.List import Data.Real.Gauge open Prelude open Data.Rational hiding (_-_; !_!) open Data.Bits open Data.Bool open Data.List open Data.Integer ...
module Structure.Topology.Proofs where
------------------------------------------------------------------------ -- Abstract binding trees, based on Harper's "Practical Foundations -- for Programming Languages" ------------------------------------------------------------------------ -- Operators are not indexed by symbolic parameters. -- TODO: Define α-equ...
{- This module contains: - constant displayed structures of URG structures - products of URG structures -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Structures.Constant where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundati...
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- Some basic facts about Spans in some category 𝒞. -- -- For the Category instances for these, you can look at the following modules -- Categories.Category.Construction.Spans -- Categories.Bicategory.Construction.Spans module Categories.Catego...
------------------------------------------------------------------------------ -- Issue in the translation of definitions using λ-terms. ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some derivable properties ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Algebra module Algebra.Properties.Ring {r₁ r₂} (R : Ring r₁ r₂)...
open import FRP.JS.Bool using ( Bool ) open import FRP.JS.RSet using ( RSet ; ⟦_⟧ ; ⟨_⟩ ; _⇒_ ) open import FRP.JS.Behaviour using ( Beh ; map2 ) open import FRP.JS.Event using ( Evt ; ∅ ; _∪_ ; map ) open import FRP.JS.Product using ( _∧_ ; _,_ ) open import FRP.JS.String using ( String ) module FRP.JS.DOM where inf...
{-# OPTIONS --safe --warning=error --without-K #-} open import Setoids.Setoids open import Rings.Definition open import Rings.Homomorphisms.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Rings.Isomorphisms.Definition {a b c d : _} {A : Set a} {S : Setoid {a} {b} A} {_+1_ _*1_ : A → A → ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.SymmetricGroup where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Data.Nat using (ℕ ; suc ; zero) open import Cubical.Dat...
module Issue258 where data D (A : Set) : Set where d : D A foo : Set → Set foo A with d {A} foo A | p = A
module Structure.Operator.Properties where import Lvl open import Functional open import Lang.Instance open import Logic open import Logic.Predicate open import Logic.Propositional import Structure.Operator.Names as Names open import Structure.Setoid open import Syntax.Function open import Type private vari...
open import Common.Prelude open import TestHarness module TestBool where not : Bool → Bool not true = false not false = true {-# COMPILED_JS not function (x) { return !x; } #-} _∧_ : Bool → Bool → Bool true ∧ x = x false ∧ x = false {-# COMPILED_JS _∧_ function (x) { return function (y) { return x && y; }; } #-} ...
module AllStdLib where -- Ensure that the entire standard library is compiled. import README open import Data.Unit.Polymorphic using (⊤) open import Data.String open import IO using (putStrLn; run) open import IO.Primitive using (IO; _>>=_) import DivMod import HelloWorld import HelloWorldPrim import ShowNat import...
module rummy where open import Data.Nat -- The suit type data Suit : Set where ♣ : Suit ♢ : Suit ♥ : Suit ♠ : Suit -- A card consists of a value and a suite. data Card : ℕ → Suit → Set where _of_ : (n : ℕ) (s : Suit) → Card n s -- Common names for cards A : ℕ; A = 1 K : ℕ; K = 13 Q : ℕ; Q = 12 J : ℕ; J =...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Implementation.Standard.Data.These where open import Light.Library.Data.These using (Library ; Dependencies) instance dependencies : Dependencies dependencies = record {} instance library : Library dependencies library = re...
{-# OPTIONS --safe --warning=error --without-K #-} open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import LogicalFormulae open import Sets.EquivalenceRelations open import Setoids.Setoids module Setoids.Subset {a b : _} {A : Set a} (S : Setoid {a} {b} A) where open Setoid S open Equivalence eq subse...
------------------------------------------------------------------------------ -- Equality reasoning on FOL ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-#...
module slots where open import slots.defs open import slots.bruteforce
{- Definition of the circle as a HIT with a proof that Ω(S¹) ≡ ℤ -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.S1.Base where open import Cubical.Core.Glue open import Cubical.Foundations.Prelude open import Cubical.Foundations.GroupoidLaws open import Cubical.Foundations.Equiv open import Cubical.Foundati...
{-# OPTIONS --no-pattern-matching #-} id : {A : Set} (x : A) → A id x = x data Unit : Set where unit : Unit fail : Unit → Set fail unit = Unit -- Expected error: Pattern matching is disabled
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Pi open import lib.types.Pointed module lib.types.Cospan where record Cospan {i j k : ULevel} : Type (lsucc (lmax (lmax i j) k)) where constructor cospan field A : Type i B : Type j C : Type k f : A → C g : B → C record...
{- Constant structure: _ ↦ A -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Structures.Constant where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.SIP private variable ℓ ℓ' : Level -- Structured isomorphisms module _ (A ...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Values for standard evaluation of MTerm ------------------------------------------------------------------------ import Parametric.Syntax.Type as Type import Parametric.Syntax.MType as MType import Parametric.Denota...
-- Logical consistency of IPL open import Library module Consistency (Base : Set) where import Formulas ; open module Form = Formulas Base import Derivations ; open module Der = Derivations Base import NfModelMonad; open module NfM = NfModelMonad Base open Normalization caseTreeMonad using (norm) -- No va...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Definition module Sets.FinSet.Definition where data FinSet : (n : ℕ) → Set where fzero : {n : ℕ} → FinSet (succ n) fsucc : {n : ℕ} → FinSet n → FinSet (succ n) fsuccInjective : {n : ℕ} → {a b : FinSet n} ...
-- Andreas, 2017-07-28, issue #1126 reported by Saizan is fixed data ℕ : Set where zero : ℕ suc : (n : ℕ) → ℕ {-# BUILTIN NATURAL ℕ #-} data Unit : Set where unit : Unit slow : ℕ → Unit slow zero = unit slow (suc n) = slow n postulate IO : Set → Set {-# COMPILE GHC IO = type IO #-} {-# BUILTIN IO IO #-} p...
module Base.Prelude.Pair where open import Base.Free using (Free; pure) data Pair (Shape : Set) (Pos : Shape → Set) (A B : Set) : Set where pair : Free Shape Pos A → Free Shape Pos B → Pair Shape Pos A B pattern Pair′ ma mb = pure (pair ma mb)
-- Quicksort {-# OPTIONS --without-K --safe #-} module Algorithms.List.Sort.Quick where -- agda-stdlib open import Level open import Data.List import Data.List.Properties as Listₚ open import Data.Product import Data.Nat as ℕ open import Data.Nat.Induction as Ind open import Relation.Binary as B open impor...
module F2 where open import Data.Empty open import Data.Unit open import Data.Sum hiding (map; [_,_]) open import Data.Product hiding (map; ,_) open import Function using (flip) open import Relation.Binary.Core using (IsEquivalence; Reflexive; Symmetric; Transitive) open import Relation.Binary open import Groupoid...
open import ExtractSac as ES using () open import Extract (ES.kompile-fun) open import Data.Nat open import Data.Nat.Properties open import Data.List as L using (List; []; _∷_) open import Data.Vec as V using (Vec; []; _∷_) open import Data.Fin using (Fin; zero; suc; #_) open import Relation.Binary.PropositionalEqual...
{-# OPTIONS --without-K #-} -- Specific constructions on top of summation functions module Explore.Summable where open import Type open import Function.NP import Relation.Binary.PropositionalEquality.NP as ≡ open ≡ using (_≡_ ; _≗_ ; _≗₂_) open import Explore.Core open import Explore.Properties open import Explore.Pr...
------------------------------------------------------------------------ -- The Agda standard library -- -- The lifting of a non-strict order to incorporate new extrema ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- This module is designed to be used wit...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Functor.Construction.SubCategory.Properties {o ℓ e} (C : Category o ℓ e) where open Category C open Equiv open import Level open import Function.Base using () renaming (id to id→) open import Function.Surjection using (Surjec...
-- The simpler case of index inductive definitions. (no induction-recursion) module IID where open import LF -- A code for an IID -- I - index set -- E = I for general IIDs -- E = One for restricted IIDs data OP (I : Set)(E : Set) : Set1 where ι : E -> OP I E σ : (A : Set)(γ : A -> OP I E) -> OP I E δ : (A : S...
module start where open import Relation.Binary.PropositionalEquality open import Data.Product open import Function hiding (id) injective : {A B : Set} → (f : A → B) → Set injective f = ∀ a₁ a₂ → f a₁ ≡ f a₂ → a₁ ≡ a₂ surjective : {A B : Set} → (f : A → B) → Set surjective f = ∀ b → ∃ (λ a → f a ≡ b) bijective : {A...
module DataDef where data ⊤ : Set where tt : ⊤ data ⊤' (x : ⊤) : Set where tt : ⊤' x data D {y : ⊤} (y' : ⊤' y) : Set data D {z} _ where postulate d : D {tt} tt
{-# OPTIONS --without-K --safe #-} module Dodo.Unary.Unique where -- Stdlib imports open import Level using (Level) open import Relation.Unary using (Pred) open import Relation.Binary using (Rel) -- Local imports open import Dodo.Nullary.Unique -- # Definitions # -- | At most one element satisfies the predicate Un...
-- Minimal implicational modal logic, de Bruijn approach, initial encoding module Bi.BoxMp where open import Lib using (List; []; _,_; LMem; lzero; lsuc) -- Types infixr 0 _=>_ data Ty : Set where UNIT : Ty _=>_ : Ty -> Ty -> Ty BOX : Ty -> Ty -- Context and truth/validity judgements Cx...
{-# OPTIONS --without-K #-} module PiU where open import Data.Nat using (ℕ; _+_; _*_) ------------------------------------------------------------------------------ -- Define the ``universe'' for Pi. All versions of Pi share the same -- universe. Where they differ is in what combinators exist between -- members of...
module Using where module Dummy where data DummySet1 : Set where ds1 : DummySet1 data DummySet2 : Set where ds2 : DummySet2 open Dummy using (DummySet1) open Dummy -- checking that newline + comment is allowed before "using" using (DummySet2) -- Andreas, 2020-06-06, issue #4704 -- Allow repetions in `using`...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Conversion where open import Data.Binary.Definition open import Data.Binary.Increment import Data.Nat as ℕ open import Data.Nat using (ℕ; suc; zero) ⟦_⇑⟧ : ℕ → 𝔹 ⟦ zero ⇑⟧ = 0ᵇ ⟦ suc n ⇑⟧ = inc ⟦ n ⇑⟧ ⟦_⇓⟧ : 𝔹 → ℕ ⟦ 0ᵇ ⇓⟧ = 0 ⟦ 1ᵇ xs ⇓⟧ = 1 ℕ.+ ⟦ xs ⇓⟧ ℕ.* 2 ...
{-# OPTIONS --warning=error #-} module AbstractModuleMacro where import Common.Issue481ParametrizedModule as P abstract module M = P Set
{-# OPTIONS --postfix-projections #-} {-# OPTIONS --allow-unsolved-metas #-} module StateSizedIO.writingOOsUsingIOVers4ReaderMethods where open import StateSizedIO.RObject open import StateSizedIO.Object open import StateSizedIO.Base open import Data.Product open import Data.Nat open import Data.Fin open import Dat...
module Issue1436-1 where module A where infixl 20 _↑_ infixl 1 _↓_ data D : Set where ● : D _↓_ _↑_ : D → D → D module B where infix -1000000 _↓_ data D : Set where _↓_ : D → D → D open A open B -- The expression below is not parsed. If the number 20 above is -- replaced by 19, then...
-- Andreas, 2016-07-29, issue #717 -- reported by LarryTheLiquid on 2012-10-28 data Foo (A : Set) : Set where foo : Foo A data Bar : Set where bar baz : Foo {!Bar!} → Bar -- previously, this IP got duplicated internally fun : (x : Bar) → Foo Bar fun (bar y) = {!y!} -- WAS: goal is "Set" (incorrect, should be "F...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Category.Complete module Categories.Category.Complete.Properties.SolutionSet where open import Level open import Categories.Functor open import Categories.Object.Initial open import Categories.Object.Product.Indexed open impor...
-- examples for termination with tupled arguments module Tuple where data Nat : Set where zero : Nat succ : Nat -> Nat data Pair (A : Set) (B : Set) : Set where pair : A -> B -> Pair A B -- uncurried addition add : Pair Nat Nat -> Nat add (pair x (succ y)) = succ (add (pair x y)) add (pair x zero) = x ...
-- Andreas, 2016-08-01, issue #2125, qualified names in pragmas {-# OPTIONS --rewriting #-} import Common.Equality as Eq {-# BUILTIN REWRITE Eq._≡_ #-} -- qualified name, should be accepted postulate A : Set a b : A module M where open Eq postulate rule : a ≡ b {-# REWRITE M.rule #-} -- qualified nam...
{-# OPTIONS --universe-polymorphism #-} open import Categories.Category open import Categories.Object.Products module Categories.Object.Products.N-ary {o ℓ e} (C : Category o ℓ e) (P : Products C) where open Category C open Products P open Equiv import Categories.Object.Product open Categories.Object.Product ...
-- {-# OPTIONS -v tc.term.args:30 -v tc.meta:50 #-} module Issue795 where data Q (A : Set) : Set where F : (N : Set → Set) → Set₁ F N = (A : Set) → N (Q A) → N A postulate N : Set → Set f : F N R : (N : Set → Set) → Set funny-term : ∀ N → (f : F N) → R N -- This should work now: WAS: "Refuse to constru...
module Examples where open import Prelude open import Sessions.Syntax module _ where open import Relation.Ternary.Separation.Construct.List Type lets : ∀[ Exp a ⇒ (a ∷_) ⊢ Exp b ─✴ Exp b ] app (lets e₁) e₂ σ = ap (lam _ e₂ ×⟨ ⊎-comm σ ⟩ e₁) -- The example from section 2.1 of the paper ex₁ : Exp unit ε e...
{-# OPTIONS --without-K --safe #-} open import Categories.Category using (Category) open import Categories.Category.Monoidal.Core using (Monoidal) -- The tensor product of certain monoidal categories is a monoidal functor. module Categories.Functor.Monoidal.Tensor {o ℓ e} {C : Category o ℓ e} {M : Monoidal C} wher...
{-# OPTIONS --cubical #-} open import Agda.Builtin.Cubical.Path data PushOut {A B C : Set} (f : C → A) (g : C → B) : Set where inl : A → PushOut f g inr : B → PushOut f g push : ∀ c → inl (f c) ≡ inr (g c) squash : ∀ a b → a ≡ b data ∥_∥₀ (A : Set) : Set where ∣_∣ : A → ∥ A ∥₀ squash : ∀ (x y : ∥ A ∥₀)...
-- Andreas, 2014-05-17 open import Common.Prelude open import Common.Equality postulate bla : ∀ x → x ≡ zero P : Nat → Set p : P zero K : ∀{A B : Set} → A → B → A f : ∀ x → P x f x rewrite K {x ≡ x} {Nat} refl {!!} = {!!} -- Expected: two interaction points!
------------------------------------------------------------------------ -- Equivalences with erased "proofs", defined in terms of partly -- erased contractible fibres ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Equivalence.E...
------------------------------------------------------------------------------ -- Testing the translation of the propositional functions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-...
{-# OPTIONS --cubical --no-import-sorts --safe --guardedness #-} module Cubical.DStructures.Experiments where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalence open...
module Issue357 where module M (X : Set) where data R : Set where r : X → R postulate P Q : Set q : Q open M P open M.R works : M.R Q works = M.R.r q fails : M.R Q fails = r q
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Coproduct open import lib.types.Paths open import lib.types.Pointed open import lib.types.Pushout open import lib.types.PushoutFlattening open import lib.types.PushoutFmap open import lib.types.Span open import lib.types.Unit -- Wedg...
module _ where infix -1 _■ infixr -2 step-∼ postulate Transitive : {A : Set} (P Q : A → A → Set) → Set step-∼ : ∀ {A} {P Q : A → A → Set} ⦃ t : Transitive P Q ⦄ x {y z} → Q y z → P x y → Q x z syntax step-∼ x Qyz Pxy = x ∼⟨ Pxy ⟩ Qyz infix 4 _≈_ postulate Proc : Set _≈_ : Pro...
{-# OPTIONS --rewriting #-} -- Syntax open import Library module Derivations (Base : Set) where import Formulas; private open module Form = Formulas Base -- open import Formulas Base public -- Derivations infix 2 _⊢_ data _⊢_ (Γ : Cxt) : (A : Form) → Set where hyp : ∀{A} (x : Hyp A Γ) → Γ ⊢ A impI : ∀{A...
{-# OPTIONS --without-K #-} open import Library -------------------------------------------------------------------------------- -- Universes for a Category -------------------------------------------------------------------------------- record CatLevel : Set where field Obj : Level Hom : Level Obj-Hom...
module Luau.Value.ToString where open import Agda.Builtin.String using (String) open import Agda.Builtin.Float using (primShowFloat) open import Luau.Value using (Value; nil; addr; number) open import Luau.Addr.ToString using (addrToString) valueToString : Value → String valueToString nil = "nil" valueToString (addr ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties satisfied by lattices ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary.Lattice module Relation.Binary.Propertie...
data Unit : Set where unit : Unit data Builtin : Set where addInteger : Builtin data SizedTermCon : Set where integer : (s : Unit) → SizedTermCon data ScopedTm : Set where con : SizedTermCon → ScopedTm data Value : ScopedTm → Set where V-con : (tcn : SizedTermCon) → Value (con tcn) BUILTIN : Builtin → (...
-- The Berry majority function. module Berry where data Bool : Set where F : Bool T : Bool maj : Bool -> Bool -> Bool -> Bool maj T T T = T maj T F x = x maj F x T = x maj x T F = x -- doesn't hold definitionally maj F F F = F postulate z : Bool
module Inductive.Examples.Nat where open import Inductive open import Tuple import Data.Fin as Fin open import Data.Product open import Data.List open import Data.Vec hiding (lookup) Nat : Set Nat = Inductive ( ([] , []) ∷ (([] , ([] ∷ [])) ∷ [])) zero : Nat zero = construct Fin.zero [] [] suc : Nat → Nat suc n = ...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Proofs.Multiplication where open import Relation.Binary.PropositionalEquality open import Data.Binary.Operations.Unary open import Data.Binary.Operations.Addition open import Data.Binary.Operations.Multiplication open import Data.Binary.Proofs.Unary open import Da...
-- Copatterns disabled! {-# OPTIONS --no-copatterns #-} open import Common.Product test : {A B : Set} (a : A) (b : B) → A × B test a b = {!!} -- Should give error when attempting to split.
module bstd.belt where open import Agda.Builtin.Nat using () renaming (Nat to ℕ) -- open import Agda.Builtin.Word using (Word64) record traits : Set₁ where infixl 5 _⊕_ infixl 6 _⊞_ _⊟_ field w : Set _⊟_ : w → w → w _⊞_ : w → w → w _⊕_ : w → w → w G_ : ℕ → w → w _⋘_ : w → ℕ → w module p...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some simple binary relations ------------------------------------------------------------------------ module Relation.Binary.Simple where open import Relation.Binary open import Data.Unit open import Data.Empty...
module RandomAccessList.Redundant.Core where open import BuildingBlock.BinaryLeafTree using (BinaryLeafTree; Node; Leaf) open import Data.Num.Redundant open import Data.Nat using (ℕ; zero; suc) open import Data.Nat.Etc infixr 2 0∷ _1∷_ _,_2∷_ data 0-2-RAL (A : Set) : ℕ → Set where [] : ∀ {n} ...
module prelude.list where open import Data.Nat renaming (zero to z; suc to s) open import Data.Fin as Fin using (Fin) import Data.Fin as Fin renaming (zero to z; suc to s) open import Agda.Builtin.Sigma open import Data.Product open import Relation.Binary.PropositionalEquality.Core using (_≡_; _≢_; refl; cong) open imp...