Documentation

Foundation.FirstOrder.Arithmetic.Exponential.Pow2

On $\mathrm{Pow2}(x)$ and $\mathrm{BitLen}(x, y)$ #

$\mathrm{Pow2}(n)$ is a property that holds iff $n = 2^i$ for some $i$.

Equations
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem LO.FirstOrder.Arithmetic.Pow2.dvd {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝗢𝗽𝗲𝗻] {a : V} (h : Pow2 a) {r : V} (hr : r a) :
      1 < rr a2 r

      $\mathrm{LenBit} (2^i, a) \iff \text{$i$th-bit of $a$ is $1$}$.

      Equations
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem LO.FirstOrder.Arithmetic.Pow2.mul {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a b : V} (ha : Pow2 a) (hb : Pow2 b) :
          Pow2 (a * b)
          theorem LO.FirstOrder.Arithmetic.Pow2.dvd_of_le {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a b : V} (ha : Pow2 a) (hb : Pow2 b) :
          a ba b
          theorem LO.FirstOrder.Arithmetic.Pow2.two_le {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a : V} (pa : Pow2 a) (ne1 : a 1) :
          2 a
          theorem LO.FirstOrder.Arithmetic.Pow2.le_iff_lt_two {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a b : V} (ha : Pow2 a) (hb : Pow2 b) :
          a b a < 2 * b
          theorem LO.FirstOrder.Arithmetic.Pow2.sq_or_dsq {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a : V} (pa : Pow2 a) :
          ∃ (b : V), a = b ^ 2 a = 2 * b ^ 2
          theorem LO.FirstOrder.Arithmetic.Pow2.sqrt {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a : V} (h : Pow2 a) (hsq : (a) ^ 2 = a) :
          theorem LO.FirstOrder.Arithmetic.Pow2.four_le {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {i : V} (hi : Pow2 i) (lt : 2 < i) :
          4 i
          theorem LO.FirstOrder.Arithmetic.Pow2.mul_add_lt_of_mul_lt_of_pos {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a b p q : V} (hp : Pow2 p) (hq : Pow2 q) (h : a * p < q) (hb : b < p) (hbq : b < q) :
          a * p + b < q
          theorem LO.FirstOrder.Arithmetic.LenBit.mod_pow2 {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a i j : V} (pi : Pow2 i) (pj : Pow2 j) (h : i < j) :
          LenBit i (a % j) LenBit i a
          theorem LO.FirstOrder.Arithmetic.LenBit.add_pow2 {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a i j : V} (pi : Pow2 i) (pj : Pow2 j) (h : i < j) :
          LenBit i (a + j) LenBit i a
          theorem LO.FirstOrder.Arithmetic.LenBit.add_pow2_iff_of_lt {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a i j : V} (pi : Pow2 i) (pj : Pow2 j) (h : a < j) :
          LenBit i (a + j) i = j LenBit i a
          theorem LO.FirstOrder.Arithmetic.lenbit_iff_add_mul {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {i a : V} (hi : Pow2 i) :
          LenBit i a ∃ (k : V), r < i, a = k * (2 * i) + i + r
          theorem LO.FirstOrder.Arithmetic.not_lenbit_iff_add_mul {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {i a : V} (hi : Pow2 i) :
          ¬LenBit i a ∃ (k : V), r < i, a = k * (2 * i) + r
          theorem LO.FirstOrder.Arithmetic.lenbit_mul_add {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {i j a r : V} (pi : Pow2 i) (pj : Pow2 j) (hr : r < j) :
          LenBit (i * j) (a * j + r) LenBit i a
          theorem LO.FirstOrder.Arithmetic.lenbit_sub_pow2_iff_of_lenbit {V : Type u_1} [ORingStructure V] [V↓[ℒₒᵣ] ⊧* 𝗜𝚺₀] {a i j : V} (pi : Pow2 i) (pj : Pow2 j) (h : LenBit j a) :
          LenBit i (a - j) i j LenBit i a