lean4-htt/tests/lean/run/bv_substructure.lean
Tobias Grosser c0617da18d
feat: support at in ac_nf and use it in bv_normalize (#5618)
... while at it also call `trivial` to close goals that can be trivially
closed.

---------

Co-authored-by: Siddharth <siddu.druid@gmail.com>
Co-authored-by: Henrik Böving <hargonix@gmail.com>
2024-10-07 11:37:17 +00:00

29 lines
919 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Std.Tactic.BVDecide
open BitVec
set_option bv.ac_nf false
theorem substructure_unit_1 (x y z : BitVec 8) : ((x = y) ∧ (y = z)) ↔ ¬(¬(x =y) (¬(y = z))) := by
bv_decide
theorem substructure_unit_1' (x y z : BitVec 8) : ((x = y) && (y = z)) ↔ ¬(¬(x = y) || (!(y = z))) := by
bv_decide
theorem substructure_unit_1'' (x y z : BitVec 8) : (Bool.and (x = y) (y = z)) ↔ ¬(Bool.or (!(x = y)) (Bool.not (y = z))) := by
bv_decide
theorem substructure_unit_2 (x y : BitVec 8) : x = y → y = x := by
bv_decide
theorem substructure_unit_3 (x y : BitVec 8) : (x = y) ^^ (y ≠ x) := by
bv_decide
theorem substructure_unit_3' (x y : BitVec 8) : Bool.xor (x = y) (y ≠ x) := by
bv_decide
theorem substructure_unit_4 (a b : Bool) : (a && b) = (b && a) := by
bv_decide
theorem substructure_unit_5 (a : Bool) (b c : BitVec 32) (h1 : b < c ↔ a) (h2 : a = true) : b < c := by
bv_decide