text stringlengths 4 690k |
|---|
module ImportTests.ExtractCaseSplit where
open import ExtractCaseSplit
open import Data.Maybe
open import Data.Bool
test : Bool
test = func (just false)
|
-- Andreas, 2016-06-11, issue reported by Mietek Bak
data Foo : Foo → Set where
-- WAS: Panic: unbound name Foo
-- NOW: Not in scope: Foo
|
{-# OPTIONS --without-K #-}
open import lib.Basics
open import lib.types.Paths
open import lib.types.Pi
open import lib.types.Sigma
module lib.types.Pointed where
Ptd : ∀ i → Type (lsucc i)
Ptd i = Σ (Type i) (λ A → A)
Ptd₀ = Ptd lzero
⊙[_,_] : ∀ {i} (A : Type i) (a : A) → Ptd i
⊙[_,_] = _,_
infixr 0 _⊙→_
_⊙→_ : ... |
------------------------------------------------------------------------
-- Indices
------------------------------------------------------------------------
module Parallel.Index where
open import Data.Product.Record
import Data.Product as Prod; open Prod using () renaming (_,_ to pair)
open import Data.Bool using (... |
------------------------------------------------------------------------
-- Small coinductive higher lenses with erased "proofs"
------------------------------------------------------------------------
{-# OPTIONS --guardedness #-}
import Equality.Path as P
module Lens.Non-dependent.Higher.Coinductive.Small.Erased
... |
module perm-keep-length where
open import nat
open import list
open import nondet
open import bool
open import bool-thms
open import eq
open import nat-thms
open import nondet-thms
-- Non-deterministic insert:
ndinsert : {a : Set} → a → 𝕃 a → ND (𝕃 a)
ndinsert x [] = Val (x :: [])
ndinsert x (y :: ys) = Val... |
------------------------------------------------------------------------
-- Total recognisers which can handle left recursion
------------------------------------------------------------------------
-- The recognisers are parametrised on the alphabet.
module TotalRecognisers.LeftRecursion (Tok : Set) where
open impo... |
open import Formalization.PredicateLogic.Signature
module Formalization.PredicateLogic.Syntax (𝔏 : Signature) where
open Signature(𝔏)
open import Data.ListSized
import Lvl
open import Functional using (_∘_ ; _∘₂_ ; swap)
open import Numeral.Finite
open import Numeral.Natural
open import Sets.PredicateSet using... |
{-
In order to solve the metavariables in this example
we need to solve a constraint of the form
_1 := unit₂ (_2 y)
With the flex removal feature the occurs check will
spot the bad variable 'y' in the instantiation and
remove it by instantiating
_2 := λ y → _3
for a fresh metavariable _3. The i... |
{-# OPTIONS --without-K #-}
open import HoTT
open import cohomology.Theory
{- Cohomology groups of the n-torus (S¹)ⁿ.
- We have Ĉᵏ(Tⁿ) == C⁰(S⁰)^(n choose' k) where _choose'_ defined as below.
- This argument could give Cᵏ((Sᵐ)ⁿ) with a little more work. -}
module cohomology.Torus {i} (OT : OrdinaryTheory i) wher... |
module Numeral.Natural.Function.GreatestCommonDivisor where
import Lvl
open import Data
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Functional
open import Logic.Propositional
open import Numeral.CoordinateVector as Vector using (Vector)
open import Numeral.Finite using (𝕟 ; 𝟎 ; 𝐒)
open import Nume... |
{-# OPTIONS --without-K --exact-split --safe #-}
open import Fragment.Algebra.Signature
module Fragment.Algebra.Quotient (Σ : Signature) where
open import Fragment.Algebra.Algebra Σ
open import Fragment.Algebra.Homomorphism Σ
open import Fragment.Setoid.Morphism using (_↝_)
open import Level using (Level; Setω; _⊔_... |
-- Non-index (plain) monads in form of Kleisli triple.
module Control.Monad where
open import Function using () renaming (_∘′_ to _∘_)
open import Relation.Binary.PropositionalEquality
open ≡-Reasoning
open import Axiom.FunctionExtensionality
open import Control.Functor
-- The operations of a monad.
module T-Monad... |
module Issue278 where
abstract
module A where
Foo : Set₁
Foo = Set
module B where
open A
Foo≡Set : Foo ≡ Set
Foo≡Set = refl
|
{-# OPTIONS --cubical --safe #-}
module Data.Nat.Show where
open import Prelude
open import Data.Nat
open import Data.Nat.DivMod
open import Data.String
open import Data.List
showDig : ℕ → Char
showDig 0 = '0'
showDig 1 = '1'
showDig 2 = '2'
showDig 3 = '3'
showDig 4 = '4'
showDig 5 = '5'
showDig 6 = '6'
showDig 7 =... |
module Data.List.Prefix where
open import Level
open import Data.Nat
open import Data.List
open import Data.List.At
open import Data.List.Membership.Propositional
open import Data.List.Relation.Unary.Any hiding (map)
open import Data.List.Relation.Binary.Pointwise as P hiding (refl; map)
open import Relation.Binary
op... |
{-# OPTIONS --without-K #-}
open import Types
open import Functions
open import Paths
open import HLevel
open import Equivalences
open import Univalence
open import Funext
module HLevelBis where
abstract
-- Every map between contractible types is an equivalence
contr-to-contr-is-equiv : ∀ {i j} {A : Set i} {B : ... |
open import Coinduction using ( ♭ ; ♯_ )
open import Data.Empty using ( ⊥-elim )
open import System.IO.Transducers.Session using ( Session ; I ; Σ ; IsΣ ; Γ ; _/_ ; _∼_ )
open import System.IO.Transducers.Trace using ( Trace ; [] ; _∷_ ; _⊨_✓ ; _✓ ; _⊑_ )
open import System.IO.Transducers.Lazy using ( _⇒_ ; inp ; out ;... |
{-# OPTIONS --universe-polymorphism #-}
-- Should give some unsolved metas
module Issue203b where
open import Imports.Level
-- Should work but give unsolved metas (type of b)
data ↓ {a b} (A : Set a) : Set a where
[_] : (x : A) → ↓ A
-- Shouldn't instantiate the level of Σ to a
data Σ {a b} (A : Set a) (B : A → S... |
{-# OPTIONS --cubical #-}
module _ where
open import Agda.Primitive.Cubical
open import Agda.Builtin.Cubical.Path
data S1 : Set where
base : S1
loop : base ≡ base
postulate
weird : S1 → I
bad : (x : S1) → I
bad base = {!!}
bad (loop x) = {!!}
|
{-# OPTIONS --allow-unsolved-metas #-}
module HasSubstantiveDischarge where
open import OscarPrelude
record HasSubstitution (T : Set) (S : Set) : Set where
field
_◃_ : S → T → T
open HasSubstitution ⦃ … ⦄ public
record HasPairUnification (T : Set) (S : Set) : Set where
field
⦃ hasSubstitution ⦄ : HasSub... |
{-# OPTIONS --without-K --safe #-}
module Cats.Category.Constructions.Thin where
open import Cats.Category.Base
open import Level using (_⊔_)
open import Relation.Binary.PropositionalEquality using (_≡_)
module _ {lo la l≈} (C : Category lo la l≈) where
open Category C
Thin : Set (lo ⊔ la ⊔ l≈)
Thin = ∀ {A... |
------------------------------------------------------------------------------
-- All the group theory modules
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
... |
{-# OPTIONS --warning=error #-}
module _ (A : Set) where
{-# POLARITY A #-}
|
open import prelude renaming (_≟String_ to _≟_)
infixl 5 _$_
-- Copied pretty much verbatim
Var = String
data Term : Set where
var : Var → Term
fun : Var → Term → Term
_$_ : Term → Term → Term
data Value : Term → Set where
fun : (x : Var) → (t : Term) → Value(fun x t)
-- Free variables of a term.
-- (Turn... |
-- Reported by fredrik.forsberg, Oct 21, 2014
-- The following code gives an internal error
-- "An internal error has occurred. Please report this as a bug.
-- Location of the error: src/full/Agda/TypeChecking/InstanceArguments.hs:269"
-- on Agda head, since "n ≠ zero" is not expanded.
open import Common.Prelude
ope... |
module C where
open import B
C : Set
C = B
|
open import Data.Sum using ( _⊎_ ; inj₁ ; inj₂ )
open import Relation.Binary.PropositionalEquality using ( refl )
open import Web.Semantic.DL.ABox.Interp using ( ⌊_⌋ ; ind ; _*_ )
open import Web.Semantic.DL.ABox.Model using
( _⊨a_ ; ⊨a-resp-≡³ ; on-bnode ; bnodes ; _,_ )
open import Web.Semantic.DL.Category.Object u... |
{-# OPTIONS --without-K --safe #-}
module Fragment.Examples.Semigroup.Arith.Reasoning where
open import Fragment.Examples.Semigroup.Arith.Base
+-direct : ∀ {m n} → (m + 2) + (3 + n) ≡ m + (5 + n)
+-direct {m} {n} = begin
(m + 2) + (3 + n)
≡⟨ fragment SemigroupFrex +-semigroup ⟩
m + (5 + n)
∎
open import... |
{-# OPTIONS --allow-unsolved-metas #-}
module nfa where
-- open import Level renaming ( suc to succ ; zero to Zero )
open import Data.Nat
open import Data.List
open import Data.Fin hiding ( _<_ )
open import Data.Maybe hiding ( zip )
open import Relation.Nullary
open import Data.Empty
-- open import Data.Bool using ( ... |
module Acme.Type where
open import Agda.Builtin.Bool using (Bool; true; false) public
open import Agda.Builtin.Char using (Char)
renaming (primCharEquality to _==_) public
open import Agda.Builtin.Equality using (_≡_; refl) public
open import Agda.Builtin.List using (List; []; _∷_) public
open import Agda.Builtin.St... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Indexed binary relations
------------------------------------------------------------------------
-- The contents of this module should be accessed via
-- `Relation.Binary.Indexed.Heterogeneous`.
{-# OPTIONS --... |
-- Partly based on code due to Andrea Vezzosi.
{-# OPTIONS --cubical-compatible --safe #-}
open import Agda.Builtin.Bool
data D : Set where
run-time : Bool → D
@0 compile-time : Bool → D
g : D → D
g (run-time x) = run-time x
g (compile-time x) = compile-time x
h : D → @0 D → D
h (run-time x) _ ... |
open import Agda.Builtin.Unit
open import Agda.Builtin.List
open import Agda.Builtin.Reflection
postulate
foo : Set
macro
bar : Term → TC ⊤
bar = unify (def (quote foo) [])
test : Set
test = {!bar!}
|
{-# OPTIONS --warning=error --safe --without-K #-}
open import LogicalFormulae
open import Categories.Definition
module Categories.Dual.Definition where
dual : {a b : _} → Category {a} {b} → Category {a} {b}
dual record { objects = objects ; arrows = arrows ; id = id ; _∘_ = _∘_ ; rightId = rightId ; leftId = leftId... |
---------------------------------------------
-- Consequences of the axiom of regularity
---------------------------------------------
{-# OPTIONS --allow-unsolved-meta #-}
module sv20.assign2.SetTheory.Regularity where
open import sv20.assign2.SetTheory.Logic
open import sv20.assign2.SetTheory.Algebra
open import sv... |
module FFI.Data.Scientific where
{-# FOREIGN GHC import qualified Data.Scientific #-}
postulate Scientific : Set
{-# COMPILE GHC Scientific = type Data.Scientific.Scientific #-}
|
{-# OPTIONS --without-K --rewriting #-}
open import lib.Basics
open import lib.NType2
open import lib.types.Int
open import lib.types.Group
open import lib.types.List
open import lib.types.Word
open import lib.groups.Homomorphism
open import lib.groups.Isomorphism
open import lib.groups.FreeAbelianGroup
open import li... |
import cedille-options
open import general-util
module untyped-spans (options : cedille-options.options) {F : Set → Set} ⦃ monadF : monad F ⦄ where
open import ctxt
open import cedille-types
open import constants
open import conversion
open import free-vars
open import rename
open import spans options {F} ⦃ monadF ⦄
... |
module AlonzoPrelude where
open import RTN public
import RTP -- magic module - Run Time Primitives
Int : Set
Int = RTP.Int
Float : Set
Float = RTP.Float
String : Set
String = RTP.String
Char : Set
Char = RTP.Char
data True : Set where
tt : True
{-
record True : Set where
tt : T... |
{- 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
import LibraBFT.Impl.Consensus.Consensus... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Bisimilarity for Covecs
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Covec.Bisimilarity where
open import Level using ... |
------------------------------------------------------------------------
-- Some omniscience principles
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Omniscience {c⁺} (eq : ∀ {a p} → Equality-with-J a p c⁺) where
open Derived-... |
--------------------------------------------------------------------------------
-- This is part of Agda Inference Systems
{-# OPTIONS --guardedness #-}
module is-lib.InfSys {𝓁} where
open import is-lib.InfSys.Base {𝓁} public
open import is-lib.InfSys.Induction {𝓁} public
open import is-lib.InfSys.Coinduct... |
module Issue121 where
id : Set → Set
id A = A
data Bool : Set where
true : Bool
false : Bool
F : Bool → Set → Set
F true = id
F false = id
G : Bool → Set → Set
G true = id
G false = λ A → A
data D : Set where
nop : (b : Bool) → F b D → D
bop : (b : Bool) → G b D → D
|
{-
This second-order signature was created from the following second-order syntax description:
syntax Group | G
type
* : 0-ary
term
unit : * | ε
add : * * -> * | _⊕_ l20
neg : * -> * | ⊖_ r40
theory
(εU⊕ᴸ) a |> add (unit, a) = a
(εU⊕ᴿ) a |> add (a, unit) = a
(⊕A) a b c |> add (add(a, b), c) = ... |
------------------------------------------------------------------------------
-- Properties stated in the Burstall's paper
------------------------------------------------------------------------------
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-poly... |
module Basic.Compiler.CorrectFrom where
open import Basic.AST
open import Basic.BigStep
open import Basic.Compiler.Code
open import Basic.Compiler.SplitCode
open import Utils.NatOrdLemmas
open import Utils.Decidable
open import Utils.Monoid
open import Data.Fin using (Fin; #_)
open import Data.Vec hiding (_∷ʳ_; _++_... |
{-# OPTIONS --type-in-type #-}
record ⊤ : Set where
constructor tt
data ⊥ : Set where
data _==_ {A : Set} (x : A) : A → Set where
refl : x == x
module _ (A : Set) (B : A → Set) where
record Σ : Set where
constructor _,_
field
π₁ : A
π₂ : B π₁
open Σ public
syntax Σ A (λ x → B) = Σ[ x ∶... |
module Agda.Builtin.Nat where
open import Agda.Builtin.Bool
data Nat : Set where
zero : Nat
suc : (n : Nat) → Nat
{-# BUILTIN NATURAL Nat #-}
infix 4 _==_ _<_
infixl 6 _+_ _-_
infixl 7 _*_
_+_ : Nat → Nat → Nat
zero + m = m
suc n + m = suc (n + m)
{-# BUILTIN NATPLUS _+_ #-}
_-_ : Nat → Nat → Nat
n -... |
{-# OPTIONS --safe #-}
module Definition.Conversion.Reduction where
open import Definition.Untyped
open import Definition.Typed
open import Definition.Typed.Properties
open import Definition.Conversion
-- Weak head expansion of algorithmic equality of types.
reductionConv↑ : ∀ {A A′ B B′ r Γ}
→ Γ ⊢ A... |
open import Agda.Builtin.IO
open import Agda.Builtin.Size
open import Agda.Builtin.Unit
data D (i : Size) : Set where
{-# FOREIGN GHC
data Empty i
#-}
{-# COMPILE GHC D = data Empty () #-}
f : ∀ {i} → D i → D i
f ()
{-# COMPILE GHC f as f #-}
postulate
return : {A : Set} → A → IO A
{-# COMPILE GHC return =... |
module Oscar.Class.Reflexive where
open import Oscar.Level
open import Oscar.Property.IsReflexive
record Reflexive {𝔬} (⋆ : Set 𝔬) ℓ : Set (𝔬 ⊔ lsuc ℓ) where
field
_≣_ : ⋆ → ⋆ → Set ℓ
isReflexive : IsReflexive ⋆ _≣_
open IsReflexive isReflexive public
|
{-# OPTIONS --without-K --safe #-}
open import Categories.Category using (Category; module Commutation)
open import Categories.Category.Monoidal.Core using (Monoidal)
open import Categories.Category.Monoidal.Braided using (Braided)
-- Braided monoidal categories satisfy the "four middle interchange"
module Categorie... |
module Min where
open import Data.Nat using (ℕ; zero; suc)
open import Algebra.Bundles using (CommutativeRing)
open import Algebra.Module.Bundles using (Module)
open import Data.Product using (Σ-syntax; ∃-syntax; _×_; proj₁; proj₂; _,_)
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Relation.Binary.Core usin... |
{-
This file contains:
- Properties of groupoid truncations
-}
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.HITs.GroupoidTruncation.Properties where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.Function
open import Cubical.Foundations.HLevels
open import Cubical.Found... |
{-# OPTIONS --cubical --no-import-sorts --guardedness --safe #-}
module Cubical.Codata.M.AsLimit.Coalg where
open import Cubical.Codata.M.AsLimit.Coalg.Base public
|
module Oscar.Property.Extensionality where
open import Oscar.Level
record Extensionality
{a} {A : Set a} {b} {B : A → Set b} {ℓ₁}
(_≤₁_ : (x : A) → B x → Set ℓ₁)
{c} {C : A → Set c} {d} {D : ∀ {x} → B x → Set d} {ℓ₂}
(_≤₂_ : ∀ {x} → C x → ∀ {y : B x} → D y → Set ℓ₂)
(μ₁ : (x : A) → C x)
(μ₂ : ∀ {... |
{-# OPTIONS --without-K #-}
open import Base
open import Homotopy.Truncation
open import Integers
-- Formalization of 0-truncated groups
module Algebra.Groups where
-- A pregroup is a group whose carrier is not a required to be a set (but
-- without higher coherences)
record pregroup i : Set (suc i) where
-- cons... |
{-
Definition of the integers as a HIT ported from the redtt library:
https://github.com/RedPRL/redtt/blob/master/library/cool/biinv-int.red
For the naive, but incorrect, way to define the integers as a HIT, see HITs.IsoInt
This file contains:
- definition of BiInvInt
- proof that Int ≡ BiInvInt
- [discreteBiInvI... |
module Numeral.Natural.Oper.Summation.Range.Proofs where
import Lvl
open import Data.List
open import Data.List.Functions
open Data.List.Functions.LongOper
open import Data.List.Proofs
open import Data.List.Equiv.Id
open import Data.List.Proofs.Length
open import Functional as Fn using (_$_ ; _∘_ ; const)
... |
module Section9 where
open import Section8 public
-- 9. A decision algorithm for terms
-- =================================
--
-- The reduction defined above can be used for deciding if two well-typed terms are convertible
-- with each other or not: reduce the terms and check if the results are equal. This algorith... |
-- Andreas, 2019-12-03, issue #4205, reported by Smaug123,
-- first shrinking by Jesper Cockx
record R : Set₂ where
field
f : Set₁
postulate
r : R
open R r
test : R
R.f test with Set₃
f test | _ = Set
-- WAS: internal error in getOriginalProjection
-- EXPECTED:
-- With clause pattern f is not an instance... |
module Ints.Add.Invert where
open import Ints
open import Ints.Properties
open import Ints.Add.Comm
open import Nats.Add.Invert
open import Data.Empty
open import Relation.Nullary
open import Equality
open import Function
------------------------------------------------------------------------
-- internal stuffs
p... |
-- {-# OPTIONS -v impossible:100 -v tc.lhs.imp:100 #-}
-- {-# OPTIONS -v impossible:100 -v tc.cover:20 #-}
{-# OPTIONS --copatterns #-}
module Copatterns where
open import Common.Equality
record _×_ (A B : Set) : Set where
constructor _,_
field
fst : A
snd : B
open _×_
pair : {A B : Set} → A → B → A × B
... |
{-# OPTIONS --without-K #-}
module hott.level.closure.lift where
open import level
open import function.isomorphism.lift
open import hott.level.core
open import hott.level.closure.core
-- lifting preserves h-levels
↑-level : ∀ {i n} j {X : Set i}
→ h n X
→ h n (↑ j X)
↑-level j {X} = iso-level (lift-i... |
{-# OPTIONS --safe --warning=error --without-K #-}
open import Numbers.Naturals.Definition
open import LogicalFormulae
open import Groups.Definition
open import Groups.Orders.Partial.Definition
open import Setoids.Orders.Partial.Definition
open import Setoids.Setoids
open import Agda.Primitive using (Level; lzero; ls... |
open import Common.Prelude
_test_ : Nat → Nat → Nat
m test_ = m +_
|
{-# 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.Uniqueness-Derivations {l}
(index : Set l) (rule : index → GSeTT.Typed-Syntax.Ctx × (Globular-TT.Syntax.Pre-Ty index)) (... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Relation.Binary.Raw.Construct.Never where
open import Cubical.Core.Everything
open import Cubical.Relation.Binary.Raw
open import Cubical.Relation.Binary.Raw.Construct.Constant
open import Cubical.Data.Empty.Polymorphic using (⊥)
---------------------... |
open import Relation.Binary.Core
module TreeSort.Impl1 {A : Set}
(_≤_ : A → A → Set)
(tot≤ : Total _≤_) where
open import BTree {A}
open import Data.List
open import Data.Sum
insert : A → BTree → BTree
insert x leaf = node x leaf leaf
insert x (node y l r)
with tot≤ x y
...... |
------------------------------------------------------------------------------
-- Using setoids for formalizing FOTC
------------------------------------------------------------------------------
{-# OPTIONS --no-positivity-check #-}
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types ... |
------------------------------------------------------------------------
-- Restricted hypotheses
------------------------------------------------------------------------
-- A restricted hypothesis is a hypothesis where both types are
-- sub/terms/ of either one of two given types.
open import RecursiveTypes.Syntax
... |
------------------------------------------------------------------------
-- Monads
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Equality
module Monad
{reflexive} (eq : ∀ {a p} → Equality-with-J a p reflexive) where
open import Logical-equi... |
module Structure.Operator where
import Lvl
open import Functional using (_$_)
open import Lang.Instance
open import Logic.Predicate
open import Logic
open import Structure.Setoid
open import Structure.Function.Names
open import Structure.Function
open import Structure.Relator.Properties
open import Syntax.Function
ope... |
{-# OPTIONS --cubical-compatible #-}
open import Agda.Primitive
open import Agda.Builtin.Nat
open import Agda.Builtin.Equality
data ⊥ : Set where
record Σ {a} {b} (A : Set a) (B : A → Set b) : Set (a ⊔ b) where
constructor _,_
field
fst : A
snd : B fst
no : _≡_ {A = Σ Set (λ X → X)} (Nat , 0) (Nat , 1) ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Properties for Conats
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe --sized-types #-}
module Codata.Conat.Properties where
open import Data.Nat
open im... |
{-# OPTIONS --cubical --no-import-sorts --safe #-}
module Cubical.Algebra.Monoid.Properties where
open import Cubical.Core.Everything
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Data.Nat
open import Cubical.Data.NatPlusOne
open import Cubical.Data.Sigma hiding (_... |
-- Andreas, 2017-05-13, issue reported by nad
module Issue2579 where
open import Common.Bool
open import Issue2579.Import
import Issue2579.Instance Bool true -- imports instances
theWrapped : {{w : Wrap Bool}} → Bool
theWrapped {{w}} = Wrap.wrapped w
test : Bool
test = theWrapped
|
-- Andreas, 2013-03-22
-- cut down from https://github.com/agda/agda-assoc-free/src/AssocFree/DList.agda
-- {-# OPTIONS -v tc.cover.splittree:10 -v tc.cc:30 #-}
module Issue827 where
open import Common.Equality
-- need to keep this record !
record List (A : Set) : Set where
constructor list -- need to keep this co... |
{-# OPTIONS --without-K --safe #-}
module Cats.Category.Constructions.Initial where
open import Data.Product using (proj₁ ; proj₂)
open import Level
open import Cats.Category.Base
import Cats.Category.Constructions.Iso as Iso
import Cats.Category.Constructions.Unique as Unique
module Build {lo la l≈} (Cat : Catego... |
{-# OPTIONS --safe --warning=error #-}
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import LogicalFormulae
open import Functions.Definition
open import Boolean.Definition
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
open import Vectors
module Logic.PropositionalLogic wh... |
{-# OPTIONS --warning=error --safe #-}
open import LogicalFormulae
open import Agda.Primitive using (Level; lzero; lsuc; _⊔_)
open import Functions.Definition
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
module Numbers.Naturals.WithK where
<NRefl : {a b : ℕ} → (p1 p2 : a <N b) → (p1 ≡ p2)... |
module bool-to-string where
open import bool
open import string
𝔹-to-string : 𝔹 → string
𝔹-to-string tt = "tt"
𝔹-to-string ff = "ff" |
------------------------------------------------------------------------
-- The two semantical definitions of subtyping are equivalent
------------------------------------------------------------------------
module RecursiveTypes.Subtyping.Semantic.Equivalence where
open import Data.Nat
open import Codata.Musical.Not... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
-- Based on (Vene, 2000).
module Functors where
infixr 1 _+_
infixr 2 _×_
data Bool : Set where
false true : Bool
data _+_ (A B : Set) : Set... |
-- {-# OPTIONS -v interaction:100 #-}
module Issue810 where
postulate
T : Set → Set
introHid : {A : Set} → T A
introHid = {!!}
data Sg {A : Set} : A → Set where
sg : (a : A) → Sg a
intro : ∀ {A}{a : A} → Sg a
intro = {!!}
intro′ : ∀ {A}(a : A) → Sg a
intro′ = {!!}
|
{-# OPTIONS --without-K --rewriting #-}
open import lib.Base
open import lib.PathGroupoid
open import lib.path-seq.Concat
open import lib.path-seq.Inversion
open import lib.path-seq.Reasoning
module lib.path-seq.Rotations {i} {A : Type i} where
{-
The order of the arguments p, q, r follows the occurrences
of these ... |
------------------------------------------------------------------------
-- Is-equivalence, defined in terms of contractible fibres
------------------------------------------------------------------------
-- Partly based on Voevodsky's work on univalent foundations.
{-# OPTIONS --without-K --safe #-}
open import Equ... |
------------------------------------------------------------------------
-- The Agda standard library
--
-- Decidable setoid membership over lists
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
open import Relation.Binary using (Decidable; DecSetoid)
modul... |
{-# OPTIONS --exact-split #-}
{-# OPTIONS --no-sized-types #-}
{-# OPTIONS --no-universe-polymorphism #-}
{-# OPTIONS --without-K #-}
-- If we could prove ifInjective then we could true ≡ false (see Dan
-- Licata example in
-- http://thread.gmane.org/gmane.comp.lang.agda/4511).
m... |
open import Data.Tuple as Tuple using (_⨯_ ; _,_)
open import Logic.Classical
open import Logic
import Lvl
open import Type
open import Structure.Setoid
-- Elementary Plane Geometry.
-- An axiomatic approach to plane geometry in first order logic.
-- The axiomatic system used here is usually called "Tarski's axio... |
{-# OPTIONS --cubical --safe #-}
module Cubical.Structures.Everything where
open import Cubical.Structures.Pointed public
open import Cubical.Structures.InftyMagma public
open import Cubical.Structures.Monoid public
open import Cubical.Structures.Queue public
open import Cubical.Structures.TypeEqvTo public
|
module PLRTree.Heap {A : Set}(_≤_ : A → A → Set) where
open import PLRTree {A}
data _≤*_ : A → PLRTree → Set where
lf≤* : (x : A)
→ x ≤* leaf
nd≤* : {t : Tag}{x y : A}{l r : PLRTree}
→ x ≤ y
→ x ≤* l
→ x ≤* r
→ x ≤* n... |
{-# OPTIONS --safe #-}
module Cubical.HITs.S2.Base where
open import Cubical.Foundations.Prelude
open import Cubical.Foundations.HLevels
open import Cubical.Foundations.Pointed
data S² : Type₀ where
base : S²
surf : PathP (λ i → base ≡ base) refl refl
S²∙ : Pointed ℓ-zero
S²∙ = S² , base
S²ToSetElim : ∀ {ℓ} {A ... |
{-# OPTIONS --without-K --safe #-}
module PiFracDynDef where
open import Data.Bool
open import Data.Empty
open import Data.Unit
open import Data.Nat
open import Data.Nat.Properties
open import Data.Sum
open import Data.Product
open import Data.Maybe
open import Function
open import Relation.Binary.PropositionalEquality... |
module Isomorphism where
open import Library
record Iso {a b}(A : Set a)(B : Set b) : Set (a ⊔ b) where
field fun : A → B
inv : B → A
law1 : ∀ b → fun (inv b) ≅ b
law2 : ∀ a → inv (fun a) ≅ a
|
{-# OPTIONS --without-K #-}
open import HoTT.Base
open import HoTT.Equivalence
module HoTT.Identity.Product where
open variables
private variable x y : A × B
_=×_ : A × B → A × B → 𝒰 _
x =× y = pr₁ x == pr₁ y × pr₂ x == pr₂ y
-- Theorem 2.6.2
=× : x == y ≃ x =× y
=× {x = _ , _} {_ , _} = let open Iso in iso→eqv λ ... |
module Golden.RedBlack where
open import Prelude hiding (insert)
-- Version of comparison that lets us use instance search for the proof objects.
data Comparison! {a} {A : Set a} (_<_ : A → A → Set a) (x y : A) : Set a where
less : {{_ : x < y}} → Comparison! _<_ x y
equal : {{_ : x ≡ y}} → Comparison! _<_ x... |
-- Andreas, 2018-06-19, issue #3130
module Issue3130 where
-- A pattern variable should not shadow a postfix projection
-- in the same scope.
module Shadow where
record R : Set₁ where
field y : Set → Set
open R
-- Should succeed or maybe complain about pattern variable y,
-- but not about the postfix p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.