theory Bug2 imports Main begin datatype 'a M_nres = is_fail: FAIL | SPEC "'a \ bool" definition "is_res m x \ case m of FAIL \ True | SPEC P \ P x" datatype ('a,'s) M_state = M_STATE (run: "'s \ ('a\'s) M_nres") lemma "\\x y. (\xa s. is_fail (run (x xa) s) \ is_fail (run (y xa) s) = is_fail (run (x xa) s) \ (\a b. is_res (run (y xa) s) (a, b) = is_res (run (x xa) s) (a, b))) \ (\s. is_fail (run (B x) s) \ is_fail (run (B y) s) = is_fail (run (B x) s) \ (\a b. is_res (run (B y) s) (a, b) = is_res (run (B x) s) (a, b))); \y. \x ya. (\xa s. is_fail (run (x xa) s) \ is_fail (run (ya xa) s) = is_fail (run (x xa) s) \ (\a b. is_res (run (ya xa) s) (a, b) = is_res (run (x xa) s) (a, b))) \ (\s. is_fail (run (C y x) s) \ is_fail (run (C y ya) s) = is_fail (run (C y x) s) \ (\a b. is_res (run (C y ya) s) (a, b) = is_res (run (C y x) s) (a, b)))\ \ \x y. (\xa s. is_fail (run (x xa) s) \ is_fail (run (y xa) s) = is_fail (run (x xa) s) \ (\a b. is_res (run (y xa) s) (a, b) = is_res (run (x xa) s) (a, b))) \ (\s. is_fail (run (B x) s) \ (\a b. is_res (run (B x) s) (a, b) \ is_fail (run (C a x) b)) \ (is_fail (run (B y) s) \ (\a b. is_res (run (B y) s) (a, b) \ is_fail (run (C a y) b))) = (is_fail (run (B x) s) \ (\a b. is_res (run (B x) s) (a, b) \ is_fail (run (C a x) b))) \ (\a b. (is_fail (run (B y) s) \ (\aa ba. is_res (run (B y) s) (aa, ba) \ is_res (run (C aa y) ba) (a, b))) = (is_fail (run (B x) s) \ (\aa ba. is_res (run (B x) s) (aa, ba) \ is_res (run (C aa x) ba) (a, b)))))" apply (smt (z3)) (** exception Fail raised (line 222 of "~~/src/HOL/Tools/SMT/z3_proof.ML"): Replaying the proof trace produced by Z3 failed: the bound "?2" is undeclared; this indicates a bug in Z3 *) oops end