Reputation: 267
Here is the theorem that I want to prove.
prob4 : ∀(w x y z : ℕ) → w * (x + y + z) ≡ z * w + x * w + w * y
prob 4 = {!!}
This is what I wrote
open import Data.Nat
open import Data.Nat.Properties.Simple
open import Relation.Binary.PropositionalEquality
prob4a : ∀ (w x y z : ℕ) → w * (x + y + z) ≡ w * x + w * y + w * z
prob4a 0 x y z = refl
prob4a (suc w) x y z rewrite prob4a w x y z
| +-assoc (x + y + z) (w * x) (w * y) (w * z) = ?
I created a new theorem prob4a in order to arrange the output in a correct order. And it's able to use theorems in nat.thms.agda to prove it.
and the error is
x + y + z + w * x + w * y ≡ x + y + z + (w * x + w * y)
should be a function type, but it isn't when checking that(w * z)
is a valid argument to a function of typex + y + z + w * x + w * y ≡ x + y + z + (w * x + w * y)
so what 's that mean? and how can i correct it in order to let the prove work?
Upvotes: 2
Views: 517