text
stringlengths
4
690k
{-# OPTIONS --without-K #-} module FinEquivTypeEquiv where -- The goal is to establish that finite sets and equivalences form a -- commutative semiring. import Level using (zero) open import Data.Nat using (ℕ; _+_; _*_) open import Data.Fin using (Fin) open import Relation.Binary using (IsEquivalence) open import...
{-# OPTIONS --cubical #-} module Erased-cubical-Module-application.Cubical (_ : Set₁) where open import Agda.Builtin.Cubical.Path data ∥_∥ (A : Set) : Set where ∣_∣ : A → ∥ A ∥ trivial : (x y : ∥ A ∥) → x ≡ y
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.RingSolver.AlmostRing where open import Cubical.Foundations.Prelude open import Cubical.Data.Sigma open import Cubical.Algebra.Semigroup open import Cubical.Algebra.Monoid open import Cubical.Algebra.AbGroup private variable ℓ : Level ...
module Issue326 where open import Common.Prelude postulate QName : Set Unit : Set IO : Set → Set printBool : Bool → IO Unit {-# BUILTIN QNAME QName #-} {-# BUILTIN IO IO #-} {-# COMPILED_TYPE IO IO #-} {-# COMPILED_TYPE Unit () #-} {-# COMPILED printBool print #-} primitive primQNameEquality : QName → QN...
module REMatch where open import Data.Char import Data.Nat --open import Data.List open import Data.Bool open import Data.Product import Algebra import Algebra.FunctionProperties open import Relation.Nullary open import Relation.Binary open import Relation.Binary.PropositionalEquality open import Data.List open im...
-- Define the integers as a HIT by identifying +0 and -0 {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Ints.QuoInt.Base where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Transport open import...
module Oscar.Data.Term.internal.SubstituteAndSubstitution {𝔣} (FunctionName : Set 𝔣) where open import Oscar.Category.Action open import Oscar.Category.Category open import Oscar.Category.CategoryAction open import Oscar.Category.Functor open import Oscar.Category.Morphism open import Oscar.Category.Semifunctor ope...
module Lemmachine.Default where open import Lemmachine resource : Hooks resource = [] main = runResolve (toApp resource)
import Lvl -- TODO: Just testing how it goes with creating an axiomatic system module Geometry.Test2 (Point : Set(Lvl.𝟎)) where open import Functional open import Logic.Propositional{Lvl.𝟎} open import Logic.Predicate{Lvl.𝟎}{Lvl.𝟎} open import Relator.Equals{Lvl.𝟎}{Lvl.𝟎} -- open import Structure.Setoid.Uniquen...
{-# OPTIONS --rewriting #-} -- Interface to the standard library. -- Place to add own auxiliary definitions. module Library where open import Size public open import Level public using () renaming (zero to lzero) open import Data.Unit public using (⊤) open import Data.Empty public using (⊥; ⊥-el...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- The syntax of types with the Nehemiah plugin. ------------------------------------------------------------------------ module Nehemiah.Syntax.Type where import Parametric.Syntax.Type as Type data Base : Type.Stru...
------------------------------------------------------------------------ -- The Agda standard library -- -- Relations between properties of scaling and other operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Algebra.Module.Consequences where ...
module Module where data ℕ : Set where zero : ℕ suc : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + n = zero suc m + n = suc (m + n) import Data.Nat using (ℕ; zero; suc; _+_)
-- Andreas, 2015-05-10 Report wrong hiding for copattern {-# OPTIONS --copatterns #-} record ⊤ : Set where record Foo (A : Set) : Set where field foo : A bar : Foo ⊤ Foo.foo {bar} = _ -- Error WAS: Unexpected implicit argument -- Better error: -- Wrong hiding used for projection Foo.foo -- when checking t...
------------------------------------------------------------------------ -- The Agda standard library -- -- Basic definitions for Characters ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Char.Base where open import Level using (zero) import Da...
{-# OPTIONS --without-K --safe #-} private variable A : Set a : A variable A : Set private A = B where B = Set
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Properties.Setoids.Choice where open import Categories.Category using (Category) open import Categories.Category.Exact using (Exact) open import Categories.Category.Instance.Setoids using (Setoids) open import Data.Product using (∃; proj₁; proj₂;...
------------------------------------------------------------------------ -- Properties of functions ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --exact-split #-} module Math.Combinatorics.ListFunction.Properties where -- agda-stdlib open import Data.List hi...
-- Andreas, 2017-11-01, issue #2824 -- allow built-in pragmas in parametrized modules data Nat : Set where zero : Nat suc : Nat → Nat module M (A : Set) where {-# BUILTIN NATURAL Nat #-} test = 5
open import Common.Prelude open import Common.Reflection id : {A : Set} → A → A id x = x idTerm : Term idTerm = lam visible (abs "x" (def (quote id) (arg₁ ∷ arg₂ ∷ []))) where arg₁ = arg (argInfo hidden relevant) (def (quote Nat) []) arg₂ = arg (argInfo visible relevant) (var 0 []) -- Should fail since id...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Adjoint where open import Cubical.Foundations.Prelude open import Cubical.Data.Sigma open import Cubical.Categories.Category open import Cubical.Categories.Functor open import Cubical.Categories.NaturalTransformation open import Cubical.Foun...
module my-integer where open import bool open import bool-thms2 open import eq open import nat open import nat-thms open import product --open import product-thms open import sum -- open import unit data ⊤ : Set where triv : ⊤ ℤ-pos-t : ℕ → Set ℤ-pos-t 0 = ⊤ ℤ-pos-t (suc _) = 𝔹 data ℤ : Set where mkℤ : (n : ℕ)...
{- This files contains: - Lots of useful properties about (this) decidable predicates on finite sets. (P.S. We use the alternative definition of decidability for computational effectivity.) -} {-# OPTIONS --safe #-} module Cubical.Data.FinSet.DecidablePredicate where open import Cubical.Foundations.Prelude open i...
open import Relation.Ternary.Separation module Relation.Ternary.Separation.Construct.ListOf {a} (A : Set a) {{ r : RawSep A }} {{ _ : IsSep r }} where open import Level open import Data.Product open import Data.List open import Data.List.Properties using (++-isMonoid) open import Data.List.Relation.Binary.E...
module drawingProgram where open import Unit open import Data.Bool.Base open import Data.Char.Base renaming (primCharEquality to charEquality) open import Data.Nat.Base hiding (_≟_;_⊓_; _+_; _*_) open import Data.List.Base hiding (_++_) open import Data.Integer.Base hiding (suc) open import Data.String.Base open imp...
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- Lifts a 1-Category into a bicategory module Categories.Bicategory.Construction.1-Category {o ℓ e} b (C : Category o ℓ e) where open import Level using (Lift; lift) open import Data.Unit using (⊤; tt) open import Data.Product using (uncurry) ope...
------------------------------------------------------------------------ -- Lexicographic products of binary relations ------------------------------------------------------------------------ -- The definition of lexicographic product used here is suitable if -- the left-hand relation is a strict partial order. modul...
module Issue556 (A : Set) (x : A) where y : A y = x
{-# OPTIONS --cubical-compatible #-} module Issue1025 where data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x postulate mySpace : Set postulate myPoint : mySpace data Foo : myPoint ≡ myPoint → Set where foo : Foo refl test : {e : myPoint ≡ myPoint} → (a : Foo e) → (i : a ≡ a) → i ≡ refl test foo refl = {...
------------------------------------------------------------------------ -- The Agda standard library -- -- Non empty trie, basic type and operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} open import Relation.Binary using (StrictTotal...
module Basic where open import Prelude data List (A : Set) : Set data List A where nil : List A cons : A -> List A -> List A append : {A : Set} -> List A -> List A -> List A append nil ys = ys append (cons x xs) ys = cons x (append xs ys) record Equiv {A : Set} (R : A -> A -> Set) : Set record Equiv {A} R wh...
{- This file contains: - An implementation of the free groupoid (a free group that has no limitiations over the high dimensional path structure). An intermediate construction used to calculate the fundamental group of a Bouquet. -} {-# OPTIONS --safe #-} module Cubical.HITs.FreeGroupoid.Base where open import ...
{-# OPTIONS --without-K --exact-split #-} module encode-decode where import 05-identity-types open 05-identity-types public record Lift {i j : Level} (A : UU i) : UU (i ⊔ j) where field raise : A module Coprod where code-left : {i j : Level} {A : UU i} {B : UU j} → A → (coprod A B) → (UU i) code-left a₀ (...
------------------------------------------------------------------------------ -- Properties of the mirror function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism...
module UnequalTerms where data Zero : Set where data One : Set where one : One err1 : Zero err1 = one err2 : One -> One err2 = \(x : Zero) -> one
-- Andreas, 2015-02-26 -- {-# OPTIONS -v interaction:100 #-} data D : Set where c : D goal : D goal = {! !} -- C-c C-r gave a parse error here, as there was a (single) space. g1 : D g1 = {! !} g2 : D g2 = {! !} -- works now
------------------------------------------------------------------------ -- The Agda standard library -- -- Code related to vector equality over propositional equality that -- makes use of heterogeneous equality ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} m...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Construct.Constant where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels using (hProp) open import Cubical.Relation.Binary open import Cubical.Structures.Carrier -----...
{-# OPTIONS --cubical --save-metas #-} module Erased-cubical-Pattern-matching-Cubical where data D : Set where c₁ c₂ : D
{-# OPTIONS --cubical #-} module Numeral.Natural.Equiv.Path where open import Data.Boolean.Equiv.Path open import Functional open import Logic.Propositional open import Numeral.Natural.Oper.Comparisons open import Numeral.Natural open import Relator.Equals.Proofs.Equivalence using () renaming ([≡]-equiv to Id-equiv ;...
module List.Order.Bounded {A : Set}(_≤_ : A → A → Set) where open import Bound.Total A open import Bound.Total.Order _≤_ open import Data.List data _≤*_ : List A → Bound → Set where lenx : {t : Bound} → [] ≤* t lecx : {t : Bound}{x : A}{xs : List A} → LeB (val x) t → xs ≤* t → (x ∷ xs) ≤* t data _*≤_ : Bound → ...
{-# OPTIONS --safe --without-K #-} module Source.Size.Substitution.Theory where open import Source.Size open import Source.Size.Substitution.Canonical as SC using (Sub⊢) open import Source.Size.Substitution.Universe as SU using (⟨_⟩ ; Sub⊢ᵤ) open import Util.Prelude record SubTheory (A : Ctx → Set) : Set where inf...
{-# OPTIONS --allow-unsolved-metas #-} module LateExpansionOfRecordMeta where postulate I : Set i : I A : I → Set a : A i data D : Set₁ where d : (P : A i → Set) → P a → D record R (P : A i → Set) : Set where field p : P a record ID : Set₁ where field P : (i : I) → A i → Set isR : R (P ...
module lib.libraryString where open import Data.String open import Data.Bool open import Agda.Builtin.String using ( primStringEquality ) open import Data.String public using () renaming (toList to primStringToList; _++_ to _++Str_) _==Str_ : Str...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Variable.Levels where open import Light.Level using (Level) variable ℓ aℓ bℓ cℓ dℓ eℓ fℓ gℓ hℓ : Level
module ReasoningEx where open import Prelude open import T open import Contexts open import Eq open import Eq.Theory open import Eq.ObsTheory ---- some example programs -- boy, de bruijn indexes are unreadable w = weaken-closed plus-rec : ∀{Γ} → TExp Γ nat → TExp Γ nat → TExp Γ nat plus-rec n m = rec n m (suc (var Z...
{-# OPTIONS --rewriting --confluence-check #-} module Issue4333.N where open import Issue4333.M open import Issue4333.N0 open import Issue4333.N1 postulate of-type : (X : Set) (x : X) → Set -- Subject reduction violated for b₁' = b. _ = of-type (B a₁') b₁' _ = of-type (B a₀') b
{-# OPTIONS --without-K #-} open import HoTT module homotopy.ConstantToSetFactorization {i j} {A : Type i} {B : Type j} (B-is-set : is-set B) (f : A → B) (f-is-const : ∀ a₁ a₂ → f a₁ == f a₂) where private Skel = SetQuotient {A = A} (λ _ _ → Unit) abstract Skel-has-all-paths : has-all-paths Skel...
module Cats.Functor.Representable where open import Data.Product using (_×_ ; _,_) open import Relation.Binary using (Setoid) open import Cats.Bifunctor using (Bifunctor) open import Cats.Category open import Cats.Category.Op using (_ᵒᵖ) open import Cats.Category.Setoids as Setoids using (Setoids ; ≈-intro) open impo...
{-# OPTIONS --without-K #-} module Computability.Prelude where open import Data.Bool public using (Bool; false; true) open import Data.Empty public using (⊥; ⊥-elim) open import Data.Nat public using (ℕ; zero; suc; _+_; _*_) open import Data.Product public using (Σ; Σ-syntax; _×_; _,_; proj₁; proj₂) open import Data.S...
module UniDB.Morph.Bla where open import UniDB.Spec open import UniDB.Morph.WeakenOne open import UniDB.Morph.Sub open import UniDB.Morph.ShiftsPrime open import UniDB.Morph.Subs -- mutual -- data BlaSubst (T : STX) : MOR where -- blasubst : {γ₁ γ₂ : Dom} → BlaSubst T γ₁ γ₂ mutual data BlaWeak* (T : STX) : ...
open import Categories.Category using (Category) import Categories.Category.CartesianClosed open import Data.Fin using (Fin) renaming (zero to fzero; suc to fsuc) open import Data.List using (List; []; _∷_) open import Data.Product using (Σ; Σ-syntax; proj₁; proj₂) open import Syntax open import Level using (_⊔_; su...
{-# OPTIONS --without-K #-} module Util.Induction.WellFounded where open import Induction.WellFounded public using ( Acc ; acc ; WellFounded ; module Subrelation ; module InverseImage ; module TransitiveClosure ; module Lexicographic ) open import Relation.Binary using (Rel) open import Util.HoTT.FunctionalExten...
-- WARNING: This file was generated automatically by Vehicle -- and should not be modified manually! -- Metadata -- - Agda version: 2.6.2 -- - AISEC version: 0.1.0.1 -- - Time generated: ??? {-# OPTIONS --allow-exec #-} open import Vehicle open import Vehicle.Data.Tensor open import Data.Rational as ℚ using (ℚ) op...
{-# OPTIONS --without-K --rewriting #-} {- Imports everything that is not imported by something else. This is not supposed to be used anywhere, this is just a simple way to do `make all' This file is intentionally named index.agda so that Agda will generate index.html. favonia: On 2017/05/08, I further partition...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NConnected open import lib.NType2 open import lib.types.Paths open import lib.types.Pi open import lib.types.Truncation open import lib.types.Unit open import lib.types.Bool open import lib.types.Suspension open import lib.types.IteratedSus...
module _ where open import Common.Prelude open import Common.Reflection postulate stuck : TC ⊤ macro not-so-good : Tactic not-so-good hole = stuck fail : Nat fail = not-so-good
import Issue2447.Type-error
-- Monoidal categories {-# OPTIONS --safe #-} module Cubical.Categories.Monoidal.Base where open import Cubical.Categories.Category.Base open import Cubical.Categories.Constructions.BinProduct open import Cubical.Categories.Functor.Base open import Cubical.Categories.Functor.BinProduct open import Cubical.Categories....
{-# OPTIONS --copatterns #-} module SplitResult where open import Common.Product test : {A B : Set} (a : A) (b : B) → A × B test a b = {!!} testFun : {A B : Set} (a : A) (b : B) → A × B testFun = {!!}
-- | NOTE: This module can only represent file paths which are valid strings. -- On Linux, a file path may be an arbitrary sequence of bytes, but using anything -- except utf8 for file paths is a terrible idea. -- -- What should happen if we come across a non utf8 path from an untrusted source? -- crash -> denial-of-se...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.CommRing.Integers where open import Cubical.Foundations.Prelude open import Cubical.Algebra.CommRing open import Cubical.HITs.Ints.BiInvInt renaming ( _+_ to _+ℤ_; -_ to _-ℤ_; +-assoc to +ℤ-assoc; +-comm to +ℤ-comm ) BiInvI...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Prelude open import LibraBFT.Lemmas open import LibraBFT.B...
module Issue3080 where open import Agda.Builtin.Nat open import Agda.Builtin.Equality data Fin (m : Nat) : Set where fzero' : (n : Nat) (p : m ≡ suc n) → Fin m fsuc' : (n : Nat) (p : m ≡ suc n) (i : Fin n) → Fin m lift : (m : Nat) (i : Fin m) → Fin (suc m) lift m (fzero' n p) = {!p!} lift m (fsuc' n p i) = {!...
open import Relation.Binary.Core module InsertSort.Impl1.Correctness.Order {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Data.List open import Data.Sum open import InsertSort.Impl1 _≤_ tot≤ open import List.Sorted _≤_ lemma-insert-sorted : {xs : List A}(x : A...
------------------------------------------------------------------------ -- The Agda standard library -- -- Natural numbers represented in binary natively in Agda. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Nat.Binary where open import Data...
open import Common.Prelude open import Common.Reflection module TermSplicingLooping where mutual f : Set -> Set f = unquote (give (def (quote f) []))
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Properties.Setoids.Complete 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 ...
module Ints.Add.Assoc where open import Ints open import Nats renaming (suc to nsuc; _+_ to _:+:_) open import Nats.Add.Assoc open import Nats.Add.Comm open import Ints.Add.Comm open import Equality open import Function ------------------------------------------------------------------------ -- internal stuffs pr...
mutual data D : Set where c : R → D record R : Set where inductive field out : D open R f : D → {A : Set} → A f (c x) = f (out x) -- should termination check
{- Functions building DUARels on constant families -} {-# OPTIONS --safe #-} module Cubical.Displayed.Constant where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Displayed.Base open import Cubical.Displayed.Subst private variable ℓ ℓA ℓA' ℓP ℓ≅A ℓ≅A' ℓB ...
{-# OPTIONS --without-K #-} module sets.finite where open import sets.finite.core public
-- A Typed version of a subset of Landin's ISWIM from "The Next 700 Programming -- Languages" module ISWIM where data Nat : Set where zero : Nat suc : Nat -> Nat _+_ : Nat -> Nat -> Nat zero + m = m suc n + m = suc (n + m) {-# BUILTIN NATURAL Nat #-} {-# BUILTIN ZERO zero #-} {-# BUILTIN SUC suc #-}...
postulate P : {A : Set} → A → A → Set p : {A : Set} {x : A} → P x x q : {A : Set} (x : A) {y : A} → P x y → P x y A : Set record R (F : Set → Set) : Set₁ where field f₁ : (A → A) → F A → F A f₂ : P (f₁ (λ x → x)) (λ (x : F A) → x) open R ⦃ … ⦄ public instance r : R (λ O → O → O) r = record ...
{- Reflection-based tools for converting between iterated record types, particularly between record types and iterated Σ-types. See end of file for examples. -} {-# OPTIONS --cubical --no-exact-split --safe #-} module Cubical.Reflection.RecordEquiv where open import Cubical.Foundations.Prelude open import Cub...
module Oscar.Builtin.Nat where open import Agda.Builtin.Nat public using () renaming (Nat to ℕ; zero to ∅; suc to ↑_)
-- -- Created by Dependently-Typed Lambda Calculus on 2020-10-07 -- Isomorphism -- Author: dplaindoux -- {-# OPTIONS --without-K --no-sized-types --no-guardedness bbbbb#-} import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; cong; cong-app) open Eq.≡-Reasoning open import Data.Nat using (ℕ; ze...
------------------------------------------------------------------------------ -- Logical Theory of Constructions for PCF (LTC-PCF) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-unive...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor.Bifunctor module Categories.Diagram.Coend {o ℓ e o′ ℓ′ e′} {C : Category o ℓ e} {D : Category o′ ℓ′ e′} (F : Bifunctor (Category.op C) C D) where private module C = Category C module D = Category D open D open...
module Plus where data Nat : Set where zero : Nat suc : Nat -> Nat infixr 40 _+_ infix 10 _==_ _+_ : Nat -> Nat -> Nat zero + m = m suc n + m = suc (n + m) data _==_ (x, y : Nat) : Set where -- ... postulate refl : {n : Nat} -> n == n cong : (f : Nat -> Nat){n, m : Nat} -> n == m -> f n == f m plusZ...
open import Common.Prelude renaming (return to foo) main : IO Unit main = foo unit
-- There's something very strange going on with mutual and parameterised -- modules. Can't reproduce the bug... :( module Mutual where data True : Set where tt : True data False : Set where data _\/_ (A B : Set) : Set where inl : A -> A \/ B inr : B -> A \/ B swap : {A B : Set} -> A \/ B -> B \/ A swap (inl...
open import Agda.Builtin.Bool F : Bool → Set F true = Bool F _ = Bool
open import Relation.Binary.Core module BHeap.Height {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Bound.Lower A open import Bound.Lower.Order _≤_ open import BHeap _≤_ open import BHeap.Properties _≤_ open import Data.Nat renaming (_≤_ to _≤ₙ_) open import Da...
module Cats.Category.Constructions.Iso where open import Relation.Binary using (IsEquivalence ; Setoid) open import Level open import Cats.Category.Base open import Cats.Util.Conv import Relation.Binary.EqReasoning as EqReasoning import Cats.Category.Constructions.Epi as Epi import Cats.Category.Constructions.Mono ...
{-# OPTIONS --type-in-type #-} module Fusion where open import Data.Product renaming (proj₁ to ₁; proj₂ to ₂) hiding (map; zip) open import Relation.Binary.PropositionalEquality open import Data.Sum hiding (map) open import Data.Bool open import Data.Nat open import Data.Unit open import Data.Empty open import Funct...
------------------------------------------------------------------------ -- The Agda standard library -- -- Results concerning uniqueness of identity proofs, with axiom K ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Axiom.UniquenessOfIdentityProofs.Wi...
-- examples for termination checking mutual recursion module Mutual where data Odd : Set data Even : Set where zeroE : Even succE : Odd -> Even data Odd where succO : Even -> Odd addEO : Even -> Odd -> Odd addOO : Odd -> Odd -> Even addOO (succO x) y = succE (addEO x y) addEO zeroE y = y addEO (succE x) y ...
--{-# OPTIONS -v tc.pos:100 #-} open import Agda.Builtin.Equality data ⊥ : Set where postulate A : Set R : A → Set magic : ⊥ → A magic () test : (a : ⊥) → magic a ≡ magic _ test a = refl
module Main where {-# IMPORT System.IO #-} {-# IMPORT System.Environment #-} open import Base open import IO open import IO.File postulate getArgs : IO (List String) {-# COMPILED getArgs getArgs #-} _`bindIO`_ : {A B : Set} -> IO A -> (A -> IO B) -> IO B _`bindIO`_ = bindIO main : IO Unit main = getArgs `bindIO...
-- A term model à la Beth open import Library hiding (_∈_) module TermModel (Base : Set) where import Formulas ; open module Form = Formulas Base import Derivations; open module Der = Derivations Base -- Beth model data Cover (Δ : Cxt) : Set where idc : Cover Δ bot : (t : Δ ⊢ False) → Cover Δ node : ...
------------------------------------------------------------------------ -- Decoding types and subtypes into SK terms and equality ------------------------------------------------------------------------ {-# OPTIONS --safe --exact-split --without-K #-} module FOmegaInt.Undecidable.Decoding where open import Data.Lis...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.Groups.WedgeOfSpheres where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.Groups.Unit open import Cubical.ZCohomology.Groups.Sn open import Cubical.ZCohomology.Groups.Wedge op...
open import Agda.Builtin.Size mutual data Unit (i : Size) : Set where c : Unit′ i → Unit i record Unit′ (i : Size) : Set where coinductive field force : {j : Size< i} → Unit j open Unit′ public tail : Unit ∞ → Unit ∞ tail (c x) = force x u : (∀ {i} → Unit′ i → Unit i) → ∀ {i} → Unit i u ...
{-# OPTIONS --without-K --rewriting #-} open import HoTT -- custom pushout for Blakers-Massey module homotopy.blakersmassey.Pushout {i j k} {A : Type i} {B : Type j} (Q : A → B → Type k) where bmspan : Span {i} {j} {lmax i (lmax j k)} bmspan = span A B (Σ A λ a → Σ B λ b → Q a b) fst (fst ∘ snd) BMPushout : Type...
{-# OPTIONS --without-K --safe #-} -- The category build from ObjectRestriction can be done so Functorially module Categories.Functor.Construction.ObjectRestriction where open import Level open import Data.Product using (proj₁) open import Relation.Unary using (Pred) open import Function using () renaming (id to id→...
open import Data.Nat using (_+_; _*_; zero; suc; ℕ) open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; _≢_; refl; cong) import Data.Nat.Properties open Data.Nat.Properties.SemiringSolver using (solve; _:=_; con; var; _:+_; _:*_; :-_; _:-_) open PropEq.≡-Reasoning lem1 : (4 + 6 ≡ 10) lem1 = ref...
-- test for pattern matching on Strings module StringPattern where open import Common.IO open import Common.Unit open import Common.String f : String → String f "bla" = "found-bla" f x = x -- expected: -- no-bla -- found-bla main : IO Unit main = putStrLn (f "no-bla") ,, putStrLn (f "bla")
module Issue183 where postulate A : Set T : Set T = A → A data L (A : Set) : Set where data E (x : T) : T → Set where e : E x x foo : (f : A → A) → L (E f (λ x → f x)) foo = λ _ → e -- Previously: -- An internal error has occurred. Please report this as a bug. -- Location of the error: src/full/Agda/Syntax/Tra...
module Type.Proofs where open import Logic import Lvl open import Type