text
stringlengths
4
690k
module io where open import bool open import char open import list open import string open import unit ---------------------------------------------------------------------- -- datatypes ---------------------------------------------------------------------- postulate IO : Set → Set {-# COMPILED_TYPE IO IO #-} {-#...
import Relation.Binary.EqReasoning as EqReasoning open import SemiNearRingRecords module OrderLemmas (snro : SemiNearRing) where open SemiNearRing snro -- public open import CommAssocLemmas s _≃s_ _+s_ zers isCommMon using (assoc; comm) renaming (SA to Ss) open EqReasoning Ss monoPlusLeft : ∀ {a} {b} {c} →...
-- The ATP roles must to have at least an argument -- This error is detected by Syntax.Translation.ConcreteToAbstract. module ATPMissingArgument where {-# ATP axiom #-}
------------------------------------------------------------------------ -- The Agda standard library -- -- Inductive pointwise lifting of relations to vectors ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.Relation.Binary.Pointwise.Inductiv...
{- 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.Concrete.Obligations o...
{-# OPTIONS --without-K #-} module hott.equivalence.coind where open import level open import sum open import equality.core open import equality.calculus open import equality.reasoning open import function.core open import function.extensionality open import function.fibration open import function.isomorphism open imp...
module TestInt where open import PreludeInt open import PreludeShow mainS = showInt result where result = (mod (((int 2) + (int 2)) * (int 5)) (int 3))
------------------------------------------------------------------------------ -- Arithmetic properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPT...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.TLevel open import lib.types.Pi open import lib.types.Truncation -- This module is dedicated to [Trunc 0 (x == y)] module lib.types.PathSet where _=₀_ : ∀ {i} {A : Type i} → A → A → Type i _=₀_ x y = Trunc 0 (x == y) _=0_ : ∀ {i} {A : Type i}...
-- Issue #2791, reported by Ulf 2017-10-05 -- Reported fixed by Victor 2018-08-11 open import Agda.Builtin.Nat open import Agda.Builtin.Bool open import Agda.Builtin.Equality IF : Bool → Set → Set → Set IF true X Y = X IF false X Y = Y postulate F : (A : Set) (x : A) (B : Set) (y : B) → Set mutual ?b : Bool ...
{-# OPTIONS --safe #-} module Definition.Conversion.Decidable where open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Properties open import Definition.Conversion open import Definition.Conversion.Whnf open import Definition.Conversion.S...
{-# OPTIONS --erased-cubical #-} open import Agda.Builtin.Cubical.Glue open import Agda.Primitive open import Agda.Primitive.Cubical -- Glue must only be used in erased contexts when --erased-cubical is -- active. _ : SSet (lsuc lzero) _ = (φ : I) (A : Set) (B : Partial φ Set) (f : PartialP φ (λ x → B x ≃ A)) → ...
-- {-# OPTIONS -v tc.inj:100 #-} -- Andreas, 2012-11-06, issue raised by Guillaume Brunerie module Issue747 where data ℕ : Set where O : ℕ S : ℕ → ℕ record Σ (A : Set) (P : A → Set) : Set where field π₁ : A π₂ : P π₁ data _≡_ {A : Set} : A → A → Set where refl : (a : A) → a ≡ a is-contr : Set → Set ...
postulate A : Set
{-# OPTIONS --rewriting #-} module _ (R : Set) where {-# REWRITE R #-}
{-# OPTIONS --without-K #-} open import HoTT open import homotopy.elims.CofPushoutSection module homotopy.CofiberComp {i j k} {X : Ptd i} {Y : Ptd j} {Z : Ptd k} (f : fst (X ⊙→ Z)) (g : fst (Y ⊙→ Z)) where module CofiberComp where module H = ⊙WedgeRec f g ⊙h = H.⊙f; h = H.f module IntoCod = CofiberRec {f =...
-- Also works for parts of operators. module NotInScope where postulate X : Set if_then_else_ : X -> X -> X -> X x : X bad = if x thenn x else x
{-# OPTIONS --without-K --exact-split #-} module 19-fundamental-cover where import 18-circle open 18-circle public {- Section 12.1 Families over the circle -} Aut : { l1 : Level} → UU l1 → UU l1 Aut Y = Y ≃ Y Fam-circle : ( l1 : Level) → UU (lsuc l1) Fam-circle l1 = Σ (UU l1) Aut Eq-Fam-circle : { l1 : Leve...
module MLib.Algebra.PropertyCode.Structures where open import MLib.Prelude open import MLib.Finite open import MLib.Algebra.PropertyCode.RawStruct public open import MLib.Algebra.PropertyCode.Core public open import MLib.Algebra.PropertyCode public open import Relation.Binary as B using (Setoid) open import Data.Li...
-- MIT License -- Copyright (c) 2021 Luca Ciccone and Luca Padovani -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Software"), to deal in the Software without -- restriction, including without limitation the rights to use...
module TestsTransport where open import Function open import Data.Product open import Relation.Binary.PropositionalEquality as P open ≡-Reasoning open import Isomorphisms open import Tests Foo : (A : Set) → (T : Testable A) → (x y : A) → (φ : Test T) → Set Foo A T x y ⊤ = _⊨_ {A} {T} x ⊤ ≡ _⊨_ {A} {T} y ⊤ Fo...
------------------------------------------------------------------------------ -- Exclusive disjunction theorems ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-...
{-# OPTIONS --without-K --safe #-} open import Algebra.Structures.Bundles.Field module Algebra.Linear.Structures.VectorSpace {k ℓᵏ} (K : Field k ℓᵏ) where open import Algebra.FunctionProperties open import Relation.Binary using (Rel) open import Level using (_⊔_) open import Data.Nat using (ℕ) module VectorSpac...
-- Andreas, 2016-06-21 fixed context for a debug message {-# OPTIONS -v tc.section:10 #-} -- KEEP! to print debug message module _ {A : Set} where postulate B : Set module M {A : Set} where -- Intentional crash: fail : Set fail = Set -- Expected debug printout: -- checking section Issue2018debug {A = A₁ : Set} ...
module hello-agda where open import IO using (run; putStrLn) import Agda.Builtin.IO as Builtin using (IO) open import Data.Unit.Polymorphic.Base using (⊤) open import Agda.Primitive using (lzero) main : Builtin.IO {lzero} ⊤ main = run (putStrLn "Hello, Agda!")
module lambda.hw7 where open import Data.Product open import Relation.Nullary open import Relation.Nullary.Negation open import Relation.Binary.PropositionalEquality hiding (subst) open import Data.Nat open import Data.Fin hiding (lift) open import lambda.untyped open import lambda.vec open import lambda.system-f ren...
-- {-# OPTIONS --show-implicit --show-irrelevant #-} module Data.QuadTree.FunctorProofs.FunctorLaws where open import Haskell.Prelude renaming (zero to Z; suc to S) open import Data.Logic open import Data.QuadTree.InternalAgda open import Agda.Primitive open import Data.QuadTree.Implementation.Functors -- First, def...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module FOT.FOTC.Program.Mirror.StructurallySmaller.StructurallySmallerSL where open import Data.List data Tree (D : Set) : Set where tree : D →...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.NType2 open import lib.Equivalence2 open import lib.types.Unit open import lib.types.Nat open import lib.types.Pi open import lib.types.Sigma open import lib.types.Paths open import lib.types.TLevel open import lib.types.Truncation module ...
-- {-# OPTIONS -v tc.term.exlam:100 -v extendedlambda:100 -v int2abs.reifyterm:100 #-} -- Andreas, 2013-02-26 module Issue778 (Param : Set) where data ⊥ : Set where interactive : ⊥ → ⊥ interactive = λ {x → {!x!}} where aux : ⊥ → ⊥ aux x = x -- splitting did not work for extended lambda in the presence of -...
module Shift (Gnd : Set)(U : Set)(El : U -> Set) where open import Basics open import Pr open import Nom import Kind open Kind Gnd U El import Cxt open Cxt Kind import Loc open Loc Kind import Term open Term Gnd U El popH : {D : Cxt}{M : Loc}{S T : Kind} -> D [ M / Head ]- T -> D [ M * S / Head ]- T popH ( ` x...
-- Andreas, 2015-03-16 open import Common.Size open import Common.Prelude -- Note: the assumption of pred is absurd, -- but still should not make Agda loop. module _ (pred : ∀ i → Size< i) where data D (i : Size) : Set where wrap : (j : Size< i) → D i loop : ∀ i → D i → ⊥ loop i (wrap j) = loop j (wrap (pred j))...
{-# OPTIONS --without-K --safe #-} -- | Exclusive option for predicates module Dodo.Unary.XOpt where -- Stdlib imports open import Level using (Level) open import Relation.Unary using (Pred) -- Local imports open import Dodo.Nullary.XOpt -- # XOpt₂ XOptPred₂ : {a ℓ₁ ℓ₂ : Level} {A : Set a} → Pred A ℓ₁ → Pred A ℓ₂ ...
{-# OPTIONS --without-K --safe #-} module Math.NumberTheory.Product.Nat.Properties where open import Data.Nat.Properties open import Math.NumberTheory.Product.Generic.Properties -- TODO rename _≈_ to _≡_ open CommutativeMonoidProductProperties *-1-commutativeMonoid public
open import Prelude hiding (id; Bool) module Examples.Unification where data TC : Set where tc-int : TC tc-bool : TC _tc≟_ : (a b : TC) → Dec (a ≡ b) tc-int tc≟ tc-int = yes refl tc-int tc≟ tc-bool = no (λ ()) tc-bool tc≟ tc-int = no (λ ()) tc-bool tc≟ tc-bool = yes refl open import Implicits.Oliveira.Types TC ...
{-# OPTIONS --cubical-compatible #-} -- {-# OPTIONS -v tc.data:100 #-} module Issue865Big where data _≡_ (A : Set) : Set → Set₁ where refl : A ≡ A K : {A : Set} (P : A ≡ A → Set) → P refl → (p : A ≡ A) → P p K P h refl = h
------------------------------------------------------------------------ -- agda-combinatorics -- All modules ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module AgdaCombinatoricsEverything where import Math.BinomialTheorem.Generic -- Proof of the binom...
module Cats.Category.Constructions.Equalizer where open import Level open import Cats.Category.Base open import Cats.Util.Conv import Cats.Category.Constructions.Mono as Mono import Cats.Category.Constructions.Unique as Unique module Build {lo la l≈} (Cat : Category lo la l≈) where private open module Cat = Cat...
module DenotCommutes where open import Prelude open import T ---- Proof that dynamic semantics commute with denotational semantics module DenotCommutes where -- Proving that the dynamic semantics and the denotational semantics -- commute (at least if we are using regular equality as our -- equality for interp...
module Introduction.All where import Introduction.Basics import Introduction.Universes import Introduction.Unicode import Introduction.Built-in import Introduction.Modules import Introduction.Implicit import Introduction.Data.Vec import Introduction.Data.Empty import Introduction.Data.Parameterised import Introduction...
-- Andreas, 2011-09-11 module Issue392 where import Common.Irrelevance -- Create an irrelevant record R1 (all fields irrelevant). record R1 : Set1 where field .f1 : Set {- module R1 .(r : R1) where .f1 : Set -- = R1.f1 r -} -- Create an irrelevant instance f2 of R1. record R2 : Set2 where field .f2...
{-# OPTIONS --without-K --rewriting #-} {- Ribbon is an explicit covering space construction. This construction is given by Daniel Grayson, Favonia and Guillaume Brunerie together. -} open import HoTT -- A is the pointed base space. -- El is intended to be a (group-)set, module homotopy.RibbonCover {i : ULeve...
{-# OPTIONS --safe #-} -- --without-K #-} open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; cong) open import Function using (_∘_) import Data.Empty as Empty import Data.Product as Product import Data.Product.Properties as Productₚ import Data.Unit as Unit import Data.Nat as Nat import Data.Vec...
open import Functional hiding (Domain) import Structure.Logic.Classical.NaturalDeduction module Structure.Logic.Classical.SetTheory.ZFC {ℓₗ} {Formula} {ℓₘₗ} {Proof} {ℓₒ} {Domain} ⦃ classicLogic : _ ⦄ (_∈_ : Domain → Domain → Formula) where open Structure.Logic.Classical.NaturalDeduction.ClassicalLogic {ℓₗ} {Formu...
module Luau.RuntimeError where open import Agda.Builtin.Equality using (_≡_) open import Luau.Heap using (Heap; _[_]) open import FFI.Data.Maybe using (just; nothing) open import FFI.Data.String using (String) open import Luau.Syntax using (Block; Expr; nil; var; addr; block_is_end; _$_; local_←_; return; done; _∙_; n...
{-# OPTIONS --without-K --safe #-} module Cats.Category.Sets.Facts.Terminal where open import Data.Unit using (⊤) open import Level using (Lift ; lift ; lower) open import Relation.Binary.PropositionalEquality using (_≡_ ; refl) open import Cats.Category open import Cats.Category.Sets using (Sets) instance hasTer...
{-# OPTIONS -WUnknownFixityInMixfixDecl #-} data Nat : Set where zero : Nat suc : Nat → Nat _+_ : Nat → Nat → Nat zero + n = n (suc m) + n = suc (m + n) private _*_ : Nat → Nat → Nat zero * n = zero (suc m) * n = n + (m * n) data List (A : Set) : Set where [] : List A _∷_ : A → List A → List A fol...
------------------------------------------------------------------------ -- An implementation of tree sort, formally proved to return a -- permutation of the input ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality open import Prelude hidin...
{-# OPTIONS --universe-polymorphism #-} module Categories.Enriched where open import Categories.Category open import Categories.Monoidal -- moar
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.cubical.Square open import lib.types.Bool open import lib.types.Coproduct open import lib.types.FunctionSeq open import lib.types.Paths open import lib.types.Pointed open import lib.types.Span open import lib.types.Pushout open import lib.t...
-- Testing parameterised records in parameterised modules module Exist (X : Set) where data [_] (a : Set) : Set where [] : [ a ] _∷_ : a -> [ a ] -> [ a ] map : forall {a b} -> (a -> b) -> [ a ] -> [ b ] map f [] = [] map f (x ∷ xs) = f x ∷ map f xs record ∃ (a : Set) (P : a -> Set) : Set where field ...
{-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Rel; Setoid; IsEquivalence) module Structures {a ℓ} {A : Set a} -- The underlying set (_≈_ : Rel A ℓ) -- The underlying equality relation where open import Algebra.Core open import Level using (_⊔_) open import Data.Product using (_,_; pr...
-- Andreas, 2016-10-04, issue #2236 -- Result splitting should not insert hidden arguments visibly -- {-# OPTIONS -v interaction.case:100 #-} -- {-# OPTIONS -v tc.cover:100 #-} -- {-# OPTIONS -v reify.clause:100 #-} -- {-# OPTIONS -v reify.implicit:100 #-} splitMe : (A : Set) {B : Set} → Set splitMe = {!!} -- C-c C-...
{-# OPTIONS --without-K --exact-split --safe #-} open import Fragment.Algebra.Signature module Fragment.Algebra.Free.Base (Σ : Signature) where open import Fragment.Algebra.Algebra Σ open import Fragment.Algebra.Free.Atoms public open import Level using (Level; _⊔_) open import Function using (_∘_) open import Dat...
-- 2011-09-14 posted by Nisse -- Andreas: this failed since SubstHH for Telescopes was wrong. -- {-# OPTIONS --show-implicit -v tc.lhs.unify:15 #-} module Issue292-14 where data D : Set where d : D postulate T : D → D → Set data T′ (x y : D) : Set where c : T x y → T′ x y F : D → D → Set F x d = T′ x d -- bloc...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} {-# OPTIONS --type-in-type #-} -- Note: Using this module is discouraged unless absolutely necessary. -- Use `Data.Product` or `Data.Both` instead. module Light.Indexed where open import Light.Level using (Level) postulate ℓ : Level rec...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra.Group.Action 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.Structure open import Cubical.A...
{- This file contains: - Properties of set truncations -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.SetTruncation.Properties where open import Cubical.HITs.SetTruncation.Base open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Equiv open im...
{-# OPTIONS --without-K #-} open import Base open import Homotopy.TruncatedHIT open import Spaces.Spheres open import Integers module Sets.Quotient {i j} (A : Set i) ⦃ p : is-set A ⦄ (R : A → A → Set j) ⦃ q : (x y : A) → is-prop (R x y) ⦄ where private data _#/_ : Set (max i j) where #proj : A → _#/_ #t...
{-# OPTIONS --allow-unsolved-metas #-} -- When instantiating metas, we can't ignore variables occurring in -- irrelevant terms. If we do the irrelevant terms will become illformed -- (and we get __IMPOSSIBLE__s) -- For instance -- _42 := DontCare (Just (Var 0 [])) -- is a bad thing to do. In the example below we hit ...
module Categories.Support.Experimental where open import Relation.Binary.PropositionalEquality.TrustMe open import Categories.Support.PropositionalEquality ≣-relevant : ∀ {l} {A : Set l} {X Y : A} -> .(X ≣ Y) -> X ≣ Y ≣-relevant _ = trustMe private ≣-coe : ∀ {a} {A B : Set a} → (A ≣ B) -> A -> B ≣-coe ≣-refl a ...
{-# OPTIONS --without-K --safe #-} open import Polynomial.Parameters module Polynomial.NormalForm.Construction {a ℓ} (coeffs : RawCoeff a ℓ) where open import Relation.Nullary using (Dec; yes; no) open import Level using (lift; lower; _⊔_) open import Data.Unit using (...
-- Andreas, 2011-04-14 module UnificationUndecidedForNonStronglyRigidOccurrence where data Nat : Set where zero : Nat suc : Nat -> Nat data _≡_ {A : Set}(a : A) : A -> Set where refl : a ≡ a i : (f : Nat -> Nat)(n : Nat) -> n ≡ f n -> Nat i f n () -- this should fail, since n ≡ f n is not always empty, only i...
{-# OPTIONS --safe #-} module JVM.Compiler where open import JVM.Types open import JVM.Syntax.Instructions module _ 𝑭 where open import JVM.Compiler.Monad StackTy ⟨ 𝑭 ∣_↝_⟩ noop using (Compiler) public module _ {𝑭} where open import JVM.Compiler.Monad StackTy ⟨ 𝑭 ∣_↝_⟩ noop hiding (Compiler) public
open import Data.Nat open import Data.Nat.Properties open import Data.Bool open import Function.Base open import Data.Product -- Sizes are ordinals up to ω, i.e. naturals 𝕊 : Set 𝕊 = ℕ hat : 𝕊 → 𝕊 hat = suc -- Sized naturals and lists indexed by a size data SNat : (k : 𝕊) → Set where SZero : (k : 𝕊) → SNat...
module Impure.STLCRef.Welltyped where open import Prelude open import Data.Nat open import Data.Vec open import Data.List open import Data.Fin hiding (_<_) open import Extensions.List as L using () open import Impure.STLCRef.Syntax -- store typings World : Set World = List Type _⊢loc_∶_ : World → ℕ → Type → Set Σ ⊢...
module STLC.Coquand.Soundness where open import STLC.Coquand.Completeness public -------------------------------------------------------------------------------- -- Un⟦_⟧ postulate ⟦_⟧Un : ∀ {Γ Ξ A} → {ρ : Γ ⊩⋆ Ξ} → (M : Ξ ⊢ A) → Un⋆ ρ → Un (⟦ M ⟧ ρ) -- 𝒰⋆⟦_⟧ₛ postulate ...
{-# OPTIONS --safe #-} module Cubical.Algebra.Group where open import Cubical.Algebra.Group.Base public open import Cubical.Algebra.Group.Properties public open import Cubical.Algebra.Group.GroupPath public open import Cubical.Algebra.Group.DirProd public open import Cubical.Algebra.Group.Morphisms public open import ...
-- Andreas, 2020-04-15, issue #4586 -- Better error for invalid let pattern. import Agda.Builtin.Nat test : Set₁ test = let 13 = Set in Set -- WAS: -- Set != x of type Set₁ -- when checking that the given dot pattern Set matches the inferred -- value x -- EXPECTED: -- Not a valid let pattern -- when scope c...
------------------------------------------------------------------------ -- The Agda standard library -- -- A binary representation of natural numbers ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Bin where open import Data.Nat as Nat using ...
------------------------------------------------------------------------ -- A compiler ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} module Lambda.Simplified.Compiler where open import Equality.Propositional.Cubical open import Prelude open import V...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Groups.Groups open import Groups.Homomorphisms.Definition open import Groups.Definition open import Numbers.Naturals.Definition open import Numbers.Naturals.Order open import Setoids.Orders open import Setoids.Setoids open impor...
{-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module StructurallySmaller where data ℕ : Set where zero : ℕ succ : ℕ → ℕ _+_ : ℕ → ℕ → ℕ zero + n = n succ m + n = succ (m + n) -- Foo is...
{- In some cases you may want to block certain terms from being evaluated by Agda at compile time. I found I needed to do this when generating large terms intended for evaluation at run-time only. You can use the runtime-only function for this. If its first argument is tt, then we will use a postulate runtime...
------------------------------------------------------------------------ -- The Agda standard library -- -- Example showing how to define an indexed container ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe --guardedness #-} module README.Data.Container.Indexed whe...
{-# OPTIONS --safe --without-K #-} module Level where open import Agda.Primitive using (Level) renaming ( _⊔_ to _ℓ⊔_ ; lzero to ℓzero ; lsuc to ℓsuc ) public Type : (ℓ : Level) → Set (ℓsuc ℓ) Type ℓ = Set ℓ Type₀ = Type ℓzero Type₁ = Type (ℓsuc ℓzero) Type₂ = Type (ℓsuc (ℓsuc ℓzero)) T...
{-# OPTIONS --safe #-} module Cubical.Algebra.Group.DirProd where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Data.Sigma open import Cubical.Algebra.Group.Base open import Cubical.Algebra.Monoid open import Cubical.Algebra.Semigroup open GroupStr open IsGroup hi...
------------------------------------------------------------------------ -- The Agda standard library -- -- Bisimilarity for Conats ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} module Codata.Conat.Bisimilarity where open import Size open im...
{-# OPTIONS --without-K #-} open import Base module Homotopy.Pushout where open import Homotopy.PushoutDef public pushout-diag-flip : ∀ {i} → pushout-diag i → pushout-diag i pushout-diag-flip (diag A , B , C , f , g) = diag B , A , C , g , f pushout-flip : ∀ {i} {d : pushout-diag i} → pushout d → pushout (pushout-...
module Negative1 where data D : Set where lam : (D -> D) -> D
module FFI.Data.Text.Encoding where open import Agda.Builtin.String using (String) open import FFI.Data.ByteString using (ByteString) {-# FOREIGN GHC import qualified Data.Text.Encoding #-} postulate encodeUtf8 : String → ByteString {-# COMPILE GHC encodeUtf8 = Data.Text.Encoding.encodeUtf8 #-}
{-| A custom prelude -} module Eth.Prelude where import Prelude import Prelude.Bool -- using (bool) import Prelude.List -- using (intercalate) import Prelude.Monad -- using ((>=>)) import Control.Monad.Identity -- using import Control.Monad.Writer -- using -- (MonadWriter, WriterT, Writer, execWriterT, execWriter, te...
-- 2014-07-30 Andreas, issue reported by toporoskyy.y data Nat : Set where Zero : Nat Succ : Nat -> Nat boom : Nat -> Nat boom n@(Succ _) = Zero -- EXPECTED: -- Not supported: @-patterns -- when scope checking the left-hand side boom n@(Succ _) in the -- definition of boom
A : Set
open import Agda.Builtin.Nat open import Agda.Builtin.Bool open import Agda.Builtin.Equality F : Bool → Set F false = Bool F true = Nat f : ∀ b → F b → Nat f false false = 0 f false true = 1 f true x = 2 data D : Nat → Set where mkD : (b : Bool) (x : F b) → D (f b x) mutual ?X : Nat → Set ?X = _ ?b...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.Groups.Torus where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.Groups.Connected open import Cubical.ZCohomology.MayerVietorisUnreduced open import Cubical.ZCohomology.Groups...
------------------------------------------------------------------------------ -- Properties related with lists ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-}...
module Vec where data Nat : Set where zero : Nat suc : Nat -> Nat data Vec (A : Set) : Nat -> Set where ε : Vec A zero _►_ : {n : Nat} -> A -> Vec A n -> Vec A (suc n) vec : {A : Set}{n : Nat} -> A -> Vec A n vec {n = zero} x = ε vec {n = suc n} x = x ► vec x _<*>_ : {A B : Set}{n : Nat} -> Vec (A -> B...
module MisformedTypeSignature where postulate A : Set (f g) : A
------------------------------------------------------------------------ -- The Agda standard library -- -- Vectors defined as functions from a finite set to a type. ------------------------------------------------------------------------ -- This implementation is designed for reasoning about fixed-size -- vectors whe...
open import Type open import Logic.Classical as Logic using (Classical) open import Logic.Predicate as Logic using () module Formalization.ClassicalPropositionalLogic ⦃ classical : ∀{ℓ} → Logic.∀ₗ(Classical{ℓ}) ⦄ where import Lvl open import Data open import Data.Boolean import Data.Boolean.Operators open i...
open import Agda.Builtin.Nat [_] : (Nat → Set) → Set [ T ] = ∀ {i} → T i data D : Nat → Nat → Set where c : ∀ {i} → [ D i ]
open import Haskell.Prelude mutual data Map (k : Set) (a : Set) : Set where Bin : (sz : Nat) → (kx : k) → (x : a) → (l : Map k a) → (r : Map k a) → {{szVal : sz ≡ (size l) + (size r) + 1}} → Map k a Tip : Map k a {-# COMPILE AGDA2HS Map #-} size : {k a : Set} → Map k a → N...
{-# OPTIONS --cubical --no-import-sorts --guardedness --safe #-} module Cubical.Codata.M.AsLimit.Coalg.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function using ( _∘_ ) open import Cubical.Foundations.Transport open import Cubical.Foundations.Univalence open import Cubical.Foun...
module Contexts where open import Prelude open import T open import SubstTheory module Contexts where infix 60 _e$_ _$e_ -- Has a hole of type (Γ ⊢ A), produces a term of type (Γ' ⊢ A') data TCtx (Γ : Ctx) (A : TTp) : (Γ' : Ctx) → (A' : TTp) → Set where ∘ : TCtx Γ A Γ A _e$_ : ∀{Γ' A' B} (e₁ : TExp Γ' ...
------------------------------------------------------------------------ -- Specialised eliminators ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} module Partiality-monad.Inductive.Eliminators where open import Equality.Propositional open import Logic...
module x01naturals where {- ------------------------------------------------------------------------------ naturals : inductive datatype definition as a pair of inference rules: -- no assumptions --------- zero : ℕ -- base case m : ℕ -- assuming m is Natural --------- ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.Groups.Connected where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.Groups.Unit open import Cubical.Foundations.HLevels open import Cubical.Foundations.Prelude open import C...
{-# OPTIONS --without-K #-} module LeftCancellation where open import Data.Empty using (⊥; ⊥-elim) open import Data.Unit using (⊤; tt) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Product using (_,_; proj₁; proj₂) open import Function renaming (_∘_ to _○_) open import Relation.Binary.PropositionalE...
module maryjohn2 where postulate Person : Set postulate john : Person postulate mary : Person postulate barbara : Person postulate IsStudent : Person -> Set postulate maryIsStudent : IsStudent mary postulate implication : IsStudent mary -> IsStudent john Lemma1 : Set Lemma1 = IsS...