Theory Instance
chapter ‹The Instantiation›
theory Instance
imports Goedel_Incompleteness.Abstract_Second_Goedel Quote Goedel_I
begin
definition "Fvars t = {a :: name. ¬ atom a ♯ t}"
lemma Fvars_tm_simps[simp]:
"Fvars Zero = {}"
"Fvars (Var a) = {a}"
"Fvars (Eats x y) = Fvars x ∪ Fvars y"
by (auto simp: Fvars_def fresh_at_base(2))
lemma finite_Fvars_tm[simp]:
fixes t :: tm
shows "finite (Fvars t)"
by (induct t rule: tm.induct) auto
lemma Fvars_fm_simps[simp]:
"Fvars (x IN y) = Fvars x ∪ Fvars y"
"Fvars (x EQ y) = Fvars x ∪ Fvars y"
"Fvars (A OR B) = Fvars A ∪ Fvars B"
"Fvars (A AND B) = Fvars A ∪ Fvars B"
"Fvars (A IMP B) = Fvars A ∪ Fvars B"
"Fvars Fls = {}"
"Fvars (Neg A) = Fvars A"
"Fvars (Ex a A) = Fvars A - {a}"
"Fvars (All a A) = Fvars A - {a}"
by (auto simp: Fvars_def fresh_at_base(2))
lemma finite_Fvars_fm[simp]:
fixes A :: fm
shows "finite (Fvars A)"
by (induct A rule: fm.induct) auto
lemma subst_tm_subst_tm[simp]:
"x ≠ y ⟹ atom x ♯ u ⟹ subst y u (subst x t v) = subst x (subst y u t) (subst y u v)"
by (induct v rule: tm.induct) auto
lemma subst_fm_subst_fm[simp]:
"x ≠ y ⟹ atom x ♯ u ⟹ (A(x::=t))(y::=u) = (A(y::=u))(x::=subst y u t)"
by (nominal_induct A avoiding: x t y u rule: fm.strong_induct) auto
lemma Fvars_ground_aux: "Fvars t ⊆ B ⟹ ground_aux t (atom ` B)"
by (induct t rule: tm.induct) auto
lemma ground_Fvars: "ground t ⟷ Fvars t = {}"
apply (rule iffI)
apply (auto simp only: Fvars_def ground_fresh) []
apply (auto intro: Fvars_ground_aux[of t "{}", simplified])
done
lemma Fvars_ground_fm_aux: "Fvars A ⊆ B ⟹ ground_fm_aux A (atom ` B)"
apply (induct A arbitrary: B rule: fm.induct)
apply (auto simp: Diff_subset_conv Fvars_ground_aux)
apply (drule meta_spec, drule meta_mp, assumption)
apply auto
done
lemma ground_fm_Fvars: "ground_fm A ⟷ Fvars A = {}"
apply (rule iffI)
apply (auto simp only: Fvars_def ground_fresh) []
apply (auto intro: Fvars_ground_fm_aux[of A "{}", simplified])
done