CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

Try doing some basic maths questions in the Lean Theorem Prover. Functions, real numbers, equivalence relations and groups. Click on README.md and then on "Open in CoCalc with one click".

Project: Xena
Views: 18536
License: APACHE
oleanfile3.4.2, commit cbd2b6686ddb�NH&initdatadlistbasiccategorybasicmetaexprmetarb_mapdatabooltacticlibrary_notetacticderive_inhabited�F{export_decloptionnonenonesomesomeexport_declboolffffttttexport_declhas_andthenandthenandthenexport_declhas_powpowpowexport_declhas_appendappendappendexport_decldecidableis_trueis_trueis_falseis_falseto_boolto_boolexport_declhas_purepurepureexport_declhas_bindbindbindexport_declhas_monad_lift_tmonad_lift!monad_liftexport_declmonad_functor_tmonad_map$monad_mapexport_declmonad_runrun'runexport_decllistmmap*mmapmmap'*mmap'mfilter*mfiltermfoldl*mfoldlexport_declnativenat_map3rb_mapmkexport_declname_mapnativerb_mapmkexport_declexpr_mapnativerb_mapmkexport_decltacticinteraction_monadfailedfailexport_decltactic_resultinteraction_monadresultexport_decltacticFtransparencyreducibleGreduciblesemireducibleGsemireducibleexport_decltacticmk_simp_attrLmk_simp_attrexport_declmonad_exceptthrowOthrowcatchOcatchexport_declmonad_except_adapteradapt_exceptTadapt_exceptexport_declmonad_state_adapteradapt_stateWadapt_stateexport_declmonad_readerreadZreadexport_declmonad_reader_adapteradapt_reader]adapt_readerexport_declis_lawful_functormap_const_eq`map_const_eqid_map`id_mapcomp_map`comp_mapexport_declis_lawful_applicativeseq_left_eqgseq_left_eqseq_right_eqgseq_right_eqpure_seq_eq_mapgpure_seq_eq_mapmap_puregmap_pureseq_puregseq_pureseq_assocgseq_assocexport_declis_lawful_monadbind_pure_comp_eq_maptbind_pure_comp_eq_mapbind_map_eq_seqtbind_map_eq_seqpure_bindtpure_bindbind_assoctbind_assocATTRderive��binder_infolistconspexpr
Quotehas_reflectlistnildecl~has_reflecthas_reflect~id_v
binder_infocases_on�
reflected

Quote�default
Quote�implicit
Quote�strict_implicit
Quote�inst_implicit
Quote�aux_decl�VMR�VMC��


"ATTRinstance��~has_reflectclass����declexprof_natαexprboolttanattactic)�)id_rhsn*�*,natbinary_rec0tacticmk_mappnamemk_string
Strzero7
Strhas_zeronameanonymousoption))B)AFtransparencysemireduciblebbooln*tac,iteeq*has_zerozero*nathas_zeronatdecidable_eqUZ,67
Strone7
Strhas_one<BDKN +monadto_has_bind+interaction_monadmonadtactic_state))e)tacticmk_appcondnamei7
Strbit1<7
Strbit0<))N�PInfo�prt�VMR�_lambda_1VMR�VMC��au�,�*�Q_fresh
�(.)natdecidable_eq	G	A	'nameanonymous0charof_natt�i�b�stringemptystringstr���namemk_string>�1�t�i�b�������tacticmk_appo�_c_1n�_c_2e�_c_3�_�s�a�h���������������tacticmk_mappVMC�S�)z�_c_4e�_c_5r�_c_6o�_c_7��_�s�a�h������������������natbinary_rec_maindoc� Given an expr `α` representing a type with numeral structure,
`of_nat α n` creates the `α`-valued numeral expression corresponding to `n`.decl�of_intα)�int,�)���cases_on��,�*/,exprof_nat�*�z�has_addadd*nathas_addhas_oneone*nathas_onee)|7
Strneg7
Strhas_neg<�N�PInfo�prt�VMR�VMC�\�u���)intcases_on
�natadd�	Un�_c_1e�_c_2g�_c_3�_�s�a�h����������������Zdoc� Given an expr `α` representing a type with numeral structure,
`of_int α n` creates the `α`-valued numeral expression corresponding to `n`.
The output is either a numeral or the negation of a numeral.decl�mk_exists_lstargslist)inner),���)��mfoldr+v))arg)i)zFinfer_typeUt)z�_p)_a)exprcases_on(��),a*�
match_failed)+interaction_monadmonad_failuAnnotdo_failure_eq�level�return+v)Rorcoe_sortQcoe_sort_boolexproccursne�levelzeroordecidable��booldecidable_eq�(�decidable�a�b�levelhas_decidable_eqU�)coe_fn)exprhas_coe_to_fun(��const(7
StrExists<��i�lambdas�������7
Strand<�i��~a_1����~a_1~a_2)��~a_1~a_2
a_3)��)a_1)��~a_1
a_2)�=�G�~a_1)�E�macro_defa_1��U�PInfo�!	VMR�_lambda_1VMR�_rec_1VMR�_lambda_2VMR�VMC�+!	αVMC�,�!	�un)�_fresh
�4�)�_fresh
�4�)�_fresh
�4�)exprcases_on
u~��������+match_failedexproccurs�_main	!levelzerolevelhas_decidable_eq			 "	#?�d�n�a������exprconstexprapp�Fqs�_c_1exprlambdas_main�t�i�x�E����������D�F�F��+�;��+�;��+�;��+�;��+�;��+�;��+�;��+�;VMC�-"
su�)�)tacticinfer_type	�M	�,VMC�
!	�)���-��+listmfoldr_maindoc�Generates an expression of the form `∃(args), inner`. `args` is assumed to be a list of local
 constants. When possible, `p ∧ q` is used instead of `∃(_ : p), q`.decl�traverseum��R_inst_1applicativeelabQelab'Qf�'U��d�'���g�S�a�T�c�VQ�WQ�X�f��g�i�'i�q�*��s�rapplicativeto_has_pure�r��q�vari���x��sortia_a~a_a_1�5�w'��y���{���r����Ua_a~a_a_1~a_a_2'��w��functormap���Yto_functor���������mvar��U�a_a~a_a_1~a_a_2
a_a_3'�r�w	�����������������local_const�ri�U�a_a�qa_a_1����has_seqseq���Yto_has_seq���r�������������r��a�����app�iUia_a~a_a_1
a_a_2��a_a_3���������������������p��'���lam�ri��U��a_a~a_a_1
a_a_2��a_a_3���������pi�ri�����a_a~a_a_1��a_a_2��a_a_3�������������p���p��'���elet�ri������a_a�Ma_a_1��������%���macro�Ulisttraverse���r����i�PInfo�Q+	VMR�Q_lambda_1VMR�Q_lambda_2VMR�Q_lambda_3VMR�Q_lambda_4VMR�Q_lambda_5VMR�Q_lambda_6VMR�Q_lambda_7VMR�QVMC��+	��_fresh
�;;~�_fresh
�;:~�_fresh
�;3QexprmvarVMC��+	��_fresh
�;@
�_fresh
�;?~�_fresh
�;>~��Qexprlocal_constVMC��+	����Q�FVMC��+	���_fresh
�;H
�_fresh
�;G~��QexprlamVMC��+	���_fresh
�;N
�_fresh
�;M~��QexprpiVMC��+	����_fresh
�;S~��QexpreletVMC��+	��_fresh
�;Z�M��QexprmacroVMC�Q�+	��X�WQ�VQ�T�S�:
!3Fa~��exprvar
exprsort
�D
��

	��

��


	��


	��


	��



listtraverse_main��

doc�Q`traverse f e` applies the monadic function `f` to the direct descendants of `e`.decl�mfoldlu_1α�_ma�_��_inst_1monadf���)i��i�)�����_���?���A���D�i�)��E�c��d��to_applicative�iprod)��prodsnd)�state_trun��)exprtraversestate_t���R�gstate_tmonad��i((e')functormap_const_rev�e�r��P�t�R�t�j�r��)punit �t��t�z�r����rget�r�t�zstate_tmonad_state�r��functioncomp	�r��r�t�r#��thas_monad_lift_t_trans���t��has_monad_lift�r��has_monad_lift_t_refl��rflip		�r)��iput�r�t�z��U�PInfo��;	VMR��_lambda_1VMR��_lambda_2VMR��_lambda_3VMR��_lambda_4VMR��_lambda_5VMR��_lambda_6VMR��_lambda_7VMR��_lambda_8VMR��_lambda_9VMR��_lambda_10VMR��_lambda_11VMR��_lambda_12VMR��_lambda_13VMR��_lambda_14VMR��_lambda_15VMR��_lambda_16VMR��_lambda_17VMR��_lambda_18VMR��_lambda_19VMR��_lambda_20VMR��_lambda_21VMR��_lambda_22VMR��_lambda_23VMR��_lambda_24VMR��VMC��;	c
VMC��;	αVMC��;	_p�_fresh
�B��_fresh
�Bx�_fresh
�Bw

VMC��;	sxfβ�_α�_����
VMC��;	���_fresh
�B���functionconst

VMC��;	�	�
xβ�_α�_����
VMC��
;	saα�_��

VMC��;	���_fresh
�B���

VMC��;	���_fresh
�B�����
VMC��;	�	xfβ�_α�_����
VMC��;	�����

VMC��;	���_fresh
�B���

VMC��;	���_fresh
�B�����
VMC��;	�	baβ�_α�_������

VMC��;	aVMC��;	�������

VMC��;	���_fresh
�B���

VMC��;	���_fresh
�B�����
VMC��;	�	baβ�_α�_������

VMC��
;	a�_fresh
�B���

VMC��;	���_fresh
�B�)�_fresh
�By����
VMC��
;	����

VMC��;	���>)���

VMC��.<1�	��)�A��������




VMC��+;	�)����������_�����������������Q��


doc�� `mfoldl f a e` folds the monadic function `f` over the subterms of the expression `e`,
with initial value `a`.declinteraction_monadget_resultu_1σ�_α�>tacinteraction_monad�DU���interaction_monadresult
�U�E�_�F�>�G�����L_a��i������iU�K��interaction_monadresultcases_on

�i�K���������ia_1��L���r����Msuccess
�r�����U�@�unitformata_1@posa_2�r�L�������r�������Mexception
���r�U���PInfo�CF	VMR�CVMC�CF	��G�F�E�_	doc�C `get_result tac` returns the result state of applying `tac` to the current state.
Note that it does not update the current state.declleanparserof_tactic'α�_tac+leanparserU�Z�_�[�/�p�r�t�\parser_state�JuUU�Xof_tactic�%interaction_monadget_resultuUr�%_a�$��Nui�c�$i���ia_1u/����� �U���a_1��a_2u/���#����V��r�U�PInfo�YT	VMR�YVMC�YT	�K��[�Z�_�Cleanparserof_tactic		
doc�Y `of_tactic' tac` lifts the tactic `tac` into the parser monad.
This replaces `of_tactic` in core, which has a buggy implementation.decl�Xhas_coe'α�_has_coe���k�_/�[has_coemk
��Z�Xof_tactic'�PInfo�j^prt�jVMR�jVMC�j^�k�_�Ydoc�j Override the builtin `lean.parser.of_tactic` coe, which is broken.
(See test/tactics.lean for a failure case.)ATTR����jclass�l�j��decl�Xemit_command_herestrstring��f�q�f/�g�"�W���f�f�Xwith_input���Xcommand_like_p�k_a�k��cases_on���f�v�k�gfst��snd�f�i�<�f�PInfo�pc	VMR�pVMC�pc	�K��q�fleanparsercommand_likeleanparserwith_input	
doc�p `emit_command_here str` behaves as if the string `str` were placed as a user command at the
current line.decl�Xemit_code_here_main��f�����f/���"�f���Xemit_command_hereleft�fRT�rlengthZ]��Z���<��unitstar
��RecFn���PInfo��i	VMR��VMC��i	�K���f�p	stringlength�		
��decl�Xemit_code_here����	�PInfo��i	VMR��VMC��i	��doc�� `emit_code_here str` behaves as if the string `str` were placed at the current location in
source code.declformatintercalatex������������/����������formatjoinlistintersperse���PInfo��t	VMR��VMC��t	�������listintersperse_mainformatjoindoc�� `intercalate x [a, b, c]` produces the format object `a.x.b.x.c`,
where `.` represents `format.join`.decltacticmk_local_pisn_main�)�*+�W�)�)�*��)��Ua_1*`��/�����prodmk�)���(����failed��a_1�����������(��a_a~a_a_1�5RT�Z]�Z���������U��a_a~a_a_1~a_a_2)RTiZ]iZ����������(�U��a_a~a_a_1~a_a_2
a_a_3)RT�Z]�Z����������(i�U��a_a)a_a_1)����������(U��a_a~a_a_1
a_a_2)a_a_3)���������(i�U��a_a~a_a_1
a_a_2)a_a_3)natcases_on�*����������(i�U�*��y����mk_local'�i�p)x����
��RecFn���instantiate_var�U_p��_a���t�)�������x��y)��������Ua_a~a_a_1)a_a_2)a_a_3)��������(i�U��a_a�Ma_a_1����������((U���PInfo��	VMR��VMC���	�u�*�)�:
&9Mbu����	?failed���	��$���	*/��7�D�	=B��K���	QV��`���	fk��s�F�	y~����������Fmk_local'	��	exprinstantiate_var��	��

�
�	
�	��������	�������decl��mk_local_pisn�����PInfo��	VMR��VMC��	��doc�� `mk_local_pisn e n` instantiates the first `n` variables of a pi expression `e`,
and returns the new local constants along with the instantiated expression. Fails if `e` does
not begin with at least `n` pi binders.decl��mk_theoremn~ls�~t)e)declaration��~������)��)/��declarationthmi�Utaskpure)�PInfo�Ê	VMR��VMC���	��)��)������~taskpuredeclarationthmdoc�� `mk_theorem n ls t e` creates a theorem declaration with name `n`, universe parameters named
`ls`, type `t`, and body `e`.decl��add_theorem_byn~ls��type)tac+��,��~������)�����x�j))��solve_aux��U_p��_a���u)����,�x���y)punitcases_on�x��,U�z��instantiate_mvarsbody)x��)��add_decl��mk_theorem�����r_x������listmap~�levelparam���PInfo�я	VMR��_lambda_1VMR��VMC���	a~levelparamVMC��6�	�Ku������)������~Fsolve_aux	0tacticinstantiate_mvars	)
	��tacticadd_decl	"����map_main�D'
.	
doc�� `add_theorem_by n ls type tac` uses `tac` to synthesize a term with type `type`, and adds this
to the environment as a theorem with name `n` and universe parameters `ls`.decl��eval_expr'α�__inst_1reflected�_e)+����_������)/��y�|7
Strid<�N��eval_expr�U�PInfo��	VMR��VMC��!�	�Ku��)�����_�d�i������	tacticeval_exprdoc�� `eval_expr' α e` attempts to evaluate the expression `e` in the type `α`.
This is a variant of `eval_expr` in core. Due to unexplained behavior in the VM, in rare
situations the latter will fail but the former will succeed.decl��mk_user_fresh_name+~/��x~~��mk_fresh_namenm~�~has_appendappend~namehas_append��7
Struser__<namesanitize_name�pop_prefix���PInfo���	VMR��VMC��T�	�Kutacticmk_fresh_name	N�_�_�r�e�s�u���������namepop_prefix�sanitize_name_main�_�_�r�e�s�u���������nameappend�doc�� `mk_fresh_name` returns identifiers starting with underscores,
which are not legal when emitted by tactic programs. `mk_user_fresh_name`
turns the useful source of random names provided by `mk_fresh_name` into
names which are usable by tactic programs.

The returned name has four components which are all strings.decl��has_attribute'�~�~+Q�~�~/�succeeds+tacticalternative*��has_attributeU�PInfo�	�	VMR�	_lambda_1VMR�	VMC��	�.VMC�	�	�~�~tactichas_attribute��succeedsdoc�	`has_attribute n n'` checks whether n' has attribute n.decl��is_simp_lemma�/���has_attribute'7
Strsimp<�PInfo��	VMR�VMC��	�p�m�i�s��������	doc�Checks whether the name is a simp lemmadecl��is_instance���7
Strinstance<�PInfo��	VMR�VMC�-�	�e�c�n�a�t�s�n�i������������	doc�Checks whether the name is an instance.decl��local_decls+name_map��/�"xenvironment�!tacticget_enve�$	xs3rb_map~���fold�+nativemk_rb_map~��namehas_lt�~�~nameltdecidable_relUd��s�+R�environmentin_current_file'�declarationto_nameU��?(�+�insert~���>U+�Z+��+v�!�PInfo��	VMR�_lambda_1VMR�_lambda_2VMR�VMC�,��&�+�%���_fresh��U�$declarationto_nameenvironmentin_current_file'�>		�2nativerb_mapinsertVMC�-�	su�_fresh��]�+VMC��	�KuFget_env	�,�$�!3mk_rb_mapenvironmentfold��+�-doc� `local_decls` returns a dictionary mapping names to their corresponding declarations.
Covers all declarations from the current file.decl��get_unused_decl_name_aux_maine�$nm~�*���B�$�C~�*��	nm'~nameappend_suffixU���fstringhas_append
Str_to_string*nathas_to_stringR�environmentcontainsi��s(��
�bRecFn�Ai��U���
�PInfo�A�	VMR�A_lambda_1VMR�AVMC�N�	�u�_fresh��~�_fresh��*�_fresh��~�_fresh���$environmentcontains�>	
��AVMC�A�	�*�C~�B�$natrepr_���stringappend�append_suffix_main�D~�Ndecl��get_unused_decl_name_aux�b�B�$�C~�AU�PInfo�c�	VMR�cVMC�c�	�C~�B�$�Adoc�cIf `{nm}_{n}` doesn't exist in the environment, returns that, otherwise tries `{nm}_{n+1}`decl��get_unused_decl_namenm~���e~���%~�'e�$R��qU���(����get_unused_decl_name_auxUbit0*����U�PInfo�d�	VMR�dVMC�d�	�Ku�e~�<	�\�>		
�Adoc�dReturn a name which doesn't already exist in the environment. If `nm` doesn't exist, it
 returns that, otherwise it tries nm_2, nm_3, ...decl��decl_mk_constd��+�X)�j��/��x��W~���listmmap+v~��u~�c+�d+�W�����~���mk_meta_univdeclarationuniv_paramssubst��	e)��>�������U�listmonad����\~������))exprinstantiate_univ_params�otype�U�PInfo�i�	VMR�i_lambda_1VMR�i_lambda_2VMR�i_lambda_3VMR�i_lambda_4VMR�iVMC�x�	�.VMC�y� su�m~tacticmk_meta_univ	
VMC�z�	����
VMC�{	�	�8u�_fresh��C)�_fresh��@���_fresh��6���1typeexprinstantiate_univ_paramsVMC�i%�	�Ku�j���1univ_params�y��xlistmmap_main	�z���2�D�r)�{doc�iReturns a pair (e, t), where `e ← mk_const d.to_name`, and `t = d.type`
but with universe params updated to match the fresh universe metavariables in `e`.

This should have the same effect as just
```lean
do e ← mk_const d.to_name,
   t ← infer_type e,
   return (e, t)
```
but is hopefully faster.decl��mk_localn~)��~/)����PInfo���	VMR��VMC��
�	��~�D��doc�� `mk_local n` creates a dummy local variable with name `n`.
The type of this local constant is a constant with name `n`, so it is very unlikely to be
a meaningful expression.decl��local_def_valuee),��)�x��)��)coetrue)coe_to_lift��)coe_base��)exprhas_coe����
Quote��zhas_bindand_then*)+w��revert��target_p)_a)��*���fail)��formathas_to_format����formathas_append�to_fmt�fstringhas_to_format
Str�)exprhas_to_format(i�"
Str is not a local definition���1�~a_1�5����%�)��.�~a_1~a_2)����%�)��.�~a_1~a_2
a_3)����%�)�r�.�)a_1)�;�~a_1
a_2)�O�Y�~a_1)a_2)a_3)��U��Ma_1��;_p��_a���t))����,�x)�y)�]�PInfo���	VMR��_rec_1VMR��_lambda_1VMR��VMC���h�	�u�/)�_fresh��)�:
��4���f�����1���� �_c_1i�_c_2n�_c_3o�_c_4t�_c_5a�	_c_6l�
_c_7f�e�d�
	c�
	s����������������������������stringhas_to_formatto_fmt���������formatcompose����?fail �_c_8i�_c_9n�_c_10o�_c_11t�_c_12a�	_c_13l�
_c_14f�e�d�
	c�
	s������������������������������������������������� �_c_15i�_c_16n�_c_17o�_c_18t�	_c_19a�
_c_20l�_c_21	f�e�d�
c�
	s�������������������������������������������������	 �_c_22i�_c_23n�_c_24o�	_c_25t�
_c_26a�_c_27l�_c_28	
f�e�d�c�	
	s�������������������������������������������������
 �_c_29i�_c_30n�	_c_31o�
_c_32t�_c_33a�_c_34l�
_c_35	
	f�e�d�
c�


	s������������������������������������������������� �_c_36i�_c_37n�_c_38o�_c_39t�	_c_40a�
_c_41l�_c_42	f�e�d�
c�
	s�������������������������������������������������	 �_c_43i�_c_44n�	_c_45o�
_c_46t�_c_47a�_c_48l�
_c_49	
	f�e�d�
c�


	s������������������������������������������������� ���i���n�	��o�
��t���a���l�
��	
	f�e�d�
c�


	s������������������������������������������������� �_c_50i�_c_51n�_c_52o�_c_53t�	_c_54a�
_c_55l�_c_56	f�e�d�
c�
	s�������������������������������������������������	VMC���	�Ku�_fresh��)Frevert		tactictarget	��VMC���	�Ku��)������	doc�� `local_def_value e` returns the value of the expression `e`, assuming that `e` has been defined
locally using a `let` expression. Otherwise it fails.decl��pis_main���),���)listcases_on)��,U��Y)a_hd)a_tl���),U�*���i����a_hd_a~a_hd_a_1�5����a_hd_a~a_hd_a_1~a_hd_a_2)����a_hd_a~a_hd_a_1~a_hd_a_2
a_hd_a_3)�z��t)z
�{RecFn����f')���0�iUexprabstract_local�a_hd_a)a_hd_a_1)��a_hd_a~a_hd_a_1
a_hd_a_2)a_hd_a_3)����r��a_hd_a~a_hd_a_1)��a_hd_a�Ma_hd_a_1����PInfo��	VMR�VMC�^�	�u�)��listcases_on�:

DINSX\\\\���M	%=
�	*6exprabstract_local	��;
B	
\\\\\decl��pis�{��PInfo�"�	VMR�"VMC�"�	�doc�" `pis loc_consts f` is used to create a pi expression whose body is `f`.
`loc_consts` should be a list of local constants. The function will abstract these local
constants from `f` and bind them with pi binders.

For example, if `a, b` are local constants with types `Ta, Tb`,
``pis [a, b] `(f a b)`` will return the expression
`Р(a : Ta) (b : Tb), f a b`decl��lambdas_main�{���)��a_hd)a_tl���a_hd_a~a_hd_a_1~a_hd_a_2
a_hd_a_3)���t)z
�{RecFn�$���f')����iU�������������PInfo�$�	VMR�$VMC�$^�	�u�)����:

DINSX\\\\���M	%=
�$	*6�!	��;
B	
\\\\\decl��lambdas�{�$�PInfo�-�	VMR�-VMC�-�	�$doc�- `lambdas loc_consts f` is used to create a lambda expression whose body is `f`.
`loc_consts` should be a list of local constants. The function will abstract these local
constants from `f` and bind them with lambda binders.

For example, if `a, b` are local constants with types `Ta, Tb`,
``lambdas [a, b] `(f a b)`` will return the expression
`λ (a : Ta) (b : Tb), f a b`decl��mk_psigma_main��,������mk_const7
Strpunit<a_hd)a_tl����1*���f�!
Strmk_psigma expects a list of local constants�1���a_hd_a~a_hd_a_1�5��a_hd_a~a_hd_a_1~a_hd_a_2)��a_hd_a~a_hd_a_1~a_hd_a_2
a_hd_a_3)�}�2�,�����a_tl_hd)a_tl_tl��z
��RecFn�/�Uy)z���r��iα)�β)zz��lambdas�������r����t)z67
Strmk7
Strpsigma<B��)A��)Acoe_option)�B�*JNr)�����
�������a_hd_a)a_hd_a_1)��a_hd_a~a_hd_a_1
a_hd_a_2)a_hd_a_3)���Wa_hd_a~a_hd_a_1)�Ua_hd_a�Ma_hd_a_1����PInfo�/�	VMR�/VMC�/���	�u���!�t�i�n�u�p��������Fmk_const�:
#��������<�������m�_c_1p�_c_2s�_c_3i�_c_4a�	_c_5 �
_c_6e�_c_7c�_c_8t�
_c_9l�_c_10o�_c_11n�_c_12
	

	
f�


	

x�
	g�_�k�������������������������������������������������
��m�_c_13p�_c_14s�_c_15i�_c_16a�	_c_17 �
_c_18e�_c_19c�_c_20t�
_c_21l�_c_22o�_c_23n�_c_24
	

	
f�


	

x�
	g�_�k�������������������������������������������������
��m�_c_25p�_c_26s�_c_27i�	_c_28a�
_c_29 �_c_30e�_c_31c�
_c_32t�_c_33l�_c_34o�_c_35n�_c_36



f�	

x�
g�	_�k���������������������������������������������������m�_c_37p�_c_38s�	_c_39i�
_c_40a�_c_41 �_c_42e�
_c_43c�_c_44t�_c_45l�_c_46o�_c_47n�_c_48		f�	
	
x�
g�
	_�k�����������������������������������������������������������:	�/	���4���M	���-

�M	���&���$	��������	����a�m�g�i�s�p���������k�m������	��
���F�F��$�+�2
�9
��m�_c_49p�_c_50s�_c_51i�	_c_52a�
_c_53 �_c_54e�_c_55c�
_c_56t�_c_57l�_c_58o�_c_59n�_c_60



f�	

x�
g�	_�k���������������������������������������������������m�_c_61p�	_c_62s�
_c_63i�_c_64a�_c_65 �
_c_66e�_c_67c�_c_68t�_c_69l�_c_70o�_c_71n�_c_72



f�




	x�
g�
	_�k���������������������������������������������������m���p�	��s�
��i���a��� �
��e���c���t���l���o���n���



f�




	x�
g�
	_�k���������������������������������������������������m�_c_73p�	_c_74s�
_c_75i�_c_76a�_c_77 �
_c_78e�_c_79c�_c_80t�_c_81l�_c_82o�_c_83n�_c_84



f�




	x�
g�
	_�k���������������������������������������������������m�_c_85p�_c_86s�_c_87i�	_c_88a�
_c_89 �_c_90e�_c_91c�
_c_92t�_c_93l�_c_94o�_c_95n�_c_96



f�	

x�
g�	_�k�������������������������������������������������decl��mk_psigma���/	�PInfo���	VMR��VMC���	�/doc�� `mk_psigma [x,y,z]`, with `[x,y,z]` list of local constants of types `x : tx`,
`y : ty x` and `z : tz x y`, creates an expression of sigma type: `⟨x,y,z⟩ : Σ' (x : tx) (y : ty x), tz x y`.decl��elim_gen_prod_main�*�)�����+���X���*�)������,�*�gi/�g��f���elistreverse)U�����a_1*�oy�f�it)R�expris_app_of7
Streq<���(�g�p�q�si�v��x��������)�f��cases_core�listtake~��N_p��_a���|�������g�o
��f+�Annot�hd��tl���t~�������gUhd_fst~hd_snd���H�������ghd_snd_fst�hd_snd_snd���}����gU��hd_snd_fst_hd)hd_snd_fst_tl��}����g��hd_snd_fst_tl_hd)hd_snd_fst_tl_tl��}����g�������g���o
�kRecFn��
U�i��drop~�tl_hd��tl_tl����hd_snd_fst_tl_tl_hd)hd_snd_fst_tl_tl_tl����PInfo���	VMR��_lambda_1VMR��_rec_1VMR��VMC���	�.VMC��G�	�un���_fresh��*�_fresh�����_fresh���
����;	�����;E�"����;D�$;�&2��drop_main
��:����;C����;VMC��K�	�u������)�*��reverse�M	D�q�e������His_app_of�>	"9��take_maintacticcases_core	+3	��8	
B��Idecl��elim_gen_prod�k���PInfo���	VMR��VMC���	��doc�� `elim_gen_prod n e _ ns` with `e` an expression of type `psigma _`, applies `cases` on `e` `n` times
and uses `ns` to name the resulting variables. Returns a triple: list of new variables, remaining term
and unused variable names.decl_private��L%{elim_gen_sum_aux_main�*�)�����*�)���.�������Ua_1*��������induction�~G~N_p��_a������������
���+�Annot�����������������Uhd_fst~hd_snd����������hd_snd_fst�hd_snd_snd���}�����U�hd_snd_fst_hd)hd_snd_fst_tl��}��������������r�tl_hd��tl_tl����������Utl_hd_fst~tl_hd_snd����������tl_hd_snd_fst�tl_hd_snd_snd���}�����U�tl_hd_snd_fst_hd)tl_hd_snd_fst_tl��}��������������r��������swap_x��
��RecFn�����5tl_tl_hd��tl_tl_tl���tl_hd_snd_fst_tl_hd)tl_hd_snd_fst_tl_tl��hd_snd_fst_tl_hd)hd_snd_fst_tl_tl���PInfo���prvelim_gen_sum_aux_main��VMR��_lambda_1VMR��_rec_1VMR��VMC���.VMC�g��u�����_fresh��*�_fresh����
���;����;e�\�$���;[�*2���;Z�4Q
�6HFswap	9B
��GP���;Y���;d���;VMC����u���)�*tacticinduction	�prv���decl�������PInfo���VMR��VMC�����decl��elim_gen_sumn*e)+��*�)/�r�?���U�_p��_a���I����r�x��y)�ux����get_goalsgs������set_goals�����has_append)�s��)��r���)��_x������������PInfo�
�&	VMR�
VMC�
>�&	�Ku�)�*��	8tacticget_goals	1����������append_maintacticset_goals	*���
/	
6	doc�
 `elim_gen_sum n e` applies cases on `e` `n` times. `e` is assumed to be a local constant whose
type is a (nested) sum `⊕`. Returns the list of local constants representing the components of `e`.decl��extract_defn~trustedQelab_def�����~�Q� ��/�����������))exprto_implicit_local_const��local_contextcxt�y���t)�������_p��_a�����'�����x���y)������d)����pis�r�t')�����Ud')	univ��exprcollect_univ_paramsU������declarationdefn�Ureducibility_hintsregular�(_x����applyc��Fapply_cfgmkN(Fnew_goalsnon_dep_first((((�PInfo��/	VMR�_lambda_1VMR�VMC�9�/	�Ku�_fresh�����_fresh��)�_fresh��)�_fresh��Q�_fresh��~declarationdefn��	FapplycVMC�b�/	�Ku� ���Q�~tacticlocal_context	exprto_implicit_local_const��	\�	U��	N	��	!G
�	&@�$	+9exprcollect_univ_params�,���9>EL
S	
Zdoc� Given `elab_def`, a tactic to solve the current goal,
`extract_def n trusted elab_def` will create an auxiliary definition named `n` and use it
to close the goal. If `trusted` is false, it will be a meta definition.decl��exact_dec_trivial����has_bindseq����+wtacticsave_infoposmkbit1*���	���	�	�	�������	�	�	���Ustep���Uinteractiveexact
Quote
of_as_trueAnnotfrozen_name


tacticAnnot�^
��Annot�^
has_bindseqAnnot�^
�	Annot�^

_�jAnnot�^
Prenum1065
Prenum41Annotanonymous_constructor
�_stepAnnot�^
tactictrivAnnot�^TyEAnnotby�PInfo�R�;	VMR�R_lambda_1VMR�R_lambda_2VMR�RVMC�j�;	�.VMC�k�;	�Kut₂t₁β�_α�_	VMC�R�;	�	8tacticinteractiveexactFstep�;.Fsave_info�k�jhas_bindseqdoc�RAttempts to close the goal with `dec_trivial`.decl��retrieveu_1α�>tactactic�x�	>U�y�>�z�	?�su_x��u��	Di���|u��u��	G��a�s'u��u�U��u��PInfo�w�>	VMR�wVMC�w�>	�|u�z�y		doc�wRuns a tactic for a result, reverting the state after completiondecl��repeat1t����������
������Fandthen_seq��repeat	�PInfo���E	VMR��VMC���E	����FrepeatFseqdoc��Repeat a tactic at least once, calling it recursively on all subgoals,
 until it fails. This tactic fails if the first invocation fails.decl��iterate_range_main�*�*������*�*����,�*����	nU����skipa_1*����try�������+wU
�	lRecFn��ZUa_1*���	z�	{has_subsub*�has_sub��U�PInfo���I	VMR��_lambda_1VMR��VMC���I	�Ku�_fresh�#t*�_fresh�#r��	��VMC��#�I	�u����*�*tacticskip����try	natsub��!decl��iterate_range�	l���PInfo���I	VMR��VMC���I	��doc��`iterate_range m n t`: Repeat the given tactic at least `m` times and
 at most `n` times or until `t` fails. Fails if `t` does not run at least m times.decl��replace_attac�)��hs�tgtQ����	������Q��Qlistmfilter+v)h)yQ�h_type)���������_p��_a���m�������x)�y)������assertexprlocal_pp_name(�U_x)����mk_eq_mpU�re)tacticexactNUto_remove�xQQ�	���guard+�
�U�U(_x���	�y����_p��_a���	��x)�y)����replace_targetUgoal_simplifiedQ��Qlistmmap'+v)��h)�	u��clearU_x���Qdecidableto_bool�not���empty)��	���	��	��Q�Q�Q�	��	�(�	��PInfo���V	VMR��_lambda_1VMR��_lambda_2VMR��_lambda_3VMR��_lambda_4VMR��_lambda_5VMR��VMC���V	�.VMC��.�V	�Ku�_fresh�-�)�_fresh�-�)�_fresh�-��	�	(�Hlocal_pp_nameFassert	!	tacticmk_eq_mp	
tacticexact
&	
VMC���W�Ku��)���	��M	������VMC��3�V	�Ku�_fresh�-�Q���	��>	
interaction_monadfailed
	-�		&tacticreplace_target+VMC���a��)tacticclear��VMC��Q�V	�Ku��Q������	������listmfilter_main	K������	D�����listmmap'_main	 =��empty_main�>	&(-	*,-	.6�>	2457decidableto_bool	B	
Idoc��Given a tactic `tac` that takes an expression
and returns a new expression and a proof of equality,
use that tactic to change the type of the hypotheses listed in `hs`,
as well as the goal if `tgt = tt`.

Returns `tt` if any types were successfully changed.decl��simp_bottom_up'post�	�e)cfgopt_param��simp_configtacticsimp_configmksimpdefault_max_stepsboolff((�
((((((�
(�
((�����	���)���
+�����j�����\������simplify_bottom_up����_x����)��+�
/�����
/��������iU�PInfo���g	VMR��_lambda_1VMR��VMC���i$�|u�)�����_fresh�0��	�	
VMC���g	�|u���
+��)���	�����simplify_bottom_up	

doc�� A variant of `simplify_bottom_up`. Given a tactic `post` for rewriting subexpressions,
`simp_bottom_up post e` tries to rewrite `e` starting at the leaf nodes. Returns the resulting
expression and a proof of equality.PInfo��instance_cache�lindlCn����e_1α)univ�inst� )i��mk�U���
M����_���)�����
P�
M���
O���
X��)�����
Pi�U�nspace��prt��recgind���decl��αc�
M)��
M
Proj����)��rec��
M)��)�����
P��PInfo��lATTRreducibility���proj��decl��univ��
M���
M
Proj������
i��
M���)�����
PU�PInfo��lATTR����proj��decl��inst��
M�
P��
M
Proj�����
P�
i��
M�
P��)�����
P�PInfo��lATTR����proj��decl��rec_on�����
O���
M����)�����
P��
T�U���
O���
M���
���rec���U�PInfo�	�lATTR����	auxrec�	prt�	auxrec��rec_ondecl��cases_on���
��
��PInfo��lATTR����auxrec�doc��Caches unary type classes on a type `α : Type.{univ}`decl��no_confusion_type��P�
Nv1�
Mv2�
M�
N��
N��
M��
M�����
M�
NU��)�����
P�
�i��)�����
P�α_eqS)��univ_eqS���inst_eqS�
P�������PInfo�
�lATTR����
prt�
decl��no_confusion����
N��
M��
Mh12S�
MU�
��i�U��
N��
M��
M��
�eqrec�
M�a�
Mh1a�
�i�
���Uh11�
������
M�
�i��)�����
P���
�����
�����
����5eqrefl)i�
����
��
PUU�PInfo��lATTR����no_conf�prt�decl�inj��)�����
P��)�����
P��
��
Q��i�
Tand�
��ri�
��
��
��U��)�����
P��)�����
P��
���no_confusion��
Q�r���
Qi�U��
���
��ri��
��riandintro�
����r�
��
�����
��������!U�PInfo��ldecl�inj_arrowl��)�����
P��)�����
P��
�P�
N���
������
������!iU��)�����
P��)�����
P��
��$�
N��;andelim_left�
�����
��8��inj�����r��i��E�8�andelim_right�G�J�S�X�8��[�PInfo�"�ldecl�inj_eq��)�����
P��)�����
PS���
��
��
��
��
��U�
�i��)�����
Pα_1)univ_1�inst_1�
Ppropext�
��tiffintro�
��th�
��L�r��i�Ua�tanddcases_on�
���2��
��
Q���r��
Q�i�a_left�
�a_right�
���
����8��6�J�
��
Q�������a_right_left�8a_right_right�!��)��)e_1�
�U������e_2�
�U��
P��
Pe_3�
�Ucongr�
P�
M�
Q�������U����
]������congr_arg)�
^�����
Q�ri�5��i���rU����PInfo�*�ldecl��mk_instance_cacheα)+�
M�?)/��x��
M��u����
M���s)��unify��levelsuccUN�
_x������get_univ_assignmentUu���
M�mk_name_map)�PInfo�>�r	VMR�>VMC�>9�r	�Ku�?)�~	3�M	levelsucc��tacticunify	,tacticget_univ_assignment	%mk_name_map*1doc�>Creates an `instance_cache` for the type `α`decl��instance_cachegetc�
Mn~+�W�
M)�R�
M�S~/_aA�
�find~)��instance_cacheinstU�TAoptioncases_on)�/�
y�z|U��V�N��mk_instancee)�����
M)�
Q�!i�Vunivi�G)�i�val)��+�-i��PInfo�Q�}	VMR�QVMC�Q:�}	�u�S~�R�
M
nativerb_mapfind	3
�	tacticmk_instance	-


�7doc�Q If `n` is the name of a type class with one parameter, `get c n` tries to find an instance of
`n c.α` by checking the cache `c`. If there is no entry in the cache, it tries to find the instance
via type class resolution, and updates the cache.decl�Pappend_typeclasses�)��
M��+���)��
M����)�L�a_1*/�L��K�,��Ua_1��Ya_a~a_a_1�5�S�T�Ui�a_a~a_a_1~a_a_2)�S�T�U�ia_a~a_a_1~a_a_2
a_a_3)�S�T�U��a_a)a_a_1)�aa_a~a_a_1
a_a_2)�qa_a~a_a_1
a_a_2)a_a_3)�v
�L��p�p�p��w)�LU�w*�S�T�U�r��w���a_a_2_a~a_a_2_a_1�5�S�T�U���ra_a_2_a~a_a_2_a_1~a_a_2_a_2)�S�T�U����a_a_2_a~a_a_2_a_1~a_a_2_a_2
a_a_2_a_3)�S�T�U����a_a_2_a)a_a_2_a_1)���)�LU��*�������a_a_2_a_a~a_a_2_a_a_1�5���)�L���*�Sx��K��instance_cacheget�5�_p�_a��t�
M)����L�x�
M�y)�S�T�UU�������S�T�U�5��a_a_2_a_1_a~a_a_2_a_1_a_1�5�S�T�U���5a_a_2_a_1_a~a_a_2_a_1_a_1~a_a_2_a_1_a_2)�S�T�U����a_a_2_a_1_a~a_a_2_a_1_a_1~a_a_2_a_1_a_2
a_a_2_a_1_a_3)�S�T�U����a_a_2_a_1_a)a_a_2_a_1_a_1)��a_a_2_a_1_a~a_a_2_a_1_a_1
a_a_2_a_1_a_2)����a_a_2_a_1_a~a_a_2_a_1_a_1)��a_a_2_a_1_a�Ma_a_2_a_1_a_1���a_a_2_a_a~a_a_2_a_a_1~a_a_2_a_a_2)��a_a_2_a_a~a_a_2_a_a_1~a_a_2_a_a_2
a_a_2_a_a_3)��a_a_2_a_a)a_a_2_a_a_1)��a_a_2_a_a~a_a_2_a_a_1
a_a_2_a_a_2)���
a_a_2_a_a~a_a_2_a_a_1)�
a_a_2_a_a�Ma_a_2_a_a_1���a_a_2_a~a_a_2_a_1
a_a_2_a_2)���
a_a_2_a~a_a_2_a_1)�
a_a_2_a�Ma_a_2_a_1����pa_a~a_a_1)�ya_a�Ma_a_1��a�PInfo�d��	VMR�dVMC�d�8��	�u����
M�)�:
	%,3�*�1
5;AG�#�(�(�(�:
IPW^el�����"�"�"�"�"�:
nu|����������	�:
~���������
�Q	��
�
�����������������"�"�"�"�(doc�d If `e` is a `pi` expression that binds an instance-implicit variable of type `n`,
`append_typeclasses e c l` searches `c` for an instance `p` of type `n` and returns `p :: l`.decl�Pmk_appc�
Mn~l��
���
M��~����x�����get_declUd��x�K��Pappend_typeclasses�ubinding_body��iU_p�K_a�K������K�
�x�
M�y���+�-U�mk_app��r��0U���!U�PInfo����	VMR��VMC��-��	�Ku�����~���
MFget_decl	'���Hbinding_body�d	 
	
�D�Hmk_app_main%doc��Creates the application `n c.α p l`, where `p` is a type class instance found in the cache `c`.decl���]؞�get_expl_pi_arity_aux_main�)+*�)��)�
`�*/�
`�*Z���
ha_a~a_a_1�5�
ha_a~a_a_1~a_a_2)�
ha_a~a_a_1~a_a_2
a_a_3)�
ha_a)a_a_1)�
ha_a~a_a_1
a_a_2)�
ta_a~a_a_1
a_a_2)a_a_3)�
e��*��m~	l)���i�y*��whnf�DN(new_b)x**
�
aRecFn��r*RS
�rtacticbinder_infohas_decidable_eq�r�
`�
f��
fa_a~a_a_1)�
|a_a�Ma_a_1��
h�PInfo����prvget_expl_pi_arity_aux_main��VMR��_lambda_1VMR��VMC��(���Ku�_fresh�O!)�_fresh�O)�_fresh�O
��tacticwhnf	"��	��	� VMC��I���u�)�:
 %?D�	(8��	��)	��=prv����decl���
a���PInfo����VMR��VMC������decl��get_expl_pi_aritytype)�
`��)�
e�
��
�N(���PInfo����	VMR��VMC����	�Ku��)��	��doc��Compute the arity of explicit arguments of the given (Pi-)typedecl��get_expl_arityfn)�
`��)�
e�
����get_expl_pi_arity�PInfo����	VMR��VMC����	�Ku��)�M		��doc��Compute the arity of explicit arguments of the given functiondecl��get_pi_binders_aux_main��binder�)+�W�
�)��
��)��)�
�a_1*/�
���
����
�)���a_1��
��
��
���a_a~a_a_1�5�
��
��
�i��a_a~a_a_1~a_a_2)�
��
��
����a_a~a_a_1~a_a_2
a_a_3)�
��
��
���a_a)a_a_1)�
��
��
��a_a~a_a_1
a_a_2)a_a_3)�
��
��
��!a_a~a_a_1
a_a_2)a_a_3)�
����
���m~	l)�
�	new_b)�D
�
�RecFn���
�bindermk�r����a_a~a_a_1)a_a_2)a_a_3)�
��
��
��ha_a�Ma_a_1��
��
��
��u�PInfo����	VMR��VMC�����	�u�)��
��:
)5?Kmy�����D�����F���	Nf��
�)
���)��k	����decl��get_pi_binders_aux�
����PInfo���	VMR�VMC���	��doc�Auxilliary defintion for `get_pi_binders`.decl��get_pi_binders�
��)�
�x�
��
���get_pi_binders_aux�
�_p�
�_a�
��t�
�)�!�
��
��x�
��y)�
��
��
��r�
�U�PInfo���	VMR�VMC���	�Ku�)��	��doc�Get the binders and target of a pi-type. Instantiates bound variables by
 local constants. Cf. `pi_binders` in `meta.expr` (which produces open terms).
 See also `mk_local_pis` in `init.core.tactic` which does almost the same.decl��get_pi_binders_dep_aux_main�*�)+�W��W*�
�)�*�)��)�Ga_1*/�G��F���D)�C��a_1��M�N�R��a_a~a_a_1�5�M�N�R��a_a~a_a_1~a_a_2)�M�N�R��a_a~a_a_1~a_a_2
a_a_3)�M�N�R�a_a)a_a_1)�M�N�R�a_a~a_a_1
a_a_2)a_a_3)�M�N�R�!a_a~a_a_1
a_a_2)a_a_3)�My�F�:i�Ul)x�F�F
�IRecFn�#���BU_p�F_a�F�t�D)�;�F�G�x�D�y)�M�N�PR��has_var����(�DU�C��*�
��5������rUa_a~a_a_1)a_a_2)a_a_3)�M�N�R�ha_a�Ma_a_1��M�N�R�u�PInfo�#��	VMR�#VMC�#���	�u�)�*�:
)5?K������D�����F����	Qx����#	Zq	exprhas_var�>	ajk
v	
}	����decl��get_pi_binders_dep_aux�I�#�PInfo�E��	VMR�EVMC�E��	�#doc�EAuxilliary definition for `get_pi_binders_dep`.decl��get_pi_binders_dep�H/�H��get_pi_binders_dep_auxZ�PInfo�F��	VMR�FVMC�F��	�#doc�FA variant of `get_pi_binders` that only returns the binders that do not occur in later
 arguments or in the target. Also returns the argument position of each returned binder.decl��local_proofh~p)tac₀��+�X��I~�J)�K��/����focus1��y���	��Uh')�����_p�_a��}�O�����
���+�Annot���)����}�������tl_hd)tl_tl��}�Q��������������_x������_x����gs������M�_x���������5Utl_tl_hd)tl_tl_tl����PInfo�H��	VMR�H_lambda_1VMR�H_rec_3VMR�H_rec_2VMR�H_rec_1VMR�H_lambda_2VMR�HVMC�X��	�.VMC�Y@��	�u����_fresh�e�)�_fresh�e�)�_fresh�e�)�_fresh�e����7�	1	*	�	#�	

!
(
/	
��X�;VMC�Z��	�u����_fresh�e�)�_fresh�e�)�_fresh�e����
��X�;�YVMC�[��	�u����_fresh�e�)�_fresh�e����
��X�;�ZVMC�\��	�Ku�_fresh�f����_fresh�f�)�_fresh�f�~��	�	�[VMC�H��	�K���J)�I~�\Ffocus1doc�Hvariation on `assert` where a (possibly incomplete)
   proof of the assertion is provided as a parameter.

   ``(h,gs) ← local_proof `h p tac`` creates a local `h : p` and
   use `tac` to (partially) construct a proof for it. `gs` is the
   list of remaining goals in the proof of `h`.

   The benefits over assert are:
   - unlike with ``h ← assert `h p, tac`` , `h` cannot be used by `tac`;
   - when `tac` does not complete the proof of `h`, returning the list
     of goals allows one to write a tactic using `h` and with the confidence
     that a proof will not boil over to goals left over from the proof of `h`,
     unlike what would be the case when using `tactic.swap`.decl��var_names_main�)���)��)���*/������a_a~a_a_1�5�a_a~a_a_1~a_a_2)�a_a~a_a_1~a_a_2
a_a_3)�a_a)a_a_1)�a_a~a_a_1
a_a_2)�(a_a~a_a_1
a_a_2)a_a_3)�~i
�RecFn��a_a~a_a_1)�0a_a�Ma_a_1���PInfo����	VMR��VMC��#��	�)�:
 ��decl��var_names����PInfo����	VMR��VMC����	��doc��`var_names e` returns a list of the unique names of the initial pi bindings in `e`.decl��subobject_namesstruct_n~+�W������~/�I�%�H�'env�$x���H�Y���constructors_ofU_p��_a���|~�����I�K��H�f�!
Strtoo many constructors��~�����V�����I�K�O��)����var_namesz��U�vs���O��@��+�����m�o��m�o��opt_to_tac���structure_fields��rfields����Hlistpartition~fn~has_memmem~����has_mem~���f~���f~��f~string_to_name�inameto_string�a~��decidable_mem~�~�~namehas_decidable_eqU���tl_hd~tl_tl���_�PInfo����	VMR��_lambda_1VMR��_rec_2VMR��_rec_1VMR��VMC����	��~�_fresh�s����nameto_string_����`�namehas_decidable_eq��decidable_mem_mainVMC�����	�u�����_fresh�s+~�_fresh�s#�$�_fresh�s"~�;�O	�M	��	5environmentstructure_fields��returnopt	$.����partition_main3	t�_c_1o�_c_2 �	_c_3n�
_c_4c�_c_5s�_c_6r�
_c_7
u�

	y�
a�m�	��������������������������	VMC�����	�u�����_fresh�s�$�_fresh�s~�xt�_c_8o�_c_9 �_c_10n�_c_11c�_c_12s�	_c_13r�
_c_14	
u�
	y�a�m�����������������������������VMC����	�Ku��~�<	environmentconstructors_of��doc�� When `struct_n` is the name of a structure type,
`subobject_names struct_n` returns two lists of names `(instances, fields)`.
The names in `instances` are the projections from `struct_n` to the structures that it extends
(assuming it was defined with `old_structure_cmd false`).
The names in `fields` are the standard fields of `struct_n`.decl�����
�expanded_field_list'_main�~+dlist��~�~/��x�H����subobject_names_p�H_a�H�t�������H���x���y����x���������n~�?���9z��nameupdate_prefix����mk_local_pis_p��_a���I�������x��y)��
��RecFn���const_name(��get_app_fn(Uts���������dlisthas_append��dlistjoin��dlistof_list��������~�U�PInfo����prvexpanded_field_list'_main��VMR��_lambda_1VMR��_lambda_2VMR��_lambda_3VMR��VMC�����.VMC��-���Ku��~�_fresh�y�~nameupdate_prefix_main�O	�M	Fmk_local_pis_main	'�Hget_app_fn_main�Hconst_name��VMC�����y~�~VMC��0���Ku�~��	*�������	#������of_listdlistjoin_main��append_main(prv����decl�������PInfo����VMR��VMC������decl��expanded_field_liststruct_n~+����~/������dlistto_list�����PInfo���	VMR�VMC���	�|u�~��	��to_list_maindoc� `expanded_field_list struct_n` produces a list of the names of the fields of the structure
named `struct_n`. These are returned as pairs of names `(prefix, name)`, where the full name
of the projection is `prefix.name`.decl��get_classese)�o�)/�o�N��attributeget_instances7
Strclass<�	�~n~�)z|��N�(�PInfo��	VMR�_lambda_1VMR�_lambda_2VMR�_lambda_3VMR�VMC��	�.VMC��	�Ku�_fresh�}�~�_fresh�}�)�	
�cVMC��1�~�$)����VMC�1�	�Ku�)�s�s�a�l�c��������attributeget_instances	+�����doc�Return a list of all type classes which can be instantiated
for the given expression.decl��mk_mvar_list_main�*�r�*�,�*�r�u�Y���*�u�n+�o+�W���d�p��
_x)_y��Annotinfix_fn��mk_mvar
�7RecFn�(�PInfo�(�	VMR�(_lambda_1VMR�(VMC�-�	�*��_fresh��t)VMC�(.�	�u�*Fmk_mvar		�-	'�(	 %,decl��mk_mvar_list�7�(�PInfo�2�	VMR�2VMC�2�	�(doc�2Create a list of `n` fresh metavariables.decl��get_goal,��)��gs�_a��}�5�,���
Strthere are no goals��)����}���,�]tl_hd)tl_tl����
Strthere are too many goals�PInfo�3�	VMR�3_rec_2VMR�3_rec_1VMR�3VMC�8��	�u����_fresh���)�t�_c_1e�_c_2r�_c_3 �_c_4a�	_c_5o�
_c_6s�l�	
g�y�n�	m�

	h������������������������������VMC�9n�	�u����he�_c_7r�_c_8 �_c_9a�_c_10o�_c_11s�l�g�n�h�t�������������������������8VMC�3�	�Ku�	�9doc�3Returns the only goal, or fails if there isn't just one goal.decl��iterate_at_most_on_all_goals_main�	k�*����	p����trace�fhas_to_format_to_has_to_tactic_format�f�!
Strmaximal iterations reacheda_1*��tacticall_goalshas_orelseorelse+alternativeto_has_orelse+�
����U_x��
�	kRecFn�IU��	q�PInfo�I�	VMR�I_lambda_1VMR�IVMC�T�	�Ku�_fresh��*�_fresh����	
�IVMC�I��	�u����*�m�_c_1a�_c_2i�_c_3 �_c_4t�_c_5e�_c_6r�	_c_7d�h�c�	s�n�o�	l�x�������������������������������KFtrace���Tinteraction_monad_orelseFall_goalsdecl��iterate_at_most_on_all_goals�	k�I�PInfo�e�	VMR�eVMC�e�	�Idoc�e`iterate_at_most_on_all_goals n t`: repeat the given tactic at most `n` times on all goals,
or until it fails. Always succeeds.decl��iterate_at_most_on_subgoals�	k�*����|a_1*��������_x����iterate_at_most_on_all_goalsU�	�PInfo�f�	VMR�f_lambda_1VMR�fVMC�j�	�Ku�_fresh���*�_fresh�����	
�IVMC�f��	�u����*�m�_c_1a�_c_2i�_c_3 �_c_4t�_c_5e�_c_6r�	_c_7d�h�c�	s�n�o�	l�x�������������������������������K�b�j��doc�f`iterate_at_most_on_subgoals n t`: repeat the tactic `t` at most `n` times on the first
goal and on all subgoals thus produced, or until it fails. Fails iff `t` fails on
current goal.decl��apply_list_expr_main�������}����������f�!
Strno matching rulea_hd)a_tl�������interactiveconcat_tags��applyU��
��RecFn�y
�PInfo�y�#	VMR�yVMC�yp�#	�u���]n�_c_1 �_c_2e�l�u�r�g�i�h�c�t�a�m�o�����������������������yFapply�qconcat_tags�cdecl��apply_list_expr���y�PInfo���#	VMR��VMC���#	�ydoc��`apply_list l`: try to apply the tactics in the list `l` on the first goal, and
fail if none succeedsdecl��build_list_expr_for_apply_main���r����|����r�u���a_hda_tl���u��
��RecFn��tail�y���i_to_expr_for_apply�a)����N��#��l������)��m���listappend)i���U	�PInfo���+	VMR��_lambda_1VMR��_lambda_2VMR��_lambda_3VMR��VMC���+	�.VMC��&�+	�Ku�_fresh��A)�_fresh��?��
�&	 �O�����	�VMC���+	�8u��)���VMC��)�+	�u������	
"�pi_to_expr_for_apply	�����c 'decl��build_list_expr_for_apply����
�PInfo���+	VMR��VMC���+	��doc�� constructs a list of expressions given a list of p-expressions, as follows:
- if the p-expression is the name of a theorem, use `i_to_expr_for_apply` on it
- if the p-expression is a user attribute, add all the theorems with this attribute
  to the list.decl��apply_ruleshs��n*��������*������build_list_expr_for_applyUl���iterate_at_most_on_subgoalsU����assumption��apply_list_expr�PInfo���7	VMR��VMC���7	�Ku��*������	�yFassumption�c�fdoc��`apply_rules hs n`: apply the list of rules `hs` (given as pexpr) and `assumption` on the
first goal and the resulting subgoals, iteratively, at most `n` timesdecl��replaceh~p����~��������get_localUh')����to_exprU((p)����noteiH_x)�	���PInfo���>	VMR��VMC��*�>	�Ku����~tacticget_local	$tacticto_expr	
Fnote	��	"doc�� `replace h p` elaborates the pexpr `p`, clears the existing hypothesis named `h` from the local
context, and adds a new hypothesis named `h`. The type of this hypothesis is the type of `p`.
Fails if there is nothing named `h` in the local context.decl��mk_iff_mp_app_mainiffmp~�)��*)A��~�)����)AUa_1*/AHa_1��a_a~a_a_1�5�a_a~a_a_1~a_a_2)�a_a~a_a_1~a_a_2
a_a_3)�a_a)a_a_1)���)AU��*�����a_a_a~a_a_a_1�5�a_a_a~a_a_a_1~a_a_a_2)�a_a_a~a_a_a_1~a_a_a_2
a_a_a_3)�a_a_a)a_a_a_1)���)AU��*�����a_a_a_a~a_a_a_a_1�5RS~U7
Striff<���LA�D����������rZ�a_a_a_a~a_a_a_a_1~a_a_a_a_2)�a_a_a_a~a_a_a_a_1~a_a_a_a_2
a_a_a_a_3)�a_a_a_a)a_a_a_a_1)�a_a_a_a~a_a_a_a_1
a_a_a_a_2)�f�pa_a_a_a~a_a_a_a_1)�na_a_a_a�Ma_a_a_a_1��a_a_a~a_a_a_1
a_a_a_2)�<�~a_a_a~a_a_a_1)�|a_a_a�Ma_a_a_1��a_a~a_a_1
a_a_2)�)a_a~a_a_1
a_a_2)a_a_3)���@��@�U@optionmonad))� 
�RecFn���rn*�����a_a~a_a_1)��a_a�Ma_a_1���PInfo���H	VMR��_lambda_1VMR��_lambda_2VMR��VMC���H	�)�_fresh���)�_fresh���
�_fresh���~��VMC���I?��*�_fresh��Y�����FVMC����H	���)��~�:
vy���:
"ilorttttt�:
$'*SVY\_begg�f�f�i��������	?AQ�D�F�F�Fgggggggtttt��������mapdecl��mk_iff_mp_app���~���PInfo�	�H	VMR�	VMC�	�H	��~��doc�	 Auxiliary function for `iff_mp` and `iff_mpr`. Takes a name, which should be either `` `iff.mp``
or `` `iff.mpr``. If the passed expression is an iterated function type eventually producing an
`iff`, returns an expression with the `iff` converted to either the forwards or backwards
implication, as requested.decl��iff_mp_coree)ty)A�	)�	)���mk_iff_mp_app7
Strmp�L_x*��PInfo�	�O	VMR�	_lambda_1VMR�	VMC�	�P�	*�_fresh��U)VMC�	%�O	�	)�	)f�_c_1�	�i������p�m�������doc�	 `iff_mp_core e ty` assumes that `ty` is the type of `e`.
If `ty` has the shape `Π ..., A ↔ B`, returns an expression whose type is `Π ..., A → B`decl��iff_mpr_core��e)ty)���7
Strmpr�L���PInfo�	
�T	VMR�	
_lambda_1VMR�	
VMC�	�U_x*�_fresh���)VMC�	
*�T	�	)�	)f�_c_1�	�i������r�p�m��������doc�	
 `iff_mpr_core e ty` assumes that `ty` is the type of `e`.
If `ty` has the shape `Π ..., A ↔ B`, returns an expression whose type is `Π ..., B → A`decl��iff_mp��e)��t)��)��A,��A,�A,�u)��iff_mp_coreU��
StrTarget theorem must have the form `Π x y z, a ↔ b`�PInfo�	�Y	VMR�	VMC�	�
�Y	�Ku�	)�M	�a�_c_1r�_c_2e�_c_3t�_c_4 �_c_5h�	_c_6o�
_c_7m�_c_8`�_c_9b��!��,�z�y�x����
f�	v�	s�u�
	g�T���������������������������������������������������������	���cdoc�	 Given an expression whose type is (a possibly iterated function producing) an `iff`,
create the expression which is the forward implication.decl��iff_mpr��e)��t)������iff_mpr_coreU���PInfo�	#�_	VMR�	#VMC�	#�
�_	�Ku�	$)�M	�a�_c_1r�_c_2e�_c_3t�_c_4 �_c_5h�	_c_6o�
_c_7m�_c_8`�_c_9b��!��,�z�y�x����
f�	v�	s�u�
	g�T���������������������������������������������������������	
���cdoc�	# Given an expression whose type is (a possibly iterated function producing) an `iff`,
create the expression which is the reverse implication.decl��apply_iffe)+���	1)/��	ap��e)������new_goalsnon_dep_only((((����U��y����iff_mpU����iff_mprU
�PInfo�	0�g	VMR�	0_lambda_1VMR�	0_lambda_2VMR�	0_lambda_3VMR�	0VMC�	8�h�	3)��VMC�	9�g	�Ku�_fresh������_fresh���)�		VMC�	:�g	�Ku�	=���	@)�	#	VMC�	0�g	�	1)�	8�	2���	:�	9�c�cdoc�	0Attempts to apply `e`, and if that fails, if `e` is an `iff`,
try applying both directions separately.decl��symm_applye)cfg�
��apply_cfg�����	B)�	C�
�������	v��+w��symmetryN�

�PInfo�	A�l	VMR�	A_lambda_1VMR�	AVMC�	F�l	�Ku�_fresh����
�_fresh���)tacticsymmetry	��VMC�	A
�l	�	C�
�	B)�	F���cdoc�	A`symm_apply e cfg` tries `apply e cfg`, and if this fails, calls `symmetry` and tries again.decl��apply_assumptionasms�
�r��tac�
���	q���	P��	Q�������Uctx�listany_of)��H)�����+w��symm_apply���������exfalso_x������	R��$�	U)�,i��
Strassumption tactic failed�PInfo�	O�u	VMR�	O_lambda_1VMR�	O_lambda_2VMR�	O_lambda_3VMR�	OVMC�	Y�y�Ku�	U)�_fresh�����	A	
VMC�	Z�u	�Ku�	^��_fresh����	
�	Ylistany_of_mainVMC�	[�u	�Ku�	^��	a�tacticexfalso		�	Y�	dVMC�	O��u	�	Q��	P�a�_c_1s�_c_2t�_c_3i�_c_4 �_c_5c�_c_6d�e�l�f�n�o�p�m�u�������������������������������	[�c�	Z�cdoc�	O `apply_assumption` searches for terms in the local context that can be applied to make progress
on the goal. If the goal is symmetric, it tries each goal in both directions. If this fails, it will
call `exfalso` and repeat. Optional arguments:

 * `asms` controls which expressions are applied. Defaults to `local_context`
 * `tac` is called after a successful application. Defaults to `skip`decl��change_coree)�A���	n)�A��A����tacticchangeU(�)���
����num_reverted*��_p)_a)��	s)���*��
���+�Annot����X�~a_1�5�X�~a_1~a_2)�X�~a_1~a_2
a_3)�X�)a_1)�X�~a_1
a_2)�d�~a_1
a_2)a_3)�����J�2��(_x����intron���~a_1)�l��Ma_1��X�PInfo�	m��	VMR�	m_lambda_1VMR�	m_rec_1VMR�	mVMC�	���	�.VMC�	�i��	�u�/)�_fresh���*�_fresh��z)�:
&/8AW`��	��;��	��;��	��;��	��;��	��;��	��;��	��;��tacticchange	KP	tacticintronU	
��	��;��	��;VMC�	m$��	�u�A�	n)	�	���	�	�	�"doc�	m `change_core e none` is equivalent to `change e`. It tries to change the goal to `e` and fails
if this is not a definitional equality.

`change_core e (some h)` assumes `h` is a local constant, and tries to change the type of `h` to `e`
by reverting `h`, changing the goal, and reintroducing hypotheses.decl��change_with_atoldenewehyp~���	��	��	�~������h)���tp)����((olde)��newe)	repl_tp)��replace�a)n*R��iexprhas_decidable_eqUiAD�H��change_coreD��PInfo�	���	VMR�	�_lambda_1VMR�	�VMC�	�	���	�*�	�)�_fresh��r)�_fresh��p)exprhas_decidable_eq	VMC�	�>��	�Ku�	�~�	��	���	8�M	1��	*	��	#
�	�exprreplace
�	�)
�	m(
/	
6doc�	�`change_with_at olde newe hyp` replaces occurences of `olde` with `newe` at hypothesis `hyp`,
assuming `olde` and `newe` are defeq when elaborated.decl��metavariables�r�u�d�exprlist_meta_vars��result
�PInfo�	���	VMR�	�VMC�	���	�|utacticresult		�Nlist_meta_varsdoc�	� Returns a list of all metavariables in the current partial proof. This can differ from
the list of goals, since the goals can be manually edited.decl��no_mvars_in_target�����	����dQexprhas_meta_var���QQ��guardb+�
bnot�PInfo�	���	VMR�	�VMC�	�&��	�Ku�		exprhas_meta_var	 		��doc�	�Fail if the target contains a metavariable.decl��propositional_goal��������_p�_a��}�	�����X��)���������is_proofU���PInfo�	���	VMR�	�_lambda_1VMR�	�_rec_1VMR�	�VMC�	���	�.VMC�	�"��	�u����
��	��;Fis_proof		�� VMC�	���	�Ku�	�	�doc�	�Succeeds only if the current goal is a proposition.decl��subsingleton_goal������_p�_a�����)����������ty)�)��+wz�exprsubst�

Quote_x_1_��subsingletonto_pexpr)exprhas_to_pexpr((�(�	q�PInfo�	���	VMR�	�_lambda_1VMR�	�_rec_1VMR�	�VMC�	���	�.VMC�	�B��	�u����
��	��;�M	��	;�	�to_pexpr��exprsubst��	%*�c/	04��9@VMC�	���	�Ku�	�	�doc�	�Succeeds only if we can construct an instance showing the
   current goal is a subsingleton type.decl��terminal_goal��������propositional_goal����subsingleton_goal��_p�_a�����)���������L�listerase)�)�)�����metavariablesmvars��	�g)�����t)����kdepends_on��reducibledQmonadwhenb+vx������pp)exprhas_to_tactic_formatUs�����g�g
StrThe current goal is not terminal: formatto_stringoptionsmk
Str depends on it.�PInfo�	���	VMR�	�_lambda_1VMR�	�_lambda_2VMR�	�_lambda_3VMR�	�_rec_1VMR�	�_lambda_4VMR�	�VMC�	���	�.VMC�	��	��	�Ku�_fresh��Z)�	�tacticpp	�e�_c_1 �_c_2r�_c_3n�_c_4t�_c_5o�	_c_6a�
_c_7l�_c_8i�_c_9s�
_c_10d�_c_11.�	
p�����������������optionsmkformatto_string:�
m�	

	g�u�c�h�T�������������������������������������`�`����
VMC�	�-���Ku�	�)�_fresh��H)�M		��	'tactickdepends_on	 �	���	�monadwhenb%VMC�	�0��	�u����
��	��;�	�	
�	���erase_main	)�	���	���.VMC�	���	�Ku�	�	�VMC�	�
��	�	��	��c�	��cdoc�	�Succeeds only if the current goal is "terminal",
in the sense that no other goals depend on it
(except possibly through shared metavariables; see `independent_goal`).decl��independent_goal�����	y��no_mvars_in_target��terminal_goal�PInfo�

��	VMR�

VMC�

��	�Ku�	�	�	�doc�

Succeeds only if the current goal is "independent", in the sense
that no other goals depend on it, even through shared meta-variables.decl��triv'��������7
Strtrivial<c)�	���PInfo�
��	VMR�
VMC�
5��	�Ku�l�a�i�v�i�r�t�����������O	)/��doc�
 `triv'` tries to close the first goal with the proof `trivial : true`. Unlike `triv`,
it only unfolds reducible definitions, so it sometimes fails faster.decl���b��;iterate_aux_mainα�_t���U+���
�_�
���^/�`���_x��_Ur�
�cRecFn�
i�iU��_�PInfo�
��prviterate_aux_main�
VMR�
_lambda_1VMR�
_lambda_2VMR�
VMC�
���Ku�_fresh�Ǟ�_fresh�ǝ	�
VMC�
���8u�
VMC�
	����
�
�_�
�
�cprv�
�
decl�
�c�
�_�
��
U�PInfo�
��VMR�
VMC�
���
�
�_�
decl��iterate'�
�_t�+�^�
�_�
#�/����^�^�rU�
UU�PInfo�
"��	VMR�
"VMC�
"��	�|u�
#�
�_�
	��doc�
"Apply a tactic as many times as possible, collecting the results in a list.decl��iterate1�
�_t�+�WU�^�
�_�
%�/��xU����decorate_exU������������string_to_format
Striterate1 failed: tactic did not succeedrUx�_�W��_��iterate'�UL�_��Wi�i��i��U	�PInfo�
$��	VMR�
$VMC�
$���	�Ku�
%�
�_d�e�e�c�c�u�s� �t�o�n� �d�i�d� �c�i�t�c�a�t� �:�d�e�l�i�a�f� �1�e�t�a�r�e�t�i�����������������������������������������formatof_string��decorate_ex	���
"	���doc�
$ Apply a tactic as many times as possible, collecting the results in a list.
Fail if the tactic does not succeed at least once.decl��intros1�r�ux�����iterate1)��intro1p�����prodfst)��]�
�PInfo�
.��	VMR�
.VMC�
.��	�KuFintro1�
$	

doc�
. Introduces one or more variables and returns the new local constants.
Fails if `intro` cannot be applied.decl��successes�
�_tactics����
�_�
6�������@U�^listfilter_map��U��monadsequence+v����+U+��t����try_core��PInfo�
5��	VMR�
5_lambda_1VMR�
5_lambda_2VMR�
5VMC�
=��	�.VMC�
>���-VMC�
5��	�|u�
6�
�_��try_core����
=�
	sequence_main	�
>��filter_map_maindoc�
5`successes` invokes each tactic in turn, returning the list of successful results.prvtarget'���8�Otarget'decl�
F,�zz���e)�
��PInfo�
F��VMR�
FVMC�
F���Ku�	��
	��doc�
FReturn target after instantiating metavars and whnfdecl��fsplit�����N��y���
F��get_constructors_for_p��_a���V�
K��������
Strfsplit tactic failed, target is not an inductive datatype with only one constructor��~�����V�����������he)�(������new_goalsall(�
((�	qtl_hd~tl_tl���
�PInfo�
H��	VMR�
H_rec_2VMR�
H_rec_1VMR�
HVMC�
Q����	�u�����_fresh�ӽ~�#�O	��	��f�_c_1s�_c_2p�_c_3l�_c_4i�	_c_5t�
_c_6 �_c_7a�_c_8c�
_c_9e�_c_10d�_c_11r�_c_12n�_c_13o�_c_14u�_c_15y�_c_16



h�
	w�

v�	

	
	
g�
,�	
	



	����������������������������������������������������������������������������������������VMC�
R����	�u�������f�_c_17s�_c_18p�_c_19l�_c_20i�_c_21t�_c_22 �_c_23a�	_c_24c�
_c_25e�_c_26d�_c_27r�
_c_28n�_c_29o�_c_30u�_c_31y�_c_32



h�w�		v�
	g�
	,�	

	�����������������������������������������������������������������������������������������
QVMC�
H��	�Ku�
F	tacticget_constructors_for
	�
Rdoc�
HJust like `split`, `fsplit` applies the constructor when the type of the target is an inductive data type with one constructor.
However it does not reorder goals or invoke `auto_param` tactics.decltacticinteractivefsplit����fsplit
�PInfo�
z��VMR�
zVMC�
z���
Hdecl��injections_and_clear��������l�x�������successes������e)����+w��injection�	�results�#when+v��	�����:(��
Strcould not use `injection` then `clear` on any hypothesis
�PInfo�
|��	VMR�
|_lambda_1VMR�
|_lambda_2VMR�
|VMC�
���!�Ku�
)tacticinjection		��VMC�
���	�.VMC�
|�:��	�Ku�M	�4�
����
5	�-c�_c_1o�_c_2u�_c_3l�_c_4 �	_c_5n�
_c_6t�_c_7s�_c_8e�
_c_9`�_c_10i�_c_11h�_c_12a�_c_13y�_c_14
p�	
	
	r�
	

	

j�
	
	
	d�����������������������������������������������������������������>��
�when�2doc�
|Calls `injection` on each hypothesis, and then, for each hypothesis on which `injection`
   succeeds, clears the old hypothesis.decltacticinteractiveinjections_and_clear����injections_and_clear
�PInfo�
���VMR�
�VMC�
����
|decl��case_bash�����"l��%�'�(h)�����+w��cases�NN�	q�sr�#�?����	�PInfo�
���	VMR�
�_lambda_1VMR�
�_lambda_2VMR�
�VMC�
���!�Ku�
�)Fcases	��VMC�
���	�.VMC�
�+��	�Ku�M	%���
����
5	�����>��
��
�#doc�
�calls `cases` on every local hypothesis, succeeding if
   it succeeds on at least one hypothesis.decl��note_anon��e)���)��get_unused_name���
~7
Str_x<���g���g��
StrlhG*n~�HU�PInfo�
���	VMR�
�VMC�
���	�Ku�
�)�h�l�����tacticget_unused_name	��doc�
�given a proof `pr : t`, adds `h : t` to the current context, where the name `h` is fresh.decl��find_localt,�
��z�((t')����)�
2)����	�PInfo�
��	VMR�
�VMC�
��	�Ku�
���	����	
doc�
�`find_local t` returns a local constant with type t, or fails if none exists.decl��dependent_pose_corel������
�����	lc�����)��)	lm������_x��_a���m�
������x)�y)/����)exprlocal_uniq_nameUU��t)����mk_meta_var��pis�new_goal)��_p�_a�����)�����������M_x�����	��instantiate_locals���
E���N_x��������PInfo�
��
	VMR�
�_lambda_1VMR�
�_lambda_2VMR�
�_lambda_3VMR�
�_rec_1VMR�
�_lambda_4VMR�
�VMC�
��
	�.VMC�
���
����Hlocal_uniq_nameVMC�
��
	����
VMC�
�6�
	�u����_fresh
�ML)�_fresh
�MB���
��
��;�	/�
������
����Hinstantiate_locals��	#(	-	
4VMC�
�'�
	�Ku�_fresh
�M���_fresh
�M����	!�Hpis_maintacticmk_meta_var		�	�
�	VMC�
��
	�
����
����
���
�doc�
� `dependent_pose_core l`: introduce dependent hypothesis, where the proofs depend on the values
of the previous local constants. `l` is a list of local constants and their values.decl��mk_local_pis_whnf�)���)���9�
�_p)_a)��
�)���*������i�����~a_1�5��������~a_1~a_2)��������~a_1~a_2
a_3)�������r�)a_1)���~a_1
a_2)���~a_1
a_2)a_3)���9��p)�@�����X�~a_1)����Ma_1����PInfo�
��	VMR�
�_rec_1VMR�
�VMC�
�f�	�u�/)�_fresh
�S�)�:
	%,3X_��	9Q���	?J	
O	
V	VMC�
��	�Ku�)��	�
�doc�
�like `mk_local_pis` but translating into weak head normal form before checking if it is a Π.decl��choose1h)data~spec~,�
�)�
�~�
�~�z��t)�?)��mk_local_pis_whnf_p��_a���I�
���,�x��y)�z�
���transparencyall(_p)_a)��*���
Strexpected a term of the shape ∀xs, ∃a, p xs a����~a_1�5��~a_1~a_2)��~a_1~a_2
a_3)��)a_1)��),U��!a_a~a_a_1�5�a_a~a_a_1~a_a_2)�a_a~a_a_1~a_a_2
a_a_3)�a_a)a_a_1)��),U�*����a_a_a~a_a_a_1�5R�I����,��α_t)�_p)_a)����z��mk_local_def�����rvalue)z��head_beta����
E��t')z�L�9����spec)����dependent_pose_core������ ����7
Strsome7
Strclassical<�i������
E�b�`���c����7
Strsome_spec�h�l�����u��_x�����	u�	�_x��z��_x)���7�;�@�C�G�G�K�O�a_a_a~a_a_a_1~a_a_a_2)�a_a_a~a_a_a_1~a_a_a_2
a_a_a_3)�a_a_a)a_a_a_1)�a_a_a~a_a_a_1
a_a_a_2)����a_a_a~a_a_a_1)��a_a_a�Ma_a_a_1��a_a~a_a_1
a_a_2)�;��a_a~a_a_1)��a_a�Ma_a_1���~a_1
a_2)�*���~a_1)����Ma_1���PInfo�
��	VMR�
�_lambda_1VMR�
�_rec_4VMR�
�_rec_3VMR�
�_rec_2VMR�
�_rec_1VMR�
�VMC�0�	�.VMC�1�y�	�u�/)�_fresh
�c\)�_fresh
�c[)�_fresh
�cZ��_fresh
�cY~�_fresh
�cX~�_fresh
�cW)�:
�1�:�C�L�U�^�g�p��0�;�
�Fmk_local_def	�*
	���Ftactichead_beta	�#�
��G	$�	���l�a�c�i�s�s�a�l�c������������e�m�o�s��������D�F�F�F�J
���l�a�c�i�s�s�a�l�c������������c�e�p�s�_�e�m�o�s�������������D�F�F�F�J�
�	������	���
4	���
4����!
�(
�/	
��0�;��0�;��0�;��0�;��0�;��0�;��0�;��0�;VMC�2���	�u�/)�_fresh
�cO)�_fresh
�c()�_fresh
�c'��_fresh
�c&~�_fresh
�c%~�_fresh
�c$)�:
����������q�M�)�e�	_c_1x�
_c_2p�_c_3t�_c_4 �
_c_5a�_c_6h�_c_7s�_c_8,�_c_9



�"�

�"�
	
	
f�o�
m�r�	

d�	c�	
	�������������������������������������������������
e�	_c_10x�
_c_11p�_c_12t�_c_13 �
_c_14a�_c_15h�_c_16s�_c_17,�_c_18



�"�

�"�
	
	
f�o�
m�r�	

d�	c�	
	�������������������������������������������������
�s�t�s�i�x�E�����������	����e�
_c_19x�_c_20p�_c_21t�
_c_22 �_c_23a�_c_24h�_c_25s�_c_26,�_c_27�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������	���M	����
��	����
�1��
��
e�_c_28x�_c_29p�
_c_30t�_c_31 �_c_32a�_c_33h�_c_34s�_c_35,�_c_36
�"��"�
f�o�m�r�d�c�
�������������������������������������������������e�_c_37x�
_c_38p�_c_39t�_c_40 �_c_41a�_c_42h�_c_43s�_c_44,�_c_45
�"�
�"�f�o�m�r�d�c�
�������������������������������������������������
e�
_c_46x�_c_47p�_c_48t�
_c_49 �_c_50a�_c_51h�_c_52s�_c_53,�_c_54�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������e�_c_55x�
_c_56p�_c_57t�_c_58 �_c_59a�_c_60h�_c_61s�_c_62,�_c_63
�"�
�"�f�o�m�r�d�c�
�������������������������������������������������
e���x�
��p���t��� ���a���h���s���,���
�"�
�"�f�o�m�r�d�c�
�������������������������������������������������
e�_c_64x�
_c_65p�_c_66t�_c_67 �_c_68a�_c_69h�_c_70s�_c_71,�_c_72
�"�
�"�f�o�m�r�d�c�
�������������������������������������������������
e�
_c_73x�_c_74p�_c_75t�
_c_76 �_c_77a�_c_78h�_c_79s�_c_80,�_c_81�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������VMC�3���	�u�/)�_fresh
�c)�_fresh
�b���_fresh
�b�~�_fresh
�b�~�_fresh
�b�)�:
������r�N�Y�5���e�_c_82x�	_c_83p�
_c_84t�_c_85 �_c_86a�
_c_87h�_c_88s�_c_89,�_c_90
	

�"�	�"�

f�o�m�r�
d�c�
	�������������������������������������������������
e�_c_91x�	_c_92p�
_c_93t�_c_94 �_c_95a�
_c_96h�_c_97s�_c_98,�_c_99
	

�"�	�"�

f�o�m�r�
d�c�
	�������������������������������������������������
e�	_c_100x�
_c_101p�_c_102t�_c_103 �
_c_104a�_c_105h�_c_106s�_c_107,�_c_108



�"�

�"�
	
	
f�o�
m�r�	

d�	c�	
	�������������������������������������������������e�
_c_109x�_c_110p�_c_111t�
_c_112 �_c_113a�_c_114h�_c_115s�_c_116,�_c_117�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������e�_c_118x�_c_119p�
_c_120t�_c_121 �_c_122a�_c_123h�_c_124s�_c_125,�_c_126
�"��"�
f�o�m�r�d�c�
�������������������������������������������������
�2e�_c_127x�_c_128p�
_c_129t�_c_130 �_c_131a�_c_132h�_c_133s�_c_134,�_c_135
�"��"�
f�o�m�r�d�c�
�������������������������������������������������
e���x���p�
��t��� ���a���h���s���,���
�"��"�
f�o�m�r�d�c�
�������������������������������������������������
e�_c_136x�_c_137p�
_c_138t�_c_139 �_c_140a�_c_141h�_c_142s�_c_143,�_c_144
�"��"�
f�o�m�r�d�c�
�������������������������������������������������
e�	_c_145x�
_c_146p�_c_147t�_c_148 �
_c_149a�_c_150h�_c_151s�_c_152,�_c_153



�"�

�"�
	
	
f�o�
m�r�	

d�	c�	
	�������������������������������������������������VMC�4���	�u�/)�_fresh
�b���_fresh
�b�~�_fresh
�b�~�_fresh
�b�)�:
������r�N�X�4���e�_c_154x�_c_155p�	_c_156t�
_c_157 �_c_158a�_c_159h�
_c_160s�_c_161,�_c_162	�"��"�	


f�o�m�r�
d�
c�	�������������������������������������������������
e�_c_163x�_c_164p�	_c_165t�
_c_166 �_c_167a�_c_168h�
_c_169s�_c_170,�_c_171	�"��"�	


f�o�m�r�
d�
c�	�������������������������������������������������
e�_c_172x�	_c_173p�
_c_174t�_c_175 �_c_176a�
_c_177h�_c_178s�_c_179,�_c_180
	

�"�	�"�

f�o�m�r�
d�c�
	�������������������������������������������������e�	_c_181x�
_c_182p�_c_183t�_c_184 �
_c_185a�_c_186h�_c_187s�_c_188,�_c_189



�"�

�"�
	
	
f�o�
m�r�	

d�	c�	
	�������������������������������������������������e�
_c_190x�_c_191p�_c_192t�
_c_193 �_c_194a�_c_195h�_c_196s�_c_197,�_c_198�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������
�3e�
_c_199x�_c_200p�_c_201t�
_c_202 �_c_203a�_c_204h�_c_205s�_c_206,�_c_207�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������
e�
�=x��>p��?t�
�@ ��Aa��Bh��Cs��D,��E�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������
e�
_c_208x�_c_209p�_c_210t�
_c_211 �_c_212a�_c_213h�_c_214s�_c_215,�_c_216�"��"�


f�o�m�r�

d�

c�

�������������������������������������������������
e�_c_217x�	_c_218p�
_c_219t�_c_220 �_c_221a�
_c_222h�_c_223s�_c_224,�_c_225
	

�"�	�"�

f�o�m�r�
d�c�
	�������������������������������������������������VMC�
�-�	�Ku�
�~�
�~�
�)�M	'�
�	 	��	
�4
%doc�
�Changes `(h : ∀xs, ∃a:α, p a) ⊢ g` to `(d : ∀xs, a) (s : ∀xs, p (d xs) ⊢ g`decl��choose_main�)������)����V���������
Strexpect list of variablesa_hd~a_tl���V�[�������O�icnt*����intro�_x)���u�	�U���a_tl_hd~a_tl_tl�������a�b�f�q��choose1�iv)
��RecFn�Y�4�U	�PInfo�Y�-	VMR�YVMC�Y��-	�u����)��e�_c_1t�_c_2 �_c_3l�_c_4i�_c_5s�_c_6a�	_c_7b�	r�	v�f�o�c�p�x�����������������������������������	��Fintro	�����	�	��
�	
�	���x�_������
�	���
��		���Y�	decl��choose���Y
�PInfo�k�-	VMR�kVMC�k�-	�Ydoc�kChanges `(h : ∀xs, ∃as, p as) ⊢ g` to a list of functions `as`, and a final hypothesis on `p as`decl��instantiate_mvars_in_target��������e)�J(�PInfo�l�;	VMR�lVMC�l�;	�Ku�	��
	�	�doc�lInstantiates metavariables that appear in the current goal.decl��instantiate_mvars_in_goals�����}��instantiate_mvars_in_target�PInfo�n�A	VMR�nVMC�n�A	�l�ddoc�nInstantiates metavariables in all goals.decl��lock_tactic_stateu_1α�>t�	?�	@�r�>�s�	?�u�L_a�	E�	F���t�	E�	Ki�t�	F�	D��ia_1u�L�	D��	O�Ui���a_1��a_2u�L�	D�r�	V�r�U����PInfo�p�G	VMR�pVMC�p�G	�u�s�r		doc�pThis makes sure that the execution of the tactic does not change the tactic state.
   This can be helpful while using rewrite, apply, or expr munging.
   Remember to instantiate your metavariables before you're done!decl��mk_meta_pis_main���)���*������a_a~a_a_1�5��a_a~a_a_1~a_a_2)��a_a~a_a_1~a_a_2
a_a_3)�
a_a)a_a_1)�a_a~a_a_1
a_a_2)a_a_3)�$a_a~a_a_1
a_a_2)a_a_3)���9��Up)�@
��RecFn�y���Xa_a~a_a_1)a_a_2)a_a_3)�ka_a�Ma_a_1��x�PInfo�y�O	VMR�yVMC�y��O	�u�)�:
)5?Knz�����D�����F���
�	Og���y	U`
	e	
l����decl��mk_meta_pis���y�PInfo���O	VMR��VMC���O	�ydoc��similar to `mk_local_pis` but make meta variables instead of
   local constantsdecl��instance_stubhole_command/��hole_commandmk
StrInstance Stub
StrGenerate a skeleton for the structure under construction._x��y��W�f�f����tgt)	cl~���%���'env�$x�����expanded_field_listUfs�	fs������~��~	fs��formatintercalate��
Str,
  ����fn~��%�~namehas_to_format�"
Str := _	out�f�0���"
Str{ �����"
Str }�2��������f�f�#���PInfo���mVMR��_lambda_1VMR��_lambda_2VMR��_lambda_3VMR��_lambda_4VMR��_lambda_5VMR��VMC���m����
VMC��*�v?��~ �_c_1_�=�:������������������������VMC���m�8u�_fresh
�}3�f�VMC��b�m�Ku�_fresh
�})~�<	\�	U�������� �_c_2����
�,�������
,��	�����
}��������	����{�������������

���f
��ZVMC��#�p�Ku�����	
��	�	�
��~��VMC���c�mb�u�t�S� �e�c�n�a�t�s�n�I���������������.�n�o�i�t�c�u�r�t�s�n�o�c� �r�e�d�n�u� �e�r�u�t�c�u�r�t�s� �e�h�t� �r�o�f� �n�o�t�e�l�e�k�s� �a� �e�t�a�r�e�n�e�G�������������������������������������������������������������doc��Hole command used to fill in a structure's field when specifying an instance.

In the following:

```lean
instance : monad id :=
{! !}
```

invoking hole command `Instance Stub` produces:

```lean
instance : monad id :=
{ map := _,
  map_const := _,
  pure := _,
  seq := _,
  seq_left := _,
  seq_right := _,
  bind := _ }
```ATTRhole_command����HOLE_CMD��decl��resolve_name'n~+��~/�����_p�_a��}�������y�Mg)�����_x��has_seq_leftseq_left+�Yto_has_seq_left+�W����resolve_name������)��������PInfo���}	VMR��_rec_1VMR��VMC��H�}	�u����_fresh
���~�C�1	=�	6tacticresolve_name	�		/�	!(	
-	
4	;��VMC���}	�Ku��~�		��doc��Like `resolve_name` except when the list of goals is
   empty. In that situation `resolve_name` fails whereas
   `resolve_name'` simply proceeds on a dummy goaldecl���=��strip_prefix'_mainn~���f�~����~���~namecases_on�~�����Y~listfoldl~�fflip�f~~7<Ua_a�fa_a_1~��	n'~�i��~��tacticresolve_constantn''~R�H�r���r���U
�	RecFn���r�fi���+��-��Ua_aunsigneda_a_1~����namemk_numeralUi�PInfo����prvstrip_prefix'_main��VMR��_lambda_1VMR��_lambda_2VMR��VMC����a~���f�VMC�����Ku�_fresh
���~�_fresh
���~�_fresh
����f�_fresh
�����_fresh
���~Fresolve_constant	��	��VMC��>���u�~����~namecases_on.���flip��foldl_main���������~�����cnamemk_numeral������prv����decl���	��~���PInfo����VMR��VMC������~��decl��strip_prefix��~�
���<a_a�fa_a_1~��R���is_prefix_of7
Str_private<7U��\(��	n'~���[<�functormap_const+��~��resolve_name'�7�U���[�-U�fa_a�Aa_a_1~����D
�PInfo����	VMR��_lambda_1VMR��_lambda_2VMR��VMC����	�|u�_fresh
��P~��		VMC�
��	�8u�_fresh
��M~�_fresh
��L�f�VMC��\��	�u�~��U���e�t�a�v�i�r�p�_�����������nameis_prefix_of_main�>	8B���S�����~�
���c��doc��Strips unnecessary prefixes from a name, e.g. if a namespace is open.decl��mk_patternst)+���
)/��	cl~���%���'env�$	fs���S����f~�?���9z�����_p��_a���I�
��+���x��y)/��	vs�listfilter)v)���is_default_local��)���(U�N����)~v)���b�	��qv'~y~��poseH������)����)���)�����
Quote��_x)�)vs�������	�~��v~���	�_x��	args������
Str ����U������strip_prefix��f~R��	���U���(���Y�����"
Str| ������formatline�$�����"
Str| (�����"������U���"
Str) := _���$�PInfo�

��	VMR�

_lambda_1VMR�

_lambda_2VMR�

_lambda_3VMR�

_lambda_4VMR�

_lambda_5VMR�

_lambda_6VMR�

_lambda_7VMR�

_lambda_8VMR�

VMC�
&��	�.VMC�
'��	��)�Nis_default_local�>VMC�
( ���Ku�
)���
�	��Fpose	VMC�
)���Ku�
~��		��VMC�
*���	�Ku�_fresh��p���_fresh��F~��	����>	
_�����formatline_� �=�:� �)���������������������� ���������������(� �|��������������������
7_� �=�:� ������������������� �|������������VMC�
+<��	�Ku�_fresh��W��
5~�
(��
&��	6�
)��
&��	/������ ����
,���
!���
*4VMC�
,0��
�Ku�
~�O		�M	�	*�
'��filter_main�
��
+VMC�
-��	�Ku�_fresh��@~�<	���
���
,��
&��VMC�


��	�
)�	�
�
~�
-doc�

Used to format return strings for the hole commands `match_stub` and `eqn_stub`.decl��match_stub������
StrMatch Stub
StrGenerate a list of equations for a `match` expression.es��x�����Y��_p��_a�����
C��+��/�(����f�!
Strexpecting one expression�������������(�,���e)�����t)x������mk_patternsfs���&���+�e��	out�f�0���"
Strmatch �����"
Str with����%�����"
Strend���$�2��tl_hdtl_tl���2�PInfo�
@��VMR�
@_lambda_1VMR�
@_lambda_2VMR�
@VMC�
L���8u�_fresh���f�VMC�
M�����Ku�
A����e�_c_1x�_c_2p�_c_3i�_c_4n�_c_5 �_c_6o�_c_7s�	_c_8		r�g�t�c���������������������������������?��	��9�M	�����	��2�

	��+	�	��	�	��$t�
_c_9h�_c_10 �_c_11�����_c_12�
�
7d�n�e������������������������
7
i�w���������������
����c�
a�m�����������������
�
I�f�
L�)
�0	
�7�>��e�_c_13x�_c_14p�_c_15i�	_c_16n�
_c_17 �_c_18o�_c_19s�
_c_20
	

r�
g�
	t�c������������������������������
VMC�
@�E��b�u�t�S� �h�c�t�a�M������������.�n�o�i�s�s�e�r�p�x�e� �`�h�c�t�a�m�`� �a� �r�o�f� �s�n�o�i�t�a�u�q�e� �f�o� �t�s�i�l� �a� �e�t�a�r�e�n�e�G���������������������������������������������������������
Mdoc�
@Hole command used to generate a `match` expression.

In the following:

```lean
meta def foo (e : expr) : tactic unit :=
{! e !}
```

invoking hole command `Match Stub` produces:

```lean
meta def foo (e : expr) : tactic unit :=
match e with
| (expr.var a) := _
| (expr.sort a) := _
| (expr.const a a_1) := _
| (expr.mvar a a_1 a_2) := _
| (expr.local_const a a_1 a_2 a_3) := _
| (expr.app a a_1) := _
| (expr.lam a a_1 a_2 a_3) := _
| (expr.pi a a_1 a_2 a_3) := _
| (expr.elet a a_1 a_2 a_3) := _
| (expr.macro a a_1) := _
end
```ATTR�����
@HOLE_CMD�
@decl��eqn_stub������
StrEquations Stub
StrGenerate a list of equations for a recursive definition.es����_a�����
g��,��������������,��tl_hdtl_tl�����
Strexpecting one typet)���
�e)�?����_p��_a���I�
m���(�x��y)�}�x��(U�,�/
Strexpecting a Pi-typefst_hd)fst_tl��,���t')�>fs���?�+��t��	out�fR��	������(�f�0���"
Str-- do not forget to erase `:=`!!���M�$�2�0��%����%�����2���PInfo�
e�VMR�
e_rec_2VMR�
e_rec_1VMR�
e_lambda_1VMR�
e_lambda_2VMR�
eVMC�
tn��u�����_fresh��w���e�_c_1p�_c_2t�_c_3n�_c_4 �	_c_5y�	o�	g�i�c�x������������������������VMC�
u��u�������
tVMC�
v��8u�_fresh���f�VMC�
w����Ku�
f���
u	����	
���	���~e�
_c_6p�_c_7t�_c_8i�
_c_9 �_c_10
y�-�
P�a�g�n�
c�
x�
��������������������������
�M	��~
�

	��w�	��	�	��p���>	�������_c_11�
�����������
7�������������
�i-�_c_12 �_c_13o�_c_14t�_c_15r�_c_16e�_c_17`�_c_18!�_c_19�����_c_20�
�����������
7=�:�s�a�g�f�n�d�������������������������������������������
	�
s�f�
v�u�|��
����VMC�
e�c�b�u�t�S� �s�n�o�i�t�a�u�q�E����������������.�n�o�i�t�i�n�i�f�e�d� �e�v�i�s�r�u�c�e�r� �a� �r�o�f� �s�n�o�i�t�a�u�q�e� �f�o� �t�s�i�l� �a� �e�t�a�r�e�n�e�G�����������������������������������������������������������
wdoc�
eHole command used to generate a `match` expression.

In the following:

```lean
meta def foo : {! expr → tactic unit !} -- `:=` is omitted
```

invoking hole command `Equations Stub` produces:

```lean
meta def foo : expr → tactic unit
| (expr.var a) := _
| (expr.sort a) := _
| (expr.const a a_1) := _
| (expr.mvar a a_1 a_2) := _
| (expr.local_const a a_1 a_2 a_3) := _
| (expr.app a a_1) := _
| (expr.lam a a_1 a_2 a_3) := _
| (expr.pi a a_1 a_2 a_3) := _
| (expr.elet a a_1 a_2 a_3) := _
| (expr.macro a a_1) := _
```

A similar result can be obtained by invoking `Equations Stub` on the following:

```lean
meta def foo : expr → tactic unit := -- do not forget to write `:=`!!
{! !}
```

```lean
meta def foo : expr → tactic unit := -- don't forget to erase `:=`!!
| (expr.var a) := _
| (expr.sort a) := _
| (expr.const a a_1) := _
| (expr.mvar a a_1 a_2) := _
| (expr.local_const a a_1 a_2 a_3) := _
| (expr.app a a_1) := _
| (expr.lam a a_1 a_2 a_3) := _
| (expr.pi a a_1 a_2 a_3) := _
| (expr.elet a a_1 a_2 a_3) := _
| (expr.macro a a_1) := _
```ATTR�����
eHOLE_CMD�
edecl��list_constructors_hole������
StrList Constructors
StrShow the list of constructors of the expected type.es����t)��_p��_a�����x��y)�,	cl~��	args���get_app_argsU��env�$	cs���R��;��c~y����e)�&������U��+t�������c~���������"
Str : ��U���$ts���?����������
Str, ��fish+v~~������~��������Ufs��	out�f�0���"
Str{! ���"
Str !}�2�����x�0����2_x��������U�#���PInfo�
��/VMR�
�_lambda_1VMR�
�_lambda_2VMR�
�_lambda_3VMR�
�_lambda_4VMR�
�_lambda_5VMR�
�_lambda_6VMR�
�_lambda_7VMR�
�VMC�
��/�.VMC�
�h�9�Ku�
�~�_fresh���O	b���M	
�	��	�	[��	T������
7������������� �:� ���������������������������
7���������Y	`VMC�
��>E�8u�~����VMC�
��/�Ku�_fresh�G�f�_fresh�<���
���
���K�b	�VMC�
�}�/�Ku�_fresh�#���
���
���
���	w�
�����
�fish��
���	1 �,�����
,��6	7p!�_c_1 �	_c_2�
}�	������������	{��������������

�
��f
�
�uVMC�
��/�Ku�
���_fresh�~�<	���
����
�VMC�
�5�2�Ku�
����	
��	/�	(�	�
	�
�~�Hget_app_args
�
��
	�
�-VMC�
��Y�/s�r�o�t�c�u�r�t�s�n�o�C� �t�s�i�L�������������������.�e�p�y�t� �d�e�t�c�e�p�x�e� �e�h�t� �f�o� �s�r�o�t�c�u�r�t�s�n�o�c� �f�o� �t�s�i�l� �e�h�t� �w�o�h�S������������������������������������������������������
�doc�
�This command lists the constructors that can be used to satisfy the expected type.

When used in the following hole:

```lean
def foo : ℤ ⊕ ℕ :=
{! !}
```

the command will produce:

```lean
def foo : ℤ ⊕ ℕ :=
{! sum.inl, sum.inr !}
```

and will display:

```lean
sum.inl : ℤ → ℤ ⊕ ℕ

sum.inr : ℕ → ℤ ⊕ ℕ
```ATTR�����
�HOLE_CMD�
�decl��classical���������b7
Str_inst<�qh~��z��7
Strprop_decidable�h�u_x)��reset_instance_cache�PInfo�
��E	VMR�
�VMC�
���E	�Ku�t�s�n�i�_���������
�	 ��l�a�c�i�s�s�a�l�c������������e�l�b�a�d�i�c�e�d�_�p�o�r�p������������������O	�����	��tacticreset_instance_cache�doc�
� Makes the declaration `classical.prop_decidable` available to type class inference.
This asserts that all propositions are decidable, but does not have computational content.decl��mk_comp_mainv)�z�
�)�)�0�*����	��
���������_x��z���Ut)6���/N������	��
����������
���z���U�^a_a~a_a_1�5����	��
���i����i�
���z���U�^a_a~a_a_1~a_a_2)����	��
����������
���z���i�U�^a_a~a_a_1~a_a_2
a_a_3)����	��
��������
���z���i�U�^a_a)a_a_1)�R�
�i��i,��U�����	��	���iU�
��(��
Strbad guard_x��zz
�ORecFn�
��U��e')z��if)67
Strcomp7
Strfunction<III�.B�*UJNa_a~a_a_1
a_a_2)a_a_3)����	��
��!����!��
���z����U�^a_a~a_a_1
a_a_2)a_a_3)����	��
��4����4��
���z����U�^a_a~a_a_1)a_a_2)a_a_3)����	��
��h����h��
���z��d�i�U�^a_a�Ma_a_1�����	��
��ui���ui�
���z��s�U�^�PInfo�
��N	VMR�
�_lambda_1VMR�
�VMC�
��N	�u�_fresh��)�_fresh�m)�=�>	
	

	��VMC�
����N	�u�)�
�)�:
<v���0���1�q�����	�	��	5���M	.�d�i������3:���	�	BH��K	Lo���M	Rh�d�i������mt�D�	�	}����	���D�M	���d�i�������	����	�	�����	�����M	��	�d�i�������	
����	�	������	��)���M	��"
	�d�i�������'	
�.	�	�	�4��d�r�a�u�g� �d�a�b����������������
��c	�n���
�	�s�x���}		�~����	����c�_c_1o�_c_2n�
_c_3
	�
i�t�
u�f�����������p�m����������	
��	�������	�	������	��*���M	�
�#
	�d�i�������(	
�/	���	�	�:�@���C	�D�j���M	�M�c
	�d�i�������h	
�o	���	�	�z������	�������M	����
	�d�i��������	
��	���	�	��������	�������M	�����d�i��������	��decl��mk_comp�O�
�)�
��PInfo�
��N	VMR�
�VMC�
��N	�
�)�
�doc�
� `mk_comp v e` checks whether `e` is a sequence of nested applications `f (g (h v))`, and if so,
returns the expression `f ∘ g ∘ h`.decl��mk_higher_order_type_main�z�)�P�*���)���@a_a~a_a_1�5�@a_a~a_a_1~a_a_2)�@a_a~a_a_1~a_a_2
a_a_3)�@a_a)a_a_1)�@a_a~a_a_1
a_a_2)�La_a~a_a_1
a_a_2)a_a_3)��),�*�z�L��v)	b')�B�X��������match_eq���������"
Strnot an equality �)�$_p��_a���p�x)�y)�z��mk_comp�Ul')z�q�rUr')|����N����]�)	�)�B�l��a_a_3_a~a_a_3_a_1�5�z�L�i�)	�)�B�}��a_a_3_a~a_a_3_a_1~a_a_3_a_2)�z�L�r��)	�)�B����a_a_3_a~a_a_3_a_1~a_a_3_a_2
a_a_3_a_3)�z�L����)	�)�B����a_a_3_a)a_a_3_a_1)����)	�)�B��U��a_a_3_a~a_a_3_a_1
a_a_3_a_2)a_a_3_a_3)����)	�)�B����a_a_3_a~a_a_3_a_1
a_a_3_a_2)a_a_3_a_3)���v)	b')�B��d)�
8))�0�������)~)����
�zRecFn�
�a_a_3_a~a_a_3_a_1)a_a_3_a_2)a_a_3_a_3)����)	�)�B���a_a_3_a�Ma_a_3_a_1�����)	�)�B�0��a_a~a_a_1)�Ta_a�Ma_a_1��@�PInfo�
��`	VMR�
�_lambda_1VMR�
�_lambda_2VMR�
�_lambda_3VMR�
�_lambda_4VMR�
�_lambda_5VMR�
�_lambda_6VMR�
�_lambda_7VMR�
�_lambda_8VMR�
�_lambda_9VMR�
�_lambda_10VMR�
�VMC�,��`	�Ku�_fresh�&#)�_fresh�&!)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n������������������������������Fmatch_eq�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�-��`	�Ku�_fresh�&<)�_fresh�&:)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�.��`	�Ku�_fresh�&V)�_fresh�&T)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�/��`	�Ku�_fresh�&q)�_fresh�&o)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�0��`	�Ku�_fresh�&�)�_fresh�&�)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�1��`	�Ku�_fresh�&�)�_fresh�&�)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�2��`	�Ku�_fresh�&�)�_fresh�&�)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�3�`	�|u�_fresh�&�)�_fresh�&�)�_fresh�&)�_fresh�&
�_fresh�&~�
�	�
��!��VMC�4��`	�Ku�_fresh�&�)�_fresh�&�)��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�5��`	�Ku�_fresh�'	)�_fresh�')��������� �y�t�i�l�a�u�q�e� �n�a� �t�o�n�������������������������������<�c	j��
�	q��
�	v�
	�q�e�������	
�	VMC�
��]�`	�u�)�:
 &,�Q�W���������������:
.Id�������4�G	4B����
�)
�,G	�O�G	O]����
�)
�-b	�O�G	jy	�D���)�.~	
�O�G	��
	�����)	�/�	
�O�G	��
	����
�)

�0�
�O�G	��	�F���)�1�	
�O�G	��
	����
�)

�2�
�O�G	��
	����
�!)

�3�
�O�G	��-
	����
�)

�4�2
�O�G	�:�I	�����)�5�N	
����decl��mk_higher_order_type�z�
�	�PInfo�|�`	VMR�|VMC�|�`	�
�doc�|From a lemma of the shape `∀ x, f (g x) = h x`
derive an auxiliary lemma of the form `f ∘ g = h`
for reasoning about higher-order functions.decl��higher_order_attr_mainuser_attribute��@~/�user_attributemk���7
Strhigher_order<
StrFrom a lemma of the shape `∀ x, f (g x) = h x` derive an auxiliary lemma of the
form `f ∘ g = h` for reasoning about higher-order functions.Cdecl~prio*persistentQ��lmm~_x*_xQ�%���'env�$�
1����exceptional��+�����&�(��&�(��ex_to_tac���getidecl��	num*�klength~��	lvls����*~��append_after7
Strl<listiota	l)�
F���t)����mk_higher_order_typet')��������intros_x�����7
Strfunext<��_x������_x)�	c��������_p��_a�����x���y)����pr)x����get_param���
Quote�
�RecFn�~��lmm'��;���~~�~~~��nameget_prefix�����������������u~���add_prime��lmm'~�������5���Qtask�S���U��taskmonad)�_x������copy_attribute�(U_x����7
Strfunctor_norm<�M(�Gdecl~�user_attribute_cache_cfgmk��_x���R�Talternativeto_applicative+�
�����a�optionhas_reflect~��~namereflect
Quote~optional��\parseralternative~��ident�PInfo�~�s	VMR�~_lambda_1VMR�~_lambda_2VMR�~_lambda_3VMR�~_lambda_4VMR�~_lambda_5VMR�~_lambda_6VMR�~_lambda_7VMR�~_lambda_8VMR�~_lambda_9VMR�~VMC���s	��~��VMC��V�s	�Ku�_fresh
��A~Fintros_main	P�t�x�e�n�u�f����������K	/I�
4	3B���K��GNVMC���s	�|u�_fresh
��m���~��	
nameget_prefix_main�VMC���s	�8u��~�add_primeVMC����s	�Ku�_fresh
��L)�_fresh
��J����~�M		��	��
�	�����	�	��	 �
�~�user_attributeget_param	(������c	2�������	<��p�m�i�s�������Fcopy_attribute	Z�n�_c_1o�_c_2r�_c_3�m�_�t�c�u�f����������������������
�	
�VMC��=�y�Ku��Q��*��~�<	7environmentget��returnex	
0����length_main	��*	��iota_main�l����nameappend_after��
����
�����D��)
��5VMC���s	�8u����VMC���s	�|�leanparserident		VMC���s	�8�VMC�~��s	�r�e�d�r�o�_�r�e�h�g�i�h���������������.�s�n�o�i�t�c�n�u�f� �r�e�d�r�o�-�r�e�h�g�i�h� �t�u�o�b�a� �g�n�i�n�o�s�a�e�r� �r�o�f� �`�h� �=� �g� ��"� �f�`� �m�r�o�f�
�e�h�t� �f�o� �a�m�m�e�l� �y�r�a�i�l�i�x�u�a� �n�a� �e�v�i�r�e�d� �`�x� �h� �=� �)�x� �g�(� �f� �,�x� ��"�`� �e�p�a�h�s� �e�h�t� �f�o� �a�m�m�e�l� �a� �m�o�r�F��������������������������������������������������������������������������������������������������������������������������������������������������~��_main��has_reflect������parser_orelsedecl��higher_order_attr��~�PInfo���s	VMR��VMC���s	�~doc�� A user attribute that applies to lemmas of the shape `∀ x, f (g x) = h x`.
It derives an auxiliary lemma of the form `f ∘ g = h` for reasoning about higher-order functions.ATTRuser_attribute����USR_ATTR��ATTRhigher_order��oC~7
Strmap_comp_pure<declgmap_comp_purel_2l_1fa����_inst_1applicativecis_lawful_applicativeU��g��UUeq a��r�functioncomp!  ����rUfunctormap�applicativeto_functor���Uhas_purepure���to_has_pure�����! �U���U������������������������funext! �x����������x�o�����(��i�U�ATTRsimp����decl�������use_aux_mainh����������	y��refine��done�(��fconstructor
�@RecFn�
�PInfo�
��prvuse_aux_main�
VMR�
_lambda_1VMR�
_lambda_2VMR�
VMC����Ku�_fresh
��Frefine	FdoneVMC����Ku��
vfconstructor	
�
VMC�

��������cprv��	decl�	�@��
�PInfo�	��VMR�	VMC�	����
doc�	Use `refine` to partially discharge the goal,
or call `fconstructor` and try again.decl��usel�������������seq�	���h���	��������"
Strfailed to instantiate goal with ��'�
�$�5�PInfo���prt�VMR�_lambda_1VMR�_lambda_2VMR�VMC����.VMC�����a�_c_1i�_c_2l�_c_3e�_c_4 �_c_5t�_c_6o�_c_7n�_c_8���������h�w�g�s�d�f�����������������������������������������������
�cVMC�
������l���������doc� Similar to `existsi`, `use l` will use entries in `l` to instantiate existential obligations
at the beginning of a target. Unlike `existsi`, the pexprs in `l` are elaborated with respect to
the expected type.

```lean
example : ∃ x : ℤ, x = x :=
by tactic.use ``(42)
```

See the doc string for `tactic.interactive.use` for more information.decl��clear_aux_decl_aux_main�������	ra_hd)a_tl�����}��expris_aux_declU�	�U�	q_x��
��RecFn�(U�PInfo�(��	VMR�(VMC�(��	�u������His_aux_decl	����	�(decl��clear_aux_decl_aux���(�PInfo�/��	VMR�/VMC�/��	�(doc�/ `clear_aux_decl_aux l` clears all expressions in `l` that represent aux decls from the
local context.decl��clear_aux_decl�����"��clear_aux_decl_aux�PInfo�0��	VMR�0VMC�0��	�Ku�M	�(doc�0`clear_aux_decl` clears all expressions from the local context that represent aux decls.decl��apply_at_aux_mainarg)t)���)�)���4)�5)���)�)��)��a_1*������a_1���a_a~a_a_1�5��a_a~a_a_1~a_a_2)��a_a~a_a_1~a_a_2
a_a_3)��a_a)a_a_1)��a_a~a_a_1
a_a_2)��a_a~a_a_1
a_a_2)a_a_3)���������uv)
��RecFn�3���������r���g�����������r��U��N�
a_a~a_a_1)��a_a�Ma_a_1����PInfo�3��	VMR�3_lambda_1VMR�3_lambda_2VMR�3VMC�O��	�Ku�_fresh
���)�_fresh
���)�_fresh
��})�_fresh
��|��_fresh
��{)�_fresh
��z)�
�	���F�3	VMC�P��	�|u�V)�Y)�\��_)�b)�L	�FVMC�3K��	�u�)�)���5)�4)�:
 &,?E���������������P	�O�c����decl��apply_at_aux���4)�5)�3U�PInfo�c��	VMR�cVMC�c��	�5)�4)�3doc�c`apply_at_aux e et [] h ht` (with `et` the type of `e` and `ht` the type of `h`)
   finds a list of expressions `vs` and returns (e.mk_args (vs ++ [h]), vs)decl��apply_ate)h)���e)�f)����ht)���et)������apply_at_aux�U�i_p��_a���l��k�����x)�y�������	��rHU_x)���	���_x�����	���is_assigned�gs'���_p�_a�����)������������PInfo�d��	VMR�d_lambda_1VMR�d_rec_1VMR�dVMC�r��	�.VMC�s��	�u����_fresh
��U��
��r�;��VMC�db��	�Ku�f)�e)�M	\�M	U�3	N	����	G��	@
tacticis_assigned��r��	)9�	,2�s7>E
L
S	Zdoc�d`apply_at e h` applies implication `e` on hypothesis `h` and replaces `h` with the resultdecl��symmetry_hyph)md�
�N���z)�{�����tgt)�#env�$	r)��U_a��~��������
Strsymmetry tactic failed, target is not a relation application with the expected property.�^~������s)��apply_at���symm_forU��	�PInfo�y��	VMR�y_lambda_1VMR�yVMC������	�u�_fresh
��$)�_fresh
��"�$�_fresh
��)�
environmentsymm_for	��s�_c_1y�_c_2m�_c_3e�_c_4t�_c_5r�	_c_6 �
_c_7a�_c_8c�_c_9i�
_c_10l�_c_11d�_c_12n�_c_13o�_c_14p�_c_15h�_c_16.�		
x�


w�




	




g�	
,�
f�


	����������������������������������������������������������������������������������������������O	�����d��VMC�y!��	�Ku�{��z)�M	�<	�	�~)��doc�y`symmetry_hyp h` applies symmetry on hypothesis `h`TKsetup_tactic_parserdecl��setup_tactic_parser_cmd_xinteractiveparse������punitreflect��tk
Strsetup_tactic_parser�����@����
Str
open lean
open lean.parser
open interactive interactive.types

local postfix `?`:9001 := optional
local postfix *:9001 := many .

�PInfo����	VMR��VMC���W��	���@
�_c_1o�_c_2p�_c_3e�_c_4n�_c_5 �_c_6l�_c_7a�_c_8.�	_c_9r�
_c_10s�_c_11i�_c_12t�
_c_13c�_c_14v�_c_15y�_c_16f�_c_17x�_c_18`�_c_19:�_c_209�_c_210�_c_221�_c_23=�_c_24	m�*�

?�

	







	�������������������������������������������������������������������������������������������������������������������������������������doc�� `setup_tactic_parser_cmd` is a user command that opens the namespaces used in writing
interactive tactics, and declares the local postfix notation `?` for `optional` and `*` for `many`.
It does *not* use the `namespace` command, so it will typically be used after
`namespace tactic.interactive`.ATTRuser_command����USR_CMD��decl��trace_error�
�_msg�ft�����
�_���f�����u/_a�4�$������4�2����J�$���a_1u/�$�r�Pu�rU���a_1��a_2u�������$���/�$���Gu��G��U���/�_�	v��+w�	y�x���s���u������e��C���U���PInfo����	VMR��VMC��8��	�u�����f�
�_			6���K�b	#	���K�b(	
	)0	5	
doc�� `trace_error msg t` executes the tactic `t`. If `t` fails, traces `msg` and the failure message
of `t`.decl��success_if_fail_with_msguα�`ttactic��msg�f�����`�������f/su_a�M$ui�$���
Y��u�����N$u����������a_1u/��interaction_monadmk_exceptionu���f�!
Strsuccess_if_fail_with_msg combinator failed, given tactic succeededH���a_1��a_2u��	expected_msg�f�0optioniget��piinhabited�������x��formatinhabited����2RS�f�rstringhas_decidable_eq�r���V�������������"
Strfailure messages didn't match. Expected:����%�"�$H��
Y	�PInfo����	VMR��_lambda_1VMR��VMC����	������VMC���F��	��u���f����	�Ls�_c_1u�_c_2c�_c_3e�	_c_4_�
_c_5i�_c_6f�_c_7a�
_c_8l�_c_9t�_c_10m�_c_11g�_c_12 �_c_13o�_c_14n�_c_15d�_c_16			
	v�,�	
r�
b�
h�w�



	������������������������������������������������������������������������
����optioniget_main�
���fstringhas_decidable_eq	�\�Aa�_c_17i�	_c_18e�
_c_19 �_c_20m�_c_21s�
_c_22d�_c_23t�_c_24c�_c_25�����_c_26���������
7:�

p�x�E�.�h�'�n�	

g�



r�u�l�	f������������������������������������������������������
�Ddoc��This combinator is for testing purposes. It succeeds if `t` fails with message `msg`,
and fails otherwise.decl��pformat�_��_���PInfo����	VMR��VMC��doc��A type alias for `tactic format`, standing for "pretty print format".decl��pformatmkfmt����pformat��������PInfo����	nspace��VMR��VMC����	�8u���doc��`mk` lifts `fmt : format` to the tactic monad (`pformat`).decl��to_pfmtu_1α�>_inst_1has_to_tactic_format�xU����>����U����pp&�U�PInfo���	VMR�VMC���	����	�doc�an alias for `pp`.decl��pformathas_to_tactic_formathas_to_tactic_format��/�has_to_tactic_formatmk�����PInfo�
�prt�
VMR�
VMC�
��-��ATTR����
class��
��decl��has_appendhas_append��/�has_appendmk��x��y���D���������p�����U�PInfo��prt�VMR�VMC�(��Ku������	
��	"	 ATTR����class����decl��tactichas_to_tactic_format�
�__inst_1�������
�_��/����x���f����to_pfmt�U�PInfo��prt�nspace�VMR�VMC���Ku���
�_	�ATTR����classhas_to_tactic_format���decl�����bparse_pformat_main��f��char���f��+�|�*��+�,/�,�Q��S��U�� ��
Quote_x_1�	��Z��to_pfmt���fUreflectedhas_to_pexpr�fUreflect�fUstringreflectUa_hd�*a_tl�+RS�*Ucharof_nat���	chardecidable_eqU�W�,�3�"
�.RecFn��#f�:����
Quote_x_1�	��e_x_2�	��f
��Annot�^�h�<U��pformatmk�����A��E��I��K���pexprhas_to_pexprR�T�U�	�	���	�	�	��[���,�/�'�+�,�3�"�W�f�nleanparserpexprW�
*stdprecmaxY�as_string�*_p��_a���t�f�=���,�x�y�f�3�"�+�<�+stringto_list_p�+_a�+�/�A�+�,�3�����,�����,����,�j��f�!
Str'}' expected���*���+R�T�U�	���	���[���,�3�df�:������
Quote_x_1�	��|_x_2�	��}_x_3�	��~�h�h�<��i���A���E���I���K�����r����a_tl_hd�*a_tl_tl�+���3�a�g�
Str{�3�������*U�<���=�����x�y�f�3���@�+�A�+�����*���+���3�d�B�:���������A���E���I���K���������3�astringstriU	�PInfo��	prvparse_pformat_main�VMR�VMC����	����+��f�stringreflectreflect�"�	��>�	�
��+	��{��+	#stringpush����%�string_impmkleanparserpexpr�	-�stringto_list�2y'�	_c_1e�
_c_2d�
t�c�
p�x�
 �	}�	������������������Y�}�	�+	~�'�_c_3e�_c_4d�t�c�p�x� �}�������������������Y�
��	���4�	��4�	��P�Q�"�	����	��	��	��
���{��+	����U�X�	���
�Z��	�P'��[e��\d�t�c�p�x� �}�������������������Y��}��+	�U��'�
�]e��^d�t�c�p�x� �
}�
������������������Y����	����
�4�	�	�4�	��P�Q�"�	����	��	��	���
��	��{����`�����	�����4�	��P�Q�"�	��q�	��	���prv�M�decl��.�
�PInfo��	VMR�VMC��	�TKpformat!dNOTA��pformat!pformat! d��decl��pformat_macro_x�<�=
Strpformat!s�f�,�b�K�c�f�3�`��#��e�<��
Quote_x_1�	���
��TyE���PInfo�a�.	VMR�aVMC�a�.	�K��c�f�b�K�Z��	�4�	��U�	�doc�a See `format!` in `init/meta/interactive_base.lean`.

The main differences are that `pp` is called instead of `to_fmt` and that we can use
arguments of type `tactic α` in the quotations.

Now, consider the following:
```lean
e ← to_expr ``(3 + 7),
trace format!"{e}"  -- outputs `has_add.add.{0} nat nat.has_add (bit1.{0} nat nat.has_one nat.has_add (has_one.one.{0} nat nat.has_one)) ...`
trace pformat!"{e}" -- outputs `3 + 7`
```

The difference is significant. And now, the following is expressible:

```lean
e ← to_expr ``(3 + 7),
trace pformat!"{e} : {infer_type e}" -- outputs `3 + 7 : ℕ`
```

See also: `trace!` and `fail!`ATTRuser_notation���aUSR_NOTATION�aTKfail!dNOTA��fail!fail! d��decl��fail_macro_x�<�=
Strfail!�L�k�as�f�3�`��pformat_macro��e�:��
Quote_x_1�	���
 Annot�^�T��fail���PInfo�j�8	VMR�jVMC�j�8	�K��l�f�k�a�a	�4�	��m�	�doc�jthe combination of `pformat` and `fail`ATTR�g���jUSR_NOTATION�jTKtrace!dNOTA��trace!trace! d��decl��trace_macro_x�<�=
Strtrace!�L�u�ys�f�3�fe�:��
Quote_x_1�	����j��trace���PInfo�t�A	VMR�tVMC�t�A	�K��v�f�u�y�a	�4�	��~�	�doc�tthe combination of `pformat` and `fail`ATTR�g���tUSR_NOTATION�tdecl��get_mathlib_dir+�f/���%�f�'e�$x�f�f��@�f��������������u�f�decl_olean7
Strreset_instance_cache7
Strtactic<s�f��fstringpopn_back�	���	�PInfo�{�F	VMR�{VMC�{��F	�Ku�<	��c�i�t�c�a�t���������e�h�c�a�c�_�e�c�n�a�t�s�n�i�_�t�e�s�e�r�����������������������environmentdecl_olean��	���popn_back�doc�{A hackish way to get the `src` directory of mathlib.decl��is_in_mathlibn~���~���Q��get_mathlib_dirml�f�%Q�'e�$�	��is_prefix_of_fileU�	�PInfo���N	VMR��VMC���N	�Ku��~�{	�<	�3is_prefix_of_filedoc��Checks whether a declaration with the given name is declared in mathlib.
 If you want to run this tactic many times, you should use `environment.is_prefix_of_file` instead,
 since it is expensive to execute `get_mathlib_dir` many times.decl���@!�apply_under_pis_aux_mainfuncarg�*�)�����*�)��)a_1*/'�
	vars����;�����
�r*listrange�	bd����������
pexprmk_explicit��
��
�ra_1���a_a~a_a_1�5��	����������i	�������������a_a~a_a_1~a_a_2)��	�����������	���������r����a_a~a_a_1~a_a_2
a_a_3)��	�����������	��������������a_a)a_a_1)��a_a~a_a_1
a_a_2)� a_a~a_a_1
a_a_2)a_a_3)����
i�pexprof_exprU
��RecFn�����r���a_a~a_a_1)� a_a�Ma_a_1����PInfo���Rprvapply_under_pis_aux_main��VMR��_lambda_1VMR��_lambda_2VMR��VMC���R�*��VMC���R�������FVMC����R�)�*�����:
0G^u������range����������pexprmk_explicit���������F�����������������������F�����������������������F�����������������������F������������������	����	�F�����������������������F������������������	����	�F���pexprof_expr��������������������	����	�F�����������������������Fprv����decl����������U�PInfo���RVMR��VMC���R������doc��auxiliary function for apply_under_pisdecl��apply_under_pisfuncargpi_expr)������)/���UZ�PInfo���]	VMR��VMC���]	��)������doc��Assumes `pi_expr` is of the form `Рx1 ... xn, _`.
Creates a pexpr of the form `Π x1 ... xn, func (arg x1 ... xn)`.
All arguments (implicit and explicit) to `arg` should be supplied.decl��delta_instancederive_handler/clsnew_decl_name~�����~��env�$R��is_inductiveU�� Q(��	��
�	�����)���
4new_decl_type)xQ���new_decl_pexpr�	����apply_under_pis�U((tgt)��Q���	y�	y�	y�,�K�I��delta_target�4����delta_configmk�
(��apply_instance�D_p��_a����������x���y)��	���inst)�	����tgt)��Q��get_unused_decl_name���5_a��
��~�*/~��
Strinst��� ��~a_1�5� ����gnamelastU
Str_1�~a_1~a_2��� ��~a_1~a_2
a_3��� ����a_1��� ��~a_1
a_2��� �� ��~a_1��� ���Ma_1��� ���nm~�	���mk_definition���U�_x���	���set_basic_attribute�U(�q_x���	�(�PInfo���o*VMR��_rec_1VMR��_lambda_1VMR��VMC����o*�/���:
4F_x�����t�s�n�i��������t�s�n�i��������1�_�����last�`��t�s�n�i��������t�s�n�i��������t�s�n�i��������t�s�n�i��������t�s�n�i��������t�s�n�i��������t�s�n�i�������VMC��2�o*�Ku�_fresh
��#~��	�
�
	����delta_target	"Fapply_instance'	(,�VMC����o*�Ku��~���<	�environmentis_inductive�>		���	
��	���	�����	&�
��	��	-���	3�	��	7�����d	>��Qmk_definition��	G��e�c�n�a�t�s�n�i�����������tacticset_basic_attribute	x}������
�	
�	��doc��Tries to derive instances by unfolding the newly introduced type and applying type class resolution.

For example,
```lean
@[derive ring] def new_int : Type := ℤ
```
adds an instance `ring new_int`, defined to be the instance of `ring ℤ` found by `apply_instance`.

Multiple instances can be added with `@[derive [ring, module ℝ]]`.

This derive handler applies only to declarations made using `def`, and will fail on such a
declaration if it is unable to derive an instance. It is run with higher priority than the built-in
handlers, which will fail on `def`s.ATTRderive_handler������decl��find_private_decln~fr�����~�������env�$x��~option_trun+�fpoption_t+r� �option_tmonad+v~�foption_tmk+~��Ufr~� ����f#+� ���++� ���has_monad_lift+v��+���
3d��� ��f�������=fn��	p��fQ_a����f����!"/_x�fQ��f(�^�f/x�fQ��f�	���U��U	xs���decl_filter_map~�d��p@r@���f~��i�!fn�f�!@��~�	�@��alternative�
���Y�>�
���
Y�H���><�randdecidable�!L�!T��!K(�!W�!N�!S��
Y(���!Q�r_x���Q@�S@��~�=�_a���V��������~�f�!
Strno such private found��~�����V���������)tl_hd~tl_tl�����!z
Strmany matches found
�PInfo����	VMR��_rec_2VMR��_rec_1VMR��_lambda_1VMR��_lambda_2VMR��VMC�m��	�u�����_fresh
��~�m�_c_1a�_c_2n�_c_3 �_c_4d�u�o�f�s�e�h�c�t�y������������������������VMC�}��	�u�����wn�_c_5o�_c_6 �_c_7u�_c_8d�f�e�t�a�v�i�r�p�h�c�s����������������������������VMC���	��f�_fresh
��o��	����VMC�^��"����_fresh
��s�!"�_fresh
��a�$�_fresh
��^~�2��	�2�e�t�a�v�i�r�p�_������������
�>	8:P�>	@BL��2���	IKL	MOP	QSU	VX\�2VMC��N��	�Ku�����~�<	H		.��	
	(	&�2��-	/A���!"��3decl_filter_map	���	�Fdoc�� `find_private_decl n none` finds a private declaration named `n` in any of the imported files.

`find_private_decl n (some m)` finds a private declaration named `n` in the same file where a declaration named `m`
can be found.decl��import_private_cmd_x�<�=
Strimport_private���,�!����"~����n~�"�����has_seq_rightseq_right��Yto_has_seq_right��7��~�=
Strfrom��fr��!������~�����!�����!���~��find_private_declUn~�!��!�� c~�"�������(������(�!���(�!������
4d��	c)��declarationuniv_levels�!��!���new_aux_decl_namenew_n~�"����������������������������������Ureducibility_hintsabbrev�7is_trusted�_x��	new_not�f�g�g
Strlocal notation `�j~namehas_to_string���<�g�g
Str` := �!�U�#��_x�f�!��	q�PInfo�+��	VMR�+_lambda_1VMR�+_lambda_2VMR�+_lambda_3VMR�+_lambda_4VMR�+_lambda_5VMR�+VMC�C��	�-~VMC�DF��	�|�m�o�r�f������leanparsertk	�C"	#4��	&-29	:@VMC�E��	�8�VMC�F��	�K��_fresh
����f�p	
���YVMC�G���	�K��_fresh
���)�_fresh
��~���_fresh
��z~Fnew_aux_decl_name�Y	��1is_trusted�����J���Y	�l�	_c_1o�
_c_2a�_c_3 �_c_4n�
_c_5t�_c_6`�_c_7���=�:��������`�`����

i�

	c�
	������������������`�`�?�f�F�VMC�+M��	�K��,�!���	G�E�D��		@���Y	9���Y	2	���Y	+
declarationuniv_levels�D
�6)

�G0
7	
>Edoc�+`import_private foo from bar` finds a private declaration `foo` in the same file as `bar`
   and creates a local notation to refer to it.

   `import_private foo` looks for `foo` in all imported files.ATTR�����+USR_CMD�+decl��mk_simp_attribute_cmd_x�<�=
Strmk_simp_attribute���c�"���!�n~�_������d�")����,�)��,�"�,�"��)���
Quote_x_1�	���
option�fTyE��((d)�"������+��������"8�":��"8�":��������
Quote��descr���"�����~��������interactivetypeswith_ident_list�<���with_list���!��!���mk_simp_attr�_x���!���add_doc_stringnameappend7
Strsimp_attr<�optionget_or_else�f��g
Strsimp set for �!���PInfo�b��	VMR�b_lambda_1VMR�bVMC�v��	�8�VMC�b���	�K��c�"��	�stdprecmax�X	��4�	��"-�	����Y	������Y	�	�v�m��	#�
��mk_simp_attr�Y	*�s�_c_1p�m�i������_c_2t�_c_3r�_c_4 �_c_5
��o�f�e�����������`��get_or_else_main�a�_��������tacticadd_doc_string�Y�
�
�	
��doc�bThe command `mk_simp_attribute simp_name "description"` creates a simp set with name `simp_name`.
Lemmas tagged with `@[simp_name]` will be included when `simp with simp_name` is called.
`mk_simp_attribute simp_name none` will use a default description.

Appending the command with `with attr1 attr2 ...` will include all declarations tagged with
`attr1`, `attr2`, ... in the new simp set.ATTR�����bUSR_CMD�bEndFile