Submission Details
Challenge: solveAdd
Submitted by: ansar
Submitted at: 2025-05-08 18:34:28
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, Int.add_comm, Int.sub_add_cancel]
Status: Correct
Feedback:
------------------ Replaying /root/CodeProofTheArena/temp/tmp3_00dbc5/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/tmp3_00dbc5/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.