import Leanopen Leandef goals : Array Name :=#[`Solution.mainTheorem, `Solution.mainTheoremApprox, `Solution.separation,`Solution.separationClosure, `Solution.permanent_over_real]def lookupTheorem (moduleName : String) (data : ModuleData) (name : Name) : IO TheoremVal := dolet some entry := data.constants.find? (fun entry => entry.name == name)| throw (IO.userError s!"{moduleName} is missing {name}")match entry with| .thmInfo info => pure info| _ => throw (IO.userError s!"{name} is not a theorem in {moduleName}")def main (args : List String) : IO Unit := dolet [challengePath, solutionPath] := args| throw (IO.userError "Usage: ExactChallenge Challenge.olean Solution.olean")let (challenge, challengeRegion) ← readModuleData challengePathlet (solution, solutionRegion) ← readModuleData solutionPathfor goal in goals dolet expected ← lookupTheorem "Challenge" challenge goallet actual ← lookupTheorem "Solution" solution goalunless expected.levelParams == actual.levelParams && expected.type == actual.type dothrow (IO.userError s!"Statement mismatch: {goal}")IO.println s!"MATCH {goal}"let _ := challengeRegionlet _ := solutionRegion