Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am getting error [ Focus ] Wrong bullet - : Current bullet - is not finished. for the line - intros contra.

I am getting error
"[Focus] Wrong bullet -: Current bullet - is not finished."
for the line "- intros contra. inversion Hdiv; subst. apply IHn; auto."
And cannot use "auto" in the code
Help my fix this code:
Require Import Arith.
(* Define the accessiblity predicate *)
Inductive acc : nat -> Prop :=
| acc_k : forall k,(forall y, y < k -> acc y)-> acc k.
(* Define a proof of well-foundedness of < relation *)
Theorem lt_wf : forall n, acc n.
Proof.
induction n.
- apply acc_k. intros y H. inversion H.
- apply acc_k. intros y Hlt. apply IHn.
Qed.
(* Define a function acc_then_Px which converts a proof of accessibility to a proof of predicate P *)
Definition acc_then_Px : forall (P : nat -> Prop)(n : nat),
(forall x,(forall y, y < x -> P y)-> P x)-> acc n -> P n.
Proof.
refine (fun P n f acc =>
acc_ind __ acc
(fun k f'=> f k (fun y Hy => acc_then_Px P y (fun _=> f')(f' y Hy)))
acc).
Defined.
(* Define a strong natural induction principle *)
Definition strong_nat_ind : forall (P : nat -> Prop),
(forall x,(forall y, y < x -> P y)-> P x)-> forall x, P x.
Proof.
refine (fun P f x => acc_then_Px P x f (lt_wf x)).
Defined.
(* Define the div4 and rem2 predicates *)
Inductive div4 : nat -> Prop :=
| div4_0 : div40
| div4_S : forall n, rem2 n -> div4(S (S n))
with rem2 : nat -> Prop :=
| rem2_S : forall n, div4 n -> rem2(S (S n)).
(* Lemma prob4: div4 n -> ~rem2 n *)
Lemma prob4 : forall n, div4 n -> ~rem2 n.
Proof.
intros n Hdiv.
induction n using strong_nat_ind.
- intros contra. inversion Hdiv.
- intros contra. inversion Hdiv; subst. apply IHn; auto.
Qed.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sybase Database Administrators Handbook

Authors: Brian Hitchcock

1st Edition

0133574776, 978-0133574777

More Books

Students also viewed these Databases questions

Question

4. Solicit help from parents.

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago

Question

b. Why were these values considered important?

Answered: 1 week ago