-
Notifications
You must be signed in to change notification settings - Fork 90
Multiplication of interior intervals in the rational numbers #1561
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
Merged
Merged
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
74dfa31
Progress
lowasser aa578cd
Progress
lowasser a596e90
Merge branch 'master' into min-max-total
lowasser 034dea6
Progress
lowasser 0f863ac
Merge branch 'min-max-total' into intervals
lowasser 90f991c
Progress
lowasser a6a698e
Merge branch 'master' into intervals
lowasser 7c5f694
Progress
lowasser d3b06b5
Merge branch 'master' into intervals
lowasser 8ea30ea
Progress
lowasser 9726c59
Respond to review comments
lowasser d7509a2
Merge branch 'master' into intervals
lowasser a868f8a
make pre-commit
lowasser 9400255
make pre-commit
lowasser a0edf6e
Progress
lowasser 0202393
Renamings
lowasser ab17ce8
Split out nonnegative rational operations
lowasser 8be4cf8
naming
fredrik-bakke e7b2418
fix link
fredrik-bakke dbdcab2
edits
fredrik-bakke c4ec81e
fix more links
fredrik-bakke e285dac
concept macro closed intervals rational numbers
fredrik-bakke 9348d77
Rename
lowasser 9979a0f
Merge remote-tracking branch 'origin/intervals' into intervals
lowasser e97c045
Renaming
lowasser ee0c903
Renaming
lowasser 2cbc082
Progress
lowasser 2ec83b1
Progress
lowasser 8aa2992
Merge branch 'master' into intervals
lowasser 0eb3098
Rename back
lowasser b071f0f
Fix link
lowasser d55ff8b
Fix concept
lowasser 01d0853
Progress
lowasser 1f89925
Progress
lowasser 57f7b4d
Progress
lowasser b7e4310
Merge branch 'master' into split-mul-nonneg-rat
lowasser cd3348c
Progress
lowasser 5f35912
Progress
lowasser 903e8d0
Move more out of nonnegative
lowasser 06e9319
Merge branch 'split-mul-nonneg-rat' into split-pos-rat
lowasser 0d12e8a
Update dependencies
lowasser c43da1f
Apply suggestions from code review
lowasser 6ef4366
Fix 'inhabited closed' stragglers
lowasser 865797a
make pre-commit format
lowasser 76f1766
Apply suggestions from code review
lowasser 07300fe
Parenthesize concatenated paths
lowasser 0118a0c
Merge remote-tracking branch 'origin/intervals' into intervals
lowasser fd6fac6
Merge branch 'intervals' into narrow-mul-interval
lowasser 9235a01
Progress
lowasser af3df99
Merge branch 'master' into narrow-mul-interval
lowasser 9cd7d6e
Finish the first case
lowasser 2268ddd
Remove concepts for specific instances
lowasser a300c7a
Merge branch 'split-mul-nonneg-rat' into split-pos-rat
lowasser 6d2aa78
Remove concepts for specific instances
lowasser 5bc67cf
Finish first version
lowasser 53fa7dc
Merge branch 'split-pos-rat' into narrow-mul-interval-split
lowasser a7d87bd
Progress
lowasser bbaff84
Finish proving the interior condition
lowasser 440678d
Merge branch 'master' into split-pos-rat
lowasser 7290d4c
Restore unlinked concepts
lowasser c56d410
Fixes
lowasser f77e973
Revert
lowasser e27c74d
Apply suggestions from code review
lowasser 8172049
Merge branch 'master' into narrow-mul-interval
lowasser d566f5f
Respond to comments
lowasser 6c1d5fb
Merge branch 'split-pos-rat' into narrow-mul-interval-split
lowasser 5ef0748
Merge branch 'narrow-mul-interval' into narrow-mul-interval-split
lowasser c41e40a
Merge
lowasser 0358102
Apply suggestions from code review
lowasser 7fd3724
Merge branch 'master' into narrow-mul-interval
lowasser 4566e50
make pre-commit
lowasser 52f4e42
Respond to review comments
lowasser 5952641
Merge branch 'narrow-mul-interval' into narrow-mul-interval-split
lowasser 7217f3a
Apply suggestions from code review
lowasser f888fdc
Merge branch 'master' into narrow-mul-interval
lowasser 4413d69
make pre-commit
lowasser abef95a
Fix import
lowasser d02fabf
Merge branch 'master' into narrow-mul-interval
fredrik-bakke 80e5f3c
Split out multiplication of interior intervals
lowasser a023e85
Merge remote-tracking branch 'origin/narrow-mul-interval' into narrow…
lowasser 4e47107
Fix
lowasser 4de6918
Fix
lowasser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...mentary-number-theory/closed-interval-preserving-maps-rational-numbers.lagda.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Closed interval preserving endomaps on the rational numbers | ||
|
||
```agda | ||
module elementary-number-theory.closed-interval-preserving-maps-rational-numbers where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import elementary-number-theory.closed-intervals-rational-numbers | ||
open import elementary-number-theory.inequality-rational-numbers | ||
open import elementary-number-theory.rational-numbers | ||
|
||
open import foundation.propositions | ||
open import foundation.universe-levels | ||
|
||
open import order-theory.closed-interval-preserving-maps-posets | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
A map from the [rational numbers](elementary-number-theory.rational-numbers.md) | ||
to themselves `f : ℚ → ℚ` is | ||
{{#concept "closed interval preserving" Agda=is-closed-interval-map-ℚ disambiguation="map between rational numbers"}} | ||
if the [image](foundation.images-subtypes.md) of a | ||
[closed interval](elementary-number-theory.closed-intervals-rational-numbers.md) | ||
is always a closed interval in `Y`. Equivalently, it is a | ||
[closed interval preserving map](order-theory.closed-interval-preserving-maps-total-orders.md) | ||
on the | ||
[total order of rational numbers](elementary-number-theory.decidable-total-order-rational-numbers.md). | ||
|
||
## Definition | ||
|
||
```agda | ||
is-closed-interval-map-ℚ : | ||
(ℚ → ℚ) → ([a,b] [c,d] : closed-interval-ℚ) → UU lzero | ||
is-closed-interval-map-ℚ = is-closed-interval-map-Poset ℚ-Poset ℚ-Poset | ||
|
||
is-closed-interval-map-prop-ℚ : | ||
(ℚ → ℚ) → closed-interval-ℚ → closed-interval-ℚ → | ||
Prop lzero | ||
is-closed-interval-map-prop-ℚ = | ||
is-closed-interval-map-prop-Poset ℚ-Poset ℚ-Poset | ||
``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/elementary-number-theory/interior-closed-intervals-rational-numbers.lagda.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Interior closed intervals in the rational numbers | ||
|
||
```agda | ||
module elementary-number-theory.interior-closed-intervals-rational-numbers where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import elementary-number-theory.closed-intervals-rational-numbers | ||
open import elementary-number-theory.strict-inequality-rational-numbers | ||
|
||
open import foundation.conjunction | ||
open import foundation.dependent-pair-types | ||
open import foundation.propositions | ||
open import foundation.universe-levels | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
Given two | ||
[closed intervals of rational numbers](elementary-number-theory.closed-intervals-rational-numbers.md) | ||
[a, b] and [c, d], then [c, d] is said to be | ||
{{#concept "interior" Disambiguation="closed intervals of rational numbers" Agda=is-interior-closed-interval-ℚ}} | ||
to [a, b] if `a < c` and `d < b`. | ||
|
||
## Definition | ||
|
||
```agda | ||
is-interior-prop-closed-interval-ℚ : | ||
closed-interval-ℚ → closed-interval-ℚ → Prop lzero | ||
is-interior-prop-closed-interval-ℚ ((x , y) , _) ((x' , y') , _) = | ||
le-ℚ-Prop x x' ∧ le-ℚ-Prop y' y | ||
|
||
is-interior-closed-interval-ℚ : closed-interval-ℚ → closed-interval-ℚ → UU lzero | ||
is-interior-closed-interval-ℚ [x,y] [x',y'] = | ||
type-Prop (is-interior-prop-closed-interval-ℚ [x,y] [x',y']) | ||
``` |
69 changes: 69 additions & 0 deletions
69
src/elementary-number-theory/minima-and-maxima-rational-numbers.lagda.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Minima and maxima on the rational numbers | ||
|
||
```agda | ||
module elementary-number-theory.minima-and-maxima-rational-numbers where | ||
``` | ||
|
||
<details><summary>Imports</summary> | ||
|
||
```agda | ||
open import elementary-number-theory.inequality-rational-numbers | ||
open import elementary-number-theory.maximum-rational-numbers | ||
open import elementary-number-theory.minimum-rational-numbers | ||
open import elementary-number-theory.rational-numbers | ||
|
||
open import foundation.action-on-identifications-functions | ||
open import foundation.coproduct-types | ||
open import foundation.identity-types | ||
``` | ||
|
||
</details> | ||
|
||
## Idea | ||
|
||
On this page, we outline basic relations between | ||
[minima](elementary-number-theory.minimum-rational-numbers.md) and | ||
[maxima](elementary-number-theory.maximum-rational-numbers.md) of | ||
[rational numbers](elementary-number-theory.rational-numbers.md). | ||
|
||
## Lemmas | ||
|
||
### The negation of the minimum of rational numbers is the maximum of the negations | ||
|
||
```agda | ||
module _ | ||
(p q : ℚ) | ||
where | ||
|
||
abstract | ||
neg-min-ℚ : neg-ℚ (min-ℚ p q) = max-ℚ (neg-ℚ p) (neg-ℚ q) | ||
neg-min-ℚ = | ||
rec-coproduct | ||
( λ p≤q → | ||
( ap neg-ℚ (left-leq-right-min-ℚ p q p≤q)) ∙ | ||
( inv (right-leq-left-max-ℚ _ _ (neg-leq-ℚ _ _ p≤q)))) | ||
( λ q≤p → | ||
( ap neg-ℚ (right-leq-left-min-ℚ p q q≤p)) ∙ | ||
( inv (left-leq-right-max-ℚ _ _ (neg-leq-ℚ _ _ q≤p)))) | ||
( linear-leq-ℚ p q) | ||
``` | ||
|
||
### The negation of the maximum of rational numbers is the minimum of the negations | ||
|
||
```agda | ||
module _ | ||
(p q : ℚ) | ||
where | ||
|
||
abstract | ||
neg-max-ℚ : neg-ℚ (max-ℚ p q) = min-ℚ (neg-ℚ p) (neg-ℚ q) | ||
neg-max-ℚ = | ||
rec-coproduct | ||
( λ p≤q → | ||
( ap neg-ℚ (left-leq-right-max-ℚ _ _ p≤q)) ∙ | ||
( inv (right-leq-left-min-ℚ _ _ (neg-leq-ℚ _ _ p≤q)))) | ||
( λ q≤p → | ||
( ap neg-ℚ (right-leq-left-max-ℚ _ _ q≤p)) ∙ | ||
( inv (left-leq-right-min-ℚ _ _ (neg-leq-ℚ _ _ q≤p)))) | ||
( linear-leq-ℚ p q) | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.