text
stringlengths
4
690k
open import Data.Nat hiding (_^_ ; _+_) open import Data.List as List hiding (null) open import Data.List.Membership.Propositional open import Data.List.Relation.Unary.Any open import Data.List.Relation.Unary.All as All open import Data.List.All.Properties.Extra open import Data.Integer open import Data.Unit open impor...
------------------------------------------------------------------------ -- A terminating parser data type and the accompanying interpreter ------------------------------------------------------------------------ module RecursiveDescent.Coinductive.Internal where open import RecursiveDescent.Index open import Data.Bo...
-- Exploit by Jesper Cockx open import Agda.Builtin.Equality data Bool : Set where tt ff : Bool const : Bool → (Bool → Bool) const = λ x _ → x mutual Bool→cBool : Set Bool→cBool = _ const-tt : Bool→cBool const-tt = const tt constant : (f : Bool→cBool) (x y : Bool) → f x ≡ f y constant f x y = refl cons...
{- 2010-09-28 Andreas, example from Alan Jeffery, see Issue 336 -} module WhyWeNeedTypedLambda where data Bool : Set where true false : Bool F : Bool -> Set F true = Bool -> Bool F false = Bool bool : {b : Bool} -> F b -> Bool bool {b} _ = b {- -- untyped lambda leaves some yellow -- the problem \ x -> x : F ?...
-- Andreas, 2019-12-03, issue #4200 reported and testcase by nad open import Agda.Builtin.Bool data D : Set where c₁ : D @0 c₂ : D -- Not allowed d : D d = c₂ f : D → Bool f c₁ = true f c₂ = false -- Expected error: -- Erased constructors are not supported -- when checking the constructor c₂ in the declarati...
------------------------------------------------------------------------ -- The Agda standard library -- -- Many properties which hold for `∼` also hold for `flip ∼`. Unlike -- the module `Relation.Binary.Construct.Converse` this module flips -- both the relation and the underlying equality. ---------------------------...
module Issue148 where data I : Set where i : I F : I → Set → Set F i A = A data T (p : I) : Set where t₁ : T p → T p t₂ : F p (T p) → T p fold : ((x : T i) → T i) → T i → T i fold f (t₁ x) = f (fold f x) fold f (t₂ x) = f (fold f x) data E : T i → Set where e : ∀ x → E x postulate t₂′ : ∀ {p} → F...
module Named where open import Data.String open import Data.Nat hiding (_≟_) open import Data.Bool using (T; not) open import Data.Product open import Data.Sum -- open import Data.Nat.Properties using (strictTotalOrder) -- open import Relation.Binary using (StrictTotalOrder) -- open import Relation.Binary.Core open im...
module Rationals.Add.Comm where open import Equality open import Function open import Nats using (zero; ℕ) renaming (suc to s; _+_ to _:+:_; _*_ to _:*:_) open import Rationals open import Rationals.Properties open import Nats.Add.Comm open import Nats.Multiply.Distrib open import Nats.Multiply.Comm ...
{- Jesper Cockx, 26-05-2014 Issue 1023 Example by Maxime Denes, adapted by Andreas Abel -} {-# OPTIONS --cubical-compatible --guardedness #-} module CoinductionAndUnivalence where open import Common.Coinduction open import Common.Equality prop = Set data False : prop where magic : ∀ {a} {A : Set a} → False ...
module Untyped.Monads where open import Function open import Data.Unit open import Data.Product as Prod open import Data.Sum open import Data.Sum public using () renaming (_⊎_ to Exceptional; inj₁ to exc; inj₂ to ✓) open import Category.Monad id-monad : ∀ {ℓ} → RawMonad {ℓ} id id-monad = record { return = id ; ...
{-# OPTIONS --without-K #-} open import library.Basics hiding (Type ; Σ) open import library.types.Sigma module Sec2preliminaries where -- is-prop, is-contr, is-set, has-dec-eq exist in library.Basicss -- Let us redefine Type and Σ so that they only refer to the lowest universe. Type = Type₀ Σ = library.Basics.Σ {l...
{-# OPTIONS --safe #-} module Issue2442-terminating where {-# NON_TERMINATING #-} f : Set f = f
open import Theory module Categories.Category.Construction.Classifying {ℓ₁ ℓ₂ ℓ₃} (Th : Theory ℓ₁ ℓ₂ ℓ₃) where open import Relation.Binary using (Rel) open import Data.List using ([]; _∷_) open import Data.Fin using () renaming (zero to fzero; suc to fsuc) open import Level using (_⊔_) open import Categories.Categor...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.Bouquet open import homotopy.FinWedge open import homotopy.SphereEndomorphism open import groups.SphereEndomorphism open import cw.CW open import cw.FinCW open import cw.WedgeOfCells open import cw.FinBoundary open import cohomology.Theory ...
module UnSized.Parrot where open import Data.Product open import Data.String.Base open import UnSizedIO.IOObject open import UnSizedIO.Base hiding (main) open import UnSizedIO.Console hiding (main) open import NativeIO open import UnSized.SimpleCell hiding (program; main) --ParrotC : Set --ParrotC = ConsoleObjec...
module ExtendedLam where data Bool : Set where false : Bool true : Bool f : Bool → Bool → Bool f = λ { x false → true ; y true → y }
{- This file contains: - The quotient of finite sets by decidable equivalence relation is still finite, by using equivalence class. -} {-# OPTIONS --safe #-} module Cubical.Data.FinSet.Quotients where open import Cubical.Foundations.Prelude open import Cubical.Foundations.HLevels open import Cubical.Foundations.Iso...
open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Data.Product using (∃; _,_) open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym) +-identity : ∀ (m : ℕ) → m + zero ≡ m +-identity zero = refl +-identity (suc m) rewrite +-identity m = refl +-suc : ∀ (m n : ℕ) → n + suc m ≡ suc (n + m)...
open import Relation.Binary.Core module Mergesort.Everything {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import Mergesort.Impl1.Correctness.Order _≤_ tot≤ open import Mergesort.Impl1.Correctness.Permutation _≤_ tot≤ open import Mergesort.Impl2.Correctness.Order _≤_...
import Data.Bool import Relation.Nullary.Negation import Relation.Nullary.Decidable
------------------------------------------------------------------------ -- Library parsers which do not require the complicated setup used in -- RecursiveDescent.Inductive.Lib ------------------------------------------------------------------------ -- This module also provides more examples of parsers for which the -...
------------------------------------------------------------------------------ -- The Collatz function: A function without a termination proof ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS...
open import Signature import Program module Observations (Σ : Sig) (V : Set) (P : Program.Program Σ V) where open import Terms Σ open import Program Σ V open import Rewrite Σ V P open import Relation.Nullary open import Relation.Unary open import Data.Product as Prod renaming (Σ to ⨿) NonTrivial : T V → Pred (Subst ...
module Categories.Functor.Coalgebras where
-- Andreas, 2015-11-19 Issue 1692 -- With-abstract also in types of variables mentioned in with-expressions -- unless they are also mentioned in the types of the with-expressions. -- {-# OPTIONS -v tc.with:40 #-} open import Common.Equality postulate A : Set a : A test : (dummy : A) (f : ∀ x → a ≡ x) (b : A) → ...
module STLC4 where open import Data.Nat open import Data.Nat.Properties using (≤-antisym; ≤-trans; ≰⇒>; ≤-step) -- open import Data.List open import Data.Empty using (⊥-elim) open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong; cong₂; subst) open import Relation.Nullary.Decidable usin...
{-# OPTIONS --without-K --safe #-} module Definition.Typed.Consequences.Reduction where open import Definition.Untyped open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definition.Typed.Consequences.Syntactic open import Definition.LogicalRelat...
------------------------------------------------------------------------ -- Asymmetric choice ------------------------------------------------------------------------ module TotalParserCombinators.AsymmetricChoice where open import Data.Bool open import Data.Empty open import Data.List open import Data.List.Membershi...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module provides alternative ways of providing instances of -- structures in the Algebra.Module hierarchy. ------------------------------------------------------------------------ {-# OPTIONS --without-K --s...
{- Freudenthal suspension theorem -} {-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Homotopy.Freudenthal where open import Cubical.Foundations.Everything open import Cubical.Data.HomotopyGroup open import Cubical.Data.Nat open import Cubical.Data.Sigma open import Cubical.HITs.Nullification open i...
-- A formalised proof of the soundness and completeness of -- a simply typed lambda-calculus with explicit substitutions -- -- Catarina Coquand -- -- Higher-Order and Symbolic Computation, 15, 57-90, 2002 -- -- http://dx.doi.org/10.1023/A:1019964114625 module Everything where -- 1. Introduction import Section1 -- 2....
------------------------------------------------------------------------ -- The Agda standard library -- -- Finding the maximum/minimum values in a list, specialised for Nat ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} -- This specialised module is needed...
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-} module Cubical.HITs.InfNat.Base where open import Cubical.Core.Everything open import Cubical.Data.Maybe open import Cubical.Data.Nat open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism data ℕ+∞ : Type₀ where zero ...
module Data.Integer where import Prelude import Data.Nat as Nat import Data.Bool open Nat using (Nat; suc; zero) renaming ( _+_ to _+'_ ; _*_ to _*'_ ; _<_ to _<'_ ; _-_ to _-'_ ; _==_ to _=='_ ; div to div' ...
------------------------------------------------------------------------ -- Groups ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module Group {e⁺} (eq : ∀ {a p} → Equality-with-J a p e⁺) where open Derived-definitions-and-propertie...
module examplesPaperJFP.CatNonTerm where open import examplesPaperJFP.BasicIO hiding (main) open import examplesPaperJFP.Console hiding (main) open import examplesPaperJFP.NativeIOSafe module _ where {-# NON_TERMINATING #-} cat : IO ConsoleInterface Unit cat = exec getLine λ{ nothing ...
open import Data.Nat open import Data.Bool open import Data.Product open import Function open import Data.List hiding (lookup) open import Data.List.All open import Data.List.Membership.Propositional open import Data.Maybe.Categorical open import Category.Monad open import Agda.Primitive open import Size open import C...
{-# OPTIONS --cubical --safe --postfix-projections #-} open import Prelude hiding (_×_) module Categories.HSets {ℓ : Level} where open import Categories open import Cubical.Foundations.HLevels open import Cubical.Foundations.Equiv open import Cubical.Foundations.Univalence open import Data.Sigma.Properties open impo...
{-# OPTIONS --type-in-type #-} module Record where infixr 2 _,_ record Σ (A : Set)(B : A → Set) : Set where constructor _,_ field fst : A snd : B fst open Σ data ⊤ : Set where tt : ⊤ ∃ : {A : Set}(B : A → Set) → Set ∃ B = Σ _ B infix 10 _≡_ data _≡_ {A : Set}(a : A) : {B : Set} → B → Set where ref...
module Basics where data Zero : Set where record One : Set where constructor <> data Two : Set where tt ff : Two data Nat : Set where ze : Nat su : Nat -> Nat data _+_ (S T : Set) : Set where inl : S -> S + T inr : T -> S + T record Sg (S : Set)(T : S -> Set) : Set where constructor _,_ field fst : ...
-- Homotopy type theory -- https://github.com/agda/cubical {-# OPTIONS --without-K --safe #-} module TypeTheory.HoTT.Base where -- agda-stdlib open import Level renaming (zero to lzero; suc to lsuc) open import Data.Product open import Relation.Binary.PropositionalEquality private variable a b : Level fiber...
{-# OPTIONS --without-K --safe #-} module Dodo.Binary.Equality where -- Stdlib imports import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl) open import Level using (Level; _⊔_) open import Function using (_∘_) open import Relation.Unary using (Pred) open import Relation.Binary using ...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Implementation.Action where open import Light.Library.Action using (Library ; Dependencies) open import Light.Level using (++_ ; 0ℓ) open import Light.Library.Data.Unit using (Unit) open import Light.Library.Data.Natural usin...
module Impure.LFRef.Properties.Soundness where open import Data.Nat open import Data.Sum open import Data.Product as Pr open import Data.List as List hiding (monad) open import Data.Fin using (fromℕ≤; Fin) open import Data.Vec hiding (_∷ʳ_; _>>=_) open import Data.Star hiding (_>>=_) open import Function open import E...
{-# OPTIONS --cubical --safe --postfix-projections #-} module HITs.PropositionalTruncation.Properties where open import HITs.PropositionalTruncation open import Prelude open import Data.Empty.Properties using (isProp⊥) refute-trunc : ¬ A → ¬ ∥ A ∥ refute-trunc = rec isProp⊥ recompute : Dec A → ∥ A ∥ → A recompute (...
open import Relation.Binary using (Decidable; Setoid; DecSetoid) open import Level module CP.Session3 {a} {b} (ChanDecSetoid : DecSetoid zero a) (TypeDecSetoid : DecSetoid zero b) where module TS = DecSetoid TypeDecSetoid Type : Set Type = DecSetoid.Carrier TypeDecSetoid open DecSetoid ChanDecSetoid Chan : Set...
{-# OPTIONS --cubical --safe --postfix-projections #-} module Data.Binary.Isomorphism where open import Data.Binary.Definition open import Data.Binary.Conversion open import Data.Binary.Increment open import Prelude import Data.Nat as ℕ inc-suc : ∀ x → ⟦ inc x ⇓⟧ ≡ suc ⟦ x ⇓⟧ inc-suc 0ᵇ i = 1 inc-suc (1ᵇ x) i = ...
module Numeral.Natural.Prime.Proofs where import Lvl open import Data open import Data.Boolean.Stmt open import Data.Either as Either using () open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional open import Lang.Instance open import Logic open import Logic.Propositional open import Logic.Propositi...
{-# OPTIONS --rewriting #-} --{-# OPTIONS -v rewriting:100 #-} postulate _↦_ : ∀ {i} {A : Set i} → A → A → Set i {-# BUILTIN REWRITE _↦_ #-} data _==_ {i} {A : Set i} (a : A) : A → Set i where idp : a == a ap : ∀ i j (A : Set i) (B : Set j) (f : A → B) (x y : A) → (x == y → f x == f y) ap _ _ _ _ f _ ._ idp =...
------------------------------------------------------------------------------ -- Testing the translation of definitions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymor...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.DStructures.Structures.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 C...
{-# OPTIONS --without-K --safe #-} open import Level -- This is really a degenerate version of Categories.Category.Instance.Zero -- Here EmptySet is not given an explicit name, it is an alias for Lift o ⊥ module Categories.Category.Instance.EmptySet where open import Data.Empty using (⊥; ⊥-elim) open import Relation...
-- Andreas, 2016-02-11. Irrelevant constructors are not (yet?) supported data D : Set where .c : D -- Should fail, e.g., with parse error.
------------------------------------------------------------------------ -- Pretty-printing (documents and document combinators) ------------------------------------------------------------------------ {-# OPTIONS --guardedness #-} module Pretty where open import Data.Bool open import Data.Char open import Data.List...
{-# OPTIONS --without-K --safe #-} module Categories.Category.Concrete.Properties where open import Data.Unit.Polymorphic open import Function.Equality using (Π; _⟨$⟩_; const; _∘_) open import Level open import Relation.Binary using (Setoid) import Relation.Binary.Reasoning.Setoid as SR open import Categories.Adjoin...
{-# OPTIONS --without-K --exact-split #-} module 18-circle where import 17-groups open 17-groups 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 base-fr...
open import OutsideIn.Prelude open import OutsideIn.X module OutsideIn.TypeSchema(x : X) where open X(x) open import Data.Vec hiding (_>>=_) data NameType : Set where Regular : NameType Datacon : ℕ → NameType data TypeSchema ( n : Set) : NameType → Set where ∀′_·_⇒_ : (v : ℕ) → QConstraint (n ⨁ v...
{-# OPTIONS --allow-unsolved-metas #-} open import Level open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Ordinals module partfunc {n : Level } (O : Ordinals {n}) where open import logic open import Relation.Binary open import Data.Empty open import Data.List hiding (filte...
------------------------------------------------------------------------ -- The Agda standard library -- -- Pointwise lifting of a predicate to a binary tree ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Tree.Binary.Relation.Unary.All where op...
{-# OPTIONS --without-K #-} -- -- Implementation of Sets using lists -- open import Prelude module Sets {i} (A : Set i) (eqdecA : eqdec A) where valid : list A → Set i valid l = ∀ x → has-all-paths (x ∈-list l) set = Σ (list A) (λ l → valid l) valid-nil : valid nil valid-nil _ () Ø : set Ø = nil , v...
{-# OPTIONS --cubical --safe #-} module Algebra.Construct.Free.Semilattice.Relation.Unary.Membership where open import Prelude hiding (⊥; ⊤) open import Algebra.Construct.Free.Semilattice.Eliminators open import Algebra.Construct.Free.Semilattice.Definition open import Cubical.Foundations.HLevels open import Data.Emp...
{-# OPTIONS --cubical --save-metas #-} open import Agda.Builtin.IO open import Agda.Builtin.String open import Agda.Builtin.Unit open import Erased-cubical-Pattern-matching-Cubical open import Erased-cubical-Pattern-matching-Erased postulate putStr : String → IO ⊤ {-# FOREIGN GHC import qualified Data.Text.IO #-}...
------------------------------------------------------------------------------ -- Unary naturales numbers ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# O...
{-# OPTIONS --universe-polymorphism #-} module Support.FinSet where open import Support open import Support.Nat unbound : ∀ {n} (m : Fin n) → ℕ unbound zero = zero unbound {suc n} (suc y) = suc (unbound {n} y) .Fin-is-bounded : ∀ (n : ℕ) (m : Fin n) → (unbound m < n) Fin-is-bounded .(suc n) (zero {n}) = Z<Sn Fin-is-...
------------------------------------------------------------------------------ -- Miscellaneous properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# ...
-- We use Kalmar's lemma to show completeness. See -- https://iep.utm.edu/prop-log/ -- http://comet.lehman.cuny.edu/mendel/Adlogic/sem5.pdf {-# OPTIONS --without-K --safe #-} module Kalmar where -- imports from stdlib. import Data.Empty as DE open import Data.Bool using (Bool ; not ; false ; true) open import Data.N...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.ZCohomology.Groups.Sn where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.Properties open import Cubical.ZCohomology.Groups.Unit open import Cubical.ZCohomology.Groups.Connected open import Cubical.ZCohomology.GroupStructure open ...
id : Set → Set id A = A F : Set → Set → Set F _*_ = G where G : Set → Set G _*_ = id _*_ G : Set → Set → Set G _*_ = λ _*_ → id _*_ H : Set → Set → Set H = λ _*_ _*_ → id _*_
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Algebra where open import Cubical.Algebra.Base public open import Cubical.Algebra.Definitions public open import Cubical.Algebra.Structures public open import Cubical.Algebra.Bundles public open import Cubical.Classes public
open import agdaExamples public open import Blockchain public open import Crypto public open import examples public open import lambdaCalculus open import Ledger public open import proofsTXTree public open import RawTransactions public open import RawTXTree public open import Transactions public open import TXTree publ...
------------------------------------------------------------------------ -- Parallel substitutions (defined using an inductive family) ------------------------------------------------------------------------ open import Data.Universe.Indexed module deBruijn.Substitution.Data {i u e} {Uni : IndexedUniverse i u e} wh...
module Issue493 where module M where postulate A B C : Set module M₁ = M renaming (B to Y) hiding (A) module M₂ = M using (A) using (B) module M₃ = M hiding (A) hiding (B) open M using (A) public
{-# OPTIONS --without-K #-} module well-typed-syntax-helpers where open import common open import well-typed-syntax infixl 3 _‘'’ₐ_ infixr 1 _‘→'’_ infixl 3 _‘t’_ infixl 3 _‘t’₁_ infixl 3 _‘t’₂_ infixr 2 _‘∘’_ WS∀ : ∀ {Γ T T' A B} {a : Term {Γ = Γ} T} → Term {Γ = Γ ▻ T'} (W ((A ‘→’ B) ‘’ a)) → Term {Γ ▻ T'} (W ((A ‘’...
module Pi-.AuxLemmas where open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Product open import Relation.Binary.Core open import Relation.Binary open import Relation.Nullary open import Relation.Binary.PropositionalEquality open import Data.Nat open import Data.Nat.Properties open impo...
module Logic.Classical where import Lvl open import Data open import Data.Boolean open import Data.Boolean.Stmt open import Data.Boolean.Stmt.Proofs using (module IsTrue ; module IsFalse) open import Data.Boolean.Proofs open import Data.Either as Either using (_‖_) open import Data.Tuple as Tuple using (_⨯_ ; _,_...
module SignedBy where open import Data.String open import Relation.Binary.PropositionalEquality open import Data.Nat -- this is easy to write --- but ignoring for now postulate Word512 : Set {- signed by val with noncing by identity == really needs to be part of a freshly generated challenge /uuid string mixed into...
-- Andreas, 2014-10-09, issue reported by Matteo Acerbi module _ where module A where module B (let module F = A) where module C (let module F = A) where -- Complains about duplicate F -- Should work
-- Andreas, 2012-05-04 Example from Jason Reed, LFMTP 2009 {-# OPTIONS --allow-unsolved-metas #-} -- The option is supplied to force a real error to pass the regression test. module JasonReedPruning where open import Common.Equality open import Common.Product data o : Set where f : o -> o test : let U : o → o ...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Decidable.Relations where DecidableRelation : {a b : _} {A : Set a} (f : A → Set b) → Set (a ⊔ b) DecidableRelation {A = A} f = (x : A) → (f x) || (f x → False) orDecidabl...
-- 2013-06-15 Andreas, issue reported by Stevan Andjelkovic module Issue854 where infixr 1 _⊎_ infixr 2 _×_ infixr 4 _,_ infix 4 _≡_ data ⊥ : Set where ⊥-elim : {A : Set} → ⊥ → A ⊥-elim () record ⊤ : Set where constructor tt data Bool : Set where true false : Bool data ℕ : Set where zero : ℕ suc : (n : ℕ...
-- Andreas, 2018-09-08, issue #3211 -- -- Bug with parametrized module and constructor rewriting. {-# OPTIONS --rewriting #-} -- {-# OPTIONS -v rewriting.match:90 -v rewriting:90 #-} -- {-# OPTIONS -v tc.getConType:50 #-} module _ (Base : Set) where open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-} cong...
{-# OPTIONS --cubical #-} module Type.Cubical.Equiv where import Lvl open import Type.Cubical open import Type.Cubical.Path.Equality import Type.Equiv as Type open import Type private variable ℓ₁ ℓ₂ : Lvl.Level -- `Type.Equiv._≍_` specialized to Path. _≍_ : (A : Type{ℓ₁}) → (B : Type{ℓ₂}) → Type A ≍ B = A...
open import bool open import level open import eq open import product open import product-thms open import relations -- module closures where -- module basics {ℓ ℓ' : level}{A : Set ℓ} (_>A_ : A → A → Set ℓ') where -- data tc : A → A → Set (ℓ ⊔ ℓ') where -- tc-step : ∀{a b : A} → a >A b → tc a b -- ...
------------------------------------------------------------------------ -- Typing and kinding of Fω with interval kinds ------------------------------------------------------------------------ {-# OPTIONS --safe --without-K #-} module FOmegaInt.Typing where open import Data.Context.WellFormed open import Data.Fin u...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Paths module lib.types.Torus where {- data Torus : Type₀ where baseT : Torus loopT1 : baseT == baseT loopT2 : baseT == baseT surfT : loopT1 ∙ loopT2 == loopT2 ∙ loopT1 -} module _ where private data #Torus-aux : Type₀ where ...
{-# OPTIONS --without-K --safe #-} module Experiment.SumFin where open import Data.Empty open import Data.Unit open import Data.Sum open import Data.Nat open import Data.Nat.Properties open import Relation.Binary.PropositionalEquality private variable k : ℕ Fin : ℕ → Set Fin zero = ⊥ Fin (suc n) = ⊤ ⊎ (Fi...
{-# OPTIONS --without-K #-} open import HoTT module homotopy.TorusIsProductCircles where surfT' : loopT1 ∙ loopT2 == loopT2 ∙' loopT1 surfT' = surfT ∙ (∙=∙' loopT2 loopT1) private to-surfT : (pair×= loop idp) ∙ (pair×= idp loop) == (pair×= idp loop) ∙ (pair×= loop idp) to-surfT = pair×= loop id...
open import Common.Prelude open import Common.Reflection {-# NON_TERMINATING #-} -- Note that in the body of the unquote, 'loop' really means 'quote loop'. unquoteDecl loop = define (vArg loop) (funDef (def (quote Nat) []) (clause [] (def loop []) ∷ []))
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.types.Empty open import lib.types.Sigma open import lib.types.Paths module lib.types.Pi where instance Π-level : ∀ {i j} {A : Type i} {B : A → Type j} {n : ℕ₋₂} → ((x : A) → has-level n (B x)) → has-level n (Π A B) Π-level {n = ⟨-...
open import Data.Nat module OpenTheory where ---------------------------------------------------------------------- data Vec (A : Set) : ℕ → Set₁ where nil : Vec A zero cons : (n : ℕ) (x : A) (xs : Vec A n) → Vec A (suc n) data Vec2 : Set → ℕ → Set₁ where nil : (A : Set) → Vec2 A zero cons : (A : Set) (n : ℕ...
module PiQ.Everything where open import PiQ.Syntax -- Syntax of PiQ open import PiQ.Opsem -- Abstract machine semantics of PiQ open import PiQ.AuxLemmas -- Some auxiliary lemmas about opsem for forward/backward deterministic proof open import PiQ.NoRepeat -- Forward/backward deterministic lemmas and Non-rep...
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Setoids.Setoids open import Rings.Definition open import Sets.EquivalenceRelations open import Agda.Primitive using (Level; lzero; lsuc; _⊔_) module Rings.IntegralDomains.Definition {m n : _} {A : Set n} {S : Setoid {n} {m} A}...
{-# OPTIONS --without-K #-} open import HoTT open import homotopy.HSpace renaming (HSpaceStructure to HSS) open import homotopy.WedgeExtension module homotopy.Pi2HSusp where module Pi2HSusp {i} (A : Type i) (gA : has-level 1 A) (cA : is-connected 0 A) (A-H : HSS A) where {- TODO this belongs somewhere else, b...
open import Prelude open import RW.Language.RTerm open import RW.Language.FinTerm module RW.Language.RTermIdx where open Eq {{...}} data RTermᵢ {a}(A : Set a) : Set a where ovarᵢ : (x : A) → RTermᵢ A ivarᵢ : (n : ℕ) → RTermᵢ A rlitᵢ : (l : Literal) → RTermᵢ A rlamᵢ : RTermᵢ A rappᵢ : (n : RTe...
module Syntax2 where import Level open import Data.Empty open import Data.Unit as Unit renaming (tt to ∗) open import Data.Nat open import Data.List as List renaming ([] to Ø) hiding ([_]) open import NonEmptyList as NList open import Data.Vec as Vec hiding ([_]; _++_) open import Data.Product as Prod open import Cate...
open import Nat open import Prelude open import contexts open import core module dynamics-core where open core public mutual -- identity substitution, substitition environments data env : Set where Id : (Γ : tctx) → env Subst : (d : ihexp) → (y : Nat) → env → env -- internal expressi...
{-# OPTIONS --cubical --safe #-} module Cubical.Data.Group.Base where import Cubical.Core.Glue as G open import Cubical.Foundations.Prelude hiding ( comp ) import Cubical.Foundations.Isomorphism as I import Cubical.Foundations.Equiv as E import Cubical.Foundations.HAEquiv as HAE record isGroup {ℓ} (A : Type ℓ) : T...
{-# OPTIONS --safe --without-K #-} open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; sym) open import Relation.Nullary using (Dec; yes; no) import Data.Bool as Bool import Data.Empty as Empty import Data.Unit as Unit import Data.Sum as Sum import Data.Product as Product import Data.Nat as ℕ im...
{-# OPTIONS --safe #-} module Cubical.Data.Nat.Order.Recursive where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Transport open import Cubical.Data.Empty as Empty open import Cubical.Data.Sigma open import Cub...