-
Notifications
You must be signed in to change notification settings - Fork 13
Support cumulativity in the output for ULift #60
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
872f25f
Initial plan
Copilot 44a3d22
feat: add Set Lean ULift To Cumulativity option
Copilot 7b9f2e4
fix: remove incomplete comment from test file
Copilot cae05d6
refactor: use predeclared API, drop the flag, use example.out from issue
Copilot ead0230
fix: remove SProp cumul defs from Lean.v, move Register to test, add …
Copilot a6b3864
refactor: move cumul definitions to src/ULiftCumulativeRegistration.v
Copilot 231b6e5
fix: replace Unicode arrow and en-dash in ULiftCumulativeRegistration.v
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| 1 #NS 0 Scratch | ||
| 2 #NS 1 MyProd | ||
| 3 #NS 2 mk | ||
| 4 #NS 0 α | ||
| 5 #NS 0 u | ||
| 1 #UP 5 | ||
| 0 #ES 1 | ||
| 6 #NS 0 β | ||
| 7 #NS 0 v | ||
| 2 #UP 7 | ||
| 1 #ES 2 | ||
| 8 #NS 0 a | ||
| 9 #NS 8 _@ | ||
| 10 #NS 9 Scratch | ||
| 11 #NS 10 Basic | ||
| 12 #NS 11 _hyg | ||
| 13 #NI 12 122 | ||
| 2 #EV 1 | ||
| 14 #NI 12 124 | ||
| 3 #EC 2 1 2 | ||
| 4 #EV 3 | ||
| 5 #EA 3 4 | ||
| 6 #EV 2 | ||
| 7 #EA 5 6 | ||
| 8 #EP #BD 14 2 7 | ||
| 9 #EP #BD 13 2 8 | ||
| 10 #EP #BI 6 1 9 | ||
| 11 #EP #BI 4 0 10 | ||
| 3 #US 0 | ||
| 4 #UM 3 1 | ||
| 5 #UM 4 2 | ||
| 12 #ES 5 | ||
| 13 #EP #BD 6 1 12 | ||
| 14 #EP #BD 4 0 13 | ||
| #IND 2 2 14 1 3 11 5 7 | ||
| 15 #NS 0 ULift | ||
| 16 #NS 15 up | ||
| 17 #NS 0 s | ||
| 6 #UP 17 | ||
| 7 #US 6 | ||
| 15 #ES 7 | ||
| 18 #NS 0 down | ||
| 16 #EV 0 | ||
| 19 #NS 0 r | ||
| 8 #UP 19 | ||
| 17 #EC 15 8 6 | ||
| 18 #EA 17 2 | ||
| 19 #EP #BD 18 16 18 | ||
| 20 #EP #BI 4 15 19 | ||
| 9 #UM 6 8 | ||
| 10 #US 9 | ||
| 21 #ES 10 | ||
| 22 #EP #BD 4 15 21 | ||
| #IND 1 15 22 1 16 20 19 17 | ||
| 20 #NS 1 MyNat | ||
| 21 #NS 20 zero | ||
| 23 #EC 20 | ||
| 22 #NS 20 succ | ||
| 23 #NI 12 7 | ||
| 24 #EP #BD 23 23 23 | ||
| 25 #ES 3 | ||
| #IND 0 20 25 2 21 23 22 24 | ||
| 24 #NS 1 example1 | ||
| 11 #US 3 | ||
| 26 #EC 2 11 11 | ||
| 27 #EC 15 3 0 | ||
| 28 #EA 27 23 | ||
| 29 #EA 26 28 | ||
| 30 #EA 29 25 | ||
| 31 #EC 3 11 11 | ||
| 32 #EA 31 28 | ||
| 33 #EA 32 25 | ||
| 34 #EC 16 3 0 | ||
| 35 #EA 34 23 | ||
| 36 #EC 21 | ||
| 37 #EA 35 36 | ||
| 38 #EA 33 37 | ||
| 39 #EA 38 23 | ||
| #DEF 24 30 39 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,4 +6,5 @@ | |
| core.v | ||
| init.v | ||
| anomaly_print_projections.v | ||
| pnni.v | ||
| pnni.v | ||
| ulift_cumul.v | ||
|
SkySkimmer marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| From LeanImport Require Import Lean. | ||
|
|
||
| (* Test: ULift imported with cumulativity uses definitions instead of an inductive. | ||
| The cumulative definitions are registered in Lean.v, so the import automatically | ||
| uses cumulativity for ULift. *) | ||
| Redirect "ulift_cumul.log" Lean Import "../dumps/ulift". | ||
|
|
||
| (* Verify that the imported Scratch_example1 has the correct type. | ||
| With cumulativity, ULift is transparent, so ULift_cumul_inst2 Scratch_MyNat | ||
| is convertible with Scratch_MyNat. *) | ||
| Check Scratch_example1 : Scratch_MyProd (ULift_cumul_inst2 Scratch_MyNat) Type. | ||
| Check Scratch_example1 : Scratch_MyProd Scratch_MyNat Type. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems strange, Rocq doesn't have cumulativity between SProp and Set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all SProp cumul definitions from
src/Lean.vin ead0230. Only instance 0 (both r, s non-SProp) supports the cumulative translation; SProp instances (1-3) fall through to normal inductive translation. The cumul definitions and Register commands are now provided at test time only.