Theory MLSS_Logic

theory MLSS_Logic
  imports Main
begin

section ‹Propositional formulae›
text ‹
  This theory contains syntax and semantics of propositional formulae.
›

datatype (atoms: 'a) fm =
  is_Atom: Atom 'a | And "'a fm" "'a fm" | Or "'a fm" "'a fm" |
  Neg "'a fm"

fun "interp" :: "('model  'a  bool)  'model  'a fm  bool" where
  "interp Ia M (Atom a) = Ia M a" |
  "interp Ia M (And φ1 φ2) = (interp Ia M φ1  interp Ia M φ2)" |
  "interp Ia M (Or φ1 φ2) = (interp Ia M φ1  interp Ia M φ2)" |
  "interp Ia M (Neg φ) = (¬ interp Ia M φ)"

locale ATOM =
  fixes Ia :: "'model  'a  bool"
begin

abbreviation I where "I  interp Ia"

end

definition "Atoms A  {a |a. Atom a  A}"

lemma Atoms_Un[simp]: "Atoms (A  B) = Atoms A  Atoms B"
  unfolding Atoms_def by auto

lemma Atoms_mono: "A  B  Atoms A  Atoms B"
  unfolding Atoms_def by auto

end