-
Notifications
You must be signed in to change notification settings - Fork 331
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 by Bors] - feat(Data/Fin/Tuple): Define Fin.take
and initial theorems
#17196
Conversation
PR summary f508575c15Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
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.
What's your use case for Fin.take
?
…lib4 into fin-take Update branch to latest mathlib version
I'm working on a formalization of interactive proof systems. As part of that process, I need to define the type of message sent in each round, as something like:
Then I will also need to talk about composition and restriction of interactive protocols. Composition amounts to |
Seems reasonable, but let me ask among the reviewers which repository it should live in. |
@kim-em I have added four theorems that intertwines
Would appreciate your feedback on theorem statement & naming. Maybe I should get rid of |
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.
Thanks for your patience! The end is in sight.
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
Co-authored-by: Yaël Dillies <[email protected]>
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.
I'm appy with this. What about you, @kim-em ?
maintainer merge
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
bors merge |
This PR defines `Fin.take`, which takes the first `m` elements of an `n`-tuple (from the left). It requires that `m ≤ n`, and returns an `m`-tuple. This is an analogue of `List.take`. It also provides initial theorems for `Fin.take`. If all goes well, I plan to add more theorems over time, and also define `rtake` to be taking from the right, similar to `List.rtake`. Context: I'm working on a formalization of interactive proof systems. As part of that process, I need to define the type of message sent in each round, as something like: ``` def MessageType (numRounds : ℕ) := Fin numRounds → Type def message (numRounds : ℕ) : ∀ i, (MessageType numRounds) i ``` Then I will also need to talk about composition and restriction of interactive protocols. Composition amounts to `Fin.addCases`, but restriction is my new `Fin.take`, and also `Fin.rtake` in the future (taking from the right). Co-authored-by: Quang Dao <[email protected]>
Pull request successfully merged into master. Build succeeded: |
Fin.take
and initial theoremsFin.take
and initial theorems
This PR defines
Fin.take
, which takes the firstm
elements of ann
-tuple (from the left). It requires thatm ≤ n
, and returns anm
-tuple. This is an analogue ofList.take
.It also provides initial theorems for
Fin.take
. If all goes well, I plan to add more theorems over time, and also definertake
to be taking from the right, similar toList.rtake
.Context: I'm working on a formalization of interactive proof systems. As part of that process, I need to define the type of message sent in each round, as something like:
Then I will also need to talk about composition and restriction of interactive protocols. Composition amounts to
Fin.addCases
, but restriction is my newFin.take
, and alsoFin.rtake
in the future (taking from the right).