author | wenzelm |
Sun, 19 Sep 2021 21:37:14 +0200 | |
changeset 74319 | 54b2e5f771da |
parent 74293 | 54279cfcf037 |
child 74320 | dd04da556d1a |
permissions | -rw-r--r-- |
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
1 |
(* Title: FOL/fologic.ML |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
2 |
Author: Lawrence C Paulson |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
3 |
|
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
4 |
Abstract syntax operations for FOL. |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
5 |
*) |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
6 |
|
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
7 |
signature FOLOGIC = |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
8 |
sig |
32449 | 9 |
val mk_Trueprop: term -> term |
10 |
val dest_Trueprop: term -> term |
|
11 |
val mk_conj: term * term -> term |
|
12 |
val mk_disj: term * term -> term |
|
13 |
val mk_imp: term * term -> term |
|
14 |
val dest_imp: term -> term * term |
|
15 |
val dest_conj: term -> term list |
|
16 |
val mk_iff: term * term -> term |
|
17 |
val dest_iff: term -> term * term |
|
18 |
val all_const: typ -> term |
|
19 |
val mk_all: term * term -> term |
|
20 |
val exists_const: typ -> term |
|
21 |
val mk_exists: term * term -> term |
|
22 |
val eq_const: typ -> term |
|
23 |
val mk_eq: term * term -> term |
|
24 |
val dest_eq: term -> term * term |
|
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
25 |
end; |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
26 |
|
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
27 |
|
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
28 |
structure FOLogic: FOLOGIC = |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
29 |
struct |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
30 |
|
74319
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
31 |
fun mk_Trueprop P = \<^Const>\<open>Trueprop for P\<close>; |
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
32 |
|
74319
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
33 |
val dest_Trueprop = \<^Const_fn>\<open>Trueprop for P => P\<close>; |
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
34 |
|
74319
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
35 |
fun mk_conj (t1, t2) = \<^Const>\<open>conj for t1 t2\<close> |
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
36 |
and mk_disj (t1, t2) = \<^Const>\<open>disj for t1 t2\<close> |
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
37 |
and mk_imp (t1, t2) = \<^Const>\<open>imp for t1 t2\<close> |
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
38 |
and mk_iff (t1, t2) = \<^Const>\<open>iff for t1 t2\<close>; |
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
39 |
|
74319
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
40 |
val dest_imp = \<^Const_fn>\<open>imp for A B => \<open>(A, B)\<close>\<close>; |
4466
305390f23734
Better equality handling in Blast_tac, usingd a new variant of hyp_subst_tac
paulson
parents:
4349
diff
changeset
|
41 |
|
74293 | 42 |
fun dest_conj \<^Const_>\<open>conj for t t'\<close> = t :: dest_conj t' |
11668 | 43 |
| dest_conj t = [t]; |
44 |
||
74319
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
45 |
val dest_iff = \<^Const_fn>\<open>iff for A B => \<open>(A, B)\<close>\<close>; |
9543 | 46 |
|
74293 | 47 |
fun eq_const T = \<^Const>\<open>eq T\<close>; |
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
48 |
fun mk_eq (t, u) = eq_const (fastype_of t) $ t $ u; |
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
49 |
|
74319
54b2e5f771da
clarified signature -- prefer antiquotations (with subtle change of exception content);
wenzelm
parents:
74293
diff
changeset
|
50 |
val dest_eq = \<^Const_fn>\<open>eq _ for lhs rhs => \<open>(lhs, rhs)\<close>\<close>; |
6140 | 51 |
|
74293 | 52 |
fun all_const T = \<^Const>\<open>All T\<close>; |
44241 | 53 |
fun mk_all (Free (x, T), P) = all_const T $ absfree (x, T) P; |
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
54 |
|
74293 | 55 |
fun exists_const T = \<^Const>\<open>Ex T\<close>; |
44241 | 56 |
fun mk_exists (Free (x, T), P) = exists_const T $ absfree (x, T) P; |
4349
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
57 |
|
50403e5a44c0
Instantiated the one-point-rule quantifier simpprocs for FOL
paulson
parents:
diff
changeset
|
58 |
end; |