Image
Types
Constructors
For each type in this module: inductive types list their declared constructors; opaque types list any local function whose name starts with mk and which returns a value of that type.
def mk (w : Int | w > 0) (h : Int | h > 0) (color : Color) : {i : Image | width i = w && height i = h}
Functions
def get_width (im : Image) : {r : Int | r = width im}
def get_height (im : Image) : {r : Int | r = height im}
def mk (w : Int | w > 0) (h : Int | h > 0) (color : Color) : {i : Image | width i = w && height i = h}
def copy (im : Image) : {c : Image | width c = width im && height c = height im}
def crop (im : Image) (x : Int | x ≥ 0 && x ≤ width im) (y : Int | y ≥ 0 && y ≤ height im) (w : Int | w > 0 && x + w ≤ width im) (h : Int | h > 0 && y + h ≤ height im) : {r : Image | width r = w && height r = h}
def resize (im : Image) (w : Int | w > 0) (h : Int | h > 0) : {r : Image | width r = w && height r = h}
def fit_inside (im : Image) (max_w : Int | max_w > 0) (max_h : Int | max_h > 0) : Image
def rotate (im : Image) (angle : Float) : {r : Image | width r = width im && height r = height im}
def flip_horizontal (im : Image) : {r : Image | width r = width im && height r = height im}
def flip_vertical (im : Image) : {r : Image | width r = width im && height r = height im}
def get_pixel (im : Image) (x : Int | x ≥ 0 && x < width im) (y : Int | y ≥ 0 && y < height im) : Color
def put_pixel (im : Image) (x : Int | x ≥ 0 && x < width im) (y : Int | y ≥ 0 && y < height im) (color : Color) : {r : Image | width r = width im && height r = height im}
def paste (dest : Image) (src : Image) (x : Int | x ≥ 0 && x + width src ≤ width dest) (y : Int | y ≥ 0 && y + height src ≤ height dest) : {r : Image | width r = width dest && height r = height dest}
def grayscale (im : Image) : {g : Image | width g = width im && height g = height im}
def invert (im : Image) : {r : Image | width r = width im && height r = height im}
def blur (im : Image) (radius : Float) : {r : Image | width r = width im && height r = height im}
def show (image : Image) : Unit
def save (image : Image) (path : String) : Unit
def open (path : String) : Image
def diff (img : Image) (img2 : Image) : Float
def fitness_bw_mse (candidate : Image) (reference : Image) : Float
def fitness_half_size_mse (candidate : Image) (reference : Image) : Float
def fitness_row_mismatch (candidate : Image) (reference : Image) : Float
def fitness_col_mismatch (candidate : Image) (reference : Image) : Float
def fitness_pixel_mismatch (candidate : Image) (reference : Image) : Float
def draw_rectangle (im : Image) (x : Int | x ≥ 0 && x ≤ width im) (y : Int | y ≥ 0 && y ≤ height im) (w : Int | w > 0 && x + w ≤ width im) (h : Int | h > 0 && y + h ≤ height im) (color : Color) : {rim : Image | width rim = width im && height rim = height im}
Uninterpreted
Functions declared as def f ... = uninterpreted: only their signature is known to the verifier; they have no body.
def height : (im : Image) → Int
def width : (im : Image) → Int