Elm Exactly

TheoremstripFactor_one

StandardElmMech/Eff/Properties.lean:253, Numbers: a float's exact value is decimal · term proof

Statement

theorem stripFactor_one (p : Nat) : ∀ fuel, stripFactor p fuel 1 = 1
  | 0 => rfl
  | fuel + 1 => by
    simp only [stripFactor]
    split
    · rename_i h; obtain ⟨hp, _, hm⟩

Proof

h; rw [Nat.mod_eq_of_lt (by omega)] at hm; cases hm
    · rfl

Proved by a term, which Lean's kernel checks directly.

Used by

In StandardElmMech/Eff/Properties.lean: APPLY of the effect values has one member; the rulings A74, A76, A88 and A92; canonical payload types, the decimality of a float's exact value, and that every value of a payload type has a canonical encoding (enc_total).

A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.