import Tablet.ModelSliceSplitFirst import Tablet.Preamble open Aeneas Aeneas.Std Result ControlFlow Error set_option autoImplicit false namespace dec2flt_model -- [TABLET NODE: NumberHelperLeadingPointSplit] theorem NumberHelperLeadingPointSplit (s rest : Slice Std.U8) (hs : s.val = 46#u8 :: rest.val) : Not (s.val = []) /\ core.slice.Slice.split_first s = ok (some (46#u8, rest)) := by -- BODY constructor · rw [hs] exact List.cons_ne_nil _ _ · have hp : (46#u8 :: rest.val).length <= Usize.max := by rw [← hs] exact s.property let pointSlice : Slice Std.U8 := ⟨46#u8 :: rest.val, hp⟩ have heq : s = pointSlice := (Slice.eq_iff _ _).2 (by simp [pointSlice, hs]) rw [heq] simp [core.slice.Slice.split_first, dec2flt_model.ModelSliceSplitFirst, pointSlice] end dec2flt_model