From 43aad517b9427239fa6774e9e99a1cc2a851e492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20M=C3=A9ric?= Date: Thu, 20 Jul 2023 16:25:25 +0200 Subject: [PATCH] Add basic explanation for lemma*, etc. Add basic explanation how to use lemma*, etc. with term antiquotations of polymorphic class instances --- Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy b/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy index 8f46155..69d6590 100644 --- a/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy +++ b/Isabelle_DOF-Unit-Tests/Test_Polymorphic_Classes.thy @@ -679,4 +679,13 @@ typ\unit test_G_ext\ typ\\test_G.tag_attribute :: int\\ text*[xcv6::"\test_G.tag_attribute :: int\ test_F", b="{(@{test_A ''xcv3''},@{test_G ''xcv5''})}"]\\ + +text\\lemma*\, etc. do not support well polymorphic classes. +For now only embedded term-antiquotation in a definition could work:\ +definition* testtest_level where "testtest_level \ the (text_section.level @{test2 \testtest2''\})" +lemma*[e5::E] testtest : "xx + testtest_level = yy + testtest_level \ xx = yy" by simp + +text\Indeed this fails:\ +(*lemma*[e6::E] testtest : "xx + the (level @{test2 \testtest2''\}) = yy + the (level @{test2 \testtest2''\}) \ xx = yy" by simp*) + end \ No newline at end of file