# HG changeset patch # User wenzelm # Date 1701725997 -3600 # Node ID 419519d5230db01dfbe22459d8aa3d4b4da41eb1 # Parent f9390f5399ae3a4d93df17962d8b61ab6ccce9e4 tuned; diff -r f9390f5399ae -r 419519d5230d src/Pure/proofterm.ML --- a/src/Pure/proofterm.ML Mon Dec 04 20:03:03 2023 +0100 +++ b/src/Pure/proofterm.ML Mon Dec 04 22:39:57 2023 +0100 @@ -1326,27 +1326,23 @@ fun combination_proof f g t u prf1 prf2 = let - val f = Envir.beta_norm f; - val g = Envir.beta_norm g; - val prf = - if check_comb prf1 then - combination_axm % NONE % NONE - else - (case prf1 of - PAxm ("Pure.reflexive", _, _) % _ => - combination_axm %> remove_types f % NONE - | _ => combination_axm %> remove_types f %> remove_types g) - in - prf % - (case head_of f of + val f' = Envir.beta_norm f; + val g' = Envir.beta_norm g; + val ax = + if check_comb prf1 then combination_axm % NONE % NONE + else if is_reflexive_proof prf1 then combination_axm %> remove_types f' % NONE + else combination_axm %> remove_types f' %> remove_types g' + val t' = + (case head_of f' of Abs _ => SOME (remove_types t) | Var _ => SOME (remove_types t) - | _ => NONE) % - (case head_of g of + | _ => NONE); + val u' = + (case head_of g' of Abs _ => SOME (remove_types u) | Var _ => SOME (remove_types u) - | _ => NONE) %% prf1 %% prf2 - end; + | _ => NONE); + in ax % t' % u' %% prf1 %% prf2 end;