text
stringlengths
4
690k
open import Nat open import Prelude open import core open import contexts open import lemmas-disjointness open import exchange -- this module contains all the proofs of different weakening structural -- properties that we use for the hypothetical judgements module weakening where mutual weaken-subst-Δ : ∀{Δ1 Δ2 ...
{-# OPTIONS --without-K --rewriting #-} module lib.Basics where open import lib.Base public open import lib.Equivalence public open import lib.Function public open import lib.Funext public open import lib.NType public open import lib.PathFunctor public open import lib.PathGroupoid public open import lib.PathOver pub...
open import Data.Product using ( ∃ ; _×_ ; _,_ ; proj₁ ; proj₂ ) open import Relation.Unary using ( _∈_ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; refl ; cong ) open import Web.Semantic.DL.ABox.Interp using ( Interp ; _,_ ; ⌊_⌋ ; ind ; _*_ ) open import Web.Semantic.DL.Signature using ( Signature...
module _ where record R : Set₁ where field overlap A : Set
{-# OPTIONS --without-K #-} open import HoTT.Base open import HoTT.Identity open import HoTT.Equivalence module HoTT.Identity.Sigma where open variables _=Σ_ : Σ A P → Σ A P → 𝒰 _ _=Σ_ {P = P} x y = Σ[ p ∶ x₁ == y₁ ] transport P p x₂ == y₂ where open Σ x renaming (pr₁ to x₁ ; pr₂ to x₂) open Σ y renaming (pr₁...
{-# OPTIONS --without-K #-} -- Some basic theorems on paths and path compositions. module hott.core.equality.theorems where open import hott.core -- The path refl is the left identity under path concatnation. refl∙p≡p : ∀ {ℓ} {A : Type ℓ} {x y : A} → ∀ (p : x ≡ y) → refl ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import LibraBFT.Prelude open import LibraBFT.Abstract.Types open import Li...
module LC.Subst where open import LC.Base open import LC.Subst.Var open import LC.Subst.Term open import LC.Subst.Term public using (lift) open import Data.Nat open import Data.Nat.Properties open import Relation.Nullary -------------------------------------------------------------------------------- -- substi...
open import Level hiding ( suc ; zero ) open import Algebra module Solvable {n m : Level} (G : Group n m ) where open import Data.Unit open import Function.Inverse as Inverse using (_↔_; Inverse; _InverseOf_) open import Function open import Data.Nat hiding (_⊔_) -- using (ℕ; suc; zero) open import Relation.Nullary op...
{- This file contains: - The equivalence "James X ≃ Ω Σ X" for any connected pointed type X. (KANG Rongji, Feb. 2022) -} {-# OPTIONS --safe #-} module Cubical.HITs.James.LoopSuspEquiv where open import Cubical.Foundations.Prelude open import Cubical.Foundations.GroupoidLaws open import Cubical.Foundations.Equi...
module _ (P : Set) where data ⊤ : Set where tt : ⊤ foo : ⊤ → Set foo tt = ⊤ bar : {{_ : ⊤}} → ⊤ bar {{tt}} = tt error : foo bar → ⊤ error tt = tt
{-# OPTIONS --sized-types --show-implicit #-} module SizedNat where open import Size data Nat : {size : Size} -> Set where zero : {size : Size} -> Nat {↑ size} suc : {size : Size} -> Nat {size} -> Nat {↑ size} -- subtraction is non size increasing sub : {size : Size} -> Nat {size} -> Nat {∞} -> Nat {size} sub...
module _ where open import Common.Prelude open import Common.Equality primitive primForce : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) → (∀ x → B x) → B x primForceLemma : ∀ {a b} {A : Set a} {B : A → Set b} (x : A) (f : ∀ x → B x) → primForce x f ≡ f x force = primForce forceLemma = primForceLemma seq :...
{-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everything open import Cubical.Foundations.HLevels module Cubical.Algebra.Semigroup.Construct.Right {ℓ} (Aˢ : hSet ℓ) where open import Cubical.Foundations.Prelude open import Cubical.Algebra.Semigroup import Cubical.Algebra.Magma.Construct...
module _ where abstract data Nat : Set where Zero : Nat Succ : Nat → Nat countDown : Nat → Nat countDown x with x ... | Zero = Zero ... | Succ n = countDown n
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Sigma open import lib.types.Group open import lib.types.CommutingSquare open import lib.groups.Homomorphism open import lib.groups.Isomorphism module lib.groups.CommutingSquare where -- A new type to keep the parameters. record Comm...
-- this is effectively a CM make file. it just includes all the files that -- exist in the directory in the right order so that one can check that -- everything compiles cleanly and has no unfilled holes -- data structures open import List open import Nat open import Prelude -- basic stuff: core definitions, etc open...
module consoleExamples.passwordCheckSimple where open import ConsoleLib open import Data.Bool.Base open import Data.Bool open import Data.String renaming (_==_ to _==str_) open import SizedIO.Base main : ConsoleProg main = run (GetLine >>= λ s → if s ==str "passwd" then WriteString "Success"...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Universe where open import Cubical.Data.Universe.Base public open import Cubical.Data.Universe.Properties public
{-# OPTIONS --without-K --safe #-} open import Categories.Bicategory using (Bicategory) -- A Pseudofunctor is a homomorphism of Bicategories -- Follow Bénabou's definition, which is basically that of a Functor -- Note that what is in nLab is an "exploded" version of the simpler version below module Categories.Pseudo...
module Tactic.Reflection.Replace where open import Prelude open import Container.Traversable open import Tactic.Reflection open import Tactic.Reflection.Equality {-# TERMINATING #-} _r[_/_] : Term → Term → Term → Term p r[ r / l ] = ifYes p == l then r else case p of λ { (var x ...
module Numeral.Natural.Relation.Order.Decidable where open import Functional open import Logic.IntroInstances open import Logic.Propositional.Theorems open import Numeral.Natural open import Numeral.Natural.Oper.Comparisons open import Numeral.Natural.Oper.Proofs open import Numeral.Natural.Relation.Order open import ...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Numbers.Naturals.Semiring open import Numbers.Naturals.Order open import Numbers.Naturals.Order.WellFounded open import Numbers.Naturals.Order.Lemmas open import Numbers.Integers.Definition open import Numbers.Integers.Integers ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Equivalences.PeifferGraphS2G 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.Univalence ...
------------------------------------------------------------------------------ -- Arithmetic properties (added for the Collatz function example) ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIO...
module OlderBasicILP.Direct.Translation where open import Common.Context public -- import OlderBasicILP.Direct.Hilbert.Sequential as HS import OlderBasicILP.Direct.Hilbert.Nested as HN import OlderBasicILP.Direct.Gentzen as G -- open HS using () renaming (_⊢×_ to HS⟨_⊢×_⟩ ; _⊢_ to HS⟨_⊢_⟩) public open HN using () re...
module Oscar.Class.Semifunctor where open import Oscar.Class.Semigroup open import Oscar.Class.Extensionality open import Oscar.Class.Preservativity open import Oscar.Function open import Oscar.Level open import Oscar.Relation record Semifunctor {𝔞₁} {𝔄₁ : Set 𝔞₁} {𝔰₁} {_►₁_ : 𝔄₁ → 𝔄₁ → Set 𝔰₁} (_◅₁_ : ...
module nform where open import Data.PropFormula (3) public open import Data.PropFormula.NormalForms 3 public open import Relation.Binary.PropositionalEquality using (_≡_; refl) p : PropFormula p = Var (# 0) q : PropFormula q = Var (# 1) r : PropFormula r = Var (# 2) φ : PropFormula φ = ¬ ((p ∧ (p ⊃ q)) ⊃ q) -- (p ...
{-# OPTIONS --universe-polymorphism #-} open import Categories.Category hiding (module Heterogeneous) open import Categories.Congruence module Categories.Arrow {o ℓ e} (C : Category o ℓ e) where open import Level open import Relation.Binary using (Rel) open import Data.Product using (_×_; _,_; map; zip) open Catego...
{-# OPTIONS --without-K --safe #-} module Data.Fin.Indexed.Base where open import Data.Nat using (ℕ; suc; zero) open import Agda.Builtin.Nat using (_<_) open import Level open import Data.Bool.Truth private variable n m : ℕ -- This is the more traditional definition of Fin, -- that you would usually find in Agda co...
module Data.Fin.Instance where open import Class.Equality open import Class.Traversable open import Data.Fin renaming (_≟_ to _≟F_) open import Data.Fin.Map instance Eq-Fin : ∀ {n} -> Eq (Fin n) Eq-Fin = record { _≟_ = _≟F_ } Traversable-Fin-Map : ∀ {a} {n} -> Traversable {a} (FinMap n) Traversable-Fin-Map =...
------------------------------------------------------------------------ -- Various properties ------------------------------------------------------------------------ {-# OPTIONS --erased-cubical --safe #-} module Delay-monad.Alternative.Properties where open import Equality.Propositional.Cubical open import Logica...
module BasicIPC.Metatheory.Hilbert-KripkeConcreteGluedImplicit where open import BasicIPC.Syntax.Hilbert public open import BasicIPC.Semantics.KripkeConcreteGluedImplicit public open ImplicitSyntax (_⊢_) (mono⊢) public -- Completeness with respect to a particular model. module _ {{_ : Model}} where reify : ∀ {A ...
{-# OPTIONS --allow-unsolved-metas #-} {- This is a copy of Sane, but building upon a rather different notion of permutation -} module Sane2 where import Data.Fin as F -- open import Data.Unit open import Data.Nat using (ℕ ; zero ; suc ; _+_ ; _>_ ) open import Data.Sum using (inj₁ ; inj₂ ; _⊎_) open import Data.Vec ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Categories.Functor.Properties where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function renaming (_∘_ to _◍_) open import Cubical.Foundations.GroupoidLaws using (lUnit; rUnit; assoc; cong-∙) open import Cubical.Categories.C...
------------------------------------------------------------------------ -- A comparison of the two alternative definitions of weak -- bisimilarity ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} module Bisimilarity.Weak.Alternative.Comparison where open import ...
module Examples.Type where open import Agda.Builtin.Equality using (_≡_; refl) open import FFI.Data.String using (_++_) open import Luau.Type using (nil; _∪_; _∩_; _⇒_) open import Luau.Type.ToString using (typeToString) ex1 : typeToString(nil) ≡ "nil" ex1 = refl ex2 : typeToString(nil ⇒ nil) ≡ "(nil) -> nil" ex2 = ...
module Sets.BoolSet {ℓ ℓₑ} where import Lvl open import Data.Boolean import Data.Boolean.Operators open Data.Boolean.Operators.Logic using (_⟶_ ; _⟵_) open Data.Boolean.Operators.Programming hiding (_==_) open import Data.Boolean.Stmt open import Data.Boolean.Proofs import Data.List as Lis...
-- 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 _ where open import Prelude open import Numeric.Nat.Prime 2^44+7 2^46+15 2^48+21 : Nat 2^44+7 = 17592186044423 2^46+15 = 70368744177679 2^48+21 = 281474976710677 main : IO ⊤ main = print $ isPrime! 2^48+21
{-# OPTIONS --without-K --safe #-} open import Relation.Binary using (Setoid) -- Lifts a setoid into a 1-groupoid module Categories.Category.Construction.0-Groupoid {c ℓ} e (S : Setoid c ℓ) where open import Level using (Lift) open import Data.Unit using (⊤) open import Function using (flip) open import Categori...
module MapTm where open import Prelude open import Star open import Modal open import Examples open import Lambda open Term eq⟶ : {ty : Set}(T : TyAlg ty){σ₁ σ₂ τ₁ τ₂ : ty} -> σ₁ == σ₂ -> τ₁ == τ₂ -> TyAlg._⟶_ T σ₁ τ₁ == TyAlg._⟶_ T σ₂ τ₂ eq⟶ T refl refl = refl mapTm : {ty₁ ty₂ : Set}{T₁ : TyAlg ty₁}{T₂ :...
open import Agda.Builtin.Reflection renaming (bindTC to _>>=_) open import Agda.Builtin.Sigma open import Agda.Builtin.List open import Agda.Builtin.Unit open import Agda.Builtin.Nat map : {A B : Set} → (A → B) → List A → List B map f [] = [] map f (x ∷ xs) = f x ∷ map f xs reverseAcc : {A : Set} → List A → List A → ...
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9. Copyright (c) 2020 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl -} open import Optics.All open import LibraBFT.Prelude open import LibraBFT.Hash o...
module Cats.Trans.Iso where open import Level using (_⊔_) open import Relation.Binary.PropositionalEquality using (_≡_ ; refl) open import Cats.Category.Base open import Cats.Functor using (Functor) open import Cats.Util.Simp using (simp!) open import Cats.Trans using (Trans ; component ; natural) import Cats.Catego...
------------------------------------------------------------------------ -- The Agda standard library -- -- Sums (disjoint unions) ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Sum.Base where open import Function using (_∘_; _-[_]-_ ; id) open...
------------------------------------------------------------------------------ -- Common FOL definitions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OP...
------------------------------------------------------------------------ -- "Equational" reasoning combinator setup ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} open import Prelude.Size open import Labelled-transition-system module Similarity.Equational-reas...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Precedes where -- Stdlib imports open import Level using (Level; _⊔_) open import Data.Product using (_×_; _,_) open import Relation.Nullary using (¬_) open import Relation.Unary using (Pred) open import Relation.Binary using (REL; Rel) open import Relation.Binary...
-- Copyright 2020 Frederik Zipp. All rights reserved. -- Use of this source code is governed by a BSD-style -- license that can be found in the LICENSE file. module GameOfLife where open import Data.Bool using (Bool; _∨_; if_then_else_) open import Data.Nat using (ℕ; suc; _+_; _<ᵇ_; _≡ᵇ_) open import Data.List using ...
module Structure.Function.Names where open import Function.Names open import Functional open import Logic open import Logic.Propositional open import Logic.Predicate import Lvl open import Structure.Setoid.Uniqueness open import Structure.Setoid open import Type private variable ℓₒ ℓₒ₁ ℓₒ₂ ℓₒ₃ ℓₒ₄ ℓₗ ℓₗ₁ ℓₗ₂ ℓₗ₃...
module Acc where data Acc ( A : Set ) ( Lt : A -> A -> Set) : A -> Set where acc : ( b : A ) -> ( ( a : A ) -> Lt a b -> Acc A Lt a ) -> ( Acc A Lt b ) data Nat : Set where zero : Nat succ : Nat -> Nat data Lt : Nat -> Nat -> Set where ltzero : ( x : Nat ) -> Lt zero (succ x) ltsucc...
{-# OPTIONS --safe #-} module JVM.Printer.Jasmin where open import Function open import Data.Nat open import Data.Integer open import Data.Nat.Show as NatShow open import Data.String as S using (String) open import Data.List as List open import JVM.Types open import JVM.Builtins sep : List (List String) → List Strin...
{-# OPTIONS --safe --no-guardedness #-} record Stream (A : Set) : Set where coinductive field head : A tail : Stream A open Stream repeat : ∀ {A} → A → Stream A repeat x .head = x repeat x .tail = repeat x
------------------------------------------------------------------------ -- An alternative backend ------------------------------------------------------------------------ -- Acknowledgements: -- -- • The use of parsing "processes" is based on implementation C from -- Koen Claessen's paper Parallel parsing processes...
{- 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.Hash open import Libra...
{-# OPTIONS --without-K --exact-split #-} module free-group where import 15-groups open 15-groups public {- We state the universal property of the free group on a set X -} precomp-universal-property-free-group : {l1 l2 l3 : Level} (X : UU-Set l1) (F : Group l2) (G : Group l3) (f : type-hom-Set X (set-Group F)) ...
------------------------------------------------------------------------------ -- Propositional logic theorems ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} ...
module Product where open import Base open import Category open import Unique open import Dual module Prod (ℂ : Cat) where private ℂ' = η-Cat ℂ open module C = Cat ℂ' open module U = Uniq ℂ' data _×_ (A B : Obj) : Set1 where prod : (AB : Obj) (π₀ : AB ─→ A) (π₁ : AB ─→ B) -> ((X : O...
{-# OPTIONS --without-K #-} module FinEquivPlusTimes 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 Data.Nat using (ℕ; zero; suc; _+_; _*_; _<_; _≤_; ≤-pred; _≥_; _≤?...
open import Data.Product using ( _×_ ; _,_ ; swap ) open import Relation.Nullary using ( ¬_ ) open import Web.Semantic.DL.ABox using ( ABox ; ε ; _,_ ; _∼_ ; _∈₁_ ; _∈₂_ ) open import Web.Semantic.DL.ABox.Model using ( _⊨a_ ) open import Web.Semantic.DL.Concept using ( Concept ; ⟨_⟩ ; ¬⟨_⟩ ; ⊤ ; ⊥ ; _⊔_ ; _⊓_ ; ∀[_]_...
module Ag02 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 : ∀ (m n p : ℕ) → (m + n) + p ≡ m + (n + p) +-assoc zero n p = begin (zero + n) + ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category.Core -- Kernel Pair - a Pullback of a morphism along itself -- https://ncatlab.org/nlab/show/kernel+pair module Categories.Diagram.KernelPair {o ℓ e} (𝒞 : Category o ℓ e) where open import Level open import Categories.Diagram.Pullback 𝒞 open Cate...
------------------------------------------------------------------------ -- Total recognisers based on the same principles as the parsers in -- TotalParserCombinators.Parser -- -- Nils Anders Danielsson ------------------------------------------------------------------------ -- Recognisers are less complicated than pa...
{- 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.Concrete.Records open import LibraBFT.Concrete.System op...
-- Andreas, 2016-07-28, issue #779 record R : Set1 where Bla : Set1 Bla with Set ... | _ = Set field F : Set -- Current error: -- Missing definition for Bla -- Expected: -- Success, or error outlawing pattern matching definition before last field.
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use -- Data.Vec.Relation.Unary.All.Properties directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data....
{-# OPTIONS --prop --without-K --rewriting #-} -- Theorems about noninterference. open import Calf.CostMonoid module Calf.Noninterference (costMonoid : CostMonoid) where open import Calf.Prelude open import Calf.Metalanguage open import Calf.Step costMonoid open import Calf.PhaseDistinction open import Calf.Types.E...
module Punctaffy.Hypersnippet.Hyperstack where open import Level using (Level; _⊔_) open import Punctaffy.Hypersnippet.Dim using (DimSys; dimLte) data DimList {n l : Level} : DimSys {n} {l} → Set (n ⊔ l) → Set (n ⊔ l) where makeDimList : {ds : DimSys} → {a : Set (n ⊔ l)} → (len : DimSys.Carrier ds) → ((i : DimSys....
module Tests where open import BasicFunctions open import TransportLemmas open import EquivalenceType open import QuasiinverseType open import QuasiinverseLemmas open import HLevelTypes open import HLevelLemmas open import UnivalenceAxiom open import CoproductIdentities equiv-is-inj : {ℓ₁ ℓ₂ :...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Library.Relation.Decidable where open import Light.Level using (Setω ; Level) open import Light.Variable.Levels open import Light.Variable.Sets open import Light.Library.Relation using (Base ; Kind ; Style) open import Light....
{- 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 open import LibraBFT.ImplShared.Base.Types op...
{-# OPTIONS --without-K #-} module Pi0Cat where -- Proving that Pi at level 0 symmetric rig groupoid open import Level using () renaming (zero to lzero) open import Data.Unit using (tt) open import Data.Product using (_,_) open import Categories.Category using (Category) open import Categories.Groupoid using (Group...
open import Coinduction using ( ∞ ; ♭ ; ♯_ ) open import Relation.Binary.PropositionalEquality using ( _≡_ ; _≢_ ; refl ) open import Relation.Nullary using ( Dec ; yes ; no ) open import System.IO.Transducers.Session using ( Session ; I ; Σ ; Γ ; _/_ ; IsI ) module System.IO.Transducers.Trace where infixr 4 _≤_ _⊑_ ...
{-# OPTIONS --without-K --safe #-} open import Categories.Category {- Definition of SubCategory of a given Category C. Here a SubCategory is defined via - an index set I - a mapping I → Obj (not necessarily injective) - a proof (as a unary relation) that for all a, b : A, all arrows U a ⇒ U b belong to the Su...
import Structure.Logic.Classical.NaturalDeduction module Structure.Logic.Classical.SetTheory.Relation {ℓₗ} {Formula} {ℓₘₗ} {Proof} {ℓₒ} {Domain} ⦃ classicLogic : _ ⦄ (_∈_ : Domain → Domain → Formula) where open Structure.Logic.Classical.NaturalDeduction.ClassicalLogic {ℓₗ} {Formula} {ℓₘₗ} {Proof} {ℓₒ} {Domain} (classi...
{-# OPTIONS --sized-types #-} module FormalLanguage.Equals{ℓ} where import Lvl open import FormalLanguage open import Lang.Size open import Logic.Propositional open import Relator.Equals using ([≡]-intro) renaming (_≡_ to _≡ₑ_) open import Relator.Equals.Proofs import Structure.Relator.Names as Names open i...
open import Agda.Primitive module Experimental.Equality where data _≡_ {ℓ} {A : Set ℓ} : A → A → Set ℓ where refl : ∀ {x : A} → x ≡ x sym : ∀ {ℓ} {A : Set ℓ} {x y : A} → x ≡ y → y ≡ x sym refl = refl tran : ∀ {ℓ} {A : Set ℓ} {x y z : A} → x ≡ y → y ≡ z → x ≡ z tran refl q = q ap : ∀ {ℓ k} {A : Set ...
module Generic.Test.Data.Maybe where open import Generic.Main as Main hiding (Maybe; just; nothing) Maybe : ∀ {α} -> Set α -> Set α Maybe = readData Main.Maybe pattern nothing = #₀ lrefl pattern just x = !#₁ (relv x , lrefl) just′ : ∀ {α} {A : Set α} -> A -> Maybe A just′ = just nothing′ : ∀ {α} {A : Set α} -> Ma...
-- -- Formalize correctness of differentiation for the source calculus in the -- static caching paper (typed version). -- module Thesis.ANormal where open import Thesis.Types public open import Thesis.Contexts public open import Relation.Binary.PropositionalEquality data Term (Γ : Context) (τ : Type) : Set where ...
{-# OPTIONS --safe --without-K #-} -- The category of group objects with a cartesian category open import Categories.Category open import Categories.Category.Cartesian module Categories.Category.Construction.Groups {o ℓ e} {𝒞 : Category o ℓ e} (C : Cartesian 𝒞) where open import Level open import Categories.Cate...
------------------------------------------------------------------------ -- Parallel reduction in pure type systems (PTS) ------------------------------------------------------------------------ module Pts.Reduction.Parallel where open import Data.Fin using (Fin) open import Data.Fin.Substitution open import Data.Fin...
------------------------------------------------------------------------ -- Safe modules that use --with-K ------------------------------------------------------------------------ {-# OPTIONS --safe --with-K #-} module README.Safe.With-K where -- Some theory of Erased, developed using the K rule and propositional --...
------------------------------------------------------------------------ -- Full β-reduction in pure type systems (PTS) ------------------------------------------------------------------------ module Pts.Reduction.Full where open import Data.Fin.Substitution open import Data.Fin.Substitution.ExtraLemmas open import D...
module Issue2447.Operator-error where import Issue2447.M _+_ : Set → Set → Set A + _ = A F : Set → Set F A = A + A + A
open import Agda.Builtin.Unit open import Agda.Builtin.Bool open import Agda.Builtin.Nat renaming (_<_ to natLessThan) open import Agda.Builtin.Int _<_ : Int -> Int -> Bool _<_ = \ where (pos m) (pos n) -> natLessThan m n (negsuc m) (negsuc n) -> natLessThan n m (negsuc _) (pos _) -> true (pos _) (negsuc _) -...
-- Verify that issue 3415 has been fixed by checking that the -- computation rule for univalence holds up to a trivial transport (it -- used to only hold up to a more complicated argument). {-# OPTIONS --cubical #-} module Issue3415 where open import Agda.Primitive.Cubical public open import Agda.Builtin.Cubical.Path ...
module BasicIS4.Metatheory.ClosedHilbert-TarskiClosedOvergluedImplicit where open import BasicIS4.Syntax.ClosedHilbert public open import BasicIS4.Semantics.TarskiClosedOvergluedImplicit public open ImplicitSyntax (⊢_) public -- Completeness with respect to a particular model. module _ {{_ : Model}} where reify ...
module MonoidTactic where open import Prelude open import Container.Traversable open import Tactic.Monoid open import Tactic.Reflection SemigroupAnd : Semigroup Bool _<>_ {{SemigroupAnd}} = _&&_ MonoidAnd : Monoid Bool Monoid.super MonoidAnd = SemigroupAnd mempty {{MonoidAnd}} = true Monoid/LawsAnd : Monoid/Laws...
-- The type checker was a little too eager to prune metavariables in -- order to get the occurs check to pass. In this particular case it -- got the constraint -- _41 A B x == B (_42 A B (x , y)) -- and tried to make it work by pruning the third argument to _42. The -- correct solution _42 A B p := fst p was thus los...
------------------------------------------------------------------------ -- The Agda standard library -- -- The state monad ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Category.Monad.State where open import Category.Applicative.Indexed open impor...
{-# OPTIONS --without-K --safe #-} module Experiment.EvenOdd where open import Data.List open import Data.List.Relation.Unary.All open import Data.Product hiding (map) open import Data.Sum as Sum hiding (map) open import Data.Nat open import Data.Nat.GeneralisedArithmetic import Data.Nat.Properties as ℕₚ open import F...
module BBHeap.Compound {A : Set}(_≤_ : A → A → Set) where open import BBHeap _≤_ open import Bound.Lower A open import Bound.Lower.Order _≤_ data Compound {b : Bound} : BBHeap b → Set where cl : {x : A}{l r : BBHeap (val x)}(b≤x : LeB b (val x))(l⋘r : l ⋘ r) → Compound (left b≤x l⋘r) cr : {x : A}{l r : BBHeap (v...
module Test where import Data.Bits import Data.Bool import Data.Char import Data.Fin import Data.Integer import Data.Interval import Data.List import Data.Map import Data.Maybe import Data.Nat import Data.Nat.Properties import Data.Permutation import Data.PigeonHole import Data.Rational import Data.Real.Base import D...
{- Please do not move this file. Changes should only be made if necessary. This file contains pointers to the code examples and main results from the paper: Synthetic Cohomology Theory in Cubical Agda -} -- The "--safe" flag ensures that there are no postulates or -- unfinished goals {-# OPTIONS --safe #-} module ...
{-# OPTIONS --without-K #-} module tests.compileCoreLibrary where open import hott.core open import hott.core.theorems open import hott.topology open import hott.topology.theorems open import io.placeholder main : IO Unit main = dummyMain
-- NBE for Gödel System T module NBE where module Prelude where -- Zero and One ----------------------------------------------------------- data Zero : Set where data One : Set where unit : One -- Natural numbers -------------------------------------------------------- data Nat : Set where zero...
{-# OPTIONS --without-K #-} open import M-types.Base.Core open import M-types.Base.Sum open import M-types.Base.Prod open import M-types.Base.Eq module M-types.Base.Equi where Qinv : {X : Ty ℓ₀} {Y : Ty ℓ₁} → ∏[ f ∈ (X → Y)] Ty (ℓ-max ℓ₀ ℓ₁) Qinv {_} {_} {X} {Y} f = ∑[ g ∈ (Y → X) ] (∏[ x ∈ ...
{-# OPTIONS --safe #-} module Cubical.HITs.James where open import Cubical.HITs.James.Base public open import Cubical.HITs.James.Properties public
{-# OPTIONS --allow-unsolved-metas #-} module _ where open import Agda.Primitive open import Agda.Builtin.Nat module Test₁ where record ⊤ {a} : Set a where constructor tt data G : (A : Set) → ⊤ {_} → Set where d : (x : ⊤) → G ⊤ x test : (g : G ⊤ tt) → Set test (d x) = ⊤ module Test₂ where postu...