Theory Untyped_Ordered_Resolution
theory Untyped_Ordered_Resolution
imports
First_Order_Clause.Nonground_Order
First_Order_Clause.Nonground_Selection_Function
First_Order_Clause.Tiebreakers
Fresh_Identifiers.Fresh
begin
locale untyped_ordered_resolution_calculus =
nonground_order where
less⇩t = less⇩t and id_subst = id_subst and term_from_ground = "term_from_ground :: 't⇩G ⇒ 't" and
term_vars = term_vars +
nonground_selection_function where
select = select and atom_subst = "(⋅t)" and atom_vars = term.vars and term_vars = term_vars and
atom_from_ground = term.from_ground and atom_to_ground = term.to_ground and id_subst = id_subst +
tiebreakers tiebreakers +
"term": exists_imgu where vars = term_vars and subst = "(⋅t)" and id_subst = id_subst
for
select :: "'t select" and
less⇩t :: "'t ⇒ 't ⇒ bool" and
tiebreakers :: "('t⇩G, 't) tiebreakers" and
id_subst :: 'subst and
term_vars :: "'t ⇒ ('v :: infinite) set"
begin
inductive factoring :: "'t clause ⇒ 't clause ⇒ bool" where
factoringI:
"D = add_mset l⇩1 (add_mset l⇩2 D') ⟹
l⇩1 = Pos t⇩1 ⟹
l⇩2 = Pos t⇩2 ⟹
C = (add_mset l⇩1 D') ⋅ μ ⟹
factoring D C"
if
"select D = {#}"
"is_maximal (l⇩1 ⋅l μ) (D ⋅ μ)"
"term.is_imgu μ {{t⇩1, t⇩2}}"
inductive resolution :: "'t clause ⇒ 't clause ⇒ 't clause ⇒ bool" where
resolutionI:
"E = add_mset l⇩1 E' ⟹
D = add_mset l⇩2 D' ⟹
l⇩1 = Neg t⇩1 ⟹
l⇩2 = Pos t⇩2 ⟹
C = (E' ⋅ ρ⇩1 + D' ⋅ ρ⇩2) ⋅ μ ⟹
resolution D E C"
if
"term.is_renaming ρ⇩1"
"term.is_renaming ρ⇩2"
"clause.vars (E ⋅ ρ⇩1) ∩ clause.vars (D ⋅ ρ⇩2) = {}"
"term.is_imgu μ {{t⇩1 ⋅t ρ⇩1, t⇩2 ⋅t ρ⇩2}}"
"¬ (E ⋅ ρ⇩1 ⊙ μ ≼⇩c D ⋅ ρ⇩2 ⊙ μ)"
"select E = {#} ⟹ is_maximal (l⇩1 ⋅l ρ⇩1 ⊙ μ) (E ⋅ ρ⇩1 ⊙ μ)"
"select E ≠ {#} ⟹ is_maximal (l⇩1 ⋅l ρ⇩1 ⊙ μ) (select E ⋅ ρ⇩1 ⊙ μ)"
"select D = {#}"
"is_strictly_maximal (l⇩2 ⋅l ρ⇩2 ⊙ μ) (D ⋅ ρ⇩2 ⊙ μ)"
abbreviation factoring_inferences where
"factoring_inferences ≡ { Infer [D] C | D C. factoring D C }"
abbreviation resolution_inferences where
"resolution_inferences ≡ { Infer [D, E] C | D E C. resolution D E C }"
definition inferences :: "'t clause inference set" where
"inferences ≡ resolution_inferences ∪ factoring_inferences"
abbreviation bottom :: "'t clause set" where
"bottom ≡ {{#}}"
end
end