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,100 +1,102 @@ (* 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 + 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_implies_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_implies_all entails_trans by blast +lemma subset_entailed_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 itself" and entails_q :: "'q \ ('f set \ 'f set \ bool)" assumes Bot_not_empty: "Bot \ {}" and q_cons_rel: "consequence_relation Bot (entails_q q)" begin definition entails_Q :: "'f set \ 'f set \ bool" (infix "\Q" 50) where "(N1 \Q N2) = (\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 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)" end end