-- Lean 4 proof step from Mathlib.AlgebraicTopology.SimplicialSet.AnodyneExtensions.RelativeCellComplex (goal)
Goal:
X : SSet
A : X.Subcomplex
P : A.Pairing
ι : Type v
inst : LinearOrder ι
f : P.RankFunction ι
inst_1 : P.IsProper
j : ι
d : ℕ
x : f.Cell j
g : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌
hs_1 :
  Membership.mem (α := f.sigmaStdSimplex j _⦋d⦌) (γ := Set (f.sigmaStdSimplex j _⦋d⦌))
    ((f.sigmaStdSimplex j).nonDegenerate d)
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋d⦌)) :
          (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋d⦌)) → (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌))
        ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋d⦌) g :
          Δ[x.dim + 1] _⦋d⦌) :
      (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌))
hs : Mono g
hs'_1 :
  ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋d⦌)) :
          (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋d⦌)) → (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌))
        ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋d⦌) g :
          Δ[x.dim + 1] _⦋d⦌) :
      (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌)) ∉
    (range (X := f.sigmaHorn j) (f.m j)).obj (op ⦋d⦌)
hs' :
  ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋d⦌) g : Δ[x.dim + 1] _⦋d⦌) ∉
    Λ[x.dim + 1, x.index].obj (op ⦋d⦌)
hd : d ≤ x.dim
inl :
  ∀ (hd : d < x.dim),
    ∃ (c : f.Cell j),
      N.mk
            ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋d⦌)) :
                (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋d⦌)) → (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌))
              ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋d⦌) g :
                Δ[x.dim + 1] _⦋d⦌))
            hs_1 hs'_1 =
          Cell.type₁ f c ∨
        N.mk
            ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋d⦌)) :
                (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋d⦌)) → (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌))
              ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋d⦌) g :
                Δ[x.dim + 1] _⦋d⦌))
            hs_1 hs'_1 =
          Cell.type₂ f c
⊢ ∃ (c : f.Cell j),
    N.mk
          ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋d⦌)) :
              (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋d⦌)) → (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌))
            ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋d⦌) g :
              Δ[x.dim + 1] _⦋d⦌))
          hs_1 hs'_1 =
        Cell.type₁ f c ∨
      N.mk
          ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋d⦌)) :
              (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋d⦌)) → (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋d⦌))
            ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋d⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋d⦌) g :
              Δ[x.dim + 1] _⦋d⦌))
          hs_1 hs'_1 =
        Cell.type₂ f c
have inl₁ : ∀ (g : unop (op ⦋x.dim⦌) ⟶ ⦋x.dim + 1⦌)
  (hs :
    Membership.mem (α := f.sigmaStdSimplex j _⦋x.dim⦌) (γ := Set (f.sigmaStdSimplex j _⦋x.dim⦌))
      ((f.sigmaStdSimplex j).nonDegenerate x.dim)
      ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋x.dim⦌)) :
            (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋x.dim⦌)) →
              (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋x.dim⦌))
          ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋x.dim⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋x.dim⦌) g :
            Δ[x.dim + 1] _⦋x.dim⦌) :
        (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋x.dim⦌)))
  (hs_2 : Mono g)
  (hs' :
    ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋x.dim⦌)) :
            (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋x.dim⦌)) →
              (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋x.dim⦌))
          ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋x.dim⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋x.dim⦌) g :
            Δ[x.dim + 1] _⦋x.dim⦌) :
        (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋x.dim⦌)) ∉
      (range (X := f.sigmaHorn j) (f.m j)).obj (op ⦋x.dim⦌))
  (hs'_2 :
    ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋x.dim⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋x.dim⦌) g :
        Δ[x.dim + 1] _⦋x.dim⦌) ∉
      Λ[x.dim + 1, x.index].obj (op ⦋x.dim⦌))
  (hd : x.dim ≤ x.dim),
  ∃ (c : f.Cell j),
    N.mk
          ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋x.dim⦌)) :
              (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋x.dim⦌)) →
                (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋x.dim⦌))
            ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋x.dim⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋x.dim⦌) g :
              Δ[x.dim + 1] _⦋x.dim⦌))
          hs hs' =
        Cell.type₁ f c ∨
      N.mk
          ((ConcreteCategory.hom (FC := TypeCat.Fun) (x.ιSigmaStdSimplex.app (op ⦋x.dim⦌)) :
              (a : (fun (X : Type u) ↦ X) (Δ[x.dim + 1] _⦋x.dim⦌)) →
                (fun (X : Type u) ↦ X) (f.sigmaStdSimplex j _⦋x.dim⦌))
            ((Equiv.symm stdSimplex.objEquiv : (a : unop (op ⦋x.dim⦌) ⟶ ⦋x.dim + 1⦌) → Δ[x.dim + 1] _⦋x.dim⦌) g :
              Δ[x.dim + 1] _⦋x.dim⦌))
          hs hs' =
        Cell.type₂ f c
Tactic: obtain hd | rfl := hd.lt_or_eq
Cleared hypotheses: d, g, hs_1, hs, hs'_1, hs', hd