text stringlengths 4 690k |
|---|
{-# OPTIONS --without-K #-}
open import Base
open import Homotopy.PushoutDef
module Homotopy.PushoutUP {m} (D : pushout-diag m) (P : Set m → Set m)
⦃ PA : P (pushout-diag.A D) ⦄ ⦃ PB : P (pushout-diag.B D) ⦄
⦃ PC : P (pushout-diag.C D) ⦄ where
open pushout-diag D
-- Idea : [cocone E = (A → E) ×_(C → E) (B → E)]... |
open import Categories
open import Monads
module Monads.CatofAdj.TermAdjObj {a b}{C : Cat {a}{b}}(M : Monad C) where
open import Library
open import Functors
open import Naturals
open import Adjunctions
open import Monads.CatofAdj M
open import Categories.Terminal
open import Monads.EM M
open import Monads.EM.Adjunct... |
{-# OPTIONS --without-K #-}
module NTypes.Product where
open import NTypes
open import PathOperations
open import PathStructure.Product
open import Types
×-isSet : ∀ {a b} {A : Set a} {B : Set b} →
isSet A → isSet B → isSet (A × B)
×-isSet A-set B-set x y p q
= split-eq p ⁻¹
· ap (λ y → ap₂ _,_ y (ap π₂ p))
... |
{-# OPTIONS --without-K #-}
module sets.int.utils where
open import sum
open import equality
open import function
open import sets.nat.core
open import sets.int.definition
open import hott.level
module _ {i}{X : Set i}(hX : h 2 X)
(f : ℕ → ℕ → ℕ → ℕ → X)
(u : ∀ n n' d m m' e → f n n' m m' ≡ f (d + n) (d + n') (e... |
module Generic.Lib.Category where
open import Category.Functor public
open import Category.Applicative public
open import Category.Monad public
open RawFunctor {{...}} public
open RawApplicative {{...}} hiding (_<$>_; _<&>_; _<$_; zip; zipWith) renaming (_⊛_ to _<*>_) public
open RawMonad {{...}} hiding (pure; _<$>_;... |
module Issue4835.ModA where
data A : Set where
a : A -> A
|
-- Andreas, 2014-12-03 Issue reported by Fabien Renaud
postulate A : Set
f : A → A
g : A → A
f x = g x
ok : A → A
ok x = x
g x = f x
-- Only `f` and `g` should be colored red, not `ok`.
|
postulate
X Y Z A : Set
record R : Set where
field
x : X
y : Y
z : Z
module M where
postulate
x : X
y : Y
r : R
r = record { M; z = zz } where postulate zz : Z
-- Record update. Same as: record r { y = ... }
r2 : R
r2 = record { R r; y = y } where postulate y : Y
module M2 (a : A) where
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- The reflexive transitive closures of McBride, Norell and Jansson
------------------------------------------------------------------------
-- This module could be placed under Relation.Binary. However, since
-- i... |
open import Data.Nat using (ℕ)
module Data.BitVector.Properties.LatticeProperties (n : ℕ) where
open import Data.BitVector
open import Algebra.Structures
open import Relation.Binary.PropositionalEquality
open import Data.Vec
open import Data.Product hiding (map)
import Data.Bool.Properties as Bool
private
module ... |
------------------------------------------------------------------------------
-- Well-founded induction on the relation TreeT
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-p... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Data.Queue.1List where
open import Cubical.Foundations.Everything
open import Cubical.Structures.Queue
open import Cubical.Data.Empty as ⊥
open import Cubical.Data.Maybe
open import Cubical.Data.List
open import Cubical.Data.Sigma
mo... |
module Common.Context where
open import Common public
-- Contexts.
data Cx (U : Set) : Set where
∅ : Cx U
_,_ : Cx U → U → Cx U
-- Vector contexts.
data VCx (U : Set) : ℕ → Set where
∅ : VCx U zero
_,_ : ∀ {n} → VCx U n → U → VCx U (suc n)
-- Inversion principles for contexts.
module _ {U : Set} w... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Definition
open import Rings.Definition
open import Rings.IntegralDomains.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
module Fields.FieldOfFractions.Ring {a b : _} {A : Set a} {S : Setoid... |
module Oscar.Category.Semigroup where
open import Oscar.Category.Setoid
open import Oscar.Level
module _ {𝔬 𝔮} (setoid : Setoid 𝔬 𝔮) where
open Setoid setoid
record IsSemigroup (_∙_ : ⋆ → ⋆ → ⋆) : Set (𝔬 ⊔ 𝔮) where
field
extensionality : ∀ {f₁ f₂} → f₁ ≋ f₂ → ∀ {g₁ g₂} → g₁ ≋ g₂ → g₁ ∙ f₁ ≋ g₂ ∙... |
{-# OPTIONS --rewriting #-}
open import Luau.Type using (Type; Scalar; nil; number; string; boolean; never; unknown; _⇒_; _∪_; _∩_)
open import Properties.Equality using (_≢_)
module Luau.Subtyping where
-- An implementation of semantic subtyping
-- We think of types as languages of trees
data Tree : Set where
... |
{-# OPTIONS --cubical --guarded -W ignore #-}
module combinations-of-lift-and-list where
open import Clocked.Primitives
open import Cubical.Foundations.Prelude
open import Cubical.Data.List as List
open import Cubical.Data.List.Properties
open import Cubical.Data.Sum using (_⊎_; inl; inr)
--**************************... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Categories.Definition
module Categories.Functor.Definition where
record Functor {a b c d : _} (C : Category {a} {b}) (D : Category {c} {d}) : Set (a ⊔ b ⊔ c ⊔ d) where... |
module Stuck where
postulate
I : Set
i j : I
data D : I → I → Set where
d : D i i
e : D j j
f : ∀ {x} → D i x → Set₁
f d = Set
|
module SetOmega where
postulate
IsType : ∀ {a} → Set a → Set
Bad : IsType (∀ a → Set a)
|
open import Agda.Builtin.Bool
data Test : Set where
CTest : Bool -> {Bool} -> Test
{-# COMPILE AGDA2HS Test #-}
getTest : Test → Bool
getTest (CTest b) = b
{-# COMPILE AGDA2HS getTest #-}
putTest : Bool → Test → Test
putTest b (CTest _ {b'}) = CTest b {b'}
{-# COMPILE AGDA2HS putTest #-}
|
open import Relation.Binary.Core using (Rel)
module GGT.Definitions
{a b ℓ₁ ℓ₂}
{G : Set a} -- The underlying group carrier
{Ω : Set b} -- The underlying space
(_≈_ : Rel G ℓ₁) -- The underlying group equality
(_≋_ : Rel Ω ℓ₂) -- The underlying space equality
where
open import Level
open import ... |
module MJ.Examples.Exceptions where
open import Prelude
open import Data.Star
import Data.Vec.All as Vec∀
open import Data.List
open import Data.List.Any
open import Data.List.Membership.Propositional
open import Data.List.All hiding (lookup)
open import Data.Product hiding (Σ)
open import Relation.Binary.Propositiona... |
module STLC.Type.Relation where
open import Data.Nat using (ℕ)
open import Data.Fin using (Fin)
open import STLC.Term
open import STLC.Type
open import STLC.Type.Context using (Ctxt)
open import Data.Vec using (_∷_; lookup)
open import Relation.Nullary using (¬_)
open import Relation.Binary.PropositionalEquality ... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
data Ix : Set where
ix : .(i : Nat) (n : Nat) → Ix
data D : Ix → Set where
mkD : ∀ n → D (ix n n)
data ΣD : Set where
_,_ : ∀ i → D i → ΣD
foo : ΣD → Nat
foo (i , mkD n) = n
d : ΣD
d = ix 0 6 , mkD 6
-- Check that we pick the right (the non-ir... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Reverse view
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Reverse where
open import Data.List.Base as L hiding (reverse)
open imp... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Decidable propositional membership over vectors
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Decidable)
open imp... |
------------------------------------------------------------------------
-- Encodings and properties of higher-order extrema and intervals in
-- Fω with interval kinds
------------------------------------------------------------------------
{-# OPTIONS --safe --without-K #-}
module FOmegaInt.Typing.Encodings where
o... |
module Ex6Edit where -- git would rather indicate that nothing has happened 0/15
{- This is the file where you should work. -}
open import CS410-Prelude
open import CS410-Nat
open import Ex6AgdaSetup
-- the setup gives you a nondependent pair type _**_
-- because that's what the compiler can exchange with Haskel... |
{-
Defines different notions of morphisms and properties of morphisms of
groups:
- GroupHom (homomorphisms)
- GroupEquiv (equivs which are homomorphisms)
- GroupIso (isos which are homomorphisms)
- Image
- Kernel
- Surjective
- Injective
- Mono
- BijectionIso (surjective + injective)
-}
{-# OPTIONS --safe #-}
module... |
-- Showing that destroy-guardedness in Issue1209-4 indeed does
-- destroy guardedness
{-# OPTIONS --safe --guardedness --no-sized-types #-}
record Stream (A : Set) : Set where
coinductive
field
head : A
tail : Stream A
open Stream
destroy-guardedness : ∀ {A} → Stream A → Stream A
destroy-guardedness xs ... |
open import Nat
open import Prelude
open import contexts
open import core
open import canonical-value-forms
module canonical-boxed-forms where
canonical-boxed-forms-b : ∀{Δ d} →
Δ , ∅ ⊢ d :: b →
d boxedval →
d == c
canonical-boxed... |
{-# OPTIONS --no-termination-check #-}
module Data.Bin.BinDivNt where
open import Data.Bin
open import Data.Bin.Properties
open import Data.Product
open import Relation.Binary
open StrictTotalOrder <-strictTotalOrder
open import Relation.Nullary
open import Data.Bin.Utils
open import Data.Bin.Minu... |
data Unit : Set where
unit : Unit
test : Unit
test = {!!}
|
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Group
open import lib.groups.Homomorphism
open import lib.types.TwoSemiCategory
open import lib.two-semi-categories.Functor
module lib.two-semi-categories.GroupToCategory where
group-to-cat : ∀ {i} → Group i → TwoSemiCategory lzero ... |
open import AbstractInterfaces public
module OrdersAndEqualities {{_ : IsProc}} {{_ : IsTime}} {{_ : IsMsg}} {{_ : IsEvent}} where
-- _≡ₑ_ is a decidable equality on events within one process.
data _≡ₑ_ : ∀ {P T T′} → Event P T → Event P T′ → Set where
refl≡ₑ : ∀ {P T} {a b : Event P T} →
a ≡ₑ b
_≢ₑ_... |
{-# OPTIONS --without-K --allow-unsolved-metas --exact-split #-}
module 17-cubical-diagrams where
import 16-pushouts
open 16-pushouts public
-- Section 15.1 Commuting cubes
-- Cubes
{-
We specify the type of the homotopy witnessing that a cube commutes.
Imagine that the cube is presented as a lattice
... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Setoids.Setoids
open import Functions.Definition
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Sets.FinSet.Definition
open import ... |
{-# OPTIONS --without-K #-}
module PathStructure.Id.Tr {a b} {A : Set a} {B : Set b} where
open import Equivalence
open import PathOperations
open import Types
tr-split : {a a′ : A} {b b′ : B} (p : a ≡ a′) →
tr (λ _ → B) p b ≡ b′ → b ≡ b′
tr-split {b = b} {b′ = b′} = J
(λ _ _ p → tr (λ _ → B) p b ≡ b′ → b ≡ b′)
... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.Ints.DiffInt.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Univalence
open import Cubical.HITs.Ints.DiffInt.Base
open import Cubical.Data.Nat
open import Cubical.Data.Sigma
open import Cubical.Data.Bool
... |
postulate FunctorOps : Set
module FunctorOps (ops : FunctorOps) where
postulate map : Set
postulate IsFunctor : Set
module IsFunctor (fun : IsFunctor) where
postulate ops : FunctorOps
open FunctorOps ops public
-- inside here `FunctorOps.map ops` gets printed as `map`
open IsFunctor
-- out here it should to... |
module Issue208 where
record R : Set where
foo : Set
foo = {!!} |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.Exactness
open import cohomology.Theory
module cohomology.Unit {i} (CT : CohomologyTheory i) where
open CohomologyTheory CT
module _ (n : ℤ) where
private
⊙LU = ⊙Lift {j = i} ⊙Unit
Cof-Unit-is-Unit : ⊙Cof (⊙idf ⊙LU) == ⊙LU
Cof-Unit-is-U... |
module Numeral.Natural.Decidable where
open import Data
open import Data.Boolean
open import Functional
open import Lang.Inspect
open import Logic.Propositional
open import Numeral.Natural
open import Structure.Function
open import Structure.Function.Domain
open import Structure.Relator.Properties
open import Type.Pro... |
open import Level using (0ℓ)
open import Function using (_$_)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl; sym; trans; cong; cong₂; isEquivalence; setoid; module ≡-Reasoning)
open import Relation.Binary.PropositionalEquality.WithK using (≡-irrelevant)
open import Relation.Nullary.Negation u... |
-- {-# OPTIONS -v tc.term.exlam:100 -v extendedlambda:100 -v int2abs.reifyterm:100 #-}
-- Andreas, 2013-02-26
module Issue778 (Param : Set) where
open import Common.Prelude
works : Nat → Nat
works with zero
... | zero = λ { zero → zero; (suc x) → suc x }
... | suc _ = λ { x → x }
test : Nat → Nat
test = λ { zero → z... |
{-# OPTIONS --cubical --no-import-sorts --safe --postfix-projections #-}
open import Cubical.Core.Everything
open import Cubical.Functions.Embedding
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Function
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Prelude
open i... |
open import Agda.Builtin.FromNat
open import Data.Nat.Base as ℕ using (ℕ; suc; zero; _>_; _≤?_)
open import Data.List.Base as L using (List; _∷_; []; _++_)
open import Relation.Nullary.Decidable using (True)
open import Relation.Binary.PropositionalEquality as P using (_≡_)
module Data.Pos where
open import Data.Nat... |
-- Andreas, 2011-09-12
-- eta for records in unifier
-- {-# OPTIONS -v tc.lhs.unify:25 #-}
module Issue455 where
postulate
A : Set
a : A
record Fork : Set where
constructor pair
field fst : A
snd : A
open Fork
data D : Fork -> Set where
c : (x y : A) -> D (pair x y)
postulate p : Fork
f : D p... |
open import Nat
open import Prelude
open import contexts
open import core
module canonical-value-forms where
canonical-value-forms-b : ∀{Δ d} →
Δ , ∅ ⊢ d :: b →
d val →
d == c
canonical-value-forms-b TAConst VConst = refl
canonic... |
module Arith where
open import Common.IO
open import Common.Nat renaming (_∸_ to _-_) -- workaround for #1855
open import Common.Unit
test : Nat
test = 4
foobar : Nat -> Nat
foobar zero = zero
foobar (suc n) = suc (suc n)
main : IO Unit
main =
-- n <- readNat ,
printNat 0 ,,
printNat (0 + 1) ,,
printNat (1 ... |
module SafeFlagPostulate where
data Empty : Set where
postulate inhabitant : Empty
|
module Data.Bin.NatHelpers where
open import Relation.Binary.PropositionalEquality
open import Data.Empty
open import Data.Fin using (Fin; zero; suc) renaming (toℕ to finToℕ)
open import Data.Nat using(ℕ; zero; suc; _≤_; _+_; _*_; s≤s; z≤n; ≤′-step; ≤′-refl; _<_; _∸_)
open import Data.Nat.Propertie... |
{-# OPTIONS --safe #-}
module Cubical.Algebra.Group.Base where
{-
Defines groups and adds the smart constructors [makeGroup-right] and [makeGroup-left]
for constructing groups from less data than the standard [makeGroup] constructor.
-}
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Struct... |
{-# OPTIONS --without-K #-}
module NTypes.Id where
open import GroupoidStructure
open import NTypes
open import PathOperations
open import Transport
open import Types
-- This should also be derivable from hLevel-suc from
-- HomotopyTypes.HLevel module.
Id-isSet : ∀ {a} {A : Set a} {x y : A} →
isSet A → isSet (x ≡ y... |
{-# OPTIONS --cubical #-}
module Data.Binary.PerformanceTests.Conversion where
open import Prelude
open import Data.Binary.Definition
open import Data.Binary.Conversion using (⟦_⇓⟧)
-- open import Data.Binary.Conversion.Strict
open import Data.Binary.Conversion.Fast
-- one-thousand : 𝔹
-- one-thousand = 2ᵇ 1ᵇ 1ᵇ 2ᵇ... |
module ModuleArgs where
open import Common.Nat
open import Common.IO
open import Common.Unit
module X (y : Nat) where
addTo : Nat -> Nat
addTo x = y + x
open X 23
-- should return 35
main : IO Unit
main = printNat (addTo 12)
|
open import Nat
open import Prelude
open import Hazelnut-core
module Hazelnut-declarative where
-- declarative type checking judgement for ė
data _⊢_::_ : (Γ : ·ctx) → (e : ė) → (t : τ̇) → Set where
DVar : {Γ : ·ctx} {t : τ̇} {n : Nat} →
(n , t) ∈ Γ →
Γ ⊢ X n :: t
DA... |
{-# OPTIONS --cubical --safe #-}
module Data.Integer.Literals where
open import Data.Integer
open import Literals.Number
open import Data.Unit
instance
numberNat : Number ℤ
numberNat = record
{ Constraint = λ _ → ⊤
; fromNat = λ n → ⁺ n
}
|
module plfa-exercises.Practice where
--------------------------------------- Naturals ---------------------------------------
-- Inductive definition of Numbers (new datatype)
data ℕ : Set where
-- Judgements (two in total for this case)
zero : ℕ -- No hypothesis and one conclusion
suc : ℕ → ℕ -- One hyp... |
module Impure.STLCRef.Properties.Soundness where
open import Data.Nat
open import Data.Sum
open import Data.Product as Pr
open import Data.List
open import Data.Vec hiding (_∷ʳ_)
open import Data.Star
open import Function
open import Extensions.List
open import Relation.Binary.PropositionalEquality as P
open import R... |
{-# OPTIONS --without-K --safe #-}
module Categories.Adjoint.Alternatives where
open import Level
open import Categories.Adjoint
open import Categories.Category
open import Categories.Functor renaming (id to idF)
open import Categories.NaturalTransformation
import Categories.Morphism.Reasoning as MR
private
vari... |
-- Trying to define ≤ as a datatype in Prop doesn't work very well:
{-# OPTIONS --enable-prop #-}
open import Agda.Builtin.Nat
data _≤'_ : Nat → Nat → Prop where
zero : (y : Nat) → zero ≤' y
suc : (x y : Nat) → x ≤' y → suc x ≤' suc y
≤'-ind : (P : (m n : Nat) → Set)
→ (pzy : (y : Nat) → P zero y)
... |
module Lookup where
data Bool : Set where
false : Bool
true : Bool
data IsTrue : Bool -> Set where
isTrue : IsTrue true
data List (A : Set) : Set where
[] : List A
_::_ : A -> List A -> List A
data _×_ (A B : Set) : Set where
_,_ : A -> B -> A × B
module Map
(Key : Set)
(_==_ : Key -> Key -> B... |
-- Andreas, 2014-03-05, reported by xcycl.xoo, Mar 30, 2009
-- {-# OPTIONS -v tc.with:60 #-}
open import Common.Prelude renaming (Nat to ℕ; module Nat to ℕ)
data Nat : ℕ → Set where
i : (k : ℕ) → Nat k
toNat : (n : ℕ) → Nat n
toNat n = i n
fun : (n : ℕ) → ℕ
fun n with toNat n
fun .m | i m with toNat m
fun .Set | ... |
id : Set → Set
id A = A
|
------------------------------------------------------------------------
-- INCREMENTAL λ-CALCULUS
--
-- Correctness of differentiation with the Nehemiah plugin.
------------------------------------------------------------------------
module Nehemiah.Change.Correctness where
-- The denotational properties of the `der... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Groups.Definition
open import Setoids.Setoids
open import Sets.EquivalenceRelations
open import Groups.Homomorphisms.Definition
open import Groups.Homomorphisms.Lemmas
open import Groups.Subgroups.Definition
open import Groups.Lemmas
open import Groups.Abe... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Bool
open import lib.types.Empty
open import lib.types.Lift
open import lib.types.Sigma
open import lib.types.Pi
module lib.types.Coproduct where
module _ {i j} {A : Type i} {B : Type j} where
Coprod-elim : ∀ {k} {C : A ⊔ B → Typ... |
module nat-to-string where
open import bool
open import char
open import eq
open import list
open import maybe
open import nat
open import nat-division
open import nat-thms
open import product
open import string
open import termination
ℕ-to-digitsh : (base : ℕ) → 1 < base ≡ tt → (x : ℕ) → ↓𝔹 _>_ x → 𝕃 ℕ
ℕ-to-digits... |
{-# OPTIONS --type-in-type #-}
module Compilation.Encode.Examples where
open import Context
open import Type.Core
open import Compilation.Data
open import Compilation.Encode.Core
open import Function
open import Data.Product
open import Data.List.Base
module ProdTreeTreeExample where
open ProdTreeTree
open prod... |
module FFI.Data.Bool where
{-# FOREIGN GHC import qualified Data.Bool #-}
data Bool : Set where
false : Bool
true : Bool
{-# COMPILE GHC Bool = data Data.Bool.Bool (Data.Bool.False|Data.Bool.True) #-}
|
module test where
|
module Data.Either.Equiv where
import Lvl
open import Data.Either as Either
open import Structure.Function.Domain
open import Structure.Function
open import Structure.Operator
open import Structure.Setoid
open import Type
private variable ℓ ℓₑ ℓₑ₁ ℓₑ₂ : Lvl.Level
private variable A B : Type{ℓ}
record Extensiona... |
{-# OPTIONS --without-K #-}
open import HoTT
open import homotopy.SuspProduct
open import homotopy.SuspSmash
open import homotopy.JoinSusp
open import cohomology.Theory
module cohomology.SphereProduct {i} (CT : CohomologyTheory i) where
open CohomologyTheory CT
open import cohomology.Wedge CT
module _ (n : ℤ) (m : ... |
------------------------------------------------------------------------
-- A type soundness result
------------------------------------------------------------------------
module Lambda.Closure.Functional.Type-soundness where
import Category.Monad.Partiality as Partiality
open import Category.Monad.Partiality.All as... |
{-# OPTIONS --no-termination-check #-}
-- Testing how the pragmas are saved in the agda interface files (using
-- the program dump-agdai).
-- 13 July 2012. Because for example the --no-termination-check is a
-- PragmaOption it is saved as:
--
-- iPragmaOptions = [["--no-termination-check"]]
module OptionPragma where... |
F : (A A : Set) → Set
F A _ = A
|
-- Andreas, 2020-02-10, issue 4429, reported by Nisse
--
-- Injectivity analysis can make type checker loop (or slow down)
-- since it reduces the rhs of definitions.
--
-- Try to be smarter and do not needlessly invoke the injectivity
-- analysis. For instance, do not consider a projection pattern
-- a proper match f... |
-- Andreas, 2014-05-22
module _ where
module M where
f : Set
f = f
module N where
f : Set
f = f
-- OUTPUT IS:
--
-- Termination checking failed for the following functions:
-- f, f
-- Problematic calls:
-- f (at /home/abel/tmp/bla/Agda/test/bugs/TerminationReportQualified.agda:7,7-8)
-- f (at /home/ab... |
{-# OPTIONS --cubical #-}
module Cubical.Codata.Stream where
open import Cubical.Codata.Stream.Base public
open import Cubical.Codata.Stream.Properties public
|
open import Agda.Builtin.Nat
data D : Set where
c : D → D
record R : Set where
constructor mkR
field f : Nat
f : D → R
f (c x) = mkR zero
f' : D → Nat → R
f' (c x) n = mkR n
postulate
P : (A : Set) → A → Set
g : (x : D) → P R (f x) → P D x
g' : (n : Nat) (x : D) → P R (f' x n) → P D x
h : (x : D) →... |
------------------------------------------------------------------------
-- Functional semantics and type soundness proof for an untyped
-- λ-calculus with constants
------------------------------------------------------------------------
module Lambda.Substitution.Functional where
open import Category.Monad.Partiali... |
{-# OPTIONS --without-K --safe #-}
module Cham.Name where
open import Data.String
Name : Set
Name = String
|
------------------------------------------------------------------------------
-- Axiomatic PA properties
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# O... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Groups.Lemmas
open import Groups.Definition
open import Setoids.Orders.Partial.Definition
open import Setoids.Orders.Total.Definition
open import Setoids.Setoids
open import Functions.Definition
open import Sets.EquivalenceRelat... |
{-# OPTIONS --without-K --safe #-}
-- This is a utility module.
module Utils where
open import Induction.WellFounded as Wf
open import Data.List as List
open import Data.List.All
open import Data.Nat
open import Data.Maybe
open import Data.Product as ,
open import Data.Empty
open import Function
open import Relation... |
-- Andreas, 2015-02-24
data N : Set where
zero : N
suc : N → N
data Sing : (n : N) → Set where
sing : ∀ n → Sing n
data D : Set → Set where
c : ∀ n → D (Sing n)
test : (A : Set) → D A → N
test .(Sing n) (c n) = n
-- this should crash Epic as long as n is considered forced in constructor c
-- should succe... |
{- Cubical Agda with K
This file demonstrates the incompatibility of the --cubical
and --with-K flags, relying on the well-known incosistency of K with
univalence.
The --safe flag can be used to prevent accidentally mixing such
incompatible flags.
-}
{-# OPTIONS --cubical --no-import-sorts --with-K #-}
module Cubi... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Paths
open import lib.types.Pointed
open import lib.types.Pushout
open import lib.types.PushoutFmap
open import lib.types.Sigma
open import lib.types.Span
module lib.types.Join where
module _ {i j} (A : Type i) (B : Type j) where
... |
module Auto.Prelude where
open import Agda.Primitive public
using (Level)
data ⊥ : Set where
¬ : Set → Set
¬ A = A → ⊥
⊥-e : (A : Set) → ⊥ → A
⊥-e A ()
record ⊤ : Set where
record _∧_ (A B : Set) : Set where
constructor ∧-i
field fst : A
snd : B
data _∨_ (A B : Set) : Set where
∨-i₁ : A → A ∨ ... |
------------------------------------------------------------------------
-- A specification of the language χ
------------------------------------------------------------------------
open import Atom
-- The specification is parametrised by an instance of χ-atoms.
module Chi (atoms : χ-atoms) where
open import Equal... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- An inductive definition of the sublist relation with respect to a
-- setoid which is decidable. This is a generalisation of what is
-- commonly known as Order Preserving Embeddings (OPE).
------------------------... |
module DifferentArities where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
f : Nat -> Nat -> Nat
f zero = \x -> x
f (suc n) m = f n (suc m)
|
-- This file derives some of the Cartesian Kan operations using transp
{-# OPTIONS --cubical --safe #-}
module Cubical.Foundations.CartesianKanOps where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
coe0→1 : ∀ {ℓ} (A : I → Type ℓ) → A i0 → A i1
coe0→1 A a = transp A i0 a
-- "coe filler... |
module Numeral.Natural.Oper.DivMod.Proofs where
import Lvl
open import Data
open import Data.Boolean.Stmt
open import Logic.Predicate
open import Numeral.Finite
open import Numeral.Natural
open import Numeral.Natural.Oper
open import Numeral.Natural.Oper.Comparisons
open import Numeral.Natural.Oper.FlooredDivision
ope... |
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
cong : {A B : Set} (f : A → B)
→ {x y : A} → x ≡ y → f x ≡ f y
cong f refl = refl
+-identityʳ : (x : Nat) → x + 0 ≡ x
+-identityʳ zero = refl
+-identityʳ (suc n) = cong suc (+-identityʳ n)
+-assoc : (x y z : Nat) → (x + y) + z ≡ x + (y + z)
+-ass... |
-- Andreas, 2017-09-03, issue #2730:
-- Skip termination check when giving.
-- C-c C-SPC fails because of termination problems, but
-- C-u C-c C-SPC should succeed here.
f : Set
f = {! f !}
|
module Prelude.IO where
open import Prelude.Bool
open import Prelude.Char
open import Prelude.Nat
open import Prelude.String
open import Prelude.Unit
open import Prelude.Vec
open import Prelude.Float
postulate
IO : Set → Set
{-# COMPILED_TYPE IO IO #-}
infixl 1 _>>=_
postulate
return : ∀ {A} → A → IO A
_>>=... |
{-# OPTIONS --without-K --safe #-}
module Categories.NaturalTransformation.Properties where
open import Level
open import Data.Product using (Σ; _,_)
open import Function.Equality using (Π)
open import Categories.Category
open import Categories.Category.Product
open import Categories.Category.Instance.Setoids
open i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.