// Code we just went through datatype Option = None | Some(value: T) datatype BST = Leaf | Node(key: K, value: V, left: BST, right: BST) function Lookup(lt: (K, K) -> bool, t: BST, k: K): Option { match t case Leaf => None case Node(k', v, l, r) => if k == k' then Some(v) else if lt(k, k') then Lookup(lt, l, k) else Lookup(lt, r, k) } function Mirror(t: BST): BST { match t case Leaf => Leaf case Node(k, v, l, r) => Node(k, v, Mirror(r), Mirror(l)) } function Flip(f: (A, B) -> C): (B, A) -> C { (b, a) => f(a, b) } lemma LookupMirror(lt: (K, K) -> bool, t: BST, k: K) requires forall a, b : K :: lt(a, b) == (!lt(b, a) && a != b) ensures Lookup(lt, t, k) == Lookup(Flip(lt), Mirror(t), k) lemma LookupExtensional(lt: (K, K) -> bool, lt': (K, K) -> bool, t: BST, k: K) requires forall a, b : K :: lt(a, b) == lt'(a, b) ensures Lookup(lt, t, k) == Lookup(lt', t, k) // Your task: prove this lemma lemma LookupMirrorInt(t: BST, k: int) ensures Lookup((a, b) => a < b, t, k) == Lookup((b, a) => a < b, Mirror(t), k)