Documentation

LeanPool.FormalizationOfBoundedArithmetic.V0StrSuccAssoc

LeanPool.FormalizationOfBoundedArithmetic.V0StrSuccAssoc #

theorem Xor.true1 {P Q R : Prop} :
P → (Xor (Xor P Q) R ¬Xor Q R)
theorem Xor.true2 {P Q R : Prop} :
Q → (Xor (Xor P Q) R ¬Xor P R)
theorem in_iff_not_notin {num str : Type} [M : V0ExtModel num str] {X : str} {j : num} :
j X ¬jX
def LowestOrderZero {num str : Type} [M : V0ExtModel num str] (X : str) (m : num) :

m is the least position below the string length where X has no bit.

Equations
Instances For
    theorem exists_lowest_order_zero {num str : Type} [M : V0ExtModel num str] (X : str) :
    ∃ (m : num), LowestOrderZero X m
    def LowestOrderOne {num str : Type} [M : V0ExtModel num str] (X : str) (m : num) :

    m is the least position below the string length where X has a bit.

    Equations
    Instances For
      theorem exists_lowest_order_one {num str : Type} [M : V0ExtModel num str] {X : str} :
      theorem succ_le_of_lt {num str : Type} [M : V0ExtModel num str] {a b : num} (h : a < b) :
      a + 1 b

      The discrete-successor step: a < b upgrades to a + 1 ≤ b.

      theorem succ_bit_eq {num str : Type} [M : V0ExtModel num str] {X : str} {m : num} :
      theorem succ_bit_lt {num str : Type} [M : V0ExtModel num str] {X : str} {m : num} :
      LowestOrderZero X mi < m, iHasSucc.succ X
      theorem succ_bit_gt {num str : Type} [M : V0ExtModel num str] {X : str} {m : num} :
      LowestOrderZero X mi > m, i HasSucc.succ X i X
      theorem aux1 {num str : Type} [M : V0ExtModel num str] {X : str} {y min : num} :
      LowestOrderZero X miny < miny X
      theorem len_succ_pos {num str : Type} [M : V0ExtModel num str] {X : str} :
      theorem lsb_not_succ {num str : Type} [M : V0ExtModel num str] {X : str} :
      0 X 0HasSucc.succ X
      theorem all_lt_mem_of_not_mem_of_mem_succ {num str : Type} [M : V0ExtModel num str] {X : str} {i : num} :
      iXi HasSucc.succ Xj < i, j X
      theorem all_lt_not_mem_of_not_carry_of_all_lt_mem {num str : Type} [M : V0ExtModel num str] {X Y : str} {i : num} :
      ¬Carry i X Y(∀ j < i, j Y)j < i, jX
      theorem all_lt_not_carry_of_not_carry_of_all_lt_mem {num str : Type} [M : V0ExtModel num str] {X Y : str} {i : num} :
      ¬Carry i X Y(∀ j < i, j Y)j < i, ¬Carry j X Y
      theorem all_lt_not_mem_of_all_lt_mem_add_of_all_lt_mem {num str : Type} [M : V0ExtModel num str] {X Y : str} {i : num} :
      (∀ j < i, j Y)(∀ j < i, j X + Y)j < i, jX
      theorem not_carry_of_all_lt_mem_add_of_all_lt_mem {num str : Type} [M : V0ExtModel num str] {X Y : str} {i : num} :
      (∀ j < i, j Y)(∀ j < i, j X + Y)¬Carry i X Y
      theorem not_carry_of_all_lt_mem_add {num str : Type} [M : V0ExtModel num str] {X Y : str} {i : num} :
      (∀ j < i, j X + Y)¬Carry i X Y
      theorem all_lt_not_carry_of_all_lt_mem_add {num str : Type} [M : V0ExtModel num str] {X Y : str} {i : num} :
      (∀ j < i, j X + Y)j < i, ¬Carry j X Y
      theorem carry_succ_of_all_lt_mem_add_of_lowest_zero_lt {num str : Type} [M : V0ExtModel num str] {X Y : str} {m i : num} :
      LowestOrderZero Y mm < i(∀ j < i, j X + Y)Carry i X (HasSucc.succ Y)
      theorem prefix_zero_contradiction_of_not_carry_of_all_lt_mem {num str : Type} [M : V0ExtModel num str] {X Y : str} {i : num} :
      i < FirstOrder.Language.HasLen.len X + FirstOrder.Language.HasLen.len Y(∃ j < i, jX + Y)¬Carry i X Y(∀ j < i, j Y)False
      theorem not_lt_lowest_zero_of_prefix_zero_of_not_carry {num str : Type} [M : V0ExtModel num str] {X Y : str} {m i : num} :
      LowestOrderZero Y mi < FirstOrder.Language.HasLen.len X + FirstOrder.Language.HasLen.len Y(∃ j < i, jX + Y)¬Carry i X Y¬i < m
      theorem not_carry_succ_of_lowest_zero_ge {num str : Type} [M : V0ExtModel num str] {X Y : str} {m i : num} :
      LowestOrderZero Y mi m¬Carry i X (HasSucc.succ Y)
      theorem carry_succ_of_carry_of_lowest_zero_lt {num str : Type} [M : V0ExtModel num str] {X Y : str} {m i : num} :
      LowestOrderZero Y mm < iCarry i X YCarry i X (HasSucc.succ Y)
      theorem not_carry_succ_of_prefix_zero_of_not_carry_of_lowest_zero_lt {num str : Type} [M : V0ExtModel num str] {X Y : str} {m i : num} :
      LowestOrderZero Y mm < i(∃ j < i, jX + Y)¬Carry i X Y¬Carry i X (HasSucc.succ Y)
      theorem not_mem_add_succ_of_not_mem_add_of_prefix_zero {num str : Type} [M : V0ExtModel num str] {X Y : str} {y : num} :
      yX + Y(∃ j < y, jX + Y)yX + HasSucc.succ Y
      theorem not_mem_add_succ_of_mem_add_of_prefix_one {num str : Type} [M : V0ExtModel num str] {X Y : str} {y : num} :
      y X + Y(∀ j < y, j X + Y)yX + HasSucc.succ Y
      theorem add_succ_of_succ_add_zero {num str : Type} [M : V0ExtModel num str] {X Y : str} {y : num} :
      y = 0y HasSucc.succ (X + Y)y X + HasSucc.succ Y
      theorem add_succ_of_succ_add_of_mem_add {num str : Type} [M : V0ExtModel num str] {X Y : str} {y pred_y : num} :
      pred_y + 1 = yy X + Y(∃ j < y, jX + Y)y X + HasSucc.succ Y
      theorem add_succ_of_succ_add {num str : Type} [M : V0ExtModel num str] {X Y : str} {y : num} :
      y HasSucc.succ (X + Y)y X + HasSucc.succ Y
      theorem succ_add_of_add_succ {num str : Type} [M : V0ExtModel num str] {X Y : str} {y : num} :
      y X + HasSucc.succ Yy HasSucc.succ (X + Y)
      theorem str_succ_assoc {num str : Type} [M : V0ExtModel num str] {X Y : str} :
      theorem str_succ_assoc_strengthened_v0 {num str : Type} [M : V0ExtModel num str] {X Y : str} :

      Named alias emphasizing that this theorem is conditional on the strengthened V0 extension.