Zulip Chat Archive

Stream: general

Topic: Computation


Sebastien Gouezel (Jun 05 2020 at 08:52):

I was just playing with the continued fraction by @Kevin Kappelmann , which is very nice. And it computes well in the VM:

#eval (generalized_continued_fraction.of (121/98 : )).convergents 3

gives the answer 21/17 right away. Sadly,

example : ((generalized_continued_fraction.of (121/98 : )).convergents 3 = 21/17) := rfl

fails miserably, I guess because computing in unary is not a good idea. Apart from adding a specific module to norm_num or waiting for Lean 4, is there a way to get this automatically?

Johan Commelin (Jun 05 2020 at 09:08):

I guess the answer is by norm_num after the right simp-lemmas have been added.


Last updated: Dec 20 2023 at 11:08 UTC