Skip to content

feat(AlgebraicGeometry/Birational): add birational maps#40871

Open
justus-springer wants to merge 43 commits into
leanprover-community:masterfrom
justus-springer:justus/birational_maps
Open

feat(AlgebraicGeometry/Birational): add birational maps#40871
justus-springer wants to merge 43 commits into
leanprover-community:masterfrom
justus-springer:justus/birational_maps

Conversation

@justus-springer

@justus-springer justus-springer commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

We add birational maps between irreducible schemes (dominant rational maps with an inverse). We provide a group structure on birational automorphisms and the subgroup of birational maps that are defined over a base. We also prove that partial isomorphisms give rise to birational maps (leaving the converse as future work).


Open in Gitpod

justus-springer and others added 30 commits May 15, 2026 23:30
Co-authored-by: Christian Merten <christian@merten.dev>
Co-authored-by: Christian Merten <christian@merten.dev>
Co-authored-by: Christian Merten <christian@merten.dev>
Co-authored-by: Christian Merten <christian@merten.dev>
@github-actions github-actions Bot added the t-algebraic-geometry Algebraic geometry label Jun 21, 2026
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown

PR summary f19be84a35

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.AlgebraicGeometry.Birational.BirationalMap (new file) 2538

Declarations diff (regex)

+ BirationalMap
+ IsOver
+ PartialIso.isOver_toBirationalMap
+ PartialIso.symm_toPartialMap_comp
+ PartialIso.toBirationalMap
+ PartialIso.toPartialMap_comp_symm
+ RationalMap.isOver_toRationalMap
+ Scheme.Opens.morphismRestrict_ι
+ birationalAutOver
+ equiv_id_iff
+ ext
+ id_domain
+ id_hom
+ instance (S : Scheme.{u}) [X.Over S] [Y.Over S] (f : BirationalMap X Y) [hf : f.IsOver S] :
+ instance : Group (X.BirationalMap X)
+ isDominant_toPartialMap_hom
+ opensRestrict_apply_coe
+ opensRestrict_symm_apply
+ refl
+ refl_trans
+ self_trans_symm_id
+ symm
+ symm_trans_self_id
+ trans
+ trans_assoc
+ trans_refl
+ trans_symm

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 f19be84).

  • +56 new declarations
  • −2 removed declarations
+AlgebraicGeometry.Scheme.BirationalMap
+AlgebraicGeometry.Scheme.BirationalMap.IsOver
+AlgebraicGeometry.Scheme.BirationalMap.casesOn
+AlgebraicGeometry.Scheme.BirationalMap.ctorIdx
+AlgebraicGeometry.Scheme.BirationalMap.ext
+AlgebraicGeometry.Scheme.BirationalMap.ext_iff
+AlgebraicGeometry.Scheme.BirationalMap.hom
+AlgebraicGeometry.Scheme.BirationalMap.hom_comp_inv_id
+AlgebraicGeometry.Scheme.BirationalMap.instGroup
+AlgebraicGeometry.Scheme.BirationalMap.instIsOverInvOfIsOver
+AlgebraicGeometry.Scheme.BirationalMap.inv
+AlgebraicGeometry.Scheme.BirationalMap.inv_comp_hom_id
+AlgebraicGeometry.Scheme.BirationalMap.isDominant_hom
+AlgebraicGeometry.Scheme.BirationalMap.isDominant_inv
+AlgebraicGeometry.Scheme.BirationalMap.mk
+AlgebraicGeometry.Scheme.BirationalMap.mk.congr_simp
+AlgebraicGeometry.Scheme.BirationalMap.mk.hcongr_10
+AlgebraicGeometry.Scheme.BirationalMap.mk.inj
+AlgebraicGeometry.Scheme.BirationalMap.mk.injEq
+AlgebraicGeometry.Scheme.BirationalMap.mk.noConfusion
+AlgebraicGeometry.Scheme.BirationalMap.mk.sizeOf_spec
+AlgebraicGeometry.Scheme.BirationalMap.noConfusion
+AlgebraicGeometry.Scheme.BirationalMap.noConfusionType
+AlgebraicGeometry.Scheme.BirationalMap.rec
+AlgebraicGeometry.Scheme.BirationalMap.recOn
+AlgebraicGeometry.Scheme.BirationalMap.refl
+AlgebraicGeometry.Scheme.BirationalMap.refl_hom
+AlgebraicGeometry.Scheme.BirationalMap.refl_inv
+AlgebraicGeometry.Scheme.BirationalMap.refl_trans
+AlgebraicGeometry.Scheme.BirationalMap.self_trans_symm_id
+AlgebraicGeometry.Scheme.BirationalMap.symm
+AlgebraicGeometry.Scheme.BirationalMap.symm_hom
+AlgebraicGeometry.Scheme.BirationalMap.symm_inv
+AlgebraicGeometry.Scheme.BirationalMap.symm_trans_self_id
+AlgebraicGeometry.Scheme.BirationalMap.trans
+AlgebraicGeometry.Scheme.BirationalMap.trans_assoc
+AlgebraicGeometry.Scheme.BirationalMap.trans_hom
+AlgebraicGeometry.Scheme.BirationalMap.trans_inv
+AlgebraicGeometry.Scheme.BirationalMap.trans_refl
+AlgebraicGeometry.Scheme.BirationalMap.trans_symm
+AlgebraicGeometry.Scheme.Opens.morphismRestrict_ι
+AlgebraicGeometry.Scheme.PartialIso.isDominant_toPartialMap_hom
+AlgebraicGeometry.Scheme.PartialIso.isOver_toBirationalMap
+AlgebraicGeometry.Scheme.PartialIso.symm_toPartialMap_comp
+AlgebraicGeometry.Scheme.PartialIso.toBirationalMap
+AlgebraicGeometry.Scheme.PartialIso.toBirationalMap_hom
+AlgebraicGeometry.Scheme.PartialIso.toBirationalMap_inv
+AlgebraicGeometry.Scheme.PartialIso.toPartialMap_comp_symm
+AlgebraicGeometry.Scheme.PartialMap.equiv_id_iff
+AlgebraicGeometry.Scheme.PartialMap.id_domain
+AlgebraicGeometry.Scheme.PartialMap.id_hom
+AlgebraicGeometry.Scheme.RationalMap.comp.hcongr_8
+AlgebraicGeometry.Scheme.RationalMap.isOver_toRationalMap
+AlgebraicGeometry.Scheme.birationalAutOver
-AlgebraicGeometry.coe_opensRestrict_apply_coe
-AlgebraicGeometry.coe_opensRestrict_symm_apply
+AlgebraicGeometry.opensRestrict_apply_coe
+AlgebraicGeometry.opensRestrict_symm_apply

Increase in strong tech debt: (relative, absolute) = (1.63, 0.00)
Current number Change Type (strong)
7130 1 backward.isDefEq.respectTransparency
4158 2 backward.isDefEq.respectTransparency.types
Increase in weak tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (weak)
5011 1 exposed public sections

Current commit f19be84a35
Reference commit cd580e54f1

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.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jun 21, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 10, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

@justus-springer justus-springer added the WIP Work in progress label Jul 11, 2026
@justus-springer justus-springer removed the WIP Work in progress label Jul 15, 2026
@chrisflav chrisflav self-assigned this Jul 20, 2026
Comment on lines +128 to +129
abbrev IsOver (S : Scheme.{u}) [X.Over S] [Y.Over S] (f : X.BirationalMap Y) : Prop :=
f.hom.IsOver S

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We are phasing out the Scheme.Over classes: Could you please instead use explicit structure maps (as you already did for Scheme.IsRationalOver).

Comment on lines +148 to +152
set_option backward.isDefEq.respectTransparency.types false in
lemma PartialIso.toPartialMap_comp_symm (f : X.PartialIso Y) :
f.toPartialMap.comp f.symm.toPartialMap =
(PartialMap.id X).restrict f.source f.dense_source le_top := by
ext1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could probably go in an earlier file?


/-- A birational map between irreducible schemes `X` and `Y`. Consists of a pair of dominant
mutually inverse rational maps `hom : X ⤏ Y` and `inv : Y ⤏ X`. -/
structure BirationalMap (X Y : Scheme.{u}) [IrreducibleSpace X] [IrreducibleSpace Y] where

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please add the relevant stacks tag? It would also be nice to provide some other references (e.g. EGA) and explain a bit how they differ. Could you please also relate this to Scheme.Birational? There could also be a predicate Scheme.RationalMap.Birational saying it is induced by a partial equiv.

An alternative definition, as far as I understand, would be to define an equivalence relation on PartialEquivs and say a birational map is a term of the quotient, this would work without assumptions on X and Y if I understand correctly. Did you consider this?

@chrisflav chrisflav added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. t-algebraic-geometry Algebraic geometry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants