I know that if we have two theorems 1: a ==> b
and 2: b ==> c
, they can be unified to a ==> c
like this: 2[OF 1]. But is this also possible for equalities? E.g. if we have a = b
and b ==> c
, how can a ==> c
be concluded by "forward reasoning" (or whatever the corresponding methodology is called)?
I think you can try
unfolding \<open>a = b\<close>
or
apply (subst \<open>a = b\<close>)
Thank you for your response. I don't want to apply a substitution tactic, I want to directly insert the equality, e.g. for display in a thm
command.
Don't. Sorry, but Pure is not meant to do this kind of things. It is easier to write a new theorem for it.
But if need be:
context
fixes a b c
assumes A: "b = a" and B: "b ⟹ c"
begin
thm back_subst[of "λb. b ⟶ c", OF B[unfolded atomize_imp] A,
unfolded atomize_imp[symmetric]]
(*a ⟹ c*)
Sorry, I've only just started learning Isabelle, so this is probably a dumb question, but what is wrong with:
context
fixes a b c
assumes A: "a = b" and B: "b ⟹ c"
begin
thm B[OF iffD1[OF A]]
That works too
But your approach would not work if instead b ⟹ c
you would have P(b) ⟹ c
.
Thank you, that was very instructive!
Last updated: Dec 21 2024 at 16:20 UTC