0

I am trying to proof inverse property over integer (which is represented as setoid i.e (a , b) represents a - b.)

I have defined the negation part as - (a , b) = (b , a):

-_  : ℤ -> ℤ
- (x , y)  = (y , x)

is0 : ℤ → Set
is0 (a , b) = a ≡ b

leftInverse : (x : ℤ) → - x + x ≡ zero
leftInverse (x , x₁) = {!!}

The goal of this is : (x₁ ℕ.+ x) , (x ℕ.+ x₁) ≡ 0 , 0 I can not use cong₂ here. I am thinking of using if else statement but I dont know that it will be proof. How should i proceed??

Cactus
  • 27,075
  • 9
  • 69
  • 149
ajayv
  • 641
  • 6
  • 21
  • Could you share a minimum working example? It would help to test your code. – Rodrigo Ribeiro Dec 30 '15 at 10:09
  • actually is0 is confusing. I just want to proof `lemma : (a : ℕ) → a , a ≡ 0 , 0` which example do you want me to write here. I can give proof of left identity. – ajayv Dec 30 '15 at 10:37
  • What is the definition of `_≡_`? – gallais Dec 30 '15 at 11:11
  • that is from this file : `open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl; sym; trans; cong; cong₂)` – ajayv Dec 30 '15 at 11:25
  • i.e that is a data type having one constructor refl. used from agda library. – ajayv Dec 30 '15 at 12:02
  • 1
    No wonder you cannot prove this, the only pair that is equal to `0 , 0` is of course `0 , 0`. Did you perhaps mean to use `leftInverse : (x : ℤ) → is0 (- x + x)`? – Vitus Dec 30 '15 at 21:46
  • thanks @Vitus Actually this definition works, what i wanted to prove. – ajayv Dec 31 '15 at 08:59

0 Answers0