Min
The smallest of its arguments.
✓ checked against that system · ! checked, with disagreements (hover a chip)Fungrim
MinFungrim entry27766c540931737f2b75231e805c7ada7fb1Wolfram LanguageMin!SageMathenumeratio_min($*,)SymPyenumeratio_min($*,)Juliaenumeratio_min($*,)Min(a, b, …)the smallest of two or more values.Min(list)the smallest value in a list.Min()the identity element , for a call with no arguments at all.Min(finset)the smallest member of a Finset.Typed signatures
| Type | Package | Applies |
|---|---|---|
(value+) -> number | analyticreplaces compute-engine | always |
(value+) -> number | compute-engine | always |
(any*) -> any | combinatoricsreplaces analytic | always |
(any*) -> any | structuresreplaces combinatorics | always |
Details
- The smallest of its arguments, or of a single list argument.
- Multiple arguments -- lists included -- are flattened into one pool rather than compared pairwise or threaded element-wise. See Max.
- Commutative and associative: order and grouping don't matter.
- for any two values. See Max.
- Infinities participate directly in the comparison.
- With no arguments at all, returns the identity element .
- Takes a Finset too: its smallest member, and NaN for the empty one, as for an empty list.
Examples
1 more kept as data, checked against the oraclesScope #
Possible issues #
Multiple arguments -- lists included -- are flattened into one pool rather than compared list-by-list. See Max
live ↗InOut
With no arguments it returns the identity element (Max, whose identity is , still returns NaN)
live ↗InOut
ComplexInfinity is unordered, so Min cannot compare it: the call stays unevaluated, as in Wolfram
live ↗InOut
About
| Examples | 24 |
|---|---|
| Checked against | Wolfram Language 21 agree3 differSageMath 18 agree1 unevaluated4 errorSymPy 20 agree3 differ1 errormathlib4 10 agree7 errorJulia 16 agree4 errorRust 5 agree1 error |
| Crosswalk | FungrimFungrim entry ×6Wolfram LanguageSageMathSymPyJuliaRust |
Implementation
mapped
mathlib4packages/oracle/src/mappings.tsThe smallest of the arguments as exact rationals. Several arguments are the pool; a lone argument is a list of numbers. The empty pool (ours is NaN, or +∞ with no arguments) and a nested list (ours flattens it) fail to elaborate rather than defaulting.
mapped
mathlib4packages/oracle/src/mappings.tsA single list of numbers; a lone number fails to elaborate.
mapped
wolframpackages/oracle/src/mappings.tsSame flattening as Max.
mapped
sympypackages/oracle/src/mappings.tsSame flattening as Max.
mapped
sagepackages/oracle/src/mappings.tsSame flattening as Max.
mapped
juliapackages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.tsTwo operands.