I want to prove the following theorem using a single axiom (https://mathworld.wolfram.com/WolframAxiom.html):
variable {A : Type}
axiom dot : A -> A -> A
infix : 50 " * " => dot
axiom wolfram_axiom (a b c : A) : (((a * b) * c) * (a * ((a * c) * a))) = c
theorem double_negation (a : A) : ((a * a) * (a * a)) = a := sorry
I already have a long proof from Automatic Theorem Prover in terms of many-many rewrites at certain term positions. I just want to see how it would look like in Lean. For example as my first rewrite I want to apply this term:
let term1 := wolfram_axiom a ((a * a) * a) a -- ((a * ((a * a) * a)) * a) * (a * ((a * a) * a))) = a
at a certain a
, the 4th one for example, so that the new goal becomes this:
(a * a) * (a * (((a * (a * ((a * a) * a))) * a) * (a * ((a * a) * a)))) = a
How can I do it?
(Also is it possible to use .
instead of *
here? Lean thinks it's a function composition)
calc
proof. Then you can explicitly state each step of the equality and then fill in a proof (maybe usingsimp
with the appropriate instance of your axiom for each step). $\endgroup$