Elm Exactly

Theoremdyadic_den_dvd

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

Statement

theorem dyadic_den_dvd (m : Nat) (e : Int) : ∃ k, (dyadic m e).den ∣ 2 ^ k

Proof

by
  unfold dyadic
  split
  · exact ⟨0, by rw [Rat.den_natCast]; exact Nat.one_dvd _⟩
  · refine ⟨e.natAbs, ?_⟩
    rw [Rat.den_mkRat]
    split
    · simp
    · exact Nat.div_dvd_of_dvd (Nat.gcd_dvd_left _ _)

Proved with tactics, which Lean expands into a proof term that its kernel checks.

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.