Skip to content
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

rpred expose the iinternal of Num.real #1108

Open
thery opened this issue Oct 25, 2023 · 5 comments
Open

rpred expose the iinternal of Num.real #1108

thery opened this issue Oct 25, 2023 · 5 comments

Comments

@thery
Copy link
Member

thery commented Oct 25, 2023

I am porting my code to mathcomp2.1

Here is the initial code :

From mathcomp Require Import all_ssreflect all_algebra all_field.
Open Scope ring_scope.

Import GRing.Theory.

Lemma  CrealN1  :  -1 \is Creal.
Proof. by  rewrite rpredN. Qed.

rpredN turns into -1 \is Creal into 1 \is Creal which is solved automatically.

With mathcomp2.1

Lemma CrealN1 : (-1 : algC) \is Num.real.
Proof.
rewrite rpredN.

Now repdN exposes the interval

1 \in Num.Internals.Def_Rreal_pred__canonical__GRing_OppClosed Algebraics.Implementation_type__canonical__Num_NumDomain

and the proof does not terminate anymore with by [].
What has changed?

@proux01
Copy link
Contributor

proux01 commented Oct 25, 2023

What about rpredN/= ?

@thery
Copy link
Member Author

thery commented Oct 25, 2023

It improves things but still by [] does not close the goal. We get

1 \in Num.Def.Rreal_pred

Anyway there is something weird. Now I write x \is Num.real and x \is a Num.nat. Should it not be x \is a Num.real?

@proux01
Copy link
Contributor

proux01 commented Oct 31, 2023

It improves things but still by [] does not close the goal. We get

1 \in Num.Def.Rreal_pred

You may have to add something like rewrite qualifE/=

Anyway there is something weird. Now I write x \is Num.real and x \is a Num.nat. Should it not be x \is a Num.real?

I think both are accepted as input but it should indeed be the second when printing.

@thery
Copy link
Member Author

thery commented Nov 2, 2023

qualifEreally opens the predicate I dont want this.
Here is my current proof.

From mathcomp Require Import all_ssreflect all_algebra all_field.

Open Scope ring_scope.

Goal (- 1 : algC) \is Num.real.
rewrite GRing.rpredN.
by rewrite -[_ \in _]/(_ \is Num.real).
Qed.

@proux01
Copy link
Contributor

proux01 commented Nov 2, 2023

I see, I don't think we have a better solution currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants