Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some minor refactoring surrounding Dedekind reals #983

Merged
merged 9 commits into from
Dec 12, 2023

Conversation

fredrik-bakke
Copy link
Collaborator

@fredrik-bakke fredrik-bakke commented Dec 12, 2023

Arising from a discussion on the Discord earlier today, here are some mild refactors.

  • Touch up file about Dedekind reals
  • Rename disj to disjunction (disambiguates from disjoint)
  • Rename conj to conjunction (disambiguates from conjugation)
  • Introduce _⇒_ notation for type-implication-Prop. This is consistent with the already-established _⇔_

@fredrik-bakke fredrik-bakke changed the title Format dedekind Some minor refactoring surrounding Dedekind reals Dec 12, 2023
@fredrik-bakke
Copy link
Collaborator Author

Turns out we have 3 different names for implication at the moment:

  • function-Prop
  • hom-Prop
  • implication-Prop

This seems a little overkill to me.

@fredrik-bakke
Copy link
Collaborator Author

For fun, here's what is-dedekind-cut-Prop could look like with our currently defined notations:

  is-dedekind-cut-Prop : Prop (l1 ⊔ l2)
  is-dedekind-cut-Prop =
    ( exists-Prop ℚ L ∧ exists-Prop ℚ U) ∧
    ( Π-Prop ℚ
      ( λ q  iff-Prop (L q) (exists-Prop ℚ (λ r  le-ℚ-Prop q r ∧ L r)))) ∧
    ( Π-Prop ℚ
      ( λ r  iff-Prop (U r) (exists-Prop ℚ (λ q  le-ℚ-Prop q r ∧ U q)))) ∧
    ( ( Π-Prop ℚ (λ q  neg-Prop (L q ∧ U q))) ∧
      ( Π-Prop ℚ
        ( λ q  Π-Prop ℚ (λ r  implication-Prop (le-ℚ-Prop q r) (L q ∨ U r)))))

Notice that there are many competing conventions going on, which is not good.

@fredrik-bakke
Copy link
Collaborator Author

The competing conventions are as follows:

  1. use special binary operators taking values in types: _⇔_ : Prop → Prop → UU
  2. use special binary operators taking values in propositions: _∧_ : Prop → Prop → Prop
  3. Use unicode symbol in name for operators with minimal assumptions of propositions. E.g. Π-Prop : (X : UU) → (X → Prop) → Prop and use textual name for the construction where more types are assumed to be props.
    E.g. ∃-Prop : (X : UU) → (X → UU) → Prop while exists-Prop : (X : UU) → (X → Prop) → Prop

@fredrik-bakke fredrik-bakke marked this pull request as ready for review December 12, 2023 17:30
@fredrik-bakke
Copy link
Collaborator Author

I eliminated convention 2 by making _∨_ and _∧_ take values in types, although I think it could still be useful. It is not currently clear to me how to implement convention 2 consistently, however.

@fredrik-bakke fredrik-bakke marked this pull request as draft December 12, 2023 17:51
@fredrik-bakke
Copy link
Collaborator Author

To be clear, there is quite a bit of refactoring left to do regarding the definition of Dedekind cuts, but I don't have time for that currently.

@fredrik-bakke fredrik-bakke marked this pull request as ready for review December 12, 2023 18:02
Copy link
Collaborator

@VojtechStep VojtechStep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.vscode/settings.json Outdated Show resolved Hide resolved
src/real-numbers/dedekind-real-numbers.lagda.md Outdated Show resolved Hide resolved
@VojtechStep VojtechStep merged commit 400575e into UniMath:master Dec 12, 2023
4 checks passed
@fredrik-bakke fredrik-bakke deleted the format-dedekind branch December 12, 2023 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants