mathlib4
mathlib4 copied to clipboard
tactic porting tracking issue
This issue parallels the content of Mathlib/Mathport/Syntax.lean, tracking the remaining work to port mathlib3 tactics to mathlib4, but also contains "ephemeral" information that does not belong in that file.
Primarily, this issue contains a list of tactics (or groups of tactics), along with any relevant information about work-in-progress (e.g. people who've "claimed" a tactic, PRs, abandoned work, etc). Some "claims" are probably out-of-date. Feel free to remove yourself from anything here without explanation!
We hope that everyone will edit this freely to try to keep it up to date.
Currently this is in the same order as Syntax.lean (although with tactics we might skip or only "stub" deferred to the end), but it may be worthwhile to turn this into a prioritised list.
🔹 – unclaimed ◼️ – claimed ☑️ – PR'd, unneeded, or otherwise done
E: Easy. It's a simple macro in terms of existing things,
or an elab tactic for which we have many similar examples. Example: left
M: Medium. An elab tactic, not too hard, perhaps a 100-200 lines file. Example: have
N: Possibly requires new mechanisms in lean 4, some investigation required
B: Hard, because it is a big and complicated tactic
S: Possibly easy, because we can just stub it out or replace with something else
?: uncategorized
- :small_blue_diamond:
Nomit/Ninclude/Nparameter - :ballot_box_with_check:
?case''- PR'd as leanprover/lean4#1628 (then needs update to mathport)
- :ballot_box_with_check:
Mcasesm/Mcases_type/Mconstructorm- PR'd as #434
- :small_blue_diamond:
Nabstract - :ballot_box_with_check:
?injections with/Minjections_and_clear- done after leanprover-community/mathport#178 lands
- :ballot_box_with_check:
Nsimp_intro- PR'd as #446
- :ballot_box_with_check:
Esymm/Etrans- PR'd as #253
- :small_blue_diamond:
Bcc - :ballot_box_with_check:
?unfold(with multiple identifiers) /?dunfold/?delta'/?unfold1- done after leanprover-community/mathport#178 lands
- :small_blue_diamond:
Munfold_projs - :black_medium_square:
Einfer_auto_param- @urkud claimed this
- Wrenna Robson is working on this
- :ballot_box_with_check:
Eapply'/Eeapply'/Efapply'/Eapply_with'/Emapply'/Erfl'/Esymm'/Etrans'- should be bugfixed in core, then all these become redundant
- :small_blue_diamond:
Etry_for- Started by @bollu, but leanprover/lean4#1364 stalled. @bollu is no longer working on it
- :small_blue_diamond:
Eunfold_coes - :small_blue_diamond:
Eunfold_wf - :small_blue_diamond:
Munfold_aux - :ballot_box_with_check:
?generalize at h- PR'd as leanprover/lean4#1635
- :small_blue_diamond:
Mclean - :small_blue_diamond:
Brefine_struct - :small_blue_diamond:
Mmatch_hyp - :small_blue_diamond:
Nfield/Shave_field/Sapply_field - :ballot_box_with_check:
Mapply_rules- PR'd as #412
- :small_blue_diamond:
Mh_generalize - :ballot_box_with_check:
Eclear_value- PR'd as #330
- :small_blue_diamond:
Mapply_assumption - :ballot_box_with_check:
Bchoose- @jcommelin has PR'd this as #420
- :small_blue_diamond:
Ncongr- Partially implemented in core, we still need the extra args version
- :small_blue_diamond:
Mrcongr - :black_medium_square:
Econvert/Econvert_to- Alena Gusakov has claimed this.
- :small_blue_diamond:
Eac_change - :small_blue_diamond:
Mdecide! - :small_blue_diamond:
Mdelta_instance - :small_blue_diamond:
Mgeneralizes - :black_medium_square:
Mgeneralize_proofs- @alexjbest has PR'd this as #447
- :small_blue_diamond:
Bitauto - :small_blue_diamond:
Blift- ~~@jcommelin has started work~~ is no longer working on it.
- :small_blue_diamond:
Bobviously - :small_blue_diamond:
Massoc_rw - :small_blue_diamond:
Ndsimp_result/Nsimp_result - :small_blue_diamond:
Msplit_ifs - :black_medium_square:
Btauto- @thorimur is working on this
- :small_blue_diamond:
Mtrunc_cases - ◼️ :
Eapply_normed- @newell is working on this.
- :small_blue_diamond:
Babel/Eabel1/Babel!/Eabel1!- PR in #38 (abandoned?)
- :small_blue_diamond:
Ering1/Ering1! - :black_medium_square:
Ering_nf- @digama0 claimed this.
- :small_blue_diamond:
Ering! - :small_blue_diamond:
Ering_exp - :small_blue_diamond:
Enoncomm_ring - :small_blue_diamond:
Mlinear_combination - :small_blue_diamond:
Blinarith- @semorrison is working on this; it is waiting on
ringhandling subtraction.
- @semorrison is working on this; it is waiting on
- :small_blue_diamond:
Mtfae_have/Mtfae_finish- ~~@bollu claimed these~~ is no longer working on them
- :small_blue_diamond:
Mmono - :small_blue_diamond:
Bac_mono - :black_medium_square:
Mapply_fun- PR'd as #475
- :ballot_box_with_check:
Mfin_cases- PR'd as #437
- :small_blue_diamond:
Minterval_cases - :small_blue_diamond:
Mreassoc - :small_blue_diamond:
Mslice_lhs/Mslice_rhs - :black_medium_square:
Mgroup- @tb65536 is going to try this.
- :small_blue_diamond:
Mcancel_denoms - :black_medium_square:
Mzify- Anatole Dedecker is working on this.
- @mcdoll is claiming this
- :small_blue_diamond:
Munfold_cases - :small_blue_diamond:
Mfield_simp - :small_blue_diamond:
Bequiv_rw - :black_medium_square:
Nnth_rw- ~~@winston-h-zhang has claimed this~~ is no longer working on it.
- :small_blue_diamond:
Mpi_instance - :small_blue_diamond:
Btidy - :small_blue_diamond:
Bwlog(https://github.com/leanprover-community/mathlib/pull/16495 refactors the Lean 3 version) - :small_blue_diamond:
Melementwise - :small_blue_diamond:
Mnontriviality - :black_medium_square:
Mfilter_upwards- Anatole Dedecker is working on this.
- :small_blue_diamond:
EisBounded_default - :small_blue_diamond:
Nop_induction - :small_blue_diamond:
Mcontinuity - :ballot_box_with_check:
Eunit_interval- PR'd as #339
- :small_blue_diamond:
Nmeasurability - :small_blue_diamond:
Mpadic_index_simp - :small_blue_diamond:
EuniqueDiffWithinAt_Ici_Iic_univ - :small_blue_diamond:
Mghost_fun_tac - :small_blue_diamond:
Mghost_calc - :small_blue_diamond:
Minit_ring - :small_blue_diamond:
Eghost_simp - :small_blue_diamond:
Ewitt_truncate_fun_tac - :small_blue_diamond:
Mpure_coherence/Mcoherence - :small_blue_diamond: (
convmode)Mapply_congr - :small_blue_diamond: (
convmode)Enorm_num/Enorm_num1- ~~@bollu claimed this~~ is no longer working on it
- :small_blue_diamond: (
convmode)Ering - :small_blue_diamond: (
convmode)Ering_nf - :small_blue_diamond: (
convmode)Ering_exp - :small_blue_diamond: (
convmode)Mslice - :small_blue_diamond: (attribute)
?protect_proj - :ballot_box_with_check: (attribute)
Mext- slated for removal: leanprover-community/mathlib#16602
- :small_blue_diamond: (attribute)
Mhigher_order - :small_blue_diamond: (attribute)
Mmk_iff - :small_blue_diamond: (attribute)
Mnotation_class - :small_blue_diamond: (attribute)
Mmono - :small_blue_diamond: (attribute)
Mreassoc - :small_blue_diamond: (attribute)
Melementwise - :black_medium_square: (command)
Ncopy_doc_string/Nadd_decl_doc/Nadd_tactic_doc- Evgenia Karunus is looking into these
- :small_blue_diamond: (command)
Nmk_simp_attribute - :small_blue_diamond: (command)
Madd_hint_tactic - :small_blue_diamond: (command)
Mmk_iff_of_inductive_prop - :small_blue_diamond: (command)
Ndef_replacer - :small_blue_diamond: (command)
Mreassoc_axiom
Things to port not in the syntax file:
- :black_medium_square:
?solve_by_elimhas a minimal port, but is not feature complete.- ~~Justus Springer will look at this~~ is no longer working on it, and @semorrison can help
- :black_medium_square: (attribute)
?simps- @fpvandoorn has PR'd as #445
We then have a number of tactics and commands for which mere stubs will suffice for the port. Sometimes this is because the tactic is only used during development (but not in PRs to mathlib), other times because it is not used at all anymore in mathlib.
- :small_blue_diamond: (attribute)
Sintro/Sintro! - :small_blue_diamond:
Spropagate_tags- PR'd as #258 (abandoned?)
- :small_blue_diamond:
?quote/?pquote/?ppquote - :small_blue_diamond:
Smapply - :ballot_box_with_check:
Swith_cases- slated for removal: leanprover-community/mathlib#16568
- :small_blue_diamond:
Sdestruct - :small_blue_diamond:
Srsimp - :small_blue_diamond:
Scomp_val - :small_blue_diamond:
Sasync - :small_blue_diamond:
Scontinue - :black_medium_square:
Sextract_goal- @robertylewis claimed this.
- :small_blue_diamond:
Srevert_deps - :small_blue_diamond:
Srevert_after - :ballot_box_with_check:
Srevert_target_deps- PR'd as #333
- :small_blue_diamond:
Srcases? - :small_blue_diamond:
Srintro? - :small_blue_diamond:
Shint - :small_blue_diamond:
Sclarify/Ssafe/Sfinish - :small_blue_diamond:
Scases''/Sinduction'' - :small_blue_diamond:
Spretty_cases - :small_blue_diamond:
Ssqueeze_scope - :black_medium_square:
Ssimp?/Sdsimp?/Ssimp_all?- PR'd as #449
- :small_blue_diamond:
Ssuggest - :small_blue_diamond:
Somega - :small_blue_diamond:
Stransport - :small_blue_diamond:
Srw_search - :small_blue_diamond:
Smk_decorations - :small_blue_diamond:
Smv_bisim - :small_blue_diamond:
Ssubtype_instance - :small_blue_diamond:
Selide/Sunelide - :ballot_box_with_check:
Sguard_tags- PR'd as #258
- :small_blue_diamond:
Sguard_proof_term - :small_blue_diamond:
Sfail_if_success? - :small_blue_diamond: (command)
Ssetup_tactic_parser - :black_medium_square: (command)
S#explode- Evgenia Karunus may do this
- :small_blue_diamond: (command)
S#list_unused_decls - :small_blue_diamond: (command)
S#simp - :small_blue_diamond: (command)
S#where - :small_blue_diamond: (command)
S#sample
I have included information about open PRs, but have not yet gone back through all zulip threads to note other "claims".
I won't have time to work on porting for the next couple of months, sorry; please consider copy_doc_string abandoned.
@hrmacbeth, thanks for mentioning that! I'll take up copy_doc_string / add_decl_doc / add_tactic_doc then (I'm also busy at the moment, but will be able to get to it October 4th).
Now that the semester has begun at Carnegie Mellon, I am also pretty buried. I don't mind keeping the injections tactics on my to do list in the hopes that I'll eventually find the time, but anyone else looking for something to do should feel free to claim them.
Here is the result of a text search for tactic names in mathlib3port: (no promises about false positives)
6101 [M] ext
5517 [S] intro
2601 [N] dsimp
2253 [E] convert
1339 [N] congr
756 [B] tidy
714 [M] split_ifs
570 [E] norm_num
550 [E] ring
500 [B] linarith
384 [M] filter_upwards
384 [B] lift
337 [M] contrapose
282 [B] choose
256 [E] symm
209 [B] obviously
205 [M] slice_lhs
203 [M] field_simp
198 [E] trans
158 [B] abel
152 [B] tauto
136 [N] nth_rw
135 [M] apply_fun
128 [M] tfae_have
106 [M] generalize
102 [N] for
96 [B] refine_struct
93 [M] slice_rhs
92 [M] nontriviality
87 [M] mono
87 [B] mono
73 [B] cc
71 [M] continuity
67 [E] norm_num1
58 [M] apply_rules
50 [B] wlog
49 [M] fin_cases
49 [E] ring_nf
34 [M] nlinarith
31 [E] convert_to
30 [E] ring_exp
30 [B] ring_exp
27 [M] group
25 [M] tfae_finish
23 [M] generalize_proofs
21 [E] unfold_coes
18 [M] unfold_projs
18 [M] assoc_rw
17 [E] unfold_wf
17 [E] clear_value
15 [S] propagate_tags
15 [N] field
15 [E] ring1
long tail
14 [N] abstract
14 [M] cases_type
14 [M] casesm
13 [S] with_cases
13 [M] unfold_aux
13 [E] nth_rw_rhs
13 [E] noncomm_ring
12 [M] interval_cases
12 [B] equiv_rw
11 [N] measurability
11 [M] delta_instance
9 [M] ghost_fun_tac
8 [S] interactive
8 [M] rcongr
8 [M] init_ring
8 [E] infer_auto_param
7 [M] ghost_calc
7 [M] cancel_denoms
7 [M] apply_assumption
7 [E] witt_truncate_fun_tac
6 [M] zify
5 [M] reassoc
5 [M] pi_instance
5 [M] apply_congr
5 [E] unit_interval
4 [S] extract_goal
4 [M] slice
4 [M] padic_index_simp
4 [M] clean
4 [E] ghost_simp
4 [B] ac_mono
3 [N] simp_intro
3 [N] parameter
2 [S] safe
2 [S] pretty_cases
2 [N] dsimp_result
2 [N] def_replacer
2 [M] trunc_cases
2 [M] reassoc_axiom
2 [M] linear_combination
2 [M] generalizes
2 [E] try_for
2 [E] nth_rw_lhs
2 [E] apply_normed
2 [E] ac_change
1 [S] transport
1 [S] suggest
1 [S] squeeze_scope
1 [S] omega
1 [S] mv_bisim
1 [S] hint
1 [S] finish
1 [S] destruct
1 [N] simp_result
1 [M] unfold_cases
1 [M] match_hyp
1 [M] h_generalize
1 [E] fsplit
1 [B] itauto
1 [B] equiv_rw_type
replication
words.txt obtained by searching for /- (.) -/ syntax.*?"(.*?)" in Mathport/Syntax.lean
words.txt
[N]parameter
[S]quoteₓ
[S]pquoteₓ
[S]ppquoteₓ
[S]%%ₓ
[S]propagate_tags
[S]mapply
[S]with_cases
[S]destruct
[M]casesm
[M]cases_type
[M]cases_type!
[N]abstract
[M]constructorm
[N]simp_intro
[E]symm
[E]trans
[B]cc
[M]unfold_projs
[E]infer_auto_param
[S]rsimp
[S]comp_val
[S]async
[N]for
[N]dsimp
[E]apply'
[E]fapply'
[E]eapply'
[E]apply_with'
[E]mapply'
[E]rfl'
[E]symm'
[E]trans'
[E]fsplit
[E]try_for
[E]unfold_coes
[E]unfold_wf
[M]unfold_aux
[S]continue
[M]generalize
[M]clean
[B]refine_struct
[M]match_hyp
[E]guard_tags
[E]guard_proof_term
[E]fail_if_success?
[N]field
[N]have_field
[N]apply_field
[M]apply_rules
[M]h_generalize
[M]h_generalize!
[S]extract_goal
[S]extract_goal!
[S]revert_deps
[S]revert_after
[S]revert_target_deps
[E]clear_value
[M]apply_assumption
[S]hint
[B]choose
[B]choose!
[N]congr
[M]rcongr
[E]convert
[E]convert_to
[E]ac_change
[S]rcases?
[S]rintro?
[M]decide!
[M]delta_instance
[M]elide
[M]unelide
[S]clarify
[S]safe
[S]finish
[M]generalizes
[M]generalize_proofs
[S]cases''
[S]induction''
[B]itauto
[B]itauto!
[B]lift
[B]obviously
[S]pretty_cases
[M]contrapose
[M]contrapose!
[M]assoc_rw
[N]dsimp_result
[N]simp_result
[M]split_ifs
[S]squeeze_scope
[S]simp?
[S]simp_all?
[S]dsimp?
[S]suggest
[B]tauto
[B]tauto!
[M]trunc_cases
[E]apply_normed
[E]abel1
[E]abel1!
[B]abel
[B]abel!
[E]ring1
[E]ring1!
[E]ring_nf
[E]ring_nf!
[E]ring!
[B]ring_exp_eq
[B]ring_exp_eq!
[B]ring_exp
[B]ring_exp!
[E]noncomm_ring
[M]linear_combination
[B]linarith
[B]linarith!
[M]nlinarith
[M]nlinarith!
[S]omega
[M]tfae_have
[M]tfae_finish
[B]mono
[B]ac_mono
[M]apply_fun
[M]fin_cases
[M]interval_cases
[M]reassoc
[M]reassoc!
[M]derive_reassoc_proof
[M]slice_lhs
[M]slice_rhs
[N]subtype_instance
[M]group
[M]cancel_denoms
[M]zify
[S]transport
[M]unfold_cases
[M]field_simp
[B]equiv_rw
[B]equiv_rw_type
[N]nth_rw
[E]nth_rw_lhs
[E]nth_rw_rhs
[S]rw_search
[S]rw_search?
[M]pi_instance_derive_field
[M]pi_instance
[B]tidy
[B]tidy?
[B]wlog
[M]elementwise
[M]elementwise!
[M]derive_elementwise_proof
[S]mk_decorations
[M]nontriviality
[M]filter_upwards
[E]isBounded_default
[N]op_induction
[S]mv_bisim
[M]continuity
[M]continuity!
[M]continuity?
[M]continuity!?
[E]unit_interval
[N]measurability
[N]measurability!
[N]measurability?
[N]measurability!?
[M]padic_index_simp
[E]uniqueDiffWithinAt_Ici_Iic_univ
[M]ghost_fun_tac
[M]ghost_calc
[M]init_ring
[E]ghost_simp
[E]witt_truncate_fun_tac
[M]apply_congr
[E]norm_num1
[E]norm_num
[E]ring_nf
[E]ring_nf!
[E]ring
[E]ring!
[E]ring_exp
[E]ring_exp!
[M]slice
[S]intro
[S]intro!
[M]ext
[M]higher_order
[S]interactive
[M]mk_iff
[S]protect_proj
[M]notation_class
[M]mono
[M]reassoc
[N]ancestor
[M]elementwise
[N]copy_doc_string
[N]add_tactic_doc
[N]add_decl_doc
[S]setup_tactic_parser
[N]mk_simp_attribute
[M]add_hint_tactic
[S]#explode
[S]#list_unused_decls
[M]mk_iff_of_inductive_prop
[N]def_replacer
[S]#simp
[S]#where
[M]reassoc_axiom
[S]#sample
#!/bin/bash
for i in $(cat words.txt); do
esc=$(echo "${i:3}" | sed 's/[^^]/[&]/g; s/\^/\\^/g')
l=`grep -roah " $esc\b" ../mathlib3port | wc -w`
echo "$l ${i:0:3} ${i:3}"
done
Should we move this tracking to a wiki page, similar to https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status ?
That would lower the chances of edit conflicts. Currently I think if there are parallel edits to the comment then it's "last submission wins".
does the wiki have better edit conflict resolution? It's still not using git merge, is it?
Ah, according to https://stackoverflow.com/questions/10553085/how-does-github-merge-web-based-wiki-edits-with-ones-through-the-repository it's last-edit-wins there too (or at least was as of 2014).
I've just updated the list above, per the discussion in the 2023-06-27 porting meeting. Our discussion only got to refine_struct (lots has been deleted above that!), so we should resume this sometime.
I've also removed everything which was checked off, to declutter the list, per the meeting.
fail_if_success? seems the mistake for fail_if_success.
@semorrison You changed the difficulty of cc from B to S. Can you tell me how to port this tactic easily?
S means that we are not planning on porting it for mathlib, at least in the first pass, because mathlib doesn't use it enough and we can just avoid it. It is still on the list because it is still a todo item, just not high priority.