[Merged by Bors] - chore(Data/Finset/Lattice/Fold): use to_dual#37047
[Merged by Bors] - chore(Data/Finset/Lattice/Fold): use to_dual#37047gasparattila wants to merge 5 commits intoleanprover-community:masterfrom
to_dual#37047Conversation
PR summary ff84feb246Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
0e9b416 to
f3364b8
Compare
JovanGerb
left a comment
There was a problem hiding this comment.
Could you clarify in the PR description which changes were made because they were already there on the dual side? Currently it looks like you added some tags for orthogonal reasons.
f3364b8 to
908db92
Compare
|
This pull request has conflicts, please merge |
cb0c8a4 to
e79a7ea
Compare
This PR uses the `@[to_dual]` attribute to generate dual lemmas about `Finset.sup`. The lemmas about `sdiff` and `himp` are skipped, as `HeytingAlgebra` is not yet tagged with `@[to_dual]`. Other changes: - tag `inf_insert` with `@[grind =]` - rename `le_inf_const_le` to `le_inf_const` - tag `inf_union` with `@[grind _=_]` - tag `inf_mono_fun` with `@[grind ←]` - tag `inf_mono` with `@[grind ←]` - tag `inf_attach` with `@[simp]` - add `le_inf_of_directed_le` - add `inf_eq_top_of_isEmpty` - add `inf_mem_of_nonempty` - rename `comp_sup_eq_sup_comp_of_is_total` to `comp_sup_eq_sup_comp_of_linearOrder` (and similarly for the `inf` version) - add `inf'_mono_fun` - add `comp_inf_eq_inf_comp_of_nonempty`
7777655 to
4264770
Compare
|
-awaiting-author |
| -- TODO: `@[to_dual]` should translate the docstring generated by `alias` | ||
| protected alias ⟨_, sup_le⟩ := Finset.sup_le_iff | ||
|
|
||
| @[to_dual existing sup_le] | ||
| protected alias ⟨_, le_inf⟩ := Finset.le_inf_iff |
There was a problem hiding this comment.
By the way, I've opened leanprover-community/batteries#1763 to start supporting this feature.
This PR uses the `@[to_dual]` attribute to generate dual lemmas about `Finset.sup`. The lemmas about `sdiff` and `himp` are skipped, as `HeytingAlgebra` is not yet tagged with `@[to_dual]`. To improve the consistency between dual lemmas, several changes are made: - tag `inf_insert` with `@[grind =]` - rename `le_inf_const_le` to `le_inf_const` - tag `inf_union` with `@[grind _=_]` - tag `inf_mono_fun` with `@[grind ←]` - tag `inf_mono` with `@[grind ←]` - tag `inf_attach` with `@[simp]` - add `le_inf_of_directed_le` - add `inf_eq_top_of_isEmpty` - add `inf_mem_of_nonempty` - add `inf'_mono_fun` - rename `comp_sup_eq_sup_comp_of_nonempty` to `apply_sup_eq_sup_comp_of_nonempty` and add `apply_inf_eq_inf_comp_of_nonempty`
|
Pull request successfully merged into master. Build succeeded: |
to_dualto_dual
…37047) This PR uses the `@[to_dual]` attribute to generate dual lemmas about `Finset.sup`. The lemmas about `sdiff` and `himp` are skipped, as `HeytingAlgebra` is not yet tagged with `@[to_dual]`. To improve the consistency between dual lemmas, several changes are made: - tag `inf_insert` with `@[grind =]` - rename `le_inf_const_le` to `le_inf_const` - tag `inf_union` with `@[grind _=_]` - tag `inf_mono_fun` with `@[grind ←]` - tag `inf_mono` with `@[grind ←]` - tag `inf_attach` with `@[simp]` - add `le_inf_of_directed_le` - add `inf_eq_top_of_isEmpty` - add `inf_mem_of_nonempty` - add `inf'_mono_fun` - rename `comp_sup_eq_sup_comp_of_nonempty` to `apply_sup_eq_sup_comp_of_nonempty` and add `apply_inf_eq_inf_comp_of_nonempty`
This PR uses the
@[to_dual]attribute to generate dual lemmas aboutFinset.sup. The lemmas aboutsdiffandhimpare skipped, asHeytingAlgebrais not yet tagged with@[to_dual].To improve the consistency between dual lemmas, several changes are made:
inf_insertwith@[grind =]le_inf_const_letole_inf_constinf_unionwith@[grind _=_]inf_mono_funwith@[grind ←]inf_monowith@[grind ←]inf_attachwith@[simp]le_inf_of_directed_leinf_eq_top_of_isEmptyinf_mem_of_nonemptyinf'_mono_funcomp_sup_eq_sup_comp_of_nonemptytoapply_sup_eq_sup_comp_of_nonemptyand addapply_inf_eq_inf_comp_of_nonempty