src/Sequents/Washing.thy
author wenzelm
Mon, 07 Oct 2013 21:24:44 +0200
changeset 54313 da2e6282a4f5
parent 51309 473303ef6e34
child 55228 901a6696cdd8
permissions -rw-r--r--
native executable even for Linux, to avoid surprises with file managers opening executable script as text file;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35762
af3ff2ba4c54 removed old CVS Ids;
wenzelm
parents: 26480
diff changeset
     1
(*  Title:      Sequents/Washing.thy
af3ff2ba4c54 removed old CVS Ids;
wenzelm
parents: 26480
diff changeset
     2
    Author:     Sara Kalvala
af3ff2ba4c54 removed old CVS Ids;
wenzelm
parents: 26480
diff changeset
     3
*)
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
     4
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
     5
theory Washing
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
     6
imports ILL
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
     7
begin
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
     8
51309
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
     9
axiomatization
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    10
  dollar :: o and
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    11
  quarter :: o and
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    12
  loaded :: o and
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    13
  dirty :: o and
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    14
  wet :: o and
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    15
  clean :: o
51309
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    16
where
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    17
  change:
51309
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    18
  "dollar |- (quarter >< quarter >< quarter >< quarter)" and
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    19
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    20
  load1:
51309
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    21
  "quarter , quarter , quarter , quarter , quarter |- loaded" and
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    22
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    23
  load2:
51309
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    24
  "dollar , quarter |- loaded" and
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    25
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    26
  wash:
51309
473303ef6e34 eliminated legacy 'axioms';
wenzelm
parents: 39159
diff changeset
    27
  "loaded , dirty |- wet" and
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    28
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    29
  dry:
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    30
  "wet, quarter , quarter , quarter |- clean"
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    31
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    32
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    33
(* "activate" definitions for use in proof *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    34
39159
0dec18004e75 more antiquotations;
wenzelm
parents: 35762
diff changeset
    35
ML {* bind_thms ("changeI", [@{thm context1}] RL ([@{thm change}] RLN (2,[@{thm cut}]))) *}
0dec18004e75 more antiquotations;
wenzelm
parents: 35762
diff changeset
    36
ML {* bind_thms ("load1I", [@{thm context1}] RL ([@{thm load1}] RLN (2,[@{thm cut}]))) *}
0dec18004e75 more antiquotations;
wenzelm
parents: 35762
diff changeset
    37
ML {* bind_thms ("washI", [@{thm context1}] RL ([@{thm wash}] RLN (2,[@{thm cut}]))) *}
0dec18004e75 more antiquotations;
wenzelm
parents: 35762
diff changeset
    38
ML {* bind_thms ("dryI", [@{thm context1}] RL ([@{thm dry}] RLN (2,[@{thm cut}]))) *}
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    39
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    40
(* a load of dirty clothes and two dollars gives you clean clothes *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    41
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    42
lemma "dollar , dollar , dirty |- clean"
39159
0dec18004e75 more antiquotations;
wenzelm
parents: 35762
diff changeset
    43
  apply (tactic {* best_tac (lazy_cs add_safes (@{thms changeI} @ @{thms load1I} @ @{thms washI} @ @{thms dryI})) 1 *})
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    44
  done
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    45
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    46
(* order of premises doesn't matter *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    47
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    48
lemma "dollar , dirty , dollar |- clean"
39159
0dec18004e75 more antiquotations;
wenzelm
parents: 35762
diff changeset
    49
  apply (tactic {* best_tac (lazy_cs add_safes (@{thms changeI} @ @{thms load1I} @ @{thms washI} @ @{thms dryI})) 1 *})
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    50
  done
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    51
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    52
(* alternative formulation *)
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    53
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    54
lemma "dollar , dollar |- dirty -o clean"
39159
0dec18004e75 more antiquotations;
wenzelm
parents: 35762
diff changeset
    55
  apply (tactic {* best_tac (lazy_cs add_safes (@{thms changeI} @ @{thms load1I} @ @{thms washI} @ @{thms dryI})) 1 *})
21426
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    56
  done
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    57
87ac12bed1ab converted legacy ML scripts;
wenzelm
parents:
diff changeset
    58
end