Coercions and lifts #
The elaborator tries to insert coercions automatically.
Only instances of has_coe
type class are considered in the process.
Lean also provides a "lifting" operator: ↑a
.
It uses all instances of has_lift
type class.
Every has_coe
instance is also a has_lift
instance.
We recommend users only use has_coe
for coercions that do not produce a lot
of ambiguity.
All coercions and lifts can be identified with the constant coe
.
We use the has_coe_to_fun
type class for encoding coercions from
a type to a function space.
We use the has_coe_to_sort
type class for encoding coercions from
a type to a sort.
- lift : a → b
Can perform a lifting operation ↑a
.
Instances of this typeclass
Instances of other typeclasses for has_lift
- has_lift.has_sizeof_inst
We specify the universes in has_coe
, has_coe_to_fun
, and has_coe_to_sort
explicitly in order to match exactly what appears in Lean4.
- coe : a → b
Instances of this typeclass
- ring_equiv.has_coe_to_non_unital_ring_hom
- coe_bool_to_Prop
- coe_subtype
- string_to_name
- nat_to_format
- string_to_format
- expr.has_coe
- tactic.opt_to_tac
- tactic.ex_to_tac
- lean.parser.has_coe
- smt_tactic.has_coe
- list.bin_tree_to_list
- int.has_coe
- native.float.of_nat_coe
- native.float.of_int_coe
- json.string_coe
- json.int_coe
- json.float_coe
- json.bool_coe
- json.array_coe
- widget.component.has_coe
- widget.html.list_coe
- units.has_coe
- add_units.has_coe
- monoid_hom.has_coe_to_one_hom
- add_monoid_hom.has_coe_to_zero_hom
- monoid_hom.has_coe_to_mul_hom
- add_monoid_hom.has_coe_to_add_hom
- monoid_with_zero_hom.has_coe_to_monoid_hom
- monoid_with_zero_hom.has_coe_to_zero_hom
- equiv.coe_embedding
- equiv.perm.coe_embedding
- ring_hom.has_coe_monoid_hom
- rel_embedding.rel_hom.has_coe
- rel_iso.rel_embedding.has_coe
- fin.fin_to_nat
- multiset.has_coe
- coe_pnat_nat
- sym.has_coe
- tactic.abel.expr.has_coe
- ring_equiv.has_coe_to_ring_hom
- distrib_mul_action_hom.has_coe
- distrib_mul_action_hom.has_coe'
- mul_semiring_action_hom.has_coe
- mul_semiring_action_hom.has_coe'
- distrib_mul_action_hom.linear_map.has_coe
- linear_equiv.linear_map.has_coe
- linear_map.coe_is_scalar_tower
- alg_hom.coe_ring_hom
- alg_hom.coe_monoid_hom
- alg_hom.coe_add_monoid_hom
- alg_equiv.has_coe_to_ring_equiv
- non_unital_alg_hom.distrib_mul_action_hom.has_coe
- non_unital_alg_hom.mul_hom.has_coe
- alg_hom.non_unital_alg_hom.has_coe
- part.has_coe
- omega_complete_partial_order.order_hom.has_coe
- tactic.ring.expr.has_coe
- linarith.preprocessor_to_gb_preprocessor
- linarith.global_preprocessor_to_gb_preprocessor
- con.to_submonoid
- add_con.to_add_submonoid
- nat.primes.coe_nat
- cycle.has_coe
- initial_seg.rel_embedding.has_coe
- principal_seg.rel_embedding.has_coe
- principal_seg.has_coe_initial_seg
- alternating_map.multilinear_map.has_coe
- homeomorph.continuous_map.has_coe
- nnreal.real.has_coe
- ennreal.has_coe
- complex.has_coe
- continuous_linear_map.linear_map.has_coe
- continuous_linear_equiv.continuous_linear_map.has_coe
- ereal.has_coe
- ereal.has_coe_ennreal
- affine_equiv.equiv.has_coe
- affine_equiv.affine_map.has_coe
- ray_vector.has_coe
- path.continuous_map.has_coe
- matrix.unitary_group.coe_matrix
- matrix.special_linear_group.has_coe_to_matrix
- matrix.special_linear_group.has_coe
- matrix.special_linear_group.has_coe_to_general_linear_group
- matrix.special_linear_group.matrix.GL_pos.has_coe
- mv_polynomial.coe_to_mv_power_series
- polynomial.coe_to_power_series
- laurent_series.has_coe
- ratfunc.coe_to_laurent_series
- free_ring.free_comm_ring.has_coe
- widget.string_to_html
- tactic.norm_fin.eval_fin_m.has_coe
- snum.has_coe
- int.snum_coe
- category_theory.arrow.has_coe
- old_conv.has_coe
- CommMon.Mon.has_coe
- AddCommMon.Mon.has_coe
- Group.Mon.has_coe
- AddGroup.Mon.has_coe
- CommGroup.Group.has_coe
- AddCommGroup.Group.has_coe
- CommGroup.CommMon.has_coe
- AddCommGroup.CommMon.has_coe
- category_theory.prelax_functor.has_coe_to_prefunctor
- category_theory.oplax_functor.has_coe_to_prelax
- category_theory.pseudofunctor.has_coe_to_prelax_functor
- category_theory.pseudofunctor.has_coe_to_oplax
- Module.has_coe
- category_theory.mono_over.has_coe
- category_theory.subobject.has_coe
- measure_theory.finite_measure.measure_theory.measure.has_coe
- measure_theory.probability_measure.measure_theory.measure.has_coe
- category_theory.coe_monad
- category_theory.coe_comonad
- continuous_affine_map.affine_map.has_coe
- continuous_affine_map.continuous_map.has_coe
- pfun.has_coe
- trivialization.pretrivialization.has_coe
- locally_constant.continuous_map.has_coe
- lp.pi.has_coe
- vector_bundle_core.to_fiber_bundle_core_coe
- derivation.has_coe_to_linear_map
- category_theory.grothendieck_topology.cover.category_theory.sieve.has_coe
- category_theory.grothendieck_topology.category_theory.functor.obj.has_coe
- Algebra.has_coe
- schwartz_map.pi.has_coe
- quaternion.has_coe
- abs_convex_open_sets.has_coe
- module.End.has_coe
- upper_half_plane.has_coe
- upper_half_plane.matrix.GL_pos.has_coe
- cont_mdiff_map.continuous_map.has_coe
- continuous_linear_map.has_coe_to_cont_mdiff_map
- complex.unit_disc.has_coe
- proper_cone.convex_cone.has_coe
- ring_invo.has_coe_to_ring_equiv
- fractional_ideal.submodule.has_coe
- padic_int.padic.has_coe
- dedekind_domain.finite_integral_adeles.dedekind_domain.prod_adic_completions.has_coe
- lie_hom.linear_map.has_coe
- lie_equiv.has_coe_to_lie_hom
- lie_equiv.has_coe_to_linear_equiv
- lie_module_hom.linear_map.has_coe
- lie_module_equiv.has_coe_to_equiv
- lie_module_equiv.has_coe_to_lie_module_hom
- lie_module_equiv.has_coe_to_linear_equiv
- submodule.has_coe
- lie_submodule.coe_submodule
- lie_subalgebra.has_coe
- alg_hom.lie_hom.has_coe
- nat.arithmetic_function.nat_coe
- nat.arithmetic_function.int_coe
- order.pfilter.set.has_coe
- heyting.regular.has_coe
- stream.seq.coe_list
- stream.seq.coe_stream
- stream.seq.coe_lazy_list
- stream.seq1.coe_seq
- generalized_continued_fraction.pair.has_coe_to_generalized_continued_fraction_pair
- generalized_continued_fraction.has_coe_to_generalized_continued_fraction
- simple_continued_fraction.has_coe_to_generalized_continued_fraction
- continued_fraction.has_coe_to_simple_continued_fraction
- continued_fraction.has_coe_to_generalized_continued_fraction
- generalized_continued_fraction.int_fract_pair.has_coe_to_int_fract_pair
- pell.solution₁.zsqrtd.has_coe
- gaussian_int.complex.has_coe
- nat.primes.coe_pnat
- diffeomorph.cont_mdiff_map.has_coe
- left_invariant_derivation.derivation.has_coe
- euclidean_geometry.set.has_coe
- pgame.equiv.has_coe
- pSet.set.has_coe
- Class.has_coe
- symplectic_group.coe_matrix
- quadratic_form.isometry.linear_equiv.has_coe
- nnrat.rat.has_coe
- stream.wseq.coe_seq
- stream.wseq.coe_list
- stream.wseq.coe_stream
- multiset.has_coe_to_sort.has_coe
- prime_multiset.coe_nat
- prime_multiset.coe_pnat
- prime_multiset.coe_multiset_pnat_nat
- first_order.language.elementary_substructure.first_order.language.substructure.has_coe
- algebraic_geometry.PresheafedSpace.coe_carrier
- algebraic_geometry.SheafedSpace.coe_carrier
- sylow.subgroup.has_coe
- counterexample.from_Bhavik.rat.has_coe
- miu.string_coe_miustr
- efmt.has_coe
- efmt.coe_format
- json.has_coe
Instances of other typeclasses for has_coe
- has_coe.has_sizeof_inst
- coe : a → b
Auxiliary class that contains the transitive closure of has_coe
.
Instances of this typeclass
- con.quotient.has_coe_t
- add_con.quotient.has_coe_t
- coe_trans
- nat.cast_coe
- int.cast_coe
- rat.cast_coe
- pos_num_coe
- num_nat_coe
- znum_coe
- zmod.has_coe_t
- is_R_or_C.algebra_map_coe
- coe_base
- coe_option
- widget.html.to_string_coe
- equiv.has_coe_t
- one_hom.has_coe_t
- zero_hom.has_coe_t
- mul_hom.has_coe_t
- add_hom.has_coe_t
- monoid_hom.has_coe_t
- add_monoid_hom.has_coe_t
- monoid_with_zero_hom.has_coe_t
- complementeds.has_coe_t
- with_bot.has_coe_t
- with_top.has_coe_t
- non_unital_ring_hom.has_coe_t
- ring_hom.has_coe_t
- mul_equiv.has_coe_t
- add_equiv.has_coe_t
- order_iso.has_coe_t
- order_hom_class.order_hom.has_coe_t
- with_one.has_coe_t
- with_zero.has_coe_t
- finset.set.has_coe_t
- top_hom.has_coe_t
- bot_hom.has_coe_t
- bounded_order_hom.has_coe_t
- sup_hom.has_coe_t
- inf_hom.has_coe_t
- sup_bot_hom.has_coe_t
- inf_top_hom.has_coe_t
- lattice_hom.has_coe_t
- bounded_lattice_hom.has_coe_t
- ring_equiv.has_coe_t
- set_like.set.has_coe_t
- alg_hom_class.alg_hom.has_coe_t
- alg_equiv_class.alg_equiv.has_coe_t
- non_unital_alg_hom_class.non_unital_alg_hom.has_coe_t
- Sup_hom.has_coe_t
- Inf_hom.has_coe_t
- frame_hom.has_coe_t
- complete_lattice_hom.has_coe_t
- enat.has_coe_t
- quotient_group.has_quotient.quotient.has_coe_t
- quotient_add_group.has_quotient.quotient.has_coe_t
- valuation.has_coe_t
- ring_con.quotient.has_coe_t
- adjoin_root.has_coe_t
- intermediate_field.adjoin.field_coe
- intermediate_field.adjoin.set_coe
- ultrafilter.filter.has_coe_t
- connected_components.has_coe_t
- continuous_map.has_coe_t
- uniform_space.completion.has_coe_t
- locally_bounded_map.has_coe_t
- linear_isometry_equiv.continuous_linear_equiv.has_coe_t
- linear_isometry_equiv.continuous_linear_map.has_coe_t
- non_unital_star_alg_hom_class.non_unital_star_alg_hom.has_coe_t
- star_alg_hom_class.star_alg_hom.has_coe_t
- sign_type.has_coe_t
- cocompact_map_class.cocompact_map.has_coe_t
- add_circle.has_coe_t
- real.angle.has_coe_t
- box_integral.box.set.has_coe_t
- box_integral.box.with_bot_coe
- filter.product.has_coe_t
- filter.germ.has_coe_t
- bounded_continuous_function.has_coe_t
- open_subgroup.has_coe_subgroup
- open_add_subgroup.has_coe_add_subgroup
- open_subgroup.has_coe_opens
- open_add_subgroup.has_coe_opens
- quiver.weakly_connected_component.has_coe_t
- category_theory.idempotents.karoubi.coe
- alexandroff.has_coe_t
- bundle.total_space.has_coe_t
- spectral_map.has_coe_t
- continuous_order_hom.has_coe_t
- pseudo_epimorphism.has_coe_t
- esakia_hom.has_coe_t
- continuous_open_map.has_coe_t
- zero_at_infty_continuous_map.has_coe_t
- category_theory.action_category.has_coe_t
- quaternion_algebra.has_coe_t
- quaternion.has_coe_t
- double_centralizer.has_coe_t
- fractional_ideal.has_coe_t
- nonempty_interval.set.has_coe_t
- interval.has_coe_t
- heyting_hom.has_coe_t
- coheyting_hom.has_coe_t
- biheyting_hom.has_coe_t
- computation.has_coe_t
- slash_invariant_form.has_coe_t
- order_monoid_hom.has_coe_t
- order_add_monoid_hom.has_coe_t
- order_monoid_with_zero_hom.has_coe_t
- order_ring_hom.has_coe_t
- order_ring_iso.has_coe_t
- equal_char_zero.pnat_has_coe_units
- centroid_hom.has_coe_t
- unitization.has_coe_t
- hyperreal.has_coe_t
- enat.has_coe_ennreal
- first_order.language.has_coe_t
Instances of other typeclasses for has_coe_t
- has_coe_t.has_sizeof_inst
- coe : Π (x : a), F x
Instances of this typeclass
- coe_fn_trans
- fun_like.has_coe_to_fun
- slash_invariant_form.slash_invariant_form_class.coe_to_fun
- expr.has_coe_to_fun
- widget.component.has_coe_to_fun
- widget.tc.has_coe_to_fun
- applicative_transformation.has_coe_to_fun
- equiv.has_coe_to_fun
- one_hom.has_coe_to_fun
- zero_hom.has_coe_to_fun
- mul_hom.has_coe_to_fun
- add_hom.has_coe_to_fun
- monoid_hom.has_coe_to_fun
- add_monoid_hom.has_coe_to_fun
- monoid_with_zero_hom.has_coe_to_fun
- additive.has_coe_to_fun
- multiplicative.has_coe_to_fun
- function.embedding.has_coe_to_fun
- non_unital_ring_hom.has_coe_to_fun
- ring_hom.has_coe_to_fun
- mul_equiv.has_coe_to_fun
- add_equiv.has_coe_to_fun
- rel_hom.has_coe_to_fun
- rel_embedding.has_coe_to_fun
- rel_iso.has_coe_to_fun
- order_hom.has_coe_to_fun
- top_hom.has_coe_to_fun
- bot_hom.has_coe_to_fun
- bounded_order_hom.has_coe_to_fun
- sup_hom.has_coe_to_fun
- inf_hom.has_coe_to_fun
- sup_bot_hom.has_coe_to_fun
- inf_top_hom.has_coe_to_fun
- lattice_hom.has_coe_to_fun
- bounded_lattice_hom.has_coe_to_fun
- tactic.abel.normal_expr.has_coe_to_fun
- ring_equiv.has_coe_to_fun
- mul_action_hom.has_coe_to_fun
- distrib_mul_action_hom.has_coe_to_fun
- mul_semiring_action_hom.has_coe_to_fun
- linear_map.has_coe_to_fun
- linear_equiv.has_coe_to_fun
- dfinsupp.has_coe_to_fun
- finsupp.has_coe_to_fun
- absolute_value.has_coe_to_fun
- alg_hom.has_coe_to_fun
- alg_equiv.has_coe_to_fun
- non_unital_alg_hom.has_coe_to_fun
- omega_complete_partial_order.chain.has_coe_to_fun
- omega_complete_partial_order.continuous_hom.has_coe_to_fun
- monoid_algebra.has_coe_to_fun
- add_monoid_algebra.has_coe_to_fun
- tactic.ring.horner_expr.has_coe_to_fun
- con.has_coe_to_fun
- add_con.has_coe_to_fun
- Sup_hom.has_coe_to_fun
- Inf_hom.has_coe_to_fun
- frame_hom.has_coe_to_fun
- complete_lattice_hom.has_coe_to_fun
- linear_pmap.has_coe_to_fun
- valuation.has_coe_to_fun
- add_valuation.has_coe_to_fun
- ring_con.has_coe_to_fun
- direct_sum.has_coe_to_fun
- principal_seg.has_coe_to_fun
- multilinear_map.has_coe_to_fun
- alternating_map.has_coe_to_fun
- compact_exhaustion.has_coe_to_fun
- homeomorph.has_coe_to_fun
- uniform_equiv.has_coe_to_fun
- continuous_map.has_coe_to_fun
- cau_seq.has_coe_to_fun
- group_seminorm.has_coe_to_fun
- add_group_seminorm.has_coe_to_fun
- nonarch_add_group_seminorm.has_coe_to_fun
- group_norm.has_coe_to_fun
- add_group_norm.has_coe_to_fun
- nonarch_add_group_norm.has_coe_to_fun
- locally_bounded_map.has_coe_to_fun
- isometry_equiv.has_coe_to_fun
- normed_add_group_hom.has_coe_to_fun
- continuous_linear_map.to_fun
- continuous_linear_equiv.has_coe_to_fun
- linear_isometry.has_coe_to_fun
- linear_isometry_equiv.has_coe_to_fun
- non_unital_star_alg_hom.has_coe_to_fun
- star_alg_hom.has_coe_to_fun
- star_alg_equiv.has_coe_to_fun
- measure_theory.outer_measure.has_coe_to_fun
- measure_theory.measure.has_coe_to_fun
- measurable_equiv.has_coe_to_fun
- linear_map.general_linear_group.has_coe_to_fun
- measure_theory.simple_func.has_coe_to_fun
- cocompact_map.has_coe_to_fun
- stieltjes_function.has_coe_to_fun
- measure_theory.content.has_coe_to_fun
- affine_map.has_coe_to_fun
- affine_equiv.has_coe_to_fun
- module.dual.has_coe_to_fun
- bilin_form.has_coe_to_fun
- closure_operator.has_coe_to_fun
- lower_adjoint.has_coe_to_fun
- path.has_coe_to_fun
- affine_isometry.has_coe_to_fun
- affine_isometry_equiv.has_coe_to_fun
- local_equiv.has_coe_to_fun
- local_homeomorph.has_coe_to_fun
- seminorm.has_coe_to_fun
- continuous_multilinear_map.has_coe_to_fun
- continuous_linear_map.nonlinear_right_inverse.has_coe_to_fun
- composition_series.has_coe_to_fun
- matrix.unitary_group.coe_fun
- orthonormal_basis.has_coe_to_fun
- box_integral.box_additive_map.has_coe_to_fun
- continuous_functions.set_of.has_coe_to_fun
- bounded_continuous_function.has_coe_to_fun
- measure_theory.ae_eq_fun.has_coe_to_fun
- measure_theory.Lp.has_coe_to_fun
- matrix.special_linear_group.has_coe_to_fun
- matrix.general_linear_group.has_coe_to_fun
- weak_dual.has_coe_to_fun
- normed_space.dual.has_coe_to_fun
- polynomial.gal.has_coe_to_fun
- hahn_series.summable_family.has_coe_to_fun
- measure_theory.vector_measure.has_coe_to_fun
- measure_theory.filtration.has_coe_to_fun
- probability_theory.kernel.has_coe_to_fun
- simplex_category.to_Top_obj.has_coe_to_fun
- measure_theory.finite_measure.has_coe_to_fun
- measure_theory.probability_measure.has_coe_to_fun
- continuous_affine_map.has_coe_to_fun
- shrinking_lemma.partial_refinement.has_coe_to_fun
- partition_of_unity.has_coe_to_fun
- bump_covering.has_coe_to_fun
- pretrivialization.has_coe_to_fun
- trivialization.has_coe_to_fun
- topological_space.opens.opens_hom_has_coe_to_fun
- locally_constant.has_coe_to_fun
- spectral_map.has_coe_to_fun
- lp.has_coe_to_fun
- dilation.has_coe_to_fun
- continuous_map.homotopy.has_coe_to_fun
- continuous_map.homotopy_with.has_coe_to_fun
- path.homotopy.has_coe_to_fun
- continuous_map.homotopy_equiv.has_coe_to_fun
- continuous_order_hom.has_coe_to_fun
- pseudo_epimorphism.has_coe_to_fun
- esakia_hom.has_coe_to_fun
- continuous_open_map.has_coe_to_fun
- UniformSpace.quiver.hom.has_coe_to_fun
- Compactum.quiver.hom.has_coe_to_fun
- topological_space.open_nhds.opens_nhds_hom_has_coe_to_fun
- continuous_monoid_hom.has_coe_to_fun
- continuous_add_monoid_hom.has_coe_to_fun
- derivation.has_coe_to_fun
- zero_at_infty_continuous_map.has_coe_to_fun
- category_theory.sieve.has_coe_to_fun
- category_theory.grothendieck_topology.has_coe_to_fun
- category_theory.grothendieck_topology.cover.has_coe_to_fun
- category_theory.pretopology.has_coe_to_fun
- category_theory.meq.has_coe_to_fun
- flow.has_coe_to_fun
- circle_deg1_lift.has_coe_to_fun
- circle_deg1_lift.units_has_coe_to_fun
- schwartz_map.has_coe_to_fun
- cont_diff_bump.has_coe_to_fun
- hilbert_basis.has_coe_to_fun
- polynomial_module.has_coe_to_fun
- picard_lindelof.has_coe_to_fun
- picard_lindelof.fun_space.has_coe_to_fun
- enorm.has_coe_to_fun
- ring_seminorm.has_coe_to_fun
- ring_norm.has_coe_to_fun
- mul_ring_seminorm.has_coe_to_fun
- mul_ring_norm.has_coe_to_fun
- model_with_corners.has_coe_to_fun
- ring_invo.has_coe_to_fun
- lie_hom.has_coe_to_fun
- lie_equiv.has_coe_to_fun
- lie_module_hom.has_coe_to_fun
- lie_module_equiv.has_coe_to_fun
- nat.arithmetic_function.has_coe_to_fun
- heyting_hom.has_coe_to_fun
- coheyting_hom.has_coe_to_fun
- biheyting_hom.has_coe_to_fun
- mul_char.coe_to_fun
- add_char.has_coe_to_fun
- poly.has_coe_to_fun
- slash_invariant_form.has_coe_to_fun
- number_field.infinite_place.has_coe_to_fun
- diffeomorph.has_coe_to_fun
- smooth_bump_function.has_coe_to_fun
- smooth_monoid_morphism.has_coe_to_fun
- smooth_add_monoid_morphism.has_coe_to_fun
- smooth_partition_of_unity.has_coe_to_fun
- smooth_bump_covering.has_coe_to_fun
- cont_mdiff_section.has_coe_to_fun
- left_invariant_derivation.has_coe_to_fun
- structure_groupoid.local_invariant_prop.sheaf_has_coe_to_fun
- order_monoid_hom.has_coe_to_fun
- order_add_monoid_hom.has_coe_to_fun
- order_monoid_with_zero_hom.has_coe_to_fun
- shelf_hom.has_coe_to_fun
- order_ring_hom.has_coe_to_fun
- order_ring_iso.has_coe_to_fun
- freiman_hom.has_coe_to_fun
- add_freiman_hom.has_coe_to_fun
- centroid_hom.has_coe_to_fun
- category_theory.Module.coextend_scalars.obj'.has_coe_to_fun
- category_theory.Module.coextend_scalars.obj.has_coe_to_fun
- quadratic_form.has_coe_to_fun
- quadratic_form.isometry.has_coe_to_fun
- turing.pointed_map.has_coe_to_fun
- combinatorics.line.has_coe_to_fun
- simple_graph.connected.has_coe_to_fun
- ssyt.has_coe_to_fun
- cfilter.has_coe_to_fun
- ctop.has_coe_to_fun
- first_order.language.hom.has_coe_to_fun
- first_order.language.embedding.has_coe_to_fun
- first_order.language.equiv.has_coe_to_fun
- first_order.language.elementary_embedding.has_coe_to_fun
- algebraic_geometry.PresheafedSpace.quiver.hom.has_coe_to_fun
- counterexample.phillips_1940.bounded_additive_measure.has_coe_to_fun
Instances of other typeclasses for has_coe_to_fun
- has_coe_to_fun.has_sizeof_inst
- coe : a → S
Instances of this typeclass
- coe_sort_trans
- set_like.has_coe_to_sort
- coe_sort_bool
- set.has_coe_to_sort
- finset.has_coe_to_sort
- category_theory.induced_category.has_coe_to_sort
- wide_subquiver_has_coe_to_sort
- category_theory.bundled.has_coe_to_sort
- category_theory.Cat.has_coe_to_sort
- Mon.has_coe_to_sort
- AddMon.has_coe_to_sort
- CommMon.has_coe_to_sort
- AddCommMon.has_coe_to_sort
- Group.has_coe_to_sort
- AddGroup.has_coe_to_sort
- CommGroup.has_coe_to_sort
- AddCommGroup.has_coe_to_sort
- Module.has_coe_to_sort
- Rep.has_coe_to_sort
- fdRep.has_coe_to_sort
- Fintype.has_coe_to_sort
- Preord.has_coe_to_sort
- PartOrd.has_coe_to_sort
- FinPartOrd.has_coe_to_sort
- Lat.has_coe_to_sort
- LinOrd.has_coe_to_sort
- NonemptyFinLinOrd.has_coe_to_sort
- Top.has_coe_to_sort
- Meas.has_coe_to_sort
- discrete_quotient.has_coe_to_sort
- category_theory.Groupoid.has_coe_to_sort
- UniformSpace.has_coe_to_sort
- CpltSepUniformSpace.has_coe_to_sort
- SemiRing.has_coe_to_sort
- Ring.has_coe_to_sort
- CommSemiRing.has_coe_to_sort
- CommRing.has_coe_to_sort
- TopCommRing.has_coe_to_sort
- Born.has_coe_to_sort
- CompHaus.has_coe_to_sort
- Frm.has_coe_to_sort
- Locale.has_coe_to_sort
- Profinite.has_coe_to_sort
- Compactum.has_coe_to_sort
- category_theory.Mat.has_coe_to_sort
- Pointed.has_coe_to_sort
- Bipointed.has_coe_to_sort
- Twop.has_coe_to_sort
- category_theory.Quiv.has_coe_to_sort
- PartialFun.has_coe_to_sort
- Algebra.has_coe_to_sort
- SemiNormedGroup.has_coe_to_sort
- SemiNormedGroup₁.has_coe_to_sort
- BddOrd.has_coe_to_sort
- SemilatSup.has_coe_to_sort
- SemilatInf.has_coe_to_sort
- BddLat.has_coe_to_sort
- DistLat.has_coe_to_sort
- BddDistLat.has_coe_to_sort
- HeytAlg.has_coe_to_sort
- BoolAlg.has_coe_to_sort
- FinBddDistLat.has_coe_to_sort
- FinBoolAlg.has_coe_to_sort
- CompleteLat.has_coe_to_sort
- ωCPO.has_coe_to_sort
- GroupWithZero.has_coe_to_sort
- BoolRing.has_coe_to_sort
- Magma.has_coe_to_sort
- AddMagma.has_coe_to_sort
- Semigroup.has_coe_to_sort
- AddSemigroup.has_coe_to_sort
- multiset.has_coe_to_sort
- first_order.language.Theory.Model.has_coe_to_sort
- algebraic_geometry.LocallyRingedSpace.has_coe_to_sort
Instances of other typeclasses for has_coe_to_sort
- has_coe_to_sort.has_sizeof_inst
Equations
Instances for lift_t
- coe_decidable_eq
- has_le.le.can_lift
- subtype.can_lift
- is_unit.can_lift
- is_add_unit.can_lift
- ne_zero.coe_trans
- with_bot.can_lift
- with_top.can_lift
- with_one.can_lift
- with_zero.can_lift
- ne_zero.char_zero
- finset.finset_coe.can_lift
- ne_zero.pnat
- nat.can_lift_pnat
- int.can_lift_pnat
- rat.can_lift
- set.finite.can_lift
- enat.can_lift
- part_enat.part.dom.can_lift
- cardinal.can_lift_cardinal_nat
- is_local_ring_hom_equiv
- skew_adjoint.is_star_normal
- ultrafilter.ne_bot
- subgroup.is_closed_of_discrete
- add_subgroup.is_closed_of_discrete
- nnreal.can_lift
- ennreal.can_lift
- complex.can_lift
- invertible_of_pos
- invertible_succ
- ereal.can_lift
- topological_space.opens.is_open.can_lift
- topological_space.open_nhds_of.can_lift_set
- topological_space.compacts.is_compact.can_lift
- ideal.is_maximal.is_closed
- linear_map.can_lift_continuous_linear_map
- char_zero.fintype.card.invertible
- measure_theory.finite_measure.is_finite_measure
- measure_theory.probability_measure.measure_theory.is_probability_measure
- alexandroff.can_lift
- upper_half_plane.can_lift
- fractional_ideal.is_principal
- mv_polynomial.invertible_coe_nat
- witt_vector.inv_pair₁
- witt_vector.inv_pair₂
- nat.arithmetic_function.zeta.invertible
- interval.can_lift
- ideal.factors.is_prime
- pgame.short_nat
- nnrat.can_lift
Instances for ↥lift_t
Equations
User level coercion operators #
Equations
Equations
Notation #
Transitive closure for has_lift
, has_coe
, has_coe_to_fun
#
We add this instance directly into has_coe_t
to avoid non-termination.
Suppose coe_option had type (has_coe a (option a))
.
Then, we can loop when searching a coercion from α
to β
(has_coe_t α β)
coe_trans at (has_coe_t α β)
(has_coe α ?b₁) and (has_coe_t ?b₁ c)
coe_option at (has_coe α ?b₁)
?b₁ := option α
coe_trans at (has_coe_t (option α) β)
(has_coe (option α) ?b₂) and (has_coe_t ?b₂ β)
coe_option at (has_coe (option α) ?b₂)
?b₂ := option (option α))
...
Equations
- coe_option = {coe := λ (x : a), option.some x}
- coe : a → b
Auxiliary transitive closure for has_coe
which does not contain
instances such as coe_option
.
They would produce non-termination when combined with coe_fn_trans
and coe_sort_trans
.
Instances of this typeclass
Instances of other typeclasses for has_coe_t_aux
- has_coe_t_aux.has_sizeof_inst
Equations
- coe_trans_aux = {coe := λ (x : a), has_coe_t_aux.coe (coe_b x)}
Equations
- coe_base_aux = {coe := coe_b _inst_1}
Equations
- coe_fn_trans = {coe := λ (x : a), ⇑(has_coe_t_aux.coe x)}
Equations
- coe_sort_trans = {coe := λ (x : a), ↥(has_coe_t_aux.coe x)}
Every coercion is also a lift
Equations
- coe_to_lift = {lift := coe_t _inst_1}
Basic coercions #
Tactics such as the simplifier only unfold reducible constants when checking whether two terms are definitionally
equal or a term is a proposition. The motivation is performance.
In particular, when simplifying p -> q
, the tactic simp
only visits p
if it can establish that it is a proposition.
Thus, we mark the following instance as @[reducible]
, otherwise simp
will not visit ↑p
when simplifying ↑p -> q
.
Equations
- coe_decidable_eq x = show decidable (x = bool.tt), from bool.decidable_eq x bool.tt
Equations
- coe_subtype = {coe := subtype.val (λ (x : a), p x)}
Basic lifts #
Remark: we can't use [has_lift_t a₂ a₁]
since it will produce non-termination whenever a type class resolution
problem does not have a solution.
A dependent version of lift_fn_range
.