src/ZF/Resid/Cube.ML
author paulson
Fri, 11 Aug 2000 13:26:40 +0200
changeset 9577 9e66e8ed8237
parent 6046 2c8a8be36c94
child 11319 8b84ee2cc79c
permissions -rw-r--r--
ZF arith
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1048
diff changeset
     1
(*  Title:      Cube.ML
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     2
    ID:         $Id$
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1048
diff changeset
     3
    Author:     Ole Rasmussen
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     4
    Copyright   1995  University of Cambridge
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     5
    Logic Image: ZF
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     6
*)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
     7
5527
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
     8
Addsimps [commutation, residuals_preserve_comp, sub_preserve_reg,
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
     9
	  residuals_preserve_reg, sub_comp, sub_comp RS comp_sym];
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    10
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    11
(* ------------------------------------------------------------------------- *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    12
(*         Prism theorem                                                     *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    13
(*         =============                                                     *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    14
(* ------------------------------------------------------------------------- *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    15
3734
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    16
(* Having more assumptions than needed -- removed below  *)
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5068
diff changeset
    17
Goal "v<==u ==> \
5527
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    18
\   regular(u) --> (ALL w. w~v --> w~u -->  \
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    19
\                          w |> u = (w|>v) |> (u|>v))";
1732
38776e927da8 Updated for new form of induction rules
paulson
parents: 1677
diff changeset
    20
by (etac Ssub.induct 1);
5527
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    21
by Auto_tac;
3734
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    22
qed_spec_mp "prism_l";
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    23
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5068
diff changeset
    24
Goal "[|v <== u; regular(u); w~v|]==> \
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    25
\       w |> u = (w|>v) |> (u|>v)";
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    26
by (rtac prism_l 1);
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1048
diff changeset
    27
by (rtac comp_trans 4);
5527
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    28
by Auto_tac;
3734
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    29
qed "prism";
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    30
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    31
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    32
(* ------------------------------------------------------------------------- *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    33
(*    Levy's Cube Lemma                                                      *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    34
(* ------------------------------------------------------------------------- *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    35
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5068
diff changeset
    36
Goal "[|u~v; regular(v); regular(u); w~u|]==>  \
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    37
\          (w|>u) |> (v|>u) = (w|>v) |> (u|>v)";
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    38
by (stac preservation 1 
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    39
    THEN assume_tac 1 THEN assume_tac 1);
4152
451104c223e2 Ran expandshort, especially to introduce Safe_tac
paulson
parents: 4091
diff changeset
    40
by (stac preservation 1 
3734
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    41
    THEN etac comp_sym 1 THEN assume_tac 1);
2034
5079fdf938dd Ran expandshort; used stac instead of ssubst
paulson
parents: 1732
diff changeset
    42
by (stac (prism RS sym) 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3840
diff changeset
    43
by (asm_full_simp_tac (simpset() addsimps 
2469
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2034
diff changeset
    44
		       [prism RS sym,union_l,union_preserve_regular,
b50b8c0eec01 Implicit simpsets and clasets for FOL and ZF
paulson
parents: 2034
diff changeset
    45
			comp_sym_iff, union_sym]) 4);
5527
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    46
by (asm_simp_tac (simpset() addsimps [union_r, comp_sym_iff]) 1);
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    47
by (asm_simp_tac (simpset() addsimps 
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    48
		  [union_preserve_regular, comp_sym_iff]) 1);
1677
99044cda4ef3 repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents: 1461
diff changeset
    49
by (etac comp_trans 1);
99044cda4ef3 repaired critical proofs depending on the order inside non-confluent SimpSets,
oheimb
parents: 1461
diff changeset
    50
by (atac 1);
3734
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    51
qed "cube";
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    52
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    53
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    54
(* ------------------------------------------------------------------------- *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    55
(*           paving theorem                                                  *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    56
(* ------------------------------------------------------------------------- *)
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    57
5147
825877190618 More tidying and removal of "\!\!... from Goal commands
paulson
parents: 5068
diff changeset
    58
Goal "[|w~u; w~v; regular(u); regular(v)|]==> \
2493
bdeb5024353a Removal of sum_cs and eq_cs
paulson
parents: 2469
diff changeset
    59
\          EX uv vu. (w|>u) |> vu = (w|>v) |> uv & (w|>u)~vu &\
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    60
\            regular(vu) & (w|>v)~uv & regular(uv) ";
3734
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    61
by (subgoal_tac "u~v" 1);
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3840
diff changeset
    62
by (safe_tac (claset() addSIs [exI]));
1461
6bcb44e4d6e5 expanded tabs
clasohm
parents: 1048
diff changeset
    63
by (rtac cube 1);
5527
38928c4a8eb2 big tidying of simpsets, etc
paulson
parents: 5147
diff changeset
    64
by (ALLGOALS (asm_simp_tac (simpset() addsimps [comp_sym_iff])));
4091
771b1f6422a8 isatool fixclasimp;
wenzelm
parents: 3840
diff changeset
    65
by (ALLGOALS (blast_tac (claset() addIs [residuals_preserve_comp, 
3734
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    66
					comp_trans, comp_sym])));
33f355f56f82 Much tidying including "qed" instead of result(), and even qed_spec_mp,
paulson
parents: 2493
diff changeset
    67
qed "paving";
1048
5ba0314f8214 New example by Ole Rasmussen
lcp
parents:
diff changeset
    68