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��'��initdataoptiondefs�?Gexport_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_assocdeclnativerb_setinhabitedkey_inst_1has_lt_inst_2decidable_relhas_ltltinhabited}rb_set���
id_rhsinhabitedmk}mk_rb_set
a
b
�PInfoprtVMRVMC���3mk_rb_setATTRinstance��class���decl~filterkeysPabool��%�'}rb_setfold
a
mitecoe_sort&coe_sort_boolbooldecidable_eqbooltt}rb_seterase>�PInfo�	VMR�_lambda_1VMR�VMC�

��_fresh����_main	3rb_seteraseVMC�	�����folddoc�`filter s P` returns the subset of elements of `s` satisfying `P`.decl~mfilterma_inst_1monadkeys%P�>&>�N�P��%�RS-S>applicativeto_has_pure>monadto_applicative>a
m1 �to_has_bindkh??x?mcondkh
\u^u`ukx�Bh
�PInfo�	VMR�_lambda_1VMR�_lambda_2VMR�VMC� ��_fresh�Ĺ�_fresh�ĸ�_fresh�ĵ�_fresh�ĴN
_c_1�

mcondVMC������N�
VMC�	�����N�

�doc� `mfilter s P` returns the subset of elements of `s` satisfying `P`,
where the check `P` is monadic.decl~unionkeys%t��%��+/a
t1}rb_setinsert>�PInfo�#	VMR�_lambda_1VMR�VMC�$
���insertVMC�#	�����doc�`union s t` returns an rb_set containing every element that appears in either `s` or `t`.decl}rb_mapinhabitedkeydata_inst_1_inst_2

}rb_map
��������}mk_rb_map
��>�PInfo�*prt�VMR�VMC�*����3mk_rb_mapATTR����classinhabited���decl�find_defkeyvaluedefaultm�
k������optionget_or_else}rb_mapfind>
�PInfo�0	VMR�VMC�	0	�����nativerb_mapfindoptionget_or_else_maindoc� `find_def default m k` returns the value corresponding to `k` in `m`, if it exists.
Otherwise it returns `default`.decl�ifindkeyvalue_inst_1�����m�k��iget
��PInfo�5	VMR�VMC�	5	������optioniget_maindoc� `ifind m key` returns the value corresponding to `key` in `m`, if it exists.
Otherwise it returns the default value of `value`.decl�zfindkeyvalue_inst_1has_zero������m�k��has_zerozero
�PInfo�:	VMR�VMC�	:	��������doc� `zfind m key` returns the value corresponding to `key` in `m`, if it exists.
Otherwise it returns 0.decl�addkeyvalue_inst_1has_add_inst_2�_inst_3decidable_eq
m1�>m2�h>�kh�����
����
�����}rb_mapfoldkh��nkvkm�u	nv�has_addadd�u�zfind	�k
2eq���uk�!�
�}rb_maperase�'��insert�'��PInfo�>	VMR�_lambda_1VMR�VMC�A����_fresh
�.�_fresh
�,�_fresh
�+�_fresh
�*��	nativerb_mapinsertnativerb_maperaseVMC�>	��
��
����nativerb_mapfolddoc�Returns the pointwise sum of `m1` and `m2`, treating nonexistent values as 0.decl�mfilteru_1m��3_inst_1monadkeyval_inst_2�_inst_3�P��u&s�u��4�F�5�H�7�8�9��:��;�K�<��	�Lfunctormapu�to_functoru�uklistprodh>�}rb_mapof_listh>�h�k>�@mfilteruk�cfunctionuncurryh>�I}rb_mapto_listh>�PInfo�2I	VMR�2_lambda_1VMR�2VMC�I	K&_x�_fresh
�AVMC�2I	�<�;�:�9�8�7�5�43rb_mapto_list�Ilistmfilter_main�Nof_list_main


doc�2`mfilter P s` filters `s` by the monadic predicate `P` on keys and values.decl�mmap�3�4�F�5�Hkeyvalval'_inst_2
_inst_3f�us���>�4�F�5�H�V�W�X�Y���Z���[���\��U���W��Y��[�u�`�ak>���gk>�k�u�l�@mmap�u��h��_x��_a�aukprodcases_on	�u�_�a�u�a�ufst�snd��U�a�'��W���Y���[�������prodmk�'�h�{kh�PInfo�UN	VMR�U_lambda_1VMR�U_lambda_2VMR�U	VMC�fN	�c�_fresh��VMC�gP%�^�_fresh���_fresh���_fresh���f


VMC�U	N		�\�[�Z�Y�X�W�V�5�4�O�glistmmap_main�T


doc�U`mmap f s` maps the monadic function `f` over values in `s`.decl�scalekeyvalue_inst_2�_inst_3�_inst_4has_mul
bm����x�y�z��{��|���~���}rb_mapmapkhh>�k�uhhas_mulmulh
�PInfo�wS	VMR�wVMC�wS	��~�|�{�z�y�x�Nmapdoc�w`scale b m` multiplies every value in `m` by `b`.prvpp_key_data_private�[8%pp_key_datadecl��keydata_inst_2has_to_tactic_format_inst_3�kdfirst&tacticformat����������������&�j�m�interaction_monadmonadtactic_state��tacticppk>
fk��)fd�return�� �has_appendappend�formathas_append�1�1�1�126
9
;�to_fmtstringstringhas_to_format
Str�1�<
Str,formatlineformatspace�<
Str←�I�PInfo��ZVMR��VMC��CZs���&������������tacticpp	=	��	6
formatspace�!�charof_natstringemptystringstrstringhas_to_formatto_fmt���	)formatline,����������formatcompose-����������������;
	
decl�has_to_tactic_format�����������������������`has_to_tactic_formatmk�m��"�a�&��>��i�,�i���&�>;k>d>p�n�j�ip�i�#�i���ukh
�`snd�&pkd��q�s�1�`fst�&_p�i_a�i�a�&���i��b��c&��-formatgroup�1�1�<
Str⟨formatnesthas_oneonenatnathas_one�<
Str⟩�PInfo��^prt��VMR��_lambda_1VMR��_lambda_2VMR��VMC��	^s�������VMC��&a������n�����_fresh���_fresh��	 
��	
��		
VMC��0^������������������1	*�'�����������formatnest�'���������������formatgroupATTR�����class������decl}rb_lmapinhabitedkey_inst_1_inst_2
data}rb_lmap������
������}rb_lmapmk
��>�PInfo��iprt��VMR��VMC��i��������3rb_lmapmkATTR�����classinhabited����decl��of_list_mainkeydata_inst_1�_inst_2���`�a
��>�������������listcases_on�a>��`����h>����>
�>�h��a_hd��a_tl�d��kh������uka_hd_fstka_hd_sndk���u}rb_lmapinsert�u
��RecFn���ukh
�PInfo��nVMR��VMC��n���������listcases_on������insertdecl��of_list��������������
�PInfo��nprt��VMR��VMC��n����������doc��Construct a rb_lmap from a list of key-data pairsdeclname_setinhabitedname_set�%�$mk_name_set�PInfo��xprt��VMR��VMC��xmk_name_setATTR�����classinhabited����decl��filterP�name&s�$�$��,��$�$name_setfold�$a�+m�$26��9��;�$name_seterase�PInfo�{	VMR�_lambda_1VMR�VMC�
|
��$��+�_fresh
���,�	
name_seteraseVMC�{	��$��,�
name_setfolddoc�`filter P s` returns the subset of elements of `s` satisfying `P`.decl��mfiltermN_inst_1PP��+
&s�$�$�N�P��F��$�G�0�G\^`
�$a�+m>�$jhmh>�$�$x�$tkh�$>
\k^k`kh�$�k�<
�PInfo��	VMR�_lambda_1VMR�_lambda_2VMR�VMC����$�_fresh�@�+�_fresh�>�_fresh�=�_fresh�<N
_c_1�

�VMC�����+�!�$�'N�
VMC��	��$���N�

�doc� `mfilter P s` returns the subset of elements of `s` satisfying `P`,
where the check `P` is monadic.decl��mmapmN_inst_1Pf��+
�+�H�*N�+P�,�|s�$�L�N�U�(a�+m�X�_x�$p�+�$�cb�+��$name_setinsert�PInfo�)�	VMR�)_lambda_1VMR�)_lambda_2VMR�)_lambda_3VMR�)VMC�4
��1�+�_fresh
�Pq�$�_fresh
�Pl�_fresh
�PkNname_setinsert

VMC�5��0�$�_fresh
�Po�+�_fresh
�Pm�<�?N�4
VMC�6��/�.�+�G�<�?N�5
VMC�)�	�-�$�,�+�*N�6��

�doc�)`mmap f s` maps the monadic function `f` over values in `s`.decl��unions�$t�$�$�I�$�J�$�/�1a�+t�$���PInfo�H�	VMR�H_lambda_1VMR�HVMC�M�
�L�$�K�+�AVMC�H�	�J�$�I�$�M�doc�H`union s t` returns an rb_set containing every element that appears in either `s` or `t`.decl��insert_lists�$l�`�+�$�O�$�P���/listfoldr�+�$n�+s'�$���PInfo�N�	VMR�N_lambda_1VMR�NVMC�U�	�T�$�S�+�AVMC�N�	�P���O�$�Ulistfoldr_maindoc�N`insert_list s l` inserts every element of `l` into `s`.declname_mapinhabiteddataname_map�[����mk_name_map�PInfo�Z�prt�ZVMR�ZVMC�Z��[mk_name_mapATTR����Zclassinhabited�Z��EndFile