Skip to content

feat: query complexity model for algorithms theory - #372

Open
Shreyas4991 wants to merge 54 commits into
leanprover:mainfrom
Shreyas4991:query-final-squash
Open

feat: query complexity model for algorithms theory#372
Shreyas4991 wants to merge 54 commits into
leanprover:mainfrom
Shreyas4991:query-final-squash

Conversation

@Shreyas4991

@Shreyas4991 Shreyas4991 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

This is a highly squashed version of #275 with a smaller commit an comment history for ease of further reviewing.

Authors: Shreyas Srinivas, Tanner Duve, Eric Wieser.

Author : Shreyas Srinivas
Co-Author : Eric Wieser
Co-Author : Tanner Duve

@chenson2018 chenson2018 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks in much better shape now, just some relatively minor things from me:

Comment thread Cslib/AlgorithmsTheory/Algorithms/ListInsertionSort.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Algorithms/ListInsertionSort.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Algorithms/ListLinearSearch.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Algorithms/ListLinearSearch.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Algorithms/ListOrderedInsert.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Algorithms/MergeSort.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Algorithms/ListOrderedInsert.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Algorithms/MergeSort.lean Outdated
Comment thread Cslib/AlgorithmsTheory/Models/ListComparisonSearch.lean
Comment thread Cslib/AlgorithmsTheory/Models/ListComparisonSearch.lean Outdated
@Shreyas4991

Shreyas4991 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor Author

This looks in much better shape now, just some relatively minor things from me:

@chenson2018 : I think I have addressed all your review comments so far.

@chenson2018 chenson2018 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I pushed one small golf, and my other comments have been addressed. I left the two comments where I'd tagged @eric-wieser unresolved so they can be double checked. As usual, leaving for @fmontesi for final consideration.

Comment thread CslibTests/QueryModel/ProgExamples.lean
Comment thread CslibTests/QueryModel/ProgExamples.lean Outdated
Comment thread CslibTests/QueryModel/QueryExamples.lean
# Query Type for Comparison Search in Lists

In this file we define two query types `SortOps` which is suitable for insertion sort, and
`SortOps`for comparison based searching in Lists. We define a model `sortModel` for `SortOps`

@Arleee1 Arleee1 Mar 17, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Is one of the SortOps supposed to be different, or are they supposed to be duplicated?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We changed the name to the shorter SortOps since we would like that to be the default comparison sort model

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry about that!

Comment thread Cslib/AlgorithmsTheory/Models/ListComparisonSort.lean Outdated
Co-authored-by: Ethan Ermovick <61568556+Arleee1@users.noreply.github.com>
kim-em added a commit to kim-em/cslib that referenced this pull request Apr 22, 2026
This merge preserves the commit history of leanprover#372 — Shreyas' earlier work
on the query complexity model — in the ancestry of this branch. The
tree is taken from upstream/main: the superseding implementation lands
in the commits that follow.
@Shreyas4991
Shreyas4991 requested a review from sorrachai as a code owner June 30, 2026 13:26
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.

5 participants