Theorem: AlgebraicGeometry.isIntegral_of_isOpenImmersion
File: Mathlib/AlgebraicGeometry/Properties.lean

tactic: constructor
state_before: X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
⊢ IsIntegral X
state_after: case nonempty
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
⊢ autoParam (Nonempty ↑↑X.toPresheafedSpace) _auto✝

case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
⊢ autoParam (∀ (U : Opens ↑↑X.toPresheafedSpace) [inst : Nonempty ↥U], IsDomain ↑Γ(X, U)) _auto✝

tactic: intro U hU
state_before: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
⊢ autoParam (∀ (U : Opens ↑↑X.toPresheafedSpace) [inst : Nonempty ↥U], IsDomain ↑Γ(X, U)) _auto✝
state_after: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
⊢ IsDomain ↑Γ(X, U)

tactic: have : U = f ⁻¹ᵁ f ''ᵁ U := by ext1; exact (Set.preimage_image_eq _ H.base_open.inj).symm
state_before: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
⊢ IsDomain ↑Γ(X, U)
state_after: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this : U = f ⁻¹ᵁ f ''ᵁ U
⊢ IsDomain ↑Γ(X, U)

tactic: rw [this]
state_before: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this : U = f ⁻¹ᵁ f ''ᵁ U
⊢ IsDomain ↑Γ(X, U)
state_after: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this : U = f ⁻¹ᵁ f ''ᵁ U
⊢ IsDomain ↑Γ(X, f ⁻¹ᵁ f ''ᵁ U)

tactic: have : IsDomain Γ(Y, f ''ᵁ U) := by
  apply (config := { allowSynthFailures := true }) IsIntegral.component_integral
  exact ⟨⟨_, _, hU.some.prop, rfl⟩⟩
state_before: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this : U = f ⁻¹ᵁ f ''ᵁ U
⊢ IsDomain ↑Γ(X, f ⁻¹ᵁ f ''ᵁ U)
state_after: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this✝ : U = f ⁻¹ᵁ f ''ᵁ U
this : IsDomain ↑Γ(Y, f ''ᵁ U)
⊢ IsDomain ↑Γ(X, f ⁻¹ᵁ f ''ᵁ U)

tactic: exact (asIso <| f.app (f ''ᵁ U) :
  Γ(Y, f ''ᵁ U) ≅ _).symm.commRingCatIsoToRingEquiv.toMulEquiv.isDomain _
state_before: case component_integral
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this✝ : U = f ⁻¹ᵁ f ''ᵁ U
this : IsDomain ↑Γ(Y, f ''ᵁ U)
⊢ IsDomain ↑Γ(X, f ⁻¹ᵁ f ''ᵁ U)
state_after: no goals

tactic: infer_instance
state_before: case nonempty
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
⊢ autoParam (Nonempty ↑↑X.toPresheafedSpace) _auto✝
state_after: no goals

tactic: ext1
state_before: X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
⊢ U = f ⁻¹ᵁ f ''ᵁ U
state_after: case h
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
⊢ ↑U = ↑(f ⁻¹ᵁ f ''ᵁ U)

tactic: exact (Set.preimage_image_eq _ H.base_open.inj).symm
state_before: case h
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
⊢ ↑U = ↑(f ⁻¹ᵁ f ''ᵁ U)
state_after: no goals

tactic: apply (config := { allowSynthFailures := true }) IsIntegral.component_integral
state_before: X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this : U = f ⁻¹ᵁ f ''ᵁ U
⊢ IsDomain ↑Γ(Y, f ''ᵁ U)
state_after: case inst
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this : U = f ⁻¹ᵁ f ''ᵁ U
⊢ Nonempty ↥(f ''ᵁ U)

tactic: exact ⟨⟨_, _, hU.some.prop, rfl⟩⟩
state_before: case inst
X✝ : Scheme
X Y : Scheme
f : X ⟶ Y
H : IsOpenImmersion f
inst✝¹ : IsIntegral Y
inst✝ : Nonempty ↑↑X.toPresheafedSpace
U : Opens ↑↑X.toPresheafedSpace
hU : Nonempty ↥U
this : U = f ⁻¹ᵁ f ''ᵁ U
⊢ Nonempty ↥(f ''ᵁ U)
state_after: no goals