[Merged by Bors] - feat: Scott topology on a preorder#2508
[Merged by Bors] - feat: Scott topology on a preorder#2508
Conversation
|
@YaelDillies |
|
Uh, not sure. Please bring it up on Zulip. |
We prove an insert result for directed sets when the relation is reflexive. This is then used to show that a Scott continuous function is monotone. This result is required in the [construction of the Scott topology on a preorder](leanprover-community/mathlib4#2508) (see also #18448). Holding PR for mathlib4: leanprover-community/mathlib4#2543 Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Eric Wieser <[email protected]>
Matches leanprover-community/mathlib3#18517 This result is required in #2508. Co-authored-by: Yaël Dillies <[email protected]> Co-authored-by: Eric Wieser <[email protected]>
|
General design question: Why are you not doing the same thing as with the lower topology? namely define a typeclass for a topology on a preorder to be the Scott topology, and then define a type synonym equipping a preorder with that topology. Here you have the synonym but not the typeclass. |
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
For the Lower Topology I needed the typeclass to prove this result and ultimately continuity of the inf. I haven't needed to show that something is an instance of the Scott Topology yet. I was going to introduce the typeclass as and when the need arose - but I'm happy to add it preemptively if that's the right thing to do? |
|
Yes, this sounds like the correct design decision. |
@YaelDillies - just to be certain - is that yes to when the need arises or yes to add preemptively? Thanks. |
|
Yes to add it preemptively. Changing the design after the fact isn't a drop-in replacement (some refactors can be postponed because they are drop-in replacements), so I would like us to get it right straight away. |
|
Okay, done. Tell me what you think. |
Looks good - I made a couple of minor suggestions. I also pushed this commit - you can revert it if you don't like it. |
833c436 to
ae44135
Compare
2b32c1e to
d61afe6
Compare
YaelDillies
left a comment
There was a problem hiding this comment.
I've incorporated your last commit by turning the equalities of predicates into lemmas. I've thus dropped the CompleteLattice sections about IsScott since they can now easily be derived from the two new lemmas.
Since you're happy with my cleanup and I'm mostly happy with the state of this PR, let's merge. Thank you, and sorry that it took so long!
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
|
bors merge |
Introduce the Scott topology on a preorder, defined in terms of directed sets. There is already a related notion of Scott topology defined in `topology.omega_complete_partial_order`, where it is defined on ω-complete partial orders in terms of ω-chains. In some circumstances the definition given here coincides with that given in `topology.omega_complete_partial_order` but in general they are different. Abramsky and Jung ([Domain Theory, 2.2.4][abramsky_gabbay_maibaum_1994]) argue that the ω-chain approach has pedagogical advantages, but the directed sets approach is more appropriate as a theoretical foundation. Co-authored-by: Yaël Dillies <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Mario Carneiro <[email protected]>
|
Pull request successfully merged into master. Build succeeded: |
That's fine.
Thank you for the huge amount of work you've put into this! I never imagined it would take this much effort when I started. Sorry that I need so much hand-holding. Christopher |
Introduce the Scott topology on a preorder, defined in terms of directed sets. There is already a related notion of Scott topology defined in `topology.omega_complete_partial_order`, where it is defined on ω-complete partial orders in terms of ω-chains. In some circumstances the definition given here coincides with that given in `topology.omega_complete_partial_order` but in general they are different. Abramsky and Jung ([Domain Theory, 2.2.4][abramsky_gabbay_maibaum_1994]) argue that the ω-chain approach has pedagogical advantages, but the directed sets approach is more appropriate as a theoretical foundation. Co-authored-by: Yaël Dillies <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Mario Carneiro <[email protected]>
… Mathlib (#11710) Introduces the Lawson Topology on a preorder. The Lawson Topology is defined as the meet of the [Lower Topology](leanprover-community/mathlib3#17426) and the [Scott Topology](#2508) previously introduced. A basis for the Lawson Topology is defined and some basic results are established: - An upper set is Lawson open if and only if it is Scott open - A lower set is Lawson closed if and only if it is closed under sups of directed sets - The Lawson topology on a partial order is T₀ Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]>
… Mathlib (#11710) Introduces the Lawson Topology on a preorder. The Lawson Topology is defined as the meet of the [Lower Topology](leanprover-community/mathlib3#17426) and the [Scott Topology](#2508) previously introduced. A basis for the Lawson Topology is defined and some basic results are established: - An upper set is Lawson open if and only if it is Scott open - A lower set is Lawson closed if and only if it is closed under sups of directed sets - The Lawson topology on a partial order is T₀ Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]>
… Mathlib (#11710) Introduces the Lawson Topology on a preorder. The Lawson Topology is defined as the meet of the [Lower Topology](leanprover-community/mathlib3#17426) and the [Scott Topology](#2508) previously introduced. A basis for the Lawson Topology is defined and some basic results are established: - An upper set is Lawson open if and only if it is Scott open - A lower set is Lawson closed if and only if it is closed under sups of directed sets - The Lawson topology on a partial order is T₀ Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]>
…ogy (#16523) Unify Scott Topologies, following on from #13201 and #16826. Originally Mathlib had a notion of ω-Scott Continuity and ω-Scott Topology based on Chains for ω-complete partial orders. Previously we introduced a notion of Scott Continuity and Scott Topology based on directed sets for arbitrary pre-orders (#2508). In #13201, we generalised our definition of Scott Continuity to include ω-Scott Continuity as a special case. This PR continues that work by generalising our notion of Scott Topology to include ω-Scott Topology as a special case. `Topology.IsScott.scottContinuous_iff_continuous` and `Topology.IsScott.ωscottContinuous_iff_continuous` have almost identical proofs and are presumably special cases of a more general result that I have not yet formulated. However I think this PR covers enough ground to be worth considering at this stage. Co-authored-by: Christopher Hoskin <[email protected]> Co-authored-by: Christopher Hoskin <[email protected]>
Introduce the Scott topology on a preorder, defined in terms of directed sets.
There is already a related notion of Scott topology defined in
topology.omega_complete_partial_order, where it is defined on ω-complete partial orders in terms of ω-chains. In some circumstances the definition given here coincides with that given intopology.omega_complete_partial_orderbut in general they are different. Abramsky and Jung ([Domain Theory, 2.2.4][abramsky_gabbay_maibaum_1994]) argue that the ω-chain approach has pedagogical advantages, but the directed sets approach is more appropriate as a theoretical foundation.Previously submitted to mathlib leanprover-community/mathlib3#18448