mirror of
https://github.com/AdaCore/why3.git
synced 2026-02-12 12:34:55 -08:00
13 lines
227 B
Plaintext
13 lines
227 B
Plaintext
module M
|
|
|
|
use int.Int
|
|
use int.EuclideanDivision as ED
|
|
use int.ComputerDivision
|
|
|
|
let mean (x:int) (y:int)
|
|
requires { 0 <= x <= y }
|
|
ensures { result = ED.div (x + y) 2 = div (x + y) 2 }
|
|
= x + div (y - x) 2
|
|
|
|
end
|