batteries icon indicating copy to clipboard operation
batteries copied to clipboard

feat: let_projs tactic, recursively adding projections of hypotheses

Open kim-em opened this issue 1 year ago • 4 comments

let_projs adds let bindings for all projections of local hypotheses, recursively.

It's probably rarely useful interactively, but may be useful as a preprocessing step for tactics such as solve_by_elim.

kim-em avatar Jan 19 '24 10:01 kim-em

I'm inclined to not surface this as a user-facing tactic at all, and just have a MetaM tactic for it. This introduces more API surface area which we have to avoid breaking later, without a compelling use case.

digama0 avatar Jan 19 '24 12:01 digama0

Good idea. I mostly wrote the syntactical frontend so I could test it. I've moved the syntax into the test file, and added a note that it is not useful otherwise.

kim-em avatar Jan 22 '24 02:01 kim-em

Is there no worry that eagerly adding all projections is going to blow up in some cases, with large or deeply nested structures? Or is this only going to be used in places where the user expects to wait a bit longer (interactive exact? maybe)? Or is this simply a normal approach?

nomeata avatar Jan 22 '24 08:01 nomeata

Is there no worry that eagerly adding all projections is going to blow up in some cases, with large or deeply nested structures? Or is this only going to be used in places where the user expects to wait a bit longer (interactive exact? maybe)? Or is this simply a normal approach?

@joehendrix's suggestion is that when other tactics are using this, if it is a user-called tactic it's okay to do something potentially expensive like this, but tactics called by other tactics should not.

kim-em avatar Feb 05 '24 03:02 kim-em