1
Fork 0
satellite/home/features/neovim/config/lua/my/abbreviations/math.lua

60 lines
1.7 KiB
Lua
Raw Normal View History

2023-12-02 00:46:56 +01:00
local A = require("my.abbreviations")
local scrap = require("scrap")
local M = {}
2024-01-28 16:00:03 +01:00
local function nocap(d)
d.options = A.no_capitalization
return d
end
2023-12-02 00:46:56 +01:00
M.words = {
-- {{{ General phrases
2024-01-28 16:00:03 +01:00
{ "thrf", "therefore" },
{ "bcla", "by contradiction let's assume" },
{ "wlg", "without loss of generality" },
{ "tits", "that is to say," },
{ "wpbd", "we will prove the statement in both directions." },
{ "stam{,s}", "statement{}" },
2023-12-02 00:46:56 +01:00
{ "{ww,tt}{m,i}", "{which,this} {means,implies}" },
2024-01-28 16:00:03 +01:00
{ "cex{,s}", "counterexample{}" },
{ "er{t,s,r}", "{transitivity,symmetry,reflexivity}" },
2023-12-02 00:46:56 +01:00
-- }}}
-- {{{ Calculus & analysis
2024-01-28 16:00:03 +01:00
{ "ib{p,s}", "integration by {parts,substitution}" },
{ "{o,c,}nb{,h}{,s}", "{open,closed,} neighbour{,hood}{}" },
{
"{n,}{{c,}d,iv,it}ble",
"{non-,}{{continuously,} differentia,inverti,integra}ble",
},
nocap({ "lshiz{c,}", "Lipschitz{ condition,}" }),
2023-12-02 00:46:56 +01:00
-- }}}
-- {{{ Linear algebra
2024-01-28 16:00:03 +01:00
{ "rref", "reduced row echalon form" },
2023-12-02 00:46:56 +01:00
{ "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" },
2024-01-28 16:00:03 +01:00
{ "mx{,s}", "matri{x,ces}" },
{ "dete{,s}", "determinant{}" },
{ "ort{n,g}", "orto{normal,gonal}" },
{ "l{in,de}", "linearly {independent,dependent}" },
{ "lcon{,s}", "linear combination{}" },
{ "vst{,s}", "vector space{}" }, -- text vector space
nocap({ "rizz", "Riesz vector" }), -- 💀
2023-12-02 00:46:56 +01:00
-- }}}
-- {{{ Differential equations
-- Note: we must add the space inside the {} in order for capitalization to work!
{
"{{s,o,l},}deq{s,}",
"{{scalar,ordinary,linear} ,}differential equation{}",
},
-- }}}
-- {{{ Graph theory
2024-01-28 16:00:03 +01:00
{ "vx{,s}", "vert{ex,ices}" },
2023-12-02 00:46:56 +01:00
{ "edg{,s}", "edge{}" },
-- }}}
}
function M.setup()
A.manyGlobalAbbr(scrap.expand_many(M.words))
end
return M