text
stringlengths
4
690k
open import Relation.Binary.Core module TreeSort.Impl2.Correctness.Permutation {A : Set} (_≤_ : A → A → Set) (tot≤ : Total _≤_) where open import BBSTree _≤_ open import Bound.Total A open import Bound.Total.Order _≤_ open import Data.List open import Data.Sum open import List.P...
-- Jesper, 2017-01-24: if we allow a variable to be instantiated with a value -- of a supertype, the resulting dot pattern won't be type-correct. open import Common.Size data D (i : Size) : (j : Size< ↑ i) → Set where c : ∀ (j : Size< ↑ i) (k : Size< ↑ j) → D i j → D j k → D i k split : ∀ i ...
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import homotopy.EilenbergMacLane module cohomology.CupProduct.OnEM.InLowDegrees2 {i} {j} (G : AbGroup i) (H : AbGroup j) where private module G = AbGroup G module H = AbGroup H module G⊗H = TensorProduct G H open EMExplicit G⊗H.abgroup open import ...
------------------------------------------------------------------------------ -- Axiomatic PA propositional equality ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphi...
module Numeral.Natural.Oper.Proofs where import Lvl open import Functional open import Logic open import Logic.Propositional open import Logic.Predicate open import Numeral.Natural open import Numeral.Natural.Oper open import Numeral.Natural.Induction open import Relator.Equals open import Relator.Equals.Proofs open i...
------------------------------------------------------------------------ -- The Agda standard library -- -- The basic code for equational reasoning with a single relation ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Rel...
module PatternSynonymUnderapplied where data Nat : Set where zero : Nat suc : Nat -> Nat pattern suc' x = suc x f : Nat -> Nat f zero = zero f suc' = zero
{-# OPTIONS --rewriting #-} -- Normalization by Evaluation for Graded Call-By-Push-Value. module GradedCBPV where -- Imports from the Agda standard library. open import Library hiding (_×̇_) pattern here! = here refl open import Data.Nat using (ℕ) open import Data.Fin using (Fin) open import ProMonoid as _ -- We...
{-# OPTIONS --without-K #-} module Lecture8 where import Lecture7 open Lecture7 public -- Section 8.1 Propositions is-prop : {i : Level} (A : UU i) → UU i is-prop A = (x y : A) → is-contr (Id x y) is-prop-empty : is-prop empty is-prop-empty () is-prop-unit : is-prop unit is-prop-unit = is-prop-is-contr is-contr-u...
module MLib.Fin.Parts.Nat where open import MLib.Prelude open import MLib.Fin.Parts.Core open Nat using (_*_; _+_; _<_) open Fin using (fromℕ≤) open Table module Impl where tryLookup : ∀ {n} {a} {A : Set a} → A → Table A n → ℕ → A tryLookup {n = zero} z t _ = z tryLookup {n = suc n} z t zero = lookup t zero ...
Type-of : {A : Set} → A → Set Type-of {A = A} _ = A module _ (A : Set) where Foo : A → Set Foo a with Type-of a ... | B = B
module RecordPatternMatching where record _×_ (A B : Set) : Set where constructor _,_ field proj₁ : A proj₂ : B data Unit : Set where unit : Unit foo : Unit × Unit → Unit foo (x , y) = {!!} record Box (A : Set) : Set where constructor [_] field proj : A bar : Box Unit → Unit bar [ x ] = {!!}
------------------------------------------------------------------------ -- The Agda standard library -- -- Unary relations ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Relation.Unary where open import Data.Empty open import Data.Unit.Base using (...
-- Andreas, 2016-06-20, issue #1891 -- Computation of which variables are splittable was wrong -- in the presence of a where-module. -- {-# OPTIONS -v interaction.case:20 #-} data D : Set where c : D test : (x : D) → D test x = {!x!} -- C-c C-c where y = c -- WAS: -- Splitting on x reports: -- Not a (split...
open import Data.Nat using (ℕ; _+_) renaming (_≤?_ to _≤?ₙ_) open import Data.Bool using (Bool; true; false; not; _∧_) open import Data.String using (String; _≟_) open import Data.Sum using (_⊎_; [_,_]′; inj₁; inj₂) open import Data.Product using (_×_; _,_) open import Relation.Nullary u...
module Category.Monoidal where open import Category.NatIsomorphism
-- {-# OPTIONS --show-implicit --show-irrelevant #-} module Data.QuadTree.FoldableProofs.FoldableProof where open import Haskell.Prelude renaming (zero to Z; suc to S) open import Data.Logic open import Data.QuadTree.Implementation.Definition open import Data.QuadTree.Implementation.ValidTypes open import Data.QuadTre...
open import Nat open import Prelude open import List open import contexts open import core -- This file is a glorious testament to all of agda's greatest strengths - -- a beautiful work that will shine brightly throughout the ages and instill -- hope for the future in many generations to come. May I never use any oth...
{-# OPTIONS --cubical --no-import-sorts --safe --experimental-lossy-unification #-} module Cubical.ZCohomology.Groups.Wedge where open import Cubical.ZCohomology.Base open import Cubical.ZCohomology.GroupStructure open import Cubical.ZCohomology.Properties open import Cubical.Foundations.HLevels open import Cubical.Fo...
------------------------------------------------------------------------ -- The Agda standard library -- -- Consequences of a monomorphism between group-like structures ------------------------------------------------------------------------ -- See Data.Nat.Binary.Properties for examples of how this and similar -- mod...
{-# OPTIONS --without-K --safe #-} module Loop.Bundles where open import Algebra.Core open import Relation.Binary open import Level open import Loop.Structures open import Algebra.Bundles open import Algebra.Structures record LeftBolLoop c ℓ : Set (suc (c ⊔ ℓ)) where field Carrier : Set c _≈_ : Rel Ca...
------------------------------------------------------------------------ -- Support for reflection ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Equality module TC-monad {reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where impor...
------------------------------------------------------------------------ -- The Agda standard library -- -- The irrelevance axiom ------------------------------------------------------------------------ module Irrelevance where import Level ------------------------------------------------------------------------ -- ...
open import Agda.Builtin.Nat open import Agda.Builtin.Bool test1 : Nat → Nat test1 zero = 0 test1 (suc zero) = 1 test1 (suc n) = {!n!} test2 : Nat → Nat → Nat test2 zero zero = zero test2 zero (suc y) = y test2 x y = {!x!} test3 : Bool → Bool → Bool → Bool test3 true true true = true test3 x ...
-- 2013-12-28 Andreas, issue reported by Christian Sattler {-# OPTIONS --allow-unsolved-metas #-} {-# OPTIONS -v tc.cc:15 #-} -- Keep! Debug printing triggered the problem. record Σ (A : Set) (B : A → Set) : Set where field fst : A snd : B fst test : {A : Set} → Σ A (λ {_ → A}) test = _ -- This used to tr...
{-# OPTIONS --universe-polymorphism #-} module Desc where --******************************************** -- Prelude --******************************************** -- Some preliminary stuffs, to avoid relying on the stdlib --**************** -- Universe polymorphism --**************** data Level : Set where z...
open import Agda.Builtin.Nat open import Agda.Builtin.Equality postulate +-comm : ∀ m n → m + n ≡ n + m -- Note that the following does not work because -- p+q is not abstracted over in `+-comm p q` which means -- Agda gets stuck trying to unify `p + q` and `q + p` -- Cf. test/Succeed/UsingEq.agda rew : ∀ m n p q →...
{-# OPTIONS --rewriting #-} postulate _↦_ : ∀ {a} {A : Set a} → A → A → Set {-# BUILTIN REWRITE _↦_ #-} open import Agda.Primitive postulate mekker : Level → Level → Set moomoo : Level → Set → Set rew : (a b : Level) → moomoo (a ⊔ b) (mekker a b) ↦ (Level → Level) {-# REWRITE rew #-} works : {a b : Level} → ...
{-# OPTIONS --without-K #-} -- Finite types and paths between them module FT where open import Data.Empty open import Data.Unit open import Data.Nat open import Data.Sum open import Data.Product infixl 10 _◎_ ------------------------------------------------------------------------------ -- Finite types data FT : ...
module sum where open import level open import bool open import eq open import maybe open import product ---------------------------------------------------------------------- -- datatypes ---------------------------------------------------------------------- data _⊎_ {ℓ ℓ'} (A : Set ℓ) (B : Set ℓ') : Set (ℓ ⊔ ℓ') w...
open import Nat open import Prelude open import List open import contexts open import core open import lemmas-env module preservation where preservation : ∀{⛽ Δ Σ' Γ E e r k τ} → Δ , Σ' , Γ ⊢ E → Δ , Σ' , Γ ⊢ e :: τ → E ⊢ e ⌊ ⛽ ⌋⇒ r ⊣ k → ...
open import Common.IO open import Common.Unit open import Common.String open import Common.Nat record Stream (A : Set) : Set where coinductive field head : A tail : Stream A open Stream public repeat : Stream String head repeat = "hello" tail repeat = repeat lookup : ∀ {A} → Stream A → Nat → A lookup xs...
-- | An implementation of the Marketoritative PCM module Relation.Ternary.Separation.Construct.Market where open import Level hiding (Lift) open import Data.Product open import Relation.Unary open import Relation.Binary hiding (_⇒_) open import Relation.Binary.PropositionalEquality as P open import Relation.Ternary....
open import FRP.JS.List using ( List ; [] ; _∷_ ; build ) renaming ( length to llength ) open import FRP.JS.Char using ( Char ) renaming ( _<_ to _<C_ ; _≟_ to _≟C_ ) open import FRP.JS.Nat using ( ℕ ) open import FRP.JS.Bool using ( Bool ; true ; false ; _∧_ ; _∨_ ) module FRP.JS.String where infixr 5 _++_ infix 4 _...
open import Level using () renaming (zero to ℓ₀) open import Relation.Binary using (DecSetoid) module BFFPlug (A : DecSetoid ℓ₀ ℓ₀) where open import Data.Nat using (ℕ ; _≟_ ; _+_ ; zero ; suc ; ⌈_/2⌉) open import Data.Maybe using (Maybe ; just ; nothing) open import Data.Vec using (Vec) open import Data.Product usin...
------------------------------------------------------------------------------ -- Subtraction using the rec combinator ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorph...
module Types4 where open import Basics public {-----------------------------------------------------------------------} -- balanced search trees (based on my ICFP '14 paper -- How to Keep Your Neighbours in Order -- but the point here is to watch what the types buy us {-------------------------...
{-# OPTIONS --cubical --allow-unsolved-metas #-} module TranspPiOnMeta where open import Agda.Primitive.Cubical open import Agda.Builtin.Cubical.Path -- Transporting along a function type with unknown sort of -- domain/codomain shouldn't result into an impossible being thrown. -- We equate to Set to trigger reducti...
{-# OPTIONS --safe #-} module tmp where open import Relation.Nullary open import Data.List public data Suf {X : Set} : List X → List X → Set where sinit : ∀ l → Suf l l scons : ∀ x l l' → Suf l l' → Suf (x ∷ l) l' lemma : ∀ {X} (x : X) l l' → Suf l (x ∷ l') → Suf l l' lemma x .(x ∷ l') l' (sinit .(x ∷ l')) = sco...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Group open import lib.types.Unit open import lib.groups.Homomorphisms open import lib.groups.Lift module lib.groups.Unit where Unit-group-structure : GroupStructure Unit Unit-group-structure = record { ident = unit ; inv = λ _ → unit ; co...
{-# OPTIONS --omega-in-omega --no-termination-check --overlapping-instances #-} module Light.Library.Data.Product where open import Light.Level using (Level ; Setω) open import Light.Variable.Sets open import Light.Variable.Levels import Light.Library.Data.Both as Both open import Light.Library.Relation.Binary ...
------------------------------------------------------------------------ -- The Agda standard library -- -- An irrelevant version of ⊥-elim ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} module Data.Empty.Irrelevant where open import Data.Empty hiding (⊥-e...
module _^_ where import Relation.Binary.PropositionalEquality as Eq open Eq using (_≡_) open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) open import Naturals using (ℕ; zero; suc; _*_) _^_ : ℕ → ℕ → ℕ _ ^ zero = 1 m ^ (suc n) = m * (m ^ n) _ : 3 ^ 4 ≡ 81 _ = begin 3 ^ 4 ≡⟨⟩ 3 * (3 ^ 3) ≡⟨⟩ 3 * (3 *...
-- Andreas, 2011-10-03 -- Defining a universe for dependent types -- where the El function only depends on the type code but not on its -- proof of well-formedness {-# OPTIONS --experimental-irrelevance --show-implicit --show-irrelevant #-} module TerminationOnIrrelevantArgument where data ⊥ : Set where data D : Set ...
{-# OPTIONS --rewriting --prop #-} open import Agda.Builtin.Nat data ⊥ : Prop where data _≡_ {A : Set} (x : A) : A → Set where refl : x ≡ x {-# BUILTIN REWRITE _≡_ #-} infix 4 _≡_ ⊥-elim : {A : Set} → ⊥ → A ⊥-elim () ok : (n : Nat) (p : ⊥) → (n + n) ≡ 0 ok n p = ⊥-elim p {-# REWRITE ok #-} notok : (n : Nat) →...
module SystemF.Syntax.Term where open import Prelude open import SystemF.Syntax.Type infixl 9 _[_] _·_ data Term (ν n : ℕ) : Set where var : (x : Fin n) → Term ν n Λ : Term (suc ν) n → Term ν n λ' : Type ν → Term ν (suc n) → Term ν n _[_] : Term ν n → Type ν → Term ν n _·_ : Term ν n → Term ν n → Ter...
module Mockingbird.Forest.Base where open import Algebra using (Op₂; Congruent₂; LeftCongruent; RightCongruent) open import Level using (_⊔_) renaming (suc to lsuc) open import Relation.Binary using (Rel; IsEquivalence; Setoid) open import Relation.Nullary using (¬_) record IsForest {b ℓ} (Bird : Set b) (_≈_ : Rel Bi...
module Data.BitVector where open import Algebra.FunctionProperties.Core using (Op₁; Op₂) open import Data.Bool public hiding (_≟_) renaming (Bool to Bit; false to 0#; true to 1#) open import Data.Nat using (ℕ) renaming (_+_ to _N+_; _*_ to _N*_; zero to Nzero; suc to Nsuc) open import Data.Product...
module Subst (Gnd : Set)(U : Set)(El : U -> Set) where open import Basics open import Pr open import Nom import Kind open Kind Gnd U El import Cxt open Cxt Kind import Loc open Loc Kind import Term open Term Gnd U El import Shift open Shift Gnd U El import Inst open Inst Gnd U El data _-[_]_ : Cxt -> Kind -> Cxt -> S...
{-# OPTIONS --without-K #-} module Ch2-4 where open import Level hiding (lift) open import Ch2-1 open import Ch2-2 open import Ch2-3 -- Definition 2.4.1 (homotopy) infixl 8 _~_ _~_ : ∀ {a b} {A : Set a} {P : A → Set b} → (f g : (z : A) → P z) → Set (a ⊔ b) _~_ {a} {b} {A} {P} f g = ∀ (x : A) → f x ≡ g x -- Le...
-- Andreas, 2016-07-08 testing the access to definitions in where blocks -- Anonymous where modules do export pub0 = priv0 module _ where priv0 = Set works = priv0 -- Should succeed -- Unnamed where modules don't export pub = priv where priv = Set fail = priv -- Should fail
{-# OPTIONS --without-K --rewriting #-} open import HoTT open import cw.CW open import homotopy.DisjointlyPointedSet open import cohomology.Theory open import cohomology.ChainComplex module cw.cohomology.ReconstructedCochainsIsoCellularCochains {i : ULevel} (OT : OrdinaryTheory i) where open OrdinaryTheory OT ...
{-# OPTIONS --without-K #-} module Examples.BooleanCircuits where open import Data.Empty using (⊥) open import Data.Unit using (⊤; tt) open import Data.Sum using (_⊎_; inj₁; inj₂; [_,_]′) open import Data.Product using (_×_; _,_; proj₁; proj₂) open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym;...
{-# OPTIONS --rewriting --without-K #-} open import Agda.Primitive open import Prelude import GSeTT.Typed-Syntax import Globular-TT.Syntax {- Type theory for globular sets -} module Globular-TT.Eqdec-syntax {l} (index : Set l) (eqdec-index : eqdec index) where open import Globular-TT.Syntax index eqdec-Ty :...
{-# OPTIONS --without-K --rewriting #-} open import HoTT -- an attempt to speed up [QuotGroup (quot-of-sub (ker-prop ...) (im-nprop ...))] -- which removes most intermediate constructions module groups.KernelImage {i j k} {G : Group i} {H : Group j} {K : Group k} (ψ : H →ᴳ K) (φ : G →ᴳ H) (H-ab : is-abelian H) w...
open import Data.Graph module Data.Graph.Path.Search {ℓᵥ ℓₑ} (g : FiniteGraph ℓᵥ ℓₑ) where open import Data.Graph.Path.Cut g open import Data.Graph.Path.Finite g open import Data.Product as Σ open import Data.Sum as ⊎ open import Data.Vec as Vec open import Finite open import Function open import Level open import Re...
open import Agda.Builtin.Bool impor Agda.Builtin.Nat import Agda.Builtin.Sigma module issue4888 where
{-# OPTIONS --without-K --safe #-} module Data.Binary.Tests.Addition where import Data.Binary.Operations.Addition as 𝔹 open import Data.Binary.Tests.Helpers open import Relation.Binary.PropositionalEquality import Data.Nat as ℕ _ : 𝔹._+_ ≡⌈ 60 ⌉₂≡ ℕ._+_ _ = refl
------------------------------------------------------------------------ -- The Agda standard library -- -- An example of how the Record module can be used ------------------------------------------------------------------------ -- Taken from Randy Pollack's paper "Dependently Typed Records in Type -- Theory". module...
module Golden.FstSnd where open import Agda.Builtin.Nat data Tuple a b : Set where Tup : a -> b -> Tuple a b fst : {a b : Set} -> Tuple a b -> a fst (Tup x x₁) = x snd : {a b : Set} -> Tuple a b -> b snd (Tup x b) = b tup1 : Tuple Nat Nat tup1 = Tup 0 1 a = fst tup1 b = snd tup1
{-# OPTIONS --cubical #-} module _ where open import Agda.Builtin.Equality -- Option --cubical implies --without-K uip : {A : Set} {x : A} (p : x ≡ x) → p ≡ refl uip refl = refl
-- Check that checking of left-hand sides are postponed properly -- when the type of an argument that is matched on is a meta. data Nat : Set where zero : Nat suc : Nat → Nat data X : Set where zero : X easy : _ → Nat easy (suc n) = n easy zero = zero -- TODO: uncomment below once LHS postponing is actua...
{-# OPTIONS --allow-unsolved-metas #-} open import Data.Nat -- using (ℕ; suc; zero; s≤s ; z≤n ) module FLComm (n : ℕ) where open import Level renaming ( suc to Suc ; zero to Zero ) hiding (lift) open import Data.Fin hiding ( _<_ ; _≤_ ; _-_ ; _+_ ; _≟_) open import Data.Fin.Properties hiding ( <-trans ; ≤-refl ; ≤-tr...
module _ where open import Common.Prelude renaming (_∸_ to _-_) -- work-around for #1855 data Acc {a} {A : Set a} (_<_ : A → A → Set) (x : A) : Set a where acc : (∀ y → y < x → Acc _<_ y) → Acc _<_ x data _<_ : Nat → Nat → Set where zero : ∀ {n} → zero < suc n suc : ∀ {n m} → n < m → suc n < suc m _≤_ : Nat...
module Data.Star.Indexed where open import Relation.Binary open import Function open import Level infixr 10 _◅_ data Star {i a t}(I : Set i){A : I → Set a} (T : ∀ n m → REL (A n) (A m) t) : ∀ {n m : I} → REL (A n) (A m) (i ⊔ a ⊔ t) where ε : ∀ {i}{x : A i} → Star I T x x _◅_ : ∀ {n m k : I}{x : A n}{y : A ...
open import Nat open import Prelude open import core open import lemmas-gcomplete module lemmas-complete where -- no term is both complete and indeterminate lem-ind-comp : ∀{d} → d dcomplete → d indet → ⊥ lem-ind-comp DCVar () lem-ind-comp DCConst () lem-ind-comp (DCLam comp x₁) () lem-ind-comp (DCAp comp...
-- Andreas, 2020-03-27, issue #4534 -- Better error message for quote. open import Agda.Builtin.Reflection quote₀ : Set → Name quote₀ X = quote X -- Cannot quote a variable X -- when checking that the expression quote X has type Name
{-# OPTIONS --without-K #-} module well-typed-syntax-context-helpers where open import common open import well-typed-syntax open import well-typed-syntax-helpers □_ : Typ ε → Set □_ T = Term {Γ = ε} T
open import Everything module Test.Surjidentity where module _ {𝔬₁ 𝔯₁ 𝔬₂ 𝔯₂ ℓ₂} {𝔒₁ : Ø 𝔬₁} (_∼₁_ : 𝔒₁ → 𝔒₁ → Ø 𝔯₁) {𝔒₂ : Ø 𝔬₂} (_∼₂_ : 𝔒₂ → 𝔒₂ → Ø 𝔯₂) (_∼₂'_ : 𝔒₂ → 𝔒₂ → Ø 𝔯₂) (_∼̇₂_ : ∀ {x y} → x ∼₂ y → x ∼₂ y → Ø ℓ₂) (_∼̇₂'_ : ∀ {x y} → x ∼₂' y → x ∼₂' y → Ø ℓ₂) (ε₁ : Reflexivit...
------------------------------------------------------------------------ -- The Agda standard library -- -- Convenient syntax for reasoning with a partial setoid ------------------------------------------------------------------------ {-# OPTIONS --cubical --no-import-sorts --safe #-} open import Cubical.Core.Everyth...
open import Agda.Builtin.Bool open import Agda.Builtin.Equality open import Agda.Builtin.Float NaN : Float NaN = primFloatDiv 0.0 0.0 defNaN : NaN ≡ NaN defNaN = refl primEqNaN : primFloatEquality NaN NaN ≡ true primEqNaN = refl
module Lemmachine where open import Lemmachine.Request public open import Lemmachine.Response public open import Lemmachine.Resource public open import Lemmachine.Resource.Configure public open import Lemmachine.Resolve open import Lemmachine.Utils public open import Lemmachine.Runner public open import Data.Bool publ...
open import Prelude module Implicits.Semantics.Preservation where open import Implicits.Syntax open import Implicits.WellTyped open import Implicits.Semantics.Type open import Implicits.Semantics.Context open import Implicits.Semantics.Lemmas open import Implicits.Semantics.RewriteContext open import Implicits.Semant...
-- Andreas, 2012-03-09, example by Ulf {-# OPTIONS -v tc.conv.irr:50 -v tc.decl.ax:10 -v tc.decl.mutual:20 #-} module Issue351-5 where open import Common.Prelude open import Common.Equality open import Common.Irrelevance postulate foo : (x : Squash Nat) → ((r : Squash Nat) → r ≡ squash (suc (unsquash x))) → Set b...
module Path where open import Basics hiding (_==_) open import Proc import Graph private open module G = Graph Nat data Node : Set where node : Nat -> Node stop : Node _==_ : Node -> Node -> Bool stop == stop = true node zero == node zero = true node (suc n) == node (suc m) = node n == no...
{-# OPTIONS --safe --warning=error --without-K #-} open import Setoids.Setoids open import Groups.Definition open import Sets.EquivalenceRelations module Groups.Lemmas {a b : _} {A : Set a} {_·_ : A → A → A} {S : Setoid {a} {b} A} (G : Group S _·_) where open Setoid S open Group G open Equivalence eq groupsHaveLeft...
open import MLib.Algebra.PropertyCode module MLib.Algebra.PropertyCode.Dependent {k c ℓ} {code : Code k} (struct : Struct code c ℓ) where open import MLib.Prelude open import MLib.Algebra.PropertyCode.Core open import Function.Equivalence using (Equivalence) open Struct struct private module FuncBased {c′ ℓ′} (d...
module Nat where data ℕ : Set where zero : ℕ succ : ℕ → ℕ {-# BUILTIN NATURAL ℕ #-} _+_ : ℕ → ℕ → ℕ zero + b = b succ a + b = succ (a + b) _×_ : ℕ → ℕ → ℕ zero × b = zero succ a × b = (a × b) + b open import Relation.Binary.PropositionalEquality 0-is-right-identity-of-+ : ∀ (n : ℕ) → n + zero ≡ n 0-is-ri...
{-# OPTIONS --without-K --safe #-} open import Categories.Category open import Categories.Functor hiding (id) -- category of cones "over a Functor F" module Categories.Category.Construction.Cones {o ℓ e} {o′ ℓ′ e′} {C : Category o ℓ e} {J : Category o′ ℓ′ e′} (F : Functor J C) where open import Data.Product import...
{-# OPTIONS --without-K #-} open import lib.Basics open import lib.types.Pointed module lib.types.Lift where ⊙Lift : ∀ {i j} → Ptd i → Ptd (lmax i j) ⊙Lift {j = j} (A , a) = ⊙[ Lift {j = j} A , lift a ] ⊙lift : ∀ {i j} {X : Ptd i} → fst (X ⊙→ ⊙Lift {j = j} X) ⊙lift = (lift , idp) ⊙lower : ∀ {i j} {X : Ptd i} → fs...
module Data.Num.Binary where -- open import Data.Product using (_×_; Σ; _,_) open import Data.List open import Data.Unit open import Data.Empty -- open import Data.Nat renaming (_+_ to _⊹_) -- -- data Bin : Set where -- [] : Bin -- 0- : Bin → Bin -- 1- : Bin → Bin -- -- carry : Bin → Bin -- carry [] = 1- ...
{-# OPTIONS --without-K --safe #-} module Fragment.Examples.CSemigroup.Arith.Reasoning where open import Fragment.Examples.CSemigroup.Arith.Base +-direct : ∀ {m n} → (m + 2) + (3 + n) ≡ m + (n + 5) +-direct {m} {n} = begin (m + 2) + (3 + n) ≡⟨ fragment CSemigroupFrex +-csemigroup ⟩ m + (n + 5) ∎ open im...
import Lvl module Structure.Semicategory {ℓₒ ℓₘ ℓₑ : Lvl.Level} where open import Functional using (swap) open import Logic import Structure.Categorical.Names as Names open import Structure.Categorical.Properties open import Structure.Operator import Structure.Relator.Names as Names open import Structu...
module New.LangOps where open import New.Lang open import New.Changes open import New.LangChanges oplusτo : ∀ {Γ} τ → Term Γ (τ ⇒ Δt τ ⇒ τ) ominusτo : ∀ {Γ} τ → Term Γ (τ ⇒ τ ⇒ Δt τ) onilτo : ∀ {Γ} τ → Term Γ (τ ⇒ Δt τ) onilτo τ = abs (app₂ (ominusτo τ) (var this) (var this)) -- Do NOT try to read this, such terms ...
{-# OPTIONS --without-K #-} module FunExt where open import HIT.Interval open import PathOperations open import PathStructure.Id.Tr open import Types funext : ∀ {a b} {A : Set a} {B : A → Set b} {f g : (x : A) → B x} → (∀ x → f x ≡ g x) → f ≡ g funext {A = A} {B = B} {f = f} {g = g} p = ap h seg where h : I →...
{-# OPTIONS --without-K --exact-split #-} module 09-fundamental-theorem where import 08-contractible-types open 08-contractible-types public -- Section 8.1 Families of equivalences {- Any family of maps induces a map on the total spaces. -} tot : {i j k : Level} {A : UU i} {B : A → UU j} {C : A → UU k} → ((x :...
module Test where open import Pitch open import Interval open import Counterpoint open import Data.Vec using (Vec; []; _∷_; zip) open import Data.Fin using (zero; suc) open import Relation.Binary.PropositionalEquality using (refl) -- Last five notes of Yamanote melody cantusFirmus : Vec Pitch 5 cantusFirmus = c 5 ∷...
{-# OPTIONS --type-in-type #-} open import Data.Unit open import Data.Product hiding ( curry ; uncurry ) open import Data.List hiding ( concat ) open import Data.String open import Relation.Binary.PropositionalEquality open import Function module Spire.Examples.PropLev where -------------------------------------------...
{-# OPTIONS --without-K --safe #-} open import Categories.Category module Categories.Category.Cocomplete.Finitely {o ℓ e} (C : Category o ℓ e) where open import Level open import Categories.Category.Cocartesian C open import Categories.Diagram.Coequalizer C open import Categories.Diagram.Pushout C open import Categ...
module nodcap.NF.Cut where open import Algebra open import Data.Environment open import Data.Nat as ℕ using (ℕ; suc; zero) open import Data.Pos as ℕ⁺ open import Data.List as L using (List; []; _∷_; _++_) open import Data.List.Any as LA using (Any; here; there) open import Data.List.Any.BagAndSetEquality as B open imp...
{-# OPTIONS --without-K --safe #-} open import Algebra open import Data.Bool.Base using (Bool; if_then_else_) open import Function.Base using (_∘_) open import Data.Integer.Base as ℤ using (ℤ; +_; +0; +[1+_]; -[1+_]) import Data.Integer.Properties as ℤP open import Data.Integer.DivMod as ℤD open import Data.Nat as ℕ ...
{-# OPTIONS --without-K #-} {- The main definitions of this module are: * explore⊎ * explore⊎-ind * ⟦explore⊎⟧ * Σᵉ⊎-ok * Πᵉ⊎-ok -} open import Type hiding (★) open import Function.NP open import Function.Extensionality open import Data.Nat using (_+_) open import Level.NP open import Type.Iden...
open import Data.Nat using (ℕ; _+_) renaming (_≤?_ to _≤?ₙ_) open import Data.Bool using (Bool; true; false; not; _∧_) open import Data.String using (String) open import Data.Sum using (_⊎_; [_,_]; inj₁; inj₂) open import Relation.Binary using (Decidable) open import Relation.Nullary using (yes; no; ¬...
module Issue784.Context where open import Data.List using (List; []; _∷_; _++_; [_]; filter) renaming (map to mapL) import Level open import Issue784.Values record Context ℓ : Set (Level.suc ℓ) where constructor context field get : Values ℓ signature : ∀ {ℓ} → Context ℓ → Types ℓ signature = types ∘ Context.get...
module Data.Boolean.Functions where open import Data.Boolean open import Type
------------------------------------------------------------------------ -- The Agda standard library -- -- A definition for the permutation relation using setoid equality ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Da...
module Issue919 where open import Common.Prelude Zero : Nat → Set Zero 0 = ⊤ Zero (suc _) = ⊥ test : (n : Nat) {p : Zero n} → Set → Set test 0 A = A test (suc _) {()} -- Horrible error for first clause: -- Cannot eliminate type Set with pattern {(implicit)} (did you supply -- too many arguments?) -- when...
{-# OPTIONS --no-termination-check #-} module Issue137 where record Foo : Set1 where field foo : {x : Set} → Set record Bar : Set1 where field bar : Foo record Baz (P : Bar) : Set1 where field baz : Set postulate P : Bar Q : Baz P f : Baz.baz Q → Set f r with f r f r | A = A -- The bug was: ...
-- Andreas, AIM XXIII 2016-04-21 Overloaded projections -- Milestone 1: Check overloaded projections on rhs (without postponing). {-# OPTIONS --allow-unsolved-metas #-} module _ (A : Set) (a : A) where record R B : Set where field f : B open R record S B : Set where field f : B open S r : R A R.f r = a s : S...
------------------------------------------------------------------------ -- The Agda standard library -- -- Properties satisfied by strict partial orders ------------------------------------------------------------------------ {-# OPTIONS --without-K --safe #-} open import Relation.Binary module Relation.Binary.Prop...