-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this the difference between Prop and Set? #74
Comments
This is a good point. You are right that you cannot define 'find' directly because 'appears_in'
Also, the theorem is provable because "exists n:nat, nth X l n = Some x" is |
It seems that the world of |
The rule is simple.
Note that technically Prop is a subset of Type. On Mon, Apr 20, 2015 at 8:52 PM, jaewooklee93 notifications@github.com
|
I think now I catch the point. I can perform the case analysis for Require Import Omega.
Inductive even: nat -> Prop :=
| ev_0 : even 0
| ev_SS : forall n, even n -> even (2+n).
Theorem Prop2Prop:
forall n (H: even n),
0=n \/ 2<=n.
Proof.
intros.
inversion H; omega.
Qed.
Theorem Prop2Set:
forall n (H: even n),
{0=n} + {2<=n}.
Proof.
intros.
inversion H. (* Error *)
Abort. I thought |
Ah, of course, |
My idea is that if I have an evidence for
x
∈l
, wherex
is an element andl
is a list, I can construct a function to find the leftmost appearing position ofx
in the listl
. My first try was this.However, it only gave me an unfamiliar error.
I guess that this error is related to what professor explained in the last lecture. He said
Prop
is similar toSet
, butProp
only cares whether it is empty or nonempty. I think that is the reason of impossibility of doing case analysis forev
. Is that correct?In contrast, I can easily prove the following theorem
At this point, I'm little bit confused. While we can prove the existence of such function, even in a constructive way, why cannot we define that function with
Fixpoint
? Are such functions only living in the world ofTheorem
?The text was updated successfully, but these errors were encountered: