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

Update Curves/Weierstrass #1953

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Conversation

andres-erbsen
Copy link
Contributor

No description provided.

@andres-erbsen andres-erbsen enabled auto-merge (rebase) September 4, 2024 23:12
@@ -67,8 +67,8 @@ Module Jacobian.
| _ => progress destruct_head'_sum
| _ => progress destruct_head'_bool
| _ => progress destruct_head'_or
| H: context[@dec ?P ?pf] |- _ => destruct (@dec P pf)
| |- context[@dec ?P ?pf] => destruct (@dec P pf)
| H: context[@dec ?P ?pf] |- _ => destruct (@dec P pf) || destruct (@dec P pf) at 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JasonGross this is because dependent occurrences and destructable occurranes of the same expression. Do you know a more systematic fix from the top of your head?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be "at 1 in H" or similar?

A more systematic fix: H: context C[@dec ?P ?pf] |- _ => destruct (@dec P pf) || (let p := fresh in pose (@dec P pf) as p; let C' := context C[p] in change C' in (type of H); destruct p)
Maybe too painful though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the idea that change works fine for changing some but not all occurrences?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, change + context will select only one occurrence at a time. This won't work if you need to simultaneously destruct in two or more occurrences though

@@ -42,13 +42,53 @@ Module Jacobian.
| [ H : ?T, H' : ~?T |- _ ] => solve [ exfalso; apply H', H ]
end.

Ltac lift_let :=
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JasonGross do we have this somewhere already?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/mit-plv/fiat-crypto/blob/master/src/Util/Tactics/MoveLetIn.v is similar but different.

I think this should get its own tactics file

@andres-erbsen andres-erbsen merged commit d3af796 into mit-plv:master Sep 5, 2024
54 checks passed
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

Successfully merging this pull request may close these issues.

2 participants