author | paulson |
Tue, 16 Dec 2003 15:38:09 +0100 | |
changeset 14297 | 7c84fd26add1 |
parent 10751 | a81ea5d3dd41 |
child 14299 | 0b5c0b0a3eba |
permissions | -rw-r--r-- |
paulson@10751 | 1 |
(* Title : HOL/Real/Hyperreal/fuf.ML |
paulson@10751 | 2 |
ID : $Id$ |
paulson@10751 | 3 |
Author : Jacques D. Fleuriot |
paulson@10751 | 4 |
Copyright : 1998 University of Cambridge |
paulson@10751 | 5 |
1999 University of Edinburgh |
paulson@10751 | 6 |
|
paulson@10751 | 7 |
Simple tactics to help proofs involving our free ultrafilter |
paulson@10751 | 8 |
(FreeUltrafilterNat). We rely on the fact that filters satisfy the |
paulson@10751 | 9 |
finite intersection property. |
paulson@10751 | 10 |
*) |
paulson@10751 | 11 |
|
paulson@10751 | 12 |
local |
paulson@10751 | 13 |
|
paulson@10751 | 14 |
exception FUFempty; |
paulson@10751 | 15 |
|
paulson@10751 | 16 |
fun get_fuf_hyps [] zs = zs |
paulson@10751 | 17 |
| get_fuf_hyps (x::xs) zs = |
paulson@10751 | 18 |
case (concl_of x) of |
paulson@10751 | 19 |
(_ $ (Const ("Not",_) $ (Const ("op :",_) $ _ $ |
paulson@10751 | 20 |
Const ("HyperDef.FreeUltrafilterNat",_)))) => get_fuf_hyps xs |
paulson@10751 | 21 |
((x RS FreeUltrafilterNat_Compl_mem)::zs) |
paulson@10751 | 22 |
|(_ $ (Const ("op :",_) $ _ $ |
paulson@10751 | 23 |
Const ("HyperDef.FreeUltrafilterNat",_))) => get_fuf_hyps xs (x::zs) |
paulson@10751 | 24 |
| _ => get_fuf_hyps xs zs; |
paulson@10751 | 25 |
|
paulson@10751 | 26 |
fun inter_prems [] = raise FUFempty |
paulson@10751 | 27 |
| inter_prems [x] = x |
paulson@10751 | 28 |
| inter_prems (x::y::ys) = |
paulson@10751 | 29 |
inter_prems (([x,y] MRS FreeUltrafilterNat_Int) :: ys); |
paulson@10751 | 30 |
|
paulson@10751 | 31 |
in |
paulson@10751 | 32 |
|
paulson@10751 | 33 |
(*--------------------------------------------------------------- |
paulson@10751 | 34 |
solves goals of the form |
paulson@10751 | 35 |
[| A1: FUF; A2: FUF; ...; An: FUF |] ==> B : FUF |
paulson@10751 | 36 |
where A1 Int A2 Int ... Int An <= B |
paulson@10751 | 37 |
---------------------------------------------------------------*) |
paulson@10751 | 38 |
|
paulson@10751 | 39 |
fun fuf_tac css i = METAHYPS(fn prems => |
paulson@10751 | 40 |
(rtac ((inter_prems (get_fuf_hyps prems [])) RS |
paulson@10751 | 41 |
FreeUltrafilterNat_subset) 1) THEN |
paulson@10751 | 42 |
auto_tac css) i; |
paulson@10751 | 43 |
|
paulson@10751 | 44 |
fun Fuf_tac i = fuf_tac (clasimpset ()) i; |
paulson@10751 | 45 |
|
paulson@10751 | 46 |
|
paulson@10751 | 47 |
(*--------------------------------------------------------------- |
paulson@10751 | 48 |
solves goals of the form |
paulson@10751 | 49 |
[| A1: FUF; A2: FUF; ...; An: FUF |] ==> P |
paulson@10751 | 50 |
where A1 Int A2 Int ... Int An <= {} since {} ~: FUF |
paulson@10751 | 51 |
(i.e. uses fact that FUF is a proper filter) |
paulson@10751 | 52 |
---------------------------------------------------------------*) |
paulson@10751 | 53 |
|
paulson@10751 | 54 |
fun fuf_empty_tac css i = METAHYPS (fn prems => |
paulson@10751 | 55 |
rtac ((inter_prems (get_fuf_hyps prems [])) RS |
paulson@10751 | 56 |
(FreeUltrafilterNat_subset RS (FreeUltrafilterNat_empty RS notE))) 1 |
paulson@10751 | 57 |
THEN auto_tac css) i; |
paulson@10751 | 58 |
|
paulson@10751 | 59 |
fun Fuf_empty_tac i = fuf_empty_tac (clasimpset ()) i; |
paulson@10751 | 60 |
|
paulson@10751 | 61 |
|
paulson@10751 | 62 |
(*--------------------------------------------------------------- |
paulson@10751 | 63 |
In fact could make this the only tactic: just need to |
paulson@10751 | 64 |
use contraposition and then look for empty set. |
paulson@10751 | 65 |
---------------------------------------------------------------*) |
paulson@10751 | 66 |
|
paulson@10751 | 67 |
fun ultra_tac css i = rtac ccontr i THEN fuf_empty_tac css i; |
paulson@10751 | 68 |
fun Ultra_tac i = ultra_tac (clasimpset ()) i; |
paulson@10751 | 69 |
|
paulson@10751 | 70 |
end; |