Theory HOL.Alethe_Boolean_Rewrites
theory Alethe_Boolean_Rewrites
imports "Alethe_Boolean_Rewrites_Lemmas"
begin
named_theorems rewrite_bool_double_not_elim ‹automatically_generated›
lemma [rewrite_bool_double_not_elim]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (¬ ¬ t) = t"
by auto
named_theorems rewrite_bool_not_true ‹automatically_generated›
lemma [rewrite_bool_not_true]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (t = False) ⟹ (¬ t) = True"
by auto
named_theorems rewrite_bool_not_false ‹automatically_generated›
lemma [rewrite_bool_not_false]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (t = True) ⟹ (¬ t) = False"
by auto
named_theorems rewrite_bool_eq_true ‹automatically_generated›
lemma [rewrite_bool_eq_true]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (t = True) = t"
by auto
named_theorems rewrite_bool_eq_false ‹automatically_generated›
lemma [rewrite_bool_eq_false]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (t = False) = (¬ t)"
by auto
named_theorems rewrite_bool_eq_nrefl ‹automatically_generated›
lemma [rewrite_bool_eq_nrefl]:
fixes x::"bool"
shows "NO_MATCH cvc_a (undefined x) ⟹ (x = (¬ x)) = False"
by auto
named_theorems rewrite_bool_impl_false1 ‹automatically_generated›
lemma [rewrite_bool_impl_false1]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (t ⟶ False) = (¬ t)"
by auto
named_theorems rewrite_bool_impl_false2 ‹automatically_generated›
lemma [rewrite_bool_impl_false2]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (False ⟶ t) = True"
by auto
named_theorems rewrite_bool_impl_true1 ‹automatically_generated›
lemma [rewrite_bool_impl_true1]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (t ⟶ True) = True"
by auto
named_theorems rewrite_bool_impl_true2 ‹automatically_generated›
lemma [rewrite_bool_impl_true2]:
fixes t::"bool"
shows "NO_MATCH cvc_a (undefined t) ⟹ (True ⟶ t) = t"
by auto
named_theorems rewrite_bool_impl_elim ‹automatically_generated›
lemma [rewrite_bool_impl_elim]:
fixes t::"bool" and s::"bool"
shows "NO_MATCH cvc_a (undefined t s) ⟹ (t ⟶ s) = (¬ t ∨ s)"
by auto
named_theorems rewrite_bool_dual_impl_eq ‹automatically_generated›
lemma [rewrite_bool_dual_impl_eq]:
fixes t::"bool" and s::"bool"
shows "NO_MATCH cvc_a (undefined t s) ⟹ ((t ⟶ s) ∧ (s ⟶ t)) = (t = s)"
by auto
named_theorems rewrite_bool_and_conf ‹automatically_generated›
lemma [rewrite_bool_and_conf]:
fixes xs::"bool cvc_ListVar" and w::"bool" and ys::"bool cvc_ListVar" and zs::"bool cvc_ListVar"
shows "NO_MATCH cvc_a (undefined xs w ys zs) ⟹ cvc_list_left (∧) xs
(w ∧
cvc_list_left (∧) ys (cvc_list_right (∧) (¬ w) zs)) =
False"
apply (cases zs)
apply (cases ys)
apply (cases xs)
subgoal for zss yss xss
apply (simp add: cvc_list_left_transfer cvc_list_right_transfer_op cvc_list_both_transfer_op)
apply (induction zss)
apply simp_all
apply (induction yss)
apply simp_all
apply (induction xss)
apply simp_all
by (simp_all add: bool_and_conf_lemma)
done
named_theorems rewrite_bool_and_conf2 ‹automatically_generated›
lemma [rewrite_bool_and_conf2]:
fixes xs::"bool cvc_ListVar" and w::"bool" and ys::"bool cvc_ListVar" and zs::"bool cvc_ListVar"
shows "NO_MATCH cvc_a (undefined xs w ys zs) ⟹ cvc_list_left (∧) xs
((¬ w) ∧
cvc_list_left (∧) ys (cvc_list_right (∧) w zs)) =
False"
apply (cases zs)
apply (cases ys)
apply (cases xs)
subgoal for zss yss xss
apply (simp add: cvc_list_left_transfer cvc_list_right_transfer_op cvc_list_both_transfer_op)
apply (induction zss)
apply simp_all
apply (induction yss)
apply simp_all
apply (induction xss)
apply simp_all
apply (simp_all add: bool_and_conf2_lemma)
by force
done
named_theorems rewrite_bool_or_taut ‹automatically_generated›
lemma [rewrite_bool_or_taut]:
fixes xs::"bool cvc_ListVar" and w::"bool" and ys::"bool cvc_ListVar" and zs::"bool cvc_ListVar"
shows "NO_MATCH cvc_a (undefined xs w ys zs) ⟹ cvc_list_left (∨) xs
(w ∨
cvc_list_left (∨) ys (cvc_list_right (∨) (¬ w) zs)) =
True"
apply (cases zs)
apply (cases ys)
apply (cases xs)
subgoal for zss yss xss
apply (simp add: cvc_list_left_transfer cvc_list_right_transfer_op cvc_list_both_transfer_op)
apply (induction zss)
apply simp_all
apply (induction yss)
apply simp_all
apply (induction xss)
apply simp_all
by (simp_all add: bool_or_taut_lemma)
done
named_theorems rewrite_bool_or_taut2 ‹automatically_generated›
lemma [rewrite_bool_or_taut2]:
fixes xs::"bool cvc_ListVar" and w::"bool" and ys::"bool cvc_ListVar" and zs::"bool cvc_ListVar"
shows "NO_MATCH cvc_a (undefined xs w ys zs) ⟹ cvc_list_left (∨) xs
((¬ w) ∨
cvc_list_left (∨) ys (cvc_list_right (∨) w zs)) =
True"
apply (cases zs)
apply (cases ys)
apply (cases xs)
subgoal for zss yss xss
by (simp add: cvc_list_left_transfer cvc_list_right_transfer_op cvc_list_both_transfer_op)
done
named_theorems rewrite_bool_or_de_morgan ‹automatically_generated›
lemma [rewrite_bool_or_de_morgan]:
fixes zs :: "bool cvc_ListVar" and y :: "bool" and x :: "bool"
shows "NO_MATCH cvc_a (undefined x y zs) ⟹ (¬ (x ∨ cvc_list_right (∨) y zs)) =
(¬ x ∧ ¬ cvc_list_right (∨) y zs)"
apply simp ?
done
named_theorems rewrite_bool_implies_de_morgan ‹automatically_generated›
lemma [rewrite_bool_implies_de_morgan]:
fixes y :: "bool" and x :: "bool"
shows "NO_MATCH cvc_a (undefined x y) ⟹ (¬ (x ⟶ y)) = (x ∧ ¬ y)"
apply simp ?
done
named_theorems rewrite_bool_and_de_morgan ‹automatically_generated›
lemma [rewrite_bool_and_de_morgan]:
fixes zs :: "bool cvc_ListVar" and y :: "bool" and x :: "bool"
shows "NO_MATCH cvc_a (undefined x y zs) ⟹ (¬ (x ∧ cvc_list_right (∧) y zs)) =
(¬ x ∨ ¬ cvc_list_right (∧) y zs)"
apply simp ?
done
named_theorems rewrite_bool_or_and_distrib ‹automatically_generated›
lemma [rewrite_bool_or_and_distrib]:
fixes zs :: "bool cvc_ListVar" and ys :: "bool cvc_ListVar" and y2 :: "bool" and y1 :: "bool" and z1 :: "bool"
shows "NO_MATCH cvc_a (undefined y1 y2 ys z1 zs) ⟹
((y1 ∧ cvc_list_right (∧) y2 ys) ∨ (cvc_list_right (∨) z1 zs)) =
((y1 ∨ cvc_list_right (∨) z1 zs) ∧
((cvc_list_right (∧) y2 ys) ∨ cvc_list_right (∨) z1 zs))"
apply (cases zs)
apply (cases ys)
subgoal for zss yss
apply (simp add: cvc_list_left_transfer cvc_list_right_transfer_op cvc_list_both_transfer_op)
by (simp_all add: bool_or_and_distrib_lemma)
done
named_theorems rewrite_bool_implies_or_distrib ‹automatically_generated›
lemma [rewrite_bool_implies_or_distrib]:
fixes y1 :: "bool" and y2 :: "bool" and ys :: "bool cvc_ListVar" and z :: "bool"
shows "NO_MATCH cvc_a (undefined y1 y2 ys z) ⟹ (y1 ∨ cvc_list_right (∨) y2 ys ⟶ z) =
((y1 ⟶ z) ∧
(cvc_list_right (∨) y2 ys ⟶ z))"
apply simp ?
done
named_theorems rewrite_bool_xor_refl ‹automatically_generated›
lemma [rewrite_bool_xor_refl]:
fixes x::"bool"
shows "NO_MATCH cvc_a (undefined x) ⟹ (x ≠ x) = False"
by auto
named_theorems rewrite_bool_xor_nrefl ‹automatically_generated›
lemma [rewrite_bool_xor_nrefl]:
fixes x::"bool"
shows "NO_MATCH cvc_a (undefined x) ⟹ (x ≠ (¬ x)) = True"
by auto
named_theorems rewrite_bool_xor_false ‹automatically_generated›
lemma [rewrite_bool_xor_false]:
fixes x::"bool"
shows "NO_MATCH cvc_a (undefined x) ⟹ (x ≠ False) = x"
by auto
named_theorems rewrite_bool_xor_true ‹automatically_generated›
lemma [rewrite_bool_xor_true]:
fixes x::"bool"
shows "NO_MATCH cvc_a (undefined x) ⟹ (x ≠ True) = (¬ x)"
by auto
named_theorems rewrite_bool_xor_comm ‹automatically_generated›
lemma [rewrite_bool_xor_comm]:
fixes x::"bool" and y::"bool"
shows "NO_MATCH cvc_a (undefined x y) ⟹ (x ≠ y) = (¬(y = x))"
by auto
named_theorems rewrite_bool_xor_elim ‹automatically_generated›
lemma [rewrite_bool_xor_elim]:
fixes x::"bool" and y::"bool"
shows "NO_MATCH cvc_a (undefined x y) ⟹ (x ≠ y) = ((¬x) = y)"
by auto
named_theorems rewrite_bool_not_xor_elim ‹automatically_generated›
lemma [rewrite_bool_not_xor_elim]:
fixes y :: "bool" and x :: "bool"
shows "NO_MATCH cvc_a (undefined x y) ⟹ (¬ (x ≠ y)) = (x = y)"
apply simp ?
done
named_theorems rewrite_bool_not_eq_elim1 ‹automatically_generated›
lemma [rewrite_bool_not_eq_elim1]:
fixes y :: "bool" and x :: "bool"
shows "NO_MATCH cvc_a (undefined x y) ⟹ (x ≠ y) = ((¬ x) = y)"
apply simp ?
apply auto ?
done
named_theorems rewrite_bool_not_eq_elim2 ‹automatically_generated›
lemma [rewrite_bool_not_eq_elim2]:
fixes y :: "bool" and x :: "bool"
shows "NO_MATCH cvc_a (undefined x y) ⟹ (x ≠ y) = (x = (¬ y))"
apply simp ?
apply auto ?
done
named_theorems rewrite_ite_neg_branch ‹automatically_generated›
lemma [rewrite_ite_neg_branch]:
fixes c::"bool" and x::"bool" and y::"bool"
shows "NO_MATCH cvc_a (undefined c x y) ⟹ (¬ y) = x ⟶ (if c then x else y) = (c = x)"
by auto
named_theorems rewrite_ite_then_true ‹automatically_generated›
lemma [rewrite_ite_then_true]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then True else x) = (c ∨ x)"
by auto
named_theorems rewrite_ite_else_false ‹automatically_generated›
lemma [rewrite_ite_else_false]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then x else False) = (c ∧ x)"
by auto
named_theorems rewrite_ite_then_false ‹automatically_generated›
lemma [rewrite_ite_then_false]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then False else x) = (¬ c ∧ x)"
by auto
named_theorems rewrite_ite_else_true ‹automatically_generated›
lemma [rewrite_ite_else_true]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then x else True) = (¬ c ∨ x)"
by auto
named_theorems rewrite_ite_then_lookahead_self ‹automatically_generated›
lemma [rewrite_ite_then_lookahead_self]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then c else x) = (if c then True else x)"
by auto
named_theorems rewrite_ite_else_lookahead_self ‹automatically_generated›
lemma [rewrite_ite_else_lookahead_self]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then x else c) = (if c then x else False)"
by auto
named_theorems rewrite_ite_then_lookahead_not_self ‹automatically_generated›
lemma [rewrite_ite_then_lookahead_not_self]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then ¬c else x) = (if c then False else x)"
by auto
named_theorems rewrite_ite_else_lookahead_not_self ‹automatically_generated›
lemma [rewrite_ite_else_lookahead_not_self]:
fixes c::"bool" and x::"bool"
shows "NO_MATCH cvc_a (undefined c x) ⟹ (if c then x else ¬c) = (if c then x else True)"
by auto
named_theorems rewrite_ite_expand ‹automatically_generated›
lemma [rewrite_ite_expand]:
fixes c::"bool" and x::"bool" and y::"bool"
shows "NO_MATCH cvc_a (undefined c x y) ⟹ (if c then x else y) = ((¬c ∨ x) ∧ (c ∨ y))"
by auto
named_theorems rewrite_bool_not_ite_elim ‹automatically_generated›
lemma [rewrite_bool_not_ite_elim]:
fixes c::"bool" and x::"bool" and y::"bool"
shows "NO_MATCH cvc_a (undefined c x y) ⟹ (¬(if c then x else y)) = (if c then ¬x else ¬y)"
by auto
end