method SetOfSeq(a: seq) returns (r: set) // TODO method SequenceInclusionWithSet(a: seq, b: set) returns (r: bool) // TODO method SequenceInclusion(a: seq, b: seq) returns (r: bool) ensures r == (forall x :: x in a ==> x in b) { var b' := SetOfSeq(b); var t := SequenceInclusionWithSet(a, b'); return t; // (1) Write specs above so this method verifies. // Just write the spec, no { ... } method body. } method SequenceInclusion_alt(a: seq, b: seq) returns (r: bool) ensures r == (forall x :: x in a ==> x in b) { var a' := SetOfSeq(a); var b' := SetOfSeq(b); return true; // (2) Lean in to set operations and implement a different way }