text
stringlengths
4
690k
open import Nat open import Prelude open import core open import contexts open import progress open import preservation open import elaborability open import typed-elaboration module continuity where -- we take the sensibilty theorem as a postulate; for a proof, refer to -- the POPL17 mechanization. we also postu...
record R : Set₁ where X = Set Set -- should get error here field A : Set
{-# OPTIONS --erased-cubical #-} module Erased-cubical-Open-public.Erased (_ : Set₁) where postulate A : Set
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Coproduct open import lib.types.Fin open import lib.types.Int open import lib.types.Nat open import lib.types.Pi module lib.types.Group where -- 1-approximation of groups without higher coherence conditions. record GroupStructure {i...
module Cats.Category.Mon where open import Data.Unit using (⊀) open import Relation.Binary using (Setoid ; _Preservesβ‚‚_⟢_⟢_ ; IsEquivalence) open import Level open import Cats.Category open import Cats.Category.Setoids using (Setoids) open import Cats.Util.Conv import Cats.Util.Function as Fun record Monoid l lβ‰ˆ :...
module Prelude.Semiring where open import Agda.Builtin.Nat using (Nat; zero; suc) open import Prelude.Function record Semiring {a} (A : Set a) : Set a where infixl 6 _+_ infixl 7 _*_ field zro one : A _+_ _*_ : A β†’ A β†’ A open Semiring {{...}} public {-# DISPLAY Semiring.zro _ = zro #-} {-# DISPLAY Se...
-- There are no level literals in the concrete syntax. This file tests -- if type errors use level literals. {-# OPTIONS --universe-polymorphism #-} module LevelLiterals where open import Imports.Level data βŠ₯ : Set₁ where DoubleNegated : βˆ€ {β„“} β†’ Set β„“ β†’ Set DoubleNegated A = (A β†’ βŠ₯) β†’ βŠ₯
------------------------------------------------------------------------------ -- All the FOTC modules ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTI...
{-# OPTIONS --safe #-} module Data.Nat.AbsoluteDifference where open import Data.Nat.Base open import Path open import Prelude open import Algebra ∣_-_∣ : β„• β†’ β„• β†’ β„• ∣ 0 - m ∣ = m ∣ n@(suc _) - 0 ∣ = n ∣ suc n - suc m ∣ = ∣ n - m ∣ _ : ∣ 5 - 3 ∣ ≑ 2 _ = refl _ : ∣ 3 - 5 ∣ ≑ 2 _ = refl ∣-βˆ£β€Ώcomm ...
open import Agda.Primitive using (lzero; lsuc; _βŠ”_) open import Relation.Binary.PropositionalEquality using (_≑_; refl; sym; trans; cong; congβ‚‚; subst; setoid) open import Data.Product using (_Γ—_; Ξ£; _,_; proj₁; projβ‚‚; zip; map; <_,_>; swap) import Function.Equality open import Relation.Binary using (Setoid) import Rel...
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.CommRing.Instances.MultivariatePoly where open import Cubical.Foundations.Prelude open import Cubical.Data.Nat renaming(_+_ to _+n_; _Β·_ to _Β·n_) open import Cubical.Algebra.Ring open import Cubical.Algebra.CommRing open import Cubical.Al...
-- 2013-02-18 reported by rotsor module Issue796 where data U : Set where a b : U data A : Set where data B : Set where module Abs where abstract A' B' : Set A' = A B' = B module Conc where open Abs -- Andreas, 2013-02-19 -- this function should not be injective, since here -- it is not known w...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Functions.Involution where open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Prelude open import Cubical.Foundations.Univalence isInvolution : βˆ€{β„“} {A : Type β„“} β†’ (A β†’ A) β†’ Type _ isInvol...
open import Agda.Builtin.List foldr : {A B : Set} β†’ (A β†’ B β†’ B) β†’ B β†’ List A β†’ B foldr _βŠ•_ Ξ΅ [] = Ξ΅ foldr _βŠ•_ Ξ΅ (x ∷ xs) = x βŠ• foldr _βŠ•_ Ξ΅ xs infixr 5 _++_ _++_ : {A : Set} β†’ List A β†’ List A β†’ List A xs ++ ys = foldr _∷_ ys xs record R (F : Set β†’ Set) : Set₁ where field f : {A : Set} β†’ A β†’ F A β†’ F A o...
{-# OPTIONS --without-K #-} -- The core types behind exploration functions module Explore.Core where open import Level.NP open import Algebra open import Type hiding (β˜…) open import Function using (id; _∘_; _βˆ˜β€²_) open import Data.Nat.NP using (β„•) open import Data.Two using (𝟚) open import Data.Maybe.NP using (_β†’?_) o...
module L.Base.Nat.Core where -- Introducing Nat type with constructors zero and succ data Nat : Set where zero : Nat succ : Nat β†’ Nat -- Enabling the usage of numerals in code. {-# BUILTIN NATURAL Nat #-} ind : βˆ€{c} (C : Nat β†’ Set c) β†’ C zero β†’ ((x : Nat) β†’ C x β†’ C (succ x)) β†’ (n : Nat) β†’ C n ind C cβ‚’ cβ‚› ze...
module Load where data Bool : Set where tt : Bool ff : Bool
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Group.MorphismProperties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels op...
module WrongHidingInLHS where f : Set -> Set f {x} = x
------------------------------------------------------------------------ -- The Agda standard library -- -- Monads ------------------------------------------------------------------------ -- Note that currently the monad laws are not included here. {-# OPTIONS --without-K --safe #-} module Category.Monad where open...
{-# OPTIONS --without-K --safe #-} module Instance where open import Level it : βˆ€ {a} {A : Type a} β†’ ⦃ _ : A ⦄ β†’ A it ⦃ x ⦄ = x
-- Example, β„€ is an Euclidean Domain. Here all the properties needed -- are already proved in Data.Integer.Properties. However, we will -- prove there is another divmod pair such that the rank estimation -- is more precise, see EucDomain2.agda. {-# OPTIONS --without-K --safe #-} module Integer.EucDomain where -- i...
------------------------------------------------------------------------------ -- The gcd program is correct ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-...
module Structure.Operator.Monoid where import Lvl open import Logic open import Logic.Predicate open import Structure.Setoid open import Structure.Operator.Properties hiding (associativity ; identityβ‚— ; identityα΅£) open import Structure.Operator open import Type -- A type and a binary operator using this type is ...
module _ where open import Agda.Builtin.Equality postulate A : Set P : A β†’ Set data Id (A : Set) : Set where id : A β†’ Id A data Flat (@β™­ A : Set) : Set where con : (@β™­ x : A) β†’ Flat A counit : {@β™­ A : Set} β†’ Flat A β†’ A counit (con x) = x test2 : (@β™­ x : Id A) β†’ Flat A test2 (id x) = con x test3 : (@β™­ x :...
-- {-# OPTIONS -v 10 #-} -- {-# OPTIONS -v auto:100 #-} postulate A : Set X : Setβ‚‚ X = (P : Set₁) β†’ (A β†’ P) β†’ P foo : X β†’ X foo x P f = {!!} -- Invoke Agsy in the hole above. Result: -- -- Set != Set₁ -- when checking that the expression A has type Set₁ -- -- The error message points to A in the definition of X...
module sv20.assign2.Second where -- The solution for the second task starts in line 53 open import Data.Unit using (⊀; tt) open import Data.Product using (_Γ—_ ; βˆƒ) renaming (_,_ to ⟨_,_⟩) open import Relation.Nullary using (Β¬_) open import Data.Sum using (_⊎_; inj₁; injβ‚‚) open import Function using (_∘_) -- For the s...
module NatTactic where module _ where open import Agda.Builtin.Nat open import Agda.Builtin.List -- n .. 1 downFrom : Nat β†’ List Nat downFrom zero = [] downFrom (suc n) = suc n ∷ downFrom n module AgdaPreludeTest where open import Prelude open import Tactic.Nat -- All tactics ...
module Issue326 where open import Common.Prelude open import Common.MAlonzo using () -- see issue 561 postulate QName : Set printBool : Bool β†’ IO Unit {-# BUILTIN QNAME QName #-} {-# COMPILED printBool print #-} primitive primQNameEquality : QName β†’ QName β†’ Bool main : IO Unit main = printBool (primQNameEqual...
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- we use duality to prove properties about coequalizer module Categories.Diagram.Coequalizer.Properties {o β„“ e} (C : Category o β„“ e) where open Category C open import Categories.Diagram.Coequalizer C open import Categories.Morphism C open import Ca...
------------------------------------------------------------------------ -- A lookahead operator cannot be defined ------------------------------------------------------------------------ -- In "Parsing with First-Class Derivatives" BrachthΓ€user, Rendel and -- Ostermann state that "Lookahead and [...] cannot be expres...
------------------------------------------------------------------------------ -- Agda-Prop Library. -- Theorems of ⇔ connective. ------------------------------------------------------------------------------ open import Data.Nat using ( β„• ) module Data.PropFormula.Theorems.Biimplication ( n : β„• ) where ------------...
module Logic.ChainReasoning where module Mono where module Homogenous { A : Set } ( _==_ : A -> A -> Set ) (refl : (x : A) -> x == x) (trans : (x y z : A) -> x == y -> y == z -> x == z) where infix 2 chain>_ infixl 2 _===_ infix 3 _by_ chain>_ : (x : A) -> x == x chain> x...
{-# OPTIONS --without-K --no-pattern-matching #-} module Ch2-7 where open import Level hiding (lift) open import Ch2-1 open import Ch2-2 open import Ch2-3 open import Ch2-4 open import Ch2-5 open import Ch2-6 open import Data.Product open import Function using (id; _∘_) Definition-2-7-2-i : βˆ€ {a b} {A : Set a} {P...
-- In a mutual block, either all or none must have a MEASURE declaration. module _ where open import Common.Prelude mutual {-# MEASURE n #-} f : (n : Nat) β†’ Nat f zero = zero f (suc n) = g n {-# MEASURE n #-} g : (n : Nat) β†’ Nat g zero = zero g (suc n) = suc (f n)
{-# OPTIONS --without-K --safe #-} module README where -- Formalization for "Decidability of Conversion for Type Theory in Type Theory" -- Git repository: https://github.com/mr-ohman/logrel-mltt ------------------ -- INTRODUCTION -- ------------------ -- A minimal library necessary for formalization: -- Embedding...
{-# OPTIONS --without-K --rewriting #-} open import lib.Base open import lib.PathFunctor open import lib.PathGroupoid open import lib.path-seq.Reasoning module lib.path-seq.Ap where module _ {i j} {A : Type i} {B : Type j} (f : A β†’ B) where ap-seq : {a a' : A} β†’ a =-= a' β†’ f a =-= f a' ap-seq [] = [] ap-seq (...
{-# OPTIONS --without-K #-} --open import HoTT open import homotopy.3x3.PushoutPushout open import homotopy.3x3.Transpose import homotopy.3x3.To as To import homotopy.3x3.From as From open import homotopy.3x3.Common module homotopy.3x3.ToFrom2 {i} (d : Span^2 {i}) where open Span^2 d open M d hiding (Pushout^2) open...
open import Common open import Global open import Projection open import Local open import Data.Fin open import Data.Product open import Data.Vec open import Relation.Binary.PropositionalEquality n = 4 Role = Fin n p : Role p = zero q : Role q = suc zero r : Role r = suc (suc zero) s : Role s = suc (suc (suc zer...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Numbers.Integers.RingStructure.Ring open import Semirings.Definition open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition ...
module Data.Option where import Lvl open import Data open import Type private variable β„“ ℓ₁ β„“β‚‚ : Lvl.Level private variable T : Type{β„“} data Option (T : Type{β„“}) : Type{β„“} where None : Option(T) Some : T β†’ Option(T) elim : βˆ€{A : Type{ℓ₁}}{B : Option(A) β†’ Type{β„“β‚‚}} β†’ B(None) β†’ ((a : A) β†’ B(Some a)) β†’ ((o : ...
{-# OPTIONS --universe-polymorphism #-} module IDesc where --******************************************** -- Prelude --******************************************** -- Some preliminary stuffs, to avoid relying on the stdlib --**************** -- Universe polymorphism --**************** data Level : Set where ...
open import OutsideIn.Prelude open import OutsideIn.X module OutsideIn.Instantiations.Simple where open import Data.Fin hiding (_+_) data Type ( n : Set) : Set where funTy : Type n _Β·_ : Type n β†’ Type n β†’ Type n Var : n β†’ Type n private fmap-Ο„ : βˆ€ {a b} β†’ (a β†’ b) β†’ Type a β†’ Type b fmap...
{-# OPTIONS --without-K #-} module Library where open import Data.Product using ( Ξ£ ; Ξ£-syntax ; _Γ—_ ) public open import Function using () renaming ( id to Ξ»-id ; _∘_ to Ξ»-comp ; flip to Ξ»-flip ) public open import Level using ( Level ) renaming ( zero to β„“-zero ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Sublist-related properties ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Binary.Sublist.Propositional.Properties {a} {A ...
{-# OPTIONS --safe --warning=error --without-K #-} open import Numbers.ClassicalReals.RealField open import LogicalFormulae open import Setoids.Subset open import Setoids.Setoids open import Setoids.Orders.Partial.Definition open import Sets.EquivalenceRelations open import Rings.Orders.Partial.Definition open import ...
module SystemF.BigStep.Extrinsic where open import SystemF.BigStep.Types open import SystemF.BigStep.Extrinsic.Terms open import SystemF.BigStep.Extrinsic.Welltyped open import SystemF.BigStep.Extrinsic.Semantics
open import Nat open import Prelude open import contexts open import core open import canonical-value-forms module canonical-boxed-forms where canonical-boxed-forms-b : βˆ€{Ξ” d} β†’ Ξ” , βˆ… ⊒ d :: b β†’ d boxedval β†’ d == c canonical-boxed...
module Languages.FILL.Intermediate where open import Utils.HaskellTypes open import Languages.FILL.TypeSyntax {-# IMPORT Languages.FILL.Intermediate #-} data IPattern : Set where PTriv : IPattern PVar : String β†’ IPattern PTensor : IPattern β†’ IPattern β†’ IPattern PPar : IPattern β†’ IPattern β†’ IPattern {-# COMPI...
module BTree.Complete.Alternative {A : Set} where open import BTree {A} open import BTree.Equality {A} data _β‹—_ : BTree β†’ BTree β†’ Set where β‹—lf : (x : A) β†’ (node x leaf leaf) β‹— leaf β‹—nd : {l r l' r' : BTree} β†’ (x x' : A) β†’ l ≃ r β†’ l' ≃ r' ...
------------------------------------------------------------------------------ -- The types used by the mirror function ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorp...
-- Sometimes we can't infer a record type module InferRecordTypes-1 where bad = record { }
{-# OPTIONS --without-K --safe #-} open import Algebra.Structures.Bundles.Field module Algebra.Linear.Construct.Matrix.Square {k β„“} (K : Field k β„“) where open import Level using (_βŠ”_) open import Data.Nat using (β„•) open import Data.Fin open import Data.Product open import Algebra.Structures.Field.Utils K open i...
module Dave.Algebra.Naturals.Monus where open import Dave.Algebra.Naturals.Definition open import Dave.Algebra.Naturals.Addition _∸_ : β„• β†’ β„• β†’ β„• m ∸ zero = m zero ∸ suc n = zero suc m ∸ suc n = m ∸ n infixl 6 _∸_ ∸-zero : βˆ€ (n : β„•) β†’ 0 ∸ n ≑ 0 ∸-zero zero = refl ∸-zero (suc n)...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.CastPi {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed open import ...
-- Be afraid… Type as type Type {-# OPTIONS --type-in-type #-} {- Be really afraid: this module is a hack to give definitional equalities to β–Ή. This is done by introducing an 'evil' function called 'run' that should not appear in user code. Is this safe to do? This remains to be explored. By the same token we give a ...
module Prelude.Char where open import Prelude.Bool open import Prelude.Nat open import Prelude.Equality open import Prelude.Equality.Unsafe open import Prelude.Decidable open import Prelude.Function open import Prelude.Ord open import Agda.Builtin.Char open Agda.Builtin.Char public using (Char) isLower = primIsL...
{-# OPTIONS --without-K --safe #-} module Definition.Typed where open import Definition.Untyped hiding (_∷_) open import Tools.Fin open import Tools.Nat open import Tools.Product infixl 30 _βˆ™_ infix 30 Ξ β±Ό_β–Ή_ infix 30 Ξ£β±Ό_β–Ή_ infix 30 ⟦_⟧ⱼ_β–Ή_ private variable n m : Nat Ξ“ : Con Term n A B F : Term n ...
-- Binary coproducts {-# OPTIONS --safe #-} module Cubical.Categories.Limits.BinCoproduct where open import Cubical.Categories.Category.Base open import Cubical.Data.Sigma.Base open import Cubical.Foundations.HLevels open import Cubical.Foundations.Prelude open import Cubical.HITs.PropositionalTruncation.Base privat...
{-# OPTIONS --without-K --safe #-} -- Some properties of Restriction Categories -- The first few lemmas are from Cocket & Lack, Lemma 2.1 and 2.2 module Categories.Category.Restriction.Properties where open import Data.Product using (Ξ£; _,_) open import Level using (Level; _βŠ”_) open import Categories.Category.Core ...
------------------------------------------------------------------------ -- Lemmas about the initial bag index ------------------------------------------------------------------------ module TotalParserCombinators.InitialBag where open import Category.Monad open import Data.List import Data.List.Categorical open impo...
-- 2012-03-16 Andreas, fixing shift/reduce conflict introduced by record update module Issue549 where record M.R { A } : Set where -- gives: Not a valid identifier M.R -- If you remove the A, you get: Not a valid pattern -- since then it is parsed as a record update expression
open import Spire.Type module Spire.Denotational where ---------------------------------------------------------------------- data Term : Set β†’ Set₁ eval : {A : Set} β†’ Term A β†’ A ---------------------------------------------------------------------- data Term where {- Type introduction -} `βŠ₯ `⊀ `Bool `β„• `Desc `...
open import Coinduction using ( ∞ ; β™―_ ; β™­ ) open import Data.Product using ( _,_ ) open import FRP.LTL.ISet.Core using ( ISet ; M⟦_⟧ ; splitM⟦_⟧ ; ⟦_⟧ ; ⌈_βŒ‰ ; [_] ) open import FRP.LTL.ISet.Product using ( _∧_ ) open import FRP.LTL.ISet.Stateless using ( _β‡’_ ) open import FRP.LTL.Time.Bound using ( Time∞ ; fin ; +∞ ; ...
{- 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...
{- This file contains: - 3Γ—3 lemma for pushouts Written by: LoΓ―c Pujet, April 2019 -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.Pushout.Properties where open import Cubical.Core.Glue open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorp...
-- Andreas, 2016-01-03, issue reported by mechvel module _ where -- With hidden parameter, things work module Works0 {A : Set} where postulate P : (a : A) β†’ Set record Works (a : A) : Set where f : P a β†’ Set f p with p ... | _ = A -- With visible parameter, the error is triggered -- because it...
-- Andreas, 2015-06-11 {-# OPTIONS --copatterns #-} open import Common.Size module _ {C : Set} {R : C β†’ Set} where mutual record IO (i : Size) (A : Set) : Set where coinductive constructor delay field force : {j : Size< i} β†’ IO' j A data IO' (i : Size) (A : Set) : Set where do : (c : ...
module Test01 where hoge : {A : Set} β†’ A β†’ A hoge x = x open import Relation.Binary.PropositionalEquality as PropEq using (_≑_; subst) open import Function using (id) lemma1 : {X Y : Set} β†’ (X ≑ (X β†’ Y)) β†’ X lemma1 p rewrite p = (Ξ» x β†’ let f = subst id p x in f x) curry : {X Y : Set} β†’ (X ≑ (X β†’ Y)) β†’ Y curry p = (...
-- This demonstrates a known issue: -- The parser is not aware of strings, thus, -- a closing block comment delimiter inside a string -- is taken as a closing block comment delimiter. -- Without nested comments: {- This is commented-out. test = "A weird string with comment closing -} and other garbage @#$% that appea...
open import Function open import Relation.Nullary open import Relation.Binary hiding (_β‡’_) open import Relation.Binary.PropositionalEquality hiding ([_]) open import Data.Sum open import Data.Product delim : βˆ€ {Ξ± Ξ²} {A : Set Ξ±} {B : Dec A -> Set Ξ²} -> (d : Dec A) -> (βˆ€ x -> B (yes x)) -> (βˆ€ c -> B (no c)) -> B d...
open import Prelude open import core module lemmas-consistency where -- type consistency is symmetric ~sym : {t1 t2 : htyp} β†’ t1 ~ t2 β†’ t2 ~ t1 ~sym TCRefl = TCRefl ~sym TCHole1 = TCHole2 ~sym TCHole2 = TCHole1 ~sym (TCArr p1 p2) = TCArr (~sym p1) (~sym p2) -- type consistency isn't transitive not-tra...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lists defined in terms of Data.Star ------------------------------------------------------------------------ module Data.Star.List where open import Data.Star open import Data.Unit open import Relation.Binary.S...
open import Agda.Builtin.Sigma dup : βˆ€ {A : Set} β†’ A β†’ Ξ£ A Ξ» _ β†’ A dup x = x , x postulate A : Set module M {x : A} where y = x data X : Set where mkX : βˆ€ {x : A} β†’ let (_ , _) = dup x open M {x} in X
module MissingDefinition where T : Set -> Set
{-# OPTIONS --without-K #-} open import Base module Spaces.WedgeCircles {i} (A : Set i) where {- The idea is data wedge-circles : Set (suc i) where base : wedge-circles loops : A β†’ base ≑ base -} private data #wedge-circles : Set (suc i) where #base : #wedge-circles wedge-circles : Set (suc i) wedge-cir...
{-# OPTIONS --without-K --safe #-} open import Categories.Category -- we use duality to prove properties about coequalizer module Categories.Diagram.Coequalizer.Properties {o β„“ e} (C : Category o β„“ e) where open Category C open import Categories.Diagram.Coequalizer C using (Coequalizer; IsCoequalizer) open import C...
------------------------------------------------------------------------------ -- Properties related with lists using instances of the induction principle ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-}...
module plfa.part1.Bin where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≑_; refl; cong) open import Data.Nat using (β„•; zero; suc; _*_; _+_) open import Data.Nat.Properties using (+-suc) data Bin : Set where ⟨⟩ : Bin _O : Bin β†’ Bin _I : Bin β†’ Bin inc : Bin β†’ Bin inc ⟨⟩ = ⟨⟩ I inc (b O)...
module Oscar.Class.Equivalence where open import Oscar.Class.Reflexivity open import Oscar.Class.Symmetry open import Oscar.Class.Transitivity open import Oscar.Function open import Oscar.Level record Equivalence {a} {A : Set a} {β„“} (_≋_ : A β†’ A β†’ Set β„“) : Set (a βŠ” β„“) where field ⦃ β€²reflexivity ⦄ : Reflexivity...
module sv20.assign2.Second_old4 where open import Data.Bool as Bool using (Bool; true; false; T; _∨_; _∧_) --open import Relation.Nullary using (Β¬_) open import Data.Unit using (⊀; tt) open import Data.Empty using (βŠ₯; βŠ₯-elim) open import Data.Nat using (β„•; zero; suc; _+_; _*_) open import Level using (Level; _βŠ”_; 0β„“) ...
-- Andreas, 2018-05-11, issue #3049 reported by Ulf -- Positivity checker too optimistic about polarity of arguments -- beyond the formal function arity. -- Backwards-compatible version of the test case. -- {-# OPTIONS -v tc.pos.args:100 #-} module Issue3049 where data Bool : Set where true false : Bool T : Bool...
-- Andreas, 2012-10-20 module Issue481NonExistentModule where open import NonExistentModule Set -- test the error message and location
module Haskell.Prim.Traversable where open import Haskell.Prim open import Haskell.Prim.Applicative open import Haskell.Prim.Functor open import Haskell.Prim.Foldable open import Haskell.Prim.Monad open import Haskell.Prim.List open import Haskell.Prim.Maybe open import Haskell.Prim.Either open import Haskell.Prim.Tu...
open import Data.List using ( List ; [] ; _∷_ ) open import Data.List.Any using ( here ; there ) open import Data.Product using ( _,_ ; proj₁ ; projβ‚‚ ) open import Data.Sum using ( inj₁ ; injβ‚‚ ) open import Relation.Binary.PropositionalEquality using ( refl ; sym ; trans ; substβ‚‚ ) open import Relation.Unary using ( ...
module _ where module Test₁ where module A where infixl 0 _+_ data D : Set where β€’ : D _+_ : D β†’ D β†’ D module B where data D : Set where β€’ : D _+_ : D β†’ D β†’ D open A open B Foo : A.D Foo = β€’ + β€’ + β€’ module Testβ‚‚ where module A where data D : Set where...
postulate A : Set B : Set t : B data C : (b : B) β†’ Set foo : (b : B) β†’ C b β†’ B data C where c : (x : C t) β†’ C (foo t x) foo b x = {!x!}
module Syntax.Implication.Dependent where open import Functional using (id) open import Functional.Dependent import Lvl open import Type private variable ℓ₁ β„“β‚‚ ℓ₃ β„“β‚„ : Lvl.Level _β‡’-[_]_ : βˆ€(X : Type{ℓ₁}){Y : βˆ€{_ : X} β†’ Type{β„“β‚‚}}{Z : βˆ€{x : X}{_ : Y{x}} β†’ Type{ℓ₃}} β†’ (P : (x : X) β†’ Y{x}) β†’ (βˆ€{x : X} β†’ (y : Y{x}) ...
module Numeral.Natural.Oper where open import Numeral.Natural infixl 10010 _+_ infix 10010 _βˆ’β‚€_ _𝄩_ infixl 10020 _β‹…_ -- infix 10020 _/β‚€_ infixl 10030 _^_ -- TODO: It would require a great amount of work, but consider changing the induction to being on the left side instead of the right on _+_ and _β‹…_. It will the...
{-# OPTIONS --without-K #-} {- Here, truncations with propositional computational behaviour are defined. This lack of a definitional Ξ²-rule enabled us to talk about this notion inside type theory without truncations, albeit complicating setup and proofs. After definition and basic accessories concerning univ...
record _Γ—_ (A B : Set) : Set where no-eta-equality constructor _,_ field fst : A snd : B open _Γ—_ swap : βˆ€ {A B} β†’ A Γ— B β†’ B Γ— A swap (x , y) = y , x data _≑_ {A : Set} (x : A) : A β†’ Set where refl : x ≑ x -- This should fail since we don't have eta for _Γ—_. fails : βˆ€ {A B} (p : A Γ— B) β†’ swap p ≑ (...
-- Author: Makoto Takeyama module ParenDepTac where ---------------------------------------------------------------------- -- Preliminary ---------------------------------------------------------------------- infix 3 _≑_ data _≑_ {A : Set}(x : A) : A -> Set where refl : x ≑ x subst : {A : Set}(C : A -> Set){x y ...
{-# OPTIONS --rewriting #-} module Correctness where open import Convertibility public open import Semantics public {-# BUILTIN REWRITE _≑_ #-} {-# REWRITE idmonoβŠ©β‹† #-} -- TODO: Naming things. module _ {{_ : Model}} where ⟦_≔_⟧∈ : βˆ€ {C Ξ“ w} β†’ (i : C ∈ Ξ“) β†’ w βŸͺ Ξ“ βˆ– i ⊫ C ⟫ β†’ βˆ€ {A} β†’ A ∈ Ξ“ β†’ w βŸͺ Ξ“ βˆ– i ...
{-# OPTIONS --without-K --safe #-} module PiFracMemSem where open import Relation.Binary.Core open import Data.Empty open import Function open import Data.Nat open import Data.Nat.Properties open import Data.Fin as Fin using (Fin; zero; suc) open import Data.Vec open import Data.Vec.Relation.Unary.Any.Properties open ...
open import Common.Prelude open import Common.Equality open import Common.Reflection pattern _`+_ a b = def (quote _+_) (vArg a ∷ vArg b ∷ []) `_ : Term β†’ Term ` con c [] = con (quote Term.con) (vArg (lit (qname c)) ∷ vArg (con (quote []) []) ∷ []) ` _ = unknown -- Prevent quotation data WrapTerm : Set where...
-- Hilbert-style formalisation of closed syntax. -- Sequences of terms. module OldBasicILP.UntypedSyntax.ClosedHilbertSequential where open import OldBasicILP.UntypedSyntax.Common public -- Closed, untyped representations. data Rep : β„• β†’ Set where NIL : Rep zero MP : βˆ€ {n} β†’ Fin n β†’ Fin n β†’ Rep n β†’ Rep (s...
module Nat.Sum where open import Data.Nat open import Relation.Binary open import Relation.Binary.PropositionalEquality open DecTotalOrder decTotalOrder hiding (refl) +id : (n : β„•) β†’ n + zero ≑ n +id zero = refl +id (suc n) = cong suc (+id n) +assoc : (m n : β„•) β†’ m + suc n ≑ suc (m + n) +assoc zero n = refl +ass...
module CH where data β„• : Set where zero : β„• succ : β„• β†’ β„• infixl 6 _+_ _+_ : β„• β†’ β„• β†’ β„• zero + m = m (succ n) + m = succ (n + m) infix 4 _≑_ data _≑_ {A : Set} (x : A) : A β†’ Set where refl : x ≑ x {- t1 : {n : β„•} -> zero ≑ n t1 = refl -} data _==_ {A : Set} : A β†’ A β†’ Set where refl' : (a : A) β†’ a == ...
-- This is mainly a test of the quality of error messages for -- termination problems. module TerminationLambda where postulate Id : Set β†’ Set F : Set β†’ Set F = Ξ» A β†’ F (Id A)
module UniDB.Morph.Shifts where open import UniDB.Spec -------------------------------------------------------------------------------- data Shifts : MOR where refl : {Ξ³ : Dom} β†’ Shifts Ξ³ Ξ³ step : {γ₁ Ξ³β‚‚ : Dom} (ΞΎ : Shifts γ₁ Ξ³β‚‚) β†’ Shifts γ₁ (suc Ξ³β‚‚) skip : {γ₁ Ξ³β‚‚ : Dom} (ΞΎ : Shifts γ₁ Ξ³β‚‚) β†’ Shifts (suc γ₁) (...