chore(frontends/lean/builtin_cmds,library/blast/simplifier): fix style

This commit is contained in:
Leonardo de Moura 2015-11-16 11:10:12 -08:00
parent b3ca5faa49
commit 7abb0d6b96
2 changed files with 16 additions and 15 deletions

View file

@ -1338,7 +1338,7 @@ static environment simplify_cmd(parser & p) {
blast::scope_debug scope(p.env(), p.ios()); blast::scope_debug scope(p.env(), p.ios());
simp_rule_sets srss; simp_rule_sets srss;
if (ns == name("null")) { } if (ns == name("null")) { }
if (ns == name("env")) { srss = get_simp_rule_sets(p.env()); } else if (ns == name("env")) { srss = get_simp_rule_sets(p.env()); }
else { srss = get_simp_rule_sets(p.env(), p.ios(), ns); } else { srss = get_simp_rule_sets(p.env(), p.ios(), ns); }
blast::simp::result r = blast::simplify(rel, e, srss); blast::simp::result r = blast::simplify(rel, e, srss);

View file

@ -950,15 +950,17 @@ expr_pair simplifier::split_summand(expr const & e, expr const & f_mul, expr con
buffer<expr> args; buffer<expr> args;
get_app_args(s, args); get_app_args(s, args);
expr const & multiplicand = args[2]; expr const & multiplicand = args[2];
if (is_num(multiplicand)) numeral = mk_app(f_mul, multiplicand, numeral); if (is_num(multiplicand)) {
else { numeral = mk_app(f_mul, multiplicand, numeral);
} else {
if (variable == one) variable = multiplicand; if (variable == one) variable = multiplicand;
else variable = mk_app(f_mul, multiplicand, variable); else variable = mk_app(f_mul, multiplicand, variable);
} }
s = args[3]; s = args[3];
} }
if (is_num(s)) numeral = mk_app(f_mul, s, numeral); if (is_num(s)) {
else { numeral = mk_app(f_mul, s, numeral);
} else {
if (variable == one) variable = s; if (variable == one) variable = s;
else variable = mk_app(f_mul, s, variable); else variable = mk_app(f_mul, s, variable);
} }
@ -973,7 +975,6 @@ void initialize_simplifier() {
g_simplify_som_namespace = new name{"simplifier", "som"}; g_simplify_som_namespace = new name{"simplifier", "som"};
g_simplify_numeral_namespace = new name{"simplifier", "numeral"}; g_simplify_numeral_namespace = new name{"simplifier", "numeral"};
g_simplify_max_steps = new name{"simplify", "max_steps"}; g_simplify_max_steps = new name{"simplify", "max_steps"};
g_simplify_top_down = new name{"simplify", "top_down"}; g_simplify_top_down = new name{"simplify", "top_down"};
g_simplify_exhaustive = new name{"simplify", "exhaustive"}; g_simplify_exhaustive = new name{"simplify", "exhaustive"};