{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Math.LaTeX.Internal.MathExpr where
import qualified Text.LaTeX as LaTeX
import Text.LaTeX (raw)
import Text.LaTeX.Base.Class (LaTeXC, fromLaTeX)
import qualified Text.LaTeX.Base.Class as LaTeX
import qualified Text.LaTeX.Base.Types as LaTeX
import qualified Text.LaTeX.Base.Commands as LaTeX
import qualified Text.LaTeX.Base.Math as LaTeX
import Text.LaTeX.Base.Syntax (LaTeX(TeXEnv))
import qualified Text.LaTeX.Packages.AMSMath as LaTeX
import qualified Text.LaTeX.Packages.AMSSymb as LaTeX
import qualified Text.LaTeX.Packages.AMSFonts as LaTeX
import CAS.Dumb
import CAS.Dumb.Tree
import CAS.Dumb.Symbols
import CAS.Dumb.LaTeX.Symbols
import Math.LaTeX.Internal.OperatorGenerator
import Data.Foldable (fold, toList)
import Data.Semigroup
import qualified Data.List.NonEmpty as NE
import Data.Monoid hiding ((<>))
import Data.Void
import Data.AdditiveGroup
import Data.VectorSpace
import Data.String (IsString)
import qualified Language.Haskell.TH.Syntax as Hs
import Language.Haskell.TH.Syntax (Fixity(..), FixityDirection(..))
type LaTeXMath σ = CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
type LaTeXSymbol σ = (SymbolClass σ, SCConstraint σ LaTeX)
type MathsInfix = ∀ γ σ .
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
-> CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
-> CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
atom :: l -> CAS' γ s² s¹ (SymbolD σ l)
atom :: forall l γ s² s¹ σ. l -> CAS' γ s² s¹ (SymbolD σ l)
atom = forall γ s² s¹ s⁰. s⁰ -> CAS' γ s² s¹ s⁰
Symbol forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall σ c. c -> SymbolD σ c
StringSymbol
encapsulation :: l -> l
-> (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
-> (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
encapsulation :: forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation l
l l
r = forall γ s² s¹ s⁰. s¹ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Function forall a b. (a -> b) -> a -> b
$ forall s. Bool -> Bool -> s -> s -> Encapsulation s
Encapsulation Bool
False Bool
True l
l l
r
opL, opR, opN :: LaTeXC l => Int -> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰ -> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL :: forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL Int
fxty l
iop = forall s² γ s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
symbolInfix (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxty FixityDirection
Hs.InfixL) l
iop)
opR :: forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
fxty l
iop = forall s² γ s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
symbolInfix (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxty FixityDirection
Hs.InfixR) l
iop)
opN :: forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
fxty l
iop = forall s² γ s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
symbolInfix (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxty FixityDirection
Hs.InfixN) l
iop)
opL', opR', opN' :: LaTeXC l => Int -> (l->l->l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰ -> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' :: forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
fxty l -> l -> l
iop = forall s² γ s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
symbolInfix (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxty FixityDirection
Hs.InfixL) forall a b. (a -> b) -> a -> b
$ l -> l -> l
iop forall a. Monoid a => a
mempty forall a. Monoid a => a
mempty)
opR' :: forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR' Int
fxty l -> l -> l
iop = forall s² γ s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
symbolInfix (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxty FixityDirection
Hs.InfixR) forall a b. (a -> b) -> a -> b
$ l -> l -> l
iop forall a. Monoid a => a
mempty forall a. Monoid a => a
mempty)
opN' :: forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN' Int
fxty l -> l -> l
iop = forall s² γ s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
symbolInfix (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxty FixityDirection
Hs.InfixN) forall a b. (a -> b) -> a -> b
$ l -> l -> l
iop forall a. Monoid a => a
mempty forall a. Monoid a => a
mempty)
infixl 6 ±, ∓, ⊕, +..+
(±), (∓), (⊕), (+..+) :: MathsInfix
± :: MathsInfix
(±) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL Int
6 forall l. LaTeXC l => l
LaTeX.pm
∓ :: MathsInfix
(∓) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL Int
6 forall l. LaTeXC l => l
LaTeX.mp
⊕ :: MathsInfix
(⊕) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
6 forall l. LaTeXC l => l -> l -> l
LaTeX.oplus
+..+ :: MathsInfix
(+..+) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL Int
6 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"+\\ldots+"
infixl 7 ×, ∘, ⊗, *..*
(×), (⊗), (∘), (*..*) :: MathsInfix
× :: MathsInfix
(×) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
7 forall l. LaTeXC l => l -> l -> l
LaTeX.times
∗ :: CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
(∗) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
7 forall l. LaTeXC l => l -> l -> l
(LaTeX.*:)
⋆ :: CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
(⋆) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
7 forall l. LaTeXC l => l -> l -> l
LaTeX.star
⊗ :: MathsInfix
(⊗) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
7 forall l. LaTeXC l => l -> l -> l
LaTeX.otimes
∘ :: MathsInfix
(∘) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
7 forall l. LaTeXC l => l -> l -> l
LaTeX.circ
*..* :: MathsInfix
(*..*) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL Int
7 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"{\\cdot\\ldots\\cdot}"
factorial :: LaTeXC l
=> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
factorial :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
factorial CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
n = forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
8 FixityDirection
Hs.InfixR) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"!")
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
n (forall γ s² s¹ s⁰. s⁰ -> CAS' γ s² s¹ s⁰
Symbol forall a b. (a -> b) -> a -> b
$ forall σ c. c -> SymbolD σ c
StringSymbol forall a. Monoid a => a
mempty)
infixr 3 ∧, ∨
(∧), (∨) :: MathsInfix
∧ :: MathsInfix
(∧) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
3 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => String -> l
LaTeX.comm0String
"wedge"
∨ :: MathsInfix
(∨) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
3 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => String -> l
LaTeX.comm0String
"vee"
(∩), (∪), (⊎), (-\-), (⧵) :: MathsInfix
infixr 3 ∩
∩ :: MathsInfix
(∩) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR' Int
3 forall l. LaTeXC l => l -> l -> l
LaTeX.cap
infixr 2 ∪, ⊎
∪ :: MathsInfix
(∪) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR' Int
2 forall l. LaTeXC l => l -> l -> l
LaTeX.cup
⊎ :: MathsInfix
(⊎) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR' Int
2 forall l. LaTeXC l => l -> l -> l
LaTeX.uplus
infixl 2 -\-, ⧵, ∖
{-# DEPRECATED (-\-) "Use (∖), i.e. U+2216 SET MINUS" #-}
-\- :: MathsInfix
(-\-) = MathsInfix
(⧵)
⧵ :: MathsInfix
(⧵) = MathsInfix
(⧵)
{-# DEPRECATED (⧵) "Use (∖), i.e. U+2216 SET MINUS. (You used U+29F5 REVERSE SOLIDUS OPERATOR)" #-}
∖ :: CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
(∖) = forall l γ s⁰.
LaTeXC l =>
Int
-> (l -> l -> l)
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL' Int
2 forall l. LaTeXC l => l -> l -> l
LaTeX.setminus
infixr 5 ⸪, -→, ←-, ↪
(÷), (⸪), (-→), (←-), (↪) :: MathsInfix
{-# DEPRECATED (⸪) "Use (÷), i.e. U+00F7 DIVISION SIGN" #-}
⸪ :: MathsInfix
(⸪) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
5 LaTeX
":"
÷ :: MathsInfix
(÷) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
5 LaTeX
":"
-→ :: MathsInfix
(-→) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
5 forall l. LaTeXC l => l
LaTeX.to
←- :: MathsInfix
(←-) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
5 forall l. LaTeXC l => l
LaTeX.leftarrow
↪ :: MathsInfix
(↪) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
5 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => String -> l
LaTeX.comm0String
"hookrightarrow"
infix 2 ∀:, ∃:, ∄:
(∀:), (∃:) :: MathsInfix
∀: :: MathsInfix
(∀:) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
2 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"\\ \\:\\forall{}"
∃: :: MathsInfix
(∃:) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
2 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"\\ \\:\\exists{}"
∄: :: CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
(∄:) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
2 forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"\\ \\:\\nexists{}"
infixl 7 °, ☾
infixr 7 ☽
infixr 9 ◝, ⁀, ‸, ◝⁀
infixr 9 ◞
infixl 8 |◞, |◝, |◞◝
infixl 8 ◞◝, ₌₌
(°), (☾), (☽), (⁀), (◝), (◝⁀), (◞), (|◞), (₌₌), (╰─┬─╯) :: MathsInfix
{-# DEPRECATED (°) "Use (☾), i.e. U+263E LAST QUARTER MOON" #-}
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
f☽ :: MathsInfix
☽CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
x = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
7 forall a. Monoid a => a
mempty (forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left(") (forall l. LaTeXC l => Text -> l
rawText
"\\right)") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
f) CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
x
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
f☾ :: MathsInfix
☾CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
x = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL Int
7 forall a. Monoid a => a
mempty CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
f (forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left(") (forall l. LaTeXC l => Text -> l
rawText
"\\right)") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
x)
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
f° :: MathsInfix
°CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
x = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opL Int
7 forall a. Monoid a => a
mempty CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
f (forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left(") (forall l. LaTeXC l => Text -> l
rawText
"\\right)") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
x)
{-# DEPRECATED (⁀) "Use (‸), i.e. U+2038 CARET" #-}
⁀ :: MathsInfix
(⁀) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
9 forall a. Monoid a => a
mempty
‸ :: CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
(‸) = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
9 forall a. Monoid a => a
mempty
{-# DEPRECATED (◝⁀) "Use manual parenthesization" #-}
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l◝⁀ :: MathsInfix
◝⁀CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s = forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
9 forall a. Monoid a => a
mempty CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l forall a b. (a -> b) -> a -> b
$ forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"^{\\left(") (forall l. LaTeXC l => Text -> l
rawText
"\\right)}") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l◝ :: MathsInfix
◝CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s = forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
9 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l (forall γ s² s¹ s⁰. s¹ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Function (forall s. SpecialEncapsulation s -> Encapsulation s
SpecialEncapsulation LaTeXMathEncapsulation
Superscript) CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s)
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l◞ :: MathsInfix
◞CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s = forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
9 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l (forall γ s² s¹ s⁰. s¹ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Function (forall s. SpecialEncapsulation s -> Encapsulation s
SpecialEncapsulation LaTeXMathEncapsulation
Subscript) CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s)
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
expression
╰─┬─╯ :: MathsInfix
╰─┬─╯
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
label
= forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
8 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\underbrace{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
expression)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"_{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
label)
{-# DEPRECATED (₌₌) "Use (╰─┬─╯), i.e. Unicode box drawings" #-}
₌₌ :: MathsInfix
(₌₌) = MathsInfix
(╰─┬─╯)
CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
l◞◝ :: CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
-> (CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s),
CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s))
-> CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
◞◝(CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
s,CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
p) = forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
9 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
l
forall a b. (a -> b) -> a -> b
$ forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
9 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"_{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
s)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"^{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
p)
CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
l|◝ :: CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
-> CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
-> CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
|◝CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
s = forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
8 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\left.") (forall l. LaTeXC l => Text -> l
raw Text
"\\right|") CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
l)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"^{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
s)
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l|◞ :: MathsInfix
|◞CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s = forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
8 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\left.") (forall l. LaTeXC l => Text -> l
raw Text
"\\right|") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"_{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
s)
CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
l|◞◝ :: CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
-> (CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s),
CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s))
-> CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
|◞◝(CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
s,CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
p) = forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
8 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\left.") (forall l. LaTeXC l => Text -> l
raw Text
"\\right|") CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
l)
forall a b. (a -> b) -> a -> b
$ forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
8 FixityDirection
Hs.InfixR) forall a. Monoid a => a
mempty)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"_{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
s)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"^{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix s) (Encapsulation s) (SymbolD σ s)
p)
makeOperatorCaste "implicationOperators"
(''MathsInfix, ''LaTeX)
(Fixity 1 InfixL)
True
[ ("==>", [e|LaTeX.longrightarrow2|])
, ("<==", [e|LaTeX.longleftarrow2|])
, ("<=>", [e|LaTeX.longleftrightarrow2|])
]
makeOperatorCaste "relationOperators"
(''MathsInfix, ''LaTeX)
(Fixity 4 InfixL)
True
[ ("⩵", [e|""LaTeX.=:""|])
#if __GLASGOW_HASKELL__ > 801
, ("⸪=", [e|raw"{:=}"|])
, ("=⸪", [e|raw"{=:}"|])
#endif
, ("÷=", [e|raw"{:=}"|])
, ("=÷", [e|raw"{=:}"|])
, ("≡", [e|LaTeX.comm0"equiv"|])
, ("⩵!", [e|raw" \\overset{!}{=} "|])
, ("≠", [e|""LaTeX./=:""|])
, ("≈", [e|LaTeX.comm0"approx"|])
, ("∼", [e|LaTeX.comm0"sim"|])
, ("≃", [e|LaTeX.comm0"simeq"|])
, ("≅", [e|LaTeX.comm0"cong"|])
, ("⪡", [e|""LaTeX.<:""|])
, ("⪢", [e|""LaTeX.>:""|])
, ("≤", [e|""LaTeX.<=:""|])
, ("≥", [e|""LaTeX.>=:""|])
, ("≪", [e|LaTeX.ll""""|])
, ("≫", [e|LaTeX.gg""""|])
, ("∝", [e|LaTeX.propto""""|])
, ("⟂", [e|LaTeX.perp""""|])
, ("∥", [e|LaTeX.parallel""""|])
, ("⊂", [e|LaTeX.subset""""|])
, ("/⊂", [e|raw" \\not\\subset "|])
, ("⊃", [e|LaTeX.supset""""|])
, ("⊆", [e|LaTeX.comm0"subseteq"|])
, ("⊇", [e|LaTeX.comm0"supseteq"|])
, ("∋", [e|LaTeX.ni""""|])
, ("∌", [e|raw"\\not\\ni{}"|])
, ("=→", [e|LaTeX.to|])
, ("←=", [e|LaTeX.leftarrow|])
, ("∈", [e|LaTeX.in_""""|])
, ("∉", [e|raw"\\not\\in{}"|])
, ("↦", [e|LaTeX.mapsto|])
]
del, nabla, infty :: (SymbolClass σ, SCConstraint σ LaTeX)
=> CAS' γ s² s¹ (SymbolD σ LaTeX)
del :: forall σ γ s² s¹.
(SymbolClass σ, SCConstraint σ LaTeX) =>
CAS' γ s² s¹ (SymbolD σ LaTeX)
del = forall l γ s² s¹ σ. l -> CAS' γ s² s¹ (SymbolD σ l)
atom forall l. LaTeXC l => l
LaTeX.partial
nabla :: forall σ γ s² s¹.
(SymbolClass σ, SCConstraint σ LaTeX) =>
CAS' γ s² s¹ (SymbolD σ LaTeX)
nabla = forall l γ s² s¹ σ. l -> CAS' γ s² s¹ (SymbolD σ l)
atom forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
raw Text
"\\nabla{}\\!"
infty :: forall σ γ s² s¹.
(SymbolClass σ, SCConstraint σ LaTeX) =>
CAS' γ s² s¹ (SymbolD σ LaTeX)
infty = forall l γ s² s¹ σ. l -> CAS' γ s² s¹ (SymbolD σ l)
atom forall l. LaTeXC l => l
LaTeX.infty
newtype Integrand γ s² s¹ s⁰ = Integrand { forall γ s² s¹ s⁰. Integrand γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
getIntgrand :: CAS' γ s² s¹ s⁰ }
d :: LaTeXC l => CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> Integrand γ (Infix l) (Encapsulation l) s⁰
d :: forall l γ s⁰.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> Integrand γ (Infix l) (Encapsulation l) s⁰
d CAS' γ (Infix l) (Encapsulation l) s⁰
x CAS' γ (Infix l) (Encapsulation l) s⁰
f = forall γ s² s¹ s⁰. CAS' γ s² s¹ s⁰ -> Integrand γ s² s¹ s⁰
Integrand forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
7 forall l. LaTeXC l => l
LaTeX.space CAS' γ (Infix l) (Encapsulation l) s⁰
x CAS' γ (Infix l) (Encapsulation l) s⁰
f
infixr 8 ∫, ◞∫, ◞∮, ∑, ◞∑, ∏, ◞∏, ⋃, ◞⋃, ⋂, ◞⋂, ⨄, ◞⨄
(∫) :: LaTeXC l
=> ( CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
, CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l) )
-> Integrand γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
l,CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
r)∫ :: forall l γ σ.
LaTeXC l =>
(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l),
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
-> Integrand γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
∫Integrand CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
i
= forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
7 FixityDirection
Hs.InfixR) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => l -> l
LaTeX.mathrm l
"d")
(forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
9 FixityDirection
Hs.InfixN) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
raw Text
"^")
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\int\\limits_{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
l)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
r) )
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
i
(◞∫) :: LaTeXC l
=> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> Integrand γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
ω◞∫ :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> Integrand γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
◞∫Integrand CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
i
= forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
7 FixityDirection
Hs.InfixR) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => l -> l
LaTeX.mathrm l
"d")
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\int_{") (forall l. LaTeXC l => Text -> l
raw Text
"}\\!\\!\\!") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
ω)
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
i
(◞∮) :: LaTeXC l
=> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> Integrand γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
ω◞∮ :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> Integrand γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
◞∮Integrand CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
i
= forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
7 FixityDirection
Hs.InfixR) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => l -> l
LaTeX.mathrm l
"d")
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\oint_{") (forall l. LaTeXC l => Text -> l
raw Text
"}\\!\\!\\!") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
ω)
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
i
(∑), (∏), (⋃), (⋂), (⨄) :: LaTeXC l
=> ( CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
, CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l) )
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
[(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l),
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(∑), (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l),
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(∏), (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l),
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(⋃), (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l),
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(⋂), (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l),
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l))
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(⨄)]
= [ \(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
l,CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
r) CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
m
-> forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
7 FixityDirection
Hs.InfixR) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
" ")
(forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
9 FixityDirection
Hs.InfixN) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
raw Text
"^")
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw (Text
"\\"forall a. Semigroup a => a -> a -> a
<>Text
oprawforall a. Semigroup a => a -> a -> a
<>Text
"_{")) (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
l)
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"{") (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
r) )
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
m
| Text
opraw <- [Text
"sum", Text
"prod", Text
"bigcup", Text
"bigcap", Text
"biguplus"]
]
(◞∑), (◞∏), (◞⋃), (◞⋂), (◞⨄) :: LaTeXC l
=> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(◞∑), CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(◞∏), CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(◞⋃), CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(◞⋂), CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
(◞⨄)]
= [ \CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
ω CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
m
-> forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
7 FixityDirection
Hs.InfixR) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
raw Text
" ")
(forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw (Text
"\\"forall a. Semigroup a => a -> a -> a
<>Text
oprawforall a. Semigroup a => a -> a -> a
<>Text
"_{")) (forall l. LaTeXC l => Text -> l
raw Text
"}") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
ω)
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
m
| Text
opraw <- [Text
"sum", Text
"prod", Text
"bigcup", Text
"bigcap", Text
"biguplus"]
]
norm :: LaTeXC l => CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
norm :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
norm = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
raw Text
"\\left\\|") (forall l. LaTeXC l => Text -> l
raw Text
"\\right\\|")
makeOperatorCaste "juxtapositionOperators"
(''MathsInfix, ''LaTeX)
(Fixity 0 InfixR)
True
[ ("␣", [e|LaTeX.space|])
, ("...", [e|LaTeX.comm0"ldots"|])
, ("⍪", [e|raw","|])
, ("⍪..⍪", [e|raw",\\ldots,"|])
#if __GLASGOW_HASKELL__ > 801
, ("،", [e|raw","|])
, ("،..،", [e|raw",\\ldots,"|])
#endif
]
{-# DEPRECATED (،) "Use (⍪), i.e. U+236A APL FUNCTIONAL SYMBOL COMMA" #-}
{-# DEPRECATED (،..،) "Use (⍪..⍪), i.e. U+236A APL FUNCTIONAL SYMBOL COMMA" #-}
matrix :: LaTeXC l =>
[[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]]
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
matrix :: forall l γ σ.
LaTeXC l =>
[[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]]
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
matrix [] = forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
set (forall γ s² s¹ s⁰. s⁰ -> CAS' γ s² s¹ s⁰
Symbol forall a b. (a -> b) -> a -> b
$ forall σ c. c -> SymbolD σ c
StringSymbol forall a. Monoid a => a
mempty)
matrix [[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]]
mlines = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\begin{pmatrix}")
(forall l. LaTeXC l => Text -> l
rawText
"\\end{pmatrix}")
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall γ s² s¹ s⁰.
CAS' γ s² s¹ s⁰ -> [(s², CAS' γ s² s¹ s⁰)] -> CAS' γ s² s¹ s⁰
OperatorChain CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
le₀ forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> [a]
reverse
forall a b. (a -> b) -> a -> b
$ (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
0 FixityDirection
Hs.InfixL) forall l. LaTeXC l => l
LaTeX.lnbk, ) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]
les
where (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
le₀:[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]
les) = forall a b. (a -> b) -> [a] -> [b]
map (\(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
c₀:[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]
cs) -> forall γ s² s¹ s⁰.
CAS' γ s² s¹ s⁰ -> [(s², CAS' γ s² s¹ s⁰)] -> CAS' γ s² s¹ s⁰
OperatorChain CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
c₀ forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> [a]
reverse
forall a b. (a -> b) -> a -> b
$ (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
1 FixityDirection
Hs.InfixL) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"&", ) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]
cs) [[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]]
mlines
cases :: LaTeXC l
=> [(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l), LaTeX)]
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
cases :: forall l γ σ.
LaTeXC l =>
[(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l), LaTeX)]
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
cases [(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l), LaTeX)]
clauses = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\begin{cases}") (forall l. LaTeXC l => Text -> l
rawText
"\\end{cases}")
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall γ s² s¹ s⁰.
CAS' γ s² s¹ s⁰ -> [(s², CAS' γ s² s¹ s⁰)] -> CAS' γ s² s¹ s⁰
OperatorChain CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
cl₀ forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. [a] -> [a]
reverse
forall a b. (a -> b) -> a -> b
$ (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
0 FixityDirection
Hs.InfixL) forall l. LaTeXC l => l
LaTeX.lnbk, ) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> [CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]
cls
where (CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
cl₀:[CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)]
cls) = forall a b. (a -> b) -> [a] -> [b]
map (\(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
r,LaTeX
co) -> forall γ s² s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
Operator (forall s. Fixity -> s -> Infix s
Infix (Int -> FixityDirection -> Fixity
Hs.Fixity Int
1 FixityDirection
Hs.InfixL) forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => Text -> l
rawText
"&")
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
r forall a b. (a -> b) -> a -> b
$ forall γ s² s¹ s⁰. s⁰ -> CAS' γ s² s¹ s⁰
Symbol (forall σ c. c -> SymbolD σ c
StringSymbol forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall l. LaTeXC l => String -> l -> l
LaTeX.comm1 String
"text"
forall a b. (a -> b) -> a -> b
$ forall l. LaTeXC l => LaTeX -> l
fromLaTeX LaTeX
co)
) [(CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l), LaTeX)]
clauses
set, tup, intv, nobreaks :: LaTeXC l
=> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
set :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
set = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left\\{") (forall l. LaTeXC l => Text -> l
rawText
"\\right\\}")
tup :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
tup = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left(") (forall l. LaTeXC l => Text -> l
rawText
"\\right)")
intv :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
intv = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left[") (forall l. LaTeXC l => Text -> l
rawText
"\\right]")
nobreaks :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
nobreaks = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"{") (forall l. LaTeXC l => Text -> l
rawText
"}")
setCompr :: LaTeXC l
=> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
setCompr :: forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
setCompr CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
elm CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
cnd = forall l γ σ.
LaTeXC l =>
CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
set forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opR Int
0 (forall l. LaTeXC l => Text -> l
rawText
"\\middle|") CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
elm CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
cnd
infix 5 <.<, ≤.<, <.≤, ≤.≤
(<.<), (≤.<), (<.≤), (≤.≤) :: MathsInfix
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l <.< :: MathsInfix
<.< CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left]") (forall l. LaTeXC l => Text -> l
rawText
"\\right[") forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
0 (forall l. LaTeXC l => Text -> l
rawText
",") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l ≤.< :: MathsInfix
≤.< CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left[") (forall l. LaTeXC l => Text -> l
rawText
"\\right[") forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
0 (forall l. LaTeXC l => Text -> l
rawText
",") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l <.≤ :: MathsInfix
<.≤ CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left]") (forall l. LaTeXC l => Text -> l
rawText
"\\right]") forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
0 (forall l. LaTeXC l => Text -> l
rawText
",") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l ≤.≤ :: MathsInfix
≤.≤ CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left[") (forall l. LaTeXC l => Text -> l
rawText
"\\right]") forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
0 (forall l. LaTeXC l => Text -> l
rawText
",") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r
toMathLaTeX' :: ∀ σ l . (LaTeXC l, SymbolClass σ, SCConstraint σ LaTeX)
=> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX) -> l
toMathLaTeX' :: forall σ l.
(LaTeXC l, SymbolClass σ, SCConstraint σ LaTeX) =>
CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX) -> l
toMathLaTeX' = forall l. LaTeXC l => LaTeX -> l
fromLaTeX forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall σ l.
(l ~ LaTeX, SymbolClass σ, SCConstraint σ l) =>
CAS (Infix l) (Encapsulation l) (SymbolD σ l) -> l
toMathLaTeX
toMathLaTeX :: ∀ σ l . ( l ~ LaTeX, SymbolClass σ
, SCConstraint σ l )
=> CAS (Infix l) (Encapsulation l) (SymbolD σ l) -> l
toMathLaTeX :: forall σ l.
(l ~ LaTeX, SymbolClass σ, SCConstraint σ l) =>
CAS (Infix l) (Encapsulation l) (SymbolD σ l) -> l
toMathLaTeX = forall σ c r.
(SymbolClass σ, SCConstraint σ c, HasCallStack) =>
ContextFixity -> RenderingCombinator σ c r -> AlgebraExpr σ c -> r
renderSymbolExpression (Fixity -> ContextFixity
AtLHS forall a b. (a -> b) -> a -> b
$ Int -> FixityDirection -> Fixity
Hs.Fixity Int
0 FixityDirection
Hs.InfixL) Bool -> Maybe l -> SymbolD σ l -> Maybe l -> l
ρ
forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall σ γ.
(SymbolClass σ, SCConstraint σ LaTeX) =>
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
-> CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
fixateLaTeXAlgebraEncaps
where ρ :: Bool -> Maybe l -> SymbolD σ l -> Maybe l -> l
ρ Bool
dop Maybe l
lctxt (StringSymbol l
sym) Maybe l
rctxt
= forall l. LaTeXC l => Bool -> l -> l
showLParen Bool
dop forall a b. (a -> b) -> a -> b
$ forall a b c. (a -> b -> c) -> b -> a -> c
flip (forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr forall a. Monoid a => a -> a -> a
mappend) Maybe l
lctxt forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) b a.
Foldable t =>
(b -> a -> b) -> b -> t a -> b
foldl forall a. Monoid a => a -> a -> a
mappend l
sym Maybe l
rctxt
ρ Bool
dop Maybe l
lctxt (NatSymbol Integer
n) Maybe l
rctxt
= forall l. LaTeXC l => Bool -> l -> l
showLParen Bool
dop forall a b. (a -> b) -> a -> b
$ forall a b c. (a -> b -> c) -> b -> a -> c
flip (forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr forall a. Monoid a => a -> a -> a
mappend) Maybe l
lctxt forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) b a.
Foldable t =>
(b -> a -> b) -> b -> t a -> b
foldl forall a. Monoid a => a -> a -> a
mappend (forall a. Num a => Integer -> a
fromInteger Integer
n) Maybe l
rctxt
ρ Bool
dop Maybe l
lctxt (PrimitiveSymbol Char
c) Maybe l
rctxt
= case forall σ (p :: * -> *) c.
(SymbolClass σ, Functor p, SCConstraint σ c) =>
p σ -> Char -> c
fromCharSymbol ([]::[σ]) of
Char -> l
fcs -> forall l. LaTeXC l => Bool -> l -> l
showLParen Bool
dop forall a b. (a -> b) -> a -> b
$ forall a b c. (a -> b -> c) -> b -> a -> c
flip (forall (t :: * -> *) a b.
Foldable t =>
(a -> b -> b) -> b -> t a -> b
foldr forall a. Monoid a => a -> a -> a
mappend) Maybe l
lctxt forall a b. (a -> b) -> a -> b
$ forall (t :: * -> *) b a.
Foldable t =>
(b -> a -> b) -> b -> t a -> b
foldl forall a. Monoid a => a -> a -> a
mappend (Char -> l
fcs Char
c) Maybe l
rctxt
showLParen :: LaTeXC l => Bool -> l -> l
showLParen :: forall l. LaTeXC l => Bool -> l -> l
showLParen Bool
True = forall l. LaTeXC l => l -> l
LaTeX.autoParens
showLParen Bool
False = forall a. a -> a
id
instance (SymbolClass σ, SCConstraint σ LaTeX)
=> Semigroup (CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)) where
CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l<> :: CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
-> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
-> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
<>CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r = forall a. Semigroup a => NonEmpty a -> a
sconcat forall a b. (a -> b) -> a -> b
$ CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l forall a. a -> [a] -> NonEmpty a
NE.:|[CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r]
sconcat :: NonEmpty
(CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX))
-> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
sconcat NonEmpty
(CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX))
es = case forall s¹ γ s² s⁰.
Monoid s¹ =>
CAS' γ (Infix s²) (Encapsulation s¹) s⁰
-> CAS' γ (Infix s²) (Encapsulation s¹) s⁰
don'tParenthesise forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a. NonEmpty a -> [a]
NE.toList NonEmpty
(CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX))
es of
[CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l,CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r] -> forall s² γ s¹ s⁰.
s² -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰ -> CAS' γ s² s¹ s⁰
symbolInfix (forall s. Fixity -> s -> Infix s
Infix Fixity
loosestFixity forall a. Monoid a => a
mempty) CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r
(CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l:[CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)]
rs) -> forall γ s² s¹ s⁰.
CAS' γ s² s¹ s⁰ -> [(s², CAS' γ s² s¹ s⁰)] -> CAS' γ s² s¹ s⁰
OperatorChain CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l [(forall s. Fixity -> s -> Infix s
Infix Fixity
loosestFixity forall a. Monoid a => a
mempty, CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r) | CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r<-forall a. [a] -> [a]
reverse [CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)]
rs]
where loosestFixity :: Fixity
loosestFixity = case forall (t :: * -> *) a. Foldable t => (a -> a -> a) -> t a -> a
foldr1 Maybe Fixity -> Maybe Fixity -> Maybe Fixity
looser forall a b. (a -> b) -> a -> b
$ forall σ c. AlgebraExpr σ c -> Maybe Fixity
expressionFixity forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> NonEmpty
(CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX))
es of
Maybe Fixity
Nothing -> Int -> FixityDirection -> Fixity
Hs.Fixity Int
10 FixityDirection
Hs.InfixR
Just Fixity
fxty -> Fixity
fxty
looser :: Maybe Fixity -> Maybe Fixity -> Maybe Fixity
looser Maybe Fixity
Nothing Maybe Fixity
Nothing = forall a. Maybe a
Nothing
looser (Just Fixity
fxty) Maybe Fixity
Nothing = forall a. a -> Maybe a
Just Fixity
fxty
looser Maybe Fixity
Nothing (Just Fixity
fxty) = forall a. a -> Maybe a
Just Fixity
fxty
looser (Just (Hs.Fixity Int
fxtyL FixityDirection
fdL)) (Just (Hs.Fixity Int
fxtyR FixityDirection
fdR))
| Int
fxtyL forall a. Ord a => a -> a -> Bool
> Int
fxtyR = forall a. a -> Maybe a
Just forall a b. (a -> b) -> a -> b
$ Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxtyR FixityDirection
fdR
| Int
fxtyL forall a. Ord a => a -> a -> Bool
< Int
fxtyR
Bool -> Bool -> Bool
|| FixityDirection
fdL forall a. Eq a => a -> a -> Bool
== FixityDirection
fdR = forall a. a -> Maybe a
Just forall a b. (a -> b) -> a -> b
$ Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxtyL FixityDirection
fdL
| Bool
otherwise = forall a. a -> Maybe a
Just forall a b. (a -> b) -> a -> b
$ Int -> FixityDirection -> Fixity
Hs.Fixity Int
fxtyL FixityDirection
Hs.InfixN
instance (SymbolClass σ, SCConstraint σ LaTeX)
=> Monoid (CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)) where
mempty :: CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
mempty = forall l γ s² s¹ σ. l -> CAS' γ s² s¹ (SymbolD σ l)
atom forall a. Monoid a => a
mempty
mappend :: CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
-> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
-> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
mappend = forall a. Semigroup a => a -> a -> a
(<>)
mconcat :: [CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)]
-> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
mconcat [] = forall a. Monoid a => a
mempty
mconcat (CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l : [CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)]
m) = forall a. Semigroup a => NonEmpty a -> a
sconcat forall a b. (a -> b) -> a -> b
$ CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l forall a. a -> [a] -> NonEmpty a
NE.:| [CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)]
m
instance ( SymbolClass σ, SCConstraint σ LaTeX
, IsString (CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)) )
=> LaTeXC (CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)) where
liftListL :: ([LaTeX] -> LaTeX)
-> [CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)]
-> CAS (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
liftListL [LaTeX] -> LaTeX
f = forall l γ s² s¹ σ. l -> CAS' γ s² s¹ (SymbolD σ l)
atom forall b c a. (b -> c) -> (a -> b) -> a -> c
. [LaTeX] -> LaTeX
f forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a b. (a -> b) -> [a] -> [b]
map forall σ l.
(l ~ LaTeX, SymbolClass σ, SCConstraint σ l) =>
CAS (Infix l) (Encapsulation l) (SymbolD σ l) -> l
toMathLaTeX
instance ( γ ~ Void, s² ~ Infix LaTeX, s¹ ~ Encapsulation LaTeX, s⁰ ~ SymbolD σ LaTeX
, SymbolClass σ, SCConstraint σ LaTeX )
=> LaTeX.Texy (CAS' γ s² s¹ s⁰) where
texy :: forall l. LaTeXC l => CAS' γ s² s¹ s⁰ -> l
texy = forall l. LaTeXC l => l -> l
LaTeX.math forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall t l. (Texy t, LaTeXC l) => t -> l
LaTeX.texy forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall σ l.
(l ~ LaTeX, SymbolClass σ, SCConstraint σ l) =>
CAS (Infix l) (Encapsulation l) (SymbolD σ l) -> l
toMathLaTeX
instance LaTeXSymbol σ => AdditiveGroup (LaTeXMath σ) where
zeroV :: LaTeXMath σ
zeroV = LaTeXMath σ
0
^+^ :: LaTeXMath σ -> LaTeXMath σ -> LaTeXMath σ
(^+^) = forall a. Num a => a -> a -> a
(+)
^-^ :: LaTeXMath σ -> LaTeXMath σ -> LaTeXMath σ
(^-^) = (-)
negateV :: LaTeXMath σ -> LaTeXMath σ
negateV = forall a. Num a => a -> a
negate
instance LaTeXSymbol σ => VectorSpace (LaTeXMath σ) where
type Scalar (LaTeXMath σ) = LaTeXMath σ
*^ :: Scalar (LaTeXMath σ) -> LaTeXMath σ -> LaTeXMath σ
(*^) = forall a. Num a => a -> a -> a
(*)
infix 7 <⍪>
(<⍪>) :: MathsInfix
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l <⍪> :: MathsInfix
<⍪> CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left\\langle{") (forall l. LaTeXC l => Text -> l
rawText
"}\\right\\rangle")
forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
0 (forall l. LaTeXC l => Text -> l
rawText
",") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r
infix 7 <،>
{-# DEPRECATED (<،>) "Use (<⍪>), i.e. U+236A APL FUNCTIONAL SYMBOL COMMA" #-}
(<،>) :: MathsInfix
CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l <،> :: MathsInfix
<،> CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r = forall l γ σ.
l
-> l
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
-> CAS' γ (Infix l) (Encapsulation l) (SymbolD σ l)
encapsulation (forall l. LaTeXC l => Text -> l
rawText
"\\left\\langle{") (forall l. LaTeXC l => Text -> l
rawText
"}\\right\\rangle")
forall a b. (a -> b) -> a -> b
$ forall l γ s⁰.
LaTeXC l =>
Int
-> l
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
-> CAS' γ (Infix l) (Encapsulation l) s⁰
opN Int
0 (forall l. LaTeXC l => Text -> l
rawText
",") CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
l CAS' γ (Infix LaTeX) (Encapsulation LaTeX) (SymbolD σ LaTeX)
r
instance LaTeXSymbol σ => InnerSpace (LaTeXMath σ) where
<.> :: LaTeXMath σ -> LaTeXMath σ -> Scalar (LaTeXMath σ)
(<.>) = MathsInfix
(<⍪>)