Skip to content

chore: Option.guard accepts Bool predicate instead of Prop predicate - #8144

Merged
TwoFX merged 1 commit into
masterfrom
markus/option-guard
Apr 28, 2025
Merged

TwoFX merged 1 commit into
masterfrom
markus/option-guard

Conversation

@TwoFX

@TwoFX TwoFX commented Apr 28, 2025

Copy link
Copy Markdown
Member

This PR changes the predicate for Option.guard to be p : α → Bool instead of p : α → Prop. This brings it in line with other comparable functions like Option.filter.

@TwoFX TwoFX added the changelog-library Library label Apr 28, 2025
@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Apr 28, 2025
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Apr 28, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 28, 2025
@ghost

ghost commented Apr 28, 2025 •

Copy link
Copy Markdown

Mathlib CI status (docs):

@ghost ghost added breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan builds-mathlib CI has verified that Mathlib builds against this PR and removed breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan labels Apr 28, 2025
@TwoFX
TwoFX marked this pull request as ready for review April 28, 2025 13:56
@TwoFX
TwoFX requested a review from kim-em as a code owner April 28, 2025 13:56
@TwoFX
TwoFX enabled auto-merge April 28, 2025 13:56
@TwoFX
TwoFX added this pull request to the merge queue Apr 28, 2025
Merged via the queue into master with commit 2905073 Apr 28, 2025
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request May 2, 2025
* Trigger CI for leanprover/lean4#7971

* WIP

* WIP

* WIP

* Trigger CI for leanprover/lean4#7971

* Update lean-toolchain for testing leanprover/lean4#7975

* Fix

* Trigger CI for leanprover/lean4#7971

* remove adaptation notes

* Fix

* Fix

* chore: bump to nightly-2025-04-16

* revert some stuff

* Update lean-toolchain for testing leanprover/lean4#7983

* WIP

* Part one

* Part two

* lake update and fix

* Fix

* Trigger CI for leanprover/lean4#7983

* Shake

* chore: bump to nightly-2025-04-17

* lake update

* .

* chore: bump to nightly-2025-04-18

* Update lean-toolchain for testing leanprover/lean4#8021

* fix

* fix: !bench after Lake path changes (#24143)

* fix

* fix

* chore: bump to nightly-2025-04-19

* Merge master into nightly-testing

* temporarirly disable sythorder checking for Grind.IsCharP instance

* shake

* chore: bump to nightly-2025-04-20

* fix

* chore: bump to nightly-2025-04-21

* make fix more robust

* fix test

* chore: bump to nightly-2025-04-22

* .

* sorries

* sorries

* chore: bump to nightly-2025-04-23

* chore: bump to nightly-2025-04-24

* fix

* not there yet

* comment out

* comment out

* chore: bump to nightly-2025-04-25

* bump batteries

* more

* hacky fix?

* add comment

* fix lint-style

* Fix shake: Parser.parseHeader returns TSyntax instead of Syntax after the new module system

* Clean up

* Update lean-toolchain for testing leanprover/lean4#8000

* Lake update

* Fix

* Fix

* Fix

* Fix

* fix to Mathlib/Algebra/Homology/Embedding/Connect.lean

* Fix

* chore: bump to nightly-2025-04-26

* fix MinImports

* Update lean-toolchain for testing leanprover/lean4#8114

* lake update

* fix

* fixes

* fix

* fix deprecations

* remove accidental files

* chore: bump to nightly-2025-04-26

* chore: bump to nightly-2025-04-27

* fixes

* cleanup adaptation note

* shake --fix

* cleanup

* .

* cleanup

* cleanup

* cleanup

* comments

* cleanuo

* move batteries back to nightly-testing

* fix

* fix build hopefully?

* fix build hopefully?

* chore: bump to nightly-2025-04-28

* Update lean-toolchain for testing leanprover/lean4#8144

* lake update

* Fix

* fix grind instances

* shake

* Cleanup

* shake

* chore: bump to nightly-2025-04-29

* fix

* deprecation

* Update lean-toolchain for testing leanprover/lean4#8161

* shake

* fix GrindInstances

* basic test for grind +ring

* fixes for leanprover/lean4#8161

* fixes

* chore: adaptations for nightly-2025-04-29

* Merge master into nightly-testing

* chore: bump to nightly-2025-04-30

* lake update

* fix

* fix merge

* fix merge

* Drop a few unnecessary changes

* fix test

* chore: bump to nightly-2025-05-01

* fix

---------

Co-authored-by: leanprover-community-mathlib4-bot <[email protected]>
Co-authored-by: Markus Himmel <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Rob23oba <[email protected]>
Co-authored-by: Sebastian Ullrich <[email protected]>
Co-authored-by: Kyle Miller <[email protected]>
Co-authored-by: Joël Riou <[email protected]>
Co-authored-by: Ruben Van de Velde <[email protected]>
Co-authored-by: Johan Commelin <[email protected]>
kim-em added a commit to leanprover-community/mathlib4 that referenced this pull request May 5, 2025
* chore: bump to nightly-2025-04-16

* revert some stuff

* Update lean-toolchain for testing leanprover/lean4#7983

* WIP

* Part one

* Part two

* lake update and fix

* Fix

* Trigger CI for leanprover/lean4#7983

* Shake

* chore: bump to nightly-2025-04-17

* lake update

* .

* chore: bump to nightly-2025-04-18

* Update lean-toolchain for testing leanprover/lean4#8021

* fix

* fix: !bench after Lake path changes (#24143)

* fix

* fix

* chore: bump to nightly-2025-04-19

* Merge master into nightly-testing

* temporarirly disable sythorder checking for Grind.IsCharP instance

* shake

* chore: bump to nightly-2025-04-20

* fix

* chore: bump to nightly-2025-04-21

* make fix more robust

* fix test

* chore: bump to nightly-2025-04-22

* .

* sorries

* sorries

* chore: bump to nightly-2025-04-23

* chore: bump to nightly-2025-04-24

* fix

* not there yet

* comment out

* comment out

* chore: bump to nightly-2025-04-25

* bump batteries

* more

* hacky fix?

* add comment

* fix lint-style

* Fix shake: Parser.parseHeader returns TSyntax instead of Syntax after the new module system

* Clean up

* Update lean-toolchain for testing leanprover/lean4#8000

* Lake update

* Fix

* Fix

* Fix

* Fix

* fix to Mathlib/Algebra/Homology/Embedding/Connect.lean

* Fix

* chore: bump to nightly-2025-04-26

* fix MinImports

* Update lean-toolchain for testing leanprover/lean4#8114

* lake update

* fix

* fixes

* fix

* fix deprecations

* remove accidental files

* chore: bump to nightly-2025-04-26

* chore: bump to nightly-2025-04-27

* fixes

* cleanup adaptation note

* shake --fix

* cleanup

* .

* cleanup

* cleanup

* cleanup

* comments

* cleanuo

* move batteries back to nightly-testing

* fix

* fix build hopefully?

* fix build hopefully?

* chore: bump to nightly-2025-04-28

* Update lean-toolchain for testing leanprover/lean4#8144

* lake update

* Fix

* fix grind instances

* shake

* Cleanup

* shake

* chore: bump to nightly-2025-04-29

* fix

* deprecation

* Update lean-toolchain for testing leanprover/lean4#8161

* shake

* fix GrindInstances

* basic test for grind +ring

* fixes for leanprover/lean4#8161

* fixes

* chore: adaptations for nightly-2025-04-29

* Merge master into nightly-testing

* chore: bump to nightly-2025-04-30

* lake update

* fix

* fix merge

* fix merge

* Drop a few unnecessary changes

* fix test

* chore: bump to nightly-2025-05-01

* fix

* Merge master into nightly-testing

* chore: bump to nightly-2025-05-02

* chore: bump to nightly-2025-05-03

* chore: adaptations for nightly-2025-05-03

---------

Co-authored-by: leanprover-community-mathlib4-bot <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: Rob23oba <[email protected]>
Co-authored-by: Markus Himmel <[email protected]>
Co-authored-by: Kim Morrison <[email protected]>
Co-authored-by: Sebastian Ullrich <[email protected]>
Co-authored-by: Kyle Miller <[email protected]>
Co-authored-by: Joël Riou <[email protected]>
Co-authored-by: Ruben Van de Velde <[email protected]>
@TwoFX
TwoFX deleted the markus/option-guard branch August 4, 2025 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-mathlib CI has verified that Mathlib builds against this PR changelog-library Library toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant