Submission Details
Challenge: solveAdd
Submitted by: m-ow
Submitted at: 2026-01-07 15:03:05
Code:
import Init.Data.Int
def solveAdd (a b:Int): Int
:= b - a
First Theorem Proof:
theorem solveAdd_correct (a b: Int): a + (solveAdd a b) =b
:= by
rw [solveAdd]
rw [Int.add_comm]
exact Int.sub_add_cancel b a
Status: Correct
Feedback:
------------------
Replaying /root/CodeProofTheArena/temp/tmpknqzxoix/target.olean
Finished imports
Finished replay
---
def
solveAdd
Int → Int → Int
:= fun (a : Int) (b : Int) => sorryAx.{1} Int Bool.false
#[sorryAx]
---
theorem
solveAdd_correct
∀ (a b : Int), a + solveAdd a b = b
#[sorryAx]
------------------
Replaying /root/CodeProofTheArena/temp/tmpknqzxoix/proof.olean
Finished imports
Finished replay
---
def
solveAdd
Int → Int → Int
:= fun (a : Int) (b : Int) => HSub.hSub.{0, 0, 0} Int Int Int (instHSub.{0} Int Int.instSub) b a
#[]
---
theorem
solveAdd.eq_1
∀ (a b : Int), solveAdd a b = b - a
#[]
---
theorem
solveAdd_correct
∀ (a b : Int), a + solveAdd a b = b
#[propext]
Finished with no errors.