{"item_id": "ker-transpose_dims", "crate_dir": "../../bench/kernels/transpose_dims/pre", "lib_name": "k_transpose_dims_pre", "provenance": {"author": "claude-sonnet subagent, blind", "written_from": "signature + doc string only", "saw_source": false, "saw_diff": false, "saw_advisory": false}, "properties": [ {"id": "p1", "fn": "dims_match", "args": [["width", "usize"], ["height", "usize"], ["len", "usize"]], "pre": "true", "post": "r == ((width as u128) * (height as u128) == len as u128)", "ret": "bool", "basis": "true iff width * height == len in exact arithmetic"}, {"id": "p2", "fn": "dims_match", "args": [["width", "usize"], ["height", "usize"], ["len", "usize"]], "pre": "true", "post": "width.checked_mul(height).is_some() || !r", "ret": "bool", "basis": "false when the product does not fit usize"}, {"id": "p3", "fn": "dims_match", "args": [["width", "usize"], ["height", "usize"], ["len", "usize"]], "pre": "true", "post": "!(width == 0 || height == 0) || r == (len == 0)", "ret": "bool", "basis": "a zero dimension gives product 0, so true iff len == 0"}, {"id": "p4", "fn": "dims_match", "args": [["width", "usize"], ["height", "usize"], ["len", "usize"]], "pre": "true", "post": "width != 1 || r == (len == height)", "ret": "bool", "basis": "width 1 gives product height"} ]}