Skip to content

Commit af55855

Browse files
[auto-sync] Merge upstream mathlib4 into master (PR #69)
Auto-merged by sync_finalize after CI success.
2 parents 12bfc65 + d692139 commit af55855

55 files changed

Lines changed: 1509 additions & 278 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Mathlib.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,7 @@ public import Mathlib.AlgebraicGeometry.AlgClosed.Basic
13501350
public import Mathlib.AlgebraicGeometry.AlgebraicCycle.Basic
13511351
public import Mathlib.AlgebraicGeometry.Artinian
13521352
public import Mathlib.AlgebraicGeometry.Birational.Birational
1353+
public import Mathlib.AlgebraicGeometry.Birational.Composition
13531354
public import Mathlib.AlgebraicGeometry.Birational.Dominant
13541355
public import Mathlib.AlgebraicGeometry.Birational.RationalMap
13551356
public import Mathlib.AlgebraicGeometry.ColimitsOver
@@ -1581,6 +1582,7 @@ public import Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.UnionPro
15811582
public import Mathlib.AlgebraicTopology.SimplicialSet.Basic
15821583
public import Mathlib.AlgebraicTopology.SimplicialSet.Boundary
15831584
public import Mathlib.AlgebraicTopology.SimplicialSet.CategoryWithFibrations
1585+
public import Mathlib.AlgebraicTopology.SimplicialSet.CoherentIso
15841586
public import Mathlib.AlgebraicTopology.SimplicialSet.CompStruct
15851587
public import Mathlib.AlgebraicTopology.SimplicialSet.CompStructTruncated
15861588
public import Mathlib.AlgebraicTopology.SimplicialSet.Coskeletal
@@ -1604,6 +1606,7 @@ public import Mathlib.AlgebraicTopology.SimplicialSet.Monoidal
16041606
public import Mathlib.AlgebraicTopology.SimplicialSet.Monomorphisms
16051607
public import Mathlib.AlgebraicTopology.SimplicialSet.Nerve
16061608
public import Mathlib.AlgebraicTopology.SimplicialSet.NerveAdjunction
1609+
public import Mathlib.AlgebraicTopology.SimplicialSet.NerveCodiscrete
16071610
public import Mathlib.AlgebraicTopology.SimplicialSet.NerveNondegenerate
16081611
public import Mathlib.AlgebraicTopology.SimplicialSet.NonDegenerateSimplices
16091612
public import Mathlib.AlgebraicTopology.SimplicialSet.NonDegenerateSimplicesColimit
@@ -2990,6 +2993,7 @@ public import Mathlib.CategoryTheory.Limits.Types.Images
29902993
public import Mathlib.CategoryTheory.Limits.Types.Limits
29912994
public import Mathlib.CategoryTheory.Limits.Types.Multicoequalizer
29922995
public import Mathlib.CategoryTheory.Limits.Types.Multiequalizer
2996+
public import Mathlib.CategoryTheory.Limits.Types.PreservesLimit
29932997
public import Mathlib.CategoryTheory.Limits.Types.Products
29942998
public import Mathlib.CategoryTheory.Limits.Types.Pullbacks
29952999
public import Mathlib.CategoryTheory.Limits.Types.Pushouts
@@ -7147,6 +7151,7 @@ public import Mathlib.SetTheory.Cardinal.Continuum
71477151
public import Mathlib.SetTheory.Cardinal.CountableCover
71487152
public import Mathlib.SetTheory.Cardinal.Defs
71497153
public import Mathlib.SetTheory.Cardinal.Divisibility
7154+
public import Mathlib.SetTheory.Cardinal.ENNReal
71507155
public import Mathlib.SetTheory.Cardinal.ENat
71517156
public import Mathlib.SetTheory.Cardinal.Embedding
71527157
public import Mathlib.SetTheory.Cardinal.EventuallyConst

Mathlib/Algebra/Algebra/Tower.lean

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,25 +247,48 @@ theorem restrictScalars_apply (f : A ≃ₐ[S] B) (x : A) : f.restrictScalars R
247247
(f.restrictScalars R).toLinearEquiv = f.toLinearEquiv.restrictScalars R := rfl
248248

249249
@[simp]
250-
theorem coe_restrictScalars (f : A ≃ₐ[S] B) : (f.restrictScalars R : A ≃+* B) = f := rfl
250+
theorem toRingEquiv_restrictScalars (f : A ≃ₐ[S] B) : (f.restrictScalars R : A ≃+* B) = f := rfl
251251

252252
@[simp]
253-
theorem coe_restrictScalars' (f : A ≃ₐ[S] B) : (restrictScalars R f : A → B) = f := rfl
253+
theorem coe_restrictScalars (f : A ≃ₐ[S] B) : (restrictScalars R f : A → B) = f := rfl
254+
255+
@[deprecated (since := "2026-07-06")] alias coe_restrictScalars' := coe_restrictScalars
254256

255257
theorem restrictScalars_injective :
256258
Function.Injective (restrictScalars R : (A ≃ₐ[S] B) → A ≃ₐ[R] B) := fun _ _ h =>
257259
AlgEquiv.ext (AlgEquiv.congr_fun h :)
258260

261+
@[simp]
262+
lemma symm_restrictScalars (f : A ≃ₐ[S] B) :
263+
(f.restrictScalars R).symm = f.symm.restrictScalars R :=
264+
rfl
265+
266+
@[deprecated "Use `symm_restrictScalars` instead." (since := "2026-07-06")]
259267
lemma restrictScalars_symm_apply (f : A ≃ₐ[S] B) (x : B) :
260-
(f.restrictScalars R).symm x = f.symm x := rfl
268+
(f.restrictScalars R).symm x = f.symm x := by
269+
simp
261270

262-
@[simp]
271+
@[deprecated "Use `symm_restrictScalars` instead." (since := "2026-07-06")]
263272
lemma coe_restrictScalars_symm (f : A ≃ₐ[S] B) :
264-
((f.restrictScalars R).symm : B ≃+* A) = f.symm := rfl
273+
((f.restrictScalars R).symm : B ≃+* A) = f.symm := by
274+
simp
265275

266-
@[simp]
276+
@[deprecated "Use `symm_restrictScalars` instead." (since := "2026-07-06")]
267277
lemma coe_restrictScalars_symm' (f : A ≃ₐ[S] B) :
268-
((restrictScalars R f).symm : B → A) = f.symm := rfl
278+
((restrictScalars R f).symm : B → A) = f.symm := by
279+
simp
280+
281+
/-- `AlgEquiv.restrictScalars` as a homomorphism. -/
282+
def restrictScalarsHom : (A ≃ₐ[S] A) →* (A ≃ₐ[R] A) :=
283+
MulSemiringAction.toAlgAut (A ≃ₐ[S] A) R A
284+
285+
@[simp]
286+
theorem restrictScalarsHom_apply (f : A ≃ₐ[S] A) : f.restrictScalarsHom R = f.restrictScalars R :=
287+
rfl
288+
289+
theorem restrictScalarsHom_injective :
290+
Function.Injective (restrictScalarsHom R : (A ≃ₐ[S] A) →* (A ≃ₐ[R] A)) :=
291+
restrictScalars_injective R
269292

270293
section
271294

@@ -300,6 +323,11 @@ def extendScalarsHomOfSurjective (h : Function.Surjective ⇑(algebraMap R S)) :
300323
__ := extendScalarsOfSurjective h
301324
map_mul' _ _ := rfl
302325

326+
@[simp]
327+
lemma toMonoidHom_symm_extendScalarsHomOfSurjective (h : Function.Surjective (algebraMap R S)) :
328+
(extendScalarsHomOfSurjective h (A := A).symm : (A ≃ₐ[S] A) →* _) = restrictScalarsHom R :=
329+
rfl
330+
303331
end
304332

305333
end AlgEquiv

Mathlib/Algebra/Group/Subgroup/Basic.lean

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,31 @@ instance botCharacteristic : Characteristic (⊥ : Subgroup G) :=
316316
instance topCharacteristic : Characteristic (⊤ : Subgroup G) :=
317317
characteristic_iff_map_le.mpr fun _ϕ => le_top
318318

319+
/-- If `H` is a characteristic subgroup of `G`, then every automorphism of `G` induces an
320+
automorphism of `H`. -/
321+
@[to_additive (attr := simps!)
322+
/-- If `H` is a characteristic additive subgroup of `G`, then every automorphism of `G` induces an
323+
automorphism of `H`. -/]
324+
def _root_.MulAut.characteristic (H : Subgroup G) [H.Characteristic] : MulAut G →* MulAut H where
325+
toFun φ :=
326+
{ toFun := fun h => ⟨φ h, characteristic_iff_le_comap.mp inferInstance φ h.2
327+
invFun := fun h => ⟨φ.symm h, characteristic_iff_le_comap.mp inferInstance φ.symm h.2
328+
left_inv h := Subtype.ext (φ.symm_apply_apply h)
329+
right_inv h := Subtype.ext (φ.apply_symm_apply h)
330+
map_mul' h k := Subtype.ext (map_mul φ (h : G) (k : G)) }
331+
map_one' := rfl
332+
map_mul' _ _ := rfl
333+
334+
/-- If `H` is a characteristic subgroup of `G` and `K` is a characteristic subgroup of `H`, then
335+
`K` is a characteristic subgroup of `G`. -/
336+
@[to_additive
337+
/-- If `H` is a characteristic additive subgroup of `G` and `K` is a characteristic additive
338+
subgroup of `H`, then `K` is a characteristic additive subgroup of `G`. -/]
339+
instance characteristic_of_characteristic_of_characteristic [H.Characteristic]
340+
{K : Subgroup H} [hK : K.Characteristic] : (K.map H.subtype).Characteristic := by
341+
refine characteristic_iff_map_eq.2 fun φ ↦ ?_
342+
have := congr_arg (map H.subtype) <| characteristic_iff_map_eq.1 hK (MulAut.characteristic H φ)
343+
simpa [Subgroup.map_map, MulAut.characteristic]
319344

320345
variable (H)
321346

Mathlib/Algebra/Polynomial/Div.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ theorem rootMultiplicity_eq_natFind_of_ne_zero {p : R[X]} (p0 : p ≠ 0) {a : R}
525525
@[deprecated (since := "2026-02-12")]
526526
alias rootMultiplicity_eq_nat_find_of_nonzero := rootMultiplicity_eq_natFind_of_ne_zero
527527

528-
set_option backward.isDefEq.respectTransparency false in
529528
theorem rootMultiplicity_eq_multiplicity [DecidableEq R]
530529
(p : R[X]) (a : R) :
531530
rootMultiplicity a p =
@@ -535,7 +534,7 @@ theorem rootMultiplicity_eq_multiplicity [DecidableEq R]
535534
· rfl
536535
rename_i h
537536
simp only [finiteMultiplicity_X_sub_C a h, ↓reduceDIte]
538-
rw [← ENat.some_eq_coe, WithTop.untopD_coe]
537+
rw [untopD_coe_enat]
539538
congr
540539

541540
@[simp]
Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
/-
2+
Copyright (c) 2026 Justus Springer. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Justus Springer
5+
-/
6+
module
7+
8+
public import Mathlib.AlgebraicGeometry.Birational.Dominant
9+
10+
/-!
11+
# Composition of rational maps
12+
13+
This file defines composition for partial maps and rational maps between schemes.
14+
15+
## Main definitions
16+
17+
- `Scheme.PartialMap.comp`: given a dominant partial map `f : X.PartialMap Y` and any partial map
18+
`g : Y.PartialMap Z`, their composition `f.comp g : X.PartialMap Z` is defined on the preimage
19+
of `g`'s domain under `f`.
20+
- `Scheme.RationalMap.comp`: composition of rational maps, defined via a dominant representative.
21+
22+
## Main statements
23+
24+
- `Scheme.PartialMap.comp_equiv_of_equiv`: Composition respects equivalence of partial maps.
25+
- `Scheme.PartialMap.comp_assoc`: Composition of partial maps is associative.
26+
- `Scheme.RationalMap.comp_assoc`: Composition of rational maps is associative.
27+
28+
-/
29+
30+
@[expose] public section
31+
32+
universe u
33+
34+
open CategoryTheory
35+
36+
namespace AlgebraicGeometry.Scheme
37+
38+
variable {X Y Z : Scheme.{u}}
39+
40+
section PreirreducibleSpace
41+
42+
variable [PreirreducibleSpace X] [Nonempty Y]
43+
44+
namespace PartialMap
45+
46+
/-- Composition of partial maps. The domain of `f.comp g` is the preimage of `g.domain` under `f`,
47+
viewed as an open subscheme of `X`. Requires `f.hom` to be dominant so that the domain is dense. -/
48+
@[simps]
49+
noncomputable def comp (f : X.PartialMap Y) [IsDominant f.hom] (g : Y.PartialMap Z) :
50+
X.PartialMap Z where
51+
domain := f.domain.ι ''ᵁ f.hom ⁻¹ᵁ g.domain
52+
dense_domain := (f.domain.ι ''ᵁ f.hom ⁻¹ᵁ g.domain).2.dense <| by
53+
simpa [← Set.nonempty_preimage_iff] using
54+
f.hom.denseRange.inter_open_nonempty _ g.domain.2 g.dense_domain.nonempty
55+
hom := (f.domain.ι.isoImage _).inv ≫ f.hom ∣_ g.domain ≫ g.hom
56+
57+
set_option backward.defeqAttrib.useBackward true in
58+
lemma comp_restrict_left (f : X.PartialMap Y) [IsDominant f.hom] (U : X.Opens)
59+
(hU : Dense (U : Set X)) (hU' : U ≤ f.domain) (g : Y.PartialMap Z) :
60+
(f.restrict U hU hU').comp g = (f.comp g).restrict (f.domain.ι ''ᵁ f.hom ⁻¹ᵁ g.domain ⊓ U)
61+
((f.comp g).dense_domain.inter_of_isOpen_right hU U.2) inf_le_left := by
62+
ext
63+
· simp [ι_image_homOfLE_eq_ι_image_inf]
64+
· simp [morphismRestrict_comp, isoImage_ι_inv_morphismRestrict_homOfLE_assoc, isoOfEq_hom]
65+
66+
set_option backward.defeqAttrib.useBackward true in
67+
lemma comp_restrict_right (f : X.PartialMap Y) [IsDominant f.hom] (g : Y.PartialMap Z)
68+
(V : Y.Opens) (hV : Dense (V : Set Y)) (hV' : V ≤ g.domain) :
69+
f.comp (g.restrict V hV hV') = (f.comp g).restrict
70+
(f.domain.ι ''ᵁ (f.hom ⁻¹ᵁ V)) ((f.domain.ι ''ᵁ f.hom ⁻¹ᵁ V).2.dense <| by
71+
simpa [← Set.nonempty_preimage_iff] using
72+
f.hom.denseRange.inter_open_nonempty _ V.2 hV.nonempty)
73+
(f.domain.ι.image_mono (f.hom.preimage_mono hV')) := by
74+
ext
75+
· simp
76+
· simp [← f.domain.ι.isoImage_inv_homOfLE_assoc _ _ (f.hom.preimage_mono hV'),
77+
← morphismRestrict_homOfLE_assoc f.hom _ _ hV']
78+
79+
set_option backward.defeqAttrib.useBackward true in
80+
/-- Composition respects equivalence of partial maps on the left. -/
81+
lemma comp_equiv_of_equiv_left {f₁ f₂ : X.PartialMap Y} [IsDominant f₁.hom] [IsDominant f₂.hom]
82+
(h : f₁.equiv f₂) (g : Y.PartialMap Z) :
83+
(f₁.comp g).equiv (f₂.comp g) := by
84+
obtain ⟨W, hW, hW₁, hW₂, e⟩ := h
85+
replace e : f₁.restrict W hW hW₁ = f₂.restrict W hW hW₂ :=
86+
PartialMap.ext _ _ rfl (by simpa using e)
87+
replace e := congr($(e).comp g)
88+
rw [comp_restrict_left, comp_restrict_left] at e
89+
exact equiv_of_restrict_eq _ _ e
90+
91+
set_option backward.defeqAttrib.useBackward true in
92+
/-- Composition respects equivalence of partial maps on the right. -/
93+
lemma comp_equiv_of_equiv_right (f : X.PartialMap Y) [IsDominant f.hom] {g₁ g₂ : Y.PartialMap Z}
94+
(h : g₁.equiv g₂) : (f.comp g₁).equiv (f.comp g₂) := by
95+
obtain ⟨W, hW, hW₁, hW₂, e⟩ := h
96+
replace e : g₁.restrict W hW hW₁ = g₂.restrict W hW hW₂ :=
97+
PartialMap.ext _ _ rfl (by simpa using e)
98+
replace e := congr(f.comp $e)
99+
rw [comp_restrict_right, comp_restrict_right] at e
100+
exact equiv_of_restrict_eq _ _ e
101+
102+
/-- Composition respects equivalence of partial maps in both arguments. -/
103+
lemma comp_equiv_of_equiv (f₁ f₂ : X.PartialMap Y) [IsDominant f₁.hom] [IsDominant f₂.hom]
104+
(hf : f₁.equiv f₂) (g₁ g₂ : Y.PartialMap Z) (hg : g₁.equiv g₂) :
105+
(f₁.comp g₁).equiv (f₂.comp g₂) :=
106+
equivalence_rel.trans (comp_equiv_of_equiv_left hf _) (comp_equiv_of_equiv_right _ hg)
107+
108+
set_option backward.defeqAttrib.useBackward true in
109+
instance isDominant_comp_hom (f : X.PartialMap Y) [IsDominant f.hom] (g : Y.PartialMap Z)
110+
[IsDominant g.hom] : IsDominant (f.comp g).hom := by
111+
dsimp only [comp_domain, comp_hom]
112+
have := IsZariskiLocalAtTarget.restrict ‹IsDominant f.hom› g.domain
113+
infer_instance
114+
115+
set_option backward.defeqAttrib.useBackward true in
116+
@[simp]
117+
lemma comp_assoc {X₁ X₂ X₃ Y : Scheme.{u}} [PreirreducibleSpace X₁] [IrreducibleSpace X₂]
118+
[Nonempty X₃] (f : X₁.PartialMap X₂) [IsDominant f.hom] (g : X₂.PartialMap X₃)
119+
[IsDominant g.hom] (h : X₃.PartialMap Y) :
120+
(f.comp g).comp h = f.comp (g.comp h) := by
121+
ext
122+
· simp_rw [comp_domain, comp_hom, ← Category.assoc, Hom.comp_preimage, Hom.inv_preimage,
123+
← Hom.comp_image, Hom.isoImage_hom_ι, Hom.comp_image, image_morphismRestrict_preimage]
124+
· dsimp
125+
simp_rw [morphismRestrict_comp, morphismRestrict_ι_image_ι_isoImage_inv_assoc,
126+
Hom.comp_preimage, Category.assoc]
127+
conv_lhs => rw [← Category.assoc]
128+
conv_rhs => rw [← Category.assoc, ← Category.assoc, ← Category.assoc]
129+
congr 1
130+
simp [← cancel_mono (Opens.ι _)]
131+
132+
set_option backward.defeqAttrib.useBackward true in
133+
@[simp]
134+
lemma comp_toPartialMap (f : X.PartialMap Y) [IsDominant f.hom] (g : Y ⟶ Z) :
135+
f.comp g.toPartialMap = f.compHom g := by
136+
ext1
137+
· simp
138+
· simp_rw [comp_hom, Hom.toPartialMap_domain, Hom.toPartialMap_hom, compHom_hom, topIso_hom,
139+
morphismRestrict_ι_assoc, f.domain.isoImage_ι_inv_ι_assoc, isoOfEq_hom]
140+
rfl
141+
142+
set_option backward.defeqAttrib.useBackward true in
143+
lemma comp_id (f : X.PartialMap Y) [IsDominant f.hom] : f.comp (PartialMap.id Y) = f := by simp
144+
145+
end PartialMap
146+
147+
namespace RationalMap
148+
149+
-- If better def-eqs are required, consider refactoring this by using `Quotient.liftOn₂`
150+
-- and a bundled structure `DominantPartialMap`.
151+
/-- Composition of rational maps. Requires `f` to be dominant, so that we may choose
152+
a dominant representative. -/
153+
noncomputable def comp (f : X ⤏ Y) [f.IsDominant] (g : Y ⤏ Z) : X ⤏ Z :=
154+
Quotient.liftOn g (PartialMap.toRationalMap ∘ f.representative.comp) <| fun _ _ h ↦ by
155+
rw [Function.comp_apply, Function.comp_apply, PartialMap.toRationalMap_eq_iff]
156+
exact PartialMap.comp_equiv_of_equiv_right _ h
157+
158+
lemma comp_def (f : X ⤏ Y) [f.IsDominant] (g : Y.PartialMap Z) :
159+
f.comp g.toRationalMap = (f.representative.comp g).toRationalMap :=
160+
rfl
161+
162+
lemma toRationalMap_comp (f : X.PartialMap Y) [IsDominant f.hom] (g : Y.PartialMap Z) :
163+
f.toRationalMap.comp g.toRationalMap = (f.comp g).toRationalMap := by
164+
rw [RationalMap.comp_def, PartialMap.toRationalMap_eq_iff]
165+
exact PartialMap.comp_equiv_of_equiv_left f.representative_toRationalMap_equiv _
166+
167+
@[simp]
168+
lemma comp_id (f : X ⤏ Y) [f.IsDominant] : f.comp (RationalMap.id Y) = f := by
169+
simp [RationalMap.comp_def]
170+
171+
instance (f : X ⤏ Y) [f.IsDominant] (g : Y ⤏ Z) [g.IsDominant] : (f.comp g).IsDominant := by
172+
rw [← g.toRationalMap_representative, RationalMap.comp_def]
173+
infer_instance
174+
175+
lemma comp_toRationalMap (f : X ⤏ Y) [f.IsDominant] (h : Y ⟶ Z) :
176+
f.comp h.toRationalMap = f.compHom h := by
177+
simp [comp_def, PartialMap.comp_toPartialMap]
178+
179+
@[grind _=_]
180+
lemma comp_assoc {X₁ X₂ X₃ Y : Scheme.{u}} [PreirreducibleSpace X₁] [IrreducibleSpace X₂]
181+
[Nonempty X₃] (f₁ : X₁ ⤏ X₂) [f₁.IsDominant] (f₂ : X₂ ⤏ X₃) [f₂.IsDominant] (f₃ : X₃ ⤏ Y) :
182+
(f₁.comp f₂).comp f₃ = f₁.comp (f₂.comp f₃) := by
183+
rw [← f₃.toRationalMap_representative]
184+
simp_rw [comp_def, ← PartialMap.comp_assoc, PartialMap.toRationalMap_eq_iff]
185+
apply PartialMap.comp_equiv_of_equiv_left
186+
rw [← f₂.toRationalMap_representative, comp_def]
187+
apply (f₁.representative.comp f₂.representative).representative_toRationalMap_equiv.trans
188+
apply PartialMap.comp_equiv_of_equiv_right
189+
rw [toRationalMap_representative]
190+
191+
instance isOver_comp {S : Scheme.{u}} [IrreducibleSpace Y] [Nonempty Z] [X.Over S] [Y.Over S]
192+
[Z.Over S] (f : X ⤏ Y) [f.IsDominant] [f.IsOver S] (g : Y ⤏ Z) [g.IsDominant] [g.IsOver S] :
193+
(f.comp g).IsOver S := by
194+
rw [isOver_iff, ← comp_toRationalMap, comp_assoc, comp_toRationalMap,
195+
isOver_iff.mp ‹g.IsOver S›, comp_toRationalMap, RationalMap.isOver_iff.mp ‹f.IsOver S›]
196+
197+
end RationalMap
198+
199+
end PreirreducibleSpace
200+
201+
set_option backward.defeqAttrib.useBackward true in
202+
@[simp]
203+
lemma PartialMap.id_comp {X Y : Scheme.{u}} [IrreducibleSpace X] (f : X.PartialMap Y) :
204+
(PartialMap.id X).comp f = f := by
205+
ext1
206+
· simp_rw [comp_domain, Hom.toPartialMap_domain, Hom.toPartialMap_hom, Category.comp_id,
207+
← X.topIso_hom, ← Hom.inv_image, ← Hom.comp_image, Iso.inv_hom_id, Hom.id_image]
208+
· simp_rw [comp_hom, Hom.toPartialMap_hom, Hom.toPartialMap_domain, morphismRestrict_comp,
209+
morphismRestrict_id, ← X.topIso_hom, Hom.comp_preimage, Hom.id_preimage,
210+
Category.comp_id, ← X.topIso.hom.isoImage_preimage_hom_homOfLE, Category.assoc,
211+
Iso.inv_hom_id_assoc]
212+
rfl
213+
214+
@[simp, grind =]
215+
lemma RationalMap.id_comp {X Y : Scheme.{u}} [IrreducibleSpace X] (f : X ⤏ Y) :
216+
(RationalMap.id X).comp f = f := by
217+
rw [← f.toRationalMap_representative, toRationalMap_comp, PartialMap.id_comp]
218+
219+
end AlgebraicGeometry.Scheme

Mathlib/AlgebraicGeometry/Birational/Dominant.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace PartialMap
3636

3737
set_option backward.defeqAttrib.useBackward true in
3838
/-- Restricting a dominant partial map to a dense open yields a dominant partial map. -/
39-
lemma isDominant_restrict_hom (f : X.PartialMap Y) [IsDominant f.hom] (U : X.Opens)
39+
instance isDominant_restrict_hom (f : X.PartialMap Y) [IsDominant f.hom] (U : X.Opens)
4040
(hU : Dense (U : Set X)) (hU' : U ≤ f.domain) : IsDominant (f.restrict U hU hU').hom := by
4141
dsimp only [restrict_domain, restrict_hom]
4242
have : IsDominant (X.homOfLE hU') := Opens.isDominant_homOfLE hU hU'

0 commit comments

Comments
 (0)