(*<*) \\ ******************************************************************** * Project : AGM Theory * Version : 1.0 * * Authors : Valentin Fouillard, Safouan Taha, Frederic Boulanger and Nicolas Sabouret * * This file : AGM Remainders * * Copyright (c) 2021 Université Paris Saclay, France * ******************************************************************************\ theory AGM_Remainder imports AGM_Logic begin (*>*) section \Remainders\ text\In AGM, one important feature is to eliminate some proposition from a set of propositions by ensuring that the set of retained clauses is maximal and that nothing among these clauses allows to retrieve the eliminated proposition\ subsection \Remainders in a Tarskian logic\ text \In a general context of a Tarskian logic, we consider a descriptive definition (by comprehension)\ context Tarskian_logic begin definition remainder::\'a set \ 'a \ 'a set set\ (infix \.\.\ 55) where rem: \A .\. \ \ {B. B \ A \ \ B \ \ \ (\B'\ A. B \ B' \ B' \ \)}\ lemma rem_inclusion: \B \ A .\. \ \ B \ A\ by (auto simp add:rem split:if_splits) lemma rem_closure: "K = Cn(A) \ B \ K .\. \ \ B = Cn(B)" apply(cases \K .\. \ = {}\, simp) by (simp add:rem infer_def) (metis idempotency_L inclusion_L monotonicity_L psubsetI) lemma remainder_extensionality: \Cn({\}) = Cn({\}) \ A .\. \ = A .\. \\ unfolding rem infer_def apply safe by (simp_all add: Cn_same) blast+ lemma nonconsequence_remainder: \A .\. \ = {A} \ \ A \ \\ unfolding rem by auto \ \As we will see further, the other direction requires compactness!\ lemma taut2emptyrem: \\ \ \ A .\. \ = {}\ unfolding rem by (simp add: infer_def validD_L) end subsection \Remainders in a supraclassical logic\ text\In case of a supraclassical logic, remainders get impressive properties\ context Supraclassical_logic begin \ \As an effect of being maximal, a remainder keeps the eliminated proposition in its propositions hypothesis\ lemma remainder_recovery: \K = Cn(A) \ K \ \ \ B \ K .\. \ \ B \ \ .\. \\ proof - { fix \ and B assume a:\K = Cn(A)\ and c:\\ \ K\ and d:\B \ K .\. \\ and e:\\ .\. \ \ Cn(B)\ with a have f:\\ .\. \ \ K\ using impI2 infer_def by blast with d e have \\ \ Cn(B \ {\ .\. \})\ apply (simp add:rem, elim conjE) by (metis dual_order.order_iff_strict inclusion_L insert_subset) with d have False using rem imp_recovery1 by (metis (no_types, lifting) CollectD infer_def) } thus \K = Cn(A) \ K \ \ \ B \ K .\. \ \ B \ \ .\. \\ using idempotency_L by auto qed \ \When you remove some proposition \\\ several other propositions can be lost. An important lemma states that the resulting remainder is also a remainder of any lost proposition\ lemma remainder_recovery_bis: \K = Cn(A) \ K \ \ \ \ B \ \ \ B \ K .\. \ \ B \ K .\. \\ proof- assume a:\K = Cn(A)\ and b:\\ B \ \\ and c:\B \ K .\. \\ and d:\K \ \\ hence d:\B \ \ .\. \\ using remainder_recovery by simp with c show \B \ K .\. \\ by (simp add:rem) (meson b dual_order.trans infer_def insert_subset monotonicity_L mp_PL order_refl psubset_imp_subset) qed corollary remainder_recovery_imp: \K = Cn(A) \ K \ \ \ \ (\ .\. \) \ B \ K .\. \ \ B \ K .\. \\ apply(rule remainder_recovery_bis, simp_all) by (simp add:rem) (meson infer_def mp_PL validD_L) \ \If we integrate back the eliminated proposition into the remainder, we retrieve the original set!\ lemma remainder_expansion: \K = Cn(A) \ K \ \ \ \ B \ \ \ B \ K .\. \ \ B \ \ = K\ proof assume a:\K = Cn(A)\ and b:\K \ \\ and c:\\ B \ \\ and d:\B \ K .\. \\ then show \B \ \ \ K\ by (metis Un_insert_right expansion_def idempotency_L infer_def insert_subset monotonicity_L rem_inclusion sup_bot.right_neutral) next assume a:\K = Cn(A)\ and b:\K \ \\ and c:\\ B \ \\ and d:\B \ K .\. \\ { fix \ assume \\ \ K\ hence e:\B \ \ .\.\\ using remainder_recovery[OF a _ d, of \] assumption_L by blast have \\ \ K\ using a b idempotency_L infer_def by blast hence f:\B \ {\} \ \\ using b c d apply(simp add:rem) by (meson inclusion_L insert_iff insert_subsetI less_le_not_le subset_iff) from e f have \B \ {\} \ \\ using imp_PL imp_trans by blast } then show \K \ B \ \\ by (simp add: expansion_def subsetI) qed text\To eliminate a conjunction, we only need to remove one side\ lemma remainder_conj: \K = Cn(A) \ K \ \ .\. \ \ K .\. (\ .\. \) = (K .\. \) \ (K .\. \)\ apply(intro subset_antisym Un_least subsetI, simp add:rem) apply (meson conj_PL infer_def) using remainder_recovery_imp[of K A \\ .\. \\ \] apply (meson assumption_L conjE1_PL singletonI subsetI valid_imp_PL) using remainder_recovery_imp[of K A \\ .\. \\ \] by (meson assumption_L conjE2_PL singletonI subsetI valid_imp_PL) end subsection \Remainders in a compact logic\ text\In case of a supraclassical logic, remainders get impressive properties\ context Compact_logic begin text \The following lemma is the Lindembaum's lemma requiring the Zorn's lemma (already available in standard Isabelle/HOL). For more details, please refer to the book "Theory of logical calculi" @{cite wojcicki2013theory}. This very important lemma states that we can get a maximal set (remainder \B'\) starting from any set \B\ if this latter does not infer the proposition \\\ we want to eliminate\ lemma upper_remainder: \B \ A \ \ B \ \ \ \B'. B \ B' \ B' \ A .\. \\ proof - assume a:\B \ A\ and b:\\ B \ \\ have c:\\ \ \\ using b infer_def validD_L by blast define \ where "\ \ {B'. B \ B' \ B' \ A \ \ B' \ \}" have d:\subset.chain \ C \ subset.chain {B. \ B \ \} C\ for C unfolding \_def by (simp add: le_fun_def less_eq_set_def subset_chain_def) have e:\C \ {} \ subset.chain \ C \ B \ \ C\ for C by (metis (no_types, lifting) \_def subset_chain_def less_eq_Sup mem_Collect_eq subset_iff) { fix C assume f:\C \ {}\ and g:\subset.chain \ C\ have \\ C \ \\ using \_def e[OF f g] chain_closure[OF c d[OF g]] by simp (metis (no_types, lifting) CollectD Sup_least Sup_subset_mono g subset.chain_def subset_trans) } note f=this have \subset.chain \ C \ \U\\. \X\C. X \ U\ for C apply (cases \C \ {}\) apply (meson Union_upper f) using \_def a b by blast with subset_Zorn[OF this, simplified] obtain B' where f:\B'\ \ \ (\X\\. B' \ X \ X = B')\ by auto then show ?thesis by (simp add:rem \_def, rule_tac x=B' in exI) (metis psubsetE subset_trans) qed \ \An immediate corollary ruling tautologies\ corollary emptyrem2taut: \A .\. \ = {} \ \ \\ by (metis bot.extremum empty_iff upper_remainder valid_def) end end