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�Eb�minitlogicbasic�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_assocdecltacticinhabited_instancederive_handlerid_rhsinstance_derive_handlernamemk_string
Strinhabitednameanonymous tacticmonadto_has_bindinteraction_monadmonadtactic_stateunit}applyc
StrmkFapply_cfgmkFtransparencysemireducibleboolttFnew_goalsnon_dep_first_xhas_orelseorelsealternativeto_has_orelsetacticalternativehas_bindseqtacticsave_infoposmkbit0natnathas_addbit19nathas_one;A<<has_oneone9?E�step�interactiverefine
Quote
STIhas_bindand_thenlistprodnameexpr}constructor&}skip_x}all_goals0
Strdefault&}reads}failformatformathas_to_formathas_appendappendxformathas_appendto_fmtstringstringhas_to_format
Strcould not find inhabited instance for:
�tactic_statehas_to_format_xZ_xX]has_purepureapplicativeto_has_purealternativeto_applicative-]�PInfo~#VMR~_lambda_1VMR~_lambda_2VMR~_lambda_3VMR~_lambda_4VMR~_lambda_5VMR~_lambda_6VMR~VMC�#αVMC�#st₂t₁βα�	VMC�#�tacticconstructor	tacticskipVMC��#�ccharof_nat_c_1o�_c_2d�_c_3 �_c_4n�_c_5t�_c_6f�_c_7i�_c_8a�	_c_9e�
_c_10�to_fmt
�:�r�
	s�
b�	h�l�u�stringemptystringstr��������������������������������������stringhas_to_format�formatcompose�?fail
VMC��#�nameanonymousd�e�t�i�b�a�h�n�i�����������namemk_stringk�m�����Fapplyc	G��QtacticinteractiverefineFstep&Fsave_info��has_bindseqinteraction_monad_orelse	Z���t�l�u�a�f�e�d������������Fall_goals�VMC�#sa]���ZVMC~5#���d�e�t�i�b�a�h�n�i������������instance_derive_handlerdoc~Tries to derive an `inhabited` instance for inductives and structures.

For example:
```lean
@[derive inhabited]
structure foo :=
(a : ℕ := 42)
(b : list ℕ)
```
Here, `@[derive inhabited]` adds the instance `foo.inhabited`, which is defined as
`⟨⟨42, default (list ℕ)⟩⟩`.  For inductives, the default value is the first constructor.

If the structure/inductive has a type parameter `α`, then the generated instance will have an
argument `inhabited α`, even if it is not used.  (This is due to the implementation using
`instance_derive_handler`.)ATTRderive_handler��~unitstarATTRderive��vm_decl_kindlistconspexpr
Quoteinhabitedlistnil�decl�inhabitedinhabited�inhabitedmk�vm_decl_kindbytecode�VMR�VMC�ATTRinstance���inhabitedclass����ATTR���vm_obj_kind�decl�inhabited����vm_obj_kindsimple�VMR�VMC�ATTR����inhabitedclassinhabited���ATTR���tacticnew_goals�decl�"inhabited��"��!�VMR�#VMC�#ATTR����"inhabitedclassinhabited�$��ATTR���tactictransparency�decl�'inhabited��'���all�VMR�(VMC�(ATTR����'inhabitedclassinhabited�*��ATTR���tacticapply_cfg�decl�-inhabited��-��&�VMR�.VMC�.	ATTR����-inhabitedclassinhabited�/��ATTR���smt_pre_config�decl�1inhabited��1��smt_pre_configmk
Strpre_smt<<<<<<A<<A<<<<A<AAADboolff�VMR�2VMC�2*�t�m�s�_�e�r�p�����������B@ATTR����1inhabitedclassinhabited�7��ATTR���ematch_config�decl�9inhabited��9��ematch_configmk<<<<A<<<AH<AE�VMR�:VMC�:�'
ATTR����9inhabitedclassinhabited�=��ATTR���cc_config�decl�?inhabited��?��cc_configmkoptionnoneXZ�VMR�@VMC�@ATTR����?inhabitedclassinhabited�E��ATTR���smt_config�decl�Ginhabited��G��	smt_configmk���
Strematch�VMR�HVMC�HT�'
�t�m�s�_�e�r�p�����������B@�h�c�t�a�m�e���������ATTR����Ginhabitedclassinhabited�K��ATTR���rsimpconfig�decl�Ninhabited��N��rsimpconfigmk
Strrsimp_attr<F�VMR�OVMC�O8�r�t�t�a�_�p�m�i�s�r�������������ATTR����Ninhabitedclassinhabited�S��ATTR���tacticdunfold_config�decl�Vinhabited��V�� tacticdunfold_configmktacticdsimp_configmk�Xtransparencyinstancessimpdefault_max_steps���VMR�WVMC�W�aATTR����Vinhabitedclassinhabited�b��ATTR���tacticdsimp_config�decl�einhabited��e��5�$tactictransparencyreducible�'���VMR�fVMC�f�aATTR����einhabitedclassinhabited�j��ATTR���tacticunfold_proj_config�decl�minhabited��m��F�Xunfold_proj_configmk�2�VMR�nVMC�n�aATTR����minhabitedclassinhabited�q��ATTR���tacticsimp_intros_config�decl�tinhabited��t��L�Xsimp_intros_configmk�Xsimp_configmk�'������VMR�uVMC�u�aATTR����tinhabitedclassinhabited�z��ATTR���tacticdelta_config�decl�}inhabited��}��d�Xdelta_configmk�'�VMR�~VMC�~�aATTR����}inhabitedclassinhabited����ATTR���tacticsimp_config�decl��inhabited�����k�`�VMR��VMC���aATTR�����inhabitedclassinhabited����ATTR���tacticrewrite_cfg�decl��inhabited�����otacticrewrite_cfgmk�8!�occurrencesall�VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���interactiveloc�decl��inhabited�����interactivelocwildcard�VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���tacticunfold_config�decl��inhabited�������unfold_configmk�S���������VMR��VMC���aATTR�����inhabitedclassinhabited����ATTR���param_info�decl��inhabited������param_infomkdefaultboolboolinhabited��������X9listinhabited9�VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���subsingleton_info�decl��inhabited������subsingleton_infomk�����VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���fun_info�decl��inhabited������fun_infomk��X���������VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���formatcolor�decl��inhabited������formatcolorred�VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���pos�decl��inhabited������7��9natinhabited���VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���environmentprojection_info�decl��inhabited������environmentprojection_infomk��Znameinhabited�������VMR��VMC���ATTR�����inhabitedclassinhabited����ATTR���reducibility_hints�decl��inhabited������reducibility_hintsopaque�VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���congr_arg_kind�decl��inhabited������congr_arg_kindfixed�VMR��VMC��ATTR�����inhabitedclassinhabited����ATTR���ulift�decl��inhabitedrs�ainhabited���������������inhabitedmk	��uliftup��default����VMR��VMC������ATTR�����inhabitedclass������ATTR���plift�decl��inhabitedu�ainhabited
���
��
����������inhabitedmk��pliftup
��default
����VMR��VMC������ATTR�����inhabitedclass������ATTR���string_imp�decl��inhabited�����
string_impmk��Xchar����VMR��VMC��string_impmkATTR�����inhabitedclassinhabited����ATTR���stringiterator_imp�decl�inhabited����stringiterator_impmk���VMR�VMC�stringiterator_impmkATTR����inhabitedclassinhabited���ATTR���rbnodecolor�decl�inhabited����rbnodecolorred�VMR�VMC�ATTR����inhabitedclassinhabited���ATTR���ordering�decl�inhabited����!orderinglt�VMR�VMC�ATTR����inhabitedclassinhabited���ATTR���unification_constraint�decl�inhabiteduinhabited��inhabitedmk�'unification_constraintmkdefaultsortinhabited� �0sortinhabited'�5�VMR�VMC�ATTR����inhabitedclass��%��ATTR���pprod�decl�&inhabited�vα��a��β�(ainhabited��-��&���)���*���+�9a_1�;inhabitedmk�@pprodmk�>����>default����VMR�'VMC�'�.�+�*�)ATTR����&inhabitedclass�-�4��ATTR���unification_hint�decl�5inhabitedu_1u_2inhabited�7�8�5inhabitedmk�Yunification_hintmkdefaultunification_constraint�%�>listunification_constraint���f�VMR�6VMC�6ATTR����5inhabitedclass�9�B��declbin_treeinhabitedu_1α�Einhabited!�C ��F�ninhabitedmk!�qbin_treeempty ��PInfo�DD	prt�DVMR�DVMC�DD	�Fdecl�Dequations_eqn_1�E�F�neq!�r�D�E��x�F�neqrefl#�r�}�PInfo�MD	ATTR_refl_lemma���MEqnL�MSEqnL�DATTR����Dclass�G�D��declunsignedinhabited��R���has_zerozero��unsignedhas_zero
�PInfo�SF	prt�SVMR�SVMC�SF	4294967295finof_natdecl�Sequations_eqn_1�N"���S���P"�����PInfo�[F	ATTR�Q���[EqnL�[SEqnL�SATTR����Sclassinhabited�S��declstringiteratorinhabited��^stringiterator_impinhabited�PInfo�_G	prt�_VMR�_VMC�_G	�decl�_equations_eqn_1�����_���������PInfo�dG	ATTR�Q���dEqnL�dSEqnL�_ATTR����_classinhabited�_��declrbnodeinhabitedu_1α�n�o�f�h��i�n�t��rbnodeleaf%��PInfo�gI	prt�gVMR�gVMC�gI	�idecl�gequations_eqn_1�h�i�n�z���g�h����i�n�������PInfo�mI	ATTR�Q���mEqnL�mSEqnL�gATTR����gclassinhabited�g��declrbtreeinhabitedu_1α�nltauto_param�qa��u��
Strdefault_lt
Strrbtree�o�o'����r�n�s���t��mk_rbtree'����PInfo�pJ	prt�pVMR�pVMC�pJ	�s�rmk_rbtreedecl�pequations_eqn_1�q�r�n�s���z���p�q������r�n�s���������PInfo�yJ	ATTR�Q���yEqnL�ySEqnL�pATTR����pclassinhabited�p��declrbmapinhabitedu_1u_2α�nβ�~lt��a�����L����inhabited�},�{.,�L�����n���������I0��mk_rbmap.,�L����PInfo�|K	prt�|VMR�|VMC�|K	�����mk_rbmapdecl�|equations_eqn_1�}�~��n���������N"0���|�}�~�L�������n���������P1�����PInfo��K	ATTR�Q����EqnL��SEqnL�|ATTR����|class���|��EndFile