text
stringlengths
4
690k
{- The naive, but incorrect, way to define the integers as a HIT. This file mainly contains a proof that IsoInt ≢ Int, and ends with a demonstration of how the same proof strategy fails for BiInvInt. -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.Ints.IsoInt.Base where open import Cubica...
-- Andreas, 2017-01-12, issue #2386 postulate F : ∀{a}{A : Set a} → A → A data Eq (A : Set) : (x y : F A) → Set where refl : (x : F A) → Eq A x x {-# BUILTIN EQUALITY Eq #-} -- Expected error: -- The type of BUILTIN EQUALITY must be a polymorphic relation -- when checking the pragma BUILTIN EQUALITY Eq
-- Andreas, 2015-08-27 Rewrite rules in parametrized modules are fine. -- Jesper, 2015-10-14 Semantics of rewrite rules in parametrized modules has -- changed (see issue 1652) -- Jesper, 2015-11-9 Rewrite rules in parametrized modules are now -- generalized to the top-context auto...
------------------------------------------------------------------------ -- Some examples ------------------------------------------------------------------------ module Contractive.Examples where open import Codata.Musical.Notation open import Codata.Musical.Stream open import Data.Nat open import Data.Nat.Propertie...
{-# OPTIONS --warning=error --safe --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Categories.Definition where record Category {a b : _} : Set (lsuc (a ⊔ b)) where field objects : Set a arrows : objects → objects → Set b id : (x : objects) →...
{-# OPTIONS --without-K --safe #-} -- The Simplex category Δ module Categories.Category.Instance.Simplex where open import Level using (0ℓ) open import Data.Product open import Data.Fin.Base using (Fin; zero; suc; _≤_; _<_; inject₁; punchIn) open import Data.Nat.Base using (ℕ; zero; suc; z≤n; s≤s) open import Functi...
-- Sums and cocartesian categories module CategoryTheory.BCCCs.Cocartesian where open import CategoryTheory.Categories open import Relation.Binary using (IsEquivalence) module _ {n} (ℂ : Category n) where open Category ℂ -- Initial object in a category record InitialObj : Set (lsuc n) where fi...
module BasicIPC.Metatheory.ClosedHilbert-TarskiGluedClosedHilbert where open import BasicIPC.Syntax.ClosedHilbert public open import BasicIPC.Semantics.TarskiGluedClosedHilbert public -- Internalisation of syntax as syntax representation in a particular model. module _ {{_ : Model}} where [_] : ∀ {A} → ⊢ A → [⊢] ...
-- Andreas, 2012-04-18 make sure with functions of irrelevant functions -- are also irrelevant module IrrelevantWith where import Common.Level open import Common.Irrelevance .unsq : ∀ {a}{A : Set a} → Squash A → A unsq sq with Set ... | _ = unsquash sq
{-# OPTIONS --safe #-} module Cubical.HITs.Rationals.HITQ.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Function open import Cubical.Relation.Nullary open import Cubical.Data.Int open import Cubical.Data.Nat as ℕ hiding (_·_) open import Cu...
{-# OPTIONS --cubical --safe --no-import-sorts #-} module Cubical.Data.Fin.Recursive where open import Cubical.Data.Fin.Recursive.Base public open import Cubical.Data.Fin.Recursive.Properties public
------------------------------------------------------------------------ -- A small definition of a dependently typed language, using the -- technique from McBride's "Outrageous but Meaningful Coincidences" ------------------------------------------------------------------------ {-# OPTIONS --type-in-type #-} -- The ...
{-# OPTIONS --safe --warning=error --without-K --guardedness #-} open import Setoids.Setoids open import Rings.Definition open import Rings.Lemmas open import Rings.Orders.Partial.Definition open import Rings.Orders.Total.Definition open import Groups.Definition open import Groups.Lemmas open import Fields.Fields open...
module Builtin.Reflection where open import Prelude hiding (abs) open import Prelude.Equality.Unsafe open import Builtin.Float open import Container.Traversable open import Control.Monad.Zero open import Agda.Builtin.Reflection as Builtin open Builtin public hiding ( primQNameEquality ; primQNameLess ...
-- Strict A is a datatype isomorphic to A, with constructor ! : A → Strict A -- Semantically it has no impact, but its constructor is strict, so it can be -- used to force evaluation of a term to whnf by pattern-matching. open import Data.Strict.Primitive using () module Data.Strict where open Data.Strict.Primitive ...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.Container.Relation.Unary.Any directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe --sized-types #-} mod...
{-# OPTIONS --without-K #-} module Invertibility where open import Size open import Codata.Delay renaming (length to dlength ; map to dmap ) open import Codata.Thunk using (Thunk ; force) open import Relation.Binary.PropositionalEquality open import Data.Vec.Relation.Unary.All using (All ; [] ; _∷_) open import Dat...
module Issue628 where data ℕ : Set where zero : ℕ suc : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} {-# BUILTIN SUC suc #-} {-# BUILTIN ZERO zero #-} data _≡_ {A : Set}(x : A) : A → Set where refl : x ≡ x data ⊥ : Set where 0≢1+n : ∀ {n} -> 0 ≡ suc n → ⊥ 0≢1+n () divSucAux : (k m n j : ℕ) -> ℕ divSucAux k m zero j = ...
open import IO using ( _>>_ ; putStr ; run ) module System.IO.Examples.HelloRaw where main = run (putStr "Hello, World\n")
module Examples.DivergingContext where open import Prelude 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 _tc≟_ open im...
-- Andreas, 2016-06-08 -- Better error message when case splitting is invoked in location -- where there is nothing to split record R : Set where field f : {!!} -- C-c C-c RET here gives: -- Cannot split here, as we are not in a function definition
module Numeral.Natural.Proofs where import Lvl open import Numeral.Natural open import Relator.Equals open import Relator.Equals.Proofs.Equiv open import Structure.Function open import Structure.Function.Domain private variable n : ℕ [𝐒]-not-0 : (𝐒(n) ≢ 𝟎) [𝐒]-not-0 () 𝐒-not-self : (𝐒(n) ≢ n) 𝐒-not-self () ...
open import Data.Graph module Data.Graph.Path.Finite {ℓᵥ ℓₑ} (g : FiniteGraph ℓᵥ ℓₑ) where open import Category.Monad open import Data.Bool as Bool open import Data.Graph.Path.Cut g hiding (_∈_) open import Data.List as List hiding (_∷ʳ_) open import Data.List.Any as Any open import Data.List.Any.Properties open impo...
-- Andreas, AIM XXXV, 2022-05-09, issue #5728 -- Give a proper error rather than crashing. test : Set test with Set ... -- This used to be an internal error. -- Expected error now: -- The right-hand side can only be omitted if there is an absurd -- pattern, () or {}, in the left-hand side.
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cohomology.Theory open import groups.Cokernel open import groups.Exactness open import groups.HomSequence open import groups.ExactSequence open import cw.CW module cw.cohomology.TipGrid {i} (OT : OrdinaryTheory i) (⊙skel : ⊙Skeleton {i} 1) (ac : ...
{-# OPTIONS --safe #-} module Cubical.Homotopy.Loopspace where open import Cubical.Core.Everything open import Cubical.Data.Nat open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.Foundations.HLevels open import Cubical.Foundations.GroupoidLaws open import Cubical.HIT...
------------------------------------------------------------------------ -- Fω with interval kinds ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} -- Author: Sandro Stucki -- Copyright (c) 2017-2021 EPFL -- The code in this repository contains an Agda mecha...
-- Check if sharing is properly used for evaluation. -- E.g. (\x -> putStrLn x; putStrLn x) (computeString) -- should only evaluate computeString once. -- Doing the evaluation twice should still yield the correct result, -- but will incur a performance penalty. -- MAlonzo: seems to use proper sharing for this example ...
open import Algebra open import Data.Product open import Data.Bool open import Data.List open import Data.List.Properties open import Relation.Binary.PropositionalEquality open import Function open import Data.Empty open import Relation.Nullary open import Relation.Nullary.Decidable module LM {A : Set} = Monoid (Data....
{-# OPTIONS --safe #-} module JVM.Syntax.Values where open import Data.Bool open import Data.Integer.Base open import Relation.Unary open import Relation.Ternary.Core open import Relation.Ternary.Structures open import Relation.Ternary.Structures.Syntax open import JVM.Types data Const : Ty → Set where null : ∀ {c...
{-# OPTIONS --type-in-type #-} -- Yeah, that's type-in-type. I'm a sissy, I want to use the stdlib, I -- don't want to reimplement ℕ, ⊤, etc. in Set1. module ILabel where open import Data.String open import Data.Empty open import Data.Unit open import Data.Product open import Data.Maybe open import Data.Nat open...
------------------------------------------------------------------------ -- Propositional equality ------------------------------------------------------------------------ module Relation.Binary.PropositionalEquality1 where open import Relation.Nullary open import Relation.Binary open import Relation.Binary.Propositi...
open import Data.Empty open import Data.List hiding ([_]) renaming (_∷_ to _∷ₗ_) open import Data.Maybe open import Data.Product open import Data.Sum open import Data.Unit open import AEff open import EffectAnnotations open import Preservation open import Progress open import Renamings open import Substitutions renami...
------------------------------------------------------------------------ -- The Agda standard library -- -- Substitutions ------------------------------------------------------------------------ -- Uses a variant of Conor McBride's technique from "Type-Preserving -- Renaming and Substitution". -- See Data.Fin.Substit...
module IORef where data Unit : Set where unit : Unit data Pair (A B : Set) : Set where pair : A -> B -> Pair A B fst : {A B : Set} -> Pair A B -> A fst (pair a b) = a snd : {A B : Set} -> Pair A B -> B snd (pair a b) = b data Nat : Set where zero : Nat suc : Nat -> Nat data Fin : N...
{-# OPTIONS --cubical --no-import-sorts --prop #-} module Utils where open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) open import Function.Base variable ℓ ℓ' ℓ'' : Level module Test where import Algebra.Properties.BooleanAlgebra open import Algebra.Bundles module _ (B...
------------------------------------------------------------------------ -- The Agda standard library -- -- Some code related to propositional equality that relies on the K -- rule ------------------------------------------------------------------------ {-# OPTIONS --with-K --safe #-} module Relation.Binary.Propositi...
{-# OPTIONS --without-K --exact-split #-} module 13-circle where import 12-univalence open 12-univalence public {- Section 11.1 The induction principle of the circle -} free-loops : { l1 : Level} (X : UU l1) → UU l1 free-loops X = Σ X (λ x → Id x x) base-free-loop : { l1 : Level} {X : UU l1} → free-loops X → X...
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-} module Cubical.Data.Fin.Literals where open import Agda.Builtin.Nat using (suc) open import Agda.Builtin.FromNat renaming (Number to HasFromNat) open import Cubical.Data.Fin.Base using (Fin; fromℕ≤) open import Cubical.Data.Nat.Order.Recursive ...
{- Diamond operator. -} module TemporalOps.Diamond.Functor where open import CategoryTheory.Categories open import CategoryTheory.Instances.Reactive open import CategoryTheory.Functor open import TemporalOps.Common open import TemporalOps.Next open import TemporalOps.Delay open import Data.Product -- Arbitrary dela...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.SmashProduct.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Pointed open import Cubical.Foundations.Isomorphism open import Cubical.HITs.Pushout.Base open import Cubical.Data.Unit open import Cubical.Data.Prod op...
module Issue616 where open import Common.Coinduction const : ∀ {a b}{A : Set a}{B : Set b} → A → B → A const x _ = x -- The recursive call should be ignored by the termination checker, -- since ♭ is a projection function and shouldn't store its implicit -- arguments. contrived : Set₁ contrived = ♭ {A = const _ cont...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Category.Cocomplete.Finitely module Categories.Category.Cocomplete.Finitely.Properties {o ℓ e} {C : Category o ℓ e} (finite : FinitelyCocomplete C) where open import Categories.Category.Duality C private module C = Category C...
------------------------------------------------------------------------ -- Some algebraic structures (not packed up with sets, operations, -- etc.) ------------------------------------------------------------------------ open import Relation.Binary module Algebra.Structures where import Algebra.FunctionProperties a...
-- Andreas, 2018-05-28, issue #3095, cannot make hidden shadowing variable visible -- Andreas, 2019-07-15, issue #3919, make hidden variable visible in par. module open import Agda.Builtin.Equality module _ (A : Set) where data Nat : Set where suc : {n : Nat} → Nat data IsSuc : Nat → Set where isSuc : ∀{n} → Is...
module PlfaInduction where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_ ; refl ; cong ; sym) open Eq.≡-Reasoning using (begin_ ; _≡⟨⟩_ ; _≡⟨_⟩_ ; _∎ ) open import Data.Nat using (ℕ ; zero ; suc ; _+_ ; _*_ ; _^_ ) +-assoc : ∀ (a b c : ℕ) → (a + b) + c ≡ a + (b + c) +-assoc zero b c = begin ...
------------------------------------------------------------------------------ -- Theorems which require a non-empty domain ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-poly...
------------------------------------------------------------------------ -- The Agda standard library -- -- Digits and digit expansions ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Digit where open import Data.Nat using (ℕ; zero; suc; pred; _...
------------------------------------------------------------------------ -- The Agda standard library -- -- A solver for proving that one list is a sublist of the other. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary using (DecSe...
postulate F : Set₁ → Set₁ record R : Set₁ where field f : F Set {-# COMPILE GHC F = \ _ -> () #-} {-# FOREIGN GHC data D = C () #-} {-# COMPILE GHC R = data D (C) #-}
{-# OPTIONS --cubical --safe --guardedness #-} module Data.PolyP.Types where open import Function hiding (_⟨_⟩_) open import Data.Sum open import Data.Sigma open import Level open import Data.Unit open import Data.Nat open import Data.Empty open import WellFounded open import Literals.Number open import Data.Fin.Inde...
------------------------------------------------------------------------ -- Extension The Agda standard library -- -- Properties of indexed binary relations ------------------------------------------------------------------------ module Relation.Binary.Indexed.Extra where open import Data.Product open import Data.Sum...
open import Relation.Binary.Core module Bound.Lower.Order.Properties {A : Set} (_≤_ : A → A → Set) (trans≤ : Transitive _≤_) where open import Bound.Lower A open import Bound.Lower.Order _≤_ transLeB : {a b c : Bound} → LeB a b → LeB b c → LeB a c transLeB lebx _ = lebx transLeB ...
------------------------------------------------------------------------------ -- The program to sort a list is correct ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorp...
module plfa.working.Naturals where data ℕ : Set where zero : ℕ suc : ℕ → ℕ seven : ℕ seven = suc(suc(suc(suc(suc(suc(suc(zero))))))) {-# BUILTIN NATURAL ℕ #-} import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Construction.Graphs where -- The "Underlying Graph" <-> "Free Category on a Graph" Adjunction. -- Lots of surprises here, of various level of surprisingness -- 1. The Free Category rises universe levels of arrows (and equivalences); the Underlying Graph do...
module bug where data True : Set where tt : True data Sigma (x : True) : Set where pair : True -> Sigma x postulate p : True T : True -> Sigma p -> Set T tt (pair _) = True postulate S : True -> Sigma p -> Set z : Sigma p z = pair p postulate build : (q : Sigma p) -> T p q -> True pz : T p z
module conversion where open import constants open import cedille-types open import ctxt open import free-vars open import rename open import subst open import syntax-util open import general-util open import type-util record unfolding : Set where constructor unfold field unfold-all : 𝔹 unfold-defs : 𝔹 ...
module IrrelevantModuleParameter1 (A : Set) .(a : A) where postulate P : A -> Set p : P a -- cannot use a here, because it is irrelevant
{-# OPTIONS --cubical --no-positivity-check --no-termination-check --allow-unsolved-metas #-} open import Prelude open import Algebra open import Algebra.Monus open import Relation.Binary open import Data.Maybe open import Data.List using (List; _∷_; []; foldr) module Control.Monad.HeapT.Sized {ℓ} (mon : CTMAPOM ...
-- 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 OscarPrelude where open import Prelude public renaming (_==_ to _≟_) -- TODO ask Agda to rename Eq._==_ to Eq._≟_ renaming (force to force!) -- needed by ∞Delay renaming (forceLemma to force!Lemma) _≢_ : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ x ≢ y = ¬ (x ≡ y) infix 0 _↔_ _↔_ : {ℓ¹ : Level} → Set ℓ¹ → {ℓ² :...
------------------------------------------------------------------------ -- The Agda standard library -- -- Semi-heterogeneous vector equality over setoids ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Data.Vec.Relation....
module IIRD where open import LF -- A code for an IIRD (captures both general and restricted IIRDs) -- I - index set -- D - return type of the recursive component -- E - generalised return type of the recursive component (including the index) -- for restricted IIRD E = D i for an external i -- and for gen...
{-# OPTIONS --without-K --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Conversion {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped open import Definition.Typed open import Definition.Typed.RedSteps open import Definition.Typed.Prop...
module Negative4 where data Empty : Set where data NSPos : Set where c : ((NSPos -> Empty) -> NSPos) -> NSPos
module Implicits.Syntax.Type.Constructors where open import Prelude open import Implicits.Syntax.Type open import Implicits.Substitutions open TypeSubst -- polymorphic identity tid : ∀ {n} → Type n tid = ∀' (simpl ((TVar zero) →' (TVar zero))) -- type of bools encoding tbool : Type 0 tbool = ∀' (simpl ((TVar zero) →...
{-# OPTIONS --without-K --rewriting #-} module Flat where open import lib.Basics open import Basics open import Bool open import lib.types.Bool open import lib.NType2 open import lib.Equivalence2 open import lib.types.Suspension open import lib.types.IteratedSuspension open import lib.types.Pushout ...
record _×_ (A B : Set) : Set where constructor _,_ field fst : A snd : B open _×_ infixr 1 _,_ _∩_ : {I : Set} → (I → Set) → (I → Set) → I → Set P ∩ Q = λ i → P i × Q i record Preorder : Set₁ where no-eta-equality field I : Set infix 4 _∈_ postulate Ty World Cxt : Set All : (P : Ty → Set) → Cx...
module Prelude.Vec where open import Prelude.Nat open import Prelude.Fin open import Prelude.Unit open import Prelude.List using (List ; [] ; _::_) infixr 40 _::_ data Vec (A : Set) : Nat -> Set where _::_ : forall {n} -> A -> Vec A n -> Vec A (S n) [] : Vec A Z infixr 30 _++_ _++_ : {A : Set}{m n : Nat} -> ...
{-# OPTIONS --without-K #-} module Fmmh where open import Data.List using (List) open import Pitch -- Reconstruction of "Functional Modelling of Musical Harmony" (ICFP 2011) -- using similar notation. Original code: -- https://github.com/chordify/HarmTrace-Base data Mode : Set where maj : Mode min : Mode data...
module muRec where open import Data.Nat open import Data.Sum open import Relation.Binary.PropositionalEquality as PE open import PropsAsTypes mutual record D (A : Set) : Set where coinductive field step : Dμ A data Dμ (A : Set) : Set where now : A → Dμ A later : D A → Dμ A open D publi...
{-# OPTIONS --safe #-} module Cubical.Algebra.CommAlgebra.Instances.FreeCommAlgebra where {- The free commutative algebra over a commutative ring, or in other words the ring of polynomials with coefficients in a given ring. Note that this is a constructive definition, which entails that polynomials cannot be r...
module Imports.Issue5357-B where import Imports.Issue5357-D
------------------------------------------------------------------------ -- The Agda standard library -- -- Reflection-based solver for monoid equalities ------------------------------------------------------------------------ -- -- This solver automates the construction of proofs of equivalences -- between monoid expr...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.HITs.SmashProduct where open import Cubical.HITs.SmashProduct.Base public -- open import Cubical.HITs.SmashProduct.Properties public
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor -- Street fibration, which is the version of fibration that respects the principle of equivalence. -- https://ncatlab.org/nlab/show/Grothendieck+fibration#StreetFibration module Categories.Functor.Fibration {o ℓ e o′ ℓ′ ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Homotopy.EilenbergSteenrod where {- This module contains the Eilenberg-Steenrod axioms for ordinary reduced cohomology theories with binary additivity. The axioms are based on the ones given in Cavallo's MSc thesis (https://www.cs.cmu.edu/~ecavallo/wor...
data D : Set → Set1 where c : (A B : Set) → D (A → B) test : (X : Set) → D X → Set test .(A → B) (c A B) = A -- this should crash Epic as long as A is considered forced in constructor c
postulate A : Set P : A → Set p : (a : A) → P a record R : Set where field a : A b : P _ b = p a test : A test = R.b
-- Andreas, 2014-09-23 -- Check fixity declarations also in new 'instance' block. module _ where postulate D : Set instance infixl 0 D Undeclared postulate d : D -- Should fail with error: -- Names out of scope in fixity declarations: Undeclared
------------------------------------------------------------------------------ -- Example using distributive laws on a binary operation via Agsy ------------------------------------------------------------------------------ {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS --exact-split #-} {-# OPTIO...
{-# OPTIONS --cubical --safe --no-import-sorts #-} module Cubical.Algebra.Algebra where open import Cubical.Algebra.Algebra.Base public
{-# OPTIONS --safe #-} module Definition.Conversion.FullReduction where open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definition.Typed.Weakening open ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 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.Base.Types import LibraBFT.Impl.Consensus.EpochMana...
{-# OPTIONS --type-in-type --guardedness-preserving-type-constructors #-} module Issue690b where open import Common.Coinduction data Rec (A : ∞ Set) : Set where fold : (x : ♭ A) → Rec A infixr 4 _,_ record Σ (A : Set) (B : A → Set) : Set where constructor _,_ field proj₁ : A proj₂ : B pro...
------------------------------------------------------------------------ -- The Agda standard library -- -- Core properties related to propositional list membership. -- -- This file is needed to break the cyclic dependency with the proof -- `Any-cong` in `Data.Any.Properties` which relies on `Any↔` in this -- file. ---...
module core where open import Data.Nat open import Data.Vec open import Data.Fin open import Data.String open import Data.Rational open import Data.Sum open import Data.Unit open import Binders.Var {- module ABTLearning where data View {univ : Set} (f : univ -> Set) (a : univ) : list univ -> Set where S...
{-# OPTIONS --without-K #-} open import HoTT hiding (_::_) module algebra.ReducedWord {i} (A : Type i) (dec : has-dec-eq A) where open import algebra.Word A is-reduced : Word → Type i is-reduced nil = Lift ⊤ is-reduced (x :: nil) = Lift ⊤ is-reduced (x :: y :: w) = is-reduce...
{-# OPTIONS --no-termination-check #-} ------------------------------------------------------------------------ -- Examples ------------------------------------------------------------------------ module RecursiveDescent.Coinductive.Examples where open import Data.List open import Data.Nat open import Data.Bool op...
-- The debug output should include the text "Termination checking -- mutual block MutId 0" once, not three times. {-# OPTIONS -vterm.mutual.id:40 #-} open import Agda.Builtin.Nat record R : Set₁ where field A : Set f0 : Nat → Nat f0 zero = zero f0 (suc n) = f0 n f1 : Nat → Nat f1 zero = zero ...
-- Andreas, 2013-11-07 -- Instance candidates are now considered modulo judgemental equality. module Issue899 where postulate A B : Set f : {{ x : A }} → B instance a : A instance a' : A a' = a test : B test = f {- The previous code fails with the following message: Resolve implicit argument _x_257 : ...
variable X : Set postulate foo : ∀ A -> X -- error at `src/full/Agda/TypeChecking/Monad/MetaVars.hs:98` -- expected: `{X : Set} -> _1 -> X` Y : Set bar : ∀ A -> Y -- normal `_1 -> Y` type with unsolved metavar
-- Andreas, 2012-09-15 -- Positive effects of making Agda recognize constant functions. -- Arguments to constant functions are ignored in definitional equality. {-# OPTIONS --copatterns #-} module NonvariantPolarity where open import Common.Equality data ⊥ : Set where record ⊤ : Set where constructor trivial data ...
{-# OPTIONS --cubical --safe --guardedness #-} module Issue3564-2 where open import Issue3564
-- Andreas, 2016-08-08, issue #2131 reported by Andrea {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS --show-irrelevant #-} -- {-# OPTIONS -v tc:25 #-} postulate A : Set P : (F : .(U : Set) → Set) → Set const : (X : Set) .(Y : Set) → Set const X Y = X works : (G : .(Z : Set) → Set) (p : P G) → P (λ V → ...
module Lec5 where open import Lec1Done open import Lec2Done open import Lec3Done data List (X : Set) : Set where -- BUILTIN insists on level polymorphism [] : List X _,-_ : (x : X)(xs : List X) -> List X {-# BUILTIN LIST List #-} {-# BUILTIN NIL [] #-} {-# BUILTIN CONS _,-_ #-} {-# COMPILE GHC List = data [] ...
open import Agda.Builtin.Size postulate X : Set P : X → Set Q : (x : X) → P x → Set data D (i : Size) : Set where c : D i f : (i : Size) → D i → X f i c = {!!} g : (x : X) (y : P x) → Q x y → Q x y g _ _ q = q h : (i : Size) (n : D i) → P (f i n) h _ c = {!!} k : (n : D ∞) → Q (f ∞ n) (h ∞ n) k _ = g _ (h...
{-# OPTIONS --without-K #-} module ConcretePermutation where import Level using (zero) open import Data.Nat using (ℕ; _+_; _*_) open import Data.Fin using (Fin; zero; suc; inject+; raise) open import Data.Sum using (_⊎_; inj₁; inj₂; [_,_]′) renaming (map to map⊎) open import Data.Product using (_×_; proj₁; proj₂;...
{- Reflection-based tools for converting between iterated record types, particularly between record types and iterated Σ-types. Currently requires eta equality. See end of file for examples. -} {-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-} module Cubical.Reflection.RecordEquiv where open...