sketch & explore: recover from duplicate fixed variables in Isar proofs default tip
authorSimon Wimmer <wimmers@in.tum.de>
Thu, 18 Apr 2024 17:53:14 +0200
changeset 80137 0c51e0a6bc37
parent 80136 12ce957231e0
sketch & explore: recover from duplicate fixed variables in Isar proofs
src/HOL/ex/Sketch_and_Explore.thy
--- a/src/HOL/ex/Sketch_and_Explore.thy	Thu Apr 18 13:06:48 2024 +0200
+++ b/src/HOL/ex/Sketch_and_Explore.thy	Thu Apr 18 17:53:14 2024 +0200
@@ -34,6 +34,8 @@
   let
     val fixes = map (fn (s, T) => (Binding.name s, SOME T, NoSyn)) params
     val ctxt' = ctxt |> Variable.set_body false |> Proof_Context.add_fixes fixes |> snd
+      handle ERROR _ =>
+      ctxt |> Variable.set_body true |> Proof_Context.add_fixes fixes |> snd
   in ((params, assms, concl), ctxt') end;
 
 fun print_isar_skeleton ctxt indent keyword stmt =