theory Scratch imports Main "~~/src/HOL/Library/Code_Target_Nat" begin fun foo :: "'a list \ 'a list \ nat \ bool" where "foo (t#ts) (s#ss) 0 \ False" | "foo (t#ts) ss (Suc i) \ False" | "foo ts [] 0 \ False" | "foo [] ss _ \ False" export_code foo in SML end