Repository navigation
[Merged by Bors] - chore(Order/ConditionallyCompleteLattice): split off material on WithTop - #45402
astrainfinita wants to merge 5 commits into
Conversation
…hTop` This PR moves the material on `sSup` and `sInf` on `WithTop α` and `WithBot α` from `Order/ConditionallyCompleteLattice/Basic` and `Order/ConditionallyCompleteLattice/Indexed` to a new file `Order/ConditionallyCompleteLattice/WithTop`. This material was scattered over five places in the two files, although the rest of these files does not depend on it.
PR summary 2333caff1e
|
| Files | Import difference |
|---|---|
| ../mathlib-ci/scripts/pr_summary/import_trans_difference.sh all | |
| There are 3323 files with changed transitive imports taking up over 154607 characters: this is too many to display! | |
You can run this locally from your mathlib4 directory: |
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
Declarations diff (regex)
--++ instance [ConditionallyCompleteLinearOrder α] :
You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.
Declarations diff (Lean)
✅ Lean-aware diff — post-build, computed from the Lean environment (commit
2333caf).
- +0 new declarations
- −0 removed declarations
No declaration differences.
No changes to strong technical debt.
Increase in weak tech debt: (relative, absolute) = (1.00, 0.00)
| Current number | Change | Type (weak) |
|---|---|---|
| 5127 | 1 | exposed public sections |
Current commit 2333caff1e
Reference commit ee6c124192
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
vihdzp
left a comment
There was a problem hiding this comment.
Looks good to me! Awaiting the future refactoring PRs.
|
What refactoring PRs? Are you aware of #45250 ? |
| open scoped Classical in | ||
| @[to_dual] | ||
| noncomputable instance [SupSet α] : SupSet (WithTop α) := | ||
| ⟨fun S => | ||
| if ⊤ ∈ S then ⊤ else if BddAbove ((fun (a : α) ↦ ↑a) ⁻¹' S : Set α) then | ||
| ↑(sSup ((fun (a : α) ↦ (a : WithTop α)) ⁻¹' S : Set α)) else ⊤⟩ | ||
|
|
||
| open scoped Classical in | ||
| @[to_dual] | ||
| noncomputable instance instInfSet [InfSet α] : InfSet (WithTop α) := | ||
| ⟨fun S => if S ⊆ {⊤} ∨ ¬BddBelow S then ⊤ else ↑(sInf ((fun (a : α) ↦ ↑a) ⁻¹' S : Set α))⟩ | ||
|
|
||
| @[to_dual] | ||
| theorem sSup_eq [SupSet α] {s : Set (WithTop α)} (hs : ⊤ ∉ s) | ||
| (hs' : BddAbove ((↑) ⁻¹' s : Set α)) : sSup s = ↑(sSup ((↑) ⁻¹' s) : α) := | ||
| (ite_eq_right hs).trans <| ite_eq_left hs' | ||
|
|
||
| @[to_dual] | ||
| theorem sInf_eq [InfSet α] {s : Set (WithTop α)} (hs : ¬s ⊆ {⊤}) (h's : BddBelow s) : | ||
| sInf s = ↑(sInf ((↑) ⁻¹' s) : α) := | ||
| ite_eq_right <| by simp [hs, h's] | ||
|
|
||
| @[to_dual (attr := simp)] | ||
| theorem sInf_empty [InfSet α] : sInf (∅ : Set (WithTop α)) = ⊤ := | ||
| ite_eq_left <| by simp | ||
|
|
||
| @[to_dual (attr := simp)] | ||
| theorem sInf_singleton_top [InfSet α] : sInf ({⊤} : Set (WithTop α)) = ⊤ := | ||
| ite_eq_left <| .inl subset_rfl | ||
|
|
||
| @[to_dual (attr := simp)] | ||
| theorem sSup_of_top_mem [SupSet α] {s : Set (WithTop α)} (h : ⊤ ∈ s) : sSup s = ⊤ := | ||
| ite_eq_left h | ||
|
|
||
| @[to_dual] | ||
| theorem sSup_singleton_top [SupSet α] : sSup ({⊤} : Set (WithTop α)) = ⊤ := by | ||
| simp | ||
|
|
||
| @[to_dual] | ||
| theorem sSup_of_not_bddAbove [SupSet α] {s : Set (WithTop α)} | ||
| (h : ¬BddAbove ((↑) ⁻¹' s : Set α)) : sSup s = ⊤ := by | ||
| by_cases hmem : ⊤ ∈ s | ||
| · exact sSup_of_top_mem hmem | ||
| · exact ite_eq_right hmem |>.trans <| ite_eq_right h | ||
|
|
||
| @[to_dual (attr := simp)] | ||
| theorem sInf_of_not_bddBelow [InfSet α] {s : Set (WithTop α)} (h : ¬BddBelow s) : | ||
| sInf s = ⊤ := | ||
| ite_eq_left <| .inr h | ||
|
|
||
| @[to_dual (attr := norm_cast)] | ||
| theorem coe_sSup' [SupSet α] {s : Set α} (hs : BddAbove s) : | ||
| ↑(sSup s) = (sSup ((fun (a : α) ↦ ↑a) '' s) : WithTop α) := by | ||
| classical | ||
| change _ = ite _ _ _ | ||
| rw [ite_eq_right, preimage_image_eq, ite_eq_left hs] | ||
| · exact Option.some_injective _ | ||
| · rintro ⟨x, _, ⟨⟩⟩ |
There was a problem hiding this comment.
Can you split into SupSet and InfSet sections?
| · rintro ⟨x, _, ⟨⟩⟩ | ||
|
|
||
| @[to_dual] | ||
| theorem sSup_empty (α : Type*) [CompleteLattice α] : (sSup ∅ : WithTop α) = ⊥ := by |
| section LE | ||
|
|
||
| namespace WithTop |
There was a problem hiding this comment.
Why not
| section LE | |
| namespace WithTop | |
| namespace WithTop | |
| section LE |
|
This PR only moves code, so I'd like to keep each section unchanged and do the cleanup in #45406. I think reordering the sections should be fine, though. |
This reverts commit 991d83b.
|
Actually, some of these aren't |
YaelDillies
left a comment
There was a problem hiding this comment.
Sure
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
|
Thanks! |
…hTop` (#45402) This PR moves the material on `sSup` and `sInf` on `WithTop α` and `WithBot α` from `Order/ConditionallyCompleteLattice/Basic` and `Order/ConditionallyCompleteLattice/Indexed` to a new file `Order/ConditionallyCompleteLattice/WithTop`. This material was scattered over five places in the two files, although the rest of these files does not depend on it.
|
Pull request successfully merged into master. Build succeeded: |
WithTopWithTop
This PR moves the material on
sSupandsInfonWithTop αandWithBot αfromOrder/ConditionallyCompleteLattice/BasicandOrder/ConditionallyCompleteLattice/Indexedto a new fileOrder/ConditionallyCompleteLattice/WithTop.This material was scattered over five places in the two files, although the rest of these files does not depend on it.