GithubHelp home page GithubHelp logo

martinescardo / typetopology Goto Github PK

View Code? Open in Web Editor NEW
226.0 15.0 41.0 16.49 MB

Logical manifestations of topological concepts, and other things, via the univalent point of view.

License: GNU General Public License v3.0

Agda 92.13% TeX 6.27% Haskell 0.02% Shell 0.10% Makefile 1.49%
univalent-foundations agda homotopy-type-theory type-theory constructive-mathematics compact-type totally-separated-type injective-type ordinal searchable-set

typetopology's Introduction

Various new theorems in constructive univalent mathematics written in Agda

This development was started by Martin Escardo in 2010 as an svn project, and transferred to github Monday 5th February 2018.

If you contribute, please add your full (legal or adopted) name and date at the place of contribution.

An html rendering of the Agda code is hosted at Martin Escardo's institutional web page.

How to cite

You can use the following BibTeX entry to cite TypeTopology:

@misc{type-topology,
  title    = {{TypeTopology}},
  author   = {Escard\'{o}, Mart\'{i}n H. and {contributors}},
  url      = {https://github.com/martinescardo/TypeTopology},
  note     = {{Agda} development},
}

If you are citing only your own files, then create a different bibtex file with only your name as author.

Root of the development

Current contributors in alphabetical order of first name

Please add yourself the first time you contribute.

  • Alice Laroche
  • Andrew Sneap
  • Andrew Swan
  • Ayberk Tosun
  • Brendan Hart
  • Bruno Paiva
  • Chuangjie Xu
  • Cory Knapp
  • Ettore Aldrovandi
  • Fredrik Nordvall Forsberg
  • Ian Ray
  • Igor Arrieta (ii)
  • Jon Sterling
  • Kelton OBrien
  • Keri D'Angelo
  • Lane Biocini
  • Marc Bezem
  • Martin Escardo
  • Nicolai Kraus
  • Ohad Kammar
  • Paul Levy (i)
  • Paulo Oliva
  • Peter Dybjer
  • Simcha van Collem
  • Thierry Coquand
  • Todd Waugh Ambridge
  • Tom de Jong
  • Vincent Rahli

(i) These authors didn't write any single line of Agda code here, but they contributed to constructions, theorems and proofs via the hands of Martin Escardo.

(ii) These authors didn't write single line of Agda code here, but they contributed to constructions, theorems and proofs via the hands of Ayberk Tosun.

Publications resulting from TypeTopology

  1. Martín H. Escardó. Infinite sets that satisfy the principle of omniscience in any variety of constructive mathematics. The Journal of Symbolic Logic, Volume 78 , Issue 3 , 2013 , pp. 764 - 784.

    https://doi.org/10.2178/jsl.7803040

  2. Martín H. Escardó. Continuity of Gödel's system T functionals via effectful forcing. Electronic Notes in Theoretical Computer Science, Volume 298, 2013, Pages 119-141. MFPS XXIX

    https://doi.org/10.1016/j.entcs.2013.09.010

  3. Nicolai Kraus, Martín H. Escardó, T. Coquand, T. Altenkirch. Generalizations of Hedberg's Theorem. In: Hasegawa, M. (eds) Typed Lambda Calculi and Applications. TLCA 2013. Lecture Notes in Computer Science, vol 7941. Springer.

    https://doi.org/10.1007/978-3-642-38946-7_14

  4. Martín H. Escardó. Constructive decidability of classical continuity. Mathematical Structures in Computer Science, Volume 25, Special Issue 7: Computing with Infinite Data: Topological and Logical Foundations Part 1, October 2015, pp. 1578 - 1589 DOI:

    https://doi.org/10.1017/S096012951300042X

  5. Martín H. Escardó and Chuangjie Xu. The inconsistency of a Brouwerian continuity principle with the Curry-Howard interpretation. 13th International Conference on Typed Lambda Calculi and Applications (TLCA 2015).

    https://doi.org/10.4230/LIPIcs.TLCA.2015.153

  6. Martín H. Escardó and T. Streicher. The intrinsic topology of Martin-Löf universes. Annals of Pure and Applied Logic, Volume 167, Issue 9, 2016, Pages 794-805.

    https://doi.org/10.1016/j.apal.2016.04.010

  7. Martín H. Escardó and Cory Knapp. Partial elements and recursion via dominances in univalent type theory. Leibniz International Proceedings in Informatics (LIPIcs), Proceedings of CSL 2017.

    https://doi.org/10.4230/LIPIcs.CSL.2017.21

  8. Nicolai Kraus, Martín H. Escardó, T. Coquand, T. Altenkirch. Notions of Anonymous Existence in Martin-Löf Type Theory. Logical Methods in Computer Science, March 24, 2017, Volume 13, Issue 1.

    https://doi.org/10.23638/LMCS-13(1:15)2017

  9. Tom de Jong. The Scott model of PCF in univalent type theory. Mathematical Structures in Computer Science, Volume 31, Issue 10 - Homotopy Type Theory 2019, July 2021.

    https://doi.org/10.1017/S0960129521000153

  10. Martín H. Escardó. The Cantor-Schröder-Bernstein Theorem for ∞-groupoids. Journal of Homotopy and Related Structures, 16(3), 363-366, 2021.

    https://doi.org/10.1007/s40062-021-00284-6

  11. Martín H. Escardó. Injective types in univalent mathematics. Mathematical Structures in Computer Science, Volume 31 , Issue 1 , 2021 , pp. 89 - 111.

    https://doi.org/10.1017/S0960129520000225

  12. Tom de Jong and Martín H. Escardó. Domain Theory in Constructive and Predicative Univalent Foundations. Leibniz International Proceedings in Informatics (LIPIcs), Volume 183 - Proceedings of CSL 2021, January 2021.

    https://doi.org/10.4230/LIPIcs.CSL.2021.28

  13. Dan R. Ghica and Todd Waugh Ambridge. Global Optimisation with Constructive Reals. Logic in Computer Science (LICS), Proceedings of LICS 2021, June 2021.

    https://doi.org/10.1109/LICS52264.2021.9470549

  14. Tom de Jong and Martín H. Escardó. Predicative Aspects of Order Theory in Univalent Foundations. Leibniz International Proceedings in Informatics (LIPIcs), Volume 195 - Proceedings of FSCD 2021, July 2021.

    https://doi.org/10.4230/LIPIcs.FSCD.2021.8

  15. Tom de Jong. Domain Theory in Constructive and Predicative Univalent Foundations. PhD thesis. School of Computer Science, University of Birmingham, UK. Submitted: 30 September 2022; accepted: 1 February 2023.

    https://etheses.bham.ac.uk/id/eprint/13401/
    Updated versions:
    https://arxiv.org/abs/2301.12405
    https://tdejong.com/writings/phd-thesis.pdf

  16. Ayberk Tosun and Martín H. Escardó. Patch Locale of a Spectral Locale in Univalent Type Theory. Electronic Notes in Theoretical Informatics and Computer Science, Volume 1 - Proceedings of MFPS XXXVIII, February 2023.

    https://doi.org/10.46298/entics.10808

  17. Tom de Jong, Nicolai Kraus, Fredrik Nordvall Forsberg and Chuangjie Xu. Set-Theoretic and Type-Theoretic Ordinals Coincide. Logic in Computer Science (LICS), Proceedings of LICS 2023. June 2023.

    https://doi.org/10.1109/LICS56636.2023.10175762

    Publicly available at https://arxiv.org/abs/2301.10696.

  18. Tom de Jong and Martín H. Escardó. On Small Types in Univalent Foundations. Logical Methods in Computer Science, Volume 19, Issue 2, May 2023.

    https://doi.org/10.46298/lmcs-19(2:8)2023

  19. Martín H. Escardó and Paulo Oliva. Higher-order Games with Dependent Types.

    Theoretical Computer Science, Special issue "Continuity, Computability, Constructivity: From Logic to Algorithms", dedicated to Ulrich Berger's 65th birthday, volume 974, 29 September 2023, available online 2 August 2023.

    https://doi.org/10.1016/j.tcs.2023.114111

  20. Todd Waugh Ambridge. Exact Real Search: Formalised Optimisation and Regression in Constructive Univalent Mathematics. January 2024. University of Birmingham. PhD thesis.

    https://doi.org/10.48550/arXiv.2401.09270

  21. Igor Arrieta, Martín H. Escardó and Ayberk Tosun. The Patch Topology in Univalent Foundations.

    ArXiv preprint. Available online 5 February 2024.

    https://arxiv.org/abs/2402.03134

  22. Tom de Jong. Domain theory in univalent foundations I: Directed complete posets and Scott's D∞. July 2024.

    https://doi.org/10.48550/arxiv.2407.06952

  23. Tom de Jong and Martín H. Escardó. Domain theory in univalent foundations II: Continuous and algebraic domains. July 2024.

    https://doi.org/10.48550/arxiv.2407.06956

typetopology's People

Contributors

9y0 avatar adsneap avatar awswan avatar ayberkt avatar cmknapp avatar ettorealdrovandi avatar harrisongrodin avatar ianray11 avatar iblech avatar jonsterling avatar keltono avatar lane-core avatar martinescardo avatar scott-fleischman avatar seiryn21 avatar tnttodda avatar tomdjong avatar vrahli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typetopology's Issues

Should order-theoretic notions be separated out from the Dcpo module?

The Dcpo module contains the definitions of partial order, meet, join and so on.

is-reflexive : 𝓤 ⊔ 𝓣 ̇
is-reflexive = (x : D) → x ⊑ x
is-transitive : 𝓤 ⊔ 𝓣 ̇
is-transitive = (x y z : D) → x ⊑ y → y ⊑ z → x ⊑ z
is-antisymmetric : 𝓤 ⊔ 𝓣 ̇
is-antisymmetric = (x y : D) → x ⊑ y → y ⊑ x → x ≡ y
is-least : D → 𝓤 ⊔ 𝓣 ̇
is-least x = ∀ (y : D) → x ⊑ y
has-least : 𝓤 ⊔ 𝓣 ̇
has-least = Σ x ꞉ D , is-least x
is-upperbound : {I : 𝓥 ̇ } (u : D) (α : I → D) → 𝓥 ⊔ 𝓣 ̇
is-upperbound u α = (i : domain α) → α i ⊑ u

I am now working on implementing the beginnings of locale theory in TypeTopology for which I need these definitions.

Would it be okay to separate these out into a module of their own or was this perhaps deliberately avoided for the sake of self-containment?

Define the sublocale of a locale

I realised that I’ve never ported the definition of a sublocale from ayberkt/formal-topology-in-UF. It’s probably a good idea to do this.

Proper compilation to HTML

Something we discussed with @martinescardo a while ago. Making an issue here so that I don't forget about it.


Currently, all Agda files in TypeTopology have the .lagda extension. For reasons that I don't really understand, Agda can generate Markdown files only from files with extension .lagda.md. It is possible to generate HTML from .lagda files but this has the problem that the literate parts of the code are treated as code (i.e. are not wrapped in <p></p> tags) so it's not possible to make the formatting nice by adding a CSS file.

It seems that the best way to fix this is by converting .lagda files to .lagda.md files (in fact @martinescardo already wrote a script for this if I recall correctly). It would be great to make the HTML files generated from TypeTopology nicer by doing this and compiling through a Markdown processor.

Remove completed TODO on the topology of Scott domains

@tomdjong: The index of the DomainTheory development lists the TODO:

4. Formalize the definition of the Scott topology of a (continuous) dcpo and
show that the Scott opens form a frame, using Ayberk Tosun's formalization of
frames and locales, see Locales.index.
Additionally, show that the Scott topology of a continuous dcpo is spectral,
as defined in Locales.CompactRegular.

and says

If you'd like to work on Item 4, please get in touch with Ayberk Tosun.

This has now been done (in PR #255) so we can remove this TODO (and maybe provide some pointers to the modules in which it has been done).

Port PathSeq from HoTT-Agda to TypeTopology

Request to port the PathSeq functionality from the
PathSeq library in https://github.com/HoTT/HoTT-Agda to
TypeTopology. In HoTT-Agda the data structure PathSeq is defined in lib.Base, with auxiliary structure and data in lib.path-seq.*.

Let us call a term p : x = y a "path" from x to y. Abstract
path manipulation should have the following features:

  1. A data structure to represent a path normalized concatenation. This is called an "abstract path."

    If p, q, r, s, t are paths, then, say, [p,q,r,s,t] should be the corresponding abstract path, regardless of the parentheses. That is, p ∙ (q ∙ (r ∙ (s ∙ t))) and (p ∙ q) ∙ (r ∙ (s ∙ t)) should ideally give rise to the same [p,q,r,s,t].

  2. Path reasoning: equational-style reasoning for abstract path concatenation.

  3. Conversion to and insertion from paths.

  4. Abstract path equality, say, ==

  5. Manipulation: if two abstract paths s (resp. t) contain
    sub-(abstract) paths u (resp. v) and α : u == v, we should
    be able to write somethings of the form:

   lemma : s == t
   lemma = s ==⟨⟨ insertion-point | end-point | α ⟩⟩
           t ==∎∎ 

In the above the insertion and the end points specify where u occur
in s. This should work even if u and v are of not of the same
length.

Propositional truncation causes some types to not be strictly positive

I'm trying to define a QIIT with the following constructors:

data _⊥ (A : 𝓤 ̇ ) : 𝓥 ⁺ ⊔ 𝓤 ̇
data Leq (A : 𝓤 ̇ ) : A ⊥  A ⊥  𝓥 ⁺ ⊔ 𝓤 ̇ 

data _⊥ A where
 -- ...
 lub : {I : 𝓥 ̇ }  (Σ α ꞉ (I  A ⊥) , is-directed (Leq A) α)  A ⊥
 -- ...

data Leq A where
 -- ...
 lub-is-upperbound : {I : 𝓥 ̇ } {α : I  A ⊥} (δ : is-directed (Leq A) α)
                     (i : I)  Leq A (α i) (lub (α , δ))
 -- ...

Agda does not accept these types, as it cannot verify that they're strictly positive. This has to do with the definition of is-directed:

is-directed : {I : 𝓥 ̇ } {X : 𝓦' ̇ } (_⊑_ : X  X  𝓣 ̇ )  (I  X)  𝓥 ⊔ 𝓣 ̇
is-directed {I = I} _⊑_ α =
 ∥ I ∥ ×
 ((i j : I)  ∥ Σ k ꞉ I , (α i ⊑ α k) × (α j ⊑ α k) ∥)

This causes Leq A to occur inside of the propositional truncation, and as Agda only knows that ∥_∥ exists but knows nothing about how its elements may be constructed, Agda cannot verify that Leq A occurs in a strictly positive place.

However, instead of just assuming that a propositional truncation type exists, we can also define it and only assume it's properties, like follows (I used postulate here, but I would of course replace that with a modular approach if this makes it to a PR):

data ∥_∥' {𝓤 : Universe} (X : 𝓤 ̇ ) : 𝓤 ̇  where
 ∣_∣' : X  ∥ X ∥'

postulate
 ∥∥'-is-prop : {𝓤 : Universe} {X : 𝓤 ̇ }  is-prop ∥ X ∥'
 ∥∥'-rec : {𝓤 𝓥 : Universe} {X : 𝓤 ̇ } {P : 𝓥 ̇ }  is-prop P  (X  P)  ∥ X ∥'  P

It's easy to show that ∥_∥ and ∥_∥' are equivalent and if I use ∥_∥' in the definition of is-directed, Agda will be able to typecheck the above QIIT.

It therefore seems to me that defining the propositional truncation and only assuming its properties, is preferred over assuming the whole type. Is this something we want to change in TypeTopology?

Unify two developments of frames (`frame.lagda` and `Frame.lagda`)

I just noticed the existence of the module frame.lagda which I believe defines σ-frames.

Now that we have Frame.lagda (added in #44), we should be a bit careful about the distinction between the two. As of now, the coexistence of multiple definitions that use the same name is a bit confusing.

Give a native coinductive definition of ℕ∞

Here is a TODO that may be interesting.

In TypeTopology we don't allow things that go beyond MLTT extended with Book HoTT, but we do allow experimental things at Unsafe.

https://www.cs.bham.ac.uk/~mhe/TypeTopology/Unsafe.index.html

We define ℕ∞ so that it is the final coalgebra of 1 + (-) using only Book HoTT, deliberately.

But it would be nice to add an "unsafe" module showing that ℕ∞ is equivalent to the well-known type of conatural numbers defined with codata or maybe a coinductive record.

Why is this "unsafe"? In particular, nobody discussed or published a model of Book HoTT extended with coinduction.

But, if this TODO is solved, this can be seen as an argument that one could, perhaps, work soundly with the native coinductive definition of ℕ∞, if we wanted to. I say "perhaps" because there are further meta-mathematical issues regarding coinduction in MLTT. I don't regard this problem as solved, not even in the absence of HoTT/UF features.

In any case, this would be something nice to have.

Define combinators for Ω

It is often convenient to have combinators for Ω, for instance

_∧_ : Ω 𝓤  Ω 𝓥  Ω (𝓤 ⊔ 𝓥)
P ∧ Q = (P holds × Q holds) , γ
 where
  γ = ×-is-prop (holds-is-prop P) (holds-is-prop Q)

agda/cubical has these defined in this module. It might be a good idea to do something similar in TypeTopology.

Prove equivalence to alternative notion of uniform continuity

In PR #148, I mentioned that I completed a TODO that I saw in module EffectfulForcing.MFPSAndVariations.Continuity. This was actually just one component of the problem mentioned in that TODO, the other half being the same thing for uniform continuity.

Now, to complete PR #210, I need to complete that other component of that TODO.

A to-do from the `LiftingSetAlgebraic` module

A TODO that I saw in the DomainTheory.Lifting.LiftingSetAlgebraic module:

TODO: Show that freely adding a least element to a dcpo gives an algebraic dcpo
      with a small compact basis if the original dcpo had a small compact basis.
      (Do so in another file, e.g. LiftingDcpoAlgebraic.lagda).

Add comments to the locale theory development

Make sure that each of the following modules is properly commented:

  • AdjointFunctorTheoremForFrames.lagda
  • BooleanAlgebra.lagda
  • CharacterisationOfContinuity.lagda
  • ClassificationOfScottOpens.lagda
  • Clopen.lagda
  • CompactRegular.lagda
  • Compactness.lagda
  • Complements.lagda
  • Frame.lagda
  • GaloisConnection.lagda
  • HeytingComplementation.lagda
  • HeytingImplication.lagda
  • InitialFrame.lagda
  • NotationalConventions.lagda
  • Nucleus.lagda
  • PatchLocale.lagda
  • PatchOfOmega.lagda
  • PatchProperties.lagda
  • PerfectMaps.lagda
  • Regular.lagda
  • ScottContinuity.lagda
  • ScottLocale.lagda
  • Sierpinski.lagda
  • SmallBasis.lagda
  • Stone.lagda
  • StoneImpliesSpectral.lagda
  • UniversalPropertyOfPatch.lagda
  • WellInside.lagda
  • ZeroDimensionality.lagda
  • index.lagda
  • Properties.lagda
  • Spectrality.SpectralLocale.lagda
  • Spectrality.SpectralMap.lagda
  • Spectrality.SpectralityOfOmega.lagda
  • WayBelowRelation.Definition.lagda
  • WayBelowRelation.Properties.lagda

Weird message in typechecking workflow logs

Note: I'm creating this issue so that I don't forget about it. Nothing needs to be done about it for now.


The typechecking logs show a weird message

/entrypoint.sh: 37: [: true: unexpected operator

and I'm not sure why. Typechecking seems to be going fine though so this is probably nothing serious. In any case, I should take a look at why this is happening.

Use `꞉` (MODIFIER LETTER COLON) instead of `:` (RATIO) in `UF-Subsingleton-Combinators`

It seems that in

syntax ∀[∶]-syntax I (λ i → e) = Ɐ i ∶ I , e
syntax ∀[]-syntax (λ i → e) = Ɐ i , e

and

syntax ∃[∶]-syntax I (λ i → e) = Ǝ i ∶ I , e
syntax ∃[]-syntax (λ i → e) = Ǝ i , e

I accidentally used the wrong unicode character. I need to fix this at some point.

update line and file count

There is a scriptcount-agda-files-and-lines which I suggest everybody should run before their pull requests, and then update index.lagda with this information.

Specifically, the snippet

   * In our last count, on 2024.06.19, this development has 761 Agda
     files with 215k lines of code, including comments and blank
     lines. But we don't update the count frequently.

should perhaps always be updated in any pull request.

It would be even better if there was an automatic way of doing this.

Then we could omit "But we don't update the count frequently.".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.