Theory conditions_negative_infinitary

theory conditions_negative_infinitary
  imports conditions_negative conditions_positive_infinitary
begin

subsection ‹Infinitary Negative Conditions›

text‹We define and interrelate infinitary variants for some previously introduced
 axiomatic conditions on operators.›

text‹Anti-distribution over infinite joins (suprema) or infinite anti-additivity (inADDI).›
definition inADDI::"('w σ  'w σ)  bool" (inADDI)
  where "inADDI φ   S. φ(S) = φ S" 
definition inADDI_a::"('w σ  'w σ)  bool" (inADDIa)
  where "inADDIa φ  S. φ S  φ(S)  " 
definition inADDI_b::"('w σ  'w σ)  bool" (inADDIb)
  where "inADDIb φ  S. φ(S)  φ S"

text‹Anti-distribution over infinite meets (infima) or infinite anti-multiplicativity (inMULT).›
definition inMULT::"('w σ  'w σ)  bool" (inMULT)
  where "inMULT φ   S. φ(S) = φ S" 
definition inMULT_a::"('w σ  'w σ)  bool" (inMULTa)
  where "inMULTa φ  S. φ S  φ(S)"
definition inMULT_b::"('w σ  'w σ)  bool" (inMULTb)
  where "inMULTb φ  S. φ(S)  φ S"

declare inADDI_def[cond] inADDI_a_def[cond] inADDI_b_def[cond]
        inMULT_def[cond] inMULT_a_def[cond] inMULT_b_def[cond]

lemma inADDI_char: "inADDI φ = (inADDIa φ  inADDIb φ)" unfolding cond using setequ_char by blast
lemma inMULT_char: "inMULT φ = (inMULTa φ  inMULTb φ)" unfolding cond using setequ_char by blast

text‹nADDI-b and inADDI-b are in fact equivalent.›
lemma inADDIb_equ: "inADDIb φ = nADDIb φ" proof -
  have lr: "inADDIb φ  nADDIb φ" proof - (*prove as a one-liner by instantiating inADDI_b_def with S=(λZ. Z=A ∨ Z=B)*)
  assume inaddib: "inADDIb φ"
  { fix A::"'a σ" and B::"'a σ" (* for some reason Isabelle doesn't like other letters as type variable. Why?*)
    let ?S="λZ. Z=A  Z=B"
    have "?S = A  B" unfolding supremum_def join_def by blast
    hence p1: "φ(?S) = φ(A  B)" by simp
    have "φ ?S = (λZ. Z=(φ A)  Z=(φ B))" unfolding image_def by metis
    hence p2: "φ ?S = (φ A)  (φ B)" unfolding infimum_def meet_def by auto
    have "φ(?S)  φ ?S" using inaddib inADDI_b_def by blast
    hence "φ(A  B)  (φ A)  (φ B)" using p1 p2 by simp
  } thus ?thesis by (simp add: nADDI_b_def) qed
  have rl: "nADDIb φ  inADDIb φ" unfolding inADDI_b_def ANTI_nADDIb ANTI_def image_def
    by (smt (verit) glb_def inf_glb lower_bounds_def lub_def sup_lub upper_bounds_def)
  from lr rl show ?thesis by auto
qed
text‹nMULT-a and inMULT-a are also equivalent.›
lemma inMULTa_equ: "inMULTa φ = nMULTa φ" proof -
  have lr: "inMULTa φ  nMULTa φ" proof - (*prove as a one-liner by instantiating inMULT_a_def with S=(λZ. Z=A ∨ Z=B)*)
  assume inmulta: "inMULTa φ"
  { fix A::"'a σ" and B::"'a σ"
    let ?S="λZ. Z=A  Z=B"
    have "?S = A  B" unfolding infimum_def meet_def by blast
    hence p1: "φ(?S) = φ(A  B)" by simp
    have "φ ?S = (λZ. Z=(φ A)  Z=(φ B))" unfolding image_def by metis
    hence p2: "φ ?S = (φ A)  (φ B)" unfolding supremum_def join_def by auto
    have "φ ?S  φ(?S)" using inmulta inMULT_a_def by blast    
    hence "(φ A)  (φ B)  φ(A  B)" using p1 p2 by simp
  } thus ?thesis by (simp add: nMULT_a_def) qed
  have rl: "nMULTa φ  inMULTa φ" unfolding inMULT_a_def ANTI_nMULTa ANTI_def image_def
    by (smt (verit) glb_def inf_glb lower_bounds_def lub_def sup_lub upper_bounds_def)
  from lr rl show ?thesis by blast
qed

text‹Thus we have that ANTI, nADDI-b/inADDI-b and nMULT-a/inMULT-a are all equivalent.›
lemma ANTI_inADDIb: "inADDIb φ = ANTI φ" unfolding ANTI_nADDIb inADDIb_equ by simp
lemma ANTI_inMULTa: "inMULTa φ = ANTI φ" unfolding ANTI_nMULTa inMULTa_equ by simp


text‹Below we prove several duality relationships between inADDI(a/b) and inMULT(a/b).›

text‹Duality between inMULT-a and inADDI-b (an easy corollary from the previous equivalence).›
lemma inMULTa_inADDIb_dual1: "inMULTa φ = inADDIb φd" by (simp add: nMULTa_nADDIb_dual1 inADDIb_equ inMULTa_equ)
lemma inMULTa_inADDIb_dual2: "inADDIb φ = inMULTa φd" by (simp add: nMULTa_nADDIb_dual2 inADDIb_equ inMULTa_equ)
text‹Duality between inADDI-a and inMULT-b.›
lemma inADDIa_inMULTb_dual1: "inADDIa φ = inMULTb φd" by (smt (z3) BA_cmpl_equ BA_cp dualcompl_invol inADDI_a_def iDM_a inMULT_b_def im_prop1 op_dual_def setequ_ext)
lemma inADDIa_inMULTb_dual2: "inMULTb φ = inADDIa φd" by (simp add: dual_invol inADDIa_inMULTb_dual1)
text‹Duality between inADDI and inMULT.›
lemma inADDI_inMULT_dual1: "inADDI φ = inMULT φd" using inADDI_char inADDIa_inMULTb_dual1 inMULT_char inMULTa_inADDIb_dual2 by blast
lemma inADDI_inMULT_dual2: "inMULT φ = inADDI φd" by (simp add: dual_invol inADDI_inMULT_dual1)

text‹inADDI and inMULT are the 'complements' of iADDI and iMULT respectively.›
lemma inADDIa_compl: "iADDIa φ = inADDIa φ-" by (metis BA_cmpl_equ BA_cp iADDI_a_def iDM_a im_prop2 inADDI_a_def setequ_ext svfun_compl_def)
lemma inADDIb_compl: "iADDIb φ = inADDIb φ-" by (simp add: ANTI_MONO ANTI_inADDIb MONO_iADDIb)
lemma inADDI_compl: "iADDI φ = inADDI φ-" by (simp add: iADDI_char inADDI_char inADDIa_compl inADDIb_compl)
lemma inMULTa_compl: "iMULTa φ = inMULTa φ-" by (simp add: ANTI_MONO ANTI_inMULTa MONO_iMULTa)
lemma inMULTb_compl: "iMULTb φ = inMULTb φ-" by (metis dual_compl_char1 dual_compl_char2 iADDIa_iMULTb_dual2 inADDIa_compl inADDIa_inMULTb_dual2)
lemma inMULT_compl: "iMULT φ = inMULT φ-" by (simp add: iMULT_char inMULT_char inMULTa_compl inMULTb_compl)

text‹In fact, infinite anti-additivity (anti-multiplicativity) entails (dual) anti-normality:›
lemma inADDI_nNORM: "inADDI φ  nNORM φ" by (metis bottom_def inADDI_def inf_empty image_def nNORM_def setequ_ext sup_empty)
lemma inMULT_nDNRM: "inMULT φ  nDNRM φ" by (simp add: inADDI_inMULT_dual2 inADDI_nNORM nNOR_dual2)

end