text
stringlengths
4
690k
module std-reduction.Base where open import Esterel.Lang open import Esterel.Lang.Properties open import Esterel.Context using (EvaluationContext ; EvaluationContext1 ; _⟦_⟧e ; _≐_⟦_⟧e ; Context ; Context1 ; _⟦_⟧c ; _≐_⟦_⟧c) open EvaluationContext1 open import Esterel.Lang open import Esterel.Environment as...
module examples.Vec where {- Computed datatypes -} data One : Set where unit : One data Nat : Set where zero : Nat suc : Nat -> Nat data _*_ (A B : Set) : Set where pair : A -> B -> A * B infixr 20 _=>_ data _=>_ (A B : Set) : Set where lam : (A -> B) -> A => B lam2 : {A B C : Set...
open import Level open import Ordinals module OrdUtil {n : Level} (O : Ordinals {n} ) where open import logic open import nat open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) open import Data.Empty open import Relation.Binary.PropositionalEquality open import Relation.Nullary open...
module Prelude where open import Agda.Primitive using (Level; lzero; lsuc) renaming (_⊔_ to lmax) open import Relation.Binary.PropositionalEquality as Eq open import Data.List open import Data.Nat.Properties open import Data.List.Membership.DecSetoid ≡-decSetoid open import Data.List.Relation.Unary.Any ...
-- Andreas, 2020-02-06, issue #906, and #942 #2068 #3136 #3431 #4391 #4418 -- -- Termination checker now tries to reduce calls away -- using non-recursive clauses. -- -- This fixes the problem that for dependent copattern definitions -- the earlier, non-recursive clauses get into non-guarded positions -- in later claus...
open import Formalization.PredicateLogic.Signature module Formalization.PredicateLogic.Syntax.Tree (𝔏 : Signature) where open Signature(𝔏) open import Data.DependentWidthTree as Tree hiding (height) import Functional.Dependent import Lvl open import Formalization.PredicateLogic.Syntax(𝔏) open import Form...
{-# OPTIONS --sized-types #-} open import Relation.Binary.Core module Mergesort.Impl1.Correctness.Order {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Data.List open import Function using (_∘_) open import List.Sorted _≤_ open import Mergesort.Impl1 _≤_ tot≤ op...
module Fough where open import Agda.Primitive renaming (_⊔_ to lmax) record Setoid l : Set (lsuc l) where field El : Set l Eq : El -> El -> Set l Rf : (x : El) -> Eq x x Sy : (x y : El) -> Eq x y -> Eq y x Tr : (x y z : El) -> Eq x y -> Eq y z -> Eq x z open Setoid module PACKQ {l}(X : Setoid l...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import groups.ExactSequence open import homotopy.FunctionOver open import homotopy.PtdAdjoint open import homotopy.SuspAdjointLoop open import cohomology.MayerVietoris open import cohomology.Theory {- Standard Mayer-Vietoris exact sequence (algebraic) deri...
module x03relations where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; sym) open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Data.Nat.Properties using (+-comm; +-identityʳ; *-comm; +-suc) {- ----------------------------------...
module Data.Boolean.Numeral where open import Data open import Data.Boolean open import Data.Boolean.Stmt import Lvl open import Numeral.Natural open import Numeral.Natural.Oper.Comparisons open import Syntax.Number open import Type Bool-to-ℕ : Bool → ℕ Bool-to-ℕ 𝐹 = 0 Bool-to-ℕ 𝑇 = 1 ℕ-to-Bool : (n : ℕ) → . ...
module Lib.Vec where open import Common.Nat open import Lib.Fin open import Common.Unit import Common.List as List; open List using (List ; [] ; _∷_) data Vec (A : Set) : Nat → Set where _∷_ : {n : Nat} → A → Vec A n → Vec A (suc n) [] : Vec A zero infixr 30 _++_ _++_ : {A : Set}{m n : Nat} → Vec A m → Vec A ...
{-# OPTIONS --cubical --safe #-} module Lens.Composition where open import Prelude open import Lens.Definition open import Lens.Operators infixr 9 _⋯_ _⋯_ : Lens A B → Lens B C → Lens A C fst (ab ⋯ bc) xs = ac where ab-xs : LensPart _ _ ab-xs = fst ab xs bc-ys : LensPart _ _ bc-ys = fst bc (get ab-xs) ...
module InstanceArgumentsAmbiguous where postulate A B : Set f : {{a : A}} → B a₁ a₂ : A test : B test = f
{-# OPTIONS --without-K --rewriting #-} open import Basics open import lib.Basics open import Flat module Axiom.C1 {@♭ i j : ULevel} (@♭ I : Type i) (@♭ R : I → Type j) where open import Axiom.C0 I R postulate C1 : (index : I) → R index
------------------------------------------------------------------------ -- The Agda standard library -- -- A Categorical view of the Sum type (Right-biased) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Level module Data.Sum.Categorical.Right...
{-# OPTIONS --without-K --safe #-} module ProMonoid where open import Level open import Algebra.Core using (Op₂) open import Algebra.Definitions using (Congruent₂) open import Algebra.Structures open import Algebra.Bundles open import Relation.Binary -- Pre-ordered monoids, additively written record ProMonoid c ℓ₁ ...
-- Andreas, 2016-01-13, highlighting of import directives -- {-# OPTIONS -v highlighting.names:100 -v scope.decl:70 -v tc.decl:10 #-} module _ where import Common.Product as Prod hiding (proj₁) -- proj₁ should be highlighted as field open Prod using (_×_) -- _×_ should be highlighted as record...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Everything where import Cubical.Data.BinNat import Cubical.Data.Bool import Cubical.Data.Empty import Cubical.Data.Equality import Cubical.Data.Fin import Cubical.Data.Nat import Cubical.Data.Nat.Algebra import Cubical.Data.Nat.Order import Cubical.Data.NatMinusOne ...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Functions.Definition open import Setoids.Setoids open import Setoids.Subset open import Graphs.Definition module Graphs.InducedSubgraph {a b c : _} {V' : Set a} {V : Se...
{-# OPTIONS --allow-unsolved-metas #-} -- Andreas, 2016-12-19, issue #2344, reported by oinkium, shrunk by Ulf -- The function Agda.TypeChecking.Telescope.permuteTel -- used in the unifier was buggy. -- {-# OPTIONS -v tc.meta:25 #-} -- {-# OPTIONS -v tc.lhs:10 #-} -- {-# OPTIONS -v tc.lhs.unify:100 #-} -- {-# OPTIONS...
module Data.Boolean.NaryOperators where open import Data.Boolean import Data.Boolean.Operators open Data.Boolean.Operators.Logic open import Function.DomainRaise open import Numeral.Natural private variable n : ℕ -- N-ary conjunction (AND). -- Every term is true. ∧₊ : (n : ℕ) → (Bool →̂ Bool)(n) ∧₊(0) = ...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Decidable.Sets module Decidable.Lemmas {a : _} {A : Set a} (dec : DecidableSet A) where squash : {x y : A} → .(x ≡ y) → x ≡ y squash {x} {y} x=y with dec x y ... | inl pr = pr ... | inr bad = exFalso (bad x=y)
{-# OPTIONS --without-K #-} open import Relation.Binary.PropositionalEquality open import Data.Product open import Data.Unit open import Data.Empty open import Function -- some HoTT-inspired combinators _&_ = cong _⁻¹ = sym _◾_ = trans coe : {A B : Set} → A ≡ B → A → B coe refl a = a _⊗_ : ∀ {A B : Set}{f g : A → ...
{-# OPTIONS --without-K --safe #-} -- define a less-than-great equivalence on natural transformations module Categories.NaturalTransformation.Equivalence where open import Level open import Relation.Binary using (Rel; IsEquivalence; Setoid) open import Categories.Category open import Categories.Functor open import C...
{- Computable stuff constructed from the Combinatorics of Finite Sets -} {-# OPTIONS --safe #-} module Cubical.Experiments.Combinatorics where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Data.Nat open import Cubical.Data.Sum open import Cubical.Data.Sigma open...
module FFI.Data.Maybe where open import Agda.Builtin.Equality using (_≡_; refl) {-# FOREIGN GHC import qualified Data.Maybe #-} data Maybe (A : Set) : Set where nothing : Maybe A just : A → Maybe A {-# COMPILE GHC Maybe = data Data.Maybe.Maybe (Data.Maybe.Nothing|Data.Maybe.Just) #-} just-inv : ∀ {A} {x y : A} ...
module JVM.Syntax where open import JVM.Syntax.Instructions public
module DotPatternTermination where data Nat : Set where zero : Nat suc : Nat -> Nat -- A simple example. module Test1 where data D : Nat -> Set where cz : D zero c1 : forall {n} -> D n -> D (suc n) c2 : forall {n} -> D n -> D n -- To see that this is terminating the termination checker has to lo...
------------------------------------------------------------------------ -- The Agda standard library -- -- Characters ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Char where -------------------------------------------------------------------...
-- All 256 ASCII characters module LineEndings.LexASCII where {- In Block comment: Control characters 0-31   Rest of 7-bit ASCII !"#$%&'()*+,-./0123456789:;<=>? @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ `abcdefghijklmnopqrstuvwxyz{|}~ 8-Bit ASCII €‚ƒ„…†‡ ˆ‰Š‹ŒŽ ‘’“”•–— ˜™š›œžŸ  ¡¢£¤...
module Esterel.Context where open import Esterel.Lang open import Esterel.Environment using (Env) open import Esterel.Variable.Signal as Signal using (Signal ; _ₛ) renaming (_≟ₛₜ_ to _≟ₛₜₛ_) open import Esterel.Variable.Shared as SharedVar using (SharedVar ; _ₛₕ) renaming (_≟ₛₜ_ to _≟ₛₜₛₕ_) open import Esterel.V...
module Cats.Category.Constructions.Terminal where open import Data.Product using (proj₁ ; proj₂) open import Level open import Cats.Category.Base import Cats.Category.Constructions.Iso as Iso import Cats.Category.Constructions.Unique as Unique module Build {lo la l≈} (Cat : Category lo la l≈) where open Categor...
{- This second-order equational theory was created from the following second-order syntax description: syntax Combinatory | CL type * : 0-ary term app : * * -> * | _$_ l20 i : * k : * s : * theory (IA) x |> app (i, x) = x (KA) x y |> app (app(k, x), y) = x (SA) x y z |> app (app (app ...
-- Andreas, 2019-06-25, issue #3855 reported by nad -- Constraint solver needs to respect erasure. module _ (_≡_ : {A : Set₁} → A → A → Set) (refl : {A : Set₁} (x : A) → x ≡ x) where -- rejected : (@0 A : Set) → A ≡ A -- rejected A = refl A should-also-be-rejected : (@0 A : Set) → A ≡ A should-also-be-rejected...
-- Agda is an /interactive/ language; -- that's very important difference (compared to language-pts) module J where open import Level open import Data.Bool using (Bool; true; false) data ⊤ : Set where I : ⊤ data ⊥ : Set where data Eq {ℓ : Level} (A : Set ℓ) : A → A → Set ℓ where refl : {x : A} → Eq A x x J : ∀...
------------------------------------------------------------------------ -- The Agda standard library -- -- Unsafe String operations and proofs ------------------------------------------------------------------------ {-# OPTIONS --with-K #-} module Data.String.Unsafe where open import Data.String.Base open import R...
------------------------------------------------------------------------ -- A coinductive definition of weak bisimilarity ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Labelled-transition-system module Bisimilarity.Weak {ℓ} (lts : LTS ℓ) where ope...
module Itse.Grammar where open import Relation.Binary.PropositionalEquality open import Relation.Nullary open import Relation.Unary open import Data.List open import Data.Maybe open import Data.String open import Data.Empty data ExprVari : Set Prgm : Set data Stmt : Set data Expr : ExprVari → Set data Name : ExprVari...
-- Andreas, 2016-07-27, issue #2117 reported by Guillermo Calderon -- {-# OPTIONS -v tc:10 #-} record R : Set₁ where field A : Set open R {{...}} record S (r : R) : Set where instance i = r field f : A -- ERROR WAS: -- No instance of type R was found in scope. -- when checking that the expression A has t...
------------------------------------------------------------------------ -- The Agda standard library -- -- Order morphisms ------------------------------------------------------------------------ module Relation.Binary.OrderMorphism where open import Relation.Binary open Poset import Function as F open import Level ...
module MJSF.Examples.Integer where open import Prelude open import Data.Maybe open import Data.Star open import Data.Bool open import Data.List open import Data.Integer open import Data.List.Membership.Propositional open import Data.List.Relation.Unary.Any open import Data.List.Relation.Unary.All as All hiding (lookup...
{-# OPTIONS --universe-polymorphism #-} module Categories.Groupoid.Coproduct where open import Level open import Data.Sum open import Categories.Category open import Categories.Groupoid open import Categories.Morphisms import Categories.Coproduct as CoproductC Coproduct : ∀ {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {D ...
module nat where open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) open import Data.Empty open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import logic nat-<> : { x y : Nat } → x < y → y < x → ⊥ nat-<> (s≤s x<y) (s≤s y<x) = nat-<> x<y y<x na...
------------------------------------------------------------------------ -- The Agda standard library -- -- "Evaluating" a polynomial, using Horner's method. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Tactic.RingSolver.Core.Polynomial.Parame...
-- Andreas, 2016-08-08, issue #2132 reported by effectfully -- Pattern synonyms in lhss of display form definitions -- {-# OPTIONS -v scope:50 -v tc.decl:10 #-} open import Common.Equality data D : Set where C c : D g : D → D pattern C′ = C {-# DISPLAY C′ = C′ #-} {-# DISPLAY g C′ = c #-} -- Since pattern syn...
{-# OPTIONS --prop --rewriting #-} open import Examples.Sorting.Parallel.Comparable module Examples.Sorting.Parallel.Core (M : Comparable) where open import Calf.CostMonoid open ParCostMonoid parCostMonoid hiding (costMonoid) renaming ( _≤_ to _≤ₚ_; ≤-refl to ≤ₚ-refl; ≤-trans to ≤ₚ-trans; module ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some boring lemmas used by the ring solver ------------------------------------------------------------------------ -- Note that these proofs use all "almost commutative ring" properties. {-# OPTIONS --without-...
{-# OPTIONS --without-K --safe #-} module Data.Binary.Tests.Helpers where open import Data.List as List using (List; _∷_; []) open import Data.Product open import Data.Nat as Nat using (ℕ; suc; zero) open import Data.Binary.Definitions open import Data.Binary.Operations.Semantics open import Relation.Binary.Propositi...
module Data.Tuple.Equivalence where import Lvl open import Data using (Unit ; <>) open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Logic.Propositional open import Structure.Setoid open import Structure.Function open import Structure.Operator open import Structure.Relator.Equivalence open import Struc...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.ZCohomology.Groups.CP2 where open import Cubical.Foundations.HLevels open import Cubical.Foundations.Function open import Cubical.Foundations.Univalence open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cub...
{- This second-order equational theory was created from the following second-order syntax description: syntax FOL type * : 0-ary N : 0-ary term false : * | ⊥ or : * * -> * | _∨_ l20 true : * | ⊤ and : * * -> * | _∧_ l20 not : * -> * | ¬_ r50 eq : N N -> * | _≟_ l20 all : N.*...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Properties.Setoids where open import Level open import Data.Product using (Σ; proj₁; proj₂; _,_; Σ-syntax; _×_; -,_) open import Function.Equality using (Π) open import Relation.Binary using (Setoid; Preorder; Rel) open import Relation.Binary.Prop...
open import Agda.Primitive variable ℓ : Level A : Set ℓ P : A → Set ℓ f : (x : A) → P x postulate R : (a : Level) → Set (lsuc a) r : (a : Level) → R a Id : (a : Level) (A : Set a) → A → A → Set a cong₂ : (a b c : Level) (A : Set a) (B : Set b) (C : Set c) (x y : A) (u v : B) (f : A → B → C)...
open import Oscar.Prelude open import Oscar.Class open import Oscar.Class.Reflexivity module Oscar.Class.Reflexivity.Function where module _ {a} where instance 𝓡eflexivityFunction : Reflexivity.class Function⟦ a ⟧ 𝓡eflexivityFunction .⋆ = ¡
-- https://github.com/idris-lang/Idris-dev/blob/4e704011fb805fcb861cc9a1bd68a2e727cefdde/libs/contrib/Data/Nat/Fib.idr {-# OPTIONS --without-K --safe #-} -- agda-stdlib open import Algebra module Math.NumberTheory.Fibonacci.Generic {c e} (CM : CommutativeMonoid c e) (v0 v1 : CommutativeMonoid.Carrier CM) where...
module Lib.Maybe where data Maybe (A : Set) : Set where nothing : Maybe A just : A -> Maybe A {-# COMPILE GHC Maybe = data Maybe (Nothing | Just) #-}
module Subst where open import Prelude open import Lambda infix 100 _[_] _[_:=_] _↑ infixl 100 _↑_ _↑ˢ_ _↑ˣ_ _↓ˣ_ infixl 60 _-_ {- _-_ : {τ : Type}(Γ : Ctx) -> Var Γ τ -> Ctx ε - () Γ , τ - vz = Γ Γ , τ - vs x = (Γ - x) , τ wkˣ : {Γ : Ctx}{σ τ : Type} (x : Var Γ σ) -> Var (Γ - x) τ -> Var Γ τ wkˣ vz ...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.IdUniv {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed....
{-# OPTIONS --cubical --safe --postfix-projections #-} module Cardinality.Finite.Structure where open import Prelude open import Data.Fin open import Data.Nat open import Data.Nat.Properties private variable n m : ℕ liftˡ : ∀ n m → Fin m → Fin (n + m) liftˡ zero m x = x liftˡ (suc n) m x = fs (liftˡ n m x)...
module Data.Signed where open import Data.Bit using (Bit ; b0 ; b1 ; Bits-num ; Bits-neg ; Overflowing ; _overflow:_ ; result ; carry ; WithCarry ; _with-carry:_ ; toBool ; tryToFinₙ ; !ₙ ; _⊕_ ; _↔_ ) renaming ( _+_ to bit+ ; _-_ to bit- ; ! to bit! ; _&_ to bit& ; _~|_ to ...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) open import Functions open import Setoids.Setoids open import Setoids.Subset open import Graphs.Definition open import Sets.FinSet.Definition open import Numbers.Naturals.Semiring o...
{-# OPTIONS --sized-types #-} module SizedTypesRigidVarClash where postulate Size : Set _^ : Size -> Size ∞ : Size {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZESUC _^ #-} {-# BUILTIN SIZEINF ∞ #-} data Nat : {size : Size} -> Set where zero : {size : Size} -> Nat {size ^} suc : {size : Size} -> Nat {s...
-- Andreas, 2017-01-18, issue #2413 -- As-patterns of variable patterns data Bool : Set where true false : Bool test : Bool → Bool test x@y = {!x!} -- split on x test1 : Bool → Bool test1 x@_ = {!x!} -- split on x test2 : Bool → Bool test2 x@y = {!y!} -- split on y
module reverse_string where open import Data.String open import Data.List reverse_string : String → String reverse_string s = fromList (reverse (toList s))
{-# OPTIONS --safe --without-K #-} open import Algebra.Bundles using (Monoid) module Categories.Category.Construction.MonoidAsCategory o {c ℓ} (M : Monoid c ℓ) where open import Data.Unit.Polymorphic open import Level open import Categories.Category.Core open Monoid M -- A monoid is a category with one object Mono...
------------------------------------------------------------------------------ -- Non-terminating GCD ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIO...
module Structure.Signature where open import Data.Tuple.Raise open import Data.Tuple.Raiseᵣ.Functions import Lvl open import Numeral.Natural open import Structure.Function open import Structure.Setoid open import Structure.Relator open import Type private variable ℓ ℓᵢ ℓᵢ₁ ℓᵢ₂ ℓᵢ₃ ℓd ℓd₁ ℓd₂ ℓᵣ ℓᵣ₁ ℓᵣ₂ ℓₑ ℓₑ₁ ℓₑ...
module Issue292-19 where postulate I : Set i₁ i₂ : I J : Set j : I → J data D : I → Set where d₁ : D i₁ d₂ : D i₂ data P : ∀ i → D i → Set where p₁ : P i₁ d₁ p₂ : P i₂ d₂ data P′ : ∀ i → D i → Set where p₁ : P′ i₁ d₁ data E : J → Set where e₁ : E (j i₁) e₂ : E (j i₂) data Q : ∀ ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Data.List.Any.Membership instantiated with propositional equality, -- along with some additional definitions. ------------------------------------------------------------------------ {-# OPTIONS --without-K --sa...
module TelescopingLet2 where f : (let ★ = Set) (A : ★) → A → Set₁ f A x = ★ -- should fail, since ★ is not in scope in the definition
module Ag05 where open import Agda.Builtin.Nat open import Agda.Builtin.Equality open import Agda.Builtin.Bool {- data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x -} data Refine : (A : Set) → (A → Set) → Set where MkRefine : ∀ {A : Set} {f : A → Set} → (a : A) → (f a) → Refine A f data _∧_ : Set → Set → S...
{-# OPTIONS --without-K --safe #-} -- the usual notion of mate is defined by two isomorphisms between hom set(oid)s are natural, -- but due to explicit universe level, a different definition is used. module Categories.Adjoint.Mate where open import Level open import Data.Product using (Σ; _,_) open import Function.Eq...
open import Agda.Builtin.List map : ∀ {a b} {A : Set a} {B : Set b} → (A → B) → List A → List B map f [] = [] map f (x ∷ xs) = f x ∷ map f xs foldr : ∀ {a b} {A : Set a} {B : Set b} → (A → B → B) → B → List A → B foldr c n [] = n foldr c n (x ∷ xs) = c x (foldr c n xs) data Rose (A : Set) : Set where l...
{-# OPTIONS --safe --experimental-lossy-unification #-} {- This file contains: 1. The long exact sequence of loop spaces Ωⁿ (fib f) → Ωⁿ A → Ωⁿ B 2. The long exact sequence of homotopy groups πₙ(fib f) → πₙ A → πₙ B 3. Some lemmas relating the map in the sequence to maps using the other definition of πₙ (maps from S...
{-# OPTIONS --cubical --safe #-} module CubicalAbsurd where open import Cubical.Core.Everything open import Cubical.Data.Nat open import Cubical.Data.Empty theWrongThing : 1 + 1 ≡ 3 → ⊥ theWrongThing thatMoney = znots (injSuc (injSuc thatMoney))
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Prelude.QuoInt where open import Cubical.HITs.Ints.QuoInt public using ( ℤ ; HasFromNat ; HasFromNeg ; Int≡ℤ ; signed ; posneg ; ℤ→Int ; sucℤ ; predℤ ; pos ; neg ; sucℤ-+ʳ ; Sign ; spos ; sneg ) renaming ( isSetℤ to is...
-- Andreas, 2015-07-18 -- Postpone checking of record expressions when type is blocked. -- Guess type of record expressions when type is blocked. open import Common.Product open import Common.Prelude open import Common.Equality T : Bool → Set T true = Bool × Nat T false = ⊥ works : (P : ∀{b} → b ≡ true → T b → Set)...
-- Some tests for the Agda Abstract Machine. open import Agda.Builtin.Nat open import Agda.Builtin.Equality open import Agda.Builtin.Sigma _×_ : Set → Set → Set A × B = Σ A λ _ → B id : Nat → Nat id x = x -- Applying id should not break sharing double : Nat → Nat double n = id n + id n pow : Nat → Nat pow zero ...
module Oscar.Instance where open import Oscar.Class.Associativity open import Oscar.Class.Congruity open import Oscar.Class.Equivalence open import Oscar.Class.Extensionality open import Oscar.Class.Injectivity open import Oscar.Class.Preservativity open import Oscar.Class.Reflexivity open import Oscar.Class.Semifunc...
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Relation.Binary.Raw module Cubical.Relation.Binary.Raw.Construct.StrictToNonStrict {a ℓ} {A : Type a} (_<_ : RawRel A ℓ) where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Funct...
------------------------------------------------------------------------ -- The "time complexity" of the compiled program matches the one -- obtained from the instrumented interpreter ------------------------------------------------------------------------ open import Prelude hiding (_+_; _*_) import Lambda.Syntax m...
module _ where {- NOTE: To run move to adga directory or figure out how `agda -I` works -} open import utility open import Esterel.Lang open import Esterel.Lang.Properties open import Esterel.Environment as Env open import Esterel.Context open import Data.Product open import Data.Sum open import Data.Bool open import...
postulate I : Set f : Set → I mutual data P : I → Set where Q : I → Set Q x = P (f (P x))
{-# OPTIONS --without-K #-} module WithoutK8 where data I : Set where i : I module M (x : I) where data D : Set where d : D data P : D → Set where postulate x : I open module M′ = M x Foo : P d → Set Foo ()
module Human.List where open import Human.Nat infixr 5 _,_ data List {a} (A : Set a) : Set a where end : List A _,_ : (x : A) (xs : List A) → List A {-# BUILTIN LIST List #-} {-# COMPILE JS List = function(x,v) { if (x.length < 1) { return v["[]"](); } else { return v["_∷_"](x[0], x.slice(1)); } } #-} {-# COMP...
{-# OPTIONS --safe #-} module Cubical.Data.Vec.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.HLevels open import Cubical.Foundations.Univalence import Cubical.Data.Empty as ⊥ open import Cubica...
module Oscar.Data.AList where open import Oscar.Data.Equality open import Oscar.Data.Nat open import Oscar.Level module _ {a} (A : Nat → Set a) where data AList (n : Nat) : Nat → Set a where [] : AList n n _∷_ : ∀ {m} → A m → AList n m → AList n (suc m) open import Oscar.Category module Category' {a} {...
module AKS.Primality where open import AKS.Primality.Base public open import AKS.Primality.Properties public
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core using (Category) open import Categories.Comonad -- Verbatim dual of Categories.Adjoint.Construction.Kleisli module Categories.Adjoint.Construction.CoKleisli {o ℓ e} {C : Category o ℓ e} (M : Comonad C) where open import Categories.Category.Const...
{-# OPTIONS --safe #-} {- This uses ideas from Floris van Doorn's phd thesis and the code in https://github.com/cmu-phil/Spectral/blob/master/spectrum/basic.hlean -} module Cubical.Homotopy.Spectrum where open import Cubical.Foundations.Prelude open import Cubical.Data.Unit.Pointed open import Cubical.Foundations....
{- This file contains: - the abelianization of groups as a HIT as proposed in https://arxiv.org/abs/2007.05833 The definition of the abelianization is not as a set-quotient, since the relation of abelianization is cumbersome to work with. -} {-# OPTIONS --safe #-} module Cubical.Algebra.Group.Abelianization.Base...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Category.Construction.Properties.Presheaves.Complete {o ℓ e} (C : Category o ℓ e) where open import Data.Product open import Function.Equality using (Π) renaming (_∘_ to _∙_) open import Relation.Binary open import Relation.Binary.C...
{-# OPTIONS --cubical-compatible #-} data ℕ : Set where zero : ℕ suc : ℕ → ℕ Test : Set Test = ℕ test : Test → ℕ test zero = zero test (suc n) = test n
module Serializer where open import Data.List open import Data.Fin hiding (_+_) open import Data.Nat open import Data.Product open import Data.Bool open import Function using (_∘_ ; _$_ ; _∋_) open import Function.Injection hiding (_∘_) open import Function.Surjection hiding (_∘_) open import Function.Bijection hiding...
------------------------------------------------------------------------------ -- Test the consistency of FOTC.Data.List ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymor...
open import Data.Product using ( _×_ ; _,_ ) open import Data.Sum using ( inj₁ ; inj₂ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ) open import Relation.Unary using ( _∈_ ; _⊆_ ) open import Web.Semantic.DL.ABox using ( ABox ; Assertions ; ⟨ABox⟩ ; ε ; _,_ ; _∼_ ; _∈₁_ ; _∈₂_ ) open import ...
{-# OPTIONS --allow-unsolved-metas --no-termination-check #-} module Bag where import Prelude import Equiv import Datoid import Eq import Nat import List import Pos open Prelude open Equiv open Datoid open Eq open Nat open List abstract ---------------------------------------------------------------------- -- Bag...
{-# OPTIONS --without-K --safe #-} -- | Operations that ensure a cycle traverses a particular element -- at most once. module Dodo.Binary.Cycle where -- Stdlib import import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; _≢_; refl) open import Level using (Level; _⊔_) open import Function using (_∘_)...
{-# 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....