Documentation

SSA.Projects.InstCombine.HackersDelight

theorem HackersDelight.Ch2Basics.sub_abs_ule_xor {x : BitVec 32} {y : BitVec 32} :
(x ^^^ y ≥ᵤ (x - y).abs) = true
theorem HackersDelight.Ch2Basics.eq_iff_abs_sub_sub {x : BitVec 32} {y : BitVec 32} :
x = y ((x - y).abs - 1).msb = true
theorem HackersDelight.Ch2Basics.eq_iff_not_sub_or_sub {x : BitVec 32} {y : BitVec 32} :
x = y (~~~(x - y ||| y - x)).msb = true
theorem HackersDelight.Ch2Basics.neq_iff_sub_or_sub {x : BitVec 32} {y : BitVec 32} :
x y (x - y ||| y - x).msb = true
theorem HackersDelight.Ch2Basics.neq_iff_neg_sub_abs {x : BitVec 32} {y : BitVec 32} :
x y (-(x - y).abs).msb = true
theorem HackersDelight.Ch2Basics.lt_iff_sub_xor_xor_and_sub_xor {x : BitVec 32} {y : BitVec 32} :
(y >ₛ x) = true (x - y ^^^ (x ^^^ y) &&& (x - y ^^^ x)).msb = true
theorem HackersDelight.Ch2Basics.slt_iff_add_two_pow_ult_add_two_pow {x : BitVec 32} {y : BitVec 32} {w : } :
(y >ₛ x) = true (y + 2 ^ (w - 1) >ₛ x + 2 ^ (w - 1)) = true
theorem HackersDelight.Ch2Basics.ult_iff_sub_two_pow_ult_sub_two_pow {x : BitVec 32} {y : BitVec 32} {w : } :
(y >ᵤ x) = true (y - 2 ^ (w - 1) >ₛ x - 2 ^ (w - 1)) = true
theorem HackersDelight.Ch2Basics.sle_iff_add_two_pow_ule_add_two_pow {x : BitVec 32} {y : BitVec 32} {w : } :
(y ≥ₛ x) = true (y + 2 ^ (w - 1) ≥ᵤ x + 2 ^ (w - 1)) = true
theorem HackersDelight.Ch2Basics.slt_iff_not_adc_add_sub_neg_add_sub {x : BitVec 32} {y : BitVec 32} {w : } :
(y >ₛ x) = true ¬BitVec.carry w (x + 2 ^ (w - 1)) (~~~(y + 2 ^ (w - 1)) + 1) false = true
theorem HackersDelight.Ch2Basics.sle_iff_not_adc_not_add_sub_xor_sub {x : BitVec 32} {y : BitVec 32} {w : } :
(y >ₛ x) = true (!BitVec.carry w x (~~~y + 1) false ^^^ x.getMsbD (w - 1) ^^^ y.getMsbD (w - 1)) = true
theorem HackersDelight.Ch2Basics.sle_iff_adc_add_sub_neg_add_sub {x : BitVec 32} {y : BitVec 32} {w : } :
(y ≥ₛ x) = true BitVec.carry w (y + 2 ^ (w - 1)) (~~~(x + 2 ^ (w - 1)) + 1) false = true
theorem HackersDelight.Ch2Basics.sle_iff_adc_not_add_sub_sub {x : BitVec 32} {y : BitVec 32} {w : } :
(y ≥ₛ x) = true BitVec.carry w y (~~~x + 1) false ^^^ x.getMsbD (w - 1) ^^^ y.getMsbD (w - 1) = true
Equations
Instances For
    Equations
    Instances For
      Equations
      Instances For
        Equations
        Instances For
          Equations
          Instances For
            Equations
            Instances For
              Equations
              Instances For
                Equations
                Instances For