{"id":17685484,"url":"https://github.com/pthariensflame/lib-agda","last_synced_at":"2026-03-19T01:47:07.390Z","repository":{"id":13408442,"uuid":"16096917","full_name":"pthariensflame/lib-agda","owner":"pthariensflame","description":"My customized version of the Agda standard library","archived":false,"fork":false,"pushed_at":"2014-04-17T14:23:43.000Z","size":792,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T20:07:45.218Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Agda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pthariensflame.png","metadata":{"files":{"readme":"README.agda","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-21T08:34:49.000Z","updated_at":"2015-02-08T23:27:30.000Z","dependencies_parsed_at":"2022-08-28T04:23:48.648Z","dependency_job_id":null,"html_url":"https://github.com/pthariensflame/lib-agda","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pthariensflame%2Flib-agda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pthariensflame%2Flib-agda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pthariensflame%2Flib-agda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pthariensflame%2Flib-agda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pthariensflame","download_url":"https://codeload.github.com/pthariensflame/lib-agda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246375166,"owners_count":20767056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-24T10:27:55.228Z","updated_at":"2026-01-08T05:48:26.653Z","avatar_url":"https://github.com/pthariensflame.png","language":"Agda","funding_links":[],"categories":[],"sub_categories":[],"readme":"module README where\n\n------------------------------------------------------------------------\n-- The Agda standard library, version 0.7\n--\n-- Author: Nils Anders Danielsson, with contributions from Andreas\n-- Abel, Stevan Andjelkovic, Jean-Philippe Bernardy, Peter Berry,\n-- Joachim Breitner, Samuel Bronson, Daniel Brown, Liang-Ting Chen,\n-- Dominique Devriese, Dan Doel, Érdi Gergő, Helmut Grohne, Simon\n-- Foster, Liyang Hu, Patrik Jansson, Alan Jeffrey, Eric Mertens,\n-- Darin Morrison, Shin-Cheng Mu, Ulf Norell, Nicolas Pouillard,\n-- Andrés Sicard-Ramírez and Noam Zeilberger\n------------------------------------------------------------------------\n\n-- This version of the library has been tested using Agda 2.3.2.\n\n-- Note that no guarantees are currently made about forwards or\n-- backwards compatibility, the library is still at an experimental\n-- stage.\n\n-- To make use of the library, add the path to the library’s root\n-- directory (src) to the Agda search path, either using the\n-- --include-path flag or by customising the Emacs mode variable\n-- agda2-include-dirs (M-x customize-group RET agda2 RET).\n\n-- To compile the library using the MAlonzo compiler you first need to\n-- install some supporting Haskell code, for instance as follows:\n--\n--   cd ffi\n--   cabal install\n--\n-- Currently the library does not support the Epic or JavaScript\n-- compiler backends.\n\n-- Contributions to this library are welcome (but to avoid wasted work\n-- it is suggested that you discuss large changes before implementing\n-- them). Please send contributions in the form of darcs patches (run\n-- darcs send --output \u003cpatch file\u003e and attach the patch file to an\n-- email), and include a statement saying that you agree to release\n-- your library patches under the library's licence. It is appreciated\n-- if every patch contains a single, complete change, and if the\n-- coding style used in the library is adhered to.\n\n------------------------------------------------------------------------\n-- Module hierarchy\n------------------------------------------------------------------------\n\n-- The top-level module names of the library are currently allocated\n-- as follows:\n--\n-- • Algebra\n--     Abstract algebra (monoids, groups, rings etc.), along with\n--     properties needed to specify these structures (associativity,\n--     commutativity, etc.), and operations on and proofs about the\n--     structures.\n-- • Category\n--     Category theory-inspired idioms used to structure functional\n--     programs (functors and monads, for instance).\n-- • Coinduction\n--     Support for coinduction.\n-- • Data\n--     Data types and properties about data types.\n-- • Function\n--     Combinators and properties related to functions.\n-- • Foreign\n--     Related to the foreign function interface.\n-- • Induction\n--     A general framework for induction (includes lexicographic and\n--     well-founded induction).\n-- • IO\n--     Input/output-related functions.\n-- • Irrelevance\n--     Definitions related to (proscriptive) irrelevance.\n-- • Level\n--     Universe levels.\n-- • Record\n--     An encoding of record types with manifest fields and \"with\".\n-- • Reflection\n--     Support for reflection.\n-- • Relation\n--     Properties of and proofs about relations (mostly homogeneous\n--     binary relations).\n-- • Size\n--     Sizes used by the sized types mechanism.\n-- • Universe\n--     A definition of universes.\n\n------------------------------------------------------------------------\n-- A selection of useful library modules\n------------------------------------------------------------------------\n\n-- Note that module names in source code are often hyperlinked to the\n-- corresponding module. In the Emacs mode you can follow these\n-- hyperlinks by typing M-. or clicking with the middle mouse button.\n\n-- • Some data types\n\nimport Data.Bool     -- Booleans.\nimport Data.Char     -- Characters.\nimport Data.Empty    -- The empty type.\nimport Data.Fin      -- Finite sets.\nimport Data.List     -- Lists.\nimport Data.Maybe    -- The maybe type.\nimport Data.Nat      -- Natural numbers.\nimport Data.Product  -- Products.\nimport Data.Stream   -- Streams.\nimport Data.String   -- Strings.\nimport Data.Sum      -- Disjoint sums.\nimport Data.Unit     -- The unit type.\nimport Data.Vec      -- Fixed-length vectors.\n\n-- • Some types used to structure computations\n\nimport Category.Functor      -- Functors.\nimport Category.Applicative  -- Applicative functors.\nimport Category.Monad        -- Monads.\n\n-- • Equality\n\n-- Propositional equality:\nimport Relation.Binary.PropositionalEquality\n\n-- Convenient syntax for \"equational reasoning\" using a preorder:\nimport Relation.Binary.PreorderReasoning\n\n-- Solver for commutative ring or semiring equalities:\nimport Algebra.RingSolver\n\n-- • Properties of functions, sets and relations\n\n-- Monoids, rings and similar algebraic structures:\nimport Algebra\n\n-- Negation, decidability, and similar operations on sets:\nimport Relation.Nullary\n\n-- Properties of homogeneous binary relations:\nimport Relation.Binary\n\n-- • Induction\n\n-- An abstraction of various forms of recursion/induction:\nimport Induction\n\n-- Well-founded induction:\nimport Induction.WellFounded\n\n-- Various forms of induction for natural numbers:\nimport Induction.Nat\n\n-- • Support for coinduction\n\nimport Coinduction\n\n-- • IO\n\nimport IO\n\n------------------------------------------------------------------------\n-- Record hierarchies\n------------------------------------------------------------------------\n\n-- When an abstract hierarchy of some sort (for instance semigroup →\n-- monoid → group) is included in the library the basic approach is to\n-- specify the properties of every concept in terms of a record\n-- containing just properties, parameterised on the underlying\n-- operations, sets etc.:\n--\n--   record IsSemigroup {A} (≈ : Rel A) (∙ : Op₂ A) : Set where\n--     open FunctionProperties ≈\n--     field\n--       isEquivalence : IsEquivalence ≈\n--       assoc         : Associative ∙\n--       ∙-cong        : ∙ Preserves₂ ≈ ⟶ ≈ ⟶ ≈\n--\n-- More specific concepts are then specified in terms of the simpler\n-- ones:\n--\n--     record IsMonoid {A} (≈ : Rel A) (∙ : Op₂ A) (ε : A) : Set where\n--       open FunctionProperties ≈\n--       field\n--         isSemigroup : IsSemigroup ≈ ∙\n--         identity    : Identity ε ∙\n--\n--     open IsSemigroup isSemigroup public\n--\n-- Note here that open IsSemigroup isSemigroup public ensures that the\n-- fields of the isSemigroup record can be accessed directly; this\n-- technique enables the user of an IsMonoid record to use underlying\n-- records without having to manually open an entire record hierarchy.\n-- This is not always possible, though. Consider the following definition\n-- of preorders:\n--\n--   record IsPreorder {A : Set}\n--                     (_≈_ : Rel A) -- The underlying equality.\n--                     (_∼_ : Rel A) -- The relation.\n--                     : Set where\n--     field\n--       isEquivalence : IsEquivalence _≈_\n--       -- Reflexivity is expressed in terms of an underlying equality:\n--       reflexive     : _≈_ ⇒ _∼_\n--       trans         : Transitive _∼_\n--\n--     module Eq = IsEquivalence isEquivalence\n--\n--     ...\n--\n-- The Eq module in IsPreorder is not opened publicly, because it\n-- contains some fields which clash with fields or other definitions\n-- in IsPreorder.\n\n-- Records packing up properties with the corresponding operations,\n-- sets, etc. are sometimes also defined:\n--\n--   record Semigroup : Set₁ where\n--     infixl 7 _∙_\n--     infix  4 _≈_\n--     field\n--       Carrier     : Set\n--       _≈_         : Rel Carrier\n--       _∙_         : Op₂ Carrier\n--       isSemigroup : IsSemigroup _≈_ _∙_\n--\n--     open IsSemigroup isSemigroup public\n--\n--     setoid : Setoid\n--     setoid = record { isEquivalence = isEquivalence }\n--\n--   record Monoid : Set₁ where\n--     infixl 7 _∙_\n--     infix  4 _≈_\n--     field\n--       Carrier  : Set\n--       _≈_      : Rel Carrier\n--       _∙_      : Op₂ Carrier\n--       ε        : Carrier\n--       isMonoid : IsMonoid _≈_ _∙_ ε\n--\n--     open IsMonoid isMonoid public\n--\n--     semigroup : Semigroup\n--     semigroup = record { isSemigroup = isSemigroup }\n--\n--     open Semigroup semigroup public using (setoid)\n--\n-- Note that the Monoid record does not include a Semigroup field.\n-- Instead the Monoid /module/ includes a \"repackaging function\"\n-- semigroup which converts a Monoid to a Semigroup.\n\n-- The above setup may seem a bit complicated, but we think it makes the\n-- library quite easy to work with, while also providing enough\n-- flexibility.\n\n------------------------------------------------------------------------\n-- More documentation\n------------------------------------------------------------------------\n\n-- Some examples showing where the natural numbers/integers and some\n-- related operations and properties are defined, and how they can be\n-- used:\n\nimport README.Nat\nimport README.Integer\n\n-- Some examples showing how the AVL tree module can be used.\n\nimport README.AVL\n\n-- An example showing how the Record module can be used.\n\nimport README.Record\n\n-- An example showing how the case expression can be used.\n\nimport README.Case\n\n-- Some examples showing how the finite prover library can be used.\n\nimport README.Finite-prover\n\n------------------------------------------------------------------------\n-- Core modules\n------------------------------------------------------------------------\n\n-- Some modules have names ending in \".Core\". These modules are\n-- internal, and have (mostly) been created to avoid mutual recursion\n-- between modules. They should not be imported directly; their\n-- contents are reexported by other modules.\n\n------------------------------------------------------------------------\n-- All library modules\n------------------------------------------------------------------------\n\n-- For short descriptions of every library module, see Everything:\n\nimport Everything\n\n-- Note that the Everything module is generated automatically. If you\n-- have downloaded the library from its darcs repository and want to\n-- type check README then you can (try to) construct Everything by\n-- running \"cabal install \u0026\u0026 GenerateEverything\".\n\n-- Note that all library sources are located under src or ffi. The\n-- modules README, README.* and Everything are not really part of the\n-- library, so these modules are located in the top-level directory\n-- instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpthariensflame%2Flib-agda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpthariensflame%2Flib-agda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpthariensflame%2Flib-agda/lists"}