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

Yet more rules for Lib #737

Merged
merged 8 commits into from
Apr 8, 2024
Merged

Conversation

michaelmcinerney
Copy link
Contributor

No description provided.

lib/Heap_List.thy Show resolved Hide resolved
lib/Lib.thy Outdated Show resolved Hide resolved
lib/HaskellLemmaBucket.thy Show resolved Hide resolved
@lsf37
Copy link
Member

lsf37 commented Mar 19, 2024

Looks like there are still a few proof failures in the Orhpanage session. Probably missing a crunch_wps or hoare_drop_imps somewhere.

@michaelmcinerney
Copy link
Contributor Author

Sorry to force push - I didn't realise that reviews had begun. The changes I made were just to the Orphanage.thy files, within the commit for haskell_assert_wp

@@ -1176,6 +1176,18 @@ lemma corres_move_asm:

lemmas corres_cross_over_guard = corres_move_asm[rotated]

lemma corres_cross_add_guard:
"\<lbrakk> \<And>s s'. \<lbrakk>(s,s') \<in> sr; P s; P' s'\<rbrakk> \<Longrightarrow> Q s';
corres_underlying sr nf nf' r P (P' and Q) f g\<rbrakk>
Copy link
Member

Choose a reason for hiding this comment

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

extra space before (P', also wouldn't Q' make more sense than Q given it's on the concrete side?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it would make much more sense to use Q'. This is another rule copied straight over from the rt branch. Should I change it here? If I do change it for master, should I change it on the rt branch too? That would be quite annoying, because there would be many rules which do write where Q=blah

Copy link
Member

Choose a reason for hiding this comment

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

Do we use corres_cross_add_guard that often? Or are you saying there are other rules which also followed the Q scheme for the concrete side?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

corres_cross_add_guard is used dozens and dozens of times on the rt branch. It wouldn't be horrible to change, but it would be a bit of a nuisance

Copy link
Member

Choose a reason for hiding this comment

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

If it's only corres_cross_add_guard I'd vote for updating it and its uses, but if other lemmas follow the same scheme, I'd say defer to another round.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I will update it on both branches

Copy link
Member

Choose a reason for hiding this comment

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

Cheers

lemma corres_cross_add_abs_guard:
"\<lbrakk> \<And>s s'. \<lbrakk>(s,s') \<in> sr; P s; P' s'\<rbrakk> \<Longrightarrow> Q s;
corres_underlying sr nf nf' r (P and Q) P' f g\<rbrakk>
\<Longrightarrow> corres_underlying sr nf nf' r P P' f g"
Copy link
Member

@Xaphiosis Xaphiosis Mar 27, 2024

Choose a reason for hiding this comment

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

ah, I only now noticed this, shouldn't the align with the ? (on lemma above as well)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are quite a few lemmas in this theory file with this same problem. Should I fix up just this one, or all of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I can at least fix it in the lemmas I've introduced in this PR. But the one above is old and wrong, and there are other instances of this elsewhere

Copy link
Member

Choose a reason for hiding this comment

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

For this round, I'd stick to the ones you're adding, but we'd welcome a future PR that consolidates the others.

@michaelmcinerney michaelmcinerney merged commit 0edbdb8 into master Apr 8, 2024
13 of 14 checks passed
@michaelmcinerney michaelmcinerney deleted the michaelm-rules_for_Lib_Mar24 branch April 8, 2024 11:41
@Xaphiosis
Copy link
Member

Too late now, but one of the commit messages has an extra:

reindent corres_cross_add_guard and friend squash

Signed-off-by: Michael McInerney <[email protected]>

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.

3 participants