Repository navigation
Try to improve reduction behaviour of rationals using Andreas's suggestion - #1764
Conversation
|
Very nice. I'm a little surprised at just how many times you had to force evaluation (in proofs - all the ones for defining functions makes sense). I'm guessing none are actually intrinsic but are because of the choice of method of proof? Mostly curious, I don't think it's worth doing anything about it in this PR. But might be fun over time to slowly make these go away, to further decrease coupling from the proofs to the exact implementation. |
Well, none of them are intrinsic if you add a single equality proof for each operation that equates the non-reduced form to the reduced form. I guess that would be the minimal use of normalisation. But yes, I'm afraid I don't have the will power to go and alter them all now. I will actively discourage any new proofs being added that do rely on the reduction behaviour. |
|
|
||
| >-nonZero : ∀ {p} → p > 0ℚ → NonZero p | ||
| >-nonZero {p} (*<* p<q) = ℚᵘ.>-nonZero {toℚᵘ p} (ℚᵘ.*<* p<q) | ||
| >-nonZero {p@(mkℚ _ _ _)} (*<* p<q) = ℚᵘ.>-nonZero {toℚᵘ p} (ℚᵘ.*<* p<q) |
Closes #1753. Haven't addressed the problem with integer multiplication.