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

subsequences and asymptotical properties #1139

Draft
wants to merge 70 commits into
base: master
Choose a base branch
from

Conversation

malarbol
Copy link
Contributor

@malarbol malarbol commented May 16, 2024

This pull request introduces the concept of subsequence of a sequence and asymptotical behavior of sequences.
In addition, we introduce a few illustrative results using these concepts on sequences in partially ordered sets and monotonic sequences of natural numbers.

More precisely, we introduce the following concepts:

  • elementary-number-theory.strictly-increasing-sequences-natural-numbers:
    • sequences f : ℕ → ℕ that preserve strict inequality of natural numbers
    • basic properties
    • strictly increasing sequences of natural numbers take arbitrarily large values
  • elementary-number-theory.strictly-decreasing-sequences-natural-numbers:
    • sequences f : ℕ → ℕ that reverse strict inequality of natural numbers
    • they do not exist
  • foundation.asymptotical-dependent-sequences:
    • dependent sequences A : ℕ → UU l such that A n is pointed for sufficiently large natural numbers n
    • basic properties
    • asymptotical (binary) functoriality
  • foundation.asymptotical-value-sequences
    • sequences that asymptotically take the same value
    • basic properties
  • foundation.asymptotically-constant-sequences:
    • sequences u such that u p = u q for sufficiently large p and q
    • a sequence is asymptotically constant if and only if it is asymptotically equal to a constant sequence
    • a sequence is asymptotically constant if and only if all its subsequences are asymptotically constant
    • a sequence asymptotically equal to an asymptotically constant sequence is asymptotically constant
    • characterization as asymptotically stationary sequences
    • a sequence is asymptotically constant if and only if it is asymptotically equal to all its subsequences
  • foundation.asymptotically-equal-sequences:
    • sequences u and v such that u n = v n for any sufficiently large natural number n
    • reflexivity, symmetry, transitivity
  • foundation.constant-sequences:
    • sequences for which all terms are equal
    • basic properties
  • foundation.subsequences:
    • sequences u ∘ f for some sequence u and strictly increasing map f : ℕ → ℕ
    • properties
      • any sequence is a subsequence of itself
      • a subsequence of a subsequence is a subsequence if the original sequence
      • subsequences are functorial
      • a dependent sequence is asymptotical if and only if all its subsequences are asymptotical

These concepts are used in the following modules to serve as illustrative examples

  • elementary-number-theory.decreasing-sequences-natural-numbers:
    • sequences of natural numbers that reverse inequality
    • a few conditions under which a decreasing sequence of natural numbers is asymptotically constant
  • elementary-number-theory.increasing-sequences-natural-numbers:
    • sequences of natural numbers that preserve inequality
  • order-theory.constant-sequences-posets:
    • characterization as increasing and decreasing sequences
  • order-theory.decreasing-sequences-posets:
    • sequences in partially ordered sets that reverse the ordering
    • properties
    • sub-sequential properties
    • a few conditions under which a decreasing sequence is asymptotically constant
  • order-theory.increasing-sequences-posets:
    • sequences in partially ordered sets that preserve the ordering
    • properties
    • sub-sequential properties
    • a few conditions under which an increasing sequence is asymptotically constant
  • order-theory.monotonic-sequences-posets:
    • a decreasing/increasing sequence is asymptotically constant if it has an increasing/decreasing subsequence
  • order-theory.sequences-posets
    • sequences in the underlying type of a partially ordered set
    • comparison of sequences in a partially ordered set
    • asymptotical comparison of sequences in a partially ordered set
    • a sequence asymptotically between to asymptotical sequences is asymptotically equal to them

Finally, we also introduce a few helpful properties on existing concepts, e.g. "the maximum of two natural numbers is greater than each of them", "two equal elements in a poset are comparable", etc.

@malarbol malarbol marked this pull request as draft May 16, 2024 19:17
@malarbol malarbol marked this pull request as ready for review May 16, 2024 20:19
@malarbol
Copy link
Contributor Author

Hello again.
I've been playing around with metric structures and things like that. On the way I ended up needing/wanting these few new properties on sequences. They result interesting to prove things like ("asymptotical equality of sequences preserves limits", or "a sequence has a limit if and only of all its subsequence have this limit"). I think maybe these concepts could also prove themselves interesting in other contexts (e.g. polynomials on ring as asymptotically vanishing sequences, etc.).

@malarbol malarbol marked this pull request as draft May 20, 2024 17:04
@malarbol malarbol marked this pull request as ready for review May 21, 2024 20:40
@fredrik-bakke
Copy link
Collaborator

Hey @malarbol, I'm just having a quick look at your changes for now, but why not have separate files for increasing and decreasing sequences? I would similarly expect us to have separate files for order-preserving and order-reversing maps

@malarbol
Copy link
Contributor Author

malarbol commented Jun 10, 2024

Hey @malarbol, I'm just having a quick look at your changes for now, but why not have separate files for increasing and decreasing sequences? I would similarly expect us to have separate files for order-preserving and order-reversing maps

Hey @fredrik-bakke, thanks for the feedback. I'm sorry, this PR got a bit bigger than anticipated (again 😅) and I still have a lot of cleanup to do. I'll do my best to address your concern; we may still need a module importing both of them, for properties like "a sequence is constant iff it is both increasing and decreasing".

@fredrik-bakke
Copy link
Collaborator

That's okay. The property you mentioned should go in a file abour constant sequences :)

@malarbol malarbol changed the title subsequences subsequences and asymptotical properties Jun 11, 2024
@malarbol
Copy link
Contributor Author

Hey again @fredrik-bakke.
I refactored a few concepts and cleaned things up a bit. I also updated the title/description of the PR to reflect better its content.
If you prefer, maybe we could split this PR into two, with "new concepts" on one hand, and the "illustrative modules" on the other. Some of these modules could also be more interesting, like maybe proving that "decreasing sequences of natural numbers are asymptotically constant" is equivalent to the LPO, or study behavior of bounded increasing sequences of natural numbers but I'm not sure how to handle these right now.

I already have a few follow-up ideas that motivated this PR:

  • metric structures (with sequential limits, etc.)
  • series, polynomials, convolution products, etc. (using asymptotically vanishing sequence in monoids, rings, etc.)

@malarbol malarbol marked this pull request as ready for review June 11, 2024 19:56
@fredrik-bakke
Copy link
Collaborator

Hey Malarbol! I'm back. Sorry for the terribly long wait; I'll try to review your PR in one of the coming days :)

Copy link
Collaborator

@fredrik-bakke fredrik-bakke left a comment

Choose a reason for hiding this comment

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

After a preliminary review I've found a few deficiencies and conflicts with our style guide that should be corrected before I'm willing to take a closer look. Let me know when you've addressed my comments or if you have any questions regarding my comments. In the meanwhile I'll flag this PR as a draft again.


## Idea

A sequence of natural numbers is **decreasing** if it reverses
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
A sequence of natural numbers is **decreasing** if it reverses
A [sequence](foundation.sequences.md) of [natural numbers](elementary-number-theory.natural-numbers.md) is {{#concept "decreasing" Disambiguation="sequence of natural numbers" Agda=is-decreasing-sequence-ℕ}} if it reverses


## Idea

A dependent sequence `A : ℕ → UU l` is **asymptotical** if `A n` is pointed for
Copy link
Collaborator

@fredrik-bakke fredrik-bakke Aug 5, 2024

Choose a reason for hiding this comment

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

If you have a dependent sequence a of A : ℕ → UU l then isn't every A n inhabited by a n? The sequence A : ℕ → UU l itself isn't dependent.

Comment on lines +25 to +26
A dependent sequence `A : ℕ → UU l` is **asymptotical** if `A n` is pointed for
sufficiently large natural numbers `n`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is "asymptotical sequence" standard terminology? I can't say I have heard it before. Would better terminology be "asymptotically pointed sequence of types"?

Comment on lines +32 to +33
A sequence `u` in a type `A` has an **asymptotical value** `x : A` if `x = u n`
for sufficiently large natural numbers `n`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add links to the concepts and use the {{#concept ...}} macro. this applies to all of your new files.

Comment on lines +34 to +43
### Values of a sequence

```agda
module _
{l : Level} {A : UU l}
where

is-value-sequence : A → sequence A → ℕ → UU l
is-value-sequence x u n = x = u n
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this definition is aiding readability, perhaps it is better to just write out x = u n?

Comment on lines +40 to +41
asymptotically : UU l
asymptotically = Σ ℕ is-modulus-dependent-sequence
Copy link
Collaborator

Choose a reason for hiding this comment

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

While I can appreciate that this definition makes some of your other code readable and intuitive once you know what it means, I can't say that this name should be reserved for this definition. Two questions I have immediately are

  • why would you reserve asymptotics for sequences only over natural numbers
  • shouldn't "asymptotically" be a property? If I say something holds asymptotically, would you expect it to matter how it holds asymptotically?


## Definitions

### Asymptotical values of sequences
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
### Asymptotical values of sequences
### The Asymptotic value of an asymptotic sequence

Comment on lines +44 to +45
is-∞-value-sequence : UU l
is-∞-value-sequence = asymptotically (is-value-sequence x u)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We avoid using unicode characters like in entry names except for in select rare cases like the namespace for the natural numbers . A better name for this entry would be takes-value-asymptotically or value-at-infinity-equals

@@ -0,0 +1,123 @@
# Asymptotical value of a sequence
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't "asymptotic" the correct conjugation of the word? Please check and if so review your contribution to reflect the correct conjugation

Comment on lines +48 to +53
is-strict-increasing-prop-sequence-ℕ : Prop lzero
is-strict-increasing-prop-sequence-ℕ =
Π-Prop ℕ
( λ i →
Π-Prop ℕ
( λ j → hom-Prop (le-ℕ-Prop i j) (le-ℕ-Prop (f i) (f j))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's more appropriate to define strictly increasing sequences as order homomorphisms of the strict ordering on the natural numbers.

Comment on lines +48 to +49
is-strict-increasing-prop-sequence-ℕ : Prop lzero
is-strict-increasing-prop-sequence-ℕ =
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be named is-strictly-increasing-...

Comment on lines +42 to +44
is-strict-decreasing-sequence-ℕ : UU lzero
is-strict-decreasing-sequence-ℕ =
(i j : ℕ) → le-ℕ i j → le-ℕ (f j) (f i)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be named is-strictly-decreasing-...

@fredrik-bakke fredrik-bakke marked this pull request as draft August 5, 2024 15:59
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