author | Christian Urban <urbanc@in.tum.de> |
Mon, 07 Jun 2010 11:43:01 +0200 | |
changeset 2311 | 4da5c5c29009 |
parent 2306 | 86c977b4a9bb |
child 2477 | 2f289c1f6cf1 |
permissions | -rw-r--r-- |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
(* Title: nominal_eqvt.ML |
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
2 |
Author: Stefan Berghofer (original code) |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
Author: Christian Urban |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
|
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
Automatic proofs for equivariance of inductive predicates. |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
6 |
*) |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
|
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
signature NOMINAL_EQVT = |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
sig |
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
10 |
val eqvt_rel_tac: Proof.context -> string list -> term -> thm -> thm list -> int -> tactic |
1948 | 11 |
val eqvt_rel_single_case_tac: Proof.context -> string list -> term -> thm -> int -> tactic |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
12 |
|
2306 | 13 |
val equivariance: bool -> term list -> thm -> thm list -> Proof.context -> thm list * local_theory |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
14 |
val equivariance_cmd: string -> Proof.context -> local_theory |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
15 |
end |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
16 |
|
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
17 |
structure Nominal_Eqvt : NOMINAL_EQVT = |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
18 |
struct |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
|
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
20 |
open Nominal_Permeq; |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
21 |
open Nominal_ThmDecls; |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
22 |
|
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
23 |
val atomize_conv = |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
24 |
MetaSimplifier.rewrite_cterm (true, false, false) (K (K NONE)) |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
25 |
(HOL_basic_ss addsimps @{thms induct_atomize}); |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
26 |
val atomize_intr = Conv.fconv_rule (Conv.prems_conv ~1 atomize_conv); |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
27 |
fun atomize_induct ctxt = Conv.fconv_rule (Conv.prems_conv ~1 |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
28 |
(Conv.params_conv ~1 (K (Conv.prems_conv ~1 atomize_conv)) ctxt)); |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
29 |
|
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
30 |
|
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
31 |
(** equivariance tactics **) |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
32 |
|
1866
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
33 |
val perm_boolE = @{thm permute_boolE} |
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
34 |
val perm_cancel = @{thms permute_minus_cancel(2)} |
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
35 |
|
1948 | 36 |
fun eqvt_rel_single_case_tac ctxt pred_names pi intro = |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
37 |
let |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
38 |
val thy = ProofContext.theory_of ctxt |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
39 |
val cpi = Thm.cterm_of thy (mk_minus pi) |
1866
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
40 |
val pi_intro_rule = Drule.instantiate' [] [SOME cpi] perm_boolE |
2081
9e7cf0a996d3
fixed the problem with alpha containing splits
Christian Urban <urbanc@in.tum.de>
parents:
2069
diff
changeset
|
41 |
val simps1 = HOL_basic_ss addsimps @{thms permute_fun_def minus_minus split_paired_all} |
9e7cf0a996d3
fixed the problem with alpha containing splits
Christian Urban <urbanc@in.tum.de>
parents:
2069
diff
changeset
|
42 |
val simps2 = HOL_basic_ss addsimps @{thms permute_bool_def} |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
43 |
in |
2081
9e7cf0a996d3
fixed the problem with alpha containing splits
Christian Urban <urbanc@in.tum.de>
parents:
2069
diff
changeset
|
44 |
eqvt_strict_tac ctxt [] pred_names THEN' |
1866
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
45 |
SUBPROOF (fn {prems, context as ctxt, ...} => |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
46 |
let |
2311
4da5c5c29009
work on transitivity proof
Christian Urban <urbanc@in.tum.de>
parents:
2306
diff
changeset
|
47 |
val prems' = map (transform_prem2 ctxt pred_names) prems |
1866
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
48 |
val tac1 = resolve_tac prems' |
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
49 |
val tac2 = EVERY' [ rtac pi_intro_rule, |
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
50 |
eqvt_strict_tac ctxt perm_cancel pred_names, resolve_tac prems' ] |
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
51 |
val tac3 = EVERY' [ rtac pi_intro_rule, |
2081
9e7cf0a996d3
fixed the problem with alpha containing splits
Christian Urban <urbanc@in.tum.de>
parents:
2069
diff
changeset
|
52 |
eqvt_strict_tac ctxt perm_cancel pred_names, simp_tac simps1, |
9e7cf0a996d3
fixed the problem with alpha containing splits
Christian Urban <urbanc@in.tum.de>
parents:
2069
diff
changeset
|
53 |
simp_tac simps2, resolve_tac prems'] |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
54 |
in |
1866
6d4e4bf9bce6
automatic proofs for equivariance of alphas
Christian Urban <urbanc@in.tum.de>
parents:
1861
diff
changeset
|
55 |
(rtac intro THEN_ALL_NEW FIRST' [tac1, tac2, tac3]) 1 |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
end) ctxt |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
57 |
end |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
58 |
|
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
59 |
fun eqvt_rel_tac ctxt pred_names pi induct intros = |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
60 |
let |
1948 | 61 |
val cases = map (eqvt_rel_single_case_tac ctxt pred_names pi) intros |
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
62 |
in |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
63 |
EVERY' (rtac induct :: cases) |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
64 |
end |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
65 |
|
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
66 |
|
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
67 |
(** equivariance procedure *) |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
68 |
|
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
69 |
(* sets up goal and makes sure parameters |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
70 |
are untouched PROBLEM: this violates the |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
71 |
form of eqvt lemmas *) |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
72 |
fun prepare_goal pi pred = |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
73 |
let |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
74 |
val (c, xs) = strip_comb pred; |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
75 |
in |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
76 |
HOLogic.mk_imp (pred, list_comb (c, map (mk_perm pi) xs)) |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
77 |
end |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
78 |
|
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
79 |
(* stores thm under name.eqvt and adds [eqvt]-attribute *) |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
80 |
fun note_named_thm (name, thm) ctxt = |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
81 |
let |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
82 |
val thm_name = Binding.qualified_name |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
83 |
(Long_Name.qualify (Long_Name.base_name name) "eqvt") |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
84 |
val attr = Attrib.internal (K eqvt_add) |
2110
872187804ff5
better ML-interface (returning only a list of theorems and a context)
Christian Urban <urbanc@in.tum.de>
parents:
2107
diff
changeset
|
85 |
val ((_, [thm']), ctxt') = Local_Theory.note ((thm_name, [attr]), [thm]) ctxt |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
86 |
in |
2110
872187804ff5
better ML-interface (returning only a list of theorems and a context)
Christian Urban <urbanc@in.tum.de>
parents:
2107
diff
changeset
|
87 |
(thm', ctxt') |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
88 |
end |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
89 |
|
2306 | 90 |
fun equivariance note_flag pred_trms raw_induct intrs ctxt = |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
91 |
let |
2117
b3a5bda07007
added a test whether some of the constants already equivariant (then the procedure has to fail).
Christian Urban <urbanc@in.tum.de>
parents:
2110
diff
changeset
|
92 |
val is_already_eqvt = |
b3a5bda07007
added a test whether some of the constants already equivariant (then the procedure has to fail).
Christian Urban <urbanc@in.tum.de>
parents:
2110
diff
changeset
|
93 |
filter (is_eqvt ctxt) pred_trms |
b3a5bda07007
added a test whether some of the constants already equivariant (then the procedure has to fail).
Christian Urban <urbanc@in.tum.de>
parents:
2110
diff
changeset
|
94 |
|> map (Syntax.string_of_term ctxt) |
b3a5bda07007
added a test whether some of the constants already equivariant (then the procedure has to fail).
Christian Urban <urbanc@in.tum.de>
parents:
2110
diff
changeset
|
95 |
val _ = if null is_already_eqvt then () |
b3a5bda07007
added a test whether some of the constants already equivariant (then the procedure has to fail).
Christian Urban <urbanc@in.tum.de>
parents:
2110
diff
changeset
|
96 |
else error ("Already equivariant: " ^ commas is_already_eqvt) |
b3a5bda07007
added a test whether some of the constants already equivariant (then the procedure has to fail).
Christian Urban <urbanc@in.tum.de>
parents:
2110
diff
changeset
|
97 |
|
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
98 |
val pred_names = map (fst o dest_Const) pred_trms |
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
99 |
val raw_induct' = atomize_induct ctxt raw_induct |
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
100 |
val intrs' = map atomize_intr intrs |
1948 | 101 |
val (([raw_concl], [raw_pi]), ctxt') = |
102 |
ctxt |
|
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
103 |
|> Variable.import_terms false [concl_of raw_induct'] |
1948 | 104 |
||>> Variable.variant_fixes ["p"] |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
105 |
val pi = Free (raw_pi, @{typ perm}) |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
106 |
val preds = map (fst o HOLogic.dest_imp) |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
107 |
(HOLogic.dest_conj (HOLogic.dest_Trueprop raw_concl)); |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
108 |
val goal = HOLogic.mk_Trueprop |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
109 |
(foldr1 HOLogic.mk_conj (map (prepare_goal pi) preds)) |
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
110 |
val thms = Datatype_Aux.split_conj_thm (Goal.prove ctxt' [] [] goal |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
111 |
(fn {context,...} => eqvt_rel_tac context pred_names pi raw_induct' intrs' 1) |
1835
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
112 |
|> singleton (ProofContext.export ctxt' ctxt)) |
636de31888a6
tuned and removed dead code
Christian Urban <urbanc@in.tum.de>
parents:
1833
diff
changeset
|
113 |
val thms' = map (fn th => zero_var_indexes (th RS mp)) thms |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
114 |
in |
2306 | 115 |
if note_flag |
116 |
then ctxt |> fold_map note_named_thm (pred_names ~~ thms') |
|
117 |
else (thms', ctxt) |
|
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
118 |
end |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
119 |
|
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
120 |
fun equivariance_cmd pred_name ctxt = |
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
121 |
let |
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
122 |
val thy = ProofContext.theory_of ctxt |
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
123 |
val (_, {preds, raw_induct, intrs, ...}) = |
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
124 |
Inductive.the_inductive ctxt (Sign.intern_const thy pred_name) |
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
125 |
in |
2306 | 126 |
equivariance true preds raw_induct intrs ctxt |> snd |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
127 |
end |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
128 |
|
2168 | 129 |
local structure P = Parse and K = Keyword in |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
130 |
|
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
131 |
val _ = |
2168 | 132 |
Outer_Syntax.local_theory "equivariance" |
1948 | 133 |
"Proves equivariance for inductive predicate involving nominal datatypes." |
2107
5686d83db1f9
ingnored parameters in equivariance; added a proper interface to be called from ML
Christian Urban <urbanc@in.tum.de>
parents:
2081
diff
changeset
|
134 |
K.thy_decl (P.xname >> equivariance_cmd); |
1833
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
135 |
end; |
2050b5723c04
added a library for basic nominal functions; separated nominal_eqvt file
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
136 |
|
2069
2b6ba4d4e19a
Fixes for new isabelle
Cezary Kaliszyk <kaliszyk@in.tum.de>
parents:
2064
diff
changeset
|
137 |
end (* structure *) |