You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this wonderful library! I have played with it a bit, trying to apply to some simple but more realistic problems. What I found most frustrating is that I cannot figure out how to derive new proof with existing ones.
pub fn at_most(x: u32, y: u32) -> u32 {
if x <= y {
x
} else {
y
}
}
Ideally, I could write this function (with a LessThanEq<ZVal, YVal> proof) outside the less_than_eq module. However, what I finally struggled to achieve was something like this, inside less_than_eq module:
Thanks for this wonderful library! I have played with it a bit, trying to apply to some simple but more realistic problems. What I found most frustrating is that I cannot figure out how to derive new proof with existing ones.
Take the
less_than_eq
proof as an example:And I want to add a simple function:
Ideally, I could write this function (with a
LessThanEq<ZVal, YVal>
proof) outside theless_than_eq
module. However, what I finally struggled to achieve was something like this, insideless_than_eq
module:Note that I have to repeat
x <= y
comparison here.I'm not quite familiar with dependently typed programing, but I believe there should be something better. Do you have any suggestions?
The text was updated successfully, but these errors were encountered: