-
Notifications
You must be signed in to change notification settings - Fork 1
/
tactics.html
14277 lines (10850 loc) · 741 KB
/
tactics.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://pygae.github.io/lean-ga-docs/style.css">
<link rel="stylesheet" href="https://pygae.github.io/lean-ga-docs/pygments.css">
<link rel="stylesheet" href="https://pygae.github.io/lean-ga-docs/pygments-dark.css">
<link rel="shortcut icon" href="https://pygae.github.io/lean-ga-docs/favicon.ico">
<title>Mathlib tactics - mathlib3 docs</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="In addition to the tactics found in the core library mathlib provides a number of specific interactive tactics. Here we document the mostly commonly used ones, as well as some underdocumented tactics…" />
<link rel="canonical" href="https://leanprover-community.github.io/mathlib_docs/tactics.html" />
<meta property="og:title" content="Mathlib tactics - mathlib3 docs">
<meta property="og:site_name" content="mathlib for Lean 3 - API documentation">
<meta property="og:description" content="In addition to the tactics found in the core library mathlib provides a number of specific interactive tactics. Here we document the mostly commonly used ones, as well as some underdocumented tactics…">
<meta property="og:image" content="https://pygae.github.io/lean-ga-docs/meta-og.png">
<meta name="twitter:card" content="summary">
<script src="https://pygae.github.io/lean-ga-docs/color_scheme.js"></script>
</head>
<body>
<input id="nav_toggle" type="checkbox">
<header>
<h1><label for="nav_toggle"></label><a href="https://leanprover-community.github.io/lean3">mathlib3</a>
<span>documentation</span></h1>
<p class="header_filename break_within">Mathlib tactics</p>
<form action="https://google.com/search" method="get" id="search_form">
<input type="hidden" name="sitesearch" value="https://leanprover-community.github.io/mathlib_docs">
<input type="text" name="q" autocomplete="off">
<button>Google site search</button>
</form>
</header>
<nav class="internal_nav">
<h3><a href="#top">Mathlib tactics</a></h3>
<details class="tagfilter-div">
<summary>Filter by tag</summary>
<label><input type="checkbox" id="tagfilter-selectall" name="tagfilter-selectall">Select/deselect all</label>
<br><hr>
<label><input type="checkbox" class="tagfilter" name="Try-this" value="Try-this">Try this</label>
<br>
<label><input type="checkbox" class="tagfilter" name="arithmetic" value="arithmetic">arithmetic</label>
<br>
<label><input type="checkbox" class="tagfilter" name="basic" value="basic">basic</label>
<br>
<label><input type="checkbox" class="tagfilter" name="case-bashing" value="case-bashing">case bashing</label>
<br>
<label><input type="checkbox" class="tagfilter" name="category-theory" value="category-theory">category theory</label>
<br>
<label><input type="checkbox" class="tagfilter" name="classical-logic" value="classical-logic">classical logic</label>
<br>
<label><input type="checkbox" class="tagfilter" name="coercions" value="coercions">coercions</label>
<br>
<label><input type="checkbox" class="tagfilter" name="combinator" value="combinator">combinator</label>
<br>
<label><input type="checkbox" class="tagfilter" name="congruence" value="congruence">congruence</label>
<br>
<label><input type="checkbox" class="tagfilter" name="context-management" value="context-management">context management</label>
<br>
<label><input type="checkbox" class="tagfilter" name="conv" value="conv">conv</label>
<br>
<label><input type="checkbox" class="tagfilter" name="core" value="core">core</label>
<br>
<label><input type="checkbox" class="tagfilter" name="debugging" value="debugging">debugging</label>
<br>
<label><input type="checkbox" class="tagfilter" name="decision-procedure" value="decision-procedure">decision procedure</label>
<br>
<label><input type="checkbox" class="tagfilter" name="equiv" value="equiv">equiv</label>
<br>
<label><input type="checkbox" class="tagfilter" name="finishing" value="finishing">finishing</label>
<br>
<label><input type="checkbox" class="tagfilter" name="goal-management" value="goal-management">goal management</label>
<br>
<label><input type="checkbox" class="tagfilter" name="induction" value="induction">induction</label>
<br>
<label><input type="checkbox" class="tagfilter" name="intuitionistic-logic" value="intuitionistic-logic">intuitionistic logic</label>
<br>
<label><input type="checkbox" class="tagfilter" name="lemma-application" value="lemma-application">lemma application</label>
<br>
<label><input type="checkbox" class="tagfilter" name="logic" value="logic">logic</label>
<br>
<label><input type="checkbox" class="tagfilter" name="monotonicity" value="monotonicity">monotonicity</label>
<br>
<label><input type="checkbox" class="tagfilter" name="proof-extraction" value="proof-extraction">proof extraction</label>
<br>
<label><input type="checkbox" class="tagfilter" name="propositional-logic" value="propositional-logic">propositional logic</label>
<br>
<label><input type="checkbox" class="tagfilter" name="renaming" value="renaming">renaming</label>
<br>
<label><input type="checkbox" class="tagfilter" name="rewriting" value="rewriting">rewriting</label>
<br>
<label><input type="checkbox" class="tagfilter" name="search" value="search">search</label>
<br>
<label><input type="checkbox" class="tagfilter" name="simplification" value="simplification">simplification</label>
<br>
<label><input type="checkbox" class="tagfilter" name="structures" value="structures">structures</label>
<br>
<label><input type="checkbox" class="tagfilter" name="testing" value="testing">testing</label>
<br>
<label><input type="checkbox" class="tagfilter" name="transport" value="transport">transport</label>
<br>
<label><input type="checkbox" class="tagfilter" name="type-class" value="type-class">type class</label>
<br>
</details>
<div class="taclink type-class context-management"><a href="#Instance cache tactics">Instance cache tactics</a></div>
<div class="taclink arithmetic decision-procedure"><a href="#abel">abel</a></div>
<div class="taclink core proof-extraction"><a href="#abstract">abstract</a></div>
<div class="taclink monotonicity"><a href="#ac_mono">ac_mono</a></div>
<div class="taclink core lemma-application finishing"><a href="#ac_refl">ac_refl</a></div>
<div class="taclink core goal-management"><a href="#all_goals">all_goals</a></div>
<div class="taclink core goal-management"><a href="#any_goals">any_goals</a></div>
<div class="taclink core basic lemma-application"><a href="#apply">apply</a></div>
<div class="taclink context-management lemma-application"><a href="#apply_assumption">apply_assumption</a></div>
<div class="taclink core lemma-application"><a href="#apply_auto_param">apply_auto_param</a></div>
<div class="taclink conv congruence rewriting"><a href="#apply_congr">apply_congr</a></div>
<div class="taclink context-management"><a href="#apply_fun">apply_fun</a></div>
<div class="taclink core type-class"><a href="#apply_instance">apply_instance</a></div>
<div class="taclink core lemma-application"><a href="#apply_opt_param">apply_opt_param</a></div>
<div class="taclink lemma-application"><a href="#apply_rules">apply_rules</a></div>
<div class="taclink core lemma-application"><a href="#apply_with">apply_with</a></div>
<div class="taclink rewriting"><a href="#assoc_rewrite">assoc_rewrite</a></div>
<div class="taclink core logic"><a href="#assume">assume</a></div>
<div class="taclink core basic finishing"><a href="#assumption">assumption</a></div>
<div class="taclink core goal-management"><a href="#assumption'">assumption'</a></div>
<div class="taclink core goal-management combinator proof-extraction"><a href="#async">async</a></div>
<div class="taclink core basic logic case-bashing"><a href="#by_cases">by_cases</a></div>
<div class="taclink core logic"><a href="#by_contra / by_contradiction">by_contra / by_contradiction</a></div>
<div class="taclink logic"><a href="#by_contra'">by_contra'</a></div>
<div class="taclink simplification"><a href="#cancel_denoms">cancel_denoms</a></div>
<div class="taclink core goal-management"><a href="#case">case</a></div>
<div class="taclink core basic induction"><a href="#cases">cases</a></div>
<div class="taclink core induction context-management"><a href="#cases_matching / casesm">cases_matching / casesm</a></div>
<div class="taclink core induction context-management"><a href="#cases_type">cases_type</a></div>
<div class="taclink category-theory"><a href="#category_theory.elementwise_of">category_theory.elementwise_of</a></div>
<div class="taclink category-theory"><a href="#category_theory.reassoc_of">category_theory.reassoc_of</a></div>
<div class="taclink core finishing"><a href="#cc (congruence closure)">cc (congruence closure)</a></div>
<div class="taclink core basic renaming"><a href="#change">change</a></div>
<div class="taclink renaming"><a href="#change'">change'</a></div>
<div class="taclink classical-logic"><a href="#choose">choose</a></div>
<div class="taclink classical-logic type-class"><a href="#classical">classical</a></div>
<div class="taclink core context-management"><a href="#clear">clear</a></div>
<div class="taclink context-management"><a href="#clear'">clear'</a></div>
<div class="taclink context-management"><a href="#clear_">clear_</a></div>
<div class="taclink context-management"><a href="#clear_aux_decl">clear_aux_decl</a></div>
<div class="taclink context-management"><a href="#clear_except">clear_except</a></div>
<div class="taclink context-management"><a href="#clear_value">clear_value</a></div>
<div class="taclink core arithmetic"><a href="#comp_val">comp_val</a></div>
<div class="taclink arithmetic finishing"><a href="#compute_degree_le">compute_degree_le</a></div>
<div class="taclink core congruence"><a href="#congr">congr</a></div>
<div class="taclink congruence"><a href="#congr'">congr'</a></div>
<div class="taclink congruence"><a href="#congrm">congrm</a></div>
<div class="taclink core logic"><a href="#constructor">constructor</a></div>
<div class="taclink lemma-application"><a href="#continuity / continuity'">continuity / continuity'</a></div>
<div class="taclink core basic finishing"><a href="#contradiction">contradiction</a></div>
<div class="taclink logic"><a href="#contrapose">contrapose</a></div>
<div class="taclink core"><a href="#conv">conv</a></div>
<div class="taclink conv"><a href="#conv: congr">conv: congr</a></div>
<div class="taclink conv"><a href="#conv: find">conv: find</a></div>
<div class="taclink conv"><a href="#conv: for">conv: for</a></div>
<div class="taclink conv"><a href="#conv: funext">conv: funext</a></div>
<div class="taclink conv"><a href="#conv: skip">conv: skip</a></div>
<div class="taclink conv"><a href="#conv: to_lhs">conv: to_lhs</a></div>
<div class="taclink conv"><a href="#conv: to_rhs">conv: to_rhs</a></div>
<div class="taclink congruence"><a href="#convert">convert</a></div>
<div class="taclink congruence"><a href="#convert_to">convert_to</a></div>
<div class="taclink basic finishing"><a href="#dec_trivial">dec_trivial</a></div>
<div class="taclink core simplification"><a href="#delta">delta</a></div>
<div class="taclink core induction"><a href="#destruct">destruct</a></div>
<div class="taclink core goal-management"><a href="#done">done</a></div>
<div class="taclink core simplification"><a href="#dsimp">dsimp</a></div>
<div class="taclink core simplification"><a href="#dunfold">dunfold</a></div>
<div class="taclink core lemma-application"><a href="#eapply">eapply</a></div>
<div class="taclink core logic"><a href="#econstructor">econstructor</a></div>
<div class="taclink goal-management context-management rewriting"><a href="#elide / unelide">elide / unelide</a></div>
<div class="taclink rewriting equiv transport"><a href="#equiv_rw">equiv_rw</a></div>
<div class="taclink rewriting equiv transport"><a href="#equiv_rw_type">equiv_rw_type</a></div>
<div class="taclink core rewriting"><a href="#erewrite / erw">erewrite / erw</a></div>
<div class="taclink core basic finishing"><a href="#exact">exact</a></div>
<div class="taclink core finishing"><a href="#exacts">exacts</a></div>
<div class="taclink core basic logic"><a href="#exfalso">exfalso</a></div>
<div class="taclink core logic"><a href="#existsi">existsi</a></div>
<div class="taclink rewriting logic"><a href="#ext1 / ext">ext1 / ext</a></div>
<div class="taclink goal-management proof-extraction debugging"><a href="#extract_goal">extract_goal</a></div>
<div class="taclink core testing combinator"><a href="#fail_if_success">fail_if_success</a></div>
<div class="taclink core lemma-application"><a href="#fapply">fapply</a></div>
<div class="taclink logic goal-management"><a href="#fconstructor">fconstructor</a></div>
<div class="taclink simplification arithmetic"><a href="#field_simp">field_simp</a></div>
<div class="taclink goal-management lemma-application"><a href="#filter_upwards">filter_upwards</a></div>
<div class="taclink case-bashing"><a href="#fin_cases">fin_cases</a></div>
<div class="taclink logic finishing"><a href="#finish / clarify / safe">finish / clarify / safe</a></div>
<div class="taclink core goal-management combinator"><a href="#focus">focus</a></div>
<div class="taclink core finishing"><a href="#from">from</a></div>
<div class="taclink logic goal-management"><a href="#fsplit">fsplit</a></div>
<div class="taclink core logic"><a href="#funext">funext</a></div>
<div class="taclink core context-management"><a href="#generalize">generalize</a></div>
<div class="taclink context-management"><a href="#generalize'">generalize'</a></div>
<div class="taclink context-management"><a href="#generalize_hyp">generalize_hyp</a></div>
<div class="taclink context-management"><a href="#generalize_proofs">generalize_proofs</a></div>
<div class="taclink context-management"><a href="#generalizes">generalizes</a></div>
<div class="taclink decision-procedure simplification"><a href="#group">group</a></div>
<div class="taclink core testing context-management"><a href="#guard_hyp">guard_hyp</a></div>
<div class="taclink core testing goal-management"><a href="#guard_target">guard_target</a></div>
<div class="taclink testing"><a href="#guard_target'">guard_target'</a></div>
<div class="taclink context-management"><a href="#h_generalize">h_generalize</a></div>
<div class="taclink core basic context-management"><a href="#have">have</a></div>
<div class="taclink search Try-this"><a href="#hint">hint</a></div>
<div class="taclink core basic induction"><a href="#induction">induction</a></div>
<div class="taclink context-management type-class"><a href="#inhabit">inhabit</a></div>
<div class="taclink core structures induction"><a href="#injection">injection</a></div>
<div class="taclink core structures induction"><a href="#injections">injections</a></div>
<div class="taclink context-management"><a href="#injections_and_clear">injections_and_clear</a></div>
<div class="taclink case-bashing"><a href="#interval_cases">interval_cases</a></div>
<div class="taclink core basic logic"><a href="#intro / intros">intro / intros</a></div>
<div class="taclink core logic"><a href="#introv">introv</a></div>
<div class="taclink logic propositional-logic intuitionistic-logic decision-procedure"><a href="#itauto">itauto</a></div>
<div class="taclink core combinator"><a href="#iterate">iterate</a></div>
<div class="taclink core basic logic"><a href="#left / right">left / right</a></div>
<div class="taclink core basic logic context-management"><a href="#let">let</a></div>
<div class="taclink search Try-this"><a href="#library_search">library_search</a></div>
<div class="taclink coercions"><a href="#lift">lift</a></div>
<div class="taclink arithmetic decision-procedure finishing"><a href="#linarith">linarith</a></div>
<div class="taclink arithmetic"><a href="#linear_combination">linear_combination</a></div>
<div class="taclink core lemma-application"><a href="#mapply">mapply</a></div>
<div class="taclink core testing goal-management"><a href="#match_target">match_target</a></div>
<div class="taclink monotonicity"><a href="#mono">mono</a></div>
<div class="taclink arithmetic decision-procedure finishing"><a href="#nlinarith">nlinarith</a></div>
<div class="taclink arithmetic simplification decision-procedure"><a href="#noncomm_ring">noncomm_ring</a></div>
<div class="taclink logic type-class"><a href="#nontriviality">nontriviality</a></div>
<div class="taclink coercions simplification"><a href="#norm_cast">norm_cast</a></div>
<div class="taclink arithmetic decision-procedure"><a href="#norm_fin">norm_fin</a></div>
<div class="taclink arithmetic decision-procedure"><a href="#norm_num">norm_num</a></div>
<div class="taclink rewriting"><a href="#nth_rewrite / nth_rewrite_lhs / nth_rewrite_rhs">nth_rewrite / nth_rewrite_lhs / nth_rewrite_rhs</a></div>
<div class="taclink induction"><a href="#obtain">obtain</a></div>
<div class="taclink finishing arithmetic decision-procedure"><a href="#omega">omega</a></div>
<div class="taclink type-class"><a href="#pi_instance">pi_instance</a></div>
<div class="taclink arithmetic finishing decision-procedure"><a href="#polyrith">polyrith</a></div>
<div class="taclink arithmetic monotonicity finishing"><a href="#positivity">positivity</a></div>
<div class="taclink context-management goal-management"><a href="#pretty_cases">pretty_cases</a></div>
<div class="taclink logic"><a href="#push_neg">push_neg</a></div>
<div class="taclink induction"><a href="#rcases">rcases</a></div>
<div class="taclink core basic lemma-application"><a href="#refine">refine</a></div>
<div class="taclink structures"><a href="#refine_struct">refine_struct</a></div>
<div class="taclink core basic finishing"><a href="#refl / reflexivity">refl / reflexivity</a></div>
<div class="taclink core renaming"><a href="#rename">rename</a></div>
<div class="taclink renaming"><a href="#rename_var">rename_var</a></div>
<div class="taclink core combinator"><a href="#repeat">repeat</a></div>
<div class="taclink context-management"><a href="#replace">replace</a></div>
<div class="taclink core context-management goal-management"><a href="#revert">revert</a></div>
<div class="taclink context-management goal-management"><a href="#revert_after">revert_after</a></div>
<div class="taclink context-management goal-management"><a href="#revert_deps">revert_deps</a></div>
<div class="taclink context-management goal-management"><a href="#revert_target_deps">revert_target_deps</a></div>
<div class="taclink arithmetic simplification decision-procedure"><a href="#ring">ring</a></div>
<div class="taclink arithmetic simplification decision-procedure"><a href="#ring_exp">ring_exp</a></div>
<div class="taclink induction"><a href="#rintro">rintro</a></div>
<div class="taclink goal-management"><a href="#rotate">rotate</a></div>
<div class="taclink induction"><a href="#rsuffices">rsuffices</a></div>
<div class="taclink induction type-class"><a href="#rsufficesI">rsufficesI</a></div>
<div class="taclink core basic rewriting"><a href="#rw / rewrite">rw / rewrite</a></div>
<div class="taclink core rewriting"><a href="#rwa">rwa</a></div>
<div class="taclink logic"><a href="#scc">scc</a></div>
<div class="taclink context-management"><a href="#set">set</a></div>
<div class="taclink core goal-management renaming"><a href="#show">show</a></div>
<div class="taclink debugging"><a href="#show_term">show_term</a></div>
<div class="taclink core simplification"><a href="#simp">simp</a></div>
<div class="taclink core simplification"><a href="#simp_intros">simp_intros</a></div>
<div class="taclink simplification"><a href="#simp_result">simp_result</a></div>
<div class="taclink simplification"><a href="#simp_rw">simp_rw</a></div>
<div class="taclink simplification"><a href="#simpa">simpa</a></div>
<div class="taclink core combinator"><a href="#skip">skip</a></div>
<div class="taclink category-theory"><a href="#slice">slice</a></div>
<div class="taclink core combinator goal-management"><a href="#solve1">solve1</a></div>
<div class="taclink search"><a href="#solve_by_elim">solve_by_elim</a></div>
<div class="taclink core testing debugging"><a href="#sorry / admit">sorry / admit</a></div>
<div class="taclink core context-management lemma-application"><a href="#specialize">specialize</a></div>
<div class="taclink core basic logic"><a href="#split">split</a></div>
<div class="taclink case-bashing"><a href="#split_ifs">split_ifs</a></div>
<div class="taclink simplification Try-this"><a href="#squeeze_simp / squeeze_simpa / squeeze_dsimp / squeeze_scope">squeeze_simp / squeeze_simpa / squeeze_dsimp / squeeze_scope</a></div>
<div class="taclink core rewriting"><a href="#subst">subst</a></div>
<div class="taclink context-management"><a href="#subst'">subst'</a></div>
<div class="taclink core rewriting"><a href="#subst_vars">subst_vars</a></div>
<div class="taclink rewriting"><a href="#substs">substs</a></div>
<div class="taclink type-class structures"><a href="#subtype_instance">subtype_instance</a></div>
<div class="taclink core testing combinator"><a href="#success_if_fail">success_if_fail</a></div>
<div class="taclink core basic goal-management"><a href="#suffices">suffices</a></div>
<div class="taclink search Try-this"><a href="#suggest">suggest</a></div>
<div class="taclink goal-management"><a href="#swap">swap</a></div>
<div class="taclink core basic lemma-application"><a href="#symmetry">symmetry</a></div>
<div class="taclink logic decision-procedure"><a href="#tautology">tautology</a></div>
<div class="taclink logic"><a href="#tfae">tfae</a></div>
<div class="taclink search Try-this finishing"><a href="#tidy">tidy</a></div>
<div class="taclink core debugging testing"><a href="#trace">trace</a></div>
<div class="taclink core debugging testing"><a href="#trace_simp_set">trace_simp_set</a></div>
<div class="taclink core debugging testing"><a href="#trace_state">trace_state</a></div>
<div class="taclink core lemma-application"><a href="#transitivity">transitivity</a></div>
<div class="taclink rewriting equiv transport"><a href="#transport">transport</a></div>
<div class="taclink finishing"><a href="#triv">triv</a></div>
<div class="taclink core finishing"><a href="#trivial">trivial</a></div>
<div class="taclink finishing"><a href="#trivial'">trivial'</a></div>
<div class="taclink case-bashing"><a href="#trunc_cases">trunc_cases</a></div>
<div class="taclink core combinator"><a href="#try">try</a></div>
<div class="taclink core debugging testing"><a href="#type_check">type_check</a></div>
<div class="taclink core basic rewriting"><a href="#unfold">unfold</a></div>
<div class="taclink core rewriting"><a href="#unfold1">unfold1</a></div>
<div class="taclink induction case-bashing"><a href="#unfold_cases">unfold_cases</a></div>
<div class="taclink simplification"><a href="#unfold_coes">unfold_coes</a></div>
<div class="taclink core rewriting"><a href="#unfold_projs">unfold_projs</a></div>
<div class="taclink simplification"><a href="#unify_equations">unify_equations</a></div>
<div class="taclink logic"><a href="#use">use</a></div>
<div class="taclink core combinator"><a href="#with_cases">with_cases</a></div>
<div class="taclink logic"><a href="#wlog">wlog</a></div>
<div class="taclink coercions transport"><a href="#zify">zify</a></div>
</nav>
<main>
<a id="top"></a>
<div class="docfile">
<h1>Mathlib tactics</h1>
In addition to the <a
href="https://leanprover.github.io/reference/tactics.html"> tactics found in
the core library</a>, mathlib provides a number of specific interactive
tactics. Here we document the mostly commonly used ones, as well as some
underdocumented tactics from core.
<div class="tactic type-class context-management">
<h2 id="Instance cache tactics"><a href="#Instance cache tactics">Instance cache tactics</a></h2>
<p>For performance reasons, Lean does not automatically update its database
of class instances during a proof. The group of tactics described below
helps to force such updates. For a simple (but very artificial) example,
consider the function <code>default</code> from the core library. It has type
<code>Π (α : Sort u) [<a href="https://pygae.github.io/lean-ga-docs/init/logic.html#inhabited">inhabited</a> α], α</code>, so one can use <code>default</code> only if Lean
can find a registered instance of <code><a href="https://pygae.github.io/lean-ga-docs/init/logic.html#inhabited">inhabited</a> α</code>. Because the database of
such instance is not automatically updated during a proof, the following
attempt won't work (Lean will not pick up the instance from the local
context):</p>
<div class="codehilite"><pre><span></span><code><span class="kd">def</span> <span class="n">my_id</span> <span class="o">(</span><span class="n">α</span> <span class="o">:</span> <span class="kt">Type</span><span class="o">)</span> <span class="o">:</span> <span class="n">α</span> <span class="bp">→</span> <span class="n">α</span> <span class="o">:=</span>
<span class="kd">begin</span>
<span class="n">intro</span> <span class="n">x</span><span class="o">,</span>
<span class="k">have</span> <span class="o">:</span> <span class="n"><a href="https://pygae.github.io/lean-ga-docs/init/logic.html#inhabited">inhabited</a></span> <span class="n">α</span> <span class="o">:=</span> <span class="o">⟨</span><span class="n">x</span><span class="o">⟩,</span>
<span class="n">exact</span> <span class="n">default</span><span class="o">,</span> <span class="c1">-- Won't work!</span>
<span class="kd">end</span>
</code></pre></div>
<p>However, it will work, producing the identity function, if one replaces <code>have</code>
by its variant <code>haveI</code> described below.</p>
<ul>
<li>
<p><code>resetI</code>: Reset the instance cache. This allows any instances
currently in the context to be used in typeclass inference.</p>
</li>
<li>
<p><code>unfreezingI { tac }</code>: Unfreeze local instances while executing the tactic <code>tac</code>.</p>
</li>
<li>
<p><code>introI</code>/<code>introsI</code>: <code>intro</code>/<code>intros</code> followed by <code>resetI</code>. Like
<code>intro</code>/<code>intros</code>, but uses the introduced variable in typeclass inference.</p>
</li>
<li>
<p><code>casesI</code>: like <code>cases</code>, but can also be used with instance arguments.</p>
</li>
<li>
<p><code>substI</code>: like <code>subst</code>, but can also substitute in type-class arguments</p>
</li>
<li>
<p><code>haveI</code>/<code>letI</code>/<code>rsufficesI</code>: <code>have</code>/<code>let</code>/<code>rsuffices</code> followed by <code>resetI</code>. Used
to add typeclasses to the context so that they can be used in typeclass inference.</p>
</li>
<li>
<p><code>exactI</code>: <code>resetI</code> followed by <code>exact</code>. Like <code>exact</code>, but uses all
variables in the context for typeclass inference.</p>
</li>
</ul>
<div class="tags">Tags:
<ul>
<li>type class</li>
<li>context management</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.resetI">tactic.interactive.resetI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.unfreezingI">tactic.interactive.unfreezingI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.casesI">tactic.interactive.casesI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.substI">tactic.interactive.substI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.introI">tactic.interactive.introI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.introsI">tactic.interactive.introsI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.haveI">tactic.interactive.haveI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.letI">tactic.interactive.letI</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/instance_cache.html#tactic.interactive.exactI">tactic.interactive.exactI</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>imported by default</li></ul></details>
</div>
<div class="tactic arithmetic decision-procedure">
<h2 id="abel"><a href="#abel">abel</a></h2>
<p>Evaluate expressions in the language of <em>additive</em>, commutative monoids and groups.
It attempts to prove the goal outright if there is no <code>at</code>
specifier and the target is an equality, but if this
fails, it falls back to rewriting all monoid expressions into a normal form.
If there is an <code>at</code> specifier, it rewrites the given target into a normal form.</p>
<p><code>abel!</code> will use a more aggressive reducibility setting to identify atoms.
This can prove goals that <code>abel</code> cannot, but is more expensive.</p>
<div class="codehilite"><pre><span></span><code><span class="kd">example</span> <span class="o">{</span><span class="n">α</span> <span class="o">:</span> <span class="kt">Type</span><span class="bp">*</span><span class="o">}</span> <span class="o">{</span><span class="n">a</span> <span class="n">b</span> <span class="o">:</span> <span class="n">α</span><span class="o">}</span> <span class="o">[</span><span class="n"><a href="https://pygae.github.io/lean-ga-docs/algebra/group/defs.html#add_comm_monoid">add_comm_monoid</a></span> <span class="n">α</span><span class="o">]</span> <span class="o">:</span> <span class="n">a</span> <span class="bp">+</span> <span class="o">(</span><span class="n">b</span> <span class="bp">+</span> <span class="n">a</span><span class="o">)</span> <span class="bp">=</span> <span class="n">a</span> <span class="bp">+</span> <span class="n">a</span> <span class="bp">+</span> <span class="n">b</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">abel</span>
<span class="kd">example</span> <span class="o">{</span><span class="n">α</span> <span class="o">:</span> <span class="kt">Type</span><span class="bp">*</span><span class="o">}</span> <span class="o">{</span><span class="n">a</span> <span class="n">b</span> <span class="o">:</span> <span class="n">α</span><span class="o">}</span> <span class="o">[</span><span class="n"><a href="https://pygae.github.io/lean-ga-docs/algebra/group/defs.html#add_comm_group">add_comm_group</a></span> <span class="n">α</span><span class="o">]</span> <span class="o">:</span> <span class="o">(</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">)</span> <span class="bp">-</span> <span class="o">((</span><span class="n">b</span> <span class="bp">+</span> <span class="n">a</span><span class="o">)</span> <span class="bp">+</span> <span class="n">a</span><span class="o">)</span> <span class="bp">=</span> <span class="bp">-</span><span class="n">a</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">abel</span>
<span class="kd">example</span> <span class="o">{</span><span class="n">α</span> <span class="o">:</span> <span class="kt">Type</span><span class="bp">*</span><span class="o">}</span> <span class="o">{</span><span class="n">a</span> <span class="n">b</span> <span class="o">:</span> <span class="n">α</span><span class="o">}</span> <span class="o">[</span><span class="n"><a href="https://pygae.github.io/lean-ga-docs/algebra/group/defs.html#add_comm_group">add_comm_group</a></span> <span class="n">α</span><span class="o">]</span> <span class="o">(</span><span class="n">hyp</span> <span class="o">:</span> <span class="n">a</span> <span class="bp">+</span> <span class="n">a</span> <span class="bp">-</span> <span class="n">a</span> <span class="bp">=</span> <span class="n">b</span> <span class="bp">-</span> <span class="n">b</span><span class="o">)</span> <span class="o">:</span> <span class="n">a</span> <span class="bp">=</span> <span class="mi">0</span> <span class="o">:=</span>
<span class="kd">by</span> <span class="o">{</span> <span class="n">abel</span> <span class="n">at</span> <span class="n">hyp</span><span class="o">,</span> <span class="n">exact</span> <span class="n">hyp</span> <span class="o">}</span>
<span class="kd">example</span> <span class="o">{</span><span class="n">α</span> <span class="o">:</span> <span class="kt">Type</span><span class="bp">*</span><span class="o">}</span> <span class="o">{</span><span class="n">a</span> <span class="n">b</span> <span class="o">:</span> <span class="n">α</span><span class="o">}</span> <span class="o">[</span><span class="n"><a href="https://pygae.github.io/lean-ga-docs/algebra/group/defs.html#add_comm_group">add_comm_group</a></span> <span class="n">α</span><span class="o">]</span> <span class="o">:</span> <span class="o">(</span><span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">)</span> <span class="bp">-</span> <span class="o">(</span><span class="n"><a href="https://pygae.github.io/lean-ga-docs/init/logic.html#id">id</a></span> <span class="n">a</span> <span class="bp">+</span> <span class="n">b</span><span class="o">)</span> <span class="bp">=</span> <span class="mi">0</span> <span class="o">:=</span> <span class="kd">by</span> <span class="n">abel</span><span class="bp">!</span>
</code></pre></div>
<div class="tags">Tags:
<ul>
<li>arithmetic</li>
<li>decision procedure</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/tactic/abel.html#tactic.interactive.abel">tactic.interactive.abel</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>import tactic.abel</li>
<li>import tactic</li></ul></details>
</div>
<div class="tactic core proof-extraction">
<h2 id="abstract"><a href="#abstract">abstract</a></h2>
<p><code>abstract <a href="https://pygae.github.io/lean-ga-docs/init/logic.html#id">id</a> { t }</code> tries to use tactic <code>t</code> to solve the main goal. If it succeeds, it abstracts the goal as an independent definition or theorem with name <code><a href="https://pygae.github.io/lean-ga-docs/init/logic.html#id">id</a></code>. If <code><a href="https://pygae.github.io/lean-ga-docs/init/logic.html#id">id</a></code> is omitted, a name is generated automatically.</p>
<div class="tags">Tags:
<ul>
<li>core</li>
<li>proof extraction</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/interactive.html#tactic.interactive.abstract">tactic.interactive.abstract</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>imported by default</li></ul></details>
</div>
<div class="tactic monotonicity">
<h2 id="ac_mono"><a href="#ac_mono">ac_mono</a></h2>
<p><code>ac_mono</code> reduces the <code>f x ⊑ f y</code>, for some relation <code>⊑</code> and a
monotonic function <code>f</code> to <code>x ≺ y</code>.</p>
<p><code>ac_mono*</code> unwraps monotonic functions until it can't.</p>
<p><code>ac_mono^k</code>, for some literal number <code>k</code> applies monotonicity <code>k</code>
times.</p>
<p><code>ac_mono := h</code>, with <code>h</code> a hypothesis, unwraps monotonic functions and
uses <code>h</code> to solve the remaining goal. Can be combined with <code>*</code> or <code>^k</code>:
<code>ac_mono* := h</code></p>
<p><code>ac_mono : p</code> asserts <code>p</code> and uses it to discharge the goal result
unwrapping a series of monotonic functions. Can be combined with * or
^k: <code>ac_mono* : p</code></p>
<p>In the case where <code>f</code> is an associative or commutative operator,
<code>ac_mono</code> will consider any possible permutation of its arguments and
use the one the minimizes the difference between the left-hand side
and the right-hand side.</p>
<p>To use it, first import <code>tactic.monotonicity</code>.</p>
<p><code>ac_mono</code> can be used as follows:</p>
<div class="codehilite"><pre><span></span><code><span class="kd">example</span> <span class="o">(</span><span class="n">x</span> <span class="n">y</span> <span class="n">z</span> <span class="n">k</span> <span class="n">m</span> <span class="n">n</span> <span class="o">:</span> <span class="n">ℕ</span><span class="o">)</span>
<span class="o">(</span><span class="n">h₀</span> <span class="o">:</span> <span class="n">z</span> <span class="bp">≥</span> <span class="mi">0</span><span class="o">)</span>
<span class="o">(</span><span class="n">h₁</span> <span class="o">:</span> <span class="n">x</span> <span class="bp">≤</span> <span class="n">y</span><span class="o">)</span> <span class="o">:</span>
<span class="o">(</span><span class="n">m</span> <span class="bp">+</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">n</span><span class="o">)</span> <span class="bp">*</span> <span class="n">z</span> <span class="bp">+</span> <span class="n">k</span> <span class="bp">≤</span> <span class="n">z</span> <span class="bp">*</span> <span class="o">(</span><span class="n">y</span> <span class="bp">+</span> <span class="n">n</span> <span class="bp">+</span> <span class="n">m</span><span class="o">)</span> <span class="bp">+</span> <span class="n">k</span> <span class="o">:=</span>
<span class="kd">begin</span>
<span class="n">ac_mono</span><span class="o">,</span>
<span class="c1">-- ⊢ (m + x + n) * z ≤ z * (y + n + m)</span>
<span class="n">ac_mono</span><span class="o">,</span>
<span class="c1">-- ⊢ m + x + n ≤ y + n + m</span>
<span class="n">ac_mono</span><span class="o">,</span>
<span class="kd">end</span>
</code></pre></div>
<p>As with <code>mono*</code>, <code>ac_mono*</code> solves the goal in one go and so does
<code>ac_mono* := h₁</code>. The latter syntax becomes especially interesting in the
following example:</p>
<div class="codehilite"><pre><span></span><code><span class="kd">example</span> <span class="o">(</span><span class="n">x</span> <span class="n">y</span> <span class="n">z</span> <span class="n">k</span> <span class="n">m</span> <span class="n">n</span> <span class="o">:</span> <span class="n">ℕ</span><span class="o">)</span>
<span class="o">(</span><span class="n">h₀</span> <span class="o">:</span> <span class="n">z</span> <span class="bp">≥</span> <span class="mi">0</span><span class="o">)</span>
<span class="o">(</span><span class="n">h₁</span> <span class="o">:</span> <span class="n">m</span> <span class="bp">+</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">n</span> <span class="bp">≤</span> <span class="n">y</span> <span class="bp">+</span> <span class="n">n</span> <span class="bp">+</span> <span class="n">m</span><span class="o">)</span> <span class="o">:</span>
<span class="o">(</span><span class="n">m</span> <span class="bp">+</span> <span class="n">x</span> <span class="bp">+</span> <span class="n">n</span><span class="o">)</span> <span class="bp">*</span> <span class="n">z</span> <span class="bp">+</span> <span class="n">k</span> <span class="bp">≤</span> <span class="n">z</span> <span class="bp">*</span> <span class="o">(</span><span class="n">y</span> <span class="bp">+</span> <span class="n">n</span> <span class="bp">+</span> <span class="n">m</span><span class="o">)</span> <span class="bp">+</span> <span class="n">k</span> <span class="o">:=</span>
<span class="kd">by</span> <span class="n">ac_mono</span><span class="bp">*</span> <span class="o">:=</span> <span class="n">h₁.</span>
</code></pre></div>
<p>By giving <code>ac_mono</code> the assumption <code>h₁</code>, we are asking <code>ac_refl</code> to
stop earlier than it would normally would.</p>
<div class="tags">Tags:
<ul>
<li>monotonicity</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/tactic/monotonicity/interactive.html#tactic.interactive.ac_mono">tactic.interactive.ac_mono</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>import tactic.monotonicity.interactive</li>
<li>import tactic</li></ul></details>
</div>
<div class="tactic core lemma-application finishing">
<h2 id="ac_refl"><a href="#ac_refl">ac_refl</a></h2>
<p>Proves a goal of the form <code>s = t</code> when <code>s</code> and <code>t</code> are expressions built up out of a binary
operation, and equality can be proved using associativity and commutativity of that operation.</p>
<div class="tags">Tags:
<ul>
<li>core</li>
<li>lemma application</li>
<li>finishing</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/interactive.html#tactic.interactive.ac_refl">tactic.interactive.ac_refl</a></li>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/interactive.html#tactic.interactive.ac_reflexivity">tactic.interactive.ac_reflexivity</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>imported by default</li></ul></details>
</div>
<div class="tactic core goal-management">
<h2 id="all_goals"><a href="#all_goals">all_goals</a></h2>
<p><code>all_goals { t }</code> applies the tactic <code>t</code> to every goal, and succeeds if each application succeeds.</p>
<div class="tags">Tags:
<ul>
<li>core</li>
<li>goal management</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/interactive.html#tactic.interactive.all_goals">tactic.interactive.all_goals</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>imported by default</li></ul></details>
</div>
<div class="tactic core goal-management">
<h2 id="any_goals"><a href="#any_goals">any_goals</a></h2>
<p><code>any_goals { t }</code> applies the tactic <code>t</code> to every goal, and succeeds if at least one application succeeds.</p>
<div class="tags">Tags:
<ul>
<li>core</li>
<li>goal management</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/interactive.html#tactic.interactive.any_goals">tactic.interactive.any_goals</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>imported by default</li></ul></details>
</div>
<div class="tactic core basic lemma-application">
<h2 id="apply"><a href="#apply">apply</a></h2>
<p>The <code>apply</code> tactic tries to match the current goal against the conclusion of the type of term. The argument term should be a term well-formed in the local context of the main goal. If it succeeds, then the tactic returns as many subgoals as the number of premises that have not been fixed by type inference or type class resolution. Non-dependent premises are added before dependent ones.</p>
<p>The <code>apply</code> tactic uses higher-order pattern matching, type class resolution, and first-order unification with dependent types.</p>
<div class="tags">Tags:
<ul>
<li>core</li>
<li>basic</li>
<li>lemma application</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/interactive.html#tactic.interactive.apply">tactic.interactive.apply</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>imported by default</li></ul></details>
</div>
<div class="tactic context-management lemma-application">
<h2 id="apply_assumption"><a href="#apply_assumption">apply_assumption</a></h2>
<p><code>apply_assumption</code> looks for an assumption of the form <code>... → ∀ _, ... → head</code>
where <code>head</code> matches the current goal.</p>
<p>If this fails, <code>apply_assumption</code> will call <code>symmetry</code> and try again.</p>
<p>If this also fails, <code>apply_assumption</code> will call <code>exfalso</code> and try again,
so that if there is an assumption of the form <code>P → ¬ Q</code>, the new tactic state
will have two goals, <code>P</code> and <code>Q</code>.</p>
<p>Optional arguments:</p>
<ul>
<li><code>lemmas</code>: a list of expressions to apply, instead of the local constants</li>
<li><code>tac</code>: a tactic to run on each subgoal after applying an assumption; if
this tactic fails, the corresponding assumption will be rejected and
the next one will be attempted.</li>
</ul>
<div class="tags">Tags:
<ul>
<li>context management</li>
<li>lemma application</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/tactic/solve_by_elim.html#tactic.interactive.apply_assumption">tactic.interactive.apply_assumption</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>import tactic.solve_by_elim</li>
<li>import tactic.basic</li></ul></details>
</div>
<div class="tactic core lemma-application">
<h2 id="apply_auto_param"><a href="#apply_auto_param">apply_auto_param</a></h2>
<p>If the target of the main goal is an <code><a href="https://pygae.github.io/lean-ga-docs/init/meta/name.html#auto_param">auto_param</a></code>, executes the associated tactic.</p>
<div class="tags">Tags:
<ul>
<li>core</li>
<li>lemma application</li>
</ul>
</div>
<details class="rel_decls"><summary>Related declarations</summary>
<ul>
<li><a href="https://pygae.github.io/lean-ga-docs/init/meta/interactive.html#tactic.interactive.apply_auto_param">tactic.interactive.apply_auto_param</a></li>
</ul>
</details>
<details class="imports"><summary>Import using</summary><ul><li>imported by default</li></ul></details>
</div>