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: {p : Int | p > 0}) (h: {p : Int | p > 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: {p : Int | p > 0}) (h: {p : Int | p > 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: {p : Int | p ≥ 0 && p ≤ width im}) (y: {p : Int | p ≥ 0 && p ≤ height im}) (w: {p : Int | p > 0 && x + p ≤ width im}) (h: {p : Int | p > 0 && y + p ≤ height im}) : {r : Image | width r = w && height r = h}
def resize (im: Image) (w: {p : Int | p > 0}) (h: {p : Int | p > 0}) : {r : Image | width r = w && height r = h}
def fit_inside (im: Image) (max_w: {p : Int | p > 0}) (max_h: {p : Int | p > 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: {p : Int | p ≥ 0 && p < width im}) (y: {p : Int | p ≥ 0 && p < height im}) : Color
def put_pixel (im: Image) (x: {p : Int | p ≥ 0 && p < width im}) (y: {p : Int | p ≥ 0 && p < height im}) (color: Color) : {r : Image | width r = width im && height r = height im}
def paste (dest: Image) (src: Image) (x: {p : Int | p ≥ 0 && p + width src ≤ width dest}) (y: {p : Int | p ≥ 0 && p + 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: {p : Int | p ≥ 0 && p ≤ width im}) (y: {p : Int | p ≥ 0 && p ≤ height im}) (w: {p : Int | p > 0 && x + p ≤ width im}) (h: {p : Int | p > 0 && y + p ≤ 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