diff options
author | Josh Chen | 2020-04-02 17:57:48 +0200 |
---|---|---|
committer | Josh Chen | 2020-04-02 17:57:48 +0200 |
commit | c2dfffffb7586662c67e44a2d255a1a97ab0398b (patch) | |
tree | ed949f5ab7dc64541c838694b502555a275b0995 /spartan/lib/congruence.ML | |
parent | b01b8ee0f3472cb728f09463d0620ac8b8066bcb (diff) |
Brand-spanking new version using Spartan infrastructure
Diffstat (limited to '')
-rw-r--r-- | spartan/lib/congruence.ML | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spartan/lib/congruence.ML b/spartan/lib/congruence.ML new file mode 100644 index 0000000..bb7348c --- /dev/null +++ b/spartan/lib/congruence.ML @@ -0,0 +1,16 @@ +signature Sym_Attr_Data = +sig + val name: string + val symmetry_rule: thm +end + +functor Sym_Attr (D: Sym_Attr_Data) = +struct + local + val distinct_prems = the_single o Seq.list_of o Tactic.distinct_subgoals_tac + in + val attr = Thm.rule_attribute [] + (K (fn th => distinct_prems (th RS D.symmetry_rule) handle THM _ => th)) + val setup = Attrib.setup (Binding.name D.name) (Scan.succeed attr) "" + end +end |