![]()
curiously, it works if I use auto instead of .. (or more explicitly conjI) which is very weird
B, C is not the same as B /\ C, and conjI is exactly the theorem allowing you to prove the latter from the former.
I am trying to prove B /\ C from B, C using conjI and it is not working as you can see in the screenshot. Maybe this is a bug.
You're passing C, B not B, C:
notepad
begin
assume "A" "B"
from ‹A› ‹B› have "A ∧ B" .. (*OK*)
from ‹B› ‹A› have "A ∧ B" .. (*not OK*)
end
I guess there is no rule overloading in isabelle, but is there really no conjI2 or something for these cases?
You can prove that lemma if you like it.
In practice, people don't write such proofs because automation takes care of such irrelevances (so nobody misses the rule).
I don't know what you mean by rule overloading.
rule overloading is where you cite the same rule and it functions as different rules depending on certain other factors. for example, one might cite iffD and it will choose iffD1 or iffD2 based on context (or something)
Yoav Cohen has marked this topic as resolved.
You can make a theorem collection iffD which contains iffD1 and iffD2: lemmas iffD = iffD1 iffD2.
And then I can cite it as a rule?
if by rule you mean an argument passed to the rule method, then yes.
I am not sure what that means, I was just thinking like "by"
oh you mean like (rule something)?
like this:
lemma conj_swapI: "A ⟹ B ⟹ B ∧ A" by auto
lemmas conj_intros = conjI conj_swapI
notepad
begin
assume "A" "B"
from ‹A› ‹B› have "A ∧ B" by (rule conj_intros) (*OK*)
from ‹B› ‹A› have "A ∧ B" by (rule conj_intros) (*OK*)
end
omg that is so cool, double thanks
also so for my thing I wanted conj_swapI?
I suppose so.
does this work with like modus ponens too?
yes: lemmas mps = mp rev_mp
why is this one swap and this one rev??
Because those are human made-up names. You can name them in any way you like.
like why is it not consistent though?
Because I just gave conj_swapI some name without having consistency of naming wrt rev_mp in mind. Don't overthink it.
oh wait I just realized my confusion. I am very sorry, I thought those were built-in because I missed the line in which you defined it.
Last updated: Jul 17 2026 at 17:14 UTC