text stringlengths 4 690k |
|---|
open import Nat
open import Prelude
open import core
open import contexts
open import progress
open import preservation
open import elaborability
open import typed-elaboration
module continuity where
-- we take the sensibilty theorem as a postulate; for a proof, refer to
-- the POPL17 mechanization. we also postu... |
record R : Setβ where
X = Set Set -- should get error here
field A : Set
|
{-# OPTIONS --erased-cubical #-}
module Erased-cubical-Open-public.Erased (_ : Setβ) where
postulate
A : Set
|
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.types.Coproduct
open import lib.types.Fin
open import lib.types.Int
open import lib.types.Nat
open import lib.types.Pi
module lib.types.Group where
-- 1-approximation of groups without higher coherence conditions.
record GroupStructure {i... |
module Cats.Category.Mon where
open import Data.Unit using (β€)
open import Relation.Binary using (Setoid ; _Preservesβ_βΆ_βΆ_ ; IsEquivalence)
open import Level
open import Cats.Category
open import Cats.Category.Setoids using (Setoids)
open import Cats.Util.Conv
import Cats.Util.Function as Fun
record Monoid l lβ :... |
module Prelude.Semiring where
open import Agda.Builtin.Nat using (Nat; zero; suc)
open import Prelude.Function
record Semiring {a} (A : Set a) : Set a where
infixl 6 _+_
infixl 7 _*_
field zro one : A
_+_ _*_ : A β A β A
open Semiring {{...}} public
{-# DISPLAY Semiring.zro _ = zro #-}
{-# DISPLAY Se... |
-- There are no level literals in the concrete syntax. This file tests
-- if type errors use level literals.
{-# OPTIONS --universe-polymorphism #-}
module LevelLiterals where
open import Imports.Level
data β₯ : Setβ where
DoubleNegated : β {β} β Set β β Set
DoubleNegated A = (A β β₯) β β₯
|
------------------------------------------------------------------------------
-- All the FOTC modules
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTI... |
{-# OPTIONS --safe #-}
module Data.Nat.AbsoluteDifference where
open import Data.Nat.Base
open import Path
open import Prelude
open import Algebra
β£_-_β£ : β β β β β
β£ 0 - m β£ = m
β£ n@(suc _) - 0 β£ = n
β£ suc n - suc m β£ = β£ n - m β£
_ : β£ 5 - 3 β£ β‘ 2
_ = refl
_ : β£ 3 - 5 β£ β‘ 2
_ = refl
β£-β£βΏcomm ... |
open import Agda.Primitive using (lzero; lsuc; _β_)
open import Relation.Binary.PropositionalEquality using (_β‘_; refl; sym; trans; cong; congβ; subst; setoid)
open import Data.Product using (_Γ_; Ξ£; _,_; projβ; projβ; zip; map; <_,_>; swap)
import Function.Equality
open import Relation.Binary using (Setoid)
import Rel... |
{-# OPTIONS --safe --experimental-lossy-unification #-}
module Cubical.Algebra.CommRing.Instances.MultivariatePoly where
open import Cubical.Foundations.Prelude
open import Cubical.Data.Nat renaming(_+_ to _+n_; _Β·_ to _Β·n_)
open import Cubical.Algebra.Ring
open import Cubical.Algebra.CommRing
open import Cubical.Al... |
-- 2013-02-18 reported by rotsor
module Issue796 where
data U : Set where
a b : U
data A : Set where
data B : Set where
module Abs where
abstract
A' B' : Set
A' = A
B' = B
module Conc where
open Abs
-- Andreas, 2013-02-19
-- this function should not be injective, since here
-- it is not known w... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Functions.Involution where
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Univalence
isInvolution : β{β} {A : Type β} β (A β A) β Type _
isInvol... |
open import Agda.Builtin.List
foldr : {A B : Set} β (A β B β B) β B β List A β B
foldr _β_ Ξ΅ [] = Ξ΅
foldr _β_ Ξ΅ (x β· xs) = x β foldr _β_ Ξ΅ xs
infixr 5 _++_
_++_ : {A : Set} β List A β List A β List A
xs ++ ys = foldr _β·_ ys xs
record R (F : Set β Set) : Setβ where
field
f : {A : Set} β A β F A β F A
o... |
{-# OPTIONS --without-K #-}
-- The core types behind exploration functions
module Explore.Core where
open import Level.NP
open import Algebra
open import Type hiding (β
)
open import Function using (id; _β_; _ββ²_)
open import Data.Nat.NP using (β)
open import Data.Two using (π)
open import Data.Maybe.NP using (_β?_)
o... |
module L.Base.Nat.Core where
-- Introducing Nat type with constructors zero and succ
data Nat : Set where
zero : Nat
succ : Nat β Nat
-- Enabling the usage of numerals in code.
{-# BUILTIN NATURAL Nat #-}
ind : β{c} (C : Nat β Set c)
β C zero β ((x : Nat) β C x β C (succ x))
β (n : Nat) β C n
ind C cβ cβ ze... |
module Load where
data Bool : Set where
tt : Bool
ff : Bool
|
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Group.MorphismProperties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Isomorphism
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Equiv.HalfAdjoint
open import Cubical.Foundations.HLevels
op... |
module WrongHidingInLHS where
f : Set -> Set
f {x} = x
|
------------------------------------------------------------------------
-- The Agda standard library
--
-- Monads
------------------------------------------------------------------------
-- Note that currently the monad laws are not included here.
{-# OPTIONS --without-K --safe #-}
module Category.Monad where
open... |
{-# OPTIONS --without-K --safe #-}
module Instance where
open import Level
it : β {a} {A : Type a} β β¦ _ : A β¦ β A
it β¦ x β¦ = x
|
-- Example, β€ is an Euclidean Domain. Here all the properties needed
-- are already proved in Data.Integer.Properties. However, we will
-- prove there is another divmod pair such that the rank estimation
-- is more precise, see EucDomain2.agda.
{-# OPTIONS --without-K --safe #-}
module Integer.EucDomain where
-- i... |
------------------------------------------------------------------------------
-- The gcd program is correct
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-... |
module Structure.Operator.Monoid where
import Lvl
open import Logic
open import Logic.Predicate
open import Structure.Setoid
open import Structure.Operator.Properties hiding (associativity ; identityβ ; identityα΅£)
open import Structure.Operator
open import Type
-- A type and a binary operator using this type is ... |
module _ where
open import Agda.Builtin.Equality
postulate
A : Set
P : A β Set
data Id (A : Set) : Set where
id : A β Id A
data Flat (@β A : Set) : Set where
con : (@β x : A) β Flat A
counit : {@β A : Set} β Flat A β A
counit (con x) = x
test2 : (@β x : Id A) β Flat A
test2 (id x) = con x
test3 : (@β x :... |
-- {-# OPTIONS -v 10 #-}
-- {-# OPTIONS -v auto:100 #-}
postulate A : Set
X : Setβ
X = (P : Setβ) β (A β P) β P
foo : X β X
foo x P f = {!!}
-- Invoke Agsy in the hole above. Result:
--
-- Set != Setβ
-- when checking that the expression A has type Setβ
--
-- The error message points to A in the definition of X... |
module sv20.assign2.Second where
-- The solution for the second task starts in line 53
open import Data.Unit using (β€; tt)
open import Data.Product using (_Γ_ ; β) renaming (_,_ to β¨_,_β©)
open import Relation.Nullary using (Β¬_)
open import Data.Sum using (_β_; injβ; injβ)
open import Function using (_β_)
-- For the s... |
module NatTactic where
module _ where
open import Agda.Builtin.Nat
open import Agda.Builtin.List
-- n .. 1
downFrom : Nat β List Nat
downFrom zero = []
downFrom (suc n) = suc n β· downFrom n
module AgdaPreludeTest where
open import Prelude
open import Tactic.Nat
-- All tactics ... |
module Issue326 where
open import Common.Prelude
open import Common.MAlonzo using () -- see issue 561
postulate
QName : Set
printBool : Bool β IO Unit
{-# BUILTIN QNAME QName #-}
{-# COMPILED printBool print #-}
primitive primQNameEquality : QName β QName β Bool
main : IO Unit
main = printBool (primQNameEqual... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- we use duality to prove properties about coequalizer
module Categories.Diagram.Coequalizer.Properties {o β e} (C : Category o β e) where
open Category C
open import Categories.Diagram.Coequalizer C
open import Categories.Morphism C
open import Ca... |
------------------------------------------------------------------------
-- A lookahead operator cannot be defined
------------------------------------------------------------------------
-- In "Parsing with First-Class Derivatives" BrachthΓ€user, Rendel and
-- Ostermann state that "Lookahead and [...] cannot be expres... |
------------------------------------------------------------------------------
-- Agda-Prop Library.
-- Theorems of β connective.
------------------------------------------------------------------------------
open import Data.Nat using ( β )
module Data.PropFormula.Theorems.Biimplication ( n : β ) where
------------... |
module Logic.ChainReasoning where
module Mono where
module Homogenous
{ 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... |
{-# OPTIONS --without-K --no-pattern-matching #-}
module Ch2-7 where
open import Level hiding (lift)
open import Ch2-1
open import Ch2-2
open import Ch2-3
open import Ch2-4
open import Ch2-5
open import Ch2-6
open import Data.Product
open import Function using (id; _β_)
Definition-2-7-2-i : β {a b} {A : Set a} {P... |
-- In a mutual block, either all or none must have a MEASURE declaration.
module _ where
open import Common.Prelude
mutual
{-# MEASURE n #-}
f : (n : Nat) β Nat
f zero = zero
f (suc n) = g n
{-# MEASURE n #-}
g : (n : Nat) β Nat
g zero = zero
g (suc n) = suc (f n)
|
{-# OPTIONS --without-K --safe #-}
module README where
-- Formalization for "Decidability of Conversion for Type Theory in Type Theory"
-- Git repository: https://github.com/mr-ohman/logrel-mltt
------------------
-- INTRODUCTION --
------------------
-- A minimal library necessary for formalization:
-- Embedding... |
{-# OPTIONS --without-K --rewriting #-}
open import lib.Base
open import lib.PathFunctor
open import lib.PathGroupoid
open import lib.path-seq.Reasoning
module lib.path-seq.Ap where
module _ {i j} {A : Type i} {B : Type j} (f : A β B) where
ap-seq : {a a' : A} β a =-= a' β f a =-= f a'
ap-seq [] = []
ap-seq (... |
{-# OPTIONS --without-K #-}
--open import HoTT
open import homotopy.3x3.PushoutPushout
open import homotopy.3x3.Transpose
import homotopy.3x3.To as To
import homotopy.3x3.From as From
open import homotopy.3x3.Common
module homotopy.3x3.ToFrom2 {i} (d : Span^2 {i}) where
open Span^2 d
open M d hiding (Pushout^2)
open... |
open import Common
open import Global
open import Projection
open import Local
open import Data.Fin
open import Data.Product
open import Data.Vec
open import Relation.Binary.PropositionalEquality
n = 4
Role = Fin n
p : Role
p = zero
q : Role
q = suc zero
r : Role
r = suc (suc zero)
s : Role
s = suc (suc (suc zer... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Numbers.Integers.RingStructure.Ring
open import Semirings.Definition
open import Rings.Orders.Partial.Definition
open import Rings.Orders.Total.Definition
... |
module Data.Option where
import Lvl
open import Data
open import Type
private variable β ββ ββ : Lvl.Level
private variable T : Type{β}
data Option (T : Type{β}) : Type{β} where
None : Option(T)
Some : T β Option(T)
elim : β{A : Type{ββ}}{B : Option(A) β Type{ββ}} β B(None) β ((a : A) β B(Some a)) β ((o : ... |
{-# OPTIONS --universe-polymorphism #-}
module IDesc where
--********************************************
-- Prelude
--********************************************
-- Some preliminary stuffs, to avoid relying on the stdlib
--****************
-- Universe polymorphism
--****************
data Level : Set where
... |
open import OutsideIn.Prelude
open import OutsideIn.X
module OutsideIn.Instantiations.Simple where
open import Data.Fin hiding (_+_)
data Type ( n : Set) : Set where
funTy : Type n
_Β·_ : Type n β Type n β Type n
Var : n β Type n
private
fmap-Ο : β {a b} β (a β b) β Type a β Type b
fmap... |
{-# OPTIONS --without-K #-}
module Library where
open import Data.Product
using ( Ξ£ ; Ξ£-syntax ; _Γ_ )
public
open import Function
using ()
renaming ( id to Ξ»-id
; _β_ to Ξ»-comp
; flip to Ξ»-flip )
public
open import Level
using ( Level )
renaming ( zero to β-zero
... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Sublist-related properties
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.List.Relation.Binary.Sublist.Propositional.Properties
{a} {A ... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Numbers.ClassicalReals.RealField
open import LogicalFormulae
open import Setoids.Subset
open import Setoids.Setoids
open import Setoids.Orders.Partial.Definition
open import Sets.EquivalenceRelations
open import Rings.Orders.Partial.Definition
open import ... |
module SystemF.BigStep.Extrinsic where
open import SystemF.BigStep.Types
open import SystemF.BigStep.Extrinsic.Terms
open import SystemF.BigStep.Extrinsic.Welltyped
open import SystemF.BigStep.Extrinsic.Semantics
|
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... |
module Languages.FILL.Intermediate where
open import Utils.HaskellTypes
open import Languages.FILL.TypeSyntax
{-# IMPORT Languages.FILL.Intermediate #-}
data IPattern : Set where
PTriv : IPattern
PVar : String β IPattern
PTensor : IPattern β IPattern β IPattern
PPar : IPattern β IPattern β IPattern
{-# COMPI... |
module BTree.Complete.Alternative {A : Set} where
open import BTree {A}
open import BTree.Equality {A}
data _β_ : BTree β BTree β Set where
βlf : (x : A)
β (node x leaf leaf) β leaf
βnd : {l r l' r' : BTree}
β (x x' : A)
β l β r
β l' β r'
... |
------------------------------------------------------------------------------
-- The types used by the mirror function
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorp... |
-- Sometimes we can't infer a record type
module InferRecordTypes-1 where
bad = record { } |
{-# OPTIONS --without-K --safe #-}
open import Algebra.Structures.Bundles.Field
module Algebra.Linear.Construct.Matrix.Square
{k β} (K : Field k β)
where
open import Level using (_β_)
open import Data.Nat using (β)
open import Data.Fin
open import Data.Product
open import Algebra.Structures.Field.Utils K
open i... |
module Dave.Algebra.Naturals.Monus where
open import Dave.Algebra.Naturals.Definition
open import Dave.Algebra.Naturals.Addition
_βΈ_ : β β β β β
m βΈ zero = m
zero βΈ suc n = zero
suc m βΈ suc n = m βΈ n
infixl 6 _βΈ_
βΈ-zero : β (n : β) β 0 βΈ n β‘ 0
βΈ-zero zero = refl
βΈ-zero (suc n)... |
{-# OPTIONS --safe #-}
open import Definition.Typed.EqualityRelation
module Definition.LogicalRelation.Substitution.Introductions.CastPi {{eqrel : EqRelSet}} where
open EqRelSet {{...}}
open import Definition.Untyped as U hiding (wk)
open import Definition.Untyped.Properties
open import Definition.Typed
open import ... |
-- Be afraid⦠Type as type Type
{-# OPTIONS --type-in-type #-}
{-
Be really afraid: this module is a hack to give definitional equalities
to βΉ. This is done by introducing an 'evil' function called 'run' that
should not appear in user code. Is this safe to do? This remains to be
explored.
By the same token we give a ... |
module Prelude.Char where
open import Prelude.Bool
open import Prelude.Nat
open import Prelude.Equality
open import Prelude.Equality.Unsafe
open import Prelude.Decidable
open import Prelude.Function
open import Prelude.Ord
open import Agda.Builtin.Char
open Agda.Builtin.Char public using (Char)
isLower = primIsL... |
{-# OPTIONS --without-K --safe #-}
module Definition.Typed where
open import Definition.Untyped hiding (_β·_)
open import Tools.Fin
open import Tools.Nat
open import Tools.Product
infixl 30 _β_
infix 30 Ξ β±Ό_βΉ_
infix 30 Ξ£β±Ό_βΉ_
infix 30 β¦_β§β±Ό_βΉ_
private
variable
n m : Nat
Ξ : Con Term n
A B F : Term n
... |
-- Binary coproducts
{-# OPTIONS --safe #-}
module Cubical.Categories.Limits.BinCoproduct where
open import Cubical.Categories.Category.Base
open import Cubical.Data.Sigma.Base
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Prelude
open import Cubical.HITs.PropositionalTruncation.Base
privat... |
{-# OPTIONS --without-K --safe #-}
-- Some properties of Restriction Categories
-- The first few lemmas are from Cocket & Lack, Lemma 2.1 and 2.2
module Categories.Category.Restriction.Properties where
open import Data.Product using (Ξ£; _,_)
open import Level using (Level; _β_)
open import Categories.Category.Core ... |
------------------------------------------------------------------------
-- Lemmas about the initial bag index
------------------------------------------------------------------------
module TotalParserCombinators.InitialBag where
open import Category.Monad
open import Data.List
import Data.List.Categorical
open impo... |
-- 2012-03-16 Andreas, fixing shift/reduce conflict introduced by record update
module Issue549 where
record M.R { A } : Set where
-- gives: Not a valid identifier M.R
-- If you remove the A, you get: Not a valid pattern
-- since then it is parsed as a record update expression
|
open import Spire.Type
module Spire.Denotational where
----------------------------------------------------------------------
data Term : Set β Setβ
eval : {A : Set} β Term A β A
----------------------------------------------------------------------
data Term where
{- Type introduction -}
`β₯ `β€ `Bool `β `Desc `... |
open import Coinduction using ( β ; β―_ ; β )
open import Data.Product using ( _,_ )
open import FRP.LTL.ISet.Core using ( ISet ; Mβ¦_β§ ; splitMβ¦_β§ ; β¦_β§ ; β_β ; [_] )
open import FRP.LTL.ISet.Product using ( _β§_ )
open import FRP.LTL.ISet.Stateless using ( _β_ )
open import FRP.LTL.Time.Bound using ( Timeβ ; fin ; +β ; ... |
{- 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
-}
open import LibraBFT.Prelude
open import LibraBFT.Lemmas
open import Lib... |
{-
This file contains:
- 3Γ3 lemma for pushouts
Written by: LoΓ―c Pujet, April 2019
-}
{-# OPTIONS --cubical --safe #-}
module Cubical.HITs.Pushout.Properties where
open import Cubical.Core.Glue
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Equiv
open import Cubical.Foundations.Isomorp... |
-- Andreas, 2016-01-03, issue reported by mechvel
module _ where
-- With hidden parameter, things work
module Works0 {A : Set} where
postulate
P : (a : A) β Set
record Works (a : A) : Set where
f : P a β Set
f p with p
... | _ = A
-- With visible parameter, the error is triggered
-- because it... |
-- Andreas, 2015-06-11
{-# OPTIONS --copatterns #-}
open import Common.Size
module _ {C : Set} {R : C β Set} where
mutual
record IO (i : Size) (A : Set) : Set where
coinductive
constructor delay
field
force : {j : Size< i} β IO' j A
data IO' (i : Size) (A : Set) : Set where
do : (c : ... |
module Test01 where
hoge : {A : Set} β A β A
hoge x = x
open import Relation.Binary.PropositionalEquality as PropEq using (_β‘_; subst)
open import Function using (id)
lemma1 : {X Y : Set} β (X β‘ (X β Y)) β X
lemma1 p rewrite p = (Ξ» x β let f = subst id p x in f x)
curry : {X Y : Set} β (X β‘ (X β Y)) β Y
curry p = (... |
-- This demonstrates a known issue:
-- The parser is not aware of strings, thus,
-- a closing block comment delimiter inside a string
-- is taken as a closing block comment delimiter.
-- Without nested comments:
{- This is commented-out.
test = "A weird string with comment closing -} and other garbage @#$% that appea... |
open import Function
open import Relation.Nullary
open import Relation.Binary hiding (_β_)
open import Relation.Binary.PropositionalEquality hiding ([_])
open import Data.Sum
open import Data.Product
delim : β {Ξ± Ξ²} {A : Set Ξ±} {B : Dec A -> Set Ξ²}
-> (d : Dec A) -> (β x -> B (yes x)) -> (β c -> B (no c)) -> B d... |
open import Prelude
open import core
module lemmas-consistency where
-- type consistency is symmetric
~sym : {t1 t2 : htyp} β t1 ~ t2 β t2 ~ t1
~sym TCRefl = TCRefl
~sym TCHole1 = TCHole2
~sym TCHole2 = TCHole1
~sym (TCArr p1 p2) = TCArr (~sym p1) (~sym p2)
-- type consistency isn't transitive
not-tra... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Lists defined in terms of Data.Star
------------------------------------------------------------------------
module Data.Star.List where
open import Data.Star
open import Data.Unit
open import Relation.Binary.S... |
open import Agda.Builtin.Sigma
dup : β {A : Set} β A β Ξ£ A Ξ» _ β A
dup x = x , x
postulate
A : Set
module M {x : A} where
y = x
data X : Set where
mkX : β {x : A}
β let
(_ , _) = dup x
open M {x}
in
X
|
module MissingDefinition where
T : Set -> Set
|
{-# OPTIONS --without-K #-}
open import Base
module Spaces.WedgeCircles {i} (A : Set i) where
{-
The idea is
data wedge-circles : Set (suc i) where
base : wedge-circles
loops : A β base β‘ base
-}
private
data #wedge-circles : Set (suc i) where
#base : #wedge-circles
wedge-circles : Set (suc i)
wedge-cir... |
{-# OPTIONS --without-K --safe #-}
open import Categories.Category
-- we use duality to prove properties about coequalizer
module Categories.Diagram.Coequalizer.Properties {o β e} (C : Category o β e) where
open Category C
open import Categories.Diagram.Coequalizer C using (Coequalizer; IsCoequalizer)
open import C... |
------------------------------------------------------------------------------
-- Properties related with lists using instances of the induction principle
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}... |
module plfa.part1.Bin where
import Relation.Binary.PropositionalEquality as Eq
open Eq using (_β‘_; refl; cong)
open import Data.Nat using (β; zero; suc; _*_; _+_)
open import Data.Nat.Properties using (+-suc)
data Bin : Set where
β¨β© : Bin
_O : Bin β Bin
_I : Bin β Bin
inc : Bin β Bin
inc β¨β© = β¨β© I
inc (b O)... |
module Oscar.Class.Equivalence where
open import Oscar.Class.Reflexivity
open import Oscar.Class.Symmetry
open import Oscar.Class.Transitivity
open import Oscar.Function
open import Oscar.Level
record Equivalence {a} {A : Set a} {β} (_β_ : A β A β Set β) : Set (a β β) where
field
β¦ β²reflexivity β¦ : Reflexivity... |
module sv20.assign2.Second_old4 where
open import Data.Bool as Bool using (Bool; true; false; T; _β¨_; _β§_)
--open import Relation.Nullary using (Β¬_)
open import Data.Unit using (β€; tt)
open import Data.Empty using (β₯; β₯-elim)
open import Data.Nat using (β; zero; suc; _+_; _*_)
open import Level using (Level; _β_; 0β) ... |
-- Andreas, 2018-05-11, issue #3049 reported by Ulf
-- Positivity checker too optimistic about polarity of arguments
-- beyond the formal function arity.
-- Backwards-compatible version of the test case.
-- {-# OPTIONS -v tc.pos.args:100 #-}
module Issue3049 where
data Bool : Set where
true false : Bool
T : Bool... |
-- Andreas, 2012-10-20
module Issue481NonExistentModule where
open import NonExistentModule Set
-- test the error message and location
|
module Haskell.Prim.Traversable where
open import Haskell.Prim
open import Haskell.Prim.Applicative
open import Haskell.Prim.Functor
open import Haskell.Prim.Foldable
open import Haskell.Prim.Monad
open import Haskell.Prim.List
open import Haskell.Prim.Maybe
open import Haskell.Prim.Either
open import Haskell.Prim.Tu... |
open import Data.List using ( List ; [] ; _β·_ )
open import Data.List.Any using ( here ; there )
open import Data.Product using ( _,_ ; projβ ; projβ )
open import Data.Sum using ( injβ ; injβ )
open import Relation.Binary.PropositionalEquality using
( refl ; sym ; trans ; substβ )
open import Relation.Unary using ( ... |
module _ where
module Testβ where
module A where
infixl 0 _+_
data D : Set where
β’ : D
_+_ : D β D β D
module B where
data D : Set where
β’ : D
_+_ : D β D β D
open A
open B
Foo : A.D
Foo = β’ + β’ + β’
module Testβ where
module A where
data D : Set where... |
postulate
A : Set
B : Set
t : B
data C : (b : B) β Set
foo : (b : B) β C b β B
data C where
c : (x : C t) β C (foo t x)
foo b x = {!x!}
|
module Syntax.Implication.Dependent where
open import Functional using (id)
open import Functional.Dependent
import Lvl
open import Type
private variable ββ ββ ββ ββ : Lvl.Level
_β-[_]_ : β(X : Type{ββ}){Y : β{_ : X} β Type{ββ}}{Z : β{x : X}{_ : Y{x}} β Type{ββ}} β (P : (x : X) β Y{x}) β (β{x : X} β (y : Y{x}) ... |
module Numeral.Natural.Oper where
open import Numeral.Natural
infixl 10010 _+_
infix 10010 _ββ_ _π©_
infixl 10020 _β
_
-- infix 10020 _/β_
infixl 10030 _^_
-- TODO: It would require a great amount of work, but consider changing the induction to being on the left side instead of the right on _+_ and _β
_. It will the... |
{-# OPTIONS --without-K #-}
{- Here, truncations with propositional computational behaviour are defined.
This lack of a definitional Ξ²-rule enabled us to talk about this notion
inside type theory without truncations, albeit complicating setup and proofs.
After definition and basic accessories concerning univ... |
record _Γ_ (A B : Set) : Set where
no-eta-equality
constructor _,_
field
fst : A
snd : B
open _Γ_
swap : β {A B} β A Γ B β B Γ A
swap (x , y) = y , x
data _β‘_ {A : Set} (x : A) : A β Set where
refl : x β‘ x
-- This should fail since we don't have eta for _Γ_.
fails : β {A B} (p : A Γ B) β swap p β‘ (... |
-- Author: Makoto Takeyama
module ParenDepTac where
----------------------------------------------------------------------
-- Preliminary
----------------------------------------------------------------------
infix 3 _β‘_
data _β‘_ {A : Set}(x : A) : A -> Set where
refl : x β‘ x
subst : {A : Set}(C : A -> Set){x y ... |
{-# OPTIONS --rewriting #-}
module Correctness where
open import Convertibility public
open import Semantics public
{-# BUILTIN REWRITE _β‘_ #-}
{-# REWRITE idmonoβ©β #-}
-- TODO: Naming things.
module _ {{_ : Model}} where
β¦_β_β§β : β {C Ξ w} β (i : C β Ξ) β w βͺ Ξ β i β« C β« β
β {A} β A β Ξ β w βͺ Ξ β i ... |
{-# OPTIONS --without-K --safe #-}
module PiFracMemSem where
open import Relation.Binary.Core
open import Data.Empty
open import Function
open import Data.Nat
open import Data.Nat.Properties
open import Data.Fin as Fin using (Fin; zero; suc)
open import Data.Vec
open import Data.Vec.Relation.Unary.Any.Properties
open ... |
open import Common.Prelude
open import Common.Equality
open import Common.Reflection
pattern _`+_ a b = def (quote _+_) (vArg a β· vArg b β· [])
`_ : Term β Term
` con c [] = con (quote Term.con) (vArg (lit (qname c)) β· vArg (con (quote []) []) β· [])
` _ = unknown
-- Prevent quotation
data WrapTerm : Set where... |
-- Hilbert-style formalisation of closed syntax.
-- Sequences of terms.
module OldBasicILP.UntypedSyntax.ClosedHilbertSequential where
open import OldBasicILP.UntypedSyntax.Common public
-- Closed, untyped representations.
data Rep : β β Set where
NIL : Rep zero
MP : β {n} β Fin n β Fin n β Rep n β Rep (s... |
module Nat.Sum where
open import Data.Nat
open import Relation.Binary
open import Relation.Binary.PropositionalEquality
open DecTotalOrder decTotalOrder hiding (refl)
+id : (n : β) β n + zero β‘ n
+id zero = refl
+id (suc n) = cong suc (+id n)
+assoc : (m n : β) β m + suc n β‘ suc (m + n)
+assoc zero n = refl
+ass... |
module CH where
data β : Set where
zero : β
succ : β β β
infixl 6 _+_
_+_ : β β β β β
zero + m = m
(succ n) + m = succ (n + m)
infix 4 _β‘_
data _β‘_ {A : Set} (x : A) : A β Set where
refl : x β‘ x
{-
t1 : {n : β} -> zero β‘ n
t1 = refl
-}
data _==_ {A : Set} : A β A β Set where
refl' : (a : A) β a == ... |
-- This is mainly a test of the quality of error messages for
-- termination problems.
module TerminationLambda where
postulate Id : Set β Set
F : Set β Set
F = Ξ» A β F (Id A)
|
module UniDB.Morph.Shifts where
open import UniDB.Spec
--------------------------------------------------------------------------------
data Shifts : MOR where
refl : {Ξ³ : Dom} β Shifts Ξ³ Ξ³
step : {Ξ³β Ξ³β : Dom} (ΞΎ : Shifts Ξ³β Ξ³β) β Shifts Ξ³β (suc Ξ³β)
skip : {Ξ³β Ξ³β : Dom} (ΞΎ : Shifts Ξ³β Ξ³β) β Shifts (suc Ξ³β) (... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.