Zulip Chat Archive

Stream: new members

Topic: Extremely basic refinement types in Lean 4


Malcolm Langfield (Jun 19 2022 at 09:34):

Hi. I've got a basic question. I want to define a very basic refinement type, which is the type of all nonnegative Floats. How can I do this with inductive? Is the best way to have the type take as arguments a Float and a proof that that float is nonnegative? Could anyone please give an example? Thanks so much!

Eric Wieser (Jun 19 2022 at 10:15):

You probably want docs4#Subtype


Last updated: Dec 20 2023 at 11:08 UTC