Skip to content

Commit 42d1ea3

Browse files
committed
Make MK_EXISTS behave like EXISTS_EQ and remove EXISTS_EQ
The only use of the old MK_EXISTS function is in examples/HolBdd/MachineTransitionScript.sml
1 parent 76fc328 commit 42d1ea3

File tree

1 file changed

+9
-33
lines changed

1 file changed

+9
-33
lines changed

src/1/Drule.sml

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -120,38 +120,6 @@ fun SPEC_VAR th =
120120
(bv', SPEC bv' th)
121121
end
122122

123-
(*---------------------------------------------------------------------------*
124-
* A |- (!x. t1 = t2) *
125-
* --------------------------- *
126-
* A |- (?x.t1) = (?x.t2) *
127-
*---------------------------------------------------------------------------*)
128-
129-
fun MK_EXISTS bodyth =
130-
let
131-
val (x, sth) = SPEC_VAR bodyth
132-
val (a, b) = dest_eq (concl sth)
133-
val (abimp, baimp) = EQ_IMP_RULE sth
134-
fun HALF (p, q) pqimp =
135-
let
136-
val xp = mk_exists (x, p)
137-
and xq = mk_exists (x, q)
138-
in
139-
DISCH xp (CHOOSE (x, ASSUME xp)
140-
(EXISTS (xq, x) (MP pqimp (ASSUME p))))
141-
end
142-
in
143-
IMP_ANTISYM_RULE (HALF (a, b) abimp) (HALF (b, a) baimp)
144-
end
145-
handle HOL_ERR _ => raise ERR "MK_EXISTS" ""
146-
147-
(*---------------------------------------------------------------------------*
148-
* A |- t1 = t2 *
149-
* ------------------------------------------- (xi not free in A) *
150-
* A |- (?x1 ... xn. t1) = (?x1 ... xn. t2) *
151-
*---------------------------------------------------------------------------*)
152-
153-
fun LIST_MK_EXISTS l th = itlist (fn x => fn th => MK_EXISTS (GEN x th)) l th
154-
155123
fun SIMPLE_EXISTS v th = EXISTS (mk_exists (v, concl th), v) th
156124

157125
fun SIMPLE_CHOOSE v th =
@@ -415,14 +383,22 @@ fun FORALL_EQ x =
415383
* A |- (?x.t1) = (?x.t2) *
416384
*---------------------------------------------------------------------------*)
417385

418-
fun EXISTS_EQ x =
386+
fun MK_EXISTS x =
419387
let
420388
val exists = AP_TERM (inst [alpha |-> type_of x] boolSyntax.existential)
421389
in
422390
fn th => exists (ABS x th)
423391
end
424392
handle HOL_ERR _ => raise ERR "EXISTS_EQ" ""
425393

394+
(*---------------------------------------------------------------------------*
395+
* A |- t1 = t2 *
396+
* ------------------------------------------- (xi not free in A) *
397+
* A |- (?x1 ... xn. t1) = (?x1 ... xn. t2) *
398+
*---------------------------------------------------------------------------*)
399+
400+
fun LIST_MK_EXISTS l th = itlist (fn x => fn th => MK_EXISTS (x th)) l th
401+
426402
(*---------------------------------------------------------------------------*
427403
* @ abstraction *
428404
* *

0 commit comments

Comments
 (0)