Theorem: AlgebraicGeometry.isIso_iff_stalk_iso
File: Mathlib/AlgebraicGeometry/OpenImmersion.lean

tactic: rw [isIso_iff_isOpenImmersion, IsOpenImmersion.iff_stalk_iso, and_comm, ← and_assoc]
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
⊢ IsIso f ↔ IsIso f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)
state_after: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
⊢ ((Epi f.val.base ∧ OpenEmbedding ⇑f.val.base) ∧
      ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)) ↔
    IsIso f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)

tactic: refine and_congr ⟨?_, ?_⟩ Iff.rfl
state_before: C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
⊢ ((Epi f.val.base ∧ OpenEmbedding ⇑f.val.base) ∧
      ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)) ↔
    IsIso f.val.base ∧ ∀ (x : ↑↑X.toPresheafedSpace), IsIso (PresheafedSpace.stalkMap f.val x)
state_after: case refine_1
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
⊢ Epi f.val.base ∧ OpenEmbedding ⇑f.val.base → IsIso f.val.base

case refine_2
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
⊢ IsIso f.val.base → Epi f.val.base ∧ OpenEmbedding ⇑f.val.base

tactic: rintro ⟨h₁, h₂⟩
state_before: case refine_1
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
⊢ Epi f.val.base ∧ OpenEmbedding ⇑f.val.base → IsIso f.val.base
state_after: case refine_1.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
h₁ : Epi f.val.base
h₂ : OpenEmbedding ⇑f.val.base
⊢ IsIso f.val.base

tactic: convert_to
  IsIso
    (TopCat.isoOfHomeo
        (Homeomorph.homeomorphOfContinuousOpen
          (Equiv.ofBijective _ ⟨h₂.inj, (TopCat.epi_iff_surjective _).mp h₁⟩) h₂.continuous
          h₂.isOpenMap)).hom
state_before: case refine_1.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
h₁ : Epi f.val.base
h₂ : OpenEmbedding ⇑f.val.base
⊢ IsIso f.val.base
state_after: case refine_1.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
h₁ : Epi f.val.base
h₂ : OpenEmbedding ⇑f.val.base
⊢ IsIso (TopCat.isoOfHomeo (Homeomorph.homeomorphOfContinuousOpen (Equiv.ofBijective ⇑f.val.base ⋯) ⋯ ⋯)).hom

tactic: infer_instance
state_before: case refine_1.intro
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
h₁ : Epi f.val.base
h₂ : OpenEmbedding ⇑f.val.base
⊢ IsIso (TopCat.isoOfHomeo (Homeomorph.homeomorphOfContinuousOpen (Equiv.ofBijective ⇑f.val.base ⋯) ⋯ ⋯)).hom
state_after: no goals

tactic: intro H
state_before: case refine_2
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
⊢ IsIso f.val.base → Epi f.val.base ∧ OpenEmbedding ⇑f.val.base
state_after: case refine_2
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H✝ : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
H : IsIso f.val.base
⊢ Epi f.val.base ∧ OpenEmbedding ⇑f.val.base

tactic: exact ⟨inferInstance, (TopCat.homeoOfIso (asIso f.1.base)).openEmbedding⟩
state_before: case refine_2
C : Type u
inst✝ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H✝ : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
H : IsIso f.val.base
⊢ Epi f.val.base ∧ OpenEmbedding ⇑f.val.base
state_after: no goals