{α : Type} →
  (motive : Lean.Elab.Term.TermElabResult α → Sort u_1) →
    (result : Lean.Elab.Term.TermElabResult α) →
      ((a : α) → (r : Lean.Elab.Term.SavedState) → motive (EStateM.Result.ok a r)) →
        ((ex : Lean.Exception) → (r : Lean.Elab.Term.SavedState) → motive (EStateM.Result.error ex r)) → motive result