Submission Details
Challenge: solveAdd
Submitted by: GasStationManager
Submitted at: 2024-11-24 12:59:22
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]; omega
Status: Correct
Feedback:
------------------
Replaying /root/CodeProofTheArena/temp/tmpmpgklsro/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/tmpmpgklsro/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, Quot.sound]
Finished with no errors.