-- Mathlib/AlgebraicGeometry/ValuativeCriterion.lean
@[stacks 01KE]
lemma specializingMap (H : ValuativeCriterion.Existence f) :
    SpecializingMap f.base

Proof state:
case intro.intro
X Y : Scheme
f : X ⟶ Y
H : Existence f
x' : ↑↑X.toPresheafedSpace
y : ↑↑Y.toPresheafedSpace
h : flip (fun x1 x2 => x1 ⤳ x2) y ((ConcreteCategory.hom f.base) x')
stalk_y_to_residue_x' : Y.presheaf.stalk y ⟶ X.residueField x' :=
  Y.presheaf.stalkSpecializes h ≫ Scheme.Hom.stalkMap f x' ≫ X.residue x'
A : ValuationSubring ↑(X.residueField x')
hA : ∀ (x : ↑(Y.presheaf.stalk y)), (CommRingCat.Hom.hom stalk_y_to_residue_x') x ∈ A.toSubring
hA_local : IsLocalHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A.toSubring hA)
stalk_y_to_A : Y.presheaf.stalk y ⟶ CommRingCat.of ↥A :=
  CommRingCat.ofHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A hA)
w :
  X.fromSpecResidueField x' ≫ f =
    Spec.map (CommRingCat.ofHom (algebraMap ↥A ↑(X.residueField x'))) ≫ Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y
⊢ ∃ a', flip (fun x1 x2 => x1 ⤳ x2) a' x' ∧ (ConcreteCategory.hom f.base) a' = y

Tactic:
obtain ⟨l, hl₁, hl₂⟩ := (H { R := A, K := X.residueField x', commSq := ⟨w⟩ }).exists_lift

Result:
case intro.intro.intro.mk
X Y : Scheme
f : X ⟶ Y
H : Existence f
x' : ↑↑X.toPresheafedSpace
y : ↑↑Y.toPresheafedSpace
h : flip (fun x1 x2 => x1 ⤳ x2) y ((ConcreteCategory.hom f.base) x')
stalk_y_to_residue_x' : Y.presheaf.stalk y ⟶ X.residueField x' :=
  Y.presheaf.stalkSpecializes h ≫ Scheme.Hom.stalkMap f x' ≫ X.residue x'
A : ValuationSubring ↑(X.residueField x')
hA : ∀ (x : ↑(Y.presheaf.stalk y)), (CommRingCat.Hom.hom stalk_y_to_residue_x') x ∈ A.toSubring
hA_local : IsLocalHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A.toSubring hA)
stalk_y_to_A : Y.presheaf.stalk y ⟶ CommRingCat.of ↥A :=
  CommRingCat.ofHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A hA)
w :
  X.fromSpecResidueField x' ≫ f =
    Spec.map (CommRingCat.ofHom (algebraMap ↥A ↑(X.residueField x'))) ≫ Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y
l :
  Spec
      (CommRingCat.of
        (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
            (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).R) ⟶
    X
hl₁ :
  Spec.map
        (CommRingCat.ofHom
          (algebraMap
            (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
                (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).R
            (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
                (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).K)) ≫
      l =
    (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
        (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).i₁
hl₂ :
  l ≫ f =
    (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
        (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).i₂
⊢ ∃ a', flip (fun x1 x2 => x1 ⤳ x2) a' x' ∧ (ConcreteCategory.hom f.base) a' = y

Proof state:
case intro.intro.intro.mk
X Y : Scheme
f : X ⟶ Y
H : Existence f
x' : ↑↑X.toPresheafedSpace
y : ↑↑Y.toPresheafedSpace
h : flip (fun x1 x2 => x1 ⤳ x2) y ((ConcreteCategory.hom f.base) x')
stalk_y_to_residue_x' : Y.presheaf.stalk y ⟶ X.residueField x' :=
  Y.presheaf.stalkSpecializes h ≫ Scheme.Hom.stalkMap f x' ≫ X.residue x'
A : ValuationSubring ↑(X.residueField x')
hA : ∀ (x : ↑(Y.presheaf.stalk y)), (CommRingCat.Hom.hom stalk_y_to_residue_x') x ∈ A.toSubring
hA_local : IsLocalHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A.toSubring hA)
stalk_y_to_A : Y.presheaf.stalk y ⟶ CommRingCat.of ↥A :=
  CommRingCat.ofHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A hA)
w :
  X.fromSpecResidueField x' ≫ f =
    Spec.map (CommRingCat.ofHom (algebraMap ↥A ↑(X.residueField x'))) ≫ Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y
l :
  Spec
      (CommRingCat.of
        (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
            (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).R) ⟶
    X
hl₁ :
  Spec.map
        (CommRingCat.ofHom
          (algebraMap
            (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
                (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).R
            (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
                (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).K)) ≫
      l =
    (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
        (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).i₁
hl₂ :
  l ≫ f =
    (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
        (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).i₂
⊢ ∃ a', flip (fun x1 x2 => x1 ⤳ x2) a' x' ∧ (ConcreteCategory.hom f.base) a' = y

Tactic:
dsimp only at hl₁ hl₂

Result:
case intro.intro.intro.mk
X Y : Scheme
f : X ⟶ Y
H : Existence f
x' : ↑↑X.toPresheafedSpace
y : ↑↑Y.toPresheafedSpace
h : flip (fun x1 x2 => x1 ⤳ x2) y ((ConcreteCategory.hom f.base) x')
stalk_y_to_residue_x' : Y.presheaf.stalk y ⟶ X.residueField x' :=
  Y.presheaf.stalkSpecializes h ≫ Scheme.Hom.stalkMap f x' ≫ X.residue x'
A : ValuationSubring ↑(X.residueField x')
hA : ∀ (x : ↑(Y.presheaf.stalk y)), (CommRingCat.Hom.hom stalk_y_to_residue_x') x ∈ A.toSubring
hA_local : IsLocalHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A.toSubring hA)
stalk_y_to_A : Y.presheaf.stalk y ⟶ CommRingCat.of ↥A :=
  CommRingCat.ofHom ((CommRingCat.Hom.hom stalk_y_to_residue_x').codRestrict A hA)
w :
  X.fromSpecResidueField x' ≫ f =
    Spec.map (CommRingCat.ofHom (algebraMap ↥A ↑(X.residueField x'))) ≫ Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y
l :
  Spec
      (CommRingCat.of
        (ValuativeCommSq.mk (↥A) (↑(X.residueField x')) (X.fromSpecResidueField x')
            (Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y) ⋯).R) ⟶
    X
hl₁ : Spec.map (CommRingCat.ofHom (algebraMap ↥A ↑(X.residueField x'))) ≫ l = X.fromSpecResidueField x'
hl₂ : l ≫ f = Spec.map stalk_y_to_A ≫ Y.fromSpecStalk y
⊢ ∃ a', flip (fun x1 x2 => x1 ⤳ x2) a' x' ∧ (ConcreteCategory.hom f.base) a' = y