mathlib icon indicating copy to clipboard operation
mathlib copied to clipboard

evaluate `int.floor` and `int.fract` with `norm_num`

Open vihdzp opened this issue 3 years ago • 2 comments

Currently, norm_num can only solve goals of the form int.fract x = x, which it does accidentally by simping it to 0 ≤ x ∧ x < 1.

vihdzp avatar Aug 10 '22 22:08 vihdzp

Just trying to understand what you want here. You want goals of the form int.floor x = y to reduce to something like y ≤ x ∧ x < y.succ (for x in a floor_ring and y in int)? I'm not sure what you envisage with int.fract though.

linesthatinterlace avatar Sep 02 '22 15:09 linesthatinterlace

The idea is that int.floor and int.fract should compute on rational numerals, for example int.floor (5 / 2) = 2 and int.fract (5 / 2) = 1 / 2.

digama0 avatar Sep 02 '22 23:09 digama0