nicer presentation of proofs, closer to automation.
This commit is contained in:
parent
02b6d0b048
commit
b651116af3
|
@ -218,31 +218,23 @@ print_doc_classes
|
||||||
text\<open>All Class-Id's --- should be generated.\<close>
|
text\<open>All Class-Id's --- should be generated.\<close>
|
||||||
|
|
||||||
lemmas class_ids =
|
lemmas class_ids =
|
||||||
SML_def code_def annex_def title_def figure_def chapter_def article_def theorem_def
|
SML_def code_def annex_def title_def figure_def chapter_def article_def theorem_def
|
||||||
paragraph_def tech_code_def assumption_def definition_def hypothesis_def eng_example_def
|
paragraph_def tech_code_def assumption_def definition_def hypothesis_def
|
||||||
text_element_def math_content_def tech_example_def subsubsection_def tech_definition_def
|
eng_example_def text_element_def math_content_def tech_example_def subsubsection_def
|
||||||
engineering_content_def data_def float_def axiom_def LATEX_def author_def listing_def example_def
|
engineering_content_def data_def float_def axiom_def LATEX_def author_def listing_def
|
||||||
abstract_def assertion_def technical_def background_def evaluation_def math_proof_def
|
abstract_def assertion_def technical_def background_def evaluation_def math_proof_def
|
||||||
math_formal_def bibliography_def math_example_def text_section_def conclusion_stmt_def
|
math_formal_def bibliography_def math_example_def text_section_def conclusion_stmt_def
|
||||||
math_explanation_def ISAR_def frame_def lemma_def index_def report_def section_def premise_def
|
math_explanation_def ISAR_def frame_def lemma_def index_def report_def section_def
|
||||||
subtitle_def corollary_def subsection_def conclusion_def experiment_def consequence_def
|
subtitle_def corollary_def subsection_def conclusion_def experiment_def consequence_def
|
||||||
proposition_def introduction_def related_work_def front_matter_def math_motivation_def
|
proposition_def introduction_def related_work_def front_matter_def math_motivation_def
|
||||||
table_of_contents_def
|
example_def table_of_contents_def tech_definition_def premise_def
|
||||||
|
|
||||||
|
|
||||||
term\<open>{
|
|
||||||
SML,code, annex, title ,figure,chapter, article , theorem ,paragraph,tech_code,
|
|
||||||
assumption, definition , hypothesis ,eng_example ,text_element,math_content,tech_example,
|
|
||||||
subsubsection,tech_definition,engineering_content,data,float,axiom,LATEX,author,listing,
|
|
||||||
example,abstract,assertion,technical,background,evaluation,math_proof,math_formal,
|
|
||||||
bibliography,math_example,text_section,conclusion_stmt,math_explanation,ISAR,frame,
|
|
||||||
lemma,index,report,section,premise,subtitle,corollary,subsection,conclusion,experiment,
|
|
||||||
consequence,proposition,introduction,related_work,front_matter,math_motivation,table_of_contents}
|
|
||||||
\<close>
|
|
||||||
|
|
||||||
|
|
||||||
definition allClasses
|
definition allClasses
|
||||||
where \<open>allClasses \<equiv> {SML, code, annex, title,figure,chapter, article, theorem, paragraph,
|
where \<open>allClasses \<equiv>
|
||||||
|
{SML, code, annex, title,figure,chapter, article, theorem, paragraph,
|
||||||
tech_code, assumption, definition, hypothesis, eng_example, text_element,
|
tech_code, assumption, definition, hypothesis, eng_example, text_element,
|
||||||
math_content,tech_example, subsubsection,tech_definition,
|
math_content,tech_example, subsubsection,tech_definition,
|
||||||
engineering_content,data,float,axiom,LATEX,author,listing, example,abstract,
|
engineering_content,data,float,axiom,LATEX,author,listing, example,abstract,
|
||||||
|
@ -250,24 +242,31 @@ definition allClasses
|
||||||
math_example,text_section,conclusion_stmt,math_explanation,ISAR,frame,
|
math_example,text_section,conclusion_stmt,math_explanation,ISAR,frame,
|
||||||
lemma,index,report,section,premise,subtitle,corollary,subsection,conclusion,
|
lemma,index,report,section,premise,subtitle,corollary,subsection,conclusion,
|
||||||
experiment, consequence,proposition,introduction,related_work,front_matter,
|
experiment, consequence,proposition,introduction,related_work,front_matter,
|
||||||
math_motivation,table_of_contents}
|
math_motivation,table_of_contents}\<close>
|
||||||
\<close>
|
|
||||||
|
|
||||||
text\<open>A rudimentary fragment of the class hierarchy re-modeled on classid's :\<close>
|
text\<open>A rudimentary fragment of the class hierarchy re-modeled on classid's :\<close>
|
||||||
|
|
||||||
|
|
||||||
|
definition cid_of where \<open>cid_of = inv Regular_Exp.Atom\<close>
|
||||||
|
|
||||||
|
lemma Atom_inverse[simp]:\<open>cid_of (Regular_Exp.Atom a) = a\<close>
|
||||||
|
unfolding cid_of_def by (meson UNIV_I f_inv_into_f image_eqI rexp.inject(1))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
definition doc_class_rel
|
definition doc_class_rel
|
||||||
where \<open>doc_class_rel \<equiv> {(proposition,math_content),
|
where \<open>doc_class_rel \<equiv> {(cid_of proposition,cid_of math_content),
|
||||||
(listing,float),
|
(cid_of listing,cid_of float),
|
||||||
(figure,float)} \<close>
|
(cid_of figure,cid_of float)} \<close>
|
||||||
|
|
||||||
instantiation "doc_class" :: ord
|
instantiation "doc_class" :: ord
|
||||||
begin
|
begin
|
||||||
|
|
||||||
definition
|
definition
|
||||||
le_class_def: "x \<le> y \<longleftrightarrow> (x,y) \<in> doc_class_rel\<^sup>*"
|
less_eq_doc_class: "x \<le> y \<longleftrightarrow> (x,y) \<in> doc_class_rel\<^sup>*"
|
||||||
|
|
||||||
definition
|
definition
|
||||||
less_class_def: "(x::doc_class) < y \<longleftrightarrow> (x \<le> y \<and> \<not> y \<le> x)"
|
less_doc_class: "(x::doc_class) < y \<longleftrightarrow> (x \<le> y \<and> \<not> y \<le> x)"
|
||||||
|
|
||||||
instance ..
|
instance ..
|
||||||
|
|
||||||
|
@ -275,13 +274,12 @@ end
|
||||||
|
|
||||||
lemma drc_acyclic : "acyclic doc_class_rel"
|
lemma drc_acyclic : "acyclic doc_class_rel"
|
||||||
proof -
|
proof -
|
||||||
let ?measure = " (\<lambda>x.3::int)(float := 0, math_content := 0,
|
let ?measure = "(\<lambda>x.3::int)(cid_of float := 0, cid_of math_content := 0,
|
||||||
listing := 1, figure := 1,
|
cid_of listing := 1, cid_of figure := 1, cid_of proposition := 1)"
|
||||||
proposition := 1)"
|
|
||||||
show ?thesis
|
show ?thesis
|
||||||
unfolding doc_class_rel_def
|
unfolding doc_class_rel_def
|
||||||
apply(rule_tac f = "?measure" in acyclicI_order)
|
apply(rule_tac f = "?measure" in acyclicI_order)
|
||||||
by auto
|
by(simp only: class_ids)(auto)
|
||||||
qed
|
qed
|
||||||
|
|
||||||
|
|
||||||
|
@ -291,11 +289,11 @@ instance
|
||||||
proof
|
proof
|
||||||
fix x::"doc_class"
|
fix x::"doc_class"
|
||||||
show \<open>x \<le> x\<close>
|
show \<open>x \<le> x\<close>
|
||||||
unfolding le_class_def by simp
|
unfolding less_eq_doc_class by simp
|
||||||
next
|
next
|
||||||
fix x y z:: "doc_class"
|
fix x y z:: "doc_class"
|
||||||
show \<open>x \<le> y \<Longrightarrow> y \<le> z \<Longrightarrow> x \<le> z\<close>
|
show \<open>x \<le> y \<Longrightarrow> y \<le> z \<Longrightarrow> x \<le> z\<close>
|
||||||
unfolding le_class_def
|
unfolding less_eq_doc_class
|
||||||
by force
|
by force
|
||||||
next
|
next
|
||||||
fix x y::"doc_class"
|
fix x y::"doc_class"
|
||||||
|
@ -303,12 +301,11 @@ instance
|
||||||
by (simp add: acyclic_impl_antisym_rtrancl drc_acyclic)
|
by (simp add: acyclic_impl_antisym_rtrancl drc_acyclic)
|
||||||
show \<open>x \<le> y \<Longrightarrow> y \<le> x \<Longrightarrow> x = y\<close>
|
show \<open>x \<le> y \<Longrightarrow> y \<le> x \<Longrightarrow> x = y\<close>
|
||||||
apply(insert antisymD[OF *])
|
apply(insert antisymD[OF *])
|
||||||
unfolding le_class_def
|
using less_eq_doc_class by auto
|
||||||
by auto
|
|
||||||
next
|
next
|
||||||
fix x y::"doc_class"
|
fix x y::"doc_class"
|
||||||
show \<open>(x < y) = (x \<le> y \<and> \<not> y \<le> x)\<close>
|
show \<open>(x < y) = (x \<le> y \<and> \<not> y \<le> x)\<close>
|
||||||
by(simp add: less_class_def )
|
by(simp add: less_doc_class)
|
||||||
qed
|
qed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue