Skip to content

Chapter 6 - #70

Merged
arademaker merged 6 commits into
cslib-community:mainfrom
derik713:reviewCap6
Sep 11, 2026
Merged

arademaker merged 6 commits into
cslib-community:mainfrom
derik713:reviewCap6

Conversation

@derik713

Copy link
Copy Markdown
Contributor

This PR implements the material covered in Chapter 6. It includes the equivalence theorems from Sections 6.1 and 6.2, the implementation of the TimeM monad, and the functions introduced in Sections 6.3 and 6.4.

Implementation details

  • Section 6.3: Introduced the ValidSizeTree idea so that the .height field (which has O(1) cost) can be used correctly.
  • Some of the more involved complexity proofs in Section 6.2 are still missing, as well as the proofs for Sections 6.3 and 6.4.
  • I could not find a satisfactory solution for qsort₁/qsort and select₀/select in Section 6.2.
  • Some functions remain only partially implemented because I was unable to prove their termination.

@arademaker

Copy link
Copy Markdown
Member

O arquivo API é desnecessário, o projeto já importa a CSLib, basta você usar como https://github.com/arademaker/fad/blob/main/Fad/Chapter2.lean#L4

@derik713

Copy link
Copy Markdown
Contributor Author

De fato, acabei não percebendo e usando igual pessoal do cap 10. Acabei de passar para o formato da CSLib.

@arademaker

Copy link
Copy Markdown
Member

I will accept it since it's a genuine improvement over main. Hope you can now remove the remaining partial definitions.

@arademaker
arademaker merged commit 75a149e into cslib-community:main Sep 11, 2026
@derik713
derik713 deleted the reviewCap6 branch September 16, 2026 20:40
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