text
stringlengths
4
690k
module sn-calculus-compatconf where open import sn-calculus open import utility renaming (_U̬_ to _∪_) open import context-properties using (get-view ; ->E-view ; ->pot-view) open import sn-calculus-compatconf.eview using (1-steplρ-E-view) open import sn-calculus-compatconf.pot using (1-steplρ-pot) open import ...
------------------------------------------------------------------------ -- The Agda standard library -- -- An example of how Data.Fin.Substitution can be used: a definition -- of substitution for the untyped λ-calculus, along with some lemmas ------------------------------------------------------------------------ {-...
open import Agda.Builtin.Nat interleaved mutual plus : Nat → Nat → Nat mult : Nat → Nat → Nat -- base case mult 0 n = 0 plus 0 n = n -- inductive case. The fun clauses with an ellipsis belong to mult mult (suc m) n with mult m n ... | p with plus p n ... | q = q plus (suc m) n = suc (plus m n) ...
------------------------------------------------------------------------------ -- Testing some inductive predicates for inequalities ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-univ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Relation.Binary.Reasoning.Equality where open import Cubical.Core.Everything open import Cubical.Foundations.Prelude private variable ℓ : Level A : Type ℓ infixr 1 _≡⟨⟩_ _≡⟨_⟩_ _≡˘⟨_⟩_ infix 2 _∎ -- Step with a non-trivial propositional equ...
module Numeral.Natural.Relation where open import Data.Boolean.Stmt open import Numeral.Natural open import Numeral.Natural.Oper.Comparisons open import Logic.Propositional open import Logic import Lvl open import Relator.Equals open import Type Positive : ℕ → Stmt Positive(n) = IsTrue(positive? n) zero-not-pos...
{-# OPTIONS --without-K --safe #-} module Algebra.Linear.Structures.Bundles where open import Algebra open import Level using (Level; suc; _⊔_) open import Relation.Binary using (Rel; IsEquivalence) open import Algebra.FunctionProperties open import Algebra.Structures.Field open import Algebra.Structures.Bundles.Fie...
{-# 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 ...
open import Prelude module Implicits.Resolution.Finite.Algorithm where open import Induction.WellFounded open import Induction.Nat open import Data.Fin.Substitution open import Data.Nat.Base using (_<′_) open import Data.List.Any open Membership-≡ open import Implicits.Syntax open import Implicits.Syntax.Type.Unifica...
-- Check that unquoted functions are termination checked. module _ where open import Common.Prelude hiding (_>>=_) open import Common.Reflection `⊥ : Type `⊥ = def (quote ⊥) [] data Box : Set where box : ⊥ → Box unbox : Box → ⊥ unbox (box x) = x `Box : Type `Box = def (quote Box) [] {- Generate aux : Box au...
{-# OPTIONS --cubical --safe #-} module Issue3577 where open import Agda.Primitive.Cubical renaming (primTransp to transp; primHComp to hcomp) open import Agda.Builtin.Cubical.Path open import Agda.Builtin.Sigma open import Agda.Builtin.Cubical.Sub renaming (primSubOut to ouc; Sub to _[_↦_]) refl : ∀ {l} {A : Set l}...
postulate D : Set ∃ : (A : D → Set) → Set vx : D Q₂ : D → D → Set postulate foo : (∃ λ x → Q₂ vx x) → (∃ λ x → Q₂ vx x) {-# ATP prove foo #-} -- $ apia Bug.agda -- An internal error has occurred. Please report this as a bug. -- Location of the error: src/Apia/Utils/AgdaAPI/DeBruijn.hs:68
-- Internal hom in families module SOAS.Abstract.Hom {T : Set} where open import SOAS.Common open import SOAS.Construction.Structure open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core {T} open import SOAS.Families.Isomorphism open import SOAS.Families.BCCC open import SOAS.Construction...
module Data.Num where open import Data.Num.Core renaming ( carry to carry' ; carry-lower-bound to carry-lower-bound' ; carry-upper-bound to carry-upper-bound' ) open import Data.Num.Maximum open import Data.Num.Bounded open import Data.Num.Next open import Data.Num.Increment open import Data.Num....
module Prelude.List where open import Prelude.Nat open import Prelude.Bool open import Prelude.Maybe open import Prelude.Product open import Prelude.Empty open import Prelude.Function open import Prelude.Functor open import Prelude.Applicative open import Prelude.Monad open import Prelude.Decidable open import Prelud...
module Dave.Embedding where open import Dave.Functions open import Dave.Equality open import Dave.Isomorphism infix 0 _≲_ record _≲_ (A B : Set) : Set where field to : A → B from : B → A from∘to : ∀ (x : A) → from (to x) ≡ x open _≲_ ≲-refl ...
{-# OPTIONS --prop --without-K --rewriting #-} -- The phase distinction for extension. module Calf.PhaseDistinction where open import Calf.Prelude open import Calf.Metalanguage open import Relation.Binary.PropositionalEquality as P -- Extensional phase. postulate ext : Ω -- Open/extensional modality. ◯ : □ ...
module Data.List.At where open import Data.Nat open import Data.List open import Data.List.Relation.Unary.All hiding (map; lookup; _[_]=_) open import Data.List.Relation.Unary.Any hiding (map; lookup) open import Data.List.Membership.Propositional open import Data.List.Relation.Binary.Pointwise hiding (refl; map) open...
{-# OPTIONS --safe #-} module Cubical.Relation.Binary.Poset where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism open import Cubical.Foundations.Univalenc...
module Common where data PSet (A : Set) : Set where ⦃⦄ : PSet A _::_ : A -> PSet A -> PSet A data Pair (A : Set) : Set where <_,_> : A -> A -> Pair A data Bool : Set where true : Bool false : Bool neg : Bool -> Bool neg true = false neg false = true _&&_ : Bool -> Bool -> Bool true && true = true _ && _...
module Issue373 where data Nat : Set where zero : Nat suc : (n : Nat) → Nat {-# BUILTIN NATURAL Nat #-} {-# FOREIGN GHC data Nat = Zero | Suc Nat #-} {-# COMPILE GHC Nat = data Nat (Zero | Suc) #-} -- should fail when compiling
{-# OPTIONS --safe #-} module Cubical.Data.Fin.Recursive where open import Cubical.Data.Fin.Recursive.Base public open import Cubical.Data.Fin.Recursive.Properties public
module Issue591 where import Issue591.M
------------------------------------------------------------------------ -- The Agda standard library -- -- A categorical view of List ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Categorical where open import Category.Functor open impor...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Construction.Functors where -- the "Functor Category", often denoted [ C , D ] open import Level open import Data.Product using (_,_; proj₁; uncurry′) open import Categories.Category using (Category; _[_∘_]) open import Categories.Category.Equivalence usi...
{-# OPTIONS --without-K #-} data D : Set → Set₁ where c : (@0 A : Set) → D A
-- Laws for weakenings and substitutions. {-# OPTIONS --without-K --safe #-} module Definition.Untyped.Properties where open import Definition.Untyped open import Tools.Nat open import Tools.List open import Tools.PropositionalEquality hiding (subst) -- Weakening properties -- Two weakenings ρ and ρ′ are extensi...
module index where -- For a brief presentation of every single module, head over to import Everything -- Otherwise, here is an exhaustive, stern list of all the available modules.
------------------------------------------------------------------------ -- The Agda standard library -- -- The empty binary relation ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Binary.Construct.Never where open import Relation.Binary op...
module Section6 where open import Section5 public -- 6. Application to terms -- ======================= -- -- In practice we may not want to work with proof trees but rather well-typed terms. As an -- application of the results above we show how to give semantics to a formulation of Martin- -- Löf’s substitution ca...
{-# OPTIONS --cubical #-} module _ where module _ where import Agda.Primitive open import Agda.Primitive.Cubical public open import Agda.Builtin.Cubical.Path public refl : ∀ {a} {A : Set a} {x : A} → x ≡ x refl {x = x} = \ _ → x testPath : ∀ {A : Set} {b a : A} (let H : b ≡ b; H = _) → ∀ i → H i ≡ b testP...
{-# OPTIONS --cubical #-} module Type.Cubical where import Lvl open import Type open import Agda.Primitive public using (SSet) open import Agda.Primitive.Cubical public using () renaming (I to Interval) -- _ : SSet(Lvl.𝟎). Inhabitants can be seen as points on a closed unit interval. module Interval whe...
------------------------------------------------------------------------ -- INCREMENTAL λ-CALCULUS -- -- Incrementalization as term-to-term transformation (Fig. 4g). ------------------------------------------------------------------------ import Parametric.Syntax.Type as Type import Parametric.Syntax.Term as Term impo...
{- 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.Impl.OBM.Rust.RustTypes open import Util.ByteString mod...
{- Auxiliary functions for temporal operators. -} module TemporalOps.Common where open import TemporalOps.Common.Rewriting public open import TemporalOps.Common.Compare public open import TemporalOps.Common.Other public
open import Level open import Relation.Binary.PropositionalEquality open import Relation.Binary using (Setoid) import Function.Equality import Relation.Binary.Reasoning.Setoid as SetoidR import Categories.Category import Categories.Functor import Categories.NaturalTransformation import Categories.Category.Instance.Set...
module UntypingPairs where open import Relation.Binary.PropositionalEquality open import Function using (id) open import Data.Empty open import Data.Unit open import Relation.Nullary open import Data.Nat open import Data.Fin open import Data.Vec open import Data.Sum open import Data.Product open import Data.List open...
module UniDB.Morph.Reg where open import UniDB.Spec open import UniDB.Morph.WeakenPrime open import UniDB.Morph.ShiftsPrime -------------------------------------------------------------------------------- data Reg (T : STX) : MOR where baseR : {γ₁ γ₂ : Dom} (ξ : Weaken` γ₁ γ₂) → Reg T γ₁ γ₂ snocR : {γ₁ γ₂ : Dom...
------------------------------------------------------------------------ -- Not ------------------------------------------------------------------------ module TotalParserCombinators.Not where open import Axiom.Extensionality.Propositional open import Data.Bool open import Data.Empty open import Data.List open import...
module Issue1039 where open import Common.Level Test : ∀ {a b} → Set a → Set (a ⊔ b) → Set a Test X Y = X test : Set (lsuc lzero) test = Test Set (Set (lsuc lzero)) test₂ : ∀ {l} → Set (lsuc l) test₂ {l} = Test (Set l) (Set (lsuc l))
module Numeral.Natural.Function.Coprimalize where open import Data.Tuple open import Numeral.Natural open import Numeral.Natural.Function.GreatestCommonDivisor open import Numeral.Natural.Oper.FlooredDivision coprimalize : (ℕ ⨯ ℕ) → (ℕ ⨯ ℕ) coprimalize(x , y) = ((x ⌊/⌋₀ gcd(x)(y)) , (y ⌊/⌋₀ gcd(x)(y))) {- TODO: Mayb...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of n-ary products ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Vec.Recursive.Properties where open import Level using (Leve...
-- This is mostly based on the ``Dependently-typed Functional Programming'' -- lecture from Pierre-Evariste Dagand (17--18, MPRI). -- ref: https://gitlab.inria.fr/fpottier/mpri-2.4-public/ module lambda.stlc where open import Relation.Binary.PropositionalEquality open import Function hiding (id) open import Data.Prod...
{-# OPTIONS --without-K --safe #-} module Categories.Bicategory.Bigroupoid where open import Level open import Function using (_$_) open import Data.Product using (Σ; _,_) open import Categories.Category open import Categories.Category.Equivalence using (WeakInverse) open import Categories.Category.Product open impo...
{-# OPTIONS --guardedness #-} module Cubical.Codata.Stream where open import Cubical.Codata.Stream.Base public open import Cubical.Codata.Stream.Properties public
module Issue217 where record A : Set where ⊥ : Set ⊥ = ⊥
{-# OPTIONS --without-K --safe #-} module Categories.Adjoint.Instance.01-Truncation where -- The adjunction between (0,1)-truncation and the inclusion functor -- from Posets to Categories. open import Data.Product using (_,_) import Function open import Relation.Binary using (Poset) open import Relation.Binary.Order...
module SystemF.BigStep.Extrinsic.Welltyped where open import Prelude open import SystemF.BigStep.Types open import SystemF.BigStep.Extrinsic.Terms open import Data.List open import Extensions.List -- welltyped terms data _⊢_∶_ {n}(Γ : Ctx n) : Term → Type n → Set where unit : ------------------- Γ ⊢ unit ...
module AocVec where open import Data.Vec as Vec open import Data.Nat addToBack : {A : Set} → {N : ℕ} → A → Vec A N → Vec A (suc N) addToBack v [] = v ∷ [] addToBack v (x ∷ vs) = x ∷ addToBack v vs dupFrontToBack : {A : Set} → {N : ℕ} → Vec A (suc N) → Vec A (suc (suc N)) dupFrontToBack (x ∷ vs) = addToBack x (x ∷ vs)...
module _ where open import Agda.Primitive open import Agda.Builtin.Equality data Wrap {a} (A : Set a) : Set a where wrap : A → Wrap A data Unit (A : Set) : Set where unit : Unit A record Functor {a b} (F : Set a → Set b) : Set (lsuc (a ⊔ b)) where field fmap : ∀ {A B} → (A → B) → F A → F B open Functor ⦃...
module _ {A : Set} where postulate B : Set postulate H : {A : Set} → Set test-H : Set test-H = H {A = B} record R {A : Set} : Set where constructor rc field f : A test-R : Set test-R = R {A = B} test-f : ∀ B → R {A = B} → B test-f B = R.f {A = B} module N {A : Set} where module test-N = N {A = B}
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties related to Any ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Unary.Any.Properties where open import Category.M...
{-# OPTIONS --cumulativity --postfix-projections #-} open import Agda.Primitive open import Agda.Builtin.Nat open import Agda.Builtin.Equality variable ℓ ℓ₁ ℓ₂ ℓ₃ : Level A B C : Set ℓ x y z : A k l m n : Nat record Σ {ℓ} (A : Set ℓ) (B : A → Set ℓ) : Set ℓ where constructor _,_ field fst : A snd...
module Issue4435-2 where record ⊤ : Set where data Foo (a : Set) : Set where Bar : {a : Set} → Foo a → Set -- Here, the error message does NOT include -- "Perhaps you meant to write 'data Foo a where'" -- because Foo is defined above (rather than declared - note the "where" -- compared to Issue4435-1.agda). data Foo...
module PushArgument where open import Agda.Builtin.Nat data List (A : Set) : Nat -> Set where nil : List A 0 cons : {n : Nat} -> A -> List A n -> List A (suc n) newFunc : {A : Set} -> {B : Set} -> (f : A -> B) -> (x : A) -> B newFunc f x = f x map : {n : Nat} -> {A : Set} -> {B : Set} -> (A -> B) -> List A...
-- Andreas, 2016-07-28, issue #779 record R : Set1 where data Bla : Set where field F : Set -- WAS: -- Not a valid let-definition -- Expected: -- Success, or error outlawing pattern matching definition before last field.
------------------------------------------------------------------------ -- Examples related to Univalence-axiom.Isomorphism-is-equality.More ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- Note that this module uses ordinary propositional equality, with ...
{-# OPTIONS --rewriting --prop #-} open import common open import syntx open import derivability {- Helper functions to compute the arity of a rule given the arity of the symbol. -} SStoJS : SyntaxSort → JudgmentSort SStoJS Ty = Ty SStoJS Tm = Tm TArityArgs : SyntaxArityArgs → JudgmentArityArgs TArityArgs [] = [] ...
compose : ∀ {a b c} {A : Set a} {B : Set b} {C : Set c} → (B → C) → (A → B) → A → C compose f g x = f (g x)
module Generic.Lib.Data.String where open import Data.String.Base using (String) renaming (toList to toListˢ; _++_ to _++ˢ_) public open import Generic.Lib.Decidable import Data.String as String instance StringEq : Eq String StringEq = viaBase String._≟_
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Orders.Total.Definition open import Orders.Partial.Definition open import Setoids.Setoids open import Functions.Definition open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Setoids.Orders.Total.Definition where...
{-# OPTIONS --rewriting --confluence-check #-} open import Agda.Builtin.Equality open import Agda.Builtin.Equality.Rewrite postulate A : Set a : A record R : Set where constructor c field f : A open R postulate r : R rew₁ : ∀ x → c x ≡ r {-# REWRITE rew₁ #-} postulate g : A → A rew₂ : g (f r) ≡ a ...
------------------------------------------------------------------------------ -- Theorems which require a non-empty domain ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-poly...
{-# OPTIONS --cubical --no-import-sorts #-} module Number.Prelude.Int where open import Cubical.Data.Int public using ( Int ; fromNatInt ; fromNegInt ; sucInt ; predInt ; sucInt+ ; predInt+ ; _+pos_ ; _+negsuc_ ) renaming ( isSetInt to isSetℤ ; _-_ to infix 7 _-ᶻ_ ; _+_ to infix 5 ...
------------------------------------------------------------------------ -- A coinductive definition of weak similarity ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Labelled-transition-system module Similarity.Weak {ℓ} (lts : LTS ℓ) where open im...
module Implicits.Everything where -- common agda stdlib imports open import Prelude -- -- Oliveira's calculi in Agda -- -- We give a well-scoped version of Oliveira's ambiguous and deterministic -- resolution rules open import Implicits.Resolution.Ambiguous.Resolution open import Implicits.Resolution.Deterministic.R...
------------------------------------------------------------------------ -- The Agda standard library -- -- Operations on nullary relations (like negation and decidability) ------------------------------------------------------------------------ -- Some operations on/properties of nullary relations, i.e. sets. {-# OP...
{-# OPTIONS --cubical --safe #-} module DTLC.Base where open import Cubical.Foundations.Prelude hiding (Σ; _,_) open import Cubical.Foundations.Function -------------------------------------------------------------------------- -- Adapted from: Type Theory in Type Theory using Quotient Inductive Types -- ...
module Metalogic.Linear.Syntax {ℓₚ} (Proposition : Set(ℓₚ)) where import Lvl -- https://en.wikipedia.org/wiki/Linear_logic -- https://plato.stanford.edu/entries/logic-linear/#ProSys data Formula : Set(ℓₚ) where •_ : Proposition → Formula -- Top ⊤ : Formula -- Bottom ⊥ : Formula -- Classical conjunct...
{-# OPTIONS --erased-cubical --safe --no-sized-types --no-guardedness --no-subtyping #-} module Agda.Builtin.Cubical.Id where open import Agda.Primitive.Cubical open import Agda.Builtin.Cubical.Path open import Agda.Builtin.Cubical.Sub renaming (primSubOut to ouc; Sub to _[_↦_]) {-# BUILTIN ID ...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Properties.Neutral {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.Weakening op...
-- Intuitionistic propositional logic, PHOAS approach, final encoding module Pf.Ip where -- Types infixl 2 _&&_ infixl 1 _||_ infixr 0 _=>_ data Ty : Set where UNIT : Ty _=>_ : Ty -> Ty -> Ty _&&_ : Ty -> Ty -> Ty _||_ : Ty -> Ty -> Ty FALSE : Ty infixr 0 _<=>_ _<=>_ : Ty -> T...
-- Issue #2814 reported by tomjack on 2017-10-18 {-# OPTIONS --cubical --rewriting #-} -- prelude stolen from Saizan/cubical-demo open import Agda.Primitive.Cubical public postulate Path' : ∀ {ℓ} {A : Set ℓ} → A → A → Set ℓ PathP : ∀ {ℓ} (A : I → Set ℓ) → A i0 → A i1 → Set ℓ {-# BUILTIN PATHP ...
module LecIC where open import CS410-Prelude open import CS410-Nat _-:>_ : {I : Set}(S T : I -> Set) -> I -> Set (S -:> T) i = S i -> T i infixr 3 _-:>_ -- notation for indexed sets [_] : {I : Set}(X : I -> Set) -> Set [ X ] = forall {i} -> X i record MonadIx {W : Set}(F : (W -> Set) -> (W -> Set)) : Set1 where ...
data Bool : Set where true : Bool false : Bool data Nat : Set where suc : Nat -> Nat zer : Nat {-# BUILTIN NATURAL Nat #-} data Vec (A : Set) : (n : Nat) -> Set where _,_ : ∀ {n} -> A -> Vec A n -> Vec A (suc n) [] : Vec A zer data Sig (A : Set) (B : A → Set) : Set where sig : (a : A) → B a → Sig A B...
open import Type open import Structure.Relator open import Structure.Setoid renaming (_≡_ to _≡ₑ_) module Structure.Sets.ZFC {ℓₛ ℓₗ ℓₑ} {S : Type{ℓₛ}} ⦃ equiv : Equiv{ℓₑ}(S) ⦄ (_∈_ : S → S → Type{ℓₗ}) ⦃ [∈]-binaryRelator : BinaryRelator(_∈_) ⦄ where open import Functional open import Function.Equals import Lvl o...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties of general interleavings ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Relation.Ternary.Interleaving.Properties where o...
{-# OPTIONS --cubical --safe #-} module Lens.Definition where open import Prelude record LensPart (A : Type a) (B : Type b) : Type (a ℓ⊔ b) where constructor lens-part eta-equality field get : B set : B → A open LensPart public map-lens-part : LensPart A C → (A → B) → LensPart B C get (map-lens-part x...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Instance.Posets where -- The category of partially ordered sets and order-preserving maps. open import Level open import Relation.Binary using (Poset; IsEquivalence; _Preserves_⟶_) open import Relation.Binary.Morphism using (IsOrderHomomorphism) import Rel...
{- --- 3. Natural numbers --- -} {- 3.1 Definition -} data ℕ : Set where zero : ℕ suc : ℕ → ℕ {- 3.2 Addition -} _+_ : ℕ → ℕ → ℕ zero + n = n suc m + n = suc (m + n) {- 3.3 Multiplication -} _*_ : ℕ → ℕ → ℕ zero * b = zero suc a * b = b + (a * b) {- 3.4 Equality is a congruence for successor -} data _≡_ {A : Se...
------------------------------------------------------------------------ -- The Agda standard library -- -- Booleans ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Bool where open import Relation.Nullary open import Relation.Binary open import ...
{-# OPTIONS --copatterns #-} module TestsInstances where open import Function open import Data.Product open import Relation.Nullary using (Dec; yes; no; ¬_) open import Relation.Binary.PropositionalEquality as P open ≡-Reasoning open import Data.Empty renaming (⊥ to Empty) open import Data.Unit renaming (⊤ to One) ...
------------------------------------------------------------------------ -- The Agda standard library -- -- Decidable vector equality over propositional equality ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary open import Relation...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Integers.Definition module Numbers.Integers.Multiplication where infix 25 _*Z_ _*Z_ : ℤ → ℤ → ℤ nonneg x *Z nonneg y = nonneg (x *N y) nonneg zero *Z negSucc y = nonneg zero nonneg...
{-# OPTIONS --cubical --safe #-} open import Prelude open import Relation.Binary module Relation.Binary.Construct.Decision {a ℓ₁ ℓ₂} {A : Type a} (ord : TotalOrder A ℓ₁ ℓ₂) where open TotalOrder ord renaming (refl to ≤-refl) _<′_ : A → A → Type x <′ y = T (does (x <? y)) _≤′_ : A → A → Type x ≤′ y = T (not (...
{-# OPTIONS --without-K #-} open import HoTT open import cohomology.Exactness open import cohomology.FunctionOver {- Splitting Lemma - Left Split Assume an exact sequence: φ ψ G → H → K → 0 where H is abelian. If φ has a left inverse χ, then H == G × K. Over this path φ becomes th...
module Data.Real.Gauge where import Data.Rational open Data.Rational using (Rational) Gauge = Rational
{-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Rel; Setoid; IsEquivalence) module Quasigroup.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 usi...
{-# OPTIONS --without-K #-} open import HoTT open import homotopy.Freudenthal module homotopy.IterSuspensionStable where {- π (S k) (Ptd-Susp^ (S n) X) == π k (Ptd-Susp^ n X), where k = S k' Susp^Stable below assumes k ≠ O instead of taking k' as the argument -} module Susp^StableSucc {i} (X : Ptd i) (cX : is-con...
module RecordUpdatePreservesType where data ⊤ : Set where tt : ⊤ record R : Set where field a : ⊤ record Q : Set where field a : ⊤ old : R old = record { a = tt } new : Q new = record old { a = tt }
module Dave.Algebra.Naturals.Ordering where open import Dave.Algebra.Naturals.Definition public open import Dave.Algebra.Naturals.Addition public open import Dave.Algebra.Naturals.Multiplication public -- TO-DO: define relation data _≤_ : ℕ → ℕ → Set where z≤n : ∀ {n : ℕ} → zero ≤ n ...
{-# OPTIONS --type-in-type #-} open import Agda.Primitive using (Setω) -- No panic should be triggered data A : Setω where record B' : Set where field theA : A data B : Set where b : A → B data C : Set where c : Setω → C data C' : Setω where c : Setω → C' record C'' : Setω where field theSet...
module Issue160 where data Bool : Set where true : Bool false : Bool data _≡_ {A : Set}(x : A) : A → Set where refl : x ≡ x inj : ∀ {A} (f : A -> A) {a b : A} → f a ≡ f b -> a ≡ b inj f refl = refl absurd : true ≡ false absurd = inj (λ _ → true) refl
-- Shrunk version of examples/TT.agda -- Bug introduced by fix of issue 1560 {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS --no-termination-check #-} -- {-# OPTIONS --no-positivity-check #-} -- {-# OPTIONS -v tc.pos:10 #-} -- {-# OPTIONS -v tc.polarity:30 #-} data True : Set where tt : True data ⊥ : Set w...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Emptyrec {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed import Def...
-- Non-deterministic insert and permutation with choose oracle -- The module abstracts over the choice structure by importing it. open import bool module perm-keep-length (Choice : Set) (choose : Choice → 𝔹) (lchoice : Choice → Choice) (rchoice : Choice → Choice) where open import eq open import bool-thms ...
{-# OPTIONS --rewriting --allow-unsolved-metas #-} postulate C : Set D : Set → Set d₁ : (A : Set) → D A d₂ : (A : Set) → (C → D A) → D A E : (A : Set) → A → A → Set e₁ : (A : Set) (j₁ j₂ : C → D A) → ((c : C) → E (D A) (j₁ c) (j₂ c)) → (y : D A) → E (D A) (d₂ A j₁) y f : (A B ...
-- Andreas, 2017-11-14, issue #2849, reported by laMudri -- Internal error, regression introduced by new pattern Internal.AbsurdP {-# OPTIONS --allow-unsolved-metas #-} -- {-# OPTIONS -v tc.with.strip:30 #-} open import Agda.Builtin.Equality data ⊥ : Set where data Bool : Set where true false : Bool data P : B...
module Proj where open import AlonzoPrelude showTrue : True -> String showTrue _ = "tt" -- data True : Set where -- tt : True data T4 : Set where C : True -> True -> True -> True -> T4 g : True -> True -> True g x y = tt f14 : T4 -> True -> True f14 (C x y z t) = \w -> g x t mainS : String mainS = showTrue $ ...
-- {-# OPTIONS -v tc.polarity:10 -v tc.pos.args:10 #-} module UnsolvableLevelConstraintsInDataDef where open import Common.Equality data D : Set1 where abs : ∀ E → D ≡ E → (E → D) → D