text stringlengths 4 690k |
|---|
module IndexOnBuiltin where
data Nat : Set where
zero : Nat
suc : Nat -> Nat
{-# BUILTIN NATURAL Nat #-}
{-# BUILTIN ZERO zero #-}
{-# BUILTIN SUC suc #-}
data Fin : Nat -> Set where
fz : {n : Nat} -> Fin (suc n)
fs : {n : Nat} -> Fin n -> Fin (suc n)
f : Fin 2 -> Fin 1
f fz = fz
f (fs i) = i
|
{-# OPTIONS --allow-unsolved-metas #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module AgdaIntroduction where
-- We add 3 to the fixities of the Agda standard library 0.8.1 (see
-- Da... |
module Data.Option.Proofs where
import Lvl
open import Data
open import Data.Option
open import Data.Option.Functions
open import Functional
open import Structure.Setoid using (Equiv)
open import Structure.Function.Domain
open import Structure.Function
import Structure.Operator.Names as Names
open import Str... |
module index where
-- You probably want to start with this module:
import README
-- For a brief presentation of every single module, head over to
import Everything
-- Otherwise, here is an exhaustive, stern list of all the available modules:
|
{-# OPTIONS --cubical --safe --no-sized-types --no-guardedness #-}
module Agda.Builtin.Cubical.Glue where
open import Agda.Primitive
open import Agda.Builtin.Sigma
open import Agda.Primitive.Cubical renaming (primINeg to ~_; primIMax to _∨_; primIMin to _∧_;
primHComp to hc... |
{-# OPTIONS --without-K #-}
-- Copied from "https://code.google.com/p/agda/issues/attachmentText?id=846&aid=8460000000&name=DivModUtils.agda&token=GDo1rQ6ldpTKOCjtbzSWPu19HL0%3A1373287197978"
module DivModUtils where
open import Data.Nat
open import Data.Bool
open import Data.Nat.DivMod
open import Relation.Nullary
... |
module Chain
{U : Set}(T : U -> Set)
(_==_ : {a b : U} -> T a -> T b -> Set)
(refl : {a : U}(x : T a) -> x == x)
(trans : {a b c : U}(x : T a)(y : T b)(z : T c) -> x == y -> y == z -> x == z)
where
infix 30 _∼_
infix 3 proof_
infixl 2 _≡_by_
infix 1 _qed
data _∼_ {a b : U}(x : T a)(y : T b) : Set where
p... |
-- Andreas, 2013-03-15 issue reported by Nisse
-- {-# OPTIONS -v tc.proj:40 -v tc.conv.elim:40 #-}
module Issue821 where
import Common.Level
data D (A : Set) : Set where
c : D A → D A
f : (A : Set) → D A → D A
f A (c x) = x
postulate
A : Set
P : D A → Set
x : D A
p : P x
Q : P (f A x) → Set
Foo : Set₁
... |
module Data.Num.Next where
open import Data.Num.Core
open import Data.Num.Maximum
open import Data.Num.Bounded
open import Data.Nat
open import Data.Nat.Properties
open import Data.Nat.Properties.Simple
open import Data.Nat.Properties.Extra
open import Data.Fin as Fin
using (Fin; fromℕ≤; inject≤)
renaming (z... |
module #14 where
{-
Why do the induction principles for identity types not allow us to construct a
function f : ∏(x:A) ∏(p:x=x) (p = refl[x]) with the defining equation
f(x,refl[x]) :≡ refl[refl[x]] ?
-}
{-
To use induction here we need proof that refl x ≡ p then use refl as a relation to prove
... |
module Generic.Test where
import Generic.Test.Data
import Generic.Test.DeriveEq
import Generic.Test.Elim
import Generic.Test.Eq
import Generic.Test.Experiment
import Generic.Test.ReadData
import Generic.Test.Reify
|
module Pi-.Category where
open import Relation.Binary.PropositionalEquality
open import Categories.Category.Monoidal
open import Categories.Category.Monoidal.Braided
open import Categories.Category.Monoidal.Symmetric
open import Categories.Category.Monoidal.Rigid
open import Categories.Category.Monoidal.CompactClosed
o... |
{-# 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.Group {a b : _} {A : Set a} {S : Setoi... |
open import Data.Empty using (⊥-elim)
open import Data.Fin using (Fin; _≟_)
open import Data.Nat using (suc; zero)
open import Data.Nat.Properties using (suc-injective; 0≢1+n)
open import Data.Product using (∃-syntax; _×_; _,_; proj₁; proj₂)
open import Data.Sum using (inj₁; inj₂)
open import Data.Vec using (lookup; _[... |
-- Andreas, 2019-08-20, issue #4016
-- Debug printing should not crash Agda even if there are
-- __IMPOSSIBLE__s buried inside values that get printed.
{-# OPTIONS -v scope.decl.trace:80 #-} -- KEEP!
-- The following is some random code (see issue #4010)
-- that happened to trigger an internal error with verbosity... |
-- Andreas, 2018-10-18, issue #3285, reported by ice1000
-- Testcase by Frederik NF
f : Set → Set
f x = x
syntax f a = a
-- WAS: internal error
--
-- Now: parse error: Malformed syntax declaration
|
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import homotopy.Freudenthal
module homotopy.IterSuspensionStable where
{- π (S k) (Ptd-Susp^ (S n) X) == π k (Ptd-Susp^ n X), where k = S k'
Susp^Stable below assumes k ≠ O instead of taking k' as the argument -}
module Susp^StableSucc {i} (k n : ℕ) (S... |
module eq where
open import level
----------------------------------------------------------------------
-- datatypes
----------------------------------------------------------------------
data _≡_ {ℓ} {A : Set ℓ} (x : A) : A → Set ℓ where
refl : x ≡ x
{-# BUILTIN EQUALITY _≡_ #-}
-------------------------------... |
{- Byzantine Fault Tolerant Consensus Verification in Agda, version 0.9.
Copyright (c) 2021, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://opensource.oracle.com/licenses/upl
-}
open import LibraBFT.Base.Types
open import LibraBFT.Concrete.System
open imp... |
module Rationals.Add.Assoc 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.Add.Assoc
open import Nats.Multiply.Distrib
ope... |
-- Intuitionistic propositional calculus.
-- Gentzen-style formalisation of syntax.
-- Normal forms and neutrals.
module IPC.Syntax.GentzenNormalForm where
open import IPC.Syntax.Gentzen public
-- Derivations.
mutual
-- Normal forms, or introductions.
infix 3 _⊢ⁿᶠ_
data _⊢ⁿᶠ_ (Γ : Cx Ty) : Ty → Set where
... |
module Issue1296.SolvedMeta where
open import Common.Prelude
open import Common.Equality
test : zero ≡ {!!}
test = refl
|
{-# OPTIONS --safe #-}
module Cubical.Categories.Instances.Semilattice where
open import Cubical.Foundations.Prelude
open import Cubical.Algebra.Semilattice
open import Cubical.Categories.Category
open import Cubical.Categories.Instances.Poset
open Category
module _ {ℓ} (L : Semilattice ℓ) where
open JoinSemila... |
{-# OPTIONS --without-K --safe #-}
module Definition.Typed.Decidable where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.Conversion
open import Definition.Conversion.Decidable
open import Definition.Conversion.Soundness
open import Definitio... |
test : Set → Set
test record{} = record{}
-- Record pattern at non-record type Set
-- when checking that the clause test record {} = record {} has
-- type Set → Set
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Ideal where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Logic using ([_]; _∈_)
open import Cubical.Algebra.Ring
private
variable
ℓ ... |
module Lemmachine.Utils where
open import Lemmachine.Request
open import Lemmachine.Response
open import Data.Maybe
open import Data.Bool hiding (_≟_)
open import Data.String
open import Data.Function
open import Data.Product
open import Relation.Nullary
open import Data.List hiding (any)
open import Data.List.Any
open... |
open import Agda.Builtin.Bool
data ⊥ : Set where
record ⊤ : Set where
IsTrue : Bool → Set
IsTrue false = ⊥
IsTrue true = ⊤
record Squash {ℓ} (A : Set ℓ) : Set ℓ where
field
.unsquash : A
open Squash
f : .Bool → Squash Set₁
f b .unsquash = Set
module M where
IsTrue' : Set
IsTrue' = IsTrue b
g : Squ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import LogicalFormulae
open import Boolean.Definition
module Boolean.Lemmas where
notNot : (x : Bool) → not (not x) ≡ x
notNot BoolTrue = refl
notNot BoolFalse = refl
notXor : (x y : Bool) → not (xor x... |
module Module where
record R
: Set
where
module M where
module N where
module O where
postulate
A
: Set
x
: R
x
= record {M}
module P
= N
|
-- Andreas, 2018-08-14, issue #3176, reported by identicalsnowflake
--
-- Absurd lambdas should be equal.
-- In this case, they were only considered equal during give, but not upon reload.
open import Agda.Builtin.Nat renaming (Nat to ℕ)
open import Agda.Builtin.Equality
record Σ (A : Set) (B : A → Set) : Set where
... |
module Hello where
-- Oh, you made it! Well done! This line is a comment.
-- In the beginning, Agda knows nothing, but we can teach it about numbers.
data Nat : Set where
zero : Nat
suc : Nat -> Nat
-- data Nat = Zero | Suc Nat -- in Haskell
-- Now we can say how to add numbers.
_+N_ : Nat -> Nat -> Nat
... |
module Terms where
import Level
open import Data.Unit as Unit
open import Data.List as List
open import Data.Product as Product
open import Categories.Category using (Category)
data Type : Set where
Nat : Type
_ˢ : Type → Type
_⇒_ : Type → Type → Type
infixr 5 _⇒_
open import Common.Context Type
using (Ctx;... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- this module characterizes a category of all equalizer indexed by I.
-- this notion formalizes a category with all equalizer up to certain cardinal.
module Categories.Diagram.Equalizer.Indexed {o ℓ e} (C : Category o ℓ e) where
open import Level
o... |
-- Andreas, 2016-11-19 issue #2309
-- No-eta-equality needs to be respected in pattern matching
-- also before the clause compiler.
record Unit : Set where
constructor unit
no-eta-equality
record R : Set₁ where
field Fst : Unit → Set
Snd : (x : Unit) → Fst x
open R
Test : (A : Set) (a : A) → R
Fst (Tes... |
{- functions related to lift types. The main function is do-lift, which
is called from hnf -}
module lift where
open import lib
open import cedille-types
open import ctxt
open import syntax-util
open import subst
liftingType-to-kind : liftingType → kind
liftingType-to-kind (LiftArrow l1 l2) = KndArrow (liftingTyp... |
{--
-- normalize a finite type to (1 + (1 + (1 + ... + (1 + 0) ... )))
-- a bunch of ones ending with zero with left biased + in between
toℕ : U → ℕ
toℕ ZERO = 0
toℕ ONE = 1
toℕ (PLUS t₁ t₂) = toℕ t₁ + toℕ t₂
toℕ (TIMES t₁ t₂) = toℕ t₁ * toℕ t₂
fromℕ : ℕ → U
fromℕ 0 = ZERO
fromℕ (suc n) = P... |
{-# OPTIONS --warning=error --safe --without-K #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import LogicalFormulae
open import Numbers.Integers.Integers
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Subtraction
open import Numbers.Naturals.Naturals
open import Numbers.Natura... |
------------------------------------------------------------------------------
-- Induction principles for Tree and Forest
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polym... |
{-# OPTIONS --without-K --safe #-}
module Polynomial.Simple.Solver where
open import Polynomial.Expr public
open import Polynomial.Simple.AlmostCommutativeRing public hiding (-raw-almostCommutative⟶)
open import Data.Vec hiding (_⊛_)
open import Algebra.Solver.Ring.AlmostCommutativeRing using (-raw-almostCommutative⟶... |
------------------------------------------------------------------------
-- A class of algebraic structures, based on non-recursive simple
-- types, satisfies the property that isomorphic instances of a
-- structure are equal (assuming univalence)
------------------------------------------------------------------------... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
module LogicalFramework.Existential where
module LF where
postulate
D : Set
-- Disjunction.
_∨_ : Set → Set → Set
inj₁ : {A B ... |
module Prelude where
open import Agda.Primitive public
using (_⊔_)
renaming (lsuc to ↑_)
-- Built-in implication.
id : ∀ {ℓ} {X : Set ℓ} → X → X
id x = x
const : ∀ {ℓ ℓ′} {X : Set ℓ} {Y : Set ℓ′} → X → Y → X
const x y = x
flip : ∀ {ℓ ℓ′ ℓ″} {X : Set ℓ} {Y : Set ℓ′} {Z : Set ℓ″} →
(X → Y → Z) → Y → X → ... |
-- Andreas, 2014-01-08, following Maxime Denes 2014-01-06
-- This file demonstrates that size-based termination does
-- not lead to incompatibility with HoTT.
{-# OPTIONS --sized-types #-}
open import Common.Size
open import Common.Equality
data Empty : Set where
data Box : Size → Set where
wrap : ∀ i → (Empty →... |
-- 2014-05-27 Jesper and Andreas
postulate
A : Set
R : A → A → Set
{-# BUILTIN REWRITE R #-}
{-# REWRITE R #-}
-- Expected error:
-- R does not target rewrite relation
-- when checking the pragma REWRITE R
|
open import FRP.JS.Nat using ( ℕ ; suc ; _+_ ) renaming ( _≟_ to _≟=_ )
open import FRP.JS.List using ( List ; [] ; _∷_ ; [_] ; _++_ ; map ; foldr ; foldl ; build ; _≟[_]_ )
open import FRP.JS.Bool using ( Bool ; not )
open import FRP.JS.QUnit using ( TestSuite ; ok ; ok! ; test ; _,_ )
module FRP.JS.Test.List where
... |
module Numeral.Natural.Oper.Summation.Proofs where
import Lvl
open import Data.List
open import Data.List.Functions
open import Data.List.Equiv.Id
open import Numeral.Natural
open import Structure.Function
open import Structure.Operator.Field
open import Structure.Operator.Monoid
open import Structure.Operator
op... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Data.InfNat.Properties where
open import Cubical.Data.Nat as ℕ using (ℕ)
open import Cubical.Data.InfNat.Base
open import Cubical.Core.Primitives
open import Cubical.Foundations.Prelude
open import Cubical.Relation.Nullary
open import ... |
open import Oscar.Prelude
open import Oscar.Class
open import Oscar.Class.Category
open import Oscar.Class.Congruity
open import Oscar.Class.Functor
open import Oscar.Class.HasEquivalence
open import Oscar.Class.IsCategory
open import Oscar.Class.IsFunctor
open import Oscar.Class.IsPrecategory
open import Oscar.Class.... |
{-
Eilenberg–Mac Lane type K(G, 1)
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.EilenbergMacLane1.Properties where
open import Cubical.HITs.EilenbergMacLane1.Base
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
op... |
module Text.Greek.SBLGNT.1Thess where
open import Data.List
open import Text.Greek.Bible
open import Text.Greek.Script
open import Text.Greek.Script.Unicode
ΠΡΟΣ-ΘΕΣΣΑΛΟΝΙΚΕΙΣ-Α : List (Word)
ΠΡΟΣ-ΘΕΣΣΑΛΟΝΙΚΕΙΣ-Α =
word (Π ∷ α ∷ ῦ ∷ ∙λ ∷ ο ∷ ς ∷ []) "1Thess.1.1"
∷ word (κ ∷ α ∷ ὶ ∷ []) "1Thess.1.1"
∷ word (Σ ... |
module Formalization.PredicateLogic.Signature where
import Lvl
open import Numeral.Natural
open import Type
-- A signature consists of a countable family of constant/function and relation symbols.
-- `Prop(n)` should be interpreted as the indices for relations of arity `n`.
-- `Obj(n)` should be interpreted as t... |
{-# OPTIONS --safe #-}
module Cubical.HITs.Ints.IsoInt where
open import Cubical.HITs.Ints.IsoInt.Base public
|
{-# OPTIONS --without-K #-}
module sets.nat.ordering.leq.level where
open import sum
open import equality
open import function.isomorphism
open import function.extensionality
open import hott.level
open import sets.nat.core
open import sets.nat.ordering.leq.core
open import container.core
open import container.w
open ... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Monoidal.Instance.Setoids where
open import Level
open import Data.Product
open import Data.Product.Relation.Binary.Pointwise.NonDependent
open import Data.Sum
open import Data.Sum.Relation.Binary.Pointwise
open import Function.Equality
open import Relatio... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties of the unit type
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
-- Disabled to prevent warnings from deprecation warnings for _≤_
{-# OPTI... |
module Function.Proofs where
import Lvl
open import Logic
open import Logic.Classical
open import Logic.Propositional
open import Logic.Propositional.Theorems
open import Logic.Predicate
open import Functional
open import Function.Inverseᵣ
open import Function.Names using (_⊜_)
open import Structure.Setoid using ... |
------------------------------------------------------------------------
-- Application of substitutions to terms
------------------------------------------------------------------------
import Level
open import Data.Universe
module README.DependentlyTyped.Term.Substitution
(Uni₀ : Universe Level.zero Level.zero) w... |
------------------------------------------------------------------------
-- Coinductive definition of subtyping
------------------------------------------------------------------------
module RecursiveTypes.Subtyping.Semantic.Coinductive where
open import Codata.Musical.Notation
open import Data.Nat using (ℕ; zero; s... |
import Lvl
open import Type
module Structure.Logic.Constructive.Predicate
{ℓₗ} {Formula : Type{ℓₗ}}
{ℓₘₗ} (Proof : Formula → Type{ℓₘₗ})
{ℓₚ} {Predicate : Type{ℓₚ}}
{ℓₒ} {Domain : Type{ℓₒ}}
(_$_ : Predicate → Domain → Formula)
where
import Logic.Predicate as Meta
import Structure.Logic.Co... |
{-# OPTIONS --rewriting #-}
-- Set-theoretic interpretation and consistency
open import Library
module Interpretation (Base : Set) (B⦅_⦆ : Base → Set) where
import Formulas ; open module Form = Formulas Base
import Derivations; open module Der = Derivations Base
T⦅_⦆ : (A : Form) → Set
T⦅ Atom P ⦆ = B⦅ P ⦆
T... |
module Implicits.Resolution.Embedding.Lemmas where
open import Prelude
open import Data.Fin.Substitution
open import Data.Vec hiding ([_]; _∈_)
open import Data.List as List hiding ([_]; map)
open import Data.List.Properties
open import Data.List.Any hiding (map)
open Membership-≡
open import Extensions.Vec
open impor... |
{-
This second-order equational theory was created from the following second-order syntax description:
syntax Monoid | M
type
* : 0-ary
term
unit : * | ε
add : * * -> * | _⊕_ l20
theory
(εU⊕ᴸ) a |> add (unit, a) = a
(εU⊕ᴿ) a |> add (a, unit) = a
(⊕A) a b c |> add (add(a, b), c) = add (a, add(b, c))
... |
------------------------------------------------------------------------
-- Sums of binary relations
------------------------------------------------------------------------
module Relation.Binary.Sum where
open import Data.Function
open import Data.Sum as Sum
open import Data.Product
open import Data.Unit using (⊤)
... |
{-# OPTIONS --without-K #-}
module FinVec where
-- This is the second step in building a representation of
-- permutations. We use permutations expressed as equivalences (in
-- FinVec) to construct one-line notation for permutations. We have
-- enough structure to model a commutative semiring EXCEPT for
-- symmetry. ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- List Zippers, basic types and operations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Zipper where
open import Data.Nat.Base
open... |
-- AIM XXIII, Andreas, 2016-04-24
-- Overloaded projections and projection patterns
-- {-# OPTIONS -v tc.proj.amb:30 #-}
-- {-# OPTIONS -v tc.lhs.split:20 #-}
module _ where
import Common.Level
open import Common.Prelude hiding (map)
open import Common.Equality
module M (A : Set) where
record Stream : Set where
... |
{-# OPTIONS --rewriting --without-K #-}
open import Agda.Primitive
open import Prelude
import GSeTT.Typed-Syntax
import Globular-TT.Syntax
{- Structure of CwF of a globular type theory : Cut admissibility is significantly harder and has to be proved together with it -}
module Globular-TT.CwF-Structure {l} (index : Se... |
{-# OPTIONS --rewriting #-}
module Properties where
import Properties.Contradiction
import Properties.Dec
import Properties.Equality
import Properties.Remember
import Properties.Step
import Properties.StrictMode
import Properties.TypeCheck
|
------------------------------------------------------------------------
-- A simple tactic for proving equality of equality proofs
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Equality.Tactic
{reflexive} (eq : ∀ {a p} → Equ... |
module HelloWorld where
open import IO
open import Data.String
open import Data.Unit
open import Level using (0ℓ)
main = run {0ℓ} (putStrLn "Hello World!")
|
{-# OPTIONS --universe-polymorphism #-}
module Categories.Coproduct where
open import Level
open import Data.Empty
open import Data.Sum
open import Relation.Binary.Core
open import Categories.Category
module _ {a a′ ℓ ℓ′} {A : Set a} (_∼_ : Rel A ℓ) where
lift-∼ : Rel (Lift {ℓ = a′} A) (ℓ ⊔ ℓ′)
lift-∼ (lift x) (... |
{-# OPTIONS --cubical --no-import-sorts --no-exact-split --safe #-}
module Cubical.Data.Queue.Untruncated2List where
open import Cubical.Foundations.Everything
open import Cubical.Foundations.SIP
open import Cubical.Structures.Queue
open import Cubical.Data.Maybe
open import Cubical.Data.List
open import Cubical.Dat... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed binary relations
------------------------------------------------------------------------
-- The contents of this module should be accessed via
-- `Relation.Binary.Indexed.Heterogeneous`.
{-# OPTIONS --... |
-- Andreas, 2017-10-04, ignore irrelevant arguments during with-abstraction
-- Feature request by xekoukou
{-# OPTIONS --allow-unsolved-metas --show-irrelevant #-}
-- {-# OPTIONS -v tc.abstract:100 #-}
open import Agda.Builtin.Equality
open import Agda.Builtin.Bool
not : Bool → Bool
not true = false
not false = tr... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
module homotopy.ConstantToSetExtendsToProp {i j}
{A : Type i} {B : Type j} (B-is-set : is-set B)
(f : A → B) (f-is-const : ∀ a₁ a₂ → f a₁ == f a₂) where
private
Skel = SetQuot {A = A} (λ _ _ → Unit)
abstract
Skel-has-all-paths : has-all-pa... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.AssocList where
open import Cubical.HITs.AssocList.Base public
open import Cubical.HITs.AssocList.Properties public
|
-- Andreas, 2015-09-18 Andreas, issue reported by Gillaume Brunerie
{- Problem WAS
The following code doesn’t typecheck but it should. I have no idea what’s going on.
Replacing the definition of PathOver-rewr by a question mark and
asking for full normalisation of the goal (C-u C-u C-c C-t), I obtain
HetEq idp u v =... |
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
{-# OPTIONS --sized-types #-}
module is-lib.SInfSys {𝓁} where
open import is-lib.InfSys.Base {𝓁} public
open import is-lib.InfSys.Induction {𝓁} public
open import is-lib.InfSys.SCoindu... |
module Q where
import AlonzoPrelude
open AlonzoPrelude -- , using(Bool,False,True,String,showBool)
import PreludeNat
open PreludeNat
import PreludeBool
open PreludeBool
import PreludeShow
open PreludeShow
pred : Nat -> Nat
pred (zero) = zero
pred (suc n) = n
mplus : Nat -> Nat -> Nat
mplus zero y = y
mplus (suc n) ... |
module TooManyArgumentsInLHS where
F : Set -> Set
F X Y = Y
|
{-# OPTIONS --postfix-projections #-}
module StateSizedIO.cellStateDependent where
open import Data.Product
open import Data.String.Base
{-
open import SizedIO.Object
open import SizedIO.ConsoleObject
-}
open import SizedIO.Console hiding (main)
open import SizedIO.Base
open import NativeIO
open import StateSize... |
{-# OPTIONS --allow-unsolved-metas #-}
module AgdaFeatureNeedHiddenVariableTypeConstructorWrapper where
Unwrapped : {A : Set} → (A → Set) → Set₁
Unwrapped B = ∀ {x} → B x → Set
record Unindexed : Set₁ where
field
{A} : Set
{B} : A → Set
unwrap : Unwrapped B
record Indexed {A : Set} (B : A → Set) : Set... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed binary relations
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Relation.Binary.Indexed.Heterogeneous where
open import Function
open... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
-- From the technical manual of TPTP
-- (http://www.cs.miami.edu/~tptp/TPTP/TR/TPTPTR.shtml)
-- ... variables start with upper case letters, ... p... |
open import Agda.Builtin.Maybe
open import Agda.Builtin.Char
open import Agda.Builtin.String
open import Agda.Builtin.Sigma
open import Agda.Builtin.Equality
_ : primStringUncons "abcd" ≡ just ('a', "bcd")
_ = refl
|
{-# OPTIONS --rewriting --confluence-check #-}
module Issue4333.N1 where
open import Issue4333.M
{-# REWRITE p₁ #-}
b₁' : B a₁'
b₁' = b
|
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.Polynomials.UnivariateList.Poly1-1Poly where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_)
open ... |
------------------------------------------------------------------------------
-- Testing the translation of universal quantified propositional functions
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
... |
--------------------------------------------------------------------------------
-- This file generates the environment that the interpreter starts with. In
-- particular, it contains the grammar that is loaded initially.
--------------------------------------------------------------------------------
module Bootstrap... |
{-# OPTIONS --without-K --rewriting #-}
open import HoTT
open import cw.CW
open import homotopy.SphereEndomorphism
open import homotopy.PinSn
open import groups.CoefficientExtensionality
module cw.DegreeBySquashing {i} where
module DegreeAboveOne {n : ℕ} (skel : Skeleton {i} (S (S n)))
(dec : has-cells-with-de... |
{-# OPTIONS --without-K --safe #-}
module Categories.Category.Monoidal.Instance.Rels where
-- The category of relations is cartesian and (by self-duality) co-cartesian.
-- Perhaps slightly counter-intuitively if you're used to categories which act
-- like Sets, the product acts on objects as the disjoint union.
open ... |
module Common.MAlonzo where
open import Common.Prelude
open import Common.Coinduction
postulate
putStrLn : ∞ String → IO Unit
{-# COMPILED putStrLn putStrLn #-}
main = putStrLn (♯ "This is a dummy main routine.")
mainPrint : String → _
mainPrint s = putStrLn (♯ s)
postulate
natToString : Nat → String
{-# CO... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Relations between properties of functions, such as associativity and
-- commutativity
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Rela... |
{-# OPTIONS --rewriting #-}
open import prelude renaming (_≟Nat_ to _≟_)
-- Copied pretty much verbatim
Var = Nat
data Term : Set where
var : Var → Term
fun : Term → Term
_$_ : Term → Term → Term
true : Term
false : Term
if_then_else_end : Term → Term → Term → Term
data VarHeaded : Term → Set
data Valu... |
module PublicWithoutOpen2 where
import Imports.A public
|
open import Oscar.Prelude
open import Oscar.Data.¶
module Oscar.Data.Fin where
data ¶⟨<_⟩ : ¶ → Ø₀ where
∅ : ∀ {n} → ¶⟨< ↑ n ⟩
↑_ : ∀ {n} → ¶⟨< n ⟩ → ¶⟨< ↑ n ⟩
Fin = ¶⟨<_⟩
module Fin = ¶⟨<_⟩
|
-- Tests for withNormalisation
module _ where
open import Agda.Builtin.Reflection
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
open import Agda.Builtin.Bool
open import Agda.Builtin.Unit
open import Agda.Builtin.List
infixl 4 _>>=_
_>>=_ = bindTC
F : Bool → Set
F false = Nat
F true = Bool
data ... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Group.Semidirect where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Structure
open import Cubical.Algebra.Group.Base
open import Cubical.Algebra.Group.Morphism
open import Cubic... |
------------------------------------------------------------------------
-- The delay monad is a monad up to strong bisimilarity
------------------------------------------------------------------------
{-# OPTIONS --sized-types #-}
module Delay-monad.Monad where
open import Equality.Propositional
open import Prelude... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.