Answered step by step
Verified Expert Solution
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 :
acck : forall kforall y y k acc y acc k
Define a proof of wellfoundedness of relation
Theorem ltwf : forall n acc n
Proof.
induction n
apply acck intros y H inversion H
apply acck intros y Hlt apply IHn.
Qed.
Define a function accthenPx which converts a proof of accessibility to a proof of predicate P
Definition accthenPx : forall P : nat Propn : nat
forall xforall y y x P y P x acc n P n
Proof.
refine fun P n f acc
accind acc
fun k f f k fun y Hy accthenPx P y fun ff y Hy
acc
Defined.
Define a strong natural induction principle
Definition strongnatind : forall P : nat Prop
forall xforall y y x P y P x forall x P x
Proof.
refine fun P f x accthenPx P x f ltwf x
Defined.
Define the div and rem predicates
Inductive div : nat Prop :
div : div
divS : forall n rem n divS S n
with rem : nat Prop :
remS : forall n div n remS S n
Lemma prob: div n ~rem n
Lemma prob : forall n div n ~rem n
Proof.
intros n Hdiv.
induction n using strongnatind.
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started