-- lx-bundle:true

-- This file is part of Lx, created by Liqube <www.liqube.com>
-- Copyright Liqube Audio. All rights reserved.
-- Lx Interim License. See LICENSE for details.

--- Named mathematical operator definitions
-- @module plugins.mdpreview.math.operators

--[[
limits = true means scripts move above and below in display style:

\lim_{x \to 0}

while ordinary operators keep scripts beside them:

\sin^2 x
]]

local OPERATORS = {
	-- Trigonometric
	sin = { limits = false },
	cos = { limits = false },
	tan = { limits = false },
	cot = { limits = false },
	sec = { limits = false },
	csc = { limits = false },

	-- Inverse/hyperbolic
	arcsin = { limits = false },
	arccos = { limits = false },
	arctan = { limits = false },
	sinh = { limits = false },
	cosh = { limits = false },
	tanh = { limits = false },
	coth = { limits = false },
	cosec = { limits = false },
	arctg = { limits = false },
	arcctg = { limits = false },
	cotg = { limits = false },
	sh = { limits = false },
	ch = { limits = false },
	ctg = { limits = false },
	tg = { limits = false },
	cth = { limits = false },
	th = { limits = false },

	-- Logarithmic
	log = { limits = false },
	ln = { limits = false },
	lg = { limits = false },
	exp = { limits = false },

	-- Algebraic
	det = { limits = false },
	dim = { limits = false },
	deg = { limits = false },
	gcd = { limits = false },
	hom = { limits = false },
	ker = { limits = false },
	arg = { limits = false },

	-- Limit-style operators
	lim = { limits = true },
	liminf = { limits = true },
	limsup = { limits = true },
	inf = { limits = true },
	sup = { limits = true },
	min = { limits = true },
	max = { limits = true },
	argmax = { limits = true, text = "arg max" },
	argmin = { limits = true, text = "arg min" },
	injlim = { limits = true, text = "inj lim" },
	varinjlim = { limits = true, text = "lim" },
	plim = { limits = true, text = "plim" },
	varliminf = { limits = true, text = "lim inf" },
	varlimsup = { limits = true, text = "lim sup" },
	projlim = { limits = true, text = "proj lim" },
	varprojlim = { limits = true, text = "lim" },
	Pr = { limits = true },

	-- Modular notation
	bmod = { limits = false, form = "binary", text = "mod" },
	mod = { limits = false, form = "operator" },
}

return OPERATORS
