1 (* Title: Sequents/Washing.thy
19 "dollar |- (quarter >< quarter >< quarter >< quarter)"
22 "quarter , quarter , quarter , quarter , quarter |- loaded"
25 "dollar , quarter |- loaded"
28 "loaded , dirty |- wet"
31 "wet, quarter , quarter , quarter |- clean"
34 (* "activate" definitions for use in proof *)
36 ML {* bind_thms ("changeI", [@{thm context1}] RL ([@{thm change}] RLN (2,[@{thm cut}]))) *}
37 ML {* bind_thms ("load1I", [@{thm context1}] RL ([@{thm load1}] RLN (2,[@{thm cut}]))) *}
38 ML {* bind_thms ("washI", [@{thm context1}] RL ([@{thm wash}] RLN (2,[@{thm cut}]))) *}
39 ML {* bind_thms ("dryI", [@{thm context1}] RL ([@{thm dry}] RLN (2,[@{thm cut}]))) *}
41 (* a load of dirty clothes and two dollars gives you clean clothes *)
43 lemma "dollar , dollar , dirty |- clean"
44 apply (tactic {* best_tac (lazy_cs add_safes (@{thms changeI} @ @{thms load1I} @ @{thms washI} @ @{thms dryI})) 1 *})
47 (* order of premises doesn't matter *)
49 lemma "dollar , dirty , dollar |- clean"
50 apply (tactic {* best_tac (lazy_cs add_safes (@{thms changeI} @ @{thms load1I} @ @{thms washI} @ @{thms dryI})) 1 *})
53 (* alternative formulation *)
55 lemma "dollar , dollar |- dirty -o clean"
56 apply (tactic {* best_tac (lazy_cs add_safes (@{thms changeI} @ @{thms load1I} @ @{thms washI} @ @{thms dryI})) 1 *})