Module("bin-tree-set",[Imports([Import("bin-tree"),Import("term")]),Strategies([SDef("branch",[DefaultVarDec("mky"),DefaultVarDec("lt"),DefaultVarDec("gt"),DefaultVarDec("et")],LChoice(Call(SVar("BinNode"),[Where(LRule(RuleNoCond(Var("x"),App(CallNoArgs(SVar("eq")),NoAnnoList(Tuple([Var("x"),App(CallNoArgs(SVar("mky")),NoAnnoList(Tuple([])))])))))),Id,Id]),LChoice(Call(SVar("BinNode"),[Where(LRule(RuleNoCond(Var("x"),App(CallNoArgs(SVar("address-lt")),NoAnnoList(Tuple([App(CallNoArgs(SVar("mky")),NoAnnoList(Tuple([]))),Var("x")])))))),CallNoArgs(SVar("lt")),Id]),LChoice(Call(SVar("BinNode"),[Where(LRule(RuleNoCond(Var("x"),App(CallNoArgs(SVar("address-lt")),NoAnnoList(Tuple([Var("x"),App(CallNoArgs(SVar("mky")),NoAnnoList(Tuple([])))])))))),Id,CallNoArgs(SVar("gt"))]),Seq(CallNoArgs(SVar("EmptyNode")),CallNoArgs(SVar("et")))))))]),Rules([RDefNoArgs("bin-add",RuleNoCond(NoAnnoList(Tuple([Var("a"),Var("t")])),App(Rec("x",Call(SVar("branch"),[Build(Var("a")),CallNoArgs(SVar("x")),CallNoArgs(SVar("x")),Build(NoAnnoList(Op("BinNode",[Var("a"),Var("EmptyNode"),Var("EmptyNode")])))])),Var("t")))),RDef("Merge",[DefaultVarDec("s")],RuleNoCond(NoAnnoList(Tuple([Var("EmptyNode"),Var("x")])),Var("x"))),RDef("Merge",[DefaultVarDec("s")],RuleNoCond(NoAnnoList(Tuple([Var("x"),Var("EmptyNode")])),Var("x"))),RDef("Merge",[DefaultVarDec("s")],RuleNoCond(NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("l1"),Var("r1")])),NoAnnoList(Op("BinNode",[Var("x"),Var("l2"),Var("r2")]))])),NoAnnoList(Op("BinNode",[Var("x"),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([Var("l1"),Var("l2")]))),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([Var("r1"),Var("r2")])))])))),RDef("Merge",[DefaultVarDec("s")],Rule(NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("l1"),Var("EmptyNode")])),NoAnnoList(Op("BinNode",[Var("y"),Var("l2"),Var("r2")]))])),NoAnnoList(Op("BinNode",[Var("y"),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("l1"),Var("EmptyNode")])),Var("l2")]))),Var("r2")])),BA(CallNoArgs(SVar("address-lt")),NoAnnoList(Tuple([Var("x"),Var("y")]))))),RDef("Merge",[DefaultVarDec("s")],Rule(NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("EmptyNode"),Var("r1")])),NoAnnoList(Op("BinNode",[Var("y"),Var("l2"),Var("r2")]))])),NoAnnoList(Op("BinNode",[Var("y"),Var("l2"),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("EmptyNode"),Var("r1")])),Var("r2")])))])),BA(CallNoArgs(SVar("address-lt")),NoAnnoList(Tuple([Var("y"),Var("x")]))))),RDef("Merge",[DefaultVarDec("s")],Rule(NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("l1"),Var("r1")])),NoAnnoList(Op("BinNode",[Var("y"),Var("l2"),Var("r2")]))])),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([Var("r1"),NoAnnoList(Op("BinNode",[Var("y"),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("l1"),Var("EmptyNode")])),Var("l2")]))),Var("r2")]))]))),BA(CallNoArgs(SVar("address-lt")),NoAnnoList(Tuple([Var("x"),Var("y")]))))),RDef("Merge",[DefaultVarDec("s")],Rule(NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("x"),Var("l1"),Var("r1")])),NoAnnoList(Op("BinNode",[Var("y"),Var("l2"),Var("r2")]))])),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([Var("r2"),NoAnnoList(Op("BinNode",[Var("x"),App(CallNoArgs(SVar("s")),NoAnnoList(Tuple([NoAnnoList(Op("BinNode",[Var("y"),Var("l2"),Var("EmptyNode")])),Var("l1")]))),Var("r1")]))]))),BA(CallNoArgs(SVar("address-lt")),NoAnnoList(Tuple([Var("y"),Var("x")])))))]),Strategies([SDefNoArgs("merge",Rec("x",Call(SVar("Merge"),[CallNoArgs(SVar("x"))]))),SDefNoArgs("mkbinset",Call(SVar("foldr"),[Build(Var("EmptyNode")),CallNoArgs(SVar("bin-add"))]))])])
