Theory UniformNotation
theory UniformNotation
imports SyntaxAndSemantics
begin
fun FormulaLiteral :: "'b formula ⇒ bool" where
"FormulaLiteral FF = True"
| "FormulaLiteral (¬. FF) = True"
| "FormulaLiteral TT = True"
| "FormulaLiteral (¬. TT) = True"
| "FormulaLiteral (atom P) = True"
| "FormulaLiteral (¬.(atom P)) = True"
| "FormulaLiteral F = False"
fun FormulaNoNo :: "'b formula ⇒ bool" where
"FormulaNoNo (¬. (¬. F)) = True"
| "FormulaNoNo F = False"
fun FormulaAlfa :: "'b formula ⇒ bool" where
"FormulaAlfa (F ∧. G) = True"
| "FormulaAlfa (¬. (F ∨. G)) = True"
| "FormulaAlfa (¬. (F →. G)) = True"
| "FormulaAlfa F = False"
fun FormulaBeta :: "'b formula ⇒ bool" where
"FormulaBeta (F ∨. G) = True"
| "FormulaBeta (¬. (F ∧. G)) = True"
| "FormulaBeta (F →. G) = True"
| "FormulaBeta F = False"
lemma Literal:
assumes "FormulaLiteral F"
shows "F = FF ∨ F = TT ∨ F = (¬. FF) ∨ F = (¬. TT) ∨ (∃n. F = (atom n) ∨ F = (¬. (atom n)))"
using assms
by (induct F rule: FormulaLiteral.induct, auto)
lemma NoNo:
assumes "FormulaNoNo F"
shows "∃G. F = (¬. (¬. G))"
using assms
by (induct F rule: FormulaNoNo.induct, auto)
lemma Alfa:
assumes "FormulaAlfa F"
shows "∃G H. F = (G ∧. H) ∨ F = (¬. (G ∨. H)) ∨ F = (¬. (G →. H))"
using assms
by (induct F rule: FormulaAlfa.induct, auto)
lemma Beta:
assumes "FormulaBeta F"
shows "∃G H. F = (G ∨. H) ∨ F = (¬. (G ∧. H)) ∨ F = (G →. H)"
using assms
by (induct F rule: FormulaBeta.induct, auto)
lemma noLiteralNoNo:
assumes "FormulaLiteral formula"
shows "¬(FormulaNoNo formula)"
using assms Literal NoNo
by (induct formula rule: FormulaLiteral.induct, auto)
lemma noLiteralAlfa:
assumes "FormulaLiteral formula"
shows "¬(FormulaAlfa formula)"
using assms Literal Alfa
by (induct formula rule: FormulaLiteral.induct, auto)
lemma noLiteralBeta:
assumes "FormulaLiteral formula"
shows "¬(FormulaBeta formula)"
using assms Literal Beta
by (induct formula rule: FormulaLiteral.induct, auto)
lemma noAlfaNoNo:
assumes "FormulaAlfa formula"
shows "¬(FormulaNoNo formula)"
using assms Alfa NoNo
by (induct formula rule: FormulaAlfa.induct, auto)
lemma noBetaNoNo:
assumes "FormulaBeta formula"
shows "¬(FormulaNoNo formula)"
using assms Beta NoNo
by (induct formula rule: FormulaBeta.induct, auto)
lemma noAlfaBeta:
assumes "FormulaAlfa formula"
shows "¬(FormulaBeta formula)"
using assms Alfa Beta
by (induct formula rule: FormulaAlfa.induct, auto)
lemma UniformNotation:
"FormulaLiteral F ∨ FormulaNoNo F ∨ FormulaAlfa F ∨ FormulaBeta F"
by (induct F rule: FormulaLiteral.induct,
induct F rule: FormulaNoNo.induct,
induct F rule: FormulaAlfa.induct,
induct F rule: FormulaBeta.induct,
induct F,
auto)