Question: For some reason when I do an example of the exercise, it throws me an error and I can't figure out why. This is Coq
(** **** Exercise: 2 stars, standard (third) Define a function (third: nat -> nat] that divides a number by three, rounding down. =) Fixpoint third in nat) : nat - match with 10-> IS @ @ is(s(n)) -> S(third(n)) end. Example third four_is_one : third 4 = 1. Proof. Simpl. reflexivity. Oed. U: - *goals All L4 Coq Goals Helm WK) Error: (diff) Unable to unify "1" with "2". (** **** Exercise: 2 stars, standard (third) Define a function (third: nat -> nat] that divides a number by three, rounding down. =) Fixpoint third in nat) : nat - match with 10-> IS @ @ is(s(n)) -> S(third(n)) end. Example third four_is_one : third 4 = 1. Proof. Simpl. reflexivity. Oed. U: - *goals All L4 Coq Goals Helm WK) Error: (diff) Unable to unify "1" with "2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
