diff --git a/thys/Saturation_Framework/Consequence_Relations_and_Inference_Systems.thy b/thys/Saturation_Framework/Consequence_Relations_and_Inference_Systems.thy --- a/thys/Saturation_Framework/Consequence_Relations_and_Inference_Systems.thy +++ b/thys/Saturation_Framework/Consequence_Relations_and_Inference_Systems.thy @@ -1,132 +1,118 @@ (* Title: Consequence Relations and Inference Systems of the Saturation Framework * Author: Sophie Tourret , 2018-2020 *) section \Consequence Relations and Inference Systems\ text \This section introduces the most basic notions upon which the framework is built: consequence relations and inference systems. It also defines the notion of a family of consequence relations. This corresponds to section 2.1 of the report.\ theory Consequence_Relations_and_Inference_Systems imports Main begin subsection \Consequence Relations\ locale consequence_relation = fixes Bot :: "'f set" and entails :: "'f set \ 'f set \ bool" (infix "\" 50) assumes bot_not_empty: "Bot \ {}" and bot_entails_all: "B \ Bot \ {B} \ N1" and subset_entailed: "N2 \ N1 \ N1 \ N2" and all_formulas_entailed: "(\C \ N2. N1 \ {C}) \ N1 \ N2" and entails_trans[trans]: "N1 \ N2 \ N2 \ N3 \ N1 \ N3" begin lemma entail_set_all_formulas: "N1 \ N2 \ (\C \ N2. N1 \ {C})" by (meson all_formulas_entailed empty_subsetI insert_subset subset_entailed entails_trans) lemma entail_union: "N \ N1 \ N \ N2 \ N \ N1 \ N2" using entail_set_all_formulas[of N N1] entail_set_all_formulas[of N N2] entail_set_all_formulas[of N "N1 \ N2"] by blast lemma entail_unions: "(\i \ I. N \ Ni i) \ N \ \ (Ni ` I)" using entail_set_all_formulas[of N "\ (Ni ` I)"] entail_set_all_formulas[of N] Complete_Lattices.UN_ball_bex_simps(2)[of Ni I "\C. N \ {C}", symmetric] by meson lemma entail_all_bot: "(\B \ Bot. N \ {B}) \ (\B' \ Bot. N \ {B'})" using bot_entails_all entails_trans by blast lemma entails_trans_strong: "N1 \ N2 \ N1 \ N2 \ N3 \ N1 \ N3" by (meson entail_union entails_trans order_refl subset_entailed) end subsection \Families of Consequence Relations\ locale consequence_relation_family = fixes Bot :: "'f set" and Q :: "'q set" and entails_q :: "'q \ ('f set \ 'f set \ bool)" assumes Q_nonempty: "Q \ {}" and q_cons_rel: "\q \ Q. consequence_relation Bot (entails_q q)" begin lemma bot_not_empty: "Bot \ {}" using Q_nonempty consequence_relation.bot_not_empty consequence_relation_family.q_cons_rel consequence_relation_family_axioms by blast definition entails_Q :: "'f set \ 'f set \ bool" (infix "\Q" 50) where "N1 \Q N2 \ (\q \ Q. entails_q q N1 N2)" (* lem:intersection-of-conseq-rel *) lemma intersect_cons_rel_family: "consequence_relation Bot entails_Q" - unfolding consequence_relation_def -proof (intro conjI) - show \Bot \ {}\ using bot_not_empty . -next - show "\B N. B \ Bot \ {B} \Q N" - unfolding entails_Q_def by (metis consequence_relation_def q_cons_rel) -next - show "\N2 N1. N2 \ N1 \ N1 \Q N2" - unfolding entails_Q_def by (metis consequence_relation_def q_cons_rel) -next - show "\N2 N1. (\C\N2. N1 \Q {C}) \ N1 \Q N2" - unfolding entails_Q_def by (metis consequence_relation_def q_cons_rel) -next - show "\N1 N2 N3. N1 \Q N2 \ N2 \Q N3 \ N1 \Q N3" - unfolding entails_Q_def by (metis consequence_relation_def q_cons_rel) -qed + unfolding consequence_relation_def entails_Q_def + by (intro conjI bot_not_empty) (metis consequence_relation_def q_cons_rel)+ end subsection \Inference Systems\ datatype 'f inference = Infer (prems_of: "'f list") (concl_of: "'f") locale inference_system = fixes Inf :: \'f inference set\ begin definition Inf_from :: "'f set \ 'f inference set" where "Inf_from N = {\ \ Inf. set (prems_of \) \ N}" definition Inf_from2 :: "'f set \ 'f set \ 'f inference set" where "Inf_from2 N M = Inf_from (N \ M) - Inf_from (N - M)" lemma Inf_from2_alt: "Inf_from2 N M = {\ \ Inf. \ \ Inf_from (N \ M) \ set (prems_of \) \ M \ {}}" unfolding Inf_from_def Inf_from2_def by auto end subsection \Families of Inference Systems\ locale inference_system_family = fixes Q :: "'q set" and Inf_q :: "'q \ 'f inference set" assumes Q_nonempty: "Q \ {}" begin definition Inf_from_q :: "'q \ 'f set \ 'f inference set" where "Inf_from_q q = inference_system.Inf_from (Inf_q q)" definition Inf_from2_q :: "'q \ 'f set \ 'f set \ 'f inference set" where "Inf_from2_q q = inference_system.Inf_from2 (Inf_q q)" lemma Inf_from2_q_alt: "Inf_from2_q q N M = {\ \ Inf_q q. \ \ Inf_from_q q (N \ M) \ set (prems_of \) \ M \ {}}" unfolding Inf_from_q_def Inf_from2_q_def inference_system.Inf_from2_alt by auto end end