text
stringlengths
4
690k
{-# OPTIONS --cubical --safe --guardedness #-} module Data.PolyP.Derivations.Levels where open import Data.PolyP open import Level open import Data.PolyP.Types open import Data.Sum open import Data.Sigma open import Data.Unit open import Data.Fin open import Data.Nat open import Data.Vec open import Function open imp...
open import Agda.Builtin.Equality using (_≡_; refl) record ∃ {A : Set} (B : A → Set) : Set where constructor _,_ field proj₁ : A proj₂ : B proj₁ open ∃ public uncurry : {A : Set} {B : A → Set} {C : ∃ B → Set₁} → ((x : A) (y : B x) → C (x , y)) → ((p : ∃ B) → C p) uncurry f (x , y) = ...
{-# OPTIONS --cubical --safe --no-import-sorts #-} module Cubical.Algebra.Module.Base 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 Cub...
module Highlighting where Set-one : Set₂ Set-one = Set₁ record R (A : Set) : Set-one where constructor con field X : Set F : Set → Set → Set F A B = B field P : F A X → Set Q : F A X → Set Q = Q postulate P : _ open import Highlighting.M data D (A : Set) : Set-one where d : let X = D in X A
{-# OPTIONS --without-K --safe #-} module Categories.Adjoint.Equivalence where open import Level open import Categories.Adjoint open import Categories.Category open import Categories.Functor renaming (id to idF) open import Categories.Functor.Properties open import Categories.NaturalTransformation using (ntHelper) o...
-- 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...
mutual record R : Set₁ where field A : Set B : Set B = A field C : Set D : Set D = A → B → C record S : Set₁ where field A : Set B : Set B = A field C : Set D : Set D = A → B → C
module plfa-exercises.Practice2 where -- Trying exercises: -- 5.2 pp 340 -- 5.7 pp 386 -- 6.1 pp 423 import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_; refl; subst) open import Data.Nat using (ℕ; zero; suc; _+_; _*_) open import Relation.Nullary using (¬_) open import Data.Product using (_×_; proj...
open import Issue623.B
-- Soundness of term equality module Semantics.Soundness where open import Syntax.Types open import Syntax.Context renaming (_,_ to _,,_) open import Syntax.Terms open import Syntax.Equality open import Syntax.Substitution open import Semantics.Types open import Semantics.Context open import Semantics.Terms open imp...
module _ where postulate A B : Set {-# DISPLAY A = B #-} {-# DISPLAY B = A #-} loop : A loop = {!!}
{-# OPTIONS --safe --warning=error --without-K #-} open import LogicalFormulae open import Decidable.Relations open import Boolean.Definition module Decidable.Reduction where squash : {a b : _} {A : Set a} {f : A → Set b} → DecidableRelation f → A → Bool squash rel a with rel a ... | inl x = BoolTrue ... | inr x = B...
------------------------------------------------------------------------ -- The Agda standard library -- -- All predicate transformer for fresh lists ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.List.Fresh.Relation.Unary.All where open import...
module Data.Bit where open import Data.Nat.Literal using (Number; ℕ-num; Fin-num) open import Data.Nat using (ℕ ; suc; zero; ⌊_/2⌋) renaming (_*_ to ℕ*; _+_ to ℕ+; _≤_ to ℕ≤; _^_ to ℕ^) open import Data.Int.Literal using (Negative) open import Data.Fin using (Fin; suc; zero; raise) ...
{-# OPTIONS --without-K --safe #-} module Cats.Category.Fun.Facts where open import Cats.Category.Fun.Facts.Iso public using ( ≈→≅ ; ≅→≈ ) open import Cats.Category.Fun.Facts.Limit public using ( complete ) open import Cats.Category.Fun.Facts.Product public using ( hasBinaryProducts ; hasFiniteProducts ) open im...
-- Andreas, 2012-09-15 {-# OPTIONS --show-implicit #-} -- {-# OPTIONS -v tc.meta:50 #-} -- {-# OPTIONS -v tc.conv:50 #-} -- {-# OPTIONS -v tc.polarity:10 #-} -- {-# OPTIONS -v tc.constr.findInScope:50 #-} module BrokenInferenceDueToNonvariantPolarity where import Common.Level data ⊥ : Set where record ⊤ : Set where ...
{-# OPTIONS --cubical --no-import-sorts --safe #-} module Cubical.Data.SumFin where open import Cubical.Data.SumFin.Base public open import Cubical.Data.SumFin.Properties public
-- Interacting with the real world ---Compilation, Haskell, and IO -- :PROPERTIES: -- :header-args: :tangle "CompilingAgda.agda" :comments org -- :CUSTOM_ID: agda-interacting-with-the-real-world -- :END: -- # C-c C-v C-t tangles the following code into CompilingAgda.agda. -- # Then we may compile the result using: -- ...
{- Terms of the language. Based on Pfenning and Davies' "Judgmental reconstruction of modal logic." -} module Syntax.Terms where open import Syntax.Types open import Syntax.Context mutual -- Pure terms of the language, expressed as typing judgements infix 10 _⊢_ data _⊢_ : Context -> Judgement -> Set ...
{- Technical results about row transformation applied to matrices -} {-# OPTIONS --safe #-} module Cubical.Algebra.Matrix.RowTransformation where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Function open import Cubical.Data.Nat hiding (_+_ ; _·_) open import Cubical.Data.Nat.Order open i...
------------------------------------------------------------------------ -- AVL trees ------------------------------------------------------------------------ -- AVL trees are balanced binary search trees. The search tree -- invariant is not statically enforced in the current implementation, -- just the balance invari...
module RandomAccessList.Zeroless.Core.Properties where open import BuildingBlock open import BuildingBlock.BinaryLeafTree using (BinaryLeafTree; Node; Leaf) open import RandomAccessList.Zeroless.Core open import Data.Nat open import Data.Nat.Etc open import Data.Nat.Properties.Simple open import Relation.Binary.Prop...
------------------------------------------------------------------------------ -- Inductive PA arithmetic properties using Agsy ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-...
{-# OPTIONS --without-K --safe #-} module Categories.Functor.Instance.StrictCore where -- The 'strict' core functor (from StrictCats to StrictGroupoids). -- This is the right-adjoint of the forgetful functor from -- StrictGroupoids to StrictCats -- (see Categories.Functor.Adjoint.Instance.StrictCore) open import Dat...
------------------------------------------------------------------------------ -- Testing the translation of definitions ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymor...
{- 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 Util.KVMap as Map open import Util.Prelude module LibraBFT.Impl....
-- 2012-10-20 Andreas module Issue721b where data Bool : Set where false true : Bool record Foo (b : Bool) : Set where field _*_ : Bool → Bool → Bool data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x test : (F : Foo false) → let open Foo F in (x : Bool) → _*_ x ≡ (λ x → x) test F x = x where open ...
-- {-# OPTIONS -v tc.lhs:10 -v tc.lhs.split:50 #-} postulate A : Set record R : Set where field f : A record S : Set where field f : A test : _ → A test record{f = a} = a
{-# OPTIONS --safe #-} module Definition.Conversion.Stability where open import Definition.Untyped open import Definition.Untyped.Properties open import Definition.Typed open import Definition.Typed.Weakening open import Definition.Conversion open import Definition.Typed.Consequences.Syntactic open import Definition....
{-# OPTIONS --without-K --copatterns #-} open import HoTT module experimental.GlobularTypes where {- Globular types as a coinductive record -} record Glob (i : ULevel) : Type (suc i) where coinductive constructor glob field Ob : Type i Hom : (a b : Ob) → Glob i open Glob public {- The terminal globula...
------------------------------------------------------------------------ -- The delay monad defined as the greatest fixpoint of an indexed -- container ------------------------------------------------------------------------ {-# OPTIONS --sized-types #-} module Indexed-container.Delay-monad where open import Equalit...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Library.Relation.Binary 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 ; Index ; Proposition ; True ; _⇢_) ...
import Agda.Builtin.Size postulate F : (A : Set) (B : A → Set) → ((x : A) → B x) → Set variable A : Set P : A → Set postulate f : (r : (x : _) → P x) → F _ P (λ x → r x)
-- {-# OPTIONS --copatterns #-} -- {-# OPTIONS -v tc.lhs:20 #-} open import Common.Size record Stream (i : Size) (A : Set) : Set where coinductive constructor _::_ field head : A tail : ∀ {j : Size< i} → Stream j A open Stream public -- size forgetful cons cons : ∀ i {A} → A → Stream i A → Stream (↑ ...
-- Properties of insertion sort {-# OPTIONS --without-K --safe #-} open import Relation.Binary as B module Algorithms.List.Sort.Insertion.Properties {c ℓ₁ ℓ₂} (DTO : DecTotalOrder c ℓ₁ ℓ₂) where -- agda-stdlib open import Level open import Data.Bool hiding (_≤_; _≤?_; _<_) open import Data.Empty using (⊥; ⊥-el...
------------------------------------------------------------------------------ -- Stream properties ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS...
{-# OPTIONS --without-K #-} module K where open import NTypes.Contractible open import PathOperations open import PathStructure.Sigma open import Types -- Not strictly related to the lectures. -- -- Here we show that the various forms of extending -- pure ITT to propositionally extensional TT are -- (logically) equiv...
module zf where open import Level open import logic open import Relation.Nullary open import Relation.Binary hiding (_⇔_) open import Data.Empty record IsZF {n m : Level } (ZFSet : Set n) (_∋_ : ( A x : ZFSet ) → Set m) (_≈_ : Rel ZFSet m) (∅ : ZFSet) (_,_ : ( A B : ZFSet ) → ZFSet) ...
-- An implementation of Olivier Danvy's Type-Directed Partial Evaluation (POPL 1996) -- for STLC with sum types using continuations in form of shift and reset. -- -- The algorithm was originally for a two-level lambda-calculus. -- Our use of Kripke semantics makes the effect of fresh variable generation explicit and f...
------------------------------------------------------------------------ -- The Agda standard library -- -- This module is DEPRECATED. Please use the -- Relation.Binary.Reasoning.StrictPartialOrder module directly. ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe ...
{-# OPTIONS --rewriting #-} open import Agda.Builtin.Equality {-# BUILTIN REWRITE _≡_ #-} postulate X : Set₁ rew : X ≡ Set {-# REWRITE rew #-} {-# REWRITE rew #-}
{- Formal verification of authenticated append-only skiplists in Agda, version 1.0. 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 Data.Empty open import Data.Nat open import Data.Product...
{-# OPTIONS --cubical --safe #-} module Data.List.Properties where open import Data.List open import Prelude open import Data.Fin open import Strict.Properties map-length : (f : A → B) (xs : List A) → length xs ≡ length (map f xs) map-length f [] _ = zero map-length f (x ∷ xs) i = suc (map-length f xs i) ...
{-# OPTIONS --cubical --rewriting #-} open import Agda.Primitive.Cubical public postulate Int : Set _↦_ : {A : Set} → A → A → Set id↦ : {A : Set} {a : A} → a ↦ a {-# BUILTIN REWRITE _↦_ #-} postulate hcompIntEmpty : (n : Int) → primHComp (λ _ → isOneEmpty) n ↦ n {-# REWRITE hcompIntEmpty #-} test : (n : I...
module Oscar (FunctionName PredicateName VariableName QuantifierName Name : Set) where open import Oscar.Data.Fin using (Fin; zero; suc; thick?) open import Data.Nat using (ℕ; suc; zero) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂; cong; sym; trans) open import Function using (_∘_; flip...
------------------------------------------------------------------------ -- The Agda standard library -- -- Lexicographic products of binary relations ------------------------------------------------------------------------ -- The definition of lexicographic product used here is suitable if -- the left-hand relation i...
-- Andreas, 2016-10-10, AIM XXIV {-# REWRITE #-} -- This should yield a warning.
-- Andreas, 2016-12-31, issue #2371 reported by subttle -- Module parameter Nat shadowed by import module Issue2371 (Nat : Set) where open import Agda.Builtin.Nat -- C-c C-n zero RET -- ERROR WAS: -- An internal error has occurred. Please report this as a bug. -- Location of the error: src/full/Agda/Utils/List.hs:3...
{-# OPTIONS --sized-types #-} module Rose where postulate Size : Set _^ : Size -> Size ∞ : Size {-# BUILTIN SIZE Size #-} {-# BUILTIN SIZESUC _^ #-} {-# BUILTIN SIZEINF ∞ #-} data List (A : Set) : {_ : Size} -> Set where [] : {size : Size} -> List A {size ^} _::_ : {size : Size} -> A -> List A {s...
module Terms where open import Library -- * Variables ------------------------------------------------------------------------ data Ty : Set where base : Ty _→̂_ : (a b : Ty) → Ty -- Typing contexts. Cxt = List Ty -- Variables. data Var : (Γ : Cxt) (a : Ty) → Set where zero : ∀{Γ a} → Var (...
{-# BUILTIN CUBEINTERVALUNIV IUniv #-}
{-# OPTIONS --cubical --safe #-} -- | Quotient integer module QuoInt where open import Cubical.Core.Everything open import Cubical.HITs.Ints.QuoInt renaming (_+ℤ_ to _+_; ℤ to Z) open import Cubical.Data.Nat hiding (_+_) open import Cubical.Foundations.Prelude +-i-zero : ∀ a i → posneg i + a ≡ a +-i-zero a i = co...
module Categories.Monoidal.CartesianClosed where
{-# OPTIONS --safe #-} module Cubical.Algebra.Monoid.Base where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Equiv.HalfAdjoint open import Cubical.Foundations.Function open import Cubical.Foundations.HLevels open import Cubical.Foundations.Isomorphism op...
module Numeral.Matrix where import Lvl open import Syntax.Number open import Data open import Data.Boolean open import Data.Tuple as Tuple using (_⨯_ ; _,_) open import Functional using (const) open import Numeral.Finite open import Numeral.Finite.Bound open import Numeral.Finite.Oper open import Numeral.Finite.O...
module Data.Fin.Properties.Extra where open import Data.Nat renaming (suc to S; zero to Z; _+_ to _ℕ+_; _*_ to _ℕ*_) open ≤-Reasoning renaming (begin_ to start_; _∎ to _□; _≡⟨_⟩_ to _≈⟨_⟩_) open import Data.Nat.Properties open import Data.Nat.Properties.Extra renaming (cancel-suc to S-injective) open import Data.N...
-- Martin-Löf identity type without the K axiom -- (we do not assume uniqueness of identity proofs). {-# OPTIONS --without-K --safe #-} module Tools.PropositionalEquality where -- We reexport Agda's builtin equality type. open import Tools.Empty public import Relation.Binary.PropositionalEquality as Eq open Eq usin...
{-# OPTIONS --without-K #-} module sets.fin where open import sets.fin.core public open import sets.fin.properties public open import sets.fin.ordering public open import sets.fin.universe public
{-# OPTIONS --without-K #-} open import Base open import Homotopy.TruncatedHIT {- The idea is that if [n : ℕ] and [A : Set i], then [τ n A] is defined by the following n-truncated higher inductive type: module Homotopy.TruncationHIT {i} (n : ℕ) (A : Set i) where (n)data τ : Set i where proj : A → τ M...
-- Andreas, 2016-07-17 record R : Set₁ where abstract field T : Set -- Expected error: -- -- Using abstract here has no effect. Abstract applies only -- definitions like data definitions, record type definitions and -- function clauses.
module Prelude.Unit where open import Agda.Builtin.Unit public record ⊤′ {a} : Set a where instance constructor tt -- To keep changes from compat-2.4.0 to a minimum. Unit = ⊤ pattern unit = tt
{-# OPTIONS --without-K --safe #-} module Categories.Kan where -- Left and Right Kan extensions (known as Lan and Ran) open import Level open import Categories.Category using (Category) open import Categories.Functor open import Categories.NaturalTransformation using (NaturalTransformation; _∘ʳ_; _∘ᵥ_) open import Ca...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Category.Complete.Finitely module Categories.Category.Complete.Finitely.Properties {o ℓ e} {C : Category o ℓ e} (finite : FinitelyComplete C) where open import Level using (Level) open import Data.Nat using (ℕ) open import Data...
{-# OPTIONS --prop --type-in-type #-} record × (A B : Prop) : Prop where field fst : A snd : B
{-# OPTIONS --safe #-} postulate F : Set → Set {-# POLARITY F ++ #-}
{-# OPTIONS --no-termination-check #-} module Data.Bin.DivModTests where open import Data.Bin.DivMod open Everything using (BinFin; _divMod_; result) open import IO open import Data.Bin hiding (suc; fromℕ) open import Data.String hiding (_≟_) open import Data.Unit hiding (_≟_) open import Coinduction open import Data...
open import Nat open import Prelude open import List open import judgemental-erase open import statics-checks open import statics-core module constructability where -- we construct expressions and types by induction on their -- structure. for each sub term, we call the relevant theorem, then -- assemble the resu...
-- Andreas, 2017-01-12, issue #2386 postulate B : Set data _≡_ {A B : Set} (x : A) : A → Set where refl : (b : B) → x ≡ x {-# BUILTIN EQUALITY _≡_ #-} -- Wrong type of _≡_
open import Prelude module Implicits.Substitutions.Context where open import Implicits.Syntax.Type open import Implicits.Syntax.Context open import Implicits.Substitutions.Type as TS using () open import Data.Fin.Substitution open import Data.Star as Star hiding (map) open import Data.Star.Properties open import Dat...
{-# OPTIONS --without-K --rewriting #-} open import lib.Basics open import lib.cubical.Square open import lib.types.Group open import lib.types.EilenbergMacLane1.Core module lib.types.EilenbergMacLane1.PathElim where module _ {i} (G : Group i) where private module G = Group G module EM₁Level₂PathElim {k} {...
postulate ANY : ∀{a}{A : Set a} → A data Ty : Set where _⇒_ : (a b : Ty) → Ty data Tm : (b : Ty) → Set where S : ∀{c a b} → Tm ((c ⇒ (a ⇒ b)) ⇒ ((c ⇒ a) ⇒ (c ⇒ b))) _∙_ : ∀{a b} (t : Tm (a ⇒ b)) (u : Tm a) → Tm b data _↦_ : ∀{a} (t t' : Tm a) → Set where ↦S : ∀{c a b} {t : Tm (c ⇒ (a ⇒ b))} {u : Tm (c ...
-- The error on Agda 2.5.3 was: -- An internal error has occurred. Please report this as a bug. -- Location of the error: src/full/Agda/TypeChecking/Substitute/Class.hs:209 open import Agda.Primitive using (_⊔_ ; Level ; lsuc) record Unit {U : Level} : Set U where -- error still occurs with no constructors or fields...
{- 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 -} {-# OPTIONS --allow-unsolved-metas #-} -- This module proves the two "V...
open import Data.Product using ( _,_ ) open import Data.Sum using ( inj₁ ; inj₂ ) open import Web.Semantic.DL.ABox.Interp using ( _*_ ) open import Web.Semantic.DL.ABox.Model using ( *-resp-⟨ABox⟩ ) open import Web.Semantic.DL.Category.Object using ( Object ; iface ) open import Web.Semantic.DL.Category.Morphism using ...
module Algebra.LabelledGraph where open import Algebra.Dioid -- Core graph construction primitives data LabelledGraph {D eq} (d : Dioid D eq) (A : Set) : Set where ε : LabelledGraph d A -- Empty graph v : A -> LabelledGraph d A -- Graph comprising a single vertex _[_]>_ : LabelledGraph d A -> D -...
open import Agda.Builtin.Bool works : Bool → Bool works b with b | true ... | b′ | _ = b′ fails : Bool → Bool fails b with b′ ← b | true ... | _ = b′
module CS410-Functor where open import CS410-Prelude record Functor (T : Set -> Set) : Set1 where field -- OPERATIONS ---------------------------------------------- map : forall {X Y} -> (X -> Y) -> T X -> T Y -- LAWS ---------------------------------------------------- mapid : forall {X}(x : ...
module DualTail1 where open import Data.Nat open import Data.Fin using (Fin; zero; suc) open import Data.Product open import Function using (id; _∘_) open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Types.Direction open import Types.IND1 as IND hiding (GType; Type; SType; _≈_; _≈'_) ...
open import Data.Nat open import Data.Nat.Show open import IO module Ackermann where ack : ℕ -> ℕ -> ℕ ack zero n = n + 1 ack (suc m) zero = ack m 1 ack (suc m) (suc n) = ack m (ack (suc m) n) main = run (putStrLn (show (ack 3 9)))
{-# OPTIONS --type-in-type #-} module CS410-Categories where open import CS410-Prelude postulate extensionality : {S : Set}{T : S -> Set} {f g : (x : S) -> T x} -> ((x : S) -> f x == g x) -> f == g imp : {S : Set}{T : S -> Set}(f : (x : S) -> T x){x : S} -> ...
{-# OPTIONS --safe #-} open import Definition.Typed.EqualityRelation module Definition.LogicalRelation.Substitution.Introductions.Pair {{eqrel : EqRelSet}} where open EqRelSet {{...}} open import Definition.Untyped as U hiding (wk) open import Definition.Untyped.Properties open import Definition.Typed open import De...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Lift open import lib.types.Paths open import lib.types.Pointed module lib.types.Unit where tt = unit ⊙Unit : Ptd₀ ⊙Unit = ⊙[ Unit , unit ] abstract -- Unit is contractible Unit-is-contr : is-contr Unit Unit-is-contr = (unit , λ y → idp)...
module _ where -- Should not be able to give by name id : {_ = A : Set} → A → A id x = x works : (X : Set) → X → X works X = id {X} fails : (X : Set) → X → X fails X = id {A = X}
module Text.Greek.SBLGNT.2Pet where open import Data.List open import Text.Greek.Bible open import Text.Greek.Script open import Text.Greek.Script.Unicode ΠΕΤΡΟΥ-Β : List (Word) ΠΕΤΡΟΥ-Β = word (Σ ∷ υ ∷ μ ∷ ε ∷ ὼ ∷ ν ∷ []) "2Pet.1.1" ∷ word (Π ∷ έ ∷ τ ∷ ρ ∷ ο ∷ ς ∷ []) "2Pet.1.1" ∷ word (δ ∷ ο ∷ ῦ ∷ ∙λ ∷ ο ∷ ...
module Chain { A : Set } (_==_ : A -> A -> Set ) (refl : (x : A) -> x == x) (trans : (x y z : A) -> x == y -> y == z -> x == z) where infix 2 chain>_ infixl 2 _===_ infix 3 _by_ chain>_ : (x : A) -> x == x chain> x = refl _ _===_ : {x y z : A} -> x == y -> y == z -> x == z xy === y...
{-# OPTIONS --without-K --safe #-} open import Algebra.Construct.DirectProduct module Construct.DirectProduct where open import Algebra.Bundles import Algebra.Construct.DirectProduct as DirectProduct open import Data.Product open import Data.Product.Relation.Binary.Pointwise.NonDependent open import Level using (Lev...
------------------------------------------------------------------------ -- The Agda standard library -- -- Core lemmas for division and modulus operations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Nat.DivMod.Core where open import Agda.Bu...
open import SOAS.Metatheory.Syntax -- Metasubstitution operation module SOAS.Metatheory.SecondOrder.Metasubstitution {T : Set}(Syn : Syntax {T}) where open Syntax Syn open import SOAS.Metatheory.FreeMonoid Syn open import SOAS.Common open import SOAS.Families.Core {T} open import SOAS.Families.Build open import SO...
-- Andreas, 2016-10-11, AIM XXIV, issue #2248 -- COMPILED_TYPE should only work on postulates data Unit : Set where unit : Unit abstract IO : Set → Set IO A = A doNothing : IO Unit doNothing = unit {-# COMPILED_TYPE IO IO #-} main : IO unit main = doNothing
-- an example showing how to use sigma types to define a type for non-zero natural numbers module nat-nonzero where open import bool open import eq open import nat open import nat-thms open import product ℕ⁺ : Set ℕ⁺ = Σ ℕ (λ n → iszero n ≡ ff) suc⁺ : ℕ⁺ → ℕ⁺ suc⁺ (x , p) = (suc x , refl) _+⁺_ : ℕ⁺ → ℕ⁺ → ℕ⁺ (x , ...
{-# OPTIONS --safe #-} module Definition.Typed.Consequences.Inequality where open import Definition.Untyped hiding (U≢ℕ; U≢Π; U≢ne; ℕ≢Π; ℕ≢ne; Π≢ne; U≢Empty; ℕ≢Empty; Empty≢Π; Empty≢ne) open import Definition.Typed open import Definition.Typed.Properties open import Definition.Typed.EqRelInstance open import Definiti...
{- This file contains: - Definitions equivalences - Glue types -} {-# OPTIONS --cubical --safe #-} module Cubical.Core.Glue where open import Cubical.Core.Primitives open import Agda.Builtin.Cubical.Glue public using ( isEquiv -- ∀ {ℓ ℓ'} {A : Type ℓ} {B : Type ℓ'} (f : A → B) → Type (ℓ ⊔ ℓ') ; e...
-- This module explains how to combine elimination of empty types with pattern -- match style definitions without running into problems with decidability. module Introduction.Data.Empty where -- First we introduce an empty and a singleton type. data Zero : Set where data One : Set where one : One -- There is a s...
{-# OPTIONS --type-in-type #-} Ty : Set Ty = (Ty : Set) (nat top bot : Ty) (arr prod sum : Ty → Ty → Ty) → Ty nat : Ty; nat = λ _ nat _ _ _ _ _ → nat top : Ty; top = λ _ _ top _ _ _ _ → top bot : Ty; bot = λ _ _ _ bot _ _ _ → bot arr : Ty → Ty → Ty; arr = λ A B Ty nat top bot arr prod sum → ...
{-# OPTIONS --without-K #-} open import Base open import Spaces.Interval module Spaces.IntervalProps where bool-split : bool {zero} → Set bool-split true = unit bool-split false = ⊥ -- If [bool] is contractible, then [true ≡ false] bool-contr-path : is-contr (bool {zero}) → true ≡ false bool-contr-path (x , f) = (f...
-- Giving /lift \phi/ the the first hole TWICE (the first time you get an type error), causes the following internal error: -- An internal error has occurred. Please report this as a bug. -- Location of the error: -- src/full/Agda/TypeChecking/Reduce/Monad.hs:118 ------------------------------------------------...
{-# OPTIONS --type-in-type #-} module meta-cedille where open import Data.String using (toList) open import IO using (Main; run) open import Monads.Except open import Monads.ExceptT open import Prelude open import Prelude.Strings open import Parse.Generate open import Parse.TreeConvert open import Bootstrap.InitEnv...
------------------------------------------------------------------------ -- Functors and natural transformations (for 1-categories) ------------------------------------------------------------------------ -- The code is based on the presentation in the HoTT book (but might -- not follow it exactly). {-# OPTIONS --wit...
-- Binding signatures module SOAS.Syntax.Signature (T : Set) where open import SOAS.Syntax.Arguments {T} open import SOAS.Common open import SOAS.Context open import SOAS.Variable open import SOAS.Families.Core {T} open import SOAS.Families.BCCC {T} using (⊤ₘ) open import SOAS.Coalgebraic.Strength open import SOAS...
{- Definition of the torus as a HIT together with a proof that it is equivalent to two circles -} {-# OPTIONS --cubical --safe #-} module Cubical.HITs.Torus.Base where open import Cubical.Core.Glue open import Cubical.Foundations.Prelude open import Cubical.Foundations.Equiv open import Cubical.Foundations.Isomorph...