Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
9a1e164
Added global preorder instance for schemes
Raph-DG Jun 20, 2025
2ec0d7c
FIxed small error
Raph-DG Jun 20, 2025
9c5f05e
Merge branch 'master' into Raph-DG-SchemePreorderAPI
Raph-DG Jun 20, 2025
56b345d
Some minimal API for the ordering on schemes
Raph-DG Jun 20, 2025
fa9f6e5
Connecting up locally finite APIs
Raph-DG Jun 21, 2025
860f3f8
Fixed naming issues
Raph-DG Jun 21, 2025
80a124b
Merge branch 'Raph-DG-SchemePreorderAPI' into Raph-DG-AlgebraicCycle
Raph-DG Jun 21, 2025
884f857
Merge branch 'Raph-DG-LocallyFinite' into Raph-DG-AlgebraicCycle
Raph-DG Jun 21, 2025
ffb8001
Added algebraic cycle file
Raph-DG Jun 22, 2025
144a4e0
Some minor golfing
Raph-DG Jun 22, 2025
c1afc37
Added affine open lemma
Raph-DG Jun 22, 2025
eb4136a
Merge branch 'Raph-DG-affineNhd' into Raph-DG-AlgebraicCycle
Raph-DG Jun 22, 2025
6bae8b1
Fixed typo in lemma statement
Raph-DG Jun 22, 2025
2048994
Merge branch 'Raph-DG-affineNhd' into Raph-DG-AlgebraicCycle
Raph-DG Jun 23, 2025
bdb9c9d
Added some things about homogeneous cycles
Raph-DG Jun 23, 2025
404ee0e
Added lemma about pushforward acting on k cycles
Raph-DG Jun 23, 2025
16df43d
Removed redundant newline
Raph-DG Jun 23, 2025
4dde31e
Fixed issues raised by CI
Raph-DG Jun 23, 2025
21ced5f
Fixed some CI complaints
Raph-DG Jun 23, 2025
6e994b2
Removed unnecessary import
Raph-DG Jun 23, 2025
70304cb
Made some changes according to reviewer comments
Raph-DG Sep 25, 2025
9b94671
Merge branch 'master' into Raph-DG-AlgebraicCycle
Raph-DG Feb 18, 2026
909ec60
WIP
Raph-DG Feb 19, 2026
01f5912
Refactored a lot of the code and cleaned up the way gradings are defined
Raph-DG Feb 20, 2026
b4f71c7
Updated import formatting
Raph-DG Feb 20, 2026
bee02e0
Removed unnecessary assumption
Raph-DG Feb 20, 2026
109f9c7
Added some docstrings
Raph-DG Feb 20, 2026
11fdd62
Added more missing docstrings
Raph-DG Feb 20, 2026
e8d182f
Removed redundant whitespace
Raph-DG Feb 20, 2026
5923153
Removed whitespace and such from LocallyFinsupp.lean
Raph-DG Feb 20, 2026
c5bacb4
Added a codimension grading
Raph-DG Feb 20, 2026
c39feed
Updated some unfinished docstrings
Raph-DG Feb 20, 2026
7f9ece4
Update Mathlib/AlgebraicGeometry/AlgebraicCycle.lean
Raph-DG Feb 25, 2026
d86b4e7
Update Mathlib/AlgebraicGeometry/AlgebraicCycle.lean
Raph-DG Feb 25, 2026
035c26f
Update Mathlib/AlgebraicGeometry/AlgebraicCycle.lean
Raph-DG Feb 25, 2026
7cce42c
Changed the name of the type of coefficients from Z to R
Raph-DG Feb 26, 2026
87f665c
Changed gradings to just be functions without bundling anything
Raph-DG Feb 26, 2026
9060749
Added in a docstring for gradings
Raph-DG Feb 26, 2026
8687db7
WIP
Raph-DG Mar 19, 2026
6a41af9
Merge branch 'master' into Raph-DG-AlgebraicCycle
Raph-DG Mar 19, 2026
12e77e5
Added in some stuff about Locally Spectral spaces, still very much WIP
Raph-DG Mar 25, 2026
3add02c
WIP
Raph-DG Mar 27, 2026
a1f06ec
WIP
Raph-DG Mar 31, 2026
d0e4bb4
Clean up
Raph-DG Apr 1, 2026
7149ddc
Remove AlegebraicCycle.lean
Raph-DG Apr 1, 2026
01b9e61
Generated new Mathlib.lean
Raph-DG Apr 1, 2026
452044e
Merge branch 'master' into Raph-DG-AlgebraicCycle
Raph-DG Apr 7, 2026
c943489
Some golfing
Raph-DG Apr 8, 2026
69afd42
Fixed some design flaws
Raph-DG Apr 10, 2026
866be85
Various minor fixes
Raph-DG Apr 16, 2026
cf4ac1e
Merge remote-tracking branch 'upstream/master' into Raph-DG-Algebraic…
Raph-DG Apr 16, 2026
1414da7
Merge branch 'master' into Raph-DG-AlgebraicCycle
Raph-DG Apr 21, 2026
bb5278f
WIP
Raph-DG Apr 22, 2026
97ebd21
Revert "WIP"
Raph-DG Apr 23, 2026
532f9e2
Expanded on comments
Raph-DG Apr 28, 2026
de7d996
Removed the preimageSupport business
Raph-DG May 1, 2026
0e78821
WIP
Raph-DG May 4, 2026
f6fbc68
Merge remote-tracking branch 'upstream/master' into Raph-DG-Algebraic…
Raph-DG May 4, 2026
f6c7ed9
Added in HasCompactFibers and gave the example for why it is not auto…
Raph-DG May 4, 2026
2a094a2
Expanded on a dosctring
Raph-DG May 4, 2026
700233c
Added a dostring for HasCompactFibers
Raph-DG May 4, 2026
281eec4
Update Mathlib/Topology/Compactness/Compact.lean
Raph-DG May 8, 2026
50b971c
Update Mathlib/Topology/LocallyFinsupp/Pushforward.lean
Raph-DG May 8, 2026
346e656
Update Mathlib/Topology/Spectral/ConstructibleTopology.lean
Raph-DG May 11, 2026
2300463
Update Mathlib/Topology/Spectral/ConstructibleTopology.lean
Raph-DG May 11, 2026
d0163c4
Update Mathlib/Topology/Spectral/ConstructibleTopology.lean
Raph-DG May 11, 2026
1b02f54
Apply suggestion from @chrisflav
Raph-DG May 11, 2026
394b8c4
Applied some review changes
Raph-DG May 11, 2026
a14f1b9
Merge branch 'Raph-DG-AlgebraicCycle' of github.com:Raph-DG/mathlib4 …
Raph-DG May 11, 2026
23c006b
Made changes according to review + attempted to gold proof using wlog
Raph-DG May 11, 2026
19c27f3
Changed things in Pushforward.lean according to review comments
Raph-DG May 11, 2026
d6276ae
Update Mathlib/Topology/LocallyFinsupp/Pushforward.lean
Raph-DG May 21, 2026
07f0e5d
Applied simplifications suggested by reviews
Raph-DG May 21, 2026
025d5fb
Remove stuff that's irrelevant for this PR
Raph-DG May 21, 2026
b6865bb
Update Mathlib.lean
Raph-DG May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Mathlib/Topology/Compactness/Compact.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1222,3 +1222,8 @@ theorem IsClosed.exists_minimal_nonempty_closed_subset [CompactSpace X] {S : Set
rw [← this, compl_compl]

end Compact

/--
A function satisfies `HasCompactFibers` if all the fibers are compact
-/
abbrev HasCompactFibers (f : X → Y) : Prop := ∀ y, IsCompact (f ⁻¹' {y})
6 changes: 6 additions & 0 deletions Mathlib/Topology/Constructible.lean
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ omit [CompactSpace X] in
lemma _root_.IsCompact.isRetrocompact (hU' : IsCompact U) (hU : IsOpen U) : IsRetrocompact U :=
fun _ hV' hV ↦ hU'.inter_of_isOpen hV' hU hV

omit [QuasiSeparatedSpace X] in
lemma IsOpenEmbedding.isSpectralMap_of_compactSpace {f : X → Y}
(hf : Topology.IsOpenEmbedding f) [QuasiSeparatedSpace Y] :
IsSpectralMap f := ⟨hf.continuous, fun _ hU hU' ↦ IsRetrocompact.isCompact <|
IsRetrocompact.preimage_of_isOpenEmbedding hf <| hU'.isRetrocompact hU⟩

omit [CompactSpace X] in
lemma _root_.IsCompact.isConstructible (hU' : IsCompact U) (hU : IsOpen U) : IsConstructible U :=
(hU'.isRetrocompact hU).isConstructible hU
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/Topology/Maps/Proper/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,6 @@ theorem IsProperMap.universally_closed (Z) [TopologicalSpace Z] (h : IsProperMap
IsClosedMap (Prod.map f id : X × Z → Y × Z) :=
-- `f × id` is proper as a product of proper maps, hence closed.
(h.prodMap isProperMap_id).isClosedMap

lemma IsProperMap.hasCompactFibers {f : X → Y} (hf : IsProperMap f) : HasCompactFibers f :=
(isProperMap_iff_isClosedMap_and_compact_fibers.mp hf).2.2
102 changes: 102 additions & 0 deletions Mathlib/Topology/Spectral/ConstructibleTopology.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module
public import Mathlib.Topology.Spectral.Basic
public import Mathlib.Topology.JacobsonSpace
public import Mathlib.Data.Set.Card
public import Mathlib.Topology.Constructible

/-!
# Constructible topology
Expand Down Expand Up @@ -154,3 +155,104 @@ instance compactSpace_withConstructibleTopology [CompactSpace X] [QuasiSober X]
· rw [← Set.sInter_union]
refine hB.prop.2.1 (_ ∪ F) ?_ <| (hA₁'.diff.union hA₂'.diff).union hF
grind [Set.diff_singleton_subset_iff, Set.union_subset_iff]

instance [PrespectralSpace X] [T0Space X] [QuasiSober X] :
T2Space <| WithConstructibleTopology X := by
constructor
intro x y hxy
wlog h : ∃ (U : Set X), IsOpen U ∧ x ∈ U ∧ y ∉ U
· have o : ∃ (U : Set X), IsOpen U ∧ y ∈ U ∧ x ∉ U := by
obtain ⟨U, hU1, (o | o)⟩ := exists_isOpen_xor_mem (X := X) hxy <;> use U
· simp only [not_exists, not_and, not_not] at h
exact (o.2 (h U hU1 o.1)).elim
· exact ⟨hU1, o⟩
obtain ⟨U, V, a, b, c, d, e⟩ := @this X _ _ _ _ y x hxy.symm o
exact ⟨V, U, b, a, d, c, e.symm⟩
obtain ⟨U, hU1, hU2, hU3⟩ := h
obtain ⟨V, ⟨hVo, hVc⟩, hV, hVU⟩ :=
PrespectralSpace.isTopologicalBasis.mem_nhds_iff.mp (hU1.mem_nhds ‹_›)
· exact ⟨V, Vᶜ,
TopologicalSpace.isOpen_generateFrom_of_mem (.inl ⟨hVo, hVc⟩),
TopologicalSpace.isOpen_generateFrom_of_mem
(Or.inr ⟨hVo.isClosed_compl, (compl_compl V).symm ▸ hVc⟩),
hV, Set.mem_compl (fun h ↦ hU3 (hVU h)), disjoint_compl_right⟩

/--
Canonical map from a space `X` to `WithConstructibleTopology X`
-/
def toConstructibleTopology (X) [TopologicalSpace X] : X ≃ WithConstructibleTopology X :=
Equiv.refl _

/--
Canonical map from a space `WithConstructibleTopology X` to `X`
-/
def WithConstructibleTopology.equiv (X) [TopologicalSpace X] : WithConstructibleTopology X ≃ X :=
Equiv.refl _

variable {Y : Type*} [TopologicalSpace Y]
/--
Induced map `lift f : WithConstructibleTopology X → WithConstructibleTopology Y` by a map
`f : X → Y`
-/
def WithConstructibleTopology.map (f : X → Y) :
WithConstructibleTopology X → WithConstructibleTopology Y :=
(equiv Y).symm ∘ f ∘ equiv X

@[simp]
lemma WithConstructibleTopology.map_id (x : WithConstructibleTopology X) :
WithConstructibleTopology.map id x = x := rfl

@[simp]
lemma WithConstructibleTopology.map_comp {Z : Type*} [TopologicalSpace Z] (f : X → Y) (g : Y → Z) :
WithConstructibleTopology.map (g ∘ f) =
WithConstructibleTopology.map g ∘ WithConstructibleTopology.map f := rfl

lemma isOpen_ofConstructibleTopology_preimage_iff (s : Set X) :
IsOpen (WithConstructibleTopology.equiv X ⁻¹' s) ↔ IsOpen[constructibleTopology X] s := .rfl

/--
The map from `X` with the constructible topology to `X` is continuous if `X` is prespectral.
-/
lemma WithConstructibleTopology.continuous_equiv [PrespectralSpace X] :
Continuous <| equiv X := by
rw [TopologicalSpace.IsTopologicalBasis.continuous_iff (PrespectralSpace.isBasis_opens X)]
simp only [Set.mem_image, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]
intro U hU
rw [isOpen_ofConstructibleTopology_preimage_iff]
exact hU.isOpen_constructibleTopology_of_isOpen U.2

lemma WithConstructibleTopology.map_continuous {f : X → Y} (hf : IsSpectralMap f) :
Continuous <| WithConstructibleTopology.map f := by
apply continuous_generateFrom_iff.mpr
intro s hs
obtain ⟨hso, hsc⟩ | ⟨hscl, hsc⟩ := hs
· exact (hf.isCompact_preimage_of_isOpen hso hsc).isOpen_constructibleTopology_of_isOpen
(hso.preimage hf.continuous)
· exact
(hf.isCompact_preimage_of_isOpen hscl.isOpen_compl hsc).isOpen_constructibleTopology_of_isClosed
(hscl.preimage hf.continuous)

/--
A spectral map between *quasi-separated* pre-spectral, sober spaces has compact fibers.
Note that any quasi-compact morphism of schemes has compact fibers, although the underlying
topological space of a schemes is not necessarily quasi-separated.
-/
lemma IsSpectralMap.hasCompactFibers [PrespectralSpace X] [T0Space X] [QuasiSeparatedSpace X]
[QuasiSober X] [PrespectralSpace Y] [T0Space Y] [QuasiSeparatedSpace Y] [QuasiSober Y]
{f : X → Y} (hf : IsSpectralMap f) : HasCompactFibers f := by
intro y
-- Take a compact open neighbourhood U of y (exists since Y is prespectral)
obtain ⟨U, ⟨hUo, hUc⟩, (hyU : y ∈ U), -⟩ :=
(PrespectralSpace.isTopologicalBasis (X := Y)).mem_nhds_iff.mp (isOpen_univ.mem_nhds trivial)
have hfUo : IsOpen (f ⁻¹' U) := hUo.preimage hf.continuous
have hfUc : IsCompact (f ⁻¹' U) := hf.isCompact_preimage_of_isOpen hUo hUc
have : CompactSpace (f ⁻¹' U) := isCompact_iff_compactSpace.mp hfUc
have : PrespectralSpace (f ⁻¹' U) := hfUo.isOpenEmbedding_subtypeVal.prespectralSpace
have : QuasiSeparatedSpace (f ⁻¹' U) := hfUo.isOpenEmbedding_subtypeVal.quasiSeparatedSpace
have : QuasiSober (f ⁻¹' U) := hfUo.isOpenEmbedding_subtypeVal.quasiSober
let g := f ∘ (Subtype.val : f ⁻¹' U → X)
have hg : IsSpectralMap g := hf.comp hfUo.isOpenEmbedding_subtypeVal.isSpectralMap_of_compactSpace
have heq : f ⁻¹' {y} = Subtype.val '' (g ⁻¹' {y}) := by grind [Subtype.exists]
rw [heq]
exact (isClosed_singleton.preimage (WithConstructibleTopology.map_continuous hg)).isCompact.image
(continuous_subtype_val.comp WithConstructibleTopology.continuous_equiv)
Loading