P826_T1_LeftCapacityStep

Lean checked

Statement

This explanation was written alongside the formalization to describe the statement and its reasoning.

Helper · One-step left-normalization capacity inequality

Let p,p' be integer decimal points, let k be a machine-size shift, and let z,z' be the input and output leading digits. Suppose p\leq0 and the selector has one of the following exact forms: if p<0, it is the extracted selector at the machine natural n=-p; if p=0 and z<5, it is k=2 for z=1 and k=1 otherwise. Suppose also that the point and leading digit transition obeys all of these clauses:
\begin{array}{ll} p\leq-19&\Longrightarrow p'=p+18\text{ or }p+19,\\ -18\leq p<0&\Longrightarrow p'=-1\text{ or }0,\\ p=p'=-1&\Longrightarrow z'\geq7,\\ p=-1,\ z\geq7&\Longrightarrow p'=0\text{ and }z'\geq5,\\ p=0&\Longrightarrow p'=0,\quad z\leq2\Longrightarrow z'\geq3,\quad z\geq3\Longrightarrow z'\geq5. \end{array}
Define
H(p,z)= \begin{cases} 36,&p=-1, z\geq7,\\ 27,&p=-1, z<7,\\ 36,&p=0, z\geq5,\\ 33,&p=0, 3\leq z<5,\\ 27,&p=0, z<3,\\ 0,&\text{otherwise}. \end{cases}
Then
H(p,z)+3k\leq H(p',z')+10(p'-p).
Here machine naturals are interpreted by their exact integer values.

Lean statement

Trellis authored these statements and proofs. Lean checks the formal proofs; the assumptions used by each proof are listed below.

import Tablet.P826_T1_LeftStepCertificate
import Mathlib.Tactic.IntervalCases

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: P826_T1_LeftCapacityStep]
theorem P826_T1_LeftCapacityStep
    (p p' : Int) (k : Std.Usize) (z z' : Nat)
    (hpHi : p <= 0)
    (hsel :
      (p < 0 /\ exists n : Std.Usize,
        (n.val : Int) = -p /\
        num.imp.dec2flt.slow.parse_long_mantissa.closure.Insts.CoreOpsFunctionFnTupleUsizeUsize.call
          F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 () n =
            ok k) \/
      (p = 0 /\ z < 5 /\
        k =
          if z = 1 then 2#usize else 1#usize))
    (hlarge : p <= -19 -> p' = p + 18 \/ p' = p + 19)
    (hsmall : -18 <= p -> p < 0 -> p' = -1 \/ p' = 0)
    (hstall : p = -1 -> p' = -1 -> 7 <= z')
    (hrecover : p = -1 -> 7 <= z -> p' = 0 /\ 5 <= z')
    (hzero : p = 0 -> p' = 0 /\
      (z <= 2 -> 3 <= z') /\ (3 <= z -> 5 <= z')) :
    let bonus : Int -> Nat -> Int := fun (q : Int) (w : Nat) =>
      if q = -1 then (if 7 <= w then 36 else 27)
      else if q = 0 then
        (if 5 <= w then 36 else if 3 <= w then 33 else 27)
      else 0
    bonus p z + 3 * (k.val : Int) <=
      bonus p' z' + 10 * (p' - p) := by
Proof

Natural-language proof

The status above describes the Lean proof. Its explanatory prose may remain a sketch after that proof closes.

Explanatory prose status

Prose retained as authored. The explanatory prose is preserved as it stood when captured.

Proof

The exact selector values are supplied by SlowShiftSelectorCertificate. First suppose p\leq-19. Then n=-p\geq19, so the fallback selector is k=60. Since H(p,z)=0 and H(p',z')\geq0, point growth 18 gives 3k=180=10\cdot18 and growth 19 only increases the right side.
At p=-1, the table gives k=3. If p'=-1, the stalled-transition hypothesis gives z'\geq7. The recovery hypothesis rules out z\geq7 in this subcase, so the bonuses are 27 and 36 and the inequality is 27+9\leq36. If p'=0 and z\geq7, recovery gives z'\geq5, so it is 36+9\leq36+10. If instead z<7, the input bonus is 27 and the output bonus is at least 27, which again suffices after the point grows by one.
At p=0, the point stays zero. For z\leq2, the output digit is at least three, so its bonus is at least 33. The exceptional selector k=2 occurs only at z=1 and gives 27+6\leq33; all other such inputs use k=1 and give 27+3\leq33. For 3\leq z<5, the input bonus is 33, the output digit is at least five, and k=1, giving 33+3\leq36.
It remains that -18\leq p\leq-2. Thus n=-p ranges from 2 through 18, and the input bonus is zero. The two possible output points have bonus at least 27. Substituting the literal selector row from SlowShiftSelectorCertificate, direct integer evaluation gives
3k(n)\leq10n\leq27+10(n-1)
for every 2\leq n\leq18. If p'=0, the available point growth is n rather than n-1, so the same estimate is stronger than required. These cases exhaust p\leq0 and prove the claimed inequality.

Lean proof


  dsimp only
  let bonus : Int -> Nat -> Int := fun (q : Int) (w : Nat) =>
    if q = -1 then (if 7 <= w then 36 else 27)
    else if q = 0 then
      (if 5 <= w then 36 else if 3 <= w then 33 else 27)
    else 0
  change bonus p z + 3 * (k.val : Int) <=
      bonus p' z' + 10 * (p' - p)
  have hbonusNonneg (q : Int) (w : Nat) : 0 <= bonus q w := by
    simp only [bonus]
    split_ifs <;> omega
  by_cases hp19 : p <= -19
  · rcases hlarge hp19 with hp' | hp'
    · have hpne1 : p ≠ -1 := by omega
      have hpne0 : p ≠ 0 := by omega
      simp only [bonus, hpne1, hpne0, if_false]
      have hk : k = 60#usize := by
        rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
        · have hc := SlowShiftSelectorCertificate
            F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
          dsimp only at hc
          rcases hc with ⟨hcall', _, _, _, hbig⟩
          have hn19 : 19 <= n.val := by omega
          have hkeq := Result.ok.inj (hcall.symm.trans hcall')
          have hkval : k.val = 60 := by
            rw [hkeq]
            exact (hbig hn19).1
          apply UScalar.eq_of_val_eq
          simpa [UScalar.cast_val_eq] using hkval
        · exfalso
          omega
      have hk' : k.val = 60 := by
        rw [hk]
        norm_num [UScalar.cast_val_eq]
      have := hbonusNonneg p' z'
      omega
    · have hpne1 : p ≠ -1 := by omega
      have hpne0 : p ≠ 0 := by omega
      simp only [bonus, hpne1, hpne0, if_false]
      have hk : k = 60#usize := by
        rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
        · have hc := SlowShiftSelectorCertificate
            F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
          dsimp only at hc
          rcases hc with ⟨hcall', _, _, _, hbig⟩
          have hn19 : 19 <= n.val := by omega
          have hkeq := Result.ok.inj (hcall.symm.trans hcall')
          have hkval : k.val = 60 := by
            rw [hkeq]
            exact (hbig hn19).1
          apply UScalar.eq_of_val_eq
          simpa [UScalar.cast_val_eq] using hkval
        · omega
      have hk' : k.val = 60 := by
        rw [hk]
        norm_num [UScalar.cast_val_eq]
      have := hbonusNonneg p' z'
      omega
  · by_cases hpm1 : p = -1
    · subst p
      have hp' : p' = -1 \/ p' = 0 := hsmall (by omega) (by omega)
      rcases hp' with hp' | hp'
      · have hz'7 := hstall rfl hp'
        have hz7 : z < 7 := by
          by_contra h
          have := hrecover rfl (by omega)
          omega
        have hk : k = 3#usize := by
          rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
          · have hc := SlowShiftSelectorCertificate
              F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
            dsimp only at hc
            have hn1 : n.val = 1 := by omega
            rcases hc with ⟨hcall', _, _, _, _⟩
            have hkeq := Result.ok.inj (hcall.symm.trans hcall')
            simpa [hn1] using hkeq
          · omega
        have hk' : k.val = 3 := by
          rw [hk]
          norm_num [UScalar.cast_val_eq]
        have hbin : bonus (-1) z = 27 := by
          simp [bonus, show ¬7 <= z by omega]
        have hbout : bonus (-1) z' = 36 := by
          simp [bonus, hz'7]
        rw [hp', hbin, hbout]
        omega
      · have hk : k = 3#usize := by
          rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
          · have hc := SlowShiftSelectorCertificate
              F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
            dsimp only at hc
            have hn1 : n.val = 1 := by omega
            rcases hc with ⟨hcall', _, _, _, _⟩
            have hkeq := Result.ok.inj (hcall.symm.trans hcall')
            simpa [hn1] using hkeq
          · omega
        have hk' : k.val = 3 := by
          rw [hk]
          norm_num [UScalar.cast_val_eq]
        by_cases hz7 : 7 <= z
        · have hz'5 := (hrecover rfl hz7).2
          have hbin : bonus (-1) z = 36 := by simp [bonus, hz7]
          have hbout : bonus 0 z' = 36 := by simp [bonus, hz'5]
          rw [hp', hbin, hbout]
          omega
        · have hbin : bonus (-1) z = 27 := by simp [bonus, hz7]
          have hbout : 27 <= bonus 0 z' := by
            simp only [bonus, if_false, if_true]
            split_ifs <;> omega
          rw [hp', hbin]
          omega
    · by_cases hp0 : p = 0
      · subst p
        rcases hzero rfl with ⟨hp', hz2, hz3⟩
        rcases hsel with hneg | ⟨_, hz5, hk⟩
        · omega
        · have hkval : k.val = if z = 1 then 2 else 1 := by
            have hv := congrArg UScalar.val hk
            by_cases hz1 : z = 1
            · simpa [hz1, UScalar.cast_val_eq] using hv
            · simpa [hz1, UScalar.cast_val_eq] using hv
          by_cases hz2' : z <= 2
          · have hz'3 := hz2 hz2'
            by_cases hz1 : z = 1
            · have hk2 : k.val = 2 := by simp [hz1] at hkval ⊢; exact hkval
              have hbin : bonus 0 z = 27 := by
                simp [bonus, show ¬5 <= z by omega, show ¬3 <= z by omega]
              have hbout : 33 <= bonus 0 z' := by
                simp [bonus]
                split_ifs <;> omega
              rw [hp', hbin]
              omega
            · have hk1 : k.val = 1 := by simp [hz1] at hkval ⊢; exact hkval
              have hbin : bonus 0 z = 27 := by
                simp [bonus, show ¬5 <= z by omega, show ¬3 <= z by omega]
              have hbout : 33 <= bonus 0 z' := by
                simp [bonus]
                split_ifs <;> omega
              rw [hp', hbin]
              omega
          · have hz3' : 3 <= z := by omega
            have hz'5 := hz3 hz3'
            have hk1 : k.val = 1 := by
              have hz1 : z ≠ 1 := by omega
              simp [hz1] at hkval ⊢
              exact hkval
            have hbin : bonus 0 z = 33 := by simp [bonus, hz3', hz5]
            have hbout : bonus 0 z' = 36 := by simp [bonus, hz'5]
            rw [hp', hbin, hbout]
            omega
      · have hpneg : p < 0 := by omega
        have hp18 : -18 <= p := by omega
        rcases hsel with ⟨_, n, hn, hcall⟩ | hzeroSel
        · have hnLo : 2 <= n.val := by omega
          have hnHi : n.val <= 18 := by omega
          have hc := SlowShiftSelectorCertificate
            F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
          dsimp only at hc
          rcases hc with ⟨hcall', _, _, _, _⟩
          have hkeq := Result.ok.inj (hcall.symm.trans hcall')
          have htable (m : Nat) : 2 <= m -> m <= 18 ->
              let j : Std.Usize := match m with
                | 0 => 0#usize | 1 => 3#usize | 2 => 6#usize | 3 => 9#usize
                | 4 => 13#usize | 5 => 16#usize | 6 => 19#usize | 7 => 23#usize
                | 8 => 26#usize | 9 => 29#usize | 10 => 33#usize | 11 => 36#usize
                | 12 => 39#usize | 13 => 43#usize | 14 => 46#usize | 15 => 49#usize
                | 16 => 53#usize | 17 => 56#usize | 18 => 59#usize | _ => 60#usize
              3 * (j.val : Int) <= 10 * (m : Int) := by
            intro hmLo hmHi
            interval_cases m <;> norm_num [UScalar.cast_val_eq] at *
          have hklinear : 3 * (k.val : Int) <= 10 * (n.val : Int) := by
            rw [hkeq]
            exact htable n.val hnLo hnHi
          rcases hsmall hp18 hpneg with hp' | hp'
          · have hb : 27 <= bonus p' z' := by
              rw [hp']
              simp only [bonus, if_true]
              split_ifs <;> omega
            have hbin : bonus p z = 0 := by simp [bonus, hpm1, hp0]
            have hkbound : 3 * (k.val : Int) <=
                27 + 10 * (p' - p) := by
              omega
            rw [hbin]
            omega
          · have hb : 27 <= bonus p' z' := by
              rw [hp']
              simp only [bonus, if_false, if_true]
              split_ifs <;> omega
            have hbin : bonus p z = 0 := by simp [bonus, hpm1, hp0]
            have hkbound : 3 * (k.val : Int) <=
                27 + 10 * (p' - p) := by
              omega
            rw [hbin]
            omega
        · exfalso
          omega

end dec2flt_model

Download Lean source · Download TeX source

Complete Lean module
import Tablet.P826_T1_LeftStepCertificate
import Mathlib.Tactic.IntervalCases

open Aeneas Aeneas.Std Result ControlFlow Error
set_option autoImplicit false

namespace dec2flt_model

-- [TABLET NODE: P826_T1_LeftCapacityStep]
theorem P826_T1_LeftCapacityStep
    (p p' : Int) (k : Std.Usize) (z z' : Nat)
    (hpHi : p <= 0)
    (hsel :
      (p < 0 /\ exists n : Std.Usize,
        (n.val : Int) = -p /\
        num.imp.dec2flt.slow.parse_long_mantissa.closure.Insts.CoreOpsFunctionFnTupleUsizeUsize.call
          F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 () n =
            ok k) \/
      (p = 0 /\ z < 5 /\
        k =
          if z = 1 then 2#usize else 1#usize))
    (hlarge : p <= -19 -> p' = p + 18 \/ p' = p + 19)
    (hsmall : -18 <= p -> p < 0 -> p' = -1 \/ p' = 0)
    (hstall : p = -1 -> p' = -1 -> 7 <= z')
    (hrecover : p = -1 -> 7 <= z -> p' = 0 /\ 5 <= z')
    (hzero : p = 0 -> p' = 0 /\
      (z <= 2 -> 3 <= z') /\ (3 <= z -> 5 <= z')) :
    let bonus : Int -> Nat -> Int := fun (q : Int) (w : Nat) =>
      if q = -1 then (if 7 <= w then 36 else 27)
      else if q = 0 then
        (if 5 <= w then 36 else if 3 <= w then 33 else 27)
      else 0
    bonus p z + 3 * (k.val : Int) <=
      bonus p' z' + 10 * (p' - p) := by
-- BODY
  dsimp only
  let bonus : Int -> Nat -> Int := fun (q : Int) (w : Nat) =>
    if q = -1 then (if 7 <= w then 36 else 27)
    else if q = 0 then
      (if 5 <= w then 36 else if 3 <= w then 33 else 27)
    else 0
  change bonus p z + 3 * (k.val : Int) <=
      bonus p' z' + 10 * (p' - p)
  have hbonusNonneg (q : Int) (w : Nat) : 0 <= bonus q w := by
    simp only [bonus]
    split_ifs <;> omega
  by_cases hp19 : p <= -19
  · rcases hlarge hp19 with hp' | hp'
    · have hpne1 : p ≠ -1 := by omega
      have hpne0 : p ≠ 0 := by omega
      simp only [bonus, hpne1, hpne0, if_false]
      have hk : k = 60#usize := by
        rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
        · have hc := SlowShiftSelectorCertificate
            F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
          dsimp only at hc
          rcases hc with ⟨hcall', _, _, _, hbig⟩
          have hn19 : 19 <= n.val := by omega
          have hkeq := Result.ok.inj (hcall.symm.trans hcall')
          have hkval : k.val = 60 := by
            rw [hkeq]
            exact (hbig hn19).1
          apply UScalar.eq_of_val_eq
          simpa [UScalar.cast_val_eq] using hkval
        · exfalso
          omega
      have hk' : k.val = 60 := by
        rw [hk]
        norm_num [UScalar.cast_val_eq]
      have := hbonusNonneg p' z'
      omega
    · have hpne1 : p ≠ -1 := by omega
      have hpne0 : p ≠ 0 := by omega
      simp only [bonus, hpne1, hpne0, if_false]
      have hk : k = 60#usize := by
        rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
        · have hc := SlowShiftSelectorCertificate
            F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
          dsimp only at hc
          rcases hc with ⟨hcall', _, _, _, hbig⟩
          have hn19 : 19 <= n.val := by omega
          have hkeq := Result.ok.inj (hcall.symm.trans hcall')
          have hkval : k.val = 60 := by
            rw [hkeq]
            exact (hbig hn19).1
          apply UScalar.eq_of_val_eq
          simpa [UScalar.cast_val_eq] using hkval
        · omega
      have hk' : k.val = 60 := by
        rw [hk]
        norm_num [UScalar.cast_val_eq]
      have := hbonusNonneg p' z'
      omega
  · by_cases hpm1 : p = -1
    · subst p
      have hp' : p' = -1 \/ p' = 0 := hsmall (by omega) (by omega)
      rcases hp' with hp' | hp'
      · have hz'7 := hstall rfl hp'
        have hz7 : z < 7 := by
          by_contra h
          have := hrecover rfl (by omega)
          omega
        have hk : k = 3#usize := by
          rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
          · have hc := SlowShiftSelectorCertificate
              F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
            dsimp only at hc
            have hn1 : n.val = 1 := by omega
            rcases hc with ⟨hcall', _, _, _, _⟩
            have hkeq := Result.ok.inj (hcall.symm.trans hcall')
            simpa [hn1] using hkeq
          · omega
        have hk' : k.val = 3 := by
          rw [hk]
          norm_num [UScalar.cast_val_eq]
        have hbin : bonus (-1) z = 27 := by
          simp [bonus, show ¬7 <= z by omega]
        have hbout : bonus (-1) z' = 36 := by
          simp [bonus, hz'7]
        rw [hp', hbin, hbout]
        omega
      · have hk : k = 3#usize := by
          rcases hsel with ⟨hpneg, n, hn, hcall⟩ | hzeroSel
          · have hc := SlowShiftSelectorCertificate
              F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
            dsimp only at hc
            have hn1 : n.val = 1 := by omega
            rcases hc with ⟨hcall', _, _, _, _⟩
            have hkeq := Result.ok.inj (hcall.symm.trans hcall')
            simpa [hn1] using hkeq
          · omega
        have hk' : k.val = 3 := by
          rw [hk]
          norm_num [UScalar.cast_val_eq]
        by_cases hz7 : 7 <= z
        · have hz'5 := (hrecover rfl hz7).2
          have hbin : bonus (-1) z = 36 := by simp [bonus, hz7]
          have hbout : bonus 0 z' = 36 := by simp [bonus, hz'5]
          rw [hp', hbin, hbout]
          omega
        · have hbin : bonus (-1) z = 27 := by simp [bonus, hz7]
          have hbout : 27 <= bonus 0 z' := by
            simp only [bonus, if_false, if_true]
            split_ifs <;> omega
          rw [hp', hbin]
          omega
    · by_cases hp0 : p = 0
      · subst p
        rcases hzero rfl with ⟨hp', hz2, hz3⟩
        rcases hsel with hneg | ⟨_, hz5, hk⟩
        · omega
        · have hkval : k.val = if z = 1 then 2 else 1 := by
            have hv := congrArg UScalar.val hk
            by_cases hz1 : z = 1
            · simpa [hz1, UScalar.cast_val_eq] using hv
            · simpa [hz1, UScalar.cast_val_eq] using hv
          by_cases hz2' : z <= 2
          · have hz'3 := hz2 hz2'
            by_cases hz1 : z = 1
            · have hk2 : k.val = 2 := by simp [hz1] at hkval ⊢; exact hkval
              have hbin : bonus 0 z = 27 := by
                simp [bonus, show ¬5 <= z by omega, show ¬3 <= z by omega]
              have hbout : 33 <= bonus 0 z' := by
                simp [bonus]
                split_ifs <;> omega
              rw [hp', hbin]
              omega
            · have hk1 : k.val = 1 := by simp [hz1] at hkval ⊢; exact hkval
              have hbin : bonus 0 z = 27 := by
                simp [bonus, show ¬5 <= z by omega, show ¬3 <= z by omega]
              have hbout : 33 <= bonus 0 z' := by
                simp [bonus]
                split_ifs <;> omega
              rw [hp', hbin]
              omega
          · have hz3' : 3 <= z := by omega
            have hz'5 := hz3 hz3'
            have hk1 : k.val = 1 := by
              have hz1 : z ≠ 1 := by omega
              simp [hz1] at hkval ⊢
              exact hkval
            have hbin : bonus 0 z = 33 := by simp [bonus, hz3', hz5]
            have hbout : bonus 0 z' = 36 := by simp [bonus, hz'5]
            rw [hp', hbin, hbout]
            omega
      · have hpneg : p < 0 := by omega
        have hp18 : -18 <= p := by omega
        rcases hsel with ⟨_, n, hn, hcall⟩ | hzeroSel
        · have hnLo : 2 <= n.val := by omega
          have hnHi : n.val <= 18 := by omega
          have hc := SlowShiftSelectorCertificate
            F64.Insts.Dec2flt_modelNumImpTraitsFloatU64 n
          dsimp only at hc
          rcases hc with ⟨hcall', _, _, _, _⟩
          have hkeq := Result.ok.inj (hcall.symm.trans hcall')
          have htable (m : Nat) : 2 <= m -> m <= 18 ->
              let j : Std.Usize := match m with
                | 0 => 0#usize | 1 => 3#usize | 2 => 6#usize | 3 => 9#usize
                | 4 => 13#usize | 5 => 16#usize | 6 => 19#usize | 7 => 23#usize
                | 8 => 26#usize | 9 => 29#usize | 10 => 33#usize | 11 => 36#usize
                | 12 => 39#usize | 13 => 43#usize | 14 => 46#usize | 15 => 49#usize
                | 16 => 53#usize | 17 => 56#usize | 18 => 59#usize | _ => 60#usize
              3 * (j.val : Int) <= 10 * (m : Int) := by
            intro hmLo hmHi
            interval_cases m <;> norm_num [UScalar.cast_val_eq] at *
          have hklinear : 3 * (k.val : Int) <= 10 * (n.val : Int) := by
            rw [hkeq]
            exact htable n.val hnLo hnHi
          rcases hsmall hp18 hpneg with hp' | hp'
          · have hb : 27 <= bonus p' z' := by
              rw [hp']
              simp only [bonus, if_true]
              split_ifs <;> omega
            have hbin : bonus p z = 0 := by simp [bonus, hpm1, hp0]
            have hkbound : 3 * (k.val : Int) <=
                27 + 10 * (p' - p) := by
              omega
            rw [hbin]
            omega
          · have hb : 27 <= bonus p' z' := by
              rw [hp']
              simp only [bonus, if_false, if_true]
              split_ifs <;> omega
            have hbin : bonus p z = 0 := by simp [bonus, hpm1, hp0]
            have hkbound : 3 * (k.val : Int) <=
                27 + 10 * (p' - p) := by
              omega
            rw [hbin]
            omega
        · exfalso
          omega

end dec2flt_model

Proof structure

Follow the declared dependencies to read the supporting statements and proofs.

Explore this dependency tree

Inspect related source (151)
More program dependencies (109)
Standard-library dependencies (39)

Related source and models come from the extraction records and declared dependencies.

Proof assumptions and review

Lean checks the formal proof. Trellis also reviews how the statement corresponds to the intended requirement.

Transitive assumptions

This list combines the assumptions recorded for this declaration and its dependencies. It may include assumptions used by auxiliary declarations in those modules.

Helper theorems included
All 79 entries
Technical checking records
Local closure summary
{
  "node": "P826_T1_LeftCapacityStep",
  "closure_version": "patch_c_v1",
  "active_decl_hash": "066bc2e6c44c51b14ca44e7b5308a5c98eb9eb2cb9e80dd963182f2827ecbb5a",
  "active_statement_hash": "1fc00c877743b760a5ed5c96a66e67e11aea62c6d6d5a0626b2813aebf611fa0",
  "kernel_axioms": [
    "Classical.choice",
    "Quot.sound",
    "propext"
  ],
  "toolchain_hash": "ce4c4e3d87434b9663f46de25ce34b48a0cf0d392e0a320a0787b4674a2d7b61",
  "lean_executable_hash": "3e0d0d3d801675359f2d4cf9815bfdb417b20b92fdd9d48b3b14c95bbae28bbf",
  "checker_script_hash": "c8e4a03273e23b9a8f2e141020652a4e0b7b0a8ab0883366ea9d031ca3f37aa1",
  "approved_axioms_hash": "ab64d13f256386ee0e494a5abcc6a5db49512cf3d90bbdfcabd6327793a31f95",
  "axcheck_status": "Agreed",
  "accepted_at_snapshot_id": "worker-result-local-closure-issuance-cycle-196",
  "boundary_theorems": {},
  "strict_theorem_deps": {
    "SlowShiftSelectorCertificate": "963b7a2e670856e8"
  },
  "strict_definition_deps": {
    "F64": "ec4e25fbaf4e11d4",
    "F64_Insts_Dec2flt_modelNumImpTraitsFloatU64": "94095c9bf79da164",
    "SlowShiftSelectorCertificate": "7ebc2b39d69850c4",
    "num_imp_dec2flt_slow_parse_long_mantissa_closure_Insts_CoreOpsFunctionFnTupleUsizeUsize_call": "7df8a2c8e3717790"
  }
}
Prose assessment
{
  "label": "Lean proof closed; predictive prose review no longer required",
  "assessment_status": null,
  "fingerprint_relation": "unknown",
  "assessment_fingerprint": null,
  "current_fingerprint": "sound-v2:1d0ddd15172bdcc3a319ea8bd2b59e91e8f4aad924cf3a825edffc04cfaa079e",
  "superseded_for_theorem_closure": false
}
Review verdicts
{
  "corr_status": "Pass",
  "substantiveness_status": "Pass"
}